syscall: add IPv4 ancillary data for linux

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5039042
This commit is contained in:
Mikio Hara 2011-09-23 23:38:52 +09:00
parent 33a15eb6c0
commit 4e2f2c7704
4 changed files with 23 additions and 0 deletions

View File

@ -117,6 +117,7 @@ typedef struct ip_mreq $IPMreq;
typedef struct ipv6_mreq $IPv6Mreq;
typedef struct msghdr $Msghdr;
typedef struct cmsghdr $Cmsghdr;
typedef struct in_pktinfo $Inet4Pktinfo;
typedef struct in6_pktinfo $Inet6Pktinfo;
typedef struct ucred $Ucred;
@ -132,6 +133,7 @@ enum {
$SizeofIPv6Mreq = sizeof(struct ipv6_mreq),
$SizeofMsghdr = sizeof(struct msghdr),
$SizeofCmsghdr = sizeof(struct cmsghdr),
$SizeofInet4Pktinfo = sizeof(struct in_pktinfo),
$SizeofInet6Pktinfo = sizeof(struct in6_pktinfo),
$SizeofUcred = sizeof(struct ucred),
};

View File

@ -23,6 +23,7 @@ const (
SizeofIPv6Mreq = 0x14
SizeofMsghdr = 0x1c
SizeofCmsghdr = 0xc
SizeofInet4Pktinfo = 0xc
SizeofInet6Pktinfo = 0x14
SizeofUcred = 0xc
IFA_UNSPEC = 0
@ -328,6 +329,12 @@ type Cmsghdr struct {
Type int32
}
type Inet4Pktinfo struct {
Ifindex int32
Spec_dst [4]byte /* in_addr */
Addr [4]byte /* in_addr */
}
type Inet6Pktinfo struct {
Addr [16]byte /* in6_addr */
Ifindex uint32

View File

@ -23,6 +23,7 @@ const (
SizeofIPv6Mreq = 0x14
SizeofMsghdr = 0x38
SizeofCmsghdr = 0x10
SizeofInet4Pktinfo = 0xc
SizeofInet6Pktinfo = 0x14
SizeofUcred = 0xc
IFA_UNSPEC = 0
@ -330,6 +331,12 @@ type Cmsghdr struct {
Type int32
}
type Inet4Pktinfo struct {
Ifindex int32
Spec_dst [4]byte /* in_addr */
Addr [4]byte /* in_addr */
}
type Inet6Pktinfo struct {
Addr [16]byte /* in6_addr */
Ifindex uint32

View File

@ -28,6 +28,7 @@ const (
SizeofIPv6Mreq = 0x14
SizeofMsghdr = 0x1c
SizeofCmsghdr = 0xc
SizeofInet4Pktinfo = 0xc
SizeofInet6Pktinfo = 0x14
SizeofUcred = 0xc
IFA_UNSPEC = 0
@ -335,6 +336,12 @@ type Cmsghdr struct {
Type int32
}
type Inet4Pktinfo struct {
Ifindex int32
Spec_dst [4]byte /* in_addr */
Addr [4]byte /* in_addr */
}
type Inet6Pktinfo struct {
Addr [16]byte /* in6_addr */
Ifindex uint32