Documentation
      ¶
    
    
  
    
  
    Overview ¶
A collection of google/nftables expression partials used to compose rules
Index ¶
- Constants
 - func Accept() *expr.Verdict
 - func CompareDestinationAddress(ip netip.Addr) ([]expr.Any, error)
 - func CompareDestinationAddressSet(set *nftables.Set) ([]expr.Any, error)
 - func CompareDestinationAddressSetWithRegister(set *nftables.Set, reg int) ([]expr.Any, error)
 - func CompareDestinationAddressWithRegister(ip netip.Addr, reg int) ([]expr.Any, error)
 - func CompareDestinationPort(port int) ([]expr.Any, error)
 - func CompareDestinationPortSet(set *nftables.Set) ([]expr.Any, error)
 - func CompareDestinationPortSetWithRegister(set *nftables.Set, reg int) ([]expr.Any, error)
 - func CompareDestinationPortWithRegister(port int, reg int) ([]expr.Any, error)
 - func CompareProtocolFamily(proto byte) ([]expr.Any, error)
 - func CompareProtocolFamilyWithRegister(proto byte, reg int) ([]expr.Any, error)
 - func CompareSourceAddress(ip netip.Addr) ([]expr.Any, error)
 - func CompareSourceAddressSet(set *nftables.Set) ([]expr.Any, error)
 - func CompareSourceAddressSetWithRegister(set *nftables.Set, reg int) ([]expr.Any, error)
 - func CompareSourceAddressWithRegister(ip netip.Addr, reg int) ([]expr.Any, error)
 - func CompareSourcePort(port int) ([]expr.Any, error)
 - func CompareSourcePortSet(set *nftables.Set) ([]expr.Any, error)
 - func CompareSourcePortSetWithRegister(set *nftables.Set, reg int) ([]expr.Any, error)
 - func CompareSourcePortWithRegister(port int, reg int) ([]expr.Any, error)
 - func CompareTransportProtocol(proto byte) ([]expr.Any, error)
 - func CompareTransportProtocolWithRegister(proto byte, reg int) ([]expr.Any, error)
 - func Counter() *expr.Counter
 - func DestinationPort(reg int) *expr.Payload
 - func Drop() *expr.Verdict
 - func Equals(data []byte, reg int) *expr.Cmp
 - func IPSetLookUp(set *nftables.Set, reg int) *expr.Lookup
 - func IPv4DestinationAddress(reg int) *expr.Payload
 - func IPv4SourceAddress(reg int) *expr.Payload
 - func IPv6DestinationAddress(reg int) *expr.Payload
 - func IPv6SourceAddress(reg int) *expr.Payload
 - func Match(name string, revision int, info xt.InfoAny) *expr.Match
 - func MatchBpf(info []byte) *expr.Match
 - func MatchBpfWithVerdict(info []byte, verdict *expr.Verdict) []expr.Any
 - func MatchUnknown(name string, revision int, info []byte) *expr.Match
 - func Meta(meta expr.MetaKey, reg int) *expr.Meta
 - func PortSetLookUp(set *nftables.Set, reg int) *expr.Lookup
 - func SourcePort(reg int) *expr.Payload
 
Constants ¶
const ( SrcPortOffset = 0 DstPortOffset = 2 PortLen = 2 )
Transport protocol lengths and offsets
const ( IPv4SrcOffset = 12 IPv4DstOffset = 16 IPv4AddrLen = 4 )
IPv4 lengths and offsets
const ( IPv6SrcOffest = 8 IPv6DstOffset = 24 IPv6AddrLen = 16 )
IPv6 lengths and offsets
const ( DefaultRegister = 1 BpfRevision = 1 )
Default register and default xt_bpf version
Variables ¶
This section is empty.
Functions ¶
func CompareDestinationAddress ¶
Returns a list of expressions that will compare the destination address of traffic
func CompareDestinationAddressSet ¶
Returns a list of expressions that will compare the destination address of traffic against a set
func CompareDestinationAddressSetWithRegister ¶
Returns a list of expressions that will compare the destnation address of traffic against a set, with a user defined register
func CompareDestinationAddressWithRegister ¶
Returns a list of expressions that will compare the destination address of traffic, with a user defined register
func CompareDestinationPort ¶
Returns a list of expressions that will compare the destination port of traffic
func CompareDestinationPortSet ¶
Returns a list of expressions that will compare the destination port of traffic against a set
func CompareDestinationPortSetWithRegister ¶
Returns a list of expressions that will compare the destination port of traffic against a set, with a user defined register
func CompareDestinationPortWithRegister ¶
Returns a list of expressions that will compare the destination port of traffic, with a user defined register
func CompareProtocolFamily ¶
Returns a list of expressions that will compare the netfilter protocol family of traffic
func CompareProtocolFamilyWithRegister ¶
Returns a list of expressions that will compare the protocol family of traffic, with a user defined register
func CompareSourceAddress ¶
Returns a list of expressions that will compare the source address of traffic
func CompareSourceAddressSet ¶
Returns a list of expressions that will compare the source address of traffic against a set
func CompareSourceAddressSetWithRegister ¶
Returns a list of expressions that will compare the source address of traffic against a set, with a user defined register
func CompareSourceAddressWithRegister ¶
Returns a list of expressions that will compare the source address of traffic, with a user defined register
func CompareSourcePort ¶
Returns a list of expressions that will compare the source port of traffic
func CompareSourcePortSet ¶
Returns a list of expressions that will compare the source port of traffic against a set
func CompareSourcePortSetWithRegister ¶
Returns a list of expressions that will compare the source port of traffic against a set, with a user defined register
func CompareSourcePortWithRegister ¶
Returns a list of expressions that will compare the source port of traffic, with a user defined register
func CompareTransportProtocol ¶
Returns a list of expressions that will compare the transport protocol of traffic
func CompareTransportProtocolWithRegister ¶
Returns a list of expressions that will compare the transport protocol of traffic, with a user defined register
func DestinationPort ¶
Returns a destination port payload expression
func IPSetLookUp ¶
Returns an IP set lookup expression
func IPv4DestinationAddress ¶
Returns a IPv4 destination address payload expression
func IPv4SourceAddress ¶
Returns a IPv4 source address payload expression
func IPv6DestinationAddress ¶
Returns a IPv6 destination address payload expression
func IPv6SourceAddress ¶
Returns a IPv6 source address payload expression
func MatchBpfWithVerdict ¶
Returns a xtables match bpf expression with a verdict
func MatchUnknown ¶
Returns a xtables match expression of unknown type
func PortSetLookUp ¶
Returns a port set lookup expression
Types ¶
This section is empty.