summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/ribmgr.c
diff options
context:
space:
mode:
authorSander Vrijders <[email protected]>2017-01-11 18:59:11 +0100
committerSander Vrijders <[email protected]>2017-01-12 13:40:38 +0100
commit15e9b779385c71d366776b83540e19e0735c4e66 (patch)
tree5f4fe39683c0676c243f287840f2775a867c9142 /src/ipcpd/normal/ribmgr.c
parenta991831b5373eba38d6f756d254f151b22790238 (diff)
downloadouroboros-15e9b779385c71d366776b83540e19e0735c4e66.tar.gz
ouroboros-15e9b779385c71d366776b83540e19e0735c4e66.zip
ipcpd: normal: Create policies for GAM
This allows the selection of a policy for the graph adjacency manager. Currently we only support constructing a complete graph.
Diffstat (limited to 'src/ipcpd/normal/ribmgr.c')
-rw-r--r--src/ipcpd/normal/ribmgr.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/ipcpd/normal/ribmgr.c b/src/ipcpd/normal/ribmgr.c
index c780bf50..993fe62a 100644
--- a/src/ipcpd/normal/ribmgr.c
+++ b/src/ipcpd/normal/ribmgr.c
@@ -139,6 +139,8 @@ struct {
struct addr_auth * addr_auth;
enum pol_addr_auth addr_auth_type;
+ enum pol_gam dt_gam_type;
+
enum ribmgr_state state;
pthread_cond_t state_cond;
pthread_mutex_t state_lock;
@@ -168,6 +170,7 @@ void ribmgr_ro_created(const char * name,
rib.dtc.min_pdu_size = stat_msg->min_pdu_size;
rib.dtc.max_pdu_size = stat_msg->max_pdu_size;
rib.addr_auth_type = stat_msg->addr_auth_type;
+ rib.dt_gam_type = stat_msg->dt_gam_type;
static_info_msg__free_unpacked(stat_msg, NULL);
}
@@ -1262,6 +1265,7 @@ int ribmgr_bootstrap(struct dif_config * conf)
stat_info.min_pdu_size = rib.dtc.min_pdu_size = conf->min_pdu_size;
stat_info.max_pdu_size = rib.dtc.max_pdu_size = conf->max_pdu_size;
stat_info.addr_auth_type = rib.addr_auth_type = conf->addr_auth_type;
+ stat_info.dt_gam_type = rib.dt_gam_type = conf->dt_gam_type;
len = static_info_msg__get_packed_size(&stat_info);
if (len == 0) {
@@ -1354,16 +1358,21 @@ int ribmgr_start_policies(void)
return 0;
}
-struct dt_const * ribmgr_dt_const()
+struct dt_const * ribmgr_dt_const(void)
{
return &(rib.dtc);
}
-uint64_t ribmgr_address()
+uint64_t ribmgr_address(void)
{
return rib.address;
}
+enum pol_gam ribmgr_dt_gam(void)
+{
+ return rib.dt_gam_type;
+}
+
static int send_neighbors_ro(char * name, ro_msg_t * msg, enum cdap_opcode code)
{
struct list_head * p = NULL;