Re: getting local host address

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

 



Murgan wrote:
> 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 

Just set the source address to INADDR_ANY in your IP header, and the 
kernel will set it appropriately before sending the packet.



-- 
Casey Carter
Casey@Carter.net
ccarter@uiuc.edu
AIM: cartec69

-
: 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