layer

package
v0.0.0-...-eeaa2cf Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPv4Schema

type IPv4Schema struct {
	ID      []byte `db:"id"`
	Version uint8  `db:"version"`
	HLen    uint8  `db:"hlen"`
	TOS     uint8  `db:"tos"`
	Length  uint16 `db:"length"`

	FragID     uint16 `db:"frag_id"`
	FragFlag   uint8  `db:"frag_flag"`
	FragOffset uint16 `db:"frag_offset"`

	TTL      uint8  `db:"ttl"`
	Protocol uint8  `db:"protocol"`
	Checksum uint16 `db:"checksum"`

	Src []byte `db:"src"`
	Dst []byte `db:"dst"`
}

type IPv4Storage

type IPv4Storage struct {
	// contains filtered or unexported fields
}

func (*IPv4Storage) Init

func (s *IPv4Storage) Init(db *sqlx.DB) error

func (*IPv4Storage) Store

func (s *IPv4Storage) Store(ctx context.Context, packet container.Packet) error

type IPv6Schema

type IPv6Schema struct {
	ID         []byte `db:"id"`
	Version    uint8  `db:"version"`
	Priority   uint8  `db:"priority"`
	FlowLabel  uint32 `db:"flow_label"`
	Length     uint16 `db:"length"`
	NextHeader uint8  `db:"next_header"`
	HopLimit   uint8  `db:"hop_limit"`

	Src []byte `db:"src"`
	Dst []byte `db:"dst"`
}

type IPv6Storage

type IPv6Storage struct {
	// contains filtered or unexported fields
}

func (*IPv6Storage) Init

func (s *IPv6Storage) Init(db *sqlx.DB) error

func (*IPv6Storage) Store

func (s *IPv6Storage) Store(ctx context.Context, packet container.Packet) error

type TCPStorage

type TCPStorage struct {
	// contains filtered or unexported fields
}

func (*TCPStorage) Init

func (s *TCPStorage) Init(db *sqlx.DB) error

func (*TCPStorage) Store

func (s *TCPStorage) Store(ctx context.Context, packet container.Packet) error

type TcpSchema

type TcpSchema struct {
	ID     []byte `db:"id"`
	Src    uint16 `db:"src"`
	Dst    uint16 `db:"dst"`
	Seqnum uint32 `db:"seqnum"`
	Acknum uint32 `db:"acknum"`
	Offset uint8  `db:"offset"`

	Fin uint8 `db:"fin"`
	Syn uint8 `db:"syn"`
	Rst uint8 `db:"rst"`
	Psh uint8 `db:"psh"`
	Ack uint8 `db:"ack"`
	Urg uint8 `db:"urg"`
	Ece uint8 `db:"ece"`
	Cwr uint8 `db:"cwr"`
	Ns  uint8 `db:"ns"`

	Window   uint16 `db:"window"`
	Checksum uint16 `db:"checksum"`
	Urgent   uint16 `db:"urgent"`
}

Jump to

Keyboard shortcuts

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