vpp_nat

package
Version: v2.5.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2019 License: Apache-2.0 Imports: 6 Imported by: 133

Documentation

Index

Constants

View Source
const (
	// InvalidKeyPart is used in key for parts which are invalid
	InvalidKeyPart = "<invalid>"
)
View Source
const ModuleName = "vpp.nat"

ModuleName is the module name used for models.

Variables

View Source
var (
	ModelNat44Global = models.Register(&Nat44Global{}, models.Spec{
		Module:  ModuleName,
		Type:    "nat44-global",
		Version: "v2",
	})
	ModelDNat44 = models.Register(&DNat44{}, models.Spec{
		Module:  ModuleName,
		Type:    "dnat44",
		Version: "v2",
	}, models.WithNameTemplate("{{.Label}}"))
)
View Source
var DNat44_Protocol_name = map[int32]string{
	0: "TCP",
	1: "UDP",
	2: "ICMP",
}
View Source
var DNat44_Protocol_value = map[string]int32{
	"TCP":  0,
	"UDP":  1,
	"ICMP": 2,
}
View Source
var DNat44_StaticMapping_TwiceNatMode_name = map[int32]string{
	0: "DISABLED",
	1: "ENABLED",
	2: "SELF",
}
View Source
var DNat44_StaticMapping_TwiceNatMode_value = map[string]int32{
	"DISABLED": 0,
	"ENABLED":  1,
	"SELF":     2,
}

Functions

func AddressNAT44Key

func AddressNAT44Key(address string, twiceNat bool) string

AddressNAT44Key returns (derived) key representing NAT44 configuration for a single IP address from the NAT44 address pool. Address is inserted into the key without validation!

func DNAT44Key

func DNAT44Key(label string) string

DNAT44Key returns the key used in NB DB to store the configuration of the given DNAT-44 configuration.

func GlobalNAT44Key

func GlobalNAT44Key() string

GlobalNAT44Key returns key for Nat44Global.

func InterfaceNAT44Key

func InterfaceNAT44Key(iface string, isInside bool) string

InterfaceNAT44Key returns (derived) key representing NAT44 configuration for a given interface.

func ParseAddressNAT44Key

func ParseAddressNAT44Key(key string) (address string, twiceNat bool, isAddressNAT44Key bool)

ParseAddressNAT44Key parses configuration of a single NAT44 address from a key returned by AddressNAT44Key().

func ParseInterfaceNAT44Key

func ParseInterfaceNAT44Key(key string) (iface string, isInside bool, isInterfaceNAT44Key bool)

ParseInterfaceNAT44Key parses interface name and the assigned NAT44 feature from Interface-NAT44 key.

Types

type DNat44

type DNat44 struct {
	Label                string                    `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"`
	StMappings           []*DNat44_StaticMapping   `protobuf:"bytes,2,rep,name=st_mappings,json=stMappings,proto3" json:"st_mappings,omitempty"`
	IdMappings           []*DNat44_IdentityMapping `protobuf:"bytes,3,rep,name=id_mappings,json=idMappings,proto3" json:"id_mappings,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                  `json:"-"`
	XXX_unrecognized     []byte                    `json:"-"`
	XXX_sizecache        int32                     `json:"-"`
}

func (*DNat44) Descriptor

func (*DNat44) Descriptor() ([]byte, []int)

func (*DNat44) GetIdMappings

func (m *DNat44) GetIdMappings() []*DNat44_IdentityMapping

func (*DNat44) GetLabel

func (m *DNat44) GetLabel() string

func (*DNat44) GetStMappings

func (m *DNat44) GetStMappings() []*DNat44_StaticMapping

func (*DNat44) ProtoMessage

func (*DNat44) ProtoMessage()

func (*DNat44) Reset

func (m *DNat44) Reset()

func (*DNat44) String

func (m *DNat44) String() string

func (*DNat44) XXX_DiscardUnknown

func (m *DNat44) XXX_DiscardUnknown()

func (*DNat44) XXX_Marshal

func (m *DNat44) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DNat44) XXX_Merge

func (m *DNat44) XXX_Merge(src proto.Message)

func (*DNat44) XXX_MessageName

func (*DNat44) XXX_MessageName() string

func (*DNat44) XXX_Size

func (m *DNat44) XXX_Size() int

func (*DNat44) XXX_Unmarshal

func (m *DNat44) XXX_Unmarshal(b []byte) error

type DNat44_IdentityMapping

type DNat44_IdentityMapping struct {
	VrfId                uint32          `protobuf:"varint,1,opt,name=vrf_id,json=vrfId,proto3" json:"vrf_id,omitempty"`
	Interface            string          `protobuf:"bytes,2,opt,name=interface,proto3" json:"interface,omitempty"`
	IpAddress            string          `protobuf:"bytes,3,opt,name=ip_address,json=ipAddress,proto3" json:"ip_address,omitempty"`
	Port                 uint32          `protobuf:"varint,4,opt,name=port,proto3" json:"port,omitempty"`
	Protocol             DNat44_Protocol `protobuf:"varint,5,opt,name=protocol,proto3,enum=vpp.nat.DNat44_Protocol" json:"protocol,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (*DNat44_IdentityMapping) Descriptor

func (*DNat44_IdentityMapping) Descriptor() ([]byte, []int)

func (*DNat44_IdentityMapping) GetInterface

func (m *DNat44_IdentityMapping) GetInterface() string

func (*DNat44_IdentityMapping) GetIpAddress

func (m *DNat44_IdentityMapping) GetIpAddress() string

func (*DNat44_IdentityMapping) GetPort

func (m *DNat44_IdentityMapping) GetPort() uint32

func (*DNat44_IdentityMapping) GetProtocol

func (m *DNat44_IdentityMapping) GetProtocol() DNat44_Protocol

func (*DNat44_IdentityMapping) GetVrfId

func (m *DNat44_IdentityMapping) GetVrfId() uint32

func (*DNat44_IdentityMapping) ProtoMessage

func (*DNat44_IdentityMapping) ProtoMessage()

func (*DNat44_IdentityMapping) Reset

func (m *DNat44_IdentityMapping) Reset()

func (*DNat44_IdentityMapping) String

func (m *DNat44_IdentityMapping) String() string

func (*DNat44_IdentityMapping) XXX_DiscardUnknown

func (m *DNat44_IdentityMapping) XXX_DiscardUnknown()

func (*DNat44_IdentityMapping) XXX_Marshal

func (m *DNat44_IdentityMapping) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DNat44_IdentityMapping) XXX_Merge

func (m *DNat44_IdentityMapping) XXX_Merge(src proto.Message)

func (*DNat44_IdentityMapping) XXX_MessageName

func (*DNat44_IdentityMapping) XXX_MessageName() string

func (*DNat44_IdentityMapping) XXX_Size

func (m *DNat44_IdentityMapping) XXX_Size() int

func (*DNat44_IdentityMapping) XXX_Unmarshal

func (m *DNat44_IdentityMapping) XXX_Unmarshal(b []byte) error

type DNat44_Protocol

type DNat44_Protocol int32
const (
	DNat44_TCP  DNat44_Protocol = 0
	DNat44_UDP  DNat44_Protocol = 1
	DNat44_ICMP DNat44_Protocol = 2
)

func (DNat44_Protocol) EnumDescriptor

func (DNat44_Protocol) EnumDescriptor() ([]byte, []int)

func (DNat44_Protocol) String

func (x DNat44_Protocol) String() string

type DNat44_StaticMapping

type DNat44_StaticMapping struct {
	ExternalInterface    string                            `protobuf:"bytes,1,opt,name=external_interface,json=externalInterface,proto3" json:"external_interface,omitempty"`
	ExternalIp           string                            `protobuf:"bytes,2,opt,name=external_ip,json=externalIp,proto3" json:"external_ip,omitempty"`
	ExternalPort         uint32                            `protobuf:"varint,3,opt,name=external_port,json=externalPort,proto3" json:"external_port,omitempty"`
	LocalIps             []*DNat44_StaticMapping_LocalIP   `protobuf:"bytes,4,rep,name=local_ips,json=localIps,proto3" json:"local_ips,omitempty"`
	Protocol             DNat44_Protocol                   `protobuf:"varint,5,opt,name=protocol,proto3,enum=vpp.nat.DNat44_Protocol" json:"protocol,omitempty"`
	TwiceNat             DNat44_StaticMapping_TwiceNatMode `` /* 133-byte string literal not displayed */
	SessionAffinity      uint32                            `protobuf:"varint,7,opt,name=session_affinity,json=sessionAffinity,proto3" json:"session_affinity,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                          `json:"-"`
	XXX_unrecognized     []byte                            `json:"-"`
	XXX_sizecache        int32                             `json:"-"`
}

func (*DNat44_StaticMapping) Descriptor

func (*DNat44_StaticMapping) Descriptor() ([]byte, []int)

func (*DNat44_StaticMapping) GetExternalInterface

func (m *DNat44_StaticMapping) GetExternalInterface() string

func (*DNat44_StaticMapping) GetExternalIp

func (m *DNat44_StaticMapping) GetExternalIp() string

func (*DNat44_StaticMapping) GetExternalPort

func (m *DNat44_StaticMapping) GetExternalPort() uint32

func (*DNat44_StaticMapping) GetLocalIps

func (*DNat44_StaticMapping) GetProtocol

func (m *DNat44_StaticMapping) GetProtocol() DNat44_Protocol

func (*DNat44_StaticMapping) GetSessionAffinity

func (m *DNat44_StaticMapping) GetSessionAffinity() uint32

func (*DNat44_StaticMapping) GetTwiceNat

func (*DNat44_StaticMapping) ProtoMessage

func (*DNat44_StaticMapping) ProtoMessage()

func (*DNat44_StaticMapping) Reset

func (m *DNat44_StaticMapping) Reset()

func (*DNat44_StaticMapping) String

func (m *DNat44_StaticMapping) String() string

func (*DNat44_StaticMapping) XXX_DiscardUnknown

func (m *DNat44_StaticMapping) XXX_DiscardUnknown()

func (*DNat44_StaticMapping) XXX_Marshal

func (m *DNat44_StaticMapping) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DNat44_StaticMapping) XXX_Merge

func (m *DNat44_StaticMapping) XXX_Merge(src proto.Message)

func (*DNat44_StaticMapping) XXX_MessageName

func (*DNat44_StaticMapping) XXX_MessageName() string

func (*DNat44_StaticMapping) XXX_Size

func (m *DNat44_StaticMapping) XXX_Size() int

func (*DNat44_StaticMapping) XXX_Unmarshal

func (m *DNat44_StaticMapping) XXX_Unmarshal(b []byte) error

type DNat44_StaticMapping_LocalIP

type DNat44_StaticMapping_LocalIP struct {
	VrfId                uint32   `protobuf:"varint,1,opt,name=vrf_id,json=vrfId,proto3" json:"vrf_id,omitempty"`
	LocalIp              string   `protobuf:"bytes,2,opt,name=local_ip,json=localIp,proto3" json:"local_ip,omitempty"`
	LocalPort            uint32   `protobuf:"varint,3,opt,name=local_port,json=localPort,proto3" json:"local_port,omitempty"`
	Probability          uint32   `protobuf:"varint,4,opt,name=probability,proto3" json:"probability,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*DNat44_StaticMapping_LocalIP) Descriptor

func (*DNat44_StaticMapping_LocalIP) Descriptor() ([]byte, []int)

func (*DNat44_StaticMapping_LocalIP) GetLocalIp

func (m *DNat44_StaticMapping_LocalIP) GetLocalIp() string

func (*DNat44_StaticMapping_LocalIP) GetLocalPort

func (m *DNat44_StaticMapping_LocalIP) GetLocalPort() uint32

func (*DNat44_StaticMapping_LocalIP) GetProbability

func (m *DNat44_StaticMapping_LocalIP) GetProbability() uint32

func (*DNat44_StaticMapping_LocalIP) GetVrfId

func (m *DNat44_StaticMapping_LocalIP) GetVrfId() uint32

func (*DNat44_StaticMapping_LocalIP) ProtoMessage

func (*DNat44_StaticMapping_LocalIP) ProtoMessage()

func (*DNat44_StaticMapping_LocalIP) Reset

func (m *DNat44_StaticMapping_LocalIP) Reset()

func (*DNat44_StaticMapping_LocalIP) String

func (*DNat44_StaticMapping_LocalIP) XXX_DiscardUnknown

func (m *DNat44_StaticMapping_LocalIP) XXX_DiscardUnknown()

func (*DNat44_StaticMapping_LocalIP) XXX_Marshal

func (m *DNat44_StaticMapping_LocalIP) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DNat44_StaticMapping_LocalIP) XXX_Merge

func (m *DNat44_StaticMapping_LocalIP) XXX_Merge(src proto.Message)

func (*DNat44_StaticMapping_LocalIP) XXX_MessageName

func (*DNat44_StaticMapping_LocalIP) XXX_MessageName() string

func (*DNat44_StaticMapping_LocalIP) XXX_Size

func (m *DNat44_StaticMapping_LocalIP) XXX_Size() int

func (*DNat44_StaticMapping_LocalIP) XXX_Unmarshal

func (m *DNat44_StaticMapping_LocalIP) XXX_Unmarshal(b []byte) error

type DNat44_StaticMapping_TwiceNatMode

type DNat44_StaticMapping_TwiceNatMode int32
const (
	DNat44_StaticMapping_DISABLED DNat44_StaticMapping_TwiceNatMode = 0
	DNat44_StaticMapping_ENABLED  DNat44_StaticMapping_TwiceNatMode = 1
	DNat44_StaticMapping_SELF     DNat44_StaticMapping_TwiceNatMode = 2
)

func (DNat44_StaticMapping_TwiceNatMode) EnumDescriptor

func (DNat44_StaticMapping_TwiceNatMode) EnumDescriptor() ([]byte, []int)

func (DNat44_StaticMapping_TwiceNatMode) String

type Nat44Global

type Nat44Global struct {
	Forwarding           bool                     `protobuf:"varint,1,opt,name=forwarding,proto3" json:"forwarding,omitempty"`
	NatInterfaces        []*Nat44Global_Interface `protobuf:"bytes,2,rep,name=nat_interfaces,json=natInterfaces,proto3" json:"nat_interfaces,omitempty"`
	AddressPool          []*Nat44Global_Address   `protobuf:"bytes,3,rep,name=address_pool,json=addressPool,proto3" json:"address_pool,omitempty"`
	VirtualReassembly    *VirtualReassembly       `protobuf:"bytes,4,opt,name=virtual_reassembly,json=virtualReassembly,proto3" json:"virtual_reassembly,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                 `json:"-"`
	XXX_unrecognized     []byte                   `json:"-"`
	XXX_sizecache        int32                    `json:"-"`
}

func (*Nat44Global) Descriptor

func (*Nat44Global) Descriptor() ([]byte, []int)

func (*Nat44Global) GetAddressPool

func (m *Nat44Global) GetAddressPool() []*Nat44Global_Address

func (*Nat44Global) GetForwarding

func (m *Nat44Global) GetForwarding() bool

func (*Nat44Global) GetNatInterfaces

func (m *Nat44Global) GetNatInterfaces() []*Nat44Global_Interface

func (*Nat44Global) GetVirtualReassembly

func (m *Nat44Global) GetVirtualReassembly() *VirtualReassembly

func (*Nat44Global) ProtoMessage

func (*Nat44Global) ProtoMessage()

func (*Nat44Global) Reset

func (m *Nat44Global) Reset()

func (*Nat44Global) String

func (m *Nat44Global) String() string

func (*Nat44Global) XXX_DiscardUnknown

func (m *Nat44Global) XXX_DiscardUnknown()

func (*Nat44Global) XXX_Marshal

func (m *Nat44Global) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Nat44Global) XXX_Merge

func (m *Nat44Global) XXX_Merge(src proto.Message)

func (*Nat44Global) XXX_MessageName

func (*Nat44Global) XXX_MessageName() string

func (*Nat44Global) XXX_Size

func (m *Nat44Global) XXX_Size() int

func (*Nat44Global) XXX_Unmarshal

func (m *Nat44Global) XXX_Unmarshal(b []byte) error

type Nat44Global_Address

type Nat44Global_Address struct {
	Address              string   `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	VrfId                uint32   `protobuf:"varint,2,opt,name=vrf_id,json=vrfId,proto3" json:"vrf_id,omitempty"`
	TwiceNat             bool     `protobuf:"varint,3,opt,name=twice_nat,json=twiceNat,proto3" json:"twice_nat,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Nat44Global_Address) Descriptor

func (*Nat44Global_Address) Descriptor() ([]byte, []int)

func (*Nat44Global_Address) GetAddress

func (m *Nat44Global_Address) GetAddress() string

func (*Nat44Global_Address) GetTwiceNat

func (m *Nat44Global_Address) GetTwiceNat() bool

func (*Nat44Global_Address) GetVrfId

func (m *Nat44Global_Address) GetVrfId() uint32

func (*Nat44Global_Address) ProtoMessage

func (*Nat44Global_Address) ProtoMessage()

func (*Nat44Global_Address) Reset

func (m *Nat44Global_Address) Reset()

func (*Nat44Global_Address) String

func (m *Nat44Global_Address) String() string

func (*Nat44Global_Address) XXX_DiscardUnknown

func (m *Nat44Global_Address) XXX_DiscardUnknown()

func (*Nat44Global_Address) XXX_Marshal

func (m *Nat44Global_Address) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Nat44Global_Address) XXX_Merge

func (m *Nat44Global_Address) XXX_Merge(src proto.Message)

func (*Nat44Global_Address) XXX_MessageName

func (*Nat44Global_Address) XXX_MessageName() string

func (*Nat44Global_Address) XXX_Size

func (m *Nat44Global_Address) XXX_Size() int

func (*Nat44Global_Address) XXX_Unmarshal

func (m *Nat44Global_Address) XXX_Unmarshal(b []byte) error

type Nat44Global_Interface

type Nat44Global_Interface struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	IsInside             bool     `protobuf:"varint,2,opt,name=is_inside,json=isInside,proto3" json:"is_inside,omitempty"`
	OutputFeature        bool     `protobuf:"varint,3,opt,name=output_feature,json=outputFeature,proto3" json:"output_feature,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Nat44Global_Interface) Descriptor

func (*Nat44Global_Interface) Descriptor() ([]byte, []int)

func (*Nat44Global_Interface) GetIsInside

func (m *Nat44Global_Interface) GetIsInside() bool

func (*Nat44Global_Interface) GetName

func (m *Nat44Global_Interface) GetName() string

func (*Nat44Global_Interface) GetOutputFeature

func (m *Nat44Global_Interface) GetOutputFeature() bool

func (*Nat44Global_Interface) ProtoMessage

func (*Nat44Global_Interface) ProtoMessage()

func (*Nat44Global_Interface) Reset

func (m *Nat44Global_Interface) Reset()

func (*Nat44Global_Interface) String

func (m *Nat44Global_Interface) String() string

func (*Nat44Global_Interface) XXX_DiscardUnknown

func (m *Nat44Global_Interface) XXX_DiscardUnknown()

func (*Nat44Global_Interface) XXX_Marshal

func (m *Nat44Global_Interface) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Nat44Global_Interface) XXX_Merge

func (m *Nat44Global_Interface) XXX_Merge(src proto.Message)

func (*Nat44Global_Interface) XXX_MessageName

func (*Nat44Global_Interface) XXX_MessageName() string

func (*Nat44Global_Interface) XXX_Size

func (m *Nat44Global_Interface) XXX_Size() int

func (*Nat44Global_Interface) XXX_Unmarshal

func (m *Nat44Global_Interface) XXX_Unmarshal(b []byte) error

type VirtualReassembly

type VirtualReassembly struct {
	Timeout              uint32   `protobuf:"varint,1,opt,name=timeout,proto3" json:"timeout,omitempty"`
	MaxReassemblies      uint32   `protobuf:"varint,2,opt,name=max_reassemblies,json=maxReassemblies,proto3" json:"max_reassemblies,omitempty"`
	MaxFragments         uint32   `protobuf:"varint,3,opt,name=max_fragments,json=maxFragments,proto3" json:"max_fragments,omitempty"`
	DropFragments        bool     `protobuf:"varint,4,opt,name=drop_fragments,json=dropFragments,proto3" json:"drop_fragments,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*VirtualReassembly) Descriptor

func (*VirtualReassembly) Descriptor() ([]byte, []int)

func (*VirtualReassembly) GetDropFragments

func (m *VirtualReassembly) GetDropFragments() bool

func (*VirtualReassembly) GetMaxFragments

func (m *VirtualReassembly) GetMaxFragments() uint32

func (*VirtualReassembly) GetMaxReassemblies

func (m *VirtualReassembly) GetMaxReassemblies() uint32

func (*VirtualReassembly) GetTimeout

func (m *VirtualReassembly) GetTimeout() uint32

func (*VirtualReassembly) ProtoMessage

func (*VirtualReassembly) ProtoMessage()

func (*VirtualReassembly) Reset

func (m *VirtualReassembly) Reset()

func (*VirtualReassembly) String

func (m *VirtualReassembly) String() string

func (*VirtualReassembly) XXX_DiscardUnknown

func (m *VirtualReassembly) XXX_DiscardUnknown()

func (*VirtualReassembly) XXX_Marshal

func (m *VirtualReassembly) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*VirtualReassembly) XXX_Merge

func (m *VirtualReassembly) XXX_Merge(src proto.Message)

func (*VirtualReassembly) XXX_MessageName

func (*VirtualReassembly) XXX_MessageName() string

func (*VirtualReassembly) XXX_Size

func (m *VirtualReassembly) XXX_Size() int

func (*VirtualReassembly) XXX_Unmarshal

func (m *VirtualReassembly) XXX_Unmarshal(b []byte) error

Source Files

Jump to

Keyboard shortcuts

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