2ece5ee6c5ae0d7bf86ab08e2c427f17973da3bf
[govpp.git] / binapi / ip_neighbor / ip_neighbor.ba.go
1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
2 // versions:
3 //  binapi-generator: v0.4.0-dev
4 //  VPP:              20.05-release
5
6 // Package ip_neighbor contains generated bindings for API file ip_neighbor.api.
7 //
8 // Contents:
9 //   1 enum
10 //   1 struct
11 //  15 messages
12 //
13 package ip_neighbor
14
15 import (
16         "strconv"
17
18         api "git.fd.io/govpp.git/api"
19         ethernet_types "git.fd.io/govpp.git/binapi/ethernet_types"
20         interface_types "git.fd.io/govpp.git/binapi/interface_types"
21         ip_types "git.fd.io/govpp.git/binapi/ip_types"
22         codec "git.fd.io/govpp.git/codec"
23 )
24
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
30
31 const (
32         APIFile    = "ip_neighbor"
33         APIVersion = "1.0.0"
34         VersionCrc = 0xe6512b94
35 )
36
37 // IPNeighborFlags defines enum 'ip_neighbor_flags'.
38 type IPNeighborFlags uint8
39
40 const (
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
44 )
45
46 var (
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",
51         }
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,
56         }
57 )
58
59 func (x IPNeighborFlags) String() string {
60         s, ok := IPNeighborFlags_name[uint8(x)]
61         if ok {
62                 return s
63         }
64         str := func(n uint8) string {
65                 s, ok := IPNeighborFlags_name[uint8(n)]
66                 if ok {
67                         return s
68                 }
69                 return "IPNeighborFlags(" + strconv.Itoa(int(n)) + ")"
70         }
71         for i := uint8(0); i <= 8; i++ {
72                 val := uint8(x)
73                 if val&(1<<i) != 0 {
74                         if s != "" {
75                                 s += "|"
76                         }
77                         s += str(1 << i)
78                 }
79         }
80         if s == "" {
81                 return str(uint8(x))
82         }
83         return s
84 }
85
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"`
92 }
93
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"`
98 }
99
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
105 }
106
107 func (m *IPNeighborAddDel) Size() (size int) {
108         if m == nil {
109                 return 0
110         }
111         size += 1      // m.IsAdd
112         size += 4      // m.Neighbor.SwIfIndex
113         size += 1      // m.Neighbor.Flags
114         size += 1 * 6  // m.Neighbor.MacAddress
115         size += 1      // m.Neighbor.IPAddress.Af
116         size += 1 * 16 // m.Neighbor.IPAddress.Un
117         return size
118 }
119 func (m *IPNeighborAddDel) Marshal(b []byte) ([]byte, error) {
120         if b == nil {
121                 b = make([]byte, m.Size())
122         }
123         buf := codec.NewBuffer(b)
124         buf.EncodeBool(m.IsAdd)
125         buf.EncodeUint32(uint32(m.Neighbor.SwIfIndex))
126         buf.EncodeUint8(uint8(m.Neighbor.Flags))
127         buf.EncodeBytes(m.Neighbor.MacAddress[:], 6)
128         buf.EncodeUint8(uint8(m.Neighbor.IPAddress.Af))
129         buf.EncodeBytes(m.Neighbor.IPAddress.Un.XXX_UnionData[:], 16)
130         return buf.Bytes(), nil
131 }
132 func (m *IPNeighborAddDel) Unmarshal(b []byte) error {
133         buf := codec.NewBuffer(b)
134         m.IsAdd = buf.DecodeBool()
135         m.Neighbor.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
136         m.Neighbor.Flags = IPNeighborFlags(buf.DecodeUint8())
137         copy(m.Neighbor.MacAddress[:], buf.DecodeBytes(6))
138         m.Neighbor.IPAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
139         copy(m.Neighbor.IPAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
140         return nil
141 }
142
143 // IPNeighborAddDelReply defines message 'ip_neighbor_add_del_reply'.
144 type IPNeighborAddDelReply struct {
145         Retval     int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
146         StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
147 }
148
149 func (m *IPNeighborAddDelReply) Reset()               { *m = IPNeighborAddDelReply{} }
150 func (*IPNeighborAddDelReply) GetMessageName() string { return "ip_neighbor_add_del_reply" }
151 func (*IPNeighborAddDelReply) GetCrcString() string   { return "1992deab" }
152 func (*IPNeighborAddDelReply) GetMessageType() api.MessageType {
153         return api.ReplyMessage
154 }
155
156 func (m *IPNeighborAddDelReply) Size() (size int) {
157         if m == nil {
158                 return 0
159         }
160         size += 4 // m.Retval
161         size += 4 // m.StatsIndex
162         return size
163 }
164 func (m *IPNeighborAddDelReply) Marshal(b []byte) ([]byte, error) {
165         if b == nil {
166                 b = make([]byte, m.Size())
167         }
168         buf := codec.NewBuffer(b)
169         buf.EncodeInt32(m.Retval)
170         buf.EncodeUint32(m.StatsIndex)
171         return buf.Bytes(), nil
172 }
173 func (m *IPNeighborAddDelReply) Unmarshal(b []byte) error {
174         buf := codec.NewBuffer(b)
175         m.Retval = buf.DecodeInt32()
176         m.StatsIndex = buf.DecodeUint32()
177         return nil
178 }
179
180 // IPNeighborConfig defines message 'ip_neighbor_config'.
181 type IPNeighborConfig struct {
182         Af        ip_types.AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
183         MaxNumber uint32                 `binapi:"u32,name=max_number" json:"max_number,omitempty"`
184         MaxAge    uint32                 `binapi:"u32,name=max_age" json:"max_age,omitempty"`
185         Recycle   bool                   `binapi:"bool,name=recycle" json:"recycle,omitempty"`
186 }
187
188 func (m *IPNeighborConfig) Reset()               { *m = IPNeighborConfig{} }
189 func (*IPNeighborConfig) GetMessageName() string { return "ip_neighbor_config" }
190 func (*IPNeighborConfig) GetCrcString() string   { return "f4a5cf44" }
191 func (*IPNeighborConfig) GetMessageType() api.MessageType {
192         return api.RequestMessage
193 }
194
195 func (m *IPNeighborConfig) Size() (size int) {
196         if m == nil {
197                 return 0
198         }
199         size += 1 // m.Af
200         size += 4 // m.MaxNumber
201         size += 4 // m.MaxAge
202         size += 1 // m.Recycle
203         return size
204 }
205 func (m *IPNeighborConfig) Marshal(b []byte) ([]byte, error) {
206         if b == nil {
207                 b = make([]byte, m.Size())
208         }
209         buf := codec.NewBuffer(b)
210         buf.EncodeUint8(uint8(m.Af))
211         buf.EncodeUint32(m.MaxNumber)
212         buf.EncodeUint32(m.MaxAge)
213         buf.EncodeBool(m.Recycle)
214         return buf.Bytes(), nil
215 }
216 func (m *IPNeighborConfig) Unmarshal(b []byte) error {
217         buf := codec.NewBuffer(b)
218         m.Af = ip_types.AddressFamily(buf.DecodeUint8())
219         m.MaxNumber = buf.DecodeUint32()
220         m.MaxAge = buf.DecodeUint32()
221         m.Recycle = buf.DecodeBool()
222         return nil
223 }
224
225 // IPNeighborConfigReply defines message 'ip_neighbor_config_reply'.
226 type IPNeighborConfigReply struct {
227         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
228 }
229
230 func (m *IPNeighborConfigReply) Reset()               { *m = IPNeighborConfigReply{} }
231 func (*IPNeighborConfigReply) GetMessageName() string { return "ip_neighbor_config_reply" }
232 func (*IPNeighborConfigReply) GetCrcString() string   { return "e8d4e804" }
233 func (*IPNeighborConfigReply) GetMessageType() api.MessageType {
234         return api.ReplyMessage
235 }
236
237 func (m *IPNeighborConfigReply) Size() (size int) {
238         if m == nil {
239                 return 0
240         }
241         size += 4 // m.Retval
242         return size
243 }
244 func (m *IPNeighborConfigReply) Marshal(b []byte) ([]byte, error) {
245         if b == nil {
246                 b = make([]byte, m.Size())
247         }
248         buf := codec.NewBuffer(b)
249         buf.EncodeInt32(m.Retval)
250         return buf.Bytes(), nil
251 }
252 func (m *IPNeighborConfigReply) Unmarshal(b []byte) error {
253         buf := codec.NewBuffer(b)
254         m.Retval = buf.DecodeInt32()
255         return nil
256 }
257
258 // IPNeighborDetails defines message 'ip_neighbor_details'.
259 type IPNeighborDetails struct {
260         Age      float64    `binapi:"f64,name=age" json:"age,omitempty"`
261         Neighbor IPNeighbor `binapi:"ip_neighbor,name=neighbor" json:"neighbor,omitempty"`
262 }
263
264 func (m *IPNeighborDetails) Reset()               { *m = IPNeighborDetails{} }
265 func (*IPNeighborDetails) GetMessageName() string { return "ip_neighbor_details" }
266 func (*IPNeighborDetails) GetCrcString() string   { return "870e80b9" }
267 func (*IPNeighborDetails) GetMessageType() api.MessageType {
268         return api.ReplyMessage
269 }
270
271 func (m *IPNeighborDetails) Size() (size int) {
272         if m == nil {
273                 return 0
274         }
275         size += 8      // m.Age
276         size += 4      // m.Neighbor.SwIfIndex
277         size += 1      // m.Neighbor.Flags
278         size += 1 * 6  // m.Neighbor.MacAddress
279         size += 1      // m.Neighbor.IPAddress.Af
280         size += 1 * 16 // m.Neighbor.IPAddress.Un
281         return size
282 }
283 func (m *IPNeighborDetails) Marshal(b []byte) ([]byte, error) {
284         if b == nil {
285                 b = make([]byte, m.Size())
286         }
287         buf := codec.NewBuffer(b)
288         buf.EncodeFloat64(m.Age)
289         buf.EncodeUint32(uint32(m.Neighbor.SwIfIndex))
290         buf.EncodeUint8(uint8(m.Neighbor.Flags))
291         buf.EncodeBytes(m.Neighbor.MacAddress[:], 6)
292         buf.EncodeUint8(uint8(m.Neighbor.IPAddress.Af))
293         buf.EncodeBytes(m.Neighbor.IPAddress.Un.XXX_UnionData[:], 16)
294         return buf.Bytes(), nil
295 }
296 func (m *IPNeighborDetails) Unmarshal(b []byte) error {
297         buf := codec.NewBuffer(b)
298         m.Age = buf.DecodeFloat64()
299         m.Neighbor.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
300         m.Neighbor.Flags = IPNeighborFlags(buf.DecodeUint8())
301         copy(m.Neighbor.MacAddress[:], buf.DecodeBytes(6))
302         m.Neighbor.IPAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
303         copy(m.Neighbor.IPAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
304         return nil
305 }
306
307 // IPNeighborDump defines message 'ip_neighbor_dump'.
308 type IPNeighborDump struct {
309         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
310         Af        ip_types.AddressFamily         `binapi:"address_family,name=af" json:"af,omitempty"`
311 }
312
313 func (m *IPNeighborDump) Reset()               { *m = IPNeighborDump{} }
314 func (*IPNeighborDump) GetMessageName() string { return "ip_neighbor_dump" }
315 func (*IPNeighborDump) GetCrcString() string   { return "cd831298" }
316 func (*IPNeighborDump) GetMessageType() api.MessageType {
317         return api.RequestMessage
318 }
319
320 func (m *IPNeighborDump) Size() (size int) {
321         if m == nil {
322                 return 0
323         }
324         size += 4 // m.SwIfIndex
325         size += 1 // m.Af
326         return size
327 }
328 func (m *IPNeighborDump) Marshal(b []byte) ([]byte, error) {
329         if b == nil {
330                 b = make([]byte, m.Size())
331         }
332         buf := codec.NewBuffer(b)
333         buf.EncodeUint32(uint32(m.SwIfIndex))
334         buf.EncodeUint8(uint8(m.Af))
335         return buf.Bytes(), nil
336 }
337 func (m *IPNeighborDump) Unmarshal(b []byte) error {
338         buf := codec.NewBuffer(b)
339         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
340         m.Af = ip_types.AddressFamily(buf.DecodeUint8())
341         return nil
342 }
343
344 // IPNeighborEvent defines message 'ip_neighbor_event'.
345 type IPNeighborEvent struct {
346         PID      uint32     `binapi:"u32,name=pid" json:"pid,omitempty"`
347         Neighbor IPNeighbor `binapi:"ip_neighbor,name=neighbor" json:"neighbor,omitempty"`
348 }
349
350 func (m *IPNeighborEvent) Reset()               { *m = IPNeighborEvent{} }
351 func (*IPNeighborEvent) GetMessageName() string { return "ip_neighbor_event" }
352 func (*IPNeighborEvent) GetCrcString() string   { return "83933131" }
353 func (*IPNeighborEvent) GetMessageType() api.MessageType {
354         return api.EventMessage
355 }
356
357 func (m *IPNeighborEvent) Size() (size int) {
358         if m == nil {
359                 return 0
360         }
361         size += 4      // m.PID
362         size += 4      // m.Neighbor.SwIfIndex
363         size += 1      // m.Neighbor.Flags
364         size += 1 * 6  // m.Neighbor.MacAddress
365         size += 1      // m.Neighbor.IPAddress.Af
366         size += 1 * 16 // m.Neighbor.IPAddress.Un
367         return size
368 }
369 func (m *IPNeighborEvent) Marshal(b []byte) ([]byte, error) {
370         if b == nil {
371                 b = make([]byte, m.Size())
372         }
373         buf := codec.NewBuffer(b)
374         buf.EncodeUint32(m.PID)
375         buf.EncodeUint32(uint32(m.Neighbor.SwIfIndex))
376         buf.EncodeUint8(uint8(m.Neighbor.Flags))
377         buf.EncodeBytes(m.Neighbor.MacAddress[:], 6)
378         buf.EncodeUint8(uint8(m.Neighbor.IPAddress.Af))
379         buf.EncodeBytes(m.Neighbor.IPAddress.Un.XXX_UnionData[:], 16)
380         return buf.Bytes(), nil
381 }
382 func (m *IPNeighborEvent) Unmarshal(b []byte) error {
383         buf := codec.NewBuffer(b)
384         m.PID = buf.DecodeUint32()
385         m.Neighbor.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
386         m.Neighbor.Flags = IPNeighborFlags(buf.DecodeUint8())
387         copy(m.Neighbor.MacAddress[:], buf.DecodeBytes(6))
388         m.Neighbor.IPAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
389         copy(m.Neighbor.IPAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
390         return nil
391 }
392
393 // IPNeighborFlush defines message 'ip_neighbor_flush'.
394 type IPNeighborFlush struct {
395         Af        ip_types.AddressFamily         `binapi:"address_family,name=af" json:"af,omitempty"`
396         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
397 }
398
399 func (m *IPNeighborFlush) Reset()               { *m = IPNeighborFlush{} }
400 func (*IPNeighborFlush) GetMessageName() string { return "ip_neighbor_flush" }
401 func (*IPNeighborFlush) GetCrcString() string   { return "16aa35d2" }
402 func (*IPNeighborFlush) GetMessageType() api.MessageType {
403         return api.RequestMessage
404 }
405
406 func (m *IPNeighborFlush) Size() (size int) {
407         if m == nil {
408                 return 0
409         }
410         size += 1 // m.Af
411         size += 4 // m.SwIfIndex
412         return size
413 }
414 func (m *IPNeighborFlush) Marshal(b []byte) ([]byte, error) {
415         if b == nil {
416                 b = make([]byte, m.Size())
417         }
418         buf := codec.NewBuffer(b)
419         buf.EncodeUint8(uint8(m.Af))
420         buf.EncodeUint32(uint32(m.SwIfIndex))
421         return buf.Bytes(), nil
422 }
423 func (m *IPNeighborFlush) Unmarshal(b []byte) error {
424         buf := codec.NewBuffer(b)
425         m.Af = ip_types.AddressFamily(buf.DecodeUint8())
426         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
427         return nil
428 }
429
430 // IPNeighborFlushReply defines message 'ip_neighbor_flush_reply'.
431 type IPNeighborFlushReply struct {
432         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
433 }
434
435 func (m *IPNeighborFlushReply) Reset()               { *m = IPNeighborFlushReply{} }
436 func (*IPNeighborFlushReply) GetMessageName() string { return "ip_neighbor_flush_reply" }
437 func (*IPNeighborFlushReply) GetCrcString() string   { return "e8d4e804" }
438 func (*IPNeighborFlushReply) GetMessageType() api.MessageType {
439         return api.ReplyMessage
440 }
441
442 func (m *IPNeighborFlushReply) Size() (size int) {
443         if m == nil {
444                 return 0
445         }
446         size += 4 // m.Retval
447         return size
448 }
449 func (m *IPNeighborFlushReply) Marshal(b []byte) ([]byte, error) {
450         if b == nil {
451                 b = make([]byte, m.Size())
452         }
453         buf := codec.NewBuffer(b)
454         buf.EncodeInt32(m.Retval)
455         return buf.Bytes(), nil
456 }
457 func (m *IPNeighborFlushReply) Unmarshal(b []byte) error {
458         buf := codec.NewBuffer(b)
459         m.Retval = buf.DecodeInt32()
460         return nil
461 }
462
463 // IPNeighborReplaceBegin defines message 'ip_neighbor_replace_begin'.
464 type IPNeighborReplaceBegin struct{}
465
466 func (m *IPNeighborReplaceBegin) Reset()               { *m = IPNeighborReplaceBegin{} }
467 func (*IPNeighborReplaceBegin) GetMessageName() string { return "ip_neighbor_replace_begin" }
468 func (*IPNeighborReplaceBegin) GetCrcString() string   { return "51077d14" }
469 func (*IPNeighborReplaceBegin) GetMessageType() api.MessageType {
470         return api.RequestMessage
471 }
472
473 func (m *IPNeighborReplaceBegin) Size() (size int) {
474         if m == nil {
475                 return 0
476         }
477         return size
478 }
479 func (m *IPNeighborReplaceBegin) Marshal(b []byte) ([]byte, error) {
480         if b == nil {
481                 b = make([]byte, m.Size())
482         }
483         buf := codec.NewBuffer(b)
484         return buf.Bytes(), nil
485 }
486 func (m *IPNeighborReplaceBegin) Unmarshal(b []byte) error {
487         return nil
488 }
489
490 // IPNeighborReplaceBeginReply defines message 'ip_neighbor_replace_begin_reply'.
491 type IPNeighborReplaceBeginReply struct {
492         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
493 }
494
495 func (m *IPNeighborReplaceBeginReply) Reset()               { *m = IPNeighborReplaceBeginReply{} }
496 func (*IPNeighborReplaceBeginReply) GetMessageName() string { return "ip_neighbor_replace_begin_reply" }
497 func (*IPNeighborReplaceBeginReply) GetCrcString() string   { return "e8d4e804" }
498 func (*IPNeighborReplaceBeginReply) GetMessageType() api.MessageType {
499         return api.ReplyMessage
500 }
501
502 func (m *IPNeighborReplaceBeginReply) Size() (size int) {
503         if m == nil {
504                 return 0
505         }
506         size += 4 // m.Retval
507         return size
508 }
509 func (m *IPNeighborReplaceBeginReply) Marshal(b []byte) ([]byte, error) {
510         if b == nil {
511                 b = make([]byte, m.Size())
512         }
513         buf := codec.NewBuffer(b)
514         buf.EncodeInt32(m.Retval)
515         return buf.Bytes(), nil
516 }
517 func (m *IPNeighborReplaceBeginReply) Unmarshal(b []byte) error {
518         buf := codec.NewBuffer(b)
519         m.Retval = buf.DecodeInt32()
520         return nil
521 }
522
523 // IPNeighborReplaceEnd defines message 'ip_neighbor_replace_end'.
524 type IPNeighborReplaceEnd struct{}
525
526 func (m *IPNeighborReplaceEnd) Reset()               { *m = IPNeighborReplaceEnd{} }
527 func (*IPNeighborReplaceEnd) GetMessageName() string { return "ip_neighbor_replace_end" }
528 func (*IPNeighborReplaceEnd) GetCrcString() string   { return "51077d14" }
529 func (*IPNeighborReplaceEnd) GetMessageType() api.MessageType {
530         return api.RequestMessage
531 }
532
533 func (m *IPNeighborReplaceEnd) Size() (size int) {
534         if m == nil {
535                 return 0
536         }
537         return size
538 }
539 func (m *IPNeighborReplaceEnd) Marshal(b []byte) ([]byte, error) {
540         if b == nil {
541                 b = make([]byte, m.Size())
542         }
543         buf := codec.NewBuffer(b)
544         return buf.Bytes(), nil
545 }
546 func (m *IPNeighborReplaceEnd) Unmarshal(b []byte) error {
547         return nil
548 }
549
550 // IPNeighborReplaceEndReply defines message 'ip_neighbor_replace_end_reply'.
551 type IPNeighborReplaceEndReply struct {
552         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
553 }
554
555 func (m *IPNeighborReplaceEndReply) Reset()               { *m = IPNeighborReplaceEndReply{} }
556 func (*IPNeighborReplaceEndReply) GetMessageName() string { return "ip_neighbor_replace_end_reply" }
557 func (*IPNeighborReplaceEndReply) GetCrcString() string   { return "e8d4e804" }
558 func (*IPNeighborReplaceEndReply) GetMessageType() api.MessageType {
559         return api.ReplyMessage
560 }
561
562 func (m *IPNeighborReplaceEndReply) Size() (size int) {
563         if m == nil {
564                 return 0
565         }
566         size += 4 // m.Retval
567         return size
568 }
569 func (m *IPNeighborReplaceEndReply) Marshal(b []byte) ([]byte, error) {
570         if b == nil {
571                 b = make([]byte, m.Size())
572         }
573         buf := codec.NewBuffer(b)
574         buf.EncodeInt32(m.Retval)
575         return buf.Bytes(), nil
576 }
577 func (m *IPNeighborReplaceEndReply) Unmarshal(b []byte) error {
578         buf := codec.NewBuffer(b)
579         m.Retval = buf.DecodeInt32()
580         return nil
581 }
582
583 // WantIPNeighborEvents defines message 'want_ip_neighbor_events'.
584 type WantIPNeighborEvents struct {
585         Enable    bool                           `binapi:"bool,name=enable" json:"enable,omitempty"`
586         PID       uint32                         `binapi:"u32,name=pid" json:"pid,omitempty"`
587         IP        ip_types.Address               `binapi:"address,name=ip" json:"ip,omitempty"`
588         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
589 }
590
591 func (m *WantIPNeighborEvents) Reset()               { *m = WantIPNeighborEvents{} }
592 func (*WantIPNeighborEvents) GetMessageName() string { return "want_ip_neighbor_events" }
593 func (*WantIPNeighborEvents) GetCrcString() string   { return "1a312870" }
594 func (*WantIPNeighborEvents) GetMessageType() api.MessageType {
595         return api.RequestMessage
596 }
597
598 func (m *WantIPNeighborEvents) Size() (size int) {
599         if m == nil {
600                 return 0
601         }
602         size += 1      // m.Enable
603         size += 4      // m.PID
604         size += 1      // m.IP.Af
605         size += 1 * 16 // m.IP.Un
606         size += 4      // m.SwIfIndex
607         return size
608 }
609 func (m *WantIPNeighborEvents) Marshal(b []byte) ([]byte, error) {
610         if b == nil {
611                 b = make([]byte, m.Size())
612         }
613         buf := codec.NewBuffer(b)
614         buf.EncodeBool(m.Enable)
615         buf.EncodeUint32(m.PID)
616         buf.EncodeUint8(uint8(m.IP.Af))
617         buf.EncodeBytes(m.IP.Un.XXX_UnionData[:], 16)
618         buf.EncodeUint32(uint32(m.SwIfIndex))
619         return buf.Bytes(), nil
620 }
621 func (m *WantIPNeighborEvents) Unmarshal(b []byte) error {
622         buf := codec.NewBuffer(b)
623         m.Enable = buf.DecodeBool()
624         m.PID = buf.DecodeUint32()
625         m.IP.Af = ip_types.AddressFamily(buf.DecodeUint8())
626         copy(m.IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
627         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
628         return nil
629 }
630
631 // WantIPNeighborEventsReply defines message 'want_ip_neighbor_events_reply'.
632 type WantIPNeighborEventsReply struct {
633         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
634 }
635
636 func (m *WantIPNeighborEventsReply) Reset()               { *m = WantIPNeighborEventsReply{} }
637 func (*WantIPNeighborEventsReply) GetMessageName() string { return "want_ip_neighbor_events_reply" }
638 func (*WantIPNeighborEventsReply) GetCrcString() string   { return "e8d4e804" }
639 func (*WantIPNeighborEventsReply) GetMessageType() api.MessageType {
640         return api.ReplyMessage
641 }
642
643 func (m *WantIPNeighborEventsReply) Size() (size int) {
644         if m == nil {
645                 return 0
646         }
647         size += 4 // m.Retval
648         return size
649 }
650 func (m *WantIPNeighborEventsReply) Marshal(b []byte) ([]byte, error) {
651         if b == nil {
652                 b = make([]byte, m.Size())
653         }
654         buf := codec.NewBuffer(b)
655         buf.EncodeInt32(m.Retval)
656         return buf.Bytes(), nil
657 }
658 func (m *WantIPNeighborEventsReply) Unmarshal(b []byte) error {
659         buf := codec.NewBuffer(b)
660         m.Retval = buf.DecodeInt32()
661         return nil
662 }
663
664 func init() { file_ip_neighbor_binapi_init() }
665 func file_ip_neighbor_binapi_init() {
666         api.RegisterMessage((*IPNeighborAddDel)(nil), "ip_neighbor_add_del_105518b6")
667         api.RegisterMessage((*IPNeighborAddDelReply)(nil), "ip_neighbor_add_del_reply_1992deab")
668         api.RegisterMessage((*IPNeighborConfig)(nil), "ip_neighbor_config_f4a5cf44")
669         api.RegisterMessage((*IPNeighborConfigReply)(nil), "ip_neighbor_config_reply_e8d4e804")
670         api.RegisterMessage((*IPNeighborDetails)(nil), "ip_neighbor_details_870e80b9")
671         api.RegisterMessage((*IPNeighborDump)(nil), "ip_neighbor_dump_cd831298")
672         api.RegisterMessage((*IPNeighborEvent)(nil), "ip_neighbor_event_83933131")
673         api.RegisterMessage((*IPNeighborFlush)(nil), "ip_neighbor_flush_16aa35d2")
674         api.RegisterMessage((*IPNeighborFlushReply)(nil), "ip_neighbor_flush_reply_e8d4e804")
675         api.RegisterMessage((*IPNeighborReplaceBegin)(nil), "ip_neighbor_replace_begin_51077d14")
676         api.RegisterMessage((*IPNeighborReplaceBeginReply)(nil), "ip_neighbor_replace_begin_reply_e8d4e804")
677         api.RegisterMessage((*IPNeighborReplaceEnd)(nil), "ip_neighbor_replace_end_51077d14")
678         api.RegisterMessage((*IPNeighborReplaceEndReply)(nil), "ip_neighbor_replace_end_reply_e8d4e804")
679         api.RegisterMessage((*WantIPNeighborEvents)(nil), "want_ip_neighbor_events_1a312870")
680         api.RegisterMessage((*WantIPNeighborEventsReply)(nil), "want_ip_neighbor_events_reply_e8d4e804")
681 }
682
683 // Messages returns list of all messages in this module.
684 func AllMessages() []api.Message {
685         return []api.Message{
686                 (*IPNeighborAddDel)(nil),
687                 (*IPNeighborAddDelReply)(nil),
688                 (*IPNeighborConfig)(nil),
689                 (*IPNeighborConfigReply)(nil),
690                 (*IPNeighborDetails)(nil),
691                 (*IPNeighborDump)(nil),
692                 (*IPNeighborEvent)(nil),
693                 (*IPNeighborFlush)(nil),
694                 (*IPNeighborFlushReply)(nil),
695                 (*IPNeighborReplaceBegin)(nil),
696                 (*IPNeighborReplaceBeginReply)(nil),
697                 (*IPNeighborReplaceEnd)(nil),
698                 (*IPNeighborReplaceEndReply)(nil),
699                 (*WantIPNeighborEvents)(nil),
700                 (*WantIPNeighborEventsReply)(nil),
701         }
702 }