...
1
2
3
4 package ipv4
5
6 const (
7 sizeofSockaddrStorage = 0x100
8 sizeofSockaddrInet = 0x10
9 sizeofInetPktinfo = 0xc
10
11 sizeofIPMreq = 0x8
12 sizeofIPMreqSource = 0xc
13 sizeofGroupReq = 0x104
14 sizeofGroupSourceReq = 0x204
15 )
16
17 type sockaddrStorage struct {
18 Family uint16
19 X_ss_pad1 [6]int8
20 X_ss_align float64
21 X_ss_pad2 [240]int8
22 }
23
24 type sockaddrInet struct {
25 Family uint16
26 Port uint16
27 Addr [4]byte
28 Zero [8]int8
29 }
30
31 type inetPktinfo struct {
32 Ifindex uint32
33 Spec_dst [4]byte
34 Addr [4]byte
35 }
36
37 type ipMreq struct {
38 Multiaddr [4]byte
39 Interface [4]byte
40 }
41
42 type ipMreqSource struct {
43 Multiaddr [4]byte
44 Sourceaddr [4]byte
45 Interface [4]byte
46 }
47
48 type groupReq struct {
49 Interface uint32
50 Pad_cgo_0 [256]byte
51 }
52
53 type groupSourceReq struct {
54 Interface uint32
55 Pad_cgo_0 [256]byte
56 Pad_cgo_1 [256]byte
57 }
58
View as plain text