diff options
author | dimitri staessens <[email protected]> | 2016-06-14 15:03:28 +0200 |
---|---|---|
committer | dimitri staessens <[email protected]> | 2016-06-14 15:03:28 +0200 |
commit | 1a3b2987f2948d63b3febebbf00d2412de8d739a (patch) | |
tree | b0c6a730d0c6773f76ad7e7eb187ff58562b3b13 /src/tools/irm/irm_bootstrap_ipcp.c | |
parent | 6271d09bdd17114c3095b7e819a7bcded14f26a5 (diff) | |
parent | b294a556569b25ea6e201a004f06496bcbc944e0 (diff) | |
download | ouroboros-1a3b2987f2948d63b3febebbf00d2412de8d739a.tar.gz ouroboros-1a3b2987f2948d63b3febebbf00d2412de8d739a.zip |
Merged in sandervrijders/ouroboros/be-llc (pull request #123)
ipcpd: Adds a shim over IEEE 802.2 over IEEE 802.3
Diffstat (limited to 'src/tools/irm/irm_bootstrap_ipcp.c')
-rw-r--r-- | src/tools/irm/irm_bootstrap_ipcp.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/tools/irm/irm_bootstrap_ipcp.c b/src/tools/irm/irm_bootstrap_ipcp.c index 5cf5f017..e11b5f3f 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 SHIM_ETH_LLC "shim-eth-llc" #define LOCAL "local" #define DEFAULT_ADDR_SIZE 4 @@ -54,7 +55,8 @@ static void usage() " [api <application process instance>]\n" " dif <DIF name>\n" " type [TYPE]\n\n" - "where TYPE = {" NORMAL " " LOCAL " " SHIM_UDP "}\n\n" + "where TYPE = {" NORMAL " " LOCAL " " + SHIM_UDP " " SHIM_ETH_LLC"}\n\n" "if TYPE == " NORMAL "\n" " [addr <address size> (default: %d)]\n" " [cep_id <CEP-id size> (default: %d)]\n" @@ -68,7 +70,9 @@ static void usage() "if TYPE == " SHIM_UDP "\n" " ip <IP address in dotted notation>\n" " [dns <DDNS IP address in dotted notation>" - " (default = none: %d)]\n", + " (default = none: %d)]\n" + "if TYPE == " SHIM_ETH_LLC "\n" + " if_name <interface name>\n", DEFAULT_ADDR_SIZE, DEFAULT_CEP_ID_SIZE, DEFAULT_PDU_LEN_SIZE, DEFAULT_QOS_ID_SIZE, DEFAULT_SEQ_NO_SIZE, DEFAULT_TTL_SIZE, @@ -93,6 +97,7 @@ int do_bootstrap_ipcp(int argc, char ** argv) uint32_t dns_addr = DEFAULT_DDNS; char * ipcp_type = NULL; char * dif_name = NULL; + char * if_name = NULL; while (argc > 0) { if (matches(*argv, "type") == 0) { @@ -113,6 +118,8 @@ int do_bootstrap_ipcp(int argc, char ** argv) usage(); return -1; } + } else if (matches(*argv, "if_name") == 0) { + if_name = *(argv + 1); } else if (matches(*argv, "addr") == 0) { addr_size = atoi(*(argv + 1)); } else if (matches(*argv, "cep_id") == 0) { @@ -169,6 +176,13 @@ int do_bootstrap_ipcp(int argc, char ** argv) conf.dns_addr = dns_addr; } else if (strcmp(ipcp_type, LOCAL) == 0) { conf.type = IPCP_LOCAL; + } else if (strcmp(ipcp_type, SHIM_ETH_LLC) == 0) { + conf.type = IPCP_SHIM_ETH_LLC; + if (if_name == NULL) { + usage(); + return -1; + } + conf.if_name = if_name; } else { usage(); return -1; |