int code;
if (afs_InitSetup_done)
- return;
+ return EAGAIN;
#ifndef AFS_NOSTATS
/*
/* leaving as is, probably will barf if we add prototypes here since it's likely being called
with partial list */
+int
afs_syscall_call(parm, parm2, parm3, parm4, parm5, parm6)
long parm, parm2, parm3, parm4, parm5, parm6;
{
} else if (parm == AFSOP_ADDCELL2) {
struct afsop_cell tcell;
char *tbuffer = osi_AllocSmallSpace(AFS_SMALLOCSIZ), *lcnamep = 0;
- char *tbuffer1 = osi_AllocSmallSpace(AFS_SMALLOCSIZ), *cnamep = 0;
+ char *tbuffer1 = osi_AllocSmallSpace(AFS_SMALLOCSIZ);
int cflags = parm4;
/* wait for basic init */
#endif /* AFS_SGI62_ENV && !AFS_SGI65_ENV */
#endif /* AFS_SGI53_ENV */
else if (parm == AFSOP_SHUTDOWN) {
-#if defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
- extern struct mount *afs_globalVFS;
-#else /* AFS_OSF_ENV */
- extern struct vfs *afs_globalVFS;
-#endif
afs_cold_shutdown = 0;
if (parm == 1) afs_cold_shutdown = 1;
if (afs_globalVFS != 0) {
long parm6;
} *uap = (struct a *)u.u_ap;
#else /* UKERNEL */
+int
#if defined(AFS_SUN_ENV) && !defined(AFS_SUN5_ENV)
afs_syscall ()
#else
code = EINVAL;
#endif
}
-out:
+
#ifdef AFS_LINUX20_ENV
code = -code;
unlock_kernel();
static int
Afscall_icl(long opcode, long p1, long p2, long p3, long p4, long *retval)
{
- register int i;
afs_int32 *lp, elts, flags;
register afs_int32 code;
struct afs_icl_log *logp;
int afs_icl_Event4(register struct afs_icl_set *setp, afs_int32 eventID,
afs_int32 lAndT, long p1, long p2, long p3, long p4)
{
- register struct afs_icl_log *logp;
afs_int32 mask;
register int i;
register afs_int32 tmask;
int ix;
/* If things aren't init'ed yet (or the set is inactive), don't panic */
- if (!ICL_SETACTIVE(setp)) return;
+ if (!ICL_SETACTIVE(setp))
+ return 0;
AFS_ASSERT_GLOCK();
mask = lAndT>>24 & 0xff; /* mask of which logs to log to */
}
}
ReleaseReadLock(&setp->lock);
+ return 0;
}
/* Next 4 routines should be implemented via var-args or something.
*
* Log must be write-locked.
*/
-static afs_icl_GetLogSpace(register struct afs_icl_log *logp, afs_int32 minSpace)
+static void afs_icl_GetLogSpace(register struct afs_icl_log *logp, afs_int32 minSpace)
{
register unsigned int tsize;
* log must be write-locked.
*/
#define ICL_CHARSPERLONG 4
-static afs_int32 afs_icl_AppendString(struct afs_icl_log *logp, char *astr)
+static void afs_icl_AppendString(struct afs_icl_log *logp, char *astr)
{
char *op; /* ptr to char to write */
int tc;
* pretty soon, anyway. The log must be unlocked.
*/
-int afs_icl_AppendRecord(register struct afs_icl_log *logp, afs_int32 op,
+void afs_icl_AppendRecord(register struct afs_icl_log *logp, afs_int32 op,
afs_int32 types, long p1, long p2, long p3, long p4)
{
int rsize; /* record size in longs */
{
afs_int32 nwords; /* number of words to copy out */
afs_uint32 startCookie; /* first cookie to use */
- register afs_int32 i;
afs_int32 outWords; /* words we've copied out */
afs_int32 inWords; /* max words to copy out */
afs_int32 code; /* return code */
{
register int i;
int code = -1;
- struct afs_icl_log *logp;
ObtainWriteLock(&setp->lock,207);
for(i = 0; i < ICL_LOGSPERSET; i++) {
afs_int32 lAndT, long p1);
extern int afs_icl_Event0(register struct afs_icl_set *setp, afs_int32 eventID,
afs_int32 lAndT);
-extern int afs_icl_AppendRecord(register struct afs_icl_log *logp, afs_int32 op,
+extern void afs_icl_AppendRecord(register struct afs_icl_log *logp, afs_int32 op,
afs_int32 types, long p1, long p2, long p3, long p4);
extern int afs_CheckInit(void);
afs_int32 aflags, afs_int32 ninodes, afs_int32 nusers);
extern void afs_ComputeCacheParms(void);
extern int afs_InitCacheInfo(register char *afile);
+extern int afs_InitVolumeInfo(char *afile);
+extern int afs_InitCellInfo(char *afile);
extern int afs_ResourceInit(int preallocs);
extern void shutdown_cache(void);
extern void shutdown_vnodeops(void);
#include <ufs/ufs/inode.h>
#include <ufs/ufs/extattr.h>
#include <ufs/ufs/ufsmount.h>
+#ifndef MLEN
#include <sys/mbuf.h>
+#include <net/if.h>
+#endif
#include <sys/protosw.h>
#include <sys/ioctl.h>
#include <sys/timeout.h>
}
/* build a fake ticket for 'afs' using keys from adir, returning an
- * appropriate security class and index
+ * appropriate security class and index.
+ * astr is really a struct rx_securityClass.
*/
-afs_int32 afsconf_ClientAuth(struct afsconf_dir *adir,
- struct rx_securityClass **astr, afs_int32 *aindex)
+afs_int32 afsconf_ClientAuth(struct afsconf_dir *adir, void *astr, afs_int32 *aindex)
{
afs_int32 rc;
extern int afsconf_DeleteKey(struct afsconf_dir *adir, afs_int32 akvno);
-extern afs_int32 afsconf_ClientAuth(struct afsconf_dir *adir,
- struct rx_securityClass **astr, afs_int32 *aindex);
+extern afs_int32 afsconf_ClientAuth(struct afsconf_dir *adir, void *astr, afs_int32 *aindex);
*/
int afs_tf_init(), afs_tf_get_pname(), afs_tf_get_pinst(), afs_tf_get_cred();
int afs_tf_save_cred(), afs_tf_close(), afs_tf_create();
-int afs_tf_dest_tkt(), ktc_LocalCell();
+int afs_tf_dest_tkt();
+static void ktc_LocalCell();
char *ktc_tkt_string();
#endif /* AFS_KERBEROS_ENV */
* BLETCH! We have to invoke the entire afsconf package just to
* find out what the local cell is.
*/
-static ktc_LocalCell()
+static void ktc_LocalCell()
{
int code;
struct afsconf_dir *conf;
#/* Copyright (C) 1995, 1989 Transarc Corporation - All rights reserved */
#
+# OpenBSD version by Jim Rees
+
srcdir=@srcdir@
include @TOP_OBJDIR@/src/config/Makefile.config
+# System specific build commands and flags
+KSRC = /usr/src/sys
+KDEFS=-Wall -nostdinc -I/usr/include \
+ -DLKM -DDIAGNOSTIC -DFIFO -DNFSCLIENT -DMFS -DFFS -D_KERNEL -DI386_CPU -DI486_CPU -DI586_CPU \
+ -I${KSRC}/sys
+DBUG = -O2
+DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT
+OPTF= ${OPT}
+OPTF2= ${OPT2}
+CFLAGS= ${FSINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG}
+
+# Name of directory to hold object files and libraries.
+KOBJ = COMMON
+
# OS specific object files:
AFS_OS_OBJS = \
osi_groups.o \
osi_file.o \
- osi_inode.o \
osi_misc.o \
osi_sleep.o \
osi_vm.o \
- osi_vnodeops.o \
- osi_module.o
+ osi_vnodeops.o
AFS_OS_NFSOBJS = \
osi_vfsops_nfs.o
AFS_OS_NONFSOBJS = \
osi_vfsops.o
-
-# System specific build commands and flags
-KDEFS=-Wall -nostdinc -I/usr/include \
- -DLKM -DDIAGNOSTIC -DFIFO -DNFSCLIENT -DMFS -DFFS -D_KERNEL -DI386_CPU -DI486_CPU -DI586_CPU \
- -I/usr/src/sys/sys -I../afs
-DBUG = -O2
-DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT
-OPTF=${OPT}
-OPTF2=${OPT2}
-CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG}
-
-
-# Name of directory to hold object files and libraries.
-KOBJ = COMMON
-
# This tells Makefile.common to use its single directory build target.
COMPDIRS = single_compdir
INSTDIRS = single_instdir
DESTDIRS = single_destdir
+TOP_SRCDIR = ../..
+
include Makefile.common
+COMMON_INCLUDE = \
+ -I.. \
+ -I../nfs \
+ -I${TOP_SRCDIR} \
+ -I${TOP_SRCDIR}/afs \
+ -I${TOP_SRCDIR}/afs/${MKAFS_OSTYPE} \
+ -I${TOP_SRCDIR}/config \
+ -I${TOP_SRCDIR}/rx \
+ -I${TOP_SRCDIR}/rx/${MKAFS_OSTYPE} \
+ -I${TOP_SRCDIR}/rxkad \
+ -I${TOP_SRCDIR}/domestic \
+ -I${TOP_SRCDIR}/util \
+ -I${TOP_SRCDIR}/../include \
+ -I${TOP_SRCDIR}/../include/afs
+
setup:
-mkdir $(KOBJ)
- -$(RM) $(KOBJ)/Makefile $(KOBJ)/Makefile.common $(KOBJ)/config
+ -$(RM) -f $(KOBJ)/Makefile $(KOBJ)/Makefile.common $(KOBJ)/config
ln -fs ../Makefile $(KOBJ)/Makefile
ln -fs ../Makefile.common $(KOBJ)/Makefile.common
ln -fs ../config $(KOBJ)/config
- -$(RM) -f h net netinet rpc ufs nfs machine sys
- -ln -fs /usr/src/sys/net net
- -ln -fs /usr/src/sys/arch/i386/include machine
- -ln -fs /usr/src/sys/netinet netinet
- -ln -fs /usr/src/sys/nfs nfs
- -ln -fs /usr/include/rpc rpc
- -ln -fs /usr/src/sys/sys sys
- -ln -fs /usr/src/sys/ufs/ufs ufs
- -ln -fs /usr/src/sys/sys h
+ -$(RM) -f h
+ -ln -fs ${KSRC}/sys h
-touch $(KOBJ)/sec_net.h
DEST_LIBAFSNONFS = ${DEST}/root.client/bin/${LIBAFSNONFS}
-libafs: $(LIBAFS) $(LIBAFSNONFS)
-# libafs: $(LIBAFSNONFS)
-install_libafs: $(INST_LIBAFS) $(INST_LIBAFSNONFS)
-# install_libafs: $(INST_LIBAFSNONFS)
-dest_libafs: $(DEST_LIBAFS) $(DEST_LIBAFSNONFS)
-# dest_libafs: $(DEST_LIBAFSNONFS)
+# libafs: $(LIBAFS) $(LIBAFSNONFS)
+libafs: $(LIBAFSNONFS)
+# install_libafs: $(INST_LIBAFS) $(INST_LIBAFSNONFS)
+install_libafs: $(INST_LIBAFSNONFS)
+# dest_libafs: $(DEST_LIBAFS) $(DEST_LIBAFSNONFS)
+dest_libafs: $(DEST_LIBAFSNONFS)
$(INST_LIBAFS): $(LIBAFS)
$(INSTALL) -f $? $@
void rx_StartServer(int donateMe)
{
register struct rx_service *service;
- register int i, nProcs=0;
+ register int i;
SPLVAR;
clock_NewTime();
*/
void rxi_CleanupConnection(struct rx_connection *conn)
{
- int i;
-
/* Notify the service exporter, if requested, that this connection
* is being destroyed */
if (conn->type == RX_SERVER_CONNECTION && conn->service->destroyConnProc)
#ifndef KERNEL
if (conn->specific) {
+ int i;
for (i = 0 ; i < conn->nSpecific ; i++) {
if (conn->specific[i] && rxi_keyCreate_destructor[i])
(*rxi_keyCreate_destructor[i])(conn->specific[i]);
#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 "netinet/in.h"
#include "sys/socket.h"
#else /* KERNEL */
#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
TAILQ_FOREACH(ifn, &ifnet, if_link) {
- if (i >= ADDRSPERSITE) break;
-#else
-#if defined(AFS_OBSD_ENV)
+ if (i >= ADDRSPERSITE) break;
+#elif defined(AFS_OBSD_ENV)
for (ifn = ifnet.tqh_first; i < ADDRSPERSITE && ifn != NULL; ifn = ifn->if_list.tqe_next) {
#else
for (ifn = ifnet; ifn != NULL && i < ADDRSPERSITE; ifn = ifn->if_next) {
#endif
-#endif
- rxmtu = (ifn->if_mtu - RX_IPUDP_SIZE);
-#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
- TAILQ_FOREACH(ifad, &ifn->if_addrhead, ifa_link) {
- if (i >= ADDRSPERSITE) break;
+ rxmtu = (ifn->if_mtu - RX_IPUDP_SIZE);
+#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+ TAILQ_FOREACH(ifad, &ifn->if_addrhead, ifa_link) {
+ if (i >= ADDRSPERSITE) break;
+#elif defined(AFS_OBSD_ENV)
+ for (ifad = ifn->if_addrlist.tqh_first; ifad != NULL && i < ADDRSPERSITE;
+ ifad = ifad->ifa_list.tqe_next) {
#else
- for (ifad = ifn->if_addrlist; ifad != NULL && i < ADDRSPERSITE;
- ifad = ifad->ifa_next){
+ for (ifad = ifn->if_addrlist; ifad != NULL && i < ADDRSPERSITE;
+ ifad = ifad->ifa_next) {
#endif
- if (IFADDR2SA(ifad)->sa_family == AF_INET) {
- ifinaddr = ntohl(((struct sockaddr_in *) IFADDR2SA(ifad))->sin_addr.s_addr);
- if (myNetAddrs[i] != ifinaddr) {
- different++;
- }
- mtus[i] = rxmtu;
- rxmtu = rxi_AdjustIfMTU(rxmtu);
- maxmtu = rxmtu * rxi_nRecvFrags + ((rxi_nRecvFrags-1) * UDP_HDR_SIZE);
- maxmtu = rxi_AdjustMaxMTU(rxmtu, maxmtu);
- addrs[i++] = ifinaddr;
- if ( ( ifinaddr != 0x7f000001 ) &&
- (maxmtu > rx_maxReceiveSize) ) {
- rx_maxReceiveSize = MIN( RX_MAX_PACKET_SIZE, maxmtu);
- rx_maxReceiveSize = MIN( rx_maxReceiveSize, rx_maxReceiveSizeUser);
- }
+ if (IFADDR2SA(ifad)->sa_family == AF_INET) {
+ ifinaddr = ntohl(((struct sockaddr_in *) IFADDR2SA(ifad))->sin_addr.s_addr);
+ if (myNetAddrs[i] != ifinaddr) {
+ different++;
+ }
+ mtus[i] = rxmtu;
+ rxmtu = rxi_AdjustIfMTU(rxmtu);
+ maxmtu = rxmtu * rxi_nRecvFrags + ((rxi_nRecvFrags-1) * UDP_HDR_SIZE);
+ maxmtu = rxi_AdjustMaxMTU(rxmtu, maxmtu);
+ addrs[i++] = ifinaddr;
+ if ( ( ifinaddr != 0x7f000001 ) &&
+ (maxmtu > rx_maxReceiveSize) ) {
+ rx_maxReceiveSize = MIN( RX_MAX_PACKET_SIZE, maxmtu);
+ rx_maxReceiveSize = MIN( rx_maxReceiveSize, rx_maxReceiveSizeUser);
+ }
+ }
}
- }
}
rx_maxJumboRecvSize = RX_HEADER_SIZE
rx_maxJumboRecvSize = MAX(rx_maxJumboRecvSize, rx_maxReceiveSize);
if (different) {
- int j;
- for (j=0; j< i; j++) {
- myNetMTUs[j] = mtus[j];
- myNetAddrs[j] = addrs[j];
- }
+ int j;
+ for (j=0; j< i; j++) {
+ myNetMTUs[j] = mtus[j];
+ myNetAddrs[j] = addrs[j];
+ }
}
- return different;
+ return different;
}
#ifdef AFS_DARWIN60_ENV
/* Returns ifnet which best matches address */
/* Returns ifnet which best matches address */
struct ifnet *rxi_FindIfnet(afs_uint32 addr, struct in_ifaddr **pifad)
{
- afs_uint32 ppaddr;
- int match_value = 0;
- extern struct in_ifaddr *in_ifaddr;
- struct in_ifaddr *ifa;
- struct sockaddr_in *sin;
+ afs_uint32 ppaddr;
+ int match_value = 0;
+#ifndef AFS_OBSD_ENV
+ extern struct in_ifaddr *in_ifaddr;
+#endif
+ struct in_ifaddr *ifa;
+ struct sockaddr_in *sin;
- if (numMyNetAddrs == 0)
- (void) rxi_GetIFInfo();
+ if (numMyNetAddrs == 0)
+ (void) rxi_GetIFInfo();
- ppaddr = ntohl(addr);
+#ifdef AFS_OBSD_ENV
+ ppaddr = addr;
+#else
+ ppaddr = ntohl(addr);
+#endif
- /* if we're given an address, skip everything until we find it */
- if (!*pifad)
-#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
- *pifad = TAILQ_FIRST(&in_ifaddrhead);
-#else
- *pifad = in_ifaddr;
+ /* if we're given an address, skip everything until we find it */
+ if (!*pifad)
+#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+ *pifad = TAILQ_FIRST(&in_ifaddrhead);
+#elif defined(AFS_OBSD_ENV)
+ *pifad = in_ifaddr.tqh_first;
+#else
+ *pifad = in_ifaddr;
#endif
- else {
- if (((ppaddr & (*pifad)->ia_subnetmask) == (*pifad)->ia_subnet))
- match_value = 2; /* don't find matching nets, just subnets */
-#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
- *pifad = TAILQ_NEXT(*pifad, ia_link);
+ else {
+ if (((ppaddr & (*pifad)->ia_subnetmask) == (*pifad)->ia_subnet))
+ match_value = 2; /* don't find matching nets, just subnets */
+#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+ *pifad = TAILQ_NEXT(*pifad, ia_link);
+#elif defined(AFS_OBSD_ENV)
+ *pifad = (*pifad)->ia_list.tqe_next;
#else
- *pifad = (*pifad)->ia_next;
+ *pifad = (*pifad)->ia_next;
#endif
- }
+ }
-#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
- for (ifa = *pifad; ifa; ifa = TAILQ_NEXT(ifa, ia_link) ) {
-#else
- for (ifa = *pifad; ifa; ifa = ifa->ia_next ) {
+#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+ for (ifa = *pifad; ifa; ifa = TAILQ_NEXT(ifa, ia_link) ) {
+#elif defined(AFS_OBSD_ENV)
+ for (ifa = *pifad; ifa; ifa = ifa->ia_list.tqe_next) {
+#else
+ for (ifa = *pifad; ifa; ifa = ifa->ia_next ) {
#endif
- if ((ppaddr & ifa->ia_netmask) == ifa->ia_net) {
- if ((ppaddr & ifa->ia_subnetmask) == ifa->ia_subnet) {
- sin=IA_SIN(ifa);
- if ( sin->sin_addr.s_addr == ppaddr) { /* ie, ME!!! */
- match_value = 4;
- *pifad = ifa;
- goto done;
- }
- if (match_value < 3) {
- *pifad = ifa;
- match_value = 3;
- }
- }
- else {
- if (match_value < 2) {
- *pifad = ifa;
- match_value = 2;
- }
- }
- } /* if net matches */
- } /* for all in_ifaddrs */
+ if ((ppaddr & ifa->ia_netmask) == ifa->ia_net) {
+ if ((ppaddr & ifa->ia_subnetmask) == ifa->ia_subnet) {
+ sin=IA_SIN(ifa);
+ if ( sin->sin_addr.s_addr == ppaddr) { /* ie, ME!!! */
+ match_value = 4;
+ *pifad = ifa;
+ goto done;
+ }
+ if (match_value < 3) {
+ *pifad = ifa;
+ match_value = 3;
+ }
+ }
+ else {
+ if (match_value < 2) {
+ *pifad = ifa;
+ match_value = 2;
+ }
+ }
+ } /* if net matches */
+ } /* for all in_ifaddrs */
done:
- return (*pifad ? (*pifad)->ia_ifp : NULL );
+ return (*pifad ? (*pifad)->ia_ifp : NULL );
}
#endif
#endif /* else AFS_USERSPACE_IP_ADDR */
{
register afs_int32 code;
struct socket *newSocket;
- register struct mbuf *nam;
+ struct mbuf *nam;
struct sockaddr_in myaddr;
- int wow;
#ifdef AFS_HPUX110_ENV
/* prototype copied from kernel source file streams/str_proto.h */
extern MBLKP allocb_wait(int, int);
#else /* AFS_HPUX110_ENV */
code = socreate(AF_INET, &newSocket, SOCK_DGRAM, 0, SS_NOWAIT);
#endif /* else AFS_HPUX110_ENV */
-#else
-#ifdef AFS_SGI65_ENV
- code = socreate(AF_INET, &newSocket, SOCK_DGRAM,IPPROTO_UDP);
-#elif defined(AFS_XBSD_ENV)
- code = socreate(AF_INET, &newSocket, SOCK_DGRAM,IPPROTO_UDP, curproc);
+#elif defined(AFS_SGI65_ENV) || defined(AFS_OBSD_ENV)
+ code = socreate(AF_INET, &newSocket, SOCK_DGRAM, IPPROTO_UDP);
+#elif defined(AFS_FBSD_ENV)
+ code = socreate(AF_INET, &newSocket, SOCK_DGRAM, IPPROTO_UDP, curproc);
#else
code = socreate(AF_INET, &newSocket, SOCK_DGRAM, 0);
-#endif /* AFS_SGI65_ENV */
#endif /* AFS_HPUX102_ENV */
if (code) goto bad;
osi_Panic("osi_NewSocket: last attempt to reserve 32K failed!\n");
}
#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
-#if defined(AFS_XBSD_ENV)
- code = sobind(newSocket, (struct sockaddr *)&myaddr, curproc);
+#if defined(AFS_FBSD_ENV)
+ code = sobind(newSocket, (struct sockaddr *) &myaddr, curproc);
+#elif defined(AFS_OBSD_ENV)
+ code = sockargs(&nam, (caddr_t) &myaddr, sizeof(myaddr), MT_SONAME);
+ if (code == 0) {
+ code = sobind(newSocket, nam);
+ m_freem(nam);
+ }
#else
- code = sobind(newSocket, (struct sockaddr *)&myaddr);
+ code = sobind(newSocket, (struct sockaddr *) &myaddr);
#endif
if (code) {
printf("sobind fails\n");
#define OSI_NULLSOCKET ((osi_socket) 0)
#if (!defined(AFS_GLOBAL_SUNLOCK) && !defined(RX_ENABLE_LOCKS))
-#include "../afs/icl.h"
-#include "../afs/afs_trace.h"
+#include "afs/icl.h"
+#include "afs/afs_trace.h"
#endif
#define osi_rxSleep(a) afs_Trace2(afs_iclSetp, CM_TRACE_RXSLEEP, \
ICL_TYPE_STRING, __FILE__, ICL_TYPE_INT32, __LINE__); afs_osi_Sleep(a)
extern int osi_utoa(char *buf, size_t len, unsigned long val);
#define osi_Assert(e) (void)((e) || (osi_AssertFailK(#e, __FILE__, __LINE__), 0))
-#define osi_Msg printf)(
-
#define osi_YieldIfPossible()
#define osi_WakeupAndYieldIfPossible(x) rx_Wakeup(x)
struct iovec *dvec, int nvecs, int *lengthp);
extern void osi_StopListener(void);
extern int rxi_FindIfMTU(afs_uint32 addr);
+#ifndef RXK_LISTENER_ENV
+extern void rxk_init();
+#endif
/* UKERNEL/rx_knet.c */
#ifdef UKERNEL
f_print(fout, "#ifndef S_IFMT /* XXXXX */\n");
f_print(fout, "#include \"h/stat.h\"\n");
f_print(fout, "#endif\n");
+ f_print(fout, "#if defined (AFS_OBSD_ENV) && !defined (MLEN)\n");
+ f_print(fout, "#include \"sys/mbuf.h\"\n");
+ f_print(fout, "#endif\n");
f_print(fout, "#ifndef IPPROTO_UDP /* XXXXX */\n");
f_print(fout, "#include \"netinet/in.h\"\n");
f_print(fout, "#endif\n");
#ifndef UKERNEL
#include "afs/stds.h"
#include "h/types.h"
-#ifndef AFS_LINUX20_ENV
+#if !defined(AFS_LINUX20_ENV) && !defined(AFS_OBSD_ENV)
#include "netinet/in.h"
#endif
#else /* UKERNEL */