ca353244e00475a7065476a88a92ed13166e8230
[govpp.git] / binapi / rd_cp / rd_cp.ba.go
1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
2 // versions:
3 //  binapi-generator: v0.4.0-dev
4 //  VPP:              20.05-release
5
6 // Package rd_cp contains generated bindings for API file rd_cp.api.
7 //
8 // Contents:
9 //   2 messages
10 //
11 package rd_cp
12
13 import (
14         api "git.fd.io/govpp.git/api"
15         interface_types "git.fd.io/govpp.git/binapi/interface_types"
16         codec "git.fd.io/govpp.git/codec"
17 )
18
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
24
25 const (
26         APIFile    = "rd_cp"
27         APIVersion = "1.0.1"
28         VersionCrc = 0x2caa616
29 )
30
31 // IP6NdAddressAutoconfig defines message 'ip6_nd_address_autoconfig'.
32 type IP6NdAddressAutoconfig struct {
33         SwIfIndex            interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
34         Enable               bool                           `binapi:"bool,name=enable" json:"enable,omitempty"`
35         InstallDefaultRoutes bool                           `binapi:"bool,name=install_default_routes" json:"install_default_routes,omitempty"`
36 }
37
38 func (m *IP6NdAddressAutoconfig) Reset()               { *m = IP6NdAddressAutoconfig{} }
39 func (*IP6NdAddressAutoconfig) GetMessageName() string { return "ip6_nd_address_autoconfig" }
40 func (*IP6NdAddressAutoconfig) GetCrcString() string   { return "9e14a4a7" }
41 func (*IP6NdAddressAutoconfig) GetMessageType() api.MessageType {
42         return api.RequestMessage
43 }
44
45 func (m *IP6NdAddressAutoconfig) Size() (size int) {
46         if m == nil {
47                 return 0
48         }
49         size += 4 // m.SwIfIndex
50         size += 1 // m.Enable
51         size += 1 // m.InstallDefaultRoutes
52         return size
53 }
54 func (m *IP6NdAddressAutoconfig) Marshal(b []byte) ([]byte, error) {
55         if b == nil {
56                 b = make([]byte, m.Size())
57         }
58         buf := codec.NewBuffer(b)
59         buf.EncodeUint32(uint32(m.SwIfIndex))
60         buf.EncodeBool(m.Enable)
61         buf.EncodeBool(m.InstallDefaultRoutes)
62         return buf.Bytes(), nil
63 }
64 func (m *IP6NdAddressAutoconfig) Unmarshal(b []byte) error {
65         buf := codec.NewBuffer(b)
66         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
67         m.Enable = buf.DecodeBool()
68         m.InstallDefaultRoutes = buf.DecodeBool()
69         return nil
70 }
71
72 // IP6NdAddressAutoconfigReply defines message 'ip6_nd_address_autoconfig_reply'.
73 type IP6NdAddressAutoconfigReply struct {
74         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
75 }
76
77 func (m *IP6NdAddressAutoconfigReply) Reset()               { *m = IP6NdAddressAutoconfigReply{} }
78 func (*IP6NdAddressAutoconfigReply) GetMessageName() string { return "ip6_nd_address_autoconfig_reply" }
79 func (*IP6NdAddressAutoconfigReply) GetCrcString() string   { return "e8d4e804" }
80 func (*IP6NdAddressAutoconfigReply) GetMessageType() api.MessageType {
81         return api.ReplyMessage
82 }
83
84 func (m *IP6NdAddressAutoconfigReply) Size() (size int) {
85         if m == nil {
86                 return 0
87         }
88         size += 4 // m.Retval
89         return size
90 }
91 func (m *IP6NdAddressAutoconfigReply) Marshal(b []byte) ([]byte, error) {
92         if b == nil {
93                 b = make([]byte, m.Size())
94         }
95         buf := codec.NewBuffer(b)
96         buf.EncodeInt32(m.Retval)
97         return buf.Bytes(), nil
98 }
99 func (m *IP6NdAddressAutoconfigReply) Unmarshal(b []byte) error {
100         buf := codec.NewBuffer(b)
101         m.Retval = buf.DecodeInt32()
102         return nil
103 }
104
105 func init() { file_rd_cp_binapi_init() }
106 func file_rd_cp_binapi_init() {
107         api.RegisterMessage((*IP6NdAddressAutoconfig)(nil), "ip6_nd_address_autoconfig_9e14a4a7")
108         api.RegisterMessage((*IP6NdAddressAutoconfigReply)(nil), "ip6_nd_address_autoconfig_reply_e8d4e804")
109 }
110
111 // Messages returns list of all messages in this module.
112 func AllMessages() []api.Message {
113         return []api.Message{
114                 (*IP6NdAddressAutoconfig)(nil),
115                 (*IP6NdAddressAutoconfigReply)(nil),
116         }
117 }