1 /*************************************************************************** 2 $RCSfile$ 3 ------------------- 4 cvs : $Id$ 5 begin : Tue Oct 02 2002 6 copyright : (C) 2002 by Martin Preuss 7 email : martin@libchipcard.de 8 9 *************************************************************************** 10 * * 11 * This library is free software; you can redistribute it and/or * 12 * modify it under the terms of the GNU Lesser General Public * 13 * License as published by the Free Software Foundation; either * 14 * version 2.1 of the License, or (at your option) any later version. * 15 * * 16 * This library is distributed in the hope that it will be useful, * 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 19 * Lesser General Public License for more details. * 20 * * 21 * You should have received a copy of the GNU Lesser General Public * 22 * License along with this library; if not, write to the Free Software * 23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * 24 * MA 02111-1307 USA * 25 * * 26 ***************************************************************************/ 27 28 /** 29 * @file chameleon/socket.h 30 * @short This file contains sockets and socket sets. 31 */ 32 33 #ifndef GWEN_SOCKET_P_H 34 #define GWEN_SOCKET_P_H 35 36 #include <gwenhywfar/gwenhywfarapi.h> 37 #include <gwenhywfar/error.h> 38 #include <gwenhywfar/types.h> 39 #include "inetsocket_l.h" 40 #include <sys/types.h> 41 #include <sys/socket.h> 42 #include <netinet/in.h> 43 #ifdef HAVE_ARPA_INET_H 44 # include <arpa/inet.h> 45 #endif 46 47 48 struct GWEN_SOCKET { 49 GWEN_LIST_ELEMENT(GWEN_SOCKET) 50 int socket; 51 GWEN_SOCKETTYPE type; 52 int haveWaited; 53 int isNonSocket; 54 }; 55 56 57 struct GWEN_SOCKETSETSTRUCT { 58 fd_set set; 59 int highest; 60 uint32_t count; 61 }; 62 63 64 static int GWEN_Socket_NetError2GwenError(int rv); 65 66 67 #endif /* GWEN_SOCKET_P_H */ 68 69 70 71