00001 #ifndef __NETINTERFACE_H__ 00002 #define __NETINTERFACE_H__ 00003 00004 #include "GSTypes.h" 00005 00006 enum INTERFACE_TYPE { 00007 IT_LAN, 00008 IT_INTERNET, 00009 IT_ALL 00010 }; 00011 00012 //=================================================================================================== 00013 // MEMBER: GetNetInterface 00014 // AUTHOR: Pierre-Luc Rigaux 00015 // CREATION: May 2001 00016 // 00017 // DESCRIPTION: Get the local IP Address and the Net Mask of the first Eternet device 00018 //=================================================================================================== 00019 // INPUT: null 00020 // OUPUTS: IP Address and netmask in a string format 00021 // RESULT: True on success, false else 00022 // known bug: this funtion takes the first ip interface (we don't know if it is the good one) 00023 //=================================================================================================== 00024 GSbool GetNetInterface(GSchar* szIPAddress, GSchar* szNetMask, 00025 INTERFACE_TYPE type = IT_ALL, GSuint uiIndex = 0); 00026 00027 //=================================================================================================== 00028 // MEMBER: ResolveBroadcast 00029 // AUTHOR: Guillaume Plante 00030 // CREATION: May 2001 00031 // 00032 // DESCRIPTION: Resolve the broadcast address on the network from the netmask and local ip 00033 // that has been specified by the user. If they are valid, the broadcast is resolve 00034 // with these ip but if they arent, the function tries to resolve it with the 00035 // detected local ip address and net mask, in this case the function return false. 00036 //=================================================================================================== 00037 // INPUT: szLocalAddrees = local address in a string format 00038 // INPUT: szNetmask = local netmask in a string format 00039 // OUPUTS: szBroadcastAddress : network broadcast ip address in a string format 00040 // RESULT: True on success, false else 00041 //=================================================================================================== 00042 GSbool ResolveBroadcast(GSchar *szLocalAddress,GSchar *szNetmask,GSchar *szBroadcastAddress); 00043 00044 //=================================================================================================== 00045 // MEMBER: ResolveBroadcast 00046 // AUTHOR: Guillaume Plante 00047 // CREATION: May 2001 00048 // 00049 // DESCRIPTION: Check if a ip address is valid by comparing it with each of the detected 00050 // address on the local machine. 00051 //=================================================================================================== 00052 // INPUT: szLocalAddrees = local address in a string format 00053 // RESULT: True on success, false else 00054 //=================================================================================================== 00055 GSbool IPIsValid(GSchar *szIPAddress); 00056 00057 00058 #endif
Ubi.com GameService SDK - ©UbiSoft Entertainment 2002
GameService development team