[Dibbler] dibbler-server an debian-armel

Christian Andersen lists at milindur.de
Sun Aug 17 12:09:22 CEST 2008


Hallo,

> are possible (CPU and/or OS allow it). But ARM (and other architectures)
> seems to not support this. I think that all pointer casts with possible
> unaligned data has to be rewritten to use memcpy (for parsing received
> messages and for building messages to send).

a nicer approach is using functions similar to these:
<http://www.google.com/codesearch?hl=en&q=file:convert.c+package:isc.org+getUShort+show:hHdyoaI1J-0:icd5RtVVz4s:Z_a_dVcnOn4&sa=N&cd=1&ct=rc&cs_p=http://ftp.isc.org/isc/dhcp/dhcp-3.0-history/dhcp-3.0.2rc1.tar.gz&cs_f=dhcp-3.0.2rc1/omapip/convert.c>

They define getX (getUShort, ...) as well as putX (putUShort, ...)
functions for access to unaligned data in buffers.

Regards,
Christian



More information about the Dibbler mailing list