Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

638 lines
26 KiB

  1. /*++ BUILD Version: 0000 // Increment this if a change has global effects
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. vars.c
  5. Abstract:
  6. Globals for winsock browser util.
  7. Author:
  8. Dan Knudson (DanKn) 29-Jul-1996
  9. Revision History:
  10. --*/
  11. #include <stdio.h>
  12. #include "sockeye.h"
  13. #include "wsipx.h"
  14. #include "nspapi.h"
  15. #ifdef WIN32
  16. #define my_far
  17. #else
  18. #define my_far _far
  19. #endif
  20. FILE *hLogFile = (FILE *) NULL;
  21. HANDLE ghInst;
  22. HWND ghwndMain, ghwndEdit, ghwndList1, ghwndList2, ghwndList3;
  23. BOOL bShowParams = FALSE;
  24. BOOL gbDisableHandleChecking;
  25. LPBYTE pBigBuf;
  26. DWORD dwBigBufSize;
  27. BOOL bDumpParams = FALSE;
  28. BOOL gbWideStringParams;
  29. BOOL bTimeStamp;
  30. DWORD dwDumpStructsFlags;
  31. DWORD aUserButtonFuncs[MAX_USER_BUTTONS];
  32. char aUserButtonsText[MAX_USER_BUTTONS][MAX_USER_BUTTON_TEXT_SIZE];
  33. char my_far szTab[] = " ";
  34. char aAscii[] =
  35. {
  36. 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
  37. 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
  38. 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
  39. 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
  40. 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
  41. 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
  42. 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
  43. 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126, 46,
  44. 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
  45. 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
  46. 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
  47. 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
  48. 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
  49. 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
  50. 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
  51. 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46
  52. };
  53. BYTE aHex[] =
  54. {
  55. 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
  56. 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
  57. 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
  58. 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,255,255,255,255,255,255,
  59. 255, 10, 11, 12, 13, 14, 15,255,255,255,255,255,255,255,255,255,
  60. 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
  61. 255, 10, 11, 12, 13, 14, 15,255,255,255,255,255,255,255,255,255,
  62. 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
  63. };
  64. LOOKUP aAddressFamilies[] =
  65. {
  66. { AF_UNSPEC ,"AF_UNSPEC" },
  67. { AF_UNIX ,"AF_UNIX" },
  68. { AF_INET ,"AF_INET" },
  69. { AF_IMPLINK ,"AF_IMPLINK" },
  70. { AF_PUP ,"AF_PUP" },
  71. { AF_CHAOS ,"AF_CHAOS" },
  72. { AF_NS ,"AF_NS (AF_IPX)" },
  73. { AF_ISO ,"AF_ISO (AF_OSI)" },
  74. { AF_ECMA ,"AF_ECMA" },
  75. { AF_DATAKIT ,"AF_DATAKIT" },
  76. { AF_CCITT ,"AF_CCITT" },
  77. { AF_SNA ,"AF_SNA" },
  78. { AF_DECnet ,"AF_DECnet" },
  79. { AF_DLI ,"AF_DLI" },
  80. { AF_LAT ,"AF_LAT" },
  81. { AF_HYLINK ,"AF_HYLINK" },
  82. { AF_APPLETALK ,"AF_APPLETALK" },
  83. { AF_NETBIOS ,"AF_NETBIOS" },
  84. { AF_VOICEVIEW ,"AF_VOICEVIEW" },
  85. { AF_FIREFOX ,"AF_FIREFOX" },
  86. { AF_UNKNOWN1 ,"AF_UNKNOWN1" },
  87. { AF_BAN ,"AF_BAN" },
  88. { AF_ATM ,"AF_ATM" },
  89. { AF_INET6 ,"AF_INET6" },
  90. { 0xffffffff ,NULL }
  91. };
  92. LOOKUP aIoctlCmds[] =
  93. {
  94. { FIONBIO ,"FIONBIO" },
  95. { FIONREAD ,"FIONREAD" },
  96. { SIOCATMARK ,"SIOCATMARK" },
  97. { 0xffffffff ,NULL }
  98. };
  99. LOOKUP aJLFlags[] =
  100. {
  101. { JL_SENDER_ONLY ,"JL_SENDER_ONLY" },
  102. { JL_RECEIVER_ONLY ,"JL_RECEIVER_ONLY" },
  103. { JL_BOTH ,"JL_BOTH" },
  104. { 0xffffffff ,NULL }
  105. };
  106. LOOKUP aNameSpaces[] =
  107. {
  108. { NS_ALL ,"NS_ALL" },
  109. { NS_SAP ,"NS_SAP" },
  110. { NS_NDS ,"NS_NDS" },
  111. { NS_PEER_BROWSE ,"NS_PEER_BROWSE" },
  112. { NS_TCPIP_LOCAL ,"NS_TCPIP_LOCAL" },
  113. { NS_TCPIP_HOSTS ,"NS_TCPIP_HOSTS" },
  114. { NS_DNS ,"NS_DNS" },
  115. { NS_NETBT ,"NS_NETBT" },
  116. { NS_WINS ,"NS_WINS" },
  117. { NS_NBP ,"NS_NBP" },
  118. { NS_MS ,"NS_MS" },
  119. { NS_STDA ,"NS_STDA" },
  120. { NS_NTDS ,"NS_NTDS" },
  121. { NS_X500 ,"NS_X500" },
  122. { NS_NIS ,"NS_NIS" },
  123. { NS_NISPLUS ,"NS_NISPLUS" },
  124. { NS_WRQ ,"NS_WRQ" },
  125. { 0xffffffff ,NULL }
  126. };
  127. LOOKUP aNetworkByteOrders[] =
  128. {
  129. { BIGENDIAN ,"BIGENDIAN" },
  130. { LITTLEENDIAN ,"LITTLEENDIAN" },
  131. { 0xffffffff ,NULL }
  132. };
  133. LOOKUP aNetworkEvents[] =
  134. {
  135. { FD_READ ,"FD_READ" },
  136. { FD_WRITE ,"FD_WRITE" },
  137. { FD_OOB ,"FD_OOB" },
  138. { FD_ACCEPT ,"FD_ACCEPT" },
  139. { FD_CONNECT ,"FD_CONNECT" },
  140. { FD_CLOSE ,"FD_CLOSE" },
  141. { FD_QOS ,"FD_QOS" },
  142. { FD_GROUP_QOS ,"FD_GROUP_QOS" },
  143. { 0xffffffff ,NULL }
  144. };
  145. LOOKUP aProperties[] =
  146. {
  147. { PROP_COMMENT ,"PROP_COMMENT " },
  148. { PROP_LOCALE ,"PROP_LOCALE " },
  149. { PROP_DISPLAY_HINT ,"PROP_DISPLAY_HINT" },
  150. { PROP_VERSION ,"PROP_VERSION " },
  151. { PROP_START_TIME ,"PROP_START_TIME " },
  152. { PROP_MACHINE ,"PROP_MACHINE " },
  153. { PROP_ADDRESSES ,"PROP_ADDRESSES " },
  154. { PROP_SD ,"PROP_SD " },
  155. { PROP_ALL ,"PROP_ALL " },
  156. { 0xffffffff ,NULL }
  157. };
  158. LOOKUP aProtocols[] =
  159. {
  160. { IPPROTO_IP ,"IPPROTO_IP" },
  161. { IPPROTO_ICMP ,"IPPROTO_ICMP" },
  162. { IPPROTO_IGMP ,"IPPROTO_IGMP" },
  163. { IPPROTO_GGP ,"IPPROTO_GGP" },
  164. { IPPROTO_TCP ,"IPPROTO_TCP" },
  165. { IPPROTO_PUP ,"IPPROTO_PUP" },
  166. { IPPROTO_UDP ,"IPPROTO_UDP" },
  167. { IPPROTO_IDP ,"IPPROTO_IDP" },
  168. { IPPROTO_ND ,"IPPROTO_ND" },
  169. { IPPROTO_RAW ,"IPPROTO_RAW" },
  170. { IPPROTO_MAX ,"IPPROTO_MAX" },
  171. { NSPROTO_IPX ,"NSPROTO_IPX" },
  172. { NSPROTO_SPX ,"NSPROTO_SPX" },
  173. { NSPROTO_SPXII ,"NSPROTO_SPXII" },
  174. { 0xffffffff ,NULL }
  175. };
  176. LOOKUP aProviderFlags[] =
  177. {
  178. { PFL_MULTIPLE_PROTO_ENTRIES ,"MULTIPLE_PROTO_ENTRIES" },
  179. { PFL_RECOMMENDED_PROTO_ENTRY ,"RECOMMENDED_PROTO_ENTRY" },
  180. { PFL_HIDDEN ,"HIDDEN" },
  181. { PFL_MATCHES_PROTOCOL_ZERO ,"MATCHES_PROTOCOL_ZERO" },
  182. { 0xffffffff ,NULL }
  183. };
  184. LOOKUP aQOSServiceTypes[] =
  185. {
  186. { SERVICETYPE_NOTRAFFIC ,"NOTRAFFIC" },
  187. { SERVICETYPE_BESTEFFORT ,"BESTEFFORT" },
  188. { SERVICETYPE_CONTROLLEDLOAD ,"CONTROLLEDLOAD" },
  189. { SERVICETYPE_GUARANTEED ,"GUARANTEED" },
  190. { SERVICETYPE_NETWORK_UNAVAILABLE ,"NETWORK_UNAVAILABLE" },
  191. { SERVICETYPE_GENERAL_INFORMATION ,"GENERAL_INFORMATION" },
  192. { SERVICETYPE_NOCHANGE ,"NOCHANGE" },
  193. { 0xffffffff ,NULL }
  194. };
  195. LOOKUP aRecvFlags[] =
  196. {
  197. { MSG_PEEK ,"MSG_PEEK" },
  198. { MSG_OOB ,"MSG_OOB" },
  199. { 0xffffffff ,NULL }
  200. };
  201. LOOKUP aResDisplayTypes[] =
  202. {
  203. { RESOURCEDISPLAYTYPE_GENERIC ,"RESOURCEDISPLAYTYPE_GENERIC" },
  204. { RESOURCEDISPLAYTYPE_DOMAIN ,"RESOURCEDISPLAYTYPE_DOMAIN" },
  205. { RESOURCEDISPLAYTYPE_SERVER ,"RESOURCEDISPLAYTYPE_SERVER" },
  206. { RESOURCEDISPLAYTYPE_SHARE ,"RESOURCEDISPLAYTYPE_SHARE" },
  207. { RESOURCEDISPLAYTYPE_FILE ,"RESOURCEDISPLAYTYPE_FILE" },
  208. { RESOURCEDISPLAYTYPE_GROUP ,"RESOURCEDISPLAYTYPE_GROUP" },
  209. { RESOURCEDISPLAYTYPE_NETWORK ,"RESOURCEDISPLAYTYPE_NETWORK" },
  210. { RESOURCEDISPLAYTYPE_ROOT ,"RESOURCEDISPLAYTYPE_ROOT" },
  211. { RESOURCEDISPLAYTYPE_SHAREADMIN ,"RESOURCEDISPLAYTYPE_SHAREADMIN" },
  212. { RESOURCEDISPLAYTYPE_DIRECTORY ,"RESOURCEDISPLAYTYPE_DIRECTORY" },
  213. { RESOURCEDISPLAYTYPE_TREE ,"RESOURCEDISPLAYTYPE_TREE" },
  214. { RESOURCEDISPLAYTYPE_NDSCONTAINER ,"RESOURCEDISPLAYTYPE_NDSCONTAINER" },
  215. { 0xffffffff ,NULL }
  216. };
  217. LOOKUP aResFlags[] =
  218. {
  219. { RES_SERVICE ,"RES_SERVICE" },
  220. { RES_FIND_MULTIPLE ,"RES_FIND_MULTIPLE" },
  221. { RES_SOFT_SEARCH ,"RES_SOFT_SEARCH" },
  222. { 0xffffffff ,NULL }
  223. };
  224. LOOKUP aSendFlags[] =
  225. {
  226. { MSG_DONTROUTE ,"MSG_DONTROUTE" },
  227. { MSG_OOB ,"MSG_OOB" },
  228. { 0xffffffff ,NULL }
  229. };
  230. LOOKUP aShutdownOps[] =
  231. {
  232. { SD_RECEIVE ,"SD_RECEIVE" },
  233. { SD_SEND ,"SD_SEND" },
  234. { SD_BOTH ,"SD_BOTH" },
  235. { 0xffffffff ,NULL }
  236. };
  237. LOOKUP aSocketTypes[] =
  238. {
  239. { SOCK_STREAM ,"SOCK_STREAM" },
  240. { SOCK_DGRAM ,"SOCK_DGRAM" },
  241. { SOCK_RAW ,"SOCK_RAW" },
  242. { SOCK_RDM ,"SOCK_RDM" },
  243. { SOCK_SEQPACKET ,"SOCK_SEQPACKET" },
  244. { 0xffffffff ,NULL }
  245. };
  246. LOOKUP aSockOptLevels[] =
  247. {
  248. { SOL_SOCKET ,"SOL_SOCKET" },
  249. { IPPROTO_TCP ,"IPPROTO_TCP" },
  250. { 0xffffffff ,NULL }
  251. };
  252. LOOKUP aSockOpts[] =
  253. {
  254. { SO_ACCEPTCONN ,"SO_ACCEPTCONN" },
  255. { SO_BROADCAST ,"SO_BROADCAST" },
  256. { SO_DEBUG ,"SO_DEBUG" },
  257. { (DWORD) SO_DONTLINGER ,"SO_DONTLINGER" },
  258. { SO_DONTROUTE ,"SO_DONTROUTE" },
  259. { SO_ERROR ,"SO_ERROR" },
  260. { SO_GROUP_ID ,"SO_GROUP_ID" },
  261. { SO_GROUP_PRIORITY ,"SO_GROUP_PRIORITY" },
  262. { SO_KEEPALIVE ,"SO_KEEPALIVE" },
  263. { SO_LINGER ,"SO_LINGER" },
  264. { SO_MAX_MSG_SIZE ,"SO_MAX_MSG_SIZE" },
  265. { SO_OOBINLINE ,"SO_OOBINLINE" },
  266. { SO_PROTOCOL_INFO ,"SO_PROTOCOL_INFO" },
  267. { SO_RCVBUF ,"SO_RCVBUF" },
  268. { SO_REUSEADDR ,"SO_REUSEADDR" },
  269. { SO_SNDBUF ,"SO_SNDBUF" },
  270. { SO_TYPE ,"SO_TYPE" },
  271. { PVD_CONFIG ,"PVD_CONFIG" },
  272. { TCP_NODELAY ,"TCP_NODELAY" },
  273. { 0xffffffff ,NULL }
  274. };
  275. LOOKUP aServiceFlags[] =
  276. {
  277. { XP1_CONNECTIONLESS ,"CONNECTIONLESS" },
  278. { XP1_GUARANTEED_DELIVERY ,"GUARANTEED_DELIVERY" },
  279. { XP1_GUARANTEED_ORDER ,"GUARANTEED_ORDER" },
  280. { XP1_MESSAGE_ORIENTED ,"MESSAGE_ORIENTED" },
  281. { XP1_PSEUDO_STREAM ,"PSEUDO_STREAM" },
  282. { XP1_GRACEFUL_CLOSE ,"GRACEFUL_CLOSE" },
  283. { XP1_EXPEDITED_DATA ,"EXPEDITED_DATA" },
  284. { XP1_CONNECT_DATA ,"CONNECT_DATA" },
  285. { XP1_DISCONNECT_DATA ,"DISCONNECT_DATA" },
  286. { XP1_SUPPORT_BROADCAST ,"SUPPORT_BROADCAST" },
  287. { XP1_SUPPORT_MULTIPOINT ,"SUPPORT_MULTIPOINT" },
  288. { XP1_MULTIPOINT_CONTROL_PLANE ,"MULTIPOINT_CONTROL_PLANE" },
  289. { XP1_MULTIPOINT_DATA_PLANE ,"MULTIPOINT_DATA_PLANE" },
  290. { XP1_QOS_SUPPORTED ,"QOS_SUPPORTED" },
  291. { XP1_INTERRUPT ,"INTERRUPT" },
  292. { XP1_UNI_SEND ,"UNI_SEND" },
  293. { XP1_UNI_RECV ,"UNI_RECV" },
  294. { XP1_IFS_HANDLES ,"IFS_HANDLES" },
  295. { XP1_PARTIAL_MESSAGE ,"PARTIAL_MESSAGE" },
  296. { 0xffffffff ,NULL }
  297. };
  298. LOOKUP aServiceOps[] =
  299. {
  300. { SERVICE_REGISTER ,"SERVICE_REGISTER" },
  301. { SERVICE_DEREGISTER ,"SERVICE_DEREGISTER" },
  302. { SERVICE_FLUSH ,"SERVICE_FLUSH" },
  303. { SERVICE_ADD_TYPE ,"SERVICE_ADD_TYPE" },
  304. { SERVICE_DELETE_TYPE ,"SERVICE_DELETE_TYPE" },
  305. { 0xffffffff ,NULL }
  306. };
  307. LOOKUP aSvcFlags[] =
  308. {
  309. { SERVICE_FLAG_DEFER ,"SERVICE_FLAG_DEFER" },
  310. { SERVICE_FLAG_HARD ,"SERVICE_FLAG_HARD" },
  311. { 0xffffffff ,NULL }
  312. };
  313. LOOKUP aWSAFlags[] =
  314. {
  315. { WSA_FLAG_OVERLAPPED ,"OVERLAPPED" },
  316. { WSA_FLAG_MULTIPOINT_C_ROOT ,"MULTIPOINT_C_ROOT" },
  317. { WSA_FLAG_MULTIPOINT_C_LEAF ,"MULTIPOINT_C_LEAF" },
  318. { WSA_FLAG_MULTIPOINT_D_ROOT ,"MULTIPOINT_D_ROOT" },
  319. { WSA_FLAG_MULTIPOINT_D_LEAF ,"MULTIPOINT_D_LEAF" },
  320. { 0xffffffff ,NULL }
  321. };
  322. LOOKUP aWSAIoctlCmds[] =
  323. {
  324. { FIONBIO ,"FIONBIO" },
  325. { FIONREAD ,"FIONREAD" },
  326. { SIOCATMARK ,"SIOCATMARK" },
  327. { SIO_ASSOCIATE_HANDLE ,"SIO_ASSOCIATE_HANDLE" },
  328. { SIO_ENABLE_CIRCULAR_QUEUEING ,"SIO_ENABLE_CIRCULAR_QUEUEING" },
  329. { SIO_FIND_ROUTE ,"SIO_FIND_ROUTE" },
  330. { SIO_FLUSH ,"SIO_FLUSH" },
  331. { SIO_GET_BROADCAST_ADDRESS ,"SIO_GET_BROADCAST_ADDRESS" },
  332. { SIO_GET_EXTENSION_FUNCTION_POINTER
  333. ,"SIO_GET_EXTENSION_FUNCTION_POINTER" },
  334. { SIO_GET_QOS ,"SIO_GET_QOS" },
  335. { SIO_GET_GROUP_QOS ,"SIO_GET_GROUP_QOS" },
  336. { SIO_MULTIPOINT_LOOPBACK ,"SIO_MULTIPOINT_LOOPBACK" },
  337. { SIO_MULTICAST_SCOPE ,"SIO_MULTICAST_SCOPE" },
  338. { SIO_SET_QOS ,"SIO_SET_QOS" },
  339. { SIO_SET_GROUP_QOS ,"SIO_SET_GROUP_QOS" },
  340. { SIO_TRANSLATE_HANDLE ,"SIO_TRANSLATE_HANDLE" },
  341. { 0xffffffff ,NULL }
  342. };
  343. LOOKUP aWSARecvFlags[] =
  344. {
  345. { MSG_PEEK ,"MSG_PEEK" },
  346. { MSG_OOB ,"MSG_OOB" },
  347. { MSG_PARTIAL ,"MSG_PARTIAL" },
  348. { 0xffffffff ,NULL }
  349. };
  350. LOOKUP aWSASendFlags[] =
  351. {
  352. { MSG_DONTROUTE ,"MSG_DONTROUTE" },
  353. { MSG_OOB ,"MSG_OOB" },
  354. { MSG_PARTIAL ,"MSG_PARTIAL" },
  355. { 0xffffffff ,NULL }
  356. };
  357. LOOKUP aWSASendAndRecvFlags[] =
  358. {
  359. { MSG_PEEK ,"MSG_PEEK" },
  360. { MSG_DONTROUTE ,"MSG_DONTROUTE" },
  361. { MSG_OOB ,"MSG_OOB" },
  362. { MSG_PARTIAL ,"MSG_PARTIAL" },
  363. { 0xffffffff ,NULL }
  364. };
  365. LOOKUP aWSAErrors[] =
  366. {
  367. { WSAEINTR ,"WSAEINTR" },
  368. { WSAEBADF ,"WSAEBADF" },
  369. { WSAEACCES ,"WSAEACCES" },
  370. { WSAEFAULT ,"WSAEFAULT" },
  371. { WSAEINVAL ,"WSAEINVAL" },
  372. { WSAEMFILE ,"WSAEMFILE" },
  373. { WSAEWOULDBLOCK ,"WSAEWOULDBLOCK" },
  374. { WSAEINPROGRESS ,"WSAEINPROGRESS" },
  375. { WSAEALREADY ,"WSAEALREADY" },
  376. { WSAENOTSOCK ,"WSAENOTSOCK" },
  377. { WSAEDESTADDRREQ ,"WSAEDESTADDRREQ" },
  378. { WSAEMSGSIZE ,"WSAEMSGSIZE" },
  379. { WSAEPROTOTYPE ,"WSAEPROTOTYPE" },
  380. { WSAENOPROTOOPT ,"WSAENOPROTOOPT" },
  381. { WSAEPROTONOSUPPORT ,"WSAEPROTONOSUPPORT" },
  382. { WSAESOCKTNOSUPPORT ,"WSAESOCKTNOSUPPORT" },
  383. { WSAEOPNOTSUPP ,"WSAEOPNOTSUPP" },
  384. { WSAEPFNOSUPPORT ,"WSAEPFNOSUPPORT" },
  385. { WSAEAFNOSUPPORT ,"WSAEAFNOSUPPORT" },
  386. { WSAEADDRINUSE ,"WSAEADDRINUSE" },
  387. { WSAEADDRNOTAVAIL ,"WSAEADDRNOTAVAIL" },
  388. { WSAENETDOWN ,"WSAENETDOWN" },
  389. { WSAENETUNREACH ,"WSAENETUNREACH" },
  390. { WSAENETRESET ,"WSAENETRESET" },
  391. { WSAECONNABORTED ,"WSAECONNABORTED" },
  392. { WSAECONNRESET ,"WSAECONNRESET" },
  393. { WSAENOBUFS ,"WSAENOBUFS" },
  394. { WSAEISCONN ,"WSAEISCONN" },
  395. { WSAENOTCONN ,"WSAENOTCONN" },
  396. { WSAESHUTDOWN ,"WSAESHUTDOWN" },
  397. { WSAETOOMANYREFS ,"WSAETOOMANYREFS" },
  398. { WSAETIMEDOUT ,"WSAETIMEDOUT" },
  399. { WSAECONNREFUSED ,"WSAECONNREFUSED" },
  400. { WSAELOOP ,"WSAELOOP" },
  401. { WSAENAMETOOLONG ,"WSAENAMETOOLONG" },
  402. { WSAEHOSTDOWN ,"WSAEHOSTDOWN" },
  403. { WSAEHOSTUNREACH ,"WSAEHOSTUNREACH" },
  404. { WSAENOTEMPTY ,"WSAENOTEMPTY" },
  405. { WSAEPROCLIM ,"WSAEPROCLIM" },
  406. { WSAEUSERS ,"WSAEUSERS" },
  407. { WSAEDQUOT ,"WSAEDQUOT" },
  408. { WSAESTALE ,"WSAESTALE" },
  409. { WSAEREMOTE ,"WSAEREMOTE" },
  410. { WSASYSNOTREADY ,"WSASYSNOTREADY" },
  411. { WSAVERNOTSUPPORTED ,"WSAVERNOTSUPPORTED" },
  412. { WSANOTINITIALISED ,"WSANOTINITIALISED" },
  413. { WSAEDISCON ,"WSAEDISCON" },
  414. { WSAENOMORE ,"WSAENOMORE" },
  415. { WSAECANCELLED ,"WSAECANCELLED" },
  416. { WSAEINVALIDPROCTABLE ,"WSAEINVALIDPROCTABLE" },
  417. { WSAEINVALIDPROVIDER ,"WSAEINVALIDPROVIDER" },
  418. { WSAEPROVIDERFAILEDINIT ,"WSAEPROVIDERFAILEDINIT" },
  419. { WSASYSCALLFAILURE ,"WSASYSCALLFAILURE" },
  420. { WSASERVICE_NOT_FOUND ,"WSASERVICE_NOT_FOUND" },
  421. { WSATYPE_NOT_FOUND ,"WSATYPE_NOT_FOUND" },
  422. { WSA_E_NO_MORE ,"WSA_E_NO_MORE" },
  423. { WSA_E_CANCELLED ,"WSA_E_CANCELLED" },
  424. { WSAEREFUSED ,"WSAEREFUSED" },
  425. { WSAHOST_NOT_FOUND ,"WSAHOST_NOT_FOUND" },
  426. { WSATRY_AGAIN ,"WSATRY_AGAIN" },
  427. { WSANO_RECOVERY ,"WSANO_RECOVERY" },
  428. { WSANO_DATA ,"WSANO_DATA" },
  429. #ifdef WIN32
  430. { WSA_IO_PENDING ,"WSA_IO_PENDING" },
  431. { WSA_IO_INCOMPLETE ,"WSA_IO_INCOMPLETE" },
  432. { WSA_INVALID_HANDLE ,"WSA_INVALID_HANDLE" },
  433. { WSA_INVALID_PARAMETER ,"WSA_INVALID_PARAMETER" },
  434. { WSA_NOT_ENOUGH_MEMORY ,"WSA_NOT_ENOUGH_MEMORY" },
  435. { WSA_OPERATION_ABORTED ,"WSA_OPERATION_ABORTED" },
  436. { 0 ,"WSA_INVALID_EVENT" },
  437. { WSA_MAXIMUM_WAIT_EVENTS ,"WSA_MAXIMUM_WAIT_EVENTS" },
  438. { WSA_WAIT_FAILED ,"WSA_WAIT_FAILED" },
  439. // { WSA_WAIT_EVENT_0 ,"WSA_WAIT_EVENT_0" },
  440. { WSA_WAIT_IO_COMPLETION ,"WSA_WAIT_IO_COMPLETION" },
  441. { WSA_WAIT_TIMEOUT ,"WSA_WAIT_TIMEOUT" },
  442. { WSA_INFINITE ,"WSA_INFINITE" },
  443. #else /* WIN16 */
  444. { WSA_IO_PENDING ,"WSA_IO_PENDING" },
  445. { WSA_IO_INCOMPLETE ,"WSA_IO_INCOMPLETE" },
  446. { WSA_INVALID_HANDLE ,"WSA_INVALID_HANDLE" },
  447. { WSA_INVALID_PARAMETER ,"WSA_INVALID_PARAMETER" },
  448. { WSA_NOT_ENOUGH_MEMORY ,"WSA_NOT_ENOUGH_MEMORY" },
  449. { WSA_OPERATION_ABORTED ,"WSA_OPERATION_ABORTED" },
  450. ,"
  451. { (DWORD) WSA_INVALID_EVENT ,"WSA_INVALID_EVENT" },
  452. { WSA_MAXIMUM_WAIT_EVENTS ,"WSA_MAXIMUM_WAIT_EVENTS" },
  453. { WSA_WAIT_FAILED ,"WSA_WAIT_FAILED" },
  454. // { WSA_WAIT_EVENT_0 ,"WSA_WAIT_EVENT_0" },
  455. { WSA_WAIT_TIMEOUT ,"WSA_WAIT_TIMEOUT" },
  456. { WSA_INFINITE ,"WSA_INFINITE" },
  457. { ERROR_INSUFFICIENT_BUFFER, ,"ERROR_INSUFFICIENT_BUFFER" },
  458. #endif
  459. { 0 ,NULL }
  460. };
  461. char *aFuncNames[] =
  462. {
  463. "accept",
  464. "bind",
  465. "closesocket",
  466. "connect",
  467. "gethostbyaddr",
  468. "gethostbyname",
  469. "gethostname",
  470. "getpeername",
  471. "getprotobyname",
  472. "getprotobynumber",
  473. "getservbyname",
  474. "getservbyport",
  475. "getsockname",
  476. "getsockopt",
  477. "htonl",
  478. "htons",
  479. "inet_addr",
  480. "inet_ntoa",
  481. "ioctlsocket",
  482. "listen",
  483. "ntohl",
  484. "ntohs",
  485. "recv",
  486. "recvfrom",
  487. "//select",
  488. "send",
  489. "sendto",
  490. "setsockopt",
  491. "shutdown",
  492. "socket",
  493. "WSAAccept",
  494. "WSAAddressToStringA",
  495. "WSAAddressToStringW",
  496. "WSAAsyncGetHostByAddr",
  497. "WSAAsyncGetHostByName",
  498. "WSAAsyncGetProtoByName",
  499. "WSAAsyncGetProtoByNumber",
  500. "WSAAsyncGetServByName",
  501. "WSAAsyncGetServByPort",
  502. "WSAAsyncSelect",
  503. "WSACancelAsyncRequest",
  504. // "WSACancelBlockingCall",
  505. "WSACleanup",
  506. "WSACloseEvent",
  507. "WSAConnect",
  508. "WSACreateEvent",
  509. "WSADuplicateSocketA",
  510. "WSADuplicateSocketW",
  511. "WSAEnumNameSpaceProvidersA",
  512. "WSAEnumNameSpaceProvidersW",
  513. "WSAEnumNetworkEvents",
  514. "WSAEnumProtocolsA",
  515. "WSAEnumProtocolsW",
  516. "WSAEventSelect",
  517. "WSAGetLastError",
  518. "WSAGetOverlappedResult",
  519. "WSAGetQOSByName",
  520. "WSAGetServiceClassInfoA",
  521. "WSAGetServiceClassInfoW",
  522. "WSAGetServiceClassNameByClassIdA",
  523. "WSAGetServiceClassNameByClassIdW",
  524. "WSAHtonl",
  525. "WSAHtons",
  526. "//WSAInstallServiceClassA",
  527. "//WSAInstallServiceClassW",
  528. "WSAIoctl",
  529. // "WSAIsBlocking",
  530. "WSAJoinLeaf",
  531. "//WSALookupServiceBeginA",
  532. "//WSALookupServiceBeginW",
  533. "WSALookupServiceEnd",
  534. "WSALookupServiceNextA",
  535. "WSALookupServiceNextW",
  536. "WSANtohl",
  537. "WSANtohs",
  538. "WSARecv",
  539. "WSARecvDisconnect",
  540. "WSARecvFrom",
  541. "WSARemoveServiceClass",
  542. "WSAResetEvent",
  543. "WSASend",
  544. "WSASendDisconnect",
  545. "WSASendTo",
  546. // "WSASetBlockingHook",
  547. "WSASetEvent",
  548. "WSASetLastError",
  549. "//WSASetServiceA",
  550. "//WSASetServiceW",
  551. "WSASocketA",
  552. "WSASocketW",
  553. "WSAStartup",
  554. "WSAStringToAddressA",
  555. "WSAStringToAddressW",
  556. // "WSAUnhookBlockingHook",
  557. "//WSAWaitForMultipleEvents",
  558. "WSCEnumProtocols",
  559. "WSCGetProviderPath",
  560. "EnumProtocolsA",
  561. "EnumProtocolsW",
  562. "GetAddressByNameA",
  563. "GetAddressByNameW",
  564. "GetNameByTypeA",
  565. "GetNameByTypeW",
  566. "GetServiceA",
  567. "GetServiceW",
  568. "GetTypeByNameA",
  569. "GetTypeByNameW",
  570. "SetServiceA",
  571. "SetServiceW",
  572. // "Close handle (comm, etc)",
  573. // "Dump buffer contents",
  574. NULL,
  575. "Default values",
  576. "WSAPROTOCOL_INFO",
  577. "QOS",
  578. NULL
  579. };