LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How can set source address in IPv6 header for sending data? (https://www.linuxquestions.org/questions/linux-networking-3/how-can-set-source-address-in-ipv6-header-for-sending-data-776454/)

sujay 12-17-2009 10:38 AM

How can set source address in IPv6 header for sending data?
 
I have to send Neighbor Discovery packet, i have to send this packet in an IPV6 header.
My requirement is to set the "source address" in IPv6 header to "::0" rather than allowing kernel to insert the source address.
How can i do this??

I googled for this, only clue i got is to use IPV6_PKTINFO in setsockopt() with usage of struct pktinfo, but i couldn't get the expected result.

Note: Im using a RAW socket for this.

Any help on this would be appreciated.
Thanks in advance :)

nimnull22 12-18-2009 07:03 PM

How can set source address in IPv6 header for sending data? = IP spoofing.

Most frequently use is denial-of-service (DOS) attacks.

sujay 12-19-2009 01:32 AM

Quote:

Originally Posted by nimnull22 (Post 3797362)
How can set source address in IPv6 header for sending data? = IP spoofing.

Most frequently use is denial-of-service (DOS) attacks.

Hi,

My intention isn't any DOS or any sort of attacks.

I need to send Neighbor discovery packets with the help of ICMPv6 packet, wherein i need to set the source ipv6 address of IPV6 header which helps me to send the ICMPv6 packet. this is given in rfc2461 section 4.3 & 7.2.2

Any help on this??


All times are GMT -5. The time now is 11:09 AM.