github.com/edwarnicke/govpp@v0.0.0-20230130211138-14ef5d20b1d0/binapi/lisp_gpe/lisp_gpe.ba.go (about) 1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT. 2 // versions: 3 // binapi-generator: v0.4.0-dev 4 // VPP: 23.02-rc0~189-g57127b32a 5 // source: /usr/share/vpp/api/plugins/lisp_gpe.api.json 6 7 // Package lisp_gpe contains generated bindings for API file lisp_gpe.api. 8 // 9 // Contents: 10 // 3 structs 11 // 20 messages 12 // 13 package lisp_gpe 14 15 import ( 16 api "git.fd.io/govpp.git/api" 17 codec "git.fd.io/govpp.git/codec" 18 _ "github.com/edwarnicke/govpp/binapi/ethernet_types" 19 interface_types "github.com/edwarnicke/govpp/binapi/interface_types" 20 ip_types "github.com/edwarnicke/govpp/binapi/ip_types" 21 lisp_types "github.com/edwarnicke/govpp/binapi/lisp_types" 22 ) 23 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 29 30 const ( 31 APIFile = "lisp_gpe" 32 APIVersion = "2.0.0" 33 VersionCrc = 0x92611b0 34 ) 35 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"` 44 } 45 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"` 50 } 51 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"` 57 } 58 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"` 69 } 70 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 76 } 77 78 func (m *GpeAddDelFwdEntry) Size() (size int) { 79 if m == nil { 80 return 0 81 } 82 size += 1 // m.IsAdd 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 87 size += 4 // m.Vni 88 size += 4 // m.DpTable 89 size += 1 // m.Action 90 size += 4 // m.LocNum 91 for j1 := 0; j1 < len(m.Locs); j1++ { 92 var s1 GpeLocator 93 _ = s1 94 if j1 < len(m.Locs) { 95 s1 = m.Locs[j1] 96 } 97 size += 1 // s1.Weight 98 size += 1 // s1.Addr.Af 99 size += 1 * 16 // s1.Addr.Un 100 } 101 return size 102 } 103 func (m *GpeAddDelFwdEntry) Marshal(b []byte) ([]byte, error) { 104 if b == nil { 105 b = make([]byte, m.Size()) 106 } 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) { 120 v0 = m.Locs[j0] 121 } 122 buf.EncodeUint8(v0.Weight) 123 buf.EncodeUint8(uint8(v0.Addr.Af)) 124 buf.EncodeBytes(v0.Addr.Un.XXX_UnionData[:], 16) 125 } 126 return buf.Bytes(), nil 127 } 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)) 144 } 145 return nil 146 } 147 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"` 152 } 153 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 159 } 160 161 func (m *GpeAddDelFwdEntryReply) Size() (size int) { 162 if m == nil { 163 return 0 164 } 165 size += 4 // m.Retval 166 size += 4 // m.FwdEntryIndex 167 return size 168 } 169 func (m *GpeAddDelFwdEntryReply) Marshal(b []byte) ([]byte, error) { 170 if b == nil { 171 b = make([]byte, m.Size()) 172 } 173 buf := codec.NewBuffer(b) 174 buf.EncodeInt32(m.Retval) 175 buf.EncodeUint32(m.FwdEntryIndex) 176 return buf.Bytes(), nil 177 } 178 func (m *GpeAddDelFwdEntryReply) Unmarshal(b []byte) error { 179 buf := codec.NewBuffer(b) 180 m.Retval = buf.DecodeInt32() 181 m.FwdEntryIndex = buf.DecodeUint32() 182 return nil 183 } 184 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"` 191 } 192 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 198 } 199 200 func (m *GpeAddDelIface) Size() (size int) { 201 if m == nil { 202 return 0 203 } 204 size += 1 // m.IsAdd 205 size += 1 // m.IsL2 206 size += 4 // m.DpTable 207 size += 4 // m.Vni 208 return size 209 } 210 func (m *GpeAddDelIface) Marshal(b []byte) ([]byte, error) { 211 if b == nil { 212 b = make([]byte, m.Size()) 213 } 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 220 } 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() 227 return nil 228 } 229 230 // GpeAddDelIfaceReply defines message 'gpe_add_del_iface_reply'. 231 type GpeAddDelIfaceReply struct { 232 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 233 } 234 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 240 } 241 242 func (m *GpeAddDelIfaceReply) Size() (size int) { 243 if m == nil { 244 return 0 245 } 246 size += 4 // m.Retval 247 return size 248 } 249 func (m *GpeAddDelIfaceReply) Marshal(b []byte) ([]byte, error) { 250 if b == nil { 251 b = make([]byte, m.Size()) 252 } 253 buf := codec.NewBuffer(b) 254 buf.EncodeInt32(m.Retval) 255 return buf.Bytes(), nil 256 } 257 func (m *GpeAddDelIfaceReply) Unmarshal(b []byte) error { 258 buf := codec.NewBuffer(b) 259 m.Retval = buf.DecodeInt32() 260 return nil 261 } 262 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"` 269 } 270 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 276 } 277 278 func (m *GpeAddDelNativeFwdRpath) Size() (size int) { 279 if m == nil { 280 return 0 281 } 282 size += 1 // m.IsAdd 283 size += 4 // m.TableID 284 size += 4 // m.NhSwIfIndex 285 size += 1 // m.NhAddr.Af 286 size += 1 * 16 // m.NhAddr.Un 287 return size 288 } 289 func (m *GpeAddDelNativeFwdRpath) Marshal(b []byte) ([]byte, error) { 290 if b == nil { 291 b = make([]byte, m.Size()) 292 } 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 300 } 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)) 308 return nil 309 } 310 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"` 314 } 315 316 func (m *GpeAddDelNativeFwdRpathReply) Reset() { *m = GpeAddDelNativeFwdRpathReply{} } 317 func (*GpeAddDelNativeFwdRpathReply) GetMessageName() string { 318 return "gpe_add_del_native_fwd_rpath_reply" 319 } 320 func (*GpeAddDelNativeFwdRpathReply) GetCrcString() string { return "e8d4e804" } 321 func (*GpeAddDelNativeFwdRpathReply) GetMessageType() api.MessageType { 322 return api.ReplyMessage 323 } 324 325 func (m *GpeAddDelNativeFwdRpathReply) Size() (size int) { 326 if m == nil { 327 return 0 328 } 329 size += 4 // m.Retval 330 return size 331 } 332 func (m *GpeAddDelNativeFwdRpathReply) Marshal(b []byte) ([]byte, error) { 333 if b == nil { 334 b = make([]byte, m.Size()) 335 } 336 buf := codec.NewBuffer(b) 337 buf.EncodeInt32(m.Retval) 338 return buf.Bytes(), nil 339 } 340 func (m *GpeAddDelNativeFwdRpathReply) Unmarshal(b []byte) error { 341 buf := codec.NewBuffer(b) 342 m.Retval = buf.DecodeInt32() 343 return nil 344 } 345 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"` 349 } 350 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 356 } 357 358 func (m *GpeEnableDisable) Size() (size int) { 359 if m == nil { 360 return 0 361 } 362 size += 1 // m.IsEnable 363 return size 364 } 365 func (m *GpeEnableDisable) Marshal(b []byte) ([]byte, error) { 366 if b == nil { 367 b = make([]byte, m.Size()) 368 } 369 buf := codec.NewBuffer(b) 370 buf.EncodeBool(m.IsEnable) 371 return buf.Bytes(), nil 372 } 373 func (m *GpeEnableDisable) Unmarshal(b []byte) error { 374 buf := codec.NewBuffer(b) 375 m.IsEnable = buf.DecodeBool() 376 return nil 377 } 378 379 // GpeEnableDisableReply defines message 'gpe_enable_disable_reply'. 380 type GpeEnableDisableReply struct { 381 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 382 } 383 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 389 } 390 391 func (m *GpeEnableDisableReply) Size() (size int) { 392 if m == nil { 393 return 0 394 } 395 size += 4 // m.Retval 396 return size 397 } 398 func (m *GpeEnableDisableReply) Marshal(b []byte) ([]byte, error) { 399 if b == nil { 400 b = make([]byte, m.Size()) 401 } 402 buf := codec.NewBuffer(b) 403 buf.EncodeInt32(m.Retval) 404 return buf.Bytes(), nil 405 } 406 func (m *GpeEnableDisableReply) Unmarshal(b []byte) error { 407 buf := codec.NewBuffer(b) 408 m.Retval = buf.DecodeInt32() 409 return nil 410 } 411 412 // GpeFwdEntriesGet defines message 'gpe_fwd_entries_get'. 413 type GpeFwdEntriesGet struct { 414 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"` 415 } 416 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 422 } 423 424 func (m *GpeFwdEntriesGet) Size() (size int) { 425 if m == nil { 426 return 0 427 } 428 size += 4 // m.Vni 429 return size 430 } 431 func (m *GpeFwdEntriesGet) Marshal(b []byte) ([]byte, error) { 432 if b == nil { 433 b = make([]byte, m.Size()) 434 } 435 buf := codec.NewBuffer(b) 436 buf.EncodeUint32(m.Vni) 437 return buf.Bytes(), nil 438 } 439 func (m *GpeFwdEntriesGet) Unmarshal(b []byte) error { 440 buf := codec.NewBuffer(b) 441 m.Vni = buf.DecodeUint32() 442 return nil 443 } 444 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"` 450 } 451 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 457 } 458 459 func (m *GpeFwdEntriesGetReply) Size() (size int) { 460 if m == nil { 461 return 0 462 } 463 size += 4 // m.Retval 464 size += 4 // m.Count 465 for j1 := 0; j1 < len(m.Entries); j1++ { 466 var s1 GpeFwdEntry 467 _ = s1 468 if j1 < len(m.Entries) { 469 s1 = m.Entries[j1] 470 } 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 477 size += 4 // s1.Vni 478 size += 1 // s1.Action 479 } 480 return size 481 } 482 func (m *GpeFwdEntriesGetReply) Marshal(b []byte) ([]byte, error) { 483 if b == nil { 484 b = make([]byte, m.Size()) 485 } 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) { 492 v0 = m.Entries[j0] 493 } 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) 502 } 503 return buf.Bytes(), nil 504 } 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() 519 } 520 return nil 521 } 522 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"` 527 } 528 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 534 } 535 536 func (m *GpeFwdEntryPathDetails) Size() (size int) { 537 if m == nil { 538 return 0 539 } 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 546 return size 547 } 548 func (m *GpeFwdEntryPathDetails) Marshal(b []byte) ([]byte, error) { 549 if b == nil { 550 b = make([]byte, m.Size()) 551 } 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 560 } 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)) 569 return nil 570 } 571 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"` 575 } 576 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 582 } 583 584 func (m *GpeFwdEntryPathDump) Size() (size int) { 585 if m == nil { 586 return 0 587 } 588 size += 4 // m.FwdEntryIndex 589 return size 590 } 591 func (m *GpeFwdEntryPathDump) Marshal(b []byte) ([]byte, error) { 592 if b == nil { 593 b = make([]byte, m.Size()) 594 } 595 buf := codec.NewBuffer(b) 596 buf.EncodeUint32(m.FwdEntryIndex) 597 return buf.Bytes(), nil 598 } 599 func (m *GpeFwdEntryPathDump) Unmarshal(b []byte) error { 600 buf := codec.NewBuffer(b) 601 m.FwdEntryIndex = buf.DecodeUint32() 602 return nil 603 } 604 605 // GpeFwdEntryVnisGet defines message 'gpe_fwd_entry_vnis_get'. 606 type GpeFwdEntryVnisGet struct{} 607 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 613 } 614 615 func (m *GpeFwdEntryVnisGet) Size() (size int) { 616 if m == nil { 617 return 0 618 } 619 return size 620 } 621 func (m *GpeFwdEntryVnisGet) Marshal(b []byte) ([]byte, error) { 622 if b == nil { 623 b = make([]byte, m.Size()) 624 } 625 buf := codec.NewBuffer(b) 626 return buf.Bytes(), nil 627 } 628 func (m *GpeFwdEntryVnisGet) Unmarshal(b []byte) error { 629 return nil 630 } 631 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"` 637 } 638 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 644 } 645 646 func (m *GpeFwdEntryVnisGetReply) Size() (size int) { 647 if m == nil { 648 return 0 649 } 650 size += 4 // m.Retval 651 size += 4 // m.Count 652 size += 4 * len(m.Vnis) // m.Vnis 653 return size 654 } 655 func (m *GpeFwdEntryVnisGetReply) Marshal(b []byte) ([]byte, error) { 656 if b == nil { 657 b = make([]byte, m.Size()) 658 } 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++ { 663 var x uint32 664 if i < len(m.Vnis) { 665 x = uint32(m.Vnis[i]) 666 } 667 buf.EncodeUint32(x) 668 } 669 return buf.Bytes(), nil 670 } 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() 678 } 679 return nil 680 } 681 682 // GpeGetEncapMode defines message 'gpe_get_encap_mode'. 683 type GpeGetEncapMode struct{} 684 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 690 } 691 692 func (m *GpeGetEncapMode) Size() (size int) { 693 if m == nil { 694 return 0 695 } 696 return size 697 } 698 func (m *GpeGetEncapMode) Marshal(b []byte) ([]byte, error) { 699 if b == nil { 700 b = make([]byte, m.Size()) 701 } 702 buf := codec.NewBuffer(b) 703 return buf.Bytes(), nil 704 } 705 func (m *GpeGetEncapMode) Unmarshal(b []byte) error { 706 return nil 707 } 708 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"` 713 } 714 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 720 } 721 722 func (m *GpeGetEncapModeReply) Size() (size int) { 723 if m == nil { 724 return 0 725 } 726 size += 4 // m.Retval 727 size += 1 // m.EncapMode 728 return size 729 } 730 func (m *GpeGetEncapModeReply) Marshal(b []byte) ([]byte, error) { 731 if b == nil { 732 b = make([]byte, m.Size()) 733 } 734 buf := codec.NewBuffer(b) 735 buf.EncodeInt32(m.Retval) 736 buf.EncodeUint8(m.EncapMode) 737 return buf.Bytes(), nil 738 } 739 func (m *GpeGetEncapModeReply) Unmarshal(b []byte) error { 740 buf := codec.NewBuffer(b) 741 m.Retval = buf.DecodeInt32() 742 m.EncapMode = buf.DecodeUint8() 743 return nil 744 } 745 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"` 749 } 750 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 756 } 757 758 func (m *GpeNativeFwdRpathsGet) Size() (size int) { 759 if m == nil { 760 return 0 761 } 762 size += 1 // m.IsIP4 763 return size 764 } 765 func (m *GpeNativeFwdRpathsGet) Marshal(b []byte) ([]byte, error) { 766 if b == nil { 767 b = make([]byte, m.Size()) 768 } 769 buf := codec.NewBuffer(b) 770 buf.EncodeBool(m.IsIP4) 771 return buf.Bytes(), nil 772 } 773 func (m *GpeNativeFwdRpathsGet) Unmarshal(b []byte) error { 774 buf := codec.NewBuffer(b) 775 m.IsIP4 = buf.DecodeBool() 776 return nil 777 } 778 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"` 784 } 785 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 791 } 792 793 func (m *GpeNativeFwdRpathsGetReply) Size() (size int) { 794 if m == nil { 795 return 0 796 } 797 size += 4 // m.Retval 798 size += 4 // m.Count 799 for j1 := 0; j1 < len(m.Entries); j1++ { 800 var s1 GpeNativeFwdRpath 801 _ = s1 802 if j1 < len(m.Entries) { 803 s1 = m.Entries[j1] 804 } 805 size += 4 // s1.FibIndex 806 size += 4 // s1.NhSwIfIndex 807 size += 1 // s1.NhAddr.Af 808 size += 1 * 16 // s1.NhAddr.Un 809 } 810 return size 811 } 812 func (m *GpeNativeFwdRpathsGetReply) Marshal(b []byte) ([]byte, error) { 813 if b == nil { 814 b = make([]byte, m.Size()) 815 } 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) { 822 v0 = m.Entries[j0] 823 } 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) 828 } 829 return buf.Bytes(), nil 830 } 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)) 841 } 842 return nil 843 } 844 845 // GpeSetEncapMode defines message 'gpe_set_encap_mode'. 846 type GpeSetEncapMode struct { 847 IsVxlan bool `binapi:"bool,name=is_vxlan" json:"is_vxlan,omitempty"` 848 } 849 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 855 } 856 857 func (m *GpeSetEncapMode) Size() (size int) { 858 if m == nil { 859 return 0 860 } 861 size += 1 // m.IsVxlan 862 return size 863 } 864 func (m *GpeSetEncapMode) Marshal(b []byte) ([]byte, error) { 865 if b == nil { 866 b = make([]byte, m.Size()) 867 } 868 buf := codec.NewBuffer(b) 869 buf.EncodeBool(m.IsVxlan) 870 return buf.Bytes(), nil 871 } 872 func (m *GpeSetEncapMode) Unmarshal(b []byte) error { 873 buf := codec.NewBuffer(b) 874 m.IsVxlan = buf.DecodeBool() 875 return nil 876 } 877 878 // GpeSetEncapModeReply defines message 'gpe_set_encap_mode_reply'. 879 type GpeSetEncapModeReply struct { 880 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 881 } 882 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 888 } 889 890 func (m *GpeSetEncapModeReply) Size() (size int) { 891 if m == nil { 892 return 0 893 } 894 size += 4 // m.Retval 895 return size 896 } 897 func (m *GpeSetEncapModeReply) Marshal(b []byte) ([]byte, error) { 898 if b == nil { 899 b = make([]byte, m.Size()) 900 } 901 buf := codec.NewBuffer(b) 902 buf.EncodeInt32(m.Retval) 903 return buf.Bytes(), nil 904 } 905 func (m *GpeSetEncapModeReply) Unmarshal(b []byte) error { 906 buf := codec.NewBuffer(b) 907 m.Retval = buf.DecodeInt32() 908 return nil 909 } 910 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") 933 } 934 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), 958 } 959 }