summaryrefslogtreecommitdiff
path: root/include/ouroboros/irm.h
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@intec.ugent.be>2016-06-28 16:11:19 +0200
committerSander Vrijders <sander.vrijders@intec.ugent.be>2016-06-28 16:22:01 +0200
commit0d789ed8d938cc342c8f2138280795a1d5a61e3d (patch)
treeb0a3b305473a68ee18262e7f103185b9ce9cb98c /include/ouroboros/irm.h
parentacd29da104d0d8ddace2b2693314542bb5a56fcc (diff)
downloadouroboros-0d789ed8d938cc342c8f2138280795a1d5a61e3d.tar.gz
ouroboros-0d789ed8d938cc342c8f2138280795a1d5a61e3d.zip
lib, irmd, ipcpd: Change of IRM API
This changes the IRM API after discussions with Dimitri. The register operation is now split into a bind and register operation. The same for unregister; unbind and unregister. PIDs are now used as the application instance name. A name for a PID is only provided for scriptability in bash. It is therefore also no longer passed down to the IPCP. Every operation on an IPCP through the IRM API has to use the PID. Quering of the PIDs by name is possible. The IRM tool has been updated to use this new API as well. A subcommand 'ipcp' has been added for operations that take effect on IPCPs only. Fixes #12
Diffstat (limited to 'include/ouroboros/irm.h')
-rw-r--r--include/ouroboros/irm.h52
1 files changed, 29 insertions, 23 deletions
diff --git a/include/ouroboros/irm.h b/include/ouroboros/irm.h
index 743ed79c..9f27db05 100644
--- a/include/ouroboros/irm.h
+++ b/include/ouroboros/irm.h
@@ -1,7 +1,7 @@
/*
* Ouroboros - Copyright (C) 2016
*
- * The API to instruct the IRM
+ * The API to instruct the IPC Resource Manager
*
* Sander Vrijders <sander.vrijders@intec.ugent.be>
*
@@ -23,34 +23,40 @@
#ifndef OUROBOROS_IRM_H
#define OUROBOROS_IRM_H
-#include <ouroboros/instance_name.h>
-#include <ouroboros/dif_config.h>
-
+#include <ouroboros/irm_config.h>
#include <sys/types.h>
-pid_t irm_create_ipcp(char * ipcp_name,
- enum ipcp_type ipcp_type);
+pid_t irm_create_ipcp(char * name,
+ enum ipcp_type ipcp_type);
+
+int irm_destroy_ipcp(pid_t api);
+
+/* APIs is an out-parameter */
+ssize_t irm_list_ipcps(char * name,
+ pid_t ** apis);
+
+int irm_enroll_ipcp(pid_t api,
+ char * dif_name);
-int irm_destroy_ipcp(instance_name_t * api);
+int irm_bootstrap_ipcp(pid_t api,
+ struct dif_config * conf);
-int irm_enroll_ipcp(instance_name_t * api,
- char * dif_name);
+int irm_bind(char * name,
+ char * ap_name,
+ uint16_t opts,
+ int argc,
+ char ** argv);
-int irm_bootstrap_ipcp(instance_name_t * api,
- struct dif_config * conf);
+int irm_unbind(char * name,
+ char * ap_name,
+ uint16_t opts);
-int irm_reg(char * name,
- instance_name_t * api,
- int argc,
- char ** argv,
- bool autoexec,
- char ** difs,
- size_t difs_size);
+int irm_reg(char * name,
+ char ** difs,
+ size_t difs_size);
-int irm_unreg(char * name,
- const instance_name_t * api,
- char ** difs,
- size_t difs_size,
- bool hard);
+int irm_unreg(char * name,
+ char ** difs,
+ size_t difs_size);
#endif /* OUROBOROS_IRM_H */