vsisocket.h File Reference
#include "vsitypesint.h"
Go to the source code of this file.
Typedef Documentation
Function Documentation
u32 vsiGetIPaddress |
( |
char * |
HostName |
) |
|
Definition at line 532 of file vsisocket.cpp.
00533 {
00534 struct hostent* hostaddress;
00535 hostaddress = gethostbyname(HostName);
00536
00537 if(hostaddress == 0)
00538 {
00539 return 0;
00540 }
00541
00542 u32 result;
00543
00544 struct sockaddr_in RemoteAddress;
00545 memset( &RemoteAddress,0x00,sizeof( RemoteAddress ) );
00546 memcpy ((char*)&RemoteAddress.sin_addr,
00547 hostaddress->h_addr_list[0],
00548 hostaddress->h_length);
00549
00550 result = RemoteAddress.sin_addr.s_addr;
00551
00552 return result;
00553 }
Variable Documentation