ndmz

package
v0.4.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2020 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//BridgeNDMZ is the name of the ipv4 routing bridge in the ndmz namespace
	BridgeNDMZ = "br-ndmz"
	//NetNSNDMZ name of the dmz namespace
	NetNSNDMZ = "ndmz"

	// DMZPub4 ipv4 public interface
	DMZPub4 = "npub4"
	// DMZPub6 ipv6 public interface
	DMZPub6 = "npub6"
)

Variables

This section is empty.

Functions

func FindIPv6Master added in v0.4.0

func FindIPv6Master() (master string, err error)

FindIPv6Master finds which interface to use as master for NDMZ npub6 interface

Types

type DMZ added in v0.4.0

type DMZ interface {
	// create the ndmz network namespace and all requires network interfaces
	Create() error
	// delete the ndmz network namespace and clean up all network interfaces
	Delete() error
	// link a network resource from a user network to ndmz
	AttachNR(networkID string, nr *nr.NetResource, ipamLeaseDir string) error
	// Return the interface used by ndmz to router public ipv6 traffic
	IP6PublicIface() string
	//configure an address on the public IPv6 interface
	SetIP6PublicIface(net.IPNet) error
}

DMZ is an interface used to create an DMZ network namespace

type DualStack added in v0.4.0

type DualStack struct {
	// contains filtered or unexported fields
}

DualStack implement DMZ interface using dual stack ipv4/ipv6

func NewDualStack added in v0.4.0

func NewDualStack(nodeID string) *DualStack

NewDualStack creates a new DMZ DualStack

func (*DualStack) AttachNR added in v0.4.0

func (d *DualStack) AttachNR(networkID string, nr *nr.NetResource, ipamLeaseDir string) error

AttachNR links a network resource to the NDMZ

func (*DualStack) Create added in v0.4.0

func (d *DualStack) Create() error

Create create the NDMZ network namespace and configure its default routes and addresses

func (*DualStack) Delete added in v0.4.0

func (d *DualStack) Delete() error

Delete deletes the NDMZ network namespace

func (*DualStack) IP6PublicIface added in v0.4.0

func (d *DualStack) IP6PublicIface() string

IP6PublicIface implements DMZ interface

func (*DualStack) SetIP6PublicIface added in v0.4.0

func (d *DualStack) SetIP6PublicIface(subnet net.IPNet) error

SetIP6PublicIface implements DMZ interface

type Hidden added in v0.4.0

type Hidden struct {
	// contains filtered or unexported fields
}

Hidden implement DMZ interface using ipv4 only

func NewHidden added in v0.4.0

func NewHidden(nodeID string) *Hidden

NewHidden creates a new DMZ Hidden

func (*Hidden) AttachNR added in v0.4.0

func (d *Hidden) AttachNR(networkID string, nr *nr.NetResource, ipamLeaseDir string) error

AttachNR links a network resource to the NDMZ

func (*Hidden) Create added in v0.4.0

func (d *Hidden) Create() error

Create create the NDMZ network namespace and configure its default routes and addresses

func (*Hidden) Delete added in v0.4.0

func (d *Hidden) Delete() error

Delete deletes the NDMZ network namespace

func (*Hidden) IP6PublicIface added in v0.4.0

func (d *Hidden) IP6PublicIface() string

IP6PublicIface implements DMZ interface

func (*Hidden) SetIP6PublicIface added in v0.4.0

func (d *Hidden) SetIP6PublicIface(subnet net.IPNet) error

SetIP6PublicIface implements DMZ interface

Jump to

Keyboard shortcuts

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