3 Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>
4 This program and the accompanying materials are licensed and made available under
5 the terms and conditions of the BSD License that accompanies this distribution.
6 The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 /* Windows socket errors (WSA*) */
21 * Pull in the system error definitions
24 static PyMethodDef errno_methods
[] = {
28 /* Helper function doing the dictionary inserting */
31 _inscode(PyObject
*d
, PyObject
*de
, char *name
, int code
)
33 PyObject
*u
= PyString_FromString(name
);
34 PyObject
*v
= PyInt_FromLong((long) code
);
36 /* Don't bother checking for errors; they'll be caught at the end
37 * of the module initialization function by the caller of
41 /* insert in modules dict */
42 PyDict_SetItem(d
, u
, v
);
43 /* insert in errorcode dict */
44 PyDict_SetItem(de
, v
, u
);
50 PyDoc_STRVAR(errno__doc__
,
51 "This module makes available standard errno system symbols.\n\
53 The value of each symbol is the corresponding integer value,\n\
54 e.g., on most systems, errno.ENOENT equals the integer 2.\n\
56 The dictionary errno.errorcode maps numeric codes to symbol names,\n\
57 e.g., errno.errorcode[2] could be the string 'ENOENT'.\n\
59 Symbols that are not relevant to the underlying system are not defined.\n\
61 To map error codes to error messages, use the function os.strerror(),\n\
62 e.g. os.strerror(2) could return 'No such file or directory'.");
68 m
= Py_InitModule3("errno", errno_methods
, errno__doc__
);
71 d
= PyModule_GetDict(m
);
73 if (!d
|| !de
|| PyDict_SetItemString(d
, "errorcode", de
) < 0)
76 /* Macro so I don't have to edit each and every line below... */
77 #define inscode(d, ds, de, name, code, comment) _inscode(d, de, name, code)
80 * The names and comments are borrowed from linux/include/errno.h,
81 * which should be pretty all-inclusive
85 inscode(d
, ds
, de
, "ENODEV", ENODEV
, "No such device");
88 inscode(d
, ds
, de
, "ENOCSI", ENOCSI
, "No CSI structure available");
91 inscode(d
, ds
, de
, "EHOSTUNREACH", EHOSTUNREACH
, "No route to host");
93 #ifdef WSAEHOSTUNREACH
94 inscode(d
, ds
, de
, "EHOSTUNREACH", WSAEHOSTUNREACH
, "No route to host");
98 inscode(d
, ds
, de
, "ENOMSG", ENOMSG
, "No message of desired type");
101 inscode(d
, ds
, de
, "EUCLEAN", EUCLEAN
, "Structure needs cleaning");
104 inscode(d
, ds
, de
, "EL2NSYNC", EL2NSYNC
, "Level 2 not synchronized");
107 inscode(d
, ds
, de
, "EL2HLT", EL2HLT
, "Level 2 halted");
110 inscode(d
, ds
, de
, "ENODATA", ENODATA
, "No data available");
113 inscode(d
, ds
, de
, "ENOTBLK", ENOTBLK
, "Block device required");
116 inscode(d
, ds
, de
, "ENOSYS", ENOSYS
, "Function not implemented");
119 inscode(d
, ds
, de
, "EPIPE", EPIPE
, "Broken pipe");
122 inscode(d
, ds
, de
, "EINVAL", EINVAL
, "Invalid argument");
125 inscode(d
, ds
, de
, "EINVAL", WSAEINVAL
, "Invalid argument");
129 inscode(d
, ds
, de
, "EOVERFLOW", EOVERFLOW
, "Value too large for defined data type");
132 inscode(d
, ds
, de
, "EADV", EADV
, "Advertise error");
135 inscode(d
, ds
, de
, "EINTR", EINTR
, "Interrupted system call");
138 inscode(d
, ds
, de
, "EINTR", WSAEINTR
, "Interrupted system call");
142 inscode(d
, ds
, de
, "EUSERS", EUSERS
, "Too many users");
145 inscode(d
, ds
, de
, "EUSERS", WSAEUSERS
, "Too many users");
149 inscode(d
, ds
, de
, "ENOTEMPTY", ENOTEMPTY
, "Directory not empty");
152 inscode(d
, ds
, de
, "ENOTEMPTY", WSAENOTEMPTY
, "Directory not empty");
156 inscode(d
, ds
, de
, "ENOBUFS", ENOBUFS
, "No buffer space available");
159 inscode(d
, ds
, de
, "ENOBUFS", WSAENOBUFS
, "No buffer space available");
163 inscode(d
, ds
, de
, "EPROTO", EPROTO
, "Protocol error");
166 inscode(d
, ds
, de
, "EREMOTE", EREMOTE
, "Object is remote");
169 inscode(d
, ds
, de
, "EREMOTE", WSAEREMOTE
, "Object is remote");
173 inscode(d
, ds
, de
, "ENAVAIL", ENAVAIL
, "No XENIX semaphores available");
176 inscode(d
, ds
, de
, "ECHILD", ECHILD
, "No child processes");
179 inscode(d
, ds
, de
, "ELOOP", ELOOP
, "Too many symbolic links encountered");
182 inscode(d
, ds
, de
, "ELOOP", WSAELOOP
, "Too many symbolic links encountered");
186 inscode(d
, ds
, de
, "EXDEV", EXDEV
, "Cross-device link");
189 inscode(d
, ds
, de
, "E2BIG", E2BIG
, "Arg list too long");
192 inscode(d
, ds
, de
, "ESRCH", ESRCH
, "No such process");
195 inscode(d
, ds
, de
, "EMSGSIZE", EMSGSIZE
, "Message too long");
198 inscode(d
, ds
, de
, "EMSGSIZE", WSAEMSGSIZE
, "Message too long");
202 inscode(d
, ds
, de
, "EAFNOSUPPORT", EAFNOSUPPORT
, "Address family not supported by protocol");
204 #ifdef WSAEAFNOSUPPORT
205 inscode(d
, ds
, de
, "EAFNOSUPPORT", WSAEAFNOSUPPORT
, "Address family not supported by protocol");
209 inscode(d
, ds
, de
, "EBADR", EBADR
, "Invalid request descriptor");
212 inscode(d
, ds
, de
, "EHOSTDOWN", EHOSTDOWN
, "Host is down");
215 inscode(d
, ds
, de
, "EHOSTDOWN", WSAEHOSTDOWN
, "Host is down");
219 inscode(d
, ds
, de
, "EPFNOSUPPORT", EPFNOSUPPORT
, "Protocol family not supported");
221 #ifdef WSAEPFNOSUPPORT
222 inscode(d
, ds
, de
, "EPFNOSUPPORT", WSAEPFNOSUPPORT
, "Protocol family not supported");
226 inscode(d
, ds
, de
, "ENOPROTOOPT", ENOPROTOOPT
, "Protocol not available");
228 #ifdef WSAENOPROTOOPT
229 inscode(d
, ds
, de
, "ENOPROTOOPT", WSAENOPROTOOPT
, "Protocol not available");
233 inscode(d
, ds
, de
, "EBUSY", EBUSY
, "Device or resource busy");
236 inscode(d
, ds
, de
, "EWOULDBLOCK", EWOULDBLOCK
, "Operation would block");
238 #ifdef WSAEWOULDBLOCK
239 inscode(d
, ds
, de
, "EWOULDBLOCK", WSAEWOULDBLOCK
, "Operation would block");
243 inscode(d
, ds
, de
, "EBADFD", EBADFD
, "File descriptor in bad state");
246 inscode(d
, ds
, de
, "EDOTDOT", EDOTDOT
, "RFS specific error");
249 inscode(d
, ds
, de
, "EISCONN", EISCONN
, "Transport endpoint is already connected");
252 inscode(d
, ds
, de
, "EISCONN", WSAEISCONN
, "Transport endpoint is already connected");
256 inscode(d
, ds
, de
, "ENOANO", ENOANO
, "No anode");
259 inscode(d
, ds
, de
, "ESHUTDOWN", ESHUTDOWN
, "Cannot send after transport endpoint shutdown");
262 inscode(d
, ds
, de
, "ESHUTDOWN", WSAESHUTDOWN
, "Cannot send after transport endpoint shutdown");
266 inscode(d
, ds
, de
, "ECHRNG", ECHRNG
, "Channel number out of range");
269 inscode(d
, ds
, de
, "ELIBBAD", ELIBBAD
, "Accessing a corrupted shared library");
272 inscode(d
, ds
, de
, "ENONET", ENONET
, "Machine is not on the network");
275 inscode(d
, ds
, de
, "EBADE", EBADE
, "Invalid exchange");
278 inscode(d
, ds
, de
, "EBADF", EBADF
, "Bad file number");
281 inscode(d
, ds
, de
, "EBADF", WSAEBADF
, "Bad file number");
285 inscode(d
, ds
, de
, "EMULTIHOP", EMULTIHOP
, "Multihop attempted");
288 inscode(d
, ds
, de
, "EIO", EIO
, "I/O error");
291 inscode(d
, ds
, de
, "EUNATCH", EUNATCH
, "Protocol driver not attached");
294 inscode(d
, ds
, de
, "EPROTOTYPE", EPROTOTYPE
, "Protocol wrong type for socket");
297 inscode(d
, ds
, de
, "EPROTOTYPE", WSAEPROTOTYPE
, "Protocol wrong type for socket");
301 inscode(d
, ds
, de
, "ENOSPC", ENOSPC
, "No space left on device");
304 inscode(d
, ds
, de
, "ENOEXEC", ENOEXEC
, "Exec format error");
307 inscode(d
, ds
, de
, "EALREADY", EALREADY
, "Operation already in progress");
310 inscode(d
, ds
, de
, "EALREADY", WSAEALREADY
, "Operation already in progress");
314 inscode(d
, ds
, de
, "ENETDOWN", ENETDOWN
, "Network is down");
317 inscode(d
, ds
, de
, "ENETDOWN", WSAENETDOWN
, "Network is down");
321 inscode(d
, ds
, de
, "ENOTNAM", ENOTNAM
, "Not a XENIX named type file");
324 inscode(d
, ds
, de
, "EACCES", EACCES
, "Permission denied");
327 inscode(d
, ds
, de
, "EACCES", WSAEACCES
, "Permission denied");
331 inscode(d
, ds
, de
, "ELNRNG", ELNRNG
, "Link number out of range");
334 inscode(d
, ds
, de
, "EILSEQ", EILSEQ
, "Illegal byte sequence");
337 inscode(d
, ds
, de
, "ENOTDIR", ENOTDIR
, "Not a directory");
340 inscode(d
, ds
, de
, "ENOTUNIQ", ENOTUNIQ
, "Name not unique on network");
343 inscode(d
, ds
, de
, "EPERM", EPERM
, "Operation not permitted");
346 inscode(d
, ds
, de
, "EDOM", EDOM
, "Math argument out of domain of func");
349 inscode(d
, ds
, de
, "EXFULL", EXFULL
, "Exchange full");
352 inscode(d
, ds
, de
, "ECONNREFUSED", ECONNREFUSED
, "Connection refused");
354 #ifdef WSAECONNREFUSED
355 inscode(d
, ds
, de
, "ECONNREFUSED", WSAECONNREFUSED
, "Connection refused");
359 inscode(d
, ds
, de
, "EISDIR", EISDIR
, "Is a directory");
361 #ifdef EPROTONOSUPPORT
362 inscode(d
, ds
, de
, "EPROTONOSUPPORT", EPROTONOSUPPORT
, "Protocol not supported");
364 #ifdef WSAEPROTONOSUPPORT
365 inscode(d
, ds
, de
, "EPROTONOSUPPORT", WSAEPROTONOSUPPORT
, "Protocol not supported");
369 inscode(d
, ds
, de
, "EROFS", EROFS
, "Read-only file system");
372 inscode(d
, ds
, de
, "EADDRNOTAVAIL", EADDRNOTAVAIL
, "Cannot assign requested address");
374 #ifdef WSAEADDRNOTAVAIL
375 inscode(d
, ds
, de
, "EADDRNOTAVAIL", WSAEADDRNOTAVAIL
, "Cannot assign requested address");
379 inscode(d
, ds
, de
, "EIDRM", EIDRM
, "Identifier removed");
382 inscode(d
, ds
, de
, "ECOMM", ECOMM
, "Communication error on send");
385 inscode(d
, ds
, de
, "ESRMNT", ESRMNT
, "Srmount error");
388 inscode(d
, ds
, de
, "EREMOTEIO", EREMOTEIO
, "Remote I/O error");
391 inscode(d
, ds
, de
, "EL3RST", EL3RST
, "Level 3 reset");
394 inscode(d
, ds
, de
, "EBADMSG", EBADMSG
, "Not a data message");
397 inscode(d
, ds
, de
, "ENFILE", ENFILE
, "File table overflow");
400 inscode(d
, ds
, de
, "ELIBMAX", ELIBMAX
, "Attempting to link in too many shared libraries");
403 inscode(d
, ds
, de
, "ESPIPE", ESPIPE
, "Illegal seek");
406 inscode(d
, ds
, de
, "ENOLINK", ENOLINK
, "Link has been severed");
409 inscode(d
, ds
, de
, "ENETRESET", ENETRESET
, "Network dropped connection because of reset");
412 inscode(d
, ds
, de
, "ENETRESET", WSAENETRESET
, "Network dropped connection because of reset");
416 inscode(d
, ds
, de
, "ETIMEDOUT", ETIMEDOUT
, "Connection timed out");
419 inscode(d
, ds
, de
, "ETIMEDOUT", WSAETIMEDOUT
, "Connection timed out");
423 inscode(d
, ds
, de
, "ENOENT", ENOENT
, "No such file or directory");
426 inscode(d
, ds
, de
, "EEXIST", EEXIST
, "File exists");
429 inscode(d
, ds
, de
, "EDQUOT", EDQUOT
, "Quota exceeded");
432 inscode(d
, ds
, de
, "EDQUOT", WSAEDQUOT
, "Quota exceeded");
436 inscode(d
, ds
, de
, "ENOSTR", ENOSTR
, "Device not a stream");
439 inscode(d
, ds
, de
, "EBADSLT", EBADSLT
, "Invalid slot");
442 inscode(d
, ds
, de
, "EBADRQC", EBADRQC
, "Invalid request code");
445 inscode(d
, ds
, de
, "ELIBACC", ELIBACC
, "Can not access a needed shared library");
448 inscode(d
, ds
, de
, "EFAULT", EFAULT
, "Bad address");
451 inscode(d
, ds
, de
, "EFAULT", WSAEFAULT
, "Bad address");
455 inscode(d
, ds
, de
, "EFBIG", EFBIG
, "File too large");
458 inscode(d
, ds
, de
, "EDEADLK", EDEADLK
, "Resource deadlock would occur");
461 inscode(d
, ds
, de
, "ENOTCONN", ENOTCONN
, "Transport endpoint is not connected");
464 inscode(d
, ds
, de
, "ENOTCONN", WSAENOTCONN
, "Transport endpoint is not connected");
468 inscode(d
, ds
, de
, "EDESTADDRREQ", EDESTADDRREQ
, "Destination address required");
470 #ifdef WSAEDESTADDRREQ
471 inscode(d
, ds
, de
, "EDESTADDRREQ", WSAEDESTADDRREQ
, "Destination address required");
475 inscode(d
, ds
, de
, "ELIBSCN", ELIBSCN
, ".lib section in a.out corrupted");
478 inscode(d
, ds
, de
, "ENOLCK", ENOLCK
, "No record locks available");
481 inscode(d
, ds
, de
, "EISNAM", EISNAM
, "Is a named type file");
484 inscode(d
, ds
, de
, "ECONNABORTED", ECONNABORTED
, "Software caused connection abort");
486 #ifdef WSAECONNABORTED
487 inscode(d
, ds
, de
, "ECONNABORTED", WSAECONNABORTED
, "Software caused connection abort");
491 inscode(d
, ds
, de
, "ENETUNREACH", ENETUNREACH
, "Network is unreachable");
493 #ifdef WSAENETUNREACH
494 inscode(d
, ds
, de
, "ENETUNREACH", WSAENETUNREACH
, "Network is unreachable");
498 inscode(d
, ds
, de
, "ESTALE", ESTALE
, "Stale NFS file handle");
501 inscode(d
, ds
, de
, "ESTALE", WSAESTALE
, "Stale NFS file handle");
505 inscode(d
, ds
, de
, "ENOSR", ENOSR
, "Out of streams resources");
508 inscode(d
, ds
, de
, "ENOMEM", ENOMEM
, "Out of memory");
511 inscode(d
, ds
, de
, "ENOTSOCK", ENOTSOCK
, "Socket operation on non-socket");
514 inscode(d
, ds
, de
, "ENOTSOCK", WSAENOTSOCK
, "Socket operation on non-socket");
518 inscode(d
, ds
, de
, "ESTRPIPE", ESTRPIPE
, "Streams pipe error");
521 inscode(d
, ds
, de
, "EMLINK", EMLINK
, "Too many links");
524 inscode(d
, ds
, de
, "ERANGE", ERANGE
, "Math result not representable");
527 inscode(d
, ds
, de
, "ELIBEXEC", ELIBEXEC
, "Cannot exec a shared library directly");
530 inscode(d
, ds
, de
, "EL3HLT", EL3HLT
, "Level 3 halted");
533 inscode(d
, ds
, de
, "ECONNRESET", ECONNRESET
, "Connection reset by peer");
536 inscode(d
, ds
, de
, "ECONNRESET", WSAECONNRESET
, "Connection reset by peer");
540 inscode(d
, ds
, de
, "EADDRINUSE", EADDRINUSE
, "Address already in use");
543 inscode(d
, ds
, de
, "EADDRINUSE", WSAEADDRINUSE
, "Address already in use");
547 inscode(d
, ds
, de
, "EOPNOTSUPP", EOPNOTSUPP
, "Operation not supported on transport endpoint");
550 inscode(d
, ds
, de
, "EOPNOTSUPP", WSAEOPNOTSUPP
, "Operation not supported on transport endpoint");
554 inscode(d
, ds
, de
, "EREMCHG", EREMCHG
, "Remote address changed");
557 inscode(d
, ds
, de
, "EAGAIN", EAGAIN
, "Try again");
560 inscode(d
, ds
, de
, "ENAMETOOLONG", ENAMETOOLONG
, "File name too long");
562 #ifdef WSAENAMETOOLONG
563 inscode(d
, ds
, de
, "ENAMETOOLONG", WSAENAMETOOLONG
, "File name too long");
567 inscode(d
, ds
, de
, "ENOTTY", ENOTTY
, "Not a typewriter");
570 inscode(d
, ds
, de
, "ERESTART", ERESTART
, "Interrupted system call should be restarted");
572 #ifdef ESOCKTNOSUPPORT
573 inscode(d
, ds
, de
, "ESOCKTNOSUPPORT", ESOCKTNOSUPPORT
, "Socket type not supported");
575 #ifdef WSAESOCKTNOSUPPORT
576 inscode(d
, ds
, de
, "ESOCKTNOSUPPORT", WSAESOCKTNOSUPPORT
, "Socket type not supported");
580 inscode(d
, ds
, de
, "ETIME", ETIME
, "Timer expired");
583 inscode(d
, ds
, de
, "EBFONT", EBFONT
, "Bad font file format");
586 inscode(d
, ds
, de
, "EDEADLOCK", EDEADLOCK
, "Error EDEADLOCK");
589 inscode(d
, ds
, de
, "ETOOMANYREFS", ETOOMANYREFS
, "Too many references: cannot splice");
591 #ifdef WSAETOOMANYREFS
592 inscode(d
, ds
, de
, "ETOOMANYREFS", WSAETOOMANYREFS
, "Too many references: cannot splice");
596 inscode(d
, ds
, de
, "EMFILE", EMFILE
, "Too many open files");
599 inscode(d
, ds
, de
, "EMFILE", WSAEMFILE
, "Too many open files");
603 inscode(d
, ds
, de
, "ETXTBSY", ETXTBSY
, "Text file busy");
606 inscode(d
, ds
, de
, "EINPROGRESS", EINPROGRESS
, "Operation now in progress");
608 #ifdef WSAEINPROGRESS
609 inscode(d
, ds
, de
, "EINPROGRESS", WSAEINPROGRESS
, "Operation now in progress");
613 inscode(d
, ds
, de
, "ENXIO", ENXIO
, "No such device or address");
616 inscode(d
, ds
, de
, "ENOPKG", ENOPKG
, "Package not installed");
619 inscode(d
, ds
, de
, "WSASY", WSASY
, "Error WSASY");
622 inscode(d
, ds
, de
, "WSAEHOSTDOWN", WSAEHOSTDOWN
, "Host is down");
625 inscode(d
, ds
, de
, "WSAENETDOWN", WSAENETDOWN
, "Network is down");
628 inscode(d
, ds
, de
, "WSAENOTSOCK", WSAENOTSOCK
, "Socket operation on non-socket");
630 #ifdef WSAEHOSTUNREACH
631 inscode(d
, ds
, de
, "WSAEHOSTUNREACH", WSAEHOSTUNREACH
, "No route to host");
634 inscode(d
, ds
, de
, "WSAELOOP", WSAELOOP
, "Too many symbolic links encountered");
637 inscode(d
, ds
, de
, "WSAEMFILE", WSAEMFILE
, "Too many open files");
640 inscode(d
, ds
, de
, "WSAESTALE", WSAESTALE
, "Stale NFS file handle");
642 #ifdef WSAVERNOTSUPPORTED
643 inscode(d
, ds
, de
, "WSAVERNOTSUPPORTED", WSAVERNOTSUPPORTED
, "Error WSAVERNOTSUPPORTED");
645 #ifdef WSAENETUNREACH
646 inscode(d
, ds
, de
, "WSAENETUNREACH", WSAENETUNREACH
, "Network is unreachable");
649 inscode(d
, ds
, de
, "WSAEPROCLIM", WSAEPROCLIM
, "Error WSAEPROCLIM");
652 inscode(d
, ds
, de
, "WSAEFAULT", WSAEFAULT
, "Bad address");
654 #ifdef WSANOTINITIALISED
655 inscode(d
, ds
, de
, "WSANOTINITIALISED", WSANOTINITIALISED
, "Error WSANOTINITIALISED");
658 inscode(d
, ds
, de
, "WSAEUSERS", WSAEUSERS
, "Too many users");
660 #ifdef WSAMAKEASYNCREPL
661 inscode(d
, ds
, de
, "WSAMAKEASYNCREPL", WSAMAKEASYNCREPL
, "Error WSAMAKEASYNCREPL");
663 #ifdef WSAENOPROTOOPT
664 inscode(d
, ds
, de
, "WSAENOPROTOOPT", WSAENOPROTOOPT
, "Protocol not available");
666 #ifdef WSAECONNABORTED
667 inscode(d
, ds
, de
, "WSAECONNABORTED", WSAECONNABORTED
, "Software caused connection abort");
669 #ifdef WSAENAMETOOLONG
670 inscode(d
, ds
, de
, "WSAENAMETOOLONG", WSAENAMETOOLONG
, "File name too long");
673 inscode(d
, ds
, de
, "WSAENOTEMPTY", WSAENOTEMPTY
, "Directory not empty");
676 inscode(d
, ds
, de
, "WSAESHUTDOWN", WSAESHUTDOWN
, "Cannot send after transport endpoint shutdown");
678 #ifdef WSAEAFNOSUPPORT
679 inscode(d
, ds
, de
, "WSAEAFNOSUPPORT", WSAEAFNOSUPPORT
, "Address family not supported by protocol");
681 #ifdef WSAETOOMANYREFS
682 inscode(d
, ds
, de
, "WSAETOOMANYREFS", WSAETOOMANYREFS
, "Too many references: cannot splice");
685 inscode(d
, ds
, de
, "WSAEACCES", WSAEACCES
, "Permission denied");
688 inscode(d
, ds
, de
, "WSATR", WSATR
, "Error WSATR");
691 inscode(d
, ds
, de
, "WSABASEERR", WSABASEERR
, "Error WSABASEERR");
694 inscode(d
, ds
, de
, "WSADESCRIPTIO", WSADESCRIPTIO
, "Error WSADESCRIPTIO");
697 inscode(d
, ds
, de
, "WSAEMSGSIZE", WSAEMSGSIZE
, "Message too long");
700 inscode(d
, ds
, de
, "WSAEBADF", WSAEBADF
, "Bad file number");
703 inscode(d
, ds
, de
, "WSAECONNRESET", WSAECONNRESET
, "Connection reset by peer");
705 #ifdef WSAGETSELECTERRO
706 inscode(d
, ds
, de
, "WSAGETSELECTERRO", WSAGETSELECTERRO
, "Error WSAGETSELECTERRO");
709 inscode(d
, ds
, de
, "WSAETIMEDOUT", WSAETIMEDOUT
, "Connection timed out");
712 inscode(d
, ds
, de
, "WSAENOBUFS", WSAENOBUFS
, "No buffer space available");
715 inscode(d
, ds
, de
, "WSAEDISCON", WSAEDISCON
, "Error WSAEDISCON");
718 inscode(d
, ds
, de
, "WSAEINTR", WSAEINTR
, "Interrupted system call");
721 inscode(d
, ds
, de
, "WSAEPROTOTYPE", WSAEPROTOTYPE
, "Protocol wrong type for socket");
724 inscode(d
, ds
, de
, "WSAHOS", WSAHOS
, "Error WSAHOS");
727 inscode(d
, ds
, de
, "WSAEADDRINUSE", WSAEADDRINUSE
, "Address already in use");
729 #ifdef WSAEADDRNOTAVAIL
730 inscode(d
, ds
, de
, "WSAEADDRNOTAVAIL", WSAEADDRNOTAVAIL
, "Cannot assign requested address");
733 inscode(d
, ds
, de
, "WSAEALREADY", WSAEALREADY
, "Operation already in progress");
735 #ifdef WSAEPROTONOSUPPORT
736 inscode(d
, ds
, de
, "WSAEPROTONOSUPPORT", WSAEPROTONOSUPPORT
, "Protocol not supported");
738 #ifdef WSASYSNOTREADY
739 inscode(d
, ds
, de
, "WSASYSNOTREADY", WSASYSNOTREADY
, "Error WSASYSNOTREADY");
741 #ifdef WSAEWOULDBLOCK
742 inscode(d
, ds
, de
, "WSAEWOULDBLOCK", WSAEWOULDBLOCK
, "Operation would block");
744 #ifdef WSAEPFNOSUPPORT
745 inscode(d
, ds
, de
, "WSAEPFNOSUPPORT", WSAEPFNOSUPPORT
, "Protocol family not supported");
748 inscode(d
, ds
, de
, "WSAEOPNOTSUPP", WSAEOPNOTSUPP
, "Operation not supported on transport endpoint");
751 inscode(d
, ds
, de
, "WSAEISCONN", WSAEISCONN
, "Transport endpoint is already connected");
754 inscode(d
, ds
, de
, "WSAEDQUOT", WSAEDQUOT
, "Quota exceeded");
757 inscode(d
, ds
, de
, "WSAENOTCONN", WSAENOTCONN
, "Transport endpoint is not connected");
760 inscode(d
, ds
, de
, "WSAEREMOTE", WSAEREMOTE
, "Object is remote");
763 inscode(d
, ds
, de
, "WSAEINVAL", WSAEINVAL
, "Invalid argument");
765 #ifdef WSAEINPROGRESS
766 inscode(d
, ds
, de
, "WSAEINPROGRESS", WSAEINPROGRESS
, "Operation now in progress");
768 #ifdef WSAGETSELECTEVEN
769 inscode(d
, ds
, de
, "WSAGETSELECTEVEN", WSAGETSELECTEVEN
, "Error WSAGETSELECTEVEN");
771 #ifdef WSAESOCKTNOSUPPORT
772 inscode(d
, ds
, de
, "WSAESOCKTNOSUPPORT", WSAESOCKTNOSUPPORT
, "Socket type not supported");
774 #ifdef WSAGETASYNCERRO
775 inscode(d
, ds
, de
, "WSAGETASYNCERRO", WSAGETASYNCERRO
, "Error WSAGETASYNCERRO");
777 #ifdef WSAMAKESELECTREPL
778 inscode(d
, ds
, de
, "WSAMAKESELECTREPL", WSAMAKESELECTREPL
, "Error WSAMAKESELECTREPL");
780 #ifdef WSAGETASYNCBUFLE
781 inscode(d
, ds
, de
, "WSAGETASYNCBUFLE", WSAGETASYNCBUFLE
, "Error WSAGETASYNCBUFLE");
783 #ifdef WSAEDESTADDRREQ
784 inscode(d
, ds
, de
, "WSAEDESTADDRREQ", WSAEDESTADDRREQ
, "Destination address required");
786 #ifdef WSAECONNREFUSED
787 inscode(d
, ds
, de
, "WSAECONNREFUSED", WSAECONNREFUSED
, "Connection refused");
790 inscode(d
, ds
, de
, "WSAENETRESET", WSAENETRESET
, "Network dropped connection because of reset");
793 inscode(d
, ds
, de
, "WSAN", WSAN
, "Error WSAN");
796 /* These symbols are added for EDK II support. */
798 inscode(d
, ds
, de
, "EMINERRORVAL", EMINERRORVAL
, "Lowest valid error value");
801 inscode(d
, ds
, de
, "ENOTSUP", ENOTSUP
, "Operation not supported");
804 inscode(d
, ds
, de
, "EBADRPC", EBADRPC
, "RPC struct is bad");
807 inscode(d
, ds
, de
, "ERPCMISMATCH", ERPCMISMATCH
, "RPC version wrong");
810 inscode(d
, ds
, de
, "EPROGUNAVAIL", EPROGUNAVAIL
, "RPC prog. not avail");
813 inscode(d
, ds
, de
, "EPROGMISMATCH", EPROGMISMATCH
, "Program version wrong");
816 inscode(d
, ds
, de
, "EPROCUNAVAIL", EPROCUNAVAIL
, "Bad procedure for program");
819 inscode(d
, ds
, de
, "EFTYPE", EFTYPE
, "Inappropriate file type or format");
822 inscode(d
, ds
, de
, "EAUTH", EAUTH
, "Authentication error");
825 inscode(d
, ds
, de
, "ENEEDAUTH", ENEEDAUTH
, "Need authenticator");
828 inscode(d
, ds
, de
, "ECANCELED", ECANCELED
, "Operation canceled");
831 inscode(d
, ds
, de
, "ENOATTR", ENOATTR
, "Attribute not found");
834 inscode(d
, ds
, de
, "EDOOFUS", EDOOFUS
, "Programming Error");
837 inscode(d
, ds
, de
, "EBUFSIZE", EBUFSIZE
, "Buffer too small to hold result");
840 inscode(d
, ds
, de
, "EMAXERRORVAL", EMAXERRORVAL
, "One more than the highest defined error value");