+
/*
* The olsr.org Optimized Link-State Routing daemon(olsrd)
* Copyright (c) 2004, Andreas Tonnesen(andreto@olsr.org)
#include "olsrd_plugin.h"
#include "olsr_types.h"
+#include "olsr_cfg.h"
+
+#ifndef OLSR_PLUGIN
/* all */
-typedef int (*plugin_init_func)(void);
-typedef int (*get_interface_version_func)(void);
+typedef int (*plugin_init_func) (void);
+typedef int (*get_interface_version_func) (void);
+
+#if defined SUPPORT_OLD_PLUGIN_VERSIONS && SUPPORT_OLD_PLUGIN_VERSIONS
-#if SUPPORT_OLD_PLUGIN_VERSIONS
/* version 4 */
-typedef int (*register_param_func)(char *, char *);
-#endif
+typedef int (*register_param_func) (char *, char *);
+#endif /* defined SUPPORT_OLD_PLUGIN_VERSIONS && SUPPORT_OLD_PLUGIN_VERSIONS */
/* version 5 */
-typedef void (*get_plugin_parameters_func)(const struct olsrd_plugin_parameters **params, unsigned int *size);
-
+typedef void (*get_plugin_parameters_func) (const struct olsrd_plugin_parameters ** params, unsigned int *size);
struct olsr_plugin {
- /* The handle */
- void *dlhandle;
+ /* The handle */
+ void *dlhandle;
- struct plugin_param *params;
- int plugin_interface_version;
+ struct plugin_param *params;
+ int plugin_interface_version;
-#if SUPPORT_OLD_PLUGIN_VERSIONS
- /* version 4 */
- register_param_func register_param;
-#endif
- plugin_init_func plugin_init;
+#if defined SUPPORT_OLD_PLUGIN_VERSIONS && SUPPORT_OLD_PLUGIN_VERSIONS
+ /* version 4 */
+ register_param_func register_param;
+#endif /* defined SUPPORT_OLD_PLUGIN_VERSIONS && SUPPORT_OLD_PLUGIN_VERSIONS */
+ plugin_init_func plugin_init;
- /* version 5 */
- const struct olsrd_plugin_parameters *plugin_parameters;
- unsigned int plugin_parameters_size;
+ /* version 5 */
+ const struct olsrd_plugin_parameters *plugin_parameters;
+ unsigned int plugin_parameters_size;
- struct olsr_plugin *next;
+ struct olsr_plugin *next;
};
void olsr_load_plugins(void);
int olsr_plugin_io(int, void *, size_t);
-#endif
+#endif /* OLSR_PLUGIN */
+#endif /* _OLSR_PLUGIN_LOADER */
/*
* Local Variables: