#include "rx_atomic.h"
#include "rx_globals.h"
#include "rx_stats.h"
+#include "rx_packet.h"
+
#ifdef AFS_PTHREAD_ENV
/*
fudge_netmask(rxi_NetAddrs[rxi_numNetAddrs]);
#ifdef SIOCGIFNETMASK
res = ioctl(s, SIOCGIFNETMASK, ifr);
- if ((res == 0)) {
+ if (res == 0) {
a = (struct sockaddr_in *)&ifr->ifr_addr;
myNetMasks[rxi_numNetAddrs] = ntohl(a->sin_addr.s_addr);
/* fprintf(stderr, "if %s subnetmask=0x%x\n",
/* Override max MTU. If rx_SetNoJumbo is called, it must be
called before calling rx_SetMaxMTU since SetNoJumbo clobbers rx_maxReceiveSize */
-void
+int
rx_SetMaxMTU(int mtu)
{
+ if (mtu < RX_MIN_PACKET_SIZE || mtu > RX_MAX_PACKET_DATA_SIZE)
+ return EINVAL;
+
rx_MyMaxSendSize = rx_maxReceiveSizeUser = rx_maxReceiveSize = mtu;
+
+ return 0;
}
#if defined(ADAPT_PMTU)