On Tue, Jul 17, 2012 at 10:35:39AM +0200, Nikola Pajkovsky wrote:
Signed-off-by: Nikola Pajkovsky <npajkovs(a)redhat.com>
---
src/detstats.c | 6 ++---
src/itrafmon.c | 70 +++++++++++++++++++++++++-------------------------------
src/packet.c | 52 +++++++++++++++++++++++++++++++++++------
src/packet.h | 25 +++++++++++---------
src/serv.c | 13 +++++------
5 files changed, 98 insertions(+), 68 deletions(-)
diff --git a/src/detstats.c b/src/detstats.c
index 2364662..4eebdaf 100644
--- a/src/detstats.c
+++ b/src/detstats.c
@@ -259,7 +259,6 @@ void detstats(char *iface, const struct OPTIONS *options, time_t
facilitytime,
WINDOW *statwin;
PANEL *statpanel;
- struct iphdr *ipacket = NULL;
struct ip6_hdr *ip6packet = NULL;
int framelen = 0;
@@ -562,9 +561,8 @@ void detstats(char *iface, const struct OPTIONS *options, time_t
facilitytime,
continue;
}
- ipacket = (struct iphdr *) pkt.pkt_payload;
- iplen = ntohs(ipacket->tot_len);
- ipproto = ipacket->protocol;
+ iplen = ntohs(pkt.iphdr->tot_len);
+ ipproto = pkt.iphdr->protocol;
update_proto_counter(&ifcounts.ipv4, outgoing, iplen);
break;
Why is ip6packet pointer not converted?
Vita