
Sending IPv6 HopByHop extension header with Router Alert
Hi,
I hope you are doing great.
I am posting this here as I believe Network Programming EXPERTS
visiting this group will help me out.
Problem: I am trying to send IPV6 HopByHop extension header with
ROUTER ALERT and receive at the other end. For router alert TLV (T=5,
L=2, V=0x0001: RFC 2711). Now I am filling the structure as follows..
struct msghdr{
.....
.....
msg_control ------|
msg_controllen=20 |
..... |
} |
-> --------------------------------
| cmsg_len = 18 |
--------------------------------
| cmsg_level=IPPROTO_IPV6 |
--------------------------------
| cmsg_type = IPV6_HOPOPTS |
---------------------------------
|Next Hdr|Next Hdr Len|Type|Length|
| 0x00 | 0x00 |0x05|0x02 |
---------------------------------
|2-byte value |<--2 bytes pad---->|
| 0x00 0x01 | |
---------------------------------
sendmsg(sockFd->fd, &msg, 0);
The above calling is used to send the HBH extension header.
I am using Solaris 2.8. Why it is not received at the other
end? Am I filling the structure correctly? Is my padding OK? I also
tried with 6 bytes padding after value.That also didn't work. BUT WHEN
I SEND HOPLIMIT OPTION, I CAN RECEIVE AT THE OTHER END SUCCESSFULLY.
What is going wrong here?
Thanks in Advance.
Sagar