Attachment "patch.txt" to
ticket [219237ffff]
added by
davygrvy
2003-04-23 03:55:17.
0000: 49 6e 64 65 78 3a 20 74 63 6c 57 69 6e 45 72 72 Index: tclWinErr
0010: 6f 72 2e 63 0a 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d or.c.===========
0020: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d ================
0030: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d ================
0040: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d ================
0050: 3d 3d 3d 3d 3d 3d 3d 3d 0a 52 43 53 20 66 69 6c ========.RCS fil
0060: 65 3a 20 2f 63 76 73 72 6f 6f 74 2f 74 63 6c 2f e: /cvsroot/tcl/
0070: 74 63 6c 2f 77 69 6e 2f 74 63 6c 57 69 6e 45 72 tcl/win/tclWinEr
0080: 72 6f 72 2e 63 2c 76 0a 72 65 74 72 69 65 76 69 ror.c,v.retrievi
0090: 6e 67 20 72 65 76 69 73 69 6f 6e 20 31 2e 35 0a ng revision 1.5.
00a0: 64 69 66 66 20 2d 63 20 2d 72 31 2e 35 20 74 63 diff -c -r1.5 tc
00b0: 6c 57 69 6e 45 72 72 6f 72 2e 63 0a 2a 2a 2a 20 lWinError.c.***
00c0: 74 63 6c 57 69 6e 45 72 72 6f 72 2e 63 09 32 37 tclWinError.c.27
00d0: 20 4d 61 79 20 32 30 30 32 20 31 30 3a 31 34 3a May 2002 10:14:
00e0: 32 31 20 2d 30 30 30 30 09 31 2e 35 0a 2d 2d 2d 21 -0000.1.5.---
00f0: 20 74 63 6c 57 69 6e 45 72 72 6f 72 2e 63 09 32 tclWinError.c.2
0100: 32 20 41 70 72 20 32 30 30 33 20 32 30 3a 35 31 2 Apr 2003 20:51
0110: 3a 35 32 20 2d 30 30 30 30 0a 2a 2a 2a 2a 2a 2a :52 -0000.******
0120: 2a 2a 2a 2a 2a 2a 2a 2a 2a 0a 2a 2a 2a 20 32 39 *********.*** 29
0130: 37 2c 33 30 33 20 2a 2a 2a 2a 0a 20 20 20 2a 20 7,303 ****. *
0140: 65 72 72 6e 6f 20 65 72 72 6f 72 73 2e 0a 20 20 errno errors..
0150: 20 2a 2f 0a 20 20 0a 21 20 73 74 61 74 69 63 20 */. .! static
0160: 69 6e 74 20 77 73 61 45 72 72 6f 72 54 61 62 6c int wsaErrorTabl
0170: 65 5b 5d 20 3d 20 7b 0a 20 20 20 20 20 20 45 57 e[] = {. EW
0180: 4f 55 4c 44 42 4c 4f 43 4b 2c 09 2f 2a 20 57 53 OULDBLOCK,./* WS
0190: 41 45 57 4f 55 4c 44 42 4c 4f 43 4b 20 2a 2f 0a AEWOULDBLOCK */.
01a0: 20 20 20 20 20 20 45 49 4e 50 52 4f 47 52 45 53 EINPROGRES
01b0: 53 2c 09 2f 2a 20 57 53 41 45 49 4e 50 52 4f 47 S,./* WSAEINPROG
01c0: 52 45 53 53 20 2a 2f 0a 20 20 20 20 20 20 45 41 RESS */. EA
01d0: 4c 52 45 41 44 59 2c 09 09 2f 2a 20 57 53 41 45 LREADY,../* WSAE
01e0: 41 4c 52 45 41 44 59 20 2a 2f 0a 2d 2d 2d 20 32 ALREADY */.--- 2
01f0: 39 37 2c 33 30 33 20 2d 2d 2d 2d 0a 20 20 20 2a 97,303 ----. *
0200: 20 65 72 72 6e 6f 20 65 72 72 6f 72 73 2e 0a 20 errno errors..
0210: 20 20 2a 2f 0a 20 20 0a 21 20 73 74 61 74 69 63 */. .! static
0220: 20 69 6e 74 20 77 73 61 45 72 72 6f 72 54 61 62 int wsaErrorTab
0230: 6c 65 31 5b 5d 20 3d 20 7b 0a 20 20 20 20 20 20 le1[] = {.
0240: 45 57 4f 55 4c 44 42 4c 4f 43 4b 2c 09 2f 2a 20 EWOULDBLOCK,./*
0250: 57 53 41 45 57 4f 55 4c 44 42 4c 4f 43 4b 20 2a WSAEWOULDBLOCK *
0260: 2f 0a 20 20 20 20 20 20 45 49 4e 50 52 4f 47 52 /. EINPROGR
0270: 45 53 53 2c 09 2f 2a 20 57 53 41 45 49 4e 50 52 ESS,./* WSAEINPR
0280: 4f 47 52 45 53 53 20 2a 2f 0a 20 20 20 20 20 20 OGRESS */.
0290: 45 41 4c 52 45 41 44 59 2c 09 09 2f 2a 20 57 53 EALREADY,../* WS
02a0: 41 45 41 4c 52 45 41 44 59 20 2a 2f 0a 2a 2a 2a AEALREADY */.***
02b0: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 0a 2a 2a 2a ************.***
02c0: 20 33 33 36 2c 33 34 31 20 2a 2a 2a 2a 0a 2d 2d 336,341 ****.--
02d0: 2d 20 33 33 36 2c 34 31 34 20 2d 2d 2d 2d 0a 20 - 336,414 ----.
02e0: 20 20 20 20 20 45 53 54 41 4c 45 2c 09 09 2f 2a ESTALE,../*
02f0: 20 57 53 41 45 53 54 41 4c 45 20 2a 2f 0a 20 20 WSAESTALE */.
0300: 20 20 20 20 45 52 45 4d 4f 54 45 2c 09 09 2f 2a EREMOTE,../*
0310: 20 57 53 41 45 52 45 4d 4f 54 45 20 2a 2f 0a 20 WSAEREMOTE */.
0320: 20 7d 3b 0a 2b 20 0a 2b 20 2f 2a 0a 2b 20 20 2a };.+ .+ /*.+ *
0330: 20 54 68 65 73 65 20 65 72 72 6f 72 20 63 6f 64 These error cod
0340: 65 73 20 61 72 65 20 76 65 72 79 20 77 69 6e 64 es are very wind
0350: 6f 77 73 20 73 70 65 63 69 66 69 63 20 61 6e 64 ows specific and
0360: 20 68 61 76 65 20 6e 6f 20 50 4f 53 49 58 0a 2b have no POSIX.+
0370: 20 20 2a 20 74 72 61 6e 73 6c 61 74 69 6f 6e 2c * translation,
0380: 20 79 65 74 2e 0a 2b 20 20 2a 0a 2b 20 20 2a 20 yet..+ *.+ *
0390: 54 4f 44 4f 3a 20 46 69 78 6d 65 21 0a 2b 20 20 TODO: Fixme!.+
03a0: 2a 2f 0a 2b 20 0a 2b 20 73 74 61 74 69 63 20 69 */.+ .+ static i
03b0: 6e 74 20 77 73 61 45 72 72 6f 72 54 61 62 6c 65 nt wsaErrorTable
03c0: 32 5b 5d 20 3d 20 7b 0a 2b 20 20 20 20 20 45 49 2[] = {.+ EI
03d0: 4e 56 41 4c 2c 09 09 2f 2a 20 57 53 41 53 59 53 NVAL,../* WSASYS
03e0: 4e 4f 54 52 45 41 44 59 09 20 20 20 20 57 53 41 NOTREADY. WSA
03f0: 53 74 61 72 74 75 70 20 63 61 6e 6e 6f 74 20 66 Startup cannot f
0400: 75 6e 63 74 69 6f 6e 20 61 74 20 74 68 69 73 20 unction at this
0410: 74 69 6d 65 20 62 65 63 61 75 73 65 20 74 68 65 time because the
0420: 20 75 6e 64 65 72 6c 79 69 6e 67 20 73 79 73 74 underlying syst
0430: 65 6d 20 69 74 20 75 73 65 73 20 74 6f 20 70 72 em it uses to pr
0440: 6f 76 69 64 65 20 6e 65 74 77 6f 72 6b 20 73 65 ovide network se
0450: 72 76 69 63 65 73 20 69 73 20 63 75 72 72 65 6e rvices is curren
0460: 74 6c 79 20 75 6e 61 76 61 69 6c 61 62 6c 65 2e tly unavailable.
0470: 20 2a 2f 0a 2b 20 20 20 20 20 45 49 4e 56 41 4c */.+ EINVAL
0480: 2c 09 09 2f 2a 20 57 53 41 56 45 52 4e 4f 54 53 ,../* WSAVERNOTS
0490: 55 50 50 4f 52 54 45 44 09 20 20 20 20 54 68 65 UPPORTED. The
04a0: 20 57 69 6e 64 6f 77 73 20 53 6f 63 6b 65 74 73 Windows Sockets
04b0: 20 76 65 72 73 69 6f 6e 20 72 65 71 75 65 73 74 version request
04c0: 65 64 20 69 73 20 6e 6f 74 20 73 75 70 70 6f 72 ed is not suppor
04d0: 74 65 64 2e 20 2a 2f 0a 2b 20 20 20 20 20 45 49 ted. */.+ EI
04e0: 4e 56 41 4c 2c 09 09 2f 2a 20 57 53 41 4e 4f 54 NVAL,../* WSANOT
04f0: 49 4e 49 54 49 41 4c 49 53 45 44 09 20 20 20 20 INITIALISED.
0500: 45 69 74 68 65 72 20 74 68 65 20 61 70 70 6c 69 Either the appli
0510: 63 61 74 69 6f 6e 20 68 61 73 20 6e 6f 74 20 63 cation has not c
0520: 61 6c 6c 65 64 20 57 53 41 53 74 61 72 74 75 70 alled WSAStartup
0530: 2c 20 6f 72 20 57 53 41 53 74 61 72 74 75 70 20 , or WSAStartup
0540: 66 61 69 6c 65 64 2e 20 2a 2f 0a 2b 20 20 20 20 failed. */.+
0550: 20 30 2c 0a 2b 20 20 20 20 20 30 2c 0a 2b 20 20 0,.+ 0,.+
0560: 20 20 20 30 2c 0a 2b 20 20 20 20 20 30 2c 0a 2b 0,.+ 0,.+
0570: 20 20 20 20 20 30 2c 0a 2b 20 20 20 20 20 30 2c 0,.+ 0,
0580: 0a 2b 20 20 20 20 20 30 2c 0a 2b 20 20 20 20 20 .+ 0,.+
0590: 45 49 4e 56 41 4c 2c 09 09 2f 2a 20 57 53 41 45 EINVAL,../* WSAE
05a0: 44 49 53 43 4f 4e 09 09 20 20 20 20 52 65 74 75 DISCON.. Retu
05b0: 72 6e 65 64 20 62 79 20 57 53 41 52 65 63 76 20 rned by WSARecv
05c0: 6f 72 20 57 53 41 52 65 63 76 46 72 6f 6d 20 74 or WSARecvFrom t
05d0: 6f 20 69 6e 64 69 63 61 74 65 20 74 68 65 20 72 o indicate the r
05e0: 65 6d 6f 74 65 20 70 61 72 74 79 20 68 61 73 20 emote party has
05f0: 69 6e 69 74 69 61 74 65 64 20 61 20 67 72 61 63 initiated a grac
0600: 65 66 75 6c 20 73 68 75 74 64 6f 77 6e 20 73 65 eful shutdown se
0610: 71 75 65 6e 63 65 2e 20 2a 2f 0a 2b 20 20 20 20 quence. */.+
0620: 20 45 49 4e 56 41 4c 2c 09 09 2f 2a 20 57 53 41 EINVAL,../* WSA
0630: 45 4e 4f 4d 4f 52 45 09 09 20 20 20 20 4e 6f 20 ENOMORE.. No
0640: 6d 6f 72 65 20 72 65 73 75 6c 74 73 20 63 61 6e more results can
0650: 20 62 65 20 72 65 74 75 72 6e 65 64 20 62 79 20 be returned by
0660: 57 53 41 4c 6f 6f 6b 75 70 53 65 72 76 69 63 65 WSALookupService
0670: 4e 65 78 74 2e 20 2a 2f 0a 2b 20 20 20 20 20 45 Next. */.+ E
0680: 49 4e 56 41 4c 2c 09 09 2f 2a 20 57 53 41 45 43 INVAL,../* WSAEC
0690: 41 4e 43 45 4c 4c 45 44 09 20 20 20 20 41 20 63 ANCELLED. A c
06a0: 61 6c 6c 20 74 6f 20 57 53 41 4c 6f 6f 6b 75 70 all to WSALookup
06b0: 53 65 72 76 69 63 65 45 6e 64 20 77 61 73 20 6d ServiceEnd was m
06c0: 61 64 65 20 77 68 69 6c 65 20 74 68 69 73 20 63 ade while this c
06d0: 61 6c 6c 20 77 61 73 20 73 74 69 6c 6c 20 70 72 all was still pr
06e0: 6f 63 65 73 73 69 6e 67 2e 20 54 68 65 20 63 61 ocessing. The ca
06f0: 6c 6c 20 68 61 73 20 62 65 65 6e 20 63 61 6e 63 ll has been canc
0700: 65 6c 65 64 2e 20 2a 2f 0a 2b 20 20 20 20 20 45 eled. */.+ E
0710: 49 4e 56 41 4c 2c 09 09 2f 2a 20 57 53 41 45 49 INVAL,../* WSAEI
0720: 4e 56 41 4c 49 44 50 52 4f 43 54 41 42 4c 45 09 NVALIDPROCTABLE.
0730: 20 20 20 20 54 68 65 20 70 72 6f 63 65 64 75 72 The procedur
0740: 65 20 63 61 6c 6c 20 74 61 62 6c 65 20 69 73 20 e call table is
0750: 69 6e 76 61 6c 69 64 2e 20 2a 2f 0a 2b 20 20 20 invalid. */.+
0760: 20 20 45 49 4e 56 41 4c 2c 09 09 2f 2a 20 57 53 EINVAL,../* WS
0770: 41 45 49 4e 56 41 4c 49 44 50 52 4f 56 49 44 45 AEINVALIDPROVIDE
0780: 52 09 20 20 20 20 54 68 65 20 72 65 71 75 65 73 R. The reques
0790: 74 65 64 20 73 65 72 76 69 63 65 20 70 72 6f 76 ted service prov
07a0: 69 64 65 72 20 69 73 20 69 6e 76 61 6c 69 64 2e ider is invalid.
07b0: 20 2a 2f 0a 2b 20 20 20 20 20 45 49 4e 56 41 4c */.+ EINVAL
07c0: 2c 09 09 2f 2a 20 57 53 41 45 50 52 4f 56 49 44 ,../* WSAEPROVID
07d0: 45 52 46 41 49 4c 45 44 49 4e 49 54 20 20 20 54 ERFAILEDINIT T
07e0: 68 65 20 72 65 71 75 65 73 74 65 64 20 73 65 72 he requested ser
07f0: 76 69 63 65 20 70 72 6f 76 69 64 65 72 20 63 6f vice provider co
0800: 75 6c 64 20 6e 6f 74 20 62 65 20 6c 6f 61 64 65 uld not be loade
0810: 64 20 6f 72 20 69 6e 69 74 69 61 6c 69 7a 65 64 d or initialized
0820: 2e 20 2a 2f 0a 2b 20 20 20 20 20 45 49 4e 56 41 . */.+ EINVA
0830: 4c 2c 09 09 2f 2a 20 57 53 41 53 59 53 43 41 4c L,../* WSASYSCAL
0840: 4c 46 41 49 4c 55 52 45 09 20 20 20 20 41 20 73 LFAILURE. A s
0850: 79 73 74 65 6d 20 63 61 6c 6c 20 74 68 61 74 20 ystem call that
0860: 73 68 6f 75 6c 64 20 6e 65 76 65 72 20 66 61 69 should never fai
0870: 6c 20 68 61 73 20 66 61 69 6c 65 64 2e 20 2a 2f l has failed. */
0880: 0a 2b 20 20 20 20 20 45 49 4e 56 41 4c 2c 09 09 .+ EINVAL,..
0890: 2f 2a 20 57 53 41 53 45 52 56 49 43 45 5f 4e 4f /* WSASERVICE_NO
08a0: 54 5f 46 4f 55 4e 44 09 20 20 20 20 4e 6f 20 73 T_FOUND. No s
08b0: 75 63 68 20 73 65 72 76 69 63 65 20 69 73 20 6b uch service is k
08c0: 6e 6f 77 6e 2e 20 54 68 65 20 73 65 72 76 69 63 nown. The servic
08d0: 65 20 63 61 6e 6e 6f 74 20 62 65 20 66 6f 75 6e e cannot be foun
08e0: 64 20 69 6e 20 74 68 65 20 73 70 65 63 69 66 69 d in the specifi
08f0: 65 64 20 6e 61 6d 65 20 73 70 61 63 65 2e 20 2a ed name space. *
0900: 2f 0a 2b 20 20 20 20 20 45 49 4e 56 41 4c 2c 09 /.+ EINVAL,.
0910: 09 2f 2a 20 57 53 41 54 59 50 45 5f 4e 4f 54 5f ./* WSATYPE_NOT_
0920: 46 4f 55 4e 44 09 20 20 20 20 54 68 65 20 73 70 FOUND. The sp
0930: 65 63 69 66 69 65 64 20 63 6c 61 73 73 20 77 61 ecified class wa
0940: 73 20 6e 6f 74 20 66 6f 75 6e 64 2e 20 2a 2f 0a s not found. */.
0950: 2b 20 20 20 20 20 45 49 4e 56 41 4c 2c 09 09 2f + EINVAL,../
0960: 2a 20 57 53 41 5f 45 5f 4e 4f 5f 4d 4f 52 45 09 * WSA_E_NO_MORE.
0970: 20 20 20 20 4e 6f 20 6d 6f 72 65 20 72 65 73 75 No more resu
0980: 6c 74 73 20 63 61 6e 20 62 65 20 72 65 74 75 72 lts can be retur
0990: 6e 65 64 20 62 79 20 57 53 41 4c 6f 6f 6b 75 70 ned by WSALookup
09a0: 53 65 72 76 69 63 65 4e 65 78 74 2e 20 2a 2f 0a ServiceNext. */.
09b0: 2b 20 20 20 20 20 45 49 4e 56 41 4c 2c 09 09 2f + EINVAL,../
09c0: 2a 20 57 53 41 5f 45 5f 43 41 4e 43 45 4c 4c 45 * WSA_E_CANCELLE
09d0: 44 09 20 20 20 20 41 20 63 61 6c 6c 20 74 6f 20 D. A call to
09e0: 57 53 41 4c 6f 6f 6b 75 70 53 65 72 76 69 63 65 WSALookupService
09f0: 45 6e 64 20 77 61 73 20 6d 61 64 65 20 77 68 69 End was made whi
0a00: 6c 65 20 74 68 69 73 20 63 61 6c 6c 20 77 61 73 le this call was
0a10: 20 73 74 69 6c 6c 20 70 72 6f 63 65 73 73 69 6e still processin
0a20: 67 2e 20 54 68 65 20 63 61 6c 6c 20 68 61 73 20 g. The call has
0a30: 62 65 65 6e 20 63 61 6e 63 65 6c 65 64 2e 20 2a been canceled. *
0a40: 2f 0a 2b 20 20 20 20 20 45 49 4e 56 41 4c 2c 09 /.+ EINVAL,.
0a50: 09 2f 2a 20 57 53 41 45 52 45 46 55 53 45 44 09 ./* WSAEREFUSED.
0a60: 09 20 20 20 20 41 20 64 61 74 61 62 61 73 65 20 . A database
0a70: 71 75 65 72 79 20 66 61 69 6c 65 64 20 62 65 63 query failed bec
0a80: 61 75 73 65 20 69 74 20 77 61 73 20 61 63 74 69 ause it was acti
0a90: 76 65 6c 79 20 72 65 66 75 73 65 64 2e 20 2a 2f vely refused. */
0aa0: 0a 2b 20 7d 3b 0a 2b 20 0a 2b 20 2f 2a 0a 2b 20 .+ };.+ .+ /*.+
0ab0: 20 2a 20 54 68 65 73 65 20 65 72 72 6f 72 20 63 * These error c
0ac0: 6f 64 65 73 20 61 72 65 20 76 65 72 79 20 77 69 odes are very wi
0ad0: 6e 64 6f 77 73 20 73 70 65 63 69 66 69 63 20 61 ndows specific a
0ae0: 6e 64 20 68 61 76 65 20 6e 6f 20 50 4f 53 49 58 nd have no POSIX
0af0: 0a 2b 20 20 2a 20 74 72 61 6e 73 6c 61 74 69 6f .+ * translatio
0b00: 6e 2c 20 79 65 74 2e 0a 2b 20 20 2a 0a 2b 20 20 n, yet..+ *.+
0b10: 2a 20 54 4f 44 4f 3a 20 46 69 78 6d 65 21 0a 2b * TODO: Fixme!.+
0b20: 20 20 2a 2f 0a 2b 20 0a 2b 20 73 74 61 74 69 63 */.+ .+ static
0b30: 20 69 6e 74 20 77 73 61 45 72 72 6f 72 54 61 62 int wsaErrorTab
0b40: 6c 65 33 5b 5d 20 3d 20 7b 0a 2b 20 20 20 20 20 le3[] = {.+
0b50: 45 49 4e 56 41 4c 2c 09 2f 2a 20 57 53 41 48 4f EINVAL,./* WSAHO
0b60: 53 54 5f 4e 4f 54 5f 46 4f 55 4e 44 2c 09 41 75 ST_NOT_FOUND,.Au
0b70: 74 68 6f 72 69 74 61 74 69 76 65 20 41 6e 73 77 thoritative Answ
0b80: 65 72 3a 20 48 6f 73 74 20 6e 6f 74 20 66 6f 75 er: Host not fou
0b90: 6e 64 20 2a 2f 0a 2b 20 20 20 20 20 45 49 4e 56 nd */.+ EINV
0ba0: 41 4c 2c 09 2f 2a 20 57 53 41 54 52 59 5f 41 47 AL,./* WSATRY_AG
0bb0: 41 49 4e 2c 09 4e 6f 6e 2d 41 75 74 68 6f 72 69 AIN,.Non-Authori
0bc0: 74 61 74 69 76 65 3a 20 48 6f 73 74 20 6e 6f 74 tative: Host not
0bd0: 20 66 6f 75 6e 64 2c 20 6f 72 20 53 45 52 56 45 found, or SERVE
0be0: 52 46 41 49 4c 20 2a 2f 0a 2b 20 20 20 20 20 45 RFAIL */.+ E
0bf0: 49 4e 56 41 4c 2c 09 2f 2a 20 57 53 41 4e 4f 5f INVAL,./* WSANO_
0c00: 52 45 43 4f 56 45 52 59 2c 09 4e 6f 6e 2d 72 65 RECOVERY,.Non-re
0c10: 63 6f 76 65 72 61 62 6c 65 20 65 72 72 6f 72 73 coverable errors
0c20: 2c 20 46 4f 52 4d 45 52 52 2c 20 52 45 46 55 53 , FORMERR, REFUS
0c30: 45 44 2c 20 4e 4f 54 49 4d 50 20 2a 2f 0a 2b 20 ED, NOTIMP */.+
0c40: 20 20 20 20 45 49 4e 56 41 4c 2c 09 2f 2a 20 57 EINVAL,./* W
0c50: 53 41 4e 4f 5f 44 41 54 41 2c 09 09 56 61 6c 69 SANO_DATA,..Vali
0c60: 64 20 6e 61 6d 65 2c 20 6e 6f 20 64 61 74 61 20 d name, no data
0c70: 72 65 63 6f 72 64 20 6f 66 20 72 65 71 75 65 73 record of reques
0c80: 74 65 64 20 74 79 70 65 20 2a 2f 0a 2b 20 20 20 ted type */.+
0c90: 20 20 45 49 4e 56 41 4c 2c 09 2f 2a 20 57 53 41 EINVAL,./* WSA
0ca0: 5f 51 4f 53 5f 52 45 43 45 49 56 45 52 53 2c 09 _QOS_RECEIVERS,.
0cb0: 09 61 74 20 6c 65 61 73 74 20 6f 6e 65 20 52 65 .at least one Re
0cc0: 73 65 72 76 65 20 68 61 73 20 61 72 72 69 76 65 serve has arrive
0cd0: 64 20 2a 2f 0a 2b 20 20 20 20 20 45 49 4e 56 41 d */.+ EINVA
0ce0: 4c 2c 09 2f 2a 20 57 53 41 5f 51 4f 53 5f 53 45 L,./* WSA_QOS_SE
0cf0: 4e 44 45 52 53 2c 09 09 61 74 20 6c 65 61 73 74 NDERS,..at least
0d00: 20 6f 6e 65 20 50 61 74 68 20 68 61 73 20 61 72 one Path has ar
0d10: 72 69 76 65 64 20 2a 2f 0a 2b 20 20 20 20 20 45 rived */.+ E
0d20: 49 4e 56 41 4c 2c 09 2f 2a 20 57 53 41 5f 51 4f INVAL,./* WSA_QO
0d30: 53 5f 4e 4f 5f 53 45 4e 44 45 52 53 2c 09 09 74 S_NO_SENDERS,..t
0d40: 68 65 72 65 20 61 72 65 20 6e 6f 20 73 65 6e 64 here are no send
0d50: 65 72 73 20 2a 2f 0a 2b 20 20 20 20 20 45 49 4e ers */.+ EIN
0d60: 56 41 4c 2c 09 2f 2a 20 57 53 41 5f 51 4f 53 5f VAL,./* WSA_QOS_
0d70: 4e 4f 5f 52 45 43 45 49 56 45 52 53 2c 09 74 68 NO_RECEIVERS,.th
0d80: 65 72 65 20 61 72 65 20 6e 6f 20 72 65 63 65 69 ere are no recei
0d90: 76 65 72 73 20 2a 2f 0a 2b 20 20 20 20 20 45 49 vers */.+ EI
0da0: 4e 56 41 4c 2c 09 2f 2a 20 57 53 41 5f 51 4f 53 NVAL,./* WSA_QOS
0db0: 5f 52 45 51 55 45 53 54 5f 43 4f 4e 46 49 52 4d _REQUEST_CONFIRM
0dc0: 45 44 2c 09 52 65 73 65 72 76 65 20 68 61 73 20 ED,.Reserve has
0dd0: 62 65 65 6e 20 63 6f 6e 66 69 72 6d 65 64 20 2a been confirmed *
0de0: 2f 0a 2b 20 20 20 20 20 45 49 4e 56 41 4c 2c 09 /.+ EINVAL,.
0df0: 2f 2a 20 57 53 41 5f 51 4f 53 5f 41 44 4d 49 53 /* WSA_QOS_ADMIS
0e00: 53 49 4f 4e 5f 46 41 49 4c 55 52 45 2c 09 65 72 SION_FAILURE,.er
0e10: 72 6f 72 20 64 75 65 20 74 6f 20 6c 61 63 6b 20 ror due to lack
0e20: 6f 66 20 72 65 73 6f 75 72 63 65 73 20 2a 2f 0a of resources */.
0e30: 2b 20 20 20 20 20 45 49 4e 56 41 4c 2c 09 2f 2a + EINVAL,./*
0e40: 20 57 53 41 5f 51 4f 53 5f 50 4f 4c 49 43 59 5f WSA_QOS_POLICY_
0e50: 46 41 49 4c 55 52 45 2c 09 72 65 6a 65 63 74 65 FAILURE,.rejecte
0e60: 64 20 66 6f 72 20 61 64 6d 69 6e 69 73 74 72 61 d for administra
0e70: 74 69 76 65 20 72 65 61 73 6f 6e 73 20 2d 20 62 tive reasons - b
0e80: 61 64 20 63 72 65 64 65 6e 74 69 61 6c 73 20 2a ad credentials *
0e90: 2f 0a 2b 20 20 20 20 20 45 49 4e 56 41 4c 2c 09 /.+ EINVAL,.
0ea0: 2f 2a 20 57 53 41 5f 51 4f 53 5f 42 41 44 5f 53 /* WSA_QOS_BAD_S
0eb0: 54 59 4c 45 2c 09 09 75 6e 6b 6e 6f 77 6e 20 6f TYLE,..unknown o
0ec0: 72 20 63 6f 6e 66 6c 69 63 74 69 6e 67 20 73 74 r conflicting st
0ed0: 79 6c 65 20 2a 2f 0a 2b 20 20 20 20 20 45 49 4e yle */.+ EIN
0ee0: 56 41 4c 2c 09 2f 2a 20 57 53 41 5f 51 4f 53 5f VAL,./* WSA_QOS_
0ef0: 42 41 44 5f 4f 42 4a 45 43 54 2c 09 09 70 72 6f BAD_OBJECT,..pro
0f00: 62 6c 65 6d 20 77 69 74 68 20 73 6f 6d 65 20 70 blem with some p
0f10: 61 72 74 20 6f 66 20 74 68 65 20 66 69 6c 74 65 art of the filte
0f20: 72 73 70 65 63 20 6f 72 20 70 72 6f 76 69 64 65 rspec or provide
0f30: 72 73 70 65 63 69 66 69 63 20 62 75 66 66 65 72 rspecific buffer
0f40: 20 69 6e 20 67 65 6e 65 72 61 6c 20 2a 2f 0a 2b in general */.+
0f50: 20 20 20 20 20 45 49 4e 56 41 4c 2c 09 2f 2a 20 EINVAL,./*
0f60: 57 53 41 5f 51 4f 53 5f 54 52 41 46 46 49 43 5f WSA_QOS_TRAFFIC_
0f70: 43 54 52 4c 5f 45 52 52 4f 52 2c 09 70 72 6f 62 CTRL_ERROR,.prob
0f80: 6c 65 6d 20 77 69 74 68 20 73 6f 6d 65 20 70 61 lem with some pa
0f90: 72 74 20 6f 66 20 74 68 65 20 66 6c 6f 77 73 70 rt of the flowsp
0fa0: 65 63 20 2a 2f 0a 2b 20 20 20 20 20 45 49 4e 56 ec */.+ EINV
0fb0: 41 4c 2c 09 2f 2a 20 57 53 41 5f 51 4f 53 5f 47 AL,./* WSA_QOS_G
0fc0: 45 4e 45 52 49 43 5f 45 52 52 4f 52 2c 09 67 65 ENERIC_ERROR,.ge
0fd0: 6e 65 72 61 6c 20 65 72 72 6f 72 20 2a 2f 0a 2b neral error */.+
0fe0: 20 20 20 20 20 45 49 4e 56 41 4c 2c 09 2f 2a 20 EINVAL,./*
0ff0: 57 53 41 5f 51 4f 53 5f 45 53 45 52 56 49 43 45 WSA_QOS_ESERVICE
1000: 54 59 50 45 2c 09 69 6e 76 61 6c 69 64 20 73 65 TYPE,.invalid se
1010: 72 76 69 63 65 20 74 79 70 65 20 69 6e 20 66 6c rvice type in fl
1020: 6f 77 73 70 65 63 20 2a 2f 0a 2b 20 20 20 20 20 owspec */.+
1030: 45 49 4e 56 41 4c 2c 09 2f 2a 20 57 53 41 5f 51 EINVAL,./* WSA_Q
1040: 4f 53 5f 45 46 4c 4f 57 53 50 45 43 2c 09 09 69 OS_EFLOWSPEC,..i
1050: 6e 76 61 6c 69 64 20 66 6c 6f 77 73 70 65 63 20 nvalid flowspec
1060: 2a 2f 0a 2b 20 20 20 20 20 45 49 4e 56 41 4c 2c */.+ EINVAL,
1070: 09 2f 2a 20 57 53 41 5f 51 4f 53 5f 45 50 52 4f ./* WSA_QOS_EPRO
1080: 56 53 50 45 43 42 55 46 2c 09 69 6e 76 61 6c 69 VSPECBUF,.invali
1090: 64 20 70 72 6f 76 69 64 65 72 20 73 70 65 63 69 d provider speci
10a0: 66 69 63 20 62 75 66 66 65 72 20 2a 2f 0a 2b 20 fic buffer */.+
10b0: 20 20 20 20 45 49 4e 56 41 4c 2c 09 2f 2a 20 57 EINVAL,./* W
10c0: 53 41 5f 51 4f 53 5f 45 46 49 4c 54 45 52 53 54 SA_QOS_EFILTERST
10d0: 59 4c 45 2c 09 69 6e 76 61 6c 69 64 20 66 69 6c YLE,.invalid fil
10e0: 74 65 72 20 73 74 79 6c 65 20 2a 2f 0a 2b 20 20 ter style */.+
10f0: 20 20 20 45 49 4e 56 41 4c 2c 09 2f 2a 20 57 53 EINVAL,./* WS
1100: 41 5f 51 4f 53 5f 45 46 49 4c 54 45 52 54 59 50 A_QOS_EFILTERTYP
1110: 45 2c 09 09 69 6e 76 61 6c 69 64 20 66 69 6c 74 E,..invalid filt
1120: 65 72 20 74 79 70 65 20 2a 2f 0a 2b 20 20 20 20 er type */.+
1130: 20 45 49 4e 56 41 4c 2c 09 2f 2a 20 57 53 41 5f EINVAL,./* WSA_
1140: 51 4f 53 5f 45 46 49 4c 54 45 52 43 4f 55 4e 54 QOS_EFILTERCOUNT
1150: 2c 09 69 6e 63 6f 72 72 65 63 74 20 6e 75 6d 62 ,.incorrect numb
1160: 65 72 20 6f 66 20 66 69 6c 74 65 72 73 20 2a 2f er of filters */
1170: 0a 2b 20 20 20 20 20 45 49 4e 56 41 4c 2c 09 2f .+ EINVAL,./
1180: 2a 20 57 53 41 5f 51 4f 53 5f 45 4f 42 4a 4c 45 * WSA_QOS_EOBJLE
1190: 4e 47 54 48 2c 09 09 69 6e 76 61 6c 69 64 20 6f NGTH,..invalid o
11a0: 62 6a 65 63 74 20 6c 65 6e 67 74 68 20 2a 2f 0a bject length */.
11b0: 2b 20 20 20 20 20 45 49 4e 56 41 4c 2c 09 2f 2a + EINVAL,./*
11c0: 20 57 53 41 5f 51 4f 53 5f 45 46 4c 4f 57 43 4f WSA_QOS_EFLOWCO
11d0: 55 4e 54 2c 09 09 69 6e 63 6f 72 72 65 63 74 20 UNT,..incorrect
11e0: 6e 75 6d 62 65 72 20 6f 66 20 66 6c 6f 77 73 20 number of flows
11f0: 2a 2f 0a 2b 20 20 20 20 20 45 49 4e 56 41 4c 2c */.+ EINVAL,
1200: 09 2f 2a 20 57 53 41 5f 51 4f 53 5f 45 55 4e 4b ./* WSA_QOS_EUNK
1210: 4f 57 4e 50 53 4f 42 4a 2c 09 75 6e 6b 6e 6f 77 OWNPSOBJ,.unknow
1220: 6e 20 6f 62 6a 65 63 74 20 69 6e 20 70 72 6f 76 n object in prov
1230: 69 64 65 72 20 73 70 65 63 69 66 69 63 20 62 75 ider specific bu
1240: 66 66 65 72 20 2a 2f 0a 2b 20 20 20 20 20 45 49 ffer */.+ EI
1250: 4e 56 41 4c 2c 09 2f 2a 20 57 53 41 5f 51 4f 53 NVAL,./* WSA_QOS
1260: 5f 45 50 4f 4c 49 43 59 4f 42 4a 2c 09 09 69 6e _EPOLICYOBJ,..in
1270: 76 61 6c 69 64 20 70 6f 6c 69 63 79 20 6f 62 6a valid policy obj
1280: 65 63 74 20 69 6e 20 70 72 6f 76 69 64 65 72 20 ect in provider
1290: 73 70 65 63 69 66 69 63 20 62 75 66 66 65 72 20 specific buffer
12a0: 2a 2f 0a 2b 20 20 20 20 20 45 49 4e 56 41 4c 2c */.+ EINVAL,
12b0: 09 2f 2a 20 57 53 41 5f 51 4f 53 5f 45 46 4c 4f ./* WSA_QOS_EFLO
12c0: 57 44 45 53 43 2c 09 09 69 6e 76 61 6c 69 64 20 WDESC,..invalid
12d0: 66 6c 6f 77 20 64 65 73 63 72 69 70 74 6f 72 20 flow descriptor
12e0: 69 6e 20 74 68 65 20 6c 69 73 74 20 2a 2f 0a 2b in the list */.+
12f0: 20 20 20 20 20 45 49 4e 56 41 4c 2c 09 2f 2a 20 EINVAL,./*
1300: 57 53 41 5f 51 4f 53 5f 45 50 53 46 4c 4f 57 53 WSA_QOS_EPSFLOWS
1310: 50 45 43 2c 09 09 69 6e 63 6f 6e 73 69 73 74 65 PEC,..inconsiste
1320: 6e 74 20 66 6c 6f 77 20 73 70 65 63 20 69 6e 20 nt flow spec in
1330: 70 72 6f 76 69 64 65 72 20 73 70 65 63 69 66 69 provider specifi
1340: 63 20 62 75 66 66 65 72 20 2a 2f 0a 2b 20 20 20 c buffer */.+
1350: 20 20 45 49 4e 56 41 4c 2c 09 2f 2a 20 57 53 41 EINVAL,./* WSA
1360: 5f 51 4f 53 5f 45 50 53 46 49 4c 54 45 52 53 50 _QOS_EPSFILTERSP
1370: 45 43 2c 09 69 6e 76 61 6c 69 64 20 66 69 6c 74 EC,.invalid filt
1380: 65 72 20 73 70 65 63 20 69 6e 20 70 72 6f 76 69 er spec in provi
1390: 64 65 72 20 73 70 65 63 69 66 69 63 20 62 75 66 der specific buf
13a0: 66 65 72 20 2a 2f 0a 2b 20 20 20 20 20 45 49 4e fer */.+ EIN
13b0: 56 41 4c 2c 09 2f 2a 20 57 53 41 5f 51 4f 53 5f VAL,./* WSA_QOS_
13c0: 45 53 44 4d 4f 44 45 4f 42 4a 2c 09 09 69 6e 76 ESDMODEOBJ,..inv
13d0: 61 6c 69 64 20 73 68 61 70 65 20 64 69 73 63 61 alid shape disca
13e0: 72 64 20 6d 6f 64 65 20 6f 62 6a 65 63 74 20 69 rd mode object i
13f0: 6e 20 70 72 6f 76 69 64 65 72 20 73 70 65 63 69 n provider speci
1400: 66 69 63 20 62 75 66 66 65 72 20 2a 2f 0a 2b 20 fic buffer */.+
1410: 20 20 20 20 45 49 4e 56 41 4c 2c 09 2f 2a 20 57 EINVAL,./* W
1420: 53 41 5f 51 4f 53 5f 45 53 48 41 50 45 52 41 54 SA_QOS_ESHAPERAT
1430: 45 4f 42 4a 2c 09 69 6e 76 61 6c 69 64 20 73 68 EOBJ,.invalid sh
1440: 61 70 69 6e 67 20 72 61 74 65 20 6f 62 6a 65 63 aping rate objec
1450: 74 20 69 6e 20 70 72 6f 76 69 64 65 72 20 73 70 t in provider sp
1460: 65 63 69 66 69 63 20 62 75 66 66 65 72 20 2a 2f ecific buffer */
1470: 0a 2b 20 20 20 20 20 45 49 4e 56 41 4c 2c 09 2f .+ EINVAL,./
1480: 2a 20 57 53 41 5f 51 4f 53 5f 52 45 53 45 52 56 * WSA_QOS_RESERV
1490: 45 44 5f 50 45 54 59 50 45 2c 09 72 65 73 65 72 ED_PETYPE,.reser
14a0: 76 65 64 20 70 6f 6c 69 63 79 20 65 6c 65 6d 65 ved policy eleme
14b0: 6e 74 20 69 6e 20 70 72 6f 76 69 64 65 72 20 73 nt in provider s
14c0: 70 65 63 69 66 69 63 20 62 75 66 66 65 72 20 2a pecific buffer *
14d0: 2f 0a 2b 20 7d 3b 0a 20 20 0c 0a 20 20 2f 2a 0a /.+ };. .. /*.
14e0: 20 20 20 2a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d *------------
14f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1500: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1510: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1520: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 2a 2a 2a 2a 2a ----------.*****
1530: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 0a 2a 2a 2a 20 33 **********.*** 3
1540: 38 32 2c 33 39 31 20 2a 2a 2a 2a 0a 20 20 0a 20 82,391 ****. .
1550: 20 76 6f 69 64 0a 20 20 54 63 6c 57 69 6e 43 6f void. TclWinCo
1560: 6e 76 65 72 74 57 53 41 45 72 72 6f 72 28 65 72 nvertWSAError(er
1570: 72 43 6f 64 65 29 0a 21 20 20 20 20 20 44 57 4f rCode).! DWO
1580: 52 44 20 65 72 72 43 6f 64 65 3b 09 09 2f 2a 20 RD errCode;../*
1590: 57 69 6e 33 32 20 65 72 72 6f 72 20 63 6f 64 65 Win32 error code
15a0: 2e 20 2a 2f 0a 20 20 7b 0a 20 20 20 20 20 20 69 . */. {. i
15b0: 66 20 28 28 65 72 72 43 6f 64 65 20 3e 3d 20 57 f ((errCode >= W
15c0: 53 41 45 57 4f 55 4c 44 42 4c 4f 43 4b 29 20 26 SAEWOULDBLOCK) &
15d0: 26 20 28 65 72 72 43 6f 64 65 20 3c 3d 20 57 53 & (errCode <= WS
15e0: 41 45 52 45 4d 4f 54 45 29 29 20 7b 0a 21 20 09 AEREMOTE)) {.! .
15f0: 54 63 6c 5f 53 65 74 45 72 72 6e 6f 28 77 73 61 Tcl_SetErrno(wsa
1600: 45 72 72 6f 72 54 61 62 6c 65 5b 65 72 72 43 6f ErrorTable[errCo
1610: 64 65 20 2d 20 57 53 41 45 57 4f 55 4c 44 42 4c de - WSAEWOULDBL
1620: 4f 43 4b 5d 29 3b 0a 20 20 20 20 20 20 7d 20 65 OCK]);. } e
1630: 6c 73 65 20 7b 0a 20 20 09 54 63 6c 5f 53 65 74 lse {. .Tcl_Set
1640: 45 72 72 6e 6f 28 45 49 4e 56 41 4c 29 3b 0a 20 Errno(EINVAL);.
1650: 20 20 20 20 20 7d 0a 2d 2d 2d 20 34 35 35 2c 34 }.--- 455,4
1660: 36 38 20 2d 2d 2d 2d 0a 20 20 0a 20 20 76 6f 69 68 ----. . voi
1670: 64 0a 20 20 54 63 6c 57 69 6e 43 6f 6e 76 65 72 d. TclWinConver
1680: 74 57 53 41 45 72 72 6f 72 28 65 72 72 43 6f 64 tWSAError(errCod
1690: 65 29 0a 21 20 20 20 20 20 44 57 4f 52 44 20 65 e).! DWORD e
16a0: 72 72 43 6f 64 65 3b 09 09 2f 2a 20 57 69 6e 73 rrCode;../* Wins
16b0: 6f 63 6b 20 65 72 72 6f 72 20 63 6f 64 65 2e 20 ock error code.
16c0: 2a 2f 0a 20 20 7b 0a 20 20 20 20 20 20 69 66 20 */. {. if
16d0: 28 28 65 72 72 43 6f 64 65 20 3e 3d 20 57 53 41 ((errCode >= WSA
16e0: 45 57 4f 55 4c 44 42 4c 4f 43 4b 29 20 26 26 20 EWOULDBLOCK) &&
16f0: 28 65 72 72 43 6f 64 65 20 3c 3d 20 57 53 41 45 (errCode <= WSAE
1700: 52 45 4d 4f 54 45 29 29 20 7b 0a 21 20 09 54 63 REMOTE)) {.! .Tc
1710: 6c 5f 53 65 74 45 72 72 6e 6f 28 77 73 61 45 72 l_SetErrno(wsaEr
1720: 72 6f 72 54 61 62 6c 65 31 5b 65 72 72 43 6f 64 rorTable1[errCod
1730: 65 20 2d 20 57 53 41 45 57 4f 55 4c 44 42 4c 4f e - WSAEWOULDBLO
1740: 43 4b 5d 29 3b 0a 21 20 20 20 20 20 7d 20 65 6c CK]);.! } el
1750: 73 65 20 69 66 20 28 28 65 72 72 43 6f 64 65 20 se if ((errCode
1760: 3e 3d 20 57 53 41 53 59 53 4e 4f 54 52 45 41 44 >= WSASYSNOTREAD
1770: 59 29 20 26 26 20 28 65 72 72 43 6f 64 65 20 3c Y) && (errCode <
1780: 3d 20 57 53 41 45 52 45 46 55 53 45 44 29 29 20 = WSAEREFUSED))
1790: 7b 0a 21 20 09 54 63 6c 5f 53 65 74 45 72 72 6e {.! .Tcl_SetErrn
17a0: 6f 28 77 73 61 45 72 72 6f 72 54 61 62 6c 65 32 o(wsaErrorTable2
17b0: 5b 65 72 72 43 6f 64 65 20 2d 20 57 53 41 53 59 [errCode - WSASY
17c0: 53 4e 4f 54 52 45 41 44 59 5d 29 3b 0a 21 20 20 SNOTREADY]);.!
17d0: 20 20 20 7d 20 65 6c 73 65 20 69 66 20 28 28 65 } else if ((e
17e0: 72 72 43 6f 64 65 20 3e 3d 20 57 53 41 48 4f 53 rrCode >= WSAHOS
17f0: 54 5f 4e 4f 54 5f 46 4f 55 4e 44 29 20 26 26 20 T_NOT_FOUND) &&
1800: 28 65 72 72 43 6f 64 65 20 3c 3d 20 57 53 41 5f (errCode <= WSA_
1810: 51 4f 53 5f 52 45 53 45 52 56 45 44 5f 50 45 54 QOS_RESERVED_PET
1820: 59 50 45 29 29 20 7b 0a 21 20 09 54 63 6c 5f 53 YPE)) {.! .Tcl_S
1830: 65 74 45 72 72 6e 6f 28 77 73 61 45 72 72 6f 72 etErrno(wsaError
1840: 54 61 62 6c 65 33 5b 65 72 72 43 6f 64 65 20 2d Table3[errCode -
1850: 20 57 53 41 48 4f 53 54 5f 4e 4f 54 5f 46 4f 55 WSAHOST_NOT_FOU
1860: 4e 44 5d 29 3b 0a 20 20 20 20 20 20 7d 20 65 6c ND]);. } el
1870: 73 65 20 7b 0a 20 20 09 54 63 6c 5f 53 65 74 45 se {. .Tcl_SetE
1880: 72 72 6e 6f 28 45 49 4e 56 41 4c 29 3b 0a 20 20 rrno(EINVAL);.
1890: 20 20 20 20 7d 0a }.