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/ip_neighbor.api.json
7 // Package ip_neighbor contains generated bindings for API file ip_neighbor.api.
17 api "git.fd.io/govpp.git/api"
18 ethernet_types "git.fd.io/govpp.git/binapi/ethernet_types"
19 interface_types "git.fd.io/govpp.git/binapi/interface_types"
20 ip_types "git.fd.io/govpp.git/binapi/ip_types"
21 codec "git.fd.io/govpp.git/codec"
25 // This is a compile-time assertion to ensure that this generated file
26 // is compatible with the GoVPP api package it is being compiled against.
27 // A compilation error at this line likely means your copy of the
28 // GoVPP api package needs to be updated.
29 const _ = api.GoVppAPIPackageIsVersion2
32 APIFile = "ip_neighbor"
34 VersionCrc = 0xe6512b94
37 // IPNeighborFlags defines enum 'ip_neighbor_flags'.
38 type IPNeighborFlags uint8
41 IP_API_NEIGHBOR_FLAG_NONE IPNeighborFlags = 0
42 IP_API_NEIGHBOR_FLAG_STATIC IPNeighborFlags = 1
43 IP_API_NEIGHBOR_FLAG_NO_FIB_ENTRY IPNeighborFlags = 2
47 IPNeighborFlags_name = map[uint8]string{
48 0: "IP_API_NEIGHBOR_FLAG_NONE",
49 1: "IP_API_NEIGHBOR_FLAG_STATIC",
50 2: "IP_API_NEIGHBOR_FLAG_NO_FIB_ENTRY",
52 IPNeighborFlags_value = map[string]uint8{
53 "IP_API_NEIGHBOR_FLAG_NONE": 0,
54 "IP_API_NEIGHBOR_FLAG_STATIC": 1,
55 "IP_API_NEIGHBOR_FLAG_NO_FIB_ENTRY": 2,
59 func (x IPNeighborFlags) String() string {
60 s, ok := IPNeighborFlags_name[uint8(x)]
64 str := func(n uint8) string {
65 s, ok := IPNeighborFlags_name[uint8(n)]
69 return "IPNeighborFlags(" + strconv.Itoa(int(n)) + ")"
71 for i := uint8(0); i <= 8; i++ {
86 // IPNeighbor defines type 'ip_neighbor'.
87 type IPNeighbor struct {
88 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
89 Flags IPNeighborFlags `binapi:"ip_neighbor_flags,name=flags" json:"flags,omitempty"`
90 MacAddress ethernet_types.MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
91 IPAddress ip_types.Address `binapi:"address,name=ip_address" json:"ip_address,omitempty"`
94 // IPNeighborAddDel defines message 'ip_neighbor_add_del'.
95 type IPNeighborAddDel struct {
96 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
97 Neighbor IPNeighbor `binapi:"ip_neighbor,name=neighbor" json:"neighbor,omitempty"`
100 func (m *IPNeighborAddDel) Reset() { *m = IPNeighborAddDel{} }
101 func (*IPNeighborAddDel) GetMessageName() string { return "ip_neighbor_add_del" }
102 func (*IPNeighborAddDel) GetCrcString() string { return "105518b6" }
103 func (*IPNeighborAddDel) GetMessageType() api.MessageType {
104 return api.RequestMessage
107 func (m *IPNeighborAddDel) Size() int {
113 size += 4 // m.Neighbor.SwIfIndex
114 size += 1 // m.Neighbor.Flags
115 size += 1 * 6 // m.Neighbor.MacAddress
116 size += 1 // m.Neighbor.IPAddress.Af
117 size += 1 * 16 // m.Neighbor.IPAddress.Un
120 func (m *IPNeighborAddDel) Marshal(b []byte) ([]byte, error) {
121 var buf *codec.Buffer
123 buf = codec.NewBuffer(make([]byte, m.Size()))
125 buf = codec.NewBuffer(b)
127 buf.EncodeBool(m.IsAdd)
128 buf.EncodeUint32(uint32(m.Neighbor.SwIfIndex))
129 buf.EncodeUint8(uint8(m.Neighbor.Flags))
130 buf.EncodeBytes(m.Neighbor.MacAddress[:], 6)
131 buf.EncodeUint8(uint8(m.Neighbor.IPAddress.Af))
132 buf.EncodeBytes(m.Neighbor.IPAddress.Un.XXX_UnionData[:], 0)
133 return buf.Bytes(), nil
135 func (m *IPNeighborAddDel) Unmarshal(b []byte) error {
136 buf := codec.NewBuffer(b)
137 m.IsAdd = buf.DecodeBool()
138 m.Neighbor.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
139 m.Neighbor.Flags = IPNeighborFlags(buf.DecodeUint8())
140 copy(m.Neighbor.MacAddress[:], buf.DecodeBytes(6))
141 m.Neighbor.IPAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
142 copy(m.Neighbor.IPAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
146 // IPNeighborAddDelReply defines message 'ip_neighbor_add_del_reply'.
147 type IPNeighborAddDelReply struct {
148 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
149 StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
152 func (m *IPNeighborAddDelReply) Reset() { *m = IPNeighborAddDelReply{} }
153 func (*IPNeighborAddDelReply) GetMessageName() string { return "ip_neighbor_add_del_reply" }
154 func (*IPNeighborAddDelReply) GetCrcString() string { return "1992deab" }
155 func (*IPNeighborAddDelReply) GetMessageType() api.MessageType {
156 return api.ReplyMessage
159 func (m *IPNeighborAddDelReply) Size() int {
164 size += 4 // m.Retval
165 size += 4 // m.StatsIndex
168 func (m *IPNeighborAddDelReply) Marshal(b []byte) ([]byte, error) {
169 var buf *codec.Buffer
171 buf = codec.NewBuffer(make([]byte, m.Size()))
173 buf = codec.NewBuffer(b)
175 buf.EncodeUint32(uint32(m.Retval))
176 buf.EncodeUint32(uint32(m.StatsIndex))
177 return buf.Bytes(), nil
179 func (m *IPNeighborAddDelReply) Unmarshal(b []byte) error {
180 buf := codec.NewBuffer(b)
181 m.Retval = int32(buf.DecodeUint32())
182 m.StatsIndex = buf.DecodeUint32()
186 // IPNeighborConfig defines message 'ip_neighbor_config'.
187 type IPNeighborConfig struct {
188 Af ip_types.AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
189 MaxNumber uint32 `binapi:"u32,name=max_number" json:"max_number,omitempty"`
190 MaxAge uint32 `binapi:"u32,name=max_age" json:"max_age,omitempty"`
191 Recycle bool `binapi:"bool,name=recycle" json:"recycle,omitempty"`
194 func (m *IPNeighborConfig) Reset() { *m = IPNeighborConfig{} }
195 func (*IPNeighborConfig) GetMessageName() string { return "ip_neighbor_config" }
196 func (*IPNeighborConfig) GetCrcString() string { return "f4a5cf44" }
197 func (*IPNeighborConfig) GetMessageType() api.MessageType {
198 return api.RequestMessage
201 func (m *IPNeighborConfig) Size() int {
207 size += 4 // m.MaxNumber
208 size += 4 // m.MaxAge
209 size += 1 // m.Recycle
212 func (m *IPNeighborConfig) Marshal(b []byte) ([]byte, error) {
213 var buf *codec.Buffer
215 buf = codec.NewBuffer(make([]byte, m.Size()))
217 buf = codec.NewBuffer(b)
219 buf.EncodeUint8(uint8(m.Af))
220 buf.EncodeUint32(uint32(m.MaxNumber))
221 buf.EncodeUint32(uint32(m.MaxAge))
222 buf.EncodeBool(m.Recycle)
223 return buf.Bytes(), nil
225 func (m *IPNeighborConfig) Unmarshal(b []byte) error {
226 buf := codec.NewBuffer(b)
227 m.Af = ip_types.AddressFamily(buf.DecodeUint8())
228 m.MaxNumber = buf.DecodeUint32()
229 m.MaxAge = buf.DecodeUint32()
230 m.Recycle = buf.DecodeBool()
234 // IPNeighborConfigReply defines message 'ip_neighbor_config_reply'.
235 type IPNeighborConfigReply struct {
236 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
239 func (m *IPNeighborConfigReply) Reset() { *m = IPNeighborConfigReply{} }
240 func (*IPNeighborConfigReply) GetMessageName() string { return "ip_neighbor_config_reply" }
241 func (*IPNeighborConfigReply) GetCrcString() string { return "e8d4e804" }
242 func (*IPNeighborConfigReply) GetMessageType() api.MessageType {
243 return api.ReplyMessage
246 func (m *IPNeighborConfigReply) Size() int {
251 size += 4 // m.Retval
254 func (m *IPNeighborConfigReply) Marshal(b []byte) ([]byte, error) {
255 var buf *codec.Buffer
257 buf = codec.NewBuffer(make([]byte, m.Size()))
259 buf = codec.NewBuffer(b)
261 buf.EncodeUint32(uint32(m.Retval))
262 return buf.Bytes(), nil
264 func (m *IPNeighborConfigReply) Unmarshal(b []byte) error {
265 buf := codec.NewBuffer(b)
266 m.Retval = int32(buf.DecodeUint32())
270 // IPNeighborDetails defines message 'ip_neighbor_details'.
271 type IPNeighborDetails struct {
272 Age float64 `binapi:"f64,name=age" json:"age,omitempty"`
273 Neighbor IPNeighbor `binapi:"ip_neighbor,name=neighbor" json:"neighbor,omitempty"`
276 func (m *IPNeighborDetails) Reset() { *m = IPNeighborDetails{} }
277 func (*IPNeighborDetails) GetMessageName() string { return "ip_neighbor_details" }
278 func (*IPNeighborDetails) GetCrcString() string { return "870e80b9" }
279 func (*IPNeighborDetails) GetMessageType() api.MessageType {
280 return api.ReplyMessage
283 func (m *IPNeighborDetails) Size() int {
289 size += 4 // m.Neighbor.SwIfIndex
290 size += 1 // m.Neighbor.Flags
291 size += 1 * 6 // m.Neighbor.MacAddress
292 size += 1 // m.Neighbor.IPAddress.Af
293 size += 1 * 16 // m.Neighbor.IPAddress.Un
296 func (m *IPNeighborDetails) Marshal(b []byte) ([]byte, error) {
297 var buf *codec.Buffer
299 buf = codec.NewBuffer(make([]byte, m.Size()))
301 buf = codec.NewBuffer(b)
303 buf.EncodeFloat64(float64(m.Age))
304 buf.EncodeUint32(uint32(m.Neighbor.SwIfIndex))
305 buf.EncodeUint8(uint8(m.Neighbor.Flags))
306 buf.EncodeBytes(m.Neighbor.MacAddress[:], 6)
307 buf.EncodeUint8(uint8(m.Neighbor.IPAddress.Af))
308 buf.EncodeBytes(m.Neighbor.IPAddress.Un.XXX_UnionData[:], 0)
309 return buf.Bytes(), nil
311 func (m *IPNeighborDetails) Unmarshal(b []byte) error {
312 buf := codec.NewBuffer(b)
313 m.Age = float64(buf.DecodeFloat64())
314 m.Neighbor.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
315 m.Neighbor.Flags = IPNeighborFlags(buf.DecodeUint8())
316 copy(m.Neighbor.MacAddress[:], buf.DecodeBytes(6))
317 m.Neighbor.IPAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
318 copy(m.Neighbor.IPAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
322 // IPNeighborDump defines message 'ip_neighbor_dump'.
323 type IPNeighborDump struct {
324 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=%!s(float64=4.294967295e+09)" json:"sw_if_index,omitempty"`
325 Af ip_types.AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
328 func (m *IPNeighborDump) Reset() { *m = IPNeighborDump{} }
329 func (*IPNeighborDump) GetMessageName() string { return "ip_neighbor_dump" }
330 func (*IPNeighborDump) GetCrcString() string { return "cd831298" }
331 func (*IPNeighborDump) GetMessageType() api.MessageType {
332 return api.RequestMessage
335 func (m *IPNeighborDump) Size() int {
340 size += 4 // m.SwIfIndex
344 func (m *IPNeighborDump) Marshal(b []byte) ([]byte, error) {
345 var buf *codec.Buffer
347 buf = codec.NewBuffer(make([]byte, m.Size()))
349 buf = codec.NewBuffer(b)
351 buf.EncodeUint32(uint32(m.SwIfIndex))
352 buf.EncodeUint8(uint8(m.Af))
353 return buf.Bytes(), nil
355 func (m *IPNeighborDump) Unmarshal(b []byte) error {
356 buf := codec.NewBuffer(b)
357 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
358 m.Af = ip_types.AddressFamily(buf.DecodeUint8())
362 // IPNeighborEvent defines message 'ip_neighbor_event'.
363 type IPNeighborEvent struct {
364 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
365 Neighbor IPNeighbor `binapi:"ip_neighbor,name=neighbor" json:"neighbor,omitempty"`
368 func (m *IPNeighborEvent) Reset() { *m = IPNeighborEvent{} }
369 func (*IPNeighborEvent) GetMessageName() string { return "ip_neighbor_event" }
370 func (*IPNeighborEvent) GetCrcString() string { return "83933131" }
371 func (*IPNeighborEvent) GetMessageType() api.MessageType {
372 return api.EventMessage
375 func (m *IPNeighborEvent) Size() int {
381 size += 4 // m.Neighbor.SwIfIndex
382 size += 1 // m.Neighbor.Flags
383 size += 1 * 6 // m.Neighbor.MacAddress
384 size += 1 // m.Neighbor.IPAddress.Af
385 size += 1 * 16 // m.Neighbor.IPAddress.Un
388 func (m *IPNeighborEvent) Marshal(b []byte) ([]byte, error) {
389 var buf *codec.Buffer
391 buf = codec.NewBuffer(make([]byte, m.Size()))
393 buf = codec.NewBuffer(b)
395 buf.EncodeUint32(uint32(m.PID))
396 buf.EncodeUint32(uint32(m.Neighbor.SwIfIndex))
397 buf.EncodeUint8(uint8(m.Neighbor.Flags))
398 buf.EncodeBytes(m.Neighbor.MacAddress[:], 6)
399 buf.EncodeUint8(uint8(m.Neighbor.IPAddress.Af))
400 buf.EncodeBytes(m.Neighbor.IPAddress.Un.XXX_UnionData[:], 0)
401 return buf.Bytes(), nil
403 func (m *IPNeighborEvent) Unmarshal(b []byte) error {
404 buf := codec.NewBuffer(b)
405 m.PID = buf.DecodeUint32()
406 m.Neighbor.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
407 m.Neighbor.Flags = IPNeighborFlags(buf.DecodeUint8())
408 copy(m.Neighbor.MacAddress[:], buf.DecodeBytes(6))
409 m.Neighbor.IPAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
410 copy(m.Neighbor.IPAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
414 // IPNeighborFlush defines message 'ip_neighbor_flush'.
415 type IPNeighborFlush struct {
416 Af ip_types.AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
417 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=%!s(float64=4.294967295e+09)" json:"sw_if_index,omitempty"`
420 func (m *IPNeighborFlush) Reset() { *m = IPNeighborFlush{} }
421 func (*IPNeighborFlush) GetMessageName() string { return "ip_neighbor_flush" }
422 func (*IPNeighborFlush) GetCrcString() string { return "16aa35d2" }
423 func (*IPNeighborFlush) GetMessageType() api.MessageType {
424 return api.RequestMessage
427 func (m *IPNeighborFlush) Size() int {
433 size += 4 // m.SwIfIndex
436 func (m *IPNeighborFlush) Marshal(b []byte) ([]byte, error) {
437 var buf *codec.Buffer
439 buf = codec.NewBuffer(make([]byte, m.Size()))
441 buf = codec.NewBuffer(b)
443 buf.EncodeUint8(uint8(m.Af))
444 buf.EncodeUint32(uint32(m.SwIfIndex))
445 return buf.Bytes(), nil
447 func (m *IPNeighborFlush) Unmarshal(b []byte) error {
448 buf := codec.NewBuffer(b)
449 m.Af = ip_types.AddressFamily(buf.DecodeUint8())
450 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
454 // IPNeighborFlushReply defines message 'ip_neighbor_flush_reply'.
455 type IPNeighborFlushReply struct {
456 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
459 func (m *IPNeighborFlushReply) Reset() { *m = IPNeighborFlushReply{} }
460 func (*IPNeighborFlushReply) GetMessageName() string { return "ip_neighbor_flush_reply" }
461 func (*IPNeighborFlushReply) GetCrcString() string { return "e8d4e804" }
462 func (*IPNeighborFlushReply) GetMessageType() api.MessageType {
463 return api.ReplyMessage
466 func (m *IPNeighborFlushReply) Size() int {
471 size += 4 // m.Retval
474 func (m *IPNeighborFlushReply) Marshal(b []byte) ([]byte, error) {
475 var buf *codec.Buffer
477 buf = codec.NewBuffer(make([]byte, m.Size()))
479 buf = codec.NewBuffer(b)
481 buf.EncodeUint32(uint32(m.Retval))
482 return buf.Bytes(), nil
484 func (m *IPNeighborFlushReply) Unmarshal(b []byte) error {
485 buf := codec.NewBuffer(b)
486 m.Retval = int32(buf.DecodeUint32())
490 // IPNeighborReplaceBegin defines message 'ip_neighbor_replace_begin'.
491 type IPNeighborReplaceBegin struct{}
493 func (m *IPNeighborReplaceBegin) Reset() { *m = IPNeighborReplaceBegin{} }
494 func (*IPNeighborReplaceBegin) GetMessageName() string { return "ip_neighbor_replace_begin" }
495 func (*IPNeighborReplaceBegin) GetCrcString() string { return "51077d14" }
496 func (*IPNeighborReplaceBegin) GetMessageType() api.MessageType {
497 return api.RequestMessage
500 func (m *IPNeighborReplaceBegin) Size() int {
507 func (m *IPNeighborReplaceBegin) Marshal(b []byte) ([]byte, error) {
508 var buf *codec.Buffer
510 buf = codec.NewBuffer(make([]byte, m.Size()))
512 buf = codec.NewBuffer(b)
514 return buf.Bytes(), nil
516 func (m *IPNeighborReplaceBegin) Unmarshal(b []byte) error {
520 // IPNeighborReplaceBeginReply defines message 'ip_neighbor_replace_begin_reply'.
521 type IPNeighborReplaceBeginReply struct {
522 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
525 func (m *IPNeighborReplaceBeginReply) Reset() { *m = IPNeighborReplaceBeginReply{} }
526 func (*IPNeighborReplaceBeginReply) GetMessageName() string { return "ip_neighbor_replace_begin_reply" }
527 func (*IPNeighborReplaceBeginReply) GetCrcString() string { return "e8d4e804" }
528 func (*IPNeighborReplaceBeginReply) GetMessageType() api.MessageType {
529 return api.ReplyMessage
532 func (m *IPNeighborReplaceBeginReply) Size() int {
537 size += 4 // m.Retval
540 func (m *IPNeighborReplaceBeginReply) Marshal(b []byte) ([]byte, error) {
541 var buf *codec.Buffer
543 buf = codec.NewBuffer(make([]byte, m.Size()))
545 buf = codec.NewBuffer(b)
547 buf.EncodeUint32(uint32(m.Retval))
548 return buf.Bytes(), nil
550 func (m *IPNeighborReplaceBeginReply) Unmarshal(b []byte) error {
551 buf := codec.NewBuffer(b)
552 m.Retval = int32(buf.DecodeUint32())
556 // IPNeighborReplaceEnd defines message 'ip_neighbor_replace_end'.
557 type IPNeighborReplaceEnd struct{}
559 func (m *IPNeighborReplaceEnd) Reset() { *m = IPNeighborReplaceEnd{} }
560 func (*IPNeighborReplaceEnd) GetMessageName() string { return "ip_neighbor_replace_end" }
561 func (*IPNeighborReplaceEnd) GetCrcString() string { return "51077d14" }
562 func (*IPNeighborReplaceEnd) GetMessageType() api.MessageType {
563 return api.RequestMessage
566 func (m *IPNeighborReplaceEnd) Size() int {
573 func (m *IPNeighborReplaceEnd) Marshal(b []byte) ([]byte, error) {
574 var buf *codec.Buffer
576 buf = codec.NewBuffer(make([]byte, m.Size()))
578 buf = codec.NewBuffer(b)
580 return buf.Bytes(), nil
582 func (m *IPNeighborReplaceEnd) Unmarshal(b []byte) error {
586 // IPNeighborReplaceEndReply defines message 'ip_neighbor_replace_end_reply'.
587 type IPNeighborReplaceEndReply struct {
588 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
591 func (m *IPNeighborReplaceEndReply) Reset() { *m = IPNeighborReplaceEndReply{} }
592 func (*IPNeighborReplaceEndReply) GetMessageName() string { return "ip_neighbor_replace_end_reply" }
593 func (*IPNeighborReplaceEndReply) GetCrcString() string { return "e8d4e804" }
594 func (*IPNeighborReplaceEndReply) GetMessageType() api.MessageType {
595 return api.ReplyMessage
598 func (m *IPNeighborReplaceEndReply) Size() int {
603 size += 4 // m.Retval
606 func (m *IPNeighborReplaceEndReply) Marshal(b []byte) ([]byte, error) {
607 var buf *codec.Buffer
609 buf = codec.NewBuffer(make([]byte, m.Size()))
611 buf = codec.NewBuffer(b)
613 buf.EncodeUint32(uint32(m.Retval))
614 return buf.Bytes(), nil
616 func (m *IPNeighborReplaceEndReply) Unmarshal(b []byte) error {
617 buf := codec.NewBuffer(b)
618 m.Retval = int32(buf.DecodeUint32())
622 // WantIPNeighborEvents defines message 'want_ip_neighbor_events'.
623 type WantIPNeighborEvents struct {
624 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
625 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
626 IP ip_types.Address `binapi:"address,name=ip" json:"ip,omitempty"`
627 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=%!s(float64=4.294967295e+09)" json:"sw_if_index,omitempty"`
630 func (m *WantIPNeighborEvents) Reset() { *m = WantIPNeighborEvents{} }
631 func (*WantIPNeighborEvents) GetMessageName() string { return "want_ip_neighbor_events" }
632 func (*WantIPNeighborEvents) GetCrcString() string { return "1a312870" }
633 func (*WantIPNeighborEvents) GetMessageType() api.MessageType {
634 return api.RequestMessage
637 func (m *WantIPNeighborEvents) Size() int {
642 size += 1 // m.Enable
645 size += 1 * 16 // m.IP.Un
646 size += 4 // m.SwIfIndex
649 func (m *WantIPNeighborEvents) Marshal(b []byte) ([]byte, error) {
650 var buf *codec.Buffer
652 buf = codec.NewBuffer(make([]byte, m.Size()))
654 buf = codec.NewBuffer(b)
656 buf.EncodeBool(m.Enable)
657 buf.EncodeUint32(uint32(m.PID))
658 buf.EncodeUint8(uint8(m.IP.Af))
659 buf.EncodeBytes(m.IP.Un.XXX_UnionData[:], 0)
660 buf.EncodeUint32(uint32(m.SwIfIndex))
661 return buf.Bytes(), nil
663 func (m *WantIPNeighborEvents) Unmarshal(b []byte) error {
664 buf := codec.NewBuffer(b)
665 m.Enable = buf.DecodeBool()
666 m.PID = buf.DecodeUint32()
667 m.IP.Af = ip_types.AddressFamily(buf.DecodeUint8())
668 copy(m.IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
669 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
673 // WantIPNeighborEventsReply defines message 'want_ip_neighbor_events_reply'.
674 type WantIPNeighborEventsReply struct {
675 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
678 func (m *WantIPNeighborEventsReply) Reset() { *m = WantIPNeighborEventsReply{} }
679 func (*WantIPNeighborEventsReply) GetMessageName() string { return "want_ip_neighbor_events_reply" }
680 func (*WantIPNeighborEventsReply) GetCrcString() string { return "e8d4e804" }
681 func (*WantIPNeighborEventsReply) GetMessageType() api.MessageType {
682 return api.ReplyMessage
685 func (m *WantIPNeighborEventsReply) Size() int {
690 size += 4 // m.Retval
693 func (m *WantIPNeighborEventsReply) Marshal(b []byte) ([]byte, error) {
694 var buf *codec.Buffer
696 buf = codec.NewBuffer(make([]byte, m.Size()))
698 buf = codec.NewBuffer(b)
700 buf.EncodeUint32(uint32(m.Retval))
701 return buf.Bytes(), nil
703 func (m *WantIPNeighborEventsReply) Unmarshal(b []byte) error {
704 buf := codec.NewBuffer(b)
705 m.Retval = int32(buf.DecodeUint32())
709 func init() { file_ip_neighbor_binapi_init() }
710 func file_ip_neighbor_binapi_init() {
711 api.RegisterMessage((*IPNeighborAddDel)(nil), "ip_neighbor_add_del_105518b6")
712 api.RegisterMessage((*IPNeighborAddDelReply)(nil), "ip_neighbor_add_del_reply_1992deab")
713 api.RegisterMessage((*IPNeighborConfig)(nil), "ip_neighbor_config_f4a5cf44")
714 api.RegisterMessage((*IPNeighborConfigReply)(nil), "ip_neighbor_config_reply_e8d4e804")
715 api.RegisterMessage((*IPNeighborDetails)(nil), "ip_neighbor_details_870e80b9")
716 api.RegisterMessage((*IPNeighborDump)(nil), "ip_neighbor_dump_cd831298")
717 api.RegisterMessage((*IPNeighborEvent)(nil), "ip_neighbor_event_83933131")
718 api.RegisterMessage((*IPNeighborFlush)(nil), "ip_neighbor_flush_16aa35d2")
719 api.RegisterMessage((*IPNeighborFlushReply)(nil), "ip_neighbor_flush_reply_e8d4e804")
720 api.RegisterMessage((*IPNeighborReplaceBegin)(nil), "ip_neighbor_replace_begin_51077d14")
721 api.RegisterMessage((*IPNeighborReplaceBeginReply)(nil), "ip_neighbor_replace_begin_reply_e8d4e804")
722 api.RegisterMessage((*IPNeighborReplaceEnd)(nil), "ip_neighbor_replace_end_51077d14")
723 api.RegisterMessage((*IPNeighborReplaceEndReply)(nil), "ip_neighbor_replace_end_reply_e8d4e804")
724 api.RegisterMessage((*WantIPNeighborEvents)(nil), "want_ip_neighbor_events_1a312870")
725 api.RegisterMessage((*WantIPNeighborEventsReply)(nil), "want_ip_neighbor_events_reply_e8d4e804")
728 // Messages returns list of all messages in this module.
729 func AllMessages() []api.Message {
730 return []api.Message{
731 (*IPNeighborAddDel)(nil),
732 (*IPNeighborAddDelReply)(nil),
733 (*IPNeighborConfig)(nil),
734 (*IPNeighborConfigReply)(nil),
735 (*IPNeighborDetails)(nil),
736 (*IPNeighborDump)(nil),
737 (*IPNeighborEvent)(nil),
738 (*IPNeighborFlush)(nil),
739 (*IPNeighborFlushReply)(nil),
740 (*IPNeighborReplaceBegin)(nil),
741 (*IPNeighborReplaceBeginReply)(nil),
742 (*IPNeighborReplaceEnd)(nil),
743 (*IPNeighborReplaceEndReply)(nil),
744 (*WantIPNeighborEvents)(nil),
745 (*WantIPNeighborEventsReply)(nil),