summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/ouroboros/ipcp.h3
-rw-r--r--src/ipcpd/ipcp-ops.h3
-rw-r--r--src/ipcpd/ipcp.c3
-rw-r--r--src/irmd/main.c14
-rw-r--r--src/lib/ipcp.c12
-rw-r--r--src/lib/ipcpd_messages.proto27
6 files changed, 22 insertions, 40 deletions
diff --git a/include/ouroboros/ipcp.h b/include/ouroboros/ipcp.h
index 74a8cc77..0ce95b1e 100644
--- a/include/ouroboros/ipcp.h
+++ b/include/ouroboros/ipcp.h
@@ -37,8 +37,7 @@ pid_t ipcp_create(enum ipcp_type ipcp_type);
int ipcp_destroy(pid_t api);
int ipcp_enroll(pid_t api,
- char * dif_name,
- char * n_1_dif);
+ char * dif_name);
int ipcp_bootstrap(pid_t api,
dif_config_msg_t * conf);
diff --git a/src/ipcpd/ipcp-ops.h b/src/ipcpd/ipcp-ops.h
index 8f444a79..e43c2c38 100644
--- a/src/ipcpd/ipcp-ops.h
+++ b/src/ipcpd/ipcp-ops.h
@@ -30,8 +30,7 @@
struct ipcp_ops {
int (* ipcp_bootstrap)(struct dif_config * conf);
- int (* ipcp_enroll)(char * dif_name,
- char * n_1_dif);
+ int (* ipcp_enroll)(char * dif_name);
int (* ipcp_name_reg)(char * name);
int (* ipcp_name_unreg)(char * name);
int (* ipcp_flow_alloc)(pid_t n_api,
diff --git a/src/ipcpd/ipcp.c b/src/ipcpd/ipcp.c
index 444d17bb..fb31cf1b 100644
--- a/src/ipcpd/ipcp.c
+++ b/src/ipcpd/ipcp.c
@@ -184,8 +184,7 @@ void * ipcp_main_loop(void * o)
}
ret_msg.has_result = true;
ret_msg.result =
- _ipcp->ops->ipcp_enroll(msg->dif_name,
- msg->n_1_dif);
+ _ipcp->ops->ipcp_enroll(msg->dif_name);
break;
case IPCP_MSG_CODE__IPCP_NAME_REG:
diff --git a/src/irmd/main.c b/src/irmd/main.c
index 30ecbc59..17e51c05 100644
--- a/src/irmd/main.c
+++ b/src/irmd/main.c
@@ -422,8 +422,6 @@ static int bootstrap_ipcp(pid_t api,
static int enroll_ipcp(pid_t api,
char * dif_name)
{
- char ** n_1_difs = NULL;
- ssize_t n_1_difs_size = 0;
struct ipcp_entry * entry = NULL;
pthread_rwlock_rdlock(&instance->state_lock);
@@ -451,17 +449,7 @@ static int enroll_ipcp(pid_t api,
return -1;
}
- n_1_difs_size = nsm_resolve(dif_name, n_1_difs);
- if (n_1_difs_size < 1) {
- free(entry->dif_name);
- entry->dif_name = NULL;
- pthread_rwlock_unlock(&instance->reg_lock);
- pthread_rwlock_unlock(&instance->state_lock);
- LOG_ERR("Could not find N-1 DIFs.");
- return -1;
- }
-
- if (ipcp_enroll(api, dif_name, n_1_difs[0])) {
+ if (ipcp_enroll(api, dif_name)) {
free(entry->dif_name);
entry->dif_name = NULL;
pthread_rwlock_unlock(&instance->reg_lock);
diff --git a/src/lib/ipcp.c b/src/lib/ipcp.c
index 3fd31f37..373baafd 100644
--- a/src/lib/ipcp.c
+++ b/src/lib/ipcp.c
@@ -221,20 +221,18 @@ int ipcp_bootstrap(pid_t api,
return ret;
}
-int ipcp_enroll(pid_t api,
- char * dif_name,
- char * n_1_dif)
+int ipcp_enroll(pid_t api,
+ char * dif_name)
{
ipcp_msg_t msg = IPCP_MSG__INIT;
ipcp_msg_t * recv_msg = NULL;
int ret = -1;
- if (n_1_dif == NULL || dif_name == NULL)
+ if (dif_name == NULL)
return -EINVAL;
msg.code = IPCP_MSG_CODE__IPCP_ENROLL;
msg.dif_name = dif_name;
- msg.n_1_dif = n_1_dif;
recv_msg = send_recv_ipcp_msg(api, &msg);
if (recv_msg == NULL) {
@@ -252,8 +250,8 @@ int ipcp_enroll(pid_t api,
return ret;
}
-int ipcp_name_reg(pid_t api,
- char * name)
+int ipcp_name_reg(pid_t api,
+ char * name)
{
ipcp_msg_t msg = IPCP_MSG__INIT;
ipcp_msg_t * recv_msg = NULL;
diff --git a/src/lib/ipcpd_messages.proto b/src/lib/ipcpd_messages.proto
index eb764e18..6361c461 100644
--- a/src/lib/ipcpd_messages.proto
+++ b/src/lib/ipcpd_messages.proto
@@ -14,18 +14,17 @@ enum ipcp_msg_code {
message ipcp_msg {
required ipcp_msg_code code = 1;
optional string dif_name = 2;
- optional string n_1_dif = 3;
- repeated string dif_names = 4;
- optional int32 len = 5;
- optional string name = 6;
- optional sint32 port_id = 7;
- optional string dst_name = 8;
- optional string src_ap_name = 9;
- optional string src_ae_name = 10;
- optional sint32 qos_cube = 11;
- optional dif_config_msg conf = 12;
- optional sint32 fd = 13;
- optional sint32 api = 14;
- optional sint32 response = 15;
- optional sint32 result = 16;
+ repeated string dif_names = 3;
+ optional int32 len = 4;
+ optional string name = 5;
+ optional sint32 port_id = 6;
+ optional string dst_name = 7;
+ optional string src_ap_name = 8;
+ optional string src_ae_name = 9;
+ optional sint32 qos_cube = 10;
+ optional dif_config_msg conf = 11;
+ optional sint32 fd = 12;
+ optional sint32 api = 13;
+ optional sint32 response = 14;
+ optional sint32 result = 15;
};