summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/ouroboros/irm.h4
-rw-r--r--include/ouroboros/protobuf.h2
-rw-r--r--src/irmd/main.c8
-rw-r--r--src/lib/irm.c2
-rw-r--r--src/lib/pb/irm.proto4
-rw-r--r--src/tools/irm/irm_bind_ipcp.c10
-rw-r--r--src/tools/irm/irm_ipcp_bootstrap.c46
-rw-r--r--src/tools/irm/irm_ipcp_connect.c20
-rw-r--r--src/tools/irm/irm_ipcp_destroy.c8
-rw-r--r--src/tools/irm/irm_ipcp_disconnect.c16
-rw-r--r--src/tools/irm/irm_ipcp_enroll.c28
-rw-r--r--src/tools/irm/irm_ipcp_list.c12
-rw-r--r--src/tools/irm/irm_name_reg.c22
-rw-r--r--src/tools/irm/irm_name_unreg.c16
-rw-r--r--src/tools/irm/irm_unbind_ipcp.c10
15 files changed, 104 insertions, 104 deletions
diff --git a/include/ouroboros/irm.h b/include/ouroboros/irm.h
index 7fcf5357..d0c7e147 100644
--- a/include/ouroboros/irm.h
+++ b/include/ouroboros/irm.h
@@ -42,7 +42,7 @@ enum pol_balance {
LB_INVALID
};
-struct ipcp_info {
+struct ipcp_list_info {
pid_t pid;
enum ipcp_type type;
char name[NAME_SIZE];
@@ -61,7 +61,7 @@ pid_t irm_create_ipcp(const char * name,
int irm_destroy_ipcp(pid_t pid);
-ssize_t irm_list_ipcps(struct ipcp_info ** ipcps);
+ssize_t irm_list_ipcps(struct ipcp_list_info ** ipcps);
int irm_enroll_ipcp(pid_t pid,
const char * dst);
diff --git a/include/ouroboros/protobuf.h b/include/ouroboros/protobuf.h
index c20ad8ca..da5d58fd 100644
--- a/include/ouroboros/protobuf.h
+++ b/include/ouroboros/protobuf.h
@@ -39,7 +39,7 @@ typedef UniConfigMsg uni_config_msg_t;
typedef IpcpMsg ipcp_msg_t;
#include "irm.pb-c.h"
-typedef IpcpInfoMsg ipcp_info_msg_t;
+typedef IpcpListMsg ipcp_list_msg_t;
typedef NameInfoMsg name_info_msg_t;
#include "qos.pb-c.h"
diff --git a/src/irmd/main.c b/src/irmd/main.c
index f9423f4b..b97791a4 100644
--- a/src/irmd/main.c
+++ b/src/irmd/main.c
@@ -940,14 +940,14 @@ static int unbind_process(pid_t pid,
return 0;
}
-static int get_ipcp_info(ipcp_info_msg_t ** msg,
+static int get_ipcp_info(ipcp_list_msg_t ** msg,
struct reg_ipcp * ipcp)
{
*msg = malloc(sizeof(**msg));
if (*msg == NULL)
goto fail;
- ipcp_info_msg__init(*msg);
+ ipcp_list_msg__init(*msg);
(*msg)->name = strdup(ipcp->name);
if ((*msg)->name == NULL)
@@ -972,7 +972,7 @@ static int get_ipcp_info(ipcp_info_msg_t ** msg,
return -1;
}
-static ssize_t list_ipcps(ipcp_info_msg_t *** ipcps,
+static ssize_t list_ipcps(ipcp_list_msg_t *** ipcps,
size_t * n_ipcps)
{
struct list_head * p;
@@ -1007,7 +1007,7 @@ static ssize_t list_ipcps(ipcp_info_msg_t *** ipcps,
fail:
pthread_rwlock_unlock(&irmd.reg_lock);
while (i > 0)
- ipcp_info_msg__free_unpacked((*ipcps)[--i], NULL);
+ ipcp_list_msg__free_unpacked((*ipcps)[--i], NULL);
free(*ipcps);
*n_ipcps = 0;
diff --git a/src/lib/irm.c b/src/lib/irm.c
index 75071260..4c744e8a 100644
--- a/src/lib/irm.c
+++ b/src/lib/irm.c
@@ -190,7 +190,7 @@ int irm_disconnect_ipcp(pid_t pid,
return ret;
}
-ssize_t irm_list_ipcps(struct ipcp_info ** ipcps)
+ssize_t irm_list_ipcps(struct ipcp_list_info ** ipcps)
{
irm_msg_t msg = IRM_MSG__INIT;
irm_msg_t * recv_msg;
diff --git a/src/lib/pb/irm.proto b/src/lib/pb/irm.proto
index 49afa2e4..f910baeb 100644
--- a/src/lib/pb/irm.proto
+++ b/src/lib/pb/irm.proto
@@ -53,7 +53,7 @@ enum irm_msg_code {
IRM_REPLY = 25;
}
-message ipcp_info_msg {
+message ipcp_list_msg {
required uint32 pid = 1;
required uint32 type = 2;
required string name = 3;
@@ -80,7 +80,7 @@ message irm_msg {
optional qosspec_msg qosspec = 12;
optional ipcp_config_msg conf = 13;
optional uint32 opts = 14;
- repeated ipcp_info_msg ipcps = 15;
+ repeated ipcp_list_msg ipcps = 15;
repeated name_info_msg names = 16;
optional uint32 timeo_sec = 17;
optional uint32 timeo_nsec = 18;
diff --git a/src/tools/irm/irm_bind_ipcp.c b/src/tools/irm/irm_bind_ipcp.c
index 622c2447..52fc9905 100644
--- a/src/tools/irm/irm_bind_ipcp.c
+++ b/src/tools/irm/irm_bind_ipcp.c
@@ -55,11 +55,11 @@ static void usage(void)
int do_bind_ipcp(int argc,
char ** argv)
{
- char * ipcp = NULL;
- char * name = NULL;
- struct ipcp_info * ipcps;
- ssize_t len;
- ssize_t i;
+ char * ipcp = NULL;
+ char * name = NULL;
+ struct ipcp_list_info * ipcps;
+ ssize_t len;
+ ssize_t i;
while (argc > 0) {
if (matches(*argv, "name") == 0) {
diff --git a/src/tools/irm/irm_ipcp_bootstrap.c b/src/tools/irm/irm_ipcp_bootstrap.c
index 5d0ce680..87f8e09f 100644
--- a/src/tools/irm/irm_ipcp_bootstrap.c
+++ b/src/tools/irm/irm_ipcp_bootstrap.c
@@ -136,29 +136,29 @@ static void usage(void)
int do_bootstrap_ipcp(int argc,
char ** argv)
{
- char * ipcp = NULL;
- pid_t pid = -1;
- struct ipcp_config conf;
- uint8_t addr_size = DEFAULT_ADDR_SIZE;
- uint8_t eid_size = DEFAULT_EID_SIZE;
- uint8_t max_ttl = DEFAULT_TTL;
- enum pol_addr_auth addr_auth_type = DEFAULT_ADDR_AUTH;
- enum pol_routing routing_type = DEFAULT_ROUTING;
- enum pol_dir_hash hash_algo = DEFAULT_HASH_ALGO;
- enum pol_cong_avoid cong_avoid = DEFAULT_CONG_AVOID;
- uint32_t ip_addr = 0;
- uint32_t dns_addr = DEFAULT_DDNS;
- char * ipcp_type = NULL;
- enum ipcp_type type = IPCP_INVALID;
- char * layer = NULL;
- char * dev = NULL;
- uint16_t ethertype = DEFAULT_ETHERTYPE;
- struct ipcp_info * ipcps;
- ssize_t len = 0;
- int i = 0;
- bool autobind = false;
- int cargs;
- int port = DEFAULT_UDP_PORT;
+ char * ipcp = NULL;
+ pid_t pid = -1;
+ struct ipcp_config conf;
+ uint8_t addr_size = DEFAULT_ADDR_SIZE;
+ uint8_t eid_size = DEFAULT_EID_SIZE;
+ uint8_t max_ttl = DEFAULT_TTL;
+ enum pol_addr_auth addr_auth_type = DEFAULT_ADDR_AUTH;
+ enum pol_routing routing_type = DEFAULT_ROUTING;
+ enum pol_dir_hash hash_algo = DEFAULT_HASH_ALGO;
+ enum pol_cong_avoid cong_avoid = DEFAULT_CONG_AVOID;
+ uint32_t ip_addr = 0;
+ uint32_t dns_addr = DEFAULT_DDNS;
+ char * ipcp_type = NULL;
+ enum ipcp_type type = IPCP_INVALID;
+ char * layer = NULL;
+ char * dev = NULL;
+ uint16_t ethertype = DEFAULT_ETHERTYPE;
+ struct ipcp_list_info * ipcps;
+ ssize_t len = 0;
+ int i = 0;
+ bool autobind = false;
+ int cargs;
+ int port = DEFAULT_UDP_PORT;
while (argc > 0) {
cargs = 2;
diff --git a/src/tools/irm/irm_ipcp_connect.c b/src/tools/irm/irm_ipcp_connect.c
index 4ce62e2c..c1b2a1d1 100644
--- a/src/tools/irm/irm_ipcp_connect.c
+++ b/src/tools/irm/irm_ipcp_connect.c
@@ -64,16 +64,16 @@ static void usage(void)
int do_connect_ipcp(int argc,
char ** argv)
{
- char * ipcp = NULL;
- char * dst = NULL;
- char * comp = "*";
- char * component = NULL;
- char * qos = NULL;
- struct ipcp_info * ipcps;
- ssize_t len = 0;
- pid_t pid = -1;
- ssize_t i;
- qosspec_t qs = qos_raw;
+ char * ipcp = NULL;
+ char * dst = NULL;
+ char * comp = "*";
+ char * component = NULL;
+ char * qos = NULL;
+ struct ipcp_list_info * ipcps;
+ ssize_t len = 0;
+ pid_t pid = -1;
+ ssize_t i;
+ qosspec_t qs = qos_raw;
while (argc > 0) {
if (matches(*argv, "name") == 0) {
diff --git a/src/tools/irm/irm_ipcp_destroy.c b/src/tools/irm/irm_ipcp_destroy.c
index 6ba7fea5..72e2b2e5 100644
--- a/src/tools/irm/irm_ipcp_destroy.c
+++ b/src/tools/irm/irm_ipcp_destroy.c
@@ -55,10 +55,10 @@ static void usage(void)
int do_destroy_ipcp(int argc,
char ** argv)
{
- char * ipcp = NULL;
- struct ipcp_info * ipcps;
- ssize_t len;
- int i;
+ char * ipcp = NULL;
+ struct ipcp_list_info * ipcps;
+ ssize_t len;
+ int i;
while (argc > 0) {
if (matches(*argv, "name") == 0) {
diff --git a/src/tools/irm/irm_ipcp_disconnect.c b/src/tools/irm/irm_ipcp_disconnect.c
index f82f884b..c591a9fe 100644
--- a/src/tools/irm/irm_ipcp_disconnect.c
+++ b/src/tools/irm/irm_ipcp_disconnect.c
@@ -60,14 +60,14 @@ static void usage(void)
int do_disconnect_ipcp(int argc,
char ** argv)
{
- char * ipcp = NULL;
- char * dst = NULL;
- char * comp = "*";
- char * component = NULL;
- struct ipcp_info * ipcps;
- ssize_t len = 0;
- pid_t pid = -1;
- ssize_t i;
+ char * ipcp = NULL;
+ char * dst = NULL;
+ char * comp = "*";
+ char * component = NULL;
+ struct ipcp_list_info * ipcps;
+ ssize_t len = 0;
+ pid_t pid = -1;
+ ssize_t i;
while (argc > 0) {
if (matches(*argv, "name") == 0) {
diff --git a/src/tools/irm/irm_ipcp_enroll.c b/src/tools/irm/irm_ipcp_enroll.c
index ef020b79..63f740fe 100644
--- a/src/tools/irm/irm_ipcp_enroll.c
+++ b/src/tools/irm/irm_ipcp_enroll.c
@@ -63,9 +63,9 @@ static void usage(void)
static int get_layer_name(const char * ipcp,
char * layer_name)
{
- struct ipcp_info * ipcps;
- ssize_t len;
- ssize_t i;
+ struct ipcp_list_info * ipcps;
+ ssize_t len;
+ ssize_t i;
len = irm_list_ipcps(&ipcps);
for (i = 0; i < len; i++)
@@ -83,17 +83,17 @@ static int get_layer_name(const char * ipcp,
int do_enroll_ipcp(int argc,
char ** argv)
{
- char * ipcp = NULL;
- char * layer = NULL;
- char * dst = NULL;
- struct ipcp_info * ipcps;
- pid_t pid = -1;
- ssize_t len = 0;
- int i = 0;
- bool autobind = false;
- int cargs;
- char * ipcp_type = UNICAST;
- enum ipcp_type type = IPCP_INVALID;
+ char * ipcp = NULL;
+ char * layer = NULL;
+ char * dst = NULL;
+ struct ipcp_list_info * ipcps;
+ pid_t pid = -1;
+ ssize_t len = 0;
+ int i = 0;
+ bool autobind = false;
+ int cargs;
+ char * ipcp_type = UNICAST;
+ enum ipcp_type type = IPCP_INVALID;
while (argc > 0) {
cargs = 2;
diff --git a/src/tools/irm/irm_ipcp_list.c b/src/tools/irm/irm_ipcp_list.c
index cc261f1e..5581cef6 100644
--- a/src/tools/irm/irm_ipcp_list.c
+++ b/src/tools/irm/irm_ipcp_list.c
@@ -86,12 +86,12 @@ static char * str_type(enum ipcp_type type)
int do_list_ipcp(int argc,
char ** argv)
{
- char * ipcp_type = NULL;
- char * ipcp_name = NULL;
- enum ipcp_type type = -1;
- struct ipcp_info * ipcps;
- ssize_t len;
- ssize_t i;
+ char * ipcp_type = NULL;
+ char * ipcp_name = NULL;
+ enum ipcp_type type = -1;
+ struct ipcp_list_info * ipcps;
+ ssize_t len;
+ ssize_t i;
while (argc > 0) {
if (matches(*argv, "type") == 0) {
diff --git a/src/tools/irm/irm_name_reg.c b/src/tools/irm/irm_name_reg.c
index d023ae24..65bec5b0 100644
--- a/src/tools/irm/irm_name_reg.c
+++ b/src/tools/irm/irm_name_reg.c
@@ -64,17 +64,17 @@ static void usage(void)
int do_reg_name(int argc,
char ** argv)
{
- char * name = NULL;
- char * layers[MAX_LAYERS];
- size_t layers_len = 0;
- char * ipcp[MAX_IPCPS];
- size_t ipcp_len = 0;
- struct ipcp_info * ipcps;
- ssize_t ipcps_len;
- struct name_info * names;
- ssize_t names_len;
- bool name_create = true;
- ssize_t i;
+ char * name = NULL;
+ char * layers[MAX_LAYERS];
+ size_t layers_len = 0;
+ char * ipcp[MAX_IPCPS];
+ size_t ipcp_len = 0;
+ struct ipcp_list_info * ipcps;
+ ssize_t ipcps_len;
+ struct name_info * names;
+ ssize_t names_len;
+ bool name_create = true;
+ ssize_t i;
name = *(argv++);
--argc;
diff --git a/src/tools/irm/irm_name_unreg.c b/src/tools/irm/irm_name_unreg.c
index 568528e8..6b7771b4 100644
--- a/src/tools/irm/irm_name_unreg.c
+++ b/src/tools/irm/irm_name_unreg.c
@@ -63,14 +63,14 @@ static void usage(void)
int do_unreg_name(int argc,
char ** argv)
{
- char * name = NULL;
- char * layers[MAX_LAYERS];
- size_t layers_len = 0;
- char * ipcp[MAX_IPCPS];
- size_t ipcp_len = 0;
- struct ipcp_info * ipcps;
- ssize_t len;
- size_t i;
+ char * name = NULL;
+ char * layers[MAX_LAYERS];
+ size_t layers_len = 0;
+ char * ipcp[MAX_IPCPS];
+ size_t ipcp_len = 0;
+ struct ipcp_list_info * ipcps;
+ ssize_t len;
+ size_t i;
name = *(argv++);
--argc;
diff --git a/src/tools/irm/irm_unbind_ipcp.c b/src/tools/irm/irm_unbind_ipcp.c
index c25bcdcd..d7284e05 100644
--- a/src/tools/irm/irm_unbind_ipcp.c
+++ b/src/tools/irm/irm_unbind_ipcp.c
@@ -57,11 +57,11 @@ static void usage(void)
int do_unbind_ipcp(int argc,
char ** argv)
{
- char * ipcp = NULL;
- char * name = NULL;
- struct ipcp_info * ipcps;
- ssize_t len;
- ssize_t i;
+ char * ipcp = NULL;
+ char * name = NULL;
+ struct ipcp_list_info * ipcps;
+ ssize_t len;
+ ssize_t i;
while (argc > 0) {
if (matches(*argv, "name") == 0) {