[openbeos] Re: Some network land questions:

  • From: "Oliver Ruiz Dorantes" <urnenfel@xxxxxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Fri, 3 Aug 2007 14:15:33 +0200

Hi
That was usefull!

Thanks, I think with the remaining answers I should be done,


> Could I safe&freely from a driver... (totally disconnected from the
> > TCP/IP
> > stack) use this field to keep an own queue of net_buffers?
>
> Exactly, that's its purpose :-)


Can I take as well for granted for the fields protocol & flags?


Sure, the net_buffer module has no dependencies in the rest of the
> stack. However, it currently uses the slab allocator directly, so you
> would either have to revert to an older version of it (that just used
> malloc(), but was therefore slower), or compile the slab stuff into the
> module.


Where can I find the list.h and slab.h "implementation" ?

As for the use of the net_buffers:

Once the buffer is created and afterwards you append or prepend some data:
A) How are u supposed to proceed if you want to drop all its content
"contiguously" somewhere (driver.. port)?

B) How are u supposed to proceed if u want to "map" a portion of the data to
a given structure... how an incoming buffer's information is analized?

Ex: Usually map a part of the first bytes(header), take any consideration
according to the packet header, and maybe purge it from the buffer to read
the following part(following header)...

Thanks again!

Other related posts: