summaryrefslogtreecommitdiff
path: root/src/irmd/ipcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/irmd/ipcp.c')
-rw-r--r--src/irmd/ipcp.c38
1 files changed, 31 insertions, 7 deletions
diff --git a/src/irmd/ipcp.c b/src/irmd/ipcp.c
index 7f3f4807..08547d01 100644
--- a/src/irmd/ipcp.c
+++ b/src/irmd/ipcp.c
@@ -435,12 +435,13 @@ int ipcp_query(pid_t pid,
return ret;
}
-int ipcp_flow_alloc(pid_t pid,
- int flow_id,
- pid_t n_pid,
- const uint8_t * dst,
- size_t len,
- qosspec_t qs)
+static int __ipcp_flow_alloc(pid_t pid,
+ int flow_id,
+ pid_t n_pid,
+ const uint8_t * dst,
+ size_t len,
+ qosspec_t qs,
+ bool join)
{
ipcp_msg_t msg = IPCP_MSG__INIT;
qosspec_msg_t qs_msg;
@@ -449,7 +450,10 @@ int ipcp_flow_alloc(pid_t pid,
assert(dst);
- msg.code = IPCP_MSG_CODE__IPCP_FLOW_ALLOC;
+ if (join)
+ msg.code = IPCP_MSG_CODE__IPCP_FLOW_JOIN;
+ else
+ msg.code = IPCP_MSG_CODE__IPCP_FLOW_ALLOC;
msg.has_flow_id = true;
msg.flow_id = flow_id;
msg.has_pid = true;
@@ -475,6 +479,26 @@ int ipcp_flow_alloc(pid_t pid,
return ret;
}
+int ipcp_flow_alloc(pid_t pid,
+ int flow_id,
+ pid_t n_pid,
+ const uint8_t * dst,
+ size_t len,
+ qosspec_t qs)
+{
+ return __ipcp_flow_alloc(pid, flow_id, n_pid, dst, len, qs, false);
+}
+
+int ipcp_flow_join(pid_t pid,
+ int flow_id,
+ pid_t n_pid,
+ const uint8_t * dst,
+ size_t len,
+ qosspec_t qs)
+{
+ return __ipcp_flow_alloc(pid, flow_id, n_pid, dst, len, qs, true);
+}
+
int ipcp_flow_alloc_resp(pid_t pid,
int flow_id,
pid_t n_pid,