Date: Sun, 10 Dec 2006 21:05:33 -0700 (MST) From: "M. Warner Losh" <imp@bsdimp.com> To: bsd.devil@gmail.com Cc: ozkan@mersin.edu.tr, freebsd-hackers@FreeBSD.ORG, julian@elischer.org Subject: Re: Example network protocol implementation Message-ID: <20061210.210533.-1632631349.imp@bsdimp.com> In-Reply-To: <eb7c8e2e0612100705o199393c4r353b7ff6fb058ed8@mail.gmail.com> References: <457BBCC3.9040605@mersin.edu.tr> <457BC490.30904@elischer.org> <eb7c8e2e0612100705o199393c4r353b7ff6fb058ed8@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <eb7c8e2e0612100705o199393c4r353b7ff6fb058ed8@mail.gmail.co= m> "Vishal Patil" <bsd.devil@gmail.com> writes: : Would like to thank you all folks. These conversations are really goo= d way : of learning things...Also it is good to know different perspectives f= or : solving the same problem.... Yes. the ng_iscsi suggestion is also viable. It may be a little less work than going to the raw sockets. Careful performance measurements may be necessary, however, since there have been cases when the ng_foo implementation wasn't fast enough and going to a lower level was necessary. There have also been many cases where ng_bar was perfectly fast enough and there was no need to go to the lower leve. At the very least, the ng code will get you to layer your code well and provide a faster means of development than going to the raw socket layer. Warner : On 12/10/06, Julian Elischer <julian@elischer.org> wrote: : > : > =D6zkan KIRIK wrote: : > > I think netgraph subsystem provides this infrastructure for imple= menting : > > new protocols. : > > : > > according to netgraph (4) man page: : > > : > > The aim of *netgraph* is to supplement rather than replace the= : > existing : > > kernel networking infrastructure. It provides: : > > : > > *=B7* A flexible way of combining protocol and link level= drivers. : > > *=B7* A modular way to implement new protocols. : > > *=B7* A common framework for kernel entities to inter-com= municate. : > > *=B7* A reasonably fast, kernel-based implementation. : > > : > > There are many examples and applications at this address: : > > http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/netgraph/ : > : > also look it up in the daemon news archives at: : > http://ezine.daemonnews.org/200003/netgraph.html : > : > a little out of date but the basic ideas are still right. : > : > : > > : > > : > > you implementation may be "ng_iscsi" :) : > : > I thought of this but the trick is to do with the locking.. : > You would need to get a transfer of control from the : > netgraph locking domain to the geom or scsi universe's locking doma= in. : > : > There are all the components needed if you consider using the ksock= et : > netgraph node to open a TCP socket within the kernel, and you could= hook : > that to a scsi device netgraph node almost directly if you wrote it= , : > but the hardest part will be to create a method of crossing that lo= cking : > divide. : > : > Still it's possibly worth looking at. Of course the method suggeste= d by : > Warner is also very valid and may be about the same amount of work.= : > : > : > > : > > I hope this helps, : > > : > > =D6zkan KIRIK : > > EnderUNIX SDT @ Turkey : > > Software Developer : > > : > _______________________________________________ : > freebsd-hackers@freebsd.org mailing list : > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers : > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freeb= sd.org" : > : _______________________________________________ : 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" : =
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061210.210533.-1632631349.imp>