1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
5 // source: /usr/share/vpp/api/core/rd_cp.api.json
7 // Package rd_cp contains generated bindings for API file rd_cp.api.
15 api "git.fd.io/govpp.git/api"
16 interface_types "git.fd.io/govpp.git/binapi/interface_types"
17 codec "git.fd.io/govpp.git/codec"
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
29 VersionCrc = 0x871c3bee
32 // IP6NdAddressAutoconfig defines message 'ip6_nd_address_autoconfig'.
33 type IP6NdAddressAutoconfig struct {
34 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
35 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
36 InstallDefaultRoutes bool `binapi:"bool,name=install_default_routes" json:"install_default_routes,omitempty"`
39 func (m *IP6NdAddressAutoconfig) Reset() { *m = IP6NdAddressAutoconfig{} }
40 func (*IP6NdAddressAutoconfig) GetMessageName() string { return "ip6_nd_address_autoconfig" }
41 func (*IP6NdAddressAutoconfig) GetCrcString() string { return "9e14a4a7" }
42 func (*IP6NdAddressAutoconfig) GetMessageType() api.MessageType {
43 return api.RequestMessage
46 func (m *IP6NdAddressAutoconfig) Size() (size int) {
50 size += 4 // m.SwIfIndex
52 size += 1 // m.InstallDefaultRoutes
55 func (m *IP6NdAddressAutoconfig) Marshal(b []byte) ([]byte, error) {
57 b = make([]byte, m.Size())
59 buf := codec.NewBuffer(b)
60 buf.EncodeUint32(uint32(m.SwIfIndex))
61 buf.EncodeBool(m.Enable)
62 buf.EncodeBool(m.InstallDefaultRoutes)
63 return buf.Bytes(), nil
65 func (m *IP6NdAddressAutoconfig) Unmarshal(b []byte) error {
66 buf := codec.NewBuffer(b)
67 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
68 m.Enable = buf.DecodeBool()
69 m.InstallDefaultRoutes = buf.DecodeBool()
73 // IP6NdAddressAutoconfigReply defines message 'ip6_nd_address_autoconfig_reply'.
74 type IP6NdAddressAutoconfigReply struct {
75 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
78 func (m *IP6NdAddressAutoconfigReply) Reset() { *m = IP6NdAddressAutoconfigReply{} }
79 func (*IP6NdAddressAutoconfigReply) GetMessageName() string { return "ip6_nd_address_autoconfig_reply" }
80 func (*IP6NdAddressAutoconfigReply) GetCrcString() string { return "e8d4e804" }
81 func (*IP6NdAddressAutoconfigReply) GetMessageType() api.MessageType {
82 return api.ReplyMessage
85 func (m *IP6NdAddressAutoconfigReply) Size() (size int) {
92 func (m *IP6NdAddressAutoconfigReply) Marshal(b []byte) ([]byte, error) {
94 b = make([]byte, m.Size())
96 buf := codec.NewBuffer(b)
97 buf.EncodeInt32(m.Retval)
98 return buf.Bytes(), nil
100 func (m *IP6NdAddressAutoconfigReply) Unmarshal(b []byte) error {
101 buf := codec.NewBuffer(b)
102 m.Retval = buf.DecodeInt32()
106 func init() { file_rd_cp_binapi_init() }
107 func file_rd_cp_binapi_init() {
108 api.RegisterMessage((*IP6NdAddressAutoconfig)(nil), "ip6_nd_address_autoconfig_9e14a4a7")
109 api.RegisterMessage((*IP6NdAddressAutoconfigReply)(nil), "ip6_nd_address_autoconfig_reply_e8d4e804")
112 // Messages returns list of all messages in this module.
113 func AllMessages() []api.Message {
114 return []api.Message{
115 (*IP6NdAddressAutoconfig)(nil),
116 (*IP6NdAddressAutoconfigReply)(nil),