From owner-freebsd-current Mon Apr 27 02:47:50 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA01870 for freebsd-current-outgoing; Mon, 27 Apr 1998 02:47:50 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id CAA01864 for ; Mon, 27 Apr 1998 02:47:47 -0700 (PDT) (envelope-from luigi@labinfo.iet.unipi.it) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id KAA24661; Mon, 27 Apr 1998 10:09:40 +0200 From: Luigi Rizzo Message-Id: <199804270809.KAA24661@labinfo.iet.unipi.it> Subject: Re: Bandwidth throttling etc. To: kjc@csl.sony.co.jp (Kenjiro Cho) Date: Mon, 27 Apr 1998 10:09:40 +0200 (MET DST) Cc: julian@whistle.com, current@FreeBSD.ORG In-Reply-To: <199804221213.VAA28109@hotaka.csl.sony.co.jp> from "Kenjiro Cho" at Apr 22, 98 09:13:22 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > It would be nice if we could write an ipfw line like: > > # Allow incoming http up to 64kbps > $fwcmd add pass tcp from any to ${ip} 80 bandwidth 64k this is exactly what i plan to build with the integration of dummynet into the ipfw stuff, only with a slightly different syntax: $fwcmd add pipe 4 tcp from any to ${ip} 80 $fwcmd add pipe 5 tcp from ${ip} 80 to any $fwcmd pipe 4 configure bandwidth 64k buffers 10 delay 400ms $fwcmd pipe 5 configure bandwidth 128k buffers 10 delay 200ms i.e. the "pipe X" option acts much like a divert, only difference is that packets are passed to the specified "pipe" which is configurable in bandwidth, buffers and delay. > You suggested to add a field to mbuf structure but it's a moot point. > - many network programs are optimized for the current mbuf size :-( > (many people want to modify mbuf, or even want to rewrite the > entire mbuf code but ...) one can still bring mbufs up to 256 bytes. > - if we are going to add a new field, it must be generic; it should > be usable by other mechanisms (e.g., routing, multicast, IPv6). i called it flow_id and it is a void *, currently pointing to the ipfw rule that matched for the packet (note that using a pointer to the rule requires a lot of care when case rules are deleted, to avoid dangling pointers). cheers luigi -----------------------------+-------------------------------------- Luigi Rizzo | Dip. di Ingegneria dell'Informazione email: luigi@iet.unipi.it | Universita' di Pisa tel: +39-50-568533 | via Diotisalvi 2, 56126 PISA (Italy) fax: +39-50-568522 | http://www.iet.unipi.it/~luigi/ _____________________________|______________________________________ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message