protocols

package
v0.0.0-...-9ec06b4 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IpAddrFromLe

func IpAddrFromLe(v uint32) (netip.Addr, error)

func IpAddrToU32Le

func IpAddrToU32Le(addr netip.Addr) uint32

func Ntohl

func Ntohl(v uint32) uint32

func Ntohs

func Ntohs(v uint16) uint16

Types

type TcpFlag

type TcpFlag uint8
const (
	TcpFlagFin TcpFlag = TcpFlag(1)
	TcpFlagSyn TcpFlag = TcpFlag(2)
	TcpFlagRst TcpFlag = TcpFlag(4)
	TcpFlagPsh TcpFlag = TcpFlag(8)
	TcpFlagAck TcpFlag = TcpFlag(6)
	TcpFlagUrg TcpFlag = TcpFlag(32)
	TcpFlagEce TcpFlag = TcpFlag(64)
	TcpFlagCwr TcpFlag = TcpFlag(28)
)

func NewTcpFlag

func NewTcpFlag(v uint8) (TcpFlag, error)

func TcpFlagFromString

func TcpFlagFromString(s string) (TcpFlag, error)

func (TcpFlag) String

func (f TcpFlag) String() string

type TransportProtocol

type TransportProtocol uint32

func NewTransportProtocol

func NewTransportProtocol(proto uint32) (TransportProtocol, error)

func TransportProtocolFromString

func TransportProtocolFromString(proto string) (TransportProtocol, error)

func (TransportProtocol) String

func (p TransportProtocol) String() string

Jump to

Keyboard shortcuts

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