summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/dhcp-option.c
Commit message (Collapse)AuthorAgeFilesLines
* network: s/user_data/userdata/Lennart Poettering2015-08-261-6/+6
| | | | | Everywhere else we call the generic user data pointer just "userdata", rather than "user_data". Let's do this here, too.
* sd-dhcp: option_append - support falling back to 'sname' and 'file'Tom Gundersen2014-05-211-7/+81
|
* sd-dhcp: make sure we can not fill options so much that there is no space ↵Tom Gundersen2014-05-211-0/+4
| | | | for END
* sd-dhcp: refactor parse_optionsTom Gundersen2014-05-201-41/+41
| | | | | Similar to the previous patch, exchange a length and a pointer with only one offset variable. Also fix the type of the options to be uint8_t[], rather than uint8_t*.
* sd-dhcp: refactor dhcp_option_appendTom Gundersen2014-05-201-19/+14
| | | | | | | | | | | | | Store a pointer to the options in the DHCPMessage struct, and pass this together with an offset around, rather than a uint8_t**. This avoids us having to (re)compute the pointer; and changes dhcp_option_append from adjusting both the pointer to the next option and the remaining size of the options, to just adjusting the current offset. This makes the code a bit simpler to follow IMHO, but there should be no functional change.
* sd-dhcp-client: move magic cookie into DHCPMessage structTom Gundersen2014-04-061-8/+4
| | | | | | | | Also move the checking of it to the main message handler, rather than the options parser. Fix a bug, so we now drop the packet if any of the magic bytes don't match. Before we used to only drop the packet if they were all wrong.
* sd-network: add new libraryTom Gundersen2014-02-281-0/+184
This is similar to sd-login, but exposes the state of networkd rather than logind. Include it in libsystemd-dhcp and rename it to libsystemd-network.