summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@intec.ugent.be>2016-08-21 21:12:03 +0200
committerSander Vrijders <sander.vrijders@intec.ugent.be>2016-08-21 21:12:03 +0200
commitf0d4305c067044e74c44032c32ce6c4db3c6fffa (patch)
treed895b25fb5a8f7af106c6c2d3228b62ade81b3b4 /include
parentba27593e3e8406e109393ae383f17c7416675c1e (diff)
parentcee5ae97ee14438b2dabc06bfad9b02e42e4d816 (diff)
downloadouroboros-f0d4305c067044e74c44032c32ce6c4db3c6fffa.tar.gz
ouroboros-f0d4305c067044e74c44032c32ce6c4db3c6fffa.zip
Merged in dstaesse/ouroboros/be-irmd-refactor (pull request #213)
irmd, lib: Rebuild the IRMd data model
Diffstat (limited to 'include')
-rw-r--r--include/ouroboros/dev.h3
-rw-r--r--include/ouroboros/irm.h23
-rw-r--r--include/ouroboros/irm_config.h3
-rw-r--r--include/ouroboros/list.h10
4 files changed, 25 insertions, 14 deletions
diff --git a/include/ouroboros/dev.h b/include/ouroboros/dev.h
index a0885b70..d5fb744b 100644
--- a/include/ouroboros/dev.h
+++ b/include/ouroboros/dev.h
@@ -36,9 +36,6 @@
int ap_init(char * ap_name);
void ap_fini(void);
-/* This call binds an instance to a specific subset of applications */
-int api_bind(char * ap_subset);
-
/* Returns file descriptor (> 0) and client AE name. */
int flow_accept(char ** ae_name);
int flow_alloc_resp(int fd, int result);
diff --git a/include/ouroboros/irm.h b/include/ouroboros/irm.h
index 9f27db05..cfad1295 100644
--- a/include/ouroboros/irm.h
+++ b/include/ouroboros/irm.h
@@ -31,7 +31,7 @@ pid_t irm_create_ipcp(char * name,
int irm_destroy_ipcp(pid_t api);
-/* APIs is an out-parameter */
+/* apis is an out-parameter */
ssize_t irm_list_ipcps(char * name,
pid_t ** apis);
@@ -41,15 +41,20 @@ int irm_enroll_ipcp(pid_t api,
int irm_bootstrap_ipcp(pid_t api,
struct dif_config * conf);
-int irm_bind(char * name,
- char * ap_name,
- uint16_t opts,
- int argc,
- char ** argv);
+int irm_bind_ap(char * ap,
+ char * name,
+ uint16_t opts,
+ int argc,
+ char ** argv);
-int irm_unbind(char * name,
- char * ap_name,
- uint16_t opts);
+int irm_unbind_ap(char * ap,
+ char * name);
+
+int irm_bind_api(pid_t api,
+ char * name);
+
+int irm_unbind_api(pid_t api,
+ char * name);
int irm_reg(char * name,
char ** difs,
diff --git a/include/ouroboros/irm_config.h b/include/ouroboros/irm_config.h
index dd68e4ec..f90ad927 100644
--- a/include/ouroboros/irm_config.h
+++ b/include/ouroboros/irm_config.h
@@ -30,8 +30,7 @@
#define BIND_AP_AUTO 0x01
#define BIND_AP_UNIQUE 0x02
-
-#define UNBIND_AP_HARD 0x01
+#define BIND_AP_LOC 0x04
enum ipcp_type {
IPCP_NORMAL = 0,
diff --git a/include/ouroboros/list.h b/include/ouroboros/list.h
index 49163efd..80fcb28c 100644
--- a/include/ouroboros/list.h
+++ b/include/ouroboros/list.h
@@ -135,6 +135,16 @@ void list_splice_init(struct list_head * list,
((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member)))
/**
+ * list_first_entry - get the struct for the first entry
+ * expects the list to be non-empty
+ * @ptr: the &struct list_head pointer.
+ * @type: the type of the struct this is embedded in.
+ * @member: the name of the list_struct within the struct.
+ */
+#define list_first_entry(ptr, type, member) \
+ list_entry((ptr)->next, type, member)
+
+/**
* list_for_each - iterate over a list
* @pos: the &struct list_head to use as a loop counter.
* @head: the head for your list.