wine/include/winsock.h
Alexandre Julliard b7258befe0 Release 950901
Thu Aug 31 17:19:57 1995  Alexandre Julliard  <julliard@sunsite.unc.edu>

	* [Configure]
	Added compile-time option for IPC.

	* [configure.in]
	Added command-line options for language, IPC and malloc
	debugging.

	* [controls/menu.c]
	WM_MENUSELECT was sometimes sent to the wrong window.

	* [debugger/break.c]
	For the 'next' command, only step over instruction that require
	it. This allows 'next' to do the right thing with jmp and ret
	instructions.

	* [ipc/*.c] [memory/atom.c] [memory/global.c]
	IPC can now be configured out at compile-time.

	* [loader/task.c]
	Bug fix in TASK_Reschedule() that could cause a task to be deleted
	twice.

	* [miscemu/dosmem.c] (New file)
	Partial emulation of the BIOS data segment.

	* [miscemu/instr.c]
	Trap attempts to access selector 0x40 and remap the access to
	segment __0040H.

	* [tools/build.c]
	Fixed bug in CallTo32_LargeStack() that caused problems when
	compiling Wine with the -fomit-frame-pointer option.

	* [windows/message.c]
	Fixed bug in hardware event handling that could cause some events
	to get ignored.

Sat Aug 26 13:12:59 IST 1995 Michael Veksler <mveksler@vnet.ibm.com>

	* [ipc/README] [ipc/dde.tex]
	LaTeX documentation for the ipc and DDE stuff.

Wed Aug 23 22:01:23 GMT 1995 Michael Veksler <mveksler@vnet.ibm.com>

	* [ipc/Imakefile] [ipc/wine_test_stub.c]
	Fixed IPC testing. Now it can be compiled with "make tests"

Wed Aug 23 21:04:14 1995  Fons Botman  <botman@wab-tis.rabobank.nl>

	* [if1632/kernel.spec] [include/windows.h] [misc/main.c]
	Added GetWinDebugInfo/SetWinDebugInfo stub for player.exe

Sun Aug  20 13:49:42 1995  Marcus Meissner  <msmeissn@faui01.informatik.uni-erlangen.de>

	* [miscemu/int21.c]
	Misc fix to int21,ah=40 (write) to match _lwrite().
	AX=0x440A (check if handle is remote) added.

	* [multimedia/mmsystem.c]
	Moved mciSendString to mcistring.c.

	* [multimedia/mcistring.c]
	New file, string interface for MCI (not complete, not thoroughly
	tested).

	* [multimedia/audio.c]
	IOCTL prints errors; one paranoid check disabled.

	* [misc/file.c]
	Misc operator precedence fixes.

	* [if1632/gdi.spec] [objects/bitblt.c]
	Stub for FastWindowFrame (parameters not correct).

Sat Aug 19 01:31:23 1995  Graham Menhennitt <gfm@werple.mira.net.au>

	* [loader/ne_image.c]
	Preliminary support for iterated segments.

Sat Aug 19 00:43:04 1995  Andrew Taylor  (andrew@riscan.com)

	* [windows/mapping.c]
	In function MAPPING_FixIsotropic(), VportExt[XY] is multiplied by
 	the absolute value of (ydim / xdim) or (xdim / ydim).

Thu Aug 15 23:00:16  Gregory Trubetskoy  <grisha@mira.com>

	* [objects/oembitmap.c]
	Added some includes for Windows 95.

	* [include/sysmetrics.h]
	Added some sysmetrics for Windows 95.

	* [include/bitmaps/*95]
	New files: obm_close_95, obm_closed_95, obm_reduce_95, obm_reduced_95
	obm_zoom_95, obm_zoomd_95 - these are some pixmaps for Windows 95.

Thu Aug 10 12:00:00 1995  Jan Willamowius  (jan@janhh.shnet.org)

	* [misc/shell.c] [rc/sysres*.rc]
	The caption of the ShellAbout dialog box is language specific and
 	should be defined in the resources.
1995-09-01 15:57:28 +00:00

326 lines
10 KiB
C

/* WINSOCK.H--definitions to be used with the WINSOCK.DLL
*
* This header file corresponds to version 1.1 of the Windows Sockets
* specification.
*/
#ifndef _WINSOCKAPI_
#define _WINSOCKAPI_
#include <sys/types.h>
#include <sys/time.h>
#include <fcntl.h>
#include <netdb.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include "windows.h"
/*
* The new type to be used in all
* instances which refer to sockets.
*/
typedef u_int SOCKET;
extern int PASCAL FAR __WSAFDIsSet(SOCKET, fd_set FAR *);
/*
* Internet address (old style... should be updated)
*/
#define s_addr S_un.S_addr /* can be used for most tcp & ip code */
#define s_host S_un.S_un_b.s_b2 /* host on imp */
#define s_net S_un.S_un_b.s_b1 /* network */
#define s_imp S_un.S_un_w.s_w2 /* imp */
#define s_impno S_un.S_un_b.s_b4 /* imp # */
#define s_lh S_un.S_un_b.s_b3 /* logical host */
#define WSADESCRIPTION_LEN 256
#define WSASYS_STATUS_LEN 128
typedef struct WSAData {
WORD wVersion;
WORD wHighVersion;
char szDescription[WSADESCRIPTION_LEN+1];
char szSystemStatus[WSASYS_STATUS_LEN+1];
unsigned short iMaxSockets;
unsigned short iMaxUdpDg;
char FAR * lpVendorInfo;
} WSADATA;
typedef WSADATA FAR *LPWSADATA;
/*
* This is used instead of -1, since the
* SOCKET type is unsigned.
*/
#define INVALID_SOCKET (SOCKET)(~0)
#define SOCKET_ERROR (-1)
/*
* Option flags per-socket.
*/
#ifndef SO_DONTLINGER
#define SO_DONTLINGER (u_int)(~SO_LINGER)
#endif
#ifndef _SYS_SOCKET_H_
#ifndef _sys_socket_h
/*
* Structure used by kernel to pass protocol
* information in raw sockets.
*/
struct sockproto {
u_short sp_family; /* address family */
u_short sp_protocol; /* protocol */
};
#endif
#endif
/*
* Maximum queue length specifiable by listen.
*/
#define SOMAXCONN 5
#ifndef MSG_DONTROUTE
#define MSG_DONTROUTE 0x4 /* send without using routing tables */
#endif
#define MSG_MAXIOVLEN 16
/*
* Define constant based on rfc883, used by gethostbyxxxx() calls.
*/
#define MAXGETHOSTSTRUCT 1024
/*
* Define flags to be used with the WSAAsyncSelect() call.
*/
#define FD_READ 0x01
#define FD_WRITE 0x02
#define FD_OOB 0x04
#define FD_ACCEPT 0x08
#define FD_CONNECT 0x10
#define FD_CLOSE 0x20
/*
* All Windows Sockets error constants are biased by WSABASEERR from
* the "normal"
*/
#define WSABASEERR 10000
/*
* Windows Sockets definitions of regular Microsoft C error constants
*/
#define WSAEINTR (WSABASEERR+4)
#define WSAEBADF (WSABASEERR+9)
#define WSAEACCES (WSABASEERR+13)
#define WSAEFAULT (WSABASEERR+14)
#define WSAEINVAL (WSABASEERR+22)
#define WSAEMFILE (WSABASEERR+24)
/*
* Windows Sockets definitions of regular Berkeley error constants
*/
#define WSAEWOULDBLOCK (WSABASEERR+35)
#define WSAEINPROGRESS (WSABASEERR+36)
#define WSAEALREADY (WSABASEERR+37)
#define WSAENOTSOCK (WSABASEERR+38)
#define WSAEDESTADDRREQ (WSABASEERR+39)
#define WSAEMSGSIZE (WSABASEERR+40)
#define WSAEPROTOTYPE (WSABASEERR+41)
#define WSAENOPROTOOPT (WSABASEERR+42)
#define WSAEPROTONOSUPPORT (WSABASEERR+43)
#define WSAESOCKTNOSUPPORT (WSABASEERR+44)
#define WSAEOPNOTSUPP (WSABASEERR+45)
#define WSAEPFNOSUPPORT (WSABASEERR+46)
#define WSAEAFNOSUPPORT (WSABASEERR+47)
#define WSAEADDRINUSE (WSABASEERR+48)
#define WSAEADDRNOTAVAIL (WSABASEERR+49)
#define WSAENETDOWN (WSABASEERR+50)
#define WSAENETUNREACH (WSABASEERR+51)
#define WSAENETRESET (WSABASEERR+52)
#define WSAECONNABORTED (WSABASEERR+53)
#define WSAECONNRESET (WSABASEERR+54)
#define WSAENOBUFS (WSABASEERR+55)
#define WSAEISCONN (WSABASEERR+56)
#define WSAENOTCONN (WSABASEERR+57)
#define WSAESHUTDOWN (WSABASEERR+58)
#define WSAETOOMANYREFS (WSABASEERR+59)
#define WSAETIMEDOUT (WSABASEERR+60)
#define WSAECONNREFUSED (WSABASEERR+61)
#define WSAELOOP (WSABASEERR+62)
#define WSAENAMETOOLONG (WSABASEERR+63)
#define WSAEHOSTDOWN (WSABASEERR+64)
#define WSAEHOSTUNREACH (WSABASEERR+65)
#define WSAENOTEMPTY (WSABASEERR+66)
#define WSAEPROCLIM (WSABASEERR+67)
#define WSAEUSERS (WSABASEERR+68)
#define WSAEDQUOT (WSABASEERR+69)
#define WSAESTALE (WSABASEERR+70)
#define WSAEREMOTE (WSABASEERR+71)
/*
* Extended Windows Sockets error constant definitions
*/
#define WSASYSNOTREADY (WSABASEERR+91)
#define WSAVERNOTSUPPORTED (WSABASEERR+92)
#define WSANOTINITIALISED (WSABASEERR+93)
/*
* Error return codes from gethostbyname() and gethostbyaddr()
* (when using the resolver). Note that these errors are
* retrieved via WSAGetLastError() and must therefore follow
* the rules for avoiding clashes with error numbers from
* specific implementations or language run-time systems.
* For this reason the codes are based at WSABASEERR+1001.
* Note also that [WSA]NO_ADDRESS is defined only for
* compatibility purposes.
*/
/* #define h_errno WSAGetLastError() */
/* Authoritative Answer: Host not found */
#define WSAHOST_NOT_FOUND (WSABASEERR+1001)
/* Non-Authoritative: Host not found, or SERVERFAIL */
#define WSATRY_AGAIN (WSABASEERR+1002)
/* Non recoverable errors, FORMERR, REFUSED, NOTIMP */
#define WSANO_RECOVERY (WSABASEERR+1003)
/* Valid name, no data record of requested type */
#define WSANO_DATA (WSABASEERR+1004)
/* no address, look for MX record */
#define WSANO_ADDRESS WSANO_DATA
/* Socket function prototypes */
#ifdef __cplusplus
extern "C" {
#endif
/* Microsoft Windows Extension function prototypes */
INT PASCAL FAR WSAStartup(WORD wVersionRequired, LPWSADATA lpWSAData);
INT PASCAL FAR WSACleanup(void);
void PASCAL FAR WSASetLastError(INT iError);
INT PASCAL FAR WSAGetLastError(void);
BOOL PASCAL FAR WSAIsBlocking(void);
INT PASCAL FAR WSAUnhookBlockingHook(void);
FARPROC PASCAL FAR WSASetBlockingHook(FARPROC lpBlockFunc);
INT PASCAL FAR WSACancelBlockingCall(void);
HANDLE PASCAL FAR WSAAsyncGetServByName(HWND hWnd, u_int wMsg,
const char FAR *name,
const char FAR *proto,
char FAR *buf, INT buflen);
HANDLE PASCAL FAR WSAAsyncGetServByPort(HWND hWnd, u_int wMsg, INT port,
const char FAR *proto, char FAR *buf,
INT buflen);
HANDLE PASCAL FAR WSAAsyncGetProtoByName(HWND hWnd, u_int wMsg,
const char FAR *name, char FAR *buf,
INT buflen);
HANDLE PASCAL FAR WSAAsyncGetProtoByNumber(HWND hWnd, u_int wMsg,
INT number, char FAR *buf,
INT buflen);
HANDLE PASCAL FAR WSAAsyncGetHostByName(HWND hWnd, u_int wMsg,
const char FAR *name, char FAR *buf,
INT buflen);
HANDLE PASCAL FAR WSAAsyncGetHostByAddr(HWND hWnd, u_int wMsg,
const char FAR *addr, INT len, INT type,
char FAR *buf, INT buflen);
INT PASCAL FAR WSACancelAsyncRequest(HANDLE hAsyncTaskHandle);
INT PASCAL FAR WSAAsyncSelect(SOCKET s, HWND hWnd, u_int wMsg, long lEvent);
#ifdef __cplusplus
}
#endif
/* Microsoft Windows Extended data types */
typedef struct sockaddr SOCKADDR;
typedef struct sockaddr *PSOCKADDR;
typedef struct sockaddr FAR *LPSOCKADDR;
typedef struct sockaddr_in SOCKADDR_IN;
typedef struct sockaddr_in *PSOCKADDR_IN;
typedef struct sockaddr_in FAR *LPSOCKADDR_IN;
typedef struct linger LINGER;
typedef struct linger *PLINGER;
typedef struct linger FAR *LPLINGER;
typedef struct in_addr IN_ADDR;
typedef struct in_addr *PIN_ADDR;
typedef struct in_addr FAR *LPIN_ADDR;
typedef struct fd_set FD_SET;
typedef struct fd_set *PFD_SET;
typedef struct fd_set FAR *LPFD_SET;
typedef struct hostent HOSTENT;
typedef struct hostent *PHOSTENT;
typedef struct hostent FAR *LPHOSTENT;
typedef struct servent SERVENT;
typedef struct servent *PSERVENT;
typedef struct servent FAR *LPSERVENT;
typedef struct protoent PROTOENT;
typedef struct protoent *PPROTOENT;
typedef struct protoent FAR *LPPROTOENT;
typedef struct timeval TIMEVAL;
typedef struct timeval *PTIMEVAL;
typedef struct timeval FAR *LPTIMEVAL;
/*
* Windows message parameter composition and decomposition
* macros.
*
* WSAMAKEASYNCREPLY is intended for use by the Windows Sockets implementation
* when constructing the response to a WSAAsyncGetXByY() routine.
*/
#define WSAMAKEASYNCREPLY(buflen,error) MAKELONG(buflen,error)
/*
* WSAMAKESELECTREPLY is intended for use by the Windows Sockets implementation
* when constructing the response to WSAAsyncSelect().
*/
#define WSAMAKESELECTREPLY(event,error) MAKELONG(event,error)
/*
* WSAGETASYNCBUFLEN is intended for use by the Windows Sockets application
* to extract the buffer length from the lParam in the response
* to a WSAGetXByY().
*/
#define WSAGETASYNCBUFLEN(lParam) LOWORD(lParam)
/*
* WSAGETASYNCERROR is intended for use by the Windows Sockets application
* to extract the error code from the lParam in the response
* to a WSAGetXByY().
*/
#define WSAGETASYNCERROR(lParam) HIWORD(lParam)
/*
* WSAGETSELECTEVENT is intended for use by the Windows Sockets application
* to extract the event code from the lParam in the response
* to a WSAAsyncSelect().
*/
#define WSAGETSELECTEVENT(lParam) LOWORD(lParam)
/*
* WSAGETSELECTERROR is intended for use by the Windows Sockets application
* to extract the error code from the lParam in the response
* to a WSAAsyncSelect().
*/
#define WSAGETSELECTERROR(lParam) HIWORD(lParam)
#endif /* _WINSOCKAPI_ */