|
||||||||||
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 String |
SERVICE_NAME
service name of this interface for the bundle activator |
Method Summary | |
---|---|
void |
addStaticRoute(IPAddress destination,
IPAddress gateway,
IPAddress netmask,
String iface,
int metric)
Adds a static route to the system's route table. |
String |
getDefaultInterface(IPAddress destination)
Returns the default route's interface for the specified destination address, or null if no route exists. |
RouteConfig |
getDefaultRoute(String interfaceName)
Returns the default route for a specified interface. |
RouteConfig[] |
getRoutes()
Returns the routes contained in the system's route table. |
void |
removeStaticRoute(IPAddress destination,
IPAddress gateway,
IPAddress netmask,
String iface)
Removes a static route in the system's route table. |
Field Detail |
---|
static final String SERVICE_NAME
Method Detail |
---|
RouteConfig getDefaultRoute(String interfaceName)
interfaceName
- A String object specifying the interface name.
String getDefaultInterface(IPAddress destination)
destination
- An IPAddress object representing the destination IP address.
void addStaticRoute(IPAddress destination, IPAddress gateway, IPAddress netmask, String iface, int metric) throws Exception
destination
- An IPAddress object representing the destination IP address.gateway
- An IPAddress object representing the gateway IP address.netmask
- An IPAddress object representing the netmask.iface
- A String object specifying the interface name.metric
- An int representing the metric (priority) of the route.
Exception
- for invalid supplied parameters, or failure to add.void removeStaticRoute(IPAddress destination, IPAddress gateway, IPAddress netmask, String iface) throws 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.
Exception
- for invalid supplied parameters, or failure to remove.RouteConfig[] getRoutes()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |