Lines Matching defs:optlen
49 static u8_t dhcp6ds_serverid[/* opt */ 2 + /* optlen */ 2 + DUID_LL_LEN];
52 static u8_t dhcp6ds_dns[/* opt */ 2 + /* optlen */ 2 + /* IPv6 addr */ 16];
203 u16_t opt, optlen;
216 copied = pbuf_copy_partial(p, &optlen, sizeof(optlen), 0);
217 if (copied != sizeof(optlen)) {
222 pbuf_header(p, -(s16_t)sizeof(optlen));
223 optlen = ntohs(optlen);
226 if (optlen > p->tot_len) {
228 __func__, opt, optlen, p->tot_len));
233 DPRINTF2(("%s: option %u length %u\n", __func__, opt, optlen));
240 if (optlen > 130) {
241 DPRINTF(("%s: client DUID too long: %u\n", __func__, optlen));
250 s = ntohs(optlen);
254 pbuf_copy_partial(p, dhcp6ds_reply_buf + roff, optlen, 0);
255 roff += optlen;
261 if (optlen % 2 != 0) {
265 nopts = optlen / 2;
267 opts = (u16_t *)malloc(optlen);
274 pbuf_copy_partial(p, opts, optlen, 0);
284 pbuf_header(p, -optlen); /* go to next option */