> Casting a u_int32_t over a 4-byte string (like an SMTP verb) to get a value you can switch() on.
How do you ensure your code is portable between the architectures with different endianness ? One trick may be using htonl on the u_int32_t to get it to a canonical format, but probably there would be better approaches ?
Comments
> Casting a u_int32_t over a 4-byte string (like an SMTP verb) to get a value you can switch() on.
How do you ensure your code is portable between the architectures with different endianness ? One trick may be using htonl on the u_int32_t to get it to a canonical format, but probably there would be better approaches ?