Documentation ¶
Index ¶
- Constants
- func DropICMPv6Solicitation(interfaceName string, action string) error
- func EbTableRuleExists(tableName, chainName, matchSet string) (bool, error)
- func GetEbtableRules(tableName, chainName string) ([]string, error)
- func SetArpDropRuleForIpCidr(ipCidr string, ifName string) error
- func SetArpReply(ipAddress net.IP, macAddress net.HardwareAddr, action string) error
- func SetBrouteAccept(ipAddress, action string) error
- func SetBrouteAcceptByCidr(ipNet *net.IPNet, protocol, action, target string) error
- func SetBrouteAcceptByInterface(ifName string, protocol, action, target string) error
- func SetDnatForArpReplies(interfaceName string, action string) error
- func SetDnatForIPAddress(interfaceName string, ipAddress net.IP, macAddress net.HardwareAddr, ...) error
- func SetEbRule(table, action, chain, rule string) error
- func SetSnatForInterface(interfaceName string, macAddress net.HardwareAddr, action string) error
- func SetVepaMode(bridgeName string, downstreamIfNamePrefix string, upstreamMacAddress string, ...) error
Constants ¶
View Source
const ( // Ebtable actions. Append = "-A" Delete = "-D" // Ebtable tables. Nat = "nat" Broute = "broute" Filter = "filter" // Ebtable chains. PreRouting = "PREROUTING" PostRouting = "POSTROUTING" Brouting = "BROUTING" Forward = "FORWARD" // Ebtable Protocols IPV4 = "IPv4" IPV6 = "IPv6" // Ebtable Targets Accept = "ACCEPT" RedirectAccept = "redirect --redirect-target ACCEPT" )
Variables ¶
This section is empty.
Functions ¶
func DropICMPv6Solicitation ¶
Drop Icmpv6 discovery messages going out of interface
func EbTableRuleExists ¶
EbTableRuleExists checks if eb rule exists in table and chain.
func GetEbtableRules ¶
GetEbtableRules gets EB rules for a table and chain.
func SetArpDropRuleForIpCidr ¶
func SetArpReply ¶
SetArpReply sets an ARP reply rule for the given target IP address and MAC address.
func SetBrouteAccept ¶
SetBrouteAccept sets an EB rule.
func SetBrouteAcceptByCidr ¶
SetBrouteAcceptCidr - broute chain MAC redirect rule. Will change mac target address to bridge port that receives the frame.
func SetDnatForArpReplies ¶
SetDnatForArpReplies sets a MAC DNAT rule for ARP replies received on an interface.
func SetDnatForIPAddress ¶
func SetDnatForIPAddress(interfaceName string, ipAddress net.IP, macAddress net.HardwareAddr, action string) error
SetDnatForIPAddress sets a MAC DNAT rule for an IP address.
func SetSnatForInterface ¶
func SetSnatForInterface(interfaceName string, macAddress net.HardwareAddr, action string) error
SetSnatForInterface sets a MAC SNAT rule for an interface.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.