diff options
author | Sander Vrijders <sander.vrijders@ugent.be> | 2017-09-27 15:33:39 +0200 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@ugent.be> | 2017-09-29 15:12:36 +0200 |
commit | e3dba5812b1422a79e6e77ce9f923bade5a480e4 (patch) | |
tree | ca538ff9fd4887a17f85556e8207412d9699c833 /src/tools/irm/irm_ipcp_bootstrap.c | |
parent | ddba836eb79ace3bd80ea6af69801f402cbffd20 (diff) | |
download | ouroboros-e3dba5812b1422a79e6e77ce9f923bade5a480e4.tar.gz ouroboros-e3dba5812b1422a79e6e77ce9f923bade5a480e4.zip |
ipcpd: normal: Add Loop-Free Alternates routing
This adds the Loop-Free Alternates (LFA) policy. In case a link goes
down a LFA may be selected to route the SDUs on without causing loops
instead of the main hop that just went down.
Diffstat (limited to 'src/tools/irm/irm_ipcp_bootstrap.c')
-rw-r--r-- | src/tools/irm/irm_ipcp_bootstrap.c | 51 |
1 files changed, 28 insertions, 23 deletions
diff --git a/src/tools/irm/irm_ipcp_bootstrap.c b/src/tools/irm/irm_ipcp_bootstrap.c index 9812f860..26b86a16 100644 --- a/src/tools/irm/irm_ipcp_bootstrap.c +++ b/src/tools/irm/irm_ipcp_bootstrap.c @@ -33,28 +33,29 @@ #include "irm_ops.h" #include "irm_utils.h" -#define NORMAL "normal" -#define SHIM_UDP "shim-udp" -#define SHIM_ETH_LLC "shim-eth-llc" -#define LOCAL "local" - -#define MD5 "MD5" -#define SHA3_224 "SHA3_224" -#define SHA3_256 "SHA3_256" -#define SHA3_384 "SHA3_384" -#define SHA3_512 "SHA3_512" - -#define DEFAULT_ADDR_SIZE 4 -#define DEFAULT_FD_SIZE 2 -#define DEFAULT_DDNS 0 -#define DEFAULT_ADDR_AUTH ADDR_AUTH_FLAT_RANDOM -#define DEFAULT_ROUTING ROUTING_LINK_STATE -#define DEFAULT_PFF PFF_SIMPLE -#define DEFAULT_HASH_ALGO DIR_HASH_SHA3_256 -#define FLAT_RANDOM_ADDR_AUTH "flat" -#define LINK_STATE_ROUTING "link_state" -#define SIMPLE_PFF "simple" -#define ALTERNATE_PFF "alternate" +#define NORMAL "normal" +#define SHIM_UDP "shim-udp" +#define SHIM_ETH_LLC "shim-eth-llc" +#define LOCAL "local" + +#define MD5 "MD5" +#define SHA3_224 "SHA3_224" +#define SHA3_256 "SHA3_256" +#define SHA3_384 "SHA3_384" +#define SHA3_512 "SHA3_512" + +#define DEFAULT_ADDR_SIZE 4 +#define DEFAULT_FD_SIZE 2 +#define DEFAULT_DDNS 0 +#define DEFAULT_ADDR_AUTH ADDR_AUTH_FLAT_RANDOM +#define DEFAULT_ROUTING ROUTING_LINK_STATE +#define DEFAULT_PFF PFF_SIMPLE +#define DEFAULT_HASH_ALGO DIR_HASH_SHA3_256 +#define FLAT_RANDOM_ADDR_AUTH "flat" +#define LINK_STATE_ROUTING "link_state" +#define LINK_STATE_LFA_ROUTING "lfa" +#define SIMPLE_PFF "simple" +#define ALTERNATE_PFF "alternate" static void usage(void) { @@ -74,7 +75,8 @@ static void usage(void) " [pff [PFF_POLICY] (default: %s)]\n" " [hash [ALGORITHM] (default: %s)]\n" "where ADDRESS_POLICY = {"FLAT_RANDOM_ADDR_AUTH"}\n" - " ROUTING_POLICY = {"LINK_STATE_ROUTING"}\n" + " ROUTING_POLICY = {"LINK_STATE_ROUTING " " + LINK_STATE_LFA_ROUTING "}\n" " PFF_POLICY = {" SIMPLE_PFF " " ALTERNATE_PFF "}\n" " ALGORITHM = {" SHA3_224 " " SHA3_256 " " SHA3_384 " " SHA3_512 "}\n\n" @@ -151,6 +153,9 @@ int do_bootstrap_ipcp(int argc, char ** argv) } else if (matches(*argv, "routing") == 0) { if (strcmp(LINK_STATE_ROUTING, *(argv + 1)) == 0) routing_type = ROUTING_LINK_STATE; + else if (strcmp(LINK_STATE_LFA_ROUTING, + *(argv + 1)) == 0) + routing_type = ROUTING_LINK_STATE_LFA; else goto unknown_param; } else if (matches(*argv, "pff") == 0) { |