cgotypes

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: May 18, 2020 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintEnums

func PrintEnums()

Types

type LpmV4Key

type LpmV4Key C.struct_lpm_v4_key

func GetLpmV4Key

func GetLpmV4Key(prefix uint8, address [4]uint8) LpmV4Key

func ParseFromSrtV4

func ParseFromSrtV4(ipStr string) (key LpmV4Key, err error)

type LpmV6Key

type LpmV6Key C.struct_lpm_v6_key

func GetLpmV6Key

func GetLpmV6Key(prefix uint8, address [16]uint8) LpmV6Key

func ParseFromSrtV6

func ParseFromSrtV6(ipStr string) (key LpmV6Key, err error)

type MacKey

type MacKey [6]C.uchar

func GetMacKey

func GetMacKey(address [6]uint8) MacKey

func ParseFromSrtMac

func ParseFromSrtMac(macStr string) (key MacKey, err error)

func (MacKey) GetCharByIndex

func (m MacKey) GetCharByIndex(index uint8) C.uchar

type PortKey

type PortKey C.struct_port_key

func GetPortKey

func GetPortKey(tp PortType, p PortProtocol, port uint32) PortKey

func PortKeyPtr

func PortKeyPtr(v *PortKey) PortKey

func PortKeyVal

func PortKeyVal(v PortKey) *PortKey

func (*PortKey) MarshalJSON

func (p *PortKey) MarshalJSON() ([]byte, error)

func (*PortKey) MarshalYAML

func (p *PortKey) MarshalYAML() (interface{}, error)

func (*PortKey) UnmarshalJSON

func (p *PortKey) UnmarshalJSON(data []byte) (err error)

func (*PortKey) UnmarshalYAML

func (p *PortKey) UnmarshalYAML(unmarshal func(interface{}) error) error

type PortKeyGo

type PortKeyGo struct {
	Type uint16
	Port uint16
}

type PortProtocol

type PortProtocol C.enum_port_protocol
const (
	TCPPort PortProtocol = C.tcp_port
	UDPPort PortProtocol = C.udp_port
)

func (PortProtocol) MarshalJSON

func (p PortProtocol) MarshalJSON() ([]byte, error)

func (PortProtocol) MarshalYAML

func (p PortProtocol) MarshalYAML() (interface{}, error)

func (*PortProtocol) Set

func (p *PortProtocol) Set(val string) error

it's for using with flag package

func (PortProtocol) String

func (p PortProtocol) String() string

func (*PortProtocol) UnmarshalJSON

func (p *PortProtocol) UnmarshalJSON(data []byte) error

func (*PortProtocol) UnmarshalYAML

func (p *PortProtocol) UnmarshalYAML(value *yaml.Node) error

func (PortProtocol) Val

func (p PortProtocol) Val() uint8

type PortType

type PortType C.enum_port_type
const (
	DestinationPort PortType = C.destination_port
	SourcePort      PortType = C.source_port
)

func (PortType) MarshalJSON

func (p PortType) MarshalJSON() ([]byte, error)

func (PortType) MarshalYAML

func (p PortType) MarshalYAML() (interface{}, error)

func (*PortType) Set

func (p *PortType) Set(val string) error

it's for using with flag package

func (PortType) String

func (p PortType) String() string

func (*PortType) UnmarshalJSON

func (p *PortType) UnmarshalJSON(data []byte) error

func (*PortType) UnmarshalYAML

func (p *PortType) UnmarshalYAML(value *yaml.Node) error

func (PortType) Val

func (p PortType) Val() uint8

Jump to

Keyboard shortcuts

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