github.com/edwarnicke/govpp@v0.0.0-20230130211138-14ef5d20b1d0/binapi/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export.ba.go (about) 1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT. 2 // versions: 3 // binapi-generator: v0.4.0-dev 4 // VPP: 23.02-rc0~189-g57127b32a 5 // source: /usr/share/vpp/api/plugins/vxlan_gpe_ioam_export.api.json 6 7 // Package vxlan_gpe_ioam_export contains generated bindings for API file vxlan_gpe_ioam_export.api. 8 // 9 // Contents: 10 // 2 messages 11 // 12 package vxlan_gpe_ioam_export 13 14 import ( 15 api "git.fd.io/govpp.git/api" 16 codec "git.fd.io/govpp.git/codec" 17 ip_types "github.com/edwarnicke/govpp/binapi/ip_types" 18 ) 19 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 25 26 const ( 27 APIFile = "vxlan_gpe_ioam_export" 28 APIVersion = "1.0.0" 29 VersionCrc = 0x26bebf64 30 ) 31 32 // VxlanGpeIoamExportEnableDisable defines message 'vxlan_gpe_ioam_export_enable_disable'. 33 type VxlanGpeIoamExportEnableDisable 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"` 37 } 38 39 func (m *VxlanGpeIoamExportEnableDisable) Reset() { *m = VxlanGpeIoamExportEnableDisable{} } 40 func (*VxlanGpeIoamExportEnableDisable) GetMessageName() string { 41 return "vxlan_gpe_ioam_export_enable_disable" 42 } 43 func (*VxlanGpeIoamExportEnableDisable) GetCrcString() string { return "d4c76d3a" } 44 func (*VxlanGpeIoamExportEnableDisable) GetMessageType() api.MessageType { 45 return api.RequestMessage 46 } 47 48 func (m *VxlanGpeIoamExportEnableDisable) Size() (size int) { 49 if m == nil { 50 return 0 51 } 52 size += 1 // m.IsDisable 53 size += 1 * 4 // m.CollectorAddress 54 size += 1 * 4 // m.SrcAddress 55 return size 56 } 57 func (m *VxlanGpeIoamExportEnableDisable) Marshal(b []byte) ([]byte, error) { 58 if b == nil { 59 b = make([]byte, m.Size()) 60 } 61 buf := codec.NewBuffer(b) 62 buf.EncodeBool(m.IsDisable) 63 buf.EncodeBytes(m.CollectorAddress[:], 4) 64 buf.EncodeBytes(m.SrcAddress[:], 4) 65 return buf.Bytes(), nil 66 } 67 func (m *VxlanGpeIoamExportEnableDisable) Unmarshal(b []byte) error { 68 buf := codec.NewBuffer(b) 69 m.IsDisable = buf.DecodeBool() 70 copy(m.CollectorAddress[:], buf.DecodeBytes(4)) 71 copy(m.SrcAddress[:], buf.DecodeBytes(4)) 72 return nil 73 } 74 75 // VxlanGpeIoamExportEnableDisableReply defines message 'vxlan_gpe_ioam_export_enable_disable_reply'. 76 type VxlanGpeIoamExportEnableDisableReply struct { 77 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 78 } 79 80 func (m *VxlanGpeIoamExportEnableDisableReply) Reset() { *m = VxlanGpeIoamExportEnableDisableReply{} } 81 func (*VxlanGpeIoamExportEnableDisableReply) GetMessageName() string { 82 return "vxlan_gpe_ioam_export_enable_disable_reply" 83 } 84 func (*VxlanGpeIoamExportEnableDisableReply) GetCrcString() string { return "e8d4e804" } 85 func (*VxlanGpeIoamExportEnableDisableReply) GetMessageType() api.MessageType { 86 return api.ReplyMessage 87 } 88 89 func (m *VxlanGpeIoamExportEnableDisableReply) Size() (size int) { 90 if m == nil { 91 return 0 92 } 93 size += 4 // m.Retval 94 return size 95 } 96 func (m *VxlanGpeIoamExportEnableDisableReply) Marshal(b []byte) ([]byte, error) { 97 if b == nil { 98 b = make([]byte, m.Size()) 99 } 100 buf := codec.NewBuffer(b) 101 buf.EncodeInt32(m.Retval) 102 return buf.Bytes(), nil 103 } 104 func (m *VxlanGpeIoamExportEnableDisableReply) Unmarshal(b []byte) error { 105 buf := codec.NewBuffer(b) 106 m.Retval = buf.DecodeInt32() 107 return nil 108 } 109 110 func init() { file_vxlan_gpe_ioam_export_binapi_init() } 111 func file_vxlan_gpe_ioam_export_binapi_init() { 112 api.RegisterMessage((*VxlanGpeIoamExportEnableDisable)(nil), "vxlan_gpe_ioam_export_enable_disable_d4c76d3a") 113 api.RegisterMessage((*VxlanGpeIoamExportEnableDisableReply)(nil), "vxlan_gpe_ioam_export_enable_disable_reply_e8d4e804") 114 } 115 116 // Messages returns list of all messages in this module. 117 func AllMessages() []api.Message { 118 return []api.Message{ 119 (*VxlanGpeIoamExportEnableDisable)(nil), 120 (*VxlanGpeIoamExportEnableDisableReply)(nil), 121 } 122 }