Added SILC Thread Queue API
[silc.git] / lib / silcutil / silcnet_i.h
1 /*
2
3   silcnet_i.h
4
5   Author: Pekka Riikonen <priikone@silcnet.org>
6
7   Copyright (C) 2005 - 2007 Pekka Riikonen
8
9   This program is free software; you can redistribute it and/or modify
10   it under the terms of the GNU General Public License as published by
11   the Free Software Foundation; version 2 of the License.
12
13   This program is distributed in the hope that it will be useful,
14   but WITHOUT ANY WARRANTY; without even the implied warranty of
15   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16   GNU General Public License for more details.
17
18 */
19
20 #ifndef SILCNET_I_H
21 #define SILCNET_I_H
22
23 #ifndef SILCNET_H
24 #error "Do not include this header directly"
25 #endif
26
27 /* Net listener context */
28 struct SilcNetListenerStruct {
29   SilcSchedule schedule;
30   SilcNetCallback callback;
31   void *context;
32   SilcSocket *socks;
33   unsigned int socks_count   : 30;
34   unsigned int require_fqdn  : 1;
35   unsigned int lookup        : 1;
36 };
37
38 /* Backwards support */
39 #define SilcNetStatus SilcResult
40 #define silc_net_get_error_string silc_errno_string
41 #define SILC_NET_OK SILC_OK
42 #define SILC_NET_UNKNOWN_IP SILC_ERR_UNKNOWN_IP
43 #define SILC_NET_UNKNOWN_HOST SILC_ERR_UNKNOWN_HOST
44 #define SILC_NET_HOST_UNREACHABLE SILC_ERR_UNREACHABLE
45 #define SILC_NET_CONNECTION_REFUSED SILC_ERR_REFUSED
46 #define SILC_NET_CONNECTION_TIMEOUT SILC_ERR_TIMEOUT
47 #define SILC_NET_NO_MEMORY SILC_ERR_OUT_OF_MEMORY
48 #define SILC_NET_ERROR SILC_ERR
49
50 #endif /* SILCNET_I_H */