From owner-freebsd-net@FreeBSD.ORG Wed Jul 25 08:06:44 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 06E76106564A for ; Wed, 25 Jul 2012 08:06:44 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mail.ipfw.ru (unknown [IPv6:2a01:4f8:120:6141::2]) by mx1.freebsd.org (Postfix) with ESMTP id 948DA8FC0C for ; Wed, 25 Jul 2012 08:06:43 +0000 (UTC) Received: from secured.by.ipfw.ru ([95.143.220.47] helo=ws.su29.net) by mail.ipfw.ru with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.76 (FreeBSD)) (envelope-from ) id 1Stweu-0006l8-Qw; Wed, 25 Jul 2012 12:09:28 +0400 Message-ID: <500FA90D.9060209@FreeBSD.org> Date: Wed, 25 Jul 2012 12:06:37 +0400 From: "Alexander V. Chernikov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20120121 Thunderbird/9.0 MIME-Version: 1.0 To: Philip Prindeville References: <500F27BF.40802@redfish-solutions.com> In-Reply-To: <500F27BF.40802@redfish-solutions.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: Mapping from rtm_flags back to MIB IANAipRouteProtocol value X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jul 2012 08:06:44 -0000 On 25.07.2012 02:54, Philip Prindeville wrote: > Ok, dumb question... How do I map a routing entries rtm_flags back to a IANAipRouteProtocol value? Well, something like this can probably be used: ~RTF_GATEWAY maps to local (2), -- local interface RTF_STATIC maps to netmgmt (3), -- static route RTF_DYNAMIC maps to icmp (4), -- result of ICMP Redirect other routes? other (1), -- not specified RTF_PROTO1 tells us thet it is dynamic route, and you have to use quagga/bird/openbgpd/whatever cli / api to get more precise results. You can examine `netstat -rn -finet` output with netstat(8) to get good overview for common route types. > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >