Home
last modified time | relevance | path

Searched refs:prefixLength (Results 1 – 25 of 32) sorted by relevance

12

/system/core/libnetutils/include/netutils/
Difc.h52 extern int ifc_set_prefixLength(const char *name, int prefixLength);
58 extern int ifc_get_info(const char *name, in_addr_t *addr, int *prefixLength,
62 uint32_t prefixLength, in_addr_t gateway,
/system/core/libnetutils/
Difc_utils.c82 int prefixLength = 0; in ipv4NetmaskToPrefixLength() local
85 prefixLength++; in ipv4NetmaskToPrefixLength()
88 return prefixLength; in ipv4NetmaskToPrefixLength()
470 int ifc_set_prefixLength(const char *name, int prefixLength) in ifc_set_prefixLength() argument
474 if (prefixLength > 32 || prefixLength < 0) return -1; in ifc_set_prefixLength()
476 in_addr_t mask = prefixLengthToIpv4Netmask(prefixLength); in ifc_set_prefixLength()
500 int ifc_get_info(const char *name, in_addr_t *addr, int *prefixLength, unsigned *flags) in ifc_get_info() argument
513 if (prefixLength != NULL) { in ifc_get_info()
515 *prefixLength = 0; in ifc_get_info()
517 *prefixLength = ipv4NetmaskToPrefixLength( in ifc_get_info()
[all …]
Ddhcpclient.c103 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/server/
DInterfaceController.cpp365 const char *addrString, int prefixLength) { in addAddress() argument
366 return ifc_add_address(interface, addrString, prefixLength); in addAddress()
371 const char *addrString, int prefixLength) { in delAddress() argument
372 return ifc_del_address(interface, addrString, prefixLength); in delAddress()
458 int prefixLength = 0; in ipv4NetmaskToPrefixLength() local
461 prefixLength++; in ipv4NetmaskToPrefixLength()
464 return prefixLength; in ipv4NetmaskToPrefixLength()
502 if (int ret = ifc_add_address(cfg.ifName.c_str(), cfg.ipv4Addr.c_str(), cfg.prefixLength)) { in setCfg()
511 int prefixLength = 0; in getCfg() local
527 prefixLength = in getCfg()
[all …]
DInterfaceController.h44 static int addAddress(const char* ifName, const char* addrString, int prefixLength);
45 static int delAddress(const char* ifName, const char* addrString, int prefixLength);
/system/netd/server/aidl_api/netd_aidl_interface/3/android/net/
DTetherOffloadRuleParcel.aidl24 int prefixLength;
DInterfaceConfigurationParcel.aidl24 int prefixLength;
DINetd.aidl35 …nterfaceAddAddress(in @utf8InCpp String ifName, in @utf8InCpp String addrString, int prefixLength); in interfaceAddAddress() argument
36 …nterfaceDelAddress(in @utf8InCpp String ifName, in @utf8InCpp String addrString, int prefixLength); in interfaceDelAddress() argument
/system/netd/server/aidl_api/netd_aidl_interface/4/android/net/
DTetherOffloadRuleParcel.aidl24 int prefixLength;
DInterfaceConfigurationParcel.aidl24 int prefixLength;
/system/netd/server/binder/android/net/
DTetherOffloadRuleParcel.aidl35 int prefixLength;
DInterfaceConfigurationParcel.aidl28 int prefixLength;
/system/netd/server/aidl_api/netd_aidl_interface/current/android/net/
DTetherOffloadRuleParcel.aidl24 int prefixLength;
DInterfaceConfigurationParcel.aidl24 int prefixLength;
DINetd.aidl35 …nterfaceAddAddress(in @utf8InCpp String ifName, in @utf8InCpp String addrString, int prefixLength); in interfaceAddAddress() argument
36 …nterfaceDelAddress(in @utf8InCpp String ifName, in @utf8InCpp String addrString, int prefixLength); in interfaceDelAddress() argument
/system/netd/server/aidl_api/netd_aidl_interface/1/android/net/
DInterfaceConfigurationParcel.aidl6 int prefixLength;
DINetd.aidl17 …nterfaceAddAddress(in @utf8InCpp String ifName, in @utf8InCpp String addrString, int prefixLength); in interfaceAddAddress() argument
18 …nterfaceDelAddress(in @utf8InCpp String ifName, in @utf8InCpp String addrString, int prefixLength); in interfaceDelAddress() argument
/system/netd/server/aidl_api/netd_aidl_interface/2/android/net/
DInterfaceConfigurationParcel.aidl23 int prefixLength;
DINetd.aidl34 …nterfaceAddAddress(in @utf8InCpp String ifName, in @utf8InCpp String addrString, int prefixLength); in interfaceAddAddress() argument
35 …nterfaceDelAddress(in @utf8InCpp String ifName, in @utf8InCpp String addrString, int prefixLength); in interfaceDelAddress() argument
/system/core/adb/fastdeploy/deployagent/test/com/android/fastdeploy/
DFastDeployTest.java75 final int prefixLength = "package:".length(); in isAppInstalled() local
77 .anyMatch(line -> line.substring(prefixLength).equals(packageName)); in isAppInstalled()
/system/netd/server/binder/android/net/metrics/
DINetdEventListener.aidl127 int prefixLength); in onNat64PrefixEvent() argument
/system/netd/server/aidl_api/netd_event_listener_interface/1/android/net/metrics/
DINetdEventListener.aidl25 …oid onNat64PrefixEvent(int netId, boolean added, @utf8InCpp String prefixString, int prefixLength); in onNat64PrefixEvent() argument
/system/netd/server/aidl_api/netd_event_listener_interface/current/android/net/metrics/
DINetdEventListener.aidl26 …oid onNat64PrefixEvent(int netId, boolean added, @utf8InCpp String prefixString, int prefixLength); in onNat64PrefixEvent() argument
/system/netd/tests/
Dbinder_test.cpp710 int prefixLength = 0; in netmaskToPrefixLength() local
721 prefixLength += (value == 0) ? 0 : CHAR_BIT - ffs(value) + 1; in netmaskToPrefixLength()
729 return prefixLength; in netmaskToPrefixLength()
739 const std::string &ifname, const char *addrString, int prefixLength) { in interfaceHasAddress() argument
775 if (prefixLength < 0) return true; // not checking prefix lengths in interfaceHasAddress()
779 EXPECT_EQ(prefixLength, netmaskToPrefixLength(&nm->sin_addr)); in interfaceHasAddress()
780 return (prefixLength == netmaskToPrefixLength(&nm->sin_addr)); in interfaceHasAddress()
789 if (prefixLength < 0) return true; // not checking prefix lengths in interfaceHasAddress()
793 EXPECT_EQ(prefixLength, netmaskToPrefixLength(&nm->sin6_addr)); in interfaceHasAddress()
794 return (prefixLength == netmaskToPrefixLength(&nm->sin6_addr)); in interfaceHasAddress()
[all …]
/system/core/libsysutils/src/
DNetlinkEvent.cpp374 int prefixLength = rtm->rtm_dst_len; in parseRtMessage() local
412 if (!*dst && !prefixLength) { in parseRtMessage()
429 asprintf(&mParams[0], "ROUTE=%s/%d", dst, prefixLength); in parseRtMessage()

12