Commit 7878ff6bc7c9bc4091d19a51a1dc4bac2df23560

Authored by blueswir1
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
slirp/if.c
@@ -8,8 +8,6 @@ @@ -8,8 +8,6 @@
8 #include <slirp.h> 8 #include <slirp.h>
9 9
10 int if_queued = 0; /* Number of packets queued so far */ 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 struct mbuf if_fastq; /* fast queue (for interactive data) */ 12 struct mbuf if_fastq; /* fast queue (for interactive data) */
15 struct mbuf if_batchq; /* queue for non-interactive data */ 13 struct mbuf if_batchq; /* queue for non-interactive data */
slirp/if.h
@@ -33,8 +33,6 @@ @@ -33,8 +33,6 @@
33 #endif 33 #endif
34 34
35 extern int if_queued; /* Number of packets queued so far */ 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 extern struct mbuf if_fastq; /* fast queue (for interactive data) */ 37 extern struct mbuf if_fastq; /* fast queue (for interactive data) */
40 extern struct mbuf if_batchq; /* queue for non-interactive data */ 38 extern struct mbuf if_batchq; /* queue for non-interactive data */
slirp/ip_icmp.c
@@ -42,8 +42,8 @@ struct icmpstat icmpstat; @@ -42,8 +42,8 @@ struct icmpstat icmpstat;
42 #endif 42 #endif
43 43
44 /* The message sent when emulating PING */ 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 /* list of actions for icmp_error() on RX of an icmp message */ 48 /* list of actions for icmp_error() on RX of an icmp message */
49 static const int icmp_flush[19] = { 49 static const int icmp_flush[19] = {
slirp/ip_output.c
@@ -46,6 +46,10 @@ @@ -46,6 +46,10 @@
46 46
47 u_int16_t ip_id; 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 * IP output. The packet in mbuf chain m contains a skeletal IP 54 * IP output. The packet in mbuf chain m contains a skeletal IP
51 * header (with len, off, ttl, proto, tos, src, dst). 55 * header (with len, off, ttl, proto, tos, src, dst).
@@ -87,7 +91,7 @@ ip_output(so, m0) @@ -87,7 +91,7 @@ ip_output(so, m0)
87 * the packet or packet fragments 91 * the packet or packet fragments
88 */ 92 */
89 /* XXX Hmmm... */ 93 /* XXX Hmmm... */
90 -/* if (if_queued > if_thresh && towrite <= 0) { 94 +/* if (if_queued > IF_THRESH && towrite <= 0) {
91 * error = ENOBUFS; 95 * error = ENOBUFS;
92 * goto bad; 96 * goto bad;
93 * } 97 * }
slirp/slirp.h
@@ -264,8 +264,6 @@ void if_start _P((struct ttys *)); @@ -264,8 +264,6 @@ void if_start _P((struct ttys *));
264 264
265 void lprint _P((const char *, ...)); 265 void lprint _P((const char *, ...));
266 266
267 -extern int do_echo;  
268 -  
269 #if SIZEOF_CHAR_P == 4 267 #if SIZEOF_CHAR_P == 4
270 # define insque_32 insque 268 # define insque_32 insque
271 # define remque_32 remque 269 # define remque_32 remque
slirp/tcp_subr.c
@@ -592,7 +592,9 @@ tcp_tos(so) @@ -592,7 +592,9 @@ tcp_tos(so)
592 return 0; 592 return 0;
593 } 593 }
594 594
  595 +#if 0
595 int do_echo = -1; 596 int do_echo = -1;
  597 +#endif
596 598
597 /* 599 /*
598 * Emulate programs that try and connect to us 600 * Emulate programs that try and connect to us