models

package
v1.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 25, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Packet

type Packet struct {
	Id            string
	Data          []byte
	Timestamp     time.Time
	CaptureLength uint16
	DataLength    uint16
	SrcIP         net.IP
	DstIP         net.IP
}

func NewPacketFromProto

func NewPacketFromProto(pkt *pb.Packet) *Packet

func UnserializePacket

func UnserializePacket(data []byte) (*Packet, error)

func (*Packet) Serialize

func (pp *Packet) Serialize() ([]byte, error)

type PacketSlice

type PacketSlice []*Packet

func (PacketSlice) Len

func (p PacketSlice) Len() int

func (PacketSlice) Less

func (p PacketSlice) Less(i, j int) bool

func (PacketSlice) Swap

func (p PacketSlice) Swap(i, j int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL