Update of /cvsroot/javanetsim/javaNetSim/core
In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv12084/core
Modified Files:
CommandProcessor.java
Log Message:
some fixes
Index: CommandProcessor.java
===================================================================
RCS file: /cvsroot/javanetsim/javaNetSim/core/CommandProcessor.java,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** CommandProcessor.java 29 Oct 2008 19:36:20 -0000 1.39
--- CommandProcessor.java 2 Nov 2008 00:10:29 -0000 1.40
***************
*** 520,524 ****
modes = new Modes(CommandInterface.CONF_MODE, CommandInterface.NETWORK_LAYER, CommandInterface.CALL_ONLY);
call_params = "(open|shared)";
- no_call_params = "<cr>";
}
public String call(Vector<String> params){
--- 520,523 ----
***************
*** 3458,3462 ****
public show_access_lists_CommandClass(){
modes = new Modes(CommandInterface.STD_CONF_MODE, CommandInterface.NETWORK_LAYER, CommandInterface.CALL_ONLY);
! call_params = "<1-2699 | WORD>";
}
public String call(Vector<String> params){
--- 3457,3461 ----
public show_access_lists_CommandClass(){
modes = new Modes(CommandInterface.STD_CONF_MODE, CommandInterface.NETWORK_LAYER, CommandInterface.CALL_ONLY);
! call_params = "<1-2699>";
}
public String call(Vector<String> params){
***************
*** 3685,3702 ****
String out = "";
if(device instanceof ApplicationLayerDevice){
! DHCPD dhcpd = (DHCPD)((ApplicationLayerDevice)device).getApp(core.ApplicationLayerDevice.DHCP_SERVER_ID);
! if(dhcpd!=null){
if(params.size()==0){
! out += "DHCP server is "+(dhcpd.running?"running\n":"stopped\n");
! Enumeration<String> pools = dhcpd.pools.keys();
! while(pools.hasMoreElements()){
! String name = pools.nextElement();
! DHCPD.pool pool = dhcpd.pools.get(name);
! out += " Pool '"+name+"'\n" +
! " Network: "+((pool.IP==null || pool.IP=="")?"(not set)":pool.IP)+"\n" +
! " Mask: "+((pool.Genmask==null || pool.Genmask=="")?"(not set)":pool.Genmask)+"\n" +
! " Gateway: "+((pool.Gateway==null || pool.Gateway=="")?"(not set)":pool.Gateway)+"\n" +
! " MAC: "+((pool.MAC==null || pool.MAC=="")?"(not set)":pool.MAC)+"\n";
! }
}
else{
--- 3684,3694 ----
String out = "";
if(device instanceof ApplicationLayerDevice){
! DHCPC dhcpc = (DHCPC)((ApplicationLayerDevice)device).getApp(core.ApplicationLayerDevice.DHCP_CLIENT_ID);
! if(dhcpc!=null){
if(params.size()==0){
! if(dhcpc.running)
! out += "Server "+dhcpc.getDHCPServer()+" on interface "+dhcpc.getInterface()+" is using\n";
! else
! out += "No servers found\n";
}
else{
|