struct rbug_proto_context_list * rbug_demarshal_context_list(struct rbug_proto_header *header)
{
- uint32_t len = 0;
- uint32_t pos = 0;
- uint8_t *data = NULL;
struct rbug_proto_context_list *ret;
if (!header)
if (header->opcode != (int32_t)RBUG_OP_CONTEXT_LIST)
return NULL;
- pos = 0;
- len = header->length * 4;
- data = (uint8_t*)&header[1];
ret = MALLOC(sizeof(*ret));
if (!ret)
return NULL;
ret->header.__message = header;
ret->header.opcode = header->opcode;
-
return ret;
}
struct rbug_proto_noop * rbug_demarshal_noop(struct rbug_proto_header *header)
{
- uint32_t len = 0;
- uint32_t pos = 0;
- uint8_t *data = NULL;
struct rbug_proto_noop *ret;
if (!header)
if (header->opcode != (int32_t)RBUG_OP_NOOP)
return NULL;
- pos = 0;
- len = header->length * 4;
- data = (uint8_t*)&header[1];
ret = MALLOC(sizeof(*ret));
if (!ret)
return NULL;
ret->header.__message = header;
ret->header.opcode = header->opcode;
-
return ret;
}
struct rbug_proto_ping * rbug_demarshal_ping(struct rbug_proto_header *header)
{
- uint32_t len = 0;
- uint32_t pos = 0;
- uint8_t *data = NULL;
struct rbug_proto_ping *ret;
if (!header)
if (header->opcode != (int32_t)RBUG_OP_PING)
return NULL;
- pos = 0;
- len = header->length * 4;
- data = (uint8_t*)&header[1];
ret = MALLOC(sizeof(*ret));
if (!ret)
return NULL;
ret->header.__message = header;
ret->header.opcode = header->opcode;
-
return ret;
}
struct rbug_proto_texture_list * rbug_demarshal_texture_list(struct rbug_proto_header *header)
{
- uint32_t len = 0;
- uint32_t pos = 0;
- uint8_t *data = NULL;
struct rbug_proto_texture_list *ret;
if (!header)
if (header->opcode != (int32_t)RBUG_OP_TEXTURE_LIST)
return NULL;
- pos = 0;
- len = header->length * 4;
- data = (uint8_t*)&header[1];
ret = MALLOC(sizeof(*ret));
if (!ret)
return NULL;
ret->header.__message = header;
ret->header.opcode = header->opcode;
-
return ret;
}