In article <[EMAIL PROTECTED]>,
Alan DeKok <[EMAIL PROTECTED]> wrote:
>"Miquel van Smoorenburg" <[EMAIL PROTECTED]> wrote:
>> Yes there is, but it is relatively unknown. So I dove into it
>> tonight just for fun and I ended up with a recvfromto() function
>> that does exactly what you expect it to do - albeit only on Linux
>> and BSD (and it's only tested on Linux).
>
>  OK, now is there a 'sendtofrom'?

Well it would be trivial to add - it's basically the same, using
sendmsg and IP_PKTINFO for Linux.

As far as I can see, BSD has no IP_SENDSRCADDR that you can
put in a cmsg - minor oversight I guess which makes IP_RECVDSTADDR
a bit less useful, indeed. BSD does have IP_PKTINFO - but only for
IPv6, not for IPv4. Sigh.

>  And one which is thread safe? :(

Why is this version not thread-safe? The setsockopt is redundant,
it only has to happen once for each socket, but doing it
every time doesn't really hurt.

>  I think that the best option here is to add multiple 'listen'
>directives.  My idea is to add configuration like:

Yes, much easier, but less fun because it doesn't use obscure or
unknown functionality of the network stack that nobody else uses ;)

Mike.


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to