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 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 PortRanges ¶
type PortRanges []PortRange
func ParsePorts ¶
func ParsePorts(ports string) (PortRanges, error)
func (PortRanges) String ¶
func (ps PortRanges) String() string
Click to show internal directories.
Click to hide internal directories.