vppcalls

package
v0.0.0-...-ae01f8c Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package vppcalls contains wrappers over VPP binary APIs for NAT-64 configuration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddNat64HandlerVersion

func AddNat64HandlerVersion(version vpp.Version, msgs []govppapi.Message,
	h func(ch govppapi.Channel, ifIdx ifaceidx.IfaceMetadataIndex, log logging.Logger) Nat64VppAPI,
)

Types

type Nat64VppAPI

type Nat64VppAPI interface {
	Nat64VppRead

	// AddNat64IPv6Prefix adds IPv6 prefix for NAT64 (used to embed IPv4 address).
	AddNat64IPv6Prefix(vrf uint32, prefix string) error
	// DelNat64IPv6Prefix removes existing IPv6 prefix previously configured for NAT64.
	DelNat64IPv6Prefix(vrf uint32, prefix string) error
	// EnableNat64Interface enables NAT64 for provided interface.
	EnableNat64Interface(iface string, natIfaceType nat64.Nat64Interface_Type) error
	// DisableNat64Interface disables NAT64 for provided interface.
	DisableNat64Interface(iface string, natIfaceType nat64.Nat64Interface_Type) error
	// AddNat64AddressPool adds new IPV4 address pool into the NAT64 pools.
	AddNat64AddressPool(vrf uint32, firstIP, lastIP string) error
	// DelNat64AddressPool removes existing IPv4 address pool from the NAT64 pools.
	DelNat64AddressPool(vrf uint32, firstIP, lastIP string) error
	// AddNat64StaticBIB creates new NAT64 static binding.
	AddNat64StaticBIB(bib *nat64.Nat64StaticBIB) error
	// DelNat64StaticBIB removes existing NAT64 static binding.
	DelNat64StaticBIB(bib *nat64.Nat64StaticBIB) error
}

Nat64VppAPI provides methods for managing VPP NAT-64 configuration.

func CompatibleNat64VppHandler

func CompatibleNat64VppHandler(c vpp.Client, ifIdx ifaceidx.IfaceMetadataIndex, log logging.Logger) Nat64VppAPI

type Nat64VppRead

type Nat64VppRead interface {
	// Nat64IPv6PrefixDump dumps all IPv6 prefixes configured for NAT64.
	Nat64IPv6PrefixDump() ([]*nat64.Nat64IPv6Prefix, error)
	// Nat64InterfacesDump dumps NAT64 config of all NAT64-enabled interfaces.
	Nat64InterfacesDump() ([]*nat64.Nat64Interface, error)
	// Nat64AddressPoolsDump dumps all configured NAT64 address pools.
	// Note that VPP returns configured addresses one-by-one, loosing information about address pools
	// configured with multiple addresses through IP ranges. Provide expected configuration to group
	// addresses from the same range.
	Nat64AddressPoolsDump(correlateWith []*nat64.Nat64AddressPool) ([]*nat64.Nat64AddressPool, error)
	// Nat64StaticBIBsDump dumps NAT64 static bindings.
	Nat64StaticBIBsDump() ([]*nat64.Nat64StaticBIB, error)
}

Nat64VppRead provides read methods for VPP NAT-64 configuration.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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