// - adapted from tcpdump
// Returns the ones-complement checksum of a chunk of b short-aligned bytes.
int ones_complement_checksum(const void *p, int b, u_int32_t sum)
int __attribute__ ((noinline)) ones_complement_checksum(const void *p, int b, u_int32_t sum)
{
const u_short *sp = (u_short *) p; // better be aligned!