/* 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
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) {
/* The IP address list can change so we must query for it */
rx_GetIFInfo();
-#ifdef AFS_DJGPP_ENV
- /* we don't want to use the loopback adapter which is first */
- /* this is a bad bad hack.
- * and doesn't hold true on Windows.
- */
- if ( rxi_numNetAddrs > 1 )
- offset = 1;
-#endif /* AFS_DJGPP_ENV */
-
for (count = 0; offset < rxi_numNetAddrs && maxSize > 0;
count++, offset++, maxSize--)
buffer[count] = htonl(rxi_NetAddrs[offset]);
/* The IP address list can change so we must query for it */
rx_GetIFInfo();
-#ifdef AFS_DJGPP_ENV
- /* we don't want to use the loopback adapter which is first */
- /* this is a bad bad hack.
- * and doesn't hold true on Windows.
- */
- if ( rxi_numNetAddrs > 1 )
- offset = 1;
-#endif /* AFS_DJGPP_ENV */
-
for (count = 0;
offset < rxi_numNetAddrs && maxSize > 0;
count++, offset++, maxSize--) {
maxsize =
rxi_nRecvFrags * rxsize + (rxi_nRecvFrags - 1) * UDP_HDR_SIZE;
maxsize = rxi_AdjustMaxMTU(rxsize, maxsize);
- if (rx_maxReceiveSize < maxsize) {
+ if (rx_maxReceiveSize > maxsize) {
rx_maxReceiveSize = MIN(RX_MAX_PACKET_SIZE, maxsize);
rx_maxReceiveSize =
MIN(rx_maxReceiveSize, rx_maxReceiveSizeUser);
}
-
+ if (rx_MyMaxSendSize > maxsize) {
+ rx_MyMaxSendSize = MIN(RX_MAX_PACKET_SIZE, maxsize);
+ }
}
UNLOCK_IF;
#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);