From owner-freebsd-current Tue Jun 30 02:09:01 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA08533 for freebsd-current-outgoing; Tue, 30 Jun 1998 02:09:01 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from korin.warman.org.pl (korin.nask.waw.pl [148.81.160.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA08486 for ; Tue, 30 Jun 1998 02:08:33 -0700 (PDT) (envelope-from abial@nask.pl) Received: from localhost (abial@localhost) by korin.warman.org.pl (8.8.8/8.8.5) with SMTP id LAA22269 for ; Tue, 30 Jun 1998 11:12:08 +0200 (CEST) X-Authentication-Warning: korin.warman.org.pl: abial owned process doing -bs Date: Tue, 30 Jun 1998 11:12:08 +0200 (CEST) From: Andrzej Bialecki X-Sender: abial@korin.warman.org.pl To: freebsd-current@FreeBSD.ORG Subject: Retrieving routing table via sysctl Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, I have this question as in Subject. All I know thus far is that there are sysctl's which are named appropriately, but what they return is a series of struct rt_msghdr, which doesn't contain the struct sockaddr of the route itself and of the gateway... (I'm speaking here about: int mib[]={CTL_NET,PF_ROUTE,0,0,NET_RT_DUMP}; ) I'd like to be able to do this _without_ resorting to kread and friends, so that it works on a stripped kernel. TIA for any pointers. Andrzej Bialecki --------------------+--------------------------------------------------------- abial@nask.pl | if(halt_per_mth > 0) { fetch("http://www.freebsd.org") } Research & Academic | "Be open-minded, but don't let your brains to fall out." Network in Poland | All of the above (and more) is just my personal opinion. --------------------+--------------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message