diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/ouroboros/CMakeLists.txt | 13 | ||||
-rw-r--r-- | include/ouroboros/common.h | 11 | ||||
-rw-r--r-- | include/ouroboros/dev.h | 9 | ||||
-rw-r--r-- | include/ouroboros/flow.h | 4 | ||||
-rw-r--r-- | include/ouroboros/ipcp.h | 22 | ||||
-rw-r--r-- | include/ouroboros/qos.h | 35 |
6 files changed, 59 insertions, 35 deletions
diff --git a/include/ouroboros/CMakeLists.txt b/include/ouroboros/CMakeLists.txt index f1276f51..5ce99c4c 100644 --- a/include/ouroboros/CMakeLists.txt +++ b/include/ouroboros/CMakeLists.txt @@ -3,24 +3,13 @@ configure_file( "${CMAKE_CURRENT_BINARY_DIR}/config.h") set(HEADER_FILES - bitmap.h cdap.h - common.h da.h dev.h dif_config.h - du_buff.h flow.h - instance_name.h - ipcp.h irm.h - list.h - logs.h - rw_lock.h - shm_ap_rbuff.h - shm_du_map.h - sockets.h - utils.h + qos.h ) install(FILES ${HEADER_FILES} "${CMAKE_CURRENT_BINARY_DIR}/config.h" diff --git a/include/ouroboros/common.h b/include/ouroboros/common.h index 971a382a..f2c8a9ec 100644 --- a/include/ouroboros/common.h +++ b/include/ouroboros/common.h @@ -33,13 +33,10 @@ typedef struct { size_t size; } buffer_t; -/* FIXME: may need revision */ -struct qos_spec { - char * qos_name; - char * dif_name; - - uint32_t delay; - uint32_t jitter; +/* FIXME: To be decided which QoS cubes we support */ +enum qos_cube { + QOS_CUBE_BE = 0, + QOS_CUBE_VIDEO }; #endif /* OUROBOROS_COMMON_H */ diff --git a/include/ouroboros/dev.h b/include/ouroboros/dev.h index d8e65144..506fa789 100644 --- a/include/ouroboros/dev.h +++ b/include/ouroboros/dev.h @@ -20,12 +20,15 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef OUROBOROS_DEV_H -#define OUROBOROS_DEV_H +#include <unistd.h> +#include <stdint.h> -#include <ouroboros/common.h> +#include <ouroboros/qos.h> #include <ouroboros/flow.h> +#ifndef OUROBOROS_DEV_H +#define OUROBOROS_DEV_H + #define UNKNOWN_AP "__UNKNOWN_AP__" #define UNKNOWN_AE "__UNKNOWN_AE__" diff --git a/include/ouroboros/flow.h b/include/ouroboros/flow.h index 380c671b..aa377034 100644 --- a/include/ouroboros/flow.h +++ b/include/ouroboros/flow.h @@ -39,8 +39,8 @@ enum flow_state { FLOW_NULL = 0, - FLOW_ALLOCATED, - FLOW_PENDING + FLOW_PENDING, + FLOW_ALLOCATED }; #endif /* OUROBOROS_FLOW_H */ diff --git a/include/ouroboros/ipcp.h b/include/ouroboros/ipcp.h index 63e19e9d..08bee33e 100644 --- a/include/ouroboros/ipcp.h +++ b/include/ouroboros/ipcp.h @@ -20,16 +20,16 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef OUROBOROS_IPCP_H -#define OUROBOROS_IPCP_H - -#include <ouroboros/common.h> #include <ouroboros/dif_config.h> #include <ouroboros/instance_name.h> #include <ouroboros/sockets.h> +#include <ouroboros/common.h> #include <sys/types.h> +#ifndef OUROBOROS_IPCP_H +#define OUROBOROS_IPCP_H + struct ipcp; /* Returns the process id */ @@ -59,13 +59,13 @@ int ipcp_name_reg(pid_t pid, int ipcp_name_unreg(pid_t pid, char * name); -int ipcp_flow_alloc(pid_t pid, - int port_id, - pid_t n_pid, - char * dst_name, - char * src_ap_name, - char * src_ae_name, - struct qos_spec * qos); +int ipcp_flow_alloc(pid_t pid, + int port_id, + pid_t n_pid, + char * dst_name, + char * src_ap_name, + char * src_ae_name, + enum qos_cube qos); int ipcp_flow_alloc_resp(pid_t pid, int port_id, pid_t n_pid, diff --git a/include/ouroboros/qos.h b/include/ouroboros/qos.h new file mode 100644 index 00000000..c87b7c69 --- /dev/null +++ b/include/ouroboros/qos.h @@ -0,0 +1,35 @@ +/* + * Ouroboros - Copyright (C) 2016 + * + * Quality of Service specification + * + * Sander Vrijders <sander.vrijders@intec.ugent.be> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef OUROBOROS_QOS_H +#define OUROBOROS_QOS_H + +/* FIXME: may need revision */ +struct qos_spec { + char * qos_name; + char * dif_name; + + uint32_t delay; + uint32_t jitter; +}; + +#endif |