diff options
author | dimitri staessens <dimitri.staessens@ugent.be> | 2017-05-10 16:13:07 +0000 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@ugent.be> | 2017-05-10 16:13:07 +0000 |
commit | b36acfd93b1dc16a153ca9b9077d113732accb4e (patch) | |
tree | 4ee9635c7a0be3714c7c2f17353e07bc68cf8281 /src/ipcpd/normal/dt.c | |
parent | 40d3fd8cfaf93547428bae51bb34772ead7d32e7 (diff) | |
parent | c75f20d2ef73b0193e75fa59c4679be713a342c7 (diff) | |
download | ouroboros-b36acfd93b1dc16a153ca9b9077d113732accb4e.tar.gz ouroboros-b36acfd93b1dc16a153ca9b9077d113732accb4e.zip |
Merged in dstaesse/ouroboros/be-frct-del (pull request #504)
ipcpd: Remove FRCT from normal IPCP
Diffstat (limited to 'src/ipcpd/normal/dt.c')
-rw-r--r-- | src/ipcpd/normal/dt.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/ipcpd/normal/dt.c b/src/ipcpd/normal/dt.c index 4e0ba51d..33070fa2 100644 --- a/src/ipcpd/normal/dt.c +++ b/src/ipcpd/normal/dt.c @@ -36,7 +36,6 @@ #include "gam.h" #include "routing.h" #include "sdu_sched.h" -#include "frct.h" #include "ae.h" #include "ribconfig.h" #include "fa.h" @@ -113,19 +112,21 @@ static int sdu_handler(int fd, } else { dt_pci_shrink(sdb); - switch (dt_pci.pdu_type) { - case PDU_TYPE_FRCT: - if (frct_post_sdu(sdb)) { + if (dt_pci.fd > AP_RES_FDS) { + if (ipcp_flow_write(dt_pci.fd, sdb)) { ipcp_sdb_release(sdb); return -1; } - break; - case PDU_TYPE_FA: + return 0; + } + + switch (dt_pci.fd) { + case FD_FA: if (fa_post_sdu(sdb)) { ipcp_sdb_release(sdb); return -1; } - break; + return 0; default: log_err("Unknown PDU type received."); ipcp_sdb_release(sdb); @@ -133,6 +134,7 @@ static int sdu_handler(int fd, } } + /* silence compiler */ return 0; } @@ -150,7 +152,7 @@ int dt_init(void) memset(&info, 0, sizeof(info)); strcpy(info.ae_name, DT_AE); - strcpy(info.protocol, FRCT_PROTO); + strcpy(info.protocol, DT_PROTO); info.pref_version = 1; info.pref_syntax = PROTO_FIXED; info.addr = ipcpi.dt_addr; @@ -265,7 +267,7 @@ void dt_stop(void) int dt_write_sdu(uint64_t dst_addr, qoscube_t qc, - uint8_t pdu_type, + int np1_fd, struct shm_du_buff * sdb) { int fd; @@ -280,8 +282,8 @@ int dt_write_sdu(uint64_t dst_addr, } dt_pci.dst_addr = dst_addr; - dt_pci.qc = qc; - dt_pci.pdu_type = pdu_type; + dt_pci.qc = qc; + dt_pci.fd = np1_fd; if (dt_pci_ser(sdb, &dt_pci)) { log_err("Failed to serialize PDU."); |