• Home
  • Raw
  • Download

Lines Matching +full:ipv6 +full:- +full:single +full:- +full:target

2  * nghttp2 - HTTP/2 C Library
81 // inet_pton-wrapper for Windows
89 addr[sizeof(addr) - 1] = 0;
104 static constexpr char unreserved[] = {'-', '.', '_', '~'}; in in_rfc3986_unreserved_chars()
117 std::string percent_encode(const unsigned char *target, size_t len) { in percent_encode() argument
120 unsigned char c = target[i]; in percent_encode()
133 std::string percent_encode(const std::string &target) { in percent_encode() argument
134 return percent_encode(reinterpret_cast<const unsigned char *>(target.c_str()), in percent_encode()
135 target.size()); in percent_encode()
156 '-', '.', '^', '_', '`', '|', '~'}; in in_token()
168 const StringRef &target) { in percent_encode_token() argument
169 auto iov = make_byte_ref(balloc, target.size() * 3 + 1); in percent_encode_token()
172 for (auto first = std::begin(target); first != std::end(target); ++first) { in percent_encode_token()
192 return c - '0'; in hex_to_uint()
195 return c - 'A' + 10; in hex_to_uint()
198 return c - 'a' + 10; in hex_to_uint()
203 StringRef quote_string(BlockAllocator &balloc, const StringRef &target) { in quote_string() argument
204 auto cnt = std::count(std::begin(target), std::end(target), '"'); in quote_string()
207 return make_string_ref(balloc, target); in quote_string()
210 auto iov = make_byte_ref(balloc, target.size() + cnt + 1); in quote_string()
213 for (auto c : target) { in quote_string()
229 auto p = d + len - 1; in cpydig()
232 *p-- = (n % 10) + '0'; in cpydig()
318 auto gmtoff = nghttp2_timegm(&tms) - t; in common_log_date()
323 *p++ = '-'; in common_log_date()
324 gmtoff = -gmtoff; in common_log_date()
334 // 2014-11-15T12:58:24.741Z in iso8601_date()
335 // 2014-11-15T12:58:24.741+09:00 in iso8601_date()
338 res.resize(p - &res[0]); in iso8601_date()
353 *p++ = '-'; in iso8601_date()
355 *p++ = '-'; in iso8601_date()
369 auto gmtoff = nghttp2_timegm(&tms) - sec; in iso8601_date()
377 *p++ = '-'; in iso8601_date()
378 gmtoff = -gmtoff; in iso8601_date()
390 // one-time definition of the locale that is used to parse UTC strings
391 // (note that the time_input_facet is ref-counted and deleted automatically)
399 // there is no strptime - use boost in parse_http_date()
429 return c - 'a' + 'A'; in upcase()
468 return '-'; in to_token68()
488 case '-': in to_base64()
499 p = std::fill_n(p, 4 - rem, '='); in to_base64()
508 // Calculates Damerau–Levenshtein distance between c-string a and b
521 dp[0][j] = dp[1][j - 1] + (a[i - 1] == b[j - 1] ? 0 : subcost); in levenshtein()
522 if (i >= 2 && j >= 2 && a[i - 1] != b[j - 1] && a[i - 2] == b[j - 1] && in levenshtein()
523 a[i - 1] == b[j - 2]) { in levenshtein()
524 dp[0][j] = std::min(dp[0][j], dp[2][j - 2] + swapcost); in levenshtein()
527 std::min(dp[1][j] + delcost, dp[0][j - 1] + addcost)); in levenshtein()
536 for (; *unkopt == '-'; ++unkopt) in show_candidates()
544 auto unkoptlen = unkoptend - unkopt; in show_candidates()
589 std::cerr << "\t--" << item.second << "\n"; in show_candidates()
689 auto family = addr->su.storage.ss_family; in to_numeric_addr()
692 return addr->su.un.sun_path; in to_numeric_addr()
699 getnameinfo(&addr->su.sa, addr->len, host.data(), host.size(), in to_numeric_addr()
888 while ((flags = fcntl(fd, F_GETFD)) == -1 && errno == EINTR) in make_socket_closeonexec()
890 while ((rv = fcntl(fd, F_SETFD, flags | FD_CLOEXEC)) == -1 && errno == EINTR) in make_socket_closeonexec()
905 while ((flags = fcntl(fd, F_GETFL, 0)) == -1 && errno == EINTR) in make_socket_nonblocking()
907 while ((rv = fcntl(fd, F_SETFL, flags | O_NONBLOCK)) == -1 && errno == EINTR) in make_socket_nonblocking()
917 sizeof(val)) == -1) { in make_socket_nodelay()
918 return -1; in make_socket_nodelay()
927 if (fd == -1) { in create_nonblock_socket()
928 return -1; in create_nonblock_socket()
933 if (fd == -1) { in create_nonblock_socket()
934 return -1; in create_nonblock_socket()
962 return -1; in get_socket_error()
979 return {-1, 0}; in parse_uint_digits()
985 return {-1, 0}; in parse_uint_digits()
988 if (n > max - (s[i] - '0')) { in parse_uint_digits()
989 return {-1, 0}; in parse_uint_digits()
991 n += s[i] - '0'; in parse_uint_digits()
997 return {-1, 0}; in parse_uint_digits()
1015 if (n == -1) { in parse_uint_with_unit()
1016 return -1; in parse_uint_with_unit()
1022 return -1; in parse_uint_with_unit()
1039 return -1; in parse_uint_with_unit()
1043 return -1; in parse_uint_with_unit()
1064 if (n == -1 || i != len) { in parse_uint()
1065 return -1; in parse_uint()
1085 if (n == -1) { in parse_duration_with_unit()
1191 auto ipv6 = ipv6_numeric_addr(host.c_str()); in make_http_hostport() local
1193 auto iov = make_byte_ref(balloc, host.size() + (ipv6 ? 2 : 0) + 1); in make_http_hostport()
1196 if (ipv6) { in make_http_hostport()
1202 if (ipv6) { in make_http_hostport()
1212 auto ipv6 = ipv6_numeric_addr(host.c_str()); in make_hostport() local
1216 hostport.resize(host.size() + (ipv6 ? 2 : 0) + 1 + serv.size()); in make_hostport()
1220 if (ipv6) { in make_hostport()
1226 if (ipv6) { in make_hostport()
1238 auto ipv6 = ipv6_numeric_addr(host.c_str()); in make_hostport() local
1242 make_byte_ref(balloc, host.size() + (ipv6 ? 2 : 0) + 1 + serv.size()); in make_hostport()
1245 if (ipv6) { in make_hostport()
1251 if (ipv6) { in make_hostport()
1290 std::min(static_cast<size_t>(16), static_cast<size_t>(end - i)); in hexdump()
1294 // print single '*'. in hexdump()
1303 fprintf(out, "%08lx", static_cast<unsigned long>(i - src)); in hexdump()
1313 buflen = stop - i; in hexdump()
1366 return -1; in read_mime_types()
1427 for (; y; --y) { in int_pow()
1434 /* 32 bit FNV-1a: http://isthe.com/chongo/tech/comp/fnv/ */ in hash32()
1462 return -1; in message_digest()
1469 return -1; in message_digest()
1474 return -1; in message_digest()
1481 return -1; in message_digest()
1522 // assume this is IPv6 numeric address in extract_host()
1545 // assume this is IPv6 numeric address in split_hostport()
1584 if (pid == -1) { in daemonize()
1585 return -1; in daemonize()
1589 if (setsid() == -1) { in daemonize()
1590 return -1; in daemonize()
1593 if (pid == -1) { in daemonize()
1594 return -1; in daemonize()
1599 if (chdir("/") == -1) { in daemonize()
1600 return -1; in daemonize()
1605 return -1; in daemonize()
1608 return -1; in daemonize()
1611 return -1; in daemonize()