[Javanetsim-cvs] javaNetSim/core DataLinkLayerDevice.java,1.1,1.2 EthernetLink.java,1.2,1.3 Ethernet
Status: Beta
Brought to you by:
darkkey
Update of /cvsroot/javanetsim/javaNetSim/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30938/core Modified Files: DataLinkLayerDevice.java EthernetLink.java EthernetNetworkInterface.java Ethernet_packet.java FiberLink.java Hub.java InvalidDataLinkLayerDeviceException.java InvalidDefaultGatewayException.java InvalidLinkConnectionException.java InvalidLinkNameException.java InvalidNetworkInterfaceNameException.java InvalidNetworkLayerDeviceException.java InvalidNodeNameException.java InvalidProtocolStackException.java LayerInfo.java LayerInfoHandler.java LowLinkException.java NetworkLayerDevice.java Packet.java ProtocolStack.java README.txt Router.java SendThread.java Simulation.java SimulationException.java Switch.java Version.java Log Message: Index: EthernetLink.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/EthernetLink.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** EthernetLink.java 19 Nov 2005 17:54:33 -0000 1.2 --- EthernetLink.java 20 Nov 2005 20:30:53 -0000 1.3 *************** *** 1,86 **** ! /* ! Java Firewall Simulator (jFirewallSim) ! ! Copyright (c) 2004, jFirewallSim development team All rights reserved. ! ! Redistribution and use in source and binary forms, with or without modification, are ! permitted provided that the following conditions are met: ! ! - Redistributions of source code must retain the above copyright notice, this list ! of conditions and the following disclaimer. ! - Redistributions in binary form must reproduce the above copyright notice, this list ! of conditions and the following disclaimer in the documentation and/or other ! materials provided with the distribution. ! - Neither the name of the Canberra Institute of Technology nor the names of its ! contributors may be used to endorse or promote products derived from this software ! without specific prior written permission. ! ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ! OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ! THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ! EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ! HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR ! TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, ! EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! */ ! ! ! package core; ! import java.util.*; ! /** ! * EthernetLink extends Link. It sets two Interface links to a pc. ! * @author luke_hamilton ! * @author bevan_calliess ! * @since Sep 17, 2004 ! * @version v0.20 ! */ ! ! ! public class EthernetLink extends Link { ! ! /** ! * Constructor to be used by the Simulation when connecting 2 PC's ! * We have made a design decision to restrict a Ethernet link to only has 2 ends. ! * @author bevan_calliess ! * @author luke_hamilton ! * @param String Name - Node name eg: PC1 ! * @param inInterface1 The first Interface to connect this link to eg: eth0 ! * @param inInterface2 The Seceond Interface to connect this link to eg: eth1 ! * @throws InvalidLinkConnectionException ! */ ! ! public EthernetLink(String inName, NetworkInterface inFirstNodeInterface, NetworkInterface inSecondNodeInterface)throws InvalidLinkConnectionException { ! super(inName); ! NetworkInterfaces.add(inFirstNodeInterface); ! NetworkInterfaces.add(inSecondNodeInterface); ! inFirstNodeInterface.setConnectedLink(this); ! inSecondNodeInterface.setConnectedLink(this); ! } ! ! /** ! * This method checks to see if the sourceName is within the hashtable ! * that is stored within the NetworkInterface Layer. If it is send inPacket ! * off to NetworkInterface. ! * @author bevan_calliess ! * @author luke_hamilton ! * @param inPacket - Ethernet Packet ! * @param inSourceName - Source name of node ! * @version v0.20 ! */ ! public void transportPacket(Ethernet_packet inPacket,String inSourceName) throws LowLinkException ! { ! Iterator it = NetworkInterfaces.iterator(); ! while (it.hasNext()) ! { ! NetworkInterface temp = (NetworkInterface) it.next(); ! if (!temp.getSourceName().equals(inSourceName)) ! { ! if( (sievingCoefficient/100)>Math.random()) ! temp.receivePacket(inPacket); ! else throw new LowLinkException("Packet lost due to physical link problems!"); ! } ! } ! } ! } --- 1,86 ---- ! /* ! Java Firewall Simulator (jFirewallSim) ! ! Copyright (c) 2004, jFirewallSim development team All rights reserved. ! ! Redistribution and use in source and binary forms, with or without modification, are ! permitted provided that the following conditions are met: ! ! - Redistributions of source code must retain the above copyright notice, this list ! of conditions and the following disclaimer. ! - Redistributions in binary form must reproduce the above copyright notice, this list ! of conditions and the following disclaimer in the documentation and/or other ! materials provided with the distribution. ! - Neither the name of the Canberra Institute of Technology nor the names of its ! contributors may be used to endorse or promote products derived from this software ! without specific prior written permission. ! ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ! OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ! THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ! EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ! HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR ! TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, ! EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! */ ! ! ! package core; ! import java.util.*; ! /** ! * EthernetLink extends Link. It sets two Interface links to a pc. ! * @author luke_hamilton ! * @author bevan_calliess ! * @since Sep 17, 2004 ! * @version v0.20 ! */ ! ! ! public class EthernetLink extends Link { ! ! /** ! * Constructor to be used by the Simulation when connecting 2 PC's ! * We have made a design decision to restrict a Ethernet link to only has 2 ends. ! * @author bevan_calliess ! * @author luke_hamilton ! * @param String Name - Node name eg: PC1 ! * @param inInterface1 The first Interface to connect this link to eg: eth0 ! * @param inInterface2 The Seceond Interface to connect this link to eg: eth1 ! * @throws InvalidLinkConnectionException ! */ ! ! public EthernetLink(String inName, NetworkInterface inFirstNodeInterface, NetworkInterface inSecondNodeInterface)throws InvalidLinkConnectionException { ! super(inName); ! NetworkInterfaces.add(inFirstNodeInterface); ! NetworkInterfaces.add(inSecondNodeInterface); ! inFirstNodeInterface.setConnectedLink(this); ! inSecondNodeInterface.setConnectedLink(this); ! } ! ! /** ! * This method checks to see if the sourceName is within the hashtable ! * that is stored within the NetworkInterface Layer. If it is send inPacket ! * off to NetworkInterface. ! * @author bevan_calliess ! * @author luke_hamilton ! * @param inPacket - Ethernet Packet ! * @param inSourceName - Source name of node ! * @version v0.20 ! */ ! public void transportPacket(Ethernet_packet inPacket,String inSourceName) throws LowLinkException ! { ! Iterator it = NetworkInterfaces.iterator(); ! while (it.hasNext()) ! { ! NetworkInterface temp = (NetworkInterface) it.next(); ! if (!temp.getSourceName().equals(inSourceName)) ! { ! if( (sievingCoefficient/100)>Math.random()) ! temp.receivePacket(inPacket); ! else throw new LowLinkException("Packet lost due to physical link problems!"); ! } ! } ! } ! } Index: Hub.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/Hub.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Hub.java 8 Nov 2005 15:35:29 -0000 1.1 --- Hub.java 20 Nov 2005 20:30:53 -0000 1.2 *************** *** 1,109 **** ! /* ! Java Network Simulator (jNetSim) ! ! Copyright (c) 2005, Ice Team; All rights reserved. ! Copyright (c) 2004, jFirewallSim development team; All rights reserved. ! ! Redistribution and use in source and binary forms, with or without modification, are ! permitted provided that the following conditions are met: ! ! - Redistributions of source code must retain the above copyright notice, this list ! of conditions and the following disclaimer. ! - Redistributions in binary form must reproduce the above copyright notice, this list ! of conditions and the following disclaimer in the documentation and/or other ! materials provided with the distribution. ! - Neither the name of the Ice Team nor the names of its ! contributors may be used to endorse or promote products derived from this software ! without specific prior written permission. ! ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ! OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ! THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ! EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ! HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR ! TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, ! EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! */ ! package core; ! import java.util.*; ! ! /** ! * This class extends of the DataLinkLayerDevice and allows the ! * creation of hubs ! * @author bevan_calliess ! * @author luke_hamilton ! * @author Key ! * @since Nov 8, 2005 ! * @version v0.22 ! **/ ! ! public class Hub extends DataLinkLayerDevice { ! ! /** ! * This creates a layer 1 hub with a default of 4 interface (ports) ! * @author luke_hamilton ! * @param inName The name of the Hub ! * @param inProtocolStackLayers ! * @version v0.20 ! */ ! ! int sz = 0; ! ! public Hub(String inName) { ! super(inName, 1); //pass name and protocolstack layer ! addNetworkInterface("eth0"); ! addNetworkInterface("eth1"); ! addNetworkInterface("eth2"); ! addNetworkInterface("eth3"); ! addNetworkInterface("eth4"); ! } ! ! ! public void Reset(){ ! sz = 0; ! } ! ! public int getState(){ ! return sz; ! } ! ! /** ! * This method will recieve a packet from any of the connected links and the copy ! * the Packet and distribute a copy to each of the other connected links. ! * @author bevan_calliess ! * @param inPacket - The packet to be transported ! * @param inLinkName - The name of the link that sent the packet eg: eth0 ! */ ! ! protected void receivePacket(Packet inPacket,String inInterfaceName) throws LowLinkException{ ! if(sz!=1){ ! Ethernet_packet tempPacket = (Ethernet_packet)inPacket; ! Enumeration it; ! ! ! try{ ! it = NetworkInterfacetable.elements(); ! ! ! while(it.hasMoreElements()){ ! //Create a copy of the packet ! Ethernet_packet copyPacket = new Ethernet_packet(tempPacket.getData(), tempPacket.getDestinationMACAddress(),tempPacket.getSourceMACAddress()); ! ! //Test to see if the current Interface is the Interface that sent in the packet ! // if it is skip that interface ! NetworkInterface tempInterface = (NetworkInterface)it.nextElement(); ! if(!tempInterface.getName().equals(inInterfaceName)){ ! tempInterface.sendPacket(copyPacket); ! } ! ! } ! }catch(Throwable th) ! { ! sz=1; ! throw new LowLinkException("Hub buffer overflow (packet loop flood?)."); ! } ! } ! } ! } --- 1,109 ---- ! /* ! Java Network Simulator (jNetSim) ! ! Copyright (c) 2005, Ice Team; All rights reserved. ! Copyright (c) 2004, jFirewallSim development team; All rights reserved. ! ! Redistribution and use in source and binary forms, with or without modification, are ! permitted provided that the following conditions are met: ! ! - Redistributions of source code must retain the above copyright notice, this list ! of conditions and the following disclaimer. ! - Redistributions in binary form must reproduce the above copyright notice, this list ! of conditions and the following disclaimer in the documentation and/or other ! materials provided with the distribution. ! - Neither the name of the Ice Team nor the names of its ! contributors may be used to endorse or promote products derived from this software ! without specific prior written permission. ! ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ! OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ! THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ! EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ! HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR ! TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, ! EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! */ ! package core; ! import java.util.*; ! ! /** ! * This class extends of the DataLinkLayerDevice and allows the ! * creation of hubs ! * @author bevan_calliess ! * @author luke_hamilton ! * @author Key ! * @since Nov 8, 2005 ! * @version v0.22 ! **/ ! ! public class Hub extends DataLinkLayerDevice { ! ! /** ! * This creates a layer 1 hub with a default of 4 interface (ports) ! * @author luke_hamilton ! * @param inName The name of the Hub ! * @param inProtocolStackLayers ! * @version v0.20 ! */ ! ! int sz = 0; ! ! public Hub(String inName) { ! super(inName, 1); //pass name and protocolstack layer ! addNetworkInterface("eth0"); ! addNetworkInterface("eth1"); ! addNetworkInterface("eth2"); ! addNetworkInterface("eth3"); ! addNetworkInterface("eth4"); ! } ! ! ! public void Reset(){ ! sz = 0; ! } ! ! public int getState(){ ! return sz; ! } ! ! /** ! * This method will recieve a packet from any of the connected links and the copy ! * the Packet and distribute a copy to each of the other connected links. ! * @author bevan_calliess ! * @param inPacket - The packet to be transported ! * @param inLinkName - The name of the link that sent the packet eg: eth0 ! */ ! ! protected void receivePacket(Packet inPacket,String inInterfaceName) throws LowLinkException{ ! if(sz!=1){ ! Ethernet_packet tempPacket = (Ethernet_packet)inPacket; ! Enumeration it; ! ! ! try{ ! it = NetworkInterfacetable.elements(); ! ! ! while(it.hasMoreElements()){ ! //Create a copy of the packet ! Ethernet_packet copyPacket = new Ethernet_packet(tempPacket.getData(), tempPacket.getDestinationMACAddress(),tempPacket.getSourceMACAddress()); ! ! //Test to see if the current Interface is the Interface that sent in the packet ! // if it is skip that interface ! NetworkInterface tempInterface = (NetworkInterface)it.nextElement(); ! if(!tempInterface.getName().equals(inInterfaceName)){ ! tempInterface.sendPacket(copyPacket); ! } ! ! } ! }catch(Throwable th) ! { ! sz=1; ! throw new LowLinkException("Hub buffer overflow (packet loop flood?)."); ! } ! } ! } ! } Index: Version.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/Version.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Version.java 8 Nov 2005 15:35:29 -0000 1.1 --- Version.java 20 Nov 2005 20:30:53 -0000 1.2 *************** *** 1,56 **** ! /* ! Java Firewall Simulator (jFirewallSim) ! ! Copyright (c) 2004, jFirewallSim development team All rights reserved. ! ! Redistribution and use in source and binary forms, with or without modification, are ! permitted provided that the following conditions are met: ! ! - Redistributions of source code must retain the above copyright notice, this list ! of conditions and the following disclaimer. ! - Redistributions in binary form must reproduce the above copyright notice, this list ! of conditions and the following disclaimer in the documentation and/or other ! materials provided with the distribution. ! - Neither the name of the Canberra Institute of Technology nor the names of its ! contributors may be used to endorse or promote products derived from this software ! without specific prior written permission. ! ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ! OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ! THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ! EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ! HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR ! TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, ! EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! */ ! ! ! package core; ! ! /** ! * This Class hold a array of Strings listing the stakeholders of the ! * project, their role and semester they worked on the project ! * @author luke_hamilton ! * @author Key ! * @since Sep 23, 2004 ! * @version v0.22 ! */ ! public class Version { ! public final static String CORE_VERSION = "v0.22"; //version of the simulation core ! ! public static final String TEAM_MEMBERS[] = { ! "from 03 November 2005","", ! "Alexander Bolshev [Key]", "Project Manager / Documentation Manager / Developer / Maintainer", "", "", ! "Semester 2, 2004", "", ! "Angela Brown " , "Project Manager / Documentation Manager / Developer ", ! "Bevan Calliess " , "Disaster Recovery Manager / Assistant Project Manager / Developer ", ! "Luke Hamilton " , "Documentation Manager / Project Manager / Developer ", ! "Michael Reith " , "Testing Manager / Assistant Release Manager / Developer ", ! "Rob Hulford " , "Release Manager / Assistant Disaster Recovery Manager / Developer \n", ! "Semester 1, 2004", "", ! "Tristan Veness " , "Project Manager / Developer ", ! "James Nikolaidis" , "Developer ", ! }; ! }//EOF --- 1,56 ---- ! /* ! Java Firewall Simulator (jFirewallSim) ! ! Copyright (c) 2004, jFirewallSim development team All rights reserved. ! ! Redistribution and use in source and binary forms, with or without modification, are ! permitted provided that the following conditions are met: ! ! - Redistributions of source code must retain the above copyright notice, this list ! of conditions and the following disclaimer. ! - Redistributions in binary form must reproduce the above copyright notice, this list ! of conditions and the following disclaimer in the documentation and/or other ! materials provided with the distribution. ! - Neither the name of the Canberra Institute of Technology nor the names of its ! contributors may be used to endorse or promote products derived from this software ! without specific prior written permission. ! ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ! OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ! THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ! EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ! HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR ! TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, ! EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! */ ! ! ! package core; ! ! /** ! * This Class hold a array of Strings listing the stakeholders of the ! * project, their role and semester they worked on the project ! * @author luke_hamilton ! * @author Key ! * @since Sep 23, 2004 ! * @version v0.22 ! */ ! public class Version { ! public final static String CORE_VERSION = "v0.22"; //version of the simulation core ! ! public static final String TEAM_MEMBERS[] = { ! "from 03 November 2005","", ! "Alexander Bolshev [Key]", "Project Manager / Documentation Manager / Developer / Maintainer", "", "", ! "Semester 2, 2004", "", ! "Angela Brown " , "Project Manager / Documentation Manager / Developer ", ! "Bevan Calliess " , "Disaster Recovery Manager / Assistant Project Manager / Developer ", ! "Luke Hamilton " , "Documentation Manager / Project Manager / Developer ", ! "Michael Reith " , "Testing Manager / Assistant Release Manager / Developer ", ! "Rob Hulford " , "Release Manager / Assistant Disaster Recovery Manager / Developer \n", ! "Semester 1, 2004", "", ! "Tristan Veness " , "Project Manager / Developer ", ! "James Nikolaidis" , "Developer ", ! }; ! }//EOF Index: SimulationException.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/SimulationException.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SimulationException.java 8 Nov 2005 15:35:29 -0000 1.1 --- SimulationException.java 20 Nov 2005 20:30:53 -0000 1.2 *************** *** 1,60 **** ! /* ! Java Firewall Simulator (jFirewallSim) ! ! Copyright (c) 2004, jFirewallSim development team All rights reserved. ! ! Redistribution and use in source and binary forms, with or without modification, are ! permitted provided that the following conditions are met: ! ! - Redistributions of source code must retain the above copyright notice, this list ! of conditions and the following disclaimer. ! - Redistributions in binary form must reproduce the above copyright notice, this list ! of conditions and the following disclaimer in the documentation and/or other ! materials provided with the distribution. ! - Neither the name of the Canberra Institute of Technology nor the names of its ! contributors may be used to endorse or promote products derived from this software ! without specific prior written permission. ! ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ! OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ! THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ! EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ! HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR ! TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, ! EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! */ ! ! package core; ! /** ! * This class hold a SimulationException Method that will be ! * thrown from within the core if an error is found relating to ! * SimulationException. ! * @author luke_hamilton ! * @since Sep 27, 2004 ! * @version v0.20 ! */ ! public class SimulationException extends Exception{ ! protected String exceptionMsg; ! /** ! * This method assigns the exception message that is thrown ! * by the child classes ! * @author luke_hamilton ! * @param inExceptionMsg - The Exception Message ! * @version v0.20 ! **/ ! public SimulationException(String inExceptionMsg){ ! exceptionMsg = inExceptionMsg; ! } ! /** ! * This method returns the exception method to the file that ! * calls it ! * @author luke_hamilton ! * @return String The Exception message ! * @version v0.20 ! */ ! public String toString(){ ! return "Exception Details: "+exceptionMsg; ! } ! }//EOF --- 1,60 ---- ! /* ! Java Firewall Simulator (jFirewallSim) ! ! Copyright (c) 2004, jFirewallSim development team All rights reserved. ! ! Redistribution and use in source and binary forms, with or without modification, are ! permitted provided that the following conditions are met: ! ! - Redistributions of source code must retain the above copyright notice, this list ! of conditions and the following disclaimer. ! - Redistributions in binary form must reproduce the above copyright notice, this list ! of conditions and the following disclaimer in the documentation and/or other ! materials provided with the distribution. ! - Neither the name of the Canberra Institute of Technology nor the names of its ! contributors may be used to endorse or promote products derived from this software ! without specific prior written permission. ! ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ! OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ! THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ! EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ! HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR ! TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, ! EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! */ ! ! package core; ! /** ! * This class hold a SimulationException Method that will be ! * thrown from within the core if an error is found relating to ! * SimulationException. ! * @author luke_hamilton ! * @since Sep 27, 2004 ! * @version v0.20 ! */ ! public class SimulationException extends Exception{ ! protected String exceptionMsg; ! /** ! * This method assigns the exception message that is thrown ! * by the child classes ! * @author luke_hamilton ! * @param inExceptionMsg - The Exception Message ! * @version v0.20 ! **/ ! public SimulationException(String inExceptionMsg){ ! exceptionMsg = inExceptionMsg; ! } ! /** ! * This method returns the exception method to the file that ! * calls it ! * @author luke_hamilton ! * @return String The Exception message ! * @version v0.20 ! */ ! public String toString(){ ! return "Exception Details: "+exceptionMsg; ! } ! }//EOF Index: InvalidProtocolStackException.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/InvalidProtocolStackException.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** InvalidProtocolStackException.java 8 Nov 2005 15:35:29 -0000 1.1 --- InvalidProtocolStackException.java 20 Nov 2005 20:30:53 -0000 1.2 *************** *** 1,50 **** ! /* ! Java Firewall Simulator (jFirewallSim) ! ! Copyright (c) 2004, jFirewallSim development team All rights reserved. ! ! Redistribution and use in source and binary forms, with or without modification, are ! permitted provided that the following conditions are met: ! ! - Redistributions of source code must retain the above copyright notice, this list ! of conditions and the following disclaimer. ! - Redistributions in binary form must reproduce the above copyright notice, this list ! of conditions and the following disclaimer in the documentation and/or other ! materials provided with the distribution. ! - Neither the name of the Canberra Institute of Technology nor the names of its ! contributors may be used to endorse or promote products derived from this software ! without specific prior written permission. ! ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ! OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ! THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ! EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ! HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR ! TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, ! EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! */ ! ! package core; ! ! /** ! * InvalidProtoclStackException Class that extends from the Simulation Exception ! * class ! * @author luke_hamilton ! * @version v0.20 ! **/ ! ! public class InvalidProtocolStackException extends SimulationException { ! /** ! * This method throw inExceptionMsg up to the super class Simulation ! * Excpetion ! * @author luke_hamilton ! * @param inExceptionMsg - The Exception Message ! * @version v0.20 ! **/ ! public InvalidProtocolStackException(String inExceptionMsg) { ! super(inExceptionMsg); ! } ! ! } --- 1,50 ---- ! /* ! Java Firewall Simulator (jFirewallSim) ! ! Copyright (c) 2004, jFirewallSim development team All rights reserved. ! ! Redistribution and use in source and binary forms, with or without modification, are ! permitted provided that the following conditions are met: ! ! - Redistributions of source code must retain the above copyright notice, this list ! of conditions and the following disclaimer. ! - Redistributions in binary form must reproduce the above copyright notice, this list ! of conditions and the following disclaimer in the documentation and/or other ! materials provided with the distribution. ! - Neither the name of the Canberra Institute of Technology nor the names of its ! contributors may be used to endorse or promote products derived from this software ! without specific prior written permission. ! ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ! OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ! THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ! EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ! HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR ! TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, ! EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! */ ! ! package core; ! ! /** ! * InvalidProtoclStackException Class that extends from the Simulation Exception ! * class ! * @author luke_hamilton ! * @version v0.20 ! **/ ! ! public class InvalidProtocolStackException extends SimulationException { ! /** ! * This method throw inExceptionMsg up to the super class Simulation ! * Excpetion ! * @author luke_hamilton ! * @param inExceptionMsg - The Exception Message ! * @version v0.20 ! **/ ! public InvalidProtocolStackException(String inExceptionMsg) { ! super(inExceptionMsg); ! } ! ! } Index: LayerInfoHandler.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/LayerInfoHandler.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** LayerInfoHandler.java 8 Nov 2005 15:35:29 -0000 1.1 --- LayerInfoHandler.java 20 Nov 2005 20:30:53 -0000 1.2 *************** *** 1,131 **** ! package core; ! /* ! Java Firewall Simulator (jFirewallSim) ! ! Copyright (c) 2004, jFirewallSim development team All rights reserved. ! ! Redistribution and use in source and binary forms, with or without modification, are ! permitted provided that the following conditions are met: ! ! - Redistributions of source code must retain the above copyright notice, this list ! of conditions and the following disclaimer. ! - Redistributions in binary form must reproduce the above copyright notice, this list ! of conditions and the following disclaimer in the documentation and/or other ! materials provided with the distribution. ! - Neither the name of the Canberra Institute of Technology nor the names of its ! contributors may be used to endorse or promote products derived from this software ! without specific prior written permission. ! ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ! OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ! THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ! EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ! HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR ! TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, ! EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! */ ! ! ! import java.util.*; ! ! /** ! * The LayerInfoHandler's job is to receive and store LayerInfo objects and pass them ! * up to the Simulation (which then passes them to the GUI or CLI) when required. These LayerInfo objects ! * are passed to the LayerInfoHandler when an object in the Simulation (such as a Protocol or NetworkInterface) ! * has received, processed or is sending a Packet or some other data object. Any kind of ! * information that the user might want to see during a 'send' process should be passed to the LayerInfoHandler ! * encapsulated in a LayerInfo object. ! * ! * @author tristan_veness ! * @version 13 June 2004 ! * @version v0.10 ! */ ! ! class LayerInfoHandler { ! /** Queue to hold incoming info from an Object */ ! private Vector infoQueue; ! /** Indicates when there is no more info to receive */ ! private boolean ended; ! ! /** Constructs a new LayerInfoHandler */ ! protected LayerInfoHandler() { ! infoQueue = new Vector(); ! ended = false; ! } ! ! /** ! * Receives info and places it into the LayerInfoHandler's info queue. ! * @param info - The LayerInfo object to receive. ! * @author tristan_veness ! * @version v0.10 ! */ ! public void receiveInfo(LayerInfo info) { ! if (!ended) { ! infoQueue.add(info); ! } ! } ! ! /** ! * Gets the next LayerInfo object from the infoQueue and removes it from the queue. ! * @author tristan_veness ! * @return null when there are no more items in the queue. ! * @version v0.10 ! **/ ! public LayerInfo getNext() { ! if (infoQueue.size() == 0) { ! return null; ! } ! LayerInfo info = (LayerInfo)infoQueue.elementAt(0); ! infoQueue.remove(0); ! return info; ! } ! ! /** ! * Sets the state of the LayerInfoHandler to indicate it can receive no more info ! * @author tristan_veness ! * @version v0.10 ! **/ ! public void end() { ! ended = true; ! } ! ! /** ! * Returns the state of the LayerInfoHandler ! * @author tristan_veness ! * @return true if the LayerInfoHandler can not receive any more info. ! * False if it is still open to incoming info. ! * @version v0.10 ! **/ ! public boolean hasEnded() { ! return ended; ! } ! ! /** ! * This method clears the vector of all ! * Layer info objects ready for a new recording. * ! * @author tristan_veness ! * @version v0.10 ! **/ ! public void clear(){ ! infoQueue = new Vector(); ! } ! ! /** ! * This method returns a vector containing String arrays that ! * represent each object recorded by the LayerInfoHandler. * ! * @author tristan_veness ! * @return Vector containg string arrays for each line recorded ! * @version v0.10 ! **/ ! public Vector getRecordedInfo(){ ! Vector output = new Vector(); ! Iterator it = infoQueue.iterator(); ! while(it.hasNext()){ ! LayerInfo tempInfo = (LayerInfo)it.next(); ! output.addElement(tempInfo.getRecordedInfo()); ! } ! return output; ! } ! }//EOF --- 1,131 ---- ! package core; ! /* ! Java Firewall Simulator (jFirewallSim) ! ! Copyright (c) 2004, jFirewallSim development team All rights reserved. ! ! Redistribution and use in source and binary forms, with or without modification, are ! permitted provided that the following conditions are met: ! ! - Redistributions of source code must retain the above copyright notice, this list ! of conditions and the following disclaimer. ! - Redistributions in binary form must reproduce the above copyright notice, this list ! of conditions and the following disclaimer in the documentation and/or other ! materials provided with the distribution. ! - Neither the name of the Canberra Institute of Technology nor the names of its ! contributors may be used to endorse or promote products derived from this software ! without specific prior written permission. ! ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ! OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ! THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ! EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ! HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR ! TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, ! EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! */ ! ! ! import java.util.*; ! ! /** ! * The LayerInfoHandler's job is to receive and store LayerInfo objects and pass them ! * up to the Simulation (which then passes them to the GUI or CLI) when required. These LayerInfo objects ! * are passed to the LayerInfoHandler when an object in the Simulation (such as a Protocol or NetworkInterface) ! * has received, processed or is sending a Packet or some other data object. Any kind of ! * information that the user might want to see during a 'send' process should be passed to the LayerInfoHandler ! * encapsulated in a LayerInfo object. ! * ! * @author tristan_veness ! * @version 13 June 2004 ! * @version v0.10 ! */ ! ! class LayerInfoHandler { ! /** Queue to hold incoming info from an Object */ ! private Vector infoQueue; ! /** Indicates when there is no more info to receive */ ! private boolean ended; ! ! /** Constructs a new LayerInfoHandler */ ! protected LayerInfoHandler() { ! infoQueue = new Vector(); ! ended = false; ! } ! ! /** ! * Receives info and places it into the LayerInfoHandler's info queue. ! * @param info - The LayerInfo object to receive. ! * @author tristan_veness ! * @version v0.10 ! */ ! public void receiveInfo(LayerInfo info) { ! if (!ended) { ! infoQueue.add(info); ! } ! } ! ! /** ! * Gets the next LayerInfo object from the infoQueue and removes it from the queue. ! * @author tristan_veness ! * @return null when there are no more items in the queue. ! * @version v0.10 ! **/ ! public LayerInfo getNext() { ! if (infoQueue.size() == 0) { ! return null; ! } ! LayerInfo info = (LayerInfo)infoQueue.elementAt(0); ! infoQueue.remove(0); ! return info; ! } ! ! /** ! * Sets the state of the LayerInfoHandler to indicate it can receive no more info ! * @author tristan_veness ! * @version v0.10 ! **/ ! public void end() { ! ended = true; ! } ! ! /** ! * Returns the state of the LayerInfoHandler ! * @author tristan_veness ! * @return true if the LayerInfoHandler can not receive any more info. ! * False if it is still open to incoming info. ! * @version v0.10 ! **/ ! public boolean hasEnded() { ! return ended; ! } ! ! /** ! * This method clears the vector of all ! * Layer info objects ready for a new recording. * ! * @author tristan_veness ! * @version v0.10 ! **/ ! public void clear(){ ! infoQueue = new Vector(); ! } ! ! /** ! * This method returns a vector containing String arrays that ! * represent each object recorded by the LayerInfoHandler. * ! * @author tristan_veness ! * @return Vector containg string arrays for each line recorded ! * @version v0.10 ! **/ ! public Vector getRecordedInfo(){ ! Vector output = new Vector(); ! Iterator it = infoQueue.iterator(); ! while(it.hasNext()){ ! LayerInfo tempInfo = (LayerInfo)it.next(); ! output.addElement(tempInfo.getRecordedInfo()); ! } ! return output; ! } ! }//EOF Index: InvalidNetworkLayerDeviceException.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/InvalidNetworkLayerDeviceException.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** InvalidNetworkLayerDeviceException.java 8 Nov 2005 15:35:29 -0000 1.1 --- InvalidNetworkLayerDeviceException.java 20 Nov 2005 20:30:53 -0000 1.2 *************** *** 1,47 **** ! /* ! Java Firewall Simulator (jFirewallSim) ! ! Copyright (c) 2004, jFirewallSim development team All rights reserved. ! ! Redistribution and use in source and binary forms, with or without modification, are ! permitted provided that the following conditions are met: ! ! - Redistributions of source code must retain the above copyright notice, this list ! of conditions and the following disclaimer. ! - Redistributions in binary form must reproduce the above copyright notice, this list ! of conditions and the following disclaimer in the documentation and/or other ! materials provided with the distribution. ! - Neither the name of the Canberra Institute of Technology nor the names of its ! contributors may be used to endorse or promote products derived from this software ! without specific prior written permission. ! ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ! OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ! THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ! EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ! HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR ! TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, ! EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! */ ! package core; ! /** ! * InvalidNetworkLayerDeviceException Class that extends from the Simulation Exception ! * class ! * @author luke_hamilton ! * @version v0.20 ! **/ ! public class InvalidNetworkLayerDeviceException extends SimulationException { ! /** ! * This method throw inExceptionMsg up to the super class Simulation ! * Excpetion ! * @author luke_hamilton ! * @param inExceptionMsg - The Exception Message ! * @version v0.20 ! */ ! public InvalidNetworkLayerDeviceException(String inExceptionMsg) { ! super(inExceptionMsg); ! } ! ! } --- 1,47 ---- ! /* ! Java Firewall Simulator (jFirewallSim) ! ! Copyright (c) 2004, jFirewallSim development team All rights reserved. ! ! Redistribution and use in source and binary forms, with or without modification, are ! permitted provided that the following conditions are met: ! ! - Redistributions of source code must retain the above copyright notice, this list ! of conditions and the following disclaimer. ! - Redistributions in binary form must reproduce the above copyright notice, this list ! of conditions and the following disclaimer in the documentation and/or other ! materials provided with the distribution. ! - Neither the name of the Canberra Institute of Technology nor the names of its ! contributors may be used to endorse or promote products derived from this software ! without specific prior written permission. ! ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ! OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ! THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ! EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ! HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR ! TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, ! EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! */ ! package core; ! /** ! * InvalidNetworkLayerDeviceException Class that extends from the Simulation Exception ! * class ! * @author luke_hamilton ! * @version v0.20 ! **/ ! public class InvalidNetworkLayerDeviceException extends SimulationException { ! /** ! * This method throw inExceptionMsg up to the super class Simulation ! * Excpetion ! * @author luke_hamilton ! * @param inExceptionMsg - The Exception Message ! * @version v0.20 ! */ ! public InvalidNetworkLayerDeviceException(String inExceptionMsg) { ! super(inExceptionMsg); ! } ! ! } Index: InvalidNetworkInterfaceNameException.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/InvalidNetworkInterfaceNameException.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** InvalidNetworkInterfaceNameException.java 8 Nov 2005 15:35:29 -0000 1.1 --- InvalidNetworkInterfaceNameException.java 20 Nov 2005 20:30:53 -0000 1.2 *************** *** 1,49 **** ! /* ! Java Firewall Simulator (jFirewallSim) ! ! Copyright (c) 2004, jFirewallSim development team All rights reserved. ! ! Redistribution and use in source and binary forms, with or without modification, are ! permitted provided that the following conditions are met: ! ! - Redistributions of source code must retain the above copyright notice, this list ! of conditions and the following disclaimer. ! - Redistributions in binary form must reproduce the above copyright notice, this list ! of conditions and the following disclaimer in the documentation and/or other ! materials provided with the distribution. ! - Neither the name of the Canberra Institute of Technology nor the names of its ! contributors may be used to endorse or promote products derived from this software ! without specific prior written permission. ! ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ! OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ! THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ! EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ! HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR ! TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, ! EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! */ ! package core; ! ! /** ! * This InvalidNetworkInterfaceName Exception Class that extends from the ! * Simulation Exception class ! * @author luke_hamilton ! * @since Sep 27, 2004 ! * @version v0.20 ! **/ ! public class InvalidNetworkInterfaceNameException extends SimulationException{ ! ! /** ! * This method throw inExceptionMsg up to the super class Simulation ! * Excpetion ! * @author luke_hamilton ! * @param inExceptionMsg - The Excpetion Message ! * @version v0.20 ! */ ! public InvalidNetworkInterfaceNameException(String inExceptionMsg) { ! super(inExceptionMsg); ! } ! } --- 1,49 ---- ! /* ! Java Firewall Simulator (jFirewallSim) ! ! Copyright (c) 2004, jFirewallSim development team All rights reserved. ! ! Redistribution and use in source and binary forms, with or without modification, are ! permitted provided that the following conditions are met: ! ! - Redistributions of source code must retain the above copyright notice, this list ! of conditions and the following disclaimer. ! - Redistributions in binary form must reproduce the above copyright notice, this list ! of conditions and the following disclaimer in the documentation and/or other ! materials provided with the distribution. ! - Neither the name of the Canberra Institute of Technology nor the names of its ! contributors may be used to endorse or promote products derived from this software ! without specific prior written permission. ! ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ! OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ! THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ! EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ! HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR ! TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, ! EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! */ ! package core; ! ! /** ! * This InvalidNetworkInterfaceName Exception Class that extends from the ! * Simulation Exception class ! * @author luke_hamilton ! * @since Sep 27, 2004 ! * @version v0.20 ! **/ ! public class InvalidNetworkInterfaceNameException extends SimulationException{ ! ! /** ! * This method throw inExceptionMsg up to the super class Simulation ! * Excpetion ! * @author luke_hamilton ! * @param inExceptionMsg - The Excpetion Message ! * @version v0.20 ! */ ! public InvalidNetworkInterfaceNameException(String inExceptionMsg) { ! super(inExceptionMsg); ! } ! } Index: Simulation.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/Simulation.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Simulation.java 19 Nov 2005 16:55:37 -0000 1.4 --- Simulation.java 20 Nov 2005 20:30:53 -0000 1.5 *************** *** 1,1101 **** ! /* ! Java Firewall Simulator (jFirewallSim) ! ! Copyright (c) 2004, jFirewallSim development team All rights reserved. ! ! Redistribution and use in source and binary forms, with or without modification, are ! permitted provided that the following conditions are met: ! ! - Redistributions of source code must retain the above copyright notice, this list ! of conditions and the following disclaimer. [...2173 lines suppressed...] ! vecInterfaceInfo.add((String)tempNetworkCard.getConnectLinkName()); ! } ! ! catch(InvalidNetworkInterfaceNameException e) ! { ! //This should never happen ! } ! vecNodeInfo.add(vecInterfaceInfo); ! } ! ! } ! ! } ! else{ ! throw new InvalidNodeNameException("Node does not exist."); ! } ! return vecNodeInfo; ! } ! ! }//EOF Index: ProtocolStack.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/ProtocolStack.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ProtocolStack.java 19 Nov 2005 21:53:51 -0000 1.4 --- ProtocolStack.java 20 Nov 2005 20:30:53 -0000 1.5 *************** *** 1,77 **** ! /* ! Java Firewall Simulator (jFirewallSim) ! ! Copyright (c) 2004, jFirewallSim development team All rights reserved. ! ! Redistribution and use in source and binary forms, with or without modification, are ! permitted provided that the following conditions are met: ! ! - Redistributions of source code must retain the above copyright notice, this list ! of conditions and the following disclaimer. ! - Redistributions in binary form must reproduce the above copyright notice, this list ! of conditions and the following disclaimer in the documentation and/or other ! materials provided with the distribution. ! - Neither the name of the Canberra Institute of Technology nor the names of its ! contributors may be used to endorse or promote products derived from this software ! without specific prior written permission. ! ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ! OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ! THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ! EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ! HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR ! TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, ! EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! /* ! Java Firewall Simulator (jFirewallSim) ! ! Copyright (c) 2004, jFirewallSim development team All rights reserved. ! ! Redistribution and use in source and binary forms, with or without modification, are ! permitted provided that the following conditions are met: ! ! - Redistributions of source code must retain the above copyright notice, this list ! of conditions and the following disclaimer. ! - Redistributions in binary form must reproduce the above copyright notice, this list ! of conditions and the following disclaimer in the documentation and/or other ! materials provided with the distribution. ! - Neither the name of the Canberra Institute of Technology nor the names of its ! contributors may be used to endorse or promote products derived from this software ! without specific prior written permission. ! ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ! OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ! THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ! EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ! HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR ! TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, ! EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! */ ! package core; ! ! /** ! * @author luke_hamilton ! * @since Sep 17, 2004 ! * @version v0.20 ! */ ! ! public abstract class ProtocolStack { ! public static final int TCP_IP = 0; ! public static final int IPX_SPX = 1; ! public static final int IBM_SNA = 2; ! public static final int APPLETALK = 3; ! ! public static int UIDGen; ! /** ! * Future use. All protocol stacks regardless of type must implement ! * recievepacket! ! * @author bevan_calliess ! * @param inPacket ! */ ! public abstract void receivePacket(Packet inPacket) throws LowLinkException; ! ! }//EOF --- 1,154 ---- ! /* ! ! Java Firewall Simulator (jFirewallSim) ! ! ! ! Copyright (c) 2004, jFirewallSim development team All rights reserved. ! ! ! ! Redistribution and use in source and binary forms, with or without modification, are ! ! permitted provided that the following conditions are met: ! ! ! ! - Redistributions of source code must retain the above copyright notice, this list ! ! of conditions and the following disclaimer. ! ! - Redistributions in binary form must reproduce the above copyright notice, this list ! ! of conditions and the following disclaimer in the documentation and/or other ! ! materials provided with the distribution. ! ! - Neither the name of the Canberra Institute of Technology nor the names of its ! ! contributors may be used to endorse or... [truncated message content] |