Lines Matching refs:size

18 static int dhcp_option_append_tlv(uint8_t options[], size_t size, size_t *offset, uint8_t code, siz…  in dhcp_option_append_tlv()  argument
20 assert(size > 0); in dhcp_option_append_tlv()
23 assert(*offset < size); in dhcp_option_append_tlv()
25 if (*offset + 2 + optlen > size) in dhcp_option_append_tlv()
36 static int option_append(uint8_t options[], size_t size, size_t *offset, in option_append() argument
39 assert(size > 0); in option_append()
46 size--; in option_append()
52 if (*offset + 1 > size) in option_append()
74 if (*offset + 2 + total > size) in option_append()
92 if (*offset + 3 + optlen > size) in option_append()
111 if (*offset + l + 2 > size) in option_append()
119 … r = dhcp_option_append_tlv(options, size, offset, p->option, p->length, p->data); in option_append()
130 … r = dhcp_option_append_tlv(options, size, &current_offset, SD_DHCP_RELAY_AGENT_CIRCUIT_ID, in option_append()
136 … r = dhcp_option_append_tlv(options, size, &current_offset, SD_DHCP_RELAY_AGENT_REMOTE_ID, in option_append()
149 return dhcp_option_append_tlv(options, size, offset, code, optlen, optval); in option_append()
203 int dhcp_option_append(DHCPMessage *message, size_t size, size_t *offset, in dhcp_option_append() argument
219 if (*offset < size) { in dhcp_option_append()
221 r = option_append(message->options, size, offset, code, optlen, optval); in dhcp_option_append()
227 … r = option_append(message->options, size, offset, SD_DHCP_OPTION_END, 0, NULL); in dhcp_option_append()
231 *offset = size; in dhcp_option_append()
237 size_t file_offset = *offset - size; in dhcp_option_append()
243 *offset = size + file_offset; in dhcp_option_append()
252 *offset = size + sizeof(message->file); in dhcp_option_append()
259 size_t sname_offset = *offset - size - use_file*sizeof(message->file); in dhcp_option_append()
265 *offset = size + use_file*sizeof(message->file) + sname_offset; in dhcp_option_append()