Home
last modified time | relevance | path

Searched refs:RouteInfo (Results 1 – 25 of 68) sorted by relevance

123

/packages/modules/Connectivity/tests/common/java/android/net/
DRouteInfoTest.java19 import static android.net.RouteInfo.RTN_THROW;
20 import static android.net.RouteInfo.RTN_UNICAST;
21 import static android.net.RouteInfo.RTN_UNREACHABLE;
62 RouteInfo r; in testConstructor()
65 r = new RouteInfo((IpPrefix) null, null, "rmnet0"); in testConstructor()
70 r = new RouteInfo(Prefix("2001:db8:ace::/49"), Address("2001:db8::1"), "rmnet0", in testConstructor()
76 r = new RouteInfo(Prefix("2001:db8:ace::/49"), Address("192.0.2.1"), "rmnet0", in testConstructor()
82 r = new RouteInfo(Prefix("0.0.0.0/0"), Address("2001:db8::1"), "rmnet0", in testConstructor()
88 r = new RouteInfo((IpPrefix) null, Address("2001:db8::1"), null); in testConstructor()
93 r = new RouteInfo((IpPrefix) null, Address("192.0.2.1"), "wlan0"); in testConstructor()
[all …]
DLinkPropertiesTest.java19 import static android.net.RouteInfo.RTN_THROW;
20 import static android.net.RouteInfo.RTN_UNICAST;
21 import static android.net.RouteInfo.RTN_UNREACHABLE;
156 lp.addRoute(new RouteInfo(GATEWAY1)); in makeTestObject()
157 lp.addRoute(new RouteInfo(GATEWAY2)); in makeTestObject()
246 source.addRoute(new RouteInfo(GATEWAY1)); in testEqualsSameOrder()
247 source.addRoute(new RouteInfo(GATEWAY2)); in testEqualsSameOrder()
259 target.addRoute(new RouteInfo(GATEWAY1)); in testEqualsSameOrder()
260 target.addRoute(new RouteInfo(GATEWAY2)); in testEqualsSameOrder()
273 target.addRoute(new RouteInfo(GATEWAY1)); in testEqualsSameOrder()
[all …]
/packages/modules/Connectivity/staticlibs/tests/unit/src/com/android/net/module/util/
DNetUtilsTest.java29 import android.net.RouteInfo;
60 private static final RouteInfo V4_EXPECTED = new RouteInfo(new IpPrefix("75.208.8.0/24"),
62 private static final RouteInfo V6_EXPECTED = new RouteInfo(new IpPrefix("2001:db8:cafe::/64"),
79 final List<RouteInfo> routes = new ArrayList<>(); in testSelectBestRoute()
81 RouteInfo route = NetUtils.selectBestRoute(null, V4_DEST); in testSelectBestRoute()
91 routes.add(new RouteInfo(new IpPrefix("75.208.0.0/16"), V4_GATEWAY, "wlan0")); in testSelectBestRoute()
92 routes.add(new RouteInfo(new IpPrefix("75.208.7.0/24"), V4_GATEWAY, "wlan0")); in testSelectBestRoute()
96 routes.add(new RouteInfo(new IpPrefix("2001:db8::/32"), V6_GATEWAY, "wlan0")); in testSelectBestRoute()
97 routes.add(new RouteInfo(new IpPrefix("2001:db8:beef::/64"), V6_GATEWAY, "wlan0")); in testSelectBestRoute()
120 final List<RouteInfo> routes = new ArrayList<>(); in testSelectBestRouteWithExcludedRoutes()
[all …]
DLinkPropertiesUtilsTest.java31 import android.net.RouteInfo;
64 private static final RouteInfo RT_INFO1 = new RouteInfo(PREFIX, GATEWAY1, IF_NAME);
65 private static final RouteInfo RT_INFO2 = new RouteInfo(PREFIX, GATEWAY2, IF_NAME);
156 final RouteInfo testRoute = new RouteInfo(toInetAddress("75.208.7.1")); in testLinkPropertiesIdenticalEqual()
/packages/modules/Connectivity/framework/src/android/net/
DRouteInfo.java59 public final class RouteInfo implements Parcelable { class
146 public RouteInfo(@Nullable IpPrefix destination, @Nullable InetAddress gateway, in RouteInfo() method in RouteInfo
171 public RouteInfo(@Nullable IpPrefix destination, @Nullable InetAddress gateway, in RouteInfo() method in RouteInfo
248 public RouteInfo(@Nullable IpPrefix destination, @Nullable InetAddress gateway, in RouteInfo() method in RouteInfo
257 public RouteInfo(@Nullable LinkAddress destination, @Nullable InetAddress gateway, in RouteInfo() method in RouteInfo
279 public RouteInfo(@Nullable IpPrefix destination, @Nullable InetAddress gateway) { in RouteInfo() method in RouteInfo
289 public RouteInfo(@Nullable LinkAddress destination, @Nullable InetAddress gateway) { in RouteInfo() method in RouteInfo
301 public RouteInfo(@NonNull InetAddress gateway) { in RouteInfo() method in RouteInfo
313 public RouteInfo(@NonNull IpPrefix destination) { in RouteInfo() method in RouteInfo
320 public RouteInfo(@NonNull LinkAddress destination) { in RouteInfo() method in RouteInfo
[all …]
DLinkProperties.java71 private ArrayList<RouteInfo> mRoutes = new ArrayList<>();
218 ArrayList<RouteInfo> newRoutes = new ArrayList<>(mRoutes.size()); in setInterfaceName()
219 for (RouteInfo route : mRoutes) { in setInterfaceName()
675 private RouteInfo routeWithInterface(RouteInfo route) { in routeWithInterface()
676 return new RouteInfo( in routeWithInterface()
684 private int findRouteIndexByRouteKey(RouteInfo route) { in findRouteIndexByRouteKey()
704 public boolean addRoute(@NonNull RouteInfo route) { in addRoute()
739 public boolean removeRoute(@NonNull RouteInfo route) { in removeRoute()
750 public @NonNull List<RouteInfo> getRoutes() { in getRoutes()
767 private @NonNull List<RouteInfo> getUnicastRoutes() { in getUnicastRoutes()
[all …]
DIRoutingCoordinator.aidl19 import android.net.RouteInfo;
31 void addRoute(int netId, in RouteInfo route); in addRoute()
41 void removeRoute(int netId, in RouteInfo route); in removeRoute()
51 void updateRoute(int netId, in RouteInfo route); in updateRoute()
DStaticIpConfiguration.java212 public @NonNull List<RouteInfo> getRoutes(@Nullable String iface) { in getRoutes()
213 List<RouteInfo> routes = new ArrayList<RouteInfo>(3); in getRoutes()
215 RouteInfo connectedRoute = new RouteInfo(ipAddress, null, iface); in getRoutes()
221 routes.add(RouteInfo.makeHostRoute(gateway, iface)); in getRoutes()
225 routes.add(new RouteInfo((IpPrefix) null, gateway, iface)); in getRoutes()
243 for (RouteInfo route : getRoutes(iface)) { in toLinkProperties()
DRoutingCoordinatorManager.java52 public void addRoute(final int netId, final RouteInfo route) { in addRoute()
68 public void removeRoute(final int netId, final RouteInfo route) { in removeRoute()
84 public void updateRoute(final int netId, final RouteInfo route) { in updateRoute()
/packages/modules/Connectivity/staticlibs/client-libs/netd/com/android/net/module/util/
DNetdUtils.java21 import static android.net.RouteInfo.RTN_THROW;
22 import static android.net.RouteInfo.RTN_UNICAST;
23 import static android.net.RouteInfo.RTN_UNREACHABLE;
30 import android.net.RouteInfo;
165 new RouteInfo(dest, null, iface, RTN_UNICAST)); in tetherInterface()
167 new RouteInfo(new IpPrefix("fe80::/64"), null, iface, RTN_UNICAST)); in tetherInterface()
208 final List<RouteInfo> routes) { in addRoutesToLocalNetwork()
210 for (RouteInfo route : routes) { in addRoutesToLocalNetwork()
218 new RouteInfo(new IpPrefix("fe80::/64"), null, iface, RTN_UNICAST)); in addRoutesToLocalNetwork()
222 public static int removeRoutesFromLocalNetwork(final INetd netd, final List<RouteInfo> routes) { in removeRoutesFromLocalNetwork()
[all …]
/packages/modules/NetworkStack/tests/unit/src/android/net/ip/
DIpReachabilityMonitorTest.kt29 import android.net.RouteInfo in <lambda>()
135 addRoute(RouteInfo(TEST_IPV4_LINKADDR, null /* gateway */, TEST_IFACE.name)) in <lambda>()
136 addRoute(RouteInfo(TEST_IPV6_LINKADDR, null /* gateway */, TEST_IFACE.name)) in <lambda>()
139 addRoute(RouteInfo(IpPrefix(parseNumericAddress("0.0.0.0"), 0), TEST_IPV4_GATEWAY)) in <lambda>()
140 addRoute(RouteInfo(IpPrefix(parseNumericAddress("::"), 0), TEST_IPV6_GATEWAY)) in <lambda>()
152 addRoute(RouteInfo(TEST_IPV4_LINKADDR, null /* gateway */, TEST_IFACE.name)) in <lambda>()
155 addRoute(RouteInfo(IpPrefix(parseNumericAddress("0.0.0.0"), 0), TEST_IPV4_GATEWAY_DNS)) in <lambda>()
167 addRoute(RouteInfo(TEST_IPV6_LINKADDR, null /* gateway */, TEST_IFACE.name)) in <lambda>()
168 addRoute(RouteInfo(TEST_IPV6_LINKLOCAL_LINKADDR, null /* gateway */, TEST_IFACE.name)) in <lambda>()
171 addRoute(RouteInfo(IpPrefix(parseNumericAddress("::"), 0), TEST_IPV6_LINKLOCAL_SCOPED_GATEWAY)) in <lambda>()
[all …]
DIpClientTest.java69 import android.net.RouteInfo;
268 private static RtNetlinkRouteMessage buildRtmRouteMessage(short type, final RouteInfo route, in buildRtmRouteMessage()
305 private void onRouteUpdated(final RouteInfo route) { in onRouteUpdated()
310 private void onRouteRemoved(final RouteInfo route) { in onRouteRemoved()
373 final Set<RouteInfo> routes = routes(TEST_PREFIXES); in makeIPv6ProvisionedLinkProperties()
412 final RouteInfo defaultRoute = new RouteInfo(new IpPrefix(Inet4Address.ANY, 0), in addIPv4Provisioning()
427 final RouteInfo defaultRoute = defaultIPV6Route(TEST_IPV6_GATEWAY); in doIPv6ProvisioningLoss()
616 static IsProvisionedTestCase provisionedCase(Set<LinkAddress> lpAddrs, Set<RouteInfo> lpRoutes, in provisionedCase()
622 Set<RouteInfo> lpRoutes, Set<InetAddress> lpDns, InitialConfiguration config) { in notProvisionedCase()
627 Set<RouteInfo> lpRoutes, Set<InetAddress> lpDns, InitialConfiguration config) { in provisioningTest()
[all …]
/packages/apps/Settings/src/com/android/settings/wfd/
DWifiDisplayPreferenceController.java21 import android.media.MediaRouter.RouteInfo;
40 public void onRouteSelected(MediaRouter router, int type, RouteInfo info) {
45 public void onRouteUnselected(MediaRouter router, int type, RouteInfo info) {
50 public void onRouteAdded(MediaRouter router, RouteInfo info) {
55 public void onRouteRemoved(MediaRouter router, RouteInfo info) {
60 public void onRouteChanged(MediaRouter router, RouteInfo info) {
88 final MediaRouter.RouteInfo route = mRouter.getRouteAt(i); in getSummary()
DWifiDisplaySettings.java31 import android.media.MediaRouter.RouteInfo;
276 MediaRouter.RouteInfo route = mRouter.getRouteAt(i); in update()
306 private RoutePreference createRoutePreference(MediaRouter.RouteInfo route) { in createRoutePreference()
567 private void toggleRoute(MediaRouter.RouteInfo route) { in toggleRoute()
642 public void onRouteAdded(MediaRouter router, RouteInfo info) {
647 public void onRouteChanged(MediaRouter router, RouteInfo info) {
652 public void onRouteRemoved(MediaRouter router, RouteInfo info) {
657 public void onRouteSelected(MediaRouter router, int type, RouteInfo info) {
662 public void onRouteUnselected(MediaRouter router, int type, RouteInfo info) {
669 private final MediaRouter.RouteInfo mRoute;
[all …]
/packages/modules/Wifi/service/java/com/android/server/wifi/util/
DNetdWrapper.java27 import android.net.RouteInfo;
183 private void modifyRoute(boolean add, int netId, RouteInfo route) { in modifyRoute()
189 case RouteInfo.RTN_UNICAST: in modifyRoute()
196 case RouteInfo.RTN_UNREACHABLE: in modifyRoute()
199 case RouteInfo.RTN_THROW: in modifyRoute()
220 public void addInterfaceToLocalNetwork(String iface, List<RouteInfo> routes) { in addInterfaceToLocalNetwork()
223 for (RouteInfo route : routes) { in addInterfaceToLocalNetwork()
231 new RouteInfo(new IpPrefix("fe80::/64"), null, iface, RouteInfo.RTN_UNICAST)); in addInterfaceToLocalNetwork()
447 List<RouteInfo> routes = new ArrayList<>(); in tetherInterface()
451 RouteInfo route = new RouteInfo( in tetherInterface()
[all …]
DIpConfigStore.java27 import android.net.RouteInfo;
146 RouteInfo route = new RouteInfo( in readIpConfigurations()
149 gateway, null, RouteInfo.RTN_UNICAST); in readIpConfigurations()
/packages/modules/Connectivity/staticlibs/framework/com/android/net/module/util/
DNetUtils.java21 import android.net.RouteInfo;
55 public static RouteInfo selectBestRoute(@Nullable Collection<RouteInfo> routes, in selectBestRoute()
59 RouteInfo bestRoute = null; in selectBestRoute()
62 for (RouteInfo route : routes) { in selectBestRoute()
73 if (bestRoute != null && bestRoute.getType() == RouteInfo.RTN_UNICAST) { in selectBestRoute()
/packages/modules/Connectivity/thread/service/java/com/android/server/thread/
DTunInterfaceController.java36 import android.net.RouteInfo;
80 private final List<RouteInfo> mNetDataPrefixes = new ArrayList<>();
138 for (RouteInfo route : mLinkProperties.getAllRoutes()) { in setInterfaceUp()
250 final List<RouteInfo> newNetDataPrefixes = new ArrayList<>(); in updatePrefixes()
256 final CompareResult<RouteInfo> prefixDiff = in updatePrefixes()
258 for (RouteInfo routeRemoved : prefixDiff.removed) { in updatePrefixes()
261 for (RouteInfo routeAdded : prefixDiff.added) { in updatePrefixes()
269 private RouteInfo getRouteForAddress(LinkAddress linkAddress) { in getRouteForAddress()
274 private RouteInfo getRouteForOnMeshPrefix(OnMeshPrefixConfig onMeshPrefixConfig) { in getRouteForOnMeshPrefix()
281 private RouteInfo getRouteForIpPrefix(IpPrefix ipPrefix) { in getRouteForIpPrefix()
[all …]
/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/
DStaticIpConfigurationTest.java30 import android.net.RouteInfo;
166 final RouteInfo connectedRoute = new RouteInfo(new IpPrefix(ADDRSTR), null, IFACE); in testToLinkProperties()
173 RouteInfo defaultRoute = new RouteInfo(new IpPrefix("0.0.0.0/0"), GATEWAY, IFACE); in testToLinkProperties()
179 defaultRoute = new RouteInfo(new IpPrefix("0.0.0.0/0"), OFFLINKGATEWAY, IFACE); in testToLinkProperties()
182 RouteInfo gatewayRoute = new RouteInfo(new IpPrefix("192.0.2.129/32"), null, IFACE); in testToLinkProperties()
302 final List<RouteInfo> routeInfoList = s.getRoutes(IFACE); in testGetRoutes()
305 assertEquals(new RouteInfo(ADDR, (InetAddress) null, IFACE), routeInfoList.get(0)); in testGetRoutes()
306 assertEquals(new RouteInfo((IpPrefix) null, GATEWAY, IFACE), routeInfoList.get(1)); in testGetRoutes()
/packages/modules/Connectivity/Tethering/tests/unit/src/com/android/networkstack/tethering/
DOffloadControllerTest.java26 import static android.net.RouteInfo.RTN_UNICAST;
68 import android.net.RouteInfo;
303 lp.addRoute(new RouteInfo(new IpPrefix("192.0.2.0/24"), null, null, RTN_UNICAST)); in testSetUpstreamLinkPropertiesWorking()
319 lp.addRoute(new RouteInfo(null, InetAddress.getByName(ipv4Gateway), null, RTN_UNICAST)); in testSetUpstreamLinkPropertiesWorking()
330 lp.addRoute(new RouteInfo(null, InetAddress.getByName(ipv6Gw1), null, RTN_UNICAST)); in testSetUpstreamLinkPropertiesWorking()
344 lp.addRoute(new RouteInfo(null, InetAddress.getByName(ipv6Gw2), null, RTN_UNICAST)); in testSetUpstreamLinkPropertiesWorking()
361 stacked.addRoute(new RouteInfo(null, InetAddress.getByName("192.0.2.254"), null, in testSetUpstreamLinkPropertiesWorking()
363 stacked.addRoute(new RouteInfo(null, InetAddress.getByName("fe80::bad:f00"), null, in testSetUpstreamLinkPropertiesWorking()
384 lp.addRoute(new RouteInfo(new IpPrefix("2001:db8::/64"), null, null, RTN_UNICAST)); in testSetUpstreamLinkPropertiesWorking()
710 new RouteInfo(new IpPrefix(USB_PREFIX), null, null, RTN_UNICAST)); in testAddRemoveDownstreams()
[all …]
DIPv6TetheringCoordinatorTest.java20 import static android.net.RouteInfo.RTN_UNICAST;
42 import android.net.RouteInfo;
91 linkProp.addRoute(new RouteInfo(new IpPrefix("::/0"), null, TEST_INTERFACE, RTN_UNICAST)); in createDualStackUpstream()
92 linkProp.addRoute(new RouteInfo(new IpPrefix("0.0.0.0/0"), null, TEST_INTERFACE, in createDualStackUpstream()
/packages/modules/Connectivity/service/src/com/android/server/connectivity/
DRoutingCoordinatorService.java24 import android.net.RouteInfo;
61 public void addRoute(final int netId, final RouteInfo route) in addRoute()
75 public void removeRoute(final int netId, final RouteInfo route) in removeRoute()
89 public void updateRoute(final int netId, final RouteInfo route) in updateRoute()
/packages/modules/NetworkStack/common/networkstackclient/src/android/net/shared/
DInitialConfiguration.java27 import android.net.RouteInfo;
123 public boolean isProvisionedBy(List<LinkAddress> addresses, List<RouteInfo> routes) { in isProvisionedBy()
180 private static boolean isDirectlyConnectedRoute(RouteInfo route, IpPrefix prefix) { in isDirectlyConnectedRoute()
182 && route.getType() == RouteInfo.RTN_UNICAST in isDirectlyConnectedRoute()
/packages/modules/Connectivity/Tethering/src/com/android/networkstack/tethering/
DIPv6TetheringCoordinator.java24 import android.net.RouteInfo;
244 for (RouteInfo routeInfo : lp.getRoutes()) { in getIPv6OnlyLinkProperties()
279 lp.addRoute(new RouteInfo(local48, null, null, RouteInfo.RTN_UNICAST)); in getUniqueLocalConfig()
/packages/apps/Car/Settings/src/com/android/car/settings/wifi/details/
DWifiGatewayPreferenceController.java21 import android.net.RouteInfo;
48 for (RouteInfo routeInfo : linkProperties.getRoutes()) { in updateState()

123