1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0
5 // source: /usr/share/vpp/api/plugins/cdp.api.json
7 // Package cdp contains generated bindings for API file cdp.api.
15 api "git.fd.io/govpp.git/api"
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
28 VersionCrc = 0x8cfa825e
31 // CdpEnableDisable defines message 'cdp_enable_disable'.
32 type CdpEnableDisable struct {
33 EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
36 func (m *CdpEnableDisable) Reset() { *m = CdpEnableDisable{} }
37 func (*CdpEnableDisable) GetMessageName() string { return "cdp_enable_disable" }
38 func (*CdpEnableDisable) GetCrcString() string { return "2e7b47df" }
39 func (*CdpEnableDisable) GetMessageType() api.MessageType {
40 return api.RequestMessage
43 func (m *CdpEnableDisable) Size() (size int) {
47 size += 1 // m.EnableDisable
50 func (m *CdpEnableDisable) Marshal(b []byte) ([]byte, error) {
52 b = make([]byte, m.Size())
54 buf := codec.NewBuffer(b)
55 buf.EncodeBool(m.EnableDisable)
56 return buf.Bytes(), nil
58 func (m *CdpEnableDisable) Unmarshal(b []byte) error {
59 buf := codec.NewBuffer(b)
60 m.EnableDisable = buf.DecodeBool()
64 // CdpEnableDisableReply defines message 'cdp_enable_disable_reply'.
65 type CdpEnableDisableReply struct {
66 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
69 func (m *CdpEnableDisableReply) Reset() { *m = CdpEnableDisableReply{} }
70 func (*CdpEnableDisableReply) GetMessageName() string { return "cdp_enable_disable_reply" }
71 func (*CdpEnableDisableReply) GetCrcString() string { return "e8d4e804" }
72 func (*CdpEnableDisableReply) GetMessageType() api.MessageType {
73 return api.ReplyMessage
76 func (m *CdpEnableDisableReply) Size() (size int) {
83 func (m *CdpEnableDisableReply) Marshal(b []byte) ([]byte, error) {
85 b = make([]byte, m.Size())
87 buf := codec.NewBuffer(b)
88 buf.EncodeInt32(m.Retval)
89 return buf.Bytes(), nil
91 func (m *CdpEnableDisableReply) Unmarshal(b []byte) error {
92 buf := codec.NewBuffer(b)
93 m.Retval = buf.DecodeInt32()
97 func init() { file_cdp_binapi_init() }
98 func file_cdp_binapi_init() {
99 api.RegisterMessage((*CdpEnableDisable)(nil), "cdp_enable_disable_2e7b47df")
100 api.RegisterMessage((*CdpEnableDisableReply)(nil), "cdp_enable_disable_reply_e8d4e804")
103 // Messages returns list of all messages in this module.
104 func AllMessages() []api.Message {
105 return []api.Message{
106 (*CdpEnableDisable)(nil),
107 (*CdpEnableDisableReply)(nil),