Documentation
¶
Index ¶
- func ProcessAoiSyncDelta(data *pb.AoiSyncDelta)
- type ByteReader
- func (br *ByteReader) PeekBytes(length int) ([]byte, error)
- func (br *ByteReader) PeekUInt16BE() (uint16, error)
- func (br *ByteReader) PeekUInt32BE() (uint32, error)
- func (br *ByteReader) PeekUInt64BE() (uint64, error)
- func (br *ByteReader) ReadBytes(length int) ([]byte, error)
- func (br *ByteReader) ReadRemaining() []byte
- func (br *ByteReader) ReadUInt16BE() (uint16, error)
- func (br *ByteReader) ReadUInt32BE() (uint32, error)
- func (br *ByteReader) ReadUInt64BE() (uint64, error)
- func (br *ByteReader) Remaining() int
- func (br *ByteReader) TryPeekUInt32BE() (uint32, bool)
- type CapCore
- type CapDevice
- type InterfaceStats
- type Queue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProcessAoiSyncDelta ¶
func ProcessAoiSyncDelta(data *pb.AoiSyncDelta)
Types ¶
type ByteReader ¶
type ByteReader struct {
// contains filtered or unexported fields
}
ByteReader 字节读取器,用于处理大端序数据
func NewByteReader ¶
func NewByteReader(buffer []byte, offset ...int) *ByteReader
NewByteReader 创建新的字节读取器
func (*ByteReader) PeekBytes ¶
func (br *ByteReader) PeekBytes(length int) ([]byte, error)
PeekBytes 查看指定长度的字节(不移动偏移)
func (*ByteReader) PeekUInt16BE ¶
func (br *ByteReader) PeekUInt16BE() (uint16, error)
PeekUInt16BE 查看大端序16位无符号整数(不移动偏移)
func (*ByteReader) PeekUInt32BE ¶
func (br *ByteReader) PeekUInt32BE() (uint32, error)
PeekUInt32BE 查看大端序32位无符号整数(不移动偏移)
func (*ByteReader) PeekUInt64BE ¶
func (br *ByteReader) PeekUInt64BE() (uint64, error)
PeekUInt64BE 查看大端序64位无符号整数(不移动偏移)
func (*ByteReader) ReadBytes ¶
func (br *ByteReader) ReadBytes(length int) ([]byte, error)
ReadBytes 读取指定长度的字节
func (*ByteReader) ReadRemaining ¶
func (br *ByteReader) ReadRemaining() []byte
ReadRemaining 读取所有剩余字节
func (*ByteReader) ReadUInt16BE ¶
func (br *ByteReader) ReadUInt16BE() (uint16, error)
ReadUInt16BE 读取大端序16位无符号整数
func (*ByteReader) ReadUInt32BE ¶
func (br *ByteReader) ReadUInt32BE() (uint32, error)
ReadUInt32BE 读取大端序32位无符号整数
func (*ByteReader) ReadUInt64BE ¶
func (br *ByteReader) ReadUInt64BE() (uint64, error)
ReadUInt64BE 读取大端序64位无符号整数
func (*ByteReader) TryPeekUInt32BE ¶
func (br *ByteReader) TryPeekUInt32BE() (uint32, bool)
TryPeekUInt32BE 尝试读取大端序32位无符号整数(不移动偏移)
type CapDevice ¶
type CapDevice struct {
// contains filtered or unexported fields
}
func NewCapDevice ¶
NewCapDevice 创建新的抓包设备
type InterfaceStats ¶
type InterfaceStats struct {
Name string `json:"name"`
Desc string `json:"desc"`
PacketCount int `json:"packet_count"`
ByteCount int64 `json:"byte_count"`
}
func GetActiveNetworkCards ¶
func GetActiveNetworkCards(devices []pcap.Interface, autoCheckTime int) *InterfaceStats
GetActiveNetworkCards 获取当前可能正在使用的网卡
Click to show internal directories.
Click to hide internal directories.