1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.5.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 = 0x90f5895b
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 // IP6ndSendRouterSolicitation defines message 'ip6nd_send_router_solicitation'.
281 type IP6ndSendRouterSolicitation struct {
282 Irt uint32 `binapi:"u32,name=irt" json:"irt,omitempty"`
283 Mrt uint32 `binapi:"u32,name=mrt" json:"mrt,omitempty"`
284 Mrc uint32 `binapi:"u32,name=mrc" json:"mrc,omitempty"`
285 Mrd uint32 `binapi:"u32,name=mrd" json:"mrd,omitempty"`
286 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
287 Stop bool `binapi:"bool,name=stop" json:"stop,omitempty"`
290 func (m *IP6ndSendRouterSolicitation) Reset() { *m = IP6ndSendRouterSolicitation{} }
291 func (*IP6ndSendRouterSolicitation) GetMessageName() string { return "ip6nd_send_router_solicitation" }
292 func (*IP6ndSendRouterSolicitation) GetCrcString() string { return "e5de609c" }
293 func (*IP6ndSendRouterSolicitation) GetMessageType() api.MessageType {
294 return api.RequestMessage
297 func (m *IP6ndSendRouterSolicitation) Size() (size int) {
305 size += 4 // m.SwIfIndex
309 func (m *IP6ndSendRouterSolicitation) Marshal(b []byte) ([]byte, error) {
311 b = make([]byte, m.Size())
313 buf := codec.NewBuffer(b)
314 buf.EncodeUint32(m.Irt)
315 buf.EncodeUint32(m.Mrt)
316 buf.EncodeUint32(m.Mrc)
317 buf.EncodeUint32(m.Mrd)
318 buf.EncodeUint32(uint32(m.SwIfIndex))
319 buf.EncodeBool(m.Stop)
320 return buf.Bytes(), nil
322 func (m *IP6ndSendRouterSolicitation) Unmarshal(b []byte) error {
323 buf := codec.NewBuffer(b)
324 m.Irt = buf.DecodeUint32()
325 m.Mrt = buf.DecodeUint32()
326 m.Mrc = buf.DecodeUint32()
327 m.Mrd = buf.DecodeUint32()
328 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
329 m.Stop = buf.DecodeBool()
333 // IP6ndSendRouterSolicitationReply defines message 'ip6nd_send_router_solicitation_reply'.
334 type IP6ndSendRouterSolicitationReply struct {
335 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
338 func (m *IP6ndSendRouterSolicitationReply) Reset() { *m = IP6ndSendRouterSolicitationReply{} }
339 func (*IP6ndSendRouterSolicitationReply) GetMessageName() string {
340 return "ip6nd_send_router_solicitation_reply"
342 func (*IP6ndSendRouterSolicitationReply) GetCrcString() string { return "e8d4e804" }
343 func (*IP6ndSendRouterSolicitationReply) GetMessageType() api.MessageType {
344 return api.ReplyMessage
347 func (m *IP6ndSendRouterSolicitationReply) Size() (size int) {
351 size += 4 // m.Retval
354 func (m *IP6ndSendRouterSolicitationReply) Marshal(b []byte) ([]byte, error) {
356 b = make([]byte, m.Size())
358 buf := codec.NewBuffer(b)
359 buf.EncodeInt32(m.Retval)
360 return buf.Bytes(), nil
362 func (m *IP6ndSendRouterSolicitationReply) Unmarshal(b []byte) error {
363 buf := codec.NewBuffer(b)
364 m.Retval = buf.DecodeInt32()
368 // SwInterfaceIP6ndRaConfig defines message 'sw_interface_ip6nd_ra_config'.
369 type SwInterfaceIP6ndRaConfig struct {
370 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
371 Suppress uint8 `binapi:"u8,name=suppress" json:"suppress,omitempty"`
372 Managed uint8 `binapi:"u8,name=managed" json:"managed,omitempty"`
373 Other uint8 `binapi:"u8,name=other" json:"other,omitempty"`
374 LlOption uint8 `binapi:"u8,name=ll_option" json:"ll_option,omitempty"`
375 SendUnicast uint8 `binapi:"u8,name=send_unicast" json:"send_unicast,omitempty"`
376 Cease uint8 `binapi:"u8,name=cease" json:"cease,omitempty"`
377 IsNo bool `binapi:"bool,name=is_no" json:"is_no,omitempty"`
378 DefaultRouter uint8 `binapi:"u8,name=default_router" json:"default_router,omitempty"`
379 MaxInterval uint32 `binapi:"u32,name=max_interval" json:"max_interval,omitempty"`
380 MinInterval uint32 `binapi:"u32,name=min_interval" json:"min_interval,omitempty"`
381 Lifetime uint32 `binapi:"u32,name=lifetime" json:"lifetime,omitempty"`
382 InitialCount uint32 `binapi:"u32,name=initial_count" json:"initial_count,omitempty"`
383 InitialInterval uint32 `binapi:"u32,name=initial_interval" json:"initial_interval,omitempty"`
386 func (m *SwInterfaceIP6ndRaConfig) Reset() { *m = SwInterfaceIP6ndRaConfig{} }
387 func (*SwInterfaceIP6ndRaConfig) GetMessageName() string { return "sw_interface_ip6nd_ra_config" }
388 func (*SwInterfaceIP6ndRaConfig) GetCrcString() string { return "3eb00b1c" }
389 func (*SwInterfaceIP6ndRaConfig) GetMessageType() api.MessageType {
390 return api.RequestMessage
393 func (m *SwInterfaceIP6ndRaConfig) Size() (size int) {
397 size += 4 // m.SwIfIndex
398 size += 1 // m.Suppress
399 size += 1 // m.Managed
401 size += 1 // m.LlOption
402 size += 1 // m.SendUnicast
405 size += 1 // m.DefaultRouter
406 size += 4 // m.MaxInterval
407 size += 4 // m.MinInterval
408 size += 4 // m.Lifetime
409 size += 4 // m.InitialCount
410 size += 4 // m.InitialInterval
413 func (m *SwInterfaceIP6ndRaConfig) Marshal(b []byte) ([]byte, error) {
415 b = make([]byte, m.Size())
417 buf := codec.NewBuffer(b)
418 buf.EncodeUint32(uint32(m.SwIfIndex))
419 buf.EncodeUint8(m.Suppress)
420 buf.EncodeUint8(m.Managed)
421 buf.EncodeUint8(m.Other)
422 buf.EncodeUint8(m.LlOption)
423 buf.EncodeUint8(m.SendUnicast)
424 buf.EncodeUint8(m.Cease)
425 buf.EncodeBool(m.IsNo)
426 buf.EncodeUint8(m.DefaultRouter)
427 buf.EncodeUint32(m.MaxInterval)
428 buf.EncodeUint32(m.MinInterval)
429 buf.EncodeUint32(m.Lifetime)
430 buf.EncodeUint32(m.InitialCount)
431 buf.EncodeUint32(m.InitialInterval)
432 return buf.Bytes(), nil
434 func (m *SwInterfaceIP6ndRaConfig) Unmarshal(b []byte) error {
435 buf := codec.NewBuffer(b)
436 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
437 m.Suppress = buf.DecodeUint8()
438 m.Managed = buf.DecodeUint8()
439 m.Other = buf.DecodeUint8()
440 m.LlOption = buf.DecodeUint8()
441 m.SendUnicast = buf.DecodeUint8()
442 m.Cease = buf.DecodeUint8()
443 m.IsNo = buf.DecodeBool()
444 m.DefaultRouter = buf.DecodeUint8()
445 m.MaxInterval = buf.DecodeUint32()
446 m.MinInterval = buf.DecodeUint32()
447 m.Lifetime = buf.DecodeUint32()
448 m.InitialCount = buf.DecodeUint32()
449 m.InitialInterval = buf.DecodeUint32()
453 // SwInterfaceIP6ndRaConfigReply defines message 'sw_interface_ip6nd_ra_config_reply'.
454 type SwInterfaceIP6ndRaConfigReply struct {
455 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
458 func (m *SwInterfaceIP6ndRaConfigReply) Reset() { *m = SwInterfaceIP6ndRaConfigReply{} }
459 func (*SwInterfaceIP6ndRaConfigReply) GetMessageName() string {
460 return "sw_interface_ip6nd_ra_config_reply"
462 func (*SwInterfaceIP6ndRaConfigReply) GetCrcString() string { return "e8d4e804" }
463 func (*SwInterfaceIP6ndRaConfigReply) GetMessageType() api.MessageType {
464 return api.ReplyMessage
467 func (m *SwInterfaceIP6ndRaConfigReply) Size() (size int) {
471 size += 4 // m.Retval
474 func (m *SwInterfaceIP6ndRaConfigReply) Marshal(b []byte) ([]byte, error) {
476 b = make([]byte, m.Size())
478 buf := codec.NewBuffer(b)
479 buf.EncodeInt32(m.Retval)
480 return buf.Bytes(), nil
482 func (m *SwInterfaceIP6ndRaConfigReply) Unmarshal(b []byte) error {
483 buf := codec.NewBuffer(b)
484 m.Retval = buf.DecodeInt32()
488 // SwInterfaceIP6ndRaPrefix defines message 'sw_interface_ip6nd_ra_prefix'.
489 type SwInterfaceIP6ndRaPrefix struct {
490 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
491 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
492 UseDefault bool `binapi:"bool,name=use_default" json:"use_default,omitempty"`
493 NoAdvertise bool `binapi:"bool,name=no_advertise" json:"no_advertise,omitempty"`
494 OffLink bool `binapi:"bool,name=off_link" json:"off_link,omitempty"`
495 NoAutoconfig bool `binapi:"bool,name=no_autoconfig" json:"no_autoconfig,omitempty"`
496 NoOnlink bool `binapi:"bool,name=no_onlink" json:"no_onlink,omitempty"`
497 IsNo bool `binapi:"bool,name=is_no" json:"is_no,omitempty"`
498 ValLifetime uint32 `binapi:"u32,name=val_lifetime" json:"val_lifetime,omitempty"`
499 PrefLifetime uint32 `binapi:"u32,name=pref_lifetime" json:"pref_lifetime,omitempty"`
502 func (m *SwInterfaceIP6ndRaPrefix) Reset() { *m = SwInterfaceIP6ndRaPrefix{} }
503 func (*SwInterfaceIP6ndRaPrefix) GetMessageName() string { return "sw_interface_ip6nd_ra_prefix" }
504 func (*SwInterfaceIP6ndRaPrefix) GetCrcString() string { return "82cc1b28" }
505 func (*SwInterfaceIP6ndRaPrefix) GetMessageType() api.MessageType {
506 return api.RequestMessage
509 func (m *SwInterfaceIP6ndRaPrefix) Size() (size int) {
513 size += 4 // m.SwIfIndex
514 size += 1 // m.Prefix.Address.Af
515 size += 1 * 16 // m.Prefix.Address.Un
516 size += 1 // m.Prefix.Len
517 size += 1 // m.UseDefault
518 size += 1 // m.NoAdvertise
519 size += 1 // m.OffLink
520 size += 1 // m.NoAutoconfig
521 size += 1 // m.NoOnlink
523 size += 4 // m.ValLifetime
524 size += 4 // m.PrefLifetime
527 func (m *SwInterfaceIP6ndRaPrefix) Marshal(b []byte) ([]byte, error) {
529 b = make([]byte, m.Size())
531 buf := codec.NewBuffer(b)
532 buf.EncodeUint32(uint32(m.SwIfIndex))
533 buf.EncodeUint8(uint8(m.Prefix.Address.Af))
534 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
535 buf.EncodeUint8(m.Prefix.Len)
536 buf.EncodeBool(m.UseDefault)
537 buf.EncodeBool(m.NoAdvertise)
538 buf.EncodeBool(m.OffLink)
539 buf.EncodeBool(m.NoAutoconfig)
540 buf.EncodeBool(m.NoOnlink)
541 buf.EncodeBool(m.IsNo)
542 buf.EncodeUint32(m.ValLifetime)
543 buf.EncodeUint32(m.PrefLifetime)
544 return buf.Bytes(), nil
546 func (m *SwInterfaceIP6ndRaPrefix) Unmarshal(b []byte) error {
547 buf := codec.NewBuffer(b)
548 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
549 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
550 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
551 m.Prefix.Len = buf.DecodeUint8()
552 m.UseDefault = buf.DecodeBool()
553 m.NoAdvertise = buf.DecodeBool()
554 m.OffLink = buf.DecodeBool()
555 m.NoAutoconfig = buf.DecodeBool()
556 m.NoOnlink = buf.DecodeBool()
557 m.IsNo = buf.DecodeBool()
558 m.ValLifetime = buf.DecodeUint32()
559 m.PrefLifetime = buf.DecodeUint32()
563 // SwInterfaceIP6ndRaPrefixReply defines message 'sw_interface_ip6nd_ra_prefix_reply'.
564 type SwInterfaceIP6ndRaPrefixReply struct {
565 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
568 func (m *SwInterfaceIP6ndRaPrefixReply) Reset() { *m = SwInterfaceIP6ndRaPrefixReply{} }
569 func (*SwInterfaceIP6ndRaPrefixReply) GetMessageName() string {
570 return "sw_interface_ip6nd_ra_prefix_reply"
572 func (*SwInterfaceIP6ndRaPrefixReply) GetCrcString() string { return "e8d4e804" }
573 func (*SwInterfaceIP6ndRaPrefixReply) GetMessageType() api.MessageType {
574 return api.ReplyMessage
577 func (m *SwInterfaceIP6ndRaPrefixReply) Size() (size int) {
581 size += 4 // m.Retval
584 func (m *SwInterfaceIP6ndRaPrefixReply) Marshal(b []byte) ([]byte, error) {
586 b = make([]byte, m.Size())
588 buf := codec.NewBuffer(b)
589 buf.EncodeInt32(m.Retval)
590 return buf.Bytes(), nil
592 func (m *SwInterfaceIP6ndRaPrefixReply) Unmarshal(b []byte) error {
593 buf := codec.NewBuffer(b)
594 m.Retval = buf.DecodeInt32()
598 // WantIP6RaEvents defines message 'want_ip6_ra_events'.
599 type WantIP6RaEvents struct {
600 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
601 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
604 func (m *WantIP6RaEvents) Reset() { *m = WantIP6RaEvents{} }
605 func (*WantIP6RaEvents) GetMessageName() string { return "want_ip6_ra_events" }
606 func (*WantIP6RaEvents) GetCrcString() string { return "3ec6d6c2" }
607 func (*WantIP6RaEvents) GetMessageType() api.MessageType {
608 return api.RequestMessage
611 func (m *WantIP6RaEvents) Size() (size int) {
615 size += 1 // m.Enable
619 func (m *WantIP6RaEvents) Marshal(b []byte) ([]byte, error) {
621 b = make([]byte, m.Size())
623 buf := codec.NewBuffer(b)
624 buf.EncodeBool(m.Enable)
625 buf.EncodeUint32(m.PID)
626 return buf.Bytes(), nil
628 func (m *WantIP6RaEvents) Unmarshal(b []byte) error {
629 buf := codec.NewBuffer(b)
630 m.Enable = buf.DecodeBool()
631 m.PID = buf.DecodeUint32()
635 // WantIP6RaEventsReply defines message 'want_ip6_ra_events_reply'.
636 type WantIP6RaEventsReply struct {
637 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
640 func (m *WantIP6RaEventsReply) Reset() { *m = WantIP6RaEventsReply{} }
641 func (*WantIP6RaEventsReply) GetMessageName() string { return "want_ip6_ra_events_reply" }
642 func (*WantIP6RaEventsReply) GetCrcString() string { return "e8d4e804" }
643 func (*WantIP6RaEventsReply) GetMessageType() api.MessageType {
644 return api.ReplyMessage
647 func (m *WantIP6RaEventsReply) Size() (size int) {
651 size += 4 // m.Retval
654 func (m *WantIP6RaEventsReply) Marshal(b []byte) ([]byte, error) {
656 b = make([]byte, m.Size())
658 buf := codec.NewBuffer(b)
659 buf.EncodeInt32(m.Retval)
660 return buf.Bytes(), nil
662 func (m *WantIP6RaEventsReply) Unmarshal(b []byte) error {
663 buf := codec.NewBuffer(b)
664 m.Retval = buf.DecodeInt32()
668 func init() { file_ip6_nd_binapi_init() }
669 func file_ip6_nd_binapi_init() {
670 api.RegisterMessage((*IP6RaEvent)(nil), "ip6_ra_event_0364c1c5")
671 api.RegisterMessage((*IP6ndProxyAddDel)(nil), "ip6nd_proxy_add_del_c2e4a686")
672 api.RegisterMessage((*IP6ndProxyAddDelReply)(nil), "ip6nd_proxy_add_del_reply_e8d4e804")
673 api.RegisterMessage((*IP6ndProxyDetails)(nil), "ip6nd_proxy_details_30b9ff4a")
674 api.RegisterMessage((*IP6ndProxyDump)(nil), "ip6nd_proxy_dump_51077d14")
675 api.RegisterMessage((*IP6ndSendRouterSolicitation)(nil), "ip6nd_send_router_solicitation_e5de609c")
676 api.RegisterMessage((*IP6ndSendRouterSolicitationReply)(nil), "ip6nd_send_router_solicitation_reply_e8d4e804")
677 api.RegisterMessage((*SwInterfaceIP6ndRaConfig)(nil), "sw_interface_ip6nd_ra_config_3eb00b1c")
678 api.RegisterMessage((*SwInterfaceIP6ndRaConfigReply)(nil), "sw_interface_ip6nd_ra_config_reply_e8d4e804")
679 api.RegisterMessage((*SwInterfaceIP6ndRaPrefix)(nil), "sw_interface_ip6nd_ra_prefix_82cc1b28")
680 api.RegisterMessage((*SwInterfaceIP6ndRaPrefixReply)(nil), "sw_interface_ip6nd_ra_prefix_reply_e8d4e804")
681 api.RegisterMessage((*WantIP6RaEvents)(nil), "want_ip6_ra_events_3ec6d6c2")
682 api.RegisterMessage((*WantIP6RaEventsReply)(nil), "want_ip6_ra_events_reply_e8d4e804")
685 // Messages returns list of all messages in this module.
686 func AllMessages() []api.Message {
687 return []api.Message{
689 (*IP6ndProxyAddDel)(nil),
690 (*IP6ndProxyAddDelReply)(nil),
691 (*IP6ndProxyDetails)(nil),
692 (*IP6ndProxyDump)(nil),
693 (*IP6ndSendRouterSolicitation)(nil),
694 (*IP6ndSendRouterSolicitationReply)(nil),
695 (*SwInterfaceIP6ndRaConfig)(nil),
696 (*SwInterfaceIP6ndRaConfigReply)(nil),
697 (*SwInterfaceIP6ndRaPrefix)(nil),
698 (*SwInterfaceIP6ndRaPrefixReply)(nil),
699 (*WantIP6RaEvents)(nil),
700 (*WantIP6RaEventsReply)(nil),