...
1 package netlink
2
3 import "net"
4
5
6 type SocketID struct {
7 SourcePort uint16
8 DestinationPort uint16
9 Source net.IP
10 Destination net.IP
11 Interface uint32
12 Cookie [2]uint32
13 }
14
15
16 type Socket struct {
17 Family uint8
18 State uint8
19 Timer uint8
20 Retrans uint8
21 ID SocketID
22 Expires uint32
23 RQueue uint32
24 WQueue uint32
25 UID uint32
26 INode uint32
27 }
28
29
30 type UnixSocket struct {
31 Type uint8
32 Family uint8
33 State uint8
34 pad uint8
35 INode uint32
36 Cookie [2]uint32
37 }
38
39
40
41
42 type XDPSocket struct {
43
44
45 Family uint8
46 Type uint8
47 pad uint16
48 Ino uint32
49 Cookie [2]uint32
50 }
51
52 type XDPInfo struct {
53
54
55 Ifindex uint32
56 QueueID uint32
57
58
59 UID uint32
60
61
62
63 RxRingEntries uint32
64 TxRingEntries uint32
65 UmemFillRingEntries uint32
66 UmemCompletionRingEntries uint32
67
68
69 Umem *XDPDiagUmem
70
71
72 Stats *XDPDiagStats
73 }
74
75 const (
76 XDP_DU_F_ZEROCOPY = 1 << iota
77 )
78
79
80
81
82 type XDPDiagUmem struct {
83 Size uint64
84 ID uint32
85 NumPages uint32
86 ChunkSize uint32
87 Headroom uint32
88 Ifindex uint32
89 QueueID uint32
90 Flags uint32
91 Refs uint32
92 }
93
94
95
96
97 type XDPDiagStats struct {
98 RxDropped uint64
99 RxInvalid uint64
100 RxFull uint64
101 FillRingEmpty uint64
102 TxInvalid uint64
103 TxRingEmpty uint64
104 }
105
View as plain text