summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/frct.c
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@intec.ugent.be>2017-02-06 16:05:44 +0100
committerdimitri staessens <dimitri.staessens@intec.ugent.be>2017-02-06 20:04:34 +0100
commit373efaf24d3600fe4dadf6bfaaee8d19e2ec32d7 (patch)
tree8711a4edbc2a6defaab63f0dcc2b0690252307b4 /src/ipcpd/normal/frct.c
parent4b11f952c521315883f64571e1790389e8d20f64 (diff)
downloadouroboros-373efaf24d3600fe4dadf6bfaaee8d19e2ec32d7.tar.gz
ouroboros-373efaf24d3600fe4dadf6bfaaee8d19e2ec32d7.zip
ipcpd, lib: Revise normal IPCP
This PR updates the normal IPCP to use the new RIB. The old ribmgr is removed and replaced by a stub that needs to be implemented. All components (dir, fmgr, frct) were adapted to the new RIB API. A lot of functionality was moved outside of the ribmgr, such as the addr_auth, which is now a component of the IPCP. The address is also stored to the ipcpi struct. The irm tool has an option to set the gam policy of the rib manager.
Diffstat (limited to 'src/ipcpd/normal/frct.c')
-rw-r--r--src/ipcpd/normal/frct.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/ipcpd/normal/frct.c b/src/ipcpd/normal/frct.c
index 6cd68f18..ce316ca2 100644
--- a/src/ipcpd/normal/frct.c
+++ b/src/ipcpd/normal/frct.c
@@ -26,14 +26,14 @@
#include <ouroboros/bitmap.h>
#include <ouroboros/list.h>
+#include "frct.h"
+#include "fmgr.h"
+#include "ipcp.h"
+
#include <stdlib.h>
#include <stdbool.h>
#include <pthread.h>
-#include "frct.h"
-#include "fmgr.h"
-#include "ribmgr.h"
-
enum conn_state {
CONN_PENDING = 0,
CONN_ESTABLISHED
@@ -285,7 +285,7 @@ cep_id_t frct_i_create(uint64_t address,
pci.pdu_type = PDU_TYPE_MGMT;
pci.dst_addr = address;
- pci.src_addr = ribmgr_address();
+ pci.src_addr = ipcpi.address;
pci.dst_cep_id = 0;
pci.src_cep_id = id;
pci.seqno = 0;
@@ -330,7 +330,7 @@ int frct_i_accept(cep_id_t id,
pci.pdu_type = PDU_TYPE_MGMT;
pci.dst_addr = instance->r_address;
- pci.src_addr = ribmgr_address();
+ pci.src_addr = ipcpi.address;
pci.dst_cep_id = instance->r_cep_id;
pci.src_cep_id = instance->cep_id;
pci.seqno = 0;
@@ -367,7 +367,7 @@ int frct_i_destroy(cep_id_t id,
pci.pdu_type = PDU_TYPE_MGMT;
pci.dst_addr = instance->r_address;
- pci.src_addr = ribmgr_address();
+ pci.src_addr = ipcpi.address;
pci.dst_cep_id = instance->r_cep_id;
pci.src_cep_id = instance->cep_id;
pci.seqno = 0;
@@ -413,7 +413,7 @@ int frct_i_write_sdu(cep_id_t id,
pci.pdu_type = PDU_TYPE_DTP;
pci.dst_addr = instance->r_address;
- pci.src_addr = ribmgr_address();
+ pci.src_addr = ipcpi.address;
pci.dst_cep_id = instance->r_cep_id;
pci.src_cep_id = instance->cep_id;
pci.seqno = (instance->seqno)++;