vpp1904

package
v2.4.0-alpha+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2019 License: Apache-2.0 Imports: 15 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

This section is empty.

Types

type NatVppHandler

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

NatVppHandler is accessor for NAT-related vppcalls methods.

func NewNatVppHandler

func NewNatVppHandler(callsChan govppapi.Channel,
	ifIndexes ifaceidx.IfaceMetadataIndex, dhcpIndex idxmap.NamedMapping, log logging.Logger,
) *NatVppHandler

NewNatVppHandler creates new instance of NAT vppcalls handler.

func (*NatVppHandler) AddNat44Address

func (h *NatVppHandler) AddNat44Address(address string, vrf uint32, twiceNat bool) error

AddNat44Address adds new IPv4 address into the NAT44 pool.

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) DelNat44Address

func (h *NatVppHandler) DelNat44Address(address string, vrf uint32, twiceNat bool) error

DelNat44Address removes existing IPv4 address from the NAT44 pool.

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) Nat44GlobalConfigDump

func (h *NatVppHandler) Nat44GlobalConfigDump() (*nat.Nat44Global, error)

Nat44GlobalConfigDump dumps global NAT44 config in NB format.

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