1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
5 // source: .vppapi/core/lisp_gpe.api.json
7 // Package lisp_gpe contains generated bindings for API file lisp_gpe.api.
16 api "git.fd.io/govpp.git/api"
17 codec "git.fd.io/govpp.git/codec"
20 // This is a compile-time assertion to ensure that this generated file
21 // is compatible with the GoVPP api package it is being compiled against.
22 // A compilation error at this line likely means your copy of the
23 // GoVPP api package needs to be updated.
24 const _ = api.GoVppAPIPackageIsVersion2
29 VersionCrc = 0x9396c80c
32 // GpeFwdEntry defines type 'gpe_fwd_entry'.
33 type GpeFwdEntry struct {
34 FwdEntryIndex uint32 `binapi:"u32,name=fwd_entry_index" json:"fwd_entry_index,omitempty"`
35 DpTable uint32 `binapi:"u32,name=dp_table" json:"dp_table,omitempty"`
36 EidType uint8 `binapi:"u8,name=eid_type" json:"eid_type,omitempty"`
37 LeidPrefixLen uint8 `binapi:"u8,name=leid_prefix_len" json:"leid_prefix_len,omitempty"`
38 ReidPrefixLen uint8 `binapi:"u8,name=reid_prefix_len" json:"reid_prefix_len,omitempty"`
39 Leid []byte `binapi:"u8[16],name=leid" json:"leid,omitempty"`
40 Reid []byte `binapi:"u8[16],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"`
45 // GpeLocator defines type 'gpe_locator'.
46 type GpeLocator struct {
47 IsIP4 uint8 `binapi:"u8,name=is_ip4" json:"is_ip4,omitempty"`
48 Weight uint8 `binapi:"u8,name=weight" json:"weight,omitempty"`
49 Addr []byte `binapi:"u8[16],name=addr" json:"addr,omitempty"`
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 uint32 `binapi:"u32,name=nh_sw_if_index" json:"nh_sw_if_index,omitempty"`
56 IsIP4 uint8 `binapi:"u8,name=is_ip4" json:"is_ip4,omitempty"`
57 NhAddr []byte `binapi:"u8[16],name=nh_addr" json:"nh_addr,omitempty"`
60 // GpeAddDelFwdEntry defines message 'gpe_add_del_fwd_entry'.
61 type GpeAddDelFwdEntry struct {
62 IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
63 EidType uint8 `binapi:"u8,name=eid_type" json:"eid_type,omitempty"`
64 RmtEid []byte `binapi:"u8[16],name=rmt_eid" json:"rmt_eid,omitempty"`
65 LclEid []byte `binapi:"u8[16],name=lcl_eid" json:"lcl_eid,omitempty"`
66 RmtLen uint8 `binapi:"u8,name=rmt_len" json:"rmt_len,omitempty"`
67 LclLen uint8 `binapi:"u8,name=lcl_len" json:"lcl_len,omitempty"`
68 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
69 DpTable uint32 `binapi:"u32,name=dp_table" json:"dp_table,omitempty"`
70 Action uint8 `binapi:"u8,name=action" json:"action,omitempty"`
71 LocNum uint32 `binapi:"u32,name=loc_num" json:"-"`
72 Locs []GpeLocator `binapi:"gpe_locator[loc_num],name=locs" json:"locs,omitempty"`
75 func (m *GpeAddDelFwdEntry) Reset() { *m = GpeAddDelFwdEntry{} }
76 func (*GpeAddDelFwdEntry) GetMessageName() string { return "gpe_add_del_fwd_entry" }
77 func (*GpeAddDelFwdEntry) GetCrcString() string { return "afbf857a" }
78 func (*GpeAddDelFwdEntry) GetMessageType() api.MessageType {
79 return api.RequestMessage
82 func (m *GpeAddDelFwdEntry) Size() (size int) {
87 size += 1 // m.EidType
88 size += 1 * 16 // m.RmtEid
89 size += 1 * 16 // m.LclEid
93 size += 4 // m.DpTable
96 for j1 := 0; j1 < len(m.Locs); j1++ {
102 size += 1 // s1.IsIP4
103 size += 1 // s1.Weight
104 size += 1 * 16 // s1.Addr
108 func (m *GpeAddDelFwdEntry) Marshal(b []byte) ([]byte, error) {
110 b = make([]byte, m.Size())
112 buf := codec.NewBuffer(b)
113 buf.EncodeUint8(m.IsAdd)
114 buf.EncodeUint8(m.EidType)
115 buf.EncodeBytes(m.RmtEid, 16)
116 buf.EncodeBytes(m.LclEid, 16)
117 buf.EncodeUint8(m.RmtLen)
118 buf.EncodeUint8(m.LclLen)
119 buf.EncodeUint32(m.Vni)
120 buf.EncodeUint32(m.DpTable)
121 buf.EncodeUint8(m.Action)
122 buf.EncodeUint32(uint32(len(m.Locs)))
123 for j0 := 0; j0 < len(m.Locs); j0++ {
124 var v0 GpeLocator // Locs
125 if j0 < len(m.Locs) {
128 buf.EncodeUint8(v0.IsIP4)
129 buf.EncodeUint8(v0.Weight)
130 buf.EncodeBytes(v0.Addr, 16)
132 return buf.Bytes(), nil
134 func (m *GpeAddDelFwdEntry) Unmarshal(b []byte) error {
135 buf := codec.NewBuffer(b)
136 m.IsAdd = buf.DecodeUint8()
137 m.EidType = buf.DecodeUint8()
138 m.RmtEid = make([]byte, 16)
139 copy(m.RmtEid, buf.DecodeBytes(len(m.RmtEid)))
140 m.LclEid = make([]byte, 16)
141 copy(m.LclEid, buf.DecodeBytes(len(m.LclEid)))
142 m.RmtLen = buf.DecodeUint8()
143 m.LclLen = buf.DecodeUint8()
144 m.Vni = buf.DecodeUint32()
145 m.DpTable = buf.DecodeUint32()
146 m.Action = buf.DecodeUint8()
147 m.LocNum = buf.DecodeUint32()
148 m.Locs = make([]GpeLocator, m.LocNum)
149 for j0 := 0; j0 < len(m.Locs); j0++ {
150 m.Locs[j0].IsIP4 = buf.DecodeUint8()
151 m.Locs[j0].Weight = buf.DecodeUint8()
152 m.Locs[j0].Addr = make([]byte, 16)
153 copy(m.Locs[j0].Addr, buf.DecodeBytes(len(m.Locs[j0].Addr)))
158 // GpeAddDelFwdEntryReply defines message 'gpe_add_del_fwd_entry_reply'.
159 type GpeAddDelFwdEntryReply struct {
160 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
161 FwdEntryIndex uint32 `binapi:"u32,name=fwd_entry_index" json:"fwd_entry_index,omitempty"`
164 func (m *GpeAddDelFwdEntryReply) Reset() { *m = GpeAddDelFwdEntryReply{} }
165 func (*GpeAddDelFwdEntryReply) GetMessageName() string { return "gpe_add_del_fwd_entry_reply" }
166 func (*GpeAddDelFwdEntryReply) GetCrcString() string { return "efe5f176" }
167 func (*GpeAddDelFwdEntryReply) GetMessageType() api.MessageType {
168 return api.ReplyMessage
171 func (m *GpeAddDelFwdEntryReply) Size() (size int) {
175 size += 4 // m.Retval
176 size += 4 // m.FwdEntryIndex
179 func (m *GpeAddDelFwdEntryReply) Marshal(b []byte) ([]byte, error) {
181 b = make([]byte, m.Size())
183 buf := codec.NewBuffer(b)
184 buf.EncodeInt32(m.Retval)
185 buf.EncodeUint32(m.FwdEntryIndex)
186 return buf.Bytes(), nil
188 func (m *GpeAddDelFwdEntryReply) Unmarshal(b []byte) error {
189 buf := codec.NewBuffer(b)
190 m.Retval = buf.DecodeInt32()
191 m.FwdEntryIndex = buf.DecodeUint32()
195 // GpeAddDelIface defines message 'gpe_add_del_iface'.
196 type GpeAddDelIface struct {
197 IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
198 IsL2 uint8 `binapi:"u8,name=is_l2" json:"is_l2,omitempty"`
199 DpTable uint32 `binapi:"u32,name=dp_table" json:"dp_table,omitempty"`
200 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
203 func (m *GpeAddDelIface) Reset() { *m = GpeAddDelIface{} }
204 func (*GpeAddDelIface) GetMessageName() string { return "gpe_add_del_iface" }
205 func (*GpeAddDelIface) GetCrcString() string { return "42d6b533" }
206 func (*GpeAddDelIface) GetMessageType() api.MessageType {
207 return api.RequestMessage
210 func (m *GpeAddDelIface) Size() (size int) {
216 size += 4 // m.DpTable
220 func (m *GpeAddDelIface) Marshal(b []byte) ([]byte, error) {
222 b = make([]byte, m.Size())
224 buf := codec.NewBuffer(b)
225 buf.EncodeUint8(m.IsAdd)
226 buf.EncodeUint8(m.IsL2)
227 buf.EncodeUint32(m.DpTable)
228 buf.EncodeUint32(m.Vni)
229 return buf.Bytes(), nil
231 func (m *GpeAddDelIface) Unmarshal(b []byte) error {
232 buf := codec.NewBuffer(b)
233 m.IsAdd = buf.DecodeUint8()
234 m.IsL2 = buf.DecodeUint8()
235 m.DpTable = buf.DecodeUint32()
236 m.Vni = buf.DecodeUint32()
240 // GpeAddDelIfaceReply defines message 'gpe_add_del_iface_reply'.
241 type GpeAddDelIfaceReply struct {
242 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
245 func (m *GpeAddDelIfaceReply) Reset() { *m = GpeAddDelIfaceReply{} }
246 func (*GpeAddDelIfaceReply) GetMessageName() string { return "gpe_add_del_iface_reply" }
247 func (*GpeAddDelIfaceReply) GetCrcString() string { return "e8d4e804" }
248 func (*GpeAddDelIfaceReply) GetMessageType() api.MessageType {
249 return api.ReplyMessage
252 func (m *GpeAddDelIfaceReply) Size() (size int) {
256 size += 4 // m.Retval
259 func (m *GpeAddDelIfaceReply) Marshal(b []byte) ([]byte, error) {
261 b = make([]byte, m.Size())
263 buf := codec.NewBuffer(b)
264 buf.EncodeInt32(m.Retval)
265 return buf.Bytes(), nil
267 func (m *GpeAddDelIfaceReply) Unmarshal(b []byte) error {
268 buf := codec.NewBuffer(b)
269 m.Retval = buf.DecodeInt32()
273 // GpeAddDelNativeFwdRpath defines message 'gpe_add_del_native_fwd_rpath'.
274 type GpeAddDelNativeFwdRpath struct {
275 IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
276 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
277 NhSwIfIndex uint32 `binapi:"u32,name=nh_sw_if_index" json:"nh_sw_if_index,omitempty"`
278 IsIP4 uint8 `binapi:"u8,name=is_ip4" json:"is_ip4,omitempty"`
279 NhAddr []byte `binapi:"u8[16],name=nh_addr" json:"nh_addr,omitempty"`
282 func (m *GpeAddDelNativeFwdRpath) Reset() { *m = GpeAddDelNativeFwdRpath{} }
283 func (*GpeAddDelNativeFwdRpath) GetMessageName() string { return "gpe_add_del_native_fwd_rpath" }
284 func (*GpeAddDelNativeFwdRpath) GetCrcString() string { return "bfc42b8f" }
285 func (*GpeAddDelNativeFwdRpath) GetMessageType() api.MessageType {
286 return api.RequestMessage
289 func (m *GpeAddDelNativeFwdRpath) Size() (size int) {
294 size += 4 // m.TableID
295 size += 4 // m.NhSwIfIndex
297 size += 1 * 16 // m.NhAddr
300 func (m *GpeAddDelNativeFwdRpath) Marshal(b []byte) ([]byte, error) {
302 b = make([]byte, m.Size())
304 buf := codec.NewBuffer(b)
305 buf.EncodeUint8(m.IsAdd)
306 buf.EncodeUint32(m.TableID)
307 buf.EncodeUint32(m.NhSwIfIndex)
308 buf.EncodeUint8(m.IsIP4)
309 buf.EncodeBytes(m.NhAddr, 16)
310 return buf.Bytes(), nil
312 func (m *GpeAddDelNativeFwdRpath) Unmarshal(b []byte) error {
313 buf := codec.NewBuffer(b)
314 m.IsAdd = buf.DecodeUint8()
315 m.TableID = buf.DecodeUint32()
316 m.NhSwIfIndex = buf.DecodeUint32()
317 m.IsIP4 = buf.DecodeUint8()
318 m.NhAddr = make([]byte, 16)
319 copy(m.NhAddr, buf.DecodeBytes(len(m.NhAddr)))
323 // GpeAddDelNativeFwdRpathReply defines message 'gpe_add_del_native_fwd_rpath_reply'.
324 type GpeAddDelNativeFwdRpathReply struct {
325 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
328 func (m *GpeAddDelNativeFwdRpathReply) Reset() { *m = GpeAddDelNativeFwdRpathReply{} }
329 func (*GpeAddDelNativeFwdRpathReply) GetMessageName() string {
330 return "gpe_add_del_native_fwd_rpath_reply"
332 func (*GpeAddDelNativeFwdRpathReply) GetCrcString() string { return "e8d4e804" }
333 func (*GpeAddDelNativeFwdRpathReply) GetMessageType() api.MessageType {
334 return api.ReplyMessage
337 func (m *GpeAddDelNativeFwdRpathReply) Size() (size int) {
341 size += 4 // m.Retval
344 func (m *GpeAddDelNativeFwdRpathReply) Marshal(b []byte) ([]byte, error) {
346 b = make([]byte, m.Size())
348 buf := codec.NewBuffer(b)
349 buf.EncodeInt32(m.Retval)
350 return buf.Bytes(), nil
352 func (m *GpeAddDelNativeFwdRpathReply) Unmarshal(b []byte) error {
353 buf := codec.NewBuffer(b)
354 m.Retval = buf.DecodeInt32()
358 // GpeEnableDisable defines message 'gpe_enable_disable'.
359 type GpeEnableDisable struct {
360 IsEn uint8 `binapi:"u8,name=is_en" json:"is_en,omitempty"`
363 func (m *GpeEnableDisable) Reset() { *m = GpeEnableDisable{} }
364 func (*GpeEnableDisable) GetMessageName() string { return "gpe_enable_disable" }
365 func (*GpeEnableDisable) GetCrcString() string { return "eb0e943b" }
366 func (*GpeEnableDisable) GetMessageType() api.MessageType {
367 return api.RequestMessage
370 func (m *GpeEnableDisable) Size() (size int) {
377 func (m *GpeEnableDisable) Marshal(b []byte) ([]byte, error) {
379 b = make([]byte, m.Size())
381 buf := codec.NewBuffer(b)
382 buf.EncodeUint8(m.IsEn)
383 return buf.Bytes(), nil
385 func (m *GpeEnableDisable) Unmarshal(b []byte) error {
386 buf := codec.NewBuffer(b)
387 m.IsEn = buf.DecodeUint8()
391 // GpeEnableDisableReply defines message 'gpe_enable_disable_reply'.
392 type GpeEnableDisableReply struct {
393 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
396 func (m *GpeEnableDisableReply) Reset() { *m = GpeEnableDisableReply{} }
397 func (*GpeEnableDisableReply) GetMessageName() string { return "gpe_enable_disable_reply" }
398 func (*GpeEnableDisableReply) GetCrcString() string { return "e8d4e804" }
399 func (*GpeEnableDisableReply) GetMessageType() api.MessageType {
400 return api.ReplyMessage
403 func (m *GpeEnableDisableReply) Size() (size int) {
407 size += 4 // m.Retval
410 func (m *GpeEnableDisableReply) Marshal(b []byte) ([]byte, error) {
412 b = make([]byte, m.Size())
414 buf := codec.NewBuffer(b)
415 buf.EncodeInt32(m.Retval)
416 return buf.Bytes(), nil
418 func (m *GpeEnableDisableReply) Unmarshal(b []byte) error {
419 buf := codec.NewBuffer(b)
420 m.Retval = buf.DecodeInt32()
424 // GpeFwdEntriesGet defines message 'gpe_fwd_entries_get'.
425 type GpeFwdEntriesGet struct {
426 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
429 func (m *GpeFwdEntriesGet) Reset() { *m = GpeFwdEntriesGet{} }
430 func (*GpeFwdEntriesGet) GetMessageName() string { return "gpe_fwd_entries_get" }
431 func (*GpeFwdEntriesGet) GetCrcString() string { return "8d1f2fe9" }
432 func (*GpeFwdEntriesGet) GetMessageType() api.MessageType {
433 return api.RequestMessage
436 func (m *GpeFwdEntriesGet) Size() (size int) {
443 func (m *GpeFwdEntriesGet) Marshal(b []byte) ([]byte, error) {
445 b = make([]byte, m.Size())
447 buf := codec.NewBuffer(b)
448 buf.EncodeUint32(m.Vni)
449 return buf.Bytes(), nil
451 func (m *GpeFwdEntriesGet) Unmarshal(b []byte) error {
452 buf := codec.NewBuffer(b)
453 m.Vni = buf.DecodeUint32()
457 // GpeFwdEntriesGetReply defines message 'gpe_fwd_entries_get_reply'.
458 type GpeFwdEntriesGetReply struct {
459 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
460 Count uint32 `binapi:"u32,name=count" json:"-"`
461 Entries []GpeFwdEntry `binapi:"gpe_fwd_entry[count],name=entries" json:"entries,omitempty"`
464 func (m *GpeFwdEntriesGetReply) Reset() { *m = GpeFwdEntriesGetReply{} }
465 func (*GpeFwdEntriesGetReply) GetMessageName() string { return "gpe_fwd_entries_get_reply" }
466 func (*GpeFwdEntriesGetReply) GetCrcString() string { return "07b02c34" }
467 func (*GpeFwdEntriesGetReply) GetMessageType() api.MessageType {
468 return api.ReplyMessage
471 func (m *GpeFwdEntriesGetReply) Size() (size int) {
475 size += 4 // m.Retval
477 for j1 := 0; j1 < len(m.Entries); j1++ {
480 if j1 < len(m.Entries) {
483 size += 4 // s1.FwdEntryIndex
484 size += 4 // s1.DpTable
485 size += 1 // s1.EidType
486 size += 1 // s1.LeidPrefixLen
487 size += 1 // s1.ReidPrefixLen
488 size += 1 * 16 // s1.Leid
489 size += 1 * 16 // s1.Reid
491 size += 1 // s1.Action
495 func (m *GpeFwdEntriesGetReply) Marshal(b []byte) ([]byte, error) {
497 b = make([]byte, m.Size())
499 buf := codec.NewBuffer(b)
500 buf.EncodeInt32(m.Retval)
501 buf.EncodeUint32(uint32(len(m.Entries)))
502 for j0 := 0; j0 < len(m.Entries); j0++ {
503 var v0 GpeFwdEntry // Entries
504 if j0 < len(m.Entries) {
507 buf.EncodeUint32(v0.FwdEntryIndex)
508 buf.EncodeUint32(v0.DpTable)
509 buf.EncodeUint8(v0.EidType)
510 buf.EncodeUint8(v0.LeidPrefixLen)
511 buf.EncodeUint8(v0.ReidPrefixLen)
512 buf.EncodeBytes(v0.Leid, 16)
513 buf.EncodeBytes(v0.Reid, 16)
514 buf.EncodeUint32(v0.Vni)
515 buf.EncodeUint8(v0.Action)
517 return buf.Bytes(), nil
519 func (m *GpeFwdEntriesGetReply) Unmarshal(b []byte) error {
520 buf := codec.NewBuffer(b)
521 m.Retval = buf.DecodeInt32()
522 m.Count = buf.DecodeUint32()
523 m.Entries = make([]GpeFwdEntry, m.Count)
524 for j0 := 0; j0 < len(m.Entries); j0++ {
525 m.Entries[j0].FwdEntryIndex = buf.DecodeUint32()
526 m.Entries[j0].DpTable = buf.DecodeUint32()
527 m.Entries[j0].EidType = buf.DecodeUint8()
528 m.Entries[j0].LeidPrefixLen = buf.DecodeUint8()
529 m.Entries[j0].ReidPrefixLen = buf.DecodeUint8()
530 m.Entries[j0].Leid = make([]byte, 16)
531 copy(m.Entries[j0].Leid, buf.DecodeBytes(len(m.Entries[j0].Leid)))
532 m.Entries[j0].Reid = make([]byte, 16)
533 copy(m.Entries[j0].Reid, buf.DecodeBytes(len(m.Entries[j0].Reid)))
534 m.Entries[j0].Vni = buf.DecodeUint32()
535 m.Entries[j0].Action = buf.DecodeUint8()
540 // GpeFwdEntryPathDetails defines message 'gpe_fwd_entry_path_details'.
541 type GpeFwdEntryPathDetails struct {
542 LclLoc GpeLocator `binapi:"gpe_locator,name=lcl_loc" json:"lcl_loc,omitempty"`
543 RmtLoc GpeLocator `binapi:"gpe_locator,name=rmt_loc" json:"rmt_loc,omitempty"`
546 func (m *GpeFwdEntryPathDetails) Reset() { *m = GpeFwdEntryPathDetails{} }
547 func (*GpeFwdEntryPathDetails) GetMessageName() string { return "gpe_fwd_entry_path_details" }
548 func (*GpeFwdEntryPathDetails) GetCrcString() string { return "a9bdc1f1" }
549 func (*GpeFwdEntryPathDetails) GetMessageType() api.MessageType {
550 return api.ReplyMessage
553 func (m *GpeFwdEntryPathDetails) Size() (size int) {
557 size += 1 // m.LclLoc.IsIP4
558 size += 1 // m.LclLoc.Weight
559 size += 1 * 16 // m.LclLoc.Addr
560 size += 1 // m.RmtLoc.IsIP4
561 size += 1 // m.RmtLoc.Weight
562 size += 1 * 16 // m.RmtLoc.Addr
565 func (m *GpeFwdEntryPathDetails) Marshal(b []byte) ([]byte, error) {
567 b = make([]byte, m.Size())
569 buf := codec.NewBuffer(b)
570 buf.EncodeUint8(m.LclLoc.IsIP4)
571 buf.EncodeUint8(m.LclLoc.Weight)
572 buf.EncodeBytes(m.LclLoc.Addr, 16)
573 buf.EncodeUint8(m.RmtLoc.IsIP4)
574 buf.EncodeUint8(m.RmtLoc.Weight)
575 buf.EncodeBytes(m.RmtLoc.Addr, 16)
576 return buf.Bytes(), nil
578 func (m *GpeFwdEntryPathDetails) Unmarshal(b []byte) error {
579 buf := codec.NewBuffer(b)
580 m.LclLoc.IsIP4 = buf.DecodeUint8()
581 m.LclLoc.Weight = buf.DecodeUint8()
582 m.LclLoc.Addr = make([]byte, 16)
583 copy(m.LclLoc.Addr, buf.DecodeBytes(len(m.LclLoc.Addr)))
584 m.RmtLoc.IsIP4 = buf.DecodeUint8()
585 m.RmtLoc.Weight = buf.DecodeUint8()
586 m.RmtLoc.Addr = make([]byte, 16)
587 copy(m.RmtLoc.Addr, buf.DecodeBytes(len(m.RmtLoc.Addr)))
591 // GpeFwdEntryPathDump defines message 'gpe_fwd_entry_path_dump'.
592 type GpeFwdEntryPathDump struct {
593 FwdEntryIndex uint32 `binapi:"u32,name=fwd_entry_index" json:"fwd_entry_index,omitempty"`
596 func (m *GpeFwdEntryPathDump) Reset() { *m = GpeFwdEntryPathDump{} }
597 func (*GpeFwdEntryPathDump) GetMessageName() string { return "gpe_fwd_entry_path_dump" }
598 func (*GpeFwdEntryPathDump) GetCrcString() string { return "39bce980" }
599 func (*GpeFwdEntryPathDump) GetMessageType() api.MessageType {
600 return api.RequestMessage
603 func (m *GpeFwdEntryPathDump) Size() (size int) {
607 size += 4 // m.FwdEntryIndex
610 func (m *GpeFwdEntryPathDump) Marshal(b []byte) ([]byte, error) {
612 b = make([]byte, m.Size())
614 buf := codec.NewBuffer(b)
615 buf.EncodeUint32(m.FwdEntryIndex)
616 return buf.Bytes(), nil
618 func (m *GpeFwdEntryPathDump) Unmarshal(b []byte) error {
619 buf := codec.NewBuffer(b)
620 m.FwdEntryIndex = buf.DecodeUint32()
624 // GpeFwdEntryVnisGet defines message 'gpe_fwd_entry_vnis_get'.
625 type GpeFwdEntryVnisGet struct{}
627 func (m *GpeFwdEntryVnisGet) Reset() { *m = GpeFwdEntryVnisGet{} }
628 func (*GpeFwdEntryVnisGet) GetMessageName() string { return "gpe_fwd_entry_vnis_get" }
629 func (*GpeFwdEntryVnisGet) GetCrcString() string { return "51077d14" }
630 func (*GpeFwdEntryVnisGet) GetMessageType() api.MessageType {
631 return api.RequestMessage
634 func (m *GpeFwdEntryVnisGet) Size() (size int) {
640 func (m *GpeFwdEntryVnisGet) Marshal(b []byte) ([]byte, error) {
642 b = make([]byte, m.Size())
644 buf := codec.NewBuffer(b)
645 return buf.Bytes(), nil
647 func (m *GpeFwdEntryVnisGet) Unmarshal(b []byte) error {
651 // GpeFwdEntryVnisGetReply defines message 'gpe_fwd_entry_vnis_get_reply'.
652 type GpeFwdEntryVnisGetReply struct {
653 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
654 Count uint32 `binapi:"u32,name=count" json:"-"`
655 Vnis []uint32 `binapi:"u32[count],name=vnis" json:"vnis,omitempty"`
658 func (m *GpeFwdEntryVnisGetReply) Reset() { *m = GpeFwdEntryVnisGetReply{} }
659 func (*GpeFwdEntryVnisGetReply) GetMessageName() string { return "gpe_fwd_entry_vnis_get_reply" }
660 func (*GpeFwdEntryVnisGetReply) GetCrcString() string { return "aa70da20" }
661 func (*GpeFwdEntryVnisGetReply) GetMessageType() api.MessageType {
662 return api.ReplyMessage
665 func (m *GpeFwdEntryVnisGetReply) Size() (size int) {
669 size += 4 // m.Retval
671 size += 4 * len(m.Vnis) // m.Vnis
674 func (m *GpeFwdEntryVnisGetReply) Marshal(b []byte) ([]byte, error) {
676 b = make([]byte, m.Size())
678 buf := codec.NewBuffer(b)
679 buf.EncodeInt32(m.Retval)
680 buf.EncodeUint32(uint32(len(m.Vnis)))
681 for i := 0; i < len(m.Vnis); i++ {
684 x = uint32(m.Vnis[i])
688 return buf.Bytes(), nil
690 func (m *GpeFwdEntryVnisGetReply) Unmarshal(b []byte) error {
691 buf := codec.NewBuffer(b)
692 m.Retval = buf.DecodeInt32()
693 m.Count = buf.DecodeUint32()
694 m.Vnis = make([]uint32, m.Count)
695 for i := 0; i < len(m.Vnis); i++ {
696 m.Vnis[i] = buf.DecodeUint32()
701 // GpeGetEncapMode defines message 'gpe_get_encap_mode'.
702 type GpeGetEncapMode struct{}
704 func (m *GpeGetEncapMode) Reset() { *m = GpeGetEncapMode{} }
705 func (*GpeGetEncapMode) GetMessageName() string { return "gpe_get_encap_mode" }
706 func (*GpeGetEncapMode) GetCrcString() string { return "51077d14" }
707 func (*GpeGetEncapMode) GetMessageType() api.MessageType {
708 return api.RequestMessage
711 func (m *GpeGetEncapMode) Size() (size int) {
717 func (m *GpeGetEncapMode) Marshal(b []byte) ([]byte, error) {
719 b = make([]byte, m.Size())
721 buf := codec.NewBuffer(b)
722 return buf.Bytes(), nil
724 func (m *GpeGetEncapMode) Unmarshal(b []byte) error {
728 // GpeGetEncapModeReply defines message 'gpe_get_encap_mode_reply'.
729 type GpeGetEncapModeReply struct {
730 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
731 EncapMode uint8 `binapi:"u8,name=encap_mode" json:"encap_mode,omitempty"`
734 func (m *GpeGetEncapModeReply) Reset() { *m = GpeGetEncapModeReply{} }
735 func (*GpeGetEncapModeReply) GetMessageName() string { return "gpe_get_encap_mode_reply" }
736 func (*GpeGetEncapModeReply) GetCrcString() string { return "36e3f7ca" }
737 func (*GpeGetEncapModeReply) GetMessageType() api.MessageType {
738 return api.ReplyMessage
741 func (m *GpeGetEncapModeReply) Size() (size int) {
745 size += 4 // m.Retval
746 size += 1 // m.EncapMode
749 func (m *GpeGetEncapModeReply) Marshal(b []byte) ([]byte, error) {
751 b = make([]byte, m.Size())
753 buf := codec.NewBuffer(b)
754 buf.EncodeInt32(m.Retval)
755 buf.EncodeUint8(m.EncapMode)
756 return buf.Bytes(), nil
758 func (m *GpeGetEncapModeReply) Unmarshal(b []byte) error {
759 buf := codec.NewBuffer(b)
760 m.Retval = buf.DecodeInt32()
761 m.EncapMode = buf.DecodeUint8()
765 // GpeNativeFwdRpathsGet defines message 'gpe_native_fwd_rpaths_get'.
766 type GpeNativeFwdRpathsGet struct {
767 IsIP4 uint8 `binapi:"u8,name=is_ip4" json:"is_ip4,omitempty"`
770 func (m *GpeNativeFwdRpathsGet) Reset() { *m = GpeNativeFwdRpathsGet{} }
771 func (*GpeNativeFwdRpathsGet) GetMessageName() string { return "gpe_native_fwd_rpaths_get" }
772 func (*GpeNativeFwdRpathsGet) GetCrcString() string { return "c5e0d91b" }
773 func (*GpeNativeFwdRpathsGet) GetMessageType() api.MessageType {
774 return api.RequestMessage
777 func (m *GpeNativeFwdRpathsGet) Size() (size int) {
784 func (m *GpeNativeFwdRpathsGet) Marshal(b []byte) ([]byte, error) {
786 b = make([]byte, m.Size())
788 buf := codec.NewBuffer(b)
789 buf.EncodeUint8(m.IsIP4)
790 return buf.Bytes(), nil
792 func (m *GpeNativeFwdRpathsGet) Unmarshal(b []byte) error {
793 buf := codec.NewBuffer(b)
794 m.IsIP4 = buf.DecodeUint8()
798 // GpeNativeFwdRpathsGetReply defines message 'gpe_native_fwd_rpaths_get_reply'.
799 type GpeNativeFwdRpathsGetReply struct {
800 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
801 Count uint32 `binapi:"u32,name=count" json:"-"`
802 Entries []GpeNativeFwdRpath `binapi:"gpe_native_fwd_rpath[count],name=entries" json:"entries,omitempty"`
805 func (m *GpeNativeFwdRpathsGetReply) Reset() { *m = GpeNativeFwdRpathsGetReply{} }
806 func (*GpeNativeFwdRpathsGetReply) GetMessageName() string { return "gpe_native_fwd_rpaths_get_reply" }
807 func (*GpeNativeFwdRpathsGetReply) GetCrcString() string { return "1e4536e3" }
808 func (*GpeNativeFwdRpathsGetReply) GetMessageType() api.MessageType {
809 return api.ReplyMessage
812 func (m *GpeNativeFwdRpathsGetReply) Size() (size int) {
816 size += 4 // m.Retval
818 for j1 := 0; j1 < len(m.Entries); j1++ {
819 var s1 GpeNativeFwdRpath
821 if j1 < len(m.Entries) {
824 size += 4 // s1.FibIndex
825 size += 4 // s1.NhSwIfIndex
826 size += 1 // s1.IsIP4
827 size += 1 * 16 // s1.NhAddr
831 func (m *GpeNativeFwdRpathsGetReply) Marshal(b []byte) ([]byte, error) {
833 b = make([]byte, m.Size())
835 buf := codec.NewBuffer(b)
836 buf.EncodeInt32(m.Retval)
837 buf.EncodeUint32(uint32(len(m.Entries)))
838 for j0 := 0; j0 < len(m.Entries); j0++ {
839 var v0 GpeNativeFwdRpath // Entries
840 if j0 < len(m.Entries) {
843 buf.EncodeUint32(v0.FibIndex)
844 buf.EncodeUint32(v0.NhSwIfIndex)
845 buf.EncodeUint8(v0.IsIP4)
846 buf.EncodeBytes(v0.NhAddr, 16)
848 return buf.Bytes(), nil
850 func (m *GpeNativeFwdRpathsGetReply) Unmarshal(b []byte) error {
851 buf := codec.NewBuffer(b)
852 m.Retval = buf.DecodeInt32()
853 m.Count = buf.DecodeUint32()
854 m.Entries = make([]GpeNativeFwdRpath, m.Count)
855 for j0 := 0; j0 < len(m.Entries); j0++ {
856 m.Entries[j0].FibIndex = buf.DecodeUint32()
857 m.Entries[j0].NhSwIfIndex = buf.DecodeUint32()
858 m.Entries[j0].IsIP4 = buf.DecodeUint8()
859 m.Entries[j0].NhAddr = make([]byte, 16)
860 copy(m.Entries[j0].NhAddr, buf.DecodeBytes(len(m.Entries[j0].NhAddr)))
865 // GpeSetEncapMode defines message 'gpe_set_encap_mode'.
866 type GpeSetEncapMode struct {
867 Mode uint8 `binapi:"u8,name=mode" json:"mode,omitempty"`
870 func (m *GpeSetEncapMode) Reset() { *m = GpeSetEncapMode{} }
871 func (*GpeSetEncapMode) GetMessageName() string { return "gpe_set_encap_mode" }
872 func (*GpeSetEncapMode) GetCrcString() string { return "f3f93ce9" }
873 func (*GpeSetEncapMode) GetMessageType() api.MessageType {
874 return api.RequestMessage
877 func (m *GpeSetEncapMode) Size() (size int) {
884 func (m *GpeSetEncapMode) Marshal(b []byte) ([]byte, error) {
886 b = make([]byte, m.Size())
888 buf := codec.NewBuffer(b)
889 buf.EncodeUint8(m.Mode)
890 return buf.Bytes(), nil
892 func (m *GpeSetEncapMode) Unmarshal(b []byte) error {
893 buf := codec.NewBuffer(b)
894 m.Mode = buf.DecodeUint8()
898 // GpeSetEncapModeReply defines message 'gpe_set_encap_mode_reply'.
899 type GpeSetEncapModeReply struct {
900 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
903 func (m *GpeSetEncapModeReply) Reset() { *m = GpeSetEncapModeReply{} }
904 func (*GpeSetEncapModeReply) GetMessageName() string { return "gpe_set_encap_mode_reply" }
905 func (*GpeSetEncapModeReply) GetCrcString() string { return "e8d4e804" }
906 func (*GpeSetEncapModeReply) GetMessageType() api.MessageType {
907 return api.ReplyMessage
910 func (m *GpeSetEncapModeReply) Size() (size int) {
914 size += 4 // m.Retval
917 func (m *GpeSetEncapModeReply) Marshal(b []byte) ([]byte, error) {
919 b = make([]byte, m.Size())
921 buf := codec.NewBuffer(b)
922 buf.EncodeInt32(m.Retval)
923 return buf.Bytes(), nil
925 func (m *GpeSetEncapModeReply) Unmarshal(b []byte) error {
926 buf := codec.NewBuffer(b)
927 m.Retval = buf.DecodeInt32()
931 func init() { file_lisp_gpe_binapi_init() }
932 func file_lisp_gpe_binapi_init() {
933 api.RegisterMessage((*GpeAddDelFwdEntry)(nil), "gpe_add_del_fwd_entry_afbf857a")
934 api.RegisterMessage((*GpeAddDelFwdEntryReply)(nil), "gpe_add_del_fwd_entry_reply_efe5f176")
935 api.RegisterMessage((*GpeAddDelIface)(nil), "gpe_add_del_iface_42d6b533")
936 api.RegisterMessage((*GpeAddDelIfaceReply)(nil), "gpe_add_del_iface_reply_e8d4e804")
937 api.RegisterMessage((*GpeAddDelNativeFwdRpath)(nil), "gpe_add_del_native_fwd_rpath_bfc42b8f")
938 api.RegisterMessage((*GpeAddDelNativeFwdRpathReply)(nil), "gpe_add_del_native_fwd_rpath_reply_e8d4e804")
939 api.RegisterMessage((*GpeEnableDisable)(nil), "gpe_enable_disable_eb0e943b")
940 api.RegisterMessage((*GpeEnableDisableReply)(nil), "gpe_enable_disable_reply_e8d4e804")
941 api.RegisterMessage((*GpeFwdEntriesGet)(nil), "gpe_fwd_entries_get_8d1f2fe9")
942 api.RegisterMessage((*GpeFwdEntriesGetReply)(nil), "gpe_fwd_entries_get_reply_07b02c34")
943 api.RegisterMessage((*GpeFwdEntryPathDetails)(nil), "gpe_fwd_entry_path_details_a9bdc1f1")
944 api.RegisterMessage((*GpeFwdEntryPathDump)(nil), "gpe_fwd_entry_path_dump_39bce980")
945 api.RegisterMessage((*GpeFwdEntryVnisGet)(nil), "gpe_fwd_entry_vnis_get_51077d14")
946 api.RegisterMessage((*GpeFwdEntryVnisGetReply)(nil), "gpe_fwd_entry_vnis_get_reply_aa70da20")
947 api.RegisterMessage((*GpeGetEncapMode)(nil), "gpe_get_encap_mode_51077d14")
948 api.RegisterMessage((*GpeGetEncapModeReply)(nil), "gpe_get_encap_mode_reply_36e3f7ca")
949 api.RegisterMessage((*GpeNativeFwdRpathsGet)(nil), "gpe_native_fwd_rpaths_get_c5e0d91b")
950 api.RegisterMessage((*GpeNativeFwdRpathsGetReply)(nil), "gpe_native_fwd_rpaths_get_reply_1e4536e3")
951 api.RegisterMessage((*GpeSetEncapMode)(nil), "gpe_set_encap_mode_f3f93ce9")
952 api.RegisterMessage((*GpeSetEncapModeReply)(nil), "gpe_set_encap_mode_reply_e8d4e804")
955 // Messages returns list of all messages in this module.
956 func AllMessages() []api.Message {
957 return []api.Message{
958 (*GpeAddDelFwdEntry)(nil),
959 (*GpeAddDelFwdEntryReply)(nil),
960 (*GpeAddDelIface)(nil),
961 (*GpeAddDelIfaceReply)(nil),
962 (*GpeAddDelNativeFwdRpath)(nil),
963 (*GpeAddDelNativeFwdRpathReply)(nil),
964 (*GpeEnableDisable)(nil),
965 (*GpeEnableDisableReply)(nil),
966 (*GpeFwdEntriesGet)(nil),
967 (*GpeFwdEntriesGetReply)(nil),
968 (*GpeFwdEntryPathDetails)(nil),
969 (*GpeFwdEntryPathDump)(nil),
970 (*GpeFwdEntryVnisGet)(nil),
971 (*GpeFwdEntryVnisGetReply)(nil),
972 (*GpeGetEncapMode)(nil),
973 (*GpeGetEncapModeReply)(nil),
974 (*GpeNativeFwdRpathsGet)(nil),
975 (*GpeNativeFwdRpathsGetReply)(nil),
976 (*GpeSetEncapMode)(nil),
977 (*GpeSetEncapModeReply)(nil),