ubik-call-sucks-20060704
[openafs.git] / src / rx / rx_globals.h
index a2a1172..0f329e3 100644 (file)
 
 #ifndef INIT
 #define INIT(x)
-#if defined(AFS_NT40_ENV) && defined(AFS_PTHREAD_ENV)
+#if defined(AFS_NT40_ENV)
+#if defined(AFS_PTHREAD_ENV)
 #define EXT __declspec(dllimport) extern
 #else
 #define        EXT extern
 #endif
+#define EXT2 __declspec(dllimport) extern
+#else
+#define EXT2 extern
+#define EXT extern
+#endif
 #endif /* !INIT */
 
 /* Basic socket for client requests; other sockets (for receiving server requests) are in the service structures */
@@ -62,6 +68,7 @@ EXT struct clock rx_softAckDelay;
 /* Variable to allow introduction of network unreliability */
 #ifdef RXDEBUG
 EXT int rx_intentionallyDroppedPacketsPer100 INIT(0);  /* Dropped on Send */
+EXT int rx_intentionallyDroppedOnReadPer100  INIT(0);  /* Dropped on Read */
 #endif
 
 /* extra packets to add to the quota */
@@ -425,9 +432,9 @@ EXT u_short rx_port;
 #if !defined(KERNEL) && !defined(AFS_PTHREAD_ENV)
 /* 32-bit select Mask for rx_Listener. */
 EXT fd_set rx_selectMask;
-EXT int rx_maxSocketNumber;    /* Maximum socket number in the select mask. */
+EXT osi_socket rx_maxSocketNumber;     /* Maximum socket number in the select mask. */
 /* Minumum socket number in the select mask. */
-EXT int rx_minSocketNumber INIT(0x7fffffff);
+EXT osi_socket rx_minSocketNumber INIT(0x7fffffff);
 #endif
 
 /* This is actually the minimum number of packets that must remain free,
@@ -486,7 +493,9 @@ EXT afs_kmutex_t rx_connHashTable_lock;
 
 #define CONN_HASH(host, port, cid, epoch, type) ((((cid)>>RX_CIDSHIFT)%rx_hashTableSize))
 
+#if 0
 #define PEER_HASH(host, port)  ((host ^ port) % rx_hashTableSize)
+#endif
 
 /* Forward definitions of internal procedures */
 #define        rxi_ChallengeOff(conn)  rxevent_Cancel((conn)->challengeEvent, (struct rx_call*)0, 0);
@@ -507,7 +516,16 @@ EXT FILE *rx_debugFile;            /* Set by the user to a stdio file for debugging output
 EXT FILE *rxevent_debugFile;   /* Set to an stdio descriptor for event logging to that file */
 
 #define rx_Log rx_debugFile
+#ifdef AFS_NT40_ENV
+EXT int rxdebug_active;
+#if !defined(_WIN64)
+#define dpf(args) if (rxdebug_active) rxi_DebugPrint args;
+#else
+#define dpf(args)
+#endif
+#else
 #define dpf(args) if (rx_debugFile) rxi_DebugPrint args; else
+#endif
 #define rx_Log_event rxevent_debugFile
 
 EXT char *rx_packetTypes[RX_N_PACKET_TYPES] INIT(RX_PACKET_TYPES);     /* Strings defined in rx.h */
@@ -559,7 +577,7 @@ EXT int rxi_pthread_hinum INIT(0);
 EXT afs_kmutex_t rx_stats_mutex;       /* used to activate stats gathering */
 #endif
 
-EXT int rx_enable_stats INIT(0);
+EXT2 int rx_enable_stats INIT(0);
 
 /*
  * Set this flag to enable the listener thread to trade places with an idle