]>
git.ipfire.org Git - thirdparty/bird.git/blob - lib/unaligned.h
2 * Unaligned Data Accesses -- Generic Version, Network Order
4 * (c) 2000 Martin Mares <mj@ucw.cz>
6 * Can be freely distributed and used under the terms of the GNU GPL.
9 #ifndef _BIRD_UNALIGNED_H_
10 #define _BIRD_UNALIGNED_H_
13 * We don't do any clever tricks with unaligned accesses since it's
14 * virtually impossible to figure out what alignment does the CPU want
15 * (unaligned accesses can be emulated by the OS which makes them work,
16 * but unusably slow). We use memcpy and hope GCC will optimize it out
20 #include "lib/string.h"
39 put_u16(void *p
, u16 x
)
46 put_u32(void *p
, u32 x
)