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/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() int {
48 size += 1 // m.EnableDisable
51 func (m *CdpEnableDisable) Marshal(b []byte) ([]byte, error) {
54 buf = codec.NewBuffer(make([]byte, m.Size()))
56 buf = codec.NewBuffer(b)
58 buf.EncodeBool(m.EnableDisable)
59 return buf.Bytes(), nil
61 func (m *CdpEnableDisable) Unmarshal(b []byte) error {
62 buf := codec.NewBuffer(b)
63 m.EnableDisable = buf.DecodeBool()
67 // CdpEnableDisableReply defines message 'cdp_enable_disable_reply'.
68 type CdpEnableDisableReply struct {
69 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
72 func (m *CdpEnableDisableReply) Reset() { *m = CdpEnableDisableReply{} }
73 func (*CdpEnableDisableReply) GetMessageName() string { return "cdp_enable_disable_reply" }
74 func (*CdpEnableDisableReply) GetCrcString() string { return "e8d4e804" }
75 func (*CdpEnableDisableReply) GetMessageType() api.MessageType {
76 return api.ReplyMessage
79 func (m *CdpEnableDisableReply) Size() int {
87 func (m *CdpEnableDisableReply) Marshal(b []byte) ([]byte, error) {
90 buf = codec.NewBuffer(make([]byte, m.Size()))
92 buf = codec.NewBuffer(b)
94 buf.EncodeUint32(uint32(m.Retval))
95 return buf.Bytes(), nil
97 func (m *CdpEnableDisableReply) Unmarshal(b []byte) error {
98 buf := codec.NewBuffer(b)
99 m.Retval = int32(buf.DecodeUint32())
103 func init() { file_cdp_binapi_init() }
104 func file_cdp_binapi_init() {
105 api.RegisterMessage((*CdpEnableDisable)(nil), "cdp_enable_disable_2e7b47df")
106 api.RegisterMessage((*CdpEnableDisableReply)(nil), "cdp_enable_disable_reply_e8d4e804")
109 // Messages returns list of all messages in this module.
110 func AllMessages() []api.Message {
111 return []api.Message{
112 (*CdpEnableDisable)(nil),
113 (*CdpEnableDisableReply)(nil),