/* rx_user.c contains routines specific to the user space UNIX implementation of rx */
+/* rxi_syscall is currently not prototyped */
+
#include <afsconfig.h>
#include <afs/param.h>
-RCSID
- ("$Header$");
# include <sys/types.h>
# include <errno.h>
# include <sys/time.h>
# include <net/if.h>
# include <sys/ioctl.h>
+# include <unistd.h>
#endif
# include <fcntl.h>
#if !defined(AFS_AIX_ENV) && !defined(AFS_NT40_ENV)
#define IPPORT_USERRESERVED 5000
# endif
+#if defined(HAVE_LINUX_ERRQUEUE_H) && defined(ADAPT_PMTU)
+#include <linux/types.h>
+#include <linux/errqueue.h>
+#ifndef IP_MTU
+#define IP_MTU 14
+#endif
+#endif
+
#ifndef AFS_NT40_ENV
# include <sys/time.h>
#endif
-# include "rx_internal.h"
# include "rx.h"
# include "rx_globals.h"
int pmtu=IP_PMTUDISC_DONT;
#endif
#endif
-#if defined(HAVE_LINUX_ERRQUEUE_H) && defined(ADAPT_PMTU)
-#include <linux/types.h>
-#include <linux/errqueue.h>
-#ifndef IP_MTU
-#define IP_MTU 14
-#endif
-#endif
#if !defined(AFS_NT40_ENV)
if (ntohs(port) >= IPPORT_RESERVED && ntohs(port) < IPPORT_USERRESERVED) {
if (!greedy)
(osi_Msg "%s*WARNING* Unable to increase buffering on socket\n",
name);
- if (rx_stats_active) {
+ if (rx_stats_active) {
MUTEX_ENTER(&rx_stats_mutex);
rx_stats.socketGreedy = greedy;
MUTEX_EXIT(&rx_stats_mutex);
#if !defined(AFS_AIX_ENV) && !defined(AFS_NT40_ENV) && !defined(AFS_LINUX20_ENV)
int
-rxi_syscall(a3, a4, a5)
- afs_uint32 a3, a4;
- void *a5;
+rxi_syscall(afs_uint32 a3, afs_uint32 a4, void *a5)
{
afs_uint32 rcode;
- void (*old) ();
+ void (*old) (int);
- old = (void (*)())signal(SIGSYS, SIG_IGN);
+ old = signal(SIGSYS, SIG_IGN);
#if defined(AFS_SGI_ENV)
rcode = afs_syscall(a3, a4, a5);
struct sockaddr_in addr;
#endif
+
+
LOCK_IF_INIT;
if (!Inited) {
UNLOCK_IF_INIT;
/* try to second-guess IP, and identify which link is most likely to
* be used for traffic to/from this host. */
ppaddr = ntohl(pp->host);
-
+
pp->ifMTU = 0;
pp->timeout.sec = 2;
- pp->rateFlag = 2; /* start timing after two full packets */
+ pp->rateFlag = 2; /* start timing after two full packets */
/* I don't initialize these, because I presume they are bzero'd...
* pp->burstSize pp->burst pp->burstWait.sec pp->burstWait.usec
* pp->timeout.usec */
-
+
LOCK_IF;
for (ix = 0; ix < rxi_numNetAddrs; ++ix) {
if ((rxi_NetAddrs[ix] & myNetMasks[ix]) == (ppaddr & myNetMasks[ix])) {
}
}
UNLOCK_IF;
- if (!pp->ifMTU) { /* not local */
+ if (!pp->ifMTU) { /* not local */
pp->timeout.sec = 3;
pp->ifMTU = MIN(rx_MyMaxSendSize, RX_REMOTE_PACKET_SIZE);
}