1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
5 // source: /usr/share/vpp/api/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 _ "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"
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
33 VersionCrc = 0x4947ac96
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"`
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"`
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"`
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"`
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
78 func (m *GpeAddDelFwdEntry) Size() int {
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
89 size += 4 // m.DpTable
92 for j1 := 0; j1 < len(m.Locs); j1++ {
98 size += 1 // s1.Weight
99 size += 1 // s1.Addr.Af
100 size += 1 * 16 // s1.Addr.Un
104 func (m *GpeAddDelFwdEntry) Marshal(b []byte) ([]byte, error) {
105 var buf *codec.Buffer
107 buf = codec.NewBuffer(make([]byte, m.Size()))
109 buf = codec.NewBuffer(b)
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++ {
122 if j0 < len(m.Locs) {
125 buf.EncodeUint8(uint8(v0.Weight))
126 buf.EncodeUint8(uint8(v0.Addr.Af))
127 buf.EncodeBytes(v0.Addr.Un.XXX_UnionData[:], 0)
129 return buf.Bytes(), nil
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))
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"`
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
164 func (m *GpeAddDelFwdEntryReply) Size() int {
169 size += 4 // m.Retval
170 size += 4 // m.FwdEntryIndex
173 func (m *GpeAddDelFwdEntryReply) Marshal(b []byte) ([]byte, error) {
174 var buf *codec.Buffer
176 buf = codec.NewBuffer(make([]byte, m.Size()))
178 buf = codec.NewBuffer(b)
180 buf.EncodeUint32(uint32(m.Retval))
181 buf.EncodeUint32(uint32(m.FwdEntryIndex))
182 return buf.Bytes(), nil
184 func (m *GpeAddDelFwdEntryReply) Unmarshal(b []byte) error {
185 buf := codec.NewBuffer(b)
186 m.Retval = int32(buf.DecodeUint32())
187 m.FwdEntryIndex = buf.DecodeUint32()
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"`
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
206 func (m *GpeAddDelIface) Size() int {
213 size += 4 // m.DpTable
217 func (m *GpeAddDelIface) Marshal(b []byte) ([]byte, error) {
218 var buf *codec.Buffer
220 buf = codec.NewBuffer(make([]byte, m.Size()))
222 buf = codec.NewBuffer(b)
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
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()
239 // GpeAddDelIfaceReply defines message 'gpe_add_del_iface_reply'.
240 type GpeAddDelIfaceReply struct {
241 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
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
251 func (m *GpeAddDelIfaceReply) Size() int {
256 size += 4 // m.Retval
259 func (m *GpeAddDelIfaceReply) Marshal(b []byte) ([]byte, error) {
260 var buf *codec.Buffer
262 buf = codec.NewBuffer(make([]byte, m.Size()))
264 buf = codec.NewBuffer(b)
266 buf.EncodeUint32(uint32(m.Retval))
267 return buf.Bytes(), nil
269 func (m *GpeAddDelIfaceReply) Unmarshal(b []byte) error {
270 buf := codec.NewBuffer(b)
271 m.Retval = int32(buf.DecodeUint32())
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"`
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
290 func (m *GpeAddDelNativeFwdRpath) Size() int {
296 size += 4 // m.TableID
297 size += 4 // m.NhSwIfIndex
298 size += 1 // m.NhAddr.Af
299 size += 1 * 16 // m.NhAddr.Un
302 func (m *GpeAddDelNativeFwdRpath) Marshal(b []byte) ([]byte, error) {
303 var buf *codec.Buffer
305 buf = codec.NewBuffer(make([]byte, m.Size()))
307 buf = codec.NewBuffer(b)
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
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))
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"`
331 func (m *GpeAddDelNativeFwdRpathReply) Reset() { *m = GpeAddDelNativeFwdRpathReply{} }
332 func (*GpeAddDelNativeFwdRpathReply) GetMessageName() string {
333 return "gpe_add_del_native_fwd_rpath_reply"
335 func (*GpeAddDelNativeFwdRpathReply) GetCrcString() string { return "e8d4e804" }
336 func (*GpeAddDelNativeFwdRpathReply) GetMessageType() api.MessageType {
337 return api.ReplyMessage
340 func (m *GpeAddDelNativeFwdRpathReply) Size() int {
345 size += 4 // m.Retval
348 func (m *GpeAddDelNativeFwdRpathReply) Marshal(b []byte) ([]byte, error) {
349 var buf *codec.Buffer
351 buf = codec.NewBuffer(make([]byte, m.Size()))
353 buf = codec.NewBuffer(b)
355 buf.EncodeUint32(uint32(m.Retval))
356 return buf.Bytes(), nil
358 func (m *GpeAddDelNativeFwdRpathReply) Unmarshal(b []byte) error {
359 buf := codec.NewBuffer(b)
360 m.Retval = int32(buf.DecodeUint32())
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"`
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
376 func (m *GpeEnableDisable) Size() int {
381 size += 1 // m.IsEnable
384 func (m *GpeEnableDisable) Marshal(b []byte) ([]byte, error) {
385 var buf *codec.Buffer
387 buf = codec.NewBuffer(make([]byte, m.Size()))
389 buf = codec.NewBuffer(b)
391 buf.EncodeBool(m.IsEnable)
392 return buf.Bytes(), nil
394 func (m *GpeEnableDisable) Unmarshal(b []byte) error {
395 buf := codec.NewBuffer(b)
396 m.IsEnable = buf.DecodeBool()
400 // GpeEnableDisableReply defines message 'gpe_enable_disable_reply'.
401 type GpeEnableDisableReply struct {
402 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
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
412 func (m *GpeEnableDisableReply) Size() int {
417 size += 4 // m.Retval
420 func (m *GpeEnableDisableReply) Marshal(b []byte) ([]byte, error) {
421 var buf *codec.Buffer
423 buf = codec.NewBuffer(make([]byte, m.Size()))
425 buf = codec.NewBuffer(b)
427 buf.EncodeUint32(uint32(m.Retval))
428 return buf.Bytes(), nil
430 func (m *GpeEnableDisableReply) Unmarshal(b []byte) error {
431 buf := codec.NewBuffer(b)
432 m.Retval = int32(buf.DecodeUint32())
436 // GpeFwdEntriesGet defines message 'gpe_fwd_entries_get'.
437 type GpeFwdEntriesGet struct {
438 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
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
448 func (m *GpeFwdEntriesGet) Size() int {
456 func (m *GpeFwdEntriesGet) Marshal(b []byte) ([]byte, error) {
457 var buf *codec.Buffer
459 buf = codec.NewBuffer(make([]byte, m.Size()))
461 buf = codec.NewBuffer(b)
463 buf.EncodeUint32(uint32(m.Vni))
464 return buf.Bytes(), nil
466 func (m *GpeFwdEntriesGet) Unmarshal(b []byte) error {
467 buf := codec.NewBuffer(b)
468 m.Vni = buf.DecodeUint32()
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"`
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
486 func (m *GpeFwdEntriesGetReply) Size() int {
491 size += 4 // m.Retval
493 for j1 := 0; j1 < len(m.Entries); j1++ {
496 if j1 < len(m.Entries) {
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
506 size += 1 // s1.Action
510 func (m *GpeFwdEntriesGetReply) Marshal(b []byte) ([]byte, error) {
511 var buf *codec.Buffer
513 buf = codec.NewBuffer(make([]byte, m.Size()))
515 buf = codec.NewBuffer(b)
517 buf.EncodeUint32(uint32(m.Retval))
518 buf.EncodeUint32(uint32(len(m.Entries)))
519 for j0 := 0; j0 < len(m.Entries); j0++ {
521 if j0 < len(m.Entries) {
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))
533 return buf.Bytes(), nil
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()
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"`
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
566 func (m *GpeFwdEntryPathDetails) 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
579 func (m *GpeFwdEntryPathDetails) Marshal(b []byte) ([]byte, error) {
580 var buf *codec.Buffer
582 buf = codec.NewBuffer(make([]byte, m.Size()))
584 buf = codec.NewBuffer(b)
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
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))
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"`
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
617 func (m *GpeFwdEntryPathDump) Size() int {
622 size += 4 // m.FwdEntryIndex
625 func (m *GpeFwdEntryPathDump) Marshal(b []byte) ([]byte, error) {
626 var buf *codec.Buffer
628 buf = codec.NewBuffer(make([]byte, m.Size()))
630 buf = codec.NewBuffer(b)
632 buf.EncodeUint32(uint32(m.FwdEntryIndex))
633 return buf.Bytes(), nil
635 func (m *GpeFwdEntryPathDump) Unmarshal(b []byte) error {
636 buf := codec.NewBuffer(b)
637 m.FwdEntryIndex = buf.DecodeUint32()
641 // GpeFwdEntryVnisGet defines message 'gpe_fwd_entry_vnis_get'.
642 type GpeFwdEntryVnisGet struct{}
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
651 func (m *GpeFwdEntryVnisGet) Size() int {
658 func (m *GpeFwdEntryVnisGet) Marshal(b []byte) ([]byte, error) {
659 var buf *codec.Buffer
661 buf = codec.NewBuffer(make([]byte, m.Size()))
663 buf = codec.NewBuffer(b)
665 return buf.Bytes(), nil
667 func (m *GpeFwdEntryVnisGet) Unmarshal(b []byte) error {
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"`
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
685 func (m *GpeFwdEntryVnisGetReply) Size() int {
690 size += 4 // m.Retval
692 size += 4 * len(m.Vnis) // m.Vnis
695 func (m *GpeFwdEntryVnisGetReply) Marshal(b []byte) ([]byte, error) {
696 var buf *codec.Buffer
698 buf = codec.NewBuffer(make([]byte, m.Size()))
700 buf = codec.NewBuffer(b)
702 buf.EncodeUint32(uint32(m.Retval))
703 buf.EncodeUint32(uint32(len(m.Vnis)))
704 for i := 0; i < len(m.Vnis); i++ {
707 x = uint32(m.Vnis[i])
709 buf.EncodeUint32(uint32(x))
711 return buf.Bytes(), nil
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()
724 // GpeGetEncapMode defines message 'gpe_get_encap_mode'.
725 type GpeGetEncapMode struct{}
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
734 func (m *GpeGetEncapMode) Size() int {
741 func (m *GpeGetEncapMode) Marshal(b []byte) ([]byte, error) {
742 var buf *codec.Buffer
744 buf = codec.NewBuffer(make([]byte, m.Size()))
746 buf = codec.NewBuffer(b)
748 return buf.Bytes(), nil
750 func (m *GpeGetEncapMode) Unmarshal(b []byte) error {
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"`
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
767 func (m *GpeGetEncapModeReply) Size() int {
772 size += 4 // m.Retval
773 size += 1 // m.EncapMode
776 func (m *GpeGetEncapModeReply) Marshal(b []byte) ([]byte, error) {
777 var buf *codec.Buffer
779 buf = codec.NewBuffer(make([]byte, m.Size()))
781 buf = codec.NewBuffer(b)
783 buf.EncodeUint32(uint32(m.Retval))
784 buf.EncodeUint8(uint8(m.EncapMode))
785 return buf.Bytes(), nil
787 func (m *GpeGetEncapModeReply) Unmarshal(b []byte) error {
788 buf := codec.NewBuffer(b)
789 m.Retval = int32(buf.DecodeUint32())
790 m.EncapMode = buf.DecodeUint8()
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"`
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
806 func (m *GpeNativeFwdRpathsGet) Size() int {
814 func (m *GpeNativeFwdRpathsGet) Marshal(b []byte) ([]byte, error) {
815 var buf *codec.Buffer
817 buf = codec.NewBuffer(make([]byte, m.Size()))
819 buf = codec.NewBuffer(b)
821 buf.EncodeBool(m.IsIP4)
822 return buf.Bytes(), nil
824 func (m *GpeNativeFwdRpathsGet) Unmarshal(b []byte) error {
825 buf := codec.NewBuffer(b)
826 m.IsIP4 = buf.DecodeBool()
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"`
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
844 func (m *GpeNativeFwdRpathsGetReply) Size() int {
849 size += 4 // m.Retval
851 for j1 := 0; j1 < len(m.Entries); j1++ {
852 var s1 GpeNativeFwdRpath
854 if j1 < len(m.Entries) {
857 size += 4 // s1.FibIndex
858 size += 4 // s1.NhSwIfIndex
859 size += 1 // s1.NhAddr.Af
860 size += 1 * 16 // s1.NhAddr.Un
864 func (m *GpeNativeFwdRpathsGetReply) Marshal(b []byte) ([]byte, error) {
865 var buf *codec.Buffer
867 buf = codec.NewBuffer(make([]byte, m.Size()))
869 buf = codec.NewBuffer(b)
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) {
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)
883 return buf.Bytes(), nil
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))
899 // GpeSetEncapMode defines message 'gpe_set_encap_mode'.
900 type GpeSetEncapMode struct {
901 IsVxlan bool `binapi:"bool,name=is_vxlan" json:"is_vxlan,omitempty"`
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
911 func (m *GpeSetEncapMode) Size() int {
916 size += 1 // m.IsVxlan
919 func (m *GpeSetEncapMode) Marshal(b []byte) ([]byte, error) {
920 var buf *codec.Buffer
922 buf = codec.NewBuffer(make([]byte, m.Size()))
924 buf = codec.NewBuffer(b)
926 buf.EncodeBool(m.IsVxlan)
927 return buf.Bytes(), nil
929 func (m *GpeSetEncapMode) Unmarshal(b []byte) error {
930 buf := codec.NewBuffer(b)
931 m.IsVxlan = buf.DecodeBool()
935 // GpeSetEncapModeReply defines message 'gpe_set_encap_mode_reply'.
936 type GpeSetEncapModeReply struct {
937 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
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
947 func (m *GpeSetEncapModeReply) Size() int {
952 size += 4 // m.Retval
955 func (m *GpeSetEncapModeReply) Marshal(b []byte) ([]byte, error) {
956 var buf *codec.Buffer
958 buf = codec.NewBuffer(make([]byte, m.Size()))
960 buf = codec.NewBuffer(b)
962 buf.EncodeUint32(uint32(m.Retval))
963 return buf.Bytes(), nil
965 func (m *GpeSetEncapModeReply) Unmarshal(b []byte) error {
966 buf := codec.NewBuffer(b)
967 m.Retval = int32(buf.DecodeUint32())
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")
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),