Home
last modified time | relevance | path

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

/system/core/adb/
Dsocket_spec_test.cpp24 std::string hostname, error; in TEST() local
26 EXPECT_TRUE(parse_tcp_socket_spec("tcp:5037", &hostname, &port, &error)); in TEST()
27 EXPECT_EQ("", hostname); in TEST()
31 EXPECT_FALSE(parse_tcp_socket_spec("tcp:", &hostname, &port, &error)); in TEST()
32 EXPECT_FALSE(parse_tcp_socket_spec("tcp:-1", &hostname, &port, &error)); in TEST()
33 EXPECT_FALSE(parse_tcp_socket_spec("tcp:65536", &hostname, &port, &error)); in TEST()
35 EXPECT_TRUE(parse_tcp_socket_spec("tcp:localhost:1234", &hostname, &port, &error)); in TEST()
36 EXPECT_EQ("localhost", hostname); in TEST()
39 EXPECT_FALSE(parse_tcp_socket_spec("tcp:localhost", &hostname, &port, &error)); in TEST()
40 EXPECT_FALSE(parse_tcp_socket_spec("tcp:localhost:", &hostname, &port, &error)); in TEST()
[all …]
Dsocket_spec.cpp67 bool parse_tcp_socket_spec(const std::string& spec, std::string* hostname, int* port, in parse_tcp_socket_spec() argument
102 if (hostname) { in parse_tcp_socket_spec()
103 *hostname = std::move(hostname_value); in parse_tcp_socket_spec()
113 static bool tcp_host_is_local(const std::string& hostname) { in tcp_host_is_local() argument
115 return hostname.empty() || hostname == "localhost"; in tcp_host_is_local()
137 std::string hostname; in is_local_socket_spec() local
138 if (!parse_tcp_socket_spec(spec, &hostname, nullptr, &error)) { in is_local_socket_spec()
141 return tcp_host_is_local(hostname); in is_local_socket_spec()
146 std::string hostname; in socket_spec_connect() local
148 if (!parse_tcp_socket_spec(spec, &hostname, &port, error)) { in socket_spec_connect()
[all …]
Dadb_auth_host.cpp58 std::string hostname; in get_user_info() local
59 if (getenv("HOSTNAME")) hostname = getenv("HOSTNAME"); in get_user_info()
62 if (hostname.empty() && gethostname(buf, sizeof(buf)) != -1) hostname = buf; in get_user_info()
64 if (hostname.empty()) hostname = "unknown"; in get_user_info()
71 if (username.empty()) hostname = "unknown"; in get_user_info()
73 return " " + username + "@" + hostname; in get_user_info()
Dsocket_spec.h30 bool parse_tcp_socket_spec(const std::string& spec, std::string* hostname, int* port,
Dtransport_mdns.cpp52 const char* hostname,
/system/extras/multinetwork/
Dhttpurl.cpp39 std::string hostname; member
72 parameters->hostname = parameters->host.substr(1, closing_bracket - 1); in parseUrl()
86 parameters->hostname = parameters->host.substr(0, first_colon); in parseUrl()
88 parameters->hostname = parameters->host; in parseUrl()
94 std::cerr << "Resolving hostname=" << parameters->hostname in parseUrl()
108 parameters->hostname.c_str(), in parseUrl()
113 rval = getaddrinfo(parameters->hostname.c_str(), in parseUrl()
/system/core/adb/daemon/
Dmdns.cpp67 std::string hostname = "adb-"; in setup_mdns_thread() local
68 hostname += android::base::GetProperty("ro.serialno", "unidentified"); in setup_mdns_thread()
70 auto error = DNSServiceRegister(&mdns_ref, 0, 0, hostname.c_str(), in setup_mdns_thread()
/system/netd/server/
DMDnsSdListener.h41 DNSServiceErrorType errorCode, const char *hostname, void *inContext);
44 uint32_t interface, DNSServiceErrorType errorCode, const char *hostname,
127 void setHostname(SocketClient *cli, int requestId, const char *hostname);
130 uint32_t protocol, const char *hostname);
DMDnsSdListener.cpp284 const char *interfaceName, uint32_t protocol, const char *hostname) { in getAddrInfo() argument
285 if (VDBG) ALOGD("getAddrInfo(%d, %s %d, %s)", requestId, interfaceName, protocol, hostname); in getAddrInfo()
297 hostname, &MDnsSdListenerGetAddrInfoCallback, context); in getAddrInfo()
313 uint32_t /* interface */, DNSServiceErrorType errorCode, const char *hostname, in MDnsSdListenerGetAddrInfoCallback() argument
327 char *quotedHostname = SocketClient::quoteArg(hostname); in MDnsSdListenerGetAddrInfoCallback()
344 const char *hostname) { in setHostname() argument
345 if (VDBG) ALOGD("setHostname(%d, %s)", requestId, hostname); in setHostname()
355 DNSServiceErrorType result = DNSSetHostname(ref, nativeFlags, hostname, in setHostname()
371 DNSServiceErrorType errorCode, const char *hostname, void *inContext) { in MDnsSdListenerSetHostnameCallback() argument
380 char *quotedHostname = SocketClient::quoteArg(hostname); in MDnsSdListenerSetHostnameCallback()
[all …]
/system/core/fastboot/
Dtcp.h46 std::unique_ptr<Transport> Connect(const std::string& hostname, int port, std::string* error);
Dudp.h44 std::unique_ptr<Transport> Connect(const std::string& hostname, int port, std::string* error);
Dtcp.cpp181 std::unique_ptr<Transport> Connect(const std::string& hostname, int port, std::string* error) { in Connect() argument
182 return internal::Connect(Socket::NewClient(Socket::Protocol::kTcp, hostname, port, error), in Connect()
Dsocket.h58 static std::unique_ptr<Socket> NewClient(Protocol protocol, const std::string& hostname,
Dudp.cpp373 std::unique_ptr<Transport> Connect(const std::string& hostname, int port, std::string* error) { in Connect() argument
374 return internal::Connect(Socket::NewClient(Socket::Protocol::kUdp, hostname, port, error), in Connect()
Dsocket_test.cpp37 const std::string& hostname = "localhost") { in MakeConnectedSockets() argument
44 *client = Socket::NewClient(protocol, hostname, (*server)->GetLocalPort(), nullptr); in MakeConnectedSockets()
/system/netd/server/binder/android/net/metrics/
DINetdEventListener.aidl49 void onDnsEvent(int netId, int eventType, int returnCode, int latencyMs, String hostname, in onDnsEvent() argument
/system/extras/perfprofd/quipper/kernel-headers/tools/perf/util/
Dheader.h80 char * hostname; member
/system/extras/perfprofd/quipper/original-kernel-headers/tools/perf/util/
Dheader.h69 char *hostname; member
/system/core/shell_and_utilities/
DREADME.md103 head hostname hwclock id ifconfig inotifyd insmod kill load\_policy ln
124 getenforce getprop groups head hostname hwclock id ifconfig inotifyd
147 getenforce getprop groups head hostname hwclock id ifconfig inotifyd
/system/core/rootdir/
Dinit.rc557 hostname localhost
/system/core/init/
DREADME.md388 `hostname <name>`