package
1.0.0-alpha-01-28-2017.10-23-11.UTC
Repository: https://github.com/sunny821/netplugin.git
Documentation: pkg.go.dev
# Functions
ClearBitsOutsideRange sets all IPs outside range as used.
ClearReservedEntries clears reserved bits.
ConvertBandwidth will change the format of the bandwidth to int64 format and return the updated bw.eg:- 2 kb bandwidth will be converted to 2*1024 and the result in Int64 format will be returned.
CreateBitset initializes a bit set with 2^numBitsWide bits.
GetFirstLocalAddr returns the first ip address.
GetHostIntfName gets the host access interface name.
GetInterfaceIP obtains the ip addr of a local interface on the host.
GetIPAddrRange returns IP CIDR as a ip address range.
GetIPNumber obtains the host id from the host IP.
GetIPv6HostID obtains the host id from the host IP.
GetLocalAddrList returns a list of local IP addresses.
GetMyAddr returns ip address of current host.
GetNetlinkAddrList returns a list of local IP addresses.
GetNextIPv6HostID returns the next available hostId in the AllocMap.
GetSubnetAddr returns a subnet given a subnet range.
GetSubnetIP given a subnet IP and host identifier, calculates an IP within the subnet for use.
GetSubnetIPv6 given a subnet IP and host identifier, calculates an IPv6 address within the subnet for use.
HostIfToIP gets IP based on ifname.
InitSubnetBitset initializes a bit set with 2^(32 - subnetLen) bits.
IsAddrLocal check if an address is local.
IsIPv6 Checks if the address string is IPv6 address.
IsOverlappingSubnet verifies the Overlapping of subnet.
IsOverlappingSubnetv6 verifies the Overlapping of subnet for v6 networks.
ParseCIDR parses a CIDR string into a gateway IP and length.
ParseTagRanges takes a string such as 12-24,48-64 and turns it into a series of TagRange.
PortToHostIPMAC gets IP and MAC based on port number.
ReserveIPv6HostID sets the hostId in the AllocMap.
SetBitsOutsideRange sets all IPs outside range as used.
SetInterfaceIP : Set IP address of an interface.
SetInterfaceMac : Set mac address of an interface.
SetIPMasquerade sets a ip masquerade rule.
ValidateNetworkRangeParams verifies the network range format.