Update of /cvsroot/javanetsim/javaNetSim/guiUI
In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv24648/guiUI
Modified Files:
Terminal.java
Log Message:
command 'end' was added
'sh int' was corrected
Index: Terminal.java
===================================================================
RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/Terminal.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** Terminal.java 5 Oct 2008 16:53:12 -0000 1.14
--- Terminal.java 5 Oct 2008 18:08:55 -0000 1.15
***************
*** 99,103 ****
cmdproc.add("interface", interface_Command, "");
cmdproc.add("interface *", interface_Command, "");
! cmdproc.add("interface * exit", exit_Command, "");
cmdproc.add("logout", logout_Command, "Exit from the console");
cmdproc.add("ping", ping_Command, "Send echo messages");
--- 99,104 ----
cmdproc.add("interface", interface_Command, "");
cmdproc.add("interface *", interface_Command, "");
! cmdproc.add("interface * end", end_Command, "Exit from configuration mode");
! cmdproc.add("interface * exit", exit_Command, "Exit from current mode");
cmdproc.add("logout", logout_Command, "Exit from the console");
cmdproc.add("ping", ping_Command, "Send echo messages");
***************
*** 381,400 ****
class end_CommandClass extends CommandInterface{
public end_CommandClass (){
! modes = new Modes(CommandInterface.STD_CONF_MODE, CommandInterface.NETWORK_LAYER, CommandInterface.CALL_ONLY);
call_params = "<cr>";
}
public String call(Vector<String> params){
if(current_mode.conf_mode == CommandInterface.CONF_MODE){
! if(interface_mode!=DEF_MODE){
! interface_mode = DEF_MODE;
! command_prefix = "";
! }
! else{
! current_mode.conf_mode = CommandInterface.STD_MODE;
! device.getConfig().working_config = DeviceConfig.RUNNING_CONFIG;
! }
! }
! else if(current_mode.conf_mode == CommandInterface.STD_MODE){
! exitWindow();
}
return "";
--- 382,394 ----
class end_CommandClass extends CommandInterface{
public end_CommandClass (){
! modes = new Modes(CommandInterface.CONF_MODE, CommandInterface.NETWORK_LAYER, CommandInterface.CALL_ONLY);
call_params = "<cr>";
}
public String call(Vector<String> params){
if(current_mode.conf_mode == CommandInterface.CONF_MODE){
! interface_mode = DEF_MODE;
! command_prefix = "";
! current_mode.conf_mode = CommandInterface.STD_MODE;
! device.getConfig().working_config = DeviceConfig.RUNNING_CONFIG;
}
return "";
|