From owner-freebsd-current Fri Oct 4 7:34:16 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BAD2C37B401 for ; Fri, 4 Oct 2002 07:34:14 -0700 (PDT) Received: from web9503.mail.yahoo.com (web9503.mail.yahoo.com [216.136.129.133]) by mx1.FreeBSD.org (Postfix) with SMTP id 7568943E75 for ; Fri, 4 Oct 2002 07:34:14 -0700 (PDT) (envelope-from yat_33@yahoo.com) Message-ID: <20021004143414.82732.qmail@web9503.mail.yahoo.com> Received: from [65.207.163.130] by web9503.mail.yahoo.com via HTTP; Fri, 04 Oct 2002 07:34:14 PDT Date: Fri, 4 Oct 2002 07:34:14 -0700 (PDT) From: yatin chalke Subject: Parsing route dump treceived by using sysctl To: freebsd-current@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, I am currently trying to get a route dump in freebsd4.4 using sysctl with NET_RT_DUMP. I am running into problems while parsing the returned rt_msghdr structures. The sockaddr structures returned after the rt_msghdr are messed up and it is not giving correct gateway or netmask. For ex: when I am parsing the received route dump the netmask received is nonzero(random value) for a default route (which it returns as 0.0.0.0) and also netmask doesnt appear to be a sockaddr structure. Also for further routes gateway and netmasks are 0.0.0.0. I am parsing the received sockaddr structures to get all the values depending on flag bits set in rt_msghdr structure. If anyone can help me in this matter it will be a great help. Thanks, --Yatin __________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message