/system/core/libnetutils/include/netutils/ |
D | ifc.h | 49 extern int ifc_set_prefixLength(const char *name, int prefixLength); 55 extern int ifc_get_info(const char *name, in_addr_t *addr, int *prefixLength, 59 uint32_t prefixLength, in_addr_t gateway,
|
/system/core/libnetutils/ |
D | ifc_utils.c | 82 int prefixLength = 0; in ipv4NetmaskToPrefixLength() local 85 prefixLength++; in ipv4NetmaskToPrefixLength() 88 return prefixLength; in ipv4NetmaskToPrefixLength() 468 int ifc_set_prefixLength(const char *name, int prefixLength) in ifc_set_prefixLength() argument 472 if (prefixLength > 32 || prefixLength < 0) return -1; in ifc_set_prefixLength() 474 in_addr_t mask = prefixLengthToIpv4Netmask(prefixLength); in ifc_set_prefixLength() 498 int ifc_get_info(const char *name, in_addr_t *addr, int *prefixLength, unsigned *flags) in ifc_get_info() argument 511 if (prefixLength != NULL) { in ifc_get_info() 513 *prefixLength = 0; in ifc_get_info() 515 *prefixLength = ipv4NetmaskToPrefixLength( in ifc_get_info() [all …]
|
D | dhcpclient.c | 103 uint32_t prefixLength; member 114 void get_dhcp_info(uint32_t *ipaddr, uint32_t *gateway, uint32_t *prefixLength, in get_dhcp_info() argument 120 *prefixLength = last_good_info.prefixLength; in get_dhcp_info() 130 return ifc_configure(ifname, info->ipaddr, info->prefixLength, info->gateway, in dhcp_configure() 156 ALOGD("ip %s gw %s prefixLength %d", addr, gway, info->prefixLength); in dump_dhcp_info() 201 info->prefixLength = ipv4NetmaskToPrefixLength(mask); in decode_dhcp_msg()
|
/system/netd/tests/ |
D | binder_test.cpp | 422 int prefixLength = 0; in netmaskToPrefixLength() local 433 prefixLength += (value == 0) ? 0 : CHAR_BIT - ffs(value) + 1; in netmaskToPrefixLength() 441 return prefixLength; in netmaskToPrefixLength() 451 const std::string &ifname, const char *addrString, int prefixLength) { in interfaceHasAddress() argument 487 if (prefixLength < 0) return true; // not checking prefix lengths in interfaceHasAddress() 491 EXPECT_EQ(prefixLength, netmaskToPrefixLength(&nm->sin_addr)); in interfaceHasAddress() 492 return (prefixLength == netmaskToPrefixLength(&nm->sin_addr)); in interfaceHasAddress() 501 if (prefixLength < 0) return true; // not checking prefix lengths in interfaceHasAddress() 505 EXPECT_EQ(prefixLength, netmaskToPrefixLength(&nm->sin6_addr)); in interfaceHasAddress() 506 return (prefixLength == netmaskToPrefixLength(&nm->sin6_addr)); in interfaceHasAddress() [all …]
|
/system/netd/server/ |
D | InterfaceController.h | 33 static int addAddress(const char *interface, const char *addrString, int prefixLength); 34 static int delAddress(const char *interface, const char *addrString, int prefixLength);
|
D | InterfaceController.cpp | 268 const char *addrString, int prefixLength) { in addAddress() argument 269 return ifc_add_address(interface, addrString, prefixLength); in addAddress() 273 const char *addrString, int prefixLength) { in delAddress() argument 274 return ifc_del_address(interface, addrString, prefixLength); in delAddress()
|
D | NetdNativeService.h | 55 const std::string &addrString, int prefixLength) override; 57 const std::string &addrString, int prefixLength) override;
|
D | NetdNativeService.cpp | 237 const std::string &addrString, int prefixLength) { in interfaceAddAddress() argument 241 ifName.c_str(), addrString.c_str(), prefixLength); in interfaceAddAddress() 250 const std::string &addrString, int prefixLength) { in interfaceDelAddress() argument 254 ifName.c_str(), addrString.c_str(), prefixLength); in interfaceDelAddress()
|
D | RouteController.cpp | 329 uint8_t prefixLength; in modifyIpRoute() local 331 &prefixLength); in modifyIpRoute() 379 .rtm_dst_len = prefixLength, in modifyIpRoute()
|
D | CommandListener.cpp | 157 int prefixLength; in runCommand() local 164 if (ifc_get_info(argv[2], &addr.s_addr, &prefixLength, &flags)) { in runCommand() 191 addr_s, prefixLength, flag_s); in runCommand()
|
/system/netd/server/binder/android/net/ |
D | INetd.aidl | 170 int prefixLength); in interfaceAddAddress() argument 172 int prefixLength); in interfaceDelAddress() argument
|
/system/core/libsysutils/src/ |
D | NetlinkEvent.cpp | 332 int prefixLength = rtm->rtm_dst_len; in parseRtMessage() local 369 if (!*dst && !prefixLength) { in parseRtMessage() 386 asprintf(&mParams[0], "ROUTE=%s/%d", dst, prefixLength); in parseRtMessage()
|