Ignacy Gawedzki <ig@xxxxxxxxxxxxx> wrote on 04/03/2004 06:44:06 AM:
> Now given that I send multicast packets from a multicast-bound
> interface, I was wondering how to predict which interface address would
> be selected as the source address of the packets. I know that if the
> interface has two or more equivalent addresses from a prefix-length
> standpoint, the one that was added latest will be selected.
That's not something to rely on; certainly not portable. bind() is how
you set the source address for packets you're sending. If you're binding
to the multicast address for receiving, you can just use another socket
bound to the source address you want for sending.
+-DLS