layer

package
v0.0.0-...-7cfb5ad Latest Latest
Warning

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

Go to latest
Published: Apr 8, 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 DNSHeaderSchema

type DNSHeaderSchema struct {
	ID      []byte `db:"id"`
	TxID    uint16 `db:"tx_id"`
	QR      uint8  `db:"qr"`
	OpCode  uint8  `db:"op_code"`
	AA      uint8  `db:"aa"`
	TC      uint8  `db:"tc"`
	RD      uint8  `db:"rd"`
	RA      uint8  `db:"ra"`
	Z       uint8  `db:"z"`
	ResCode uint8  `db:"res_code"`
	QDCnt   uint16 `db:"qd_cnt"`
	ANCnt   uint16 `db:"an_cnt"`
	NSCnt   uint16 `db:"ns_cnt"`
	ARCnt   uint16 `db:"ar_cnt"`

	QName  []byte `db:"q_name"`
	QType  uint16 `db:"q_type"`
	QClass uint16 `db:"q_class"`
}

type DNSRecordSchema

type DNSRecordSchema struct {
	ID      []byte `db:"id"`
	Section uint8  `db:"section"`
	Name    []byte `db:"name"`
	Type    uint16 `db:"type"`
	Class   uint16 `db:"class"`
	TTL     uint32 `db:"ttl"`
	DataLen uint16 `db:"datalen"`
	RData   []byte `db:"rdata"`
}

type DNSStorage

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

func (*DNSStorage) Init

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

func (*DNSStorage) Store

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

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"`
}

type UDPSchema

type UDPSchema struct {
	ID       []byte `db:"id"`
	Src      uint16 `db:"src"`
	Dst      uint16 `db:"dst"`
	Length   uint16 `db:"length"`
	Checksum uint16 `db:"checksum"`
}

type UDPStorage

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

func (*UDPStorage) Init

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

func (*UDPStorage) Store

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

Jump to

Keyboard shortcuts

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