Documentation ¶
Index ¶
- Constants
- func AssignNetlinkIpAddress(ifName string, ipAddr string, netmask int)
- func ConfigBridgeByCommand(bridgeID string, ipAddr string, netmask string, resetBridge bool) (string, error)
- func ConfigBridgeIpAddrByCommand(bridgeID string, ipAddr string, netmask string) (string, error)
- func ConfigBridgeUpByCommand(bridgeID string) (string, error)
- func ConfigIpAddressForNewTunByCommand(taptunID string, ipAddr string, netmask string, peerIpAddr string, ...) (ret bool)
- func ConfigMconnIpAddress(taptunNum string, ipAddr string, netmask string, gwIpAddr string, ...)
- func ConfigRouteTargetIpAddr(targetIpAddr string, gatewayIpAddr string) (string, error)
- func ConfigTapToBridgeByCommand(bridgeID string, tapID string) (string, error)
- func ConfigTunIpAddrByCommand(taptunID string, ipAddr string, netmask string, peerIpAddr string, ...) (result map[int]string)
- func GetCommandSetForAddIpAddressTunInterface(taptunID string, ipAddr string, netmask string, peerIpAddr string, ...) (string, map[int][]string)
- func GetIpAddressV4ByNetlink(ifName string) []netlink.Addr
- func GetIpAddressV6ByNetlink(ifName string) []netlink.Addr
- func GetMainInterfaceIpAddress() (string, error)
- func GetNetlinkAllIpAddress(ifName string, family int) []netlink.Addr
- func GetOwnGatewayIpAddress() (string, error)
- func ListAllLinksByNetlink()
- func ListNetlinkAllIpAddress(ifName string, family int)
- func NetflowMonitorBridge(bridgeID string, collectorIp string, collectorPort string, ...) error
- func RemoveNetlinkIpAddress(ifName string, ipAddr string, netmask int)
- func RerouteAllTraffic(gatewayIpAddr string) (string, error)
Constants ¶
View Source
const ( // Family type definitions FAMILY_ALL = unix.AF_UNSPEC FAMILY_V4 = unix.AF_INET FAMILY_V6 = unix.AF_INET6 FAMILY_MPLS = 28 // Arbitrary set value (greater than default 4k) to allow receiving // from kernel more verbose messages e.g. for statistics, // tc rules or filters, or other more memory requiring data. RECEIVE_BUFFER_SIZE = 65536 )
Variables ¶
This section is empty.
Functions ¶
func AssignNetlinkIpAddress ¶
func ConfigBridgeByCommand ¶
func ConfigBridgeByCommand(bridgeID string, ipAddr string, netmask string, resetBridge bool) (string, error)
Create and configure a bridge
func ConfigBridgeIpAddrByCommand ¶
Assign an ip address to a bridge network interface
func ConfigBridgeUpByCommand ¶
"Up" the bridge interface
func ConfigMconnIpAddress ¶
func ConfigMconnIpAddress(taptunNum string, ipAddr string, netmask string, gwIpAddr string, peerIpAddr string)
L3 based = mconn = client mode
func ConfigRouteTargetIpAddr ¶
Add a route (routing table entry) to the targetIpAddr through the gatewayIpAddr
func ConfigTapToBridgeByCommand ¶
Add a network interface to a bridge interface
func GetCommandSetForAddIpAddressTunInterface ¶
func GetCommandSetForAddIpAddressTunInterface(taptunID string, ipAddr string, netmask string, peerIpAddr string, gatewayIpAddr string) (string, map[int][]string)
///// Client Node L3 connection CMD changes based on platform. gatewayIpAddr is peer internal ip as gateway ip from client side connection
func GetIpAddressV4ByNetlink ¶
func GetIpAddressV6ByNetlink ¶
func GetMainInterfaceIpAddress ¶
Returns the main network interface ip address
func GetOwnGatewayIpAddress ¶
Returns the node's gateway ip address
func ListAllLinksByNetlink ¶
func ListAllLinksByNetlink()
func ListNetlinkAllIpAddress ¶
func NetflowMonitorBridge ¶
func NetflowMonitorBridge(bridgeID string, collectorIp string, collectorPort string, netflowDirectory string) error
Add a softflowd daemon to a bridge interface
func RemoveNetlinkIpAddress ¶
func RerouteAllTraffic ¶
Direct all net traffic to through a gateway
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.