From a409fd81dfc6d22f9a287f15394b86490dea5273 Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Thu, 23 Feb 2017 14:31:31 +0100 Subject: ipcpd: normal: Refactor application entities and add neighbors struct This refactors the different Application Entities of the normal IPCP. They all listen to and use the connection manager to establish new application connections. This commit also adds a neighbors struct to the normal IPCP. It contains neighbor structs that contain application connection. Notifiers can be registered in case a neighbor changes (added, removed, QoS changed). The flow manager has an instance of this neighbors struct and listens to these events to update its flow set. The routing component also listens to these events so that it can update the FSDB if needed. The flow manager now also creates the PFF instances and the routing instances per QoS cube. The RIB manager also uses this an instance of the neighbors struct and listens to neighbor events as well. --- src/ipcpd/normal/connmgr.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/ipcpd/normal/connmgr.c') diff --git a/src/ipcpd/normal/connmgr.c b/src/ipcpd/normal/connmgr.c index 387c38fd..0c908cd1 100644 --- a/src/ipcpd/normal/connmgr.c +++ b/src/ipcpd/normal/connmgr.c @@ -42,8 +42,6 @@ #include #include -#define FRCT_PROTO "frct" - struct ae_conn { struct list_head next; struct conn conn; @@ -272,7 +270,7 @@ void connmgr_ae_destroy(struct ae * ae) int connmgr_alloc(struct ae * ae, char * dst_name, - qosspec_t qs, + qosspec_t * qs, struct conn * conn) { assert(ae); @@ -281,13 +279,13 @@ int connmgr_alloc(struct ae * ae, memset(&conn->conn_info, 0, sizeof(conn->conn_info)); - conn->flow_info.fd = flow_alloc(dst_name, &qs); + conn->flow_info.fd = flow_alloc(dst_name, qs); if (conn->flow_info.fd < 0) { log_err("Failed to allocate flow to %s.", dst_name); return -1; } - conn->flow_info.qs = qs; + conn->flow_info.qs = *qs; if (flow_alloc_res(conn->flow_info.fd)) { log_err("Flow allocation to %s failed.", dst_name); -- cgit v1.2.3