summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/shm_pci.h
diff options
context:
space:
mode:
authorSander Vrijders <[email protected]>2016-10-08 19:42:51 +0200
committerSander Vrijders <[email protected]>2016-10-11 16:15:33 +0200
commit69ef99bb2dc05337e8189acc42dc9122f4182ead (patch)
tree2808e55f80991cb9b59266c15726c982f3a4ca50 /src/ipcpd/normal/shm_pci.h
parentdbf3ab8dfb2cbe8167c464e3cf6a9aa757bfff6a (diff)
downloadouroboros-69ef99bb2dc05337e8189acc42dc9122f4182ead.tar.gz
ouroboros-69ef99bb2dc05337e8189acc42dc9122f4182ead.zip
ipcpd: normal: First version of the fast path bootstrap
This is the first version of the fast path bootstrap in the normal IPCP. It sets up a connection with the other end, and creates the appropriate data structures. N+1 and N-1 SDUs are read and written and passed through the right components.
Diffstat (limited to 'src/ipcpd/normal/shm_pci.h')
-rw-r--r--src/ipcpd/normal/shm_pci.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/ipcpd/normal/shm_pci.h b/src/ipcpd/normal/shm_pci.h
index aa9770b4..2836737c 100644
--- a/src/ipcpd/normal/shm_pci.h
+++ b/src/ipcpd/normal/shm_pci.h
@@ -25,22 +25,34 @@
#define OUROBOROS_IPCP_SHM_PCI_H
#include <ouroboros/shm_rdrbuff.h>
+#include <ouroboros/utils.h>
-#include <dt_const.h>
+#include "dt_const.h"
+
+#define PDU_TYPE_MGMT 0x40
+#define PDU_TYPE_DTP 0x80
+
+typedef uint32_t cep_id_t;
+#define INVALID_CEP_ID 0
struct pci {
+ uint8_t pdu_type;
uint64_t dst_addr;
uint64_t src_addr;
- uint32_t dst_cep_id;
- uint32_t src_cep_id;
+ cep_id_t dst_cep_id;
+ cep_id_t src_cep_id;
+ uint8_t qos_id;
uint32_t pdu_length;
uint64_t seqno;
- uint8_t qos_id;
uint8_t ttl;
+ uint8_t flags;
};
int shm_pci_ser(struct shm_du_buff * sdb,
- struct pci * pci);
+ struct pci * pci);
+
+buffer_t * shm_pci_ser_buf(buffer_t * buf,
+ struct pci * pci);
struct pci * shm_pci_des(struct shm_du_buff * sdb);