Documentation
¶
Overview ¶
Package dsl helps with reasoning about rule expressions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MatchPortRange ¶
func MatchPortRange(exprs nufftables.Expressions) (e nufftables.Expressions, protocol string, minport, maxport uint16)
MatchPortRange returns the (non-inverted) port range and transport protocol from a matching expr.Match expression, as well as the remaining expressions. Protocol names returned are either "tcp" or "udp". If no suitable Match expression was found, then the remaining expressions are returned as nil, together with an empty protocol name.
func OptionalCompareIP ¶
func OptionalCompareIP(exprs nufftables.Expressions) (nufftables.Expressions, net.IP)
OptionalCompareIP returns the next IP address compare expression, if any, or nil. It either returns the remaining expressions or the original expressions if no IP compare expression could be found. IP here refers to both IPv4 and IPv6.
func TargetDNAT ¶
func TargetDNAT(exprs nufftables.Expressions) (nufftables.Expressions, *xt.NatRange2)
TargetDNAT returns the xt.NatRange2 information from the first matching Target DNAT expression containing NatRange2 information, together with the remaining expressions after the Target DNAT expression. If no match is found, then nil is returned for the remaining expressions.
Types ¶
This section is empty.