/*
* (Module-)Global variables
*/
-/* 2^32 = 4294967296 = ~4.2GByte/s = ~34GBit/s */
-static data_source_t octets_dsrc[2] =
-{
- {"rx", DS_TYPE_COUNTER, 0, 4294967295.0},
- {"tx", DS_TYPE_COUNTER, 0, 4294967295.0}
-};
-
-static data_set_t octets_ds =
-{
- "if_octets", 2, octets_dsrc
-};
-
-static data_source_t packets_dsrc[2] =
-{
- {"rx", DS_TYPE_COUNTER, 0, 4294967295.0},
- {"tx", DS_TYPE_COUNTER, 0, 4294967295.0}
-};
-
-static data_set_t packets_ds =
-{
- "if_packets", 2, packets_dsrc
-};
-
-static data_source_t errors_dsrc[2] =
-{
- {"rx", DS_TYPE_COUNTER, 0, 4294967295.0},
- {"tx", DS_TYPE_COUNTER, 0, 4294967295.0}
-};
-
-static data_set_t errors_ds =
-{
- "if_errors", 2, errors_dsrc
-};
-
static const char *config_keys[] =
{
"Interface",
unsigned long long tx;
if (kc == NULL)
- return;
+ return (-1);
for (i = 0; i < numif; i++)
{
void module_register (void)
{
- plugin_register_data_set (&octets_ds);
- plugin_register_data_set (&packets_ds);
- plugin_register_data_set (&errors_ds);
-
plugin_register_config ("interface", interface_config,
config_keys, config_keys_num);
-
#if HAVE_LIBKSTAT
plugin_register_init ("interface", interface_init);
#endif
-
#if INTERFACE_HAVE_READ
plugin_register_read ("interface", interface_read);
#endif
-}
+} /* void module_register */