![]() |
|
|
|||||||
| Home | Forums | Register | Rules & FAQ | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
Other UNIX.COM Threads You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to read the data from an excel sheet and use those data as variable in the unix c | Anne Grace | UNIX for Advanced & Expert Users | 1 | 03-03-2008 03:21 AM |
| how to verify that copied data to remote system is identical with local data. | ynilesh | Shell Programming and Scripting | 3 | 01-31-2008 04:55 AM |
| Howto capture data from rs232port andpull data into oracle database-9i automatically | boss | UNIX for Dummies Questions & Answers | 1 | 09-22-2007 11:35 PM |
| Using loop reading a file,retrieving data from data base. | Sonu4lov | Shell Programming and Scripting | 1 | 01-18-2007 11:38 PM |
| Convert Binary data to ascii data | krishna | UNIX for Advanced & Expert Users | 4 | 11-05-2004 12:12 PM |
![]() |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
How to Get the hostent data
Hi,
I am trying to write a program, to find the open port on any system. Rightnow, my programm is working fine on the same system ip. Now, i want to enhanced it to get any IP address and perform the task. Problem is that, i have only IP address, like "111:111:111:111". From this how to get the struct hostent *he; I have tried with the following code //he = gethostbyname( compName ); unsigned int addr = inet_addr("111:111:111:111"); hostent *he = gethostbyaddr((char *) &addr, 4, AF_INET); But getgostbyaddress is returning NULL. Any body help me. |
| Forum Sponsor | ||
|
|
|
|||
|
Seems you should put the return value from inet_addr in addr.s_addr.
./ettercap-0.5.0/src/ec_inet.c - Google Code Search |