Lines Matching refs:bytes
473 * ip [0..4 bytes depending on mask]
474 * router [4 bytes]
653 int bytes = 0;
656 if ((bytes = read(state->sockfd, &packet, sizeof(packet))) < 0) {
658 return bytes;
660 if (bytes < (int) (sizeof(packet.iph) + sizeof(packet.udph))) {
664 if (bytes < ntohs(packet.iph.tot_len)) {
668 // ignore any extra garbage bytes
669 bytes = ntohs(packet.iph.tot_len);
674 || ntohs(packet.udph.len) != (uint16_t)(bytes - sizeof(packet.iph))) {
690 if (packet.udph.check != 0 && dhcp_checksum(&packet, bytes) != 0) {
694 memcpy(&state->pdhcp, &packet.dhcp, bytes - (sizeof(packet.iph) + sizeof(packet.udph)));
699 return bytes - sizeof(packet.iph) - sizeof(packet.udph);
894 optptr += 2; // two blank bytes
1164 int bytes;
1171 bytes = (mask + 7) / 8;
1172 while (--bytes >= 0) {