/* RX: Extended Remote Procedure Call */
#include <afsconfig.h>
-#ifdef KERNEL
#include "afs/param.h"
-#else
-#include <afs/param.h>
-#endif
-
#ifdef KERNEL
-#include "afs/sysincludes.h"
-#include "afsincludes.h"
-#ifndef UKERNEL
-#include "h/types.h"
-#include "h/time.h"
-#include "h/stat.h"
-#ifdef AFS_OSF_ENV
-#include <net/net_globals.h>
-#endif /* AFS_OSF_ENV */
-#ifdef AFS_LINUX20_ENV
-#include "h/socket.h"
-#endif
-#include "netinet/in.h"
-#ifdef AFS_SUN57_ENV
-#include "inet/common.h"
-#include "inet/ip.h"
-#include "inet/ip_ire.h"
-#endif
-#include "afs/afs_args.h"
-#include "afs/afs_osi.h"
-#ifdef RX_KERNEL_TRACE
-#include "rx_kcommon.h"
-#endif
-#if (defined(AFS_AUX_ENV) || defined(AFS_AIX_ENV))
-#include "h/systm.h"
-#endif
-#ifdef RXDEBUG
-#undef RXDEBUG /* turn off debugging */
-#endif /* RXDEBUG */
-#if defined(AFS_SGI_ENV)
-#include "sys/debug.h"
-#endif
-#include "afsint.h"
-#ifdef AFS_OSF_ENV
-#undef kmem_alloc
-#undef kmem_free
-#undef mem_alloc
-#undef mem_free
-#endif /* AFS_OSF_ENV */
-#else /* !UKERNEL */
-#include "afs/sysincludes.h"
-#include "afsincludes.h"
-#endif /* !UKERNEL */
-#include "afs/lock.h"
-#include "rx_kmutex.h"
-#include "rx_kernel.h"
-#include "rx_clock.h"
-#include "rx_queue.h"
-#include "rx.h"
-#include "rx_globals.h"
-#include "rx_trace.h"
-#include "rx_atomic.h"
-#include "rx_internal.h"
-#include "rx_stats.h"
-#define AFSOP_STOP_RXCALLBACK 210 /* Stop CALLBACK process */
-#define AFSOP_STOP_AFS 211 /* Stop AFS process */
-#define AFSOP_STOP_BKG 212 /* Stop BKG process */
-#include "afsint.h"
+# include "afs/sysincludes.h"
+# include "afsincludes.h"
+# ifndef UKERNEL
+# include "h/types.h"
+# include "h/time.h"
+# include "h/stat.h"
+# ifdef AFS_LINUX20_ENV
+# include "h/socket.h"
+# endif
+# include "netinet/in.h"
+# ifdef AFS_SUN57_ENV
+# include "inet/common.h"
+# include "inet/ip.h"
+# include "inet/ip_ire.h"
+# endif
+# include "afs/afs_args.h"
+# include "afs/afs_osi.h"
+# ifdef RX_KERNEL_TRACE
+# include "rx_kcommon.h"
+# endif
+# if defined(AFS_AIX_ENV)
+# include "h/systm.h"
+# endif
+# ifdef RXDEBUG
+# undef RXDEBUG /* turn off debugging */
+# endif /* RXDEBUG */
+# if defined(AFS_SGI_ENV)
+# include "sys/debug.h"
+# endif
+# else /* !UKERNEL */
+# include "afs/sysincludes.h"
+# include "afsincludes.h"
+# endif /* !UKERNEL */
+# include "afs/lock.h"
+# include "rx_kmutex.h"
+# include "rx_kernel.h"
+# define AFSOP_STOP_RXCALLBACK 210 /* Stop CALLBACK process */
+# define AFSOP_STOP_AFS 211 /* Stop AFS process */
+# define AFSOP_STOP_BKG 212 /* Stop BKG process */
extern afs_int32 afs_termState;
-#ifdef AFS_AIX41_ENV
-#include "sys/lockl.h"
-#include "sys/lock_def.h"
-#endif /* AFS_AIX41_ENV */
+# ifdef AFS_AIX41_ENV
+# include "sys/lockl.h"
+# include "sys/lock_def.h"
+# endif /* AFS_AIX41_ENV */
# include "afs/rxgen_consts.h"
#else /* KERNEL */
# include <sys/types.h>
# ifdef HAVE_STDINT_H
# include <stdint.h>
# endif
-#ifdef AFS_NT40_ENV
-# include <stdlib.h>
-# include <fcntl.h>
-# include <afs/afsutil.h>
-# include <WINNT\afsreg.h>
-#else
-# include <sys/socket.h>
-# include <sys/file.h>
-# include <netdb.h>
-# include <sys/stat.h>
-# include <netinet/in.h>
-# include <sys/time.h>
-#endif
-# include "rx.h"
+# ifdef AFS_NT40_ENV
+# include <stdlib.h>
+# include <fcntl.h>
+# include <afs/afsutil.h>
+# include <WINNT\afsreg.h>
+# else
+# include <sys/socket.h>
+# include <sys/file.h>
+# include <netdb.h>
+# include <sys/stat.h>
+# include <netinet/in.h>
+# include <sys/time.h>
+# endif
# include "rx_user.h"
-# include "rx_clock.h"
-# include "rx_queue.h"
-# include "rx_atomic.h"
-# include "rx_globals.h"
-# include "rx_trace.h"
-# include "rx_internal.h"
-# include "rx_stats.h"
-# include <afs/rxgen_consts.h>
#endif /* KERNEL */
+#include "rx.h"
+#include "rx_clock.h"
+#include "rx_queue.h"
+#include "rx_atomic.h"
+#include "rx_globals.h"
+#include "rx_trace.h"
+#include "rx_internal.h"
+#include "rx_stats.h"
+
+#include <afs/rxgen_consts.h>
+
#ifndef KERNEL
#ifdef AFS_PTHREAD_ENV
#ifndef AFS_NT40_ENV
#ifdef KERNEL
#include "rx_kmutex.h"
#include "rx_kernel.h"
-#include "rx_clock.h"
-#include "rx_event.h"
-#include "rx_queue.h"
-#include "rx_packet.h"
-#include "rx_misc.h"
-#include "rx_multi.h"
#if defined (AFS_OBSD_ENV) && !defined (MLEN)
#include "sys/mbuf.h"
#endif
#include <ws2tcpip.h>
#endif
# include "rx_user.h"
-# include "rx_clock.h"
-# include "rx_event.h"
-# include "rx_packet.h"
-# include "rx_misc.h"
-# include "rx_null.h"
-# include "rx_multi.h"
#ifndef AFS_NT40_ENV
# include <netinet/in.h>
# include <sys/socket.h>
#endif
#endif /* KERNEL */
+#include "rx_clock.h"
+#include "rx_event.h"
+#include "rx_packet.h"
+#include "rx_misc.h"
+#include "rx_null.h"
+#include "rx_multi.h"
/* Configurable parameters */
#define RX_IDLE_DEAD_TIME 60 /* default idle dead time */
/* See rx_clock.h for calling conventions */
#include <afsconfig.h>
-#ifdef KERNEL
#include "afs/param.h"
-#else
-#include <afs/param.h>
-#endif
#ifdef AFS_SUN59_ENV
#include <sys/time_impl.h>
#endif
-
#ifdef KERNEL
-#ifndef UKERNEL
-#include "rx/rx_clock.h"
-#include "h/types.h"
-#include "h/time.h"
-#else /* !UKERNEL */
-#include "afs/sysincludes.h"
-#include "afsincludes.h"
-#include "rx/rx.h"
-#include "rx/rx_clock.h"
-#endif /* !UKERNEL */
+# ifndef UKERNEL
+# include "h/types.h"
+# include "h/time.h"
+# else /* !UKERNEL */
+# include "afs/sysincludes.h"
+# include "afsincludes.h"
+# endif /* !UKERNEL */
#else /* KERNEL */
-#include <sys/time.h>
-#ifdef HAVE_SIGNAL_H
-#include <signal.h>
+# include <sys/time.h>
+# ifdef HAVE_SIGNAL_H
+# include <signal.h>
+# endif
+# include <stdio.h>
+# include <errno.h>
+# include <stdlib.h>
#endif
-#include <stdio.h>
-#include <errno.h>
-#include <stdlib.h>
+
#include "rx.h"
#include "rx_clock.h"
-#endif
#if !defined(AFS_USE_GETTIMEOFDAY)
/*use this package only if gettimeofday is much much costlier than getitime */
*/
#include <afsconfig.h>
-#ifdef KERNEL
#include "afs/param.h"
-#else
-#include <afs/param.h>
-#endif
#ifdef AFS_SUN59_ENV
-#include <sys/time_impl.h>
+# include <sys/time_impl.h>
#endif
-
#ifdef KERNEL
-#ifndef UKERNEL
-#include "afs/afs_osi.h"
-#else /* !UKERNEL */
-#include "afs/sysincludes.h"
-#include "afsincludes.h"
-#endif /* !UKERNEL */
-#include "rx/rx_clock.h"
-#include "rx/rx_queue.h"
-#include "rx/rx_event.h"
-#include "rx/rx_kernel.h"
-#include "rx_kmutex.h"
-#ifdef RX_ENABLE_LOCKS
-#include "rx/rx.h"
-#endif /* RX_ENABLE_LOCKS */
-#include "rx/rx_globals.h"
-#if defined(AFS_SGI_ENV)
-#include "sys/debug.h"
+# ifndef UKERNEL
+# include "afs/afs_osi.h"
+# else /* !UKERNEL */
+# include "afs/sysincludes.h"
+# include "afsincludes.h"
+# endif /* !UKERNEL */
+# include "rx_kernel.h"
+# include "rx_kmutex.h"
+# if defined(AFS_SGI_ENV)
+# include "sys/debug.h"
/* These are necessary to get curproc (used by GLOCK asserts) to work. */
-#include "h/proc.h"
-#if !defined(AFS_SGI64_ENV) && !defined(UKERNEL)
-#include "h/user.h"
-#endif
+# include "h/proc.h"
+# if !defined(AFS_SGI64_ENV) && !defined(UKERNEL)
+# include "h/user.h"
+# endif
extern void *osi_Alloc();
-#endif
-#if defined(AFS_OBSD_ENV)
-#include "h/proc.h"
-#endif
+# endif
+# if defined(AFS_OBSD_ENV)
+# include "h/proc.h"
+# endif
#else /* KERNEL */
-#include <stdio.h>
+# include <stdio.h>
+# include "rx_user.h"
+# ifdef AFS_PTHREAD_ENV
+# include "rx_pthread.h"
+# else
+# include "rx_lwp.h"
+# endif
+# ifdef AFS_NT40_ENV
+# include <malloc.h>
+# endif
+#endif /* KERNEL */
+
+#include "rx.h"
#include "rx_clock.h"
#include "rx_queue.h"
#include "rx_event.h"
-#include "rx_user.h"
-#ifdef AFS_PTHREAD_ENV
-#include <rx/rx_pthread.h>
-#else
-#include "rx_lwp.h"
-#endif
-#ifdef RX_ENABLE_LOCKS
-#include "rx.h"
-#endif /* RX_ENABLE_LOCKS */
#include "rx_globals.h"
-#ifdef AFS_NT40_ENV
-#include <malloc.h>
-#endif
-#endif /* KERNEL */
-
/* All event processing is relative to the apparent current time given by clock_GetTime */
#ifndef KERNEL
-#ifndef AFS_NT40_ENV
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-#include <net/if.h>
-#include <netinet/in.h>
-#include <sys/ioctl.h>
-#include <string.h>
-#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
-#include <sys/sysctl.h>
-#ifndef AFS_ARM_DARWIN_ENV
-#include <net/route.h>
-#endif
-#include <net/if_dl.h>
-#endif
+# ifndef AFS_NT40_ENV
+# include <sys/types.h>
+# include <sys/socket.h>
+# include <sys/time.h>
+# include <net/if.h>
+# include <netinet/in.h>
+# include <sys/ioctl.h>
+# include <string.h>
+# if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
+# include <sys/sysctl.h>
+# ifndef AFS_ARM_DARWIN_ENV
+# include <net/route.h>
+# endif
+# include <net/if_dl.h>
+# endif
/*
* By including this, we get any system dependencies. In particular,
* the pthreads for solaris requires the socket call to be mapped.
*/
-#include "rx.h"
-#include "rx_globals.h"
-#endif /* AFS_NT40_ENV */
+# include "rx.h"
+# include "rx_globals.h"
+# endif /* AFS_NT40_ENV */
#else /* KERNEL */
-#ifdef UKERNEL
-#include "rx/rx_kcommon.h"
-#else /* UKERNEL */
-#include "rx/rx.h"
-#endif /* UKERNEL */
+# ifdef UKERNEL
+# include "rx/rx_kcommon.h"
+# else /* UKERNEL */
+# include "rx/rx.h"
+# endif /* UKERNEL */
#endif /* KERNEL */
#define NIFS 512
#if defined(AFS_USR_DFBSD_ENV)
-#include <net/if.h>
-#include <sys/sockio.h>
+# include <net/if.h>
+# include <sys/sockio.h>
#endif
#ifdef KERNEL
#endif
#include <afsconfig.h>
-#ifdef KERNEL
#include "afs/param.h"
-#else
-#include <afs/param.h>
-#endif
/* Enable data initialization when the header file is included */
#include <afs/param.h>
-# include <sys/types.h> /* fd_set on older platforms */
-# include <errno.h>
-# include <signal.h>
+#include <sys/types.h> /* fd_set on older platforms */
+#include <errno.h>
+#include <signal.h>
#ifdef AFS_NT40_ENV
# include <winsock2.h>
#else
# include <sys/ioctl.h>
# include <sys/time.h>
#endif
-# include "rx.h"
-# include "rx_atomic.h"
-# include "rx_globals.h"
-# include "rx_stats.h"
-# include <lwp.h>
+
+#include "rx.h"
+#include "rx_atomic.h"
+#include "rx_globals.h"
+#include "rx_stats.h"
+#include <lwp.h>
#define MAXTHREADNAMELENGTH 64
#ifdef KERNEL
-#include <afs/sysincludes.h>
-#include <afsincludes.h>
+# include <afs/sysincludes.h>
+# include <afsincludes.h>
#else
-#ifdef AFS_NT40_ENV
-#include <winsock2.h>
-#include <malloc.h>
-#else
-#include <sys/param.h>
-#endif
-#include <errno.h>
-#include <afs/errors.h>
-#include "xdr.h"
-#ifdef AFS_PTHREAD_ENV
-#include "rx.h"
-#endif /* AFS_PTHREAD_ENV */
-#include <stdlib.h>
-#include <string.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef AFS_NT40_ENV
-#ifndef EDQUOT
-#define EDQUOT WSAEDQUOT
-#endif /* EDQUOT */
-#endif /* AFS_NT40_ENV */
+# ifdef AFS_NT40_ENV
+# include <winsock2.h>
+# include <malloc.h>
+# else
+# include <sys/param.h>
+# endif
+# include <errno.h>
+# include <afs/errors.h>
+# include "xdr.h"
+# ifdef AFS_PTHREAD_ENV
+# include "rx.h"
+# endif /* AFS_PTHREAD_ENV */
+# include <stdlib.h>
+# include <string.h>
+# ifdef HAVE_UNISTD_H
+# include <unistd.h>
+# endif
+# ifdef AFS_NT40_ENV
+# ifndef EDQUOT
+# define EDQUOT WSAEDQUOT
+# endif /* EDQUOT */
+# endif /* AFS_NT40_ENV */
#endif
/*
#ifdef KERNEL
#include "afs/sysincludes.h"
-#include "rx/rx.h"
-#else /* KERNEL */
-# include "rx.h"
-#endif /* KERNEL */
+#endif
+
+#include "rx.h"
/*
* multi.c and multi.h, together with some rxgen hooks, provide a way of
*/
#include <afsconfig.h>
-#ifdef KERNEL
#include "afs/param.h"
-#else
-#include <afs/param.h>
-#endif
-
#ifdef KERNEL
-#ifndef UKERNEL
-#include "h/types.h"
-#else /* !UKERNEL */
-#include "afs/sysincludes.h"
-#endif /* !UKERNEL */
-#include "rx/rx.h"
-#else /* KERNEL */
-#include "rx.h"
+# ifndef UKERNEL
+# include "h/types.h"
+# else /* !UKERNEL */
+# include "afs/sysincludes.h"
+# endif /* !UKERNEL */
#endif /* KERNEL */
+#include "rx.h"
+
/* The null security object. No authentication, no nothing. */
static struct rx_securityOps null_ops;
*/
#include <afsconfig.h>
-#ifdef KERNEL
-#include "afs/param.h"
-#else
#include <afs/param.h>
-#endif
#ifdef KERNEL
-#if defined(UKERNEL)
-#include "afs/sysincludes.h"
-#include "afsincludes.h"
-#include "rx/rx_kcommon.h"
-#include "rx/rx_clock.h"
-#include "rx/rx_queue.h"
-#include "rx/rx_packet.h"
-#include "rx/rx_atomic.h"
-#include "rx/rx_internal.h"
-#include "rx/rx_stats.h"
-#else /* defined(UKERNEL) */
-#ifdef RX_KERNEL_TRACE
-#include "../rx/rx_kcommon.h"
-#endif
-#include "h/types.h"
-#ifndef AFS_LINUX20_ENV
-#include "h/systm.h"
-#endif
-#if defined(AFS_SGI_ENV) || defined(AFS_HPUX110_ENV) || defined(AFS_NBSD50_ENV)
-#include "afs/sysincludes.h"
-#endif
-#if defined(AFS_OBSD_ENV)
-#include "h/proc.h"
-#endif
-#include "h/socket.h"
-#if !defined(AFS_SUN5_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_HPUX110_ENV)
-#if !defined(AFS_OSF_ENV) && !defined(AFS_AIX41_ENV)
-#include "sys/mount.h" /* it gets pulled in by something later anyway */
-#endif
-#include "h/mbuf.h"
-#endif
-#include "netinet/in.h"
-#include "afs/afs_osi.h"
-#include "rx_kmutex.h"
-#include "rx/rx_clock.h"
-#include "rx/rx_queue.h"
-#include "rx_atomic.h"
-#ifdef AFS_SUN5_ENV
-#include <sys/sysmacros.h>
-#endif
-#include "rx/rx_packet.h"
-#include "rx_internal.h"
-#include "rx_stats.h"
-#endif /* defined(UKERNEL) */
-#include "rx/rx_globals.h"
+# if defined(UKERNEL)
+# include "afs/sysincludes.h"
+# include "afsincludes.h"
+# include "rx_kcommon.h"
+# else /* defined(UKERNEL) */
+# ifdef RX_KERNEL_TRACE
+# include "rx_kcommon.h"
+# endif
+# include "h/types.h"
+# ifndef AFS_LINUX20_ENV
+# include "h/systm.h"
+# endif
+# if defined(AFS_SGI_ENV) || defined(AFS_HPUX110_ENV) || defined(AFS_NBSD50_ENV)
+# include "afs/sysincludes.h"
+# endif
+# if defined(AFS_OBSD_ENV)
+# include "h/proc.h"
+# endif
+# include "h/socket.h"
+# if !defined(AFS_SUN5_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_HPUX110_ENV)
+# if !defined(AFS_OSF_ENV) && !defined(AFS_AIX41_ENV)
+# include "sys/mount.h" /* it gets pulled in by something later anyway */
+# endif
+# include "h/mbuf.h"
+# endif
+# include "netinet/in.h"
+# include "afs/afs_osi.h"
+# include "rx_kmutex.h"
+# endif /* defined(UKERNEL) */
#else /* KERNEL */
-#include "sys/types.h"
-#include <sys/stat.h>
-#include <errno.h>
-#if defined(AFS_NT40_ENV)
-#include <winsock2.h>
-#ifndef EWOULDBLOCK
-#define EWOULDBLOCK WSAEWOULDBLOCK
-#endif
-#include "rx_user.h"
-#include "rx_xmit_nt.h"
-#include <stdlib.h>
-#else
-#include <sys/socket.h>
-#include <netinet/in.h>
+# include <sys/types.h>
+# include <sys/stat.h>
+# include <errno.h>
+# include <stdlib.h>
+# include <assert.h>
+# include <string.h>
+# ifdef HAVE_UNISTD_H
+# include <unistd.h>
+# endif
+# if defined(AFS_NT40_ENV)
+# include <winsock2.h>
+# ifndef EWOULDBLOCK
+# define EWOULDBLOCK WSAEWOULDBLOCK
+# endif
+# include "rx_user.h"
+# include "rx_xmit_nt.h"
+# else
+# include <sys/socket.h>
+# include <netinet/in.h>
+# endif
+# include <lwp.h>
+#endif /* KERNEL */
+
+#ifdef AFS_SUN5_ENV
+# include <sys/sysmacros.h>
#endif
-#include "rx_clock.h"
+
#include "rx.h"
+#include "rx_clock.h"
#include "rx_queue.h"
-#ifdef AFS_SUN5_ENV
-#include <sys/sysmacros.h>
-#endif
#include "rx_packet.h"
#include "rx_atomic.h"
#include "rx_globals.h"
#include "rx_internal.h"
#include "rx_stats.h"
-#include <lwp.h>
-#include <string.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#endif /* KERNEL */
#ifdef RX_LOCKS_DB
/* rxdb_fileID is used to identify the lock location, along with line#. */
# include <assert.h>
#endif
#include <sys/stat.h>
-#include <rx/rx.h>
-#include <rx/rx_globals.h>
-#include <rx/rx_pthread.h>
-#include <rx/rx_clock.h>
+
+#include "rx.h"
+#include "rx_globals.h"
+#include "rx_pthread.h"
+#include "rx_clock.h"
#include "rx_atomic.h"
/* Set rx_pthread_event_rescheduled if event_handler should just try
*/
#include <afsconfig.h>
-#ifdef KERNEL
-#include "afs/param.h"
-#else
#include <afs/param.h>
-#endif
-
#ifdef KERNEL
-#ifndef UKERNEL
-#ifdef RX_KERNEL_TRACE
-#include "rx_kcommon.h"
-#endif
-#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
-#include "afs/sysincludes.h"
-#else
-#include "h/types.h"
-#include "h/time.h"
-#include "h/stat.h"
-#if defined(AFS_AIX_ENV) || defined(AFS_AUX_ENV) || defined(AFS_SUN5_ENV)
-#include "h/systm.h"
-#endif
-#ifdef AFS_OSF_ENV
-#include <net/net_globals.h>
-#endif /* AFS_OSF_ENV */
-#ifdef AFS_LINUX20_ENV
-#include "h/socket.h"
-#endif
-#include "netinet/in.h"
-#if defined(AFS_SGI_ENV)
-#include "afs/sysincludes.h"
-#endif
-#endif
-#include "afs/afs_args.h"
-#include "afs/afs_osi.h"
-#if (defined(AFS_AUX_ENV) || defined(AFS_AIX_ENV))
-#include "h/systm.h"
-#endif
-#else /* !UKERNEL */
-#include "afs/sysincludes.h"
-#endif /* !UKERNEL */
-#ifdef RXDEBUG
-#undef RXDEBUG /* turn off debugging */
-#endif /* RXDEBUG */
-
-#include "rx_kmutex.h"
-#include "rx/rx_kernel.h"
-#include "rx/rx_clock.h"
-#include "rx/rx_queue.h"
-#include "rx/rx.h"
-#include "rx/rx_globals.h"
-#include "afs/lock.h"
-#include "afsint.h"
-#ifdef AFS_OSF_ENV
-#undef kmem_alloc
-#undef kmem_free
-#undef mem_alloc
-#undef mem_free
-#endif /* AFS_OSF_ENV */
+# ifndef UKERNEL
+# ifdef RX_KERNEL_TRACE
+# include "rx_kcommon.h"
+# endif
+# if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
+# include "afs/sysincludes.h"
+# else
+# include "h/types.h"
+# include "h/time.h"
+# include "h/stat.h"
+# if defined(AFS_AIX_ENV) || defined(AFS_AUX_ENV) || defined(AFS_SUN5_ENV)
+# include "h/systm.h"
+# endif
+# ifdef AFS_OSF_ENV
+# include <net/net_globals.h>
+# endif /* AFS_OSF_ENV */
+# ifdef AFS_LINUX20_ENV
+# include "h/socket.h"
+# endif
+# include "netinet/in.h"
+# if defined(AFS_SGI_ENV)
+# include "afs/sysincludes.h"
+# endif
+# endif
+# include "afs/afs_args.h"
+# if (defined(AFS_AUX_ENV) || defined(AFS_AIX_ENV))
+# include "h/systm.h"
+# endif
+# else /* !UKERNEL */
+# include "afs/sysincludes.h"
+# endif /* !UKERNEL */
+
+# ifdef RXDEBUG
+# undef RXDEBUG /* turn off debugging */
+# endif /* RXDEBUG */
+
+# include "afs/afs_osi.h"
+# include "rx_kmutex.h"
+# include "rx/rx_kernel.h"
+# include "afs/lock.h"
#else /* KERNEL */
# include <sys/types.h>
-#ifdef AFS_NT40_ENV
-# include <winsock2.h>
-#else /* !AFS_NT40_ENV */
-# include <sys/socket.h>
-# include <sys/file.h>
-# include <netdb.h>
-# include <netinet/in.h>
-# include <sys/stat.h>
-# include <sys/time.h>
-#endif /* !AFS_NT40_ENV */
-#include <string.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-# include "rx_user.h"
-# include "rx_clock.h"
-# include "rx_queue.h"
-# include "rx.h"
-# include "rx_globals.h"
+# include <string.h>
+# ifdef AFS_NT40_ENV
+# include <winsock2.h>
+# else /* !AFS_NT40_ENV */
+# include <sys/socket.h>
+# include <sys/file.h>
+# include <netdb.h>
+# include <netinet/in.h>
+# include <sys/stat.h>
+# include <sys/time.h>
+# include <unistd.h>
+# endif /* !AFS_NT40_ENV */
#endif /* KERNEL */
+#include "rx.h"
+#include "rx_clock.h"
+#include "rx_queue.h"
+#include "rx_globals.h"
+
#ifdef RX_LOCKS_DB
/* rxdb_fileID is used to identify the lock location, along with line#. */
static int rxdb_fileID = RXDB_FILE_RX_RDWR;
#include <sys/file.h>
#include <unistd.h>
#endif
+
#include "rx.h"
#include "rx_atomic.h"
#include "rx_globals.h"
#include <afs/param.h>
-# include <sys/types.h>
-# include <errno.h>
-# include <signal.h>
-# include <string.h>
+#include <sys/types.h>
+#include <errno.h>
+#include <signal.h>
+#include <string.h>
#ifdef AFS_NT40_ENV
# include <WINNT/syscfg.h>
#else
# include <sys/ioctl.h>
# include <unistd.h>
#endif
-# include <fcntl.h>
+#include <fcntl.h>
#if !defined(AFS_AIX_ENV) && !defined(AFS_NT40_ENV)
# include <sys/syscall.h>
#endif
#ifndef AFS_NT40_ENV
# include <sys/time.h>
#endif
+
#include "rx.h"
#include "rx_atomic.h"
#include "rx_globals.h"
#include <afsconfig.h>
#include <afs/param.h>
-
#if defined(AFS_NT40_ENV)
#include <winsock2.h>
*/
#include <afsconfig.h>
-#ifdef KERNEL
-#include "afs/param.h"
-#else
#include <afs/param.h>
+
+#ifndef KERNEL
#include <string.h>
#endif
*/
#include <afsconfig.h>
-#ifdef KERNEL
-#include "afs/param.h"
-#else
#include <afs/param.h>
-#endif
#ifdef KERNEL
# ifndef UKERNEL
# include "h/types.h"
# include "h/uio.h"
-# ifdef AFS_OSF_ENV
-# include <net/net_globals.h>
-# endif /* AFS_OSF_ENV */
# ifdef AFS_LINUX20_ENV
# include "h/socket.h"
# else
# include "rpc/types.h"
# endif
-# ifdef AFS_OSF_ENV
-# undef kmem_alloc
-# undef kmem_free
-# undef mem_alloc
-# undef mem_free
-# endif /* AFS_OSF_ENV */
# ifdef AFS_LINUX22_ENV
# ifndef quad_t
# define quad_t __quad_t
# define u_quad_t __u_quad_t
# endif
# endif
-# include "rx/xdr.h"
# include "netinet/in.h"
# endif /* !UKERNEL */
-# include "rx/xdr.h"
-# include "rx/rx.h"
-
#else /* KERNEL */
# include <sys/types.h>
# include <stdio.h>
# ifndef AFS_NT40_ENV
# include <netinet/in.h>
# endif
-# include "rx.h"
-# include "xdr.h"
#endif /* KERNEL */
+#include "rx.h"
+#include "xdr.h"
+
/* Static prototypes */
#ifdef AFS_XDR_64BITOPS
static bool_t xdrrx_getint64(XDR *axdrs, long *lp);