28 int main (
int argc,
char ** argv)
30 void *handle, *main_handle;
31 int (*fp)(
int argc,
char **argv);
37 fformat (stderr,
"usage: %s <plugin-name> [<plugin-args>...]\n",
42 handle = dlopen (argv[1], RTLD_LAZY);
55 main_handle = dlsym (handle,
"plugin_main");
56 if (main_handle == 0) {
57 clib_warning (
"plugin_main(int argc, char **argv) missing...\n");
63 rv = (*fp)(argc-2, argv+2);
void vlib_cli_output(void *vm, char *fmt,...)
int main(int argc, char **argv)
#define clib_warning(format, args...)