go.ligato.io/vpp-agent/v3@v3.5.0/plugins/vpp/binapi/vpp2106/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 // - 22 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 = 0x8d3dd881 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 // GetFirstMsgID defines message 'get_first_msg_id'. 135 type GetFirstMsgID struct { 136 Name string `binapi:"string[64],name=name" json:"name,omitempty"` 137 } 138 139 func (m *GetFirstMsgID) Reset() { *m = GetFirstMsgID{} } 140 func (*GetFirstMsgID) GetMessageName() string { return "get_first_msg_id" } 141 func (*GetFirstMsgID) GetCrcString() string { return "ebf79a66" } 142 func (*GetFirstMsgID) GetMessageType() api.MessageType { 143 return api.RequestMessage 144 } 145 146 func (m *GetFirstMsgID) Size() (size int) { 147 if m == nil { 148 return 0 149 } 150 size += 64 // m.Name 151 return size 152 } 153 func (m *GetFirstMsgID) Marshal(b []byte) ([]byte, error) { 154 if b == nil { 155 b = make([]byte, m.Size()) 156 } 157 buf := codec.NewBuffer(b) 158 buf.EncodeString(m.Name, 64) 159 return buf.Bytes(), nil 160 } 161 func (m *GetFirstMsgID) Unmarshal(b []byte) error { 162 buf := codec.NewBuffer(b) 163 m.Name = buf.DecodeString(64) 164 return nil 165 } 166 167 // GetFirstMsgIDReply defines message 'get_first_msg_id_reply'. 168 type GetFirstMsgIDReply struct { 169 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 170 FirstMsgID uint16 `binapi:"u16,name=first_msg_id" json:"first_msg_id,omitempty"` 171 } 172 173 func (m *GetFirstMsgIDReply) Reset() { *m = GetFirstMsgIDReply{} } 174 func (*GetFirstMsgIDReply) GetMessageName() string { return "get_first_msg_id_reply" } 175 func (*GetFirstMsgIDReply) GetCrcString() string { return "7d337472" } 176 func (*GetFirstMsgIDReply) GetMessageType() api.MessageType { 177 return api.ReplyMessage 178 } 179 180 func (m *GetFirstMsgIDReply) Size() (size int) { 181 if m == nil { 182 return 0 183 } 184 size += 4 // m.Retval 185 size += 2 // m.FirstMsgID 186 return size 187 } 188 func (m *GetFirstMsgIDReply) Marshal(b []byte) ([]byte, error) { 189 if b == nil { 190 b = make([]byte, m.Size()) 191 } 192 buf := codec.NewBuffer(b) 193 buf.EncodeInt32(m.Retval) 194 buf.EncodeUint16(m.FirstMsgID) 195 return buf.Bytes(), nil 196 } 197 func (m *GetFirstMsgIDReply) Unmarshal(b []byte) error { 198 buf := codec.NewBuffer(b) 199 m.Retval = buf.DecodeInt32() 200 m.FirstMsgID = buf.DecodeUint16() 201 return nil 202 } 203 204 // MemclntCreate defines message 'memclnt_create'. 205 type MemclntCreate struct { 206 CtxQuota int32 `binapi:"i32,name=ctx_quota" json:"ctx_quota,omitempty"` 207 InputQueue uint64 `binapi:"u64,name=input_queue" json:"input_queue,omitempty"` 208 Name string `binapi:"string[64],name=name" json:"name,omitempty"` 209 APIVersions []uint32 `binapi:"u32[8],name=api_versions" json:"api_versions,omitempty"` 210 } 211 212 func (m *MemclntCreate) Reset() { *m = MemclntCreate{} } 213 func (*MemclntCreate) GetMessageName() string { return "memclnt_create" } 214 func (*MemclntCreate) GetCrcString() string { return "9c5e1c2f" } 215 func (*MemclntCreate) GetMessageType() api.MessageType { 216 return api.ReplyMessage 217 } 218 219 func (m *MemclntCreate) Size() (size int) { 220 if m == nil { 221 return 0 222 } 223 size += 4 // m.CtxQuota 224 size += 8 // m.InputQueue 225 size += 64 // m.Name 226 size += 4 * 8 // m.APIVersions 227 return size 228 } 229 func (m *MemclntCreate) Marshal(b []byte) ([]byte, error) { 230 if b == nil { 231 b = make([]byte, m.Size()) 232 } 233 buf := codec.NewBuffer(b) 234 buf.EncodeInt32(m.CtxQuota) 235 buf.EncodeUint64(m.InputQueue) 236 buf.EncodeString(m.Name, 64) 237 for i := 0; i < 8; i++ { 238 var x uint32 239 if i < len(m.APIVersions) { 240 x = uint32(m.APIVersions[i]) 241 } 242 buf.EncodeUint32(x) 243 } 244 return buf.Bytes(), nil 245 } 246 func (m *MemclntCreate) Unmarshal(b []byte) error { 247 buf := codec.NewBuffer(b) 248 m.CtxQuota = buf.DecodeInt32() 249 m.InputQueue = buf.DecodeUint64() 250 m.Name = buf.DecodeString(64) 251 m.APIVersions = make([]uint32, 8) 252 for i := 0; i < len(m.APIVersions); i++ { 253 m.APIVersions[i] = buf.DecodeUint32() 254 } 255 return nil 256 } 257 258 // MemclntCreateReply defines message 'memclnt_create_reply'. 259 type MemclntCreateReply struct { 260 Response int32 `binapi:"i32,name=response" json:"response,omitempty"` 261 Handle uint64 `binapi:"u64,name=handle" json:"handle,omitempty"` 262 Index uint32 `binapi:"u32,name=index" json:"index,omitempty"` 263 MessageTable uint64 `binapi:"u64,name=message_table" json:"message_table,omitempty"` 264 } 265 266 func (m *MemclntCreateReply) Reset() { *m = MemclntCreateReply{} } 267 func (*MemclntCreateReply) GetMessageName() string { return "memclnt_create_reply" } 268 func (*MemclntCreateReply) GetCrcString() string { return "42ec4560" } 269 func (*MemclntCreateReply) GetMessageType() api.MessageType { 270 return api.ReplyMessage 271 } 272 273 func (m *MemclntCreateReply) Size() (size int) { 274 if m == nil { 275 return 0 276 } 277 size += 4 // m.Response 278 size += 8 // m.Handle 279 size += 4 // m.Index 280 size += 8 // m.MessageTable 281 return size 282 } 283 func (m *MemclntCreateReply) Marshal(b []byte) ([]byte, error) { 284 if b == nil { 285 b = make([]byte, m.Size()) 286 } 287 buf := codec.NewBuffer(b) 288 buf.EncodeInt32(m.Response) 289 buf.EncodeUint64(m.Handle) 290 buf.EncodeUint32(m.Index) 291 buf.EncodeUint64(m.MessageTable) 292 return buf.Bytes(), nil 293 } 294 func (m *MemclntCreateReply) Unmarshal(b []byte) error { 295 buf := codec.NewBuffer(b) 296 m.Response = buf.DecodeInt32() 297 m.Handle = buf.DecodeUint64() 298 m.Index = buf.DecodeUint32() 299 m.MessageTable = buf.DecodeUint64() 300 return nil 301 } 302 303 // MemclntDelete defines message 'memclnt_delete'. 304 type MemclntDelete struct { 305 Index uint32 `binapi:"u32,name=index" json:"index,omitempty"` 306 Handle uint64 `binapi:"u64,name=handle" json:"handle,omitempty"` 307 DoCleanup bool `binapi:"bool,name=do_cleanup" json:"do_cleanup,omitempty"` 308 } 309 310 func (m *MemclntDelete) Reset() { *m = MemclntDelete{} } 311 func (*MemclntDelete) GetMessageName() string { return "memclnt_delete" } 312 func (*MemclntDelete) GetCrcString() string { return "7e1c04e3" } 313 func (*MemclntDelete) GetMessageType() api.MessageType { 314 return api.OtherMessage 315 } 316 317 func (m *MemclntDelete) Size() (size int) { 318 if m == nil { 319 return 0 320 } 321 size += 4 // m.Index 322 size += 8 // m.Handle 323 size += 1 // m.DoCleanup 324 return size 325 } 326 func (m *MemclntDelete) Marshal(b []byte) ([]byte, error) { 327 if b == nil { 328 b = make([]byte, m.Size()) 329 } 330 buf := codec.NewBuffer(b) 331 buf.EncodeUint32(m.Index) 332 buf.EncodeUint64(m.Handle) 333 buf.EncodeBool(m.DoCleanup) 334 return buf.Bytes(), nil 335 } 336 func (m *MemclntDelete) Unmarshal(b []byte) error { 337 buf := codec.NewBuffer(b) 338 m.Index = buf.DecodeUint32() 339 m.Handle = buf.DecodeUint64() 340 m.DoCleanup = buf.DecodeBool() 341 return nil 342 } 343 344 // MemclntDeleteReply defines message 'memclnt_delete_reply'. 345 type MemclntDeleteReply struct { 346 Response int32 `binapi:"i32,name=response" json:"response,omitempty"` 347 Handle uint64 `binapi:"u64,name=handle" json:"handle,omitempty"` 348 } 349 350 func (m *MemclntDeleteReply) Reset() { *m = MemclntDeleteReply{} } 351 func (*MemclntDeleteReply) GetMessageName() string { return "memclnt_delete_reply" } 352 func (*MemclntDeleteReply) GetCrcString() string { return "3d3b6312" } 353 func (*MemclntDeleteReply) GetMessageType() api.MessageType { 354 return api.OtherMessage 355 } 356 357 func (m *MemclntDeleteReply) Size() (size int) { 358 if m == nil { 359 return 0 360 } 361 size += 4 // m.Response 362 size += 8 // m.Handle 363 return size 364 } 365 func (m *MemclntDeleteReply) Marshal(b []byte) ([]byte, error) { 366 if b == nil { 367 b = make([]byte, m.Size()) 368 } 369 buf := codec.NewBuffer(b) 370 buf.EncodeInt32(m.Response) 371 buf.EncodeUint64(m.Handle) 372 return buf.Bytes(), nil 373 } 374 func (m *MemclntDeleteReply) Unmarshal(b []byte) error { 375 buf := codec.NewBuffer(b) 376 m.Response = buf.DecodeInt32() 377 m.Handle = buf.DecodeUint64() 378 return nil 379 } 380 381 // MemclntKeepalive defines message 'memclnt_keepalive'. 382 type MemclntKeepalive struct{} 383 384 func (m *MemclntKeepalive) Reset() { *m = MemclntKeepalive{} } 385 func (*MemclntKeepalive) GetMessageName() string { return "memclnt_keepalive" } 386 func (*MemclntKeepalive) GetCrcString() string { return "51077d14" } 387 func (*MemclntKeepalive) GetMessageType() api.MessageType { 388 return api.RequestMessage 389 } 390 391 func (m *MemclntKeepalive) Size() (size int) { 392 if m == nil { 393 return 0 394 } 395 return size 396 } 397 func (m *MemclntKeepalive) Marshal(b []byte) ([]byte, error) { 398 if b == nil { 399 b = make([]byte, m.Size()) 400 } 401 buf := codec.NewBuffer(b) 402 return buf.Bytes(), nil 403 } 404 func (m *MemclntKeepalive) Unmarshal(b []byte) error { 405 return nil 406 } 407 408 // MemclntKeepaliveReply defines message 'memclnt_keepalive_reply'. 409 type MemclntKeepaliveReply struct { 410 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 411 } 412 413 func (m *MemclntKeepaliveReply) Reset() { *m = MemclntKeepaliveReply{} } 414 func (*MemclntKeepaliveReply) GetMessageName() string { return "memclnt_keepalive_reply" } 415 func (*MemclntKeepaliveReply) GetCrcString() string { return "e8d4e804" } 416 func (*MemclntKeepaliveReply) GetMessageType() api.MessageType { 417 return api.ReplyMessage 418 } 419 420 func (m *MemclntKeepaliveReply) Size() (size int) { 421 if m == nil { 422 return 0 423 } 424 size += 4 // m.Retval 425 return size 426 } 427 func (m *MemclntKeepaliveReply) Marshal(b []byte) ([]byte, error) { 428 if b == nil { 429 b = make([]byte, m.Size()) 430 } 431 buf := codec.NewBuffer(b) 432 buf.EncodeInt32(m.Retval) 433 return buf.Bytes(), nil 434 } 435 func (m *MemclntKeepaliveReply) Unmarshal(b []byte) error { 436 buf := codec.NewBuffer(b) 437 m.Retval = buf.DecodeInt32() 438 return nil 439 } 440 441 // MemclntReadTimeout defines message 'memclnt_read_timeout'. 442 type MemclntReadTimeout struct { 443 Dummy uint8 `binapi:"u8,name=dummy" json:"dummy,omitempty"` 444 } 445 446 func (m *MemclntReadTimeout) Reset() { *m = MemclntReadTimeout{} } 447 func (*MemclntReadTimeout) GetMessageName() string { return "memclnt_read_timeout" } 448 func (*MemclntReadTimeout) GetCrcString() string { return "c3a3a452" } 449 func (*MemclntReadTimeout) GetMessageType() api.MessageType { 450 return api.OtherMessage 451 } 452 453 func (m *MemclntReadTimeout) Size() (size int) { 454 if m == nil { 455 return 0 456 } 457 size += 1 // m.Dummy 458 return size 459 } 460 func (m *MemclntReadTimeout) Marshal(b []byte) ([]byte, error) { 461 if b == nil { 462 b = make([]byte, m.Size()) 463 } 464 buf := codec.NewBuffer(b) 465 buf.EncodeUint8(m.Dummy) 466 return buf.Bytes(), nil 467 } 468 func (m *MemclntReadTimeout) Unmarshal(b []byte) error { 469 buf := codec.NewBuffer(b) 470 m.Dummy = buf.DecodeUint8() 471 return nil 472 } 473 474 // MemclntRxThreadSuspend defines message 'memclnt_rx_thread_suspend'. 475 type MemclntRxThreadSuspend struct { 476 Dummy uint8 `binapi:"u8,name=dummy" json:"dummy,omitempty"` 477 } 478 479 func (m *MemclntRxThreadSuspend) Reset() { *m = MemclntRxThreadSuspend{} } 480 func (*MemclntRxThreadSuspend) GetMessageName() string { return "memclnt_rx_thread_suspend" } 481 func (*MemclntRxThreadSuspend) GetCrcString() string { return "c3a3a452" } 482 func (*MemclntRxThreadSuspend) GetMessageType() api.MessageType { 483 return api.OtherMessage 484 } 485 486 func (m *MemclntRxThreadSuspend) Size() (size int) { 487 if m == nil { 488 return 0 489 } 490 size += 1 // m.Dummy 491 return size 492 } 493 func (m *MemclntRxThreadSuspend) Marshal(b []byte) ([]byte, error) { 494 if b == nil { 495 b = make([]byte, m.Size()) 496 } 497 buf := codec.NewBuffer(b) 498 buf.EncodeUint8(m.Dummy) 499 return buf.Bytes(), nil 500 } 501 func (m *MemclntRxThreadSuspend) Unmarshal(b []byte) error { 502 buf := codec.NewBuffer(b) 503 m.Dummy = buf.DecodeUint8() 504 return nil 505 } 506 507 // RPCCall defines message 'rpc_call'. 508 type RPCCall struct { 509 Function uint64 `binapi:"u64,name=function" json:"function,omitempty"` 510 Multicast uint8 `binapi:"u8,name=multicast" json:"multicast,omitempty"` 511 NeedBarrierSync uint8 `binapi:"u8,name=need_barrier_sync" json:"need_barrier_sync,omitempty"` 512 SendReply uint8 `binapi:"u8,name=send_reply" json:"send_reply,omitempty"` 513 DataLen uint32 `binapi:"u32,name=data_len" json:"-"` 514 Data []byte `binapi:"u8[data_len],name=data" json:"data,omitempty"` 515 } 516 517 func (m *RPCCall) Reset() { *m = RPCCall{} } 518 func (*RPCCall) GetMessageName() string { return "rpc_call" } 519 func (*RPCCall) GetCrcString() string { return "7e8a2c95" } 520 func (*RPCCall) GetMessageType() api.MessageType { 521 return api.RequestMessage 522 } 523 524 func (m *RPCCall) Size() (size int) { 525 if m == nil { 526 return 0 527 } 528 size += 8 // m.Function 529 size += 1 // m.Multicast 530 size += 1 // m.NeedBarrierSync 531 size += 1 // m.SendReply 532 size += 4 // m.DataLen 533 size += 1 * len(m.Data) // m.Data 534 return size 535 } 536 func (m *RPCCall) Marshal(b []byte) ([]byte, error) { 537 if b == nil { 538 b = make([]byte, m.Size()) 539 } 540 buf := codec.NewBuffer(b) 541 buf.EncodeUint64(m.Function) 542 buf.EncodeUint8(m.Multicast) 543 buf.EncodeUint8(m.NeedBarrierSync) 544 buf.EncodeUint8(m.SendReply) 545 buf.EncodeUint32(uint32(len(m.Data))) 546 buf.EncodeBytes(m.Data, 0) 547 return buf.Bytes(), nil 548 } 549 func (m *RPCCall) Unmarshal(b []byte) error { 550 buf := codec.NewBuffer(b) 551 m.Function = buf.DecodeUint64() 552 m.Multicast = buf.DecodeUint8() 553 m.NeedBarrierSync = buf.DecodeUint8() 554 m.SendReply = buf.DecodeUint8() 555 m.DataLen = buf.DecodeUint32() 556 m.Data = make([]byte, m.DataLen) 557 copy(m.Data, buf.DecodeBytes(len(m.Data))) 558 return nil 559 } 560 561 // RPCCallReply defines message 'rpc_call_reply'. 562 type RPCCallReply struct { 563 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 564 } 565 566 func (m *RPCCallReply) Reset() { *m = RPCCallReply{} } 567 func (*RPCCallReply) GetMessageName() string { return "rpc_call_reply" } 568 func (*RPCCallReply) GetCrcString() string { return "e8d4e804" } 569 func (*RPCCallReply) GetMessageType() api.MessageType { 570 return api.ReplyMessage 571 } 572 573 func (m *RPCCallReply) Size() (size int) { 574 if m == nil { 575 return 0 576 } 577 size += 4 // m.Retval 578 return size 579 } 580 func (m *RPCCallReply) Marshal(b []byte) ([]byte, error) { 581 if b == nil { 582 b = make([]byte, m.Size()) 583 } 584 buf := codec.NewBuffer(b) 585 buf.EncodeInt32(m.Retval) 586 return buf.Bytes(), nil 587 } 588 func (m *RPCCallReply) Unmarshal(b []byte) error { 589 buf := codec.NewBuffer(b) 590 m.Retval = buf.DecodeInt32() 591 return nil 592 } 593 594 // RxThreadExit defines message 'rx_thread_exit'. 595 type RxThreadExit struct { 596 Dummy uint8 `binapi:"u8,name=dummy" json:"dummy,omitempty"` 597 } 598 599 func (m *RxThreadExit) Reset() { *m = RxThreadExit{} } 600 func (*RxThreadExit) GetMessageName() string { return "rx_thread_exit" } 601 func (*RxThreadExit) GetCrcString() string { return "c3a3a452" } 602 func (*RxThreadExit) GetMessageType() api.MessageType { 603 return api.OtherMessage 604 } 605 606 func (m *RxThreadExit) Size() (size int) { 607 if m == nil { 608 return 0 609 } 610 size += 1 // m.Dummy 611 return size 612 } 613 func (m *RxThreadExit) Marshal(b []byte) ([]byte, error) { 614 if b == nil { 615 b = make([]byte, m.Size()) 616 } 617 buf := codec.NewBuffer(b) 618 buf.EncodeUint8(m.Dummy) 619 return buf.Bytes(), nil 620 } 621 func (m *RxThreadExit) Unmarshal(b []byte) error { 622 buf := codec.NewBuffer(b) 623 m.Dummy = buf.DecodeUint8() 624 return nil 625 } 626 627 // SockInitShm defines message 'sock_init_shm'. 628 type SockInitShm struct { 629 RequestedSize uint32 `binapi:"u32,name=requested_size" json:"requested_size,omitempty"` 630 Nitems uint8 `binapi:"u8,name=nitems" json:"-"` 631 Configs []uint64 `binapi:"u64[nitems],name=configs" json:"configs,omitempty"` 632 } 633 634 func (m *SockInitShm) Reset() { *m = SockInitShm{} } 635 func (*SockInitShm) GetMessageName() string { return "sock_init_shm" } 636 func (*SockInitShm) GetCrcString() string { return "51646d92" } 637 func (*SockInitShm) GetMessageType() api.MessageType { 638 return api.RequestMessage 639 } 640 641 func (m *SockInitShm) Size() (size int) { 642 if m == nil { 643 return 0 644 } 645 size += 4 // m.RequestedSize 646 size += 1 // m.Nitems 647 size += 8 * len(m.Configs) // m.Configs 648 return size 649 } 650 func (m *SockInitShm) Marshal(b []byte) ([]byte, error) { 651 if b == nil { 652 b = make([]byte, m.Size()) 653 } 654 buf := codec.NewBuffer(b) 655 buf.EncodeUint32(m.RequestedSize) 656 buf.EncodeUint8(uint8(len(m.Configs))) 657 for i := 0; i < len(m.Configs); i++ { 658 var x uint64 659 if i < len(m.Configs) { 660 x = uint64(m.Configs[i]) 661 } 662 buf.EncodeUint64(x) 663 } 664 return buf.Bytes(), nil 665 } 666 func (m *SockInitShm) Unmarshal(b []byte) error { 667 buf := codec.NewBuffer(b) 668 m.RequestedSize = buf.DecodeUint32() 669 m.Nitems = buf.DecodeUint8() 670 m.Configs = make([]uint64, m.Nitems) 671 for i := 0; i < len(m.Configs); i++ { 672 m.Configs[i] = buf.DecodeUint64() 673 } 674 return nil 675 } 676 677 // SockInitShmReply defines message 'sock_init_shm_reply'. 678 type SockInitShmReply struct { 679 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 680 } 681 682 func (m *SockInitShmReply) Reset() { *m = SockInitShmReply{} } 683 func (*SockInitShmReply) GetMessageName() string { return "sock_init_shm_reply" } 684 func (*SockInitShmReply) GetCrcString() string { return "e8d4e804" } 685 func (*SockInitShmReply) GetMessageType() api.MessageType { 686 return api.ReplyMessage 687 } 688 689 func (m *SockInitShmReply) Size() (size int) { 690 if m == nil { 691 return 0 692 } 693 size += 4 // m.Retval 694 return size 695 } 696 func (m *SockInitShmReply) Marshal(b []byte) ([]byte, error) { 697 if b == nil { 698 b = make([]byte, m.Size()) 699 } 700 buf := codec.NewBuffer(b) 701 buf.EncodeInt32(m.Retval) 702 return buf.Bytes(), nil 703 } 704 func (m *SockInitShmReply) Unmarshal(b []byte) error { 705 buf := codec.NewBuffer(b) 706 m.Retval = buf.DecodeInt32() 707 return nil 708 } 709 710 // SockclntCreate defines message 'sockclnt_create'. 711 type SockclntCreate struct { 712 Name string `binapi:"string[64],name=name" json:"name,omitempty"` 713 } 714 715 func (m *SockclntCreate) Reset() { *m = SockclntCreate{} } 716 func (*SockclntCreate) GetMessageName() string { return "sockclnt_create" } 717 func (*SockclntCreate) GetCrcString() string { return "455fb9c4" } 718 func (*SockclntCreate) GetMessageType() api.MessageType { 719 return api.ReplyMessage 720 } 721 722 func (m *SockclntCreate) Size() (size int) { 723 if m == nil { 724 return 0 725 } 726 size += 64 // m.Name 727 return size 728 } 729 func (m *SockclntCreate) Marshal(b []byte) ([]byte, error) { 730 if b == nil { 731 b = make([]byte, m.Size()) 732 } 733 buf := codec.NewBuffer(b) 734 buf.EncodeString(m.Name, 64) 735 return buf.Bytes(), nil 736 } 737 func (m *SockclntCreate) Unmarshal(b []byte) error { 738 buf := codec.NewBuffer(b) 739 m.Name = buf.DecodeString(64) 740 return nil 741 } 742 743 // SockclntCreateReply defines message 'sockclnt_create_reply'. 744 type SockclntCreateReply struct { 745 Response int32 `binapi:"i32,name=response" json:"response,omitempty"` 746 Index uint32 `binapi:"u32,name=index" json:"index,omitempty"` 747 Count uint16 `binapi:"u16,name=count" json:"-"` 748 MessageTable []MessageTableEntry `binapi:"message_table_entry[count],name=message_table" json:"message_table,omitempty"` 749 } 750 751 func (m *SockclntCreateReply) Reset() { *m = SockclntCreateReply{} } 752 func (*SockclntCreateReply) GetMessageName() string { return "sockclnt_create_reply" } 753 func (*SockclntCreateReply) GetCrcString() string { return "35166268" } 754 func (*SockclntCreateReply) GetMessageType() api.MessageType { 755 return api.RequestMessage 756 } 757 758 func (m *SockclntCreateReply) Size() (size int) { 759 if m == nil { 760 return 0 761 } 762 size += 4 // m.Response 763 size += 4 // m.Index 764 size += 2 // m.Count 765 for j1 := 0; j1 < len(m.MessageTable); j1++ { 766 var s1 MessageTableEntry 767 _ = s1 768 if j1 < len(m.MessageTable) { 769 s1 = m.MessageTable[j1] 770 } 771 size += 2 // s1.Index 772 size += 64 // s1.Name 773 } 774 return size 775 } 776 func (m *SockclntCreateReply) Marshal(b []byte) ([]byte, error) { 777 if b == nil { 778 b = make([]byte, m.Size()) 779 } 780 buf := codec.NewBuffer(b) 781 buf.EncodeInt32(m.Response) 782 buf.EncodeUint32(m.Index) 783 buf.EncodeUint16(uint16(len(m.MessageTable))) 784 for j0 := 0; j0 < len(m.MessageTable); j0++ { 785 var v0 MessageTableEntry // MessageTable 786 if j0 < len(m.MessageTable) { 787 v0 = m.MessageTable[j0] 788 } 789 buf.EncodeUint16(v0.Index) 790 buf.EncodeString(v0.Name, 64) 791 } 792 return buf.Bytes(), nil 793 } 794 func (m *SockclntCreateReply) Unmarshal(b []byte) error { 795 buf := codec.NewBuffer(b) 796 m.Response = buf.DecodeInt32() 797 m.Index = buf.DecodeUint32() 798 m.Count = buf.DecodeUint16() 799 m.MessageTable = make([]MessageTableEntry, m.Count) 800 for j0 := 0; j0 < len(m.MessageTable); j0++ { 801 m.MessageTable[j0].Index = buf.DecodeUint16() 802 m.MessageTable[j0].Name = buf.DecodeString(64) 803 } 804 return nil 805 } 806 807 // SockclntDelete defines message 'sockclnt_delete'. 808 type SockclntDelete struct { 809 Index uint32 `binapi:"u32,name=index" json:"index,omitempty"` 810 } 811 812 func (m *SockclntDelete) Reset() { *m = SockclntDelete{} } 813 func (*SockclntDelete) GetMessageName() string { return "sockclnt_delete" } 814 func (*SockclntDelete) GetCrcString() string { return "8ac76db6" } 815 func (*SockclntDelete) GetMessageType() api.MessageType { 816 return api.RequestMessage 817 } 818 819 func (m *SockclntDelete) Size() (size int) { 820 if m == nil { 821 return 0 822 } 823 size += 4 // m.Index 824 return size 825 } 826 func (m *SockclntDelete) 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.Index) 832 return buf.Bytes(), nil 833 } 834 func (m *SockclntDelete) Unmarshal(b []byte) error { 835 buf := codec.NewBuffer(b) 836 m.Index = buf.DecodeUint32() 837 return nil 838 } 839 840 // SockclntDeleteReply defines message 'sockclnt_delete_reply'. 841 type SockclntDeleteReply struct { 842 Response int32 `binapi:"i32,name=response" json:"response,omitempty"` 843 } 844 845 func (m *SockclntDeleteReply) Reset() { *m = SockclntDeleteReply{} } 846 func (*SockclntDeleteReply) GetMessageName() string { return "sockclnt_delete_reply" } 847 func (*SockclntDeleteReply) GetCrcString() string { return "8f38b1ee" } 848 func (*SockclntDeleteReply) GetMessageType() api.MessageType { 849 return api.ReplyMessage 850 } 851 852 func (m *SockclntDeleteReply) Size() (size int) { 853 if m == nil { 854 return 0 855 } 856 size += 4 // m.Response 857 return size 858 } 859 func (m *SockclntDeleteReply) Marshal(b []byte) ([]byte, error) { 860 if b == nil { 861 b = make([]byte, m.Size()) 862 } 863 buf := codec.NewBuffer(b) 864 buf.EncodeInt32(m.Response) 865 return buf.Bytes(), nil 866 } 867 func (m *SockclntDeleteReply) Unmarshal(b []byte) error { 868 buf := codec.NewBuffer(b) 869 m.Response = buf.DecodeInt32() 870 return nil 871 } 872 873 // TracePluginMsgIds defines message 'trace_plugin_msg_ids'. 874 type TracePluginMsgIds struct { 875 PluginName string `binapi:"string[128],name=plugin_name" json:"plugin_name,omitempty"` 876 FirstMsgID uint16 `binapi:"u16,name=first_msg_id" json:"first_msg_id,omitempty"` 877 LastMsgID uint16 `binapi:"u16,name=last_msg_id" json:"last_msg_id,omitempty"` 878 } 879 880 func (m *TracePluginMsgIds) Reset() { *m = TracePluginMsgIds{} } 881 func (*TracePluginMsgIds) GetMessageName() string { return "trace_plugin_msg_ids" } 882 func (*TracePluginMsgIds) GetCrcString() string { return "f476d3ce" } 883 func (*TracePluginMsgIds) GetMessageType() api.MessageType { 884 return api.RequestMessage 885 } 886 887 func (m *TracePluginMsgIds) Size() (size int) { 888 if m == nil { 889 return 0 890 } 891 size += 128 // m.PluginName 892 size += 2 // m.FirstMsgID 893 size += 2 // m.LastMsgID 894 return size 895 } 896 func (m *TracePluginMsgIds) Marshal(b []byte) ([]byte, error) { 897 if b == nil { 898 b = make([]byte, m.Size()) 899 } 900 buf := codec.NewBuffer(b) 901 buf.EncodeString(m.PluginName, 128) 902 buf.EncodeUint16(m.FirstMsgID) 903 buf.EncodeUint16(m.LastMsgID) 904 return buf.Bytes(), nil 905 } 906 func (m *TracePluginMsgIds) Unmarshal(b []byte) error { 907 buf := codec.NewBuffer(b) 908 m.PluginName = buf.DecodeString(128) 909 m.FirstMsgID = buf.DecodeUint16() 910 m.LastMsgID = buf.DecodeUint16() 911 return nil 912 } 913 914 func init() { file_memclnt_binapi_init() } 915 func file_memclnt_binapi_init() { 916 api.RegisterMessage((*APIVersions)(nil), "api_versions_51077d14") 917 api.RegisterMessage((*APIVersionsReply)(nil), "api_versions_reply_5f0d99d6") 918 api.RegisterMessage((*GetFirstMsgID)(nil), "get_first_msg_id_ebf79a66") 919 api.RegisterMessage((*GetFirstMsgIDReply)(nil), "get_first_msg_id_reply_7d337472") 920 api.RegisterMessage((*MemclntCreate)(nil), "memclnt_create_9c5e1c2f") 921 api.RegisterMessage((*MemclntCreateReply)(nil), "memclnt_create_reply_42ec4560") 922 api.RegisterMessage((*MemclntDelete)(nil), "memclnt_delete_7e1c04e3") 923 api.RegisterMessage((*MemclntDeleteReply)(nil), "memclnt_delete_reply_3d3b6312") 924 api.RegisterMessage((*MemclntKeepalive)(nil), "memclnt_keepalive_51077d14") 925 api.RegisterMessage((*MemclntKeepaliveReply)(nil), "memclnt_keepalive_reply_e8d4e804") 926 api.RegisterMessage((*MemclntReadTimeout)(nil), "memclnt_read_timeout_c3a3a452") 927 api.RegisterMessage((*MemclntRxThreadSuspend)(nil), "memclnt_rx_thread_suspend_c3a3a452") 928 api.RegisterMessage((*RPCCall)(nil), "rpc_call_7e8a2c95") 929 api.RegisterMessage((*RPCCallReply)(nil), "rpc_call_reply_e8d4e804") 930 api.RegisterMessage((*RxThreadExit)(nil), "rx_thread_exit_c3a3a452") 931 api.RegisterMessage((*SockInitShm)(nil), "sock_init_shm_51646d92") 932 api.RegisterMessage((*SockInitShmReply)(nil), "sock_init_shm_reply_e8d4e804") 933 api.RegisterMessage((*SockclntCreate)(nil), "sockclnt_create_455fb9c4") 934 api.RegisterMessage((*SockclntCreateReply)(nil), "sockclnt_create_reply_35166268") 935 api.RegisterMessage((*SockclntDelete)(nil), "sockclnt_delete_8ac76db6") 936 api.RegisterMessage((*SockclntDeleteReply)(nil), "sockclnt_delete_reply_8f38b1ee") 937 api.RegisterMessage((*TracePluginMsgIds)(nil), "trace_plugin_msg_ids_f476d3ce") 938 } 939 940 // Messages returns list of all messages in this module. 941 func AllMessages() []api.Message { 942 return []api.Message{ 943 (*APIVersions)(nil), 944 (*APIVersionsReply)(nil), 945 (*GetFirstMsgID)(nil), 946 (*GetFirstMsgIDReply)(nil), 947 (*MemclntCreate)(nil), 948 (*MemclntCreateReply)(nil), 949 (*MemclntDelete)(nil), 950 (*MemclntDeleteReply)(nil), 951 (*MemclntKeepalive)(nil), 952 (*MemclntKeepaliveReply)(nil), 953 (*MemclntReadTimeout)(nil), 954 (*MemclntRxThreadSuspend)(nil), 955 (*RPCCall)(nil), 956 (*RPCCallReply)(nil), 957 (*RxThreadExit)(nil), 958 (*SockInitShm)(nil), 959 (*SockInitShmReply)(nil), 960 (*SockclntCreate)(nil), 961 (*SockclntCreateReply)(nil), 962 (*SockclntDelete)(nil), 963 (*SockclntDeleteReply)(nil), 964 (*TracePluginMsgIds)(nil), 965 } 966 }