summaryrefslogtreecommitdiff
path: root/ecp/src
diff options
context:
space:
mode:
Diffstat (limited to 'ecp/src')
-rw-r--r--ecp/src/ecp/dir/dir.c6
-rw-r--r--ecp/src/ecp/dir/dir.h8
2 files changed, 7 insertions, 7 deletions
diff --git a/ecp/src/ecp/dir/dir.c b/ecp/src/ecp/dir/dir.c
index 6258e0e..47a43f2 100644
--- a/ecp/src/ecp/dir/dir.c
+++ b/ecp/src/ecp/dir/dir.c
@@ -9,7 +9,7 @@
int ecp_dir_item_eq(ECPDirItem *item1, ECPDirItem *item2) {
if (item1->region != item2->region) return 0;
- if (item1->capabilities != item2->capabilities) return 0;
+ if (item1->roles != item2->roles) return 0;
if (!item1->node.key_perma.valid || !item1->node.key_perma.valid) return 0;
if (memcmp(&item1->node.key_perma.public, &item2->node.key_perma.public, sizeof(item1->node.key_perma.public)) != 0) return 0;
return ecp_tr_addr_eq(&item1->node.addr, &item2->node.addr);
@@ -41,7 +41,7 @@ size_t ecp_dir_item_parse(ECPDirItem *item, unsigned char *buf) {
rsize += sizeof(uint16_t);
item->region = buf[0];
- item->capabilities = buf[1];
+ item->roles = buf[1];
buf += 2;
rsize += 2;
@@ -70,7 +70,7 @@ size_t ecp_dir_item_serialize(ECPDirItem *item, unsigned char *buf) {
rsize += sizeof(uint16_t);
buf[0] = item->region;
- buf[1] = item->capabilities;
+ buf[1] = item->roles;
buf += 2;
rsize += 2;
diff --git a/ecp/src/ecp/dir/dir.h b/ecp/src/ecp/dir/dir.h
index 83b97df..f88cf7c 100644
--- a/ecp/src/ecp/dir/dir.h
+++ b/ecp/src/ecp/dir/dir.h
@@ -1,17 +1,17 @@
#define ECP_SIZE_DIR_ITEM 40
#define ECP_MTYPE_DIR_REQ 0x00
-#define ECP_MTYPE_DIR_REP 0x01
+#define ECP_MTYPE_DIR_REP (0x01 | ECP_MTYPE_FLAG_FRAG)
#define ECP_CTYPE_DIR (0x00 | ECP_CTYPE_FLAG_SYS)
-#define ECP_DIR_CAP_DIR 0x01
-#define ECP_DIR_CAP_VCONN 0x02
+#define ECP_ROLE_DIR 0x01
+#define ECP_ROLE_VCONN 0x02
typedef struct ECPDirItem {
ECPNode node;
uint8_t region;
- uint8_t capabilities;
+ uint8_t roles;
} ECPDirItem;
int ecp_dir_item_eq(ECPDirItem *item1, ECPDirItem *item2);