summaryrefslogtreecommitdiff
path: root/ecp/src/dir.h
blob: 2fcc50f93927fc2cd49d6f710589d8d4b96b4c02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#define ECP_MAX_DIR_ITEM    30
#define ECP_SIZE_DIR_ITEM   40

typedef struct ECPDirItem {
    ECPNode node;
    uint16_t capabilities;
} ECPDirItem;

typedef struct ECPDirList {
    ECPDirItem item[ECP_MAX_DIR_ITEM];
    uint16_t count;
} ECPDirList;

ssize_t ecp_dir_parse(ECPDirList *list, unsigned char *buf, size_t buf_size);
int ecp_dir_serialize(ECPDirList *list, unsigned char *buf, size_t buf_size);

void ecp_dir_item_parse(ECPDirItem *item, unsigned char *buf);
void ecp_dir_item_serialize(ECPDirItem *item, unsigned char *buf);