Documentation ¶
Index ¶
- Constants
- func NewNatVppHandler(callsChan govppapi.Channel, ifIndexes ifaceidx.IfaceMetadataIndex, ...) vppcalls.NatVppAPI
- type NatVppHandler
- func (h *NatVppHandler) AddNat44AddressPool(vrf uint32, firstIP, lastIP string, twiceNat bool) error
- func (h *NatVppHandler) AddNat44IdentityMapping(mapping *nat.DNat44_IdentityMapping, dnatLabel string) error
- func (h *NatVppHandler) AddNat44StaticMapping(mapping *nat.DNat44_StaticMapping, dnatLabel string) error
- func (h *NatVppHandler) DNat44Dump() (dnats []*nat.DNat44, err error)
- func (h *NatVppHandler) DelNat44AddressPool(vrf uint32, firstIP, lastIP string, twiceNat bool) error
- func (h *NatVppHandler) DelNat44IdentityMapping(mapping *nat.DNat44_IdentityMapping, dnatLabel string) error
- func (h *NatVppHandler) DelNat44StaticMapping(mapping *nat.DNat44_StaticMapping, dnatLabel string) error
- func (h *NatVppHandler) DisableNat44Interface(iface string, isInside, isOutput bool) error
- func (h *NatVppHandler) EnableNat44Interface(iface string, isInside, isOutput bool) error
- func (h *NatVppHandler) Nat44AddressPoolsDump() (natPools []*nat.Nat44AddressPool, err error)
- func (h *NatVppHandler) Nat44GlobalConfigDump(dumpDeprecated bool) (cfg *nat.Nat44Global, err error)
- func (h *NatVppHandler) Nat44InterfacesDump() (natIfs []*nat.Nat44Interface, err error)
- func (h *NatVppHandler) SetNat44Forwarding(enableFwd bool) error
- func (h *NatVppHandler) SetVirtualReassemblyIPv4(vrCfg *nat.VirtualReassembly) error
- func (h *NatVppHandler) SetVirtualReassemblyIPv6(vrCfg *nat.VirtualReassembly) error
Constants ¶
Num protocol representation
const ( // NoInterface is sw-if-idx which means 'no interface' NoInterface = ^uint32(0) )
Variables ¶
This section is empty.
Functions ¶
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.