Improve binapi generator
[govpp.git] / binapi / lisp_gpe / lisp_gpe.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 // source: /usr/share/vpp/api/core/lisp_gpe.api.json
6
7 // Package lisp_gpe contains generated bindings for API file lisp_gpe.api.
8 //
9 // Contents:
10 //   3 structs
11 //  20 messages
12 //
13 package lisp_gpe
14
15 import (
16         api "git.fd.io/govpp.git/api"
17         _ "git.fd.io/govpp.git/binapi/ethernet_types"
18         interface_types "git.fd.io/govpp.git/binapi/interface_types"
19         ip_types "git.fd.io/govpp.git/binapi/ip_types"
20         lisp_types "git.fd.io/govpp.git/binapi/lisp_types"
21         codec "git.fd.io/govpp.git/codec"
22 )
23
24 // This is a compile-time assertion to ensure that this generated file
25 // is compatible with the GoVPP api package it is being compiled against.
26 // A compilation error at this line likely means your copy of the
27 // GoVPP api package needs to be updated.
28 const _ = api.GoVppAPIPackageIsVersion2
29
30 const (
31         APIFile    = "lisp_gpe"
32         APIVersion = "2.0.0"
33         VersionCrc = 0x4947ac96
34 )
35
36 // GpeFwdEntry defines type 'gpe_fwd_entry'.
37 type GpeFwdEntry struct {
38         FwdEntryIndex uint32         `binapi:"u32,name=fwd_entry_index" json:"fwd_entry_index,omitempty"`
39         DpTable       uint32         `binapi:"u32,name=dp_table" json:"dp_table,omitempty"`
40         Leid          lisp_types.Eid `binapi:"eid,name=leid" json:"leid,omitempty"`
41         Reid          lisp_types.Eid `binapi:"eid,name=reid" json:"reid,omitempty"`
42         Vni           uint32         `binapi:"u32,name=vni" json:"vni,omitempty"`
43         Action        uint8          `binapi:"u8,name=action" json:"action,omitempty"`
44 }
45
46 // GpeLocator defines type 'gpe_locator'.
47 type GpeLocator struct {
48         Weight uint8            `binapi:"u8,name=weight" json:"weight,omitempty"`
49         Addr   ip_types.Address `binapi:"address,name=addr" json:"addr,omitempty"`
50 }
51
52 // GpeNativeFwdRpath defines type 'gpe_native_fwd_rpath'.
53 type GpeNativeFwdRpath struct {
54         FibIndex    uint32                         `binapi:"u32,name=fib_index" json:"fib_index,omitempty"`
55         NhSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=nh_sw_if_index" json:"nh_sw_if_index,omitempty"`
56         NhAddr      ip_types.Address               `binapi:"address,name=nh_addr" json:"nh_addr,omitempty"`
57 }
58
59 // GpeAddDelFwdEntry defines message 'gpe_add_del_fwd_entry'.
60 type GpeAddDelFwdEntry struct {
61         IsAdd   bool           `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
62         RmtEid  lisp_types.Eid `binapi:"eid,name=rmt_eid" json:"rmt_eid,omitempty"`
63         LclEid  lisp_types.Eid `binapi:"eid,name=lcl_eid" json:"lcl_eid,omitempty"`
64         Vni     uint32         `binapi:"u32,name=vni" json:"vni,omitempty"`
65         DpTable uint32         `binapi:"u32,name=dp_table" json:"dp_table,omitempty"`
66         Action  uint8          `binapi:"u8,name=action" json:"action,omitempty"`
67         LocNum  uint32         `binapi:"u32,name=loc_num" json:"-"`
68         Locs    []GpeLocator   `binapi:"gpe_locator[loc_num],name=locs" json:"locs,omitempty"`
69 }
70
71 func (m *GpeAddDelFwdEntry) Reset()               { *m = GpeAddDelFwdEntry{} }
72 func (*GpeAddDelFwdEntry) GetMessageName() string { return "gpe_add_del_fwd_entry" }
73 func (*GpeAddDelFwdEntry) GetCrcString() string   { return "de6df50f" }
74 func (*GpeAddDelFwdEntry) GetMessageType() api.MessageType {
75         return api.RequestMessage
76 }
77
78 func (m *GpeAddDelFwdEntry) Size() int {
79         if m == nil {
80                 return 0
81         }
82         var size int
83         size += 1     // m.IsAdd
84         size += 1     // m.RmtEid.Type
85         size += 1 * 6 // m.RmtEid.Address
86         size += 1     // m.LclEid.Type
87         size += 1 * 6 // m.LclEid.Address
88         size += 4     // m.Vni
89         size += 4     // m.DpTable
90         size += 1     // m.Action
91         size += 4     // m.LocNum
92         for j1 := 0; j1 < len(m.Locs); j1++ {
93                 var s1 GpeLocator
94                 _ = s1
95                 if j1 < len(m.Locs) {
96                         s1 = m.Locs[j1]
97                 }
98                 size += 1      // s1.Weight
99                 size += 1      // s1.Addr.Af
100                 size += 1 * 16 // s1.Addr.Un
101         }
102         return size
103 }
104 func (m *GpeAddDelFwdEntry) Marshal(b []byte) ([]byte, error) {
105         var buf *codec.Buffer
106         if b == nil {
107                 buf = codec.NewBuffer(make([]byte, m.Size()))
108         } else {
109                 buf = codec.NewBuffer(b)
110         }
111         buf.EncodeBool(m.IsAdd)
112         buf.EncodeUint8(uint8(m.RmtEid.Type))
113         buf.EncodeBytes(m.RmtEid.Address.XXX_UnionData[:], 0)
114         buf.EncodeUint8(uint8(m.LclEid.Type))
115         buf.EncodeBytes(m.LclEid.Address.XXX_UnionData[:], 0)
116         buf.EncodeUint32(uint32(m.Vni))
117         buf.EncodeUint32(uint32(m.DpTable))
118         buf.EncodeUint8(uint8(m.Action))
119         buf.EncodeUint32(uint32(len(m.Locs)))
120         for j0 := 0; j0 < len(m.Locs); j0++ {
121                 var v0 GpeLocator
122                 if j0 < len(m.Locs) {
123                         v0 = m.Locs[j0]
124                 }
125                 buf.EncodeUint8(uint8(v0.Weight))
126                 buf.EncodeUint8(uint8(v0.Addr.Af))
127                 buf.EncodeBytes(v0.Addr.Un.XXX_UnionData[:], 0)
128         }
129         return buf.Bytes(), nil
130 }
131 func (m *GpeAddDelFwdEntry) Unmarshal(b []byte) error {
132         buf := codec.NewBuffer(b)
133         m.IsAdd = buf.DecodeBool()
134         m.RmtEid.Type = lisp_types.EidType(buf.DecodeUint8())
135         copy(m.RmtEid.Address.XXX_UnionData[:], buf.DecodeBytes(6))
136         m.LclEid.Type = lisp_types.EidType(buf.DecodeUint8())
137         copy(m.LclEid.Address.XXX_UnionData[:], buf.DecodeBytes(6))
138         m.Vni = buf.DecodeUint32()
139         m.DpTable = buf.DecodeUint32()
140         m.Action = buf.DecodeUint8()
141         m.LocNum = buf.DecodeUint32()
142         m.Locs = make([]GpeLocator, int(m.LocNum))
143         for j0 := 0; j0 < len(m.Locs); j0++ {
144                 m.Locs[j0].Weight = buf.DecodeUint8()
145                 m.Locs[j0].Addr.Af = ip_types.AddressFamily(buf.DecodeUint8())
146                 copy(m.Locs[j0].Addr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
147         }
148         return nil
149 }
150
151 // GpeAddDelFwdEntryReply defines message 'gpe_add_del_fwd_entry_reply'.
152 type GpeAddDelFwdEntryReply struct {
153         Retval        int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
154         FwdEntryIndex uint32 `binapi:"u32,name=fwd_entry_index" json:"fwd_entry_index,omitempty"`
155 }
156
157 func (m *GpeAddDelFwdEntryReply) Reset()               { *m = GpeAddDelFwdEntryReply{} }
158 func (*GpeAddDelFwdEntryReply) GetMessageName() string { return "gpe_add_del_fwd_entry_reply" }
159 func (*GpeAddDelFwdEntryReply) GetCrcString() string   { return "efe5f176" }
160 func (*GpeAddDelFwdEntryReply) GetMessageType() api.MessageType {
161         return api.ReplyMessage
162 }
163
164 func (m *GpeAddDelFwdEntryReply) Size() int {
165         if m == nil {
166                 return 0
167         }
168         var size int
169         size += 4 // m.Retval
170         size += 4 // m.FwdEntryIndex
171         return size
172 }
173 func (m *GpeAddDelFwdEntryReply) Marshal(b []byte) ([]byte, error) {
174         var buf *codec.Buffer
175         if b == nil {
176                 buf = codec.NewBuffer(make([]byte, m.Size()))
177         } else {
178                 buf = codec.NewBuffer(b)
179         }
180         buf.EncodeUint32(uint32(m.Retval))
181         buf.EncodeUint32(uint32(m.FwdEntryIndex))
182         return buf.Bytes(), nil
183 }
184 func (m *GpeAddDelFwdEntryReply) Unmarshal(b []byte) error {
185         buf := codec.NewBuffer(b)
186         m.Retval = int32(buf.DecodeUint32())
187         m.FwdEntryIndex = buf.DecodeUint32()
188         return nil
189 }
190
191 // GpeAddDelIface defines message 'gpe_add_del_iface'.
192 type GpeAddDelIface struct {
193         IsAdd   bool   `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
194         IsL2    bool   `binapi:"bool,name=is_l2" json:"is_l2,omitempty"`
195         DpTable uint32 `binapi:"u32,name=dp_table" json:"dp_table,omitempty"`
196         Vni     uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
197 }
198
199 func (m *GpeAddDelIface) Reset()               { *m = GpeAddDelIface{} }
200 func (*GpeAddDelIface) GetMessageName() string { return "gpe_add_del_iface" }
201 func (*GpeAddDelIface) GetCrcString() string   { return "3ccff273" }
202 func (*GpeAddDelIface) GetMessageType() api.MessageType {
203         return api.RequestMessage
204 }
205
206 func (m *GpeAddDelIface) Size() int {
207         if m == nil {
208                 return 0
209         }
210         var size int
211         size += 1 // m.IsAdd
212         size += 1 // m.IsL2
213         size += 4 // m.DpTable
214         size += 4 // m.Vni
215         return size
216 }
217 func (m *GpeAddDelIface) Marshal(b []byte) ([]byte, error) {
218         var buf *codec.Buffer
219         if b == nil {
220                 buf = codec.NewBuffer(make([]byte, m.Size()))
221         } else {
222                 buf = codec.NewBuffer(b)
223         }
224         buf.EncodeBool(m.IsAdd)
225         buf.EncodeBool(m.IsL2)
226         buf.EncodeUint32(uint32(m.DpTable))
227         buf.EncodeUint32(uint32(m.Vni))
228         return buf.Bytes(), nil
229 }
230 func (m *GpeAddDelIface) Unmarshal(b []byte) error {
231         buf := codec.NewBuffer(b)
232         m.IsAdd = buf.DecodeBool()
233         m.IsL2 = buf.DecodeBool()
234         m.DpTable = buf.DecodeUint32()
235         m.Vni = buf.DecodeUint32()
236         return nil
237 }
238
239 // GpeAddDelIfaceReply defines message 'gpe_add_del_iface_reply'.
240 type GpeAddDelIfaceReply struct {
241         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
242 }
243
244 func (m *GpeAddDelIfaceReply) Reset()               { *m = GpeAddDelIfaceReply{} }
245 func (*GpeAddDelIfaceReply) GetMessageName() string { return "gpe_add_del_iface_reply" }
246 func (*GpeAddDelIfaceReply) GetCrcString() string   { return "e8d4e804" }
247 func (*GpeAddDelIfaceReply) GetMessageType() api.MessageType {
248         return api.ReplyMessage
249 }
250
251 func (m *GpeAddDelIfaceReply) Size() int {
252         if m == nil {
253                 return 0
254         }
255         var size int
256         size += 4 // m.Retval
257         return size
258 }
259 func (m *GpeAddDelIfaceReply) Marshal(b []byte) ([]byte, error) {
260         var buf *codec.Buffer
261         if b == nil {
262                 buf = codec.NewBuffer(make([]byte, m.Size()))
263         } else {
264                 buf = codec.NewBuffer(b)
265         }
266         buf.EncodeUint32(uint32(m.Retval))
267         return buf.Bytes(), nil
268 }
269 func (m *GpeAddDelIfaceReply) Unmarshal(b []byte) error {
270         buf := codec.NewBuffer(b)
271         m.Retval = int32(buf.DecodeUint32())
272         return nil
273 }
274
275 // GpeAddDelNativeFwdRpath defines message 'gpe_add_del_native_fwd_rpath'.
276 type GpeAddDelNativeFwdRpath struct {
277         IsAdd       bool                           `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
278         TableID     uint32                         `binapi:"u32,name=table_id" json:"table_id,omitempty"`
279         NhSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=nh_sw_if_index" json:"nh_sw_if_index,omitempty"`
280         NhAddr      ip_types.Address               `binapi:"address,name=nh_addr" json:"nh_addr,omitempty"`
281 }
282
283 func (m *GpeAddDelNativeFwdRpath) Reset()               { *m = GpeAddDelNativeFwdRpath{} }
284 func (*GpeAddDelNativeFwdRpath) GetMessageName() string { return "gpe_add_del_native_fwd_rpath" }
285 func (*GpeAddDelNativeFwdRpath) GetCrcString() string   { return "812da2f2" }
286 func (*GpeAddDelNativeFwdRpath) GetMessageType() api.MessageType {
287         return api.RequestMessage
288 }
289
290 func (m *GpeAddDelNativeFwdRpath) Size() int {
291         if m == nil {
292                 return 0
293         }
294         var size int
295         size += 1      // m.IsAdd
296         size += 4      // m.TableID
297         size += 4      // m.NhSwIfIndex
298         size += 1      // m.NhAddr.Af
299         size += 1 * 16 // m.NhAddr.Un
300         return size
301 }
302 func (m *GpeAddDelNativeFwdRpath) Marshal(b []byte) ([]byte, error) {
303         var buf *codec.Buffer
304         if b == nil {
305                 buf = codec.NewBuffer(make([]byte, m.Size()))
306         } else {
307                 buf = codec.NewBuffer(b)
308         }
309         buf.EncodeBool(m.IsAdd)
310         buf.EncodeUint32(uint32(m.TableID))
311         buf.EncodeUint32(uint32(m.NhSwIfIndex))
312         buf.EncodeUint8(uint8(m.NhAddr.Af))
313         buf.EncodeBytes(m.NhAddr.Un.XXX_UnionData[:], 0)
314         return buf.Bytes(), nil
315 }
316 func (m *GpeAddDelNativeFwdRpath) Unmarshal(b []byte) error {
317         buf := codec.NewBuffer(b)
318         m.IsAdd = buf.DecodeBool()
319         m.TableID = buf.DecodeUint32()
320         m.NhSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
321         m.NhAddr.Af = ip_types.AddressFamily(buf.DecodeUint8())
322         copy(m.NhAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
323         return nil
324 }
325
326 // GpeAddDelNativeFwdRpathReply defines message 'gpe_add_del_native_fwd_rpath_reply'.
327 type GpeAddDelNativeFwdRpathReply struct {
328         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
329 }
330
331 func (m *GpeAddDelNativeFwdRpathReply) Reset() { *m = GpeAddDelNativeFwdRpathReply{} }
332 func (*GpeAddDelNativeFwdRpathReply) GetMessageName() string {
333         return "gpe_add_del_native_fwd_rpath_reply"
334 }
335 func (*GpeAddDelNativeFwdRpathReply) GetCrcString() string { return "e8d4e804" }
336 func (*GpeAddDelNativeFwdRpathReply) GetMessageType() api.MessageType {
337         return api.ReplyMessage
338 }
339
340 func (m *GpeAddDelNativeFwdRpathReply) Size() int {
341         if m == nil {
342                 return 0
343         }
344         var size int
345         size += 4 // m.Retval
346         return size
347 }
348 func (m *GpeAddDelNativeFwdRpathReply) Marshal(b []byte) ([]byte, error) {
349         var buf *codec.Buffer
350         if b == nil {
351                 buf = codec.NewBuffer(make([]byte, m.Size()))
352         } else {
353                 buf = codec.NewBuffer(b)
354         }
355         buf.EncodeUint32(uint32(m.Retval))
356         return buf.Bytes(), nil
357 }
358 func (m *GpeAddDelNativeFwdRpathReply) Unmarshal(b []byte) error {
359         buf := codec.NewBuffer(b)
360         m.Retval = int32(buf.DecodeUint32())
361         return nil
362 }
363
364 // GpeEnableDisable defines message 'gpe_enable_disable'.
365 type GpeEnableDisable struct {
366         IsEnable bool `binapi:"bool,name=is_enable,default=true" json:"is_enable,omitempty"`
367 }
368
369 func (m *GpeEnableDisable) Reset()               { *m = GpeEnableDisable{} }
370 func (*GpeEnableDisable) GetMessageName() string { return "gpe_enable_disable" }
371 func (*GpeEnableDisable) GetCrcString() string   { return "c264d7bf" }
372 func (*GpeEnableDisable) GetMessageType() api.MessageType {
373         return api.RequestMessage
374 }
375
376 func (m *GpeEnableDisable) Size() int {
377         if m == nil {
378                 return 0
379         }
380         var size int
381         size += 1 // m.IsEnable
382         return size
383 }
384 func (m *GpeEnableDisable) Marshal(b []byte) ([]byte, error) {
385         var buf *codec.Buffer
386         if b == nil {
387                 buf = codec.NewBuffer(make([]byte, m.Size()))
388         } else {
389                 buf = codec.NewBuffer(b)
390         }
391         buf.EncodeBool(m.IsEnable)
392         return buf.Bytes(), nil
393 }
394 func (m *GpeEnableDisable) Unmarshal(b []byte) error {
395         buf := codec.NewBuffer(b)
396         m.IsEnable = buf.DecodeBool()
397         return nil
398 }
399
400 // GpeEnableDisableReply defines message 'gpe_enable_disable_reply'.
401 type GpeEnableDisableReply struct {
402         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
403 }
404
405 func (m *GpeEnableDisableReply) Reset()               { *m = GpeEnableDisableReply{} }
406 func (*GpeEnableDisableReply) GetMessageName() string { return "gpe_enable_disable_reply" }
407 func (*GpeEnableDisableReply) GetCrcString() string   { return "e8d4e804" }
408 func (*GpeEnableDisableReply) GetMessageType() api.MessageType {
409         return api.ReplyMessage
410 }
411
412 func (m *GpeEnableDisableReply) Size() int {
413         if m == nil {
414                 return 0
415         }
416         var size int
417         size += 4 // m.Retval
418         return size
419 }
420 func (m *GpeEnableDisableReply) Marshal(b []byte) ([]byte, error) {
421         var buf *codec.Buffer
422         if b == nil {
423                 buf = codec.NewBuffer(make([]byte, m.Size()))
424         } else {
425                 buf = codec.NewBuffer(b)
426         }
427         buf.EncodeUint32(uint32(m.Retval))
428         return buf.Bytes(), nil
429 }
430 func (m *GpeEnableDisableReply) Unmarshal(b []byte) error {
431         buf := codec.NewBuffer(b)
432         m.Retval = int32(buf.DecodeUint32())
433         return nil
434 }
435
436 // GpeFwdEntriesGet defines message 'gpe_fwd_entries_get'.
437 type GpeFwdEntriesGet struct {
438         Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
439 }
440
441 func (m *GpeFwdEntriesGet) Reset()               { *m = GpeFwdEntriesGet{} }
442 func (*GpeFwdEntriesGet) GetMessageName() string { return "gpe_fwd_entries_get" }
443 func (*GpeFwdEntriesGet) GetCrcString() string   { return "8d1f2fe9" }
444 func (*GpeFwdEntriesGet) GetMessageType() api.MessageType {
445         return api.RequestMessage
446 }
447
448 func (m *GpeFwdEntriesGet) Size() int {
449         if m == nil {
450                 return 0
451         }
452         var size int
453         size += 4 // m.Vni
454         return size
455 }
456 func (m *GpeFwdEntriesGet) Marshal(b []byte) ([]byte, error) {
457         var buf *codec.Buffer
458         if b == nil {
459                 buf = codec.NewBuffer(make([]byte, m.Size()))
460         } else {
461                 buf = codec.NewBuffer(b)
462         }
463         buf.EncodeUint32(uint32(m.Vni))
464         return buf.Bytes(), nil
465 }
466 func (m *GpeFwdEntriesGet) Unmarshal(b []byte) error {
467         buf := codec.NewBuffer(b)
468         m.Vni = buf.DecodeUint32()
469         return nil
470 }
471
472 // GpeFwdEntriesGetReply defines message 'gpe_fwd_entries_get_reply'.
473 type GpeFwdEntriesGetReply struct {
474         Retval  int32         `binapi:"i32,name=retval" json:"retval,omitempty"`
475         Count   uint32        `binapi:"u32,name=count" json:"-"`
476         Entries []GpeFwdEntry `binapi:"gpe_fwd_entry[count],name=entries" json:"entries,omitempty"`
477 }
478
479 func (m *GpeFwdEntriesGetReply) Reset()               { *m = GpeFwdEntriesGetReply{} }
480 func (*GpeFwdEntriesGetReply) GetMessageName() string { return "gpe_fwd_entries_get_reply" }
481 func (*GpeFwdEntriesGetReply) GetCrcString() string   { return "f9f53f1b" }
482 func (*GpeFwdEntriesGetReply) GetMessageType() api.MessageType {
483         return api.ReplyMessage
484 }
485
486 func (m *GpeFwdEntriesGetReply) Size() int {
487         if m == nil {
488                 return 0
489         }
490         var size int
491         size += 4 // m.Retval
492         size += 4 // m.Count
493         for j1 := 0; j1 < len(m.Entries); j1++ {
494                 var s1 GpeFwdEntry
495                 _ = s1
496                 if j1 < len(m.Entries) {
497                         s1 = m.Entries[j1]
498                 }
499                 size += 4     // s1.FwdEntryIndex
500                 size += 4     // s1.DpTable
501                 size += 1     // s1.Leid.Type
502                 size += 1 * 6 // s1.Leid.Address
503                 size += 1     // s1.Reid.Type
504                 size += 1 * 6 // s1.Reid.Address
505                 size += 4     // s1.Vni
506                 size += 1     // s1.Action
507         }
508         return size
509 }
510 func (m *GpeFwdEntriesGetReply) Marshal(b []byte) ([]byte, error) {
511         var buf *codec.Buffer
512         if b == nil {
513                 buf = codec.NewBuffer(make([]byte, m.Size()))
514         } else {
515                 buf = codec.NewBuffer(b)
516         }
517         buf.EncodeUint32(uint32(m.Retval))
518         buf.EncodeUint32(uint32(len(m.Entries)))
519         for j0 := 0; j0 < len(m.Entries); j0++ {
520                 var v0 GpeFwdEntry
521                 if j0 < len(m.Entries) {
522                         v0 = m.Entries[j0]
523                 }
524                 buf.EncodeUint32(uint32(v0.FwdEntryIndex))
525                 buf.EncodeUint32(uint32(v0.DpTable))
526                 buf.EncodeUint8(uint8(v0.Leid.Type))
527                 buf.EncodeBytes(v0.Leid.Address.XXX_UnionData[:], 0)
528                 buf.EncodeUint8(uint8(v0.Reid.Type))
529                 buf.EncodeBytes(v0.Reid.Address.XXX_UnionData[:], 0)
530                 buf.EncodeUint32(uint32(v0.Vni))
531                 buf.EncodeUint8(uint8(v0.Action))
532         }
533         return buf.Bytes(), nil
534 }
535 func (m *GpeFwdEntriesGetReply) Unmarshal(b []byte) error {
536         buf := codec.NewBuffer(b)
537         m.Retval = int32(buf.DecodeUint32())
538         m.Count = buf.DecodeUint32()
539         m.Entries = make([]GpeFwdEntry, int(m.Count))
540         for j0 := 0; j0 < len(m.Entries); j0++ {
541                 m.Entries[j0].FwdEntryIndex = buf.DecodeUint32()
542                 m.Entries[j0].DpTable = buf.DecodeUint32()
543                 m.Entries[j0].Leid.Type = lisp_types.EidType(buf.DecodeUint8())
544                 copy(m.Entries[j0].Leid.Address.XXX_UnionData[:], buf.DecodeBytes(6))
545                 m.Entries[j0].Reid.Type = lisp_types.EidType(buf.DecodeUint8())
546                 copy(m.Entries[j0].Reid.Address.XXX_UnionData[:], buf.DecodeBytes(6))
547                 m.Entries[j0].Vni = buf.DecodeUint32()
548                 m.Entries[j0].Action = buf.DecodeUint8()
549         }
550         return nil
551 }
552
553 // GpeFwdEntryPathDetails defines message 'gpe_fwd_entry_path_details'.
554 type GpeFwdEntryPathDetails struct {
555         LclLoc GpeLocator `binapi:"gpe_locator,name=lcl_loc" json:"lcl_loc,omitempty"`
556         RmtLoc GpeLocator `binapi:"gpe_locator,name=rmt_loc" json:"rmt_loc,omitempty"`
557 }
558
559 func (m *GpeFwdEntryPathDetails) Reset()               { *m = GpeFwdEntryPathDetails{} }
560 func (*GpeFwdEntryPathDetails) GetMessageName() string { return "gpe_fwd_entry_path_details" }
561 func (*GpeFwdEntryPathDetails) GetCrcString() string   { return "ee80b19a" }
562 func (*GpeFwdEntryPathDetails) GetMessageType() api.MessageType {
563         return api.ReplyMessage
564 }
565
566 func (m *GpeFwdEntryPathDetails) Size() int {
567         if m == nil {
568                 return 0
569         }
570         var size int
571         size += 1      // m.LclLoc.Weight
572         size += 1      // m.LclLoc.Addr.Af
573         size += 1 * 16 // m.LclLoc.Addr.Un
574         size += 1      // m.RmtLoc.Weight
575         size += 1      // m.RmtLoc.Addr.Af
576         size += 1 * 16 // m.RmtLoc.Addr.Un
577         return size
578 }
579 func (m *GpeFwdEntryPathDetails) Marshal(b []byte) ([]byte, error) {
580         var buf *codec.Buffer
581         if b == nil {
582                 buf = codec.NewBuffer(make([]byte, m.Size()))
583         } else {
584                 buf = codec.NewBuffer(b)
585         }
586         buf.EncodeUint8(uint8(m.LclLoc.Weight))
587         buf.EncodeUint8(uint8(m.LclLoc.Addr.Af))
588         buf.EncodeBytes(m.LclLoc.Addr.Un.XXX_UnionData[:], 0)
589         buf.EncodeUint8(uint8(m.RmtLoc.Weight))
590         buf.EncodeUint8(uint8(m.RmtLoc.Addr.Af))
591         buf.EncodeBytes(m.RmtLoc.Addr.Un.XXX_UnionData[:], 0)
592         return buf.Bytes(), nil
593 }
594 func (m *GpeFwdEntryPathDetails) Unmarshal(b []byte) error {
595         buf := codec.NewBuffer(b)
596         m.LclLoc.Weight = buf.DecodeUint8()
597         m.LclLoc.Addr.Af = ip_types.AddressFamily(buf.DecodeUint8())
598         copy(m.LclLoc.Addr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
599         m.RmtLoc.Weight = buf.DecodeUint8()
600         m.RmtLoc.Addr.Af = ip_types.AddressFamily(buf.DecodeUint8())
601         copy(m.RmtLoc.Addr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
602         return nil
603 }
604
605 // GpeFwdEntryPathDump defines message 'gpe_fwd_entry_path_dump'.
606 type GpeFwdEntryPathDump struct {
607         FwdEntryIndex uint32 `binapi:"u32,name=fwd_entry_index" json:"fwd_entry_index,omitempty"`
608 }
609
610 func (m *GpeFwdEntryPathDump) Reset()               { *m = GpeFwdEntryPathDump{} }
611 func (*GpeFwdEntryPathDump) GetMessageName() string { return "gpe_fwd_entry_path_dump" }
612 func (*GpeFwdEntryPathDump) GetCrcString() string   { return "39bce980" }
613 func (*GpeFwdEntryPathDump) GetMessageType() api.MessageType {
614         return api.RequestMessage
615 }
616
617 func (m *GpeFwdEntryPathDump) Size() int {
618         if m == nil {
619                 return 0
620         }
621         var size int
622         size += 4 // m.FwdEntryIndex
623         return size
624 }
625 func (m *GpeFwdEntryPathDump) Marshal(b []byte) ([]byte, error) {
626         var buf *codec.Buffer
627         if b == nil {
628                 buf = codec.NewBuffer(make([]byte, m.Size()))
629         } else {
630                 buf = codec.NewBuffer(b)
631         }
632         buf.EncodeUint32(uint32(m.FwdEntryIndex))
633         return buf.Bytes(), nil
634 }
635 func (m *GpeFwdEntryPathDump) Unmarshal(b []byte) error {
636         buf := codec.NewBuffer(b)
637         m.FwdEntryIndex = buf.DecodeUint32()
638         return nil
639 }
640
641 // GpeFwdEntryVnisGet defines message 'gpe_fwd_entry_vnis_get'.
642 type GpeFwdEntryVnisGet struct{}
643
644 func (m *GpeFwdEntryVnisGet) Reset()               { *m = GpeFwdEntryVnisGet{} }
645 func (*GpeFwdEntryVnisGet) GetMessageName() string { return "gpe_fwd_entry_vnis_get" }
646 func (*GpeFwdEntryVnisGet) GetCrcString() string   { return "51077d14" }
647 func (*GpeFwdEntryVnisGet) GetMessageType() api.MessageType {
648         return api.RequestMessage
649 }
650
651 func (m *GpeFwdEntryVnisGet) Size() int {
652         if m == nil {
653                 return 0
654         }
655         var size int
656         return size
657 }
658 func (m *GpeFwdEntryVnisGet) Marshal(b []byte) ([]byte, error) {
659         var buf *codec.Buffer
660         if b == nil {
661                 buf = codec.NewBuffer(make([]byte, m.Size()))
662         } else {
663                 buf = codec.NewBuffer(b)
664         }
665         return buf.Bytes(), nil
666 }
667 func (m *GpeFwdEntryVnisGet) Unmarshal(b []byte) error {
668         return nil
669 }
670
671 // GpeFwdEntryVnisGetReply defines message 'gpe_fwd_entry_vnis_get_reply'.
672 type GpeFwdEntryVnisGetReply struct {
673         Retval int32    `binapi:"i32,name=retval" json:"retval,omitempty"`
674         Count  uint32   `binapi:"u32,name=count" json:"-"`
675         Vnis   []uint32 `binapi:"u32[count],name=vnis" json:"vnis,omitempty"`
676 }
677
678 func (m *GpeFwdEntryVnisGetReply) Reset()               { *m = GpeFwdEntryVnisGetReply{} }
679 func (*GpeFwdEntryVnisGetReply) GetMessageName() string { return "gpe_fwd_entry_vnis_get_reply" }
680 func (*GpeFwdEntryVnisGetReply) GetCrcString() string   { return "aa70da20" }
681 func (*GpeFwdEntryVnisGetReply) GetMessageType() api.MessageType {
682         return api.ReplyMessage
683 }
684
685 func (m *GpeFwdEntryVnisGetReply) Size() int {
686         if m == nil {
687                 return 0
688         }
689         var size int
690         size += 4               // m.Retval
691         size += 4               // m.Count
692         size += 4 * len(m.Vnis) // m.Vnis
693         return size
694 }
695 func (m *GpeFwdEntryVnisGetReply) Marshal(b []byte) ([]byte, error) {
696         var buf *codec.Buffer
697         if b == nil {
698                 buf = codec.NewBuffer(make([]byte, m.Size()))
699         } else {
700                 buf = codec.NewBuffer(b)
701         }
702         buf.EncodeUint32(uint32(m.Retval))
703         buf.EncodeUint32(uint32(len(m.Vnis)))
704         for i := 0; i < len(m.Vnis); i++ {
705                 var x uint32
706                 if i < len(m.Vnis) {
707                         x = uint32(m.Vnis[i])
708                 }
709                 buf.EncodeUint32(uint32(x))
710         }
711         return buf.Bytes(), nil
712 }
713 func (m *GpeFwdEntryVnisGetReply) Unmarshal(b []byte) error {
714         buf := codec.NewBuffer(b)
715         m.Retval = int32(buf.DecodeUint32())
716         m.Count = buf.DecodeUint32()
717         m.Vnis = make([]uint32, m.Count)
718         for i := 0; i < len(m.Vnis); i++ {
719                 m.Vnis[i] = buf.DecodeUint32()
720         }
721         return nil
722 }
723
724 // GpeGetEncapMode defines message 'gpe_get_encap_mode'.
725 type GpeGetEncapMode struct{}
726
727 func (m *GpeGetEncapMode) Reset()               { *m = GpeGetEncapMode{} }
728 func (*GpeGetEncapMode) GetMessageName() string { return "gpe_get_encap_mode" }
729 func (*GpeGetEncapMode) GetCrcString() string   { return "51077d14" }
730 func (*GpeGetEncapMode) GetMessageType() api.MessageType {
731         return api.RequestMessage
732 }
733
734 func (m *GpeGetEncapMode) Size() int {
735         if m == nil {
736                 return 0
737         }
738         var size int
739         return size
740 }
741 func (m *GpeGetEncapMode) Marshal(b []byte) ([]byte, error) {
742         var buf *codec.Buffer
743         if b == nil {
744                 buf = codec.NewBuffer(make([]byte, m.Size()))
745         } else {
746                 buf = codec.NewBuffer(b)
747         }
748         return buf.Bytes(), nil
749 }
750 func (m *GpeGetEncapMode) Unmarshal(b []byte) error {
751         return nil
752 }
753
754 // GpeGetEncapModeReply defines message 'gpe_get_encap_mode_reply'.
755 type GpeGetEncapModeReply struct {
756         Retval    int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
757         EncapMode uint8 `binapi:"u8,name=encap_mode" json:"encap_mode,omitempty"`
758 }
759
760 func (m *GpeGetEncapModeReply) Reset()               { *m = GpeGetEncapModeReply{} }
761 func (*GpeGetEncapModeReply) GetMessageName() string { return "gpe_get_encap_mode_reply" }
762 func (*GpeGetEncapModeReply) GetCrcString() string   { return "36e3f7ca" }
763 func (*GpeGetEncapModeReply) GetMessageType() api.MessageType {
764         return api.ReplyMessage
765 }
766
767 func (m *GpeGetEncapModeReply) Size() int {
768         if m == nil {
769                 return 0
770         }
771         var size int
772         size += 4 // m.Retval
773         size += 1 // m.EncapMode
774         return size
775 }
776 func (m *GpeGetEncapModeReply) Marshal(b []byte) ([]byte, error) {
777         var buf *codec.Buffer
778         if b == nil {
779                 buf = codec.NewBuffer(make([]byte, m.Size()))
780         } else {
781                 buf = codec.NewBuffer(b)
782         }
783         buf.EncodeUint32(uint32(m.Retval))
784         buf.EncodeUint8(uint8(m.EncapMode))
785         return buf.Bytes(), nil
786 }
787 func (m *GpeGetEncapModeReply) Unmarshal(b []byte) error {
788         buf := codec.NewBuffer(b)
789         m.Retval = int32(buf.DecodeUint32())
790         m.EncapMode = buf.DecodeUint8()
791         return nil
792 }
793
794 // GpeNativeFwdRpathsGet defines message 'gpe_native_fwd_rpaths_get'.
795 type GpeNativeFwdRpathsGet struct {
796         IsIP4 bool `binapi:"bool,name=is_ip4" json:"is_ip4,omitempty"`
797 }
798
799 func (m *GpeNativeFwdRpathsGet) Reset()               { *m = GpeNativeFwdRpathsGet{} }
800 func (*GpeNativeFwdRpathsGet) GetMessageName() string { return "gpe_native_fwd_rpaths_get" }
801 func (*GpeNativeFwdRpathsGet) GetCrcString() string   { return "f652ceb4" }
802 func (*GpeNativeFwdRpathsGet) GetMessageType() api.MessageType {
803         return api.RequestMessage
804 }
805
806 func (m *GpeNativeFwdRpathsGet) Size() int {
807         if m == nil {
808                 return 0
809         }
810         var size int
811         size += 1 // m.IsIP4
812         return size
813 }
814 func (m *GpeNativeFwdRpathsGet) Marshal(b []byte) ([]byte, error) {
815         var buf *codec.Buffer
816         if b == nil {
817                 buf = codec.NewBuffer(make([]byte, m.Size()))
818         } else {
819                 buf = codec.NewBuffer(b)
820         }
821         buf.EncodeBool(m.IsIP4)
822         return buf.Bytes(), nil
823 }
824 func (m *GpeNativeFwdRpathsGet) Unmarshal(b []byte) error {
825         buf := codec.NewBuffer(b)
826         m.IsIP4 = buf.DecodeBool()
827         return nil
828 }
829
830 // GpeNativeFwdRpathsGetReply defines message 'gpe_native_fwd_rpaths_get_reply'.
831 type GpeNativeFwdRpathsGetReply struct {
832         Retval  int32               `binapi:"i32,name=retval" json:"retval,omitempty"`
833         Count   uint32              `binapi:"u32,name=count" json:"-"`
834         Entries []GpeNativeFwdRpath `binapi:"gpe_native_fwd_rpath[count],name=entries" json:"entries,omitempty"`
835 }
836
837 func (m *GpeNativeFwdRpathsGetReply) Reset()               { *m = GpeNativeFwdRpathsGetReply{} }
838 func (*GpeNativeFwdRpathsGetReply) GetMessageName() string { return "gpe_native_fwd_rpaths_get_reply" }
839 func (*GpeNativeFwdRpathsGetReply) GetCrcString() string   { return "79d54eb9" }
840 func (*GpeNativeFwdRpathsGetReply) GetMessageType() api.MessageType {
841         return api.ReplyMessage
842 }
843
844 func (m *GpeNativeFwdRpathsGetReply) Size() int {
845         if m == nil {
846                 return 0
847         }
848         var size int
849         size += 4 // m.Retval
850         size += 4 // m.Count
851         for j1 := 0; j1 < len(m.Entries); j1++ {
852                 var s1 GpeNativeFwdRpath
853                 _ = s1
854                 if j1 < len(m.Entries) {
855                         s1 = m.Entries[j1]
856                 }
857                 size += 4      // s1.FibIndex
858                 size += 4      // s1.NhSwIfIndex
859                 size += 1      // s1.NhAddr.Af
860                 size += 1 * 16 // s1.NhAddr.Un
861         }
862         return size
863 }
864 func (m *GpeNativeFwdRpathsGetReply) Marshal(b []byte) ([]byte, error) {
865         var buf *codec.Buffer
866         if b == nil {
867                 buf = codec.NewBuffer(make([]byte, m.Size()))
868         } else {
869                 buf = codec.NewBuffer(b)
870         }
871         buf.EncodeUint32(uint32(m.Retval))
872         buf.EncodeUint32(uint32(len(m.Entries)))
873         for j0 := 0; j0 < len(m.Entries); j0++ {
874                 var v0 GpeNativeFwdRpath
875                 if j0 < len(m.Entries) {
876                         v0 = m.Entries[j0]
877                 }
878                 buf.EncodeUint32(uint32(v0.FibIndex))
879                 buf.EncodeUint32(uint32(v0.NhSwIfIndex))
880                 buf.EncodeUint8(uint8(v0.NhAddr.Af))
881                 buf.EncodeBytes(v0.NhAddr.Un.XXX_UnionData[:], 0)
882         }
883         return buf.Bytes(), nil
884 }
885 func (m *GpeNativeFwdRpathsGetReply) Unmarshal(b []byte) error {
886         buf := codec.NewBuffer(b)
887         m.Retval = int32(buf.DecodeUint32())
888         m.Count = buf.DecodeUint32()
889         m.Entries = make([]GpeNativeFwdRpath, int(m.Count))
890         for j0 := 0; j0 < len(m.Entries); j0++ {
891                 m.Entries[j0].FibIndex = buf.DecodeUint32()
892                 m.Entries[j0].NhSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
893                 m.Entries[j0].NhAddr.Af = ip_types.AddressFamily(buf.DecodeUint8())
894                 copy(m.Entries[j0].NhAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
895         }
896         return nil
897 }
898
899 // GpeSetEncapMode defines message 'gpe_set_encap_mode'.
900 type GpeSetEncapMode struct {
901         IsVxlan bool `binapi:"bool,name=is_vxlan" json:"is_vxlan,omitempty"`
902 }
903
904 func (m *GpeSetEncapMode) Reset()               { *m = GpeSetEncapMode{} }
905 func (*GpeSetEncapMode) GetMessageName() string { return "gpe_set_encap_mode" }
906 func (*GpeSetEncapMode) GetCrcString() string   { return "bd819eac" }
907 func (*GpeSetEncapMode) GetMessageType() api.MessageType {
908         return api.RequestMessage
909 }
910
911 func (m *GpeSetEncapMode) Size() int {
912         if m == nil {
913                 return 0
914         }
915         var size int
916         size += 1 // m.IsVxlan
917         return size
918 }
919 func (m *GpeSetEncapMode) Marshal(b []byte) ([]byte, error) {
920         var buf *codec.Buffer
921         if b == nil {
922                 buf = codec.NewBuffer(make([]byte, m.Size()))
923         } else {
924                 buf = codec.NewBuffer(b)
925         }
926         buf.EncodeBool(m.IsVxlan)
927         return buf.Bytes(), nil
928 }
929 func (m *GpeSetEncapMode) Unmarshal(b []byte) error {
930         buf := codec.NewBuffer(b)
931         m.IsVxlan = buf.DecodeBool()
932         return nil
933 }
934
935 // GpeSetEncapModeReply defines message 'gpe_set_encap_mode_reply'.
936 type GpeSetEncapModeReply struct {
937         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
938 }
939
940 func (m *GpeSetEncapModeReply) Reset()               { *m = GpeSetEncapModeReply{} }
941 func (*GpeSetEncapModeReply) GetMessageName() string { return "gpe_set_encap_mode_reply" }
942 func (*GpeSetEncapModeReply) GetCrcString() string   { return "e8d4e804" }
943 func (*GpeSetEncapModeReply) GetMessageType() api.MessageType {
944         return api.ReplyMessage
945 }
946
947 func (m *GpeSetEncapModeReply) Size() int {
948         if m == nil {
949                 return 0
950         }
951         var size int
952         size += 4 // m.Retval
953         return size
954 }
955 func (m *GpeSetEncapModeReply) Marshal(b []byte) ([]byte, error) {
956         var buf *codec.Buffer
957         if b == nil {
958                 buf = codec.NewBuffer(make([]byte, m.Size()))
959         } else {
960                 buf = codec.NewBuffer(b)
961         }
962         buf.EncodeUint32(uint32(m.Retval))
963         return buf.Bytes(), nil
964 }
965 func (m *GpeSetEncapModeReply) Unmarshal(b []byte) error {
966         buf := codec.NewBuffer(b)
967         m.Retval = int32(buf.DecodeUint32())
968         return nil
969 }
970
971 func init() { file_lisp_gpe_binapi_init() }
972 func file_lisp_gpe_binapi_init() {
973         api.RegisterMessage((*GpeAddDelFwdEntry)(nil), "gpe_add_del_fwd_entry_de6df50f")
974         api.RegisterMessage((*GpeAddDelFwdEntryReply)(nil), "gpe_add_del_fwd_entry_reply_efe5f176")
975         api.RegisterMessage((*GpeAddDelIface)(nil), "gpe_add_del_iface_3ccff273")
976         api.RegisterMessage((*GpeAddDelIfaceReply)(nil), "gpe_add_del_iface_reply_e8d4e804")
977         api.RegisterMessage((*GpeAddDelNativeFwdRpath)(nil), "gpe_add_del_native_fwd_rpath_812da2f2")
978         api.RegisterMessage((*GpeAddDelNativeFwdRpathReply)(nil), "gpe_add_del_native_fwd_rpath_reply_e8d4e804")
979         api.RegisterMessage((*GpeEnableDisable)(nil), "gpe_enable_disable_c264d7bf")
980         api.RegisterMessage((*GpeEnableDisableReply)(nil), "gpe_enable_disable_reply_e8d4e804")
981         api.RegisterMessage((*GpeFwdEntriesGet)(nil), "gpe_fwd_entries_get_8d1f2fe9")
982         api.RegisterMessage((*GpeFwdEntriesGetReply)(nil), "gpe_fwd_entries_get_reply_f9f53f1b")
983         api.RegisterMessage((*GpeFwdEntryPathDetails)(nil), "gpe_fwd_entry_path_details_ee80b19a")
984         api.RegisterMessage((*GpeFwdEntryPathDump)(nil), "gpe_fwd_entry_path_dump_39bce980")
985         api.RegisterMessage((*GpeFwdEntryVnisGet)(nil), "gpe_fwd_entry_vnis_get_51077d14")
986         api.RegisterMessage((*GpeFwdEntryVnisGetReply)(nil), "gpe_fwd_entry_vnis_get_reply_aa70da20")
987         api.RegisterMessage((*GpeGetEncapMode)(nil), "gpe_get_encap_mode_51077d14")
988         api.RegisterMessage((*GpeGetEncapModeReply)(nil), "gpe_get_encap_mode_reply_36e3f7ca")
989         api.RegisterMessage((*GpeNativeFwdRpathsGet)(nil), "gpe_native_fwd_rpaths_get_f652ceb4")
990         api.RegisterMessage((*GpeNativeFwdRpathsGetReply)(nil), "gpe_native_fwd_rpaths_get_reply_79d54eb9")
991         api.RegisterMessage((*GpeSetEncapMode)(nil), "gpe_set_encap_mode_bd819eac")
992         api.RegisterMessage((*GpeSetEncapModeReply)(nil), "gpe_set_encap_mode_reply_e8d4e804")
993 }
994
995 // Messages returns list of all messages in this module.
996 func AllMessages() []api.Message {
997         return []api.Message{
998                 (*GpeAddDelFwdEntry)(nil),
999                 (*GpeAddDelFwdEntryReply)(nil),
1000                 (*GpeAddDelIface)(nil),
1001                 (*GpeAddDelIfaceReply)(nil),
1002                 (*GpeAddDelNativeFwdRpath)(nil),
1003                 (*GpeAddDelNativeFwdRpathReply)(nil),
1004                 (*GpeEnableDisable)(nil),
1005                 (*GpeEnableDisableReply)(nil),
1006                 (*GpeFwdEntriesGet)(nil),
1007                 (*GpeFwdEntriesGetReply)(nil),
1008                 (*GpeFwdEntryPathDetails)(nil),
1009                 (*GpeFwdEntryPathDump)(nil),
1010                 (*GpeFwdEntryVnisGet)(nil),
1011                 (*GpeFwdEntryVnisGetReply)(nil),
1012                 (*GpeGetEncapMode)(nil),
1013                 (*GpeGetEncapModeReply)(nil),
1014                 (*GpeNativeFwdRpathsGet)(nil),
1015                 (*GpeNativeFwdRpathsGetReply)(nil),
1016                 (*GpeSetEncapMode)(nil),
1017                 (*GpeSetEncapModeReply)(nil),
1018         }
1019 }