public interface IRouteService
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
SERVICE_NAME
service name of this interface for the bundle activator
|
| Modifier and Type | Method and Description |
|---|---|
void |
addStaticRoute(java.net.InetAddress destination,
java.net.InetAddress gateway,
java.net.InetAddress netmask,
java.lang.String iface,
int metric)
Adds a static route to the system's route table.
|
java.lang.String |
getDefaultInterface(java.net.InetAddress destination)
Returns the default route's interface for the specified destination address, or null if no route exists.
|
Route |
getDefaultRoute(java.lang.String iface)
Returns the default route for a specified interface.
|
Route[] |
getRoutes()
Returns the routes contained in the system's route table.
|
void |
removeStaticRoute(java.net.InetAddress destination,
java.net.InetAddress gateway,
java.net.InetAddress netmask,
java.lang.String iface)
Removes a static route in the system's route table.
|
static final java.lang.String SERVICE_NAME
Route getDefaultRoute(java.lang.String iface)
iface - A String object specifying the interface name.java.lang.String getDefaultInterface(java.net.InetAddress destination)
destination - An InetAddress object representing the destination IP address.void addStaticRoute(java.net.InetAddress destination,
java.net.InetAddress gateway,
java.net.InetAddress netmask,
java.lang.String iface,
int metric)
throws java.lang.Exception
destination - An InetAddress object representing the destination IP address.gateway - An InetAddress object representing the gateway IP address.netmask - An InetAddress object representing the netmask.iface - A String object specifying the interface name.metric - An int representing the metric (priority) of the route.java.lang.Exception - for invalid supplied parameters, or failure to add.void removeStaticRoute(java.net.InetAddress destination,
java.net.InetAddress gateway,
java.net.InetAddress netmask,
java.lang.String iface)
throws java.lang.Exception
destination - An InetAddress object representing the destination IP address.gateway - An InetAddress object representing the gateway IP address.netmask - An InetAddress object representing the netmask.iface - A String object specifying the interface name.java.lang.Exception - for invalid supplied parameters, or failure to remove.Route[] getRoutes()
Copyright © 2009 Eurotech Inc. All rights reserved.