Home
last modified time | relevance | path

Searched refs:prefixlen (Results 1 – 11 of 11) sorted by relevance

/system/core/libnetutils/include/netutils/
Difc.h46 extern int ifc_act_on_address(int action, const char* name, const char* address, int prefixlen,
49 int prefixlen);
51 int prefixlen);
/system/netd/server/
DNetdConstants.cpp78 int parsePrefix(const char *prefix, uint8_t *family, void *address, int size, uint8_t *prefixlen) { in parsePrefix() argument
79 if (!prefix || !family || !address || !prefixlen) { in parsePrefix()
96 *prefixlen = templen; in parsePrefix()
118 if (*prefixlen > 32) { in parsePrefix()
127 if (*prefixlen > 128) { in parsePrefix()
DNetdConstants.h38 int parsePrefix(const char *prefix, uint8_t *family, void *address, int size, uint8_t *prefixlen);
DClatdController.cpp121 in_addr_t ClatdController::selectIpv4Address(const in_addr ip, int16_t prefixlen) { in selectIpv4Address() argument
123 if (prefixlen < 16 || prefixlen > 32) { in selectIpv4Address()
128 in_addr_t mask = 0xffffffff >> (32 - prefixlen) << (32 - prefixlen); in selectIpv4Address()
DClatdController.h87 static in_addr_t selectIpv4Address(const in_addr ip, int16_t prefixlen);
DSockDiag.cpp182 uint8_t prefixlen = addrlen * 8; in sendDumpRequest() local
201 prefixlen, in sendDumpRequest()
/system/core/libnetutils/
Difc_utils.c260 int ifc_act_on_address(int action, const char* name, const char* address, int prefixlen, in ifc_act_on_address() argument
315 req.r.ifa_prefixlen = prefixlen; in ifc_act_on_address()
331 ((struct in_addr *)addr)->s_addr |= htonl((1<<(32-prefixlen))-1); in ifc_act_on_address()
366 int ifc_add_address(const char *name, const char *address, int prefixlen) { in ifc_add_address() argument
367 return ifc_act_on_address(RTM_NEWADDR, name, address, prefixlen, /*nodad*/ false); in ifc_add_address()
371 int ifc_del_address(const char *name, const char * address, int prefixlen) { in ifc_del_address() argument
372 return ifc_act_on_address(RTM_DELADDR, name, address, prefixlen, /*nodad*/ false); in ifc_del_address()
380 unsigned int prefixlen; in ifc_clear_ipv6_addresses() local
391 rawaddrstr, &prefixlen, ifname) == 3) { in ifc_clear_ipv6_addresses()
412 ret = ifc_del_address(ifname, addrstr, prefixlen); in ifc_clear_ipv6_addresses()
[all …]
/system/netd/libnetdutils/
DInternetAddresses.cpp140 unsigned long prefixlen = strtoul(prefixString, &endptr, 10); in forString() local
144 if (prefixlen > maxlen) return false; in forString()
146 *prefix = IPPrefix(ip, prefixlen); in forString()
/system/netd/tests/
Dtun_interface.cpp122 int TunInterface::addAddress(const std::string& addr, int prefixlen) { in addAddress() argument
142 if (int ret = ifc_act_on_address(RTM_NEWADDR, mIfName.c_str(), addr.c_str(), prefixlen, in addAddress()
174 if (ifaddr->ifa_prefixlen != prefixlen) continue; in addAddress()
Dtun_interface.h45 int addAddress(const std::string& addr, int prefixlen);
/system/core/libsysutils/src/
DNetlinkEvent.cpp609 has_prefix(const char* str, const char* end, const char* prefix, size_t prefixlen) in has_prefix() argument
611 if ((end - str) >= (ptrdiff_t)prefixlen && in has_prefix()
612 (prefixlen == 0 || !memcmp(str, prefix, prefixlen))) { in has_prefix()
613 return str + prefixlen; in has_prefix()