2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
10 /* RX: Globals for internal use, basically */
12 /* This controls the size of an fd_set; it must be defined early before
13 * the system headers define that type and the macros that operate on it.
14 * Its value should be as large as the maximum file descriptor limit we
15 * are likely to run into on any platform. Right now, that is 65536
16 * which is the default hard fd limit on Solaris 9 */
17 #if !defined(_WIN32) && !defined(KERNEL)
18 #define FD_SETSIZE 65536
21 #include <afsconfig.h>
22 #include <afs/param.h>
24 /* Enable data initialization when the header file is included */
25 #define GLOBALSINIT(stuff) = stuff
26 #if defined(AFS_NT40_ENV) && defined(AFS_PTHREAD_ENV)
27 #define EXT __declspec(dllexport)
28 #define EXT2 __declspec(dllexport)
33 #ifdef AFS_PTHREAD_ENV
34 #define POSTAMBLE =PTHREAD_MUTEX_INITIALIZER
44 # include "afs/sysincludes.h"
52 #include "rx_packet.h"
53 #include "rx_globals.h"
55 void rx_SetMaxReceiveWindow(int packets
)
57 if (packets
> rx_maxWindow
)
58 packets
= rx_maxWindow
;
60 rx_maxReceiveWindow
= packets
;
63 int rx_GetMaxReceiveWindow(void)
65 return rx_maxReceiveWindow
;
68 void rx_SetMaxSendWindow(int packets
)
70 if (packets
> rx_maxWindow
)
71 packets
= rx_maxWindow
;
73 rx_maxSendWindow
= packets
;
76 int rx_GetMaxSendWindow(void)
78 return rx_maxSendWindow
;
81 void rx_SetMinPeerTimeout(int timeo
)
83 if (timeo
>= 1 && timeo
< 1000)
84 rx_minPeerTimeout
= timeo
;
87 int rx_GetMinPeerTimeout(void)
89 return rx_minPeerTimeout
;
94 void rx_SetRxDeadTime(int seconds
)
96 rx_connDeadTime
= seconds
;
99 int rx_GetMinUdpBufSize(void)
104 void rx_SetUdpBufSize(int x
)
106 if (x
> rx_GetMinUdpBufSize())
110 #endif /* AFS_NT40_ENV */