IPv6 header on raw sockets?

L

Lars Strand

I'm using raw sockets to send ICMPv6 echo/reply packets,
and would like to examine the IP header on the reply packet.

When using raw socket "the IPv6 header and any extension
headers are never passed to a raw IPv6 socket":

http://ccl.cnu.ac.kr/~mhkang/raw_sockets.htm

When skimming through the ping6.c, I see that they set some
socket options using setsockopt (IPV6_RECVHOPLIMIT). I have
tried to set

pingSocket.setsockopt(IPPROTO_IPV6, IPV6_RECVHOPLIMIT, 1)

but it don't work. Is there any way to get the whole IP
packet when using IPv6 and raw sockets?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top