aboutsummaryrefslogtreecommitdiff
path: root/slirp/ip_icmp.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-09-17 08:09:54 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-09-17 08:09:54 +0000
commit3b46e6242767a2c770c0aba0a6595e9511623c92 (patch)
tree3be4de9b2efeb39df2456957babaeda70ed50012 /slirp/ip_icmp.c
parentef18c8839e85341cc63467f92c35f981858a6fe5 (diff)
downloadqemu-3b46e6242767a2c770c0aba0a6595e9511623c92.zip
qemu-3b46e6242767a2c770c0aba0a6595e9511623c92.tar.gz
qemu-3b46e6242767a2c770c0aba0a6595e9511623c92.tar.bz2
find -type f | xargs sed -i 's/[\t ]*$//g' # Yes, again. Note the star in the regex.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3177 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'slirp/ip_icmp.c')
-rw-r--r--slirp/ip_icmp.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/slirp/ip_icmp.c b/slirp/ip_icmp.c
index b24eae9..ae5a321 100644
--- a/slirp/ip_icmp.c
+++ b/slirp/ip_icmp.c
@@ -105,7 +105,7 @@ icmp_input(m, hlen)
}
m->m_len += hlen;
m->m_data -= hlen;
-
+
/* icmpstat.icps_inhist[icp->icmp_type]++; */
/* code = icp->icmp_code; */
@@ -135,7 +135,7 @@ icmp_input(m, hlen)
so->so_iptos = ip->ip_tos;
so->so_type = IPPROTO_ICMP;
so->so_state = SS_ISFCONNECTED;
-
+
/* Send the packet */
addr.sin_family = AF_INET;
if ((so->so_faddr.s_addr & htonl(0xffffff00)) == special_addr.s_addr) {
@@ -173,7 +173,7 @@ icmp_input(m, hlen)
icmpstat.icps_notsupp++;
m_freem(m);
break;
-
+
default:
icmpstat.icps_badtype++;
m_freem(m);
@@ -226,7 +226,7 @@ icmp_error(msrc, type, code, minsize, message)
/* check msrc */
if(!msrc) goto end_error;
ip = mtod(msrc, struct ip *);
-#if DEBUG
+#if DEBUG
{ char bufa[20], bufb[20];
strcpy(bufa, inet_ntoa(ip->ip_src));
strcpy(bufb, inet_ntoa(ip->ip_dst));
@@ -258,9 +258,9 @@ icmp_error(msrc, type, code, minsize, message)
/* make the header of the reply packet */
ip = mtod(m, struct ip *);
hlen= sizeof(struct ip ); /* no options in reply */
-
+
/* fill in icmp */
- m->m_data += hlen;
+ m->m_data += hlen;
m->m_len -= hlen;
icp = mtod(m, struct icmp *);
@@ -269,7 +269,7 @@ icmp_error(msrc, type, code, minsize, message)
else if(s_ip_len>ICMP_MAXDATALEN) /* maximum size */
s_ip_len=ICMP_MAXDATALEN;
- m->m_len=ICMP_MINLEN+s_ip_len; /* 8 bytes ICMP header */
+ m->m_len=ICMP_MINLEN+s_ip_len; /* 8 bytes ICMP header */
/* min. size = 8+sizeof(struct ip)+8 */
@@ -304,7 +304,7 @@ icmp_error(msrc, type, code, minsize, message)
/* fill in ip */
ip->ip_hl = hlen >> 2;
ip->ip_len = m->m_len;
-
+
ip->ip_tos=((ip->ip_tos & 0x1E) | 0xC0); /* high priority for errors */
ip->ip_ttl = MAXTTL;
@@ -313,7 +313,7 @@ icmp_error(msrc, type, code, minsize, message)
ip->ip_src = alias_addr;
(void ) ip_output((struct socket *)NULL, m);
-
+
icmpstat.icps_reflect++;
end_error: