diff options
author | dimitri staessens <[email protected]> | 2016-05-28 19:00:30 +0200 |
---|---|---|
committer | dimitri staessens <[email protected]> | 2016-05-28 19:11:39 +0200 |
commit | 97c1341690d998ef8d24abec5b83d6b03e312e0d (patch) | |
tree | 9416848007e9d554cd120871dda1c91cdc4958f2 /src/tools/irm | |
parent | c510fb625427a9329668f83ca115645fa1a36091 (diff) | |
download | ouroboros-97c1341690d998ef8d24abec5b83d6b03e312e0d.tar.gz ouroboros-97c1341690d998ef8d24abec5b83d6b03e312e0d.zip |
ipcpd: IPCP over local memory
This introduces an IPC process that relays data between two local AP's
over the shm_du_map. Only configuration it has is a DIF name.
It required small modification elsewhere:
lib: added support for the IPCP_LOCAL type
irm: added support for the IPCP_LOCAL type
dif_config: added the IPCP_LOCAL type
tools: added support for the IPCP_LOCAL type
Diffstat (limited to 'src/tools/irm')
-rw-r--r-- | src/tools/irm/irm_bootstrap_ipcp.c | 5 | ||||
-rw-r--r-- | src/tools/irm/irm_create_ipcp.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/tools/irm/irm_bootstrap_ipcp.c b/src/tools/irm/irm_bootstrap_ipcp.c index 64498384..5cf5f017 100644 --- a/src/tools/irm/irm_bootstrap_ipcp.c +++ b/src/tools/irm/irm_bootstrap_ipcp.c @@ -33,6 +33,7 @@ #define NORMAL "normal" #define SHIM_UDP "shim-udp" +#define LOCAL "local" #define DEFAULT_ADDR_SIZE 4 #define DEFAULT_CEP_ID_SIZE 2 @@ -53,7 +54,7 @@ static void usage() " [api <application process instance>]\n" " dif <DIF name>\n" " type [TYPE]\n\n" - "where TYPE = {" NORMAL " " SHIM_UDP "}\n\n" + "where TYPE = {" NORMAL " " LOCAL " " SHIM_UDP "}\n\n" "if TYPE == " NORMAL "\n" " [addr <address size> (default: %d)]\n" " [cep_id <CEP-id size> (default: %d)]\n" @@ -166,6 +167,8 @@ int do_bootstrap_ipcp(int argc, char ** argv) } conf.ip_addr = ip_addr; conf.dns_addr = dns_addr; + } else if (strcmp(ipcp_type, LOCAL) == 0) { + conf.type = IPCP_LOCAL; } else { usage(); return -1; diff --git a/src/tools/irm/irm_create_ipcp.c b/src/tools/irm/irm_create_ipcp.c index e82bd980..21438bd4 100644 --- a/src/tools/irm/irm_create_ipcp.c +++ b/src/tools/irm/irm_create_ipcp.c @@ -34,13 +34,14 @@ #define NORMAL "normal" #define SHIM_UDP "shim-udp" +#define LOCAL "local" static void usage() { printf("Usage: irm create_ipcp\n" " ap <application process name>\n" " type [TYPE]\n\n" - "where TYPE = {" NORMAL " " SHIM_UDP "}\n"); + "where TYPE = {" NORMAL " " LOCAL " " SHIM_UDP "}\n"); } int do_create_ipcp(int argc, char ** argv) @@ -73,6 +74,8 @@ int do_create_ipcp(int argc, char ** argv) type = IPCP_NORMAL; else if (strcmp(ipcp_type, SHIM_UDP) == 0) type = IPCP_SHIM_UDP; + else if (strcmp(ipcp_type, LOCAL) == 0) + type = IPCP_LOCAL; else { usage(); return -1; |