Makefile added / pkg-config descriptor
[metux-java.git] / ip / IP_Route.java
blobc646ade65ea1a7ba5cfc6fce41967ed0bd6b16b5
2 package org.de.metux.ip;
4 import org.de.metux.util.Exec;
5 import java.net.UnknownHostException;
7 public class IP_Route
9 /* add an route for some prefix (ie. 10.6.4.0/24) via some gateway */
10 /* FIXME: do some escaping to prevent shell string attacks */
11 public static void addRoutePrefixGW(String target, String gw)
12 throws UnknownHostException
14 Exec.exec_command(
15 "ip route add \""+
16 target+
17 "\" via \""+
18 Lookup.getIP_str(gw)+
19 "\""