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