summaryrefslogtreecommitdiff
path: root/src/irmd/main.c
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri.staessens@intec.ugent.be>2016-03-31 18:49:02 +0200
committerDimitri Staessens <dimitri.staessens@intec.ugent.be>2016-03-31 18:49:02 +0200
commit0e1aeba4f2d2de3ce827bfaeb1d9f2480e628529 (patch)
tree5d13c9aa547018f70adfa054076fc4af8099b04b /src/irmd/main.c
parent2d745f91629ff9e6748a2f8e94a82fd75d14a505 (diff)
parent151adbc851c9b2a218f2be9409199c1baa62bd8d (diff)
downloadouroboros-0e1aeba4f2d2de3ce827bfaeb1d9f2480e628529.tar.gz
ouroboros-0e1aeba4f2d2de3ce827bfaeb1d9f2480e628529.zip
Merged in sandervrijders/ouroboros/be-ipcp (pull request #50)
lib: Implementation of flow related ops
Diffstat (limited to 'src/irmd/main.c')
-rw-r--r--src/irmd/main.c36
1 files changed, 34 insertions, 2 deletions
diff --git a/src/irmd/main.c b/src/irmd/main.c
index af0f85e2..0256248b 100644
--- a/src/irmd/main.c
+++ b/src/irmd/main.c
@@ -165,8 +165,7 @@ static int enroll_ipcp(instance_name_t * api,
n_1_difs_size = da_resolve_dap(member, n_1_difs);
if (n_1_difs_size != 0)
- if (ipcp_enroll(pid, dif_name, member,
- n_1_difs, n_1_difs_size)) {
+ if (ipcp_enroll(pid, member, n_1_difs[0])) {
LOG_ERR("Could not enroll IPCP");
return -1;
}
@@ -268,6 +267,24 @@ static int flow_cntl(int fd,
return -1;
}
+static int flow_req_arr(uint32_t reg_api_id,
+ char * ap_name,
+ char * ae_name)
+{
+ return -1;
+}
+
+static int flow_alloc_reply(uint32_t port_id,
+ int result)
+{
+ return -1;
+}
+
+static int flow_dealloc_ipcp(uint32_t port_id)
+{
+ return -1;
+}
+
/* FIXME: Close sockfd on closing and release irm */
int main()
{
@@ -391,6 +408,21 @@ int main()
ret_msg.result = flow_cntl(msg->fd,
msg->oflags);
break;
+ case IRM_MSG_CODE__IPCP_FLOW_REQ_ARR:
+ ret_msg.has_fd = true;
+ ret_msg.fd = flow_req_arr(msg->port_id,
+ msg->ap_name,
+ msg->ae_name);
+ break;
+ case IRM_MSG_CODE__IPCP_FLOW_ALLOC_REPLY:
+ ret_msg.has_result = true;
+ ret_msg.result = flow_alloc_reply(msg->port_id,
+ msg->result);
+ break;
+ case IRM_MSG_CODE__IPCP_FLOW_DEALLOC:
+ ret_msg.has_result = true;
+ ret_msg.result = flow_dealloc_ipcp(msg->port_id);
+ break;
default:
LOG_ERR("Don't know that message code");
break;