summaryrefslogtreecommitdiff
path: root/src/tools/irm
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@intec.ugent.be>2016-03-01 15:08:37 +0100
committerSander Vrijders <sander.vrijders@intec.ugent.be>2016-03-01 15:08:37 +0100
commit45ad14035a06e4947b1cc1d908bb665646c1f2a0 (patch)
tree07b806048cc9a792b5127bd5decb81b7ca907197 /src/tools/irm
parente5bfc52e93654a8be7893cf5573c9c04e9c96c55 (diff)
downloadouroboros-45ad14035a06e4947b1cc1d908bb665646c1f2a0.tar.gz
ouroboros-45ad14035a06e4947b1cc1d908bb665646c1f2a0.zip
lib, irmd, tools: Provide more IRM messages
This provides the other messages that are used to communicate between the library and the IRM Daemon. The IRM tool just calls the library right now to see if it works. A full fledged program will be provided in a next commit.
Diffstat (limited to 'src/tools/irm')
-rw-r--r--src/tools/irm/main.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/tools/irm/main.c b/src/tools/irm/main.c
index 470a8166..ac09e1e7 100644
--- a/src/tools/irm/main.c
+++ b/src/tools/irm/main.c
@@ -34,12 +34,40 @@ int main () {
name.api_id = 1;
name.ae_name = "";
name.aei_id = 0;
+ struct dif_info info;
+ char * dif_name = "wienerschnitzel";
+ size_t difs_size = 1;
if (irm_create_ipcp(name, ipcp_type)) {
LOG_ERR("Failed to create IPCP");
return -1;
}
+ if (irm_destroy_ipcp(name)) {
+ LOG_ERR("Failed to destroy IPCP");
+ return -1;
+ }
+
+ if (irm_bootstrap_ipcp(name, info)) {
+ LOG_ERR("Failed to bootstrap IPCP");
+ return -1;
+ }
+
+ if (irm_enroll_ipcp(name, dif_name)) {
+ LOG_ERR("Failed to enroll IPCP");
+ return -1;
+ }
+
+ if (irm_reg_ipcp(name, &dif_name, difs_size)) {
+ LOG_ERR("Failed to register IPCP");
+ return -1;
+ }
+
+ if (irm_unreg_ipcp(name, &dif_name, difs_size)) {
+ LOG_ERR("Failed to unregister IPCP");
+ return -1;
+ }
+
return 0;
}