summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1995-11-24 12:25:13 +0000
committerbde <bde@FreeBSD.org>1995-11-24 12:25:13 +0000
commitcfd4c99c1be0b13f09a0fc1170a9e3858a95e0be (patch)
treeef45e7b6fbd42ab127711b3f63dc00909df1c61b
parentc02caaf51c301ea60f3f83f8e6aabc6d4528a4d0 (diff)
downloadFreeBSD-src-cfd4c99c1be0b13f09a0fc1170a9e3858a95e0be.zip
FreeBSD-src-cfd4c99c1be0b13f09a0fc1170a9e3858a95e0be.tar.gz
Cleaned up prototypes:
- don't #include other headers just to get struct names. - don't use __BEGIN_DECLS/__END_DECLS for system prototypes. It is for user prototypes. - don't use extern. - don't use lines longer than 80 columns. - use alphabetical order. - use tabs. Uniformized idempotency ifdefs.
-rw-r--r--sys/netipx/ipx.h60
-rw-r--r--sys/netipx/ipx_error.h22
-rw-r--r--sys/netipx/ipx_if.h20
-rw-r--r--sys/netipx/ipx_ip.h35
-rw-r--r--sys/netipx/ipx_pcb.h33
-rw-r--r--sys/netipx/spx.h58
-rw-r--r--sys/netipx/spx_debug.h15
7 files changed, 112 insertions, 131 deletions
diff --git a/sys/netipx/ipx.h b/sys/netipx/ipx.h
index c998fa5..c49ad1a 100644
--- a/sys/netipx/ipx.h
+++ b/sys/netipx/ipx.h
@@ -33,11 +33,11 @@
*
* @(#)ipx.h
*
- * $Id: ipx.h,v 1.3 1995/10/31 23:36:21 julian Exp $
+ * $Id: ipx.h,v 1.4 1995/11/04 09:02:37 julian Exp $
*/
#ifndef _NETIPX_IPX_H_
-#define _NETIPX_IPX_H_
+#define _NETIPX_IPX_H_
/*
* Constants and Structures
@@ -173,40 +173,40 @@ extern long ipx_pexseq;
extern u_char ipxctlerrmap[];
extern struct ipxpcb ipxrawpcb;
-#include <net/if.h>
-#include <net/route.h>
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-u_short ipx_cksum __P((struct mbuf *m, int len));
-void ipx_input __P((struct mbuf *m, struct ipxpcb *ipxp));
-void ipx_abort __P((struct ipxpcb *ipxp));
-void ipx_drop __P((struct ipxpcb *ipxp, int errno));
-int ipx_output __P((struct ipxpcb *ipxp, struct mbuf *m0));
-int ipx_ctloutput __P((int req, struct socket *so, int level, int name, struct mbuf **value));
-int ipx_usrreq __P((struct socket *so, int req, struct mbuf *m, struct mbuf *nam, struct mbuf *control));
-int ipx_raw_usrreq __P((struct socket *so, int req, struct mbuf *m, struct mbuf *nam, struct mbuf *control));
-int ipx_control __P((struct socket *so, int cmd, caddr_t data, struct ifnet *ifp));
-void ipx_init __P((void));
-void ipxintr __P((void));
-void ipx_ctlinput __P((int cmd, caddr_t arg));
-void ipx_forward __P((struct mbuf *m));
-void ipx_watch_output __P((struct mbuf *m, struct ifnet *ifp));
-int ipx_do_route __P((struct ipx_addr *src, struct route *ro));
-void ipx_undo_route __P((struct route *ro));
-int ipx_outputfl __P((struct mbuf *m0, struct route *ro, int flags));
-__END_DECLS
+struct route;
+struct socket;
+void ipx_abort __P((struct ipxpcb *ipxp));
+u_short ipx_cksum __P((struct mbuf *m, int len));
+int ipx_control __P((struct socket *so, int cmd, caddr_t data,
+ struct ifnet *ifp));
+void ipx_ctlinput __P((int cmd, caddr_t arg));
+int ipx_ctloutput __P((int req, struct socket *so, int level, int name,
+ struct mbuf **value));
+int ipx_do_route __P((struct ipx_addr *src, struct route *ro));
+void ipx_drop __P((struct ipxpcb *ipxp, int errno));
+void ipx_forward __P((struct mbuf *m));
+void ipx_init __P((void));
+void ipx_input __P((struct mbuf *m, struct ipxpcb *ipxp));
+void ipxintr __P((void));
+int ipx_output __P((struct ipxpcb *ipxp, struct mbuf *m0));
+int ipx_outputfl __P((struct mbuf *m0, struct route *ro, int flags));
+int ipx_raw_usrreq __P((struct socket *so, int req, struct mbuf *m,
+ struct mbuf *nam, struct mbuf *control));
+void ipx_undo_route __P((struct route *ro));
+int ipx_usrreq __P((struct socket *so, int req, struct mbuf *m,
+ struct mbuf *nam, struct mbuf *control));
+void ipx_watch_output __P((struct mbuf *m, struct ifnet *ifp));
#else
#include <sys/cdefs.h>
__BEGIN_DECLS
-extern struct ipx_addr ipx_addr __P((const char *));
-extern char *ipx_ntoa __P((struct ipx_addr));
+struct ipx_addr
+ ipx_addr __P((const char *));
+char *ipx_ntoa __P((struct ipx_addr));
__END_DECLS
-#endif
+#endif /* KERNEL */
-#endif
+#endif /* !_NETIPX_IPX_H_ */
diff --git a/sys/netipx/ipx_error.h b/sys/netipx/ipx_error.h
index 7b90629..77a15aa 100644
--- a/sys/netipx/ipx_error.h
+++ b/sys/netipx/ipx_error.h
@@ -33,11 +33,11 @@
*
* @(#)ipx_error.h
*
- * $Id: ipx_error.h,v 1.3 1995/10/31 23:36:24 julian Exp $
+ * $Id: ipx_error.h,v 1.4 1995/11/04 09:02:47 julian Exp $
*/
#ifndef _NETIPX_IPX_ERROR_H_
-#define _NETIPX_IPX_ERROR_H_
+#define _NETIPX_IPX_ERROR_H_
/*
* IPX error messages
@@ -92,19 +92,13 @@ struct ipx_errstat {
};
#ifdef KERNEL
-
extern struct ipx_errstat ipx_errstat;
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-int ipx_err_x __P((int c));
-int ipx_echo __P((struct mbuf *m));
-void ipx_error __P((struct mbuf *om, int type, int param));
-void ipx_printhost __P((struct ipx_addr *addr));
-void ipx_err_input __P((struct mbuf *m));
-__END_DECLS
-
+int ipx_echo __P((struct mbuf *m));
+void ipx_err_input __P((struct mbuf *m));
+int ipx_err_x __P((int c));
+void ipx_error __P((struct mbuf *om, int type, int param));
+void ipx_printhost __P((struct ipx_addr *addr));
#endif
-#endif
+#endif /* !_NETIPX_IPX_ERROR_H_ */
diff --git a/sys/netipx/ipx_if.h b/sys/netipx/ipx_if.h
index aa57d73..05b08b1 100644
--- a/sys/netipx/ipx_if.h
+++ b/sys/netipx/ipx_if.h
@@ -33,11 +33,11 @@
*
* @(#)ipx_if.h
*
- * $Id: ipx_if.h,v 1.3 1995/10/31 23:36:25 julian Exp $
+ * $Id: ipx_if.h,v 1.4 1995/11/04 09:02:51 julian Exp $
*/
#ifndef _NETIPX_IPX_IF_H_
-#define _NETIPX_IPX_IF_H_
+#define _NETIPX_IPX_IF_H_
/*
* Interface address. One of these structures
@@ -88,18 +88,14 @@ struct ipxip_req {
#endif
#ifdef KERNEL
-
extern struct ifqueue ipxintrq; /* IPX input packet queue */
extern struct ipx_ifaddr *ipx_ifaddr;
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-int ipx_ifinit __P((struct ifnet *ifp, struct ipx_ifaddr *ia, struct sockaddr_ipx *sipx, int scrub));
-void ipx_ifscrub __P((struct ifnet *ifp, struct ipx_ifaddr *ia));
-struct ipx_ifaddr *ipx_iaonnetof __P((struct ipx_addr *dst));
-__END_DECLS
-
+struct ipx_ifaddr *
+ ipx_iaonnetof __P((struct ipx_addr *dst));
+int ipx_ifinit __P((struct ifnet *ifp, struct ipx_ifaddr *ia,
+ struct sockaddr_ipx *sipx, int scrub));
+void ipx_ifscrub __P((struct ifnet *ifp, struct ipx_ifaddr *ia));
#endif
-#endif
+#endif /* !_NETIPX_IPX_IF_H_ */
diff --git a/sys/netipx/ipx_ip.h b/sys/netipx/ipx_ip.h
index b01ee26..833110c 100644
--- a/sys/netipx/ipx_ip.h
+++ b/sys/netipx/ipx_ip.h
@@ -33,11 +33,11 @@
*
* @(#)ipxip.h
*
- * $Id: ipx_ip.h,v 1.2 1995/10/31 23:36:32 julian Exp $
+ * $Id: ipx_ip.h,v 1.3 1995/11/04 09:03:03 julian Exp $
*/
-#ifndef __NETIPX_IPXIP_H_
-#define __NETIPX_IPXIP_H_
+#ifndef _NETIPX_IPXIP_H_
+#define _NETIPX_IPXIP_H_
struct ifnet_en {
struct ifnet ifen_ifnet;
@@ -54,21 +54,18 @@ struct ifnet_en {
extern struct ifnet ipxipif;
extern struct ifnet_en *ipxip_list;
-#include <sys/cdefs.h>
+struct ifnet_en *
+ ipxipattach __P((void));
+void ipxip_ctlinput __P((int cmd, struct sockaddr *sa));
+int ipxip_free __P((struct ifnet *ifp));
+void ipxip_input __P((struct mbuf *m, struct ifnet *ifp));
+int ipxipioctl __P((struct ifnet *ifp, int cmd, caddr_t data));
+int ipxipoutput __P((struct ifnet *ifp, struct mbuf *m,
+ struct sockaddr *dst, struct rtentry *rt));
+int ipxip_route __P((struct mbuf *m));
+void ipxip_rtchange __P((struct in_addr *dst));
+void ipxipstart __P((struct ifnet *ifp));
-__BEGIN_DECLS
-void ipxip_rtchange __P((struct in_addr *dst));
-struct ifnet_en *ipxipattach __P((void));
-int ipxipioctl __P((struct ifnet *ifp, int cmd, caddr_t data));
-void ipxip_input __P((struct mbuf *m, struct ifnet *ifp));
-int ipxipoutput __P((struct ifnet *ifn, struct mbuf *m, struct sockaddr *dst, struct rtentry *rt));
-void ipxipstart __P((struct ifnet *ifp));
-int ipxip_route __P((struct mbuf *m));
-int ipxip_free __P((struct ifnet *ifp));
-void ipxip_ctlinput __P((int cmd, struct sockaddr *sa));
-__END_DECLS
-
-#endif
-
-#endif
+#endif /* KERNEL */
+#endif /* !_NETIPX_IPXIP_H_ */
diff --git a/sys/netipx/ipx_pcb.h b/sys/netipx/ipx_pcb.h
index 6626501..8dd167b 100644
--- a/sys/netipx/ipx_pcb.h
+++ b/sys/netipx/ipx_pcb.h
@@ -33,11 +33,11 @@
*
* @(#)ipx_pcb.h
*
- * $Id: ipx_pcb.h,v 1.3 1995/10/31 23:36:35 julian Exp $
+ * $Id: ipx_pcb.h,v 1.4 1995/11/04 09:03:16 julian Exp $
*/
#ifndef _NETIPX_IPX_PCB_H_
-#define _NETIPX_IPX_PCB_H_
+#define _NETIPX_IPX_PCB_H_
/*
* IPX protocol interface control block.
@@ -78,25 +78,20 @@ struct ipxpcb {
#define IPXSNDQ 2048
#define IPXRCVQ 2048
-
#ifdef KERNEL
-
extern struct ipxpcb ipxpcb; /* head of list */
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-int ipx_pcballoc __P((struct socket *so, struct ipxpcb *head));
-int ipx_pcbbind __P((struct ipxpcb *ipxp, struct mbuf *nam));
-int ipx_pcbconnect __P((struct ipxpcb *ipxp, struct mbuf *nam));
-void ipx_pcbdisconnect __P((struct ipxpcb *ipxp));
-void ipx_pcbdetach __P((struct ipxpcb *ipxp));
-void ipx_setsockaddr __P((struct ipxpcb *ipxp, struct mbuf *nam));
-void ipx_setpeeraddr __P((struct ipxpcb *ipxp, struct mbuf *nam));
-void ipx_pcbnotify __P((struct ipx_addr *dst, int errno, void (*notify)(struct ipxpcb *), long param));
-struct ipxpcb *ipx_pcblookup __P((struct ipx_addr *faddr, int lport, int wildp));
-__END_DECLS
-
+int ipx_pcballoc __P((struct socket *so, struct ipxpcb *head));
+int ipx_pcbbind __P((struct ipxpcb *ipxp, struct mbuf *nam));
+int ipx_pcbconnect __P((struct ipxpcb *ipxp, struct mbuf *nam));
+void ipx_pcbdetach __P((struct ipxpcb *ipxp));
+void ipx_pcbdisconnect __P((struct ipxpcb *ipxp));
+struct ipxpcb *
+ ipx_pcblookup __P((struct ipx_addr *faddr, int lport, int wildp));
+void ipx_pcbnotify __P((struct ipx_addr *dst, int errno,
+ void (*notify)(struct ipxpcb *), long param));
+void ipx_setpeeraddr __P((struct ipxpcb *ipxp, struct mbuf *nam));
+void ipx_setsockaddr __P((struct ipxpcb *ipxp, struct mbuf *nam));
#endif
-#endif
+#endif /* !_NETIPX_IPX_PCB_H_ */
diff --git a/sys/netipx/spx.h b/sys/netipx/spx.h
index cb88696..4ef9b30 100644
--- a/sys/netipx/spx.h
+++ b/sys/netipx/spx.h
@@ -33,11 +33,11 @@
*
* @(#)spx.h
*
- * $Id: spx.h,v 1.3 1995/10/31 23:36:42 julian Exp $
+ * $Id: spx.h,v 1.4 1995/11/04 09:03:29 julian Exp $
*/
#ifndef _NETIPX_SPX_H_
-#define _NETIPX_SPX_H_
+#define _NETIPX_SPX_H_
/*
* Definitions for IPX style Sequenced Packet Protocol
@@ -169,30 +169,34 @@ struct spxpcb {
#ifdef KERNEL
-#include <sys/cdefs.h>
+void spx_abort __P((struct ipxpcb *ipxp));
+struct spxpcb *
+ spx_close __P((struct spxpcb *cb));
+void spx_ctlinput __P((int cmd, caddr_t arg));
+int spx_ctloutput __P((int req, struct socket *so, int level, int name,
+ struct mbuf **value));
+struct spxpcb *
+ spx_disconnect __P((struct spxpcb *cb));
+struct spxpcb *
+ spx_drop __P((struct spxpcb *cb, int errno));
+void spx_fasttimo __P((void));
+void spx_init __P((void));
+void spx_input __P((struct mbuf *m, struct ipxpcb *ipxp));
+int spx_output __P((struct spxpcb *cb, struct mbuf *m0));
+void spx_quench __P((struct ipxpcb *ipxp));
+int spx_reass __P((struct spxpcb *cb, struct spx *si));
+void spx_setpersist __P((struct spxpcb *cb));
+void spx_slowtimo __P((void));
+void spx_template __P((struct spxpcb *cb));
+struct spxpcb *
+ spx_timers __P((struct spxpcb *cb, int timer));
+struct spxpcb *
+ spx_usrclosed __P((struct spxpcb *cb));
+int spx_usrreq __P((struct socket *so, int req, struct mbuf *m,
+ struct mbuf *nam, struct mbuf *controlp));
+int spx_usrreq_sp __P((struct socket *so, int req, struct mbuf *m,
+ struct mbuf *nam, struct mbuf *controlp));
-__BEGIN_DECLS
-int spx_reass __P((struct spxpcb *cb, struct spx *si));
-int spx_output __P((struct spxpcb *cb, struct mbuf *m0));
-int spx_usrreq __P((struct socket *so, int req, struct mbuf *m, struct mbuf *nam, struct mbuf *controlp));
-int spx_usrreq_sp __P((struct socket *so, int req, struct mbuf *m, struct mbuf *nam, struct mbuf *controlp));
-int spx_ctloutput __P((int req, struct socket *so, int level, int name, struct mbuf **value));
-void spx_input __P((struct mbuf *m, struct ipxpcb *ipxp));
-void spx_ctlinput __P((int cmd, caddr_t arg));
-void spx_init __P((void));
-void spx_fasttimo __P((void));
-void spx_slowtimo __P((void));
-void spx_quench __P((struct ipxpcb *ipxp));
-void spx_setpersist __P((struct spxpcb *cb));
-void spx_template __P((struct spxpcb *cb));
-void spx_abort __P((struct ipxpcb *ipxp));
-struct spxpcb *spx_close __P((struct spxpcb *cb));
-struct spxpcb *spx_usrclosed __P((struct spxpcb *cb));
-struct spxpcb *spx_disconnect __P((struct spxpcb *cb));
-struct spxpcb *spx_drop __P((struct spxpcb *cb, int errno));
-struct spxpcb *spx_timers __P((struct spxpcb *cb, int timer));
-__END_DECLS
+#endif /* KERNEL */
-#endif
-
-#endif
+#endif /* !_NETIPX_SPX_H_ */
diff --git a/sys/netipx/spx_debug.h b/sys/netipx/spx_debug.h
index 13ff1c6..3cf59af 100644
--- a/sys/netipx/spx_debug.h
+++ b/sys/netipx/spx_debug.h
@@ -33,11 +33,11 @@
*
* @(#)spx_debug.h
*
- * $Id: spx_debug.h,v 1.3 1995/10/31 23:36:44 julian Exp $
+ * $Id: spx_debug.h,v 1.4 1995/11/04 09:03:35 julian Exp $
*/
#ifndef _NETIPX_SPX_DEBUG_H_
-#define _NETIPX_SPX_DEBUG_H_
+#define _NETIPX_SPX_DEBUG_H_
struct spx_debug {
u_long sd_time;
@@ -65,17 +65,12 @@ struct spx_debug spx_debug[SPX_NDEBUG];
int spx_debx;
#ifdef KERNEL
-
extern char *prurequests[];
extern char *sanames[];
extern char *tcpstates[];
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-void spx_trace __P((int act, int ostate, struct spxpcb *sp, struct spx *si, int req));
-__END_DECLS
-
+void spx_trace __P((int act, int ostate, struct spxpcb *sp, struct spx *si,
+ int req));
#endif
-#endif
+#endif /* !_NETIPX_SPX_DEBUG_H_ */
OpenPOWER on IntegriCloud