getting local host address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
        i am a total newbie so pardon me if this has been asked 
before.
 	I want to send ICMP pkts with my own IP header  (somewhat 
similar to traceroute) through a raw socket, but how do I get the 
local host address to fill the IP header's src address field. 
Since, my process is a daemon process I can't provide it myself 
everytime the address and then using gethostbyname() etc. which 
themselves require the host address in string or dotted form.
         I welcome ur suggestions.

Murgan
_________________________________________________________
Click below to visit monsterindia.com and there is always a
better job for you at http://monsterindia.rediff.com/jobs

-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux