Added SILC Thread Queue API
[silc.git] / lib / silcutil / silcnet_i.h
index 1da16a97e016492b98408163ce2c80419697e4a4..f86819700fa8761f5a3dcaa969a4f24773c46403 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2005 - 2006 Pekka Riikonen
+  Copyright (C) 2005 - 2007 Pekka Riikonen
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
 #error "Do not include this header directly"
 #endif
 
-/* Net listenrr context */
+/* Net listener context */
 struct SilcNetListenerStruct {
   SilcSchedule schedule;
   SilcNetCallback callback;
   void *context;
-  int *socks;
-  unsigned int socks_count   : 31;
+  SilcSocket *socks;
+  unsigned int socks_count   : 30;
   unsigned int require_fqdn  : 1;
+  unsigned int lookup        : 1;
 };
 
+/* Backwards support */
+#define SilcNetStatus SilcResult
+#define silc_net_get_error_string silc_errno_string
+#define SILC_NET_OK SILC_OK
+#define SILC_NET_UNKNOWN_IP SILC_ERR_UNKNOWN_IP
+#define SILC_NET_UNKNOWN_HOST SILC_ERR_UNKNOWN_HOST
+#define SILC_NET_HOST_UNREACHABLE SILC_ERR_UNREACHABLE
+#define SILC_NET_CONNECTION_REFUSED SILC_ERR_REFUSED
+#define SILC_NET_CONNECTION_TIMEOUT SILC_ERR_TIMEOUT
+#define SILC_NET_NO_MEMORY SILC_ERR_OUT_OF_MEMORY
+#define SILC_NET_ERROR SILC_ERR
+
 #endif /* SILCNET_I_H */