1 /***************************************************************************
2     begin       : Tue Oct 02 2002
3     copyright   : (C) 2002 by Martin Preuss
4     email       : martin@libchipcard.de
5 
6  ***************************************************************************
7  *                                                                         *
8  *   This library is free software; you can redistribute it and/or         *
9  *   modify it under the terms of the GNU Lesser General Public            *
10  *   License as published by the Free Software Foundation; either          *
11  *   version 2.1 of the License, or (at your option) any later version.    *
12  *                                                                         *
13  *   This library 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 GNU     *
16  *   Lesser General Public License for more details.                       *
17  *                                                                         *
18  *   You should have received a copy of the GNU Lesser General Public      *
19  *   License along with this library; if not, write to the Free Software   *
20  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston,                 *
21  *   MA  02111-1307  USA                                                   *
22  *                                                                         *
23  ***************************************************************************/
24 
25 /**
26  * @file chameleon/socket.h
27  * @short This file contains sockets and socket sets.
28  */
29 
30 #ifndef GWEN_SOCKET_P_H
31 #define GWEN_SOCKET_P_H
32 
33 #include <winsock2.h>
34 #include <winerror.h>
35 
36 #include <gwenhywfar/gwenhywfarapi.h>
37 #include <gwenhywfar/error.h>
38 #include <gwenhywfar/inetsocket.h>
39 #include <gwenhywfar/types.h>
40 #include <sys/types.h>
41 #ifdef HAVE_ARPA_INET_H
42 # include <arpa/inet.h>
43 #endif
44 
45 
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
49 
50 
51 GWENHYWFAR_API struct GWEN_SOCKET {
52   GWEN_LIST_ELEMENT(GWEN_SOCKET)
53   int socket;
54   GWEN_SOCKETTYPE type;
55 };
56 
57 
58 GWENHYWFAR_API struct GWEN_SOCKETSETSTRUCT {
59   fd_set set;
60   int highest;
61   uint32_t count;
62 };
63 
64 
65 /**
66  * Initializes this module.
67  */
68 GWENHYWFAR_API int GWEN_Socket_ModuleInit(void);
69 
70 /**
71  * Deinitializes this module.
72  */
73 GWENHYWFAR_API int GWEN_Socket_ModuleFini(void);
74 
75 
76 
77 #ifdef __cplusplus
78 }
79 #endif
80 
81 #endif /* GWEN_SOCKET_P_H */
82 
83 
84 
85