diff options
author | Sander Vrijders <[email protected]> | 2016-04-23 09:53:35 +0200 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2016-04-23 09:53:35 +0200 |
commit | b6dc5ba9576d61d42db82c3da8cb0c039fac7179 (patch) | |
tree | 0de76147c8a7beb4c23a1931f822113b61c51a5b /src/tools/irm/irm_bootstrap_ipcp.c | |
parent | 9687ace9a1faf752672774ae49a6428b378fa409 (diff) | |
parent | a618984537f7790cd274d097223b4029473044c2 (diff) | |
download | ouroboros-b6dc5ba9576d61d42db82c3da8cb0c039fac7179.tar.gz ouroboros-b6dc5ba9576d61d42db82c3da8cb0c039fac7179.zip |
Merge remote-tracking branch 'upstream/be' into be
Diffstat (limited to 'src/tools/irm/irm_bootstrap_ipcp.c')
-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; |