summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/ouroboros/config.h.in19
-rw-r--r--include/ouroboros/np1_flow.h7
-rw-r--r--include/ouroboros/sockets.h3
-rw-r--r--include/ouroboros/tpm.h47
4 files changed, 60 insertions, 16 deletions
diff --git a/include/ouroboros/config.h.in b/include/ouroboros/config.h.in
index bae2d89e..e8341ee2 100644
--- a/include/ouroboros/config.h.in
+++ b/include/ouroboros/config.h.in
@@ -3,7 +3,8 @@
*
* Configuration information
*
- * Sander Vrijders <sander.vrijders@intec.ugent.be>
+ * Dimitri Staessens <dimitri.staessens@ugent.be>
+ * Sander Vrijders <sander.vrijders@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
@@ -50,25 +51,21 @@
#define SHM_FLOW_SET_PREFIX "/ouroboros.sets."
#define IRMD_MAX_FLOWS 4096
/* IRMD dynamic threadpooling */
-#define IRMD_MIN_AV_THREADS 16
-#define IRMD_MAX_AV_THREADS 64
-#define IRMD_MAX_THREADS 256
+#define IRMD_MIN_THREADS 16
+#define IRMD_ADD_THREADS 32
/* IPCP dynamic threadpooling */
-#define IPCP_MIN_AV_THREADS 4
-#define IPCP_MAX_AV_THREADS 32
-#define IPCP_MAX_THREADS 64
-
+#define IPCP_MIN_THREADS 4
+#define IPCP_ADD_THREADS 16
+#define IPCP_SCHED_THREADS 8
#define IPCPD_MAX_CONNS IRMD_MAX_FLOWS
#define PTHREAD_COND_CLOCK CLOCK_MONOTONIC
#define PFT_SIZE 1 << 12
/* Timeout values */
-#define IRMD_TPM_TIMEOUT 1000
-#define IPCP_TPM_TIMEOUT 1000
#define IRMD_ACCEPT_TIMEOUT 100
#define IRMD_REQ_ARR_TIMEOUT 500
#define IRMD_FLOW_TIMEOUT 5000
#define IPCP_ACCEPT_TIMEOUT 100
-#define SOCKET_TIMEOUT 4000
+#define SOCKET_TIMEOUT 10000
#define CDAP_REPLY_TIMEOUT 1000
#define ENROLL_TIMEOUT 2000
diff --git a/include/ouroboros/np1_flow.h b/include/ouroboros/np1_flow.h
index a4e94b89..3db2a0dd 100644
--- a/include/ouroboros/np1_flow.h
+++ b/include/ouroboros/np1_flow.h
@@ -24,10 +24,13 @@
#ifndef OUROBOROS_NP1_FLOW_H
#define OUROBOROS_NP1_FLOW_H
+#include <ouroboros/qoscube.h>
+
#include <unistd.h>
-int np1_flow_alloc(pid_t n_api,
- int port_id);
+int np1_flow_alloc(pid_t n_api,
+ int port_id,
+ qoscube_t qc);
int np1_flow_resp(int port_id);
diff --git a/include/ouroboros/sockets.h b/include/ouroboros/sockets.h
index 0d65c15d..660709bf 100644
--- a/include/ouroboros/sockets.h
+++ b/include/ouroboros/sockets.h
@@ -30,9 +30,6 @@
typedef IpcpConfigMsg ipcp_config_msg_t;
typedef DifInfoMsg dif_info_msg_t;
-#include "frct_enroll.pb-c.h"
-typedef FrctEnrollMsg frct_enroll_msg_t;
-
#include "irmd_messages.pb-c.h"
typedef IrmMsg irm_msg_t;
diff --git a/include/ouroboros/tpm.h b/include/ouroboros/tpm.h
new file mode 100644
index 00000000..d34f06f3
--- /dev/null
+++ b/include/ouroboros/tpm.h
@@ -0,0 +1,47 @@
+/*
+ * Ouroboros - Copyright (C) 2016 - 2017
+ *
+ * Threadpool management
+ *
+ * Dimitri Staessens <dimitri.staessens@ugent.be>
+ * Sander Vrijders <sander.vrijders@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_LIB_TPM_H
+#define OUROBOROS_LIB_TPM_H
+
+#include <stdbool.h>
+
+int tpm_init(size_t min,
+ size_t inc,
+ void * (* func)(void *));
+
+int tpm_start(void);
+
+void tpm_stop(void);
+
+void tpm_fini(void);
+
+bool tpm_check(void);
+
+void tpm_exit(void);
+
+void tpm_dec(void);
+
+void tpm_inc(void);
+
+#endif /* OUROBOROS_LIB_TPM_H */