summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/dt_pci.c
diff options
context:
space:
mode:
authordimitri staessens <[email protected]>2017-05-10 16:39:58 +0200
committerdimitri staessens <[email protected]>2017-05-10 17:03:08 +0200
commitc75f20d2ef73b0193e75fa59c4679be713a342c7 (patch)
tree4ee9635c7a0be3714c7c2f17353e07bc68cf8281 /src/ipcpd/normal/dt_pci.c
parent40d3fd8cfaf93547428bae51bb34772ead7d32e7 (diff)
downloadouroboros-c75f20d2ef73b0193e75fa59c4679be713a342c7.tar.gz
ouroboros-c75f20d2ef73b0193e75fa59c4679be713a342c7.zip
ipcpd: Remove FRCT from normal IPCP
In order to ensure 100% reliable transfer, the protocol state machine that takes care of retransmission and SDU ordering has to be in the application. Flow allocation in the normal now uses fds. The PDU_type field was deprecated and AE's within the DIF can use reserved fds.
Diffstat (limited to 'src/ipcpd/normal/dt_pci.c')
-rw-r--r--src/ipcpd/normal/dt_pci.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ipcpd/normal/dt_pci.c b/src/ipcpd/normal/dt_pci.c
index 39dde46b..9f3b9a91 100644
--- a/src/ipcpd/normal/dt_pci.c
+++ b/src/ipcpd/normal/dt_pci.c
@@ -47,7 +47,7 @@ struct {
/* offsets */
size_t qc_o;
size_t ttl_o;
- size_t type_o;
+ size_t fd_o;
} dt_pci_info;
int dt_pci_init(void)
@@ -67,11 +67,11 @@ int dt_pci_init(void)
dt_pci_info.qc_o = dt_pci_info.dtc.addr_size;
dt_pci_info.ttl_o = dt_pci_info.qc_o + QC_SIZE;
if (dt_pci_info.dtc.has_ttl)
- dt_pci_info.type_o = dt_pci_info.ttl_o + TTL_SIZE;
+ dt_pci_info.fd_o = dt_pci_info.ttl_o + TTL_SIZE;
else
- dt_pci_info.type_o = dt_pci_info.ttl_o;
+ dt_pci_info.fd_o = dt_pci_info.ttl_o;
- dt_pci_info.head_size = dt_pci_info.type_o + PDU_TYPE_SIZE;
+ dt_pci_info.head_size = dt_pci_info.fd_o + PDU_TYPE_SIZE;
dt_pci_info.tail_size = dt_pci_info.dtc.has_chk ? CHK_SIZE : 0;
return 0;
@@ -100,7 +100,7 @@ int dt_pci_ser(struct shm_du_buff * sdb,
memcpy(head + dt_pci_info.qc_o, &dt_pci->qc, QC_SIZE);
if (dt_pci_info.dtc.has_ttl)
memcpy(head + dt_pci_info.ttl_o, &ttl, TTL_SIZE);
- memcpy(head + dt_pci_info.type_o, &dt_pci->pdu_type, PDU_TYPE_SIZE);
+ memcpy(head + dt_pci_info.fd_o, &dt_pci->fd, PDU_TYPE_SIZE);
if (dt_pci_info.dtc.has_chk) {
tail = shm_du_buff_tail_alloc(sdb, dt_pci_info.tail_size);
@@ -137,7 +137,7 @@ void dt_pci_des(struct shm_du_buff * sdb,
dt_pci->ttl = 1;
}
- memcpy(&dt_pci->pdu_type, head + dt_pci_info.type_o, PDU_TYPE_SIZE);
+ memcpy(&dt_pci->fd, head + dt_pci_info.fd_o, PDU_TYPE_SIZE);
}
void dt_pci_shrink(struct shm_du_buff * sdb)