From owner-freebsd-hackers Wed Aug 4 13:59:21 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from sumatra.americantv.com (sumatra.americantv.com [208.139.222.227]) by hub.freebsd.org (Postfix) with ESMTP id CC20515214; Wed, 4 Aug 1999 13:59:14 -0700 (PDT) (envelope-from jlemon@americantv.com) Received: from right.PCS (right.PCS [148.105.10.31]) by sumatra.americantv.com (8.8.5/8.8.5) with ESMTP id PAA01570; Wed, 4 Aug 1999 15:59:02 -0500 (CDT) Received: from free.pcs (free.PCS [148.105.10.51]) by right.PCS (8.8.5/8.6.4) with ESMTP id PAA08363; Wed, 4 Aug 1999 15:59:01 -0500 (CDT) Received: (from jlemon@localhost) by free.pcs (8.8.6/8.8.5) id PAA14626; Wed, 4 Aug 1999 15:59:00 -0500 (CDT) Date: Wed, 4 Aug 1999 15:59:00 -0500 (CDT) From: Jonathan Lemon Message-Id: <199908042059.PAA14626@free.pcs> To: nik@FreeBSD.ORG, hackers@FreeBSD.ORG Subject: Re: no getkerninfo() man page (docs/12220) X-Newsgroups: local.mail.freebsd-hackers In-Reply-To: Organization: Architecture and Operating System Fanatics Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In article you write: >-hackers, > >As docs/12220 points out; > > We want to extract routing information by specifying a particular > destination IP address. The man page on Route and Rtentry mention > that this information can be acquired using getkerninfo command. But > there is no such man page. Is it possible to get the information as > how to use this command. Or if there is any other method of acquiring > this information. > >Can anyone oblige with a getkerninfo() man page? getkerninfo() is depreciated, we use sysctl() instead. In fact, most of the information provided by getkerninfo() is implemented in terms of sysctl(). At the moment, sysctl() will only provide a dump of all routes, there doesn't appear be a way to limit the output to a specific address. In order to get a specific route, you'd have to query the routing socket directly with RTM_GET, this is documented in the route(4) manpage. The route(4) manpage says: User processes can obtain information about the routing entry to a spe- cific destination by using a RTM_GET message, or by reading the /dev/kmem device, or by issuing a getkerninfo(2) system call. IMHO, the above sentence should probably be altered by replacing the first comma with a period, and throwing away the rest of it. -- Jonathan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message