1#ifndef SINGINGCAT_COMS_H
2#define SINGINGCAT_COMS_H 1
3#include "main-header.h"
4#include <platform-header.h>
6int encode(
byte *buf,
int *bufsize,
struct command *com);
7int decode(
byte *buf,
int bufsize,
struct command *com);
9int fieldlen_inmem(uint8_t fieldtype, uint8_t array_size);
10int fieldlen(uint8_t fieldtype, uint8_t array_elements);
12int add_uint64(
byte *buf,
int bufsize,
int *offset, uint64_t value);
13int add_uint32(
byte *buf,
int bufsize,
int *offset, uint32_t value);
14int add_uint16(
byte *buf,
int bufsize,
int *offset, uint32_t value);
15int add_uint8(
byte *buf,
int bufsize,
int *offset, uint32_t value);
18int get_uint64(
byte *buf,
int bufsize,
int *pos, uint64_t *res);
19int get_uint32(
byte *buf,
int bufsize,
int *pos, uint32_t *res);
20int get_uint16(
byte *buf,
int bufsize,
int *pos, uint16_t *res);
21int get_uint8(
byte *buf,
int bufsize,
int *pos, uint8_t *res);