1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
5 // source: /usr/share/vpp/api/plugins/ioam_export.api.json
7 // Package ioam_export contains generated bindings for API file ioam_export.api.
15 api "git.fd.io/govpp.git/api"
16 ip_types "git.fd.io/govpp.git/binapi/ip_types"
17 codec "git.fd.io/govpp.git/codec"
20 // This is a compile-time assertion to ensure that this generated file
21 // is compatible with the GoVPP api package it is being compiled against.
22 // A compilation error at this line likely means your copy of the
23 // GoVPP api package needs to be updated.
24 const _ = api.GoVppAPIPackageIsVersion2
27 APIFile = "ioam_export"
29 VersionCrc = 0x26bebf64
32 // IoamExportIP6EnableDisable defines message 'ioam_export_ip6_enable_disable'.
33 type IoamExportIP6EnableDisable struct {
34 IsDisable bool `binapi:"bool,name=is_disable" json:"is_disable,omitempty"`
35 CollectorAddress ip_types.IP4Address `binapi:"ip4_address,name=collector_address" json:"collector_address,omitempty"`
36 SrcAddress ip_types.IP4Address `binapi:"ip4_address,name=src_address" json:"src_address,omitempty"`
39 func (m *IoamExportIP6EnableDisable) Reset() { *m = IoamExportIP6EnableDisable{} }
40 func (*IoamExportIP6EnableDisable) GetMessageName() string { return "ioam_export_ip6_enable_disable" }
41 func (*IoamExportIP6EnableDisable) GetCrcString() string { return "d4c76d3a" }
42 func (*IoamExportIP6EnableDisable) GetMessageType() api.MessageType {
43 return api.RequestMessage
46 func (m *IoamExportIP6EnableDisable) Size() (size int) {
50 size += 1 // m.IsDisable
51 size += 1 * 4 // m.CollectorAddress
52 size += 1 * 4 // m.SrcAddress
55 func (m *IoamExportIP6EnableDisable) Marshal(b []byte) ([]byte, error) {
57 b = make([]byte, m.Size())
59 buf := codec.NewBuffer(b)
60 buf.EncodeBool(m.IsDisable)
61 buf.EncodeBytes(m.CollectorAddress[:], 4)
62 buf.EncodeBytes(m.SrcAddress[:], 4)
63 return buf.Bytes(), nil
65 func (m *IoamExportIP6EnableDisable) Unmarshal(b []byte) error {
66 buf := codec.NewBuffer(b)
67 m.IsDisable = buf.DecodeBool()
68 copy(m.CollectorAddress[:], buf.DecodeBytes(4))
69 copy(m.SrcAddress[:], buf.DecodeBytes(4))
73 // IoamExportIP6EnableDisableReply defines message 'ioam_export_ip6_enable_disable_reply'.
74 type IoamExportIP6EnableDisableReply struct {
75 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
78 func (m *IoamExportIP6EnableDisableReply) Reset() { *m = IoamExportIP6EnableDisableReply{} }
79 func (*IoamExportIP6EnableDisableReply) GetMessageName() string {
80 return "ioam_export_ip6_enable_disable_reply"
82 func (*IoamExportIP6EnableDisableReply) GetCrcString() string { return "e8d4e804" }
83 func (*IoamExportIP6EnableDisableReply) GetMessageType() api.MessageType {
84 return api.ReplyMessage
87 func (m *IoamExportIP6EnableDisableReply) Size() (size int) {
94 func (m *IoamExportIP6EnableDisableReply) Marshal(b []byte) ([]byte, error) {
96 b = make([]byte, m.Size())
98 buf := codec.NewBuffer(b)
99 buf.EncodeInt32(m.Retval)
100 return buf.Bytes(), nil
102 func (m *IoamExportIP6EnableDisableReply) Unmarshal(b []byte) error {
103 buf := codec.NewBuffer(b)
104 m.Retval = buf.DecodeInt32()
108 func init() { file_ioam_export_binapi_init() }
109 func file_ioam_export_binapi_init() {
110 api.RegisterMessage((*IoamExportIP6EnableDisable)(nil), "ioam_export_ip6_enable_disable_d4c76d3a")
111 api.RegisterMessage((*IoamExportIP6EnableDisableReply)(nil), "ioam_export_ip6_enable_disable_reply_e8d4e804")
114 // Messages returns list of all messages in this module.
115 func AllMessages() []api.Message {
116 return []api.Message{
117 (*IoamExportIP6EnableDisable)(nil),
118 (*IoamExportIP6EnableDisableReply)(nil),