1 /*
2  * dlldef.h
3  */
4 
5 /*
6  * Copyright (c) 2000 Japan Network Information Center.  All rights reserved.
7  *
8  * By using this file, you agree to the terms and conditions set forth bellow.
9  *
10  * 			LICENSE TERMS AND CONDITIONS
11  *
12  * The following License Terms and Conditions apply, unless a different
13  * license is obtained from Japan Network Information Center ("JPNIC"),
14  * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
15  * Chiyoda-ku, Tokyo 101-0047, Japan.
16  *
17  * 1. Use, Modification and Redistribution (including distribution of any
18  *    modified or derived work) in source and/or binary forms is permitted
19  *    under this License Terms and Conditions.
20  *
21  * 2. Redistribution of source code must retain the copyright notices as they
22  *    appear in each source code file, this License Terms and Conditions.
23  *
24  * 3. Redistribution in binary form must reproduce the Copyright Notice,
25  *    this License Terms and Conditions, in the documentation and/or other
26  *    materials provided with the distribution.  For the purposes of binary
27  *    distribution the "Copyright Notice" refers to the following language:
28  *    "Copyright (c) 2000-2002 Japan Network Information Center.  All rights reserved."
29  *
30  * 4. The name of JPNIC may not be used to endorse or promote products
31  *    derived from this Software without specific prior written approval of
32  *    JPNIC.
33  *
34  * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
35  *    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
36  *    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
37  *    PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL JPNIC BE LIABLE
38  *    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
39  *    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
40  *    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
41  *    BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
42  *    WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
43  *    OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
44  *    ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
45  */
46 
47 #ifndef _DLLDEF_H
48 #define _DLLDEF_H
49 
50 #include "../common/wrapcommon.h"
51 
52 /*
53  * Execution Tracing
54  */
55 
56 extern  int     procPid;
57 
58 #ifdef  DEBUG
59 #define TRACE   idnPrintf
60 #define FATAL   idnPrintf
61 #else
62 #define TRACE
63 #define FATAL   idnPrintf
64 #endif
65 
66 /*
67  * entry points to wrap
68  */
69 
70 extern  int WSAAPI
71 _org_gethostname(char FAR * name, int namelen);
72 
73 extern  struct hostent FAR * WSAAPI
74 _org_gethostbyaddr(const char FAR * addr, int len, int type);
75 
76 extern  struct hostent FAR * WSAAPI
77 _org_gethostbyname(const char FAR * name);
78 
79 extern  HANDLE WSAAPI
80 _org_WSAAsyncGetHostByName(HWND hWnd, u_int wMsg, const char FAR * name,
81 			   char FAR * buf,int buflen);
82 
83 extern  HANDLE WSAAPI
84 _org_WSAAsyncGetHostByAddr(HWND hWnd, u_int wMsg, const char FAR * addr,
85 			   int len, int type, char FAR * buf, int buflen);
86 
87 extern  INT WSAAPI
88 _org_WSALookupServiceBeginA(LPWSAQUERYSETA lpqsRestrictions,
89 			    DWORD          dwControlFlags,
90 			    LPHANDLE       lphLookup);
91 
92 extern  INT WSAAPI
93 _org_WSALookupServiceBeginW(LPWSAQUERYSETW lpqsRestrictions,
94 			    DWORD          dwControlFlags,
95 			    LPHANDLE       lphLookup);
96 
97 extern  INT WSAAPI
98 _org_WSALookupServiceNextA(HANDLE           hLookup,
99 			   DWORD            dwControlFlags,
100 			   LPDWORD          lpdwBufferLength,
101 			   LPWSAQUERYSETA   lpqsResults);
102 
103 extern  INT WSAAPI
104 _org_WSALookupServiceNextW(HANDLE           hLookup,
105 			   DWORD            dwControlFlags,
106 			   LPDWORD          lpdwBufferLength,
107 			   LPWSAQUERYSETW   lpqsResults);
108 
109 extern  INT WSAAPI
110 _org_WSALookupServiceEnd(HANDLE  hLookup);
111 
112 extern int WSAAPI
113 _org_getaddrinfo(const char *nodename, const char *servname,
114 		 LPVOID hints, LPVOID res);
115 
116 extern void WSAAPI
117 _org_freeaddrinfo(LPVOID aip);
118 
119 extern int WSAAPI
120 _org_getnameinfo(LPVOID sa, DWORD salen, char* host, DWORD hostlen,
121 		 char* serv, DWORD servlen, int flags);
122 
123 #endif  /* _DLLDEF_H */
124