From owner-freebsd-pf@FreeBSD.ORG Mon Feb 4 07:13:48 2008 Return-Path: Delivered-To: freebsd-pf@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70D6C16A417 for ; Mon, 4 Feb 2008 07:13:48 +0000 (UTC) (envelope-from guntis@rixtel.com) Received: from bute.rixtel.com (bute.rixtel.com [159.148.78.40]) by mx1.freebsd.org (Postfix) with ESMTP id 2626013C457 for ; Mon, 4 Feb 2008 07:13:47 +0000 (UTC) (envelope-from guntis@rixtel.com) Received: from localhost (localhost.rixtel.com [127.0.0.1]) by bute.rixtel.com (Postfix) with ESMTP id 65FD71CC2E for ; Mon, 4 Feb 2008 08:36:22 +0200 (EET) X-Virus-Scanned: amavisd-new at rixtel.com Received: from bute.rixtel.com ([127.0.0.1]) by localhost (bute.rixtel.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 71n78uHZWWyz for ; Mon, 4 Feb 2008 08:36:19 +0200 (EET) Received: from [192.168.10.105] (localhost.rixtel.com [127.0.0.1]) (Authenticated sender: guntis@rixtel.com) by bute.rixtel.com (Postfix) with ESMTP id 38AE81CC28 for ; Mon, 4 Feb 2008 08:36:19 +0200 (EET) From: Guntis Bumburs Organization: Rixtel To: freebsd-pf@freebsd.org Date: Mon, 4 Feb 2008 08:36:18 +0200 User-Agent: KMail/1.9.7 References: <15260126.post@talk.nabble.com> In-Reply-To: <15260126.post@talk.nabble.com> X-Face: $dO4505L-bM3\Iz"(=?utf-8?q?V=3Dy=2EbL/75=7B5ys3=3AB=5B-aPBQvs*Z=25fdBqFhvc85hmZN4j1kwRzwvY*?= =?utf-8?q?R=0A=094nvQ/=23/+kWXH?=((aXWh\%mvG1V()Z0k:NwZAIu\S0d1%,nv`^ MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200802040836.18611.guntis@rixtel.com> Subject: Re: altq: dynamic queues X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2008 07:13:48 -0000 On Monday 04 February 2008 01:48:40 cnupm wrote: > > My English is no good, so I tried to describe what I want at this example: > > ### /etc/pf.conf > altq on bge0 bandwidth 10Mb hfsc queue { u1_in, u1_out, u2_in, u2_out...} > anchor users_queues > > block all > anchor users_rules > > ### When user connected - teke parameter $x from DB (for example) and > execute: > echo "queue u1_in bandwidth 1Kb hfsc (upperlimit $xKb)" | pfctl -a > user_queues:u1_in -f - > echo "queue u1_out bandwidth 1Kb hfsc (upperlimit $xKb)" | pfctl -a > user_queues:u1_out -f - > *** ... users_rules... *** > > I know: it doesn't works - it's simplest way (with my English) to explain > what I wont. > How to dynamicly create/delete queues? Hello, It's no possible. You can't define queues in anchors. ANCHORS Besides the main ruleset, pfctl(8) can load rulesets into anchor attach- ment points. An anchor is a container that can hold rules, address tables, and other anchors. -- Best Regards, Guntis Bumburs