...
1
2
3
4
5
6
7
8 package ipv4
9
10 const (
11 sizeofIPMreq = 8
12 sizeofSockaddrInet4 = 16
13 sizeofSockaddrStorage = 128
14 sizeofGroupReq = 136
15 sizeofGroupSourceReq = 264
16 sizeofInetPktinfo = 8
17 )
18
19 type sockaddrInet4 struct {
20 Len uint8
21 Family uint8
22 Port uint16
23 Addr [4]byte
24 Zero [8]uint8
25 }
26
27 type inetPktinfo struct {
28 Addr [4]byte
29 Ifindex uint32
30 }
31
32 type sockaddrStorage struct {
33 Len uint8
34 Family byte
35 ss_pad1 [6]byte
36 ss_align int64
37 ss_pad2 [112]byte
38 }
39
40 type groupReq struct {
41 Interface uint32
42 reserved uint32
43 Group sockaddrStorage
44 }
45
46 type groupSourceReq struct {
47 Interface uint32
48 reserved uint32
49 Group sockaddrStorage
50 Source sockaddrStorage
51 }
52
53 type ipMreq struct {
54 Multiaddr [4]byte
55 Interface [4]byte
56 }
57
View as plain text