metadata

package
v2.0.0-...-f08b0b4 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Addr

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

Addr implements the net.Addr interface.

func (*Addr) Metadata

func (a *Addr) Metadata() *Metadata

func (*Addr) Network

func (a *Addr) Network() string

func (*Addr) String

func (a *Addr) String() string

type Metadata

type Metadata struct {
	Network Network `json:"network"`
	SrcIP   net.IP  `json:"sourceIP"`
	MidIP   net.IP  `json:"dialerIP"`
	DstIP   net.IP  `json:"destinationIP"`
	SrcPort uint16  `json:"sourcePort"`
	MidPort uint16  `json:"dialerPort"`
	DstPort uint16  `json:"destinationPort"`
}

Metadata contains metadata of transport protocol sessions.

func (*Metadata) Addr

func (m *Metadata) Addr() net.Addr

func (*Metadata) DestinationAddress

func (m *Metadata) DestinationAddress() string

func (*Metadata) SourceAddress

func (m *Metadata) SourceAddress() string

func (*Metadata) TCPAddr

func (m *Metadata) TCPAddr() *net.TCPAddr

func (*Metadata) UDPAddr

func (m *Metadata) UDPAddr() *net.UDPAddr

type Network

type Network uint8
const (
	TCP Network = iota
	UDP
)

func (Network) MarshalText

func (n Network) MarshalText() ([]byte, error)

func (Network) String

func (n Network) String() string

Jump to

Keyboard shortcuts

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