On Sun, 2004-12-19 at 18:46, Tommy Christensen wrote:
> OK. So is this the recommendation for these pour souls?
>
> - Use a socket for each device.
Sounds sensible (each device with IP enabled is more like it)
> - Set the socket buffer (SO_SNDBUF) large enough. E.g. 1 MB ?
> Or use non-blocking sockets - just in case.
I think we may need a socket "flush socket buffer" signal
> - If you care about not sending stale packets, it is the
> responsibility of the application to flush the socket on
> link-down events (by down'ing the interface?).
sigh. I am begining to think this is too complex an approach.
It requires there be a way to automagically clean up the buffers
when things like this happen.
I beginuing to think thats the simplest way to achieve this: i.e not to
stop the queue but rather to let the packets continue showing up and
drop them at the driver when the link is down . The netlink async
carrier signal to the app is to be used to reroute instead of being a
signal to flush buffers. In other words the other Thomas got it right
(with the exception of setting the IFF_RUNNIGN flags)
Jeff?
cheers,
jamal
|