Moin!
On Fri, Jun 01, 2007 at 10:38:18AM +0200, Hendrik Scholz wrote:
You could enhance the structures in ip_addr.h to store
the information
received. The way SER uses UDP sockets would force you to do
setsockopt() quite often, though.
Also, as the UDP sockets are shared between all processes, you would
have to obtain a lock before doing the setsockopt() and sendto() calls.
I thought that it might be possible to do it with a single system call
using sendmsg() and passing the TOS value as ancillary data, but I just
tested this, and unfortunately it doesn't seem to work.
Note also that the IP_RECVTOS socket option, which is used to obtain the
TOS value of received packets, seems to be available only on Linux.
Regards,
Jan
--
Jan Andres <jan.andres(a)freenet.ag>