vpp2210

package
v3.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ICMP uint8 = 1
	TCP  uint8 = 6
	UDP  uint8 = 17
)

Num protocol representation

View Source
const (
	// NoInterface is sw-if-idx which means 'no interface'
	NoInterface = interface_types.InterfaceIndex(^uint32(0))
)

Variables

This section is empty.

Functions

func NewNatVppHandler

func NewNatVppHandler(c vpp.Client,
	ifIndexes ifaceidx.IfaceMetadataIndex, dhcpIndex idxmap.NamedMapping, log logging.Logger,
) vppcalls.NatVppAPI

NewNatVppHandler creates new instance of NAT vppcalls handler.

Types

type NatVppHandler

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

NatVppHandler is accessor for NAT-related vppcalls methods.

func (*NatVppHandler) AddNat44AddressPool

func (h *NatVppHandler) AddNat44AddressPool(vrf uint32, firstIP, lastIP string, twiceNat bool) error

AddNat44AddressPool adds new IPV4 address pool into the NAT pools.

func (*NatVppHandler) AddNat44IdentityMapping

func (h *NatVppHandler) AddNat44IdentityMapping(mapping *nat.DNat44_IdentityMapping, dnatLabel string) error

AddNat44IdentityMapping adds new NAT44 identity mapping

func (*NatVppHandler) AddNat44StaticMapping

func (h *NatVppHandler) AddNat44StaticMapping(mapping *nat.DNat44_StaticMapping, dnatLabel string) error

AddNat44StaticMapping creates new NAT44 static mapping entry.

func (*NatVppHandler) DNat44Dump

func (h *NatVppHandler) DNat44Dump() (dnats []*nat.DNat44, err error)

DNat44Dump dumps all configured DNAT-44 configurations ordered by label.

func (*NatVppHandler) DefaultNat44GlobalConfig

func (h *NatVppHandler) DefaultNat44GlobalConfig() *nat.Nat44Global

func (*NatVppHandler) DelNat44AddressPool

func (h *NatVppHandler) DelNat44AddressPool(vrf uint32, firstIP, lastIP string, twiceNat bool) error

DelNat44AddressPool removes existing IPv4 address pool from the NAT pools.

func (*NatVppHandler) DelNat44IdentityMapping

func (h *NatVppHandler) DelNat44IdentityMapping(mapping *nat.DNat44_IdentityMapping, dnatLabel string) error

DelNat44IdentityMapping removes existing NAT44 identity mapping

func (*NatVppHandler) DelNat44StaticMapping

func (h *NatVppHandler) DelNat44StaticMapping(mapping *nat.DNat44_StaticMapping, dnatLabel string) error

DelNat44StaticMapping removes existing NAT44 static mapping entry.

func (*NatVppHandler) DisableNAT44Plugin

func (h *NatVppHandler) DisableNAT44Plugin() error

DisableNAT44Plugin disables NAT44 plugin.

func (*NatVppHandler) DisableNat44Interface

func (h *NatVppHandler) DisableNat44Interface(iface string, isInside, isOutput bool) error

DisableNat44Interface disables NAT44 feature for provided interface.

func (*NatVppHandler) EnableNAT44Plugin

func (h *NatVppHandler) EnableNAT44Plugin(opts vppcalls.Nat44InitOpts) error

EnableNAT44plugin and apply the given set of options.

func (*NatVppHandler) EnableNat44Interface

func (h *NatVppHandler) EnableNat44Interface(iface string, isInside, isOutput bool) error

EnableNat44Interface enables NAT44 feature for provided interface.

func (*NatVppHandler) Nat44AddressPoolsDump

func (h *NatVppHandler) Nat44AddressPoolsDump() (natPools []*nat.Nat44AddressPool, err error)

Nat44AddressPoolsDump dumps all configured NAT44 address pools.

func (*NatVppHandler) Nat44GlobalConfigDump

func (h *NatVppHandler) Nat44GlobalConfigDump(dumpDeprecated bool) (cfg *nat.Nat44Global, err error)

Nat44GlobalConfigDump dumps global NAT44 config in NB format.

func (*NatVppHandler) Nat44InterfacesDump

func (h *NatVppHandler) Nat44InterfacesDump() (natIfs []*nat.Nat44Interface, err error)

Nat44InterfacesDump dumps NAT44 config of all NAT44-enabled interfaces.

func (*NatVppHandler) SetNat44Forwarding

func (h *NatVppHandler) SetNat44Forwarding(enableFwd bool) error

SetNat44Forwarding configures NAT44 forwarding.

func (*NatVppHandler) SetVirtualReassemblyIPv4

func (h *NatVppHandler) SetVirtualReassemblyIPv4(vrCfg *nat.VirtualReassembly) error

SetVirtualReassemblyIPv4 configures NAT virtual reassembly for IPv4 packets.

func (*NatVppHandler) SetVirtualReassemblyIPv6

func (h *NatVppHandler) SetVirtualReassemblyIPv6(vrCfg *nat.VirtualReassembly) error

SetVirtualReassemblyIPv6 configures NAT virtual reassembly for IPv6 packets.

func (*NatVppHandler) WithLegacyStartupConf

func (h *NatVppHandler) WithLegacyStartupConf() bool

WithLegacyStartupConf returns true if the loaded VPP NAT plugin is still using the legacy startup NAT configuration (this is the case for VPP <= 20.09).

Jump to

Keyboard shortcuts

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