Home
last modified time | relevance | path

Searched refs:prefixlen (Results 1 – 25 of 47) sorted by relevance

12

/external/linux-kselftest/tools/testing/selftests/bpf/
Dtest_lpm_map.c250 key->prefixlen = value[keysize]; in test_lpm_map()
262 key->prefixlen = 8 * keysize; in test_lpm_map()
286 key->prefixlen = list->n_bits; in test_lpm_map()
299 key->prefixlen = 8 * keysize; in test_lpm_map()
357 key_ipv4->prefixlen = 16; in test_lpm_ipaddr()
362 key_ipv4->prefixlen = 24; in test_lpm_ipaddr()
367 key_ipv4->prefixlen = 24; in test_lpm_ipaddr()
372 key_ipv4->prefixlen = 24; in test_lpm_ipaddr()
377 key_ipv4->prefixlen = 23; in test_lpm_ipaddr()
382 key_ipv6->prefixlen = 64; in test_lpm_ipaddr()
[all …]
/external/python/cpython3/Lib/unittest/
Dutil.py18 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)
/external/webrtc/webrtc/base/
Difaddrs-android.cc86 int make_prefixes(struct ifaddrs* ifaddr, int family, int prefixlen) { in make_prefixes() argument
93 if (prefixlen > 32) { in make_prefixes()
94 prefixlen = 32; in make_prefixes()
102 if (prefixlen > 128) { in make_prefixes()
103 prefixlen = 128; in make_prefixes()
109 for (int i = 0; i < (prefixlen / 8); i++) { in make_prefixes()
113 remainder <<= (8 - prefixlen % 8); in make_prefixes()
/external/python/cpython3/Lib/
Dipaddress.py434 def _ip_int_from_prefix(cls, prefixlen): argument
444 return cls._ALL_ONES ^ (cls._ALL_ONES >> prefixlen)
461 prefixlen = cls._max_prefixlen - trailing_zeroes
463 all_ones = (1 << prefixlen) - 1
469 return prefixlen
494 prefixlen = int(prefixlen_str)
497 if not (0 <= prefixlen <= cls._max_prefixlen):
499 return prefixlen
614 return '%s/%d' % (self.network_address, self.prefixlen)
733 def prefixlen(self): member in _BaseNetwork
[all …]
/external/wpa_supplicant_8/src/ap/
Ddhcp_snoop.c40 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()
/external/mdnsresponder/mDNSPosix/
Dnss_mdns.c130 format_reverse_addr (int af, const void * addr, int prefixlen, char * buf);
151 int prefixlen,
174 int prefixlen,
2370 int prefixlen, in format_reverse_addr_in() argument
2379 if (prefixlen > 32) in format_reverse_addr_in()
2381 if (prefixlen < 0) in format_reverse_addr_in()
2382 prefixlen = 32; in format_reverse_addr_in()
2384 i = (prefixlen + 7) / 8; in format_reverse_addr_in()
2401 int prefixlen, in format_reverse_addr_in6() argument
2410 if (prefixlen > 128) in format_reverse_addr_in6()
[all …]
/external/libevent/sample/
Dhostcheck.c167 size_t prefixlen, suffixlen; in hostmatch() local
197 prefixlen = pattern_wildcard - pattern; in hostmatch()
199 return Curl_raw_nequal(pattern, hostname, prefixlen) && in hostmatch()
/external/curl/lib/
Dhostcheck.c69 size_t prefixlen, suffixlen; in hostmatch() local
120 prefixlen = pattern_wildcard - pattern; in hostmatch()
122 return strncasecompare(pattern, hostname, prefixlen) && in hostmatch()
/external/android-clat/
Dconfig.c255 in_addr_t config_select_ipv4_address(const struct in_addr *ip, int16_t prefixlen) { in config_select_ipv4_address() argument
259 if (prefixlen < 16 || prefixlen > 32) { in config_select_ipv4_address()
264 in_addr_t mask = 0xffffffff >> (32 - prefixlen) << (32 - prefixlen); in config_select_ipv4_address()
Dsetif.c43 int add_address(const char *ifname, int family, const void *address, int prefixlen, in add_address() argument
62 ifa.ifa_prefixlen = prefixlen; in add_address()
Dconfig.h45 in_addr_t config_select_ipv4_address(const struct in_addr *ip, int16_t prefixlen);
/external/scapy/scapy/contrib/
Deigrp.py156 prefixlen = self.prefixlen_to_bytelen(l)
160 pad = b"\x00" * (16 - prefixlen)
327 EigrpIPField("dst", "192.168.1.0", length_from=lambda pkt: pkt.prefixlen),
366 EigrpIPField("dst", "192.168.1.0", length_from=lambda pkt: pkt.prefixlen)
382 EigrpIP6Field("dst", "2001::", length_from=lambda pkt: pkt.prefixlen)
405 EigrpIP6Field("dst", "::", length_from=lambda pkt: pkt.prefixlen)
Deigrp.uts104 p = IP()/EIGRP(tlvlist=[EIGRPIntRoute(prefixlen=24, dst="192.168.1.0")])
108 p = IP()/EIGRP(tlvlist=[EIGRPExtRoute(prefixlen=16, dst="10.1.0.0")])
112 p = IP()/EIGRP(tlvlist=[EIGRPv6IntRoute(prefixlen=64, dst="2000::")])
116 p = IP()/EIGRP(tlvlist=[EIGRPv6ExtRoute(prefixlen=99, dst="2000::")])
/external/ipsec-tools/src/racoon/
Dpolicy.c109 u_int8_t prefixlen; local
122 prefixlen = sizeof(struct in_addr) << 3;
126 prefixlen = sizeof(struct in6_addr) << 3;
141 || spidx->prefs != prefixlen)
149 || spidx->prefd != prefixlen)
/external/libnl/python/netlink/
Dcore.py692 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
/external/ltp/testcases/network/stress/ns-tools/
Dns-common.c373 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()
/external/libnl/lib/route/
Daddr.c465 __ADD(ADDR_ATTR_PREFIXLEN, prefixlen)
851 void rtnl_addr_set_prefixlen(struct rtnl_addr *addr, int prefixlen) in rtnl_addr_set_prefixlen() argument
853 addr->a_prefixlen = prefixlen; in rtnl_addr_set_prefixlen()
855 if (prefixlen) in rtnl_addr_set_prefixlen()
865 nl_addr_set_prefixlen(addr->a_peer, prefixlen); in rtnl_addr_set_prefixlen()
867 nl_addr_set_prefixlen(addr->a_local, prefixlen); in rtnl_addr_set_prefixlen()
/external/iproute2/ip/
Dlink_iptnl.c389 __u16 prefixlen, type; in iptunnel_print_opt() local
462 (prefixlen = rta_getattr_u16(tb[IFLA_IPTUN_6RD_PREFIXLEN]))) { in iptunnel_print_opt()
474 print_int(PRINT_JSON, "prefixlen", NULL, prefixlen); in iptunnel_print_opt()
488 printf("6rd-prefix %s/%u ", prefix, prefixlen); in iptunnel_print_opt()
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/
DUCharacterName.java731 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()
/external/icu/android_icu4j/src/main/java/android/icu/impl/
DUCharacterName.java732 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()
/external/libnl/lib/fib_lookup/
Dlookup.c42 unsigned char prefixlen; member
104 res->fr_prefixlen = fr->prefixlen; in result_msg_parser()
/external/bcc/src/cc/frontends/p4/test/
DendToEndTest.py37 self.prefixlen = 24
152 src.parent, ifname, src.ipaddress , src.prefixlen)
162 dest.ipaddress, dest.prefixlen)
/external/toybox/toys/pending/
Droute.c411 int prefixlen, metric, use, refcount, flag, items = 0; in display_routes6() local
420 &prefixlen, ipv6_src_addr+8, &metric, &use, &refcount, &flag, in display_routes6()
432 sprintf(toybuf, "%s/%d", buf2, prefixlen); in display_routes6()
/external/kmod/tools/
Dmodprobe.c283 size_t prefixlen = p - cmd; in command_do() local
284 size_t suffixlen = cmdlen - prefixlen - varlen; in command_do()
293 memcpy(s + prefixlen, cmdline_opts, cmdline_opts_len); in command_do()
294 memcpy(s + prefixlen + cmdline_opts_len, suffix, suffixlen); in command_do()
/external/libnl/include/linux-private/linux/
Dif_tunnel.h78 __u16 prefixlen; member

12