summaryrefslogtreecommitdiff
path: root/src/ipcpd/ipcp.c
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@intec.ugent.be>2016-10-26 09:56:31 +0000
committerdimitri staessens <dimitri.staessens@intec.ugent.be>2016-10-26 09:56:31 +0000
commitcc64e52dee3559128293a17a669e94acb48f9309 (patch)
treee4ef544c225e3b118c8a73d868dccaa073b55f11 /src/ipcpd/ipcp.c
parent0fd97235ecf670f1fc6db2723c530934b5376458 (diff)
parentf0646875d0bc941e339d305d0c68b13543cd6f2a (diff)
downloadouroboros-cc64e52dee3559128293a17a669e94acb48f9309.tar.gz
ouroboros-cc64e52dee3559128293a17a669e94acb48f9309.zip
Merged in sandervrijders/ouroboros/be-directory (pull request #280)
lib, irmd, ipcpd: Add name querying to IPCPs
Diffstat (limited to 'src/ipcpd/ipcp.c')
-rw-r--r--src/ipcpd/ipcp.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/ipcpd/ipcp.c b/src/ipcpd/ipcp.c
index c2d343f8..90fb94ef 100644
--- a/src/ipcpd/ipcp.c
+++ b/src/ipcpd/ipcp.c
@@ -20,7 +20,11 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+
+#define OUROBOROS_PREFIX "ipcpd/ipcp"
+
#include <ouroboros/config.h>
+#include <ouroboros/logs.h>
#include <ouroboros/time_utils.h>
#include <ouroboros/utils.h>
#include <ouroboros/sockets.h>
@@ -28,13 +32,11 @@
#include <ouroboros/dev.h>
#include <ouroboros/np1_flow.h>
-#define OUROBOROS_PREFIX "ipcpd/ipcp"
-#include <ouroboros/logs.h>
+#include "ipcp.h"
#include <string.h>
#include <sys/socket.h>
#include <stdlib.h>
-#include "ipcp.h"
int ipcp_init(enum ipcp_type type, struct ipcp_ops * ops)
{
@@ -307,6 +309,15 @@ void * ipcp_main_loop(void * o)
ret_msg.result =
ipcpi.ops->ipcp_name_unreg(msg->name);
break;
+ case IPCP_MSG_CODE__IPCP_NAME_QUERY:
+ if (ipcpi.ops->ipcp_name_query == NULL) {
+ LOG_ERR("Ap_query unsupported.");
+ break;
+ }
+ ret_msg.has_result = true;
+ ret_msg.result =
+ ipcpi.ops->ipcp_name_query(msg->name);
+ break;
case IPCP_MSG_CODE__IPCP_FLOW_ALLOC:
if (ipcpi.ops->ipcp_flow_alloc == NULL) {
LOG_ERR("Flow_alloc unsupported.");