>> Usually this
>> code uses some tyical C approaches to memory, arrays, structs, unions and
>> typecasts ...
>doesn't
>DataInputStream let you pull out varying primitive types?
Hmm, it would appear it does .. how do i get the stream to pull its bytes
from an array though? Or is an Array a child of InputStream so i can pass
it directly to DatInputStream's only constructor?
I'll play with it a bit as soon as i reboot into linux .. if i get it to
work it might speed things up a bit and make code more readeable.
>(They probably
>won't be in the right byte order, though...)
I'm afraid they won't be anyway because the network order is Big Endian and
Intels aren't, although the virtual machine might be big endian, in which
case we're set! (no more pesky htons() and ntohs() calls!!)
>On the other hand, does your stack have to be a soliton/static
>class? Why not create stack objects (who share code but not state data),
>one to an interface?
I suppose that's a possibility. We would need the same degree of
synchronisation for accessing the shared information (like routing etc)
though. The fact is that there aren't many examples of OO IP stacks out
there, so i'm working from striclty monolithic procedural sources (Linux
and Internetworking with TCP/IP vol2 's Xinu) instead of modular OO like
Jos is supposed to be.
If anyone knows where to find an example of an OO tcp/ip stack, please tell
me. I could really use some more info in analysing this..
RA
_______________________________________________
Kernel maillist - [EMAIL PROTECTED]
http://jos.org/mailman/listinfo/kernel