1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
6 // Package ip6_nd contains generated bindings for API file ip6_nd.api.
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"
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
30 VersionCrc = 0x877c10de
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"`
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"`
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
62 func (m *IP6RaEvent) Size() (size int) {
67 size += 4 // m.SwIfIndex
68 size += 1 * 16 // m.RouterAddr
69 size += 1 // m.CurrentHopLimit
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
78 if j1 < len(m.Prefixes) {
81 size += 1 // s1.Prefix.Address.Af
82 size += 1 * 16 // s1.Prefix.Address.Un
83 size += 1 // s1.Prefix.Len
85 size += 4 // s1.ValidTime
86 size += 4 // s1.PreferredTime
90 func (m *IP6RaEvent) Marshal(b []byte) ([]byte, error) {
92 b = make([]byte, m.Size())
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) {
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)
116 return buf.Bytes(), nil
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()
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"`
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
155 func (m *IP6ndProxyAddDel) Size() (size int) {
159 size += 4 // m.SwIfIndex
161 size += 1 * 16 // m.IP
164 func (m *IP6ndProxyAddDel) Marshal(b []byte) ([]byte, error) {
166 b = make([]byte, m.Size())
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
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))
182 // IP6ndProxyAddDelReply defines message 'ip6nd_proxy_add_del_reply'.
183 type IP6ndProxyAddDelReply struct {
184 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
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
194 func (m *IP6ndProxyAddDelReply) Size() (size int) {
198 size += 4 // m.Retval
201 func (m *IP6ndProxyAddDelReply) Marshal(b []byte) ([]byte, error) {
203 b = make([]byte, m.Size())
205 buf := codec.NewBuffer(b)
206 buf.EncodeInt32(m.Retval)
207 return buf.Bytes(), nil
209 func (m *IP6ndProxyAddDelReply) Unmarshal(b []byte) error {
210 buf := codec.NewBuffer(b)
211 m.Retval = buf.DecodeInt32()
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"`
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
228 func (m *IP6ndProxyDetails) Size() (size int) {
232 size += 4 // m.SwIfIndex
233 size += 1 * 16 // m.IP
236 func (m *IP6ndProxyDetails) Marshal(b []byte) ([]byte, error) {
238 b = make([]byte, m.Size())
240 buf := codec.NewBuffer(b)
241 buf.EncodeUint32(uint32(m.SwIfIndex))
242 buf.EncodeBytes(m.IP[:], 16)
243 return buf.Bytes(), nil
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))
252 // IP6ndProxyDump defines message 'ip6nd_proxy_dump'.
253 type IP6ndProxyDump struct{}
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
262 func (m *IP6ndProxyDump) Size() (size int) {
268 func (m *IP6ndProxyDump) Marshal(b []byte) ([]byte, error) {
270 b = make([]byte, m.Size())
272 buf := codec.NewBuffer(b)
273 return buf.Bytes(), nil
275 func (m *IP6ndProxyDump) Unmarshal(b []byte) error {
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"`
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
296 func (m *IP6ndSendRouterSolicitation) Size() (size int) {
304 size += 4 // m.SwIfIndex
308 func (m *IP6ndSendRouterSolicitation) Marshal(b []byte) ([]byte, error) {
310 b = make([]byte, m.Size())
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
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()
332 // IP6ndSendRouterSolicitationReply defines message 'ip6nd_send_router_solicitation_reply'.
333 type IP6ndSendRouterSolicitationReply struct {
334 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
337 func (m *IP6ndSendRouterSolicitationReply) Reset() { *m = IP6ndSendRouterSolicitationReply{} }
338 func (*IP6ndSendRouterSolicitationReply) GetMessageName() string {
339 return "ip6nd_send_router_solicitation_reply"
341 func (*IP6ndSendRouterSolicitationReply) GetCrcString() string { return "e8d4e804" }
342 func (*IP6ndSendRouterSolicitationReply) GetMessageType() api.MessageType {
343 return api.ReplyMessage
346 func (m *IP6ndSendRouterSolicitationReply) Size() (size int) {
350 size += 4 // m.Retval
353 func (m *IP6ndSendRouterSolicitationReply) Marshal(b []byte) ([]byte, error) {
355 b = make([]byte, m.Size())
357 buf := codec.NewBuffer(b)
358 buf.EncodeInt32(m.Retval)
359 return buf.Bytes(), nil
361 func (m *IP6ndSendRouterSolicitationReply) Unmarshal(b []byte) error {
362 buf := codec.NewBuffer(b)
363 m.Retval = buf.DecodeInt32()
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"`
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
392 func (m *SwInterfaceIP6ndRaConfig) Size() (size int) {
396 size += 4 // m.SwIfIndex
397 size += 1 // m.Suppress
398 size += 1 // m.Managed
400 size += 1 // m.LlOption
401 size += 1 // m.SendUnicast
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
412 func (m *SwInterfaceIP6ndRaConfig) Marshal(b []byte) ([]byte, error) {
414 b = make([]byte, m.Size())
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
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()
452 // SwInterfaceIP6ndRaConfigReply defines message 'sw_interface_ip6nd_ra_config_reply'.
453 type SwInterfaceIP6ndRaConfigReply struct {
454 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
457 func (m *SwInterfaceIP6ndRaConfigReply) Reset() { *m = SwInterfaceIP6ndRaConfigReply{} }
458 func (*SwInterfaceIP6ndRaConfigReply) GetMessageName() string {
459 return "sw_interface_ip6nd_ra_config_reply"
461 func (*SwInterfaceIP6ndRaConfigReply) GetCrcString() string { return "e8d4e804" }
462 func (*SwInterfaceIP6ndRaConfigReply) GetMessageType() api.MessageType {
463 return api.ReplyMessage
466 func (m *SwInterfaceIP6ndRaConfigReply) Size() (size int) {
470 size += 4 // m.Retval
473 func (m *SwInterfaceIP6ndRaConfigReply) Marshal(b []byte) ([]byte, error) {
475 b = make([]byte, m.Size())
477 buf := codec.NewBuffer(b)
478 buf.EncodeInt32(m.Retval)
479 return buf.Bytes(), nil
481 func (m *SwInterfaceIP6ndRaConfigReply) Unmarshal(b []byte) error {
482 buf := codec.NewBuffer(b)
483 m.Retval = buf.DecodeInt32()
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"`
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
508 func (m *SwInterfaceIP6ndRaPrefix) Size() (size int) {
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
522 size += 4 // m.ValLifetime
523 size += 4 // m.PrefLifetime
526 func (m *SwInterfaceIP6ndRaPrefix) Marshal(b []byte) ([]byte, error) {
528 b = make([]byte, m.Size())
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
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()
562 // SwInterfaceIP6ndRaPrefixReply defines message 'sw_interface_ip6nd_ra_prefix_reply'.
563 type SwInterfaceIP6ndRaPrefixReply struct {
564 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
567 func (m *SwInterfaceIP6ndRaPrefixReply) Reset() { *m = SwInterfaceIP6ndRaPrefixReply{} }
568 func (*SwInterfaceIP6ndRaPrefixReply) GetMessageName() string {
569 return "sw_interface_ip6nd_ra_prefix_reply"
571 func (*SwInterfaceIP6ndRaPrefixReply) GetCrcString() string { return "e8d4e804" }
572 func (*SwInterfaceIP6ndRaPrefixReply) GetMessageType() api.MessageType {
573 return api.ReplyMessage
576 func (m *SwInterfaceIP6ndRaPrefixReply) Size() (size int) {
580 size += 4 // m.Retval
583 func (m *SwInterfaceIP6ndRaPrefixReply) Marshal(b []byte) ([]byte, error) {
585 b = make([]byte, m.Size())
587 buf := codec.NewBuffer(b)
588 buf.EncodeInt32(m.Retval)
589 return buf.Bytes(), nil
591 func (m *SwInterfaceIP6ndRaPrefixReply) Unmarshal(b []byte) error {
592 buf := codec.NewBuffer(b)
593 m.Retval = buf.DecodeInt32()
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"`
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
610 func (m *WantIP6RaEvents) Size() (size int) {
614 size += 1 // m.Enable
618 func (m *WantIP6RaEvents) Marshal(b []byte) ([]byte, error) {
620 b = make([]byte, m.Size())
622 buf := codec.NewBuffer(b)
623 buf.EncodeBool(m.Enable)
624 buf.EncodeUint32(m.PID)
625 return buf.Bytes(), nil
627 func (m *WantIP6RaEvents) Unmarshal(b []byte) error {
628 buf := codec.NewBuffer(b)
629 m.Enable = buf.DecodeBool()
630 m.PID = buf.DecodeUint32()
634 // WantIP6RaEventsReply defines message 'want_ip6_ra_events_reply'.
635 type WantIP6RaEventsReply struct {
636 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
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
646 func (m *WantIP6RaEventsReply) Size() (size int) {
650 size += 4 // m.Retval
653 func (m *WantIP6RaEventsReply) Marshal(b []byte) ([]byte, error) {
655 b = make([]byte, m.Size())
657 buf := codec.NewBuffer(b)
658 buf.EncodeInt32(m.Retval)
659 return buf.Bytes(), nil
661 func (m *WantIP6RaEventsReply) Unmarshal(b []byte) error {
662 buf := codec.NewBuffer(b)
663 m.Retval = buf.DecodeInt32()
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")
684 // Messages returns list of all messages in this module.
685 func AllMessages() []api.Message {
686 return []api.Message{
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),