dsl

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: Apache-2.0 Imports: 4 Imported by: 2

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

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.

Jump to

Keyboard shortcuts

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