summaryrefslogtreecommitdiff
path: root/src/ipcpd/ipcp.h
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@intec.ugent.be>2017-02-07 20:07:17 +0000
committerSander Vrijders <sander.vrijders@intec.ugent.be>2017-02-07 20:07:17 +0000
commit9117f7f6fec70f2da24e8e77256747d11d67bf8d (patch)
tree022fbb7b2a54ba72affa12938b3bf79abc648b41 /src/ipcpd/ipcp.h
parent1bf2dd6aef3af6c81794c0551278373e44310b5c (diff)
parentbfb86b66c8e7d9d8dc45d9075a4db6d10931dccf (diff)
downloadouroboros-9117f7f6fec70f2da24e8e77256747d11d67bf8d.tar.gz
ouroboros-9117f7f6fec70f2da24e8e77256747d11d67bf8d.zip
Merged in dstaesse/ouroboros/be-ipcp (pull request #363)
ipcpd: Refactor ipcpi struct
Diffstat (limited to 'src/ipcpd/ipcp.h')
-rw-r--r--src/ipcpd/ipcp.h36
1 files changed, 31 insertions, 5 deletions
diff --git a/src/ipcpd/ipcp.h b/src/ipcpd/ipcp.h
index 8b590cc2..9a4d272a 100644
--- a/src/ipcpd/ipcp.h
+++ b/src/ipcpd/ipcp.h
@@ -23,9 +23,9 @@
#define IPCPD_IPCP_H
#include <ouroboros/config.h>
+#include <ouroboros/irm_config.h>
-#include "ipcp-ops.h"
-#include "ipcp-data.h"
+#include "shim-data.h"
#include <pthread.h>
#include <time.h>
@@ -37,16 +37,42 @@ enum ipcp_state {
IPCP_SHUTDOWN
};
+struct ipcp_ops {
+ int (* ipcp_bootstrap)(struct dif_config * conf);
+
+ int (* ipcp_enroll)(char * dif_name);
+
+ int (* ipcp_name_reg)(char * name);
+
+ int (* ipcp_name_unreg)(char * name);
+
+ int (* ipcp_name_query)(char * name);
+
+ int (* ipcp_flow_alloc)(int fd,
+ char * dst_ap_name,
+ char * src_ae_name,
+ qoscube_t qos);
+
+ int (* ipcp_flow_alloc_resp)(int fd,
+ int response);
+
+ int (* ipcp_flow_dealloc)(int fd);
+};
+
struct ipcp {
int irmd_api;
char * name;
+ enum ipcp_type type;
+ char * dif_name;
+
uint64_t address;
- struct ipcp_data * data;
struct ipcp_ops * ops;
int irmd_fd;
+ struct shim_data * shim_data;
+
enum ipcp_state state;
pthread_rwlock_t state_lock;
pthread_mutex_t state_mtx;
@@ -57,7 +83,7 @@ struct ipcp {
pthread_t * threadpool;
} ipcpi;
-int ipcp_init(enum ipcp_type type,
+int ipcp_init(enum ipcp_type type,
struct ipcp_ops * ops);
int ipcp_boot(void);
@@ -73,7 +99,7 @@ enum ipcp_state ipcp_get_state(void);
int ipcp_wait_state(enum ipcp_state state,
const struct timespec * timeout);
-int ipcp_parse_arg(int argc,
+int ipcp_parse_arg(int argc,
char * argv[]);
#endif