8 * Copyright (c) 2000,2002 Japan Network Information Center.
11 * By using this file, you agree to the terms and conditions set forth bellow.
13 * LICENSE TERMS AND CONDITIONS
15 * The following License Terms and Conditions apply, unless a different
16 * license is obtained from Japan Network Information Center ("JPNIC"),
17 * a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
18 * Chiyoda-ku, Tokyo 101-0047, Japan.
20 * 1. Use, Modification and Redistribution (including distribution of any
21 * modified or derived work) in source and/or binary forms is permitted
22 * under this License Terms and Conditions.
24 * 2. Redistribution of source code must retain the copyright notices as they
25 * appear in each source code file, this License Terms and Conditions.
27 * 3. Redistribution in binary form must reproduce the Copyright Notice,
28 * this License Terms and Conditions, in the documentation and/or other
29 * materials provided with the distribution. For the purposes of binary
30 * distribution the "Copyright Notice" refers to the following language:
31 * "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved."
33 * 4. The name of JPNIC may not be used to endorse or promote products
34 * derived from this Software without specific prior written approval of
37 * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
38 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
39 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
40 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
41 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
42 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
43 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
44 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
45 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
46 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
47 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
55 #include <idn/version.h>
57 #define WRAPPER_EXPORT extern __declspec(dllexport)
59 extern void idnPrintf(char *fmt
, ...);
60 extern void idnLogPrintf(int level
, char *fmt
, ...);
61 extern void idnLogInit(const char *title
);
62 extern void idnLogReset(void);
63 extern void idnLogFinish(void);
65 extern char *dumpAddr(const char FAR
*addr
, int len
, char *buff
, size_t size
);
66 extern char *dumpHost(const struct hostent FAR
*hp
, char *buff
, size_t size
);
67 extern char *dumpName(const char *name
, char *buff
, size_t size
);
69 extern int idnEncodeWhere(void);
71 #define IDN_ENCODE_ALWAYS 0
72 #define IDN_ENCODE_CHECK 1
73 #define IDN_ENCODE_ONLY11 2
74 #define IDN_ENCODE_ONLY20 3
76 extern BOOL
idnGetPrgEncoding(char *enc
, size_t len
);
77 extern BOOL
idnGetLogFile(char *file
, size_t len
);
79 extern int idnGetLogLevel(void); /* 0 : fatal */
85 extern int idnGetInstallDir(char *dir
, size_t len
);
87 extern idn_resconf_t
idnConvInit(void);
88 extern void idnConvDone(idn_resconf_t ctx
);
90 extern BOOL
idnWinsockVersion(const char *version
);
91 extern HINSTANCE
idnWinsockHandle(void);
92 extern idn_resconf_t
idnGetContext(void);
95 * Converting Request/Response
98 extern BOOL
idnConvReq(idn_resconf_t ctx
, const char FAR
*from
,
99 char FAR
*to
, size_t tolen
);
100 extern BOOL
idnConvRsp(idn_resconf_t ctx
, const char FAR
*from
,
101 char FAR
*to
, size_t tolen
);
104 * Hook for Asynchronouse Query
107 extern void idnHookInit(void);
108 extern void idnHookDone(void);
109 extern BOOL
idnHook(HWND hWnd
, u_int wMsg
, char FAR
*buf
, idn_resconf_t ctx
);
111 #endif /* _WRAPCOMMON_H */