summaryrefslogtreecommitdiff
path: root/src/ipcpd
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri.staessens@ugent.be>2018-03-22 11:02:15 +0100
committerSander Vrijders <sander.vrijders@ugent.be>2018-03-22 12:36:58 +0100
commit751fb58bcf5fdb31c0627a5153684e96126cffb6 (patch)
tree5c4e8d8b2b2b323738703644c422a7e6c7095d5e /src/ipcpd
parentfd5508b8daec47e9f646c086d4cc310583154b97 (diff)
downloadouroboros-751fb58bcf5fdb31c0627a5153684e96126cffb6.tar.gz
ouroboros-751fb58bcf5fdb31c0627a5153684e96126cffb6.zip
lib: Simplify reg/unreg API
The reg/unreg API is simplified to registering and unregistering a single name with a single IPCP. The functionality associated with registering names was moved from the IRMd to the irm tool. The function to list IPCPs was simplified to return all IPCPs in the system with their basic properties needed for management. The above changes led to some needed changes in the irm tool and the management functions that were depending on the previous behaviour of list_ipcps. Command line functionality to list IPCPs in the system is also added to the irm tool. Some older code was refactored. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
Diffstat (limited to 'src/ipcpd')
-rw-r--r--src/ipcpd/ipcp.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/ipcpd/ipcp.c b/src/ipcpd/ipcp.c
index b0ce87c5..d834997f 100644
--- a/src/ipcpd/ipcp.c
+++ b/src/ipcpd/ipcp.c
@@ -312,7 +312,7 @@ static void * mainloop(void * o)
break;
}
- ret_msg.result = ipcpi.ops->ipcp_enroll(msg->dst_name,
+ ret_msg.result = ipcpi.ops->ipcp_enroll(msg->dst,
&info);
if (ret_msg.result == 0) {
ret_msg.layer_info = &layer_info;
@@ -329,9 +329,8 @@ static void * mainloop(void * o)
break;
}
- ret_msg.result =
- ipcpi.ops->ipcp_connect(msg->dst_name,
- msg->comp_name);
+ ret_msg.result = ipcpi.ops->ipcp_connect(msg->dst,
+ msg->comp);
break;
case IPCP_MSG_CODE__IPCP_DISCONNECT:
ret_msg.has_result = true;
@@ -342,9 +341,8 @@ static void * mainloop(void * o)
break;
}
- ret_msg.result =
- ipcpi.ops->ipcp_disconnect(msg->dst_name,
- msg->comp_name);
+ ret_msg.result = ipcpi.ops->ipcp_disconnect(msg->dst,
+ msg->comp);
break;
case IPCP_MSG_CODE__IPCP_REG:
ret_msg.has_result = true;