4

I'm using boost asio icmp sockets to send and receive ICMP packets. My code is based on the boost example: http://www.boost.org/doc/libs/1_51_0/doc/html/boost_asio/example/icmp/ping.cpp

I tried to do the same in IPv6. I can send ICMP messages similar to the IPv4 example (other checksum calculation and different ICMP types), but when I try to receive the replies, I only receive the ICMP header and no IPv6 header like in the example.

I thought, using raw sockets would give me also the IPv6 header. For my use case, I would appreciate also receiving the IPv6 header because I need source and destination address (using not bounded socket with many interfaces). Main question is:

Why is there a different behavior in IPv4 and IPv6? OS: Ubuntu 16.04.2 Kernel version: 4.4.0

Thanks for your help :)

Christi258
  • 51
  • 2

0 Answers0