Received: with ECARTIS (v1.0.0; list netdev); Mon, 12 Sep 2005 09:54:37 -0700 (PDT) Received: from web34211.mail.mud.yahoo.com (web34211.mail.mud.yahoo.com [66.163.178.126]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id j8CGsViL024788 for ; Mon, 12 Sep 2005 09:54:31 -0700 Received: (qmail 51507 invoked by uid 60001); 12 Sep 2005 16:51:53 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=6fG8hOMm9Mgz2Qo7i0ys2zCYXeq0Inn6MfDv1yq4okgD7AAdaxKCJVJpB25xi29VjjSCDakPmTec+UY4NXqIEDYOR2opTftiWsUQullCtgxoKYgbC1poXx2QF3brq1CeedQnou5FDrVA3B2kmd2e/v0ORRC3qN/zUmJZOsem6xY= ; Message-ID: <20050912165153.51505.qmail@web34211.mail.mud.yahoo.com> Received: from [192.35.17.30] by web34211.mail.mud.yahoo.com via HTTP; Mon, 12 Sep 2005 09:51:53 PDT Date: Mon, 12 Sep 2005 09:51:53 -0700 (PDT) From: YongHan Lee Subject: Writing Kernel Module to get Kernel Routing Table Information To: y_h_lee@yahoo.com MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-archive-position: 3617 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: y_h_lee@yahoo.com Precedence: bulk X-list: netdev Content-Length: 2195 Lines: 72 Dear Linux-Networking Maintainer, I am a student of EPFL in Switzerland and do a semester project in networking. My subject is "ipv6 multipath AODV routing implementation". To achieve my goal I would like to program a kernel module which allows/enables multipath routing. This means, if I have several routes to one destination (but different next hops) in the kernel routing table, then I want to choose a route entry with the desired next hop and not necessary the first route entry. Since I do not know well the kernel architecture, especially the kernel networking section, I do not know if and how it is possible. My first idea was to use netfilter for ipv6, but the multiple routing table with marks are only implemented for ipv4. https://lists.netfilter.org/pipermail/netfilter/2005-August/062252.html And now I try to write a Kernel module which should retrieve all route entries from the kernel routing table (fib6_node, rt6_info or dst_entry struct) by comparing the destination address, source address and next hop address with those of the ip packet. This happens at POST ROUTING hook. Afterwards, I would change the destination (struct dst_entry) of the sk_buff struct of the ip packet. The problem is not to get the next hop address of the ip packet. I have started to write my kernel module, but it was not able to get the route entries from the kernel routing table, because a lot of the functions are static. I wanted to iterate the fib6_nodes from the root (like fib6_lookup(&ip6_routing_table, daddr, saddr) [from ip6_fib.c]), but the kernel returns me: Sep 12 17:31:34 m66533pp kernel: kaodv: Unknown symbol fib6_lookup Sep 12 17:31:34 m66533pp kernel: kaodv: Unknown symbol ip6_routing_table even they are defined in kallsyms and I included the ip6_fib.h file. I would be very glad if you could give me some helps or advises (how it is possible or my idea is totally impossible). Some links to architecture of kernel routing table would be already a great help for me. I would like to thank you in advance for your help. yours faithfully, Yong-Han Lee __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com