ndmz

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2026 License: Apache-2.0 Imports: 29 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (

	//NdmzBridge is the name of the ipv4 routing bridge in the host namespace
	NdmzBridge = "br-ndmz"

	//DmzNamespace name of the dmz namespace
	DmzNamespace = "ndmz"

	// DmzPub4 ipv4 public interface
	DmzPub4 = "npub4"
)
View Source
const (
	// FamilyAll get all IP address families
	FamilyAll = netlink.FAMILY_ALL
	//FamilyV4 gets all IPv4 addresses
	FamilyV4 = netlink.FAMILY_V4
	//FamilyV6 gets all IPv6 addresses
	FamilyV6 = netlink.FAMILY_V6
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DHCPMon

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

DHCPMon monitor a network interface status and force renew of DHCP lease if needed

func NewDHCPMon

func NewDHCPMon(iface, namespace string, z *zinit.Client) *DHCPMon

NewDHCPMon create a new DHCPMon object managing interface iface namespace is then network namespace name to use. it can be empty.

func (*DHCPMon) Start

func (d *DHCPMon) Start(ctx context.Context) error

Start creates a zinit service for a DHCP client and start monitoring it this method is blocking, start is in a goroutine if needed. cancel the context to start it.

type DMZ

type DMZ interface {
	Namespace() string
	// create the ndmz network namespace and all requires network interfaces
	Create(ctx context.Context) 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, nr, ipamLeaseDir string) error

	DetachNR(networkID, ipamLeaseDir string) error
	// GetIP gets ndmz public ips from ndmz
	GetIP(family int) ([]net.IPNet, error)

	// Get gateway to given destination ip
	GetDefaultGateway(destination net.IP) (net.IP, error)

	// GetIPFor get the ip of an
	GetIPFor(inf string) ([]net.IPNet, error)
	//GetIP(family netlink.FAM)
	// SupportsPubIPv4 indicates if the node supports public ipv4 addresses for
	// workloads
	SupportsPubIPv4() bool

	//Interfaces information about dmz interfaces
	Interfaces() ([]types.IfaceInfo, error)
}

DMZ is an interface used to create an DMZ network namespace

func New

func New(nodeID string, public *netlink.Bridge) DMZ

New creates a new DMZ DualStack

Jump to

Keyboard shortcuts

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