[Serusers] Preserve DSCP marking

Jan Andres jan.andres at freenet-ag.de
Fri Jun 1 13:26:58 CEST 2007


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 at freenet.ag>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20070601/4520ae9e/attachment.pgp>


More information about the sr-users mailing list