...
1
2
3
4
5
6 package ipv4
7
8 const (
9 sizeofKernelSockaddrStorage = 0x80
10 sizeofSockaddrInet = 0x10
11 sizeofInetPktinfo = 0xc
12 sizeofSockExtendedErr = 0x10
13
14 sizeofIPMreq = 0x8
15 sizeofIPMreqSource = 0xc
16 sizeofGroupReq = 0x88
17 sizeofGroupSourceReq = 0x108
18
19 sizeofICMPFilter = 0x4
20 )
21
22 type kernelSockaddrStorage struct {
23 Family uint16
24 X__data [126]int8
25 }
26
27 type sockaddrInet struct {
28 Family uint16
29 Port uint16
30 Addr [4]byte
31 X__pad [8]uint8
32 }
33
34 type inetPktinfo struct {
35 Ifindex int32
36 Spec_dst [4]byte
37 Addr [4]byte
38 }
39
40 type sockExtendedErr struct {
41 Errno uint32
42 Origin uint8
43 Type uint8
44 Code uint8
45 Pad uint8
46 Info uint32
47 Data uint32
48 }
49
50 type ipMreq struct {
51 Multiaddr [4]byte
52 Interface [4]byte
53 }
54
55 type ipMreqSource struct {
56 Multiaddr uint32
57 Interface uint32
58 Sourceaddr uint32
59 }
60
61 type groupReq struct {
62 Interface uint32
63 Pad_cgo_0 [4]byte
64 Group kernelSockaddrStorage
65 }
66
67 type groupSourceReq struct {
68 Interface uint32
69 Pad_cgo_0 [4]byte
70 Group kernelSockaddrStorage
71 Source kernelSockaddrStorage
72 }
73
74 type icmpFilter struct {
75 Data uint32
76 }
77
View as plain text