flowdesc

package
v1.0.62 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Any      string = "any"
	Assigned string = "assigned"
)
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

func (r *IPFilterRule) SwapSrcAndDst()

SwapSourceAndDestination swap the src and dst of the IPFilterRule

type PortRange

type PortRange struct {
	Start uint16
	End   uint16
}

func (*PortRange) String

func (p *PortRange) String() string

type PortRanges

type PortRanges []PortRange

func ParsePorts

func ParsePorts(ports string) (PortRanges, error)

func (PortRanges) String

func (ps PortRanges) String() string

Jump to

Keyboard shortcuts

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