summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/man/ouroboros-glossary.714
-rw-r--r--doc/man/ouroboros-tutorial.728
-rw-r--r--doc/man/ouroboros.883
-rw-r--r--include/ouroboros/ipcp.h14
-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
25 files changed, 169 insertions, 175 deletions
diff --git a/doc/man/ouroboros-glossary.7 b/doc/man/ouroboros-glossary.7
index 5f9425f6..3b3e69f1 100644
--- a/doc/man/ouroboros-glossary.7
+++ b/doc/man/ouroboros-glossary.7
@@ -29,13 +29,13 @@ in the IRMd.
.PP
bootstrap
.RS 4
-to configure an IPCP and start it as the first member of a DIF.
+to configure an IPCP and start it as the first member of a layer.
.RE
.PP
congestion control
.RS 4
-the mechanism by which a server DIF controls its resources and
+the mechanism by which a server layer controls its resources and
prevents its client processes from sending more information than it
can currently handle. This is orthogonal to flow control.
.RE
@@ -49,17 +49,11 @@ Table.
.RE
.PP
-distributed IPC facility (DIF)
-.RS 4
-deprecate?
-.RE
-
-.PP
enrolment
.RS 4
-the action of connecting to a member of an existing DIF, retrieving
+the action of connecting to a member of an existing layer, retrieving
the bootstrap information and starting the IPCP as a new member of
-that DIF.
+that layer.
.RE
.PP
diff --git a/doc/man/ouroboros-tutorial.7 b/doc/man/ouroboros-tutorial.7
index 8e135e23..a6f3eb4d 100644
--- a/doc/man/ouroboros-tutorial.7
+++ b/doc/man/ouroboros-tutorial.7
@@ -46,32 +46,32 @@ The output should be
.SH PINGING A SERVER APPLICATION OVER THE LOOPBACK ADAPTER
-With a running irmd, let's create an IPC process. For this
-tutorial, we will create and bootstrap a shim-eth-llc shim IPCP over
-the loopback interface. To observe what's going on, open another
-terminal window. Note that "ipcp bootstrap" will create an IPCP if an
-IPCP by that name does not yet exist (See \fBouroboros\fR(8)).
+With a running irmd, let's create an IPC process. For this tutorial,
+we will create and bootstrap an eth-llc IPCP over the loopback
+interface. To observe what's going on, open another terminal
+window. Note that "ipcp bootstrap" will create an IPCP if an IPCP by
+that name does not yet exist (See \fBouroboros\fR(8)).
.RS 4
-$ irm ipcp bootstrap type shim-eth-llc name shim dif llc if lo
+$ irm ipcp bootstrap type eth-llc name llc layer llc if lo
.RE
.RS 4
==23918== irmd(II): Created IPCP 23932.
.br
-==23932== ipcpd/shim-eth-llc(II): Using raw socket device.
+==23932== ipcpd/eth-llc(II): Using raw socket device.
.br
-==23918== irmd(II): Bootstrapped IPCP 23932 in DIF llc.
+==23918== irmd(II): Bootstrapped IPCP 23932 in layer llc.
.RE
-Now that we have a shim IPCP bootstrapped, it can act as a local
-network that can provide full connectivity between all processes in
-the system. Let's test it using the oping application. First, let's
-choose a name for the server ("my.oping.server") and register in the
-shim DIF.
+Now that we have the IPCP bootstrapped, it can act as a local network
+layer that can provide full connectivity between all processes in the
+system. Let's test it using the oping application. First, let's choose
+a name for the server ("my.oping.server") and register in the llc
+layer.
.RS 4
-$ irm reg name my.oping.server dif llc
+$ irm reg name my.oping.server layer llc
.RE
The IRMd should respond with
diff --git a/doc/man/ouroboros.8 b/doc/man/ouroboros.8
index b81c25a0..04d0990d 100644
--- a/doc/man/ouroboros.8
+++ b/doc/man/ouroboros.8
@@ -73,33 +73,34 @@ be bound to multiple names.
\fBCreating an IPC Process\fR will instantiate a new IPCP in the
system. This IPCP will be empty, with only a name and type specified,
-and ready for either \fIbootstrapping\fR into a new DIF (or a new or
-existing shim DIF) or \fIenrolling\fR in an existing DIF.
+and ready for either \fIbootstrapping\fR into a new layer or
+\fIenrolling\fR in an existing layer.
\fBBootstrapping an IPC Process\fR gives it the necessary information
-from the command line to start operating as a \fIDIF\fR. Each IPCP
+from the command line to start operating as a \fIlayer\fR. Each IPCP
type has its own set of configuration options.
-\fBEnrolling an IPC Process\fR in a DIF configures it by contacting
-another IPCP that is already a member of that DIF (bootstrapped or
+\fBEnrolling an IPC Process\fR in a layer configures it by contacting
+another IPCP that is already a member of that layer (bootstrapped or
enrolled). After \fIenrollment\fR, the IPCP is configured, and may or
-may not have connections to the DIF.
+may not have connections to the layer.
-\fBRegistering a name in a DIF\fR inserts the name in that \fIDIF\fR's
-\fIdirectory\fR. Once a name is \fIregistered\fR in a DIF, the name
-can be used as a destination handle for \fIflow allocation\fR.
+\fBRegistering a name in a layer\fR inserts the name in that
+\fIlayer\fR's \fIdirectory\fR. Once a name is \fIregistered\fR in a
+layer, the name can be used as a destination handle for \fIflow
+allocation\fR.
Ouroboros normal IPCPs are just like any other process, and will need
-to be bound and registered in a lower-rank DIF before they can be
+to be bound and registered in a lower-rank layer before they can be
accessed by other processes.
-In order to enroll an IPC process in a DIF, some other member will
-have to be reachable over a lower DIF. Shim IPCPs are all bootstrapped
-and thus need not enroll as they work directly over a physical
-connection. Ouroboros currently supports shim IPCPs over shared memory
-(local), L1 (raptor, experimental), L2 (shim-eth-llc) and L3
-(shim-udp). The normal DIF requires connections to be established
-between IPCP components for its operation.
+In order to enroll an IPC process in a layer, some other member will
+have to be reachable over a lower layer. IPCPs that wrap a legacy
+transmission technology are all bootstrapped and thus need not enroll
+as they work directly over a physical connection. Ouroboros currently
+supports IPCPs over shared memory (local), L1 (raptor, experimental),
+L2 (eth-llc) and L3 (udp). The normal layer requires connections to be
+established between IPCP components for its operation.
\fBConnecting the management components\fR using \fImanagement
flows\fR allows management information to be sent between IPCPs so
@@ -119,15 +120,15 @@ that rely on data transfer flows are the \fIdirectory\fR and the
creates an IPCP process of type \fItype\fR in the system with name
\fIname\fR. Allowable values for \fItype\fR are:
.PP
-\fBlocal\fR - create a loopback IPCP.
+\fBlocal\fR - create a loopback IPCP.
.PP
-\fBraptor\fR - create an IPCP that attaches to a raptor NetFPGA device.
+\fBraptor\fR - create an IPCP that attaches to a raptor NetFPGA device.
.PP
-\fBshim-eth-llc\fR - create an IPCP that attaches to an Ethernet adapter.
+\fBeth-llc\fR - create an IPCP that attaches to an Ethernet adapter.
.PP
-\fBshim-udp\fR - create an IPCP that attaches to a UDP socket.
+\fBsudp\fR - create an IPCP that attaches to a UDP socket.
.PP
-\fBnormal\fR - create a normal IPCP that uses lower level DIFs.
+\fBnormal\fR - create a normal IPCP that uses lower level layers.
.RE
.PP
@@ -136,12 +137,12 @@ creates an IPCP process of type \fItype\fR in the system with name
destroys the IPCP process with name \fIname\fR.
.RE
.PP
-\fBirm ipcp bootstrap\fR type \fItype\fR name \fIname\fR dif \fIdif\fR \
+\fBirm ipcp bootstrap\fR type \fItype\fR name \fIname\fR layer \fIlayer\fR \
[\fIparams\fR] [\fIautobind\fR]
.RS 4
bootstraps an IPCP process of type \fItype\fR and name \fIname\fR in a
-DIF \fIdif\fR. If an IPCP with that name does not exist yet, the IPCP
-will be created.
+layer \fIlayer\fR. If an IPCP with that name does not exist yet, the
+IPCP will be created.
.PP
Values for [\fIparam\fR] are dependent on \fItype\fR:
.PP
@@ -162,9 +163,9 @@ Values for [\fIparam\fR] are dependent on \fItype\fR:
.RE
.PP
-\fBshim-eth-llc\fR
+\fBeth-llc\fR
.RS 4
-if_name \fIinterface\fR specifies the interface to bind the shim to.
+if_name \fIinterface\fR specifies the interface to bind the IPCP to.
.PP
[hash \fIpolicy\fR] specifies the hash function used for the directory,
.br
@@ -172,7 +173,7 @@ if_name \fIinterface\fR specifies the interface to bind the shim to.
.RE
.PP
-\fBshim-udp\fR
+\fBudp\fR
.RS 4
ip \fIip\fR specifies the local IP address to bind to
@@ -218,17 +219,17 @@ default: simple.
.br
default: SHA3_256.
.PP
-[autobind] will automatically bind a normal IPCP to its name and the DIF name.
+[autobind] will automatically bind a normal IPCP to its name and the layer name.
.RE
.RE
.PP
-\fBirm ipcp enroll\fR name \fIname\fR dif \fIdif\fR [\fIautobind\fR]
+\fBirm ipcp enroll\fR name \fIname\fR layer \fIlayer\fR [\fIautobind\fR]
.RS 4
-enrolls a normal IPCP \fIname\fR to a dif for which the IPCPs accept flows for
+enrolls a normal IPCP \fIname\fR to a layer for which the IPCPs accept flows for
\fIname\fR.
.PP
-[autobind] will automatically bind this IPCP to its name and the DIF name.
+[autobind] will automatically bind this IPCP to its name and the layer name.
.RE
\fBirm ipcp connect\fR name \fIname\fR component \fIcomponent\fR dst
@@ -236,7 +237,7 @@ enrolls a normal IPCP \fIname\fR to a dif for which the IPCPs accept flows for
.RS 4
connects a \fIcomponent\fR (\fBdt\fR or \fBmgmt\fR) of a normal IPCP
with name \fIname\fR to that component of the destination IPCP within the
-same DIF.
+same layer.
.RE
\fBirm ipcp disconnect\fR name \fIname\fR component \fIcomponent\fR dst
@@ -244,7 +245,7 @@ same DIF.
.RS 4
disconnects \fIcomponent\fR (\fBdt\fR or \fBmgmt\fR) of a normal IPCP
with name \fIname\fR from that component of the destination IPCP within the
-same DIF.
+same layer.
.RE
.RE
@@ -256,7 +257,7 @@ same DIF.
bind a program \fIprogram\fR, referenced by its binary, to a certain
name. The binary can be specified by an absolute or relative path, and
will be searched for in all directories specified in the \fBPATH\fR
-variable. If \fIname\fR is registered in a DIF, all instances of
+variable. If \fIname\fR is registered in a layer, all instances of
\fIprogram\fR will accept flows for \fIname\fR. If the \fIauto\fR
keyword is specified, the IRMd will start instances if there are no
readily available instances when a new flow is requested and any
@@ -268,14 +269,14 @@ application when it is started.
\fBirm bind\fR process \fIpid\fR name \fIname\fR
.RS 4
bind a process \fIpid\fR to a certain name. If \fIname\fR is registered
-in a DIF, the process \fIpid\fR will accept flows for that name.
+in a layer, the process \fIpid\fR will accept flows for that name.
.RE
.PP
\fBirm bind\fR ipcp \fIipcp\fR name \fIname\fR
.RS 4
bind an IPCP \fIipcp\fR to a \fIname\fR. If \fIname\fR is registered
-in a DIF, \fIipcp\fR will accept flows for \fIname\fR. This is a
+in a layer, \fIipcp\fR will accept flows for \fIname\fR. This is a
shorthand for binding the pid of \fipcp\fR.
.RE
@@ -303,15 +304,15 @@ not accept future flow allocation requests for \fIname\fR.
.RE
.PP
-\fBirm reg\fR name \fIname\fR dif \fIdif\fR [dif \fIdif\fR ...]
+\fBirm reg\fR name \fIname\fR layer \fIlayer\fR [layer \fIlayer\fR ...]
.RS 4
-Register name \fIname\fR in difs \fIdif\fR.
+Register name \fIname\fR in layers \fIlayer\fR.
.RE
.PP
-\fBirm unreg\fR name \fIname\fR dif \fIdif\fR [dif \fIdif\fR ...]
+\fBirm unreg\fR name \fIname\fR layer \fIlayer\fR [layer \fIlayer\fR ...]
.RS 4
-Unregister name \fIname\fR in difs \fIdif\fR.
+Unregister name \fIname\fR in layers \fIlayer\fR.
.RE
.SH TERMINOLOGY
diff --git a/include/ouroboros/ipcp.h b/include/ouroboros/ipcp.h
index 2be654ea..210c38cf 100644
--- a/include/ouroboros/ipcp.h
+++ b/include/ouroboros/ipcp.h
@@ -27,7 +27,7 @@
#include <unistd.h>
#include <stdbool.h>
-#define DIF_NAME_SIZE 256
+#define LAYER_NAME_SIZE 256
/*
* NOTE: the IRMd uses this order to select an IPCP
@@ -37,8 +37,8 @@ enum ipcp_type {
IPCP_LOCAL = 0,
IPCP_NORMAL,
IPCP_RAPTOR,
- IPCP_SHIM_ETH_LLC,
- IPCP_SHIM_UDP
+ IPCP_ETH_LLC,
+ IPCP_UDP
};
/* Normal IPCP policies */
@@ -63,9 +63,9 @@ enum pol_dir_hash {
DIR_HASH_SHA3_512
};
-/* Info reported back to the IRMd about the DIF on enrollment */
+/* Info reported back to the IRMd about the layer on enrollment */
struct dif_info {
- char dif_name[DIF_NAME_SIZE];
+ char dif_name[LAYER_NAME_SIZE];
int dir_hash_algo;
};
@@ -84,11 +84,11 @@ struct ipcp_config {
enum pol_routing routing_type;
enum pol_pff pff_type;
- /* Shim UDP */
+ /* UDP */
uint32_t ip_addr;
uint32_t dns_addr;
- /* Shim Ethernet LLC */
+ /* Ethernet LLC */
char * if_name;
};
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 <dimitri.staessens@ugent.be>
* Sander Vrijders <sander.vrijders@ugent.be>
@@ -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 <dimitri.staessens@ugent.be>
* Sander Vrijders <sander.vrijders@ugent.be>
@@ -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;
}