nat

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package nat is a generated protocol buffer package.

It is generated from these files:

nat.proto

It has these top-level messages:

Nat44Global
Nat44SNat
Nat44DNat

Index

Constants

This section is empty.

Variables

View Source
var Protocol_name = map[int32]string{
	0: "TCP",
	1: "UDP",
	2: "ICMP",
}
View Source
var Protocol_value = map[string]int32{
	"TCP":  0,
	"UDP":  1,
	"ICMP": 2,
}
View Source
var TwiceNatMode_name = map[int32]string{
	0: "DISABLED",
	1: "ENABLED",
	2: "SELF",
}
View Source
var TwiceNatMode_value = map[string]int32{
	"DISABLED": 0,
	"ENABLED":  1,
	"SELF":     2,
}

Functions

func DNatKey

func DNatKey(label string) string

DNatKey returns the key used in ETCD to store DNAT config

func DNatPrefix

func DNatPrefix() string

DNatPrefix returns the prefix used in ETCD to store NAT DNAT config

func GlobalConfigKey

func GlobalConfigKey() string

GlobalConfigKey returns the key used in ETCD to store NAT global config. Global config can be stored only once, so the prefix == key

func GlobalConfigPrefix

func GlobalConfigPrefix() string

GlobalConfigPrefix returns the prefix used in ETCD to store NAT global config

func SNatKey

func SNatKey(label string) string

SNatKey returns the key used in ETCD to store SNAT config

func SNatPrefix

func SNatPrefix() string

SNatPrefix returns the prefix used in ETCD to store SNAT config

Types

type Nat44DNat

type Nat44DNat struct {
	DnatConfigs []*Nat44DNat_DNatConfig `protobuf:"bytes,1,rep,name=dnat_configs,json=dnatConfigs" json:"dnat_configs,omitempty"`
}

One-to-many (DNAT) setup

func (*Nat44DNat) Descriptor

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

func (*Nat44DNat) GetDnatConfigs

func (m *Nat44DNat) GetDnatConfigs() []*Nat44DNat_DNatConfig

func (*Nat44DNat) ProtoMessage

func (*Nat44DNat) ProtoMessage()

func (*Nat44DNat) Reset

func (m *Nat44DNat) Reset()

func (*Nat44DNat) String

func (m *Nat44DNat) String() string

type Nat44DNat_DNatConfig

type Nat44DNat_DNatConfig struct {
	Label      string                                  `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"`
	StMappings []*Nat44DNat_DNatConfig_StaticMapping   `protobuf:"bytes,4,rep,name=st_mappings,json=stMappings" json:"st_mappings,omitempty"`
	IdMappings []*Nat44DNat_DNatConfig_IdentityMapping `protobuf:"bytes,6,rep,name=id_mappings,json=idMappings" json:"id_mappings,omitempty"`
}

func (*Nat44DNat_DNatConfig) Descriptor

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

func (*Nat44DNat_DNatConfig) GetIdMappings

func (*Nat44DNat_DNatConfig) GetLabel

func (m *Nat44DNat_DNatConfig) GetLabel() string

func (*Nat44DNat_DNatConfig) GetStMappings

func (*Nat44DNat_DNatConfig) ProtoMessage

func (*Nat44DNat_DNatConfig) ProtoMessage()

func (*Nat44DNat_DNatConfig) Reset

func (m *Nat44DNat_DNatConfig) Reset()

func (*Nat44DNat_DNatConfig) String

func (m *Nat44DNat_DNatConfig) String() string

type Nat44DNat_DNatConfig_IdentityMapping

type Nat44DNat_DNatConfig_IdentityMapping struct {
	VrfId              uint32   `protobuf:"varint,1,opt,name=vrf_id,json=vrfId,proto3" json:"vrf_id,omitempty"`
	AddressedInterface string   `protobuf:"bytes,2,opt,name=addressed_interface,json=addressedInterface,proto3" json:"addressed_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           Protocol `protobuf:"varint,5,opt,name=protocol,proto3,enum=nat.Protocol" json:"protocol,omitempty"`
}

func (*Nat44DNat_DNatConfig_IdentityMapping) Descriptor

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

func (*Nat44DNat_DNatConfig_IdentityMapping) GetAddressedInterface

func (m *Nat44DNat_DNatConfig_IdentityMapping) GetAddressedInterface() string

func (*Nat44DNat_DNatConfig_IdentityMapping) GetIpAddress

func (m *Nat44DNat_DNatConfig_IdentityMapping) GetIpAddress() string

func (*Nat44DNat_DNatConfig_IdentityMapping) GetPort

func (*Nat44DNat_DNatConfig_IdentityMapping) GetProtocol

func (*Nat44DNat_DNatConfig_IdentityMapping) GetVrfId

func (*Nat44DNat_DNatConfig_IdentityMapping) ProtoMessage

func (*Nat44DNat_DNatConfig_IdentityMapping) ProtoMessage()

func (*Nat44DNat_DNatConfig_IdentityMapping) Reset

func (*Nat44DNat_DNatConfig_IdentityMapping) String

type Nat44DNat_DNatConfig_StaticMapping

type Nat44DNat_DNatConfig_StaticMapping struct {
	VrfId             uint32                                        `protobuf:"varint,1,opt,name=vrf_id,json=vrfId,proto3" json:"vrf_id,omitempty"`
	ExternalInterface string                                        `protobuf:"bytes,2,opt,name=external_interface,json=externalInterface,proto3" json:"external_interface,omitempty"`
	ExternalIp        string                                        `protobuf:"bytes,3,opt,name=external_ip,json=externalIp,proto3" json:"external_ip,omitempty"`
	ExternalPort      uint32                                        `protobuf:"varint,4,opt,name=external_port,json=externalPort,proto3" json:"external_port,omitempty"`
	LocalIps          []*Nat44DNat_DNatConfig_StaticMapping_LocalIP `protobuf:"bytes,5,rep,name=local_ips,json=localIps" json:"local_ips,omitempty"`
	Protocol          Protocol                                      `protobuf:"varint,6,opt,name=protocol,proto3,enum=nat.Protocol" json:"protocol,omitempty"`
	TwiceNat          TwiceNatMode                                  `protobuf:"varint,7,opt,name=twice_nat,json=twiceNat,proto3,enum=nat.TwiceNatMode" json:"twice_nat,omitempty"`
}

func (*Nat44DNat_DNatConfig_StaticMapping) Descriptor

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

func (*Nat44DNat_DNatConfig_StaticMapping) GetExternalInterface

func (m *Nat44DNat_DNatConfig_StaticMapping) GetExternalInterface() string

func (*Nat44DNat_DNatConfig_StaticMapping) GetExternalIp

func (m *Nat44DNat_DNatConfig_StaticMapping) GetExternalIp() string

func (*Nat44DNat_DNatConfig_StaticMapping) GetExternalPort

func (m *Nat44DNat_DNatConfig_StaticMapping) GetExternalPort() uint32

func (*Nat44DNat_DNatConfig_StaticMapping) GetLocalIps

func (*Nat44DNat_DNatConfig_StaticMapping) GetProtocol

func (*Nat44DNat_DNatConfig_StaticMapping) GetTwiceNat

func (*Nat44DNat_DNatConfig_StaticMapping) GetVrfId

func (*Nat44DNat_DNatConfig_StaticMapping) ProtoMessage

func (*Nat44DNat_DNatConfig_StaticMapping) ProtoMessage()

func (*Nat44DNat_DNatConfig_StaticMapping) Reset

func (*Nat44DNat_DNatConfig_StaticMapping) String

type Nat44DNat_DNatConfig_StaticMapping_LocalIP

type Nat44DNat_DNatConfig_StaticMapping_LocalIP struct {
	LocalIp     string `protobuf:"bytes,1,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,2,opt,name=probability,proto3" json:"probability,omitempty"`
}

func (*Nat44DNat_DNatConfig_StaticMapping_LocalIP) Descriptor

func (*Nat44DNat_DNatConfig_StaticMapping_LocalIP) GetLocalIp

func (*Nat44DNat_DNatConfig_StaticMapping_LocalIP) GetLocalPort

func (*Nat44DNat_DNatConfig_StaticMapping_LocalIP) GetProbability

func (*Nat44DNat_DNatConfig_StaticMapping_LocalIP) ProtoMessage

func (*Nat44DNat_DNatConfig_StaticMapping_LocalIP) Reset

func (*Nat44DNat_DNatConfig_StaticMapping_LocalIP) String

type Nat44Global

type Nat44Global struct {
	Forwarding    bool                        `protobuf:"varint,2,opt,name=forwarding,proto3" json:"forwarding,omitempty"`
	NatInterfaces []*Nat44Global_NatInterface `protobuf:"bytes,3,rep,name=nat_interfaces,json=natInterfaces" json:"nat_interfaces,omitempty"`
	AddressPools  []*Nat44Global_AddressPool  `protobuf:"bytes,5,rep,name=address_pools,json=addressPools" json:"address_pools,omitempty"`
}

NAT44 global config

func (*Nat44Global) Descriptor

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

func (*Nat44Global) GetAddressPools

func (m *Nat44Global) GetAddressPools() []*Nat44Global_AddressPool

func (*Nat44Global) GetForwarding

func (m *Nat44Global) GetForwarding() bool

func (*Nat44Global) GetNatInterfaces

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

func (*Nat44Global) ProtoMessage

func (*Nat44Global) ProtoMessage()

func (*Nat44Global) Reset

func (m *Nat44Global) Reset()

func (*Nat44Global) String

func (m *Nat44Global) String() string

type Nat44Global_AddressPool

type Nat44Global_AddressPool struct {
	FirstSrcAddress string `protobuf:"bytes,1,opt,name=first_src_address,json=firstSrcAddress,proto3" json:"first_src_address,omitempty"`
	LastSrcAddress  string `protobuf:"bytes,2,opt,name=last_src_address,json=lastSrcAddress,proto3" json:"last_src_address,omitempty"`
	VrfId           uint32 `protobuf:"varint,3,opt,name=vrf_id,json=vrfId,proto3" json:"vrf_id,omitempty"`
	TwiceNat        bool   `protobuf:"varint,4,opt,name=twice_nat,json=twiceNat,proto3" json:"twice_nat,omitempty"`
}

func (*Nat44Global_AddressPool) Descriptor

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

func (*Nat44Global_AddressPool) GetFirstSrcAddress

func (m *Nat44Global_AddressPool) GetFirstSrcAddress() string

func (*Nat44Global_AddressPool) GetLastSrcAddress

func (m *Nat44Global_AddressPool) GetLastSrcAddress() string

func (*Nat44Global_AddressPool) GetTwiceNat

func (m *Nat44Global_AddressPool) GetTwiceNat() bool

func (*Nat44Global_AddressPool) GetVrfId

func (m *Nat44Global_AddressPool) GetVrfId() uint32

func (*Nat44Global_AddressPool) ProtoMessage

func (*Nat44Global_AddressPool) ProtoMessage()

func (*Nat44Global_AddressPool) Reset

func (m *Nat44Global_AddressPool) Reset()

func (*Nat44Global_AddressPool) String

func (m *Nat44Global_AddressPool) String() string

type Nat44Global_NatInterface

type Nat44Global_NatInterface 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"`
}

func (*Nat44Global_NatInterface) Descriptor

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

func (*Nat44Global_NatInterface) GetIsInside

func (m *Nat44Global_NatInterface) GetIsInside() bool

func (*Nat44Global_NatInterface) GetName

func (m *Nat44Global_NatInterface) GetName() string

func (*Nat44Global_NatInterface) GetOutputFeature

func (m *Nat44Global_NatInterface) GetOutputFeature() bool

func (*Nat44Global_NatInterface) ProtoMessage

func (*Nat44Global_NatInterface) ProtoMessage()

func (*Nat44Global_NatInterface) Reset

func (m *Nat44Global_NatInterface) Reset()

func (*Nat44Global_NatInterface) String

func (m *Nat44Global_NatInterface) String() string

type Nat44SNat

type Nat44SNat struct {
	SnatConfigs []*Nat44SNat_SNatConfig `protobuf:"bytes,1,rep,name=snat_configs,json=snatConfigs" json:"snat_configs,omitempty"`
}

Many-to-one (SNAT) setup

func (*Nat44SNat) Descriptor

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

func (*Nat44SNat) GetSnatConfigs

func (m *Nat44SNat) GetSnatConfigs() []*Nat44SNat_SNatConfig

func (*Nat44SNat) ProtoMessage

func (*Nat44SNat) ProtoMessage()

func (*Nat44SNat) Reset

func (m *Nat44SNat) Reset()

func (*Nat44SNat) String

func (m *Nat44SNat) String() string

type Nat44SNat_SNatConfig

type Nat44SNat_SNatConfig struct {
	Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"`
}

func (*Nat44SNat_SNatConfig) Descriptor

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

func (*Nat44SNat_SNatConfig) GetLabel

func (m *Nat44SNat_SNatConfig) GetLabel() string

func (*Nat44SNat_SNatConfig) ProtoMessage

func (*Nat44SNat_SNatConfig) ProtoMessage()

func (*Nat44SNat_SNatConfig) Reset

func (m *Nat44SNat_SNatConfig) Reset()

func (*Nat44SNat_SNatConfig) String

func (m *Nat44SNat_SNatConfig) String() string

type Protocol

type Protocol int32
const (
	Protocol_TCP  Protocol = 0
	Protocol_UDP  Protocol = 1
	Protocol_ICMP Protocol = 2
)

func (Protocol) EnumDescriptor

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

func (Protocol) String

func (x Protocol) String() string

type TwiceNatMode

type TwiceNatMode int32
const (
	TwiceNatMode_DISABLED TwiceNatMode = 0
	TwiceNatMode_ENABLED  TwiceNatMode = 1
	TwiceNatMode_SELF     TwiceNatMode = 2
)

func (TwiceNatMode) EnumDescriptor

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

func (TwiceNatMode) String

func (x TwiceNatMode) String() string

Jump to

Keyboard shortcuts

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