Improve binapi generator
[govpp.git] / binapi / ip6_nd / ip6_nd.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 // source: /usr/share/vpp/api/core/ip6_nd.api.json
6
7 // Package ip6_nd contains generated bindings for API file ip6_nd.api.
8 //
9 // Contents:
10 //   1 struct
11 //  13 messages
12 //
13 package ip6_nd
14
15 import (
16         api "git.fd.io/govpp.git/api"
17         interface_types "git.fd.io/govpp.git/binapi/interface_types"
18         ip_types "git.fd.io/govpp.git/binapi/ip_types"
19         codec "git.fd.io/govpp.git/codec"
20 )
21
22 // This is a compile-time assertion to ensure that this generated file
23 // is compatible with the GoVPP api package it is being compiled against.
24 // A compilation error at this line likely means your copy of the
25 // GoVPP api package needs to be updated.
26 const _ = api.GoVppAPIPackageIsVersion2
27
28 const (
29         APIFile    = "ip6_nd"
30         APIVersion = "1.0.0"
31         VersionCrc = 0x877c10de
32 )
33
34 // IP6RaPrefixInfo defines type 'ip6_ra_prefix_info'.
35 type IP6RaPrefixInfo struct {
36         Prefix        ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
37         Flags         uint8           `binapi:"u8,name=flags" json:"flags,omitempty"`
38         ValidTime     uint32          `binapi:"u32,name=valid_time" json:"valid_time,omitempty"`
39         PreferredTime uint32          `binapi:"u32,name=preferred_time" json:"preferred_time,omitempty"`
40 }
41
42 // IP6RaEvent defines message 'ip6_ra_event'.
43 type IP6RaEvent struct {
44         PID                                                 uint32                         `binapi:"u32,name=pid" json:"pid,omitempty"`
45         SwIfIndex                                           interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
46         RouterAddr                                          ip_types.IP6Address            `binapi:"ip6_address,name=router_addr" json:"router_addr,omitempty"`
47         CurrentHopLimit                                     uint8                          `binapi:"u8,name=current_hop_limit" json:"current_hop_limit,omitempty"`
48         Flags                                               uint8                          `binapi:"u8,name=flags" json:"flags,omitempty"`
49         RouterLifetimeInSec                                 uint16                         `binapi:"u16,name=router_lifetime_in_sec" json:"router_lifetime_in_sec,omitempty"`
50         NeighborReachableTimeInMsec                         uint32                         `binapi:"u32,name=neighbor_reachable_time_in_msec" json:"neighbor_reachable_time_in_msec,omitempty"`
51         TimeInMsecBetweenRetransmittedNeighborSolicitations uint32                         `binapi:"u32,name=time_in_msec_between_retransmitted_neighbor_solicitations" json:"time_in_msec_between_retransmitted_neighbor_solicitations,omitempty"`
52         NPrefixes                                           uint32                         `binapi:"u32,name=n_prefixes" json:"-"`
53         Prefixes                                            []IP6RaPrefixInfo              `binapi:"ip6_ra_prefix_info[n_prefixes],name=prefixes" json:"prefixes,omitempty"`
54 }
55
56 func (m *IP6RaEvent) Reset()               { *m = IP6RaEvent{} }
57 func (*IP6RaEvent) GetMessageName() string { return "ip6_ra_event" }
58 func (*IP6RaEvent) GetCrcString() string   { return "47e8cfbe" }
59 func (*IP6RaEvent) GetMessageType() api.MessageType {
60         return api.EventMessage
61 }
62
63 func (m *IP6RaEvent) Size() int {
64         if m == nil {
65                 return 0
66         }
67         var size int
68         size += 4      // m.PID
69         size += 4      // m.SwIfIndex
70         size += 1 * 16 // m.RouterAddr
71         size += 1      // m.CurrentHopLimit
72         size += 1      // m.Flags
73         size += 2      // m.RouterLifetimeInSec
74         size += 4      // m.NeighborReachableTimeInMsec
75         size += 4      // m.TimeInMsecBetweenRetransmittedNeighborSolicitations
76         size += 4      // m.NPrefixes
77         for j1 := 0; j1 < len(m.Prefixes); j1++ {
78                 var s1 IP6RaPrefixInfo
79                 _ = s1
80                 if j1 < len(m.Prefixes) {
81                         s1 = m.Prefixes[j1]
82                 }
83                 size += 1      // s1.Prefix.Address.Af
84                 size += 1 * 16 // s1.Prefix.Address.Un
85                 size += 1      // s1.Prefix.Len
86                 size += 1      // s1.Flags
87                 size += 4      // s1.ValidTime
88                 size += 4      // s1.PreferredTime
89         }
90         return size
91 }
92 func (m *IP6RaEvent) Marshal(b []byte) ([]byte, error) {
93         var buf *codec.Buffer
94         if b == nil {
95                 buf = codec.NewBuffer(make([]byte, m.Size()))
96         } else {
97                 buf = codec.NewBuffer(b)
98         }
99         buf.EncodeUint32(uint32(m.PID))
100         buf.EncodeUint32(uint32(m.SwIfIndex))
101         buf.EncodeBytes(m.RouterAddr[:], 16)
102         buf.EncodeUint8(uint8(m.CurrentHopLimit))
103         buf.EncodeUint8(uint8(m.Flags))
104         buf.EncodeUint16(uint16(m.RouterLifetimeInSec))
105         buf.EncodeUint32(uint32(m.NeighborReachableTimeInMsec))
106         buf.EncodeUint32(uint32(m.TimeInMsecBetweenRetransmittedNeighborSolicitations))
107         buf.EncodeUint32(uint32(len(m.Prefixes)))
108         for j0 := 0; j0 < len(m.Prefixes); j0++ {
109                 var v0 IP6RaPrefixInfo
110                 if j0 < len(m.Prefixes) {
111                         v0 = m.Prefixes[j0]
112                 }
113                 buf.EncodeUint8(uint8(v0.Prefix.Address.Af))
114                 buf.EncodeBytes(v0.Prefix.Address.Un.XXX_UnionData[:], 0)
115                 buf.EncodeUint8(uint8(v0.Prefix.Len))
116                 buf.EncodeUint8(uint8(v0.Flags))
117                 buf.EncodeUint32(uint32(v0.ValidTime))
118                 buf.EncodeUint32(uint32(v0.PreferredTime))
119         }
120         return buf.Bytes(), nil
121 }
122 func (m *IP6RaEvent) Unmarshal(b []byte) error {
123         buf := codec.NewBuffer(b)
124         m.PID = buf.DecodeUint32()
125         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
126         copy(m.RouterAddr[:], buf.DecodeBytes(16))
127         m.CurrentHopLimit = buf.DecodeUint8()
128         m.Flags = buf.DecodeUint8()
129         m.RouterLifetimeInSec = buf.DecodeUint16()
130         m.NeighborReachableTimeInMsec = buf.DecodeUint32()
131         m.TimeInMsecBetweenRetransmittedNeighborSolicitations = buf.DecodeUint32()
132         m.NPrefixes = buf.DecodeUint32()
133         m.Prefixes = make([]IP6RaPrefixInfo, int(m.NPrefixes))
134         for j0 := 0; j0 < len(m.Prefixes); j0++ {
135                 m.Prefixes[j0].Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
136                 copy(m.Prefixes[j0].Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
137                 m.Prefixes[j0].Prefix.Len = buf.DecodeUint8()
138                 m.Prefixes[j0].Flags = buf.DecodeUint8()
139                 m.Prefixes[j0].ValidTime = buf.DecodeUint32()
140                 m.Prefixes[j0].PreferredTime = buf.DecodeUint32()
141         }
142         return nil
143 }
144
145 // IP6ndProxyAddDel defines message 'ip6nd_proxy_add_del'.
146 type IP6ndProxyAddDel struct {
147         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
148         IsAdd     bool                           `binapi:"bool,name=is_add" json:"is_add,omitempty"`
149         IP        ip_types.IP6Address            `binapi:"ip6_address,name=ip" json:"ip,omitempty"`
150 }
151
152 func (m *IP6ndProxyAddDel) Reset()               { *m = IP6ndProxyAddDel{} }
153 func (*IP6ndProxyAddDel) GetMessageName() string { return "ip6nd_proxy_add_del" }
154 func (*IP6ndProxyAddDel) GetCrcString() string   { return "3fdf6659" }
155 func (*IP6ndProxyAddDel) GetMessageType() api.MessageType {
156         return api.RequestMessage
157 }
158
159 func (m *IP6ndProxyAddDel) Size() int {
160         if m == nil {
161                 return 0
162         }
163         var size int
164         size += 4      // m.SwIfIndex
165         size += 1      // m.IsAdd
166         size += 1 * 16 // m.IP
167         return size
168 }
169 func (m *IP6ndProxyAddDel) Marshal(b []byte) ([]byte, error) {
170         var buf *codec.Buffer
171         if b == nil {
172                 buf = codec.NewBuffer(make([]byte, m.Size()))
173         } else {
174                 buf = codec.NewBuffer(b)
175         }
176         buf.EncodeUint32(uint32(m.SwIfIndex))
177         buf.EncodeBool(m.IsAdd)
178         buf.EncodeBytes(m.IP[:], 16)
179         return buf.Bytes(), nil
180 }
181 func (m *IP6ndProxyAddDel) Unmarshal(b []byte) error {
182         buf := codec.NewBuffer(b)
183         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
184         m.IsAdd = buf.DecodeBool()
185         copy(m.IP[:], buf.DecodeBytes(16))
186         return nil
187 }
188
189 // IP6ndProxyAddDelReply defines message 'ip6nd_proxy_add_del_reply'.
190 type IP6ndProxyAddDelReply struct {
191         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
192 }
193
194 func (m *IP6ndProxyAddDelReply) Reset()               { *m = IP6ndProxyAddDelReply{} }
195 func (*IP6ndProxyAddDelReply) GetMessageName() string { return "ip6nd_proxy_add_del_reply" }
196 func (*IP6ndProxyAddDelReply) GetCrcString() string   { return "e8d4e804" }
197 func (*IP6ndProxyAddDelReply) GetMessageType() api.MessageType {
198         return api.ReplyMessage
199 }
200
201 func (m *IP6ndProxyAddDelReply) Size() int {
202         if m == nil {
203                 return 0
204         }
205         var size int
206         size += 4 // m.Retval
207         return size
208 }
209 func (m *IP6ndProxyAddDelReply) Marshal(b []byte) ([]byte, error) {
210         var buf *codec.Buffer
211         if b == nil {
212                 buf = codec.NewBuffer(make([]byte, m.Size()))
213         } else {
214                 buf = codec.NewBuffer(b)
215         }
216         buf.EncodeUint32(uint32(m.Retval))
217         return buf.Bytes(), nil
218 }
219 func (m *IP6ndProxyAddDelReply) Unmarshal(b []byte) error {
220         buf := codec.NewBuffer(b)
221         m.Retval = int32(buf.DecodeUint32())
222         return nil
223 }
224
225 // IP6ndProxyDetails defines message 'ip6nd_proxy_details'.
226 type IP6ndProxyDetails struct {
227         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
228         IP        ip_types.IP6Address            `binapi:"ip6_address,name=ip" json:"ip,omitempty"`
229 }
230
231 func (m *IP6ndProxyDetails) Reset()               { *m = IP6ndProxyDetails{} }
232 func (*IP6ndProxyDetails) GetMessageName() string { return "ip6nd_proxy_details" }
233 func (*IP6ndProxyDetails) GetCrcString() string   { return "d35be8ff" }
234 func (*IP6ndProxyDetails) GetMessageType() api.MessageType {
235         return api.ReplyMessage
236 }
237
238 func (m *IP6ndProxyDetails) Size() int {
239         if m == nil {
240                 return 0
241         }
242         var size int
243         size += 4      // m.SwIfIndex
244         size += 1 * 16 // m.IP
245         return size
246 }
247 func (m *IP6ndProxyDetails) Marshal(b []byte) ([]byte, error) {
248         var buf *codec.Buffer
249         if b == nil {
250                 buf = codec.NewBuffer(make([]byte, m.Size()))
251         } else {
252                 buf = codec.NewBuffer(b)
253         }
254         buf.EncodeUint32(uint32(m.SwIfIndex))
255         buf.EncodeBytes(m.IP[:], 16)
256         return buf.Bytes(), nil
257 }
258 func (m *IP6ndProxyDetails) Unmarshal(b []byte) error {
259         buf := codec.NewBuffer(b)
260         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
261         copy(m.IP[:], buf.DecodeBytes(16))
262         return nil
263 }
264
265 // IP6ndProxyDump defines message 'ip6nd_proxy_dump'.
266 type IP6ndProxyDump struct{}
267
268 func (m *IP6ndProxyDump) Reset()               { *m = IP6ndProxyDump{} }
269 func (*IP6ndProxyDump) GetMessageName() string { return "ip6nd_proxy_dump" }
270 func (*IP6ndProxyDump) GetCrcString() string   { return "51077d14" }
271 func (*IP6ndProxyDump) GetMessageType() api.MessageType {
272         return api.RequestMessage
273 }
274
275 func (m *IP6ndProxyDump) Size() int {
276         if m == nil {
277                 return 0
278         }
279         var size int
280         return size
281 }
282 func (m *IP6ndProxyDump) Marshal(b []byte) ([]byte, error) {
283         var buf *codec.Buffer
284         if b == nil {
285                 buf = codec.NewBuffer(make([]byte, m.Size()))
286         } else {
287                 buf = codec.NewBuffer(b)
288         }
289         return buf.Bytes(), nil
290 }
291 func (m *IP6ndProxyDump) Unmarshal(b []byte) error {
292         return nil
293 }
294
295 // IP6ndSendRouterSolicitation defines message 'ip6nd_send_router_solicitation'.
296 type IP6ndSendRouterSolicitation struct {
297         Irt       uint32                         `binapi:"u32,name=irt" json:"irt,omitempty"`
298         Mrt       uint32                         `binapi:"u32,name=mrt" json:"mrt,omitempty"`
299         Mrc       uint32                         `binapi:"u32,name=mrc" json:"mrc,omitempty"`
300         Mrd       uint32                         `binapi:"u32,name=mrd" json:"mrd,omitempty"`
301         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
302         Stop      bool                           `binapi:"bool,name=stop" json:"stop,omitempty"`
303 }
304
305 func (m *IP6ndSendRouterSolicitation) Reset()               { *m = IP6ndSendRouterSolicitation{} }
306 func (*IP6ndSendRouterSolicitation) GetMessageName() string { return "ip6nd_send_router_solicitation" }
307 func (*IP6ndSendRouterSolicitation) GetCrcString() string   { return "e5de609c" }
308 func (*IP6ndSendRouterSolicitation) GetMessageType() api.MessageType {
309         return api.RequestMessage
310 }
311
312 func (m *IP6ndSendRouterSolicitation) Size() int {
313         if m == nil {
314                 return 0
315         }
316         var size int
317         size += 4 // m.Irt
318         size += 4 // m.Mrt
319         size += 4 // m.Mrc
320         size += 4 // m.Mrd
321         size += 4 // m.SwIfIndex
322         size += 1 // m.Stop
323         return size
324 }
325 func (m *IP6ndSendRouterSolicitation) Marshal(b []byte) ([]byte, error) {
326         var buf *codec.Buffer
327         if b == nil {
328                 buf = codec.NewBuffer(make([]byte, m.Size()))
329         } else {
330                 buf = codec.NewBuffer(b)
331         }
332         buf.EncodeUint32(uint32(m.Irt))
333         buf.EncodeUint32(uint32(m.Mrt))
334         buf.EncodeUint32(uint32(m.Mrc))
335         buf.EncodeUint32(uint32(m.Mrd))
336         buf.EncodeUint32(uint32(m.SwIfIndex))
337         buf.EncodeBool(m.Stop)
338         return buf.Bytes(), nil
339 }
340 func (m *IP6ndSendRouterSolicitation) Unmarshal(b []byte) error {
341         buf := codec.NewBuffer(b)
342         m.Irt = buf.DecodeUint32()
343         m.Mrt = buf.DecodeUint32()
344         m.Mrc = buf.DecodeUint32()
345         m.Mrd = buf.DecodeUint32()
346         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
347         m.Stop = buf.DecodeBool()
348         return nil
349 }
350
351 // IP6ndSendRouterSolicitationReply defines message 'ip6nd_send_router_solicitation_reply'.
352 type IP6ndSendRouterSolicitationReply struct {
353         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
354 }
355
356 func (m *IP6ndSendRouterSolicitationReply) Reset() { *m = IP6ndSendRouterSolicitationReply{} }
357 func (*IP6ndSendRouterSolicitationReply) GetMessageName() string {
358         return "ip6nd_send_router_solicitation_reply"
359 }
360 func (*IP6ndSendRouterSolicitationReply) GetCrcString() string { return "e8d4e804" }
361 func (*IP6ndSendRouterSolicitationReply) GetMessageType() api.MessageType {
362         return api.ReplyMessage
363 }
364
365 func (m *IP6ndSendRouterSolicitationReply) Size() int {
366         if m == nil {
367                 return 0
368         }
369         var size int
370         size += 4 // m.Retval
371         return size
372 }
373 func (m *IP6ndSendRouterSolicitationReply) Marshal(b []byte) ([]byte, error) {
374         var buf *codec.Buffer
375         if b == nil {
376                 buf = codec.NewBuffer(make([]byte, m.Size()))
377         } else {
378                 buf = codec.NewBuffer(b)
379         }
380         buf.EncodeUint32(uint32(m.Retval))
381         return buf.Bytes(), nil
382 }
383 func (m *IP6ndSendRouterSolicitationReply) Unmarshal(b []byte) error {
384         buf := codec.NewBuffer(b)
385         m.Retval = int32(buf.DecodeUint32())
386         return nil
387 }
388
389 // SwInterfaceIP6ndRaConfig defines message 'sw_interface_ip6nd_ra_config'.
390 type SwInterfaceIP6ndRaConfig struct {
391         SwIfIndex       interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
392         Suppress        uint8                          `binapi:"u8,name=suppress" json:"suppress,omitempty"`
393         Managed         uint8                          `binapi:"u8,name=managed" json:"managed,omitempty"`
394         Other           uint8                          `binapi:"u8,name=other" json:"other,omitempty"`
395         LlOption        uint8                          `binapi:"u8,name=ll_option" json:"ll_option,omitempty"`
396         SendUnicast     uint8                          `binapi:"u8,name=send_unicast" json:"send_unicast,omitempty"`
397         Cease           uint8                          `binapi:"u8,name=cease" json:"cease,omitempty"`
398         IsNo            bool                           `binapi:"bool,name=is_no" json:"is_no,omitempty"`
399         DefaultRouter   uint8                          `binapi:"u8,name=default_router" json:"default_router,omitempty"`
400         MaxInterval     uint32                         `binapi:"u32,name=max_interval" json:"max_interval,omitempty"`
401         MinInterval     uint32                         `binapi:"u32,name=min_interval" json:"min_interval,omitempty"`
402         Lifetime        uint32                         `binapi:"u32,name=lifetime" json:"lifetime,omitempty"`
403         InitialCount    uint32                         `binapi:"u32,name=initial_count" json:"initial_count,omitempty"`
404         InitialInterval uint32                         `binapi:"u32,name=initial_interval" json:"initial_interval,omitempty"`
405 }
406
407 func (m *SwInterfaceIP6ndRaConfig) Reset()               { *m = SwInterfaceIP6ndRaConfig{} }
408 func (*SwInterfaceIP6ndRaConfig) GetMessageName() string { return "sw_interface_ip6nd_ra_config" }
409 func (*SwInterfaceIP6ndRaConfig) GetCrcString() string   { return "3eb00b1c" }
410 func (*SwInterfaceIP6ndRaConfig) GetMessageType() api.MessageType {
411         return api.RequestMessage
412 }
413
414 func (m *SwInterfaceIP6ndRaConfig) Size() int {
415         if m == nil {
416                 return 0
417         }
418         var size int
419         size += 4 // m.SwIfIndex
420         size += 1 // m.Suppress
421         size += 1 // m.Managed
422         size += 1 // m.Other
423         size += 1 // m.LlOption
424         size += 1 // m.SendUnicast
425         size += 1 // m.Cease
426         size += 1 // m.IsNo
427         size += 1 // m.DefaultRouter
428         size += 4 // m.MaxInterval
429         size += 4 // m.MinInterval
430         size += 4 // m.Lifetime
431         size += 4 // m.InitialCount
432         size += 4 // m.InitialInterval
433         return size
434 }
435 func (m *SwInterfaceIP6ndRaConfig) Marshal(b []byte) ([]byte, error) {
436         var buf *codec.Buffer
437         if b == nil {
438                 buf = codec.NewBuffer(make([]byte, m.Size()))
439         } else {
440                 buf = codec.NewBuffer(b)
441         }
442         buf.EncodeUint32(uint32(m.SwIfIndex))
443         buf.EncodeUint8(uint8(m.Suppress))
444         buf.EncodeUint8(uint8(m.Managed))
445         buf.EncodeUint8(uint8(m.Other))
446         buf.EncodeUint8(uint8(m.LlOption))
447         buf.EncodeUint8(uint8(m.SendUnicast))
448         buf.EncodeUint8(uint8(m.Cease))
449         buf.EncodeBool(m.IsNo)
450         buf.EncodeUint8(uint8(m.DefaultRouter))
451         buf.EncodeUint32(uint32(m.MaxInterval))
452         buf.EncodeUint32(uint32(m.MinInterval))
453         buf.EncodeUint32(uint32(m.Lifetime))
454         buf.EncodeUint32(uint32(m.InitialCount))
455         buf.EncodeUint32(uint32(m.InitialInterval))
456         return buf.Bytes(), nil
457 }
458 func (m *SwInterfaceIP6ndRaConfig) Unmarshal(b []byte) error {
459         buf := codec.NewBuffer(b)
460         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
461         m.Suppress = buf.DecodeUint8()
462         m.Managed = buf.DecodeUint8()
463         m.Other = buf.DecodeUint8()
464         m.LlOption = buf.DecodeUint8()
465         m.SendUnicast = buf.DecodeUint8()
466         m.Cease = buf.DecodeUint8()
467         m.IsNo = buf.DecodeBool()
468         m.DefaultRouter = buf.DecodeUint8()
469         m.MaxInterval = buf.DecodeUint32()
470         m.MinInterval = buf.DecodeUint32()
471         m.Lifetime = buf.DecodeUint32()
472         m.InitialCount = buf.DecodeUint32()
473         m.InitialInterval = buf.DecodeUint32()
474         return nil
475 }
476
477 // SwInterfaceIP6ndRaConfigReply defines message 'sw_interface_ip6nd_ra_config_reply'.
478 type SwInterfaceIP6ndRaConfigReply struct {
479         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
480 }
481
482 func (m *SwInterfaceIP6ndRaConfigReply) Reset() { *m = SwInterfaceIP6ndRaConfigReply{} }
483 func (*SwInterfaceIP6ndRaConfigReply) GetMessageName() string {
484         return "sw_interface_ip6nd_ra_config_reply"
485 }
486 func (*SwInterfaceIP6ndRaConfigReply) GetCrcString() string { return "e8d4e804" }
487 func (*SwInterfaceIP6ndRaConfigReply) GetMessageType() api.MessageType {
488         return api.ReplyMessage
489 }
490
491 func (m *SwInterfaceIP6ndRaConfigReply) Size() int {
492         if m == nil {
493                 return 0
494         }
495         var size int
496         size += 4 // m.Retval
497         return size
498 }
499 func (m *SwInterfaceIP6ndRaConfigReply) Marshal(b []byte) ([]byte, error) {
500         var buf *codec.Buffer
501         if b == nil {
502                 buf = codec.NewBuffer(make([]byte, m.Size()))
503         } else {
504                 buf = codec.NewBuffer(b)
505         }
506         buf.EncodeUint32(uint32(m.Retval))
507         return buf.Bytes(), nil
508 }
509 func (m *SwInterfaceIP6ndRaConfigReply) Unmarshal(b []byte) error {
510         buf := codec.NewBuffer(b)
511         m.Retval = int32(buf.DecodeUint32())
512         return nil
513 }
514
515 // SwInterfaceIP6ndRaPrefix defines message 'sw_interface_ip6nd_ra_prefix'.
516 type SwInterfaceIP6ndRaPrefix struct {
517         SwIfIndex    interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
518         Prefix       ip_types.Prefix                `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
519         UseDefault   bool                           `binapi:"bool,name=use_default" json:"use_default,omitempty"`
520         NoAdvertise  bool                           `binapi:"bool,name=no_advertise" json:"no_advertise,omitempty"`
521         OffLink      bool                           `binapi:"bool,name=off_link" json:"off_link,omitempty"`
522         NoAutoconfig bool                           `binapi:"bool,name=no_autoconfig" json:"no_autoconfig,omitempty"`
523         NoOnlink     bool                           `binapi:"bool,name=no_onlink" json:"no_onlink,omitempty"`
524         IsNo         bool                           `binapi:"bool,name=is_no" json:"is_no,omitempty"`
525         ValLifetime  uint32                         `binapi:"u32,name=val_lifetime" json:"val_lifetime,omitempty"`
526         PrefLifetime uint32                         `binapi:"u32,name=pref_lifetime" json:"pref_lifetime,omitempty"`
527 }
528
529 func (m *SwInterfaceIP6ndRaPrefix) Reset()               { *m = SwInterfaceIP6ndRaPrefix{} }
530 func (*SwInterfaceIP6ndRaPrefix) GetMessageName() string { return "sw_interface_ip6nd_ra_prefix" }
531 func (*SwInterfaceIP6ndRaPrefix) GetCrcString() string   { return "e098785f" }
532 func (*SwInterfaceIP6ndRaPrefix) GetMessageType() api.MessageType {
533         return api.RequestMessage
534 }
535
536 func (m *SwInterfaceIP6ndRaPrefix) Size() int {
537         if m == nil {
538                 return 0
539         }
540         var size int
541         size += 4      // m.SwIfIndex
542         size += 1      // m.Prefix.Address.Af
543         size += 1 * 16 // m.Prefix.Address.Un
544         size += 1      // m.Prefix.Len
545         size += 1      // m.UseDefault
546         size += 1      // m.NoAdvertise
547         size += 1      // m.OffLink
548         size += 1      // m.NoAutoconfig
549         size += 1      // m.NoOnlink
550         size += 1      // m.IsNo
551         size += 4      // m.ValLifetime
552         size += 4      // m.PrefLifetime
553         return size
554 }
555 func (m *SwInterfaceIP6ndRaPrefix) Marshal(b []byte) ([]byte, error) {
556         var buf *codec.Buffer
557         if b == nil {
558                 buf = codec.NewBuffer(make([]byte, m.Size()))
559         } else {
560                 buf = codec.NewBuffer(b)
561         }
562         buf.EncodeUint32(uint32(m.SwIfIndex))
563         buf.EncodeUint8(uint8(m.Prefix.Address.Af))
564         buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 0)
565         buf.EncodeUint8(uint8(m.Prefix.Len))
566         buf.EncodeBool(m.UseDefault)
567         buf.EncodeBool(m.NoAdvertise)
568         buf.EncodeBool(m.OffLink)
569         buf.EncodeBool(m.NoAutoconfig)
570         buf.EncodeBool(m.NoOnlink)
571         buf.EncodeBool(m.IsNo)
572         buf.EncodeUint32(uint32(m.ValLifetime))
573         buf.EncodeUint32(uint32(m.PrefLifetime))
574         return buf.Bytes(), nil
575 }
576 func (m *SwInterfaceIP6ndRaPrefix) Unmarshal(b []byte) error {
577         buf := codec.NewBuffer(b)
578         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
579         m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
580         copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
581         m.Prefix.Len = buf.DecodeUint8()
582         m.UseDefault = buf.DecodeBool()
583         m.NoAdvertise = buf.DecodeBool()
584         m.OffLink = buf.DecodeBool()
585         m.NoAutoconfig = buf.DecodeBool()
586         m.NoOnlink = buf.DecodeBool()
587         m.IsNo = buf.DecodeBool()
588         m.ValLifetime = buf.DecodeUint32()
589         m.PrefLifetime = buf.DecodeUint32()
590         return nil
591 }
592
593 // SwInterfaceIP6ndRaPrefixReply defines message 'sw_interface_ip6nd_ra_prefix_reply'.
594 type SwInterfaceIP6ndRaPrefixReply struct {
595         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
596 }
597
598 func (m *SwInterfaceIP6ndRaPrefixReply) Reset() { *m = SwInterfaceIP6ndRaPrefixReply{} }
599 func (*SwInterfaceIP6ndRaPrefixReply) GetMessageName() string {
600         return "sw_interface_ip6nd_ra_prefix_reply"
601 }
602 func (*SwInterfaceIP6ndRaPrefixReply) GetCrcString() string { return "e8d4e804" }
603 func (*SwInterfaceIP6ndRaPrefixReply) GetMessageType() api.MessageType {
604         return api.ReplyMessage
605 }
606
607 func (m *SwInterfaceIP6ndRaPrefixReply) Size() int {
608         if m == nil {
609                 return 0
610         }
611         var size int
612         size += 4 // m.Retval
613         return size
614 }
615 func (m *SwInterfaceIP6ndRaPrefixReply) Marshal(b []byte) ([]byte, error) {
616         var buf *codec.Buffer
617         if b == nil {
618                 buf = codec.NewBuffer(make([]byte, m.Size()))
619         } else {
620                 buf = codec.NewBuffer(b)
621         }
622         buf.EncodeUint32(uint32(m.Retval))
623         return buf.Bytes(), nil
624 }
625 func (m *SwInterfaceIP6ndRaPrefixReply) Unmarshal(b []byte) error {
626         buf := codec.NewBuffer(b)
627         m.Retval = int32(buf.DecodeUint32())
628         return nil
629 }
630
631 // WantIP6RaEvents defines message 'want_ip6_ra_events'.
632 type WantIP6RaEvents struct {
633         Enable bool   `binapi:"bool,name=enable" json:"enable,omitempty"`
634         PID    uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
635 }
636
637 func (m *WantIP6RaEvents) Reset()               { *m = WantIP6RaEvents{} }
638 func (*WantIP6RaEvents) GetMessageName() string { return "want_ip6_ra_events" }
639 func (*WantIP6RaEvents) GetCrcString() string   { return "3ec6d6c2" }
640 func (*WantIP6RaEvents) GetMessageType() api.MessageType {
641         return api.RequestMessage
642 }
643
644 func (m *WantIP6RaEvents) Size() int {
645         if m == nil {
646                 return 0
647         }
648         var size int
649         size += 1 // m.Enable
650         size += 4 // m.PID
651         return size
652 }
653 func (m *WantIP6RaEvents) Marshal(b []byte) ([]byte, error) {
654         var buf *codec.Buffer
655         if b == nil {
656                 buf = codec.NewBuffer(make([]byte, m.Size()))
657         } else {
658                 buf = codec.NewBuffer(b)
659         }
660         buf.EncodeBool(m.Enable)
661         buf.EncodeUint32(uint32(m.PID))
662         return buf.Bytes(), nil
663 }
664 func (m *WantIP6RaEvents) Unmarshal(b []byte) error {
665         buf := codec.NewBuffer(b)
666         m.Enable = buf.DecodeBool()
667         m.PID = buf.DecodeUint32()
668         return nil
669 }
670
671 // WantIP6RaEventsReply defines message 'want_ip6_ra_events_reply'.
672 type WantIP6RaEventsReply struct {
673         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
674 }
675
676 func (m *WantIP6RaEventsReply) Reset()               { *m = WantIP6RaEventsReply{} }
677 func (*WantIP6RaEventsReply) GetMessageName() string { return "want_ip6_ra_events_reply" }
678 func (*WantIP6RaEventsReply) GetCrcString() string   { return "e8d4e804" }
679 func (*WantIP6RaEventsReply) GetMessageType() api.MessageType {
680         return api.ReplyMessage
681 }
682
683 func (m *WantIP6RaEventsReply) Size() int {
684         if m == nil {
685                 return 0
686         }
687         var size int
688         size += 4 // m.Retval
689         return size
690 }
691 func (m *WantIP6RaEventsReply) Marshal(b []byte) ([]byte, error) {
692         var buf *codec.Buffer
693         if b == nil {
694                 buf = codec.NewBuffer(make([]byte, m.Size()))
695         } else {
696                 buf = codec.NewBuffer(b)
697         }
698         buf.EncodeUint32(uint32(m.Retval))
699         return buf.Bytes(), nil
700 }
701 func (m *WantIP6RaEventsReply) Unmarshal(b []byte) error {
702         buf := codec.NewBuffer(b)
703         m.Retval = int32(buf.DecodeUint32())
704         return nil
705 }
706
707 func init() { file_ip6_nd_binapi_init() }
708 func file_ip6_nd_binapi_init() {
709         api.RegisterMessage((*IP6RaEvent)(nil), "ip6_ra_event_47e8cfbe")
710         api.RegisterMessage((*IP6ndProxyAddDel)(nil), "ip6nd_proxy_add_del_3fdf6659")
711         api.RegisterMessage((*IP6ndProxyAddDelReply)(nil), "ip6nd_proxy_add_del_reply_e8d4e804")
712         api.RegisterMessage((*IP6ndProxyDetails)(nil), "ip6nd_proxy_details_d35be8ff")
713         api.RegisterMessage((*IP6ndProxyDump)(nil), "ip6nd_proxy_dump_51077d14")
714         api.RegisterMessage((*IP6ndSendRouterSolicitation)(nil), "ip6nd_send_router_solicitation_e5de609c")
715         api.RegisterMessage((*IP6ndSendRouterSolicitationReply)(nil), "ip6nd_send_router_solicitation_reply_e8d4e804")
716         api.RegisterMessage((*SwInterfaceIP6ndRaConfig)(nil), "sw_interface_ip6nd_ra_config_3eb00b1c")
717         api.RegisterMessage((*SwInterfaceIP6ndRaConfigReply)(nil), "sw_interface_ip6nd_ra_config_reply_e8d4e804")
718         api.RegisterMessage((*SwInterfaceIP6ndRaPrefix)(nil), "sw_interface_ip6nd_ra_prefix_e098785f")
719         api.RegisterMessage((*SwInterfaceIP6ndRaPrefixReply)(nil), "sw_interface_ip6nd_ra_prefix_reply_e8d4e804")
720         api.RegisterMessage((*WantIP6RaEvents)(nil), "want_ip6_ra_events_3ec6d6c2")
721         api.RegisterMessage((*WantIP6RaEventsReply)(nil), "want_ip6_ra_events_reply_e8d4e804")
722 }
723
724 // Messages returns list of all messages in this module.
725 func AllMessages() []api.Message {
726         return []api.Message{
727                 (*IP6RaEvent)(nil),
728                 (*IP6ndProxyAddDel)(nil),
729                 (*IP6ndProxyAddDelReply)(nil),
730                 (*IP6ndProxyDetails)(nil),
731                 (*IP6ndProxyDump)(nil),
732                 (*IP6ndSendRouterSolicitation)(nil),
733                 (*IP6ndSendRouterSolicitationReply)(nil),
734                 (*SwInterfaceIP6ndRaConfig)(nil),
735                 (*SwInterfaceIP6ndRaConfigReply)(nil),
736                 (*SwInterfaceIP6ndRaPrefix)(nil),
737                 (*SwInterfaceIP6ndRaPrefixReply)(nil),
738                 (*WantIP6RaEvents)(nil),
739                 (*WantIP6RaEventsReply)(nil),
740         }
741 }