flowdesc

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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