/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
extern void rx_SetEpoch(afs_uint32 epoch);
extern int rx_Init(u_int port);
extern int rx_InitHost(u_int host, u_int port);
+extern void rx_SetBusyChannelError(afs_int32 error);
#ifdef AFS_NT40_ENV
extern void rx_DebugOnOff(int on);
extern void rx_StatsOnOff(int on);
+extern void rx_StartClientThread(void);
#endif
#ifndef KERNEL
extern void rxi_StartServerProcs(int nExistingProcs);
int serviceSecurityIndex);
extern void rx_SetConnDeadTime(struct rx_connection *conn,
int seconds);
+extern void rx_SetConnHardDeadTime(struct rx_connection *conn, int seconds);
+extern void rx_SetConnIdleDeadTime(struct rx_connection *conn, int seconds);
extern void rxi_CleanupConnection(struct rx_connection *conn);
extern void rxi_DestroyConnection(struct rx_connection *conn);
extern void rx_GetConnection(struct rx_connection *conn);
afs_int32(*serviceProc) (struct
rx_call *
acall));
-extern struct rx_service *rx_NewServiceHost(afs_uint32 host, u_short port,
+extern struct rx_service *rx_NewServiceHost(afs_uint32 host, u_short port,
u_short serviceId,
char *serviceName,
struct rx_securityClass
int index),
void * handle, int arg);
extern afs_int32 rx_EndCall(struct rx_call *call, afs_int32 rc);
+extern void rx_InterruptCall(struct rx_call *call, afs_int32 error);
extern void rx_Finalize(void);
extern void rxi_PacketsUnWait(void);
extern struct rx_service *rxi_FindService(osi_socket socket,
- u_short serviceId);
+ u_short serviceId);
extern struct rx_call *rxi_NewCall(struct rx_connection *conn,
- int channel);
-
-/* Don't like this - change source at some point to make calls identical */
-#ifdef RX_ENABLE_LOCKS
+ int channel);
extern void rxi_FreeCall(struct rx_call *call, int haveCTLock);
-#else /* RX_ENABLE_LOCKS */
-extern void rxi_FreeCall(struct rx_call *call);
-#endif /* RX_ENABLE_LOCKS */
-
-extern char *rxi_Alloc(size_t size);
+extern void *rxi_Alloc(size_t size);
extern void rxi_Free(void *addr, size_t size);
-extern void rxi_SetPeerMtu(afs_uint32 host, afs_uint32 port,
- int mtu);
+extern void rxi_SetPeerMtu(struct rx_peer *peer, afs_uint32 host,
+ afs_uint32 port, int mtu);
extern struct rx_peer *rxi_FindPeer(afs_uint32 host,
u_short port,
struct rx_peer *origPeer, int create);
extern struct rx_connection *rxi_FindConnection(osi_socket socket,
- afs_int32 host,
+ afs_uint32 host,
u_short port,
u_short serviceId,
afs_uint32 cid,
extern void rxi_StartUnlocked(struct rxevent *event,
void *call, /* struct rx_call */
void *arg1, int istack);
-extern void rxi_Start(struct rxevent *event,
+extern void rxi_Start(struct rxevent *event,
void *call, /* struct rx_call */
void *arg1, int istack);
extern void rxi_Send(struct rx_call *call,
extern int rxi_CheckCall(struct rx_call *call);
#endif /* RX_ENABLE_LOCKS */
extern void rxi_KeepAliveEvent(struct rxevent *event,
- void *call /* struct rx_call *call */,
+ void *call /* struct rx_call *call */,
void *dummy);
+extern void rxi_GrowMTUEvent(struct rxevent *event,
+ void *call /* struct rx_call *call */,
+ void *dummy);
extern void rxi_ScheduleKeepAliveEvent(struct rx_call *call);
+extern void rxi_ScheduleNatKeepAliveEvent(struct rx_connection *conn);
+extern void rxi_ScheduleGrowMTUEvent(struct rx_call *call, int secs);
extern void rxi_KeepAliveOn(struct rx_call *call);
+extern void rxi_NatKeepAliveOn(struct rx_connection *conn);
+extern void rxi_GrowMTUOn(struct rx_call *call);
+extern void rx_SetConnSecondsUntilNatPing(struct rx_connection *conn, afs_int32 seconds);
extern void rxi_SendDelayedConnAbort(struct rxevent *event,
void *conn, /* struct rx_connection *conn */
void *dummy);
void *conn, /* struct rx_connection *conn */
void *arg1, int atries);
extern void rxi_ChallengeOn(struct rx_connection *conn);
-extern void rxi_ComputeRoundTripTime(struct rx_packet *p,
- struct clock *sentp,
- struct rx_peer *peer);
-extern void rxi_ReapConnections(struct rxevent *unused, void *unused1,
+extern void rxi_ReapConnections(struct rxevent *unused, void *unused1,
void *unused2);
extern int rxs_Release(struct rx_securityClass *aobj);
#ifndef KERNEL
#endif
extern void rx_SetSpecific(struct rx_connection *conn, int key, void *ptr);
extern void *rx_GetSpecific(struct rx_connection *conn, int key);
+extern void rx_SetServiceSpecific(struct rx_service *svc, int key, void *ptr);
+extern void * rx_GetServiceSpecific(struct rx_service *svc, int key);
extern void rx_IncrementTimeAndCount(struct rx_peer *peer,
afs_uint32 rxInterface,
afs_uint32 currentFunc,
/* this func seems to be called with tons of different style routines, need to look
at another time. */
#else
-extern struct rxevent *rxevent_Post(struct clock *when,
+extern struct rxevent *rxevent_Post(struct clock *when,
void (*func) (struct rxevent *, void *, void *),
void *arg, void *arg1);
-extern struct rxevent *rxevent_Post2(struct clock *when,
+extern struct rxevent *rxevent_Post2(struct clock *when,
void (*func) (struct rxevent *, void *, void *, int),
void *arg, void *arg1, int arg2);
extern struct rxevent *rxevent_PostNow(struct clock *when, struct clock *now,
void (*func) (struct rxevent *, void *, void *), void *arg, void *arg1);
extern struct rxevent *rxevent_PostNow2(struct clock *when, struct clock *now,
- void (*func) (struct rxevent *, void *, void *, int), void *arg,
+ void (*func) (struct rxevent *, void *, void *, int), void *arg,
void *arg1, int arg2);
#endif
extern void shutdown_rxevent(void);
extern void rxi_setaddr(afs_uint32 x);
extern afs_uint32 rxi_getaddr(void);
extern int rx_getAllAddr(afs_uint32 * buffer, int maxSize);
-extern int rx_getAllAddrMaskMtu(afs_uint32 addrBuffer[],
+extern int rx_getAllAddrMaskMtu(afs_uint32 addrBuffer[],
afs_uint32 maskBuffer[],
afs_uint32 mtuBuffer[],
int maxSize);
# define osi_Panic(msg...) do { printk(KERN_CRIT "openafs: " msg); BUG(); } while (0)
# undef osi_Assert
# define osi_Assert(expr) \
- do { if (!(expr)) { osi_AssertFailK(#expr, __FILE__, __LINE__); BUG(); } } while (0)
-# elif (defined(AFS_AIX_ENV) && !defined(AFS_AIX61_ENV))
+ do { if (!(expr)) osi_Panic("assertion failed: %s, file: %s, line: %d\n", #expr, __FILE__, __LINE__); } while (0)
+# elif defined(AFS_AIX_ENV)
extern void osi_Panic(char *fmt, void *a1, void *a2, void *a3);
-# elif defined(AFS_AIX61_ENV) || defined(AFS_SGI_ENV)
-/* No prototype. Deliberate, since there's no vprintf et al */
# else
extern void osi_Panic(char *fmt, ...)
- AFS_ATTRIBUTE_FORMAT(__printf__, 1, 2);
+ AFS_ATTRIBUTE_FORMAT(__printf__, 1, 2)
+ AFS_NORETURN;
#endif
extern int osi_utoa(char *buf, size_t len, unsigned long val);
extern void rxi_InitPeerParams(struct rx_peer *pp);
# ifdef UKERNEL
extern void *rx_ServerProc(void *);
# endif
-extern void osi_AssertFailK(const char *expr, const char *file, int line);
+# ifndef AFS_LINUX26_ENV
+extern void osi_AssertFailK(const char *expr, const char *file, int line) AFS_NORETURN;
+# endif
extern void rxk_ListenerProc(void);
extern void rxk_Listener(void);
# ifndef UKERNEL
# if defined(AFS_SUN510_ENV)
extern void osi_StartNetIfPoller(void);
extern void osi_NetIfPoller(void);
+extern void osi_StopNetIfPoller(void);
extern struct afs_ifinfo afsifinfo[ADDRSPERSITE];
# endif
extern void osi_StopListener(void);
extern int rxi_AllocDataBuf(struct rx_packet *p, int nb, int cla_ss);
extern void rxi_MorePackets(int apackets);
extern void rxi_MorePacketsNoLock(int apackets);
+#if defined(AFS_PTHREAD_ENV)
+extern void rxi_MorePacketsTSFPQ(int apackets, int flush_global, int num_keep_local); /* more flexible packet alloc function */
+extern void rxi_AdjustLocalPacketsTSFPQ(int num_keep_local, int allow_overcommit); /* adjust thread-local queue length, for places where we know how many packets we will need a priori */
+extern void rxi_FlushLocalPacketsTSFPQ(void); /* flush all thread-local packets to global queue */
+#endif
extern void rxi_FreeAllPackets(void);
extern void rx_CheckPackets(void);
extern void rxi_FreePacketNoLock(struct rx_packet *p);
extern int rxi_ReadPacket(osi_socket socket, struct rx_packet *p,
afs_uint32 * host, u_short * port);
extern struct rx_packet *rxi_SplitJumboPacket(struct rx_packet *p,
- afs_int32 host, short port,
+ afs_uint32 host, short port,
int first);
#ifndef KERNEL
extern int osi_NetSend(osi_socket socket, void *addr, struct iovec *dvec,
#endif
extern struct rx_packet *rxi_ReceiveDebugPacket(struct rx_packet *ap,
osi_socket asocket,
- afs_int32 ahost, short aport,
+ afs_uint32 ahost, short aport,
int istack);
extern struct rx_packet *rxi_ReceiveVersionPacket(struct rx_packet
*ap, osi_socket asocket,
- afs_int32 ahost,
+ afs_uint32 ahost,
short aport, int istack);
extern void rxi_SendPacket(struct rx_call *call, struct rx_connection *conn,
struct rx_packet *p, int istack);
extern int rxi_AdjustIfMTU(int mtu);
extern int rxi_AdjustMaxMTU(int mtu, int peerMaxMTU);
extern int rxi_AdjustDgramPackets(int frags, int mtu);
-
+#ifdef AFS_GLOBAL_RXLOCK_KERNEL
+extern void rxi_WaitforTQBusy(struct rx_call *call);
+#endif
/* rxperf.c */
/* rx_pthread.c */
+extern int rx_NewThreadId(void);
extern void rxi_Delay(int sec);
extern void rxi_InitializeThreadSupport(void);
extern void rxi_StartServerProc(void *(*proc) (void *), int stacksize);
extern void rxi_FlushWrite(struct rx_call *call);
extern void rx_FlushWrite(struct rx_call *call);
+
+
+/* rx_stats.c */
+extern struct rx_statistics * rx_GetStatistics(void);
+extern void rx_FreeStatistics(struct rx_statistics **);
+
/* rx_trace.c */
extern afs_kmutex_t rx_if_mutex;
#endif
extern osi_socket rxi_GetUDPSocket(u_short port);
-extern void osi_AssertFailU(const char *expr, const char *file, int line);
+extern void osi_AssertFailU(const char *expr, const char *file, int line) AFS_NORETURN;
extern void rxi_InitPeerParams(struct rx_peer *pp);
extern int rxi_HandleSocketError(int socket);
#endif
#endif /* defined(AFS_AIX32_ENV) && !defined(KERNEL) */
#ifndef KERNEL
-extern void osi_Panic(char *fmt, ...);
+extern void osi_Panic(char *fmt, ...) AFS_NORETURN;
#endif
extern void rx_GetIFInfo(void);
#ifndef afs_osi_Alloc
extern void *afs_osi_Alloc(size_t x);
#endif
-#ifndef afs_osi_Alloc_NoSleep
-extern void *afs_osi_Alloc_NoSleep(size_t x);
-#endif
#ifndef afs_osi_Free
extern void afs_osi_Free(void *x, size_t asize);
#endif