/frameworks/base/core/java/android/net/ |
H A D | IpPrefix.aidl | 20 parcelable IpPrefix cpp_header "binder/IpPrefix.h";
|
H A D | IpPrefix.java | 48 public final class IpPrefix implements Parcelable { class in inherits:Parcelable 55 "IpPrefix has " + address.length + " bytes which is neither 4 nor 16"); 61 * Constructs a new {@code IpPrefix} from a byte array containing an IPv4 or IPv6 address in 70 public IpPrefix(byte[] address, int prefixLength) { method in class:IpPrefix 77 * Constructs a new {@code IpPrefix} from an IPv4 or IPv6 address and a prefix length. Silently 85 public IpPrefix(InetAddress address, int prefixLength) { method in class:IpPrefix 94 * Constructs a new IpPrefix from a string such as "192.0.2.1/24" or "2001:db8::1/64". 102 public IpPrefix(String prefix) { method in class:IpPrefix 114 * Compares this {@code IpPrefix} object against the specified object in {@code obj}. Two 122 if (!(obj instanceof IpPrefix)) { [all...] |
H A D | RouteInfo.java | 38 * <li>a destination {@link IpPrefix} specifying the network destinations covered by this route. 53 private final IpPrefix mDestination; 102 public RouteInfo(IpPrefix destination, InetAddress gateway, String iface, int type) { 125 destination = new IpPrefix(Inet4Address.ANY, 0); 127 destination = new IpPrefix(Inet6Address.ANY, 0); 153 mDestination = destination; // IpPrefix objects are immutable. 163 public RouteInfo(IpPrefix destination, InetAddress gateway, String iface) { 172 new IpPrefix(destination.getAddress(), destination.getPrefixLength()), 186 * @param destination the destination address and prefix in an {@link IpPrefix} 191 public RouteInfo(IpPrefix destinatio [all...] |
/frameworks/base/services/net/java/android/net/util/ |
H A D | PrefixUtils.java | 19 import android.net.IpPrefix; 34 private static final IpPrefix[] MIN_NON_FORWARDABLE_PREFIXES = { 43 public static final IpPrefix DEFAULT_WIFI_P2P_PREFIX = pfx("192.168.49.0/24"); 45 public static Set<IpPrefix> getNonForwardablePrefixes() { 46 final HashSet<IpPrefix> prefixes = new HashSet<>(); 51 public static void addNonForwardablePrefixes(Set<IpPrefix> prefixes) { 55 public static Set<IpPrefix> localPrefixesFrom(LinkProperties lp) { 56 final HashSet<IpPrefix> localPrefixes = new HashSet<>(); 69 public static IpPrefix asIpPrefix(LinkAddress addr) { 70 return new IpPrefix(add [all...] |
/frameworks/base/tests/net/java/android/net/ |
H A D | IpPrefixTest.java | 56 IpPrefix p; 58 p = new IpPrefix((byte[]) null, 9); 63 p = new IpPrefix((InetAddress) null, 10); 68 p = new IpPrefix((String) null); 75 p = new IpPrefix(b2, 29); 80 p = new IpPrefix("1.2.3.4"); 85 p = new IpPrefix("1.2.3.4/"); 90 p = new IpPrefix("foo/32"); 95 p = new IpPrefix("1/32"); 100 p = new IpPrefix("1. [all...] |
/frameworks/native/include/binder/ |
H A D | IpPrefix.h | 31 * C++ implementation of the Java class android.net.IpPrefix 33 class IpPrefix : public Parcelable { class in namespace:android::net 35 IpPrefix() = default; 36 virtual ~IpPrefix() = default; 37 IpPrefix(const IpPrefix& prefix) = default; 39 IpPrefix(const struct in6_addr& addr, int32_t plen): function in class:android::net::IpPrefix 42 IpPrefix(const struct in_addr& addr, int32_t plen): function in class:android::net::IpPrefix 61 friend bool operator==(const IpPrefix& lhs, const IpPrefix [all...] |
/frameworks/native/libs/binder/include/binder/ |
H A D | IpPrefix.h | 31 * C++ implementation of the Java class android.net.IpPrefix 33 class IpPrefix : public Parcelable { class in namespace:android::net 35 IpPrefix() = default; 36 virtual ~IpPrefix() = default; 37 IpPrefix(const IpPrefix& prefix) = default; 39 IpPrefix(const struct in6_addr& addr, int32_t plen): function in class:android::net::IpPrefix 42 IpPrefix(const struct in_addr& addr, int32_t plen): function in class:android::net::IpPrefix 61 friend bool operator==(const IpPrefix& lhs, const IpPrefix [all...] |
/frameworks/native/libs/binder/ |
H A D | IpPrefix.cpp | 17 #define LOG_TAG "IpPrefix" 19 #include <binder/IpPrefix.h> 48 status_t IpPrefix::writeToParcel(Parcel* parcel) const { 51 * frameworks/base/core/java/android/net/IpPrefix.java. 69 status_t IpPrefix::readFromParcel(const Parcel* parcel) { 72 * frameworks/base/core/java/android/net/IpPrefix.java. 95 const struct in6_addr& IpPrefix::getAddressAsIn6Addr() const 100 const struct in_addr& IpPrefix::getAddressAsInAddr() const 105 bool IpPrefix::getAddressAsIn6Addr(struct in6_addr* addr) const 114 bool IpPrefix [all...] |
/frameworks/base/lowpan/java/android/net/lowpan/ |
H A D | ILowpanInterfaceListener.aidl | 19 import android.net.IpPrefix; 36 oneway void onLinkNetworkAdded(in IpPrefix value); 38 oneway void onLinkNetworkRemoved(in IpPrefix value);
|
H A D | ILowpanInterface.aidl | 19 import android.net.IpPrefix; 124 IpPrefix[] getLinkNetworks(); 150 void addOnMeshPrefix(in IpPrefix prefix, int flags); 151 oneway void removeOnMeshPrefix(in IpPrefix prefix); 153 void addExternalRoute(in IpPrefix prefix, int flags); 154 oneway void removeExternalRoute(in IpPrefix prefix);
|
H A D | LowpanCommissioningSession.java | 21 import android.net.IpPrefix; 101 public void onLinkNetworkAdded(IpPrefix value) {} 104 public void onLinkNetworkRemoved(IpPrefix value) {}
|
H A D | LowpanInterface.java | 22 import android.net.IpPrefix; 174 public void onLinkNetworkAdded(IpPrefix prefix) {} 176 public void onLinkNetworkRemoved(IpPrefix prefix) {} 601 public void onLinkNetworkAdded(IpPrefix value) { 606 public void onLinkNetworkRemoved(IpPrefix value) { 741 public IpPrefix[] getLinkNetworks() throws LowpanException { 758 public void addOnMeshPrefix(IpPrefix prefix, int flags) throws LowpanException { 776 public void removeOnMeshPrefix(IpPrefix prefix) { 795 public void addExternalRoute(IpPrefix prefix, int flags) throws LowpanException { 812 public void removeExternalRoute(IpPrefix prefi [all...] |
/frameworks/base/services/net/java/android/net/ip/ |
H A D | RouterAdvertisementDaemon.java | 23 import android.net.IpPrefix; 125 public HashSet<IpPrefix> prefixes; 131 prefixes = new HashSet<IpPrefix>(); 150 for (IpPrefix ipp : oldRa.prefixes) { 168 private final HashMap<IpPrefix, Integer> mPrefixes = new HashMap<>(); 171 Set<IpPrefix> getPrefixes() { return mPrefixes.keySet(); } 173 void putPrefixes(Set<IpPrefix> prefixes) { 174 for (IpPrefix ipp : prefixes) { 179 void removePrefixes(Set<IpPrefix> prefixes) { 180 for (IpPrefix ip [all...] |
/frameworks/base/core/tests/coretests/src/android/net/ |
H A D | RouteInfoTest.java | 22 import android.net.IpPrefix; 35 private IpPrefix Prefix(String prefix) { 36 return new IpPrefix(prefix); 45 r = new RouteInfo((IpPrefix) null, null, "rmnet0"); 50 r = new RouteInfo((IpPrefix) null, Address("2001:db8::1"), null); 55 r = new RouteInfo((IpPrefix) null, Address("192.0.2.1"), "wlan0"); 76 public PatchedRouteInfo(IpPrefix destination, InetAddress gateway, String iface) {
|
H A D | StaticIpConfigurationTest.java | 19 import android.net.IpPrefix; 154 final RouteInfo connectedRoute = new RouteInfo(new IpPrefix(ADDRSTR), null, IFACE); 161 RouteInfo defaultRoute = new RouteInfo(new IpPrefix("0.0.0.0/0"), GATEWAY, IFACE); 167 defaultRoute = new RouteInfo(new IpPrefix("0.0.0.0/0"), OFFLINKGATEWAY, IFACE); 170 RouteInfo gatewayRoute = new RouteInfo(new IpPrefix("192.0.2.129/32"), null, IFACE);
|
H A D | LinkPropertiesTest.java | 19 import android.net.IpPrefix; 599 new IpPrefix(NetworkUtils.numericToInetAddress("75.208.0.0"), 16)))); 627 new IpPrefix(NetworkUtils.numericToInetAddress("fe80::"), 64)))); 644 new IpPrefix(NetworkUtils.numericToInetAddress("2001:db8:85a3::"), 64)))); 683 stacked.addRoute(new RouteInfo((IpPrefix) null, stackedAddress)); 693 RouteInfo directRoute0 = new RouteInfo(new IpPrefix("10.0.0.0/8"), null, 706 RouteInfo defaultRoute1 = new RouteInfo((IpPrefix) null, 708 RouteInfo directRoute1 = new RouteInfo(new IpPrefix("10.0.0.0/8"), null, 725 RouteInfo defaultRoute2 = new RouteInfo((IpPrefix) null, 727 RouteInfo directRoute2 = new RouteInfo(new IpPrefix("200 [all...] |
/frameworks/base/services/core/java/com/android/server/connectivity/tethering/ |
H A D | IPv6TetheringCoordinator.java | 20 import android.net.IpPrefix; 295 final IpPrefix destination = routeInfo.getDestination(); 328 final IpPrefix local48 = makeUniqueLocalPrefix(ulp, (short) 0, 48); 331 final IpPrefix local64 = makeUniqueLocalPrefix(ulp, subnetId, 64); 341 private static IpPrefix makeUniqueLocalPrefix(byte[] in6addr, short subnetId, int prefixlen) { 345 return new IpPrefix(bytes, prefixlen);
|
H A D | TetherInterfaceStateMachine.java | 25 import android.net.IpPrefix; 65 private static final IpPrefix LINK_LOCAL_PREFIX = new IpPrefix("fe80::/64"); 311 final IpPrefix prefix = new IpPrefix( 329 HashSet<IpPrefix> deprecatedPrefixes, HashSet<IpPrefix> newPrefixes) { 349 HashSet<IpPrefix> addedPrefixes = (HashSet) newPrefixes.clone(); 727 String ifname, HashSet<IpPrefix> prefixes) { 729 for (IpPrefix ip [all...] |
H A D | UpstreamNetworkMonitor.java | 29 import android.net.IpPrefix; 92 private HashSet<IpPrefix> mLocalPrefixes; 231 public Set<IpPrefix> getLocalPrefixes() { 232 return (Set<IpPrefix>) mLocalPrefixes.clone(); 388 final HashSet<IpPrefix> localPrefixes = allLocalPrefixes(mNetworkMap.values()); 494 private static HashSet<IpPrefix> allLocalPrefixes(Iterable<NetworkState> netStates) { 495 final HashSet<IpPrefix> prefixSet = new HashSet<>();
|
H A D | OffloadController.java | 28 import android.net.IpPrefix; 91 private Set<IpPrefix> mExemptPrefixes; 378 public void setLocalPrefixes(Set<IpPrefix> localPrefixes) { 513 Set<IpPrefix> localPrefixes, LinkProperties upstreamLinkProperties) { 515 final Set<IpPrefix> prefixSet = new HashSet<>(localPrefixes); 531 prefixSet.add(new IpPrefix(ip, 128)); 536 for (IpPrefix pfx : prefixSet) localPrefixStrs.add(pfx.toString());
|
/frameworks/base/tests/net/java/com/android/server/connectivity/tethering/ |
H A D | OffloadControllerTest.java | 47 import android.net.IpPrefix; 238 final Set<IpPrefix> minimumLocalPrefixes = new HashSet<>(); 241 minimumLocalPrefixes.add(new IpPrefix(s)); 275 lp.addRoute(new RouteInfo(new IpPrefix("192.0.2.0/24"))); 354 lp.addRoute(new RouteInfo(new IpPrefix("2001:db8::/64"))); 580 usbLinkProperties.addRoute(new RouteInfo(new IpPrefix(USB_PREFIX))); 586 usbLinkProperties.addRoute(new RouteInfo(new IpPrefix(IPV6_LINKLOCAL))); 594 usbLinkProperties.addRoute(new RouteInfo(new IpPrefix(IPV6_DOC_PREFIX))); 607 usbLinkProperties.removeRoute(new RouteInfo(new IpPrefix(IPV6_DOC_PREFIX), null, RNDIS0)); 608 usbLinkProperties.addRoute(new RouteInfo(new IpPrefix(IPV6_DISCARD_PREFI [all...] |
H A D | UpstreamNetworkMonitorTest.java | 47 import android.net.IpPrefix; 331 Set<IpPrefix> local = mUNM.getLocalPrefixes(); 611 static void assertPrefixSet(Set<IpPrefix> prefixes, boolean expectation, String... expected) { 617 static void assertPrefixSet(Set<IpPrefix> prefixes, boolean expectation, Set<String> expected) { 622 expectation, prefixes.contains(new IpPrefix(expectedPrefix)));
|
/frameworks/base/tests/net/java/android/net/ip/ |
H A D | IpManagerTest.java | 38 import android.net.IpPrefix; 343 Set<IpPrefix> prefixes, Set<InetAddress> dns) { 348 Set<IpPrefix> prefixes, Set<InetAddress> dns) { 370 static InitialConfiguration conf(Set<LinkAddress> links, Set<IpPrefix> prefixes) { 375 Set<LinkAddress> links, Set<IpPrefix> prefixes, Set<InetAddress> dns) { 384 return mapIntoSet(routes, (r) -> new RouteInfo(new IpPrefix(r))); 387 static Set<IpPrefix> prefixes(String... prefixes) { 388 return mapIntoSet(prefixes, IpPrefix::new);
|
/frameworks/opt/net/lowpan/service/java/com/android/server/lowpan/ |
H A D | LowpanInterfaceTracker.java | 22 import android.net.IpPrefix; 420 IpPrefix prefix = new IpPrefix(address.getAddress(), address.getPrefixLength()); 425 for (IpPrefix prefix : mLowpanInterface.getLinkNetworks()) {
|
/frameworks/base/core/java/com/android/internal/net/ |
H A D | VpnConfig.java | 27 import android.net.IpPrefix; 121 RouteInfo info = new RouteInfo(new IpPrefix(route), null);
|