mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 23:42:34 +02:00
* dub id fixed
This commit is contained in:
parent
205d591332
commit
c56118ccba
@ -42,7 +42,7 @@ unit winsock;
|
|||||||
TSocket = u_long;
|
TSocket = u_long;
|
||||||
|
|
||||||
{ there is already a procedure called FD_SET, so this
|
{ there is already a procedure called FD_SET, so this
|
||||||
record was renamed (FK) }
|
record was renamed (FK) }
|
||||||
fdset = record
|
fdset = record
|
||||||
fd_count : u_int;
|
fd_count : u_int;
|
||||||
fd_array : array[0..(FD_SETSIZE)-1] of TSocket;
|
fd_array : array[0..(FD_SETSIZE)-1] of TSocket;
|
||||||
@ -67,29 +67,29 @@ unit winsock;
|
|||||||
end;
|
end;
|
||||||
TTimeZone = timezone;
|
TTimeZone = timezone;
|
||||||
PTimeZoen = ^TTimeZone;
|
PTimeZoen = ^TTimeZone;
|
||||||
|
|
||||||
const
|
const
|
||||||
IOCPARM_MASK = $7f;
|
IOCPARM_MASK = $7f;
|
||||||
IOC_VOID = $20000000;
|
IOC_VOID = $20000000;
|
||||||
IOC_OUT = $40000000;
|
IOC_OUT = $40000000;
|
||||||
IOC_IN = $80000000;
|
IOC_IN = $80000000;
|
||||||
IOC_INOUT = IOC_IN or IOC_OUT;
|
IOC_INOUT = IOC_IN or IOC_OUT;
|
||||||
FIONREAD = IOC_OUT or
|
FIONREAD = IOC_OUT or
|
||||||
((4 and IOCPARM_MASK) shl 16) or
|
((4 and IOCPARM_MASK) shl 16) or
|
||||||
(101 shl 8) or 127;
|
(101 shl 8) or 127;
|
||||||
FIONBIO = IOC_IN or
|
FIONBIO = IOC_IN or
|
||||||
((4 and IOCPARM_MASK) shl 16) or
|
((4 and IOCPARM_MASK) shl 16) or
|
||||||
(101 shl 8) or 126;
|
(101 shl 8) or 126;
|
||||||
FIOASYNC = IOC_IN or
|
FIOASYNC = IOC_IN or
|
||||||
((4 and IOCPARM_MASK) shl 16) or
|
((4 and IOCPARM_MASK) shl 16) or
|
||||||
(101 shl 8) or 125;
|
(101 shl 8) or 125;
|
||||||
{
|
{
|
||||||
Structures returned by network data base library, taken from the
|
Structures returned by network data base library, taken from the
|
||||||
BSD file netdb.h. All addresses are supplied in host order, and
|
BSD file netdb.h. All addresses are supplied in host order, and
|
||||||
returned in network order (suitable for use in system calls).
|
returned in network order (suitable for use in system calls).
|
||||||
Slight modifications for differences between Linux and winsock.h
|
Slight modifications for differences between Linux and winsock.h
|
||||||
}
|
}
|
||||||
type
|
type
|
||||||
hostent = record
|
hostent = record
|
||||||
{ official name of host }
|
{ official name of host }
|
||||||
h_name: pchar;
|
h_name: pchar;
|
||||||
@ -136,7 +136,7 @@ unit winsock;
|
|||||||
end;
|
end;
|
||||||
TServEnt = servent;
|
TServEnt = servent;
|
||||||
PServEnt = ^TServEnt;
|
PServEnt = ^TServEnt;
|
||||||
|
|
||||||
protoent = record
|
protoent = record
|
||||||
{ official protocol name }
|
{ official protocol name }
|
||||||
p_name : ^char;
|
p_name : ^char;
|
||||||
@ -188,7 +188,7 @@ unit winsock;
|
|||||||
IPPORT_BIFFUDP = 512;
|
IPPORT_BIFFUDP = 512;
|
||||||
IPPORT_WHOSERVER = 513;
|
IPPORT_WHOSERVER = 513;
|
||||||
IPPORT_ROUTESERVER = 520;
|
IPPORT_ROUTESERVER = 520;
|
||||||
IPPORT_RESERVED = 1024;
|
IPPORT_RESERVED = 1024;
|
||||||
|
|
||||||
const
|
const
|
||||||
IMPLINK_IP = 155;
|
IMPLINK_IP = 155;
|
||||||
@ -214,15 +214,13 @@ unit winsock;
|
|||||||
PInAddr = ^TInAddr;
|
PInAddr = ^TInAddr;
|
||||||
|
|
||||||
sockaddr_in = record
|
sockaddr_in = record
|
||||||
|
sin_family : u_short;
|
||||||
case integer of
|
case integer of
|
||||||
0 : (
|
0 : (sin_port : u_short;
|
||||||
sin_family : u_short;
|
|
||||||
sin_port : u_short;
|
|
||||||
sin_addr : TInAddr;
|
sin_addr : TInAddr;
|
||||||
sin_zero : array[0..7] of char;
|
sin_zero : array[0..7] of char;
|
||||||
);
|
);
|
||||||
1 : (sin_family : u_short;
|
1 : (sin_data : array[0..13] of char;
|
||||||
sin_data : array[0..13] of char;
|
|
||||||
);
|
);
|
||||||
end;
|
end;
|
||||||
TSockAddrIn = sockaddr_in;
|
TSockAddrIn = sockaddr_in;
|
||||||
@ -261,7 +259,7 @@ unit winsock;
|
|||||||
iMaxUdpDg : word;
|
iMaxUdpDg : word;
|
||||||
lpVendorInfo : pchar;
|
lpVendorInfo : pchar;
|
||||||
end;
|
end;
|
||||||
TWSAData = WSADATA;
|
TWSAData = WSADATA;
|
||||||
PWSAData = TWSAData;
|
PWSAData = TWSAData;
|
||||||
|
|
||||||
const
|
const
|
||||||
@ -407,8 +405,8 @@ unit winsock;
|
|||||||
AF_FIREFOX = 19;
|
AF_FIREFOX = 19;
|
||||||
{ Somebody is using this! }
|
{ Somebody is using this! }
|
||||||
AF_UNKNOWN1 = 20;
|
AF_UNKNOWN1 = 20;
|
||||||
{ Banyan }
|
{ Banyan }
|
||||||
AF_BAN = 21;
|
AF_BAN = 21;
|
||||||
|
|
||||||
AF_MAX = 22;
|
AF_MAX = 22;
|
||||||
|
|
||||||
@ -422,7 +420,7 @@ unit winsock;
|
|||||||
sp_protocol : u_short;
|
sp_protocol : u_short;
|
||||||
end;
|
end;
|
||||||
TSockProto = sockproto;
|
TSockProto = sockproto;
|
||||||
PSockProto = ^TSockProto;
|
PSockProto = ^TSockProto;
|
||||||
|
|
||||||
const
|
const
|
||||||
{
|
{
|
||||||
@ -462,7 +460,7 @@ unit winsock;
|
|||||||
l_linger : u_short;
|
l_linger : u_short;
|
||||||
end;
|
end;
|
||||||
TLinger = linger;
|
TLinger = linger;
|
||||||
PLinger = ^TLinger;
|
PLinger = ^TLinger;
|
||||||
|
|
||||||
const
|
const
|
||||||
{
|
{
|
||||||
@ -638,8 +636,8 @@ unit winsock;
|
|||||||
TF_REUSE_SOCKET = $02;
|
TF_REUSE_SOCKET = $02;
|
||||||
TF_WRITE_BEHIND = $04;
|
TF_WRITE_BEHIND = $04;
|
||||||
|
|
||||||
{
|
{
|
||||||
Options for use with [gs]etsockopt at the IP level.
|
Options for use with [gs]etsockopt at the IP level.
|
||||||
}
|
}
|
||||||
IP_TTL = 7;
|
IP_TTL = 7;
|
||||||
IP_TOS = 8;
|
IP_TOS = 8;
|
||||||
@ -691,7 +689,7 @@ unit winsock;
|
|||||||
function getservbyname(name:pchar; proto:pchar):PServEnt;stdcall;
|
function getservbyname(name:pchar; proto:pchar):PServEnt;stdcall;
|
||||||
function getprotobynumber(proto:longint):PProtoEnt;stdcall;
|
function getprotobynumber(proto:longint):PProtoEnt;stdcall;
|
||||||
function getprotobyname(name:pchar):PProtoEnt;stdcall;
|
function getprotobyname(name:pchar):PProtoEnt;stdcall;
|
||||||
|
|
||||||
{ Microsoft Windows Extension function prototypes }
|
{ Microsoft Windows Extension function prototypes }
|
||||||
function WSAStartup(wVersionRequired:word;var WSAData:TWSADATA):longint;stdcall;
|
function WSAStartup(wVersionRequired:word;var WSAData:TWSADATA):longint;stdcall;
|
||||||
function WSACleanup:longint;stdcall;
|
function WSACleanup:longint;stdcall;
|
||||||
@ -701,14 +699,14 @@ unit winsock;
|
|||||||
function WSAUnhookBlockingHook:longint;stdcall;
|
function WSAUnhookBlockingHook:longint;stdcall;
|
||||||
function WSASetBlockingHook(lpBlockFunc:TFarProc):TFarProc;stdcall;
|
function WSASetBlockingHook(lpBlockFunc:TFarProc):TFarProc;stdcall;
|
||||||
function WSACancelBlockingCall:longint;stdcall;
|
function WSACancelBlockingCall:longint;stdcall;
|
||||||
function WSAAsyncGetServByName(hWnd:HWND; wMsg:u_int; name:pchar; proto:pchar; buf:pchar;
|
function WSAAsyncGetServByName(hWnd:HWND; wMsg:u_int; name:pchar; proto:pchar; buf:pchar;
|
||||||
buflen:longint):THandle;stdcall;
|
buflen:longint):THandle;stdcall;
|
||||||
function WSAAsyncGetServByPort(hWnd:HWND; wMsg:u_int; port:longint; proto:pchar; buf:pchar;
|
function WSAAsyncGetServByPort(hWnd:HWND; wMsg:u_int; port:longint; proto:pchar; buf:pchar;
|
||||||
buflen:longint):THandle;stdcall;
|
buflen:longint):THandle;stdcall;
|
||||||
function WSAAsyncGetProtoByName(hWnd:HWND; wMsg:u_int; name:pchar; buf:pchar; buflen:longint):THandle;stdcall;
|
function WSAAsyncGetProtoByName(hWnd:HWND; wMsg:u_int; name:pchar; buf:pchar; buflen:longint):THandle;stdcall;
|
||||||
function WSAAsyncGetProtoByNumber(hWnd:HWND; wMsg:u_int; number:longint; buf:pchar; buflen:longint):THandle;stdcall;
|
function WSAAsyncGetProtoByNumber(hWnd:HWND; wMsg:u_int; number:longint; buf:pchar; buflen:longint):THandle;stdcall;
|
||||||
function WSAAsyncGetHostByName(hWnd:HWND; wMsg:u_int; name:pchar; buf:pchar; buflen:longint):THandle;stdcall;
|
function WSAAsyncGetHostByName(hWnd:HWND; wMsg:u_int; name:pchar; buf:pchar; buflen:longint):THandle;stdcall;
|
||||||
function WSAAsyncGetHostByAddr(hWnd:HWND; wMsg:u_int; addr:pchar; len:longint; t:longint;
|
function WSAAsyncGetHostByAddr(hWnd:HWND; wMsg:u_int; addr:pchar; len:longint; t:longint;
|
||||||
buf:pchar; buflen:longint):THandle;stdcall;
|
buf:pchar; buflen:longint):THandle;stdcall;
|
||||||
function WSACancelAsyncRequest(hAsyncTaskHandle:THandle):longint;stdcall;
|
function WSACancelAsyncRequest(hAsyncTaskHandle:THandle):longint;stdcall;
|
||||||
function WSAAsyncSelect(s:TSocket; hWnd:HWND; wMsg:u_int; lEvent:longint):longint;stdcall;
|
function WSAAsyncSelect(s:TSocket; hWnd:HWND; wMsg:u_int; lEvent:longint):longint;stdcall;
|
||||||
@ -742,7 +740,7 @@ unit winsock;
|
|||||||
procedure FD_ZERO(var FDSet:TFDSet);
|
procedure FD_ZERO(var FDSet:TFDSet);
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
const
|
const
|
||||||
winsockdll = 'wsock32.dll';
|
winsockdll = 'wsock32.dll';
|
||||||
|
|
||||||
@ -793,7 +791,7 @@ unit winsock;
|
|||||||
function getservbyname(name:pchar; proto:pchar):PServEnt;stdcall;external winsockdll name 'getservbyname';
|
function getservbyname(name:pchar; proto:pchar):PServEnt;stdcall;external winsockdll name 'getservbyname';
|
||||||
function getprotobynumber(proto:longint):PProtoEnt;stdcall;external winsockdll name 'getprotobynumber';
|
function getprotobynumber(proto:longint):PProtoEnt;stdcall;external winsockdll name 'getprotobynumber';
|
||||||
function getprotobyname(name:pchar):PProtoEnt;stdcall;external winsockdll name 'getprotobyname';
|
function getprotobyname(name:pchar):PProtoEnt;stdcall;external winsockdll name 'getprotobyname';
|
||||||
|
|
||||||
{ Microsoft Windows Extension function prototypes }
|
{ Microsoft Windows Extension function prototypes }
|
||||||
function WSAStartup(wVersionRequired:word;var WSAData:TWSADATA):longint;stdcall;
|
function WSAStartup(wVersionRequired:word;var WSAData:TWSADATA):longint;stdcall;
|
||||||
external winsockdll name 'WSAStartup';
|
external winsockdll name 'WSAStartup';
|
||||||
@ -804,9 +802,9 @@ unit winsock;
|
|||||||
function WSAUnhookBlockingHook:longint;stdcall;external winsockdll name 'WSAUnhookBlockingHook';
|
function WSAUnhookBlockingHook:longint;stdcall;external winsockdll name 'WSAUnhookBlockingHook';
|
||||||
function WSASetBlockingHook(lpBlockFunc:TFarProc):TFarProc;stdcall;external winsockdll name 'WSASetBlockingHook';
|
function WSASetBlockingHook(lpBlockFunc:TFarProc):TFarProc;stdcall;external winsockdll name 'WSASetBlockingHook';
|
||||||
function WSACancelBlockingCall:longint;stdcall;external winsockdll name 'WSACancelBlockingCall';
|
function WSACancelBlockingCall:longint;stdcall;external winsockdll name 'WSACancelBlockingCall';
|
||||||
function WSAAsyncGetServByName(hWnd:HWND; wMsg:u_int; name:pchar; proto:pchar; buf:pchar;
|
function WSAAsyncGetServByName(hWnd:HWND; wMsg:u_int; name:pchar; proto:pchar; buf:pchar;
|
||||||
buflen:longint):THandle;stdcall;external winsockdll name 'WSAAsyncGetServByName';
|
buflen:longint):THandle;stdcall;external winsockdll name 'WSAAsyncGetServByName';
|
||||||
function WSAAsyncGetServByPort(hWnd:HWND; wMsg:u_int; port:longint; proto:pchar; buf:pchar;
|
function WSAAsyncGetServByPort(hWnd:HWND; wMsg:u_int; port:longint; proto:pchar; buf:pchar;
|
||||||
buflen:longint):THandle;stdcall;external winsockdll name 'WSAAsyncGetServByPort';
|
buflen:longint):THandle;stdcall;external winsockdll name 'WSAAsyncGetServByPort';
|
||||||
function WSAAsyncGetProtoByName(hWnd:HWND; wMsg:u_int; name:pchar; buf:pchar; buflen:longint):THandle;stdcall;
|
function WSAAsyncGetProtoByName(hWnd:HWND; wMsg:u_int; name:pchar; buf:pchar; buflen:longint):THandle;stdcall;
|
||||||
external winsockdll name 'WSAAsyncGetProtoByName';
|
external winsockdll name 'WSAAsyncGetProtoByName';
|
||||||
@ -814,10 +812,10 @@ unit winsock;
|
|||||||
external winsockdll name 'WSAAsyncGetProtoByNumber';
|
external winsockdll name 'WSAAsyncGetProtoByNumber';
|
||||||
function WSAAsyncGetHostByName(hWnd:HWND; wMsg:u_int; name:pchar; buf:pchar; buflen:longint):THandle;stdcall;
|
function WSAAsyncGetHostByName(hWnd:HWND; wMsg:u_int; name:pchar; buf:pchar; buflen:longint):THandle;stdcall;
|
||||||
external winsockdll name 'WSAAsyncGetHostByName';
|
external winsockdll name 'WSAAsyncGetHostByName';
|
||||||
function WSAAsyncGetHostByAddr(hWnd:HWND; wMsg:u_int; addr:pchar; len:longint; t:longint;
|
function WSAAsyncGetHostByAddr(hWnd:HWND; wMsg:u_int; addr:pchar; len:longint; t:longint;
|
||||||
buf:pchar; buflen:longint):THandle;stdcall;
|
buf:pchar; buflen:longint):THandle;stdcall;
|
||||||
external winsockdll name 'WSAAsyncGetHostByAddr';
|
external winsockdll name 'WSAAsyncGetHostByAddr';
|
||||||
function WSACancelAsyncRequest(hAsyncTaskHandle:THandle):longint;stdcall;
|
function WSACancelAsyncRequest(hAsyncTaskHandle:THandle):longint;stdcall;
|
||||||
external winsockdll name 'WSACancelAsyncRequest';
|
external winsockdll name 'WSACancelAsyncRequest';
|
||||||
function WSAAsyncSelect(s:TSocket; hWnd:HWND; wMsg:u_int; lEvent:longint):longint;stdcall;
|
function WSAAsyncSelect(s:TSocket; hWnd:HWND; wMsg:u_int; lEvent:longint):longint;stdcall;
|
||||||
external winsockdll name 'WSAAsyncSelect';
|
external winsockdll name 'WSAAsyncSelect';
|
||||||
@ -929,10 +927,13 @@ unit winsock;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.5 2000-02-09 16:59:35 peter
|
Revision 1.6 2000-02-20 20:34:02 florian
|
||||||
|
* dub id fixed
|
||||||
|
|
||||||
|
Revision 1.5 2000/02/09 16:59:35 peter
|
||||||
* truncated log
|
* truncated log
|
||||||
|
|
||||||
Revision 1.4 2000/01/07 16:41:53 daniel
|
Revision 1.4 2000/01/07 16:41:53 daniel
|
||||||
* copyright 2000
|
* copyright 2000
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user