vpp_punt

package
v2.0.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ModuleName = "vpp"

ModuleName is the module name used for models.

Variables

View Source
var (
	ModelToHost = models.Register(&ToHost{}, models.Spec{
		Module:  ModuleName,
		Type:    "tohost",
		Version: "v2",
	}, models.WithNameTemplate(
		"l3/{{.L3Protocol}}/l4/{{.L4Protocol}}/port/{{.Port}}",
	))
	ModelIPRedirect = models.Register(&IPRedirect{}, models.Spec{
		Module:  ModuleName,
		Type:    "ipredirect",
		Version: "v2",
	}, models.WithNameTemplate(
		"l3/{{.L3Protocol}}/tx/{{.TxInterface}}",
	))
)
View Source
var L3Protocol_name = map[int32]string{
	0:  "UNDEFINED_L3",
	4:  "IPv4",
	6:  "IPv6",
	10: "ALL",
}
View Source
var L3Protocol_value = map[string]int32{
	"UNDEFINED_L3": 0,
	"IPv4":         4,
	"IPv6":         6,
	"ALL":          10,
}
View Source
var L4Protocol_name = map[int32]string{
	0:  "UNDEFINED_L4",
	6:  "TCP",
	17: "UDP",
}
View Source
var L4Protocol_value = map[string]int32{
	"UNDEFINED_L4": 0,
	"TCP":          6,
	"UDP":          17,
}

Functions

func IPRedirectKey

func IPRedirectKey(l3Proto L3Protocol, txIf string) string

IPRedirectKey returns key representing IP punt redirect configuration.

func ToHostKey

func ToHostKey(l3Proto L3Protocol, l4Proto L4Protocol, port uint32) string

ToHostKey returns key representing punt to host/socket configuration.

Types

type IPRedirect

type IPRedirect struct {
	L3Protocol           L3Protocol `protobuf:"varint,1,opt,name=l3_protocol,json=l3Protocol,proto3,enum=vpp.punt.L3Protocol" json:"l3_protocol,omitempty"`
	RxInterface          string     `protobuf:"bytes,2,opt,name=rx_interface,json=rxInterface,proto3" json:"rx_interface,omitempty"`
	TxInterface          string     `protobuf:"bytes,3,opt,name=tx_interface,json=txInterface,proto3" json:"tx_interface,omitempty"`
	NextHop              string     `protobuf:"bytes,4,opt,name=next_hop,json=nextHop,proto3" json:"next_hop,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

IPRedirect allows otherwise dropped packet which destination IP address matching some of the VPP addresses to redirect to the defined next hop address via the TX interface

func (*IPRedirect) Descriptor

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

func (*IPRedirect) GetL3Protocol

func (m *IPRedirect) GetL3Protocol() L3Protocol

func (*IPRedirect) GetNextHop

func (m *IPRedirect) GetNextHop() string

func (*IPRedirect) GetRxInterface

func (m *IPRedirect) GetRxInterface() string

func (*IPRedirect) GetTxInterface

func (m *IPRedirect) GetTxInterface() string

func (*IPRedirect) ProtoMessage

func (*IPRedirect) ProtoMessage()

func (*IPRedirect) Reset

func (m *IPRedirect) Reset()

func (*IPRedirect) String

func (m *IPRedirect) String() string

func (*IPRedirect) XXX_DiscardUnknown

func (m *IPRedirect) XXX_DiscardUnknown()

func (*IPRedirect) XXX_Marshal

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

func (*IPRedirect) XXX_Merge

func (dst *IPRedirect) XXX_Merge(src proto.Message)

func (*IPRedirect) XXX_MessageName

func (*IPRedirect) XXX_MessageName() string

func (*IPRedirect) XXX_Size

func (m *IPRedirect) XXX_Size() int

func (*IPRedirect) XXX_Unmarshal

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

type L3Protocol

type L3Protocol int32
const (
	L3Protocol_UNDEFINED_L3 L3Protocol = 0
	L3Protocol_IPv4         L3Protocol = 4
	L3Protocol_IPv6         L3Protocol = 6
	L3Protocol_ALL          L3Protocol = 10
)

func (L3Protocol) EnumDescriptor

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

func (L3Protocol) String

func (x L3Protocol) String() string

type L4Protocol

type L4Protocol int32
const (
	L4Protocol_UNDEFINED_L4 L4Protocol = 0
	L4Protocol_TCP          L4Protocol = 6
	L4Protocol_UDP          L4Protocol = 17
)

func (L4Protocol) EnumDescriptor

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

func (L4Protocol) String

func (x L4Protocol) String() string

type ToHost

type ToHost struct {
	L3Protocol           L3Protocol `protobuf:"varint,2,opt,name=l3_protocol,json=l3Protocol,proto3,enum=vpp.punt.L3Protocol" json:"l3_protocol,omitempty"`
	L4Protocol           L4Protocol `protobuf:"varint,3,opt,name=l4_protocol,json=l4Protocol,proto3,enum=vpp.punt.L4Protocol" json:"l4_protocol,omitempty"`
	Port                 uint32     `protobuf:"varint,4,opt,name=port,proto3" json:"port,omitempty"`
	SocketPath           string     `protobuf:"bytes,5,opt,name=socket_path,json=socketPath,proto3" json:"socket_path,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

allows otherwise dropped packet which destination IP address matching some of the VPP interface IP addresses to be punted to the host. L3 and L4 protocols can be used for filtering

func (*ToHost) Descriptor

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

func (*ToHost) GetL3Protocol

func (m *ToHost) GetL3Protocol() L3Protocol

func (*ToHost) GetL4Protocol

func (m *ToHost) GetL4Protocol() L4Protocol

func (*ToHost) GetPort

func (m *ToHost) GetPort() uint32

func (*ToHost) GetSocketPath

func (m *ToHost) GetSocketPath() string

func (*ToHost) ProtoMessage

func (*ToHost) ProtoMessage()

func (*ToHost) Reset

func (m *ToHost) Reset()

func (*ToHost) String

func (m *ToHost) String() string

func (*ToHost) XXX_DiscardUnknown

func (m *ToHost) XXX_DiscardUnknown()

func (*ToHost) XXX_Marshal

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

func (*ToHost) XXX_Merge

func (dst *ToHost) XXX_Merge(src proto.Message)

func (*ToHost) XXX_MessageName

func (*ToHost) XXX_MessageName() string

func (*ToHost) XXX_Size

func (m *ToHost) XXX_Size() int

func (*ToHost) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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