From: octo Date: Mon, 12 Dec 2005 08:06:53 +0000 (+0000) Subject: Merged autotools changes (configure.in, src/plugin.c, src/Makefile.am, Makefile.am... X-Git-Tag: collectd-3.5.0~17 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;ds=sidebyside;h=6e765a0287381977bd90efa8a46c0f1d1aecd1e5;p=collectd.git Merged autotools changes (configure.in, src/plugin.c, src/Makefile.am, Makefile.am) from quota-branch to trunk --- diff --git a/AUTHORS b/AUTHORS index 020261a2..52b63075 100644 --- a/AUTHORS +++ b/AUTHORS @@ -25,6 +25,10 @@ users module by: don't-fork-patch by: Alvaro Barcellos +many autotools related fixes, libltdl code, getmnt-wizardry and much help has +contributed: + Niki W. Waibel + collectd is available at: diff --git a/Makefile.am b/Makefile.am index 39b12b1f..c60110c4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,5 @@ -AUTOMAKE_OPTIONS = dist-bzip2 - -SUBDIRS = src +SUBDIRS = libltdl src +INCLUDES = $(LTDLINCL) EXTRA_DIST = collectd.spec contrib debian diff --git a/configure.in b/configure.in index 889706e4..4d8023e6 100644 --- a/configure.in +++ b/configure.in @@ -1,7 +1,8 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(src/collectd.c) -AM_INIT_AUTOMAKE(collectd, 3.5.alpha1) -AM_CONFIG_HEADER(src/config.h src/libping/config.h) +AC_INIT(collectd, 3.5.alpha1-quota) +AC_CONFIG_SRCDIR(src/collectd.c) +AC_CONFIG_HEADERS(src/config.h) +AM_INIT_AUTOMAKE(dist-bzip2) AC_LANG(C) AC_PREFIX_DEFAULT("/opt/collectd") @@ -17,26 +18,27 @@ AC_PROG_MAKE_SET dnl configure libtool AC_DISABLE_STATIC +AC_LIBLTDL_CONVENIENCE +AC_SUBST(LTDLINCL) +AC_SUBST(LIBLTDL) AC_LIBTOOL_DLOPEN AC_PROG_LIBTOOL #AC_PROG_RANLIB +AC_CONFIG_SUBDIRS(libltdl) # # Checks for header files. # -AC_HEADER_STDC AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS(fcntl.h unistd.h) +AC_HEADER_DIRENT +AC_CHECK_HEADERS(fcntl.h) AC_CHECK_HEADERS(signal.h) AC_CHECK_HEADERS(sys/socket.h) AC_CHECK_HEADERS(sys/select.h) AC_CHECK_HEADERS(netdb.h) -AC_CHECK_HEADERS(sys/time.h sys/times.h) -AC_CHECK_HEADERS(sys/types.h) AC_CHECK_HEADERS(sys/resource.h) AC_CHECK_HEADERS(errno.h) AC_CHECK_HEADERS(syslog.h) -AC_CHECK_HEADERS(dlfcn.h) # For cpu modules AC_CHECK_HEADERS(sys/sysctl.h sys/dkstat.h) @@ -47,12 +49,36 @@ AC_CHECK_HEADERS(sys/loadavg.h) # For ping module AC_CHECK_HEADERS(arpa/inet.h) AC_CHECK_HEADERS(netinet/in.h) -AC_CHECK_HEADERS(netdb.h) # For users module AC_CHECK_HEADERS(utmp.h) AC_CHECK_HEADERS(utmpx.h) +# For quota module +AC_CHECK_HEADERS(grp.h pwd.h sys/ucred.h) +AC_CHECK_HEADERS(ctype.h) +AC_CHECK_HEADERS(limits.h) +AC_CHECK_HEADERS(sys/quota.h) +AC_CHECK_HEADERS(xfs/xqm.h) + +# For mount interface +AC_CHECK_HEADERS(fs_info.h) +AC_CHECK_HEADERS(fshelp.h) +AC_CHECK_HEADERS(paths.h) +AC_CHECK_HEADERS(mntent.h) +AC_CHECK_HEADERS(mnttab.h) +AC_CHECK_HEADERS(sys/fstyp.h) +AC_CHECK_HEADERS(sys/fs_types.h) +AC_CHECK_HEADERS(sys/mntent.h) +AC_CHECK_HEADERS(sys/mnttab.h) +AC_CHECK_HEADERS(sys/mount.h) +AC_CHECK_HEADERS(sys/statfs.h) +AC_CHECK_HEADERS(sys/vfs.h) +AC_CHECK_HEADERS(sys/vfstab.h) + +# For debugging interface (variable number of arguments) +AC_CHECK_HEADERS(stdarg.h) + dnl Checking for libraries AC_CHECK_LIB(m, ext) @@ -68,11 +94,11 @@ AC_HEADER_TIME # Checks for library functions. # AC_PROG_GCC_TRADITIONAL -AC_CHECK_FUNCS(gettimeofday select socket strdup strstr strtol) +AC_CHECK_FUNCS(gettimeofday select strdup strtol) AC_CHECK_FUNCS(socket, , AC_CHECK_LIB(socket, socket)) AC_CHECK_FUNCS(gethostbyname, , AC_CHECK_LIB(nsl, gethostbyname)) AC_CHECK_FUNCS(strchr memcpy strstr strcmp strncmp strncpy strlen) -AC_CHECK_FUNCS(strncasecmp strcasecmp strncmp) +AC_CHECK_FUNCS(strncasecmp strcasecmp) # For cpu module AC_CHECK_FUNCS(sysctlbyname, [have_sysctlbyname="yes"], [have_sysctlbyname="no"]) @@ -84,6 +110,61 @@ AC_CHECK_FUNCS(getloadavg, [have_getloadavg="yes"], [have_getloadavg="no"]) have_getutent="no" AC_CHECK_FUNCS(getutent getutxent, [have_getutent="yes"]) +# For quota module +AC_CHECK_FUNCS(quotactl) +AC_CHECK_FUNCS(getgrgid getpwuid) + +# For mount interface +AC_CHECK_FUNCS(getfsent getvfsent listmntent) +AC_FUNC_GETMNTENT +if test "x$ac_cv_func_getmntent" = 'xyes'; then + saveCFLAGS="$CFLAGS" + CFLAGS="-Wall -Werror $CFLAGS" + AC_CACHE_CHECK([whether getmntent takes one argument], + [fu_cv_getmntent1], + AC_COMPILE_IFELSE( + AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT +#include "$srcdir/src/utils_mount.h"]], + [[(void)getmntent((FILE *)NULL);]] + ), + [fu_cv_getmntent1=yes], + [fu_cv_getmntent1=no] + ) + ) + if test "x$fu_cv_getmntent1" = 'xno'; then + AC_CACHE_CHECK([whether getmntent takes two arguments], + [fu_cv_getmntent2], + AC_COMPILE_IFELSE( + AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT +#include "$srcdir/src/utils_mount.h"]], + [[(void)getmntent((FILE *)NULL, + (struct mnttab *)NULL);]] + ), + [fu_cv_getmntent2=yes], + [fu_cv_getmntent2=no] + ) + ) + fi + CFLAGS="$saveCFLAGS" +fi +if test "x$fu_cv_getmntent1" = 'xyes'; then + AC_DEFINE(HAVE_GETMNTENT1, + 1, + [Define if there is a function named getmntent + for reading the list of mounted filesystems, and + that function takes a single argument. (4.3BSD, + SunOS, HP-UX, Dynix, Irix, Linux)] + ) +fi +if test "x$fu_cv_getmntent2" = 'xyes'; then + AC_DEFINE(HAVE_GETMNTENT2, + 1, + [Define if there is a function named getmntent + for reading the list of mounted filesystems, and + that function takes two arguments. (SVR4)] + ) +fi + AC_MSG_CHECKING([for kernel type ($host_os)]) case $host_os in *linux*) @@ -102,7 +183,6 @@ AC_MSG_RESULT([$ac_system]) dnl Checks for libraries. AC_CHECK_LIB(socket, socket) AC_CHECK_LIB(resolv, res_search) -AC_CHECK_LIB(dl, dlopen) # AC_ARG_WITH (package, help-string, [action-if-given], [action-if-not-given]) AC_ARG_WITH(rrdtool, AC_HELP_STRING([--with-rrdtool=PFX], [Path to rrdtool.]), @@ -123,6 +203,32 @@ then fi AM_CONDITIONAL(BUILD_WITH_RRDTOOL, test "x$with_rrdtool" = "xyes") +#AC_ARG_WITH(pth, AC_HELP_STRING([--with-pth=PFX], [Path to pth (experimental).]), +#[ if test "x$withval" != "xno" -a "x$withval" != "xyes" +# then +# LDFLAGS="$LDFLAGS -L$withval/lib" +# CPPFLAGS="$CPPFLAGS -I$withval/include" +# with_pth="yes" +# fi +#], [with_pth="no"]) +#if test "x$with_pth" = "xyes" +#then +# AC_CHECK_LIB(pth, pth_init,, [with_pth="no"], []) +#fi +#if test "x$with_pth" = "xyes" +#then +# AC_CHECK_HEADERS(pth.h,, [with_pth="no"]) +#fi +#if test "x$with_pth" = "xyes" +#then +# collect_pth=1 +#else +# collect_pth=0 +#fi +#AC_DEFINE_UNQUOTED(COLLECT_PTH, [$collect_pth], +# [Wether or not to use pth (portable threads) library]) +#AM_CONDITIONAL(BUILD_WITH_PTH, test "x$with_pth" = "xyes") + if test "$ac_system" = "Solaris" then with_kstat="yes" @@ -206,6 +312,46 @@ fi # # Check for enabled/disabled features # +AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], + [Enable debugging (disabled by default)]), + [], [enable_debug="no"]) +if test "x$enable_debug" = "xno" +then + collect_debug=0 +else + if test "x$enable_debug" = "xyes" + then + collect_debug=1 + else + AC_MSG_NOTICE([Please specify either --enable-debug or --disable-debug; Enabling debugging.]) + collect_debug=1 + enable_debug="yes" + fi +fi +AC_DEFINE_UNQUOTED(COLLECT_DEBUG, [$collect_debug], + [Wether or not to enable debugging]) +AM_CONDITIONAL(BUILD_DEBUG, test "x$enable_debug" = "xyes") + +AC_ARG_ENABLE(daemon, AC_HELP_STRING([--disable-daemon], + [Disable daemon mode (enabled by default)]), + [], [enable_daemon="yes"]) +if test "x$enable_daemon" = "xno" +then + collect_daemon=0 +else + if test "x$enable_daemon" = "xyes" + then + collect_daemon=1 + else + AC_MSG_NOTICE([Please specify either --enable-daemon or --disable-daemon; Enabling daemon mode.]) + collect_daemon=1 + enable_daemon="yes" + fi +fi +AC_DEFINE_UNQUOTED(COLLECT_DAEMON, [$collect_daemon], + [Wether or not to enable daemon mode]) +AM_CONDITIONAL(BUILD_DAEMON, test "x$enable_daemon" = "xyes") + AC_ARG_ENABLE(cpu, AC_HELP_STRING([--disable-cpu], [Disable CPU usage statistics]),, [enable_cpu="yes"]) if test "x$enable_cpu" != "xno" then @@ -254,6 +400,26 @@ then fi AM_CONDITIONAL(BUILD_MODULE_DISK, test "x$enable_disk" = "xyes") +AC_ARG_ENABLE(quota, AC_HELP_STRING([--enable-quota], + [Enable quota statistics (experimental, disabled by default)]), + [], [enable_quota="no"]) +if test "x$enable_quota" = "xno" +then + collect_quota=0 +else + if test "x$enable_quota" = "xyes" + then + collect_quota=1 + else + AC_MSG_NOTICE([Please specify either --enable-quota or --disable-quota; Enabling quota statistics.]) + collect_quota=1 + enable_quota="yes" + fi +fi +AC_DEFINE_UNQUOTED(COLLECT_QUOTA, [$collect_quota], + [Wether or not to collect quota statistics]) +AM_CONDITIONAL(BUILD_MODULE_QUOTA, test "x$enable_quota" = "xyes") + AC_ARG_ENABLE(hddtemp, AC_HELP_STRING([--disable-hddtemp], [Disable hdd temperature statistics]),, [enable_hddtemp="yes"]) if test "x$enable_hddtemp" = "xno" then @@ -444,9 +610,14 @@ Configuration: libkstat . . . . . $with_kstat Features: + debug . . . . . . . $enable_debug + daemon mode . . . . $enable_daemon + + Modules: cpu . . . . . . . . $enable_cpu cpufreq . . . . . . $enable_cpufreq disk . . . . . . . $enable_disk + quota . . . . . . . $enable_quota (experimental) hddtemp . . . . . . $enable_hddtemp load . . . . . . . $enable_load memory . . . . . . $enable_memory diff --git a/src/Makefile.am b/src/Makefile.am index 75e1735f..fe1076b7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,18 +1,23 @@ if BUILD_MODULE_PING -SUBDIRS = libping +SUBDIRS = libping . endif sbin_PROGRAMS = collectd collectd_SOURCES = collectd.c collectd.h \ + utils_debug.c utils_debug.h \ + utils_mount.c utils_mount.h \ common.c common.h \ multicast.c multicast.h \ plugin.c plugin.h #collectd_CFLAGS = -DPLUGINDIR='"$(pkglibdir)"' collectd_CPPFLAGS = -DLOCALSTATEDIR='"$(localstatedir)"' -DPLUGINDIR='"$(pkglibdir)"' -collectd_LDFLAGS = -dlopen self +collectd_LDFLAGS = -export-dynamic +collectd_CFLAGS = -Werror +collectd_LDADD = $(LIBLTDL) "-dlopen" self +collectd_DEPENDENCIES = $(LIBLTDL) if BUILD_WITH_RRDTOOL -collectd_LDFLAGS += -lrrd +collectd_LDADD += -lrrd endif pkglib_LTLIBRARIES = @@ -20,93 +25,135 @@ pkglib_LTLIBRARIES = if BUILD_MODULE_CPU pkglib_LTLIBRARIES += cpu.la cpu_la_SOURCES = cpu.c cpu.h -cpu_la_LDFLAGS = -module +cpu_la_LDFLAGS = -module -avoid-version +collectd_LDADD += "-dlopen" cpu.la +collectd_DEPENDENCIES += cpu.la endif if BUILD_MODULE_CPUFREQ pkglib_LTLIBRARIES += cpufreq.la cpufreq_la_SOURCES = cpufreq.c cpufreq.h -cpufreq_la_LDFLAGS = -module +cpufreq_la_LDFLAGS = -module -avoid-version +collectd_LDADD += "-dlopen" cpufreq.la +collectd_DEPENDENCIES += cpufreq.la endif if BUILD_MODULE_DISK pkglib_LTLIBRARIES += disk.la disk_la_SOURCES = disk.c disk.h -disk_la_LDFLAGS = -module +disk_la_LDFLAGS = -module -avoid-version +collectd_LDADD += "-dlopen" disk.la +collectd_DEPENDENCIES += disk.la +endif + +if BUILD_MODULE_QUOTA +pkglib_LTLIBRARIES += quota.la +quota_la_SOURCES = quota_plugin.c quota_plugin.h +quota_la_SOURCES += quota_fs.c quota_fs.h +quota_la_SOURCES += quota_mnt.c quota_mnt.h +quota_la_LDFLAGS = -module -avoid-version +quota_la_CFLAGS = -Werror +collectd_LDADD += "-dlopen" quota.la +collectd_DEPENDENCIES += quota.la endif if BUILD_MODULE_HDDTEMP pkglib_LTLIBRARIES += hddtemp.la hddtemp_la_SOURCES = hddtemp.c hddtemp.h -hddtemp_la_LDFLAGS = -module +hddtemp_la_LDFLAGS = -module -avoid-version +collectd_LDADD += "-dlopen" hddtemp.la +collectd_DEPENDENCIES += hddtemp.la endif if BUILD_MODULE_LOAD pkglib_LTLIBRARIES += load.la load_la_SOURCES = load.c load.h -load_la_LDFLAGS = -module +load_la_LDFLAGS = -module -avoid-version +collectd_LDADD += "-dlopen" load.la +collectd_DEPENDENCIES += load.la endif if BUILD_MODULE_MEMORY pkglib_LTLIBRARIES += memory.la memory_la_SOURCES = memory.c memory.h -memory_la_LDFLAGS = -module +memory_la_LDFLAGS = -module -avoid-version +collectd_LDADD += "-dlopen" memory.la +collectd_DEPENDENCIES += memory.la endif if BUILD_MODULE_NFS pkglib_LTLIBRARIES += nfs.la nfs_la_SOURCES = nfs.c nfs.h -nfs_la_LDFLAGS = -module +nfs_la_LDFLAGS = -module -avoid-version +collectd_LDADD += "-dlopen" nfs.la +collectd_DEPENDENCIES += nfs.la endif if BUILD_MODULE_PING pkglib_LTLIBRARIES += ping.la ping_la_SOURCES = ping.c ping.h -ping_la_LDFLAGS = -module +ping_la_LDFLAGS = -module -avoid-version ping_la_LIBADD = libping/libping.la ping_la_DEPENDENCIES = libping/libping.la +collectd_LDADD += "-dlopen" ping.la +collectd_DEPENDENCIES += ping.la endif if BUILD_MODULE_PROCESSES pkglib_LTLIBRARIES += processes.la processes_la_SOURCES = processes.c processes.h -processes_la_LDFLAGS = -module +processes_la_LDFLAGS = -module -avoid-version +collectd_LDADD += "-dlopen" processes.la +collectd_DEPENDENCIES += processes.la endif if BUILD_MODULE_SENSORS pkglib_LTLIBRARIES += sensors.la sensors_la_SOURCES = sensors.c sensors.h -sensors_la_LDFLAGS = -module -lsensors +sensors_la_LDFLAGS = -module -avoid-version -lsensors +sensors_la_LIBADD = -lsensors +collectd_LDADD += "-dlopen" sensors.la +collectd_DEPENDENCIES += sensors.la endif if BUILD_MODULE_SERIAL pkglib_LTLIBRARIES += serial.la serial_la_SOURCES = serial.c serial.h -serial_la_LDFLAGS = -module +serial_la_LDFLAGS = -module -avoid-version +collectd_LDADD += "-dlopen" serial.la +collectd_DEPENDENCIES += serial.la endif if BUILD_MODULE_SWAP pkglib_LTLIBRARIES += swap.la swap_la_SOURCES = swap.c swap.h -swap_la_LDFLAGS = -module +swap_la_LDFLAGS = -module -avoid-version +collectd_LDADD += "-dlopen" swap.la +collectd_DEPENDENCIES += swap.la endif if BUILD_MODULE_TAPE pkglib_LTLIBRARIES += tape.la tape_la_SOURCES = tape.c tape.h -tape_la_LDFLAGS = -module +tape_la_LDFLAGS = -module -avoid-version +collectd_LDADD += "-dlopen" tape.la +collectd_DEPENDENCIES += tape.la endif if BUILD_MODULE_TRAFFIC pkglib_LTLIBRARIES += traffic.la traffic_la_SOURCES = traffic.c traffic.h -traffic_la_LDFLAGS = -module +traffic_la_LDFLAGS = -module -avoid-version +collectd_LDADD += "-dlopen" traffic.la +collectd_DEPENDENCIES += traffic.la endif if BUILD_MODULE_USERS pkglib_LTLIBRARIES += users.la users_la_SOURCES = users.c users.h -users_la_LDFLAGS = -module +users_la_LDFLAGS = -module -avoid-version +collectd_LDADD += "-dlopen" users.la +collectd_DEPENDENCIES += users.la endif man_MANS = collectd.1 diff --git a/src/plugin.c b/src/plugin.c new file mode 100644 index 00000000..20735ba4 --- /dev/null +++ b/src/plugin.c @@ -0,0 +1,215 @@ +#include "collectd.h" + +#include + +#include "plugin.h" +#include "multicast.h" + +typedef struct plugin +{ + char *type; + void (*init) (void); + void (*read) (void); + void (*write) (char *host, char *inst, char *val); + struct plugin *next; +} plugin_t; + +static plugin_t *first_plugin = NULL; + +#ifdef HAVE_LIBRRD +extern int operating_mode; +#endif + +/* + * Returns the number of plugins registered + */ +int plugin_count (void) +{ + int i; + plugin_t *p; + + for (i = 0, p = first_plugin; p != NULL; p = p->next) + i++; + + return (i); +} + +/* + * Returns the plugins with the type `type' or NULL if it's not found. + */ +plugin_t *plugin_search (char *type) +{ + plugin_t *ret; + + if (type == NULL) + return (NULL); + + for (ret = first_plugin; ret != NULL; ret = ret->next) + if (strcmp (ret->type, type) == 0) + break; + + return (ret); +} + +/* + * (Try to) load the shared object `name'. Won't complain if it isn't a shared + * object, but it will bitch about a shared object not having a + * ``module_register'' symbol.. + */ +void plugin_load (char *name) +{ + lt_dlhandle dlh; + void (*reg_handle) (void); + + lt_dlinit (); + lt_dlerror (); /* clear errors */ + + if ((dlh = lt_dlopen (name)) == NULL) + return; + + if ((reg_handle = lt_dlsym (dlh, "module_register")) == NULL) + { + syslog (LOG_WARNING, "Couldn't find symbol ``module_register'' in ``%s'': %s\n", + name, lt_dlerror ()); + lt_dlclose (dlh); + return; + } + + (*reg_handle) (); +} + +/* + * (Try to) load all plugins in `dir'. Returns the number of loaded plugins.. + */ +#define BUFSIZE 512 +int plugin_load_all (char *dir) +{ + DIR *dh; + struct dirent *de; + char filename[BUFSIZE]; + struct stat statbuf; + + if (dir == NULL) + dir = PLUGINDIR; + + if ((dh = opendir (dir)) == NULL) + { + fprintf (stderr, "Error: Cannot read plugin directory `%s'\n", dir); + return (0); + } + + while ((de = readdir (dh)) != NULL) + { + if (snprintf (filename, BUFSIZE, "%s/%s", dir, de->d_name) >= BUFSIZE) + continue; + + if (lstat (filename, &statbuf) == -1) + { + syslog (LOG_WARNING, "stat %s: %s", filename, strerror (errno)); + continue; + } + else if (!S_ISREG (statbuf.st_mode)) + { + continue; + } + + plugin_load (filename); + } + + closedir (dh); + + return (plugin_count ()); +} +#undef BUFSIZE + +/* + * Call `init' on all plugins (if given) + */ +void plugin_init_all (void) +{ + plugin_t *p; + + for (p = first_plugin; p != NULL; p = p->next) + if (p->init != NULL) + (*p->init) (); +} + +/* + * Call `read' on all plugins (if given) + */ +void plugin_read_all (void) +{ + plugin_t *p; + + for (p = first_plugin; p != NULL; p = p->next) + if (p->read != NULL) + (*p->read) (); +} + +/* + * Add plugin to the linked list of registered plugins. + */ +void plugin_register (char *type, + void (*init) (void), + void (*read) (void), + void (*write) (char *, char *, char *)) +{ + plugin_t *p; + + if (plugin_search (type) != NULL) + return; + + if ((p = (plugin_t *) malloc (sizeof (plugin_t))) == NULL) + return; + + if ((p->type = strdup (type)) == NULL) + { + free (p); + return; + } + + p->init = init; + p->read = read; + p->write = write; + + p->next = first_plugin; + first_plugin = p; +} + +/* + * Send received data back to the plugin/module which will append DS + * definitions and pass it on to ``rrd_update_file''. + */ +#ifdef HAVE_LIBRRD +void plugin_write (char *host, char *type, char *inst, char *val) +{ + plugin_t *p; + + if ((p = plugin_search (type)) == NULL) + return; + + if (p->write == NULL) + return; + + (*p->write) (host, inst, val); +} +#endif /* HAVE_LIBRRD */ + +/* + * Receive data from the plugin/module and get it somehow to ``plugin_write'': + * Either using ``multicast_send'' (when in network/client mode) or call it + * directly (in local mode). + */ +void plugin_submit (char *type, char *inst, char *val) +{ +#ifdef HAVE_LIBRRD + if (operating_mode == MODE_LOCAL) + plugin_write (NULL, type, inst, val); + else if (operating_mode == MODE_CLIENT) + multicast_send (type, inst, val); + else /* operating_mode == MODE_SERVER */ + syslog (LOG_ERR, "WTF is the server doing in ``plugin_submit''?!?\n"); +#else + multicast_send (type, inst, val); +#endif +}