[systemd-devel] [PATCH v3 01/26] dhcp: Add DHCP protocol structures and initial defines

Lennart Poettering lennart at poettering.net
Mon Dec 9 17:46:41 PST 2013


On Mon, 09.12.13 23:43, Patrik Flykt (patrik.flykt at linux.intel.com) wrote:

> +struct DHCPMessage {
> +        uint8_t op;
> +        uint8_t htype;
> +        uint8_t hlen;
> +        uint8_t hops;
> +        be32_t xid;
> +        be16_t secs;
> +        be16_t flags;
> +        uint32_t ciaddr;
> +        uint32_t yiaddr;
> +        uint32_t siaddr;
> +        uint32_t giaddr;

Hmmm, why uin32_t? Shouldn't this be32_t? THis is network byte order,
right? which is just synoymous to big endian...

Or even, if you now use "struct in_addr" elsewhere anyway, why not just
use that here too?

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list