Searched defs:optlen (Results 1 - 8 of 8) sorted by relevance

/systemd/src/libsystemd-network/
H A Ddhcp-option.c31 uint8_t code, size_t optlen, const void *optval) {
51 if (size < *offset + optlen + 2)
55 options[*offset + 1] = optlen;
57 if (optlen) {
60 memcpy(&options[*offset + 2], optval, optlen);
63 *offset += optlen + 2;
73 uint8_t code, size_t optlen, const void *optval) {
86 r = option_append(message->options, size, offset, code, optlen, optval);
106 r = option_append(message->file, sizeof(message->file), &file_offset, code, optlen, optval);
128 r = option_append(message->sname, sizeof(message->sname), &sname_offset, code, optlen, optva
30 option_append(uint8_t options[], size_t size, size_t *offset, uint8_t code, size_t optlen, const void *optval) argument
71 dhcp_option_append(DHCPMessage *message, size_t size, size_t *offset, uint8_t overload, uint8_t code, size_t optlen, const void *optval) argument
[all...]
H A Ddhcp-packet.c32 uint8_t type, uint16_t arp_type, size_t optlen,
46 r = dhcp_option_append(message, optlen, &offset, 0,
31 dhcp_message_init(DHCPMessage *message, uint8_t op, uint32_t xid, uint8_t type, uint16_t arp_type, size_t optlen, size_t *optoffset) argument
H A Ddhcp6-option.c45 size_t optlen) {
52 if (optlen > 0xffff || *buflen < optlen + sizeof(DHCP6Option))
56 option->len = htobe16(optlen);
65 size_t optlen, const void *optval) {
68 assert_return(optval || optlen == 0, -EINVAL);
70 r = option_append_hdr(buf, buflen, code, optlen);
75 memcpy(*buf, optval, optlen);
77 *buf += optlen;
78 *buflen -= optlen;
44 option_append_hdr(uint8_t **buf, size_t *buflen, uint16_t optcode, size_t optlen) argument
64 dhcp6_option_append(uint8_t **buf, size_t *buflen, uint16_t code, size_t optlen, const void *optval) argument
141 option_parse_hdr(uint8_t **buf, size_t *buflen, uint16_t *optcode, size_t *optlen) argument
166 dhcp6_option_parse(uint8_t **buf, size_t *buflen, uint16_t *optcode, size_t *optlen, uint8_t **optvalue) argument
190 size_t optlen; local
323 dhcp6_option_parse_ip6addrs(uint8_t *optval, uint16_t optlen, struct in6_addr **addrs, size_t count, size_t *allocated) argument
341 dhcp6_option_parse_domainname(const uint8_t *optval, uint16_t optlen, char ***str_arr) argument
[all...]
H A Dsd-dhcp6-lease.c178 int dhcp6_lease_set_dns(sd_dhcp6_lease *lease, uint8_t *optval, size_t optlen) { argument
184 if (!optlen)
187 r = dhcp6_option_parse_ip6addrs(optval, optlen, &lease->dns,
215 size_t optlen) {
222 if (!optlen)
225 r = dhcp6_option_parse_domainname(optval, optlen, &domains);
248 int dhcp6_lease_set_ntp(sd_dhcp6_lease *lease, uint8_t *optval, size_t optlen) { argument
261 while ((r = dhcp6_option_parse(&optval, &optlen, &subopt, &sublen,
303 int dhcp6_lease_set_sntp(sd_dhcp6_lease *lease, uint8_t *optval, size_t optlen) { argument
309 if (!optlen)
214 dhcp6_lease_set_domains(sd_dhcp6_lease *lease, uint8_t *optval, size_t optlen) argument
[all...]
H A Dtest-dhcp-option.c82 size_t optlen = 4, optoffset; local
83 size_t len = sizeof(DHCPMessage) + optlen;
89 DHCP_DISCOVER, ARPHRD_ETHER, optlen, &optoffset) >= 0);
104 static DHCPMessage *create_message(uint8_t *options, uint16_t optlen, argument
108 size_t len = sizeof(DHCPMessage) + optlen;
113 if (options && optlen)
114 memcpy(&message->options, options, optlen);
150 uint8_t optlen = 0; local
195 optlen = descoption[*descpos + 1];
199 len, optlen);
236 int optlen = 0; local
[all...]
H A Dtest-dhcp6-client.c103 size_t optlen; local
113 assert_se(dhcp6_option_parse(&buf, &zero, &optcode, &optlen,
121 assert_se(dhcp6_option_parse(&buf, &buflen, &optcode, &optlen,
123 pos += 4 + optlen;
126 assert_se(optlen == 7);
129 assert_se(dhcp6_option_append(&out, &outlen, optcode, optlen,
134 assert_se(dhcp6_option_parse(&buf, &buflen, &optcode, &optlen,
136 pos += 4 + optlen;
139 assert_se(optlen == 9);
142 assert_se(dhcp6_option_append(&out, &outlen, optcode, optlen,
210 size_t optlen, len = sizeof(msg_advertise) - sizeof(DHCP6Message); local
411 size_t optlen; local
512 size_t optlen; local
602 size_t optlen; local
[all...]
H A Dsd-dhcp6-client.c337 size_t len, optlen = 512; local
343 len = sizeof(DHCP6Message) + optlen;
362 r = dhcp6_option_append(&opt, &optlen,
367 r = dhcp6_option_append_ia(&opt, &optlen, &client->ia_na);
381 r = dhcp6_option_append(&opt, &optlen, SD_DHCP6_OPTION_SERVERID,
387 r = dhcp6_option_append_ia(&opt, &optlen, &client->lease->ia);
396 r = dhcp6_option_append_ia(&opt, &optlen, &client->lease->ia);
407 r = dhcp6_option_append(&opt, &optlen, SD_DHCP6_OPTION_ORO,
414 r = dhcp6_option_append(&opt, &optlen, SD_DHCP6_OPTION_CLIENTID,
425 r = dhcp6_option_append(&opt, &optlen, SD_DHCP6_OPTION_ELAPSED_TIM
678 size_t optlen, id_len; local
[all...]
H A Dsd-dhcp-client.c412 size_t optlen, optoffset, size; local
425 optlen = DHCP_MIN_OPTIONS_SIZE;
426 size = sizeof(DHCPPacket) + optlen;
433 client->arp_type, optlen, &optoffset);
492 r = dhcp_option_append(&packet->dhcp, optlen, &optoffset, 0,
508 r = dhcp_option_append(&packet->dhcp, optlen, &optoffset, 0,
543 *_optlen = optlen;
551 static int client_append_fqdn_option(DHCPMessage *message, size_t optlen, size_t *optoffset, argument
563 r = dhcp_option_append(message, optlen, optoffset, 0,
580 size_t optoffset, optlen; local
654 size_t optoffset, optlen; local
[all...]

Completed in 21 milliseconds