/system/core/adb/ |
H A D | console.c | 8 int fd, port; local 10 port = adb_get_emulator_console_port(); 11 if (port < 0) { 12 if (port == -2) 18 fd = socket_loopback_client( port, SOCK_STREAM ); 20 fprintf(stderr, "error: could not connect to TCP port %d\n", port);
|
H A D | transport_local.c | 105 int local_connect(int port) { argument 106 return local_connect_arbitrary_ports(port-1, port); 139 int port = DEFAULT_ADB_LOCAL_TRANSPORT_PORT; local 147 for ( ; count > 0; count--, port += 2 ) { 148 (void) local_connect(port); 159 int port = (int)arg; local 165 serverfd = socket_inaddr_any_server(port, SOCK_STREAM); 175 D("server: trying to get new connection from %d\n", port); 181 register_socket_transport(fd, "host", port, 241 const int port = (int)arg; local 299 local_init(int port) argument [all...] |
H A D | services.c | 139 int port = (int)cookie; local 141 if (port <= 0) { 142 snprintf(buf, sizeof(buf), "invalid port\n"); 148 snprintf(value, sizeof(value), "%d", port); 149 property_set("service.adb.tcp.port", value); 150 snprintf(buf, sizeof(buf), "restarting in TCP mode port: %d\n", port); 159 property_set("service.adb.tcp.port", "0"); 408 int port = atoi(name + 4); local 411 ret = socket_loopback_client(port, SOCK_STREA 476 int port; local [all...] |
H A D | adb.h | 213 /* A listener is an entity which binds to a local port 214 ** and, upon receiving a connection on that port, creates 288 int init_socket_transport(atransport *t, int s, int port, int local); 295 void register_socket_transport(int s, const char *serial, int port, int local); 441 void local_init(int port); 442 int local_connect(int port);
|
H A D | adb.c | 699 int port; local 703 port = atoi(name + 4); 704 ret = socket_loopback_server(port, SOCK_STREAM); 1044 /* Constructs a local name of form tcp:port. 1047 * server_port is the port number to use for the local name. 1091 int port; local 1135 /* don't listen on a port (default 5037) if running in secure mode */ 1179 D("Local port disabled\n"); 1195 // If one of these properties is set, also listen on that port 1197 // listen on the default port 1239 int port, fd; local 1470 int port = atoi(service+9); local [all...] |
H A D | adb_client.c | 35 int port; local 75 port = strtol(serial, NULL, 10); 76 return port; 216 fprintf(stdout,"* daemon not running. starting it now on port %d *\n",
|
H A D | sysdeps_win32.c | 579 int socket_loopback_client(int port, int type) argument 593 addr.sin_port = htons(port); 605 D("socket_loopback_client: could not connect to %s:%d\n", type != SOCK_STREAM ? "udp" : "tcp", port ); 609 snprintf( f->name, sizeof(f->name), "%d(lo-client:%s%d)", _fh_to_int(f), type != SOCK_STREAM ? "udp:" : "", port ); 610 D( "socket_loopback_client: port %d type %s => fd %d\n", port, type != SOCK_STREAM ? "udp" : "tcp", _fh_to_int(f) ); 616 int socket_loopback_server(int port, int type) argument 632 addr.sin_port = htons(port); 656 snprintf( f->name, sizeof(f->name), "%d(lo-server:%s%d)", _fh_to_int(f), type != SOCK_STREAM ? "udp:" : "", port ); 657 D( "socket_loopback_server: port 662 socket_network_client(const char *host, int port, int type) argument 704 socket_inaddr_any_server(int port, int type) argument [all...] |
H A D | sysdeps.h | 170 extern int socket_loopback_client(int port, int type); 171 extern int socket_network_client(const char *host, int port, int type); 172 extern int socket_loopback_server(int port, int type); 173 extern int socket_inaddr_any_server(int port, int type);
|
H A D | transport.c | 985 void register_socket_transport(int s, const char *serial, int port, int local) argument 994 D("transport: %s init'ing for socket %d, on port %d\n", serial, s, port); 995 if ( init_socket_transport(t, s, port, local) < 0 ) {
|
/system/core/toolbox/ |
H A D | smd.c | 9 int fd, len, r, port = 0; local 15 port = atoi(argv[0] + 1); 20 sprintf(devname,"/dev/smd%d",port);
|
H A D | netstat.c | 74 /* addr + : + port + \0 */ 77 static void addr2str(int af, const void *addr, unsigned port, char *buf) argument 84 if (port) { 85 snprintf(buf+len, ADDR_LEN-len, ":%d", port);
|
/system/core/include/cutils/ |
H A D | sockets.h | 87 extern int socket_loopback_client(int port, int type); 88 extern int socket_network_client(const char *host, int port, int type); 89 extern int socket_loopback_server(int port, int type); 95 extern int socket_inaddr_any_server(int port, int type);
|
/system/core/libcutils/ |
H A D | socket_inaddr_any_server.c | 35 /* open listen() port on any interface */ 36 int socket_inaddr_any_server(int port, int type) argument 44 addr.sin_port = htons(port);
|
H A D | socket_loopback_client.c | 33 /* Connect to port on the loopback IP interface. type is 37 int socket_loopback_client(int port, int type) argument 45 addr.sin_port = htons(port);
|
H A D | socket_loopback_server.c | 35 /* open listen() port on loopback interface */ 36 int socket_loopback_server(int port, int type) argument 44 addr.sin_port = htons(port);
|
H A D | socket_network_client.c | 35 /* Connect to port on the IP interface. type is 39 int socket_network_client(const char *host, int port, int type) argument 51 addr.sin_port = htons(port);
|
/system/netd/ |
H A D | FirewallController.cpp | 104 int FirewallController::setEgressDestRule(const char* addr, int protocol, int port, argument 115 sprintf(portStr, "%d", port);
|
H A D | MDnsSdListener.h | 37 DNSServiceErrorType errorCode, const char *fullname, const char *hosttarget, uint16_t port, 119 const char *host, int port, int textLen, void *txtRecord);
|
H A D | MDnsSdListener.cpp | 156 const char *domain, const char *host, int port, int txtLen, void *txtRecord) { 159 interfaceName, serviceName, serviceType, domain, host, port, txtLen); 163 port = htons(port); 173 serviceType, domain, host, port, txtLen, txtRecord, &MDnsSdListenerRegisterCallback, 244 DNSServiceErrorType errorCode, const char *fullname, const char *hosttarget, uint16_t port, 249 port = ntohs(port); 257 asprintf(&msg, "%d %s %s %d %d", refNumber, quotedFullName, quotedHostTarget, port, txtLen); 263 refNumber, fullname, hosttarget, port, txtLe 154 serviceRegister(SocketClient *cli, int requestId, const char *interfaceName, const char *serviceName, const char *serviceType, const char *domain, const char *host, int port, int txtLen, void *txtRecord) argument 243 MDnsSdListenerResolveCallback(DNSServiceRef sdRef, DNSServiceFlags flags, uint32_t interface, DNSServiceErrorType errorCode, const char *fullname, const char *hosttarget, uint16_t port, uint16_t txtLen, const unsigned char *txtRecord, void *inContext) argument 426 int port = atoi(argv[5]); local [all...] |
H A D | CommandListener.cpp | 1415 int port = atoi(argv[3]); local 1419 res |= sFirewallCtrl->setEgressDestRule(addr, PROTOCOL_TCP, port, rule); 1420 res |= sFirewallCtrl->setEgressDestRule(addr, PROTOCOL_UDP, port, rule);
|