a7a6b657729b2296076dd29105e2b86615807f6c
[reactos.git] / reactos / apps / utils / net / telnet / helpsock.cpp
1 /* $Id: helpsock.cpp,v 1.1 2001/01/27 22:38:43 ea Exp $
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 */