/frameworks/base/core/java/android/net/ |
LinkAddress.java | 40 private final int prefixLength; 42 public LinkAddress(InetAddress address, int prefixLength) { 43 if (address == null || prefixLength < 0 || 44 ((address instanceof Inet4Address) && prefixLength > 32) || 45 (prefixLength > 128)) { 47 prefixLength); 50 this.prefixLength = prefixLength; 55 this.prefixLength = interfaceAddress.getNetworkPrefixLength(); 60 return (address == null ? "" : (address.getHostAddress() + "/" + prefixLength)); [all...] |
NetworkUtils.java | 136 * @param prefixLength 139 public static int prefixLengthToNetmaskInt(int prefixLength) 141 if (prefixLength < 0 || prefixLength > 32) { 144 int value = 0xffffffff << (32 - prefixLength); 171 * Get InetAddress masked with prefixLength. Will never return null. 172 * @param IP address which will be masked with specified prefixLength 173 * @param prefixLength the prefixLength used to mask the IP 175 public static InetAddress getNetworkPart(InetAddress address, int prefixLength) { [all...] |
VpnService.java | 299 * Private method to validate address and prefixLength. 301 private void check(InetAddress address, int prefixLength) { 306 if (prefixLength < 0 || prefixLength > 32) { 307 throw new IllegalArgumentException("Bad prefixLength"); 310 if (prefixLength < 0 || prefixLength > 128) { 311 throw new IllegalArgumentException("Bad prefixLength"); 325 public Builder addAddress(InetAddress address, int prefixLength) { 326 check(address, prefixLength); [all...] |
DhcpResults.java | 187 public boolean addLinkAddress(String addrString, int prefixLength) { 196 LinkAddress linkAddress = new LinkAddress(addr, prefixLength);
|
/libcore/luni/src/main/java/java/net/ |
InterfaceAddress.java | 37 private final short prefixLength; 45 this.prefixLength = countPrefixLength(mask); 51 InterfaceAddress(Inet6Address address, short prefixLength) { 54 this.prefixLength = prefixLength; 86 (rhs.prefixLength == prefixLength) && 94 hashCode += prefixLength; 104 return address + "/" + prefixLength + " [" + broadcastAddress + "]"; 127 return prefixLength; [all...] |
/external/smack/src/org/xbill/DNS/ |
APLRecord.java | 26 public final int prefixLength; 30 Element(int family, boolean negative, Object address, int prefixLength) 35 this.prefixLength = prefixLength; 36 if (!validatePrefixLength(family, prefixLength)) { 46 * @param prefixLength The length of this prefix, in bits. 50 Element(boolean negative, InetAddress address, int prefixLength) { 52 prefixLength); 67 sb.append(prefixLength); 78 prefixLength == elt.prefixLength & [all...] |
/development/ide/xcode/ports/ |
skia_mac.cp | 34 size_t prefixLength = common - applicationPath; 35 char* workingDirectory = new char[prefixLength + sizeof(systemParent)]; 36 strncpy(workingDirectory, applicationPath, prefixLength); 37 strcpy(&workingDirectory[prefixLength], systemParent);
|
/system/core/include/netutils/ |
dhcp.h | 29 uint32_t *prefixLength, 37 uint32_t *prefixLength,
|
ifc.h | 48 extern int ifc_set_prefixLength(const char *name, int prefixLength); 65 extern int ifc_get_info(const char *name, in_addr_t *addr, int *prefixLength, 69 uint32_t prefixLength, in_addr_t gateway,
|
/packages/apps/ContactsCommon/src/com/android/contacts/common/format/ |
FormatUtils.java | 147 int prefixLength = prefix.length(); 149 if (prefixLength == 0 || textLength < prefixLength) { 160 if (i + prefixLength > textLength) { 166 for (j = 0; j < prefixLength; j++) { 171 if (j == prefixLength) {
|
/frameworks/base/core/jni/ |
android_net_NetUtils.cpp | 34 uint32_t *prefixLength, 44 uint32_t *prefixLength, 117 uint32_t prefixLength; 133 result = ::dhcp_do_request_renew(nameStr, ipaddr, gateway, &prefixLength, 136 result = ::dhcp_do_request(nameStr, ipaddr, gateway, &prefixLength, 152 // dhcpResults->addLinkAddress(inetAddress, prefixLength) 154 env->NewStringUTF(ipaddr), prefixLength);
|
/external/webkit/Tools/WebKitTestRunner/ |
TestInvocation.cpp | 64 static const size_t prefixLength = strlen(filePrefix); 75 buffer = adoptArrayPtr(new char[prefixLength + length + 1]); 77 strcpy(buffer.get() + prefixLength, pathOrURL); 79 buffer = adoptArrayPtr(new char[prefixLength + PATH_MAX + length + 2]); // 1 for the separator 81 if (!getcwd(buffer.get() + prefixLength, PATH_MAX))
|
/system/core/netcfg/ |
netcfg.c | 55 int prefixLength; 57 if(ifc_get_info(name, &addr, &prefixLength, &flags)) { 63 printf("/%-4d", prefixLength);
|
/external/icu4c/common/ |
ucmndata.c | 133 * Prime the prefix lengths so that we don't keep prefixLength at 0 until 148 int32_t prefixLength=MIN(startPrefixLength, limitPrefixLength); 149 int32_t cmp=strcmpAfterPrefix(s, names+toc[i].nameOffset, &prefixLength); 152 limitPrefixLength=prefixLength; 157 startPrefixLength=prefixLength; 178 * Prime the prefix lengths so that we don't keep prefixLength at 0 until 193 int32_t prefixLength=MIN(startPrefixLength, limitPrefixLength); 194 int32_t cmp=strcmpAfterPrefix(s, toc[i].entryName, &prefixLength); 197 limitPrefixLength=prefixLength; 202 startPrefixLength=prefixLength; [all...] |
/libcore/luni/src/test/java/libcore/java/io/ |
OldInputStreamReaderTest.java | 256 final int prefixLength = 8189; 258 byte[] bytes = new byte[prefixLength + 10]; 260 System.arraycopy(suffix, 0, bytes, prefixLength, suffix.length); 276 if (at < prefixLength) { 282 char decoded = decodedSuffix[at - prefixLength];
|
/system/core/libnetutils/ |
ifc_utils.c | 78 int prefixLength = 0; 81 prefixLength++; 84 return prefixLength; 441 int ifc_set_prefixLength(const char *name, int prefixLength) 445 if (prefixLength > 32 || prefixLength < 0) return -1; 447 in_addr_t mask = prefixLengthToIpv4Netmask(prefixLength); 471 int ifc_get_info(const char *name, in_addr_t *addr, int *prefixLength, unsigned *flags) 484 if (prefixLength != NULL) { 486 *prefixLength = 0 [all...] |
dhcp_utils.c | 90 uint32_t *prefixLength, 140 *prefixLength = p; 184 uint32_t *prefixLength, 240 if (fill_ip_info(interface, ipaddr, gateway, prefixLength, dns, 327 uint32_t *prefixLength, 368 fill_ip_info(interface, ipaddr, gateway, prefixLength, dns,
|
dhcpclient.c | 105 uint32_t prefixLength; 116 void get_dhcp_info(uint32_t *ipaddr, uint32_t *gateway, uint32_t *prefixLength, 122 *prefixLength = last_good_info.prefixLength; 132 return ifc_configure(ifname, info->ipaddr, info->prefixLength, info->gateway, 158 ALOGD("ip %s gw %s prefixLength %d", addr, gway, info->prefixLength); 203 info->prefixLength = ipv4NetmaskToPrefixLength(mask);
|
/external/webkit/Tools/Scripts/ |
commit-log-editor | 318 my $prefixLength = length $prefix; 320 while ($prefixLength) { 321 last if substr($string, 0, $prefixLength) eq $prefix; 322 --$prefixLength; 325 last unless $prefixLength; 328 return "" unless $prefixLength;
|
/external/webkit/Source/WebKit/mac/WebView/ |
WebTextCompletionController.h | 37 int prefixLength;
|
/external/webkit/Tools/DumpRenderTree/ |
PixelDumpSupport.cpp | 91 static const size_t prefixLength = sizeof(textCommentPrefix) - 1; // The -1 is for the null at the end of the char[]. 94 bytesToAdd.append(textCommentPrefix, prefixLength); 98 dataToCrc.append(textCommentPrefix + 4, prefixLength - 4); // Don't include the chunk length in the crc.
|
/external/icu4c/tools/toolutil/ |
package.cpp | 529 int32_t inPkgNameLength, prefixLength, stringsOffset; 563 prefixLength=inPkgNameLength; 579 prefix[prefixLength++]='_'; 582 prefix[prefixLength++]=U_TREE_ENTRY_SEP_CHAR; 586 prefix[prefixLength]=0; 594 if(0!=strncmp(s, prefix, prefixLength) || s[prefixLength]==0) { 599 items[i].name=s+prefixLength; 650 int32_t i, length, prefixLength, maxItemLength, basenameOffset, offset, outInt32; 728 prefixLength=(int32_t)strlen(prefix) [all...] |
/packages/apps/Settings/src/com/android/settings/vpn2/ |
VpnDialog.java | 284 int prefixLength = 32; 288 prefixLength = Integer.parseInt(parts[1]); 293 if (bytes.length != 4 || prefixLength < 0 || prefixLength > 32 || 294 (prefixLength < 32 && (integer << prefixLength) != 0)) {
|
/external/icu4c/i18n/ |
nfrule.h | 89 int32_t prefixLength(const UnicodeString& str, const UnicodeString& prefix, UErrorCode& status) const;
|
/external/icu4c/test/perf/dicttrieperf/ |
dicttrieperf.cpp | 186 static int32_t strcmpAfterPrefix(const char *s1, const char *s2, int32_t &prefixLength) { 187 int32_t pl=prefixLength; 200 prefixLength=pl; 215 // Prime the prefix lengths so that we don't keep prefixLength at 0 until 229 int32_t prefixLength=MIN(startPrefixLength, limitPrefixLength); 230 int32_t cmp=strcmpAfterPrefix(s, names+toc[i].nameOffset, prefixLength); 233 limitPrefixLength=prefixLength; 238 startPrefixLength=prefixLength;
|