flowdesc

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2021 License: Apache-2.0 Imports: 6 Imported by: 5

Documentation

Index

Constants

View Source
const ProtocalNumberAny = 0xfc

Variables

This section is empty.

Functions

func Decode

func Decode(s string, r *IPFilterRule) error

Decode parsing the string to IPFilterRule

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 {
	// contains filtered or unexported fields
}

IPFilterRule define RFC 3588 that referd by TS 29.212

func NewIPFilterRule

func NewIPFilterRule() *IPFilterRule

NewIPFilterRule returns a new IPFilterRule instance

func (*IPFilterRule) GetAction

func (r *IPFilterRule) GetAction() Action

GetAction returns action of the IPFilterRule

func (*IPFilterRule) GetDestinationIP

func (r *IPFilterRule) GetDestinationIP() string

GetDestinationIP returns dst of the IPFilterRule

func (*IPFilterRule) GetDestinationPorts

func (r *IPFilterRule) GetDestinationPorts() string

GetDestinationPorts returns src ports of the IPFilterRule

func (*IPFilterRule) GetDirection

func (r *IPFilterRule) GetDirection() Direction

GetDirection returns direction of the IPFilterRule

func (*IPFilterRule) GetProtocal

func (r *IPFilterRule) GetProtocal() uint8

GetProtocal returns the ip protocal number of the IPFilterRule

func (*IPFilterRule) GetSourceIP

func (r *IPFilterRule) GetSourceIP() string

GetSourceIP returns src of the IPFilterRule

func (*IPFilterRule) GetSourcePorts

func (r *IPFilterRule) GetSourcePorts() string

GetSourcePorts returns src ports of the IPFilterRule

func (*IPFilterRule) SetAction

func (r *IPFilterRule) SetAction(action Action) error

SetAction sets action of the IPFilterRule

func (*IPFilterRule) SetDestinationIP

func (r *IPFilterRule) SetDestinationIP(networkStr string) error

SetDestinationIP sets destination IP of the IPFilterRule

func (*IPFilterRule) SetDestinationPorts

func (r *IPFilterRule) SetDestinationPorts(ports string) error

SetDestinationPorts sets destination ports of the IPFilterRule

func (*IPFilterRule) SetDirection

func (r *IPFilterRule) SetDirection(dir Direction) error

SetDirection sets direction of the IPFilterRule

func (*IPFilterRule) SetProtocal

func (r *IPFilterRule) SetProtocal(proto uint8) error

SetProtocal sets IP protocal number of the IPFilterRule 0xfc stand for ip (any)

func (*IPFilterRule) SetSourceIP

func (r *IPFilterRule) SetSourceIP(networkStr string) error

SetSourceIP sets source IP of the IPFilterRule

func (*IPFilterRule) SetSourcePorts

func (r *IPFilterRule) SetSourcePorts(ports string) error

SetSourcePorts sets source ports of the IPFilterRule

func (*IPFilterRule) SwapSourceAndDestination

func (r *IPFilterRule) SwapSourceAndDestination()

SwapSourceAndDestination swap the src and dst of the IPFilterRule

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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