summaryrefslogtreecommitdiff
path: root/src/lib/cdap_req.h
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@ugent.be>2017-03-03 15:41:11 +0100
committerdimitri staessens <dimitri.staessens@ugent.be>2017-03-03 15:54:44 +0100
commita688b8a38d7eb9f42406eeb611717db737b0d257 (patch)
tree68a2bf098171299d2c30f9537c89b862edb0f996 /src/lib/cdap_req.h
parentd753cab1897e323b59923e2b0b11f550b087351c (diff)
downloadouroboros-a688b8a38d7eb9f42406eeb611717db737b0d257.tar.gz
ouroboros-a688b8a38d7eb9f42406eeb611717db737b0d257.zip
lib: Manage multiple flows with a single CDAP instance
You can now add multiple flows to a CDAP instance. This will simplify sending messages to different peers (e.g. for syncing the RIB). A request will now return an array of keys terminated by CDAP_KEY_INVALID. Removes the enum from the CDAP proto file to just take the opcode as an integer.
Diffstat (limited to 'src/lib/cdap_req.h')
-rw-r--r--src/lib/cdap_req.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/cdap_req.h b/src/lib/cdap_req.h
index 9023357d..fe8e3613 100644
--- a/src/lib/cdap_req.h
+++ b/src/lib/cdap_req.h
@@ -43,8 +43,8 @@ enum creq_state {
struct cdap_req {
struct list_head next;
+ int fd;
struct timespec birth;
-
cdap_key_t key;
int response;
@@ -55,7 +55,8 @@ struct cdap_req {
pthread_mutex_t lock;
};
-struct cdap_req * cdap_req_create(cdap_key_t key);
+struct cdap_req * cdap_req_create(int fd,
+ cdap_key_t key);
void cdap_req_destroy(struct cdap_req * creq);