summaryrefslogtreecommitdiff
path: root/src/tools/irm
diff options
context:
space:
mode:
authorSander Vrijders <[email protected]>2016-04-19 11:15:51 +0200
committerSander Vrijders <[email protected]>2016-04-19 11:15:51 +0200
commitc0b2bb854f42ed5975a5c08465fd0012c9e5ce8c (patch)
tree877236ec9d67fbb2182a2f591ab4fb1e9357fa01 /src/tools/irm
parentd8e9019fcb56a49c6730bbe7d47e5e1cec682a2d (diff)
parent50cebfe6dbc6dd6740fc2e29b3c543d121bc1a18 (diff)
downloadouroboros-c0b2bb854f42ed5975a5c08465fd0012c9e5ce8c.tar.gz
ouroboros-c0b2bb854f42ed5975a5c08465fd0012c9e5ce8c.zip
Merged in dstaesse/ouroboros/ipcpd-udp (pull request #57)
ipcpd: initial IPC processes
Diffstat (limited to 'src/tools/irm')
-rw-r--r--src/tools/irm/irm_bootstrap_ipcp.c14
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;