/third_party/python/Lib/unittest/ |
D | util.py | 18 def _shorten(s, prefixlen, suffixlen): argument 19 skip = len(s) - prefixlen - suffixlen 21 s = '%s[%d chars]%s' % (s[:prefixlen], skip, s[len(s) - suffixlen:]) 31 prefixlen = len(prefix) 34 (maxlen - prefixlen + _MIN_BEGIN_LEN + _PLACEHOLDER_LEN) 37 (maxlen - prefixlen) < _MAX_LENGTH 39 return tuple(prefix + s[prefixlen:] for s in args) 42 return tuple(prefix + _shorten(s[prefixlen:], _MIN_DIFF_LEN, _MIN_END_LEN)
|
/third_party/python/Lib/ |
D | ipaddress.py | 435 def _ip_int_from_prefix(cls, prefixlen): argument 445 return cls._ALL_ONES ^ (cls._ALL_ONES >> prefixlen) 462 prefixlen = cls._max_prefixlen - trailing_zeroes 464 all_ones = (1 << prefixlen) - 1 470 return prefixlen 495 prefixlen = int(prefixlen_str) 498 if not (0 <= prefixlen <= cls._max_prefixlen): 500 return prefixlen 686 return '%s/%d' % (self.network_address, self.prefixlen) 796 def prefixlen(self): member in _BaseNetwork [all …]
|
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/ap/ |
D | dhcp_snoop.c | 40 int res, msgtype = 0, prefixlen = 32; in handle_dhcp() local 79 prefixlen--; in handle_dhcp() 113 prefixlen); in handle_dhcp() 127 prefixlen, sta->addr); in handle_dhcp()
|
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/ap/ |
D | dhcp_snoop.c | 40 int res, msgtype = 0, prefixlen = 32; in handle_dhcp() local 79 prefixlen--; in handle_dhcp() 115 prefixlen); in handle_dhcp() 129 prefixlen, sta->addr); in handle_dhcp()
|
/third_party/libnl/lib/route/link/ |
D | sit.c | 714 int rtnl_link_sit_set_ip6rd_prefixlen(struct rtnl_link *link, uint16_t prefixlen) in rtnl_link_sit_set_ip6rd_prefixlen() argument 719 sit->ip6rd_prefixlen = prefixlen; in rtnl_link_sit_set_ip6rd_prefixlen() 731 int rtnl_link_sit_get_ip6rd_prefixlen(struct rtnl_link *link, uint16_t *prefixlen) in rtnl_link_sit_get_ip6rd_prefixlen() argument 738 if (prefixlen) in rtnl_link_sit_get_ip6rd_prefixlen() 739 *prefixlen = sit->ip6rd_prefixlen; in rtnl_link_sit_get_ip6rd_prefixlen() 786 int rtnl_link_sit_set_ip6rd_relay_prefixlen(struct rtnl_link *link, uint16_t prefixlen) in rtnl_link_sit_set_ip6rd_relay_prefixlen() argument 791 sit->ip6rd_relay_prefixlen = prefixlen; in rtnl_link_sit_set_ip6rd_relay_prefixlen() 803 int rtnl_link_sit_get_ip6rd_relay_prefixlen(struct rtnl_link *link, uint16_t *prefixlen) in rtnl_link_sit_get_ip6rd_relay_prefixlen() argument 810 if (prefixlen) in rtnl_link_sit_get_ip6rd_relay_prefixlen() 811 *prefixlen = sit->ip6rd_relay_prefixlen; in rtnl_link_sit_get_ip6rd_relay_prefixlen()
|
/third_party/libnl/lib/xfrm/ |
D | selector.c | 298 int xfrmnl_sel_set_prefixlen_d (struct xfrmnl_sel* sel, unsigned int prefixlen) in xfrmnl_sel_set_prefixlen_d() argument 300 sel->prefixlen_d = prefixlen; in xfrmnl_sel_set_prefixlen_d() 310 int xfrmnl_sel_set_prefixlen_s (struct xfrmnl_sel* sel, unsigned int prefixlen) in xfrmnl_sel_set_prefixlen_s() argument 312 sel->prefixlen_s = prefixlen; in xfrmnl_sel_set_prefixlen_s()
|
/third_party/musl/src/network/ |
D | getifaddrs.c | 82 static void gen_netmask(struct sockaddr **r, int af, union sockany *sa, int prefixlen) in gen_netmask() argument 87 if (prefixlen > 8*sizeof(addr)) prefixlen = 8*sizeof(addr); in gen_netmask() 88 i = prefixlen / 8; in gen_netmask() 90 if (i < sizeof(addr)) addr[i++] = 0xff << (8 - (prefixlen % 8)); in gen_netmask()
|
D | lookup_name.c | 397 int prefixlen = 0; in __lookup_name() local 410 prefixlen = prefixmatch(&sa6.sin6_addr, in __lookup_name() 418 key |= prefixlen << DAS_PREFIX_SHIFT; in __lookup_name()
|
/third_party/musl/porting/liteos_a/user/src/network/ |
D | getifaddrs.c | 91 static void gen_netmask(struct sockaddr **r, int af, union sockany *sa, int prefixlen) in gen_netmask() argument 96 if (prefixlen > 8*sizeof(addr)) prefixlen = 8*sizeof(addr); in gen_netmask() 97 i = prefixlen / 8; in gen_netmask() 99 if (i < sizeof(addr)) addr[i++] = 0xff << (8 - (prefixlen % 8)); in gen_netmask()
|
/third_party/libnl/include/netlink/route/link/ |
D | sit.h | 54 int rtnl_link_sit_set_ip6rd_prefixlen(struct rtnl_link *link, uint16_t prefixlen); 55 int rtnl_link_sit_get_ip6rd_prefixlen(struct rtnl_link *link, uint16_t *prefixlen);
|
/third_party/node/deps/npm/node_modules/ip/lib/ |
D | ip.js | 102 ip.fromPrefixLen = function(prefixlen, family) { argument 103 if (prefixlen > 32) { 117 if (prefixlen < 8) { 118 bits = prefixlen; 120 prefixlen -= bits;
|
/third_party/openssl/crypto/x509v3/ |
D | v3_addr.c | 389 unsigned char *addr, const int prefixlen) in make_addressPrefix() argument 391 int bytelen = (prefixlen + 7) / 8, bitlen = prefixlen % 8; in make_addressPrefix() 427 int i, prefixlen; in make_addressRange() local 429 if ((prefixlen = range_should_be_prefix(min, max, length)) >= 0) in make_addressRange() 430 return make_addressPrefix(result, min, prefixlen); in make_addressRange() 588 unsigned char *a, const int prefixlen) in X509v3_addr_add_prefix() argument 592 if (aors == NULL || !make_addressPrefix(&aor, a, prefixlen)) in X509v3_addr_add_prefix() 907 int prefixlen, i1, i2, delim, length; in v2i_IPAddrBlocks() local 988 prefixlen = (int)strtoul(s + i2, &t, 10); in v2i_IPAddrBlocks() 995 if (!X509v3_addr_add_prefix(addr, afi, safi, min, prefixlen)) { in v2i_IPAddrBlocks()
|
/third_party/libnl/python/netlink/ |
D | core.py | 692 diff = self.prefixlen - other.prefixlen 703 if item.prefixlen < self.prefixlen: 736 def prefixlen(self): member in AbstractAddress 743 @prefixlen.setter 744 def prefixlen(self, value): member in AbstractAddress
|
/third_party/openssl/ssl/ |
D | ssl_conf.c | 81 size_t prefixlen; member 729 if (strlen(*pcmd) <= cctx->prefixlen) in ssl_conf_cmd_skip_prefix() 732 strncmp(*pcmd, cctx->prefix, cctx->prefixlen)) in ssl_conf_cmd_skip_prefix() 735 strncasecmp(*pcmd, cctx->prefix, cctx->prefixlen)) in ssl_conf_cmd_skip_prefix() 737 *pcmd += cctx->prefixlen; in ssl_conf_cmd_skip_prefix() 958 cctx->prefixlen = strlen(tmp); in SSL_CONF_CTX_set1_prefix() 960 cctx->prefixlen = 0; in SSL_CONF_CTX_set1_prefix()
|
/third_party/re2/re2/ |
D | re2.cc | 622 size_t prefixlen = 0; in GlobalReplace() local 626 prefixlen = prefix_.size(); in GlobalReplace() 627 if (prefixlen > subtext.size()) in GlobalReplace() 630 if (ascii_strcasecmp(&prefix_[0], subtext.data(), prefixlen) != 0) in GlobalReplace() 633 if (memcmp(&prefix_[0], subtext.data(), prefixlen) != 0) in GlobalReplace() 636 subtext.remove_prefix(prefixlen); in GlobalReplace() 781 if (prefixlen > 0 && nsubmatch > 0) in GlobalReplace() 782 submatch[0] = StringPiece(submatch[0].data() - prefixlen, in GlobalReplace() 783 submatch[0].size() + prefixlen); in GlobalReplace()
|
/third_party/ltp/testcases/network/stress/ns-tools/ |
D | ns-common.c | 373 int ifidx, prefixlen, scope; in get_a_lla_byifindex() local 389 &ifidx, &prefixlen, &scope); in get_a_lla_byifindex() 400 if (prefixlen != 64) in get_a_lla_byifindex()
|
/third_party/grpc/tools/buildgen/ |
D | extract_metadata_from_bazel_xml.py | 210 prefixlen = len('@com_google_absl//') 211 return bazel_dep[prefixlen:] 408 prefixlen = len('//') 409 result.append(test_name[prefixlen:])
|
/third_party/libinput/src/ |
D | util-strings.h | 363 size_t prefixlen = strlen(prefix); in strstartswith() local 365 return prefixlen > 0 ? strneq(str, prefix, strlen(prefix)) : false; in strstartswith()
|
/third_party/libnl/lib/route/ |
D | addr.c | 537 __ADD(ADDR_ATTR_PREFIXLEN, prefixlen), 923 void rtnl_addr_set_prefixlen(struct rtnl_addr *addr, int prefixlen) in rtnl_addr_set_prefixlen() argument 925 addr->a_prefixlen = prefixlen; in rtnl_addr_set_prefixlen() 927 if (prefixlen) in rtnl_addr_set_prefixlen() 937 nl_addr_set_prefixlen(addr->a_peer, prefixlen); in rtnl_addr_set_prefixlen() 939 nl_addr_set_prefixlen(addr->a_local, prefixlen); in rtnl_addr_set_prefixlen()
|
/third_party/libnl/lib/fib_lookup/ |
D | lookup.c | 44 unsigned char prefixlen; member 106 res->fr_prefixlen = fr->prefixlen; in result_msg_parser()
|
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/impl/ |
D | UCharacterName.java | 732 int prefixlen = m_prefix_.length(); in getChar() local 733 if (name.length() < prefixlen || in getChar() 734 !m_prefix_.equals(name.substring(0, prefixlen))) { in getChar() 743 int result = Integer.parseInt(name.substring(prefixlen), in getChar() 782 prefixlen)) { in getChar()
|
/third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/ |
D | UCharacterName.java | 731 int prefixlen = m_prefix_.length(); in getChar() local 732 if (name.length() < prefixlen || in getChar() 733 !m_prefix_.equals(name.substring(0, prefixlen))) { in getChar() 742 int result = Integer.parseInt(name.substring(prefixlen), in getChar() 781 prefixlen)) { in getChar()
|
/third_party/toybox/toys/pending/ |
D | route.c | 412 int prefixlen, metric, use, refcount, flag, items = 0; in display_routes6() local 421 &prefixlen, ipv6_src_addr+8, &metric, &use, &refcount, &flag, in display_routes6() 433 sprintf(toybuf, "%s/%d", buf2, prefixlen); in display_routes6()
|
/third_party/nghttp2/lib/ |
D | nghttp2_hd.c | 1033 size_t prefixlen; in emit_indname_block() local 1036 prefixlen = 6; in emit_indname_block() 1038 prefixlen = 4; in emit_indname_block() 1044 blocklen = count_encoded_length(idx + 1, prefixlen); in emit_indname_block() 1054 encode_length(bufp, idx + 1, prefixlen); in emit_indname_block() 1952 size_t prefixlen; in nghttp2_hd_inflate_hd_nv() local 1955 prefixlen = 7; in nghttp2_hd_inflate_hd_nv() 1957 prefixlen = 6; in nghttp2_hd_inflate_hd_nv() 1959 prefixlen = 4; in nghttp2_hd_inflate_hd_nv() 1963 rv = hd_inflate_read_len(inflater, &rfin, in, last, prefixlen, in nghttp2_hd_inflate_hd_nv()
|
/third_party/node/deps/nghttp2/lib/ |
D | nghttp2_hd.c | 1033 size_t prefixlen; in emit_indname_block() local 1036 prefixlen = 6; in emit_indname_block() 1038 prefixlen = 4; in emit_indname_block() 1044 blocklen = count_encoded_length(idx + 1, prefixlen); in emit_indname_block() 1054 encode_length(bufp, idx + 1, prefixlen); in emit_indname_block() 1952 size_t prefixlen; in nghttp2_hd_inflate_hd_nv() local 1955 prefixlen = 7; in nghttp2_hd_inflate_hd_nv() 1957 prefixlen = 6; in nghttp2_hd_inflate_hd_nv() 1959 prefixlen = 4; in nghttp2_hd_inflate_hd_nv() 1963 rv = hd_inflate_read_len(inflater, &rfin, in, last, prefixlen, in nghttp2_hd_inflate_hd_nv()
|