aboutsummaryrefslogtreecommitdiff
path: root/slirp/ip_input.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-09-16 21:08:06 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-09-16 21:08:06 +0000
commit5fafdf24ef2c090c164d4dc89684b3f379dbdd87 (patch)
treec0654ee63b6dac76d98b427e92ef16850a90c652 /slirp/ip_input.c
parentbd494f4cbd4187dda8cc8f4739763f24a31a4c8b (diff)
find -type f | xargs sed -i 's/[\t ]$//g' # on most files
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3173 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'slirp/ip_input.c')
-rw-r--r--slirp/ip_input.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/slirp/ip_input.c b/slirp/ip_input.c
index 4f5bfd9a56..a7d6e31818 100644
--- a/slirp/ip_input.c
+++ b/slirp/ip_input.c
@@ -37,7 +37,7 @@
/*
* Changes and additions relating to SLiRP are
* Copyright (c) 1995 Danny Gasparovski.
- *
+ *
* Please read the file COPYRIGHT for the
* terms and conditions of the copyright.
*/
@@ -73,20 +73,20 @@ ip_input(m)
{
register struct ip *ip;
int hlen;
-
+
DEBUG_CALL("ip_input");
DEBUG_ARG("m = %lx", (long)m);
DEBUG_ARG("m_len = %d", m->m_len);
ipstat.ips_total++;
-
+
if (m->m_len < sizeof (struct ip)) {
ipstat.ips_toosmall++;
return;
}
-
+
ip = mtod(m, struct ip *);
-
+
if (ip->ip_v != IPVERSION) {
ipstat.ips_badvers++;
goto bad;
@@ -99,8 +99,8 @@ ip_input(m)
}
/* keep ip header intact for ICMP reply
- * ip->ip_sum = cksum(m, hlen);
- * if (ip->ip_sum) {
+ * ip->ip_sum = cksum(m, hlen);
+ * if (ip->ip_sum) {
*/
if(cksum(m,hlen)) {
ipstat.ips_badsum++;
@@ -154,7 +154,7 @@ ip_input(m)
* (We could look in the reassembly queue to see
* if the packet was previously fragmented,
* but it's not worth the time; just let them time out.)
- *
+ *
* XXX This should fail, don't fragment yet
*/
if (ip->ip_off &~ IP_DF) {
@@ -181,7 +181,7 @@ ip_input(m)
ip->ip_len -= hlen;
if (ip->ip_off & IP_MF)
((struct ipasfrag *)ip)->ipf_mff |= 1;
- else
+ else
((struct ipasfrag *)ip)->ipf_mff &= ~1;
ip->ip_off <<= 3;
@@ -244,7 +244,7 @@ ip_reass(ip, fp)
register struct ipasfrag *q;
int hlen = ip->ip_hl << 2;
int i, next;
-
+
DEBUG_CALL("ip_reass");
DEBUG_ARG("ip = %lx", (long)ip);
DEBUG_ARG("fp = %lx", (long)fp);
@@ -275,7 +275,7 @@ ip_reass(ip, fp)
q = (struct ipasfrag *)fp;
goto insert;
}
-
+
/*
* Find a segment which begins after this one does.
*/
@@ -369,7 +369,7 @@ insert:
ip = (struct ipasfrag *)(m->m_ext + delta);
}
- /* DEBUG_ARG("ip = %lx", (long)ip);
+ /* DEBUG_ARG("ip = %lx", (long)ip);
* ip=(struct ipasfrag *)m->m_data; */
ip->ip_len = next;
@@ -446,9 +446,9 @@ void
ip_slowtimo()
{
register struct ipq *fp;
-
+
DEBUG_CALL("ip_slowtimo");
-
+
fp = (struct ipq *) ipq.next;
if (fp == 0)
return;
@@ -692,6 +692,6 @@ ip_stripoptions(m, mopt)
i = m->m_len - (sizeof (struct ip) + olen);
memcpy(opts, opts + olen, (unsigned)i);
m->m_len -= olen;
-
+
ip->ip_hl = sizeof(struct ip) >> 2;
}