source: trunk/src/wsock32/new/wsock32.h@ 1807

Last change on this file since 1807 was 1807, checked in by phaller, 26 years ago

Fix: socket experiment with PMWSOCK

File size: 2.4 KB
Line 
1/* $Id: wsock32.h,v 1.1 1999-11-22 08:18:04 phaller Exp $ */
2
3/* WSOCK32.H--definitions & conversions for Odin's wsock32.dll.
4 * Unused/unneeded Microsoft declarations removed.
5 *
6 * This header file corresponds to version 1.1 of the Windows Sockets specification.
7 *
8 * This file includes parts which are Copyright (c) 1982-1986 Regents
9 * of the University of California. All rights reserved. The
10 * Berkeley Software License Agreement specifies the terms and
11 * conditions for redistribution.
12 *
13 */
14
15#ifndef _WINSOCK32CONST_
16#define _WINSOCK32CONST_
17
18
19/*
20 * Structure used for manipulating linger option.
21 */
22struct Wlinger {
23 u_short l_onoff; /* option on/off */
24 u_short l_linger; /* linger time */
25};
26
27
28/*
29 * Structures returned by network data base library, taken from the
30 * BSD file netdb.h. All addresses are supplied in host order, and
31 * returned in network order (suitable for use in system calls).
32 */
33
34struct Whostent {
35 char * h_name; /* official name of host */
36 char * * h_aliases; /* alias list */
37 short h_addrtype; /* host address type */
38 short h_length; /* length of address */
39 char * * h_addr_list; /* list of addresses */
40#define h_addr h_addr_list[0] /* address, for backward compat */
41};
42
43/*
44 * It is assumed here that a network number
45 * fits in 32 bits.
46 */
47struct Wnetent {
48 char * n_name; /* official name of net */
49 char * * n_aliases; /* alias list */
50 short n_addrtype; /* net address type */
51 u_long n_net; /* network # */
52};
53
54struct Wservent {
55 char * s_name; /* official service name */
56 char * * s_aliases; /* alias list */
57 short s_port; /* port # */
58 char * s_proto; /* protocol to use */
59};
60
61struct Wprotoent {
62 char * p_name; /* official protocol name */
63 char * * p_aliases; /* alias list */
64 short p_proto; /* protocol # */
65};
66
67
68typedef struct tagWsockThreadData
69{
70 int dwLastError; // Get/SetLastError
71 struct Whostent whsnt; // database conversion buffers
72 struct Wservent wsvnt;
73 struct Wprotoent wptnt;
74} WSOCKTHREADDATA, *PWSOCKTHREADDATA;
75
76// internap prototype
77PWSOCKTHREADDATA iQueryWsockThreadData(void);
78
79
80#endif /* _WINSOCK32CONST_ */
81
82
Note: See TracBrowser for help on using the repository browser.