Move function declaration from externs.h into the new file
detstats.h and do the necessary changes to make it compile.
Signed-off-by: Vitezslav Samel <vitezslav(a)samel.cz>
---
src/Makefile.am | 1 +
src/detstats.c | 1 +
src/detstats.h | 10 ++++++++++
src/externs.h | 2 --
src/iptraf.c | 1 +
5 files changed, 13 insertions(+), 2 deletions(-)
create mode 100644 src/detstats.h
diff --git a/src/Makefile.am b/src/Makefile.am
index 0b89a81..42aa04a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -64,6 +64,7 @@ LIB_H += fltdefs.h
LIB_H += logvars.h
LIB_H += list.h
LIB_H += counters.h
+LIB_H += detstats.h
LIB_C += error.c
LIB_C += log.c
diff --git a/src/detstats.c b/src/detstats.c
index b9cfe49..be71653 100644
--- a/src/detstats.c
+++ b/src/detstats.c
@@ -27,6 +27,7 @@ detstats.c - the interface statistics module
#include "logvars.h"
#include "promisc.h"
#include "error.h"
+#include "detstats.h"
struct ifcounts {
struct proto_counter total;
diff --git a/src/detstats.h b/src/detstats.h
new file mode 100644
index 0000000..c3dd9c3
--- /dev/null
+++ b/src/detstats.h
@@ -0,0 +1,10 @@
+#ifndef IPTRAF_NG_DETSTATS_H
+#define IPTRAF_NG_DETSTATS_H
+
+#include "options.h"
+#include "fltselect.h"
+
+void detstats(char *iface, const struct OPTIONS *options, time_t facilitytime,
+ struct filterstate *ofilter);
+
+#endif /* IPTRAF_NG_DETSTATS_H */
diff --git a/src/externs.h b/src/externs.h
index 8bab898..c9d047b 100644
--- a/src/externs.h
+++ b/src/externs.h
@@ -13,8 +13,6 @@ void ipmon(const struct OPTIONS *options, struct filterstate *ofilter,
void selectiface(char *ifname, int withall, int *aborted);
void ifstats(const struct OPTIONS *options, struct filterstate *ofilter,
int facilitytime);
-void detstats(char *iface, const struct OPTIONS *options, int facilitytime,
- struct filterstate *ofilter);
void packet_size_breakdown(struct OPTIONS *options, char *iface,
int facilitytime, struct filterstate *ofilter);
void servmon(char *iface, struct porttab *ports, const struct OPTIONS *options,
diff --git a/src/iptraf.c b/src/iptraf.c
index 9436602..01d57cd 100644
--- a/src/iptraf.c
+++ b/src/iptraf.c
@@ -22,6 +22,7 @@ An IP Network Statistics Utility
#include "attrs.h"
#include "rvnamed.h"
#include "logvars.h"
+#include "detstats.h"
#include "parse-options.h"
--
1.7.8.4