Date: Tue, 4 Apr 2000 08:43:57 -0500 From: "Jeffrey Spiers" <jspiers@nortelnetworks.com> To: freebsd-net@freebsd.org Subject: Marking the TOS-byte of IP packets using setsockopt() calls Message-ID: <13E2EF604DE5D111B2E50000F80824E803CA80D8@zwdld001.ca.nortel.com>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] > Hello all. > > I'm trying to get FreeBSD 3.3 to modify the IP Type-Of-Service field of IP > packets that match given criteria using ipfw rules. I've looked through > the source code for ipfw (ipfw.c and ip_fw.h) and there doesn' seem to be > any mention of TOS. I know it can be done using ipchains on Linux, using a > command like: > > ipchains blah blah -s 192.168.1.1 -d 192.168.1.2 -t 0x01 0x80 > > The two bytes following '-t' modify the TOS field. The first byte is > ANDed, and the second one is XORed with the TOS of every packet matching > the rule. > > Does anyone know the setsockopt() commands to activate TOS-field marking > on FreeBSD? Can it be done? > > Thanks a bunch, > _______________________________________________________________ > > Jeffrey Spiers Phone: (613) 765-5701 > Co-op Student Fax: (613) 763-2686 > Wireless IP Access Technologies ESN: 39-55701 > Nortel Networks Email: > jspiers@nortelnetworks.com > _______________________________________________________________ [-- Attachment #2 --] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2651.65"> <TITLE>Marking the TOS-byte of IP packets using setsockopt() calls</TITLE> </HEAD> <BODY> <P><FONT SIZE=2 FACE="Arial">Hello all.</FONT> </P> <P><FONT SIZE=2 FACE="Arial">I'm trying to get FreeBSD 3.3 to modify the IP Type-Of-Service field of IP packets that match given criteria using ipfw rules. I've looked through the source code for ipfw (ipfw.c and ip_fw.h) and there doesn' seem to be any mention of TOS. I know it can be done using ipchains on Linux, using a command like:</FONT></P> <P><FONT SIZE=2 FACE="Arial">ipchains blah blah -s 192.168.1.1 -d 192.168.1.2 -t 0x01 0x80</FONT> </P> <P><FONT SIZE=2 FACE="Arial">The two bytes following '-t' modify the TOS field. The first byte is ANDed, and the second one is XORed with the TOS of every packet matching the rule.</FONT></P> <P><FONT SIZE=2 FACE="Arial">Does anyone know the setsockopt() commands to activate TOS-field marking on FreeBSD? Can it be done?</FONT> </P> <P><FONT SIZE=2 FACE="Arial">Thanks a bunch,</FONT> <BR><FONT SIZE=1 FACE="Tahoma">_______________________________________________________________</FONT> </P> <P><FONT SIZE=1 FACE="Tahoma">Jeffrey Spiers Phone: (613) 765-5701</FONT> <BR><FONT SIZE=1 FACE="Tahoma">Co-op Student Fax: (613) 763-2686</FONT> <BR><FONT SIZE=1 FACE="Tahoma">Wireless IP Access Technologies ESN: 39-55701</FONT> <BR><FONT SIZE=1 FACE="Tahoma">Nortel Networks Email: jspiers@nortelnetworks.com</FONT> <BR><FONT SIZE=1 FACE="Tahoma">_______________________________________________________________</FONT> </P> </BODY> </HTML>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?13E2EF604DE5D111B2E50000F80824E803CA80D8>
