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