diff options
author | dimitri staessens <[email protected]> | 2016-04-17 12:08:49 +0200 |
---|---|---|
committer | dimitri staessens <[email protected]> | 2016-04-18 22:25:34 +0200 |
commit | 21b304b46a347772c1338b22fba6a15291bb2945 (patch) | |
tree | eb8d0980ded5216b282a7932ecce38fd09473210 /src/tools | |
parent | d8e9019fcb56a49c6730bbe7d47e5e1cec682a2d (diff) | |
download | ouroboros-21b304b46a347772c1338b22fba6a15291bb2945.tar.gz ouroboros-21b304b46a347772c1338b22fba6a15291bb2945.zip |
ipcpd: initial IPC processes
Basic functions for implementation of IPC processes, and
implementation of core functions of the shim IPCP over UDP. Updates
to the build system to compile these IPC processes, as well as some
fixes in the irmd (rudimentary capturing exit signals) and some fixes
in the library, mainly relating to the messaging.
Basic implementation of creation / bootstrapping / deletion of the
shim UDP. Placeholders for other functions.
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/irm/irm_bootstrap_ipcp.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/tools/irm/irm_bootstrap_ipcp.c b/src/tools/irm/irm_bootstrap_ipcp.c index 78a09362..b90e934f 100644 --- a/src/tools/irm/irm_bootstrap_ipcp.c +++ b/src/tools/irm/irm_bootstrap_ipcp.c @@ -43,6 +43,7 @@ #define DEFAULT_CHK_SIZE 2 #define DEFAULT_MIN_PDU_SIZE 0 #define DEFAULT_MAX_PDU_SIZE 9000 +#define DEFAULT_DDNS 0 static void usage() { @@ -64,12 +65,14 @@ static void usage() " [min_pdu <minimum PDU size> (default: %d)]\n" " [max_pdu <maximum PDU size> (default: %d)]\n" "if TYPE == " SHIM_UDP "\n" - " ip <IP address in dotted notation>\n", + " ip <IP address in dotted notation>\n" + " [dns <DDNS IP address in dotted notation>" + " (default = none: %d)]\n", DEFAULT_ADDR_SIZE, DEFAULT_CEP_ID_SIZE, DEFAULT_PDU_LEN_SIZE, DEFAULT_QOS_ID_SIZE, DEFAULT_SEQ_NO_SIZE, DEFAULT_TTL_SIZE, DEFAULT_CHK_SIZE, DEFAULT_MIN_PDU_SIZE, - DEFAULT_MAX_PDU_SIZE); + DEFAULT_MAX_PDU_SIZE, DEFAULT_DDNS); } int do_bootstrap_ipcp(int argc, char ** argv) @@ -86,6 +89,7 @@ int do_bootstrap_ipcp(int argc, char ** argv) uint32_t min_pdu_size = DEFAULT_MIN_PDU_SIZE; uint32_t max_pdu_size = DEFAULT_MAX_PDU_SIZE; uint32_t ip_addr = 0; + uint32_t dns_addr = DEFAULT_DDNS; char * ipcp_type = NULL; char * dif_name = NULL; @@ -103,6 +107,11 @@ int do_bootstrap_ipcp(int argc, char ** argv) usage(); return -1; } + } else if (matches(*argv, "dns") == 0) { + if (inet_pton (AF_INET, *(argv + 1), &dns_addr) != 1) { + usage(); + return -1; + } } else if (matches(*argv, "addr") == 0) { addr_size = atoi(*(argv + 1)); } else if (matches(*argv, "cep_id") == 0) { @@ -156,6 +165,7 @@ int do_bootstrap_ipcp(int argc, char ** argv) return -1; } conf.ip_addr = ip_addr; + conf.dns_addr = dns_addr; } else { usage(); return -1; |