Re: [systemd-devel] [PATCH v2 12/26] dhcp: Add function for sending a raw packet

2013-11-27 Thread Patrik Flykt
On Tue, 2013-11-26 at 00:10 +0100, Lennart Poettering wrote: > On Mon, 25.11.13 09:13, Patrik Flykt (patrik.fl...@linux.intel.com) wrote: > > > +int dhcp_network_send_raw_packet(int index, void *packet, int len); > > Should be "const void* packet", no? > > And "size_t len", no? Indeed.

Re: [systemd-devel] [PATCH v2 12/26] dhcp: Add function for sending a raw packet

2013-11-25 Thread Lennart Poettering
On Mon, 25.11.13 09:13, Patrik Flykt (patrik.fl...@linux.intel.com) wrote: > +int dhcp_network_send_raw_packet(int index, void *packet, int len); Should be "const void* packet", no? And "size_t len", no? Lennart -- Lennart Poettering, Red Hat ___ sy

[systemd-devel] [PATCH v2 12/26] dhcp: Add function for sending a raw packet

2013-11-24 Thread Patrik Flykt
Open a packet socket, create a link level header, send packet and close socket. Adding it to a separate file makes testing of the DHCP sending much easier, as the test program can supply any socket to the DHCP client code. --- v2: - previous 11/28 - use sockaddr_union, initialize with {}, _clea