:pserver:cvsanon@mok.lvcm.com:/CVS/ReactOS reactos
[reactos.git] / apps / utils / net / telnet / helpsock.cpp
1 /* $Id$
2  *
3  * FILE       : helpsock.cpp
4  * AUTHOR     : unknown (sources found on www.telnet.org)
5  * PROJECT    : ReactOS Operating System
6  * DESCRIPTION: telnet client for the W32 subsystem
7  * DATE       : 2001-01-21
8  * REVISIONS
9  *      2001-02-21 ea   Modified to compile under 0.0.16 src tree
10  */
11 #include <winsock.h>
12 #include <windows.h>
13 #include <process.h>
14
15 #include "telnet.h"
16
17 char const* sockmsg(int ecode)
18 {
19   switch(ecode)
20   {
21 // programming errors
22 // (should never occour in release code?)
23   case WSASYSNOTREADY: return "tcp/ip network not ready";
24   case WSAEINVAL: return "invalid winsock version";
25   case WSAVERNOTSUPPORTED: return "wrong winsock version";
26   case WSANOTINITIALISED: return "winsock not initialized";
27   case WSAEINTR: "The call was canceled";
28   case WSAEINPROGRESS: "A blocking winsock operation is in progress";
29   default: return "unknown winsock error";
30 // general TCP problems
31   case WSAENETDOWN: return "winsock has detected that the network subsystem has failed";
32 // GetXbyY related errors:
33   case WSAHOST_NOT_FOUND: return "Authoritative Answer Host not found";
34   case WSATRY_AGAIN: return "Non-Authoritative Host not found, or SERVERFAIL";
35   case WSANO_RECOVERY: "Nonrecoverable errors: FORMERR, REFUSED, NOTIMP";
36   case WSANO_DATA: "Valid name, no data record of requested type";
37   }
38 }
39
40 /* EOF */