summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/dev.c26
-rw-r--r--src/lib/ipcpd_messages.proto11
-rw-r--r--src/lib/irmd_messages.proto9
3 files changed, 33 insertions, 13 deletions
diff --git a/src/lib/dev.c b/src/lib/dev.c
index a2ec836f..57dfc3f2 100644
--- a/src/lib/dev.c
+++ b/src/lib/dev.c
@@ -561,9 +561,10 @@ int flow_accept(qosspec_t * qs,
return fd;
}
-int flow_alloc(const char * dst,
- qosspec_t * qs,
- const struct timespec * timeo)
+static int __flow_alloc(const char * dst,
+ qosspec_t * qs,
+ const struct timespec * timeo,
+ bool join)
{
irm_msg_t msg = IRM_MSG__INIT;
qosspec_msg_t qs_msg = QOSSPEC_MSG__INIT;
@@ -574,7 +575,10 @@ int flow_alloc(const char * dst,
if (qs != NULL)
qs->ber = 1;
#endif
- msg.code = IRM_MSG_CODE__IRM_FLOW_ALLOC;
+ if (join)
+ msg.code = IRM_MSG_CODE__IRM_FLOW_JOIN;
+ else
+ msg.code = IRM_MSG_CODE__IRM_FLOW_ALLOC;
msg.dst = (char *) dst;
msg.has_pid = true;
msg.pid = ai.pid;
@@ -634,6 +638,20 @@ int flow_alloc(const char * dst,
return fd;
}
+int flow_alloc(const char * dst,
+ qosspec_t * qs,
+ const struct timespec * timeo)
+{
+ return __flow_alloc(dst, qs, timeo, false);
+}
+
+int flow_join(const char * dst,
+ qosspec_t * qs,
+ const struct timespec * timeo)
+{
+ return __flow_alloc(dst, qs, timeo, true);
+}
+
int flow_dealloc(int fd)
{
irm_msg_t msg = IRM_MSG__INIT;
diff --git a/src/lib/ipcpd_messages.proto b/src/lib/ipcpd_messages.proto
index ae1014ac..1793aee7 100644
--- a/src/lib/ipcpd_messages.proto
+++ b/src/lib/ipcpd_messages.proto
@@ -32,11 +32,12 @@ enum ipcp_msg_code {
IPCP_UNREG = 4;
IPCP_QUERY = 5;
IPCP_FLOW_ALLOC = 6;
- IPCP_FLOW_ALLOC_RESP = 7;
- IPCP_FLOW_DEALLOC = 8;
- IPCP_CONNECT = 9;
- IPCP_DISCONNECT = 10;
- IPCP_REPLY = 11;
+ IPCP_FLOW_JOIN = 7;
+ IPCP_FLOW_ALLOC_RESP = 8;
+ IPCP_FLOW_DEALLOC = 9;
+ IPCP_CONNECT = 10;
+ IPCP_DISCONNECT = 11;
+ IPCP_REPLY = 12;
};
message ipcp_msg {
diff --git a/src/lib/irmd_messages.proto b/src/lib/irmd_messages.proto
index 351b4a8e..9b935f57 100644
--- a/src/lib/irmd_messages.proto
+++ b/src/lib/irmd_messages.proto
@@ -43,10 +43,11 @@ enum irm_msg_code {
IRM_UNREG = 15;
IRM_FLOW_ALLOC = 16;
IRM_FLOW_ACCEPT = 17;
- IRM_FLOW_DEALLOC = 18;
- IPCP_FLOW_REQ_ARR = 19;
- IPCP_FLOW_ALLOC_REPLY = 20;
- IRM_REPLY = 21;
+ IRM_FLOW_JOIN = 18;
+ IRM_FLOW_DEALLOC = 19;
+ IPCP_FLOW_REQ_ARR = 20;
+ IPCP_FLOW_ALLOC_REPLY = 21;
+ IRM_REPLY = 22;
};
message ipcp_info_msg {