cbnet

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2022 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BUFFERSIZE represents a size of read buffer.
	BUFFERSIZE = 1500
	// MTU represents a maximum transmission unit.
	MTU = "1300"
	// IPv4 represents a version of IP address
	IPv4 = "IPv4"
	// IPv6 represents a version of IP address
	IPv6 = "IPv6"
)

I use TUN interface, so only plain IP packet, no ethernet header + mtu is set to 1300

Variables

View Source
var CBLogger *logrus.Logger

CBLogger represents a logger to show execution processes according to the logging level.

Functions

This section is empty.

Types

type CBNetwork

type CBNetwork struct {
	// Variables for the cb-network
	NetworkingRule model.NetworkingRule // Networking rule for a network interface and tunneling
	ID             string               // ID for a cloud adaptive network

	// Variables for the cb-network agents
	HostID                  string   // HostID in a cloud adaptive network
	HostPublicIP            string   // Inquired public IP of VM/Host
	HostPrivateIPv4Networks []string // Inquired private IPv4 networks of VM/Host (e.g. ["192.168.10.4/24", ...])
	Interface               *os.File // Assigned cbnet0 IP from the controller
	// contains filtered or unexported fields
}

CBNetwork represents a network for the multi-cloud

func New added in v0.0.8

func New(name string, port int) *CBNetwork

New represents a constructor of CBNetwork

func (*CBNetwork) EnableEncryption added in v0.0.8

func (cbnetwork *CBNetwork) EnableEncryption(isTrue bool)

EnableEncryption represents a function to set a status for message encryption.

func (CBNetwork) GetHostNetworkInformation added in v0.0.4

func (cbnetwork CBNetwork) GetHostNetworkInformation() model.HostNetworkInformation

GetHostNetworkInformation represents a function to get the network information of a VM.

func (CBNetwork) GetKey added in v0.0.8

func (cbnetwork CBNetwork) GetKey(hostID string) *rsa.PublicKey

GetKey returns a public key by a host ID

func (CBNetwork) GetPublicKeyBase64 added in v0.0.8

func (cbnetwork CBNetwork) GetPublicKeyBase64() (string, error)

GetPublicKeyBase64 represents a function to get a public key.

func (CBNetwork) IsEncryptionEnabled added in v0.0.8

func (cbnetwork CBNetwork) IsEncryptionEnabled() bool

IsEncryptionEnabled represents a function to check if a message is encrypted or not.

func (*CBNetwork) Shutdown added in v0.0.8

func (cbnetwork *CBNetwork) Shutdown()

Shutdown represents a function to stop the cloud-barista network.

func (*CBNetwork) Startup added in v0.0.8

func (cbnetwork *CBNetwork) Startup()

Startup represents a function to start the cloud-barista network.

func (*CBNetwork) UpdateHostNetworkInformation added in v0.0.4

func (cbnetwork *CBNetwork) UpdateHostNetworkInformation()

UpdateHostNetworkInformation represents a function to update the host network information, such as public IP address of VM and private IPv4 networks.

func (*CBNetwork) UpdateKeyring added in v0.0.8

func (cbnetwork *CBNetwork) UpdateKeyring(hostID string, base64PublicKey string) error

UpdateKeyring updates a public key with a host ID

func (*CBNetwork) UpdatePeer added in v0.0.8

func (cbnetwork *CBNetwork) UpdatePeer(value []byte) (isThisPeerInitialized bool)

UpdatePeer represents a function to decode binary of networking rule and set it.

type DynamicSubnetConfigurator

type DynamicSubnetConfigurator struct {
	NetworkingRules model.NetworkingRule
	// contains filtered or unexported fields
}

DynamicSubnetConfigurator represents a configurator for Dynamic Subnet Configuration Protocol

func NewDynamicSubnetConfigurator

func NewDynamicSubnetConfigurator() *DynamicSubnetConfigurator

NewDynamicSubnetConfigurator represents a constructor.

func (*DynamicSubnetConfigurator) UpdateCBNetworkingRules

func (dscp *DynamicSubnetConfigurator) UpdateCBNetworkingRules(vmNetworkInfo model.HostNetworkInformation)

UpdateCBNetworkingRules represents a function to update networking rules

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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