Lenin writes:
> Given that this is the problem, how do i communicate between my two filter 
> module instances available in two different stacks and thereby send my 
> received v6 packet to the v4 stack ( after reconstructing it as a v4 packet ).

That's your design issue to work out.  Without some OpenSolaris
project to work on here, I don't see how the rest of us can contribute
to any meaningful degree.  My apologies if your project really is open
source available somewhere that I haven't seen, but this really isn't
a proprietary product development support list.

However, without looking at your code, one plausible way to do this
would be to keep a linked list of per-instance data structures.
Allocate those structures when the stream is opened, and insert them
into a global list under a lock.

When you open a v4 stream, look for a corresponding v6 stream already
in the list, and link them together if found.  When you open v6, do
the same for v4.  When a stream closes, check the other linked stream,
and remove its pointer.

That way, if you have one, you can always find the other.  Be very
careful about data structure access here and the object lifetime --
design the locking and access mechanisms carefully.  It's surprisingly
easy to hurt yourself on a multithreaded machine like Solaris.

-- 
James Carlson, Solaris Networking              <[EMAIL PROTECTED]>
Sun Microsystems / 1 Network Drive         71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677
_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to