-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathinternal.go
60 lines (54 loc) · 946 Bytes
/
internal.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package gonetmap
import (
"syscall"
)
type Stat struct {
Received uint32
Dropped uint32
IfDropped uint32
}
type Slot struct {
Idx uint32
Len uint16
Flags uint16
Ptr uintptr
}
type PacketHeader struct {
Ts syscall.Timeval
Caplen uint32
Len uint32
Flags uint64
Desc *Descriptor
Slot *Slot
Buf *uint8
}
type Descriptor struct {
Self *Descriptor
Fd int32
pad0 [4]byte
Mem *byte
Memsize uint32
DoneMmap int32
NetmapIf *NetmapIf
FirstTxRing uint16
LastTxRing uint16
CurTxRing uint16
FirstRxRing uint16
LastRxRing uint16
CurRxRing uint16
Request Request
Header PacketHeader
SomeRing *NetmapRing
BufStart *byte
BufEnd *byte
Snaplen int32
Promisc int32
ToMs int32
pad1 [4]byte
ErrBuf *int8
IfaceFlags uint32
IfaceReqcap uint32
IfaceCurcap uint32
Stat Stat
Msg [512]byte
}