From 45ad14035a06e4947b1cc1d908bb665646c1f2a0 Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Tue, 1 Mar 2016 15:08:37 +0100 Subject: 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. --- src/tools/irm/main.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'src/tools/irm') 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; } -- cgit v1.2.3