Documentation ¶
Index ¶
- Constants
- func Decode(s string, r *IPFilterRule) error
- func Encode(r *IPFilterRule) (string, error)
- type Action
- type Direction
- type IPFilterRule
- func (r *IPFilterRule) GetAction() Action
- func (r *IPFilterRule) GetDestinationIP() string
- func (r *IPFilterRule) GetDestinationPorts() string
- func (r *IPFilterRule) GetDirection() Direction
- func (r *IPFilterRule) GetProtocal() uint8
- func (r *IPFilterRule) GetSourceIP() string
- func (r *IPFilterRule) GetSourcePorts() string
- func (r *IPFilterRule) SetAction(action Action) error
- func (r *IPFilterRule) SetDestinationIP(networkStr string) error
- func (r *IPFilterRule) SetDestinationPorts(ports string) error
- func (r *IPFilterRule) SetDirection(dir Direction) error
- func (r *IPFilterRule) SetProtocal(proto uint8) error
- func (r *IPFilterRule) SetSourceIP(networkStr string) error
- func (r *IPFilterRule) SetSourcePorts(ports string) error
- func (r *IPFilterRule) SwapSourceAndDestination()
Constants ¶
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 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