From owner-freebsd-current Tue Apr 28 08:26:08 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA13962 for freebsd-current-outgoing; Tue, 28 Apr 1998 08:26:08 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from ns1.yes.no (ns1.yes.no [195.119.24.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA13951 for ; Tue, 28 Apr 1998 08:26:06 -0700 (PDT) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [194.198.43.36]) by ns1.yes.no (8.8.7/8.8.7) with ESMTP id PAA10840; Tue, 28 Apr 1998 15:25:54 GMT Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id RAA01417; Tue, 28 Apr 1998 17:25:52 +0200 (MET DST) Message-ID: <19980428172548.21094@follo.net> Date: Tue, 28 Apr 1998 17:25:48 +0200 From: Eivind Eklund To: Luigi Rizzo , Julian Elischer Cc: kjc@csl.sony.co.jp, current@FreeBSD.ORG Subject: Re: Bandwidth throttling etc. References: <3540D3AE.52BFA1D7@whistle.com> <199804280857.KAA26098@labinfo.iet.unipi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89.1i In-Reply-To: <199804280857.KAA26098@labinfo.iet.unipi.it>; from Luigi Rizzo on Tue, Apr 28, 1998 at 10:57:56AM +0200 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, Apr 28, 1998 at 10:57:56AM +0200, Luigi Rizzo wrote: > Playing with ipfirewall and mbufs, i am hitting a problem related to > the size of mbufs. > > In my implementation, i need to add a couple of fields (6 bytes total) > to the struct ip_fw, bringing its size to 112 bytes. > > setsockopt() fails for sizes>108 bytes. > > there are two ways i can save the space: > > 1) reduce IP_FW_MAX_PORTS to 7 instead of 10 > 2) move counters and statistic info (timestamp) to the end > of the struct ip_fw, and allow setsockopt() to work only > on the initial part of the structure. > > suggestions ? The first one is a quick solution to the problem, i am > just not sure how widespread are rules using 8,9,10 ports (where there > is a difference between new and old behaviour). Search for 'On a new IPFW interface, w/potentially wider applications' in the archives, and tell me what you think. This is a description of a solution for the problem, which also get rid of the entire problem of the IPFW structure changing (disconnecting the userland program from the actual structure). Eivind. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message