Documentation
¶
Index ¶
Constants ¶
View Source
const ( TcpdumpMagic = 0xa1b2c3d4 VersionMajor = 2 VersionMinor = 4 LinkTypeEthernet = 1 LinkTypeRaw = 101 )
View Source
const ( Unspecified protocolFamily = 0 // syscall.AF_UNSPEC Unix protocolFamily = 1 // syscall.AF_UNIX - Unix domain sockets IPv4 protocolFamily = 2 // syscall.AF_INET - Internet Protocol v4 IPv6 protocolFamily = 30 // syscall.AF_INET6 - Internet Protocol v6 )
View Source
const (
USB iface = 160
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GlobalHeader ¶
type GlobalHeader struct {
MagicNumber uint32 // magic number
VersionMajor uint16 // major version number
VersionMinor uint16 // minor version number
Thiszone int32 // GMT to local correction
Sigfigs uint32 // accuracy of timestamps
Snaplen uint32 // max length of captured packets, in octets
Network uint32 // data link type
}
type IOSPacketHeader ¶
type IOSPacketHeader struct {
HdrLength uint32
HdrVersion uint8
PktLength uint32
InterfaceType iface
Unit uint16
IO uint8
ProtocolFamily protocolFamily
FramePreLength uint32
FramePostLength uint32
InterfaceName [16]byte
Pid uint32 // little endian
ProcName [17]byte
Svc uint32 // little endian TODO: map this to name
SubPid uint32 // little endian
SubProcName [17]byte
Seconds uint32
MicroSeconds uint32
}
Click to show internal directories.
Click to hide internal directories.