From owner-freebsd-net@FreeBSD.ORG Wed Jun 23 03:40:22 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 09E1216A4CE for ; Wed, 23 Jun 2004 03:40:22 +0000 (GMT) Received: from utopia.in.force-elite.com (force-elite.com [216.255.199.145]) by mx1.FreeBSD.org (Postfix) with ESMTP id 919F743D41 for ; Wed, 23 Jun 2004 03:40:21 +0000 (GMT) (envelope-from chip@force-elite.com) X-AuthUser: chip@force-elite.com Received: from [10.0.0.22] (10.0.0.22:35286)Server] ; Wed, 23 Jun 2004 03:39:48 -0000 From: Paul Querna To: freebsd-net@freebsd.org Content-Type: text/plain Date: Tue, 22 Jun 2004 20:39:48 -0700 Message-Id: <1087961988.32333.48.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 1.5.9.2 Content-Transfer-Encoding: 7bit Subject: Rate Limiting Per-Socket X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jun 2004 03:40:22 -0000 Hello, I am looking at methods to rate limit a single socket to a specific pipe or rate with FreeBSD. I would like to make an Apache module that could do its outgoing rate limit *in* kernel, making the module very simple, and more accurate by using the kernel todo the rate limiting. I have been looking at Dummynet and pfil_hooks, but these seem to operate only on an entire interface. I would like to have these operate only on a socket fd that I designate. Ie a special setsockopt() would put socket x into pipe a. This pipe 'a' was setup ahead of time to only allow 512 kb/s. Is this possible with FreeBSD? Do you have any suggestions on the best way to proceed? Thank you, -Paul Querna