Re: [systemd-devel] [PATCH v2 05/26] dhcp: Add option appending and parsing

2013-11-27 Thread Patrik Flykt
Hi, On Tue, 2013-11-26 at 00:08 +0100, Lennart Poettering wrote: On Mon, 25.11.13 09:13, Patrik Flykt (patrik.fl...@linux.intel.com) wrote: +#include stdint.h + +#include protocol.h + +int dhcp_option_append(uint8_t **buf, int *buflen, uint8_t code,

Re: [systemd-devel] [PATCH v2 05/26] dhcp: Add option appending and parsing

2013-11-27 Thread Zbigniew Jędrzejewski-Szmek
On Wed, Nov 27, 2013 at 04:51:42PM +0200, Patrik Flykt wrote: On Tue, 2013-11-26 at 00:08 +0100, Lennart Poettering wrote: On Mon, 25.11.13 09:13, Patrik Flykt (patrik.fl...@linux.intel.com) wrote: +static int parse_options(uint8_t *buf, int32_t buflen, int *overload,

Re: [systemd-devel] [PATCH v2 05/26] dhcp: Add option appending and parsing

2013-11-27 Thread Lennart Poettering
On Wed, 27.11.13 16:51, Patrik Flykt (patrik.fl...@linux.intel.com) wrote: On Tue, 2013-11-26 at 00:08 +0100, Lennart Poettering wrote: On Mon, 25.11.13 09:13, Patrik Flykt (patrik.fl...@linux.intel.com) wrote: +#include stdint.h + +#include protocol.h + +int

Re: [systemd-devel] [PATCH v2 05/26] dhcp: Add option appending and parsing

2013-11-25 Thread Lennart Poettering
On Mon, 25.11.13 09:13, Patrik Flykt (patrik.fl...@linux.intel.com) wrote: +#include stdint.h + +#include protocol.h + +int dhcp_option_append(uint8_t **buf, int *buflen, uint8_t code, This is a memory size, right? It should be size_t rather

[systemd-devel] [PATCH v2 05/26] dhcp: Add option appending and parsing

2013-11-24 Thread Patrik Flykt
Add functions to append and parse DHCP options. Not all options are passed to the callback function, the ones not exposed are pad, end, message type and overload. If indicated by the overload option, file and sname fields will be examined for more options. The option functions are internal to