go.ligato.io/vpp-agent/v3@v3.5.0/plugins/vpp/binapi/vpp2210/memclnt/memclnt.ba.go (about) 1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT. 2 3 // Package memclnt contains generated bindings for API file memclnt.api. 4 // 5 // Contents: 6 // - 2 structs 7 // - 26 messages 8 package memclnt 9 10 import ( 11 api "go.fd.io/govpp/api" 12 codec "go.fd.io/govpp/codec" 13 ) 14 15 // This is a compile-time assertion to ensure that this generated file 16 // is compatible with the GoVPP api package it is being compiled against. 17 // A compilation error at this line likely means your copy of the 18 // GoVPP api package needs to be updated. 19 const _ = api.GoVppAPIPackageIsVersion2 20 21 const ( 22 APIFile = "memclnt" 23 APIVersion = "2.1.0" 24 VersionCrc = 0x21d36234 25 ) 26 27 // MessageTableEntry defines type 'message_table_entry'. 28 type MessageTableEntry struct { 29 Index uint16 `binapi:"u16,name=index" json:"index,omitempty"` 30 Name string `binapi:"string[64],name=name" json:"name,omitempty"` 31 } 32 33 // ModuleVersion defines type 'module_version'. 34 type ModuleVersion struct { 35 Major uint32 `binapi:"u32,name=major" json:"major,omitempty"` 36 Minor uint32 `binapi:"u32,name=minor" json:"minor,omitempty"` 37 Patch uint32 `binapi:"u32,name=patch" json:"patch,omitempty"` 38 Name string `binapi:"string[64],name=name" json:"name,omitempty"` 39 } 40 41 // APIVersions defines message 'api_versions'. 42 type APIVersions struct{} 43 44 func (m *APIVersions) Reset() { *m = APIVersions{} } 45 func (*APIVersions) GetMessageName() string { return "api_versions" } 46 func (*APIVersions) GetCrcString() string { return "51077d14" } 47 func (*APIVersions) GetMessageType() api.MessageType { 48 return api.RequestMessage 49 } 50 51 func (m *APIVersions) Size() (size int) { 52 if m == nil { 53 return 0 54 } 55 return size 56 } 57 func (m *APIVersions) Marshal(b []byte) ([]byte, error) { 58 if b == nil { 59 b = make([]byte, m.Size()) 60 } 61 buf := codec.NewBuffer(b) 62 return buf.Bytes(), nil 63 } 64 func (m *APIVersions) Unmarshal(b []byte) error { 65 return nil 66 } 67 68 // APIVersionsReply defines message 'api_versions_reply'. 69 type APIVersionsReply struct { 70 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 71 Count uint32 `binapi:"u32,name=count" json:"-"` 72 APIVersions []ModuleVersion `binapi:"module_version[count],name=api_versions" json:"api_versions,omitempty"` 73 } 74 75 func (m *APIVersionsReply) Reset() { *m = APIVersionsReply{} } 76 func (*APIVersionsReply) GetMessageName() string { return "api_versions_reply" } 77 func (*APIVersionsReply) GetCrcString() string { return "5f0d99d6" } 78 func (*APIVersionsReply) GetMessageType() api.MessageType { 79 return api.ReplyMessage 80 } 81 82 func (m *APIVersionsReply) Size() (size int) { 83 if m == nil { 84 return 0 85 } 86 size += 4 // m.Retval 87 size += 4 // m.Count 88 for j1 := 0; j1 < len(m.APIVersions); j1++ { 89 var s1 ModuleVersion 90 _ = s1 91 if j1 < len(m.APIVersions) { 92 s1 = m.APIVersions[j1] 93 } 94 size += 4 // s1.Major 95 size += 4 // s1.Minor 96 size += 4 // s1.Patch 97 size += 64 // s1.Name 98 } 99 return size 100 } 101 func (m *APIVersionsReply) Marshal(b []byte) ([]byte, error) { 102 if b == nil { 103 b = make([]byte, m.Size()) 104 } 105 buf := codec.NewBuffer(b) 106 buf.EncodeInt32(m.Retval) 107 buf.EncodeUint32(uint32(len(m.APIVersions))) 108 for j0 := 0; j0 < len(m.APIVersions); j0++ { 109 var v0 ModuleVersion // APIVersions 110 if j0 < len(m.APIVersions) { 111 v0 = m.APIVersions[j0] 112 } 113 buf.EncodeUint32(v0.Major) 114 buf.EncodeUint32(v0.Minor) 115 buf.EncodeUint32(v0.Patch) 116 buf.EncodeString(v0.Name, 64) 117 } 118 return buf.Bytes(), nil 119 } 120 func (m *APIVersionsReply) Unmarshal(b []byte) error { 121 buf := codec.NewBuffer(b) 122 m.Retval = buf.DecodeInt32() 123 m.Count = buf.DecodeUint32() 124 m.APIVersions = make([]ModuleVersion, m.Count) 125 for j0 := 0; j0 < len(m.APIVersions); j0++ { 126 m.APIVersions[j0].Major = buf.DecodeUint32() 127 m.APIVersions[j0].Minor = buf.DecodeUint32() 128 m.APIVersions[j0].Patch = buf.DecodeUint32() 129 m.APIVersions[j0].Name = buf.DecodeString(64) 130 } 131 return nil 132 } 133 134 // ControlPing defines message 'control_ping'. 135 type ControlPing struct{} 136 137 func (m *ControlPing) Reset() { *m = ControlPing{} } 138 func (*ControlPing) GetMessageName() string { return "control_ping" } 139 func (*ControlPing) GetCrcString() string { return "51077d14" } 140 func (*ControlPing) GetMessageType() api.MessageType { 141 return api.RequestMessage 142 } 143 144 func (m *ControlPing) Size() (size int) { 145 if m == nil { 146 return 0 147 } 148 return size 149 } 150 func (m *ControlPing) Marshal(b []byte) ([]byte, error) { 151 if b == nil { 152 b = make([]byte, m.Size()) 153 } 154 buf := codec.NewBuffer(b) 155 return buf.Bytes(), nil 156 } 157 func (m *ControlPing) Unmarshal(b []byte) error { 158 return nil 159 } 160 161 // ControlPingReply defines message 'control_ping_reply'. 162 type ControlPingReply struct { 163 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 164 ClientIndex uint32 `binapi:"u32,name=client_index" json:"client_index,omitempty"` 165 VpePID uint32 `binapi:"u32,name=vpe_pid" json:"vpe_pid,omitempty"` 166 } 167 168 func (m *ControlPingReply) Reset() { *m = ControlPingReply{} } 169 func (*ControlPingReply) GetMessageName() string { return "control_ping_reply" } 170 func (*ControlPingReply) GetCrcString() string { return "f6b0b8ca" } 171 func (*ControlPingReply) GetMessageType() api.MessageType { 172 return api.ReplyMessage 173 } 174 175 func (m *ControlPingReply) Size() (size int) { 176 if m == nil { 177 return 0 178 } 179 size += 4 // m.Retval 180 size += 4 // m.ClientIndex 181 size += 4 // m.VpePID 182 return size 183 } 184 func (m *ControlPingReply) Marshal(b []byte) ([]byte, error) { 185 if b == nil { 186 b = make([]byte, m.Size()) 187 } 188 buf := codec.NewBuffer(b) 189 buf.EncodeInt32(m.Retval) 190 buf.EncodeUint32(m.ClientIndex) 191 buf.EncodeUint32(m.VpePID) 192 return buf.Bytes(), nil 193 } 194 func (m *ControlPingReply) Unmarshal(b []byte) error { 195 buf := codec.NewBuffer(b) 196 m.Retval = buf.DecodeInt32() 197 m.ClientIndex = buf.DecodeUint32() 198 m.VpePID = buf.DecodeUint32() 199 return nil 200 } 201 202 // GetFirstMsgID defines message 'get_first_msg_id'. 203 type GetFirstMsgID struct { 204 Name string `binapi:"string[64],name=name" json:"name,omitempty"` 205 } 206 207 func (m *GetFirstMsgID) Reset() { *m = GetFirstMsgID{} } 208 func (*GetFirstMsgID) GetMessageName() string { return "get_first_msg_id" } 209 func (*GetFirstMsgID) GetCrcString() string { return "ebf79a66" } 210 func (*GetFirstMsgID) GetMessageType() api.MessageType { 211 return api.RequestMessage 212 } 213 214 func (m *GetFirstMsgID) Size() (size int) { 215 if m == nil { 216 return 0 217 } 218 size += 64 // m.Name 219 return size 220 } 221 func (m *GetFirstMsgID) Marshal(b []byte) ([]byte, error) { 222 if b == nil { 223 b = make([]byte, m.Size()) 224 } 225 buf := codec.NewBuffer(b) 226 buf.EncodeString(m.Name, 64) 227 return buf.Bytes(), nil 228 } 229 func (m *GetFirstMsgID) Unmarshal(b []byte) error { 230 buf := codec.NewBuffer(b) 231 m.Name = buf.DecodeString(64) 232 return nil 233 } 234 235 // GetFirstMsgIDReply defines message 'get_first_msg_id_reply'. 236 type GetFirstMsgIDReply struct { 237 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 238 FirstMsgID uint16 `binapi:"u16,name=first_msg_id" json:"first_msg_id,omitempty"` 239 } 240 241 func (m *GetFirstMsgIDReply) Reset() { *m = GetFirstMsgIDReply{} } 242 func (*GetFirstMsgIDReply) GetMessageName() string { return "get_first_msg_id_reply" } 243 func (*GetFirstMsgIDReply) GetCrcString() string { return "7d337472" } 244 func (*GetFirstMsgIDReply) GetMessageType() api.MessageType { 245 return api.ReplyMessage 246 } 247 248 func (m *GetFirstMsgIDReply) Size() (size int) { 249 if m == nil { 250 return 0 251 } 252 size += 4 // m.Retval 253 size += 2 // m.FirstMsgID 254 return size 255 } 256 func (m *GetFirstMsgIDReply) Marshal(b []byte) ([]byte, error) { 257 if b == nil { 258 b = make([]byte, m.Size()) 259 } 260 buf := codec.NewBuffer(b) 261 buf.EncodeInt32(m.Retval) 262 buf.EncodeUint16(m.FirstMsgID) 263 return buf.Bytes(), nil 264 } 265 func (m *GetFirstMsgIDReply) Unmarshal(b []byte) error { 266 buf := codec.NewBuffer(b) 267 m.Retval = buf.DecodeInt32() 268 m.FirstMsgID = buf.DecodeUint16() 269 return nil 270 } 271 272 // MemclntCreate defines message 'memclnt_create'. 273 type MemclntCreate struct { 274 CtxQuota int32 `binapi:"i32,name=ctx_quota" json:"ctx_quota,omitempty"` 275 InputQueue uint64 `binapi:"u64,name=input_queue" json:"input_queue,omitempty"` 276 Name string `binapi:"string[64],name=name" json:"name,omitempty"` 277 APIVersions []uint32 `binapi:"u32[8],name=api_versions" json:"api_versions,omitempty"` 278 } 279 280 func (m *MemclntCreate) Reset() { *m = MemclntCreate{} } 281 func (*MemclntCreate) GetMessageName() string { return "memclnt_create" } 282 func (*MemclntCreate) GetCrcString() string { return "9c5e1c2f" } 283 func (*MemclntCreate) GetMessageType() api.MessageType { 284 return api.ReplyMessage 285 } 286 287 func (m *MemclntCreate) Size() (size int) { 288 if m == nil { 289 return 0 290 } 291 size += 4 // m.CtxQuota 292 size += 8 // m.InputQueue 293 size += 64 // m.Name 294 size += 4 * 8 // m.APIVersions 295 return size 296 } 297 func (m *MemclntCreate) Marshal(b []byte) ([]byte, error) { 298 if b == nil { 299 b = make([]byte, m.Size()) 300 } 301 buf := codec.NewBuffer(b) 302 buf.EncodeInt32(m.CtxQuota) 303 buf.EncodeUint64(m.InputQueue) 304 buf.EncodeString(m.Name, 64) 305 for i := 0; i < 8; i++ { 306 var x uint32 307 if i < len(m.APIVersions) { 308 x = uint32(m.APIVersions[i]) 309 } 310 buf.EncodeUint32(x) 311 } 312 return buf.Bytes(), nil 313 } 314 func (m *MemclntCreate) Unmarshal(b []byte) error { 315 buf := codec.NewBuffer(b) 316 m.CtxQuota = buf.DecodeInt32() 317 m.InputQueue = buf.DecodeUint64() 318 m.Name = buf.DecodeString(64) 319 m.APIVersions = make([]uint32, 8) 320 for i := 0; i < len(m.APIVersions); i++ { 321 m.APIVersions[i] = buf.DecodeUint32() 322 } 323 return nil 324 } 325 326 // MemclntCreateReply defines message 'memclnt_create_reply'. 327 type MemclntCreateReply struct { 328 Response int32 `binapi:"i32,name=response" json:"response,omitempty"` 329 Handle uint64 `binapi:"u64,name=handle" json:"handle,omitempty"` 330 Index uint32 `binapi:"u32,name=index" json:"index,omitempty"` 331 MessageTable uint64 `binapi:"u64,name=message_table" json:"message_table,omitempty"` 332 } 333 334 func (m *MemclntCreateReply) Reset() { *m = MemclntCreateReply{} } 335 func (*MemclntCreateReply) GetMessageName() string { return "memclnt_create_reply" } 336 func (*MemclntCreateReply) GetCrcString() string { return "42ec4560" } 337 func (*MemclntCreateReply) GetMessageType() api.MessageType { 338 return api.ReplyMessage 339 } 340 341 func (m *MemclntCreateReply) Size() (size int) { 342 if m == nil { 343 return 0 344 } 345 size += 4 // m.Response 346 size += 8 // m.Handle 347 size += 4 // m.Index 348 size += 8 // m.MessageTable 349 return size 350 } 351 func (m *MemclntCreateReply) Marshal(b []byte) ([]byte, error) { 352 if b == nil { 353 b = make([]byte, m.Size()) 354 } 355 buf := codec.NewBuffer(b) 356 buf.EncodeInt32(m.Response) 357 buf.EncodeUint64(m.Handle) 358 buf.EncodeUint32(m.Index) 359 buf.EncodeUint64(m.MessageTable) 360 return buf.Bytes(), nil 361 } 362 func (m *MemclntCreateReply) Unmarshal(b []byte) error { 363 buf := codec.NewBuffer(b) 364 m.Response = buf.DecodeInt32() 365 m.Handle = buf.DecodeUint64() 366 m.Index = buf.DecodeUint32() 367 m.MessageTable = buf.DecodeUint64() 368 return nil 369 } 370 371 // MemclntCreateV2 defines message 'memclnt_create_v2'. 372 type MemclntCreateV2 struct { 373 CtxQuota int32 `binapi:"i32,name=ctx_quota" json:"ctx_quota,omitempty"` 374 InputQueue uint64 `binapi:"u64,name=input_queue" json:"input_queue,omitempty"` 375 Name string `binapi:"string[64],name=name" json:"name,omitempty"` 376 APIVersions []uint32 `binapi:"u32[8],name=api_versions" json:"api_versions,omitempty"` 377 Keepalive bool `binapi:"bool,name=keepalive,default=true" json:"keepalive,omitempty"` 378 } 379 380 func (m *MemclntCreateV2) Reset() { *m = MemclntCreateV2{} } 381 func (*MemclntCreateV2) GetMessageName() string { return "memclnt_create_v2" } 382 func (*MemclntCreateV2) GetCrcString() string { return "c4bd4882" } 383 func (*MemclntCreateV2) GetMessageType() api.MessageType { 384 return api.ReplyMessage 385 } 386 387 func (m *MemclntCreateV2) Size() (size int) { 388 if m == nil { 389 return 0 390 } 391 size += 4 // m.CtxQuota 392 size += 8 // m.InputQueue 393 size += 64 // m.Name 394 size += 4 * 8 // m.APIVersions 395 size += 1 // m.Keepalive 396 return size 397 } 398 func (m *MemclntCreateV2) 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.CtxQuota) 404 buf.EncodeUint64(m.InputQueue) 405 buf.EncodeString(m.Name, 64) 406 for i := 0; i < 8; i++ { 407 var x uint32 408 if i < len(m.APIVersions) { 409 x = uint32(m.APIVersions[i]) 410 } 411 buf.EncodeUint32(x) 412 } 413 buf.EncodeBool(m.Keepalive) 414 return buf.Bytes(), nil 415 } 416 func (m *MemclntCreateV2) Unmarshal(b []byte) error { 417 buf := codec.NewBuffer(b) 418 m.CtxQuota = buf.DecodeInt32() 419 m.InputQueue = buf.DecodeUint64() 420 m.Name = buf.DecodeString(64) 421 m.APIVersions = make([]uint32, 8) 422 for i := 0; i < len(m.APIVersions); i++ { 423 m.APIVersions[i] = buf.DecodeUint32() 424 } 425 m.Keepalive = buf.DecodeBool() 426 return nil 427 } 428 429 // MemclntCreateV2Reply defines message 'memclnt_create_v2_reply'. 430 type MemclntCreateV2Reply struct { 431 Response int32 `binapi:"i32,name=response" json:"response,omitempty"` 432 Handle uint64 `binapi:"u64,name=handle" json:"handle,omitempty"` 433 Index uint32 `binapi:"u32,name=index" json:"index,omitempty"` 434 MessageTable uint64 `binapi:"u64,name=message_table" json:"message_table,omitempty"` 435 } 436 437 func (m *MemclntCreateV2Reply) Reset() { *m = MemclntCreateV2Reply{} } 438 func (*MemclntCreateV2Reply) GetMessageName() string { return "memclnt_create_v2_reply" } 439 func (*MemclntCreateV2Reply) GetCrcString() string { return "42ec4560" } 440 func (*MemclntCreateV2Reply) GetMessageType() api.MessageType { 441 return api.ReplyMessage 442 } 443 444 func (m *MemclntCreateV2Reply) Size() (size int) { 445 if m == nil { 446 return 0 447 } 448 size += 4 // m.Response 449 size += 8 // m.Handle 450 size += 4 // m.Index 451 size += 8 // m.MessageTable 452 return size 453 } 454 func (m *MemclntCreateV2Reply) Marshal(b []byte) ([]byte, error) { 455 if b == nil { 456 b = make([]byte, m.Size()) 457 } 458 buf := codec.NewBuffer(b) 459 buf.EncodeInt32(m.Response) 460 buf.EncodeUint64(m.Handle) 461 buf.EncodeUint32(m.Index) 462 buf.EncodeUint64(m.MessageTable) 463 return buf.Bytes(), nil 464 } 465 func (m *MemclntCreateV2Reply) Unmarshal(b []byte) error { 466 buf := codec.NewBuffer(b) 467 m.Response = buf.DecodeInt32() 468 m.Handle = buf.DecodeUint64() 469 m.Index = buf.DecodeUint32() 470 m.MessageTable = buf.DecodeUint64() 471 return nil 472 } 473 474 // MemclntDelete defines message 'memclnt_delete'. 475 type MemclntDelete struct { 476 Index uint32 `binapi:"u32,name=index" json:"index,omitempty"` 477 Handle uint64 `binapi:"u64,name=handle" json:"handle,omitempty"` 478 DoCleanup bool `binapi:"bool,name=do_cleanup" json:"do_cleanup,omitempty"` 479 } 480 481 func (m *MemclntDelete) Reset() { *m = MemclntDelete{} } 482 func (*MemclntDelete) GetMessageName() string { return "memclnt_delete" } 483 func (*MemclntDelete) GetCrcString() string { return "7e1c04e3" } 484 func (*MemclntDelete) GetMessageType() api.MessageType { 485 return api.OtherMessage 486 } 487 488 func (m *MemclntDelete) Size() (size int) { 489 if m == nil { 490 return 0 491 } 492 size += 4 // m.Index 493 size += 8 // m.Handle 494 size += 1 // m.DoCleanup 495 return size 496 } 497 func (m *MemclntDelete) Marshal(b []byte) ([]byte, error) { 498 if b == nil { 499 b = make([]byte, m.Size()) 500 } 501 buf := codec.NewBuffer(b) 502 buf.EncodeUint32(m.Index) 503 buf.EncodeUint64(m.Handle) 504 buf.EncodeBool(m.DoCleanup) 505 return buf.Bytes(), nil 506 } 507 func (m *MemclntDelete) Unmarshal(b []byte) error { 508 buf := codec.NewBuffer(b) 509 m.Index = buf.DecodeUint32() 510 m.Handle = buf.DecodeUint64() 511 m.DoCleanup = buf.DecodeBool() 512 return nil 513 } 514 515 // MemclntDeleteReply defines message 'memclnt_delete_reply'. 516 type MemclntDeleteReply struct { 517 Response int32 `binapi:"i32,name=response" json:"response,omitempty"` 518 Handle uint64 `binapi:"u64,name=handle" json:"handle,omitempty"` 519 } 520 521 func (m *MemclntDeleteReply) Reset() { *m = MemclntDeleteReply{} } 522 func (*MemclntDeleteReply) GetMessageName() string { return "memclnt_delete_reply" } 523 func (*MemclntDeleteReply) GetCrcString() string { return "3d3b6312" } 524 func (*MemclntDeleteReply) GetMessageType() api.MessageType { 525 return api.OtherMessage 526 } 527 528 func (m *MemclntDeleteReply) Size() (size int) { 529 if m == nil { 530 return 0 531 } 532 size += 4 // m.Response 533 size += 8 // m.Handle 534 return size 535 } 536 func (m *MemclntDeleteReply) Marshal(b []byte) ([]byte, error) { 537 if b == nil { 538 b = make([]byte, m.Size()) 539 } 540 buf := codec.NewBuffer(b) 541 buf.EncodeInt32(m.Response) 542 buf.EncodeUint64(m.Handle) 543 return buf.Bytes(), nil 544 } 545 func (m *MemclntDeleteReply) Unmarshal(b []byte) error { 546 buf := codec.NewBuffer(b) 547 m.Response = buf.DecodeInt32() 548 m.Handle = buf.DecodeUint64() 549 return nil 550 } 551 552 // MemclntKeepalive defines message 'memclnt_keepalive'. 553 type MemclntKeepalive struct{} 554 555 func (m *MemclntKeepalive) Reset() { *m = MemclntKeepalive{} } 556 func (*MemclntKeepalive) GetMessageName() string { return "memclnt_keepalive" } 557 func (*MemclntKeepalive) GetCrcString() string { return "51077d14" } 558 func (*MemclntKeepalive) GetMessageType() api.MessageType { 559 return api.RequestMessage 560 } 561 562 func (m *MemclntKeepalive) Size() (size int) { 563 if m == nil { 564 return 0 565 } 566 return size 567 } 568 func (m *MemclntKeepalive) Marshal(b []byte) ([]byte, error) { 569 if b == nil { 570 b = make([]byte, m.Size()) 571 } 572 buf := codec.NewBuffer(b) 573 return buf.Bytes(), nil 574 } 575 func (m *MemclntKeepalive) Unmarshal(b []byte) error { 576 return nil 577 } 578 579 // MemclntKeepaliveReply defines message 'memclnt_keepalive_reply'. 580 type MemclntKeepaliveReply struct { 581 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 582 } 583 584 func (m *MemclntKeepaliveReply) Reset() { *m = MemclntKeepaliveReply{} } 585 func (*MemclntKeepaliveReply) GetMessageName() string { return "memclnt_keepalive_reply" } 586 func (*MemclntKeepaliveReply) GetCrcString() string { return "e8d4e804" } 587 func (*MemclntKeepaliveReply) GetMessageType() api.MessageType { 588 return api.ReplyMessage 589 } 590 591 func (m *MemclntKeepaliveReply) Size() (size int) { 592 if m == nil { 593 return 0 594 } 595 size += 4 // m.Retval 596 return size 597 } 598 func (m *MemclntKeepaliveReply) Marshal(b []byte) ([]byte, error) { 599 if b == nil { 600 b = make([]byte, m.Size()) 601 } 602 buf := codec.NewBuffer(b) 603 buf.EncodeInt32(m.Retval) 604 return buf.Bytes(), nil 605 } 606 func (m *MemclntKeepaliveReply) Unmarshal(b []byte) error { 607 buf := codec.NewBuffer(b) 608 m.Retval = buf.DecodeInt32() 609 return nil 610 } 611 612 // MemclntReadTimeout defines message 'memclnt_read_timeout'. 613 type MemclntReadTimeout struct { 614 Dummy uint8 `binapi:"u8,name=dummy" json:"dummy,omitempty"` 615 } 616 617 func (m *MemclntReadTimeout) Reset() { *m = MemclntReadTimeout{} } 618 func (*MemclntReadTimeout) GetMessageName() string { return "memclnt_read_timeout" } 619 func (*MemclntReadTimeout) GetCrcString() string { return "c3a3a452" } 620 func (*MemclntReadTimeout) GetMessageType() api.MessageType { 621 return api.OtherMessage 622 } 623 624 func (m *MemclntReadTimeout) Size() (size int) { 625 if m == nil { 626 return 0 627 } 628 size += 1 // m.Dummy 629 return size 630 } 631 func (m *MemclntReadTimeout) Marshal(b []byte) ([]byte, error) { 632 if b == nil { 633 b = make([]byte, m.Size()) 634 } 635 buf := codec.NewBuffer(b) 636 buf.EncodeUint8(m.Dummy) 637 return buf.Bytes(), nil 638 } 639 func (m *MemclntReadTimeout) Unmarshal(b []byte) error { 640 buf := codec.NewBuffer(b) 641 m.Dummy = buf.DecodeUint8() 642 return nil 643 } 644 645 // MemclntRxThreadSuspend defines message 'memclnt_rx_thread_suspend'. 646 type MemclntRxThreadSuspend struct { 647 Dummy uint8 `binapi:"u8,name=dummy" json:"dummy,omitempty"` 648 } 649 650 func (m *MemclntRxThreadSuspend) Reset() { *m = MemclntRxThreadSuspend{} } 651 func (*MemclntRxThreadSuspend) GetMessageName() string { return "memclnt_rx_thread_suspend" } 652 func (*MemclntRxThreadSuspend) GetCrcString() string { return "c3a3a452" } 653 func (*MemclntRxThreadSuspend) GetMessageType() api.MessageType { 654 return api.OtherMessage 655 } 656 657 func (m *MemclntRxThreadSuspend) Size() (size int) { 658 if m == nil { 659 return 0 660 } 661 size += 1 // m.Dummy 662 return size 663 } 664 func (m *MemclntRxThreadSuspend) Marshal(b []byte) ([]byte, error) { 665 if b == nil { 666 b = make([]byte, m.Size()) 667 } 668 buf := codec.NewBuffer(b) 669 buf.EncodeUint8(m.Dummy) 670 return buf.Bytes(), nil 671 } 672 func (m *MemclntRxThreadSuspend) Unmarshal(b []byte) error { 673 buf := codec.NewBuffer(b) 674 m.Dummy = buf.DecodeUint8() 675 return nil 676 } 677 678 // RPCCall defines message 'rpc_call'. 679 type RPCCall struct { 680 Function uint64 `binapi:"u64,name=function" json:"function,omitempty"` 681 Multicast uint8 `binapi:"u8,name=multicast" json:"multicast,omitempty"` 682 NeedBarrierSync uint8 `binapi:"u8,name=need_barrier_sync" json:"need_barrier_sync,omitempty"` 683 SendReply uint8 `binapi:"u8,name=send_reply" json:"send_reply,omitempty"` 684 DataLen uint32 `binapi:"u32,name=data_len" json:"-"` 685 Data []byte `binapi:"u8[data_len],name=data" json:"data,omitempty"` 686 } 687 688 func (m *RPCCall) Reset() { *m = RPCCall{} } 689 func (*RPCCall) GetMessageName() string { return "rpc_call" } 690 func (*RPCCall) GetCrcString() string { return "7e8a2c95" } 691 func (*RPCCall) GetMessageType() api.MessageType { 692 return api.RequestMessage 693 } 694 695 func (m *RPCCall) Size() (size int) { 696 if m == nil { 697 return 0 698 } 699 size += 8 // m.Function 700 size += 1 // m.Multicast 701 size += 1 // m.NeedBarrierSync 702 size += 1 // m.SendReply 703 size += 4 // m.DataLen 704 size += 1 * len(m.Data) // m.Data 705 return size 706 } 707 func (m *RPCCall) Marshal(b []byte) ([]byte, error) { 708 if b == nil { 709 b = make([]byte, m.Size()) 710 } 711 buf := codec.NewBuffer(b) 712 buf.EncodeUint64(m.Function) 713 buf.EncodeUint8(m.Multicast) 714 buf.EncodeUint8(m.NeedBarrierSync) 715 buf.EncodeUint8(m.SendReply) 716 buf.EncodeUint32(uint32(len(m.Data))) 717 buf.EncodeBytes(m.Data, 0) 718 return buf.Bytes(), nil 719 } 720 func (m *RPCCall) Unmarshal(b []byte) error { 721 buf := codec.NewBuffer(b) 722 m.Function = buf.DecodeUint64() 723 m.Multicast = buf.DecodeUint8() 724 m.NeedBarrierSync = buf.DecodeUint8() 725 m.SendReply = buf.DecodeUint8() 726 m.DataLen = buf.DecodeUint32() 727 m.Data = make([]byte, m.DataLen) 728 copy(m.Data, buf.DecodeBytes(len(m.Data))) 729 return nil 730 } 731 732 // RPCCallReply defines message 'rpc_call_reply'. 733 type RPCCallReply struct { 734 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 735 } 736 737 func (m *RPCCallReply) Reset() { *m = RPCCallReply{} } 738 func (*RPCCallReply) GetMessageName() string { return "rpc_call_reply" } 739 func (*RPCCallReply) GetCrcString() string { return "e8d4e804" } 740 func (*RPCCallReply) GetMessageType() api.MessageType { 741 return api.ReplyMessage 742 } 743 744 func (m *RPCCallReply) Size() (size int) { 745 if m == nil { 746 return 0 747 } 748 size += 4 // m.Retval 749 return size 750 } 751 func (m *RPCCallReply) Marshal(b []byte) ([]byte, error) { 752 if b == nil { 753 b = make([]byte, m.Size()) 754 } 755 buf := codec.NewBuffer(b) 756 buf.EncodeInt32(m.Retval) 757 return buf.Bytes(), nil 758 } 759 func (m *RPCCallReply) Unmarshal(b []byte) error { 760 buf := codec.NewBuffer(b) 761 m.Retval = buf.DecodeInt32() 762 return nil 763 } 764 765 // RxThreadExit defines message 'rx_thread_exit'. 766 type RxThreadExit struct { 767 Dummy uint8 `binapi:"u8,name=dummy" json:"dummy,omitempty"` 768 } 769 770 func (m *RxThreadExit) Reset() { *m = RxThreadExit{} } 771 func (*RxThreadExit) GetMessageName() string { return "rx_thread_exit" } 772 func (*RxThreadExit) GetCrcString() string { return "c3a3a452" } 773 func (*RxThreadExit) GetMessageType() api.MessageType { 774 return api.OtherMessage 775 } 776 777 func (m *RxThreadExit) Size() (size int) { 778 if m == nil { 779 return 0 780 } 781 size += 1 // m.Dummy 782 return size 783 } 784 func (m *RxThreadExit) Marshal(b []byte) ([]byte, error) { 785 if b == nil { 786 b = make([]byte, m.Size()) 787 } 788 buf := codec.NewBuffer(b) 789 buf.EncodeUint8(m.Dummy) 790 return buf.Bytes(), nil 791 } 792 func (m *RxThreadExit) Unmarshal(b []byte) error { 793 buf := codec.NewBuffer(b) 794 m.Dummy = buf.DecodeUint8() 795 return nil 796 } 797 798 // SockInitShm defines message 'sock_init_shm'. 799 type SockInitShm struct { 800 RequestedSize uint32 `binapi:"u32,name=requested_size" json:"requested_size,omitempty"` 801 Nitems uint8 `binapi:"u8,name=nitems" json:"-"` 802 Configs []uint64 `binapi:"u64[nitems],name=configs" json:"configs,omitempty"` 803 } 804 805 func (m *SockInitShm) Reset() { *m = SockInitShm{} } 806 func (*SockInitShm) GetMessageName() string { return "sock_init_shm" } 807 func (*SockInitShm) GetCrcString() string { return "51646d92" } 808 func (*SockInitShm) GetMessageType() api.MessageType { 809 return api.RequestMessage 810 } 811 812 func (m *SockInitShm) Size() (size int) { 813 if m == nil { 814 return 0 815 } 816 size += 4 // m.RequestedSize 817 size += 1 // m.Nitems 818 size += 8 * len(m.Configs) // m.Configs 819 return size 820 } 821 func (m *SockInitShm) Marshal(b []byte) ([]byte, error) { 822 if b == nil { 823 b = make([]byte, m.Size()) 824 } 825 buf := codec.NewBuffer(b) 826 buf.EncodeUint32(m.RequestedSize) 827 buf.EncodeUint8(uint8(len(m.Configs))) 828 for i := 0; i < len(m.Configs); i++ { 829 var x uint64 830 if i < len(m.Configs) { 831 x = uint64(m.Configs[i]) 832 } 833 buf.EncodeUint64(x) 834 } 835 return buf.Bytes(), nil 836 } 837 func (m *SockInitShm) Unmarshal(b []byte) error { 838 buf := codec.NewBuffer(b) 839 m.RequestedSize = buf.DecodeUint32() 840 m.Nitems = buf.DecodeUint8() 841 m.Configs = make([]uint64, m.Nitems) 842 for i := 0; i < len(m.Configs); i++ { 843 m.Configs[i] = buf.DecodeUint64() 844 } 845 return nil 846 } 847 848 // SockInitShmReply defines message 'sock_init_shm_reply'. 849 type SockInitShmReply struct { 850 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 851 } 852 853 func (m *SockInitShmReply) Reset() { *m = SockInitShmReply{} } 854 func (*SockInitShmReply) GetMessageName() string { return "sock_init_shm_reply" } 855 func (*SockInitShmReply) GetCrcString() string { return "e8d4e804" } 856 func (*SockInitShmReply) GetMessageType() api.MessageType { 857 return api.ReplyMessage 858 } 859 860 func (m *SockInitShmReply) Size() (size int) { 861 if m == nil { 862 return 0 863 } 864 size += 4 // m.Retval 865 return size 866 } 867 func (m *SockInitShmReply) Marshal(b []byte) ([]byte, error) { 868 if b == nil { 869 b = make([]byte, m.Size()) 870 } 871 buf := codec.NewBuffer(b) 872 buf.EncodeInt32(m.Retval) 873 return buf.Bytes(), nil 874 } 875 func (m *SockInitShmReply) Unmarshal(b []byte) error { 876 buf := codec.NewBuffer(b) 877 m.Retval = buf.DecodeInt32() 878 return nil 879 } 880 881 // SockclntCreate defines message 'sockclnt_create'. 882 type SockclntCreate struct { 883 Name string `binapi:"string[64],name=name" json:"name,omitempty"` 884 } 885 886 func (m *SockclntCreate) Reset() { *m = SockclntCreate{} } 887 func (*SockclntCreate) GetMessageName() string { return "sockclnt_create" } 888 func (*SockclntCreate) GetCrcString() string { return "455fb9c4" } 889 func (*SockclntCreate) GetMessageType() api.MessageType { 890 return api.ReplyMessage 891 } 892 893 func (m *SockclntCreate) Size() (size int) { 894 if m == nil { 895 return 0 896 } 897 size += 64 // m.Name 898 return size 899 } 900 func (m *SockclntCreate) Marshal(b []byte) ([]byte, error) { 901 if b == nil { 902 b = make([]byte, m.Size()) 903 } 904 buf := codec.NewBuffer(b) 905 buf.EncodeString(m.Name, 64) 906 return buf.Bytes(), nil 907 } 908 func (m *SockclntCreate) Unmarshal(b []byte) error { 909 buf := codec.NewBuffer(b) 910 m.Name = buf.DecodeString(64) 911 return nil 912 } 913 914 // SockclntCreateReply defines message 'sockclnt_create_reply'. 915 type SockclntCreateReply struct { 916 Response int32 `binapi:"i32,name=response" json:"response,omitempty"` 917 Index uint32 `binapi:"u32,name=index" json:"index,omitempty"` 918 Count uint16 `binapi:"u16,name=count" json:"-"` 919 MessageTable []MessageTableEntry `binapi:"message_table_entry[count],name=message_table" json:"message_table,omitempty"` 920 } 921 922 func (m *SockclntCreateReply) Reset() { *m = SockclntCreateReply{} } 923 func (*SockclntCreateReply) GetMessageName() string { return "sockclnt_create_reply" } 924 func (*SockclntCreateReply) GetCrcString() string { return "35166268" } 925 func (*SockclntCreateReply) GetMessageType() api.MessageType { 926 return api.RequestMessage 927 } 928 929 func (m *SockclntCreateReply) Size() (size int) { 930 if m == nil { 931 return 0 932 } 933 size += 4 // m.Response 934 size += 4 // m.Index 935 size += 2 // m.Count 936 for j1 := 0; j1 < len(m.MessageTable); j1++ { 937 var s1 MessageTableEntry 938 _ = s1 939 if j1 < len(m.MessageTable) { 940 s1 = m.MessageTable[j1] 941 } 942 size += 2 // s1.Index 943 size += 64 // s1.Name 944 } 945 return size 946 } 947 func (m *SockclntCreateReply) Marshal(b []byte) ([]byte, error) { 948 if b == nil { 949 b = make([]byte, m.Size()) 950 } 951 buf := codec.NewBuffer(b) 952 buf.EncodeInt32(m.Response) 953 buf.EncodeUint32(m.Index) 954 buf.EncodeUint16(uint16(len(m.MessageTable))) 955 for j0 := 0; j0 < len(m.MessageTable); j0++ { 956 var v0 MessageTableEntry // MessageTable 957 if j0 < len(m.MessageTable) { 958 v0 = m.MessageTable[j0] 959 } 960 buf.EncodeUint16(v0.Index) 961 buf.EncodeString(v0.Name, 64) 962 } 963 return buf.Bytes(), nil 964 } 965 func (m *SockclntCreateReply) Unmarshal(b []byte) error { 966 buf := codec.NewBuffer(b) 967 m.Response = buf.DecodeInt32() 968 m.Index = buf.DecodeUint32() 969 m.Count = buf.DecodeUint16() 970 m.MessageTable = make([]MessageTableEntry, m.Count) 971 for j0 := 0; j0 < len(m.MessageTable); j0++ { 972 m.MessageTable[j0].Index = buf.DecodeUint16() 973 m.MessageTable[j0].Name = buf.DecodeString(64) 974 } 975 return nil 976 } 977 978 // SockclntDelete defines message 'sockclnt_delete'. 979 type SockclntDelete struct { 980 Index uint32 `binapi:"u32,name=index" json:"index,omitempty"` 981 } 982 983 func (m *SockclntDelete) Reset() { *m = SockclntDelete{} } 984 func (*SockclntDelete) GetMessageName() string { return "sockclnt_delete" } 985 func (*SockclntDelete) GetCrcString() string { return "8ac76db6" } 986 func (*SockclntDelete) GetMessageType() api.MessageType { 987 return api.RequestMessage 988 } 989 990 func (m *SockclntDelete) Size() (size int) { 991 if m == nil { 992 return 0 993 } 994 size += 4 // m.Index 995 return size 996 } 997 func (m *SockclntDelete) Marshal(b []byte) ([]byte, error) { 998 if b == nil { 999 b = make([]byte, m.Size()) 1000 } 1001 buf := codec.NewBuffer(b) 1002 buf.EncodeUint32(m.Index) 1003 return buf.Bytes(), nil 1004 } 1005 func (m *SockclntDelete) Unmarshal(b []byte) error { 1006 buf := codec.NewBuffer(b) 1007 m.Index = buf.DecodeUint32() 1008 return nil 1009 } 1010 1011 // SockclntDeleteReply defines message 'sockclnt_delete_reply'. 1012 type SockclntDeleteReply struct { 1013 Response int32 `binapi:"i32,name=response" json:"response,omitempty"` 1014 } 1015 1016 func (m *SockclntDeleteReply) Reset() { *m = SockclntDeleteReply{} } 1017 func (*SockclntDeleteReply) GetMessageName() string { return "sockclnt_delete_reply" } 1018 func (*SockclntDeleteReply) GetCrcString() string { return "8f38b1ee" } 1019 func (*SockclntDeleteReply) GetMessageType() api.MessageType { 1020 return api.ReplyMessage 1021 } 1022 1023 func (m *SockclntDeleteReply) Size() (size int) { 1024 if m == nil { 1025 return 0 1026 } 1027 size += 4 // m.Response 1028 return size 1029 } 1030 func (m *SockclntDeleteReply) Marshal(b []byte) ([]byte, error) { 1031 if b == nil { 1032 b = make([]byte, m.Size()) 1033 } 1034 buf := codec.NewBuffer(b) 1035 buf.EncodeInt32(m.Response) 1036 return buf.Bytes(), nil 1037 } 1038 func (m *SockclntDeleteReply) Unmarshal(b []byte) error { 1039 buf := codec.NewBuffer(b) 1040 m.Response = buf.DecodeInt32() 1041 return nil 1042 } 1043 1044 // TracePluginMsgIds defines message 'trace_plugin_msg_ids'. 1045 type TracePluginMsgIds struct { 1046 PluginName string `binapi:"string[128],name=plugin_name" json:"plugin_name,omitempty"` 1047 FirstMsgID uint16 `binapi:"u16,name=first_msg_id" json:"first_msg_id,omitempty"` 1048 LastMsgID uint16 `binapi:"u16,name=last_msg_id" json:"last_msg_id,omitempty"` 1049 } 1050 1051 func (m *TracePluginMsgIds) Reset() { *m = TracePluginMsgIds{} } 1052 func (*TracePluginMsgIds) GetMessageName() string { return "trace_plugin_msg_ids" } 1053 func (*TracePluginMsgIds) GetCrcString() string { return "f476d3ce" } 1054 func (*TracePluginMsgIds) GetMessageType() api.MessageType { 1055 return api.RequestMessage 1056 } 1057 1058 func (m *TracePluginMsgIds) Size() (size int) { 1059 if m == nil { 1060 return 0 1061 } 1062 size += 128 // m.PluginName 1063 size += 2 // m.FirstMsgID 1064 size += 2 // m.LastMsgID 1065 return size 1066 } 1067 func (m *TracePluginMsgIds) Marshal(b []byte) ([]byte, error) { 1068 if b == nil { 1069 b = make([]byte, m.Size()) 1070 } 1071 buf := codec.NewBuffer(b) 1072 buf.EncodeString(m.PluginName, 128) 1073 buf.EncodeUint16(m.FirstMsgID) 1074 buf.EncodeUint16(m.LastMsgID) 1075 return buf.Bytes(), nil 1076 } 1077 func (m *TracePluginMsgIds) Unmarshal(b []byte) error { 1078 buf := codec.NewBuffer(b) 1079 m.PluginName = buf.DecodeString(128) 1080 m.FirstMsgID = buf.DecodeUint16() 1081 m.LastMsgID = buf.DecodeUint16() 1082 return nil 1083 } 1084 1085 func init() { file_memclnt_binapi_init() } 1086 func file_memclnt_binapi_init() { 1087 api.RegisterMessage((*APIVersions)(nil), "api_versions_51077d14") 1088 api.RegisterMessage((*APIVersionsReply)(nil), "api_versions_reply_5f0d99d6") 1089 api.RegisterMessage((*ControlPing)(nil), "control_ping_51077d14") 1090 api.RegisterMessage((*ControlPingReply)(nil), "control_ping_reply_f6b0b8ca") 1091 api.RegisterMessage((*GetFirstMsgID)(nil), "get_first_msg_id_ebf79a66") 1092 api.RegisterMessage((*GetFirstMsgIDReply)(nil), "get_first_msg_id_reply_7d337472") 1093 api.RegisterMessage((*MemclntCreate)(nil), "memclnt_create_9c5e1c2f") 1094 api.RegisterMessage((*MemclntCreateReply)(nil), "memclnt_create_reply_42ec4560") 1095 api.RegisterMessage((*MemclntCreateV2)(nil), "memclnt_create_v2_c4bd4882") 1096 api.RegisterMessage((*MemclntCreateV2Reply)(nil), "memclnt_create_v2_reply_42ec4560") 1097 api.RegisterMessage((*MemclntDelete)(nil), "memclnt_delete_7e1c04e3") 1098 api.RegisterMessage((*MemclntDeleteReply)(nil), "memclnt_delete_reply_3d3b6312") 1099 api.RegisterMessage((*MemclntKeepalive)(nil), "memclnt_keepalive_51077d14") 1100 api.RegisterMessage((*MemclntKeepaliveReply)(nil), "memclnt_keepalive_reply_e8d4e804") 1101 api.RegisterMessage((*MemclntReadTimeout)(nil), "memclnt_read_timeout_c3a3a452") 1102 api.RegisterMessage((*MemclntRxThreadSuspend)(nil), "memclnt_rx_thread_suspend_c3a3a452") 1103 api.RegisterMessage((*RPCCall)(nil), "rpc_call_7e8a2c95") 1104 api.RegisterMessage((*RPCCallReply)(nil), "rpc_call_reply_e8d4e804") 1105 api.RegisterMessage((*RxThreadExit)(nil), "rx_thread_exit_c3a3a452") 1106 api.RegisterMessage((*SockInitShm)(nil), "sock_init_shm_51646d92") 1107 api.RegisterMessage((*SockInitShmReply)(nil), "sock_init_shm_reply_e8d4e804") 1108 api.RegisterMessage((*SockclntCreate)(nil), "sockclnt_create_455fb9c4") 1109 api.RegisterMessage((*SockclntCreateReply)(nil), "sockclnt_create_reply_35166268") 1110 api.RegisterMessage((*SockclntDelete)(nil), "sockclnt_delete_8ac76db6") 1111 api.RegisterMessage((*SockclntDeleteReply)(nil), "sockclnt_delete_reply_8f38b1ee") 1112 api.RegisterMessage((*TracePluginMsgIds)(nil), "trace_plugin_msg_ids_f476d3ce") 1113 } 1114 1115 // Messages returns list of all messages in this module. 1116 func AllMessages() []api.Message { 1117 return []api.Message{ 1118 (*APIVersions)(nil), 1119 (*APIVersionsReply)(nil), 1120 (*ControlPing)(nil), 1121 (*ControlPingReply)(nil), 1122 (*GetFirstMsgID)(nil), 1123 (*GetFirstMsgIDReply)(nil), 1124 (*MemclntCreate)(nil), 1125 (*MemclntCreateReply)(nil), 1126 (*MemclntCreateV2)(nil), 1127 (*MemclntCreateV2Reply)(nil), 1128 (*MemclntDelete)(nil), 1129 (*MemclntDeleteReply)(nil), 1130 (*MemclntKeepalive)(nil), 1131 (*MemclntKeepaliveReply)(nil), 1132 (*MemclntReadTimeout)(nil), 1133 (*MemclntRxThreadSuspend)(nil), 1134 (*RPCCall)(nil), 1135 (*RPCCallReply)(nil), 1136 (*RxThreadExit)(nil), 1137 (*SockInitShm)(nil), 1138 (*SockInitShmReply)(nil), 1139 (*SockclntCreate)(nil), 1140 (*SockclntCreateReply)(nil), 1141 (*SockclntDelete)(nil), 1142 (*SockclntDeleteReply)(nil), 1143 (*TracePluginMsgIds)(nil), 1144 } 1145 }