aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Ghigonis <laurent@p1sec.com>2012-12-15 01:40:45 +0100
committerLaurent Ghigonis <laurent@p1sec.com>2012-12-15 01:41:02 +0100
commit289e92ce8c6c4bbdd877c342f31e0647cc8ccefd (patch)
tree218686a301427c2dda9fc414cfc08c5f01a8908e
parentmore doc in comments (diff)
downloadglouglou-289e92ce8c6c4bbdd877c342f31e0647cc8ccefd.tar.xz
glouglou-289e92ce8c6c4bbdd877c342f31e0647cc8ccefd.zip
remove unused var in ip_handle()
spotted by gcc -Wall
-rw-r--r--gg_sniff/pcap.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/gg_sniff/pcap.c b/gg_sniff/pcap.c
index f38ef93..02735c8 100644
--- a/gg_sniff/pcap.c
+++ b/gg_sniff/pcap.c
@@ -347,7 +347,7 @@ ip_handle(struct ip *ip, const u_char *pend, u_int wirelen)
struct icmp *icmp;
struct in_addr src, dst;
u_int src_port, dst_port;
- u_int size, proto, close;
+ u_int proto, close;
int response;
struct ggnet_conn *conn;
struct gg_packet pkt;
@@ -385,7 +385,6 @@ ip_handle(struct ip *ip, const u_char *pend, u_int wirelen)
src_port = 0;
dst_port = 0;
proto = IPPROTO_IP;
- size = len;
close = 0;
off = ntohs(ip->ip_off);
@@ -408,7 +407,6 @@ ip_handle(struct ip *ip, const u_char *pend, u_int wirelen)
src_port = ntohs(tcph->th_sport);
dst_port = ntohs(tcph->th_dport);
proto = IPPROTO_TCP;
- size = len - sizeof(*tcph);
if ((tcph->th_flags & TH_FIN) &&
(tcph->th_flags & TH_ACK))
close = 1;
@@ -431,7 +429,6 @@ ip_handle(struct ip *ip, const u_char *pend, u_int wirelen)
src_port = ntohs(udph->uh_sport);
dst_port = ntohs(udph->uh_dport);
proto = IPPROTO_UDP;
- size = len - sizeof(*udph);
break;
case IPPROTO_ICMP:
@@ -442,7 +439,6 @@ ip_handle(struct ip *ip, const u_char *pend, u_int wirelen)
return;
}
proto = IPPROTO_ICMP;
- size = len - sizeof(*icmp);
break;
default: