nat64

package
v0.0.0-...-ae01f8c Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ModuleName = "vpp.nat"

Variables

View Source
var (
	ModelNat64IPv6Prefix  models.KnownModel
	ModelNat64Interface   models.KnownModel
	ModelNat64AddressPool models.KnownModel
	ModelNat64StaticBIB   models.KnownModel
)
View Source
var (
	Nat64Interface_Type_name = map[int32]string{
		0: "IPV6_INSIDE",
		1: "IPV4_OUTSIDE",
	}
	Nat64Interface_Type_value = map[string]int32{
		"IPV6_INSIDE":  0,
		"IPV4_OUTSIDE": 1,
	}
)

Enum value maps for Nat64Interface_Type.

View Source
var (
	Nat64StaticBIB_Protocol_name = map[int32]string{
		0: "TCP",
		1: "UDP",
		2: "ICMP",
	}
	Nat64StaticBIB_Protocol_value = map[string]int32{
		"TCP":  0,
		"UDP":  1,
		"ICMP": 2,
	}
)

Enum value maps for Nat64StaticBIB_Protocol.

View Source
var File_nat64_nat64_proto protoreflect.FileDescriptor

Functions

func Nat64AddressPoolKey

func Nat64AddressPoolKey(vrf uint32, firstIP, lastIP string) string

Nat64AddressPoolKey returns the key used in NB DB to store the configuration of the given NAT64 address pool.

func Nat64IPv6PrefixKey

func Nat64IPv6PrefixKey(vrf uint32) string

Nat64IPv6PrefixKey returns the key used in NB DB to store the configuration of a NAT64 IPv6 prefix inside a given VRF.

func Nat64InterfaceKey

func Nat64InterfaceKey(name string) string

Nat64InterfaceKey returns the key used in NB DB to store the configuration of the given NAT64 interface.

func Nat64StaticBIBKey

func Nat64StaticBIBKey(bib *Nat64StaticBIB) string

Nat64StaticBIBKey returns the key used in NB DB to store the configuration of the given NAT64 static BIB.

Types

type Nat64AddressPool

type Nat64AddressPool struct {

	// VRF id of tenant, 0xFFFFFFFF means independent of VRF.
	// Non-zero (and not all-ones) VRF has to be explicitly created (see proto/ligato/vpp/l3/vrf.proto).
	VrfId uint32 `protobuf:"varint,1,opt,name=vrf_id,json=vrfId,proto3" json:"vrf_id,omitempty"`
	// First IP address of the pool.
	FirstIp string `protobuf:"bytes,2,opt,name=first_ip,json=firstIp,proto3" json:"first_ip,omitempty"`
	// Last IP address of the pool. Should be higher than first_ip or empty.
	LastIp string `protobuf:"bytes,3,opt,name=last_ip,json=lastIp,proto3" json:"last_ip,omitempty"`
	// contains filtered or unexported fields
}

Nat44AddressPool defines an address pool used for NAT64.

func (*Nat64AddressPool) Descriptor deprecated

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

Deprecated: Use Nat64AddressPool.ProtoReflect.Descriptor instead.

func (*Nat64AddressPool) GetFirstIp

func (x *Nat64AddressPool) GetFirstIp() string

func (*Nat64AddressPool) GetLastIp

func (x *Nat64AddressPool) GetLastIp() string

func (*Nat64AddressPool) GetVrfId

func (x *Nat64AddressPool) GetVrfId() uint32

func (*Nat64AddressPool) ProtoMessage

func (*Nat64AddressPool) ProtoMessage()

func (*Nat64AddressPool) ProtoReflect

func (x *Nat64AddressPool) ProtoReflect() protoreflect.Message

func (*Nat64AddressPool) Reset

func (x *Nat64AddressPool) Reset()

func (*Nat64AddressPool) String

func (x *Nat64AddressPool) String() string

type Nat64IPv6Prefix

type Nat64IPv6Prefix struct {

	// VRF id of tenant.
	// At most one IPv6 prefix can be configured for a given VRF (that's why VRF is part of the key but prefix is not).
	// Non-zero (and not all-ones) VRF has to be explicitly created (see proto/ligato/vpp/l3/vrf.proto).
	VrfId uint32 `protobuf:"varint,1,opt,name=vrf_id,json=vrfId,proto3" json:"vrf_id,omitempty"`
	// NAT64 prefix in the <IPv6-Address>/<IPv6-Prefix> format.
	Prefix string `protobuf:"bytes,2,opt,name=prefix,proto3" json:"prefix,omitempty"`
	// contains filtered or unexported fields
}

IPv4-Embedded IPv6 Address Prefix used for NAT64. If no prefix is configured (at all or for a given VRF), then the well-known prefix (64:ff9b::/96) is used.

func (*Nat64IPv6Prefix) Descriptor deprecated

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

Deprecated: Use Nat64IPv6Prefix.ProtoReflect.Descriptor instead.

func (*Nat64IPv6Prefix) GetPrefix

func (x *Nat64IPv6Prefix) GetPrefix() string

func (*Nat64IPv6Prefix) GetVrfId

func (x *Nat64IPv6Prefix) GetVrfId() uint32

func (*Nat64IPv6Prefix) ProtoMessage

func (*Nat64IPv6Prefix) ProtoMessage()

func (*Nat64IPv6Prefix) ProtoReflect

func (x *Nat64IPv6Prefix) ProtoReflect() protoreflect.Message

func (*Nat64IPv6Prefix) Reset

func (x *Nat64IPv6Prefix) Reset()

func (*Nat64IPv6Prefix) String

func (x *Nat64IPv6Prefix) String() string

type Nat64Interface

type Nat64Interface struct {

	// Interface name (logical).
	Name string              `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Type Nat64Interface_Type `protobuf:"varint,2,opt,name=type,proto3,enum=nat64.Nat64Interface_Type" json:"type,omitempty"`
	// contains filtered or unexported fields
}

Nat64Interface defines a local network interfaces enabled for NAT64.

func (*Nat64Interface) Descriptor deprecated

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

Deprecated: Use Nat64Interface.ProtoReflect.Descriptor instead.

func (*Nat64Interface) GetName

func (x *Nat64Interface) GetName() string

func (*Nat64Interface) GetType

func (x *Nat64Interface) GetType() Nat64Interface_Type

func (*Nat64Interface) ProtoMessage

func (*Nat64Interface) ProtoMessage()

func (*Nat64Interface) ProtoReflect

func (x *Nat64Interface) ProtoReflect() protoreflect.Message

func (*Nat64Interface) Reset

func (x *Nat64Interface) Reset()

func (*Nat64Interface) String

func (x *Nat64Interface) String() string

type Nat64Interface_Type

type Nat64Interface_Type int32
const (
	// Interface connecting inside/local network with IPv6 endpoints.
	Nat64Interface_IPV6_INSIDE Nat64Interface_Type = 0
	// Interface connecting outside/external network with IPv4 endpoints.
	Nat64Interface_IPV4_OUTSIDE Nat64Interface_Type = 1
)

func (Nat64Interface_Type) Descriptor

func (Nat64Interface_Type) Enum

func (Nat64Interface_Type) EnumDescriptor deprecated

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

Deprecated: Use Nat64Interface_Type.Descriptor instead.

func (Nat64Interface_Type) Number

func (Nat64Interface_Type) String

func (x Nat64Interface_Type) String() string

func (Nat64Interface_Type) Type

type Nat64StaticBIB

type Nat64StaticBIB struct {

	// VRF (table) ID. Non-zero VRF has to be explicitly created (see proto/ligato/vpp/l3/vrf.proto).
	VrfId uint32 `protobuf:"varint,1,opt,name=vrf_id,json=vrfId,proto3" json:"vrf_id,omitempty"`
	// IPv6 host from the inside/local network.
	InsideIpv6Address string `protobuf:"bytes,2,opt,name=inside_ipv6_address,json=insideIpv6Address,proto3" json:"inside_ipv6_address,omitempty"`
	// Inside port number (of the IPv6 host).
	InsidePort uint32 `protobuf:"varint,3,opt,name=inside_port,json=insidePort,proto3" json:"inside_port,omitempty"`
	// IPv4 host from the outside/external network.
	OutsideIpv4Address string `protobuf:"bytes,4,opt,name=outside_ipv4_address,json=outsideIpv4Address,proto3" json:"outside_ipv4_address,omitempty"`
	// Outside port number (of the IPv4 host).
	OutsidePort uint32                  `protobuf:"varint,5,opt,name=outside_port,json=outsidePort,proto3" json:"outside_port,omitempty"`
	Protocol    Nat64StaticBIB_Protocol `protobuf:"varint,6,opt,name=protocol,proto3,enum=nat64.Nat64StaticBIB_Protocol" json:"protocol,omitempty"`
	// contains filtered or unexported fields
}

Static NAT64 binding allowing IPv4 host from the outside to access IPv6 host from the inside.

func (*Nat64StaticBIB) Descriptor deprecated

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

Deprecated: Use Nat64StaticBIB.ProtoReflect.Descriptor instead.

func (*Nat64StaticBIB) GetInsideIpv6Address

func (x *Nat64StaticBIB) GetInsideIpv6Address() string

func (*Nat64StaticBIB) GetInsidePort

func (x *Nat64StaticBIB) GetInsidePort() uint32

func (*Nat64StaticBIB) GetOutsideIpv4Address

func (x *Nat64StaticBIB) GetOutsideIpv4Address() string

func (*Nat64StaticBIB) GetOutsidePort

func (x *Nat64StaticBIB) GetOutsidePort() uint32

func (*Nat64StaticBIB) GetProtocol

func (x *Nat64StaticBIB) GetProtocol() Nat64StaticBIB_Protocol

func (*Nat64StaticBIB) GetVrfId

func (x *Nat64StaticBIB) GetVrfId() uint32

func (*Nat64StaticBIB) ProtoMessage

func (*Nat64StaticBIB) ProtoMessage()

func (*Nat64StaticBIB) ProtoReflect

func (x *Nat64StaticBIB) ProtoReflect() protoreflect.Message

func (*Nat64StaticBIB) Reset

func (x *Nat64StaticBIB) Reset()

func (*Nat64StaticBIB) String

func (x *Nat64StaticBIB) String() string

type Nat64StaticBIB_Protocol

type Nat64StaticBIB_Protocol int32

Protocol to which the binding applies.

const (
	Nat64StaticBIB_TCP  Nat64StaticBIB_Protocol = 0
	Nat64StaticBIB_UDP  Nat64StaticBIB_Protocol = 1
	Nat64StaticBIB_ICMP Nat64StaticBIB_Protocol = 2
)

func (Nat64StaticBIB_Protocol) Descriptor

func (Nat64StaticBIB_Protocol) Enum

func (Nat64StaticBIB_Protocol) EnumDescriptor deprecated

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

Deprecated: Use Nat64StaticBIB_Protocol.Descriptor instead.

func (Nat64StaticBIB_Protocol) Number

func (Nat64StaticBIB_Protocol) String

func (x Nat64StaticBIB_Protocol) String() string

func (Nat64StaticBIB_Protocol) Type

Jump to

Keyboard shortcuts

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