Lines Matching refs:i
32 static int i; in net_sprint_addr() local
33 char *s = buf[++i % NBUFS]; in net_sprint_addr()
67 int i, val; in net_byte_to_hex() local
69 for (i = 0, val = (byte & 0xf0) >> 4; i < 2; i++, val = byte & 0x0f) { in net_byte_to_hex()
70 if (i == 0 && !pad && !val) { in net_byte_to_hex()
88 uint8_t i, len, blen; in net_sprint_ll_addr_buf() local
110 for (i = 0U, blen = buflen; i < len && blen > 0; i++) { in net_sprint_ll_addr_buf()
111 ptr = net_byte_to_hex(ptr, (char)ll[i], 'A', true); in net_sprint_ll_addr_buf()
127 int i; in net_value_to_udec() local
136 for (i = 9; i >= 0; i--, divisor /= 10U) { in net_value_to_udec()
139 if ((precision > i) || (temp != 0)) { in net_value_to_udec()
140 precision = i; in net_value_to_udec()
155 uint8_t i, bl, bh, longest = 1U; in z_impl_net_addr_ntop() local
169 for (i = 0U; i < 8; i++) { in z_impl_net_addr_ntop()
172 for (j = i; j < 8; j++) { in z_impl_net_addr_ntop()
177 zeros[i]++; in z_impl_net_addr_ntop()
181 for (i = 0U; i < 8; i++) { in z_impl_net_addr_ntop()
182 if (zeros[i] > longest) { in z_impl_net_addr_ntop()
183 longest = zeros[i]; in z_impl_net_addr_ntop()
184 pos = i; in z_impl_net_addr_ntop()
200 for (i = 0U; i < len; i++) { in z_impl_net_addr_ntop()
205 value = (uint32_t)addr->s4_addr[i]; in z_impl_net_addr_ntop()
223 if (i == pos) { in z_impl_net_addr_ntop()
224 if (needcolon || i == 0U) { in z_impl_net_addr_ntop()
230 i += longest - 1U; in z_impl_net_addr_ntop()
240 value = (uint32_t)sys_be16_to_cpu(UNALIGNED_GET(&w[i])); in z_impl_net_addr_ntop()
323 size_t i, len; in z_impl_net_addr_pton() local
326 for (i = 0; i < len; i++) { in z_impl_net_addr_pton()
327 if (!(src[i] >= '0' && src[i] <= '9') && in z_impl_net_addr_pton()
328 src[i] != '.') { in z_impl_net_addr_pton()
335 for (i = 0; i < sizeof(struct in_addr); i++) { in z_impl_net_addr_pton()
338 addr->s4_addr[i] = strtol(src, &endptr, 10); in z_impl_net_addr_pton()
349 int i, len; in z_impl_net_addr_pton() local
357 for (i = 0; i < len; i++) { in z_impl_net_addr_pton()
358 if (!(src[i] >= '0' && src[i] <= '9') && in z_impl_net_addr_pton()
359 !(src[i] >= 'A' && src[i] <= 'F') && in z_impl_net_addr_pton()
360 !(src[i] >= 'a' && src[i] <= 'f') && in z_impl_net_addr_pton()
361 src[i] != '.' && src[i] != ':') { in z_impl_net_addr_pton()
366 for (i = 0; i < expected_groups; i++) { in z_impl_net_addr_pton()
376 &addr->s6_addr16[i]); in z_impl_net_addr_pton()
381 if (i < expected_groups - 1) { in z_impl_net_addr_pton()
391 for (; i < expected_groups; i++) { in z_impl_net_addr_pton()
392 UNALIGNED_PUT(0, &addr->s6_addr16[i]); in z_impl_net_addr_pton()
411 i = expected_groups - 1; in z_impl_net_addr_pton()
414 i--; in z_impl_net_addr_pton()
417 if (i < 0) { in z_impl_net_addr_pton()
427 for (i = 0; i < 4; i++) { in z_impl_net_addr_pton()
432 addr->s6_addr[12 + i] = strtol(src, NULL, 10); in z_impl_net_addr_pton()
438 if (i < 3) { in z_impl_net_addr_pton()
656 int end, len, ret, i; in parse_ipv6() local
661 for (i = 0; i < len; i++) { in parse_ipv6()
662 if (!str[i]) { in parse_ipv6()
663 len = i; in parse_ipv6()
705 for (i = 0; i < len; i++) { in parse_ipv6()
706 if (!ptr[i]) { in parse_ipv6()
707 len = i; in parse_ipv6()
750 int end, len, ret, i; in parse_ipv4() local
755 for (i = 0; i < len; i++) { in parse_ipv4()
756 if (!str[i]) { in parse_ipv4()
757 len = i; in parse_ipv4()
816 int i, count; in net_ipaddr_parse() local
831 for (count = i = 0; str[i] && i < str_len; i++) { in net_ipaddr_parse()
832 if (str[i] == ':') { in net_ipaddr_parse()
861 unsigned int i; in net_bytes_from_str() local
864 for (i = 0U; i < strlen(src); i++) { in net_bytes_from_str()
865 if (!(src[i] >= '0' && src[i] <= '9') && in net_bytes_from_str()
866 !(src[i] >= 'A' && src[i] <= 'F') && in net_bytes_from_str()
867 !(src[i] >= 'a' && src[i] <= 'f') && in net_bytes_from_str()
868 src[i] != ':') { in net_bytes_from_str()
875 for (i = 0U; i < buf_len; i++) { in net_bytes_from_str()
876 buf[i] = strtol(src, &endptr, 16); in net_bytes_from_str()