summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b4c17cc)
raw | patch | inline | side by side (parent: b4c17cc)
author | Florian Forster <octo@collectd.org> | |
Mon, 18 Sep 2017 08:04:47 +0000 (10:04 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Mon, 18 Sep 2017 08:04:47 +0000 (10:04 +0200) |
src/synproxy.c | patch | blob | history |
diff --git a/src/synproxy.c b/src/synproxy.c
index dcfb00822204cebca3899508a8f66c7c9feeddf2..6c6b997d478268d3698e12509fa3c183aa255ca9 100644 (file)
--- a/src/synproxy.c
+++ b/src/synproxy.c
static const char *synproxy_stat_path = "/proc/net/stat/synproxy";
static const char *column_names[SYNPROXY_FIELDS] = {
- "entries", "syn_received", "invalid", "valid", "retransmission", "reopened"
-};
+ "entries", "syn_received", "invalid",
+ "valid", "retransmission", "reopened"};
static const char *column_types[SYNPROXY_FIELDS] = {
- "current_connections", "connections", "cookies", "cookies", "cookies",
- "connections"
-};
+ "current_connections", "connections", "cookies", "cookies", "cookies",
+ "connections"};
static void synproxy_submit(value_t *results) {
value_list_t vl = VALUE_LIST_INIT;
sstrncpy(vl.type_instance, column_names[n], sizeof(vl.type_instance));
plugin_dispatch_values(&vl);
- }
+ }
}
static int synproxy_read(void) {
int numfields = strsplit(buf, fields, STATIC_ARRAY_SIZE(fields));
if (numfields != SYNPROXY_FIELDS) {
- ERROR("synproxy plugin: unexpected number of columns in %s",
- synproxy_stat_path);
+ ERROR("synproxy plugin: unexpected number of columns in %s",
+ synproxy_stat_path);
status = -1;
break;
}
synproxy_submit(results);
}
- return status;
+ return status;
}
void module_register(void) {
plugin_register_read("synproxy", synproxy_read);
} /* void module_register */
-