Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

inetaddr.h

Go to the documentation of this file.
00001 /*************************************************************************** 00002 $RCSfile: inetaddr.h,v $ 00003 ------------------- 00004 cvs : $Id: inetaddr.h,v 1.3 2003/04/21 23:33:34 aquamaniac Exp $ 00005 begin : Tue Oct 02 2002 00006 copyright : (C) 2002 by Martin Preuss 00007 email : martin@libchipcard.de 00008 00009 *************************************************************************** 00010 * * 00011 * This library is free software; you can redistribute it and/or * 00012 * modify it under the terms of the GNU Lesser General Public * 00013 * License as published by the Free Software Foundation; either * 00014 * version 2.1 of the License, or (at your option) any later version. * 00015 * * 00016 * This library is distributed in the hope that it will be useful, * 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00019 * Lesser General Public License for more details. * 00020 * * 00021 * You should have received a copy of the GNU Lesser General Public * 00022 * License along with this library; if not, write to the Free Software * 00023 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * 00024 * MA 02111-1307 USA * 00025 * * 00026 ***************************************************************************/ 00027 00033 #ifndef MOD_INETADDR_H 00034 #define MOD_INETADDR_H 00035 00036 #include <windows.h> 00037 #include "chameleon/error.h" 00038 00048 00049 #ifdef __cplusplus 00050 extern "C" { 00051 #endif 00052 00053 #define INETADDR_ERROR_MEMORY_FULL 1 00054 #define INETADDR_ERROR_BAD_ADDRESS 2 00055 #define INETADDR_ERROR_BUFFER_OVERFLOW 3 00056 #define INETADDR_ERROR_HOST_NOT_FOUND 4 00057 #define INETADDR_ERROR_NO_ADDRESS 5 00058 #define INETADDR_ERROR_NO_RECOVERY 6 00059 #define INETADDR_ERROR_TRY_AGAIN 7 00060 #define INETADDR_ERROR_UNKNOWN_DNS_ERROR 8 00061 #define INETADDR_ERROR_BAD_ADDRESS_FAMILY 9 00062 #define INETADDR_ERROR_UNSUPPORTED 10 00063 00067 typedef enum { 00068 AddressFamilyIP=0, 00069 AddressFamilyUnix 00070 } AddressFamily; 00071 00072 00073 00077 CHIPCARD_API struct INETADDRESSSTRUCT { 00078 AddressFamily af; 00079 int size; 00080 struct sockaddr *address; 00081 }; 00082 00087 CHIPCARD_API typedef struct INETADDRESSSTRUCT INETADDRESS; 00088 00092 CHIPCARD_API typedef INETADDRESS *INETADDRESSPTR; 00093 00094 00101 00105 CHIPCARD_API ERRORCODE InetAddr_ModuleInit(); 00106 00110 CHIPCARD_API ERRORCODE InetAddr_ModuleFini(); 00112 00113 00120 00121 CHIPCARD_API INETADDRESS *InetAddr_new(AddressFamily af); 00122 CHIPCARD_API void InetAddr_free(INETADDRESS *ia); 00123 00124 00130 CHIPCARD_API ERRORCODE InetAddr_Destroy(INETADDRESSPTR ia); 00131 00133 00134 00142 00149 CHIPCARD_API ERRORCODE InetAddr_SetAddress(INETADDRESSPTR ia, const char *addr); 00150 00157 CHIPCARD_API ERRORCODE InetAddr_SetName(INETADDRESSPTR ia, const char *name); 00158 00166 CHIPCARD_API ERRORCODE InetAddr_GetAddress(const INETADDRESS *ia, char *buffer, int bsize); 00167 00176 CHIPCARD_API ERRORCODE InetAddr_GetName(const INETADDRESS *ia, char *buffer, int bsize); 00178 00185 00190 CHIPCARD_API int InetAddr_GetPort(const INETADDRESS *ia); 00191 00198 CHIPCARD_API ERRORCODE InetAddr_SetPort(INETADDRESSPTR ia, int port); 00200 00201 #ifdef __cplusplus 00202 } 00203 #endif 00204 00206 00207 00208 #endif // MOD_INETADDR_H 00209 00210 00211 00212 00213 00214

Generated on Wed Jul 28 14:56:49 2004 for libchipcard by doxygen 1.3.7