Documentation ¶
Index ¶
- func AddIntToIP(ip net.IP, ordinal uint64) net.IP
- func DefaultGateway(cidr string) (string, error)
- func DeleteInterfaceIfExists(ctx context.Context, nsfd netns.NsHandle, ifname string) error
- func ForwardConnection(ctx context.Context, srcSocket net.Conn, ns, ip, port string) error
- func GenerateIfaceName(nlh netlink.Handler, prefix string, len int) (string, error)
- func GenerateRandomName(prefix string, size int) (string, error)
- func ParseAddr(s string) (*netlink.Addr, error)
- func ToCIDR(ip net.IP, mask net.IPMask) string
- type Conn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddIntToIP ¶
Adds the ordinal IP to the current array 192.168.0.0 + 53 => 192.168.0.53
func DefaultGateway ¶
func DeleteInterfaceIfExists ¶
func ForwardConnection ¶ added in v0.5.3
func GenerateIfaceName ¶
GenerateIfaceName returns an interface name using the passed in prefix and the length of random bytes. The api ensures that the there are is no interface which exists with that name.
func GenerateRandomName ¶ added in v1.0.1
GenerateRandomName returns a new name joined with a prefix. This size specified is used to truncate the randomly generated value
Types ¶
Click to show internal directories.
Click to hide internal directories.