vpp1904

package
v2.5.0-alpha.0...-0e2148d Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2020 License: Apache-2.0 Imports: 16 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 = ^uint32(0)
)

Variables

This section is empty.

Functions

func NewNatVppHandler

func NewNatVppHandler(
	callsChan govppapi.Channel,
	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) 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) DisableNat44Interface

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

DisableNat44Interface disables NAT44 feature for provided interface.

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.

Jump to

Keyboard shortcuts

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