diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/ouroboros/cacep.h | 47 | ||||
-rw-r--r-- | include/ouroboros/irm.h | 4 | ||||
-rw-r--r-- | include/ouroboros/irm_config.h | 32 | ||||
-rw-r--r-- | include/ouroboros/wrap/CMakeLists.txt | 3 | ||||
-rw-r--r-- | include/ouroboros/wrap/ouroboros.i | 2 |
5 files changed, 72 insertions, 16 deletions
diff --git a/include/ouroboros/cacep.h b/include/ouroboros/cacep.h new file mode 100644 index 00000000..ae615e6e --- /dev/null +++ b/include/ouroboros/cacep.h @@ -0,0 +1,47 @@ +/* + * Ouroboros - Copyright (C) 2016 - 2017 + * + * The Common Application Connection Establishment Phase + * + * Sander Vrijders <sander.vrijders@intec.ugent.be> + * Dimitri Staessens <dimitri.staessens@intec.ugent.be> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * version 2.1 as published by the Free Software Foundation. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA + */ + +#ifndef OUROBOROS_CACEP_H +#define OUROBOROS_CACEP_H + +#include <stdint.h> +#include <unistd.h> + +struct cacep; + +struct cacep_info { + char * name; + uint64_t addr; +}; + +struct cacep * cacep_create(int fd, + const char * name, + uint64_t address); + +int cacep_destroy(struct cacep * instance); + +struct cacep_info * cacep_auth(struct cacep * instance); + +struct cacep_info * cacep_auth_wait(struct cacep * instance); + +#endif /* OUROBOROS_CACEP_H */ diff --git a/include/ouroboros/irm.h b/include/ouroboros/irm.h index b281d4c5..79e3e7c9 100644 --- a/include/ouroboros/irm.h +++ b/include/ouroboros/irm.h @@ -50,10 +50,10 @@ int irm_bind_ap(char * ap, int irm_unbind_ap(char * ap, char * name); -int irm_bind_api(pid_t api, +int irm_bind_api(pid_t api, char * name); -int irm_unbind_api(pid_t api, +int irm_unbind_api(pid_t api, char * name); int irm_reg(char * name, diff --git a/include/ouroboros/irm_config.h b/include/ouroboros/irm_config.h index ac94e9c8..c4a81c23 100644 --- a/include/ouroboros/irm_config.h +++ b/include/ouroboros/irm_config.h @@ -43,36 +43,40 @@ enum pol_addr_auth { FLAT_RANDOM = 0 }; +enum pol_gam { + COMPLETE = 0 +}; + struct dif_config { - char * dif_name; + char * dif_name; enum ipcp_type type; union { /* Normal DIF */ struct { - uint8_t addr_size; - uint8_t cep_id_size; - uint8_t pdu_length_size; - uint8_t qos_id_size; - uint8_t seqno_size; + uint8_t addr_size; + uint8_t cep_id_size; + uint8_t pdu_length_size; + uint8_t qos_id_size; + uint8_t seqno_size; - /* DUP constants */ - bool has_ttl; - bool has_chk; + bool has_ttl; + bool has_chk; - uint32_t min_pdu_size; - uint32_t max_pdu_size; + uint32_t min_pdu_size; + uint32_t max_pdu_size; enum pol_addr_auth addr_auth_type; + enum pol_gam dt_gam_type; }; /* Shim UDP */ struct { - uint32_t ip_addr; - uint32_t dns_addr; + uint32_t ip_addr; + uint32_t dns_addr; }; /* Shim Ethernet LLC */ struct { - char * if_name; + char * if_name; }; }; }; diff --git a/include/ouroboros/wrap/CMakeLists.txt b/include/ouroboros/wrap/CMakeLists.txt index 16c86611..7753ca02 100644 --- a/include/ouroboros/wrap/CMakeLists.txt +++ b/include/ouroboros/wrap/CMakeLists.txt @@ -16,6 +16,9 @@ else () else () include_directories(${PYTHON_INCLUDE_PATH}) + # Python assumes C99 since Python 3.6 + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99") + swig_add_module(ouroboros python ouroboros.i) swig_link_libraries(ouroboros ${PYTHON_LIBRARIES} ouroboros) diff --git a/include/ouroboros/wrap/ouroboros.i b/include/ouroboros/wrap/ouroboros.i index 23d05f7b..b156eb36 100644 --- a/include/ouroboros/wrap/ouroboros.i +++ b/include/ouroboros/wrap/ouroboros.i @@ -22,6 +22,7 @@ %module ouroboros %{ +#include "ouroboros/cacep.h" #include "ouroboros/cdap.h" #include "ouroboros/dev.h" #include "ouroboros/errno.h" @@ -35,6 +36,7 @@ typedef int pid_t; +#include "ouroboros/cacep.h" %include "ouroboros/cdap.h" %include "ouroboros/dev.h" %include "ouroboros/errno.h" |