Commit 7878ff6bc7c9bc4091d19a51a1dc4bac2df23560
1 parent
9634d903
Add const etc. to places forgotten from the previous commit
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3453 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
6 changed files
with
9 additions
and
9 deletions
slirp/if.c
... | ... | @@ -8,8 +8,6 @@ |
8 | 8 | #include <slirp.h> |
9 | 9 | |
10 | 10 | int if_queued = 0; /* Number of packets queued so far */ |
11 | -int if_thresh = 10; /* Number of packets queued before we start sending | |
12 | - * (to prevent allocing too many mbufs) */ | |
13 | 11 | |
14 | 12 | struct mbuf if_fastq; /* fast queue (for interactive data) */ |
15 | 13 | struct mbuf if_batchq; /* queue for non-interactive data */ | ... | ... |
slirp/if.h
... | ... | @@ -33,8 +33,6 @@ |
33 | 33 | #endif |
34 | 34 | |
35 | 35 | extern int if_queued; /* Number of packets queued so far */ |
36 | -extern int if_thresh; /* Number of packets queued before we start sending | |
37 | - * (to prevent allocing too many mbufs) */ | |
38 | 36 | |
39 | 37 | extern struct mbuf if_fastq; /* fast queue (for interactive data) */ |
40 | 38 | extern struct mbuf if_batchq; /* queue for non-interactive data */ | ... | ... |
slirp/ip_icmp.c
... | ... | @@ -42,8 +42,8 @@ struct icmpstat icmpstat; |
42 | 42 | #endif |
43 | 43 | |
44 | 44 | /* The message sent when emulating PING */ |
45 | -/* Be nice and tell them it's just a psuedo-ping packet */ | |
46 | -char icmp_ping_msg[] = "This is a psuedo-PING packet used by Slirp to emulate ICMP ECHO-REQUEST packets.\n"; | |
45 | +/* Be nice and tell them it's just a pseudo-ping packet */ | |
46 | +const char icmp_ping_msg[] = "This is a pseudo-PING packet used by Slirp to emulate ICMP ECHO-REQUEST packets.\n"; | |
47 | 47 | |
48 | 48 | /* list of actions for icmp_error() on RX of an icmp message */ |
49 | 49 | static const int icmp_flush[19] = { | ... | ... |
slirp/ip_output.c
... | ... | @@ -46,6 +46,10 @@ |
46 | 46 | |
47 | 47 | u_int16_t ip_id; |
48 | 48 | |
49 | +/* Number of packets queued before we start sending | |
50 | + * (to prevent allocing too many mbufs) */ | |
51 | +#define IF_THRESH 10 | |
52 | + | |
49 | 53 | /* |
50 | 54 | * IP output. The packet in mbuf chain m contains a skeletal IP |
51 | 55 | * header (with len, off, ttl, proto, tos, src, dst). |
... | ... | @@ -87,7 +91,7 @@ ip_output(so, m0) |
87 | 91 | * the packet or packet fragments |
88 | 92 | */ |
89 | 93 | /* XXX Hmmm... */ |
90 | -/* if (if_queued > if_thresh && towrite <= 0) { | |
94 | +/* if (if_queued > IF_THRESH && towrite <= 0) { | |
91 | 95 | * error = ENOBUFS; |
92 | 96 | * goto bad; |
93 | 97 | * } | ... | ... |
slirp/slirp.h