Skip site navigation (1)Skip section navigation (2)
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
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01BF9E3B.D9202AAA
Content-Type: text/plain;
	charset="iso-8859-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
> _______________________________________________________________

------_=_NextPart_001_01BF9E3B.D9202AAA
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"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=3D2 FACE=3D"Arial">Hello all.</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"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=3D2 FACE=3D"Arial">ipchains blah blah -s 192.168.1.1 -d =
192.168.1.2 -t 0x01 0x80</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"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=3D2 FACE=3D"Arial">Does anyone know the setsockopt() =
commands to activate TOS-field marking on FreeBSD? Can it be =
done?</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Thanks a bunch,</FONT>
<BR><FONT SIZE=3D1 =
FACE=3D"Tahoma">________________________________________________________=
_______</FONT>
</P>

<P><FONT SIZE=3D1 FACE=3D"Tahoma">Jeffrey =
Spiers&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
Phone: (613) 765-5701</FONT>
<BR><FONT SIZE=3D1 FACE=3D"Tahoma">Co-op =
Student&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
Fax:&nbsp;&nbsp;&nbsp;&nbsp; (613) 763-2686</FONT>
<BR><FONT SIZE=3D1 FACE=3D"Tahoma">Wireless IP Access =
Technologies&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
ESN:&nbsp;&nbsp;&nbsp;&nbsp; 39-55701</FONT>
<BR><FONT SIZE=3D1 FACE=3D"Tahoma">Nortel =
Networks&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Email:&nbsp;&nbsp; =
jspiers@nortelnetworks.com</FONT>
<BR><FONT SIZE=3D1 =
FACE=3D"Tahoma">________________________________________________________=
_______</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01BF9E3B.D9202AAA--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?13E2EF604DE5D111B2E50000F80824E803CA80D8>