diff options
author | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2017-01-12 14:58:49 +0100 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2017-01-12 14:58:49 +0100 |
commit | 4e3c360377bc9b792c2fac83e9402d7531f79bbe (patch) | |
tree | e4409fb32ed7c391f48c3c2699997fc5b75137a1 /src/tools | |
parent | 7cad036f812a87aafd7c0e8ed4cbea76fb4cb097 (diff) | |
parent | 15e9b779385c71d366776b83540e19e0735c4e66 (diff) | |
download | ouroboros-4e3c360377bc9b792c2fac83e9402d7531f79bbe.tar.gz ouroboros-4e3c360377bc9b792c2fac83e9402d7531f79bbe.zip |
Merged in sandervrijders/ouroboros/be-gam (pull request #345)
Be gam
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/irm/irm_ipcp_bootstrap.c | 15 | ||||
-rw-r--r-- | src/tools/irm/irm_ipcp_create.c | 3 | ||||
-rw-r--r-- | src/tools/irm/irm_ipcp_enroll.c | 1 |
3 files changed, 11 insertions, 8 deletions
diff --git a/src/tools/irm/irm_ipcp_bootstrap.c b/src/tools/irm/irm_ipcp_bootstrap.c index 8fd2fb73..4c7f2168 100644 --- a/src/tools/irm/irm_ipcp_bootstrap.c +++ b/src/tools/irm/irm_ipcp_bootstrap.c @@ -45,8 +45,10 @@ #define DEFAULT_MAX_PDU_SIZE 9000 #define DEFAULT_DDNS 0 #define DEFAULT_ADDR_AUTH FLAT_RANDOM +#define DEFAULT_DT_GAM COMPLETE -#define ADDR_AUTH_FLAT "flat" +#define ADDR_AUTH_FLAT "flat" +#define DT_GAM_COMPLETE "complete" static void usage(void) { @@ -67,6 +69,8 @@ static void usage(void) " [min_pdu <minimum PDU size> (default: %d)]\n" " [max_pdu <maximum PDU size> (default: %d)]\n" " [addr_auth <address policy> (default: %s)]\n" + " [dt_gam <data transfer graph adjacency manager>" + "(default: %s)]\n" "if TYPE == " SHIM_UDP "\n" " ip <IP address in dotted notation>\n" " [dns <DDNS IP address in dotted notation>" @@ -76,7 +80,7 @@ static void usage(void) DEFAULT_ADDR_SIZE, DEFAULT_CEP_ID_SIZE, DEFAULT_PDU_LEN_SIZE, DEFAULT_SEQ_NO_SIZE, DEFAULT_MIN_PDU_SIZE, DEFAULT_MAX_PDU_SIZE, - ADDR_AUTH_FLAT, DEFAULT_DDNS); + ADDR_AUTH_FLAT, DT_GAM_COMPLETE, DEFAULT_DDNS); } int do_bootstrap_ipcp(int argc, char ** argv) @@ -93,6 +97,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; enum pol_addr_auth addr_auth_type = DEFAULT_ADDR_AUTH; + enum pol_gam dt_gam_type = DEFAULT_DT_GAM; uint32_t ip_addr = 0; uint32_t dns_addr = DEFAULT_DDNS; char * ipcp_type = NULL; @@ -144,6 +149,9 @@ int do_bootstrap_ipcp(int argc, char ** argv) } else if (matches(*argv, "addr_auth") == 0) { if (strcmp(ADDR_AUTH_FLAT, *(argv + 1)) == 0) addr_auth_type = FLAT_RANDOM; + } else if (matches(*argv, "dt_gam") == 0) { + if (strcmp(DT_GAM_COMPLETE, *(argv + 1)) == 0) + dt_gam_type = COMPLETE; } else { printf("\"%s\" is unknown, try \"irm " "ipcp bootstrap\".\n", *argv); @@ -172,6 +180,7 @@ int do_bootstrap_ipcp(int argc, char ** argv) conf.min_pdu_size = min_pdu_size; conf.max_pdu_size = max_pdu_size; conf.addr_auth_type = addr_auth_type; + conf.dt_gam_type = dt_gam_type; } else if (strcmp(ipcp_type, SHIM_UDP) == 0) { conf.type = IPCP_SHIM_UDP; if (ip_addr == 0) { @@ -199,8 +208,6 @@ int do_bootstrap_ipcp(int argc, char ** argv) api = irm_create_ipcp(name, conf.type); if (api == 0) return -1; - if (conf.type == IPCP_NORMAL) - irm_bind_api(api, name); len = irm_list_ipcps(name, &apis); } diff --git a/src/tools/irm/irm_ipcp_create.c b/src/tools/irm/irm_ipcp_create.c index 9f636f34..e8ed1186 100644 --- a/src/tools/irm/irm_ipcp_create.c +++ b/src/tools/irm/irm_ipcp_create.c @@ -85,8 +85,5 @@ int do_create_ipcp(int argc, char ** argv) if (api == 0) return -1; - if (type == IPCP_NORMAL) - irm_bind_api(api, ipcp_name); - return 0; } diff --git a/src/tools/irm/irm_ipcp_enroll.c b/src/tools/irm/irm_ipcp_enroll.c index f7807f42..3731fa81 100644 --- a/src/tools/irm/irm_ipcp_enroll.c +++ b/src/tools/irm/irm_ipcp_enroll.c @@ -68,7 +68,6 @@ int do_enroll_ipcp(int argc, char ** argv) api = irm_create_ipcp(name, IPCP_NORMAL); if (api == 0) return -1; - irm_bind_api(api, name); len = irm_list_ipcps(name, &apis); } |