summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDimitri Staessens <[email protected]>2017-12-18 20:50:04 +0100
committerSander Vrijders <[email protected]>2017-12-19 10:27:02 +0100
commite5cc7fbcf165ef9c205b6c136f239f645a8d7830 (patch)
tree334120a6cc6dcbe240076b3957233da337bf7ad2 /src
parentd654c997f142b22e2529dc0fb9fab4f799f7ef56 (diff)
downloadouroboros-e5cc7fbcf165ef9c205b6c136f239f645a8d7830.tar.gz
ouroboros-e5cc7fbcf165ef9c205b6c136f239f645a8d7830.zip
ipcpd: Use the term "layer" and deprecate "shim"
This changes the terminology to use layer instead of DIF and deprecate the word "shim" for the IPCPs that attach to Ethernet LLC and UDP .The terminology has not yet been changed in the variable names etc. This reflects the design choices in Ouroboros to make IPCPs pure resource allocators instead of also providing an "IPC service". The Ouroboros IPCPs that attach to Ethernet and UDP implement the allocator and are thus not really shims. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/ipcpd/CMakeLists.txt4
-rw-r--r--src/ipcpd/config.h.in4
-rw-r--r--src/ipcpd/eth-llc/CMakeLists.txt (renamed from src/ipcpd/shim-eth-llc/CMakeLists.txt)38
-rw-r--r--src/ipcpd/eth-llc/main.c (renamed from src/ipcpd/shim-eth-llc/main.c)10
-rw-r--r--src/ipcpd/ipcp.c8
-rw-r--r--src/ipcpd/local/CMakeLists.txt4
-rw-r--r--src/ipcpd/normal/main.c4
-rw-r--r--src/ipcpd/normal/pol/flat.c1
-rw-r--r--src/ipcpd/udp/CMakeLists.txt (renamed from src/ipcpd/shim-udp/CMakeLists.txt)12
-rw-r--r--src/ipcpd/udp/main.c (renamed from src/ipcpd/shim-udp/main.c)10
-rw-r--r--src/irmd/config.h.in4
-rw-r--r--src/irmd/ipcp.c8
-rw-r--r--src/irmd/main.c6
-rw-r--r--src/irmd/registry.h2
-rw-r--r--src/lib/ipcp_config.proto4
-rw-r--r--src/lib/irm.c4
-rw-r--r--src/tools/irm/irm_ipcp_bootstrap.c24
-rw-r--r--src/tools/irm/irm_ipcp_create.c20
-rw-r--r--src/tools/irm/irm_ipcp_enroll.c4
-rw-r--r--src/tools/irm/irm_register.c18
-rw-r--r--src/tools/irm/irm_unregister.c16
21 files changed, 102 insertions, 103 deletions
diff --git a/src/ipcpd/CMakeLists.txt b/src/ipcpd/CMakeLists.txt
index f43dba65..67d9fccf 100644
--- a/src/ipcpd/CMakeLists.txt
+++ b/src/ipcpd/CMakeLists.txt
@@ -34,8 +34,8 @@ set(IPCP_SOURCES
add_subdirectory(local)
add_subdirectory(normal)
add_subdirectory(raptor)
-add_subdirectory(shim-udp)
-add_subdirectory(shim-eth-llc)
+add_subdirectory(udp)
+add_subdirectory(eth-llc)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/config.h.in"
"${CMAKE_CURRENT_BINARY_DIR}/config.h" @ONLY)
diff --git a/src/ipcpd/config.h.in b/src/ipcpd/config.h.in
index 322c6856..0c0e2922 100644
--- a/src/ipcpd/config.h.in
+++ b/src/ipcpd/config.h.in
@@ -45,12 +45,12 @@
#define IPCP_SCHED_THR_MUL @IPCP_SCHED_THR_MUL@
#define PFT_SIZE @PFT_SIZE@
-/* shim-udp */
+/* udp */
#cmakedefine HAVE_DDNS
#define NSUPDATE_EXEC "@NSUPDATE_EXECUTABLE@"
#define NSLOOKUP_EXEC "@NSLOOKUP_EXECUTABLE@"
-/* shim-eth-llc */
+/* eth-llc */
#cmakedefine HAVE_NETMAP
#cmakedefine HAVE_BPF
#cmakedefine HAVE_RAW_SOCKETS
diff --git a/src/ipcpd/shim-eth-llc/CMakeLists.txt b/src/ipcpd/eth-llc/CMakeLists.txt
index e1eea2b5..11a631b3 100644
--- a/src/ipcpd/shim-eth-llc/CMakeLists.txt
+++ b/src/ipcpd/eth-llc/CMakeLists.txt
@@ -21,13 +21,13 @@ mark_as_advanced(NETMAP_C_INCLUDE_DIR)
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(DISABLE_RAW_SOCKETS FALSE CACHE BOOL
- "Disable raw socket support for LLC shim")
+ "Disable raw socket support for LLC IPCP")
if (NOT DISABLE_RAW_SOCKETS)
- message(STATUS "Raw socket support for shim-eth-llc enabled")
+ message(STATUS "Raw socket support for eth-llc enabled")
set(HAVE_RAW_SOCKETS TRUE PARENT_SCOPE)
set(HAVE_LLC TRUE)
else ()
- message(STATUS "Raw socket support for shim-eth-llc disabled by user")
+ message(STATUS "Raw socket support for eth-llc disabled by user")
unset(HAVE_RAW_SOCKETS)
unset(HAVE_LLC)
endif ()
@@ -43,15 +43,15 @@ if (NOT CMAKE_SYSTEM_NAME STREQUAL "Linux")
if (BPF_C_INCLUDE_DIR)
set(DISABLE_BPF FALSE CACHE BOOL
- "Disable Berkeley Packet Filter support for LLC shim")
+ "Disable Berkeley Packet Filter support for LLC IPCP")
if (NOT DISABLE_BPF)
message(STATUS "Berkeley Packet Filter support "
- "for shim-eth-llc enabled")
+ "for eth-llc enabled")
set(HAVE_BPF TRUE PARENT_SCOPE)
set(HAVE_LLC TRUE)
else ()
message(STATUS "Berkeley Packet Filter support "
- "for shim-eth-llc disabled by user")
+ "for eth-llc disabled by user")
unset(HAVE_BPF)
unset(HAVE_LLC)
endif ()
@@ -60,47 +60,47 @@ endif ()
if (NETMAP_C_INCLUDE_DIR)
set(DISABLE_NETMAP FALSE CACHE BOOL
- "Disable netmap support for LLC shim")
+ "Disable netmap support for LLC IPCP")
if (NOT DISABLE_NETMAP)
- message(STATUS "Netmap support for shim-eth-llc enabled")
+ message(STATUS "Netmap support for eth-llc enabled")
set(HAVE_NETMAP TRUE PARENT_SCOPE)
test_and_set_c_compiler_flag_global(-std=c99)
set(HAVE_LLC TRUE)
else ()
- message(STATUS "Netmap support for shim-eth-llc disabled by user")
+ message(STATUS "Netmap support for eth-llc disabled by user")
unset(HAVE_NETMAP)
unset(HAVE_LLC)
- unset(IPCP_SHIM_ETH_LLC_TARGET CACHE)
+ unset(IPCP_ETH_LLC_TARGET CACHE)
endif ()
endif ()
if (HAVE_LLC)
- message(STATUS "Supported raw Ethernet API found, building shim-eth-llc")
+ message(STATUS "Supported raw Ethernet API found, building eth-llc")
- set(SHIM_ETH_LLC_SOURCES
+ set(ETH_LLC_SOURCES
# Add source files here
${CMAKE_CURRENT_SOURCE_DIR}/main.c
)
- set(IPCP_SHIM_ETH_LLC_TARGET ipcpd-shim-eth-llc CACHE INTERNAL "")
+ set(IPCP_ETH_LLC_TARGET ipcpd-eth-llc CACHE INTERNAL "")
- add_executable(ipcpd-shim-eth-llc ${SHIM_ETH_LLC_SOURCES} ${IPCP_SOURCES})
+ add_executable(ipcpd-eth-llc ${ETH_LLC_SOURCES} ${IPCP_SOURCES})
if (HAVE_BPF AND NOT APPLE)
- target_include_directories(ipcpd-shim-eth-llc PUBLIC ${BPF_C_INCLUDE_DIR})
+ target_include_directories(ipcpd-eth-llc PUBLIC ${BPF_C_INCLUDE_DIR})
endif ()
if (HAVE_NETMAP AND NOT APPLE)
- target_include_directories(ipcpd-shim-eth-llc PUBLIC
+ target_include_directories(ipcpd-eth-llc PUBLIC
${NETMAP_C_INCLUDE_DIR})
endif ()
- target_link_libraries(ipcpd-shim-eth-llc LINK_PUBLIC ouroboros-dev)
+ target_link_libraries(ipcpd-eth-llc LINK_PUBLIC ouroboros-dev)
include(AddCompileFlags)
if (CMAKE_BUILD_TYPE MATCHES "Debug*")
- add_compile_flags(ipcpd-shim-eth-llc -DCONFIG_OUROBOROS_DEBUG)
+ add_compile_flags(ipcpd-eth-llc -DCONFIG_OUROBOROS_DEBUG)
endif ()
- install(TARGETS ipcpd-shim-eth-llc RUNTIME DESTINATION sbin)
+ install(TARGETS ipcpd-eth-llc RUNTIME DESTINATION sbin)
endif ()
diff --git a/src/ipcpd/shim-eth-llc/main.c b/src/ipcpd/eth-llc/main.c
index 3fec7c3d..105058d3 100644
--- a/src/ipcpd/shim-eth-llc/main.c
+++ b/src/ipcpd/eth-llc/main.c
@@ -1,7 +1,7 @@
/*
* Ouroboros - Copyright (C) 2016 - 2017
*
- * Shim IPC process over Ethernet with LLC
+ * IPC process over Ethernet with LLC
*
* Dimitri Staessens <[email protected]>
* Sander Vrijders <[email protected]>
@@ -31,7 +31,7 @@
#include "config.h"
-#define OUROBOROS_PREFIX "ipcpd/shim-eth-llc"
+#define OUROBOROS_PREFIX "ipcpd/eth-llc"
#include <ouroboros/hash.h>
#include <ouroboros/errno.h>
@@ -91,7 +91,7 @@
#include <net/bpf.h>
#endif
-#define THIS_TYPE IPCP_SHIM_ETH_LLC
+#define THIS_TYPE IPCP_ETH_LLC
#define MGMT_SAP 0x01
#define MAC_SIZE 6
@@ -1109,7 +1109,7 @@ static int eth_llc_ipcp_bootstrap(const struct ipcp_config * conf)
goto fail_sdu_writer;
}
- log_dbg("Bootstrapped shim IPCP over Ethernet with LLC with pid %d.",
+ log_dbg("Bootstrapped IPCP over Ethernet with LLC with pid %d.",
getpid());
return 0;
@@ -1370,7 +1370,7 @@ int main(int argc,
goto fail_init;
if (eth_llc_data_init() < 0) {
- log_err("Failed to init shim-eth-llc data.");
+ log_err("Failed to init eth-llc data.");
goto fail_data_init;
}
diff --git a/src/ipcpd/ipcp.c b/src/ipcpd/ipcp.c
index 84c42b98..c6e819bb 100644
--- a/src/ipcpd/ipcp.c
+++ b/src/ipcpd/ipcp.c
@@ -245,10 +245,10 @@ static void * mainloop(void * o)
conf.pff_type = conf_msg->pff_type;
}
- if (conf_msg->ipcp_type == IPCP_SHIM_ETH_LLC)
+ if (conf_msg->ipcp_type == IPCP_ETH_LLC)
conf.if_name = conf_msg->if_name;
- if (conf_msg->ipcp_type == IPCP_SHIM_UDP) {
+ if (conf_msg->ipcp_type == IPCP_UDP) {
conf.ip_addr = conf_msg->ip_addr;
conf.dns_addr = conf_msg->dns_addr;
@@ -256,8 +256,8 @@ static void * mainloop(void * o)
dif_info.dir_hash_algo = HASH_MD5;
}
- /* Only shim-udp needs a fixed hash algorithm */
- if (conf_msg->ipcp_type != IPCP_SHIM_UDP) {
+ /* Only udp needs a fixed hash algorithm */
+ if (conf_msg->ipcp_type != IPCP_UDP) {
switch(conf_msg->dif_info->dir_hash_algo) {
case DIR_HASH_SHA3_224:
conf.dif_info.dir_hash_algo =
diff --git a/src/ipcpd/local/CMakeLists.txt b/src/ipcpd/local/CMakeLists.txt
index 422fa709..ab416c61 100644
--- a/src/ipcpd/local/CMakeLists.txt
+++ b/src/ipcpd/local/CMakeLists.txt
@@ -14,11 +14,11 @@ include_directories(${CMAKE_BINARY_DIR}/include)
set(IPCP_LOCAL_TARGET ipcpd-local CACHE INTERNAL "")
-set(SHIM_LOCAL_SOURCES
+set(LOCAL_SOURCES
# Add source files here
${CMAKE_CURRENT_SOURCE_DIR}/main.c)
-add_executable(ipcpd-local ${SHIM_LOCAL_SOURCES} ${IPCP_SOURCES})
+add_executable(ipcpd-local ${LOCAL_SOURCES} ${IPCP_SOURCES})
target_link_libraries(ipcpd-local LINK_PUBLIC ouroboros-common ouroboros-dev)
include(AddCompileFlags)
diff --git a/src/ipcpd/normal/main.c b/src/ipcpd/normal/main.c
index 772b5792..401c1578 100644
--- a/src/ipcpd/normal/main.c
+++ b/src/ipcpd/normal/main.c
@@ -55,7 +55,7 @@ static int initialize_components(const struct ipcp_config * conf)
{
ipcpi.dif_name = strdup(conf->dif_info.dif_name);
if (ipcpi.dif_name == NULL) {
- log_err("Failed to set DIF name.");
+ log_err("Failed to set layer name.");
goto fail_dif_name;
}
@@ -263,7 +263,7 @@ static int normal_ipcp_bootstrap(const struct ipcp_config * conf)
goto fail_bootstrap;
}
- log_dbg("Bootstrapped in DIF %s.", conf->dif_info.dif_name);
+ log_dbg("Bootstrapped in layer %s.", conf->dif_info.dif_name);
return 0;
diff --git a/src/ipcpd/normal/pol/flat.c b/src/ipcpd/normal/pol/flat.c
index c52ebe38..49525994 100644
--- a/src/ipcpd/normal/pol/flat.c
+++ b/src/ipcpd/normal/pol/flat.c
@@ -39,7 +39,6 @@
#include <assert.h>
#define NAME_LEN 8
-#define REC_DIF_SIZE 10000
struct {
uint8_t addr_size;
diff --git a/src/ipcpd/shim-udp/CMakeLists.txt b/src/ipcpd/udp/CMakeLists.txt
index aaf7e83b..20c1b58e 100644
--- a/src/ipcpd/shim-udp/CMakeLists.txt
+++ b/src/ipcpd/udp/CMakeLists.txt
@@ -12,14 +12,14 @@ include_directories(${CURRENT_BINARY_PARENT_DIR})
include_directories(${CMAKE_SOURCE_DIR}/include)
include_directories(${CMAKE_BINARY_DIR}/include)
-set(IPCP_SHIM_UDP_TARGET ipcpd-shim-udp CACHE INTERNAL "")
+set(IPCP_UDP_TARGET ipcpd-udp CACHE INTERNAL "")
-set(SHIM_UDP_SOURCES
+set(UDP_SOURCES
# Add source files here
${CMAKE_CURRENT_SOURCE_DIR}/main.c)
-add_executable(ipcpd-shim-udp ${SHIM_UDP_SOURCES} ${IPCP_SOURCES})
-target_link_libraries(ipcpd-shim-udp LINK_PUBLIC ouroboros-dev)
+add_executable(ipcpd-udp ${UDP_SOURCES} ${IPCP_SOURCES})
+target_link_libraries(ipcpd-udp LINK_PUBLIC ouroboros-dev)
# Find the nsupdate executable
find_program(NSUPDATE_EXECUTABLE
@@ -54,7 +54,7 @@ endif ()
include(AddCompileFlags)
if (CMAKE_BUILD_TYPE MATCHES "Debug*")
- add_compile_flags(ipcpd-shim-udp -DCONFIG_OUROBOROS_DEBUG)
+ add_compile_flags(ipcpd-udp -DCONFIG_OUROBOROS_DEBUG)
endif ()
-install(TARGETS ipcpd-shim-udp RUNTIME DESTINATION sbin)
+install(TARGETS ipcpd-udp RUNTIME DESTINATION sbin)
diff --git a/src/ipcpd/shim-udp/main.c b/src/ipcpd/udp/main.c
index 79d5ea83..c54e6624 100644
--- a/src/ipcpd/shim-udp/main.c
+++ b/src/ipcpd/udp/main.c
@@ -1,7 +1,7 @@
/*
* Ouroboros - Copyright (C) 2016 - 2017
*
- * Shim IPC process over UDP
+ * IPC process over UDP
*
* Dimitri Staessens <[email protected]>
* Sander Vrijders <[email protected]>
@@ -24,7 +24,7 @@
#include "config.h"
-#define OUROBOROS_PREFIX "ipcpd/shim-udp"
+#define OUROBOROS_PREFIX "ipcpd/udp"
#include <ouroboros/hash.h>
#include <ouroboros/list.h>
@@ -53,7 +53,7 @@
#define FLOW_REQ 1
#define FLOW_REPLY 2
-#define THIS_TYPE IPCP_SHIM_UDP
+#define THIS_TYPE IPCP_UDP
#define LISTEN_PORT htons(0x0D1F)
#define SHIM_UDP_BUF_SIZE 256
#define SHIM_UDP_MSG_SIZE 256
@@ -638,7 +638,7 @@ static int ipcp_udp_bootstrap(const struct ipcp_config * conf)
goto fail_sduloop;
}
- log_dbg("Bootstrapped shim IPCP over UDP with pid %d.", getpid());
+ log_dbg("Bootstrapped IPCP over UDP with pid %d.", getpid());
log_dbg("Bound to IP address %s.", ipstr);
log_dbg("DNS server address is %s.", dnsstr);
@@ -1124,7 +1124,7 @@ int main(int argc,
}
if (udp_data_init() < 0) {
- log_err("Failed to init shim-udp data.");
+ log_err("Failed to init udp data.");
ipcp_create_r(getpid(), -1);
ipcp_fini();
exit(EXIT_FAILURE);
diff --git a/src/irmd/config.h.in b/src/irmd/config.h.in
index 83e59375..e6821256 100644
--- a/src/irmd/config.h.in
+++ b/src/irmd/config.h.in
@@ -20,8 +20,8 @@
* Foundation, Inc., http://www.fsf.org/about/contact/.
*/
-#define IPCP_SHIM_UDP_EXEC "@IPCP_SHIM_UDP_TARGET@"
-#define IPCP_SHIM_ETH_LLC_EXEC "@IPCP_SHIM_ETH_LLC_TARGET@"
+#define IPCP_UDP_EXEC "@IPCP_UDP_TARGET@"
+#define IPCP_ETH_LLC_EXEC "@IPCP_ETH_LLC_TARGET@"
#define IPCP_NORMAL_EXEC "@IPCP_NORMAL_TARGET@"
#define IPCP_LOCAL_EXEC "@IPCP_LOCAL_TARGET@"
#define IPCP_RAPTOR_EXEC "@IPCP_RAPTOR_TARGET@"
diff --git a/src/irmd/ipcp.c b/src/irmd/ipcp.c
index dfb7c96b..60bf3512 100644
--- a/src/irmd/ipcp.c
+++ b/src/irmd/ipcp.c
@@ -139,11 +139,11 @@ pid_t ipcp_create(const char * name,
case IPCP_NORMAL:
exec_name = IPCP_NORMAL_EXEC;
break;
- case IPCP_SHIM_UDP:
- exec_name = IPCP_SHIM_UDP_EXEC;
+ case IPCP_UDP:
+ exec_name = IPCP_UDP_EXEC;
break;
- case IPCP_SHIM_ETH_LLC:
- exec_name = IPCP_SHIM_ETH_LLC_EXEC;
+ case IPCP_ETH_LLC:
+ exec_name = IPCP_ETH_LLC_EXEC;
break;
case IPCP_LOCAL:
exec_name = IPCP_LOCAL_EXEC;
diff --git a/src/irmd/main.c b/src/irmd/main.c
index 7b4ad9d8..eb10cc4f 100644
--- a/src/irmd/main.c
+++ b/src/irmd/main.c
@@ -502,7 +502,7 @@ static int bootstrap_ipcp(pid_t pid,
entry->dif_name = strdup(info.dif_name);
if (entry->dif_name == NULL) {
pthread_rwlock_unlock(&irmd.reg_lock);
- log_warn("Failed to set name of DIF.");
+ log_warn("Failed to set name of layer.");
return -ENOMEM;
}
@@ -510,7 +510,7 @@ static int bootstrap_ipcp(pid_t pid,
pthread_rwlock_unlock(&irmd.reg_lock);
- log_info("Bootstrapped IPCP %d in DIF %s.",
+ log_info("Bootstrapped IPCP %d in layer %s.",
pid, conf->dif_info->dif_name);
return 0;
@@ -564,7 +564,7 @@ static int enroll_ipcp(pid_t pid,
pthread_rwlock_unlock(&irmd.reg_lock);
- log_info("Enrolled IPCP %d in DIF %s.",
+ log_info("Enrolled IPCP %d in layer %s.",
pid, info.dif_name);
return 0;
diff --git a/src/irmd/registry.h b/src/irmd/registry.h
index f1f52b9e..6757b0ad 100644
--- a/src/irmd/registry.h
+++ b/src/irmd/registry.h
@@ -55,7 +55,7 @@ struct reg_entry {
struct list_head next;
char * name;
- /* DIFs in which this name is registered */
+ /* layers in which this name is registered */
struct list_head difs;
/* Programs that can be instantiated by the irmd */
struct list_head reg_progs;
diff --git a/src/lib/ipcp_config.proto b/src/lib/ipcp_config.proto
index aa2803f3..1ee1edcc 100644
--- a/src/lib/ipcp_config.proto
+++ b/src/lib/ipcp_config.proto
@@ -37,9 +37,9 @@ message ipcp_config_msg {
optional uint32 addr_auth_type = 6;
optional uint32 routing_type = 7;
optional uint32 pff_type = 8;
- // Config for shim UDP
+ // Config for UDP
optional uint32 ip_addr = 9;
optional uint32 dns_addr = 10;
- // Config for the shim Ethernet LLC
+ // Config for the Ethernet LLC
optional string if_name = 11;
}
diff --git a/src/lib/irm.c b/src/lib/irm.c
index fa0db727..c7a19707 100644
--- a/src/lib/irm.c
+++ b/src/lib/irm.c
@@ -130,7 +130,7 @@ int irm_bootstrap_ipcp(pid_t pid,
config.pff_type = conf->pff_type;
dif_info.dir_hash_algo = conf->dif_info.dir_hash_algo;
break;
- case IPCP_SHIM_UDP:
+ case IPCP_UDP:
config.has_ip_addr = true;
config.ip_addr = conf->ip_addr;
config.has_dns_addr = true;
@@ -139,7 +139,7 @@ int irm_bootstrap_ipcp(pid_t pid,
case IPCP_LOCAL:
case IPCP_RAPTOR:
break;
- case IPCP_SHIM_ETH_LLC:
+ case IPCP_ETH_LLC:
config.if_name = conf->if_name;
break;
default:
diff --git a/src/tools/irm/irm_ipcp_bootstrap.c b/src/tools/irm/irm_ipcp_bootstrap.c
index 66bb96ce..2dc6f5f6 100644
--- a/src/tools/irm/irm_ipcp_bootstrap.c
+++ b/src/tools/irm/irm_ipcp_bootstrap.c
@@ -50,8 +50,8 @@
#include "irm_utils.h"
#define NORMAL "normal"
-#define SHIM_UDP "shim-udp"
-#define SHIM_ETH_LLC "shim-eth-llc"
+#define UDP "udp"
+#define ETH_LLC "eth-llc"
#define LOCAL "local"
#define RAPTOR "raptor"
@@ -79,10 +79,10 @@ static void usage(void)
/* FIXME: Add ipcp_config stuff */
printf("Usage: irm ipcp bootstrap\n"
" name <ipcp name>\n"
- " dif <DIF name>\n"
+ " layer <layer name>\n"
" type [TYPE]\n"
"where TYPE = {" NORMAL " " LOCAL " "
- SHIM_UDP " " SHIM_ETH_LLC " " RAPTOR "},\n\n"
+ UDP " " ETH_LLC " " RAPTOR "},\n\n"
"if TYPE == " NORMAL "\n"
" [addr <address size> (default: %d)]\n"
" [fd <fd size> (default: %d)]\n"
@@ -98,11 +98,11 @@ static void usage(void)
" PFF_POLICY = {" SIMPLE_PFF " " ALTERNATE_PFF "}\n"
" ALGORITHM = {" SHA3_224 " " SHA3_256 " "
SHA3_384 " " SHA3_512 "}\n\n"
- "if TYPE == " SHIM_UDP "\n"
+ "if TYPE == " UDP "\n"
" ip <IP address in dotted notation>\n"
" [dns <DDNS IP address in dotted notation>"
" (default: none)]\n\n"
- "if TYPE == " SHIM_ETH_LLC "\n"
+ "if TYPE == " ETH_LLC "\n"
" if_name <interface name>\n"
" [hash [ALGORITHM] (default: %s)]\n"
"where ALGORITHM = {" SHA3_224 " " SHA3_256 " "
@@ -148,7 +148,7 @@ int do_bootstrap_ipcp(int argc,
cargs = 2;
if (matches(*argv, "type") == 0) {
ipcp_type = *(argv + 1);
- } else if (matches(*argv, "dif") == 0) {
+ } else if (matches(*argv, "layer") == 0) {
dif_name = *(argv + 1);
} else if (matches(*argv, "name") == 0) {
name = *(argv + 1);
@@ -216,7 +216,7 @@ int do_bootstrap_ipcp(int argc,
}
strcpy(conf.dif_info.dif_name, dif_name);
- if (strcmp(ipcp_type, SHIM_UDP) != 0)
+ if (strcmp(ipcp_type, UDP) != 0)
conf.dif_info.dir_hash_algo = hash_algo;
if (strcmp(ipcp_type, NORMAL) == 0) {
@@ -227,8 +227,8 @@ int do_bootstrap_ipcp(int argc,
conf.addr_auth_type = addr_auth_type;
conf.routing_type = routing_type;
conf.pff_type = pff_type;
- } else if (strcmp(ipcp_type, SHIM_UDP) == 0) {
- conf.type = IPCP_SHIM_UDP;
+ } else if (strcmp(ipcp_type, UDP) == 0) {
+ conf.type = IPCP_UDP;
if (ip_addr == 0) {
usage();
return -1;
@@ -239,8 +239,8 @@ int do_bootstrap_ipcp(int argc,
conf.type = IPCP_LOCAL;
} else if (strcmp(ipcp_type, RAPTOR) == 0) {
conf.type = IPCP_RAPTOR;
- } else if (strcmp(ipcp_type, SHIM_ETH_LLC) == 0) {
- conf.type = IPCP_SHIM_ETH_LLC;
+ } else if (strcmp(ipcp_type, ETH_LLC) == 0) {
+ conf.type = IPCP_ETH_LLC;
if (if_name == NULL) {
usage();
return -1;
diff --git a/src/tools/irm/irm_ipcp_create.c b/src/tools/irm/irm_ipcp_create.c
index 1ec73049..fa453fee 100644
--- a/src/tools/irm/irm_ipcp_create.c
+++ b/src/tools/irm/irm_ipcp_create.c
@@ -44,11 +44,11 @@
#include "irm_ops.h"
#include "irm_utils.h"
-#define NORMAL "normal"
-#define SHIM_UDP "shim-udp"
-#define SHIM_ETH_LLC "shim-eth-llc"
-#define LOCAL "local"
-#define RAPTOR "raptor"
+#define NORMAL "normal"
+#define UDP "udp"
+#define ETH_LLC "eth-llc"
+#define LOCAL "local"
+#define RAPTOR "raptor"
static void usage(void)
{
@@ -56,7 +56,7 @@ static void usage(void)
" name <ipcp name>\n"
" type [TYPE]\n\n"
"where TYPE = {" NORMAL " " LOCAL " "
- SHIM_UDP " " SHIM_ETH_LLC " " RAPTOR "}\n");
+ UDP " " ETH_LLC " " RAPTOR "}\n");
}
int do_create_ipcp(int argc, char ** argv)
@@ -88,12 +88,12 @@ int do_create_ipcp(int argc, char ** argv)
if (strcmp(ipcp_type, NORMAL) == 0)
type = IPCP_NORMAL;
- else if (strcmp(ipcp_type, SHIM_UDP) == 0)
- type = IPCP_SHIM_UDP;
+ else if (strcmp(ipcp_type, UDP) == 0)
+ type = IPCP_UDP;
else if (strcmp(ipcp_type, LOCAL) == 0)
type = IPCP_LOCAL;
- else if (strcmp(ipcp_type, SHIM_ETH_LLC) == 0)
- type = IPCP_SHIM_ETH_LLC;
+ else if (strcmp(ipcp_type, ETH_LLC) == 0)
+ type = IPCP_ETH_LLC;
else if (strcmp(ipcp_type, RAPTOR) == 0)
type = IPCP_RAPTOR;
else {
diff --git a/src/tools/irm/irm_ipcp_enroll.c b/src/tools/irm/irm_ipcp_enroll.c
index 4beb6754..dc40567f 100644
--- a/src/tools/irm/irm_ipcp_enroll.c
+++ b/src/tools/irm/irm_ipcp_enroll.c
@@ -48,7 +48,7 @@ static void usage(void)
{
printf("Usage: irm ipcp enroll\n"
" name <ipcp name>\n"
- " dif <dif to enroll in>\n"
+ " layer <layer to enroll in>\n"
" [autobind]\n");
}
@@ -67,7 +67,7 @@ int do_enroll_ipcp(int argc, char ** argv)
cargs = 2;
if (matches(*argv, "name") == 0) {
name = *(argv + 1);
- } else if (matches(*argv, "dif") == 0) {
+ } else if (matches(*argv, "layer") == 0) {
dif_name = *(argv + 1);
} else if (matches(*argv, "autobind") == 0) {
autobind = true;
diff --git a/src/tools/irm/irm_register.c b/src/tools/irm/irm_register.c
index 0a0fa5c0..34fd760a 100644
--- a/src/tools/irm/irm_register.c
+++ b/src/tools/irm/irm_register.c
@@ -43,32 +43,32 @@
#include "irm_ops.h"
#include "irm_utils.h"
-#define MAX_DIFS 128
+#define MAX_LAYERS 128
static void usage(void)
{
printf("Usage: irm register\n"
" name <name>\n"
- " dif <dif name to register with>\n"
- " [dif <dif name to register with>]\n"
- " [... (maximum %d difs)]\n"
- , MAX_DIFS);
+ " layer <layer to register with>\n"
+ " [layer <layer to register with>]\n"
+ " [... (maximum %d layers)]\n"
+ , MAX_LAYERS);
}
int do_register(int argc, char ** argv)
{
char * name = NULL;
- char * difs[MAX_DIFS];
+ char * difs[MAX_LAYERS];
size_t difs_len = 0;
while (argc > 0) {
if (matches(*argv, "name") == 0) {
name = *(argv + 1);
- } else if (matches(*argv, "dif") == 0) {
+ } else if (matches(*argv, "layer") == 0) {
difs[difs_len++] = *(argv + 1);
- if (difs_len > MAX_DIFS) {
- printf("Too many difs specified\n");
+ if (difs_len > MAX_LAYERS) {
+ printf("Too many layers specified\n");
return -1;
}
} else {
diff --git a/src/tools/irm/irm_unregister.c b/src/tools/irm/irm_unregister.c
index 09b7ec21..64053706 100644
--- a/src/tools/irm/irm_unregister.c
+++ b/src/tools/irm/irm_unregister.c
@@ -44,30 +44,30 @@
#include "irm_ops.h"
#include "irm_utils.h"
-#define MAX_DIFS 128
+#define MAX_LAYERS 128
static void usage(void)
{
printf("Usage: irm unregister\n"
" name <name>\n"
- " dif <dif name to unregister from>\n"
- " [dif <dif name to unregister from>]\n"
- " [... (maximum %d difs)]\n"
- , MAX_DIFS);
+ " layer <layer to unregister from>\n"
+ " [layer <layer to unregister from>]\n"
+ " [... (maximum %d layers)]\n"
+ , MAX_LAYERS);
}
int do_unregister(int argc, char ** argv)
{
- char * difs[MAX_DIFS];
+ char * difs[MAX_LAYERS];
size_t difs_len = 0;
char * name = NULL;
while (argc > 0) {
if (matches(*argv, "name") == 0) {
name = *(argv + 1);
- } else if (matches(*argv, "dif") == 0) {
+ } else if (matches(*argv, "layer") == 0) {
difs[difs_len++] = *(argv + 1);
- if (difs_len > MAX_DIFS) {
+ if (difs_len > MAX_LAYERS) {
printf("Too many difs specified\n");
return -1;
}