vppcalls

package
v2.4.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

View Source
var Versions = map[string]HandlerVersion{}

Functions

This section is empty.

Types

type NatVppAPI

type NatVppAPI interface {
	NatVppRead

	// SetNat44Forwarding configures NAT44 forwarding.
	SetNat44Forwarding(enableFwd bool) error
	// EnableNat44Interface enables NAT44 feature for provided interface
	EnableNat44Interface(iface string, isInside, isOutput bool) error
	// DisableNat44Interface disables NAT feature for provided interface
	DisableNat44Interface(iface string, isInside, isOutput bool) error
	// AddNat44Address adds new IPV4 address into the NAT pool.
	AddNat44Address(address string, vrf uint32, twiceNat bool) error
	// DelNat44Address removes existing IPv4 address from the NAT pool.
	DelNat44Address(address string, vrf uint32, twiceNat bool) error
	// SetVirtualReassemblyIPv4 configures NAT virtual reassembly for IPv4 packets.
	SetVirtualReassemblyIPv4(vrCfg *nat.VirtualReassembly) error
	// SetVirtualReassemblyIPv6 configures NAT virtual reassembly for IPv6 packets.
	SetVirtualReassemblyIPv6(vrCfg *nat.VirtualReassembly) error
	// AddNat44IdentityMapping adds new NAT44 identity mapping
	AddNat44IdentityMapping(mapping *nat.DNat44_IdentityMapping, dnatLabel string) error
	// DelNat44IdentityMapping removes NAT44 identity mapping
	DelNat44IdentityMapping(mapping *nat.DNat44_IdentityMapping, dnatLabel string) error
	// AddNat44StaticMapping creates new NAT44 static mapping entry.
	AddNat44StaticMapping(mapping *nat.DNat44_StaticMapping, dnatLabel string) error
	// DelNat44StaticMapping removes existing NAT44 static mapping entry.
	DelNat44StaticMapping(mapping *nat.DNat44_StaticMapping, dnatLabel string) error
}

NatVppAPI provides methods for managing VPP NAT configuration.

func CompatibleNatVppHandler

func CompatibleNatVppHandler(
	ch govppapi.Channel, ifIdx ifaceidx.IfaceMetadataIndex, dhcpIdx idxmap.NamedMapping, log logging.Logger,
) NatVppAPI

type NatVppRead

type NatVppRead interface {
	// Nat44GlobalConfigDump dumps global NAT44 config in NB format.
	Nat44GlobalConfigDump() (*nat.Nat44Global, error)
	// DNat44Dump dumps all configured DNAT-44 configurations ordered by label.
	DNat44Dump() ([]*nat.DNat44, error)
}

NatVppRead provides read methods for VPP NAT configuration.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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