Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Aug 1999 15:59:00 -0500 (CDT)
From:      Jonathan Lemon <jlemon@americantv.com>
To:        nik@FreeBSD.ORG, hackers@FreeBSD.ORG
Subject:   Re: no getkerninfo() man page (docs/12220)
Message-ID:  <199908042059.PAA14626@free.pcs>
In-Reply-To: <local.mail.freebsd-hackers/19990804165905.A16449@kilt.nothing-going-on.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <local.mail.freebsd-hackers/19990804165905.A16449@kilt.nothing-going-on.org> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199908042059.PAA14626>