Lines Matching defs:len
210 size_t len;
586 options_list[count].len = sizeof(uint32_t);
592 options_list[count].len = sizeof(uint16_t);
598 options_list[count].len = sizeof(uint8_t);
604 options_list[count].len = sizeof(uint32_t);
609 options_list[count].len = strlen(valstr);
614 options_list[count].val = xrealloc(options_list[count].val, options_list[count].len + sizeof(uint32_t));
615 striptovar(valstr, ((uint8_t*)options_list[count].val)+options_list[count].len);
616 options_list[count].len += sizeof(uint32_t);
640 options_list[count].val = xrealloc(options_list[count].val, options_list[count].len + 1 + mask/8 + 4);
641 memcpy(((uint8_t*)options_list[count].val)+options_list[count].len, &mask, 1);
642 options_list[count].len += 1;
643 memcpy(((uint8_t*)options_list[count].val)+options_list[count].len, &nip, mask/8);
644 options_list[count].len += mask/8;
645 memcpy(((uint8_t*)options_list[count].val)+options_list[count].len, &router, 4);
646 options_list[count].len += 4;
724 int len, linelen, tcount, count, size = ARRAY_LEN(keywords);
731 for (len = 0, linelen = 0; fs;) {
732 len = getline(&confline_temp, (size_t*) &linelen, fs);
734 if (len <= 0) break;
735 for (; *confline == ' '; confline++, len--);
886 packet.udph.len = htons(sizeof(dhcp6_raw_t) - sizeof(struct ip6_hdr) - padding);
887 packet.iph.ip6_ctlun.ip6_un1.ip6_un1_plen = htons(ntohs(packet.udph.len) + 0x11);
890 packet.iph.ip6_ctlun.ip6_un1.ip6_un1_plen = packet.udph.len;
938 packet.udph.len = htons(sizeof(dhcp_raw_t) - sizeof(struct iphdr) - padding);
939 packet.iph.tot_len = packet.udph.len;
1036 static uint8_t* set_optval(uint8_t *optptr, uint16_t opt, void *var, size_t len)
1040 *optptr++ = (uint8_t) len;
1041 memcpy(optptr, var, len);
1042 optptr += len;
1047 static uint8_t* set_optval6(uint8_t *optptr, uint16_t opt, void *var, size_t len)
1050 *(uint16_t*)(optptr+2) = htons(len);
1051 memcpy(optptr+4, var, len);
1052 optptr += len+4;
1059 size_t len;
1069 len = optptr[1];
1075 optptr += len + 2;
1080 optptr += len + 2;
1085 optptr += len + 2;
1089 var = xstrndup((char*) optptr, len);
1090 optptr += len + 2;
1094 optptr += len + 2;
1104 uint16_t len;
1107 memcpy(&len, optptr+2, sizeof(uint16_t));
1113 len = ntohs(len);
1116 *var = xmalloc(len);
1117 memcpy(*var, optptr+4, len);
1118 optptr = optptr + len + 4;
1119 memcpy(datalen, &len, sizeof(uint16_t));
1122 optptr = get_optval6(optptr+len+4, opt, datalen, var);
1131 uint8_t len, *optptr;
1135 len = *++optptr;
1136 *list = xzalloc(len+1);
1137 memcpy(*list, ++optptr, len);
1138 return len;
1151 if (!(options_list[count].len) || !(options_list[count].val)) break;
1154 *optptr++ = (uint8_t) options_list[count].len;
1155 memcpy(optptr, options_list[count].val, options_list[count].len);
1156 optptr += options_list[count].len;