network

package
v1.18.0-beta.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface struct {
	IfaceName string
	IfaceIPv4 string
	IfaceMTU  int
	IfaceMAC  string
}

Interface contains main network interface parameters.

type Parameters

type Parameters struct {
	IP        string // IP address of the network
	Netmask   string // form: 4-byte ('a.b.c.d')
	CIDR      string // form: CIDR
	Gateway   string // first IP address (assumed, not checked !)
	ClientMin string // second IP address
	ClientMax string // last IP address before broadcastS
	Broadcast string // last IP address
	Interface
}

Parameters contains main network parameters.

func FreeSubnet

func FreeSubnet(startSubnet string, step, tries int) (*Parameters, error)

FreeSubnet will try to find free private network beginning with startSubnet, incrementing it in steps up to number of tries.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL