mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-31 14:26:40 -04:00
unix: add sockaddr and defines for PPPoE sockets.
`sockaddr_pppox` is a packed struct, which godefs doesn't understand. So, I had to do the byte packing by hand instead. Change-Id: Ib92cf43f8ae0729a0af043c4241063911c95e6bf GitHub-Last-Rev: 8982dec099594064d3892f3fa05bb7b5989cec6d GitHub-Pull-Request: golang/sys#23 Reviewed-on: https://go-review.googlesource.com/c/149757 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
This commit is contained in:
committed by
Tobias Klauser
parent
5ac8a444bd
commit
93218def8b
@@ -48,6 +48,7 @@ package unix
|
||||
#include <sys/wait.h>
|
||||
#include <linux/filter.h>
|
||||
#include <linux/icmpv6.h>
|
||||
#include <linux/if_pppox.h>
|
||||
#include <linux/keyctl.h>
|
||||
#include <linux/netfilter/nf_tables.h>
|
||||
#include <linux/netfilter/nfnetlink.h>
|
||||
@@ -168,6 +169,7 @@ union sockaddr_all {
|
||||
struct sockaddr_un s4;
|
||||
struct sockaddr_ll s5;
|
||||
struct sockaddr_nl s6;
|
||||
struct sockaddr_pppox s7;
|
||||
};
|
||||
|
||||
struct sockaddr_any {
|
||||
@@ -432,6 +434,8 @@ type RawSockaddrVM C.struct_sockaddr_vm
|
||||
|
||||
type RawSockaddrXDP C.struct_sockaddr_xdp
|
||||
|
||||
type RawSockaddrPPPoX [C.sizeof_struct_sockaddr_pppox]byte
|
||||
|
||||
type RawSockaddr C.struct_sockaddr
|
||||
|
||||
type RawSockaddrAny C.struct_sockaddr_any
|
||||
@@ -480,6 +484,7 @@ const (
|
||||
SizeofSockaddrALG = C.sizeof_struct_sockaddr_alg
|
||||
SizeofSockaddrVM = C.sizeof_struct_sockaddr_vm
|
||||
SizeofSockaddrXDP = C.sizeof_struct_sockaddr_xdp
|
||||
SizeofSockaddrPPPoX = C.sizeof_struct_sockaddr_pppox
|
||||
SizeofLinger = C.sizeof_struct_linger
|
||||
SizeofIovec = C.sizeof_struct_iovec
|
||||
SizeofIPMreq = C.sizeof_struct_ip_mreq
|
||||
|
||||
Reference in New Issue
Block a user