1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.6.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 "go.fd.io/govpp/api"
17 interface_types "go.fd.io/govpp/binapi/interface_types"
18 ip_types "go.fd.io/govpp/binapi/ip_types"
19 codec "go.fd.io/govpp/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 = 0x64750117
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 "0364c1c5" }
59 func (*IP6RaEvent) GetMessageType() api.MessageType {
60 return api.EventMessage
63 func (m *IP6RaEvent) Size() (size int) {
68 size += 4 // m.SwIfIndex
69 size += 1 * 16 // m.RouterAddr
70 size += 1 // m.CurrentHopLimit
72 size += 2 // m.RouterLifetimeInSec
73 size += 4 // m.NeighborReachableTimeInMsec
74 size += 4 // m.TimeInMsecBetweenRetransmittedNeighborSolicitations
75 size += 4 // m.NPrefixes
76 for j1 := 0; j1 < len(m.Prefixes); j1++ {
77 var s1 IP6RaPrefixInfo
79 if j1 < len(m.Prefixes) {
82 size += 1 // s1.Prefix.Address.Af
83 size += 1 * 16 // s1.Prefix.Address.Un
84 size += 1 // s1.Prefix.Len
86 size += 4 // s1.ValidTime
87 size += 4 // s1.PreferredTime
91 func (m *IP6RaEvent) Marshal(b []byte) ([]byte, error) {
93 b = make([]byte, m.Size())
95 buf := codec.NewBuffer(b)
96 buf.EncodeUint32(m.PID)
97 buf.EncodeUint32(uint32(m.SwIfIndex))
98 buf.EncodeBytes(m.RouterAddr[:], 16)
99 buf.EncodeUint8(m.CurrentHopLimit)
100 buf.EncodeUint8(m.Flags)
101 buf.EncodeUint16(m.RouterLifetimeInSec)
102 buf.EncodeUint32(m.NeighborReachableTimeInMsec)
103 buf.EncodeUint32(m.TimeInMsecBetweenRetransmittedNeighborSolicitations)
104 buf.EncodeUint32(uint32(len(m.Prefixes)))
105 for j0 := 0; j0 < len(m.Prefixes); j0++ {
106 var v0 IP6RaPrefixInfo // Prefixes
107 if j0 < len(m.Prefixes) {
110 buf.EncodeUint8(uint8(v0.Prefix.Address.Af))
111 buf.EncodeBytes(v0.Prefix.Address.Un.XXX_UnionData[:], 16)
112 buf.EncodeUint8(v0.Prefix.Len)
113 buf.EncodeUint8(v0.Flags)
114 buf.EncodeUint32(v0.ValidTime)
115 buf.EncodeUint32(v0.PreferredTime)
117 return buf.Bytes(), nil
119 func (m *IP6RaEvent) Unmarshal(b []byte) error {
120 buf := codec.NewBuffer(b)
121 m.PID = buf.DecodeUint32()
122 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
123 copy(m.RouterAddr[:], buf.DecodeBytes(16))
124 m.CurrentHopLimit = buf.DecodeUint8()
125 m.Flags = buf.DecodeUint8()
126 m.RouterLifetimeInSec = buf.DecodeUint16()
127 m.NeighborReachableTimeInMsec = buf.DecodeUint32()
128 m.TimeInMsecBetweenRetransmittedNeighborSolicitations = buf.DecodeUint32()
129 m.NPrefixes = buf.DecodeUint32()
130 m.Prefixes = make([]IP6RaPrefixInfo, m.NPrefixes)
131 for j0 := 0; j0 < len(m.Prefixes); j0++ {
132 m.Prefixes[j0].Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
133 copy(m.Prefixes[j0].Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
134 m.Prefixes[j0].Prefix.Len = buf.DecodeUint8()
135 m.Prefixes[j0].Flags = buf.DecodeUint8()
136 m.Prefixes[j0].ValidTime = buf.DecodeUint32()
137 m.Prefixes[j0].PreferredTime = buf.DecodeUint32()
142 // IP6ndProxyAddDel defines message 'ip6nd_proxy_add_del'.
143 type IP6ndProxyAddDel struct {
144 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
145 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
146 IP ip_types.IP6Address `binapi:"ip6_address,name=ip" json:"ip,omitempty"`
149 func (m *IP6ndProxyAddDel) Reset() { *m = IP6ndProxyAddDel{} }
150 func (*IP6ndProxyAddDel) GetMessageName() string { return "ip6nd_proxy_add_del" }
151 func (*IP6ndProxyAddDel) GetCrcString() string { return "c2e4a686" }
152 func (*IP6ndProxyAddDel) GetMessageType() api.MessageType {
153 return api.RequestMessage
156 func (m *IP6ndProxyAddDel) Size() (size int) {
160 size += 4 // m.SwIfIndex
162 size += 1 * 16 // m.IP
165 func (m *IP6ndProxyAddDel) Marshal(b []byte) ([]byte, error) {
167 b = make([]byte, m.Size())
169 buf := codec.NewBuffer(b)
170 buf.EncodeUint32(uint32(m.SwIfIndex))
171 buf.EncodeBool(m.IsAdd)
172 buf.EncodeBytes(m.IP[:], 16)
173 return buf.Bytes(), nil
175 func (m *IP6ndProxyAddDel) Unmarshal(b []byte) error {
176 buf := codec.NewBuffer(b)
177 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
178 m.IsAdd = buf.DecodeBool()
179 copy(m.IP[:], buf.DecodeBytes(16))
183 // IP6ndProxyAddDelReply defines message 'ip6nd_proxy_add_del_reply'.
184 type IP6ndProxyAddDelReply struct {
185 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
188 func (m *IP6ndProxyAddDelReply) Reset() { *m = IP6ndProxyAddDelReply{} }
189 func (*IP6ndProxyAddDelReply) GetMessageName() string { return "ip6nd_proxy_add_del_reply" }
190 func (*IP6ndProxyAddDelReply) GetCrcString() string { return "e8d4e804" }
191 func (*IP6ndProxyAddDelReply) GetMessageType() api.MessageType {
192 return api.ReplyMessage
195 func (m *IP6ndProxyAddDelReply) Size() (size int) {
199 size += 4 // m.Retval
202 func (m *IP6ndProxyAddDelReply) Marshal(b []byte) ([]byte, error) {
204 b = make([]byte, m.Size())
206 buf := codec.NewBuffer(b)
207 buf.EncodeInt32(m.Retval)
208 return buf.Bytes(), nil
210 func (m *IP6ndProxyAddDelReply) Unmarshal(b []byte) error {
211 buf := codec.NewBuffer(b)
212 m.Retval = buf.DecodeInt32()
216 // IP6ndProxyDetails defines message 'ip6nd_proxy_details'.
217 type IP6ndProxyDetails struct {
218 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
219 IP ip_types.IP6Address `binapi:"ip6_address,name=ip" json:"ip,omitempty"`
222 func (m *IP6ndProxyDetails) Reset() { *m = IP6ndProxyDetails{} }
223 func (*IP6ndProxyDetails) GetMessageName() string { return "ip6nd_proxy_details" }
224 func (*IP6ndProxyDetails) GetCrcString() string { return "30b9ff4a" }
225 func (*IP6ndProxyDetails) GetMessageType() api.MessageType {
226 return api.ReplyMessage
229 func (m *IP6ndProxyDetails) Size() (size int) {
233 size += 4 // m.SwIfIndex
234 size += 1 * 16 // m.IP
237 func (m *IP6ndProxyDetails) Marshal(b []byte) ([]byte, error) {
239 b = make([]byte, m.Size())
241 buf := codec.NewBuffer(b)
242 buf.EncodeUint32(uint32(m.SwIfIndex))
243 buf.EncodeBytes(m.IP[:], 16)
244 return buf.Bytes(), nil
246 func (m *IP6ndProxyDetails) Unmarshal(b []byte) error {
247 buf := codec.NewBuffer(b)
248 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
249 copy(m.IP[:], buf.DecodeBytes(16))
253 // IP6ndProxyDump defines message 'ip6nd_proxy_dump'.
254 type IP6ndProxyDump struct{}
256 func (m *IP6ndProxyDump) Reset() { *m = IP6ndProxyDump{} }
257 func (*IP6ndProxyDump) GetMessageName() string { return "ip6nd_proxy_dump" }
258 func (*IP6ndProxyDump) GetCrcString() string { return "51077d14" }
259 func (*IP6ndProxyDump) GetMessageType() api.MessageType {
260 return api.RequestMessage
263 func (m *IP6ndProxyDump) Size() (size int) {
269 func (m *IP6ndProxyDump) Marshal(b []byte) ([]byte, error) {
271 b = make([]byte, m.Size())
273 buf := codec.NewBuffer(b)
274 return buf.Bytes(), nil
276 func (m *IP6ndProxyDump) Unmarshal(b []byte) error {
280 // IP6ndProxyEnableDisable defines message 'ip6nd_proxy_enable_disable'.
281 type IP6ndProxyEnableDisable struct {
282 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
283 IsEnable bool `binapi:"bool,name=is_enable" json:"is_enable,omitempty"`
286 func (m *IP6ndProxyEnableDisable) Reset() { *m = IP6ndProxyEnableDisable{} }
287 func (*IP6ndProxyEnableDisable) GetMessageName() string { return "ip6nd_proxy_enable_disable" }
288 func (*IP6ndProxyEnableDisable) GetCrcString() string { return "7daa1e3a" }
289 func (*IP6ndProxyEnableDisable) GetMessageType() api.MessageType {
290 return api.RequestMessage
293 func (m *IP6ndProxyEnableDisable) Size() (size int) {
297 size += 4 // m.SwIfIndex
298 size += 1 // m.IsEnable
301 func (m *IP6ndProxyEnableDisable) Marshal(b []byte) ([]byte, error) {
303 b = make([]byte, m.Size())
305 buf := codec.NewBuffer(b)
306 buf.EncodeUint32(uint32(m.SwIfIndex))
307 buf.EncodeBool(m.IsEnable)
308 return buf.Bytes(), nil
310 func (m *IP6ndProxyEnableDisable) Unmarshal(b []byte) error {
311 buf := codec.NewBuffer(b)
312 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
313 m.IsEnable = buf.DecodeBool()
317 // IP6ndProxyEnableDisableReply defines message 'ip6nd_proxy_enable_disable_reply'.
318 type IP6ndProxyEnableDisableReply struct {
319 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
322 func (m *IP6ndProxyEnableDisableReply) Reset() { *m = IP6ndProxyEnableDisableReply{} }
323 func (*IP6ndProxyEnableDisableReply) GetMessageName() string {
324 return "ip6nd_proxy_enable_disable_reply"
326 func (*IP6ndProxyEnableDisableReply) GetCrcString() string { return "e8d4e804" }
327 func (*IP6ndProxyEnableDisableReply) GetMessageType() api.MessageType {
328 return api.ReplyMessage
331 func (m *IP6ndProxyEnableDisableReply) Size() (size int) {
335 size += 4 // m.Retval
338 func (m *IP6ndProxyEnableDisableReply) Marshal(b []byte) ([]byte, error) {
340 b = make([]byte, m.Size())
342 buf := codec.NewBuffer(b)
343 buf.EncodeInt32(m.Retval)
344 return buf.Bytes(), nil
346 func (m *IP6ndProxyEnableDisableReply) Unmarshal(b []byte) error {
347 buf := codec.NewBuffer(b)
348 m.Retval = buf.DecodeInt32()
352 // IP6ndSendRouterSolicitation defines message 'ip6nd_send_router_solicitation'.
353 type IP6ndSendRouterSolicitation struct {
354 Irt uint32 `binapi:"u32,name=irt" json:"irt,omitempty"`
355 Mrt uint32 `binapi:"u32,name=mrt" json:"mrt,omitempty"`
356 Mrc uint32 `binapi:"u32,name=mrc" json:"mrc,omitempty"`
357 Mrd uint32 `binapi:"u32,name=mrd" json:"mrd,omitempty"`
358 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
359 Stop bool `binapi:"bool,name=stop" json:"stop,omitempty"`
362 func (m *IP6ndSendRouterSolicitation) Reset() { *m = IP6ndSendRouterSolicitation{} }
363 func (*IP6ndSendRouterSolicitation) GetMessageName() string { return "ip6nd_send_router_solicitation" }
364 func (*IP6ndSendRouterSolicitation) GetCrcString() string { return "e5de609c" }
365 func (*IP6ndSendRouterSolicitation) GetMessageType() api.MessageType {
366 return api.RequestMessage
369 func (m *IP6ndSendRouterSolicitation) Size() (size int) {
377 size += 4 // m.SwIfIndex
381 func (m *IP6ndSendRouterSolicitation) Marshal(b []byte) ([]byte, error) {
383 b = make([]byte, m.Size())
385 buf := codec.NewBuffer(b)
386 buf.EncodeUint32(m.Irt)
387 buf.EncodeUint32(m.Mrt)
388 buf.EncodeUint32(m.Mrc)
389 buf.EncodeUint32(m.Mrd)
390 buf.EncodeUint32(uint32(m.SwIfIndex))
391 buf.EncodeBool(m.Stop)
392 return buf.Bytes(), nil
394 func (m *IP6ndSendRouterSolicitation) Unmarshal(b []byte) error {
395 buf := codec.NewBuffer(b)
396 m.Irt = buf.DecodeUint32()
397 m.Mrt = buf.DecodeUint32()
398 m.Mrc = buf.DecodeUint32()
399 m.Mrd = buf.DecodeUint32()
400 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
401 m.Stop = buf.DecodeBool()
405 // IP6ndSendRouterSolicitationReply defines message 'ip6nd_send_router_solicitation_reply'.
406 type IP6ndSendRouterSolicitationReply struct {
407 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
410 func (m *IP6ndSendRouterSolicitationReply) Reset() { *m = IP6ndSendRouterSolicitationReply{} }
411 func (*IP6ndSendRouterSolicitationReply) GetMessageName() string {
412 return "ip6nd_send_router_solicitation_reply"
414 func (*IP6ndSendRouterSolicitationReply) GetCrcString() string { return "e8d4e804" }
415 func (*IP6ndSendRouterSolicitationReply) GetMessageType() api.MessageType {
416 return api.ReplyMessage
419 func (m *IP6ndSendRouterSolicitationReply) Size() (size int) {
423 size += 4 // m.Retval
426 func (m *IP6ndSendRouterSolicitationReply) Marshal(b []byte) ([]byte, error) {
428 b = make([]byte, m.Size())
430 buf := codec.NewBuffer(b)
431 buf.EncodeInt32(m.Retval)
432 return buf.Bytes(), nil
434 func (m *IP6ndSendRouterSolicitationReply) Unmarshal(b []byte) error {
435 buf := codec.NewBuffer(b)
436 m.Retval = buf.DecodeInt32()
440 // SwInterfaceIP6ndRaConfig defines message 'sw_interface_ip6nd_ra_config'.
441 type SwInterfaceIP6ndRaConfig struct {
442 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
443 Suppress uint8 `binapi:"u8,name=suppress" json:"suppress,omitempty"`
444 Managed uint8 `binapi:"u8,name=managed" json:"managed,omitempty"`
445 Other uint8 `binapi:"u8,name=other" json:"other,omitempty"`
446 LlOption uint8 `binapi:"u8,name=ll_option" json:"ll_option,omitempty"`
447 SendUnicast uint8 `binapi:"u8,name=send_unicast" json:"send_unicast,omitempty"`
448 Cease uint8 `binapi:"u8,name=cease" json:"cease,omitempty"`
449 IsNo bool `binapi:"bool,name=is_no" json:"is_no,omitempty"`
450 DefaultRouter uint8 `binapi:"u8,name=default_router" json:"default_router,omitempty"`
451 MaxInterval uint32 `binapi:"u32,name=max_interval" json:"max_interval,omitempty"`
452 MinInterval uint32 `binapi:"u32,name=min_interval" json:"min_interval,omitempty"`
453 Lifetime uint32 `binapi:"u32,name=lifetime" json:"lifetime,omitempty"`
454 InitialCount uint32 `binapi:"u32,name=initial_count" json:"initial_count,omitempty"`
455 InitialInterval uint32 `binapi:"u32,name=initial_interval" json:"initial_interval,omitempty"`
458 func (m *SwInterfaceIP6ndRaConfig) Reset() { *m = SwInterfaceIP6ndRaConfig{} }
459 func (*SwInterfaceIP6ndRaConfig) GetMessageName() string { return "sw_interface_ip6nd_ra_config" }
460 func (*SwInterfaceIP6ndRaConfig) GetCrcString() string { return "3eb00b1c" }
461 func (*SwInterfaceIP6ndRaConfig) GetMessageType() api.MessageType {
462 return api.RequestMessage
465 func (m *SwInterfaceIP6ndRaConfig) Size() (size int) {
469 size += 4 // m.SwIfIndex
470 size += 1 // m.Suppress
471 size += 1 // m.Managed
473 size += 1 // m.LlOption
474 size += 1 // m.SendUnicast
477 size += 1 // m.DefaultRouter
478 size += 4 // m.MaxInterval
479 size += 4 // m.MinInterval
480 size += 4 // m.Lifetime
481 size += 4 // m.InitialCount
482 size += 4 // m.InitialInterval
485 func (m *SwInterfaceIP6ndRaConfig) Marshal(b []byte) ([]byte, error) {
487 b = make([]byte, m.Size())
489 buf := codec.NewBuffer(b)
490 buf.EncodeUint32(uint32(m.SwIfIndex))
491 buf.EncodeUint8(m.Suppress)
492 buf.EncodeUint8(m.Managed)
493 buf.EncodeUint8(m.Other)
494 buf.EncodeUint8(m.LlOption)
495 buf.EncodeUint8(m.SendUnicast)
496 buf.EncodeUint8(m.Cease)
497 buf.EncodeBool(m.IsNo)
498 buf.EncodeUint8(m.DefaultRouter)
499 buf.EncodeUint32(m.MaxInterval)
500 buf.EncodeUint32(m.MinInterval)
501 buf.EncodeUint32(m.Lifetime)
502 buf.EncodeUint32(m.InitialCount)
503 buf.EncodeUint32(m.InitialInterval)
504 return buf.Bytes(), nil
506 func (m *SwInterfaceIP6ndRaConfig) Unmarshal(b []byte) error {
507 buf := codec.NewBuffer(b)
508 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
509 m.Suppress = buf.DecodeUint8()
510 m.Managed = buf.DecodeUint8()
511 m.Other = buf.DecodeUint8()
512 m.LlOption = buf.DecodeUint8()
513 m.SendUnicast = buf.DecodeUint8()
514 m.Cease = buf.DecodeUint8()
515 m.IsNo = buf.DecodeBool()
516 m.DefaultRouter = buf.DecodeUint8()
517 m.MaxInterval = buf.DecodeUint32()
518 m.MinInterval = buf.DecodeUint32()
519 m.Lifetime = buf.DecodeUint32()
520 m.InitialCount = buf.DecodeUint32()
521 m.InitialInterval = buf.DecodeUint32()
525 // SwInterfaceIP6ndRaConfigReply defines message 'sw_interface_ip6nd_ra_config_reply'.
526 type SwInterfaceIP6ndRaConfigReply struct {
527 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
530 func (m *SwInterfaceIP6ndRaConfigReply) Reset() { *m = SwInterfaceIP6ndRaConfigReply{} }
531 func (*SwInterfaceIP6ndRaConfigReply) GetMessageName() string {
532 return "sw_interface_ip6nd_ra_config_reply"
534 func (*SwInterfaceIP6ndRaConfigReply) GetCrcString() string { return "e8d4e804" }
535 func (*SwInterfaceIP6ndRaConfigReply) GetMessageType() api.MessageType {
536 return api.ReplyMessage
539 func (m *SwInterfaceIP6ndRaConfigReply) Size() (size int) {
543 size += 4 // m.Retval
546 func (m *SwInterfaceIP6ndRaConfigReply) Marshal(b []byte) ([]byte, error) {
548 b = make([]byte, m.Size())
550 buf := codec.NewBuffer(b)
551 buf.EncodeInt32(m.Retval)
552 return buf.Bytes(), nil
554 func (m *SwInterfaceIP6ndRaConfigReply) Unmarshal(b []byte) error {
555 buf := codec.NewBuffer(b)
556 m.Retval = buf.DecodeInt32()
560 // SwInterfaceIP6ndRaPrefix defines message 'sw_interface_ip6nd_ra_prefix'.
561 type SwInterfaceIP6ndRaPrefix struct {
562 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
563 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
564 UseDefault bool `binapi:"bool,name=use_default" json:"use_default,omitempty"`
565 NoAdvertise bool `binapi:"bool,name=no_advertise" json:"no_advertise,omitempty"`
566 OffLink bool `binapi:"bool,name=off_link" json:"off_link,omitempty"`
567 NoAutoconfig bool `binapi:"bool,name=no_autoconfig" json:"no_autoconfig,omitempty"`
568 NoOnlink bool `binapi:"bool,name=no_onlink" json:"no_onlink,omitempty"`
569 IsNo bool `binapi:"bool,name=is_no" json:"is_no,omitempty"`
570 ValLifetime uint32 `binapi:"u32,name=val_lifetime" json:"val_lifetime,omitempty"`
571 PrefLifetime uint32 `binapi:"u32,name=pref_lifetime" json:"pref_lifetime,omitempty"`
574 func (m *SwInterfaceIP6ndRaPrefix) Reset() { *m = SwInterfaceIP6ndRaPrefix{} }
575 func (*SwInterfaceIP6ndRaPrefix) GetMessageName() string { return "sw_interface_ip6nd_ra_prefix" }
576 func (*SwInterfaceIP6ndRaPrefix) GetCrcString() string { return "82cc1b28" }
577 func (*SwInterfaceIP6ndRaPrefix) GetMessageType() api.MessageType {
578 return api.RequestMessage
581 func (m *SwInterfaceIP6ndRaPrefix) Size() (size int) {
585 size += 4 // m.SwIfIndex
586 size += 1 // m.Prefix.Address.Af
587 size += 1 * 16 // m.Prefix.Address.Un
588 size += 1 // m.Prefix.Len
589 size += 1 // m.UseDefault
590 size += 1 // m.NoAdvertise
591 size += 1 // m.OffLink
592 size += 1 // m.NoAutoconfig
593 size += 1 // m.NoOnlink
595 size += 4 // m.ValLifetime
596 size += 4 // m.PrefLifetime
599 func (m *SwInterfaceIP6ndRaPrefix) Marshal(b []byte) ([]byte, error) {
601 b = make([]byte, m.Size())
603 buf := codec.NewBuffer(b)
604 buf.EncodeUint32(uint32(m.SwIfIndex))
605 buf.EncodeUint8(uint8(m.Prefix.Address.Af))
606 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
607 buf.EncodeUint8(m.Prefix.Len)
608 buf.EncodeBool(m.UseDefault)
609 buf.EncodeBool(m.NoAdvertise)
610 buf.EncodeBool(m.OffLink)
611 buf.EncodeBool(m.NoAutoconfig)
612 buf.EncodeBool(m.NoOnlink)
613 buf.EncodeBool(m.IsNo)
614 buf.EncodeUint32(m.ValLifetime)
615 buf.EncodeUint32(m.PrefLifetime)
616 return buf.Bytes(), nil
618 func (m *SwInterfaceIP6ndRaPrefix) Unmarshal(b []byte) error {
619 buf := codec.NewBuffer(b)
620 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
621 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
622 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
623 m.Prefix.Len = buf.DecodeUint8()
624 m.UseDefault = buf.DecodeBool()
625 m.NoAdvertise = buf.DecodeBool()
626 m.OffLink = buf.DecodeBool()
627 m.NoAutoconfig = buf.DecodeBool()
628 m.NoOnlink = buf.DecodeBool()
629 m.IsNo = buf.DecodeBool()
630 m.ValLifetime = buf.DecodeUint32()
631 m.PrefLifetime = buf.DecodeUint32()
635 // SwInterfaceIP6ndRaPrefixReply defines message 'sw_interface_ip6nd_ra_prefix_reply'.
636 type SwInterfaceIP6ndRaPrefixReply struct {
637 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
640 func (m *SwInterfaceIP6ndRaPrefixReply) Reset() { *m = SwInterfaceIP6ndRaPrefixReply{} }
641 func (*SwInterfaceIP6ndRaPrefixReply) GetMessageName() string {
642 return "sw_interface_ip6nd_ra_prefix_reply"
644 func (*SwInterfaceIP6ndRaPrefixReply) GetCrcString() string { return "e8d4e804" }
645 func (*SwInterfaceIP6ndRaPrefixReply) GetMessageType() api.MessageType {
646 return api.ReplyMessage
649 func (m *SwInterfaceIP6ndRaPrefixReply) Size() (size int) {
653 size += 4 // m.Retval
656 func (m *SwInterfaceIP6ndRaPrefixReply) Marshal(b []byte) ([]byte, error) {
658 b = make([]byte, m.Size())
660 buf := codec.NewBuffer(b)
661 buf.EncodeInt32(m.Retval)
662 return buf.Bytes(), nil
664 func (m *SwInterfaceIP6ndRaPrefixReply) Unmarshal(b []byte) error {
665 buf := codec.NewBuffer(b)
666 m.Retval = buf.DecodeInt32()
670 // WantIP6RaEvents defines message 'want_ip6_ra_events'.
671 type WantIP6RaEvents struct {
672 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
673 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
676 func (m *WantIP6RaEvents) Reset() { *m = WantIP6RaEvents{} }
677 func (*WantIP6RaEvents) GetMessageName() string { return "want_ip6_ra_events" }
678 func (*WantIP6RaEvents) GetCrcString() string { return "3ec6d6c2" }
679 func (*WantIP6RaEvents) GetMessageType() api.MessageType {
680 return api.RequestMessage
683 func (m *WantIP6RaEvents) Size() (size int) {
687 size += 1 // m.Enable
691 func (m *WantIP6RaEvents) Marshal(b []byte) ([]byte, error) {
693 b = make([]byte, m.Size())
695 buf := codec.NewBuffer(b)
696 buf.EncodeBool(m.Enable)
697 buf.EncodeUint32(m.PID)
698 return buf.Bytes(), nil
700 func (m *WantIP6RaEvents) Unmarshal(b []byte) error {
701 buf := codec.NewBuffer(b)
702 m.Enable = buf.DecodeBool()
703 m.PID = buf.DecodeUint32()
707 // WantIP6RaEventsReply defines message 'want_ip6_ra_events_reply'.
708 type WantIP6RaEventsReply struct {
709 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
712 func (m *WantIP6RaEventsReply) Reset() { *m = WantIP6RaEventsReply{} }
713 func (*WantIP6RaEventsReply) GetMessageName() string { return "want_ip6_ra_events_reply" }
714 func (*WantIP6RaEventsReply) GetCrcString() string { return "e8d4e804" }
715 func (*WantIP6RaEventsReply) GetMessageType() api.MessageType {
716 return api.ReplyMessage
719 func (m *WantIP6RaEventsReply) Size() (size int) {
723 size += 4 // m.Retval
726 func (m *WantIP6RaEventsReply) Marshal(b []byte) ([]byte, error) {
728 b = make([]byte, m.Size())
730 buf := codec.NewBuffer(b)
731 buf.EncodeInt32(m.Retval)
732 return buf.Bytes(), nil
734 func (m *WantIP6RaEventsReply) Unmarshal(b []byte) error {
735 buf := codec.NewBuffer(b)
736 m.Retval = buf.DecodeInt32()
740 func init() { file_ip6_nd_binapi_init() }
741 func file_ip6_nd_binapi_init() {
742 api.RegisterMessage((*IP6RaEvent)(nil), "ip6_ra_event_0364c1c5")
743 api.RegisterMessage((*IP6ndProxyAddDel)(nil), "ip6nd_proxy_add_del_c2e4a686")
744 api.RegisterMessage((*IP6ndProxyAddDelReply)(nil), "ip6nd_proxy_add_del_reply_e8d4e804")
745 api.RegisterMessage((*IP6ndProxyDetails)(nil), "ip6nd_proxy_details_30b9ff4a")
746 api.RegisterMessage((*IP6ndProxyDump)(nil), "ip6nd_proxy_dump_51077d14")
747 api.RegisterMessage((*IP6ndProxyEnableDisable)(nil), "ip6nd_proxy_enable_disable_7daa1e3a")
748 api.RegisterMessage((*IP6ndProxyEnableDisableReply)(nil), "ip6nd_proxy_enable_disable_reply_e8d4e804")
749 api.RegisterMessage((*IP6ndSendRouterSolicitation)(nil), "ip6nd_send_router_solicitation_e5de609c")
750 api.RegisterMessage((*IP6ndSendRouterSolicitationReply)(nil), "ip6nd_send_router_solicitation_reply_e8d4e804")
751 api.RegisterMessage((*SwInterfaceIP6ndRaConfig)(nil), "sw_interface_ip6nd_ra_config_3eb00b1c")
752 api.RegisterMessage((*SwInterfaceIP6ndRaConfigReply)(nil), "sw_interface_ip6nd_ra_config_reply_e8d4e804")
753 api.RegisterMessage((*SwInterfaceIP6ndRaPrefix)(nil), "sw_interface_ip6nd_ra_prefix_82cc1b28")
754 api.RegisterMessage((*SwInterfaceIP6ndRaPrefixReply)(nil), "sw_interface_ip6nd_ra_prefix_reply_e8d4e804")
755 api.RegisterMessage((*WantIP6RaEvents)(nil), "want_ip6_ra_events_3ec6d6c2")
756 api.RegisterMessage((*WantIP6RaEventsReply)(nil), "want_ip6_ra_events_reply_e8d4e804")
759 // Messages returns list of all messages in this module.
760 func AllMessages() []api.Message {
761 return []api.Message{
763 (*IP6ndProxyAddDel)(nil),
764 (*IP6ndProxyAddDelReply)(nil),
765 (*IP6ndProxyDetails)(nil),
766 (*IP6ndProxyDump)(nil),
767 (*IP6ndProxyEnableDisable)(nil),
768 (*IP6ndProxyEnableDisableReply)(nil),
769 (*IP6ndSendRouterSolicitation)(nil),
770 (*IP6ndSendRouterSolicitationReply)(nil),
771 (*SwInterfaceIP6ndRaConfig)(nil),
772 (*SwInterfaceIP6ndRaConfigReply)(nil),
773 (*SwInterfaceIP6ndRaPrefix)(nil),
774 (*SwInterfaceIP6ndRaPrefixReply)(nil),
775 (*WantIP6RaEvents)(nil),
776 (*WantIP6RaEventsReply)(nil),