1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
6 // Package cdp contains generated bindings for API file cdp.api.
14 api "git.fd.io/govpp.git/api"
15 codec "git.fd.io/govpp.git/codec"
18 // This is a compile-time assertion to ensure that this generated file
19 // is compatible with the GoVPP api package it is being compiled against.
20 // A compilation error at this line likely means your copy of the
21 // GoVPP api package needs to be updated.
22 const _ = api.GoVppAPIPackageIsVersion2
27 VersionCrc = 0x8cfa825e
30 // CdpEnableDisable defines message 'cdp_enable_disable'.
31 type CdpEnableDisable struct {
32 EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
35 func (m *CdpEnableDisable) Reset() { *m = CdpEnableDisable{} }
36 func (*CdpEnableDisable) GetMessageName() string { return "cdp_enable_disable" }
37 func (*CdpEnableDisable) GetCrcString() string { return "2e7b47df" }
38 func (*CdpEnableDisable) GetMessageType() api.MessageType {
39 return api.RequestMessage
42 func (m *CdpEnableDisable) Size() (size int) {
46 size += 1 // m.EnableDisable
49 func (m *CdpEnableDisable) Marshal(b []byte) ([]byte, error) {
51 b = make([]byte, m.Size())
53 buf := codec.NewBuffer(b)
54 buf.EncodeBool(m.EnableDisable)
55 return buf.Bytes(), nil
57 func (m *CdpEnableDisable) Unmarshal(b []byte) error {
58 buf := codec.NewBuffer(b)
59 m.EnableDisable = buf.DecodeBool()
63 // CdpEnableDisableReply defines message 'cdp_enable_disable_reply'.
64 type CdpEnableDisableReply struct {
65 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
68 func (m *CdpEnableDisableReply) Reset() { *m = CdpEnableDisableReply{} }
69 func (*CdpEnableDisableReply) GetMessageName() string { return "cdp_enable_disable_reply" }
70 func (*CdpEnableDisableReply) GetCrcString() string { return "e8d4e804" }
71 func (*CdpEnableDisableReply) GetMessageType() api.MessageType {
72 return api.ReplyMessage
75 func (m *CdpEnableDisableReply) Size() (size int) {
82 func (m *CdpEnableDisableReply) Marshal(b []byte) ([]byte, error) {
84 b = make([]byte, m.Size())
86 buf := codec.NewBuffer(b)
87 buf.EncodeInt32(m.Retval)
88 return buf.Bytes(), nil
90 func (m *CdpEnableDisableReply) Unmarshal(b []byte) error {
91 buf := codec.NewBuffer(b)
92 m.Retval = buf.DecodeInt32()
96 func init() { file_cdp_binapi_init() }
97 func file_cdp_binapi_init() {
98 api.RegisterMessage((*CdpEnableDisable)(nil), "cdp_enable_disable_2e7b47df")
99 api.RegisterMessage((*CdpEnableDisableReply)(nil), "cdp_enable_disable_reply_e8d4e804")
102 // Messages returns list of all messages in this module.
103 func AllMessages() []api.Message {
104 return []api.Message{
105 (*CdpEnableDisable)(nil),
106 (*CdpEnableDisableReply)(nil),