1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.3.5-56-gc0da1f2-dirty
5 // source: /usr/share/vpp/api/core/ip_neighbor.api.json
7 // Package ip_neighbor contains generated bindings for API file ip_neighbor.api.
19 api "git.fd.io/govpp.git/api"
20 ethernet_types "git.fd.io/govpp.git/binapi/ethernet_types"
21 interface_types "git.fd.io/govpp.git/binapi/interface_types"
22 ip_types "git.fd.io/govpp.git/binapi/ip_types"
23 codec "git.fd.io/govpp.git/codec"
26 // This is a compile-time assertion to ensure that this generated file
27 // is compatible with the GoVPP api package it is being compiled against.
28 // A compilation error at this line likely means your copy of the
29 // GoVPP api package needs to be updated.
30 const _ = api.GoVppAPIPackageIsVersion2
33 APIFile = "ip_neighbor"
35 VersionCrc = 0xfde4a69a
38 // IPNeighborEventFlags defines enum 'ip_neighbor_event_flags'.
39 type IPNeighborEventFlags uint32
42 IP_NEIGHBOR_API_EVENT_FLAG_ADDED IPNeighborEventFlags = 1
43 IP_NEIGHBOR_API_EVENT_FLAG_REMOVED IPNeighborEventFlags = 2
47 IPNeighborEventFlags_name = map[uint32]string{
48 1: "IP_NEIGHBOR_API_EVENT_FLAG_ADDED",
49 2: "IP_NEIGHBOR_API_EVENT_FLAG_REMOVED",
51 IPNeighborEventFlags_value = map[string]uint32{
52 "IP_NEIGHBOR_API_EVENT_FLAG_ADDED": 1,
53 "IP_NEIGHBOR_API_EVENT_FLAG_REMOVED": 2,
57 func (x IPNeighborEventFlags) String() string {
58 s, ok := IPNeighborEventFlags_name[uint32(x)]
62 str := func(n uint32) string {
63 s, ok := IPNeighborEventFlags_name[uint32(n)]
67 return "IPNeighborEventFlags(" + strconv.Itoa(int(n)) + ")"
69 for i := uint32(0); i <= 32; i++ {
84 // IPNeighborFlags defines enum 'ip_neighbor_flags'.
85 type IPNeighborFlags uint8
88 IP_API_NEIGHBOR_FLAG_NONE IPNeighborFlags = 0
89 IP_API_NEIGHBOR_FLAG_STATIC IPNeighborFlags = 1
90 IP_API_NEIGHBOR_FLAG_NO_FIB_ENTRY IPNeighborFlags = 2
94 IPNeighborFlags_name = map[uint8]string{
95 0: "IP_API_NEIGHBOR_FLAG_NONE",
96 1: "IP_API_NEIGHBOR_FLAG_STATIC",
97 2: "IP_API_NEIGHBOR_FLAG_NO_FIB_ENTRY",
99 IPNeighborFlags_value = map[string]uint8{
100 "IP_API_NEIGHBOR_FLAG_NONE": 0,
101 "IP_API_NEIGHBOR_FLAG_STATIC": 1,
102 "IP_API_NEIGHBOR_FLAG_NO_FIB_ENTRY": 2,
106 func (x IPNeighborFlags) String() string {
107 s, ok := IPNeighborFlags_name[uint8(x)]
111 str := func(n uint8) string {
112 s, ok := IPNeighborFlags_name[uint8(n)]
116 return "IPNeighborFlags(" + strconv.Itoa(int(n)) + ")"
118 for i := uint8(0); i <= 8; i++ {
133 // IPNeighbor defines type 'ip_neighbor'.
134 type IPNeighbor struct {
135 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
136 Flags IPNeighborFlags `binapi:"ip_neighbor_flags,name=flags" json:"flags,omitempty"`
137 MacAddress ethernet_types.MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
138 IPAddress ip_types.Address `binapi:"address,name=ip_address" json:"ip_address,omitempty"`
141 // IPNeighborAddDel defines message 'ip_neighbor_add_del'.
142 type IPNeighborAddDel struct {
143 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
144 Neighbor IPNeighbor `binapi:"ip_neighbor,name=neighbor" json:"neighbor,omitempty"`
147 func (m *IPNeighborAddDel) Reset() { *m = IPNeighborAddDel{} }
148 func (*IPNeighborAddDel) GetMessageName() string { return "ip_neighbor_add_del" }
149 func (*IPNeighborAddDel) GetCrcString() string { return "0607c257" }
150 func (*IPNeighborAddDel) GetMessageType() api.MessageType {
151 return api.RequestMessage
154 func (m *IPNeighborAddDel) Size() (size int) {
159 size += 4 // m.Neighbor.SwIfIndex
160 size += 1 // m.Neighbor.Flags
161 size += 1 * 6 // m.Neighbor.MacAddress
162 size += 1 // m.Neighbor.IPAddress.Af
163 size += 1 * 16 // m.Neighbor.IPAddress.Un
166 func (m *IPNeighborAddDel) Marshal(b []byte) ([]byte, error) {
168 b = make([]byte, m.Size())
170 buf := codec.NewBuffer(b)
171 buf.EncodeBool(m.IsAdd)
172 buf.EncodeUint32(uint32(m.Neighbor.SwIfIndex))
173 buf.EncodeUint8(uint8(m.Neighbor.Flags))
174 buf.EncodeBytes(m.Neighbor.MacAddress[:], 6)
175 buf.EncodeUint8(uint8(m.Neighbor.IPAddress.Af))
176 buf.EncodeBytes(m.Neighbor.IPAddress.Un.XXX_UnionData[:], 16)
177 return buf.Bytes(), nil
179 func (m *IPNeighborAddDel) Unmarshal(b []byte) error {
180 buf := codec.NewBuffer(b)
181 m.IsAdd = buf.DecodeBool()
182 m.Neighbor.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
183 m.Neighbor.Flags = IPNeighborFlags(buf.DecodeUint8())
184 copy(m.Neighbor.MacAddress[:], buf.DecodeBytes(6))
185 m.Neighbor.IPAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
186 copy(m.Neighbor.IPAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
190 // IPNeighborAddDelReply defines message 'ip_neighbor_add_del_reply'.
191 type IPNeighborAddDelReply struct {
192 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
193 StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
196 func (m *IPNeighborAddDelReply) Reset() { *m = IPNeighborAddDelReply{} }
197 func (*IPNeighborAddDelReply) GetMessageName() string { return "ip_neighbor_add_del_reply" }
198 func (*IPNeighborAddDelReply) GetCrcString() string { return "1992deab" }
199 func (*IPNeighborAddDelReply) GetMessageType() api.MessageType {
200 return api.ReplyMessage
203 func (m *IPNeighborAddDelReply) Size() (size int) {
207 size += 4 // m.Retval
208 size += 4 // m.StatsIndex
211 func (m *IPNeighborAddDelReply) Marshal(b []byte) ([]byte, error) {
213 b = make([]byte, m.Size())
215 buf := codec.NewBuffer(b)
216 buf.EncodeInt32(m.Retval)
217 buf.EncodeUint32(m.StatsIndex)
218 return buf.Bytes(), nil
220 func (m *IPNeighborAddDelReply) Unmarshal(b []byte) error {
221 buf := codec.NewBuffer(b)
222 m.Retval = buf.DecodeInt32()
223 m.StatsIndex = buf.DecodeUint32()
227 // IPNeighborConfig defines message 'ip_neighbor_config'.
228 type IPNeighborConfig struct {
229 Af ip_types.AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
230 MaxNumber uint32 `binapi:"u32,name=max_number" json:"max_number,omitempty"`
231 MaxAge uint32 `binapi:"u32,name=max_age" json:"max_age,omitempty"`
232 Recycle bool `binapi:"bool,name=recycle" json:"recycle,omitempty"`
235 func (m *IPNeighborConfig) Reset() { *m = IPNeighborConfig{} }
236 func (*IPNeighborConfig) GetMessageName() string { return "ip_neighbor_config" }
237 func (*IPNeighborConfig) GetCrcString() string { return "f4a5cf44" }
238 func (*IPNeighborConfig) GetMessageType() api.MessageType {
239 return api.RequestMessage
242 func (m *IPNeighborConfig) Size() (size int) {
247 size += 4 // m.MaxNumber
248 size += 4 // m.MaxAge
249 size += 1 // m.Recycle
252 func (m *IPNeighborConfig) Marshal(b []byte) ([]byte, error) {
254 b = make([]byte, m.Size())
256 buf := codec.NewBuffer(b)
257 buf.EncodeUint8(uint8(m.Af))
258 buf.EncodeUint32(m.MaxNumber)
259 buf.EncodeUint32(m.MaxAge)
260 buf.EncodeBool(m.Recycle)
261 return buf.Bytes(), nil
263 func (m *IPNeighborConfig) Unmarshal(b []byte) error {
264 buf := codec.NewBuffer(b)
265 m.Af = ip_types.AddressFamily(buf.DecodeUint8())
266 m.MaxNumber = buf.DecodeUint32()
267 m.MaxAge = buf.DecodeUint32()
268 m.Recycle = buf.DecodeBool()
272 // IPNeighborConfigReply defines message 'ip_neighbor_config_reply'.
273 type IPNeighborConfigReply struct {
274 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
277 func (m *IPNeighborConfigReply) Reset() { *m = IPNeighborConfigReply{} }
278 func (*IPNeighborConfigReply) GetMessageName() string { return "ip_neighbor_config_reply" }
279 func (*IPNeighborConfigReply) GetCrcString() string { return "e8d4e804" }
280 func (*IPNeighborConfigReply) GetMessageType() api.MessageType {
281 return api.ReplyMessage
284 func (m *IPNeighborConfigReply) Size() (size int) {
288 size += 4 // m.Retval
291 func (m *IPNeighborConfigReply) Marshal(b []byte) ([]byte, error) {
293 b = make([]byte, m.Size())
295 buf := codec.NewBuffer(b)
296 buf.EncodeInt32(m.Retval)
297 return buf.Bytes(), nil
299 func (m *IPNeighborConfigReply) Unmarshal(b []byte) error {
300 buf := codec.NewBuffer(b)
301 m.Retval = buf.DecodeInt32()
305 // IPNeighborDetails defines message 'ip_neighbor_details'.
306 type IPNeighborDetails struct {
307 Age float64 `binapi:"f64,name=age" json:"age,omitempty"`
308 Neighbor IPNeighbor `binapi:"ip_neighbor,name=neighbor" json:"neighbor,omitempty"`
311 func (m *IPNeighborDetails) Reset() { *m = IPNeighborDetails{} }
312 func (*IPNeighborDetails) GetMessageName() string { return "ip_neighbor_details" }
313 func (*IPNeighborDetails) GetCrcString() string { return "e29d79f0" }
314 func (*IPNeighborDetails) GetMessageType() api.MessageType {
315 return api.ReplyMessage
318 func (m *IPNeighborDetails) Size() (size int) {
323 size += 4 // m.Neighbor.SwIfIndex
324 size += 1 // m.Neighbor.Flags
325 size += 1 * 6 // m.Neighbor.MacAddress
326 size += 1 // m.Neighbor.IPAddress.Af
327 size += 1 * 16 // m.Neighbor.IPAddress.Un
330 func (m *IPNeighborDetails) Marshal(b []byte) ([]byte, error) {
332 b = make([]byte, m.Size())
334 buf := codec.NewBuffer(b)
335 buf.EncodeFloat64(m.Age)
336 buf.EncodeUint32(uint32(m.Neighbor.SwIfIndex))
337 buf.EncodeUint8(uint8(m.Neighbor.Flags))
338 buf.EncodeBytes(m.Neighbor.MacAddress[:], 6)
339 buf.EncodeUint8(uint8(m.Neighbor.IPAddress.Af))
340 buf.EncodeBytes(m.Neighbor.IPAddress.Un.XXX_UnionData[:], 16)
341 return buf.Bytes(), nil
343 func (m *IPNeighborDetails) Unmarshal(b []byte) error {
344 buf := codec.NewBuffer(b)
345 m.Age = buf.DecodeFloat64()
346 m.Neighbor.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
347 m.Neighbor.Flags = IPNeighborFlags(buf.DecodeUint8())
348 copy(m.Neighbor.MacAddress[:], buf.DecodeBytes(6))
349 m.Neighbor.IPAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
350 copy(m.Neighbor.IPAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
354 // IPNeighborDump defines message 'ip_neighbor_dump'.
355 type IPNeighborDump struct {
356 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
357 Af ip_types.AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
360 func (m *IPNeighborDump) Reset() { *m = IPNeighborDump{} }
361 func (*IPNeighborDump) GetMessageName() string { return "ip_neighbor_dump" }
362 func (*IPNeighborDump) GetCrcString() string { return "d817a484" }
363 func (*IPNeighborDump) GetMessageType() api.MessageType {
364 return api.RequestMessage
367 func (m *IPNeighborDump) Size() (size int) {
371 size += 4 // m.SwIfIndex
375 func (m *IPNeighborDump) Marshal(b []byte) ([]byte, error) {
377 b = make([]byte, m.Size())
379 buf := codec.NewBuffer(b)
380 buf.EncodeUint32(uint32(m.SwIfIndex))
381 buf.EncodeUint8(uint8(m.Af))
382 return buf.Bytes(), nil
384 func (m *IPNeighborDump) Unmarshal(b []byte) error {
385 buf := codec.NewBuffer(b)
386 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
387 m.Af = ip_types.AddressFamily(buf.DecodeUint8())
391 // IPNeighborEvent defines message 'ip_neighbor_event'.
392 // Deprecated: the message will be removed in the future versions
393 type IPNeighborEvent struct {
394 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
395 Neighbor IPNeighbor `binapi:"ip_neighbor,name=neighbor" json:"neighbor,omitempty"`
398 func (m *IPNeighborEvent) Reset() { *m = IPNeighborEvent{} }
399 func (*IPNeighborEvent) GetMessageName() string { return "ip_neighbor_event" }
400 func (*IPNeighborEvent) GetCrcString() string { return "bdb092b2" }
401 func (*IPNeighborEvent) GetMessageType() api.MessageType {
402 return api.EventMessage
405 func (m *IPNeighborEvent) Size() (size int) {
410 size += 4 // m.Neighbor.SwIfIndex
411 size += 1 // m.Neighbor.Flags
412 size += 1 * 6 // m.Neighbor.MacAddress
413 size += 1 // m.Neighbor.IPAddress.Af
414 size += 1 * 16 // m.Neighbor.IPAddress.Un
417 func (m *IPNeighborEvent) Marshal(b []byte) ([]byte, error) {
419 b = make([]byte, m.Size())
421 buf := codec.NewBuffer(b)
422 buf.EncodeUint32(m.PID)
423 buf.EncodeUint32(uint32(m.Neighbor.SwIfIndex))
424 buf.EncodeUint8(uint8(m.Neighbor.Flags))
425 buf.EncodeBytes(m.Neighbor.MacAddress[:], 6)
426 buf.EncodeUint8(uint8(m.Neighbor.IPAddress.Af))
427 buf.EncodeBytes(m.Neighbor.IPAddress.Un.XXX_UnionData[:], 16)
428 return buf.Bytes(), nil
430 func (m *IPNeighborEvent) Unmarshal(b []byte) error {
431 buf := codec.NewBuffer(b)
432 m.PID = buf.DecodeUint32()
433 m.Neighbor.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
434 m.Neighbor.Flags = IPNeighborFlags(buf.DecodeUint8())
435 copy(m.Neighbor.MacAddress[:], buf.DecodeBytes(6))
436 m.Neighbor.IPAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
437 copy(m.Neighbor.IPAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
441 // IPNeighborEventV2 defines message 'ip_neighbor_event_v2'.
442 type IPNeighborEventV2 struct {
443 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
444 Flags IPNeighborEventFlags `binapi:"ip_neighbor_event_flags,name=flags" json:"flags,omitempty"`
445 Neighbor IPNeighbor `binapi:"ip_neighbor,name=neighbor" json:"neighbor,omitempty"`
448 func (m *IPNeighborEventV2) Reset() { *m = IPNeighborEventV2{} }
449 func (*IPNeighborEventV2) GetMessageName() string { return "ip_neighbor_event_v2" }
450 func (*IPNeighborEventV2) GetCrcString() string { return "c1d53dc0" }
451 func (*IPNeighborEventV2) GetMessageType() api.MessageType {
452 return api.EventMessage
455 func (m *IPNeighborEventV2) Size() (size int) {
461 size += 4 // m.Neighbor.SwIfIndex
462 size += 1 // m.Neighbor.Flags
463 size += 1 * 6 // m.Neighbor.MacAddress
464 size += 1 // m.Neighbor.IPAddress.Af
465 size += 1 * 16 // m.Neighbor.IPAddress.Un
468 func (m *IPNeighborEventV2) Marshal(b []byte) ([]byte, error) {
470 b = make([]byte, m.Size())
472 buf := codec.NewBuffer(b)
473 buf.EncodeUint32(m.PID)
474 buf.EncodeUint32(uint32(m.Flags))
475 buf.EncodeUint32(uint32(m.Neighbor.SwIfIndex))
476 buf.EncodeUint8(uint8(m.Neighbor.Flags))
477 buf.EncodeBytes(m.Neighbor.MacAddress[:], 6)
478 buf.EncodeUint8(uint8(m.Neighbor.IPAddress.Af))
479 buf.EncodeBytes(m.Neighbor.IPAddress.Un.XXX_UnionData[:], 16)
480 return buf.Bytes(), nil
482 func (m *IPNeighborEventV2) Unmarshal(b []byte) error {
483 buf := codec.NewBuffer(b)
484 m.PID = buf.DecodeUint32()
485 m.Flags = IPNeighborEventFlags(buf.DecodeUint32())
486 m.Neighbor.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
487 m.Neighbor.Flags = IPNeighborFlags(buf.DecodeUint8())
488 copy(m.Neighbor.MacAddress[:], buf.DecodeBytes(6))
489 m.Neighbor.IPAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
490 copy(m.Neighbor.IPAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
494 // IPNeighborFlush defines message 'ip_neighbor_flush'.
495 type IPNeighborFlush struct {
496 Af ip_types.AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
497 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
500 func (m *IPNeighborFlush) Reset() { *m = IPNeighborFlush{} }
501 func (*IPNeighborFlush) GetMessageName() string { return "ip_neighbor_flush" }
502 func (*IPNeighborFlush) GetCrcString() string { return "16aa35d2" }
503 func (*IPNeighborFlush) GetMessageType() api.MessageType {
504 return api.RequestMessage
507 func (m *IPNeighborFlush) Size() (size int) {
512 size += 4 // m.SwIfIndex
515 func (m *IPNeighborFlush) Marshal(b []byte) ([]byte, error) {
517 b = make([]byte, m.Size())
519 buf := codec.NewBuffer(b)
520 buf.EncodeUint8(uint8(m.Af))
521 buf.EncodeUint32(uint32(m.SwIfIndex))
522 return buf.Bytes(), nil
524 func (m *IPNeighborFlush) Unmarshal(b []byte) error {
525 buf := codec.NewBuffer(b)
526 m.Af = ip_types.AddressFamily(buf.DecodeUint8())
527 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
531 // IPNeighborFlushReply defines message 'ip_neighbor_flush_reply'.
532 type IPNeighborFlushReply struct {
533 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
536 func (m *IPNeighborFlushReply) Reset() { *m = IPNeighborFlushReply{} }
537 func (*IPNeighborFlushReply) GetMessageName() string { return "ip_neighbor_flush_reply" }
538 func (*IPNeighborFlushReply) GetCrcString() string { return "e8d4e804" }
539 func (*IPNeighborFlushReply) GetMessageType() api.MessageType {
540 return api.ReplyMessage
543 func (m *IPNeighborFlushReply) Size() (size int) {
547 size += 4 // m.Retval
550 func (m *IPNeighborFlushReply) Marshal(b []byte) ([]byte, error) {
552 b = make([]byte, m.Size())
554 buf := codec.NewBuffer(b)
555 buf.EncodeInt32(m.Retval)
556 return buf.Bytes(), nil
558 func (m *IPNeighborFlushReply) Unmarshal(b []byte) error {
559 buf := codec.NewBuffer(b)
560 m.Retval = buf.DecodeInt32()
564 // IPNeighborReplaceBegin defines message 'ip_neighbor_replace_begin'.
565 type IPNeighborReplaceBegin struct{}
567 func (m *IPNeighborReplaceBegin) Reset() { *m = IPNeighborReplaceBegin{} }
568 func (*IPNeighborReplaceBegin) GetMessageName() string { return "ip_neighbor_replace_begin" }
569 func (*IPNeighborReplaceBegin) GetCrcString() string { return "51077d14" }
570 func (*IPNeighborReplaceBegin) GetMessageType() api.MessageType {
571 return api.RequestMessage
574 func (m *IPNeighborReplaceBegin) Size() (size int) {
580 func (m *IPNeighborReplaceBegin) Marshal(b []byte) ([]byte, error) {
582 b = make([]byte, m.Size())
584 buf := codec.NewBuffer(b)
585 return buf.Bytes(), nil
587 func (m *IPNeighborReplaceBegin) Unmarshal(b []byte) error {
591 // IPNeighborReplaceBeginReply defines message 'ip_neighbor_replace_begin_reply'.
592 type IPNeighborReplaceBeginReply struct {
593 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
596 func (m *IPNeighborReplaceBeginReply) Reset() { *m = IPNeighborReplaceBeginReply{} }
597 func (*IPNeighborReplaceBeginReply) GetMessageName() string { return "ip_neighbor_replace_begin_reply" }
598 func (*IPNeighborReplaceBeginReply) GetCrcString() string { return "e8d4e804" }
599 func (*IPNeighborReplaceBeginReply) GetMessageType() api.MessageType {
600 return api.ReplyMessage
603 func (m *IPNeighborReplaceBeginReply) Size() (size int) {
607 size += 4 // m.Retval
610 func (m *IPNeighborReplaceBeginReply) Marshal(b []byte) ([]byte, error) {
612 b = make([]byte, m.Size())
614 buf := codec.NewBuffer(b)
615 buf.EncodeInt32(m.Retval)
616 return buf.Bytes(), nil
618 func (m *IPNeighborReplaceBeginReply) Unmarshal(b []byte) error {
619 buf := codec.NewBuffer(b)
620 m.Retval = buf.DecodeInt32()
624 // IPNeighborReplaceEnd defines message 'ip_neighbor_replace_end'.
625 type IPNeighborReplaceEnd struct{}
627 func (m *IPNeighborReplaceEnd) Reset() { *m = IPNeighborReplaceEnd{} }
628 func (*IPNeighborReplaceEnd) GetMessageName() string { return "ip_neighbor_replace_end" }
629 func (*IPNeighborReplaceEnd) GetCrcString() string { return "51077d14" }
630 func (*IPNeighborReplaceEnd) GetMessageType() api.MessageType {
631 return api.RequestMessage
634 func (m *IPNeighborReplaceEnd) Size() (size int) {
640 func (m *IPNeighborReplaceEnd) Marshal(b []byte) ([]byte, error) {
642 b = make([]byte, m.Size())
644 buf := codec.NewBuffer(b)
645 return buf.Bytes(), nil
647 func (m *IPNeighborReplaceEnd) Unmarshal(b []byte) error {
651 // IPNeighborReplaceEndReply defines message 'ip_neighbor_replace_end_reply'.
652 type IPNeighborReplaceEndReply struct {
653 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
656 func (m *IPNeighborReplaceEndReply) Reset() { *m = IPNeighborReplaceEndReply{} }
657 func (*IPNeighborReplaceEndReply) GetMessageName() string { return "ip_neighbor_replace_end_reply" }
658 func (*IPNeighborReplaceEndReply) GetCrcString() string { return "e8d4e804" }
659 func (*IPNeighborReplaceEndReply) GetMessageType() api.MessageType {
660 return api.ReplyMessage
663 func (m *IPNeighborReplaceEndReply) Size() (size int) {
667 size += 4 // m.Retval
670 func (m *IPNeighborReplaceEndReply) Marshal(b []byte) ([]byte, error) {
672 b = make([]byte, m.Size())
674 buf := codec.NewBuffer(b)
675 buf.EncodeInt32(m.Retval)
676 return buf.Bytes(), nil
678 func (m *IPNeighborReplaceEndReply) Unmarshal(b []byte) error {
679 buf := codec.NewBuffer(b)
680 m.Retval = buf.DecodeInt32()
684 // WantIPNeighborEvents defines message 'want_ip_neighbor_events'.
685 // Deprecated: the message will be removed in the future versions
686 type WantIPNeighborEvents struct {
687 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
688 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
689 IP ip_types.Address `binapi:"address,name=ip" json:"ip,omitempty"`
690 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
693 func (m *WantIPNeighborEvents) Reset() { *m = WantIPNeighborEvents{} }
694 func (*WantIPNeighborEvents) GetMessageName() string { return "want_ip_neighbor_events" }
695 func (*WantIPNeighborEvents) GetCrcString() string { return "73e70a86" }
696 func (*WantIPNeighborEvents) GetMessageType() api.MessageType {
697 return api.RequestMessage
700 func (m *WantIPNeighborEvents) Size() (size int) {
704 size += 1 // m.Enable
707 size += 1 * 16 // m.IP.Un
708 size += 4 // m.SwIfIndex
711 func (m *WantIPNeighborEvents) Marshal(b []byte) ([]byte, error) {
713 b = make([]byte, m.Size())
715 buf := codec.NewBuffer(b)
716 buf.EncodeBool(m.Enable)
717 buf.EncodeUint32(m.PID)
718 buf.EncodeUint8(uint8(m.IP.Af))
719 buf.EncodeBytes(m.IP.Un.XXX_UnionData[:], 16)
720 buf.EncodeUint32(uint32(m.SwIfIndex))
721 return buf.Bytes(), nil
723 func (m *WantIPNeighborEvents) Unmarshal(b []byte) error {
724 buf := codec.NewBuffer(b)
725 m.Enable = buf.DecodeBool()
726 m.PID = buf.DecodeUint32()
727 m.IP.Af = ip_types.AddressFamily(buf.DecodeUint8())
728 copy(m.IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
729 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
733 // WantIPNeighborEventsReply defines message 'want_ip_neighbor_events_reply'.
734 // Deprecated: the message will be removed in the future versions
735 type WantIPNeighborEventsReply struct {
736 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
739 func (m *WantIPNeighborEventsReply) Reset() { *m = WantIPNeighborEventsReply{} }
740 func (*WantIPNeighborEventsReply) GetMessageName() string { return "want_ip_neighbor_events_reply" }
741 func (*WantIPNeighborEventsReply) GetCrcString() string { return "e8d4e804" }
742 func (*WantIPNeighborEventsReply) GetMessageType() api.MessageType {
743 return api.ReplyMessage
746 func (m *WantIPNeighborEventsReply) Size() (size int) {
750 size += 4 // m.Retval
753 func (m *WantIPNeighborEventsReply) Marshal(b []byte) ([]byte, error) {
755 b = make([]byte, m.Size())
757 buf := codec.NewBuffer(b)
758 buf.EncodeInt32(m.Retval)
759 return buf.Bytes(), nil
761 func (m *WantIPNeighborEventsReply) Unmarshal(b []byte) error {
762 buf := codec.NewBuffer(b)
763 m.Retval = buf.DecodeInt32()
767 // WantIPNeighborEventsV2 defines message 'want_ip_neighbor_events_v2'.
768 type WantIPNeighborEventsV2 struct {
769 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
770 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
771 IP ip_types.Address `binapi:"address,name=ip" json:"ip,omitempty"`
772 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
775 func (m *WantIPNeighborEventsV2) Reset() { *m = WantIPNeighborEventsV2{} }
776 func (*WantIPNeighborEventsV2) GetMessageName() string { return "want_ip_neighbor_events_v2" }
777 func (*WantIPNeighborEventsV2) GetCrcString() string { return "73e70a86" }
778 func (*WantIPNeighborEventsV2) GetMessageType() api.MessageType {
779 return api.RequestMessage
782 func (m *WantIPNeighborEventsV2) Size() (size int) {
786 size += 1 // m.Enable
789 size += 1 * 16 // m.IP.Un
790 size += 4 // m.SwIfIndex
793 func (m *WantIPNeighborEventsV2) Marshal(b []byte) ([]byte, error) {
795 b = make([]byte, m.Size())
797 buf := codec.NewBuffer(b)
798 buf.EncodeBool(m.Enable)
799 buf.EncodeUint32(m.PID)
800 buf.EncodeUint8(uint8(m.IP.Af))
801 buf.EncodeBytes(m.IP.Un.XXX_UnionData[:], 16)
802 buf.EncodeUint32(uint32(m.SwIfIndex))
803 return buf.Bytes(), nil
805 func (m *WantIPNeighborEventsV2) Unmarshal(b []byte) error {
806 buf := codec.NewBuffer(b)
807 m.Enable = buf.DecodeBool()
808 m.PID = buf.DecodeUint32()
809 m.IP.Af = ip_types.AddressFamily(buf.DecodeUint8())
810 copy(m.IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
811 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
815 // WantIPNeighborEventsV2Reply defines message 'want_ip_neighbor_events_v2_reply'.
816 type WantIPNeighborEventsV2Reply struct {
817 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
820 func (m *WantIPNeighborEventsV2Reply) Reset() { *m = WantIPNeighborEventsV2Reply{} }
821 func (*WantIPNeighborEventsV2Reply) GetMessageName() string {
822 return "want_ip_neighbor_events_v2_reply"
824 func (*WantIPNeighborEventsV2Reply) GetCrcString() string { return "e8d4e804" }
825 func (*WantIPNeighborEventsV2Reply) GetMessageType() api.MessageType {
826 return api.ReplyMessage
829 func (m *WantIPNeighborEventsV2Reply) Size() (size int) {
833 size += 4 // m.Retval
836 func (m *WantIPNeighborEventsV2Reply) Marshal(b []byte) ([]byte, error) {
838 b = make([]byte, m.Size())
840 buf := codec.NewBuffer(b)
841 buf.EncodeInt32(m.Retval)
842 return buf.Bytes(), nil
844 func (m *WantIPNeighborEventsV2Reply) Unmarshal(b []byte) error {
845 buf := codec.NewBuffer(b)
846 m.Retval = buf.DecodeInt32()
850 func init() { file_ip_neighbor_binapi_init() }
851 func file_ip_neighbor_binapi_init() {
852 api.RegisterMessage((*IPNeighborAddDel)(nil), "ip_neighbor_add_del_0607c257")
853 api.RegisterMessage((*IPNeighborAddDelReply)(nil), "ip_neighbor_add_del_reply_1992deab")
854 api.RegisterMessage((*IPNeighborConfig)(nil), "ip_neighbor_config_f4a5cf44")
855 api.RegisterMessage((*IPNeighborConfigReply)(nil), "ip_neighbor_config_reply_e8d4e804")
856 api.RegisterMessage((*IPNeighborDetails)(nil), "ip_neighbor_details_e29d79f0")
857 api.RegisterMessage((*IPNeighborDump)(nil), "ip_neighbor_dump_d817a484")
858 api.RegisterMessage((*IPNeighborEvent)(nil), "ip_neighbor_event_bdb092b2")
859 api.RegisterMessage((*IPNeighborEventV2)(nil), "ip_neighbor_event_v2_c1d53dc0")
860 api.RegisterMessage((*IPNeighborFlush)(nil), "ip_neighbor_flush_16aa35d2")
861 api.RegisterMessage((*IPNeighborFlushReply)(nil), "ip_neighbor_flush_reply_e8d4e804")
862 api.RegisterMessage((*IPNeighborReplaceBegin)(nil), "ip_neighbor_replace_begin_51077d14")
863 api.RegisterMessage((*IPNeighborReplaceBeginReply)(nil), "ip_neighbor_replace_begin_reply_e8d4e804")
864 api.RegisterMessage((*IPNeighborReplaceEnd)(nil), "ip_neighbor_replace_end_51077d14")
865 api.RegisterMessage((*IPNeighborReplaceEndReply)(nil), "ip_neighbor_replace_end_reply_e8d4e804")
866 api.RegisterMessage((*WantIPNeighborEvents)(nil), "want_ip_neighbor_events_73e70a86")
867 api.RegisterMessage((*WantIPNeighborEventsReply)(nil), "want_ip_neighbor_events_reply_e8d4e804")
868 api.RegisterMessage((*WantIPNeighborEventsV2)(nil), "want_ip_neighbor_events_v2_73e70a86")
869 api.RegisterMessage((*WantIPNeighborEventsV2Reply)(nil), "want_ip_neighbor_events_v2_reply_e8d4e804")
872 // Messages returns list of all messages in this module.
873 func AllMessages() []api.Message {
874 return []api.Message{
875 (*IPNeighborAddDel)(nil),
876 (*IPNeighborAddDelReply)(nil),
877 (*IPNeighborConfig)(nil),
878 (*IPNeighborConfigReply)(nil),
879 (*IPNeighborDetails)(nil),
880 (*IPNeighborDump)(nil),
881 (*IPNeighborEvent)(nil),
882 (*IPNeighborEventV2)(nil),
883 (*IPNeighborFlush)(nil),
884 (*IPNeighborFlushReply)(nil),
885 (*IPNeighborReplaceBegin)(nil),
886 (*IPNeighborReplaceBeginReply)(nil),
887 (*IPNeighborReplaceEnd)(nil),
888 (*IPNeighborReplaceEndReply)(nil),
889 (*WantIPNeighborEvents)(nil),
890 (*WantIPNeighborEventsReply)(nil),
891 (*WantIPNeighborEventsV2)(nil),
892 (*WantIPNeighborEventsV2Reply)(nil),