flowdesc

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ProtocolNumberAny = 0xfc

Variables

This section is empty.

Functions

func Encode

func Encode(r *IPFilterRule) (string, error)

Encode function out put the IPFilterRule from the struct

Types

type Action

type Action string

Action - Action of IPFilterRule

const (
	Permit Action = "permit"
	Deny   Action = "deny"
)

Action const

type Direction

type Direction string

Direction - direction of IPFilterRule

const (
	In  Direction = "in"
	Out Direction = "out"
)

Direction const

type IPFilterRule

type IPFilterRule struct {
	Action   Action
	Dir      Direction
	Proto    uint8      // protocol number
	Src      string     // <address/mask>
	SrcPorts PortRanges // [ports]
	Dst      string     // <address/mask>
	DstPorts PortRanges // [ports]
}

IPFilterRule define RFC 3588 that referd by TS 29.212

func Decode

func Decode(s string) (*IPFilterRule, error)

Decode parsing the string to IPFilterRule

func NewIPFilterRule

func NewIPFilterRule() *IPFilterRule

NewIPFilterRule returns a new IPFilterRule instance

func (*IPFilterRule) SwapSrcAndDst added in v1.0.4

func (r *IPFilterRule) SwapSrcAndDst()

SwapSourceAndDestination swap the src and dst of the IPFilterRule

type PortRange added in v1.0.4

type PortRange struct {
	Start uint16
	End   uint16
}

func (*PortRange) String added in v1.0.4

func (p *PortRange) String() string

type PortRanges added in v1.0.4

type PortRanges []PortRange

func ParsePorts added in v1.0.4

func ParsePorts(ports string) (PortRanges, error)

func (PortRanges) String added in v1.0.4

func (ps PortRanges) String() string

Jump to

Keyboard shortcuts

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