From 60e357b819c8f2cf4dd699e67c496b50410872ac Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Mon, 11 Apr 2016 16:26:36 +0200 Subject: tools: Update irm bootstrap This updates irm bootstrap so that the parameters from the struct dif_config can be correctly filled in from the command line. --- src/tools/irm/irm_bootstrap_ipcp.c | 110 +++++++++++++++++++++++++++++++++++-- 1 file changed, 106 insertions(+), 4 deletions(-) (limited to 'src/tools/irm/irm_bootstrap_ipcp.c') diff --git a/src/tools/irm/irm_bootstrap_ipcp.c b/src/tools/irm/irm_bootstrap_ipcp.c index e7acfccd..7e7b6e05 100644 --- a/src/tools/irm/irm_bootstrap_ipcp.c +++ b/src/tools/irm/irm_bootstrap_ipcp.c @@ -22,30 +22,105 @@ #include #include +#include +#include + #include #include #include "irm_ops.h" #include "irm_utils.h" +#define NORMAL "normal" +#define SHIM_UDP "shim-udp" + +#define DEFAULT_ADDR_SIZE 4 +#define DEFAULT_CEP_ID_SIZE 2 +#define DEFAULT_PDU_LEN_SIZE 2 +#define DEFAULT_QOS_ID_SIZE 1 +#define DEFAULT_SEQ_NO_SIZE 4 +#define DEFAULT_TTL_SIZE 1 +#define DEFAULT_CHK_SIZE 2 +#define DEFAULT_MIN_PDU_SIZE 0 +#define DEFAULT_MAX_PDU_SIZE 9000 + static void usage() { /* FIXME: Add dif_config stuff */ printf("Usage: irm bootstrap_ipcp\n" " ap \n" - " [api ]\n"); + " [api ]\n" + " dif \n" + " type [TYPE]\n\n" + "where TYPE = {" NORMAL " " SHIM_UDP "}\n\n" + "if TYPE == " NORMAL "\n" + " [addr
(default: %d)]\n" + " [cep_id (default: %d)]\n" + " [pdu_len (default: %d)]\n" + " [qos_id (default: %d)]\n" + " [seqno (default: %d)]\n" + " [ttl