codec

package
v0.0.0-...-56e997f Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package codec provides methods allowing to encode and decode message structs to/from binary format accepted by VPP.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MsgCodec

type MsgCodec struct{}

MsgCodec provides encoding and decoding functionality of `api.Message` structs into/from binary format as accepted by VPP.

func (*MsgCodec) DecodeMsg

func (*MsgCodec) DecodeMsg(data []byte, msg api.Message) error

DecodeMsg decodes binary-encoded data of a message into provided `Message` structure.

func (*MsgCodec) DecodeMsgContext

func (*MsgCodec) DecodeMsgContext(data []byte, msg api.Message) (uint32, error)

func (*MsgCodec) EncodeMsg

func (*MsgCodec) EncodeMsg(msg api.Message, msgID uint16) (data []byte, err error)

EncodeMsg encodes provided `Message` structure into its binary-encoded data representation.

type VppEventHeader

type VppEventHeader struct {
	VlMsgID     uint16
	ClientIndex uint32
}

VppEventHeader struct contains header fields implemented by all VPP events.

type VppOtherHeader

type VppOtherHeader struct {
	VlMsgID uint16
}

VppOtherHeader struct contains header fields implemented by other VPP messages (not requests nor replies).

type VppReplyHeader

type VppReplyHeader struct {
	VlMsgID uint16
	Context uint32
}

VppReplyHeader struct contains header fields implemented by all VPP replies.

type VppRequestHeader

type VppRequestHeader struct {
	VlMsgID     uint16
	ClientIndex uint32
	Context     uint32
}

VppRequestHeader struct contains header fields implemented by all VPP requests.

Jump to

Keyboard shortcuts

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