From b1d605781449aaa7c32b28e0b3466deaec3c576f Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Fri, 26 Feb 2016 04:00:18 +0100 Subject: include: added data transfer constants to common.h dt_const contains data transfer constants dup_const contains constants for du protection --- include/ouroboros/common.h | 40 +++++++++++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 7 deletions(-) (limited to 'include/ouroboros/common.h') diff --git a/include/ouroboros/common.h b/include/ouroboros/common.h index 09900a1f..d1ddddfa 100644 --- a/include/ouroboros/common.h +++ b/include/ouroboros/common.h @@ -38,22 +38,48 @@ typedef struct { typedef struct { char * ap_name; - int api_id; + int api_id; char * ae_name; - int aei_id; + int aei_id; } rina_name_t; /* FIXME: To be extended to have all QoS params */ struct qos_spec { - char * name; - char * dif_name; - double delay; - double jitter; + uint32_t delay; + uint32_t jitter; + +}; + +struct dtp_const { + /* pci field lengths, bits */ + /* most significant bit indicates head (0) or tail (1) */ + uint8_t addr_sz; + uint8_t cep_id_sz; + uint8_t pdu_length_sz; + /* not sure about port_id_sz... port_id's are not + part of dtp and should not go on the wire */ + /* uint8_t port_id_sz; */ + uint8_t qos_id_sz; + uint8_t seqnr_sz; + /* uint8_t ctrl_sqnum_sz; is this crap in the spec?? */ + + /* one will need this for hardware alignment */ + uint8_t pad_head_sz; + uint8_t pad_tail_sz; +}; + +struct dup_const { + /* pci field lengths, bits */ + /* most significant bit indicates head (0) or tail (1) */ + uint8_t ttl_sz; + uint8_t chk_sz; }; /* FIXME: What should be configurable in the DIF? */ struct dif_info { - int cep_id_size; + /* values, octets */ + uint32_t min_pdu_sz; + uint32_t max_pdu_sz; }; #endif -- cgit v1.2.3