tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Embedded dhcpcd options

On 29/11/2013 9:34, David Brownlee wrote:
I like the elegance of defining everything via the same mechanism (1),
As you mention it allows people to more easily potentially mess with
things they should not, but building dhcpcd from source isn't exactly
a stratospheric bar... If I recall correctly the old saying was "Unix
doesn't stop you from doing something stupid, as this would also stop
you from doing something (unexpectedly) clever".

From a size perspective, if the binary plus extra .conf lines is
smaller its a win for install media, otherwise probably not an issue.

I have moved the hard coded structures from the dhcp{,6}.c files into a dhcpcd-definitions.conf file:

By default it gets embedded into the dhpcd binary and actually reduces the on-disk size by 700 bytes and reduces code complexity in the dhcp message -> environment code.

So it's an overall net win!

There is also a configure option not to embed the file into the binary and install it to LIBEXECDIR. This does reduce the binary size, but not by as much as the definitions file itself - probably because the comments and whitespace are stripped out when embedded.

I think I'll keep the definitions file embedded into dhcpcd by default, and once I sort the documented but commented out ip 6 address option for DHCPv6 I may consider installing it as an editable file in a good unixy way.



Home | Main Index | Thread Index | Old Index