Lines Matching refs:optlen
18 …tlv(uint8_t options[], size_t size, size_t *offset, uint8_t code, size_t optlen, const void *optva… in dhcp_option_append_tlv() argument
22 assert(optlen <= UINT8_MAX); in dhcp_option_append_tlv()
25 if (*offset + 2 + optlen > size) in dhcp_option_append_tlv()
29 options[*offset + 1] = optlen; in dhcp_option_append_tlv()
31 memcpy_safe(&options[*offset + 2], optval, optlen); in dhcp_option_append_tlv()
32 *offset += 2 + optlen; in dhcp_option_append_tlv()
37 uint8_t code, size_t optlen, const void *optval) { in option_append() argument
92 if (*offset + 3 + optlen > size) in option_append()
96 options[*offset + 1] = optlen + 1; in option_append()
99 memcpy_safe(&options[*offset + 3], optval, optlen); in option_append()
100 *offset += 3 + optlen; in option_append()
149 return dhcp_option_append_tlv(options, size, offset, code, optlen, optval); in option_append()
205 uint8_t code, size_t optlen, const void *optval) { in dhcp_option_append() argument
221 r = option_append(message->options, size, offset, code, optlen, optval); in dhcp_option_append()
241 … r = option_append(message->file, sizeof(message->file), &file_offset, code, optlen, optval); in dhcp_option_append()
263 … r = option_append(message->sname, sizeof(message->sname), &sname_offset, code, optlen, optval); in dhcp_option_append()