1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
6 // Package ioam_export contains generated bindings for API file ioam_export.api.
14 api "git.fd.io/govpp.git/api"
15 ip_types "git.fd.io/govpp.git/binapi/ip_types"
16 codec "git.fd.io/govpp.git/codec"
19 // This is a compile-time assertion to ensure that this generated file
20 // is compatible with the GoVPP api package it is being compiled against.
21 // A compilation error at this line likely means your copy of the
22 // GoVPP api package needs to be updated.
23 const _ = api.GoVppAPIPackageIsVersion2
26 APIFile = "ioam_export"
28 VersionCrc = 0x56bd3b73
31 // IoamExportIP6EnableDisable defines message 'ioam_export_ip6_enable_disable'.
32 type IoamExportIP6EnableDisable struct {
33 IsDisable bool `binapi:"bool,name=is_disable" json:"is_disable,omitempty"`
34 CollectorAddress ip_types.IP4Address `binapi:"ip4_address,name=collector_address" json:"collector_address,omitempty"`
35 SrcAddress ip_types.IP4Address `binapi:"ip4_address,name=src_address" json:"src_address,omitempty"`
38 func (m *IoamExportIP6EnableDisable) Reset() { *m = IoamExportIP6EnableDisable{} }
39 func (*IoamExportIP6EnableDisable) GetMessageName() string { return "ioam_export_ip6_enable_disable" }
40 func (*IoamExportIP6EnableDisable) GetCrcString() string { return "e4d4ebfa" }
41 func (*IoamExportIP6EnableDisable) GetMessageType() api.MessageType {
42 return api.RequestMessage
45 func (m *IoamExportIP6EnableDisable) Size() (size int) {
49 size += 1 // m.IsDisable
50 size += 1 * 4 // m.CollectorAddress
51 size += 1 * 4 // m.SrcAddress
54 func (m *IoamExportIP6EnableDisable) Marshal(b []byte) ([]byte, error) {
56 b = make([]byte, m.Size())
58 buf := codec.NewBuffer(b)
59 buf.EncodeBool(m.IsDisable)
60 buf.EncodeBytes(m.CollectorAddress[:], 4)
61 buf.EncodeBytes(m.SrcAddress[:], 4)
62 return buf.Bytes(), nil
64 func (m *IoamExportIP6EnableDisable) Unmarshal(b []byte) error {
65 buf := codec.NewBuffer(b)
66 m.IsDisable = buf.DecodeBool()
67 copy(m.CollectorAddress[:], buf.DecodeBytes(4))
68 copy(m.SrcAddress[:], buf.DecodeBytes(4))
72 // IoamExportIP6EnableDisableReply defines message 'ioam_export_ip6_enable_disable_reply'.
73 type IoamExportIP6EnableDisableReply struct {
74 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
77 func (m *IoamExportIP6EnableDisableReply) Reset() { *m = IoamExportIP6EnableDisableReply{} }
78 func (*IoamExportIP6EnableDisableReply) GetMessageName() string {
79 return "ioam_export_ip6_enable_disable_reply"
81 func (*IoamExportIP6EnableDisableReply) GetCrcString() string { return "e8d4e804" }
82 func (*IoamExportIP6EnableDisableReply) GetMessageType() api.MessageType {
83 return api.ReplyMessage
86 func (m *IoamExportIP6EnableDisableReply) Size() (size int) {
93 func (m *IoamExportIP6EnableDisableReply) Marshal(b []byte) ([]byte, error) {
95 b = make([]byte, m.Size())
97 buf := codec.NewBuffer(b)
98 buf.EncodeInt32(m.Retval)
99 return buf.Bytes(), nil
101 func (m *IoamExportIP6EnableDisableReply) Unmarshal(b []byte) error {
102 buf := codec.NewBuffer(b)
103 m.Retval = buf.DecodeInt32()
107 func init() { file_ioam_export_binapi_init() }
108 func file_ioam_export_binapi_init() {
109 api.RegisterMessage((*IoamExportIP6EnableDisable)(nil), "ioam_export_ip6_enable_disable_e4d4ebfa")
110 api.RegisterMessage((*IoamExportIP6EnableDisableReply)(nil), "ioam_export_ip6_enable_disable_reply_e8d4e804")
113 // Messages returns list of all messages in this module.
114 func AllMessages() []api.Message {
115 return []api.Message{
116 (*IoamExportIP6EnableDisable)(nil),
117 (*IoamExportIP6EnableDisableReply)(nil),