/system/netd/ |
H A D | CommandListener.cpp | 397 struct in_addr addr; local 405 if (ifc_get_info(argv[2], &addr.s_addr, &prefixLength, &flags)) { 412 ALOGW("Failed to retrieve HW addr for %s (%s)", argv[2], strerror(errno)); 415 char *addr_s = strdup(inet_ntoa(addr)); 443 // arglist: iface [addr prefixLength] flags 450 struct in_addr addr; local 456 if (!inet_aton(argv[3], &addr)) { 460 if (ifc_set_addr(argv[2], addr.s_addr)) { 467 if (addr.s_addr != 0 && ifc_set_prefixLength(argv[2], atoi(argv[4]))) { 875 struct in_addr addr; local 1399 const char* addr = argv[2]; local 1414 const char* addr = argv[2]; local [all...] |
H A D | DnsProxyListener.cpp | 194 void* addr = malloc(sizeof(struct in6_addr)); local 196 int result = inet_pton(addrFamily, addrStr, addr); 202 free(addr); 209 new DnsProxyListener::GetHostByAddrHandler(cli, addr, addrLen, addrFamily);
|
H A D | FirewallController.cpp | 85 int FirewallController::setEgressSourceRule(const char* addr, FirewallRule rule) { argument 87 if (strchr(addr, ':')) { 99 res |= execIptables(target, op, LOCAL_INPUT, "-d", addr, "-j", "RETURN", NULL); 100 res |= execIptables(target, op, LOCAL_OUTPUT, "-s", addr, "-j", "RETURN", NULL); 104 int FirewallController::setEgressDestRule(const char* addr, int protocol, int port, argument 107 if (strchr(addr, ':')) { 125 res |= execIptables(target, op, LOCAL_INPUT, "-s", addr, "-p", protocolStr, 127 res |= execIptables(target, op, LOCAL_OUTPUT, "-d", addr, "-p", protocolStr,
|
H A D | MDnsSdListener.cpp | 311 char addr[INET6_ADDRSTRLEN]; local 315 inet_ntop(sa->sa_family, &(((struct sockaddr_in *)sa)->sin_addr), addr, sizeof(addr)); 317 inet_ntop(sa->sa_family, &(((struct sockaddr_in6 *)sa)->sin6_addr), addr, sizeof(addr)); 319 asprintf(&msg, "%d %s %d %s", refNumber, quotedHostname, ttl, addr);
|
H A D | ResolverController.cpp | 50 int ResolverController::setInterfaceAddress(const char* iface, struct in_addr* addr) { argument 55 _resolv_set_addr_of_iface(iface, addr);
|
H A D | SecondaryTableController.cpp | 137 const char *SecondaryTableController::getVersion(const char *addr) { argument 138 if (strchr(addr, ':') != NULL) { 159 const char *addr) { 165 asprintf(&cmd, "%s %s rule %s from %s table %d", IP_PATH, getVersion(addr), 166 action, addr, tableIndex + BASE_TABLE_NUMBER); 176 const char *iface, const char *addr) { 185 asprintf(&cmd, "%s route %s %s dev %s table %d", IP_PATH, action, addr, iface, 158 modifyFromRule(int tableIndex, const char *action, const char *addr) argument 175 modifyLocalRoute(int tableIndex, const char *action, const char *iface, const char *addr) argument
|