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