setting DiffServ in network packets under Linux???

Bill Bogstad bogstad-e+AXbWqSrlAAvxtiuMwx3w at public.gmane.org
Wed Jan 6 16:36:53 EST 2010


Does anybody have any idea if there is a programmatic way to set the
DiffServ (Differentiated Services Code Point (DSCP)) field on IP
packets generated by programs running under Linux?   I'm working on a
project that wants to have different levels of service for different
application's packets and we would like to use this field to specify
priorities for different classes of traffic.  This will be on a closed
network so concerns about spoofing of priorities aren't an issue.   Is
there some obscure socket() option that I can use to set the value of
this field?   Any suggestions/pointers would be greatly appreciated.

The closest thing to a 'solution' that I've found is to use the
kernel's filtering code to set this field after some kind of pattern
matching which will match against any packets generated by the
application.  This looks like a really ugly solution if it is even
feasible.  I'm really hoping that I just haven't googled the right
resource yet...

Thanks,
Bill Bogstad





More information about the Discuss mailing list