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/ip6_nd.api.json
7 // Package ip6_nd contains generated bindings for API file ip6_nd.api.
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"
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
31 VersionCrc = 0x877c10de
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"`
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"`
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
63 func (m *IP6RaEvent) Size() int {
69 size += 4 // m.SwIfIndex
70 size += 1 * 16 // m.RouterAddr
71 size += 1 // m.CurrentHopLimit
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
80 if j1 < len(m.Prefixes) {
83 size += 1 // s1.Prefix.Address.Af
84 size += 1 * 16 // s1.Prefix.Address.Un
85 size += 1 // s1.Prefix.Len
87 size += 4 // s1.ValidTime
88 size += 4 // s1.PreferredTime
92 func (m *IP6RaEvent) Marshal(b []byte) ([]byte, error) {
95 buf = codec.NewBuffer(make([]byte, m.Size()))
97 buf = codec.NewBuffer(b)
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) {
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))
120 return buf.Bytes(), nil
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()
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"`
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
159 func (m *IP6ndProxyAddDel) Size() int {
164 size += 4 // m.SwIfIndex
166 size += 1 * 16 // m.IP
169 func (m *IP6ndProxyAddDel) Marshal(b []byte) ([]byte, error) {
170 var buf *codec.Buffer
172 buf = codec.NewBuffer(make([]byte, m.Size()))
174 buf = codec.NewBuffer(b)
176 buf.EncodeUint32(uint32(m.SwIfIndex))
177 buf.EncodeBool(m.IsAdd)
178 buf.EncodeBytes(m.IP[:], 16)
179 return buf.Bytes(), nil
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))
189 // IP6ndProxyAddDelReply defines message 'ip6nd_proxy_add_del_reply'.
190 type IP6ndProxyAddDelReply struct {
191 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
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
201 func (m *IP6ndProxyAddDelReply) Size() int {
206 size += 4 // m.Retval
209 func (m *IP6ndProxyAddDelReply) Marshal(b []byte) ([]byte, error) {
210 var buf *codec.Buffer
212 buf = codec.NewBuffer(make([]byte, m.Size()))
214 buf = codec.NewBuffer(b)
216 buf.EncodeUint32(uint32(m.Retval))
217 return buf.Bytes(), nil
219 func (m *IP6ndProxyAddDelReply) Unmarshal(b []byte) error {
220 buf := codec.NewBuffer(b)
221 m.Retval = int32(buf.DecodeUint32())
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"`
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
238 func (m *IP6ndProxyDetails) Size() int {
243 size += 4 // m.SwIfIndex
244 size += 1 * 16 // m.IP
247 func (m *IP6ndProxyDetails) Marshal(b []byte) ([]byte, error) {
248 var buf *codec.Buffer
250 buf = codec.NewBuffer(make([]byte, m.Size()))
252 buf = codec.NewBuffer(b)
254 buf.EncodeUint32(uint32(m.SwIfIndex))
255 buf.EncodeBytes(m.IP[:], 16)
256 return buf.Bytes(), nil
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))
265 // IP6ndProxyDump defines message 'ip6nd_proxy_dump'.
266 type IP6ndProxyDump struct{}
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
275 func (m *IP6ndProxyDump) Size() int {
282 func (m *IP6ndProxyDump) Marshal(b []byte) ([]byte, error) {
283 var buf *codec.Buffer
285 buf = codec.NewBuffer(make([]byte, m.Size()))
287 buf = codec.NewBuffer(b)
289 return buf.Bytes(), nil
291 func (m *IP6ndProxyDump) Unmarshal(b []byte) error {
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"`
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
312 func (m *IP6ndSendRouterSolicitation) Size() int {
321 size += 4 // m.SwIfIndex
325 func (m *IP6ndSendRouterSolicitation) Marshal(b []byte) ([]byte, error) {
326 var buf *codec.Buffer
328 buf = codec.NewBuffer(make([]byte, m.Size()))
330 buf = codec.NewBuffer(b)
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
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()
351 // IP6ndSendRouterSolicitationReply defines message 'ip6nd_send_router_solicitation_reply'.
352 type IP6ndSendRouterSolicitationReply struct {
353 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
356 func (m *IP6ndSendRouterSolicitationReply) Reset() { *m = IP6ndSendRouterSolicitationReply{} }
357 func (*IP6ndSendRouterSolicitationReply) GetMessageName() string {
358 return "ip6nd_send_router_solicitation_reply"
360 func (*IP6ndSendRouterSolicitationReply) GetCrcString() string { return "e8d4e804" }
361 func (*IP6ndSendRouterSolicitationReply) GetMessageType() api.MessageType {
362 return api.ReplyMessage
365 func (m *IP6ndSendRouterSolicitationReply) Size() int {
370 size += 4 // m.Retval
373 func (m *IP6ndSendRouterSolicitationReply) Marshal(b []byte) ([]byte, error) {
374 var buf *codec.Buffer
376 buf = codec.NewBuffer(make([]byte, m.Size()))
378 buf = codec.NewBuffer(b)
380 buf.EncodeUint32(uint32(m.Retval))
381 return buf.Bytes(), nil
383 func (m *IP6ndSendRouterSolicitationReply) Unmarshal(b []byte) error {
384 buf := codec.NewBuffer(b)
385 m.Retval = int32(buf.DecodeUint32())
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"`
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
414 func (m *SwInterfaceIP6ndRaConfig) Size() int {
419 size += 4 // m.SwIfIndex
420 size += 1 // m.Suppress
421 size += 1 // m.Managed
423 size += 1 // m.LlOption
424 size += 1 // m.SendUnicast
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
435 func (m *SwInterfaceIP6ndRaConfig) Marshal(b []byte) ([]byte, error) {
436 var buf *codec.Buffer
438 buf = codec.NewBuffer(make([]byte, m.Size()))
440 buf = codec.NewBuffer(b)
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
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()
477 // SwInterfaceIP6ndRaConfigReply defines message 'sw_interface_ip6nd_ra_config_reply'.
478 type SwInterfaceIP6ndRaConfigReply struct {
479 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
482 func (m *SwInterfaceIP6ndRaConfigReply) Reset() { *m = SwInterfaceIP6ndRaConfigReply{} }
483 func (*SwInterfaceIP6ndRaConfigReply) GetMessageName() string {
484 return "sw_interface_ip6nd_ra_config_reply"
486 func (*SwInterfaceIP6ndRaConfigReply) GetCrcString() string { return "e8d4e804" }
487 func (*SwInterfaceIP6ndRaConfigReply) GetMessageType() api.MessageType {
488 return api.ReplyMessage
491 func (m *SwInterfaceIP6ndRaConfigReply) Size() int {
496 size += 4 // m.Retval
499 func (m *SwInterfaceIP6ndRaConfigReply) Marshal(b []byte) ([]byte, error) {
500 var buf *codec.Buffer
502 buf = codec.NewBuffer(make([]byte, m.Size()))
504 buf = codec.NewBuffer(b)
506 buf.EncodeUint32(uint32(m.Retval))
507 return buf.Bytes(), nil
509 func (m *SwInterfaceIP6ndRaConfigReply) Unmarshal(b []byte) error {
510 buf := codec.NewBuffer(b)
511 m.Retval = int32(buf.DecodeUint32())
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"`
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
536 func (m *SwInterfaceIP6ndRaPrefix) 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
551 size += 4 // m.ValLifetime
552 size += 4 // m.PrefLifetime
555 func (m *SwInterfaceIP6ndRaPrefix) Marshal(b []byte) ([]byte, error) {
556 var buf *codec.Buffer
558 buf = codec.NewBuffer(make([]byte, m.Size()))
560 buf = codec.NewBuffer(b)
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
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()
593 // SwInterfaceIP6ndRaPrefixReply defines message 'sw_interface_ip6nd_ra_prefix_reply'.
594 type SwInterfaceIP6ndRaPrefixReply struct {
595 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
598 func (m *SwInterfaceIP6ndRaPrefixReply) Reset() { *m = SwInterfaceIP6ndRaPrefixReply{} }
599 func (*SwInterfaceIP6ndRaPrefixReply) GetMessageName() string {
600 return "sw_interface_ip6nd_ra_prefix_reply"
602 func (*SwInterfaceIP6ndRaPrefixReply) GetCrcString() string { return "e8d4e804" }
603 func (*SwInterfaceIP6ndRaPrefixReply) GetMessageType() api.MessageType {
604 return api.ReplyMessage
607 func (m *SwInterfaceIP6ndRaPrefixReply) Size() int {
612 size += 4 // m.Retval
615 func (m *SwInterfaceIP6ndRaPrefixReply) Marshal(b []byte) ([]byte, error) {
616 var buf *codec.Buffer
618 buf = codec.NewBuffer(make([]byte, m.Size()))
620 buf = codec.NewBuffer(b)
622 buf.EncodeUint32(uint32(m.Retval))
623 return buf.Bytes(), nil
625 func (m *SwInterfaceIP6ndRaPrefixReply) Unmarshal(b []byte) error {
626 buf := codec.NewBuffer(b)
627 m.Retval = int32(buf.DecodeUint32())
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"`
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
644 func (m *WantIP6RaEvents) Size() int {
649 size += 1 // m.Enable
653 func (m *WantIP6RaEvents) Marshal(b []byte) ([]byte, error) {
654 var buf *codec.Buffer
656 buf = codec.NewBuffer(make([]byte, m.Size()))
658 buf = codec.NewBuffer(b)
660 buf.EncodeBool(m.Enable)
661 buf.EncodeUint32(uint32(m.PID))
662 return buf.Bytes(), nil
664 func (m *WantIP6RaEvents) Unmarshal(b []byte) error {
665 buf := codec.NewBuffer(b)
666 m.Enable = buf.DecodeBool()
667 m.PID = buf.DecodeUint32()
671 // WantIP6RaEventsReply defines message 'want_ip6_ra_events_reply'.
672 type WantIP6RaEventsReply struct {
673 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
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
683 func (m *WantIP6RaEventsReply) Size() int {
688 size += 4 // m.Retval
691 func (m *WantIP6RaEventsReply) Marshal(b []byte) ([]byte, error) {
692 var buf *codec.Buffer
694 buf = codec.NewBuffer(make([]byte, m.Size()))
696 buf = codec.NewBuffer(b)
698 buf.EncodeUint32(uint32(m.Retval))
699 return buf.Bytes(), nil
701 func (m *WantIP6RaEventsReply) Unmarshal(b []byte) error {
702 buf := codec.NewBuffer(b)
703 m.Retval = int32(buf.DecodeUint32())
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")
724 // Messages returns list of all messages in this module.
725 func AllMessages() []api.Message {
726 return []api.Message{
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),