From owner-freebsd-net Tue Apr 4 7:41:43 2000 Delivered-To: freebsd-net@freebsd.org Received: from smtprch1.nortel.com (smtprch1.nortelnetworks.com [192.135.215.14]) by hub.freebsd.org (Postfix) with ESMTP id C9C1A37B6AE for ; Tue, 4 Apr 2000 07:41:34 -0700 (PDT) (envelope-from jspiers@nortelnetworks.com) Received: from zrchb213.us.nortel.com (actually zrchb213) by smtprch1.nortel.com; Tue, 4 Apr 2000 08:45:47 -0500 Received: by zrchb213.us.nortel.com with Internet Mail Service (5.5.2650.21) id <2BF05H65>; Tue, 4 Apr 2000 08:44:07 -0500 Message-ID: <13E2EF604DE5D111B2E50000F80824E803CA80D8@zwdld001.ca.nortel.com> From: "Jeffrey Spiers" To: freebsd-net@freebsd.org Subject: Marking the TOS-byte of IP packets using setsockopt() calls Date: Tue, 4 Apr 2000 08:43:57 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01BF9E3B.D9202AAA" Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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 Marking the TOS-byte of IP packets using setsockopt() = calls

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          &nbs= p;           &nbs= p;         Email:   = jspiers@nortelnetworks.com
________________________________________________________= _______

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