[Olsr-users] Proposal: Use just one socket to send and receive messages on all interfaces
Juliusz Chroboczek
(spam-protected)
Thu Sep 11 23:06:26 CEST 2008
> Use recvmsg(2) to receive the incoming packets. If you enable the
> socket option IP_PKTINFO or IPV6_RECVPKTINFO than recvmsg will add
> a correcponding control message with information about the interface
> the packet was received on, the original destination address and the
> local interface address that caused the packet to be received.
If you're using IPv6 link-local addresses for your routing traffic (as
you should), then you don't need that; it's enough to check the
sin6_scope_id field of sockaddr_sin6.
Juliusz
More information about the Olsr-users
mailing list