netdev
[Top] [All Lists]

IPV6_HOPOPTS

To: "netdev@xxxxxxxxxxx" <netdev@xxxxxxxxxxx>
Subject: IPV6_HOPOPTS
From: root <insel@xxxxxxxxxxxxxxx>
Date: Thu, 08 Nov 2001 22:17:58 +0100
Sender: owner-netdev@xxxxxxxxxxx
Hello out there,
I'am trying to use the hop-by-hop options with ipv6 but I can't manage
to resceive those options on an intermediate router along the packets
deliverypath from source to destination.

On the source I send an udp-ipv6-packet using ancillary data with :

sensend_sd = socket(PF_INET6, SOCK_DGRAM, proto->p_proto);  /* with
proto->p_proto=udp=17 */
...
  send_cmsgptr_1->cmsg_level = IPPROTO_IPV6;                      
/*######*/
  send_cmsgptr_1->cmsg_type = IPV6_HOPOPTS;                       
/*######*/
...
sendmsg(send_sd, &send_msghdr, 0);


and at the destination after passing an intermediate router get my
TLV-encoded hopoption back with:
...
recv_sd = socket(PF_INET6, SOCK_RAW, proto->p_proto) /* again
proto->p_proto=udp=17 */
int on=1;
setsockopt(recv_sd, IPPROTO_IPV6, IPV6_HOPOPTS, &on, sizeof(on));
...
recvmsg(recv_sd, &recv_msghdr, 0);

where indeed the ancillary-data-object of recv_msghdr holds the two hops
earlyer assigned value.

But when i start the same deamon like on the destination on the
intermediate router,
recvmsg doesn't receive anything. 
Probably the socket must be created with proto->p_proto=hopopt=0 like 
recv_sd = socket(PF_INET6, SOCK_RAW, proto->p_proto) /* again
proto->p_proto=hopopt=0 */ 
but then (after uncommenting hopopt in /etc/protocols) the kernel
returns:
Socket type not supported.

Can anybody help me out with this ???
Thanks in advance...  axel

<Prev in Thread] Current Thread [Next in Thread>