Move function declaration into the pktsize.h and do the necessary
changes to make it compile.
Signed-off-by: Vitezslav Samel <vitezslav(a)samel.cz>
---
src/externs.h | 2 --
src/iptraf.c | 1 +
src/pktsize.c | 6 ++++++
src/pktsize.h | 10 +++++-----
4 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/src/externs.h b/src/externs.h
index 04ba2c2..a67f18d 100644
--- a/src/externs.h
+++ b/src/externs.h
@@ -8,8 +8,6 @@ others
***/
-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,
int facilitytime, struct filterstate *ofilter);
void hostmon(const struct OPTIONS *options, int facilitytime, char *ifptr,
diff --git a/src/iptraf.c b/src/iptraf.c
index cd67b75..69d408f 100644
--- a/src/iptraf.c
+++ b/src/iptraf.c
@@ -25,6 +25,7 @@ An IP Network Statistics Utility
#include "detstats.h"
#include "ifstats.h"
#include "itrafmon.h"
+#include "pktsize.h"
#include "parse-options.h"
diff --git a/src/pktsize.c b/src/pktsize.c
index 7feab1e..c6317ea 100644
--- a/src/pktsize.c
+++ b/src/pktsize.c
@@ -29,6 +29,12 @@ pktsize.c - the packet size breakdown facility
extern int exitloop;
extern int daemonized;
+struct ifstat_brackets {
+ unsigned int floor;
+ unsigned int ceil;
+ unsigned long count;
+};
+
static void rotate_size_log(int s __unused)
{
rotate_flag = 1;
diff --git a/src/pktsize.h b/src/pktsize.h
index 4d8708b..3a78640 100644
--- a/src/pktsize.h
+++ b/src/pktsize.h
@@ -1,10 +1,10 @@
#ifndef IPTRAF_NG_PKTSIZE_H
#define IPTRAF_NG_PKTSIZE_H
-struct ifstat_brackets {
- unsigned int floor;
- unsigned int ceil;
- unsigned long count;
-};
+#include "options.h"
+#include "fltselect.h"
+
+void packet_size_breakdown(struct OPTIONS *options, char *iface,
+ time_t facilitytime, struct filterstate *ofilter);
#endif /* IPTRAF_NG_PKTSIZE_H */
--
1.7.8.4