summaryrefslogtreecommitdiff
path: root/src/ipcpd/ipcp.h
diff options
context:
space:
mode:
authordimitri staessens <[email protected]>2017-04-13 09:55:31 +0000
committerSander Vrijders <[email protected]>2017-04-13 09:55:31 +0000
commit72c28d6173ade511e9dc6969e0fc66db2dbba38a (patch)
tree12756b89d8f4ce421c70d5cf05850b4968e76412 /src/ipcpd/ipcp.h
parent2cc9c8d742e037c8a6ddc3eea4c05f4a905183d3 (diff)
parentfc10a7587b1a642748ae0fd69f08d92b4a902248 (diff)
downloadouroboros-72c28d6173ade511e9dc6969e0fc66db2dbba38a.tar.gz
ouroboros-72c28d6173ade511e9dc6969e0fc66db2dbba38a.zip
Merged in dstaesse/ouroboros/be-hashes (pull request #479)
lib, ipcpd, irmd: Register hash instead of name
Diffstat (limited to 'src/ipcpd/ipcp.h')
-rw-r--r--src/ipcpd/ipcp.h33
1 files changed, 24 insertions, 9 deletions
diff --git a/src/ipcpd/ipcp.h b/src/ipcpd/ipcp.h
index e5c4b9af..d6e2aa7c 100644
--- a/src/ipcpd/ipcp.h
+++ b/src/ipcpd/ipcp.h
@@ -24,12 +24,13 @@
#define IPCPD_IPCP_H
#include <ouroboros/config.h>
-#include <ouroboros/irm_config.h>
+#include <ouroboros/ipcp.h>
#include "shim-data.h"
#include <pthread.h>
#include <time.h>
+#include <signal.h>
enum ipcp_state {
IPCP_NULL = 0,
@@ -39,19 +40,19 @@ enum ipcp_state {
};
struct ipcp_ops {
- int (* ipcp_bootstrap)(struct dif_config * conf);
+ int (* ipcp_bootstrap)(const struct ipcp_config * conf);
- int (* ipcp_enroll)(char * dif_name);
+ int (* ipcp_enroll)(const char * dst);
- int (* ipcp_name_reg)(char * name);
+ int (* ipcp_reg)(const uint8_t * hash);
- int (* ipcp_name_unreg)(char * name);
+ int (* ipcp_unreg)(const uint8_t * hash);
- int (* ipcp_name_query)(char * name);
+ int (* ipcp_query)(const uint8_t * hash);
- int (* ipcp_flow_alloc)(int fd,
- char * dst_ap_name,
- qoscube_t qos);
+ int (* ipcp_flow_alloc)(int fd,
+ const uint8_t * dst,
+ qoscube_t qos);
int (* ipcp_flow_alloc_resp)(int fd,
int response);
@@ -59,6 +60,8 @@ struct ipcp_ops {
int (* ipcp_flow_dealloc)(int fd);
};
+#define DIR_HASH_STRLEN (ipcpi.dir_hash_len * 2)
+
struct ipcp {
int irmd_api;
char * name;
@@ -67,6 +70,7 @@ struct ipcp {
char * dif_name;
uint64_t dt_addr;
+ uint16_t dir_hash_len;
struct ipcp_ops * ops;
int irmd_fd;
@@ -117,4 +121,15 @@ int ipcp_wait_state(enum ipcp_state state,
int ipcp_parse_arg(int argc,
char * argv[]);
+/* Handle shutdown of IPCP */
+void ipcp_sig_handler(int sig,
+ siginfo_t * info,
+ void * c);
+
+/* Helper functions for directory entries, could be moved */
+uint8_t * ipcp_hash_dup(const uint8_t * hash);
+
+void ipcp_hash_str(char buf[],
+ const uint8_t * hash);
+
#endif