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 = 0x56bd3b73
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 "e4d4ebfa" }
42 func (*IoamExportIP6EnableDisable) GetMessageType() api.MessageType {
43 return api.RequestMessage
46 func (m *IoamExportIP6EnableDisable) Size() int {
51 size += 1 // m.IsDisable
52 size += 1 * 4 // m.CollectorAddress
53 size += 1 * 4 // m.SrcAddress
56 func (m *IoamExportIP6EnableDisable) Marshal(b []byte) ([]byte, error) {
59 buf = codec.NewBuffer(make([]byte, m.Size()))
61 buf = codec.NewBuffer(b)
63 buf.EncodeBool(m.IsDisable)
64 buf.EncodeBytes(m.CollectorAddress[:], 4)
65 buf.EncodeBytes(m.SrcAddress[:], 4)
66 return buf.Bytes(), nil
68 func (m *IoamExportIP6EnableDisable) Unmarshal(b []byte) error {
69 buf := codec.NewBuffer(b)
70 m.IsDisable = buf.DecodeBool()
71 copy(m.CollectorAddress[:], buf.DecodeBytes(4))
72 copy(m.SrcAddress[:], buf.DecodeBytes(4))
76 // IoamExportIP6EnableDisableReply defines message 'ioam_export_ip6_enable_disable_reply'.
77 type IoamExportIP6EnableDisableReply struct {
78 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
81 func (m *IoamExportIP6EnableDisableReply) Reset() { *m = IoamExportIP6EnableDisableReply{} }
82 func (*IoamExportIP6EnableDisableReply) GetMessageName() string {
83 return "ioam_export_ip6_enable_disable_reply"
85 func (*IoamExportIP6EnableDisableReply) GetCrcString() string { return "e8d4e804" }
86 func (*IoamExportIP6EnableDisableReply) GetMessageType() api.MessageType {
87 return api.ReplyMessage
90 func (m *IoamExportIP6EnableDisableReply) Size() int {
98 func (m *IoamExportIP6EnableDisableReply) Marshal(b []byte) ([]byte, error) {
101 buf = codec.NewBuffer(make([]byte, m.Size()))
103 buf = codec.NewBuffer(b)
105 buf.EncodeUint32(uint32(m.Retval))
106 return buf.Bytes(), nil
108 func (m *IoamExportIP6EnableDisableReply) Unmarshal(b []byte) error {
109 buf := codec.NewBuffer(b)
110 m.Retval = int32(buf.DecodeUint32())
114 func init() { file_ioam_export_binapi_init() }
115 func file_ioam_export_binapi_init() {
116 api.RegisterMessage((*IoamExportIP6EnableDisable)(nil), "ioam_export_ip6_enable_disable_e4d4ebfa")
117 api.RegisterMessage((*IoamExportIP6EnableDisableReply)(nil), "ioam_export_ip6_enable_disable_reply_e8d4e804")
120 // Messages returns list of all messages in this module.
121 func AllMessages() []api.Message {
122 return []api.Message{
123 (*IoamExportIP6EnableDisable)(nil),
124 (*IoamExportIP6EnableDisableReply)(nil),