1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
5 // source: /usr/share/vpp/api/plugins/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 = 0x92611b0
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 "f0847644" }
74 func (*GpeAddDelFwdEntry) GetMessageType() api.MessageType {
75 return api.RequestMessage
78 func (m *GpeAddDelFwdEntry) Size() (size int) {
83 size += 1 // m.RmtEid.Type
84 size += 1 * 18 // m.RmtEid.Address
85 size += 1 // m.LclEid.Type
86 size += 1 * 18 // m.LclEid.Address
88 size += 4 // m.DpTable
91 for j1 := 0; j1 < len(m.Locs); j1++ {
97 size += 1 // s1.Weight
98 size += 1 // s1.Addr.Af
99 size += 1 * 16 // s1.Addr.Un
103 func (m *GpeAddDelFwdEntry) Marshal(b []byte) ([]byte, error) {
105 b = make([]byte, m.Size())
107 buf := codec.NewBuffer(b)
108 buf.EncodeBool(m.IsAdd)
109 buf.EncodeUint8(uint8(m.RmtEid.Type))
110 buf.EncodeBytes(m.RmtEid.Address.XXX_UnionData[:], 18)
111 buf.EncodeUint8(uint8(m.LclEid.Type))
112 buf.EncodeBytes(m.LclEid.Address.XXX_UnionData[:], 18)
113 buf.EncodeUint32(m.Vni)
114 buf.EncodeUint32(m.DpTable)
115 buf.EncodeUint8(m.Action)
116 buf.EncodeUint32(uint32(len(m.Locs)))
117 for j0 := 0; j0 < len(m.Locs); j0++ {
118 var v0 GpeLocator // Locs
119 if j0 < len(m.Locs) {
122 buf.EncodeUint8(v0.Weight)
123 buf.EncodeUint8(uint8(v0.Addr.Af))
124 buf.EncodeBytes(v0.Addr.Un.XXX_UnionData[:], 16)
126 return buf.Bytes(), nil
128 func (m *GpeAddDelFwdEntry) Unmarshal(b []byte) error {
129 buf := codec.NewBuffer(b)
130 m.IsAdd = buf.DecodeBool()
131 m.RmtEid.Type = lisp_types.EidType(buf.DecodeUint8())
132 copy(m.RmtEid.Address.XXX_UnionData[:], buf.DecodeBytes(18))
133 m.LclEid.Type = lisp_types.EidType(buf.DecodeUint8())
134 copy(m.LclEid.Address.XXX_UnionData[:], buf.DecodeBytes(18))
135 m.Vni = buf.DecodeUint32()
136 m.DpTable = buf.DecodeUint32()
137 m.Action = buf.DecodeUint8()
138 m.LocNum = buf.DecodeUint32()
139 m.Locs = make([]GpeLocator, m.LocNum)
140 for j0 := 0; j0 < len(m.Locs); j0++ {
141 m.Locs[j0].Weight = buf.DecodeUint8()
142 m.Locs[j0].Addr.Af = ip_types.AddressFamily(buf.DecodeUint8())
143 copy(m.Locs[j0].Addr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
148 // GpeAddDelFwdEntryReply defines message 'gpe_add_del_fwd_entry_reply'.
149 type GpeAddDelFwdEntryReply struct {
150 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
151 FwdEntryIndex uint32 `binapi:"u32,name=fwd_entry_index" json:"fwd_entry_index,omitempty"`
154 func (m *GpeAddDelFwdEntryReply) Reset() { *m = GpeAddDelFwdEntryReply{} }
155 func (*GpeAddDelFwdEntryReply) GetMessageName() string { return "gpe_add_del_fwd_entry_reply" }
156 func (*GpeAddDelFwdEntryReply) GetCrcString() string { return "efe5f176" }
157 func (*GpeAddDelFwdEntryReply) GetMessageType() api.MessageType {
158 return api.ReplyMessage
161 func (m *GpeAddDelFwdEntryReply) Size() (size int) {
165 size += 4 // m.Retval
166 size += 4 // m.FwdEntryIndex
169 func (m *GpeAddDelFwdEntryReply) Marshal(b []byte) ([]byte, error) {
171 b = make([]byte, m.Size())
173 buf := codec.NewBuffer(b)
174 buf.EncodeInt32(m.Retval)
175 buf.EncodeUint32(m.FwdEntryIndex)
176 return buf.Bytes(), nil
178 func (m *GpeAddDelFwdEntryReply) Unmarshal(b []byte) error {
179 buf := codec.NewBuffer(b)
180 m.Retval = buf.DecodeInt32()
181 m.FwdEntryIndex = buf.DecodeUint32()
185 // GpeAddDelIface defines message 'gpe_add_del_iface'.
186 type GpeAddDelIface struct {
187 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
188 IsL2 bool `binapi:"bool,name=is_l2" json:"is_l2,omitempty"`
189 DpTable uint32 `binapi:"u32,name=dp_table" json:"dp_table,omitempty"`
190 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
193 func (m *GpeAddDelIface) Reset() { *m = GpeAddDelIface{} }
194 func (*GpeAddDelIface) GetMessageName() string { return "gpe_add_del_iface" }
195 func (*GpeAddDelIface) GetCrcString() string { return "3ccff273" }
196 func (*GpeAddDelIface) GetMessageType() api.MessageType {
197 return api.RequestMessage
200 func (m *GpeAddDelIface) Size() (size int) {
206 size += 4 // m.DpTable
210 func (m *GpeAddDelIface) Marshal(b []byte) ([]byte, error) {
212 b = make([]byte, m.Size())
214 buf := codec.NewBuffer(b)
215 buf.EncodeBool(m.IsAdd)
216 buf.EncodeBool(m.IsL2)
217 buf.EncodeUint32(m.DpTable)
218 buf.EncodeUint32(m.Vni)
219 return buf.Bytes(), nil
221 func (m *GpeAddDelIface) Unmarshal(b []byte) error {
222 buf := codec.NewBuffer(b)
223 m.IsAdd = buf.DecodeBool()
224 m.IsL2 = buf.DecodeBool()
225 m.DpTable = buf.DecodeUint32()
226 m.Vni = buf.DecodeUint32()
230 // GpeAddDelIfaceReply defines message 'gpe_add_del_iface_reply'.
231 type GpeAddDelIfaceReply struct {
232 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
235 func (m *GpeAddDelIfaceReply) Reset() { *m = GpeAddDelIfaceReply{} }
236 func (*GpeAddDelIfaceReply) GetMessageName() string { return "gpe_add_del_iface_reply" }
237 func (*GpeAddDelIfaceReply) GetCrcString() string { return "e8d4e804" }
238 func (*GpeAddDelIfaceReply) GetMessageType() api.MessageType {
239 return api.ReplyMessage
242 func (m *GpeAddDelIfaceReply) Size() (size int) {
246 size += 4 // m.Retval
249 func (m *GpeAddDelIfaceReply) Marshal(b []byte) ([]byte, error) {
251 b = make([]byte, m.Size())
253 buf := codec.NewBuffer(b)
254 buf.EncodeInt32(m.Retval)
255 return buf.Bytes(), nil
257 func (m *GpeAddDelIfaceReply) Unmarshal(b []byte) error {
258 buf := codec.NewBuffer(b)
259 m.Retval = buf.DecodeInt32()
263 // GpeAddDelNativeFwdRpath defines message 'gpe_add_del_native_fwd_rpath'.
264 type GpeAddDelNativeFwdRpath struct {
265 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
266 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
267 NhSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=nh_sw_if_index" json:"nh_sw_if_index,omitempty"`
268 NhAddr ip_types.Address `binapi:"address,name=nh_addr" json:"nh_addr,omitempty"`
271 func (m *GpeAddDelNativeFwdRpath) Reset() { *m = GpeAddDelNativeFwdRpath{} }
272 func (*GpeAddDelNativeFwdRpath) GetMessageName() string { return "gpe_add_del_native_fwd_rpath" }
273 func (*GpeAddDelNativeFwdRpath) GetCrcString() string { return "43fc8b54" }
274 func (*GpeAddDelNativeFwdRpath) GetMessageType() api.MessageType {
275 return api.RequestMessage
278 func (m *GpeAddDelNativeFwdRpath) Size() (size int) {
283 size += 4 // m.TableID
284 size += 4 // m.NhSwIfIndex
285 size += 1 // m.NhAddr.Af
286 size += 1 * 16 // m.NhAddr.Un
289 func (m *GpeAddDelNativeFwdRpath) Marshal(b []byte) ([]byte, error) {
291 b = make([]byte, m.Size())
293 buf := codec.NewBuffer(b)
294 buf.EncodeBool(m.IsAdd)
295 buf.EncodeUint32(m.TableID)
296 buf.EncodeUint32(uint32(m.NhSwIfIndex))
297 buf.EncodeUint8(uint8(m.NhAddr.Af))
298 buf.EncodeBytes(m.NhAddr.Un.XXX_UnionData[:], 16)
299 return buf.Bytes(), nil
301 func (m *GpeAddDelNativeFwdRpath) Unmarshal(b []byte) error {
302 buf := codec.NewBuffer(b)
303 m.IsAdd = buf.DecodeBool()
304 m.TableID = buf.DecodeUint32()
305 m.NhSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
306 m.NhAddr.Af = ip_types.AddressFamily(buf.DecodeUint8())
307 copy(m.NhAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
311 // GpeAddDelNativeFwdRpathReply defines message 'gpe_add_del_native_fwd_rpath_reply'.
312 type GpeAddDelNativeFwdRpathReply struct {
313 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
316 func (m *GpeAddDelNativeFwdRpathReply) Reset() { *m = GpeAddDelNativeFwdRpathReply{} }
317 func (*GpeAddDelNativeFwdRpathReply) GetMessageName() string {
318 return "gpe_add_del_native_fwd_rpath_reply"
320 func (*GpeAddDelNativeFwdRpathReply) GetCrcString() string { return "e8d4e804" }
321 func (*GpeAddDelNativeFwdRpathReply) GetMessageType() api.MessageType {
322 return api.ReplyMessage
325 func (m *GpeAddDelNativeFwdRpathReply) Size() (size int) {
329 size += 4 // m.Retval
332 func (m *GpeAddDelNativeFwdRpathReply) Marshal(b []byte) ([]byte, error) {
334 b = make([]byte, m.Size())
336 buf := codec.NewBuffer(b)
337 buf.EncodeInt32(m.Retval)
338 return buf.Bytes(), nil
340 func (m *GpeAddDelNativeFwdRpathReply) Unmarshal(b []byte) error {
341 buf := codec.NewBuffer(b)
342 m.Retval = buf.DecodeInt32()
346 // GpeEnableDisable defines message 'gpe_enable_disable'.
347 type GpeEnableDisable struct {
348 IsEnable bool `binapi:"bool,name=is_enable,default=true" json:"is_enable,omitempty"`
351 func (m *GpeEnableDisable) Reset() { *m = GpeEnableDisable{} }
352 func (*GpeEnableDisable) GetMessageName() string { return "gpe_enable_disable" }
353 func (*GpeEnableDisable) GetCrcString() string { return "c264d7bf" }
354 func (*GpeEnableDisable) GetMessageType() api.MessageType {
355 return api.RequestMessage
358 func (m *GpeEnableDisable) Size() (size int) {
362 size += 1 // m.IsEnable
365 func (m *GpeEnableDisable) Marshal(b []byte) ([]byte, error) {
367 b = make([]byte, m.Size())
369 buf := codec.NewBuffer(b)
370 buf.EncodeBool(m.IsEnable)
371 return buf.Bytes(), nil
373 func (m *GpeEnableDisable) Unmarshal(b []byte) error {
374 buf := codec.NewBuffer(b)
375 m.IsEnable = buf.DecodeBool()
379 // GpeEnableDisableReply defines message 'gpe_enable_disable_reply'.
380 type GpeEnableDisableReply struct {
381 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
384 func (m *GpeEnableDisableReply) Reset() { *m = GpeEnableDisableReply{} }
385 func (*GpeEnableDisableReply) GetMessageName() string { return "gpe_enable_disable_reply" }
386 func (*GpeEnableDisableReply) GetCrcString() string { return "e8d4e804" }
387 func (*GpeEnableDisableReply) GetMessageType() api.MessageType {
388 return api.ReplyMessage
391 func (m *GpeEnableDisableReply) Size() (size int) {
395 size += 4 // m.Retval
398 func (m *GpeEnableDisableReply) Marshal(b []byte) ([]byte, error) {
400 b = make([]byte, m.Size())
402 buf := codec.NewBuffer(b)
403 buf.EncodeInt32(m.Retval)
404 return buf.Bytes(), nil
406 func (m *GpeEnableDisableReply) Unmarshal(b []byte) error {
407 buf := codec.NewBuffer(b)
408 m.Retval = buf.DecodeInt32()
412 // GpeFwdEntriesGet defines message 'gpe_fwd_entries_get'.
413 type GpeFwdEntriesGet struct {
414 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
417 func (m *GpeFwdEntriesGet) Reset() { *m = GpeFwdEntriesGet{} }
418 func (*GpeFwdEntriesGet) GetMessageName() string { return "gpe_fwd_entries_get" }
419 func (*GpeFwdEntriesGet) GetCrcString() string { return "8d1f2fe9" }
420 func (*GpeFwdEntriesGet) GetMessageType() api.MessageType {
421 return api.RequestMessage
424 func (m *GpeFwdEntriesGet) Size() (size int) {
431 func (m *GpeFwdEntriesGet) Marshal(b []byte) ([]byte, error) {
433 b = make([]byte, m.Size())
435 buf := codec.NewBuffer(b)
436 buf.EncodeUint32(m.Vni)
437 return buf.Bytes(), nil
439 func (m *GpeFwdEntriesGet) Unmarshal(b []byte) error {
440 buf := codec.NewBuffer(b)
441 m.Vni = buf.DecodeUint32()
445 // GpeFwdEntriesGetReply defines message 'gpe_fwd_entries_get_reply'.
446 type GpeFwdEntriesGetReply struct {
447 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
448 Count uint32 `binapi:"u32,name=count" json:"-"`
449 Entries []GpeFwdEntry `binapi:"gpe_fwd_entry[count],name=entries" json:"entries,omitempty"`
452 func (m *GpeFwdEntriesGetReply) Reset() { *m = GpeFwdEntriesGetReply{} }
453 func (*GpeFwdEntriesGetReply) GetMessageName() string { return "gpe_fwd_entries_get_reply" }
454 func (*GpeFwdEntriesGetReply) GetCrcString() string { return "c4844876" }
455 func (*GpeFwdEntriesGetReply) GetMessageType() api.MessageType {
456 return api.ReplyMessage
459 func (m *GpeFwdEntriesGetReply) Size() (size int) {
463 size += 4 // m.Retval
465 for j1 := 0; j1 < len(m.Entries); j1++ {
468 if j1 < len(m.Entries) {
471 size += 4 // s1.FwdEntryIndex
472 size += 4 // s1.DpTable
473 size += 1 // s1.Leid.Type
474 size += 1 * 18 // s1.Leid.Address
475 size += 1 // s1.Reid.Type
476 size += 1 * 18 // s1.Reid.Address
478 size += 1 // s1.Action
482 func (m *GpeFwdEntriesGetReply) Marshal(b []byte) ([]byte, error) {
484 b = make([]byte, m.Size())
486 buf := codec.NewBuffer(b)
487 buf.EncodeInt32(m.Retval)
488 buf.EncodeUint32(uint32(len(m.Entries)))
489 for j0 := 0; j0 < len(m.Entries); j0++ {
490 var v0 GpeFwdEntry // Entries
491 if j0 < len(m.Entries) {
494 buf.EncodeUint32(v0.FwdEntryIndex)
495 buf.EncodeUint32(v0.DpTable)
496 buf.EncodeUint8(uint8(v0.Leid.Type))
497 buf.EncodeBytes(v0.Leid.Address.XXX_UnionData[:], 18)
498 buf.EncodeUint8(uint8(v0.Reid.Type))
499 buf.EncodeBytes(v0.Reid.Address.XXX_UnionData[:], 18)
500 buf.EncodeUint32(v0.Vni)
501 buf.EncodeUint8(v0.Action)
503 return buf.Bytes(), nil
505 func (m *GpeFwdEntriesGetReply) Unmarshal(b []byte) error {
506 buf := codec.NewBuffer(b)
507 m.Retval = buf.DecodeInt32()
508 m.Count = buf.DecodeUint32()
509 m.Entries = make([]GpeFwdEntry, m.Count)
510 for j0 := 0; j0 < len(m.Entries); j0++ {
511 m.Entries[j0].FwdEntryIndex = buf.DecodeUint32()
512 m.Entries[j0].DpTable = buf.DecodeUint32()
513 m.Entries[j0].Leid.Type = lisp_types.EidType(buf.DecodeUint8())
514 copy(m.Entries[j0].Leid.Address.XXX_UnionData[:], buf.DecodeBytes(18))
515 m.Entries[j0].Reid.Type = lisp_types.EidType(buf.DecodeUint8())
516 copy(m.Entries[j0].Reid.Address.XXX_UnionData[:], buf.DecodeBytes(18))
517 m.Entries[j0].Vni = buf.DecodeUint32()
518 m.Entries[j0].Action = buf.DecodeUint8()
523 // GpeFwdEntryPathDetails defines message 'gpe_fwd_entry_path_details'.
524 type GpeFwdEntryPathDetails struct {
525 LclLoc GpeLocator `binapi:"gpe_locator,name=lcl_loc" json:"lcl_loc,omitempty"`
526 RmtLoc GpeLocator `binapi:"gpe_locator,name=rmt_loc" json:"rmt_loc,omitempty"`
529 func (m *GpeFwdEntryPathDetails) Reset() { *m = GpeFwdEntryPathDetails{} }
530 func (*GpeFwdEntryPathDetails) GetMessageName() string { return "gpe_fwd_entry_path_details" }
531 func (*GpeFwdEntryPathDetails) GetCrcString() string { return "483df51a" }
532 func (*GpeFwdEntryPathDetails) GetMessageType() api.MessageType {
533 return api.ReplyMessage
536 func (m *GpeFwdEntryPathDetails) Size() (size int) {
540 size += 1 // m.LclLoc.Weight
541 size += 1 // m.LclLoc.Addr.Af
542 size += 1 * 16 // m.LclLoc.Addr.Un
543 size += 1 // m.RmtLoc.Weight
544 size += 1 // m.RmtLoc.Addr.Af
545 size += 1 * 16 // m.RmtLoc.Addr.Un
548 func (m *GpeFwdEntryPathDetails) Marshal(b []byte) ([]byte, error) {
550 b = make([]byte, m.Size())
552 buf := codec.NewBuffer(b)
553 buf.EncodeUint8(m.LclLoc.Weight)
554 buf.EncodeUint8(uint8(m.LclLoc.Addr.Af))
555 buf.EncodeBytes(m.LclLoc.Addr.Un.XXX_UnionData[:], 16)
556 buf.EncodeUint8(m.RmtLoc.Weight)
557 buf.EncodeUint8(uint8(m.RmtLoc.Addr.Af))
558 buf.EncodeBytes(m.RmtLoc.Addr.Un.XXX_UnionData[:], 16)
559 return buf.Bytes(), nil
561 func (m *GpeFwdEntryPathDetails) Unmarshal(b []byte) error {
562 buf := codec.NewBuffer(b)
563 m.LclLoc.Weight = buf.DecodeUint8()
564 m.LclLoc.Addr.Af = ip_types.AddressFamily(buf.DecodeUint8())
565 copy(m.LclLoc.Addr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
566 m.RmtLoc.Weight = buf.DecodeUint8()
567 m.RmtLoc.Addr.Af = ip_types.AddressFamily(buf.DecodeUint8())
568 copy(m.RmtLoc.Addr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
572 // GpeFwdEntryPathDump defines message 'gpe_fwd_entry_path_dump'.
573 type GpeFwdEntryPathDump struct {
574 FwdEntryIndex uint32 `binapi:"u32,name=fwd_entry_index" json:"fwd_entry_index,omitempty"`
577 func (m *GpeFwdEntryPathDump) Reset() { *m = GpeFwdEntryPathDump{} }
578 func (*GpeFwdEntryPathDump) GetMessageName() string { return "gpe_fwd_entry_path_dump" }
579 func (*GpeFwdEntryPathDump) GetCrcString() string { return "39bce980" }
580 func (*GpeFwdEntryPathDump) GetMessageType() api.MessageType {
581 return api.RequestMessage
584 func (m *GpeFwdEntryPathDump) Size() (size int) {
588 size += 4 // m.FwdEntryIndex
591 func (m *GpeFwdEntryPathDump) Marshal(b []byte) ([]byte, error) {
593 b = make([]byte, m.Size())
595 buf := codec.NewBuffer(b)
596 buf.EncodeUint32(m.FwdEntryIndex)
597 return buf.Bytes(), nil
599 func (m *GpeFwdEntryPathDump) Unmarshal(b []byte) error {
600 buf := codec.NewBuffer(b)
601 m.FwdEntryIndex = buf.DecodeUint32()
605 // GpeFwdEntryVnisGet defines message 'gpe_fwd_entry_vnis_get'.
606 type GpeFwdEntryVnisGet struct{}
608 func (m *GpeFwdEntryVnisGet) Reset() { *m = GpeFwdEntryVnisGet{} }
609 func (*GpeFwdEntryVnisGet) GetMessageName() string { return "gpe_fwd_entry_vnis_get" }
610 func (*GpeFwdEntryVnisGet) GetCrcString() string { return "51077d14" }
611 func (*GpeFwdEntryVnisGet) GetMessageType() api.MessageType {
612 return api.RequestMessage
615 func (m *GpeFwdEntryVnisGet) Size() (size int) {
621 func (m *GpeFwdEntryVnisGet) Marshal(b []byte) ([]byte, error) {
623 b = make([]byte, m.Size())
625 buf := codec.NewBuffer(b)
626 return buf.Bytes(), nil
628 func (m *GpeFwdEntryVnisGet) Unmarshal(b []byte) error {
632 // GpeFwdEntryVnisGetReply defines message 'gpe_fwd_entry_vnis_get_reply'.
633 type GpeFwdEntryVnisGetReply struct {
634 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
635 Count uint32 `binapi:"u32,name=count" json:"-"`
636 Vnis []uint32 `binapi:"u32[count],name=vnis" json:"vnis,omitempty"`
639 func (m *GpeFwdEntryVnisGetReply) Reset() { *m = GpeFwdEntryVnisGetReply{} }
640 func (*GpeFwdEntryVnisGetReply) GetMessageName() string { return "gpe_fwd_entry_vnis_get_reply" }
641 func (*GpeFwdEntryVnisGetReply) GetCrcString() string { return "aa70da20" }
642 func (*GpeFwdEntryVnisGetReply) GetMessageType() api.MessageType {
643 return api.ReplyMessage
646 func (m *GpeFwdEntryVnisGetReply) Size() (size int) {
650 size += 4 // m.Retval
652 size += 4 * len(m.Vnis) // m.Vnis
655 func (m *GpeFwdEntryVnisGetReply) Marshal(b []byte) ([]byte, error) {
657 b = make([]byte, m.Size())
659 buf := codec.NewBuffer(b)
660 buf.EncodeInt32(m.Retval)
661 buf.EncodeUint32(uint32(len(m.Vnis)))
662 for i := 0; i < len(m.Vnis); i++ {
665 x = uint32(m.Vnis[i])
669 return buf.Bytes(), nil
671 func (m *GpeFwdEntryVnisGetReply) Unmarshal(b []byte) error {
672 buf := codec.NewBuffer(b)
673 m.Retval = buf.DecodeInt32()
674 m.Count = buf.DecodeUint32()
675 m.Vnis = make([]uint32, m.Count)
676 for i := 0; i < len(m.Vnis); i++ {
677 m.Vnis[i] = buf.DecodeUint32()
682 // GpeGetEncapMode defines message 'gpe_get_encap_mode'.
683 type GpeGetEncapMode struct{}
685 func (m *GpeGetEncapMode) Reset() { *m = GpeGetEncapMode{} }
686 func (*GpeGetEncapMode) GetMessageName() string { return "gpe_get_encap_mode" }
687 func (*GpeGetEncapMode) GetCrcString() string { return "51077d14" }
688 func (*GpeGetEncapMode) GetMessageType() api.MessageType {
689 return api.RequestMessage
692 func (m *GpeGetEncapMode) Size() (size int) {
698 func (m *GpeGetEncapMode) Marshal(b []byte) ([]byte, error) {
700 b = make([]byte, m.Size())
702 buf := codec.NewBuffer(b)
703 return buf.Bytes(), nil
705 func (m *GpeGetEncapMode) Unmarshal(b []byte) error {
709 // GpeGetEncapModeReply defines message 'gpe_get_encap_mode_reply'.
710 type GpeGetEncapModeReply struct {
711 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
712 EncapMode uint8 `binapi:"u8,name=encap_mode" json:"encap_mode,omitempty"`
715 func (m *GpeGetEncapModeReply) Reset() { *m = GpeGetEncapModeReply{} }
716 func (*GpeGetEncapModeReply) GetMessageName() string { return "gpe_get_encap_mode_reply" }
717 func (*GpeGetEncapModeReply) GetCrcString() string { return "36e3f7ca" }
718 func (*GpeGetEncapModeReply) GetMessageType() api.MessageType {
719 return api.ReplyMessage
722 func (m *GpeGetEncapModeReply) Size() (size int) {
726 size += 4 // m.Retval
727 size += 1 // m.EncapMode
730 func (m *GpeGetEncapModeReply) Marshal(b []byte) ([]byte, error) {
732 b = make([]byte, m.Size())
734 buf := codec.NewBuffer(b)
735 buf.EncodeInt32(m.Retval)
736 buf.EncodeUint8(m.EncapMode)
737 return buf.Bytes(), nil
739 func (m *GpeGetEncapModeReply) Unmarshal(b []byte) error {
740 buf := codec.NewBuffer(b)
741 m.Retval = buf.DecodeInt32()
742 m.EncapMode = buf.DecodeUint8()
746 // GpeNativeFwdRpathsGet defines message 'gpe_native_fwd_rpaths_get'.
747 type GpeNativeFwdRpathsGet struct {
748 IsIP4 bool `binapi:"bool,name=is_ip4" json:"is_ip4,omitempty"`
751 func (m *GpeNativeFwdRpathsGet) Reset() { *m = GpeNativeFwdRpathsGet{} }
752 func (*GpeNativeFwdRpathsGet) GetMessageName() string { return "gpe_native_fwd_rpaths_get" }
753 func (*GpeNativeFwdRpathsGet) GetCrcString() string { return "f652ceb4" }
754 func (*GpeNativeFwdRpathsGet) GetMessageType() api.MessageType {
755 return api.RequestMessage
758 func (m *GpeNativeFwdRpathsGet) Size() (size int) {
765 func (m *GpeNativeFwdRpathsGet) Marshal(b []byte) ([]byte, error) {
767 b = make([]byte, m.Size())
769 buf := codec.NewBuffer(b)
770 buf.EncodeBool(m.IsIP4)
771 return buf.Bytes(), nil
773 func (m *GpeNativeFwdRpathsGet) Unmarshal(b []byte) error {
774 buf := codec.NewBuffer(b)
775 m.IsIP4 = buf.DecodeBool()
779 // GpeNativeFwdRpathsGetReply defines message 'gpe_native_fwd_rpaths_get_reply'.
780 type GpeNativeFwdRpathsGetReply struct {
781 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
782 Count uint32 `binapi:"u32,name=count" json:"-"`
783 Entries []GpeNativeFwdRpath `binapi:"gpe_native_fwd_rpath[count],name=entries" json:"entries,omitempty"`
786 func (m *GpeNativeFwdRpathsGetReply) Reset() { *m = GpeNativeFwdRpathsGetReply{} }
787 func (*GpeNativeFwdRpathsGetReply) GetMessageName() string { return "gpe_native_fwd_rpaths_get_reply" }
788 func (*GpeNativeFwdRpathsGetReply) GetCrcString() string { return "7a1ca5a2" }
789 func (*GpeNativeFwdRpathsGetReply) GetMessageType() api.MessageType {
790 return api.ReplyMessage
793 func (m *GpeNativeFwdRpathsGetReply) Size() (size int) {
797 size += 4 // m.Retval
799 for j1 := 0; j1 < len(m.Entries); j1++ {
800 var s1 GpeNativeFwdRpath
802 if j1 < len(m.Entries) {
805 size += 4 // s1.FibIndex
806 size += 4 // s1.NhSwIfIndex
807 size += 1 // s1.NhAddr.Af
808 size += 1 * 16 // s1.NhAddr.Un
812 func (m *GpeNativeFwdRpathsGetReply) Marshal(b []byte) ([]byte, error) {
814 b = make([]byte, m.Size())
816 buf := codec.NewBuffer(b)
817 buf.EncodeInt32(m.Retval)
818 buf.EncodeUint32(uint32(len(m.Entries)))
819 for j0 := 0; j0 < len(m.Entries); j0++ {
820 var v0 GpeNativeFwdRpath // Entries
821 if j0 < len(m.Entries) {
824 buf.EncodeUint32(v0.FibIndex)
825 buf.EncodeUint32(uint32(v0.NhSwIfIndex))
826 buf.EncodeUint8(uint8(v0.NhAddr.Af))
827 buf.EncodeBytes(v0.NhAddr.Un.XXX_UnionData[:], 16)
829 return buf.Bytes(), nil
831 func (m *GpeNativeFwdRpathsGetReply) Unmarshal(b []byte) error {
832 buf := codec.NewBuffer(b)
833 m.Retval = buf.DecodeInt32()
834 m.Count = buf.DecodeUint32()
835 m.Entries = make([]GpeNativeFwdRpath, m.Count)
836 for j0 := 0; j0 < len(m.Entries); j0++ {
837 m.Entries[j0].FibIndex = buf.DecodeUint32()
838 m.Entries[j0].NhSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
839 m.Entries[j0].NhAddr.Af = ip_types.AddressFamily(buf.DecodeUint8())
840 copy(m.Entries[j0].NhAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
845 // GpeSetEncapMode defines message 'gpe_set_encap_mode'.
846 type GpeSetEncapMode struct {
847 IsVxlan bool `binapi:"bool,name=is_vxlan" json:"is_vxlan,omitempty"`
850 func (m *GpeSetEncapMode) Reset() { *m = GpeSetEncapMode{} }
851 func (*GpeSetEncapMode) GetMessageName() string { return "gpe_set_encap_mode" }
852 func (*GpeSetEncapMode) GetCrcString() string { return "bd819eac" }
853 func (*GpeSetEncapMode) GetMessageType() api.MessageType {
854 return api.RequestMessage
857 func (m *GpeSetEncapMode) Size() (size int) {
861 size += 1 // m.IsVxlan
864 func (m *GpeSetEncapMode) Marshal(b []byte) ([]byte, error) {
866 b = make([]byte, m.Size())
868 buf := codec.NewBuffer(b)
869 buf.EncodeBool(m.IsVxlan)
870 return buf.Bytes(), nil
872 func (m *GpeSetEncapMode) Unmarshal(b []byte) error {
873 buf := codec.NewBuffer(b)
874 m.IsVxlan = buf.DecodeBool()
878 // GpeSetEncapModeReply defines message 'gpe_set_encap_mode_reply'.
879 type GpeSetEncapModeReply struct {
880 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
883 func (m *GpeSetEncapModeReply) Reset() { *m = GpeSetEncapModeReply{} }
884 func (*GpeSetEncapModeReply) GetMessageName() string { return "gpe_set_encap_mode_reply" }
885 func (*GpeSetEncapModeReply) GetCrcString() string { return "e8d4e804" }
886 func (*GpeSetEncapModeReply) GetMessageType() api.MessageType {
887 return api.ReplyMessage
890 func (m *GpeSetEncapModeReply) Size() (size int) {
894 size += 4 // m.Retval
897 func (m *GpeSetEncapModeReply) Marshal(b []byte) ([]byte, error) {
899 b = make([]byte, m.Size())
901 buf := codec.NewBuffer(b)
902 buf.EncodeInt32(m.Retval)
903 return buf.Bytes(), nil
905 func (m *GpeSetEncapModeReply) Unmarshal(b []byte) error {
906 buf := codec.NewBuffer(b)
907 m.Retval = buf.DecodeInt32()
911 func init() { file_lisp_gpe_binapi_init() }
912 func file_lisp_gpe_binapi_init() {
913 api.RegisterMessage((*GpeAddDelFwdEntry)(nil), "gpe_add_del_fwd_entry_f0847644")
914 api.RegisterMessage((*GpeAddDelFwdEntryReply)(nil), "gpe_add_del_fwd_entry_reply_efe5f176")
915 api.RegisterMessage((*GpeAddDelIface)(nil), "gpe_add_del_iface_3ccff273")
916 api.RegisterMessage((*GpeAddDelIfaceReply)(nil), "gpe_add_del_iface_reply_e8d4e804")
917 api.RegisterMessage((*GpeAddDelNativeFwdRpath)(nil), "gpe_add_del_native_fwd_rpath_43fc8b54")
918 api.RegisterMessage((*GpeAddDelNativeFwdRpathReply)(nil), "gpe_add_del_native_fwd_rpath_reply_e8d4e804")
919 api.RegisterMessage((*GpeEnableDisable)(nil), "gpe_enable_disable_c264d7bf")
920 api.RegisterMessage((*GpeEnableDisableReply)(nil), "gpe_enable_disable_reply_e8d4e804")
921 api.RegisterMessage((*GpeFwdEntriesGet)(nil), "gpe_fwd_entries_get_8d1f2fe9")
922 api.RegisterMessage((*GpeFwdEntriesGetReply)(nil), "gpe_fwd_entries_get_reply_c4844876")
923 api.RegisterMessage((*GpeFwdEntryPathDetails)(nil), "gpe_fwd_entry_path_details_483df51a")
924 api.RegisterMessage((*GpeFwdEntryPathDump)(nil), "gpe_fwd_entry_path_dump_39bce980")
925 api.RegisterMessage((*GpeFwdEntryVnisGet)(nil), "gpe_fwd_entry_vnis_get_51077d14")
926 api.RegisterMessage((*GpeFwdEntryVnisGetReply)(nil), "gpe_fwd_entry_vnis_get_reply_aa70da20")
927 api.RegisterMessage((*GpeGetEncapMode)(nil), "gpe_get_encap_mode_51077d14")
928 api.RegisterMessage((*GpeGetEncapModeReply)(nil), "gpe_get_encap_mode_reply_36e3f7ca")
929 api.RegisterMessage((*GpeNativeFwdRpathsGet)(nil), "gpe_native_fwd_rpaths_get_f652ceb4")
930 api.RegisterMessage((*GpeNativeFwdRpathsGetReply)(nil), "gpe_native_fwd_rpaths_get_reply_7a1ca5a2")
931 api.RegisterMessage((*GpeSetEncapMode)(nil), "gpe_set_encap_mode_bd819eac")
932 api.RegisterMessage((*GpeSetEncapModeReply)(nil), "gpe_set_encap_mode_reply_e8d4e804")
935 // Messages returns list of all messages in this module.
936 func AllMessages() []api.Message {
937 return []api.Message{
938 (*GpeAddDelFwdEntry)(nil),
939 (*GpeAddDelFwdEntryReply)(nil),
940 (*GpeAddDelIface)(nil),
941 (*GpeAddDelIfaceReply)(nil),
942 (*GpeAddDelNativeFwdRpath)(nil),
943 (*GpeAddDelNativeFwdRpathReply)(nil),
944 (*GpeEnableDisable)(nil),
945 (*GpeEnableDisableReply)(nil),
946 (*GpeFwdEntriesGet)(nil),
947 (*GpeFwdEntriesGetReply)(nil),
948 (*GpeFwdEntryPathDetails)(nil),
949 (*GpeFwdEntryPathDump)(nil),
950 (*GpeFwdEntryVnisGet)(nil),
951 (*GpeFwdEntryVnisGetReply)(nil),
952 (*GpeGetEncapMode)(nil),
953 (*GpeGetEncapModeReply)(nil),
954 (*GpeNativeFwdRpathsGet)(nil),
955 (*GpeNativeFwdRpathsGetReply)(nil),
956 (*GpeSetEncapMode)(nil),
957 (*GpeSetEncapModeReply)(nil),