From owner-freebsd-questions@FreeBSD.ORG Thu Mar 23 15:45:03 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4CA8E16A422 for ; Thu, 23 Mar 2006 15:45:03 +0000 (UTC) (envelope-from valerio.daelli@gmail.com) Received: from nproxy.gmail.com (nproxy.gmail.com [64.233.182.189]) by mx1.FreeBSD.org (Postfix) with ESMTP id A125A43D72 for ; Thu, 23 Mar 2006 15:45:02 +0000 (GMT) (envelope-from valerio.daelli@gmail.com) Received: by nproxy.gmail.com with SMTP id m18so355790nfc for ; Thu, 23 Mar 2006 07:45:01 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=NxGk3WabDHfrQZyO0DWYjx7keTpKJfgtf6l+VF9pGsMvKGVZDz/DhHSQXhUdBuEXQVBttYC9Nr950u97Bq4aSD325s/ds5VIAahhgT42juO8KjHdDZ2pxbE0w3Enl32BSzfx07MYodpwikUK+mrzPKnQqtp2xjLxs2V6TzJ3IC4= Received: by 10.49.36.20 with SMTP id o20mr569555nfj; Thu, 23 Mar 2006 07:45:01 -0800 (PST) Received: by 10.49.43.15 with HTTP; Thu, 23 Mar 2006 07:45:01 -0800 (PST) Message-ID: <27dbfc8c0603230745i4a339eb6v552205cad85705a5@mail.gmail.com> Date: Thu, 23 Mar 2006 16:45:01 +0100 From: "Valerio daelli" To: "FreeBSD Questions" MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: Number of routing tables X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Mar 2006 15:45:03 -0000 Hello I would like to know if exists a sysctl to get the number of routing tables in the kernel. I don't want the list of the routing tables, I just want the number. The command 'netstat -rn|wc -l' could be a good candidate, but since I want to implement this command on a very busy router, I don't want it to go 100% CPU just to get a simple count. If it doesn't exist I will create something based on netstat's source. Thanks a million (routes) Valerio Daelli