Lines Matching defs:message
71 int dhcp_option_append(DHCPMessage *message, size_t size, size_t *offset,
78 assert(message);
86 r = option_append(message->options, size, offset, code, optlen, optval);
92 r = option_append(message->options, size, offset, SD_DHCP_OPTION_END, 0, NULL);
104 if (file_offset < sizeof(message->file)) {
106 r = option_append(message->file, sizeof(message->file), &file_offset, code, optlen, optval);
113 r = option_append(message->options, size, offset, SD_DHCP_OPTION_END, 0, NULL);
117 *offset = size + sizeof(message->file);
124 sname_offset = *offset - size - (file ? sizeof(message->file) : 0);
126 if (sname_offset < sizeof(message->sname)) {
128 r = option_append(message->sname, sizeof(message->sname), &sname_offset, code, optlen, optval);
130 *offset = size + (file ? sizeof(message->file) : 0) + sname_offset;
229 int dhcp_option_parse(DHCPMessage *message, size_t len, dhcp_option_cb_t cb, void *userdata, char **_error_message) {
235 if (!message)
243 r = parse_options(message->options, len, &overload, &message_type, &error_message, cb, userdata);
248 r = parse_options(message->file, sizeof(message->file), NULL, &message_type, &error_message, cb, userdata);
254 r = parse_options(message->sname, sizeof(message->sname), NULL, &message_type, &error_message, cb, userdata);