diff options
Diffstat (limited to 'src/irmd')
-rw-r--r-- | src/irmd/ipcp.c | 12 | ||||
-rw-r--r-- | src/irmd/ipcp.h | 3 | ||||
-rw-r--r-- | src/irmd/main.c | 8 |
3 files changed, 15 insertions, 8 deletions
diff --git a/src/irmd/ipcp.c b/src/irmd/ipcp.c index 20aee79f..19e68ee7 100644 --- a/src/irmd/ipcp.c +++ b/src/irmd/ipcp.c @@ -286,17 +286,21 @@ int ipcp_enroll(pid_t pid, int ipcp_connect(pid_t pid, const char * dst, - const char * component) + const char * component, + qosspec_t qs) { - ipcp_msg_t msg = IPCP_MSG__INIT; - ipcp_msg_t * recv_msg = NULL; - int ret = -1; + ipcp_msg_t msg = IPCP_MSG__INIT; + qosspec_msg_t qs_msg = QOSSPEC_MSG__INIT; + int ret = -1; + ipcp_msg_t * recv_msg; msg.code = IPCP_MSG_CODE__IPCP_CONNECT; msg.dst = (char *) dst; msg.comp = (char *) component; msg.has_pid = true; msg.pid = pid; + qs_msg = spec_to_msg(&qs); + msg.qosspec = &qs_msg; recv_msg = send_recv_ipcp_msg(pid, &msg); if (recv_msg == NULL) diff --git a/src/irmd/ipcp.h b/src/irmd/ipcp.h index 8d9686c2..07b9c44a 100644 --- a/src/irmd/ipcp.h +++ b/src/irmd/ipcp.h @@ -43,7 +43,8 @@ int ipcp_bootstrap(pid_t pid, int ipcp_connect(pid_t pid, const char * dst, - const char * component); + const char * component, + qosspec_t qs); int ipcp_disconnect(pid_t pid, const char * dst, diff --git a/src/irmd/main.c b/src/irmd/main.c index 673e47db..9ddcbbbc 100644 --- a/src/irmd/main.c +++ b/src/irmd/main.c @@ -604,7 +604,8 @@ static int enroll_ipcp(pid_t pid, static int connect_ipcp(pid_t pid, const char * dst, - const char * component) + const char * component, + qosspec_t qs) { struct ipcp_entry * entry = NULL; @@ -627,7 +628,7 @@ static int connect_ipcp(pid_t pid, log_dbg("Connecting %s to %s.", component, dst); - if (ipcp_connect(pid, dst, component)) { + if (ipcp_connect(pid, dst, component, qs)) { log_err("Could not connect IPCP."); return -EPERM; } @@ -1928,7 +1929,8 @@ static void * mainloop(void * o) result = enroll_ipcp(msg->pid, msg->dst); break; case IRM_MSG_CODE__IRM_CONNECT_IPCP: - result = connect_ipcp(msg->pid, msg->dst, msg->comp); + result = connect_ipcp(msg->pid, msg->dst, msg->comp, + msg_to_spec(msg->qosspec)); break; case IRM_MSG_CODE__IRM_DISCONNECT_IPCP: result = disconnect_ipcp(msg->pid, msg->dst, msg->comp); |