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