[openbeosnetteam] Re: A possible redesign

> > <*snip*>
> > type of card. Each module is then given a list of other modules as 
> > they
> > are loaded, building a chain. The PPPoE module (or Ethernet IP) 
> > module
> > would say, "Hey! That's an ethernet card! and register some packet 
> > type
> > with it, or ask to be given all packets, or something along those
> > lines. As a packet moves through the stack, it will acquire 
> > attributes,
> > and its data pointer will be modified so that the contents of the
> > packet are simply its payload. The attributes would include 
> > information
> > like destination and source addresses, packet types, etc.
> 
> Is this fast enough? I mean, we would have to copy the attributes or 
> at
> least specify where they are and how much space they use (and which 
> type,
> like int32+endianness). Alternatively, attribute access could be 
> routed to
> each protocol, so that we do not copy attributes. Where is the 
> difference to
> the current implementations? We ask the IP protocol for the IP 
> address.
> IMHO, this is like asking for an attribute.

It could be quite fast. We needn't use strings, for instance, as 
BMessage does.

> > This would allow IP or AppleTalk stacks to be oblivious to the link
> > type, as sub-modules (with appropriate types, like "ip/ethernet" 
> > (the
> > second part of the type could even define on top of which layers it 
> > was
> > placed)) would translate network-protocol specific header 
> > information
> > into a standard set of attributes.
> 
> Do I understand you correctly that you want to use translator modules 
> for
> each protocol combination?

Yes, although it needn't be a separate add-on, and could be very, very 
light.

> IP is a module that exports some attributes and Ethernet, too. There 
> are no
> hard-coded types in both protocols. To connect IP with Ethernet we 
> need a
> translator module that knows the attributes of IP and Ethernet.
> Additionally, this module combines all attributes into standard 
> attributes
> so that they can be used by applications?
> Why do we need a standard set of attributes? IPv6 uses other IP 
> addresses
> than IPv4. Shouldn't applications be aware of this? I mean, there are 
> many
> protocol-specific attributes that are useful to the app-layer. How do 
> you
> want to translate the concept of ports? I think I did not understand 
> what
> you mean with "standard attributes".

I meant for each layer. So there would be some attributes exported by 
the IP layer (addresses, etc.), some by ethernet, some by ipv6. As an 
example of translator addons producing attributes, ethernet ip modules 
are responsible for telling ip about link-level broadcast packets. 
Thus, you could have a 'broadcast' flag.

The major conceptual difference is that these attributes are 
associated, pre-parsed, with the packet rather than delivered in raw 
form or attached to the module.
-Nathan

--
Fortune Cookie Says:

Eagleson's Law:
        Any code of your own that you haven't looked at for six or more
months, might as well have been written by someone else.  (Eagleson is
an optimist, the real number is more like three weeks.)

Other related posts: