obsd44-pass1-20090123
[openafs.git] / src / rx / rx_globals.c
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  * 
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
8  */
9
10 /* RX:  Globals for internal use, basically */
11
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
19 #endif
20
21 #include <afsconfig.h>
22 #ifdef KERNEL
23 #include "afs/param.h"
24 #else
25 #include <afs/param.h>
26 #endif
27
28 RCSID
29     ("$Header$");
30
31 /* Enable data initialization when the header file is included */
32 #define GLOBALSINIT(stuff) = stuff
33 #if defined(AFS_NT40_ENV) && defined(AFS_PTHREAD_ENV)
34 #define EXT __declspec(dllexport)
35 #define EXT2 __declspec(dllexport)
36 #else
37 #define EXT
38 #define EXT2 
39 #endif
40
41 #ifdef KERNEL
42 #ifndef UKERNEL
43 #include "h/types.h"
44 #else /* !UKERNEL */
45 #include        "afs/sysincludes.h"
46 #endif /* UKERNEL */
47 #endif /* KERNEL */
48
49 #include "rx_globals.h"
50
51 #ifdef AFS_NT40_ENV
52
53 void rx_SetRxDeadTime(int seconds)
54 {
55     rx_connDeadTime = seconds;
56 }
57
58 int rx_GetMinUdpBufSize(void)
59 {
60     return 64*1024;
61 }
62
63 void rx_SetUdpBufSize(int x)
64 {
65     if (x > rx_GetMinUdpBufSize())
66         rx_UdpBufSize = x;
67 }
68
69 void rx_SetMaxClonesPerConn(int x)
70 {
71     rx_max_clones_per_connection = x;
72 }
73
74 #endif /* AFS_NT40_ENV */