Add const etc. to places forgotten from the previous commit
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>
Fri, 26 Oct 2007 19:34:46 +0000 (19:34 +0000)
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>
Fri, 26 Oct 2007 19:34:46 +0000 (19:34 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3453 c046a42c-6fe2-441c-8c8c-71466251a162

slirp/if.c
slirp/if.h
slirp/ip_icmp.c
slirp/ip_output.c
slirp/slirp.h
slirp/tcp_subr.c

index 6feca55..67a7b6f 100644 (file)
@@ -8,8 +8,6 @@
 #include <slirp.h>
 
 int     if_queued = 0;                  /* Number of packets queued so far */
-int     if_thresh = 10;                 /* Number of packets queued before we start sending
-                                        * (to prevent allocing too many mbufs) */
 
 struct  mbuf if_fastq;                  /* fast queue (for interactive data) */
 struct  mbuf if_batchq;                 /* queue for non-interactive data */
index ea96696..bed7152 100644 (file)
@@ -33,8 +33,6 @@
 #endif
 
 extern int     if_queued;      /* Number of packets queued so far */
-extern int     if_thresh;      /* Number of packets queued before we start sending
-                                * (to prevent allocing too many mbufs) */
 
 extern struct mbuf if_fastq;                  /* fast queue (for interactive data) */
 extern struct mbuf if_batchq;                 /* queue for non-interactive data */
index b589651..d1da0a2 100644 (file)
@@ -42,8 +42,8 @@ struct icmpstat icmpstat;
 #endif
 
 /* The message sent when emulating PING */
-/* Be nice and tell them it's just a psuedo-ping packet */
-char icmp_ping_msg[] = "This is a psuedo-PING packet used by Slirp to emulate ICMP ECHO-REQUEST packets.\n";
+/* Be nice and tell them it's just a pseudo-ping packet */
+const char icmp_ping_msg[] = "This is a pseudo-PING packet used by Slirp to emulate ICMP ECHO-REQUEST packets.\n";
 
 /* list of actions for icmp_error() on RX of an icmp message */
 static const int icmp_flush[19] = {
index 86cf3a0..a8a6067 100644 (file)
 
 u_int16_t ip_id;
 
+/* Number of packets queued before we start sending
+ * (to prevent allocing too many mbufs) */
+#define IF_THRESH 10
+
 /*
  * IP output.  The packet in mbuf chain m contains a skeletal IP
  * header (with len, off, ttl, proto, tos, src, dst).
@@ -87,7 +91,7 @@ ip_output(so, m0)
         *      the packet or packet fragments
         */
        /* XXX Hmmm... */
-/*     if (if_queued > if_thresh && towrite <= 0) {
+/*     if (if_queued > IF_THRESH && towrite <= 0) {
  *             error = ENOBUFS;
  *             goto bad;
  *     }
index 7b0e968..a28e5fe 100644 (file)
@@ -264,8 +264,6 @@ void if_start _P((struct ttys *));
 
 void lprint _P((const char *, ...));
 
-extern int do_echo;
-
 #if SIZEOF_CHAR_P == 4
 # define insque_32 insque
 # define remque_32 remque
index d5ba21f..7d71270 100644 (file)
@@ -592,7 +592,9 @@ tcp_tos(so)
        return 0;
 }
 
+#if 0
 int do_echo = -1;
+#endif
 
 /*
  * Emulate programs that try and connect to us