Move function declaration into the new file itrafmon.h
and do the necessary changes to make it compile.
Signed-off-by: Vitezslav Samel <vitezslav(a)samel.cz>
---
src/Makefile.am | 1 +
src/externs.h | 2 --
src/iptraf.c | 1 +
src/itrafmon.c | 1 +
src/itrafmon.h | 10 ++++++++++
5 files changed, 13 insertions(+), 2 deletions(-)
create mode 100644 src/itrafmon.h
diff --git a/src/Makefile.am b/src/Makefile.am
index 878bf1e..dd0a2a3 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -66,6 +66,7 @@ LIB_H += list.h
LIB_H += counters.h
LIB_H += detstats.h
LIB_H += ifstats.h
+LIB_H += itrafmon.h
LIB_C += error.c
LIB_C += log.c
diff --git a/src/externs.h b/src/externs.h
index f124fe1..04ba2c2 100644
--- a/src/externs.h
+++ b/src/externs.h
@@ -8,8 +8,6 @@ others
***/
-void ipmon(const struct OPTIONS *options, struct filterstate *ofilter,
- int facilitytime, char *ifptr);
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 762fece..cd67b75 100644
--- a/src/iptraf.c
+++ b/src/iptraf.c
@@ -24,6 +24,7 @@ An IP Network Statistics Utility
#include "logvars.h"
#include "detstats.h"
#include "ifstats.h"
+#include "itrafmon.h"
#include "parse-options.h"
diff --git a/src/itrafmon.c b/src/itrafmon.c
index 440d76b..34c9fb8 100644
--- a/src/itrafmon.c
+++ b/src/itrafmon.c
@@ -30,6 +30,7 @@ itrafmon.c - the IP traffic monitor module
#include "instances.h"
#include "logvars.h"
#include "bar.h"
+#include "itrafmon.h"
#define SCROLLUP 0
#define SCROLLDOWN 1
diff --git a/src/itrafmon.h b/src/itrafmon.h
new file mode 100644
index 0000000..0a1503a
--- /dev/null
+++ b/src/itrafmon.h
@@ -0,0 +1,10 @@
+#ifndef IPTRAF_NG_ITRAFMON_H
+#define IPTRAF_NG_ITRAFMON_H
+
+#include "options.h"
+#include "fltselect.h"
+
+void ipmon(struct OPTIONS *options, struct filterstate *ofilter,
+ time_t facilitytime, char *ifptr);
+
+#endif /* IPTRAF_NG_ITRAFMON_H */
--
1.7.8.4