summaryrefslogtreecommitdiffstats
path: root/src/plugins/acl/acl.h
diff options
context:
space:
mode:
authorAndrew Yourtchenko <ayourtch@gmail.com>2018-05-15 17:25:50 +0200
committerDave Barach <openvpp@barachs.net>2018-06-20 13:37:21 +0000
commit22f9fb1286d2469819cfcef68ffdc258f4d52c24 (patch)
treeed8b86ab0fedcb78c9cc83f98f417f61747736bc /src/plugins/acl/acl.h
parent285434a858d2b53b15c572ad491b9ca3b40fcef3 (diff)
acl-plugin: acl-as-a-service: VPP-1248: fix the error if exports.h included in more than one C file
Including the exports.h from multiple .c files belonging to a single plugin results in an error. Rework the approach to require the table of function pointers to be filled in by the initialization function. Since the inline functions are compiled in the "caller" context, there is no knowledge about the acl_main structure used by the ACL plugin. To help with that, the signature of inline functions is slightly different, taking the p_acl_main pointer as the first parameter. That pointer is filled into the .p_acl_main field of the method table during the initialization - since the calling of non-inline variants would have required filling the method table, this should give minimal headaches during the use and switch between the two methods. Change-Id: Icb70695efa23579c46c716944838766cebc8573e Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Diffstat (limited to 'src/plugins/acl/acl.h')
-rw-r--r--src/plugins/acl/acl.h8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/plugins/acl/acl.h b/src/plugins/acl/acl.h
index 9d333da4059..f63771f4dac 100644
--- a/src/plugins/acl/acl.h
+++ b/src/plugins/acl/acl.h
@@ -390,15 +390,7 @@ AH has a special treatment of its length, it is in 32-bit words, not 64-bit word
extern acl_main_t acl_main;
-/*
- * pointer to the above.
- * Needed for some gymnastics to be able to provide
- * the inline functions from this plugin to other plugins.
- */
-
-extern acl_main_t *p_acl_main;
void *acl_plugin_set_heap();
-
#endif