From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 19 18:10:11 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2573A16A4BF for ; Tue, 19 Aug 2003 18:10:11 -0700 (PDT) Received: from cs.columbia.edu (cs.columbia.edu [128.59.16.20]) by mx1.FreeBSD.org (Postfix) with ESMTP id 47A6943F85 for ; Tue, 19 Aug 2003 18:10:10 -0700 (PDT) (envelope-from pingpan@cs.columbia.edu) Received: from muni.cs.columbia.edu (muni.cs.columbia.edu [128.59.19.192]) by cs.columbia.edu (8.12.9/8.12.9) with ESMTP id h7K1A68J024193 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NOT); Tue, 19 Aug 2003 21:10:07 -0400 (EDT) Received: from muni.cs.columbia.edu (localhost [127.0.0.1]) by muni.cs.columbia.edu (8.12.9/8.12.9) with ESMTP id h7K1A5ZR002746; Tue, 19 Aug 2003 21:10:06 -0400 (EDT) Received: from localhost (pingpan@localhost)h7K19sZA002743; Tue, 19 Aug 2003 21:10:05 -0400 (EDT) X-Authentication-Warning: muni.cs.columbia.edu: pingpan owned process doing -bs Date: Tue, 19 Aug 2003 21:09:54 -0400 (EDT) From: Ping Pan To: Jerry Toung In-Reply-To: <200308191602.40166.jtoung@arc.nasa.gov> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-hackers@freebsd.org Subject: Re: new routing protocol X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2003 01:10:11 -0000 Hi, I wrote a socket family SOCK_IPOPTION several years ago, where you can intercept any IP option. In your application, you can open this kind of sockets to receive control messages, and use raw sockets to send. At the same time, use the standard routing sockets to play in the userland. The work was done in 4.2 though. Porting it to 5.0 should be simple. http://www1.cs.columbia.edu/~pingpan/software_list.htm - Ping On Tue, 19 Aug 2003, Jerry Toung wrote: > dear hackers, > I am in the process of implementing a routing protocol under 5.0. > This routing protocol is source route based and requires its own header after > the ip header and before any other one such as udp,tcp. > > (ip)(new_rt_hdr)(udp)(paylaod) > > I am requesting your input as to the best way to approach this. I am thinking > that the quick way would be to open netinet/ip_input.c and for every packet > with ip->ip_p = NEW_RT_TYPE do my processing. I am not using routing tables, > I have another mechanism for routing decisions. and for outgoing packets, > before sending to the appropriate interface, in netinet/ip_output.c insert > the new routing header then pass the packet to ifp->if_output. > > My problem is dealing with debuging and portability. With this raw approach I > guess I will have to run builkernel and installkernel all the time. How can I > avoid that? I thought about kernel modules, but I don't know what kind to use > (SYSCALL_MODULE or DEV_MODULE,etc..) and how about netgraph.? does that make > sense? > > somebody give a pointer and I'll figure out how to proceed. > I am not that experienced in kernel programming. > Thanks a lot, > Jerry. > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" >