Lines Matching refs:destination

38  * <li>a destination {@link IpPrefix} specifying the network destinations covered by this route.
45 * Either the destination or the gateway may be {@code null}, but not both. If the
46 * destination and gateway are both specified, they must be of the same address family
51 * The IP destination address for this route.
88 * If destination is null, then gateway must be specified and the
94 * destination and gateway may not both be null.
96 * @param destination the destination prefix
102 public RouteInfo(IpPrefix destination, InetAddress gateway, String iface, int type) {
122 if (destination == null) {
125 destination = new IpPrefix(Inet4Address.ANY, 0);
127 destination = new IpPrefix(Inet6Address.ANY, 0);
130 // no destination, no gateway. invalid.
132 destination);
139 if (destination.getAddress() instanceof Inet4Address) {
147 if ((destination.getAddress() instanceof Inet4Address &&
149 (destination.getAddress() instanceof Inet6Address &&
153 mDestination = destination; // IpPrefix objects are immutable.
163 public RouteInfo(IpPrefix destination, InetAddress gateway, String iface) {
164 this(destination, gateway, iface, RTN_UNICAST);
170 public RouteInfo(LinkAddress destination, InetAddress gateway, String iface) {
171 this(destination == null ? null :
172 new IpPrefix(destination.getAddress(), destination.getPrefixLength()),
179 * If destination is null, then gateway must be specified and the
186 * @param destination the destination address and prefix in an {@link IpPrefix}
191 public RouteInfo(IpPrefix destination, InetAddress gateway) {
192 this(destination, gateway, null);
200 public RouteInfo(LinkAddress destination, InetAddress gateway) {
201 this(destination, gateway, null);
218 * @param destination the {@link IpPrefix} describing the address and prefix
223 public RouteInfo(IpPrefix destination) {
224 this(destination, null, null);
230 public RouteInfo(LinkAddress destination) {
231 this(destination, null, null);
237 public RouteInfo(IpPrefix destination, int type) {
238 this(destination, null, null, type);
269 * Retrieves the destination address and prefix length in the form of an {@link IpPrefix}.
271 * @return {@link IpPrefix} specifying the destination. This is never {@code null}.
316 * Indicates if this route is a default route (ie, has no destination specified).
318 * @return {@code true} if the destination has a prefix length of 0.
343 * @return {@code true} if the destination has a prefix length of 32 or 128 for IPv4 or IPv6,
363 * Determines whether the destination and prefix of this route includes the specified
366 * @param destination A {@link InetAddress} to test to see if it would match this route.
367 * @return {@code true} if the destination and prefix length cover the given address.
369 public boolean matches(InetAddress destination) {
370 return mDestination.contains(destination);