# Functions
FilteredInterfaces returns interfaces like net.Interfaces(), but only those whose names match the given nameRegExp.
MustExistNamedRoutingTable gets a routing table name as string tableName and creates a 32 int ID for that routing table.
NewChanInterfaceProvider creates a new InterfaceProvider that delivers information about local interfaces matching specific Regexp and with optional auto-refresh and refreshes this information every time a message is received on the update chan.
NewExecConntrackHelper creates new ConntrackHelper implemented by executing linux `conntrack` command.
NewExecIPRouteHelper returns new IPRouterHelper implemented using command execution in the operating system.
NewExecIPSetHelper returns new IPSetHelper based on Linux command `ipset`.
NewExecIPTablesHelper returns IPTablesHelper implemented by executing linux iptables command.
NewInterfaceProvider creates a new InterfaceProvider that delivers information about local interfaces matching specific Regexp and with optional auto-refresh.
NewIOSimpleFileOperator returns new instance of SimpleFileOperator implemented with real IO operations from ioutil package.
NewIPRuleForFwMark creates a new IPRule with source IP and with default No of 0.
NewIPRuleForSourceIP creates a new IPRule with source IP and with default No of 0.
NewNetInterfaceProvider creates a new InterfaceProvider that delivers information about local interfaces in the real Operating System using golang's net standard package.
OffsetAddr returns new net.IP address that is an offset of the subnet address of n.
ParseProtocol parses string and returns no error and a known Protocol.
# Constants
AwkIptablesSaveMagicFilter defines awk program that filters the content of a single chain in a table from iptables-save command output.
IPSetListWithAwk is a string to execute an ipset list command and filter out results with awk.
RTTablesFilename contains path to the file with ID to routing tables IDs mapping in Linux.
TCP is the name of the tcp protocol, as used in go's net library.
UDP is the name of the udp protocol, as used in go's net library.
Unknown is the Protocol returned for unknown protocols.
# Structs
IPRouteEntry represents one routing information entry in a configured route table.
IPRule represents a single ip routing rule based on source IP and selecting a named routing table.
IPTablesRuleArgs provides arguments for an iptables rule.
NetPort allows to store net.IPNet and a port number with protocol for ipsets based on that data.
# Interfaces
ConntrackHelper provides operations backed up by the system "conntrack" command
RemoveEntriesDNATingToIP removes all entries in the conntrack table, that describe connections running with
DNAT and having destination IP equal to ip.
Interface provides addresses and name of a single local network interface
Addrs() gets a slice with all addresses assigned to this interface
GetName() returns name of the interfaces, as presented in the operating system
Copy() returns a full deep copy of the Interface object.
InterfaceLister lists all network interfaces in the Operating System, together with their assigned IP addresses.
InterfaceProvider delivers information about local interfaces and assigned IP addresses.
IPRouteHelper implements various iproute2 tool related actions.
IPSetHelper provides methods to manage ipset sets.
IPTablesHelper provides interface to some operations on system's firewall system using the iptables command.
SimpleFileOperator provides simple subset of typical text file IO operations
ReadFile reads the contents of a whole file and returns it as []byte
AppendToFile tries to appens string textToAppend at the end of file named fileName.
# Type aliases
Protocol is the type to provide different protocol names constants.