udp

package
v0.9.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package udp contains generated bindings for API file udp.api.

Contents: - 1 enum - 2 structs - 8 messages

Index

Constants

View Source
const (
	APIFile    = "udp"
	APIVersion = "1.1.0"
	VersionCrc = 0x6804c5af
)

Variables

View Source
var (
	UDPDecapNextProto_name = map[uint32]string{
		0: "UDP_API_DECAP_PROTO_IP4",
		1: "UDP_API_DECAP_PROTO_IP6",
		2: "UDP_API_DECAP_PROTO_MPLS",
	}
	UDPDecapNextProto_value = map[string]uint32{
		"UDP_API_DECAP_PROTO_IP4":  0,
		"UDP_API_DECAP_PROTO_IP6":  1,
		"UDP_API_DECAP_PROTO_MPLS": 2,
	}
)

Functions

func AllMessages

func AllMessages() []api.Message

Messages returns list of all messages in this module.

Types

type RPCService

type RPCService interface {
	UDPDecapAddDel(ctx context.Context, in *UDPDecapAddDel) (*UDPDecapAddDelReply, error)
	UDPEncapAdd(ctx context.Context, in *UDPEncapAdd) (*UDPEncapAddReply, error)
	UDPEncapDel(ctx context.Context, in *UDPEncapDel) (*UDPEncapDelReply, error)
	UDPEncapDump(ctx context.Context, in *UDPEncapDump) (RPCService_UDPEncapDumpClient, error)
}

RPCService defines RPC service udp.

func NewServiceClient

func NewServiceClient(conn api.Connection) RPCService

type RPCService_UDPEncapDumpClient

type RPCService_UDPEncapDumpClient interface {
	Recv() (*UDPEncapDetails, error)
	api.Stream
}

type UDPDecap

type UDPDecap struct {
	IsIP4     uint8             `binapi:"u8,name=is_ip4" json:"is_ip4,omitempty"`
	Port      uint16            `binapi:"u16,name=port" json:"port,omitempty"`
	NextProto UDPDecapNextProto `binapi:"udp_decap_next_proto,name=next_proto" json:"next_proto,omitempty"`
}

UDPDecap defines type 'udp_decap'.

type UDPDecapAddDel

type UDPDecapAddDel struct {
	IsAdd    bool     `binapi:"bool,name=is_add" json:"is_add,omitempty"`
	UDPDecap UDPDecap `binapi:"udp_decap,name=udp_decap" json:"udp_decap,omitempty"`
}

* @brief Add/Del UDP decap

  • - is_add - add decap if non-zero, else delete
  • - udp_decap - UDP decap description

UDPDecapAddDel defines message 'udp_decap_add_del'.

func (*UDPDecapAddDel) GetCrcString

func (*UDPDecapAddDel) GetCrcString() string

func (*UDPDecapAddDel) GetMessageName

func (*UDPDecapAddDel) GetMessageName() string

func (*UDPDecapAddDel) GetMessageType

func (*UDPDecapAddDel) GetMessageType() api.MessageType

func (*UDPDecapAddDel) Marshal

func (m *UDPDecapAddDel) Marshal(b []byte) ([]byte, error)

func (*UDPDecapAddDel) Reset

func (m *UDPDecapAddDel) Reset()

func (*UDPDecapAddDel) Size

func (m *UDPDecapAddDel) Size() (size int)

func (*UDPDecapAddDel) Unmarshal

func (m *UDPDecapAddDel) Unmarshal(b []byte) error

type UDPDecapAddDelReply

type UDPDecapAddDelReply struct {
	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}

UDPDecapAddDelReply defines message 'udp_decap_add_del_reply'.

func (*UDPDecapAddDelReply) GetCrcString

func (*UDPDecapAddDelReply) GetCrcString() string

func (*UDPDecapAddDelReply) GetMessageName

func (*UDPDecapAddDelReply) GetMessageName() string

func (*UDPDecapAddDelReply) GetMessageType

func (*UDPDecapAddDelReply) GetMessageType() api.MessageType

func (*UDPDecapAddDelReply) Marshal

func (m *UDPDecapAddDelReply) Marshal(b []byte) ([]byte, error)

func (*UDPDecapAddDelReply) Reset

func (m *UDPDecapAddDelReply) Reset()

func (*UDPDecapAddDelReply) Size

func (m *UDPDecapAddDelReply) Size() (size int)

func (*UDPDecapAddDelReply) Unmarshal

func (m *UDPDecapAddDelReply) Unmarshal(b []byte) error

type UDPDecapNextProto

type UDPDecapNextProto uint32

UDPDecapNextProto defines enum 'udp_decap_next_proto'.

const (
	UDP_API_DECAP_PROTO_IP4  UDPDecapNextProto = 0
	UDP_API_DECAP_PROTO_IP6  UDPDecapNextProto = 1
	UDP_API_DECAP_PROTO_MPLS UDPDecapNextProto = 2
)

func (UDPDecapNextProto) String

func (x UDPDecapNextProto) String() string

type UDPEncap

type UDPEncap struct {
	TableID uint32           `binapi:"u32,name=table_id" json:"table_id,omitempty"`
	SrcPort uint16           `binapi:"u16,name=src_port" json:"src_port,omitempty"`
	DstPort uint16           `binapi:"u16,name=dst_port" json:"dst_port,omitempty"`
	SrcIP   ip_types.Address `binapi:"address,name=src_ip" json:"src_ip,omitempty"`
	DstIP   ip_types.Address `binapi:"address,name=dst_ip" json:"dst_ip,omitempty"`
	ID      uint32           `binapi:"u32,name=id" json:"id,omitempty"`
}

UDPEncap defines type 'udp_encap'.

type UDPEncapAdd

type UDPEncapAdd struct {
	UDPEncap UDPEncap `binapi:"udp_encap,name=udp_encap" json:"udp_encap,omitempty"`
}

* @brief Add UDP encap

  • - udp_encap - UDP encap description

UDPEncapAdd defines message 'udp_encap_add'.

func (*UDPEncapAdd) GetCrcString

func (*UDPEncapAdd) GetCrcString() string

func (*UDPEncapAdd) GetMessageName

func (*UDPEncapAdd) GetMessageName() string

func (*UDPEncapAdd) GetMessageType

func (*UDPEncapAdd) GetMessageType() api.MessageType

func (*UDPEncapAdd) Marshal

func (m *UDPEncapAdd) Marshal(b []byte) ([]byte, error)

func (*UDPEncapAdd) Reset

func (m *UDPEncapAdd) Reset()

func (*UDPEncapAdd) Size

func (m *UDPEncapAdd) Size() (size int)

func (*UDPEncapAdd) Unmarshal

func (m *UDPEncapAdd) Unmarshal(b []byte) error

type UDPEncapAddReply

type UDPEncapAddReply struct {
	Retval int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
	ID     uint32 `binapi:"u32,name=id" json:"id,omitempty"`
}

* @brief Add UDP encap reply

  • - retval - success/failure return value
  • - id - The ID of the encap object that should be used on delete
  • and when reading stats from the stats segment.

UDPEncapAddReply defines message 'udp_encap_add_reply'.

func (*UDPEncapAddReply) GetCrcString

func (*UDPEncapAddReply) GetCrcString() string

func (*UDPEncapAddReply) GetMessageName

func (*UDPEncapAddReply) GetMessageName() string

func (*UDPEncapAddReply) GetMessageType

func (*UDPEncapAddReply) GetMessageType() api.MessageType

func (*UDPEncapAddReply) Marshal

func (m *UDPEncapAddReply) Marshal(b []byte) ([]byte, error)

func (*UDPEncapAddReply) Reset

func (m *UDPEncapAddReply) Reset()

func (*UDPEncapAddReply) Size

func (m *UDPEncapAddReply) Size() (size int)

func (*UDPEncapAddReply) Unmarshal

func (m *UDPEncapAddReply) Unmarshal(b []byte) error

type UDPEncapDel

type UDPEncapDel struct {
	ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
}

* @brief Del UDP encap

  • - id - ID of the encap object the client chose during the add

UDPEncapDel defines message 'udp_encap_del'.

func (*UDPEncapDel) GetCrcString

func (*UDPEncapDel) GetCrcString() string

func (*UDPEncapDel) GetMessageName

func (*UDPEncapDel) GetMessageName() string

func (*UDPEncapDel) GetMessageType

func (*UDPEncapDel) GetMessageType() api.MessageType

func (*UDPEncapDel) Marshal

func (m *UDPEncapDel) Marshal(b []byte) ([]byte, error)

func (*UDPEncapDel) Reset

func (m *UDPEncapDel) Reset()

func (*UDPEncapDel) Size

func (m *UDPEncapDel) Size() (size int)

func (*UDPEncapDel) Unmarshal

func (m *UDPEncapDel) Unmarshal(b []byte) error

type UDPEncapDelReply

type UDPEncapDelReply struct {
	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}

UDPEncapDelReply defines message 'udp_encap_del_reply'.

func (*UDPEncapDelReply) GetCrcString

func (*UDPEncapDelReply) GetCrcString() string

func (*UDPEncapDelReply) GetMessageName

func (*UDPEncapDelReply) GetMessageName() string

func (*UDPEncapDelReply) GetMessageType

func (*UDPEncapDelReply) GetMessageType() api.MessageType

func (*UDPEncapDelReply) Marshal

func (m *UDPEncapDelReply) Marshal(b []byte) ([]byte, error)

func (*UDPEncapDelReply) Reset

func (m *UDPEncapDelReply) Reset()

func (*UDPEncapDelReply) Size

func (m *UDPEncapDelReply) Size() (size int)

func (*UDPEncapDelReply) Unmarshal

func (m *UDPEncapDelReply) Unmarshal(b []byte) error

type UDPEncapDetails

type UDPEncapDetails struct {
	UDPEncap UDPEncap `binapi:"udp_encap,name=udp_encap" json:"udp_encap,omitempty"`
}

* @brief UDP encap details during dump UDPEncapDetails defines message 'udp_encap_details'.

func (*UDPEncapDetails) GetCrcString

func (*UDPEncapDetails) GetCrcString() string

func (*UDPEncapDetails) GetMessageName

func (*UDPEncapDetails) GetMessageName() string

func (*UDPEncapDetails) GetMessageType

func (*UDPEncapDetails) GetMessageType() api.MessageType

func (*UDPEncapDetails) Marshal

func (m *UDPEncapDetails) Marshal(b []byte) ([]byte, error)

func (*UDPEncapDetails) Reset

func (m *UDPEncapDetails) Reset()

func (*UDPEncapDetails) Size

func (m *UDPEncapDetails) Size() (size int)

func (*UDPEncapDetails) Unmarshal

func (m *UDPEncapDetails) Unmarshal(b []byte) error

type UDPEncapDump

type UDPEncapDump struct{}

* @brief dump UDP encaps UDPEncapDump defines message 'udp_encap_dump'.

func (*UDPEncapDump) GetCrcString

func (*UDPEncapDump) GetCrcString() string

func (*UDPEncapDump) GetMessageName

func (*UDPEncapDump) GetMessageName() string

func (*UDPEncapDump) GetMessageType

func (*UDPEncapDump) GetMessageType() api.MessageType

func (*UDPEncapDump) Marshal

func (m *UDPEncapDump) Marshal(b []byte) ([]byte, error)

func (*UDPEncapDump) Reset

func (m *UDPEncapDump) Reset()

func (*UDPEncapDump) Size

func (m *UDPEncapDump) Size() (size int)

func (*UDPEncapDump) Unmarshal

func (m *UDPEncapDump) Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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