1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
6 // Package lisp_gpe contains generated bindings for API file lisp_gpe.api.
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"
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
32 VersionCrc = 0x4947ac96
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"`
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"`
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"`
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"`
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
77 func (m *GpeAddDelFwdEntry) Size() (size int) {
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
87 size += 4 // m.DpTable
90 for j1 := 0; j1 < len(m.Locs); j1++ {
96 size += 1 // s1.Weight
97 size += 1 // s1.Addr.Af
98 size += 1 * 16 // s1.Addr.Un
102 func (m *GpeAddDelFwdEntry) Marshal(b []byte) ([]byte, error) {
104 b = make([]byte, m.Size())
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) {
121 buf.EncodeUint8(v0.Weight)
122 buf.EncodeUint8(uint8(v0.Addr.Af))
123 buf.EncodeBytes(v0.Addr.Un.XXX_UnionData[:], 16)
125 return buf.Bytes(), nil
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))
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"`
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
160 func (m *GpeAddDelFwdEntryReply) Size() (size int) {
164 size += 4 // m.Retval
165 size += 4 // m.FwdEntryIndex
168 func (m *GpeAddDelFwdEntryReply) Marshal(b []byte) ([]byte, error) {
170 b = make([]byte, m.Size())
172 buf := codec.NewBuffer(b)
173 buf.EncodeInt32(m.Retval)
174 buf.EncodeUint32(m.FwdEntryIndex)
175 return buf.Bytes(), nil
177 func (m *GpeAddDelFwdEntryReply) Unmarshal(b []byte) error {
178 buf := codec.NewBuffer(b)
179 m.Retval = buf.DecodeInt32()
180 m.FwdEntryIndex = buf.DecodeUint32()
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"`
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
199 func (m *GpeAddDelIface) Size() (size int) {
205 size += 4 // m.DpTable
209 func (m *GpeAddDelIface) Marshal(b []byte) ([]byte, error) {
211 b = make([]byte, m.Size())
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
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()
229 // GpeAddDelIfaceReply defines message 'gpe_add_del_iface_reply'.
230 type GpeAddDelIfaceReply struct {
231 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
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
241 func (m *GpeAddDelIfaceReply) Size() (size int) {
245 size += 4 // m.Retval
248 func (m *GpeAddDelIfaceReply) Marshal(b []byte) ([]byte, error) {
250 b = make([]byte, m.Size())
252 buf := codec.NewBuffer(b)
253 buf.EncodeInt32(m.Retval)
254 return buf.Bytes(), nil
256 func (m *GpeAddDelIfaceReply) Unmarshal(b []byte) error {
257 buf := codec.NewBuffer(b)
258 m.Retval = buf.DecodeInt32()
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"`
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
277 func (m *GpeAddDelNativeFwdRpath) Size() (size int) {
282 size += 4 // m.TableID
283 size += 4 // m.NhSwIfIndex
284 size += 1 // m.NhAddr.Af
285 size += 1 * 16 // m.NhAddr.Un
288 func (m *GpeAddDelNativeFwdRpath) Marshal(b []byte) ([]byte, error) {
290 b = make([]byte, m.Size())
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
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))
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"`
315 func (m *GpeAddDelNativeFwdRpathReply) Reset() { *m = GpeAddDelNativeFwdRpathReply{} }
316 func (*GpeAddDelNativeFwdRpathReply) GetMessageName() string {
317 return "gpe_add_del_native_fwd_rpath_reply"
319 func (*GpeAddDelNativeFwdRpathReply) GetCrcString() string { return "e8d4e804" }
320 func (*GpeAddDelNativeFwdRpathReply) GetMessageType() api.MessageType {
321 return api.ReplyMessage
324 func (m *GpeAddDelNativeFwdRpathReply) Size() (size int) {
328 size += 4 // m.Retval
331 func (m *GpeAddDelNativeFwdRpathReply) Marshal(b []byte) ([]byte, error) {
333 b = make([]byte, m.Size())
335 buf := codec.NewBuffer(b)
336 buf.EncodeInt32(m.Retval)
337 return buf.Bytes(), nil
339 func (m *GpeAddDelNativeFwdRpathReply) Unmarshal(b []byte) error {
340 buf := codec.NewBuffer(b)
341 m.Retval = buf.DecodeInt32()
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"`
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
357 func (m *GpeEnableDisable) Size() (size int) {
361 size += 1 // m.IsEnable
364 func (m *GpeEnableDisable) Marshal(b []byte) ([]byte, error) {
366 b = make([]byte, m.Size())
368 buf := codec.NewBuffer(b)
369 buf.EncodeBool(m.IsEnable)
370 return buf.Bytes(), nil
372 func (m *GpeEnableDisable) Unmarshal(b []byte) error {
373 buf := codec.NewBuffer(b)
374 m.IsEnable = buf.DecodeBool()
378 // GpeEnableDisableReply defines message 'gpe_enable_disable_reply'.
379 type GpeEnableDisableReply struct {
380 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
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
390 func (m *GpeEnableDisableReply) Size() (size int) {
394 size += 4 // m.Retval
397 func (m *GpeEnableDisableReply) Marshal(b []byte) ([]byte, error) {
399 b = make([]byte, m.Size())
401 buf := codec.NewBuffer(b)
402 buf.EncodeInt32(m.Retval)
403 return buf.Bytes(), nil
405 func (m *GpeEnableDisableReply) Unmarshal(b []byte) error {
406 buf := codec.NewBuffer(b)
407 m.Retval = buf.DecodeInt32()
411 // GpeFwdEntriesGet defines message 'gpe_fwd_entries_get'.
412 type GpeFwdEntriesGet struct {
413 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
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
423 func (m *GpeFwdEntriesGet) Size() (size int) {
430 func (m *GpeFwdEntriesGet) Marshal(b []byte) ([]byte, error) {
432 b = make([]byte, m.Size())
434 buf := codec.NewBuffer(b)
435 buf.EncodeUint32(m.Vni)
436 return buf.Bytes(), nil
438 func (m *GpeFwdEntriesGet) Unmarshal(b []byte) error {
439 buf := codec.NewBuffer(b)
440 m.Vni = buf.DecodeUint32()
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"`
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
458 func (m *GpeFwdEntriesGetReply) Size() (size int) {
462 size += 4 // m.Retval
464 for j1 := 0; j1 < len(m.Entries); j1++ {
467 if j1 < len(m.Entries) {
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
477 size += 1 // s1.Action
481 func (m *GpeFwdEntriesGetReply) Marshal(b []byte) ([]byte, error) {
483 b = make([]byte, m.Size())
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) {
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)
502 return buf.Bytes(), nil
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()
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"`
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
535 func (m *GpeFwdEntryPathDetails) Size() (size int) {
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
547 func (m *GpeFwdEntryPathDetails) Marshal(b []byte) ([]byte, error) {
549 b = make([]byte, m.Size())
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
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))
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"`
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
583 func (m *GpeFwdEntryPathDump) Size() (size int) {
587 size += 4 // m.FwdEntryIndex
590 func (m *GpeFwdEntryPathDump) Marshal(b []byte) ([]byte, error) {
592 b = make([]byte, m.Size())
594 buf := codec.NewBuffer(b)
595 buf.EncodeUint32(m.FwdEntryIndex)
596 return buf.Bytes(), nil
598 func (m *GpeFwdEntryPathDump) Unmarshal(b []byte) error {
599 buf := codec.NewBuffer(b)
600 m.FwdEntryIndex = buf.DecodeUint32()
604 // GpeFwdEntryVnisGet defines message 'gpe_fwd_entry_vnis_get'.
605 type GpeFwdEntryVnisGet struct{}
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
614 func (m *GpeFwdEntryVnisGet) Size() (size int) {
620 func (m *GpeFwdEntryVnisGet) Marshal(b []byte) ([]byte, error) {
622 b = make([]byte, m.Size())
624 buf := codec.NewBuffer(b)
625 return buf.Bytes(), nil
627 func (m *GpeFwdEntryVnisGet) Unmarshal(b []byte) error {
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"`
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
645 func (m *GpeFwdEntryVnisGetReply) Size() (size int) {
649 size += 4 // m.Retval
651 size += 4 * len(m.Vnis) // m.Vnis
654 func (m *GpeFwdEntryVnisGetReply) Marshal(b []byte) ([]byte, error) {
656 b = make([]byte, m.Size())
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++ {
664 x = uint32(m.Vnis[i])
668 return buf.Bytes(), nil
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()
681 // GpeGetEncapMode defines message 'gpe_get_encap_mode'.
682 type GpeGetEncapMode struct{}
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
691 func (m *GpeGetEncapMode) Size() (size int) {
697 func (m *GpeGetEncapMode) Marshal(b []byte) ([]byte, error) {
699 b = make([]byte, m.Size())
701 buf := codec.NewBuffer(b)
702 return buf.Bytes(), nil
704 func (m *GpeGetEncapMode) Unmarshal(b []byte) error {
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"`
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
721 func (m *GpeGetEncapModeReply) Size() (size int) {
725 size += 4 // m.Retval
726 size += 1 // m.EncapMode
729 func (m *GpeGetEncapModeReply) Marshal(b []byte) ([]byte, error) {
731 b = make([]byte, m.Size())
733 buf := codec.NewBuffer(b)
734 buf.EncodeInt32(m.Retval)
735 buf.EncodeUint8(m.EncapMode)
736 return buf.Bytes(), nil
738 func (m *GpeGetEncapModeReply) Unmarshal(b []byte) error {
739 buf := codec.NewBuffer(b)
740 m.Retval = buf.DecodeInt32()
741 m.EncapMode = buf.DecodeUint8()
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"`
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
757 func (m *GpeNativeFwdRpathsGet) Size() (size int) {
764 func (m *GpeNativeFwdRpathsGet) Marshal(b []byte) ([]byte, error) {
766 b = make([]byte, m.Size())
768 buf := codec.NewBuffer(b)
769 buf.EncodeBool(m.IsIP4)
770 return buf.Bytes(), nil
772 func (m *GpeNativeFwdRpathsGet) Unmarshal(b []byte) error {
773 buf := codec.NewBuffer(b)
774 m.IsIP4 = buf.DecodeBool()
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"`
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
792 func (m *GpeNativeFwdRpathsGetReply) Size() (size int) {
796 size += 4 // m.Retval
798 for j1 := 0; j1 < len(m.Entries); j1++ {
799 var s1 GpeNativeFwdRpath
801 if j1 < len(m.Entries) {
804 size += 4 // s1.FibIndex
805 size += 4 // s1.NhSwIfIndex
806 size += 1 // s1.NhAddr.Af
807 size += 1 * 16 // s1.NhAddr.Un
811 func (m *GpeNativeFwdRpathsGetReply) Marshal(b []byte) ([]byte, error) {
813 b = make([]byte, m.Size())
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) {
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)
828 return buf.Bytes(), nil
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))
844 // GpeSetEncapMode defines message 'gpe_set_encap_mode'.
845 type GpeSetEncapMode struct {
846 IsVxlan bool `binapi:"bool,name=is_vxlan" json:"is_vxlan,omitempty"`
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
856 func (m *GpeSetEncapMode) Size() (size int) {
860 size += 1 // m.IsVxlan
863 func (m *GpeSetEncapMode) Marshal(b []byte) ([]byte, error) {
865 b = make([]byte, m.Size())
867 buf := codec.NewBuffer(b)
868 buf.EncodeBool(m.IsVxlan)
869 return buf.Bytes(), nil
871 func (m *GpeSetEncapMode) Unmarshal(b []byte) error {
872 buf := codec.NewBuffer(b)
873 m.IsVxlan = buf.DecodeBool()
877 // GpeSetEncapModeReply defines message 'gpe_set_encap_mode_reply'.
878 type GpeSetEncapModeReply struct {
879 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
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
889 func (m *GpeSetEncapModeReply) Size() (size int) {
893 size += 4 // m.Retval
896 func (m *GpeSetEncapModeReply) Marshal(b []byte) ([]byte, error) {
898 b = make([]byte, m.Size())
900 buf := codec.NewBuffer(b)
901 buf.EncodeInt32(m.Retval)
902 return buf.Bytes(), nil
904 func (m *GpeSetEncapModeReply) Unmarshal(b []byte) error {
905 buf := codec.NewBuffer(b)
906 m.Retval = buf.DecodeInt32()
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")
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),