On Mon, 10 Mar 2003, Edouard Gomez wrote:

> 
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: inline
> Content-Transfer-Encoding: quoted-printable
> 
> Edouard Gomez ([EMAIL PROTECTED]) wrote:
> > I'll do that tonight.
> 
> Quick hack that could be the start of a smarter junk byte skipping.
> 
> My approach is now to look for the next cell beginning in a [0..ATM cell si=
> ze]
> range. To achieve that, i look for a vpi, vci matching the ones we
> expect and finally the HEC (header CRC) just to be sure.=20
> 

Seems sensible to me.

You might want to optimize the atm_header_get_vpi and atm_header_get_vci. You
should be able to do something nifty like:

if(*(unsigned int*)(src+i)&0x0ffffff0 == (vpi<<24)+(vci<<4))

Not sure that the shifts are right so this probably doesn't work :-)

Also assumes that unsigned int is 32 bits.


OTOH, this code should only be hit when something has already gone wrong so
clarity may be far better than performance in this instance - someone trying 
to debug why they are having problems may prefer not to have to "decode" the
code first.


Regards,

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

     http://tjw.hn.org/      http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]

        

Reply via email to