|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IRouteService
The IRouteService is used to add, remove, and obtain information on entries in the system's route table CONFIGURATION Configuration will be accepted in the form of key/value pairs. The key/value pairs are strictly defined here: CONFIG_ENTRY -> KEY + "=" + VALUE KEY -> PARAM + "_" + INDEX INDEX -> "1" | "2" | ... | "N" PARAM -> "destination" | "netmask" | "iface" | "gateway" VALUE -> (value of the specified parameter) EXAMPLE: destination_1=192.168.2.0 gateway_1=192.168.1.56 netmask_1=255.255.255.0 iface_1=eth0 destination_2=10.11.0.0 gateway_2=10.11.10.1 netmask_2=255.255.0.0 iface_2=eth1
| Field Summary | |
|---|---|
static java.lang.String |
SERVICE_NAME
service name of this interface for the bundle activator |
| Method Summary | |
|---|---|
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. |
| Field Detail |
|---|
static final java.lang.String SERVICE_NAME
| Method Detail |
|---|
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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||