[Click] CLICK_BYTE_ORDER

Koen Beel koen.beel at gmail.com
Wed Aug 2 04:02:49 EDT 2006


Hi all,

I need to write a struct for a new custom header, somewhat like
include/clicknet/ip.h
But I don't get why in ip.h one changes the order of ip_v and ip_hl
depending on CLICK_BYTE_ORDER.
The bits inside a byte are the same for Little- and Big Endian
machines, right? So first ip_v and then ip_hl looks right to me for
no-mather-what-endian machine... not?

And can anyone tell me about what datatypes I should use? There is
uint8_t, uint16_t, uint32_t, atomic_uint32_t, unsigned, ... (but no
integer, long, char, ... ??)
Where can I find info on this? (didn't find it in de programming
manual or on doxygen) And what is atomic, and when should I use it?

Thanks,
Koen


More information about the click mailing list