[lug] Setting values in IP headers

John Hernandez John.Hernandez at noaa.gov
Fri Dec 19 09:43:26 MST 2003


This can be done with Linux netfilter, for example 'iptables -j TOS 
--set-tos <value>'.  Run 'iptables -j TOS -h' to see a list of possible 
values.

I'm not sure how this is implemented in C, but the netfilter source 
might be a good place to start.

http://www.netfilter.org/documentation/

Budyanto Himawan wrote:
> Hi,
>  
> Does anybody know if it's possible to change values to some fields
> in the IP headers (in particular the TOS field)? Is there a c function 
> that can achieve this?
>  
> I'm trying to see if I can control the TOS fields of ip packets going 
> out of my linux box.
>  
> Thanks
> 
> 
> ===========================
> Budyanto Himawan
> budyanto_himawan at yahoo.com
> ===========================
> 
> ------------------------------------------------------------------------
> Do you Yahoo!?
> New Yahoo! Photos - easier uploading and sharing 
> <http://pa.yahoo.com/*http://us.rd.yahoo.com/evt=21260/*http://photos.yahoo.com> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: lug.boulder.co.us port=6667 channel=#colug

-- 

  |  John Hernandez - NOAA Boulder NOC - 303-497-6392
  |  Mailstop R/OM62. 325 Broadway, Boulder, CO 80305
  |  PGP Public Key ID: 586A7E23




More information about the LUG mailing list