[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Pandora] how access ipp._data.data once is pushed?
From: |
uaca |
Subject: |
Re: [Pandora] how access ipp._data.data once is pushed? |
Date: |
Wed, 5 Mar 2003 15:19:40 +0100 |
User-agent: |
Mutt/1.3.28i |
On Wed, Mar 05, 2003 at 03:10:49PM +0100, Simon Patarin wrote:
>
>
> > When an ip packet is created it's headers are hidden to users of IPPacket
> > class (by calling _data.move())
> >
> > later when a TCPPacket is build the the contents are _data.move()'d again...
> >
> > I don't see a public interface wich allows getting char *_data.data
> > pointer from a component wich is on top of TCP
> >
> > ...is there already a way to do that?
>
> If you want to reset the read offset of the _data field, you may want to
> use its 'go' public method.
>
> >From libpandora/packetdata.h:
> void packetData::go(const size_t s)
> {
> pandora_assert(s < length);
> read_offset = s;
> }
>
> So a complete reset would look like _data.go(0).
maybe it would be useful if _data.go() returned the previous offset
so you can set it again later if you want (I see no other way to do that)
Thanks Simon
Ulisses
Debian GNU/Linux: a dream come true
-----------------------------------------------------------------------------
"Computers are useless. They can only give answers." Pablo Picasso
---> Visita http://www.valux.org/ para saber acerca de la <---
---> AsociaciĆ³n Valenciana de Usuarios de Linux <---