summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordimitri staessens <[email protected]>2017-01-12 14:58:49 +0100
committerdimitri staessens <[email protected]>2017-01-12 14:58:49 +0100
commit4e3c360377bc9b792c2fac83e9402d7531f79bbe (patch)
treee4409fb32ed7c391f48c3c2699997fc5b75137a1 /include
parent7cad036f812a87aafd7c0e8ed4cbea76fb4cb097 (diff)
parent15e9b779385c71d366776b83540e19e0735c4e66 (diff)
downloadouroboros-4e3c360377bc9b792c2fac83e9402d7531f79bbe.tar.gz
ouroboros-4e3c360377bc9b792c2fac83e9402d7531f79bbe.zip
Merged in sandervrijders/ouroboros/be-gam (pull request #345)
Be gam
Diffstat (limited to 'include')
-rw-r--r--include/ouroboros/cacep.h47
-rw-r--r--include/ouroboros/irm.h4
-rw-r--r--include/ouroboros/irm_config.h32
-rw-r--r--include/ouroboros/wrap/CMakeLists.txt3
-rw-r--r--include/ouroboros/wrap/ouroboros.i2
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 <[email protected]>
+ * Dimitri Staessens <[email protected]>
+ *
+ * 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"