-static void iptables_init (void)
-{
- return;
-}
-
-static void iptables_write (char *host, char *orig_inst, char *val, char *type)
-{
- char *table;
- char *inst;
- char file[256];
- int status;
-
- table = strdup (orig_inst);
- if (table == NULL)
- return;
- inst = strchr (table, ',');
- if (inst == NULL)
- {
- free (table);
- return;
- }
-
- *inst = '\0';
- inst++;
- if (*inst == '\0')
- {
- free (table);
- return;
- }
-
- status = snprintf (file, sizeof (file), "iptables-%s/%s-%s.rrd",
- table, type, inst);
- free (table);
- if ((status >= sizeof (file)) || (status < 1))
- return;
-
- rrd_update_file (host, file, val, ds_def, ds_num);
-} /* void iptables_write */
-
-static void iptables_write_bytes (char *host, char *inst, char *val)
-{
- iptables_write (host, inst, val, "ipt_bytes");
-}
-
-static void iptables_write_packets (char *host, char *inst, char *val)
-{
- iptables_write (host, inst, val, "ipt_packets");
-}
-