Update of /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv13119/core/protocolsuite/tcp_ip
Modified Files:
IpV4.java ProtocolStack.java
Log Message:
Index: ProtocolStack.java
===================================================================
RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/ProtocolStack.java,v
retrieving revision 1.51
retrieving revision 1.52
diff -C2 -d -r1.51 -r1.52
*** ProtocolStack.java 26 Oct 2006 15:04:38 -0000 1.51
--- ProtocolStack.java 26 Oct 2006 17:06:11 -0000 1.52
***************
*** 1114,1121 ****
--- 1114,1124 ----
public void addToARPStatic(String IPAddress, String MACAddress)
+
{
+
//if(mIPprotocol.isLocalNetwork(IPAddress)){
mARPprotocol.addToArpTable(IPAddress, MACAddress,"Static");
//}
+
}
Index: IpV4.java
===================================================================
RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/IpV4.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** IpV4.java 26 Oct 2006 13:36:54 -0000 1.8
--- IpV4.java 26 Oct 2006 17:06:11 -0000 1.9
***************
*** 175,179 ****
FLAG[1] = "GW";
}catch(InvalidIPAddressException e){
! System.out.println("Unrecoverable exception in IPV4.getIntergace: " + e.toString());
e.printStackTrace();
}
--- 175,179 ----
FLAG[1] = "GW";
}catch(InvalidIPAddressException e){
! System.out.println("Unrecoverable exception in IPV4.getInterface: " + e.toString());
e.printStackTrace();
}
***************
*** 297,300 ****
--- 297,303 ----
*/
public void setDefaultGateway(String inGatewayIPAddress)throws InvalidDefaultGatewayException {
+ if(inGatewayIPAddress == null){
+ removeRoute("default");
+ }else{
try {
defaultGateway = IPV4Address.toBinaryString(inGatewayIPAddress);
***************
*** 308,312 ****
} catch (InvalidIPAddressException e) {
throw new InvalidDefaultGatewayException("Invaild Default Gateway Address.");
! }
}
--- 311,316 ----
} catch (InvalidIPAddressException e) {
throw new InvalidDefaultGatewayException("Invaild Default Gateway Address.");
! }
! }
}
|