diff options
author | Sander Vrijders <[email protected]> | 2017-05-15 18:08:53 +0200 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2017-05-15 18:21:45 +0200 |
commit | 5d87cec1757c4e1c23ae778f2814363c1e39b43c (patch) | |
tree | ea57e4a1e634d3b7e7325b61f6dba36d941e03ae /src/ipcpd/normal/main.c | |
parent | 0fc0f3701ef4f504e71eadcc92a93faf1dd33bf4 (diff) | |
download | ouroboros-5d87cec1757c4e1c23ae778f2814363c1e39b43c.tar.gz ouroboros-5d87cec1757c4e1c23ae778f2814363c1e39b43c.zip |
ipcpd: normal: Make routing a policy
This makes the routing component into a policy since different
approaches may exist to do this, depending on how high the rank of the
DIF is.
Diffstat (limited to 'src/ipcpd/normal/main.c')
-rw-r--r-- | src/ipcpd/normal/main.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/ipcpd/normal/main.c b/src/ipcpd/normal/main.c index f9718041..0b8a26ab 100644 --- a/src/ipcpd/normal/main.c +++ b/src/ipcpd/normal/main.c @@ -88,7 +88,7 @@ static int boot_components(void) log_dbg("Starting components."); - if (rib_read(BOOT_PATH "/addr_auth/type", &pa, sizeof(pa)) + if (rib_read(BOOT_PATH "/dt/addr_auth/type", &pa, sizeof(pa)) != sizeof(pa)) { log_err("Failed to read policy for address authority."); goto fail_addr_auth; @@ -261,17 +261,17 @@ const struct ros { {BOOT_PATH "/dt/const", "addr_size"}, {BOOT_PATH "/dt/const", "fd_size"}, {BOOT_PATH "/dt/const", "has_ttl"}, + {BOOT_PATH "/dt", "addr_auth"}, + {BOOT_PATH "/dt/addr_auth", "type"}, + {BOOT_PATH "/dt", "routing"}, + {BOOT_PATH "/dt/routing", "type"}, /* RIB MGR COMPONENT */ {BOOT_PATH, "rm"}, - {BOOT_PATH "/rm","gam"}, {BOOT_PATH "/rm/gam", "type"}, {BOOT_PATH "/rm/gam", "cacep"}, - /* ADDR AUTH COMPONENT */ - {BOOT_PATH, "addr_auth"}, - {BOOT_PATH "/addr_auth", "type"}, {NULL, NULL} }; @@ -327,9 +327,12 @@ static int normal_ipcp_bootstrap(const struct ipcp_config * conf) rib_write(BOOT_PATH "/rm/gam/type", &conf->rm_gam_type, sizeof(conf->rm_gam_type)) || - rib_write(BOOT_PATH "/addr_auth/type", + rib_write(BOOT_PATH "/dt/addr_auth/type", &conf->addr_auth_type, - sizeof(conf->addr_auth_type))) { + sizeof(conf->addr_auth_type)) || + rib_write(BOOT_PATH "/dt/routing/type", + &conf->routing_type, + sizeof(conf->routing_type))) { log_err("Failed to write boot info to RIB."); return -1; } |