Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Dec 2006 00:25:52 -0800
From:      Julian Elischer <julian@elischer.org>
To:        =?ISO-8859-9?Q?=D6zkan_KIRIK?= <ozkan@mersin.edu.tr>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Example network protocol implementation
Message-ID:  <457BC490.30904@elischer.org>
In-Reply-To: <457BBCC3.9040605@mersin.edu.tr>
References:  <eb7c8e2e0612091218r61bb72b4q49faee99d85c509d@mail.gmail.com>	<20061209.222526.-816359937.imp@bsdimp.com> <457BBCC3.9040605@mersin.edu.tr>

next in thread | previous in thread | raw e-mail | index | archive | help
Özkan KIRIK wrote:
> I think netgraph subsystem provides this infrastructure for implementing 
> 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:
> 
>     *ˇ*     A flexible way of combining protocol and link level drivers.
>     *ˇ*     A modular way to implement new protocols.
>     *ˇ*     A common framework for kernel entities to inter-communicate.
>     *ˇ*     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 domain.

There are all the components needed if you consider using the ksocket
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 locking
divide.

Still it's possibly worth looking at. Of course the method suggested by
Warner is also very valid and may be about the same amount of work.


> 
> I hope this helps,
> 
> Özkan KIRIK
> EnderUNIX SDT @ Turkey
> Software Developer
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?457BC490.30904>