Home
last modified time | relevance | path

Searched refs:hostname (Results 1 – 25 of 162) sorted by relevance

1234567

/packages/modules/adb/
Dsocket_spec_test.cpp30 std::string hostname, error, serial; in TEST() local
35 EXPECT_FALSE(parse_tcp_socket_spec(spec, &hostname, &port, &serial, &error)); in TEST()
41 std::string hostname, error, serial; in TEST() local
43 EXPECT_TRUE(parse_tcp_socket_spec("tcp:5037", &hostname, &port, &serial, &error)); in TEST()
44 EXPECT_EQ("", hostname); in TEST()
50 std::string hostname, error, serial; in TEST() local
52 EXPECT_FALSE(parse_tcp_socket_spec("tcp:", &hostname, &port, &serial, &error)); in TEST()
53 EXPECT_FALSE(parse_tcp_socket_spec("tcp:-1", &hostname, &port, &serial, &error)); in TEST()
54 EXPECT_FALSE(parse_tcp_socket_spec("tcp:65536", &hostname, &port, &serial, &error)); in TEST()
58 std::string hostname, error, serial; in TEST() local
[all …]
Dsocket_spec.cpp78 bool parse_tcp_socket_spec(std::string_view spec, std::string* hostname, int* port, in parse_tcp_socket_spec() argument
109 if (hostname) { in parse_tcp_socket_spec()
110 *hostname = std::move(hostname_value); in parse_tcp_socket_spec()
155 static bool tcp_host_is_local(std::string_view hostname) { in tcp_host_is_local() argument
157 return hostname.empty() || hostname == "localhost"; in tcp_host_is_local()
179 std::string hostname; in is_local_socket_spec() local
180 if (!parse_tcp_socket_spec(spec, &hostname, nullptr, nullptr, &error)) { in is_local_socket_spec()
183 return tcp_host_is_local(hostname); in is_local_socket_spec()
198 std::string hostname; in socket_spec_connect() local
200 if (!parse_tcp_socket_spec(address, &hostname, &port_value, serial, error)) { in socket_spec_connect()
[all …]
/packages/modules/NetworkStack/common/networkstackclient/src/android/net/shared/
DPrivateDnsConfig.java38 public final String hostname; field in PrivateDnsConfig
79 public PrivateDnsConfig(@Nullable String hostname, @Nullable InetAddress[] ips) { in PrivateDnsConfig() argument
80 this(TextUtils.isEmpty(hostname) ? PRIVATE_DNS_MODE_OFF : in PrivateDnsConfig()
81 PRIVATE_DNS_MODE_PROVIDER_HOSTNAME, hostname, ips, null /* dohName */, in PrivateDnsConfig()
90 public PrivateDnsConfig(int mode, @Nullable String hostname, @Nullable InetAddress[] ips, in PrivateDnsConfig() argument
94 this.hostname = (hostname != null) ? hostname : ""; in PrivateDnsConfig()
104 hostname = cfg.hostname; in PrivateDnsConfig()
129 + "{" + modeAsString(mode) + ":" + hostname + "/" + Arrays.toString(ips) in toString()
152 parcel.hostname = hostname; in toParcel()
184 return new PrivateDnsConfig(parcel.hostname, ips); in fromParcel()
[all …]
/packages/modules/Connectivity/staticlibs/testutils/devicetests/com/android/testutils/
DFakeDns.kt34 class DnsEntry(val hostname: String, val type: Int, val addresses: List<InetAddress>) { constant in com.android.testutils.FakeDns.DnsEntry
35 fun match(host: String, type: Int) = hostname.equals(host) && type == type in match()
41 fun getAnswer(hostname: String, type: Int): DnsEntry? = synchronized(answers) { in match()
42 return answers.firstOrNull { it.match(hostname, type) } in match()
45 fun setAnswer(hostname: String, answer: Array<String>, type: Int) = synchronized(answers) { in <lambda>()
46 val ans = DnsEntry(hostname, type, generateAnswer(answer)) in <lambda>()
48 when (val index = answers.indexOfFirst { it.match(hostname, type) }) { in <lambda>()
78 val hostname = it.arguments[posHos] as String in mockAnswer() constant
82 val answer = getAnswer(hostname, type) in mockAnswer()
/packages/apps/Settings/src/com/android/settings/
DProxySelector.java95 String hostname = mHostnameField.getText().toString().trim(); in onCreateDialog() local
98 String msg = getActivity().getString(validate(hostname, portStr, exclList)); in onCreateDialog()
123 mHostnameField = (EditText)view.findViewById(R.id.hostname); in initView()
145 String hostname = ""; in populateFields() local
154 hostname = proxy.getHost(); in populateFields()
159 if (hostname == null) { in populateFields()
160 hostname = ""; in populateFields()
163 mHostnameField.setText(hostname); in populateFields()
189 public static int validate(String hostname, String port, String exclList) { in validate() argument
190 switch (ProxyUtils.validate(hostname, port, exclList)) { in validate()
[all …]
/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/mdns/
DMdnsAnnouncerTest.kt151 val hostname = arrayOf("Android", "local") in <lambda>() constant
167 hostname), in <lambda>()
172 hostname), in <lambda>()
177 hostname), in <lambda>()
194 hostname), in <lambda>()
202 MdnsInetAddressRecord(hostname, in <lambda>()
207 MdnsInetAddressRecord(hostname, in <lambda>()
212 MdnsInetAddressRecord(hostname, in <lambda>()
243 MdnsNsecRecord(hostname, in <lambda>()
247 hostname, in <lambda>()
DMdnsReplySenderTest.kt64 private val hostname = arrayOf("Android_000102030405060708090A0B0C0D0E0F", "local") constant
80 SHORT_TTL, 0 /* servicePriority */, 0 /* serviceWeight */, TEST_PORT, hostname),
81 MdnsInetAddressRecord(hostname, 0L /* receiptTimeMillis */, true /* cacheFlush */,
83 MdnsInetAddressRecord(hostname, 0L /* receiptTimeMillis */, true /* cacheFlush */,
85 MdnsInetAddressRecord(hostname, 0L /* receiptTimeMillis */, true /* cacheFlush */,
90 MdnsNsecRecord(hostname, 0L /* receiptTimeMillis */, true /* cacheFlush */, SHORT_TTL,
91 hostname /* nextDomain */, intArrayOf(MdnsRecord.TYPE_A, MdnsRecord.TYPE_AAAA)))
DMdnsPacketTest.kt54 val hostname = arrayOf("Android", "local") in makeFlags() constant
57 assertContentEquals(hostname, it.name) in makeFlags()
62 assertContentEquals(hostname, it.name) in makeFlags()
DMdnsResponseTests.java99 final String[] hostname = new String[] { "MyHostname" }; in makeCompleteResponse() local
108 0 /* serviceWeight */, 0 /* servicePort */, hostname)); in makeCompleteResponse()
112 hostname, receiptTimeMillis, true /* cacheFlush */, in makeCompleteResponse()
115 hostname, receiptTimeMillis, true /* cacheFlush */, in makeCompleteResponse()
323 final String[] hostname = new String[] { "MyHostname" }; in dropUnmatchedAddressRecords_caseInsensitive() local
333 0 /* serviceWeight */, 0 /* servicePort */, hostname)); in dropUnmatchedAddressRecords_caseInsensitive()
/packages/modules/NetworkStack/src/android/net/dhcp/
DDhcpLeaseRepository.java194 @Nullable String hostname) throws OutOfAddressesException, InvalidSubnetException { in getOffer() argument
204 newLease = currentLease.renewedLease(expTime, hostname); in getOffer()
208 newLease = new DhcpLease(clientId, hwAddr, reqAddr, mPrefixLength, expTime, hostname); in getOffer()
211 newLease = makeNewOffer(clientId, hwAddr, expTime, hostname); in getOffer()
228 @NonNull Inet4Address relayAddr, @Nullable String hostname) in getCommittedLease() argument
231 hostname); in getCommittedLease()
283 @Nullable Inet4Address reqAddr, boolean sidSet, @Nullable String hostname) in requestLease() argument
313 checkClientAndMakeLease(clientId, hwAddr, leaseAddr, hostname, currentTime); in requestLease()
331 @NonNull Inet4Address addr, @Nullable String hostname, long currentTime) in checkClientAndMakeLease() argument
342 lease = new DhcpLease(clientId, hwAddr, addr, mPrefixLength, expTime, hostname); in checkClientAndMakeLease()
[all …]
DDhcpLease.java58 @Nullable String hostname) { in DhcpLease() argument
64 mHostname = hostname; in DhcpLease()
110 public DhcpLease renewedLease(long expTime, @Nullable String hostname) { in renewedLease() argument
113 (hostname == null ? mHostname : hostname)); in renewedLease()
178 p.hostname = mHostname; in toParcelable()
/packages/modules/NetworkStack/src/android/net/util/
DHostnameTransliterator.java98 String hostname = maybeRemoveRedundantSymbols(mTransliterator.transliterate(deviceName)); in transliterate() local
99 if (TextUtils.isEmpty(hostname)) return null; in transliterate()
100 return hostname.length() > MAX_DNS_LABEL_LENGTH in transliterate()
101 ? hostname.substring(0, MAX_DNS_LABEL_LENGTH) : hostname; in transliterate()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/connectivity/
DWifiConfigHelper.java107 public static int validate(String hostname, String port, String exclList) { in validate() argument
108 return validate(hostname, port, exclList, false); in validate()
120 public static int validate(String hostname, String port, String exclList, in validate() argument
123 Log.i(TAG, "validate, hostname: " + hostname + ", for proxy=" + forProxyCheck); in validate()
125 Matcher match = HOSTNAME_PATTERN.matcher(hostname); in validate()
142 if (hostname.length() > 0 && port.length() == 0) { in validate()
147 if (hostname.length() == 0) { in validate()
/packages/modules/DnsResolver/
DDnsQueryLog.h35 Record(uint32_t netId, uid_t uid, pid_t pid, const std::string& hostname, in Record()
40 hostname(hostname), in Record()
47 const std::string hostname; member
Dgetaddrinfo.cpp246 int getaddrinfo_numeric(const char* hostname, const char* servname, addrinfo hints, in getaddrinfo_numeric() argument
258 return android_getaddrinfofornetcontext(hostname, servname, &hints, &netcontext, result, in getaddrinfo_numeric()
307 int android_getaddrinfofornetcontext(const char* hostname, const char* servname, in android_getaddrinfofornetcontext() argument
322 if (hostname == nullptr && servname == nullptr) { in android_getaddrinfofornetcontext()
358 if (hostname == nullptr) in android_getaddrinfofornetcontext()
361 error = explore_numeric_scope(&tmp, hostname, servname, &cur->ai_next); in android_getaddrinfofornetcontext()
373 if (hostname == nullptr) { in android_getaddrinfofornetcontext()
382 return resolv_getaddrinfo(hostname, servname, hints, netcontext, res, event); in android_getaddrinfofornetcontext()
394 int resolv_getaddrinfo(const char* _Nonnull hostname, const char* servname, const addrinfo* hints, in resolv_getaddrinfo() argument
397 if (hostname == nullptr && servname == nullptr) return EAI_NONAME; in resolv_getaddrinfo()
[all …]
DDnsQueryLog.cpp26 std::string maskHostname(const std::string& hostname) { in maskHostname() argument
28 return hostname.substr(0, 1) + "***"; in maskHostname()
65 const std::string maskedHostname = maskHostname(record.hostname); in dump()
Dgetaddrinfo.h24 int android_getaddrinfofornetcontext(const char* hostname, const char* servname,
29 int resolv_getaddrinfo(const char* hostname, const char* servname, const addrinfo* hints,
/packages/modules/Connectivity/staticlibs/framework/com/android/net/module/util/
DProxyUtils.java76 public static int validate(String hostname, String port, String exclList) { in validate() argument
77 Matcher match = HOSTNAME_PATTERN.matcher(hostname); in validate()
84 if (hostname.length() > 0 && port.length() == 0) return PROXY_PORT_EMPTY; in validate()
87 if (hostname.length() == 0) return PROXY_HOSTNAME_EMPTY; in validate()
/packages/modules/DnsResolver/tests/dns_metrics_listener/
Ddns_metrics_listener.cpp31 return std::tie(netId, eventType, returnCode, hostname, ipAddresses, ipAddressesCount) == in operator ==()
32 std::tie(o.netId, o.eventType, o.returnCode, o.hostname, o.ipAddresses, in operator ==()
38 data.returnCode, data.hostname, fmt::join(data.ipAddresses, ", "), in operator <<()
66 const std::string& hostname, in onDnsEvent() argument
72 {netId, eventType, returnCode, hostname, ipAddresses, ipAddressesCount}); in onDnsEvent()
Dtest_metrics.cpp38 const std::string& hostname, in onDnsEvent() argument
60 if (hostname != result.hostname) continue; in onDnsEvent()
/packages/modules/Connectivity/service/src/com/android/server/connectivity/
DDnsManager.java159 public final String hostname; field in DnsManager.PrivateDnsValidationUpdate
164 String hostname, int validationResult) { in PrivateDnsValidationUpdate() argument
167 this.hostname = hostname; in PrivateDnsValidationUpdate()
197 private void updateTrackedDnses(String[] ipAddresses, String hostname) { in updateTrackedDnses() argument
201 latestDnses.add(new Pair(hostname, in updateTrackedDnses()
222 Pair<String, InetAddress> p = new Pair(update.hostname, in updateStatus()
310 final String tlsHostname = strictMode ? privateDnsCfg.hostname : null; in updatePrivateDnsStatus()
383 paramsParcel.tlsName = strictMode ? privateDnsCfg.hostname : ""; in sendDnsConfigurationForNetwork()
/packages/modules/NetworkStack/tests/unit/src/android/net/shared/
DPrivateDnsConfigTest.java56 assertEquals(a.hostname, b.hostname); in assertPrivateDnsConfigEquals()
66 assertEquals(parcel.hostname, cfg.hostname); in assertParcelEquals()
/packages/modules/Connectivity/service-t/src/com/android/server/connectivity/mdns/
DMdnsInterfaceAdvertiser.java140 final String hostname = mRecordRepository.getHostnameForServiceId(info.getServiceId()); in onFinished() local
141 if (hostname != null) { in onFinished()
143 new ArrayList<>(mRecordRepository.restartAnnouncingForHostname(hostname)); in onFinished()
295 final String hostname = mRecordRepository.getHostnameForServiceId(id); in removeService() local
318 if (hostname != null) { in removeService()
320 mRecordRepository.restartProbingForHostname(hostname); in removeService()
323 mRecordRepository.restartAnnouncingForHostname(hostname); in removeService()
DMdnsRecordRepository.java260 final String[] hostname = in ServiceRegistration() local
302 hostname), in ServiceRegistration()
339 new MdnsInetAddressRecord(hostname, in ServiceRegistration()
370 hostname, in ServiceRegistration()
807 @Nullable String hostname, in addReplyFromService() argument
912 additionalAnswerInfo.addAll(getInetAddressRecordsForHostname(hostname)); in addReplyFromService()
1031 public List<MdnsProber.ProbingInfo> restartProbingForHostname(@NonNull String hostname) { in restartProbingForHostname() argument
1034 hostname, in restartProbingForHostname()
1050 @NonNull String hostname) { in restartAnnouncingForHostname()
1053 hostname, in restartAnnouncingForHostname()
[all …]
/packages/services/Iwlan/test/com/google/android/iwlan/epdg/
DEpdgSelectorTest.java1182 private boolean matches(String hostname, int type) { in matches() argument
1183 return hostname.equals(mHostname) && type == mType; in matches()
1195 private synchronized List<InetAddress> getAnswer(String hostname, int type) { in getAnswer() argument
1197 .filter(e -> e.matches(hostname, type)) in getAnswer()
1204 private synchronized void setAnswer(String hostname, String[] answer, int type) in setAnswer() argument
1206 DnsEntry record = new DnsEntry(hostname, type, generateAnswer(answer)); in setAnswer()
1208 mAnswers.removeIf(entry -> entry.matches(hostname, type)); in setAnswer()
1221 private List<InetAddress> queryIpv4(String hostname) { in queryIpv4() argument
1222 return getAnswer(hostname, TYPE_A); in queryIpv4()
1226 private List<InetAddress> queryIpv6(String hostname) { in queryIpv6() argument
[all …]

1234567