mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-28 17:43:28 +00:00
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.
This commit is contained in:
parent
aa0bd366d5
commit
68857518ce
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=12470
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
Loading…
Reference in New Issue
Block a user