예제 #1
0
 private void addPersistentStaticRoute(
     IPAddress destination, IPAddress gateway, IPAddress netmask, String iface) throws Exception {
   addStaticRoute(destination, gateway, netmask, iface, 0);
   RouteFile routeFile = new RouteFile(iface);
   if (routeFile.addRoute(destination, gateway, netmask, iface)) {
     s_logger.info("Route persistence added");
   } else {
     s_logger.error("Error adding route persistence");
   }
 }
예제 #2
0
 private void removePersistentStaticRoute(
     IPAddress destination, IPAddress gateway, IPAddress netmask, String iface) throws Exception {
   removeStaticRoute(destination, gateway, netmask, iface);
   RouteFile routeFile = new RouteFile(iface);
   if (routeFile.removeRoute(destination, gateway, netmask, iface)) {
     s_logger.info("Route persistence removed");
   } else {
     s_logger.error("Error removing route persistence");
   }
 }