From owner-freebsd-net@FreeBSD.ORG Tue Mar 2 01:26:31 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BB9A416A4CE for ; Tue, 2 Mar 2004 01:26:31 -0800 (PST) Received: from vbook.fbsd.ru (asplinux.ru [195.133.213.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7B7FC43D31 for ; Tue, 2 Mar 2004 01:26:31 -0800 (PST) (envelope-from vova@vbook.fbsd.ru) Received: from vova by vbook.fbsd.ru with local (Exim 4.30; FreeBSD) id 1Ay6Bt-0003ba-8N; Tue, 02 Mar 2004 12:27:53 +0300 From: Vladimir Grebenschikov To: Gleb Smirnoff , freebsd-net In-Reply-To: <20040302082625.GE22985@cell.sick.ru> References: <4043B6BA.B847F081@freebsd.org> <200403011507.52238.wes@softweyr.com> <20040302031625.GA4061@scylla.towardex.com> <20040302042957.GH3841@saboteur.dek.spc.org> <20040302082625.GE22985@cell.sick.ru> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable Organization: TSB "Russian Express" Message-Id: <1078219671.1054.26.camel@localhost> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.5.4FreeBSD GNOME Team Port Date: Tue, 02 Mar 2004 12:27:52 +0300 Sender: Vladimir Grebenschikov Subject: Re: My planned work on networking stack X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: vova@express.ru List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2004 09:26:31 -0000 On =D7=D4, 2004-03-02 at 11:26 +0300, Gleb Smirnoff wrote: Hi > Currently I'm working on my Netflow implementation, and I have faced th= e > following problem: I've already got global routing in my routing table, b= ut it > lacks AS (Autonomous System) information. The routing daemon (zebra in my= case) > already knows ASes, but this informations is lost when routing informatio= n is > injected into kernel. It'll be nice to add AS path to struct rtentry. > Seems like there is no problem with extending struct rtentry, but injec= ting > this info from userland requires changes to routing API. I see two ways o= f > implementing it: What for you need have as-path in FIB (forwarding information base) ? If you are going to do as-path policy routing then , I think, it is invalid solution, because on next step you will import community-list into FIB, and etc. IMHO, Better solution will be ability to refer from route entry some additional route information block, and then (on phase of routing decision) examine this block by loadable routing decisions modules. So, any 3rd-party software (like zebra) will install it's own routing decisions module(s) and supply additional routing information blocks (not stored in rtentry). Anyway kernel still should have ability to add more then one entry for single prefix to FIB. > 1) Simply add new field into struct rt_msghdr, and bump RTM_VERSION. I = have > done this, it works. But I don't like it, since RTM_VERSION has chan= ged. > 2) Create new sockaddr, called sockaddr_aspath. Define RTAX_ASPATH, inc= rease > RTAX_MAX. Pass this sockaddr_aspath in rti_info[] array of a routing= message > into kernel. Unparse it in the kernel, fill in new field of struct r= tentry. >=20 > While I haven't yet started working on 2), I'd be very glad to hear comme= nts > from FreeBSD developers. Thanks in advance. >=20 > --=20 > Totus tuus, Glebius. > GLEBIUS-RIPN GLEB-RIPE