summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1994-08-18 22:36:09 +0000
committerwollman <wollman@FreeBSD.org>1994-08-18 22:36:09 +0000
commitf9fc827448679cf1d41e56512c34521bf06ce37a (patch)
tree6b83fdf6eb5926c2f3d175a83d24bf5a2611a012 /sys/netinet
parent44fc281f480837836035856eb0af25443f0d2146 (diff)
downloadFreeBSD-src-f9fc827448679cf1d41e56512c34521bf06ce37a.zip
FreeBSD-src-f9fc827448679cf1d41e56512c34521bf06ce37a.tar.gz
Fix up some sloppy coding practices:
- Delete redundant declarations. - Add -Wredundant-declarations to Makefile.i386 so they don't come back. - Delete sloppy COMMON-style declarations of uninitialized data in header files. - Add a few prototypes. - Clean up warnings resulting from the above. NB: ioconf.c will still generate a redundant-declaration warning, which is unavoidable unless somebody volunteers to make `config' smarter.
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/if_ether.c3
-rw-r--r--sys/netinet/if_ether.h13
-rw-r--r--sys/netinet/in.c4
-rw-r--r--sys/netinet/in_var.h4
-rw-r--r--sys/netinet/ip_input.c5
-rw-r--r--sys/netinet/ip_output.c4
-rw-r--r--sys/netinet/ip_var.h11
-rw-r--r--sys/netinet/tcp_input.c4
-rw-r--r--sys/netinet/tcp_reass.c4
9 files changed, 24 insertions, 28 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c
index 3b9e3d8..7eb4462 100644
--- a/sys/netinet/if_ether.c
+++ b/sys/netinet/if_ether.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)if_ether.c 8.1 (Berkeley) 6/10/93
- * $Id$
+ * $Id: if_ether.c,v 1.2 1994/08/02 07:47:59 davidg Exp $
*/
/*
@@ -85,7 +85,6 @@ static struct llinfo_arp *arplookup __P((u_long, int, int));
static void in_arpinput __P((struct mbuf *));
extern struct ifnet loif;
-extern struct timeval time;
struct llinfo_arp llinfo_arp = {&llinfo_arp, &llinfo_arp};
struct ifqueue arpintrq = {0, 0, 0, 50};
int arp_inuse, arp_allocated, arp_intimer;
diff --git a/sys/netinet/if_ether.h b/sys/netinet/if_ether.h
index db5a3da..f971b95 100644
--- a/sys/netinet/if_ether.h
+++ b/sys/netinet/if_ether.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)if_ether.h 8.1 (Berkeley) 6/10/93
- * $Id$
+ * $Id: if_ether.h,v 1.2 1994/08/02 07:48:01 davidg Exp $
*/
/*
@@ -138,20 +138,19 @@ struct sockaddr_inarp {
#define RTF_ANNOUNCE RTF_PROTO2 /* announce new arp entry */
#ifdef KERNEL
-u_char etherbroadcastaddr[6];
-u_char ether_ipmulticast_min[6];
-u_char ether_ipmulticast_max[6];
-struct ifqueue arpintrq;
+extern u_char etherbroadcastaddr[6];
+extern u_char ether_ipmulticast_min[6];
+extern u_char ether_ipmulticast_max[6];
+extern struct ifqueue arpintrq;
struct llinfo_arp *arptnew __P((struct in_addr *));
-struct llinfo_arp llinfo_arp; /* head of the llinfo queue */
+extern struct llinfo_arp llinfo_arp; /* head of the llinfo queue */
void arpwhohas __P((struct arpcom *, struct in_addr *));
void arpintr __P((void));
int arpresolve __P((struct arpcom *,
struct rtentry *, struct mbuf *, struct sockaddr *, u_char *));
void arp_rtrequest __P((int, struct rtentry *, struct sockaddr *));
-void arpwhohas __P((struct arpcom *, struct in_addr *));
int ether_addmulti __P((struct ifreq *, struct arpcom *));
int ether_delmulti __P((struct ifreq *, struct arpcom *));
diff --git a/sys/netinet/in.c b/sys/netinet/in.c
index a070c6d..05bd4ca 100644
--- a/sys/netinet/in.c
+++ b/sys/netinet/in.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)in.c 8.2 (Berkeley) 11/15/93
- * $Id$
+ * $Id: in.c,v 1.3 1994/08/02 07:48:12 davidg Exp $
*/
#include <sys/param.h>
@@ -409,7 +409,7 @@ in_ifinit(ifp, ia, sin, scrub)
{
register u_long i = ntohl(sin->sin_addr.s_addr);
struct sockaddr_in oldaddr;
- int s = splimp(), flags = RTF_UP, error, ether_output();
+ int s = splimp(), flags = RTF_UP, error;
oldaddr = ia->ia_addr;
ia->ia_addr = *sin;
diff --git a/sys/netinet/in_var.h b/sys/netinet/in_var.h
index 544d801..c6ecabb 100644
--- a/sys/netinet/in_var.h
+++ b/sys/netinet/in_var.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)in_var.h 8.1 (Berkeley) 6/10/93
- * $Id$
+ * $Id: in_var.h,v 1.3 1994/08/02 07:48:28 davidg Exp $
*/
/*
@@ -78,8 +78,6 @@ struct in_aliasreq {
#ifdef KERNEL
extern struct in_ifaddr *in_ifaddr;
extern struct ifqueue ipintrq; /* ip packet input queue */
-void in_socktrim __P((struct sockaddr_in *));
-
/*
* Macro for finding the interface (ifnet structure) corresponding to one
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index 38c341d..4841fb1 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ip_input.c 8.2 (Berkeley) 1/4/94
- * $Id$
+ * $Id: ip_input.c,v 1.3 1994/08/02 07:48:38 davidg Exp $
*/
#include <sys/param.h>
@@ -80,6 +80,9 @@ int ipqmaxlen = IFQ_MAXLEN;
struct in_ifaddr *in_ifaddr; /* first inet address */
struct ifqueue ipintrq;
+struct ipstat ipstat;
+struct ipq ipq;
+
/*
* We need to save the IP options in case a protocol wants to respond
* to an incoming packet over the same route if the packet got here
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index f20ab71..994cc98 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ip_output.c 8.3 (Berkeley) 1/21/94
- * $Id$
+ * $Id: ip_output.c,v 1.4 1994/08/02 07:48:45 davidg Exp $
*/
#include <sys/param.h>
@@ -57,6 +57,8 @@
#include <machine/mtpr.h>
#endif
+u_short ip_id;
+
static struct mbuf *ip_insertoptions __P((struct mbuf *, struct mbuf *, int *));
static void ip_mloopback
__P((struct ifnet *, struct mbuf *, struct sockaddr_in *));
diff --git a/sys/netinet/ip_var.h b/sys/netinet/ip_var.h
index c5bd50cc..04ec94d 100644
--- a/sys/netinet/ip_var.h
+++ b/sys/netinet/ip_var.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ip_var.h 8.1 (Berkeley) 6/10/93
- * $Id$
+ * $Id: ip_var.h,v 1.2 1994/08/02 07:48:47 davidg Exp $
*/
/*
@@ -148,12 +148,11 @@ struct ipstat {
#define IP_ROUTETOIF SO_DONTROUTE /* bypass routing tables */
#define IP_ALLOWBROADCAST SO_BROADCAST /* can send broadcast packets */
-struct ipstat ipstat;
-struct ipq ipq; /* ip reass. queue */
-u_short ip_id; /* ip packet ctr, for ids */
-int ip_defttl; /* default IP ttl */
+extern struct ipstat ipstat;
+extern struct ipq ipq; /* ip reass. queue */
+extern u_short ip_id; /* ip packet ctr, for ids */
+extern int ip_defttl; /* default IP ttl */
-int in_control __P((struct socket *, int, caddr_t, struct ifnet *));
int ip_ctloutput __P((int, struct socket *, int, int, struct mbuf **));
void ip_deq __P((struct ipasfrag *));
int ip_dooptions __P((struct mbuf *));
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index d6e779b..674b7d9 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tcp_input.c 8.5 (Berkeley) 4/10/94
- * $Id$
+ * $Id: tcp_input.c,v 1.5 1994/08/02 07:49:01 davidg Exp $
*/
#ifndef TUBA_INCLUDE
@@ -64,8 +64,6 @@ int tcprexmtthresh = 3;
struct tcpiphdr tcp_saveti;
struct inpcb *tcp_last_inpcb = &tcb;
-extern u_long sb_max;
-
#endif /* TUBA_INCLUDE */
#define TCP_PAWS_IDLE (24 * 24 * 60 * 60 * PR_SLOWHZ)
diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c
index d6e779b..674b7d9 100644
--- a/sys/netinet/tcp_reass.c
+++ b/sys/netinet/tcp_reass.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tcp_input.c 8.5 (Berkeley) 4/10/94
- * $Id$
+ * $Id: tcp_input.c,v 1.5 1994/08/02 07:49:01 davidg Exp $
*/
#ifndef TUBA_INCLUDE
@@ -64,8 +64,6 @@ int tcprexmtthresh = 3;
struct tcpiphdr tcp_saveti;
struct inpcb *tcp_last_inpcb = &tcb;
-extern u_long sb_max;
-
#endif /* TUBA_INCLUDE */
#define TCP_PAWS_IDLE (24 * 24 * 60 * 60 * PR_SLOWHZ)
OpenPOWER on IntegriCloud