[Javanetsim-cvs] javaNetSim/core/protocolsuite/tcp_ip ARPTableEntry.java,1.1,1.2 Application.java,1.
Status: Beta
Brought to you by:
darkkey
Update of /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30938/core/protocolsuite/tcp_ip Modified Files: ARPTableEntry.java Application.java Echo.java ICMP_packet.java IGMP.java IPAddress.java IPV4Address.java IPV6Address.java InvalidIPAddressException.java InvalidSubnetMaskException.java Ip.java IpV6.java ProtocolStack.java ProtocolStackException.java RARP.java SNMP.java Tcp.java Tcp_packet.java Udp.java ipconfig.java ipconfigTableEntry.java Log Message: Index: ipconfig.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/ipconfig.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ipconfig.java 8 Nov 2005 16:10:47 -0000 1.1 --- ipconfig.java 20 Nov 2005 20:30:53 -0000 1.2 *************** *** 1,67 **** ! /* ! 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.protocolsuite.tcp_ip; ! ! import java.util.Vector; ! ! ! ! public class ipconfig { ! private Vector ipconfigTable; ! ! /** ! * Assigns a new IP config vector ! * @author luke_hamilton ! * @author bevan_calliess ! * @version v0.20 ! */ ! public ipconfig(){ ! ipconfigTable = new Vector(); ! } ! ! /** ! * Add a new entry to the IPconfigTable ! * @author luke_hamilton ! * @author bevan_calliess ! * @param inEntry - IPconfigTableEntry ! * @version v0.20 ! */ ! public void addTableEntry(ipconfigTableEntry inEntry){ ! ipconfigTable.add(inEntry); ! } ! ! /** ! * Returns the size of the ipconfigTable ! * @author luke_hamilton ! * @author bevan_calliess ! * @return size - The size of the ipconfigtable ! */ ! public int size(){ ! return ipconfigTable.size(); ! } ! }//EOF --- 1,67 ---- ! /* ! 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.protocolsuite.tcp_ip; ! ! import java.util.Vector; ! ! ! ! public class ipconfig { ! private Vector ipconfigTable; ! ! /** ! * Assigns a new IP config vector ! * @author luke_hamilton ! * @author bevan_calliess ! * @version v0.20 ! */ ! public ipconfig(){ ! ipconfigTable = new Vector(); ! } ! ! /** ! * Add a new entry to the IPconfigTable ! * @author luke_hamilton ! * @author bevan_calliess ! * @param inEntry - IPconfigTableEntry ! * @version v0.20 ! */ ! public void addTableEntry(ipconfigTableEntry inEntry){ ! ipconfigTable.add(inEntry); ! } ! ! /** ! * Returns the size of the ipconfigTable ! * @author luke_hamilton ! * @author bevan_calliess ! * @return size - The size of the ipconfigtable ! */ ! public int size(){ ! return ipconfigTable.size(); ! } ! }//EOF Index: Tcp_packet.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/Tcp_packet.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Tcp_packet.java 8 Nov 2005 16:10:47 -0000 1.1 --- Tcp_packet.java 20 Nov 2005 20:30:53 -0000 1.2 *************** *** 1,42 **** ! /* ! 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.protocolsuite.tcp_ip; ! import core.Packet; ! ! /** ! * This is for design and future implementation of TCP_PACKET ! * @author luke_hamilton ! * @since Sep 17, 2004 ! * @version v0.20 ! */ ! ! ! public class Tcp_packet extends Packet{ ! } --- 1,42 ---- ! /* ! 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.protocolsuite.tcp_ip; ! import core.Packet; ! ! /** ! * This is for design and future implementation of TCP_PACKET ! * @author luke_hamilton ! * @since Sep 17, 2004 ! * @version v0.20 ! */ ! ! ! public class Tcp_packet extends Packet{ ! } Index: InvalidIPAddressException.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/InvalidIPAddressException.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** InvalidIPAddressException.java 8 Nov 2005 16:10:47 -0000 1.1 --- InvalidIPAddressException.java 20 Nov 2005 20:30:53 -0000 1.2 *************** *** 1,46 **** ! /* ! 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.protocolsuite.tcp_ip; ! /** ! * Exception that is thrown when there is an invalid IP address ! * @author luke_hamilton ! * @since Sep 27, 2004 ! * @version v0.20 ! */ ! public class InvalidIPAddressException extends ProtocolStackException { ! ! /** ! * Call the super class and passes the message up ! * @author luke_hamilton ! * @param inExceptionMsg - Message ! * @version v0.20 ! */ ! public InvalidIPAddressException(String inExceptionMsg){ ! super(inExceptionMsg); ! } ! } --- 1,46 ---- ! /* ! 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.protocolsuite.tcp_ip; ! /** ! * Exception that is thrown when there is an invalid IP address ! * @author luke_hamilton ! * @since Sep 27, 2004 ! * @version v0.20 ! */ ! public class InvalidIPAddressException extends ProtocolStackException { ! ! /** ! * Call the super class and passes the message up ! * @author luke_hamilton ! * @param inExceptionMsg - Message ! * @version v0.20 ! */ ! public InvalidIPAddressException(String inExceptionMsg){ ! super(inExceptionMsg); ! } ! } Index: Udp.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/Udp.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Udp.java 20 Nov 2005 19:13:04 -0000 1.19 --- Udp.java 20 Nov 2005 20:30:53 -0000 1.20 *************** *** 71,74 **** --- 71,76 ---- import core.TransportLayerException; + import core.TransportLayerPortException; + import core.InvalidNetworkLayerDeviceException; *************** *** 179,182 **** --- 181,185 ---- * @exception LowLinkException * @exception InvalidNetworkLayerDeviceException + * @exception TransportLayerPortException * @version v0.20 * @see TransportLayerException *************** *** 184,190 **** * @see LowLinkException * @see InvalidNetworkLayerDeviceException */ ! public void receiveUDPPacket(UDP_packet inPacket) throws TransportLayerException, LowLinkException { --- 187,194 ---- * @see LowLinkException * @see InvalidNetworkLayerDeviceException + * @see TransportLayerPortException */ ! public void receiveUDPPacket(UDP_packet inPacket) throws TransportLayerPortException, TransportLayerException, LowLinkException { *************** *** 204,212 **** { case 0: //port is free => Error: no application to receive UDP ! //have to disconnect listener from port ! Application listener; ! listener = (Application)Elm.application; ! listener.Disconnect(); ! throw new TransportLayerException("UDP Error: no server application listening to port "+inPacket.get_destPort() +" on host \""+ mParentStack.getParentNodeName()+"\"!"); //no break needed ;) case 1: // port is being listened to by a new application. Have to "establish" (in UDP no connections are being established) a new connection by replacing hashtable element --- 208,213 ---- { case 0: //port is free => Error: no application to receive UDP ! //have to disconnect listener from port ! throw new TransportLayerPortException("UDP Error: no server application listening to port "+inPacket.get_destPort() +" on host \""+ mParentStack.getParentNodeName()+"\"!"); //no break needed ;) case 1: // port is being listened to by a new application. Have to "establish" (in UDP no connections are being established) a new connection by replacing hashtable element *************** *** 237,241 **** Simulation.addLayerInfo(UDP_Info); ! listener = (Application)Elm.application; listener.RecvData(inPacket.getUDP_message()); --- 238,242 ---- Simulation.addLayerInfo(UDP_Info); ! Application listener; listener = (Application)Elm.application; listener.RecvData(inPacket.getUDP_message()); *************** *** 269,273 **** Simulation.addLayerInfo(UDP_Info); ! listener = (Application)Elm.application; listener.RecvData(inPacket.getUDP_message()); --- 270,274 ---- Simulation.addLayerInfo(UDP_Info); ! Application listener; listener = (Application)Elm.application; listener.RecvData(inPacket.getUDP_message()); *************** *** 278,304 **** } else { //have to disconnect listener from port ! ! listener = (Application)Elm.application; ! listener.Disconnect(); ! throw new TransportLayerException("UDP Error: port is busy! Port is connected to another host or/and port and is busy by another application." + "Port "+inPacket.get_destPort() +" on host \""+ mParentStack.getParentNodeName()+"\"."); ! } break; default: //UDP Error: unknown port status :( ! //have to disconnect listener from port ! ! listener = (Application)Elm.application; ! listener.Disconnect(); ! throw new TransportLayerException("UDP Error: unknown port status! Port "+inPacket.get_destPort() +" on host \""+ mParentStack.getParentNodeName()+"\"."); } ! } else { ! //have to disconnect listener from port ! UDP_HashTableElement Elm = null; ! Elm=(UDP_HashTableElement)PortTable.get(inPacket.get_destPort()); ! Application listener; ! listener = (Application)Elm.application; ! listener.Disconnect(); /* ! throw new TransportLayerException("UDP Error: port " + inPacket.get_destPort() + " does not exist. Host \"" + mParentStack.getParentNodeName()+"\"."); } } --- 279,292 ---- } else { //have to disconnect listener from port ! throw new TransportLayerPortException("UDP Error: port is busy! Port is connected to another host or/and port and is busy by another application." + "Port "+inPacket.get_destPort() +" on host \""+ mParentStack.getParentNodeName()+"\"."); } break; default: //UDP Error: unknown port status :( ! //have to disconnect listener from port ! throw new TransportLayerPortException("UDP Error: unknown port status! Port "+inPacket.get_destPort() +" on host \""+ mParentStack.getParentNodeName()+"\"."); } ! } else { ! throw new TransportLayerPortException("UDP Error: port " + inPacket.get_destPort() + " does not exist. Host \"" + mParentStack.getParentNodeName()+"\"."); } } *************** *** 512,515 **** --- 500,525 ---- } + /** + * This method sets the UDP port totally free + * @author gift (sourceforge.net user) + * @param application application that uses port + * @return Nothing + * @exception TransportLayerException + * @version v0.10 + * @see TransportLayerException + */ + public void FreeApplication(Object application) throws TransportLayerException //changes any port status to 0 (free) + { + UDP_HashTableElement Elm=null; + Integer PortToFree=getApplicationLocalPortNumber(application); + + Elm=(UDP_HashTableElement) PortTable.get((Integer)PortToFree); + + Elm.PortStatus=0; + Elm.application=null; + Elm.connectedtoIP=""; + Elm.connectedtoPort=0; + + } /** Index: IGMP.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/IGMP.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IGMP.java 8 Nov 2005 16:10:47 -0000 1.1 --- IGMP.java 20 Nov 2005 20:30:53 -0000 1.2 *************** *** 1,43 **** ! /* ! 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.protocolsuite.tcp_ip; ! ! import java.io.Serializable; ! ! /** ! * @author luke_hamilton ! * @since Sep 17, 2004 ! * @version v0.00 ! * ! */ ! ! ! public class IGMP implements Serializable{ ! } --- 1,43 ---- ! /* ! 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.protocolsuite.tcp_ip; ! ! import java.io.Serializable; ! ! /** ! * @author luke_hamilton ! * @since Sep 17, 2004 ! * @version v0.00 ! * ! */ ! ! ! public class IGMP implements Serializable{ ! } Index: IPV6Address.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/IPV6Address.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IPV6Address.java 8 Nov 2005 16:10:47 -0000 1.1 --- IPV6Address.java 20 Nov 2005 20:30:53 -0000 1.2 *************** *** 1,41 **** ! /* ! 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.protocolsuite.tcp_ip; ! ! /** ! * This class will one day contain all the method related to IPv6's ip addressing. ! * As i currently know nothining about IPv6, i am unable to determine if there are ! * any method that are both common to IPv4 and IPv6, and that is why the superclass ! * is a very bare class. ! * @author luke_hamilton ! * @since Sep 19, 2004 ! * @version v0.20 ! **/ ! public class IPV6Address extends IPAddress { ! ! } --- 1,41 ---- ! /* ! 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.protocolsuite.tcp_ip; ! ! /** ! * This class will one day contain all the method related to IPv6's ip addressing. ! * As i currently know nothining about IPv6, i am unable to determine if there are ! * any method that are both common to IPv4 and IPv6, and that is why the superclass ! * is a very bare class. ! * @author luke_hamilton ! * @since Sep 19, 2004 ! * @version v0.20 ! **/ ! public class IPV6Address extends IPAddress { ! ! } Index: ProtocolStackException.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/ProtocolStackException.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ProtocolStackException.java 8 Nov 2005 16:10:47 -0000 1.1 --- ProtocolStackException.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.protocolsuite.tcp_ip; ! ! import core.SimulationException; ! ! /** ! * This class extends the SimulationException class. ! * @author luke_hamilton ! * @since Sep 27, 2004 ! * @version v0.20 ! */ ! public class ProtocolStackException extends SimulationException{ ! /** ! * This method is called when there is an error within the ! * ProtocolStack. The idea is that this error should never occur. ! * @author luke_hamilton ! * @param inExceptionMsg ! * @version v0.20 ! */ ! public ProtocolStackException(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.protocolsuite.tcp_ip; ! ! import core.SimulationException; ! ! /** ! * This class extends the SimulationException class. ! * @author luke_hamilton ! * @since Sep 27, 2004 ! * @version v0.20 ! */ ! public class ProtocolStackException extends SimulationException{ ! /** ! * This method is called when there is an error within the ! * ProtocolStack. The idea is that this error should never occur. ! * @author luke_hamilton ! * @param inExceptionMsg ! * @version v0.20 ! */ ! public ProtocolStackException(String inExceptionMsg){ ! super(inExceptionMsg); ! } ! } Index: Tcp.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/Tcp.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Tcp.java 8 Nov 2005 16:10:47 -0000 1.1 --- Tcp.java 20 Nov 2005 20:30:53 -0000 1.2 *************** *** 1,43 **** ! /* ! 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.protocolsuite.tcp_ip; ! ! import java.io.Serializable; ! ! /** ! * This is for design and future implementation of TCP ! * @author luke_hamilton ! * @since Sep 17, 2004 ! * @version v0.20 ! */ ! ! ! public class Tcp implements Serializable{ ! } --- 1,43 ---- ! /* ! 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.protocolsuite.tcp_ip; ! ! import java.io.Serializable; ! ! /** ! * This is for design and future implementation of TCP ! * @author luke_hamilton ! * @since Sep 17, 2004 ! * @version v0.20 ! */ ! ! ! public class Tcp implements Serializable{ ! } Index: IPV4Address.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/IPV4Address.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IPV4Address.java 8 Nov 2005 16:10:47 -0000 1.1 --- IPV4Address.java 20 Nov 2005 20:30:53 -0000 1.2 *************** *** 1,587 **** ! /* ! 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. [...1145 lines suppressed...] ! if(subIP.equals(subInIP)){ //Compare the two substrings ! return true; ! } ! return false; ! } catch (Exception e) {} ! return false; ! } ! ! /* ! * int i = getNetworkIDBits(); ! ! subIP = binaryIpAddress.substring(0,i); //Create substring containing only the network bits of the binary address ! subInIP = IPV4Address.toBinaryString(inIPAddress).substring(0,getNetworkIDBits()); ! ! if(subIP.equals(subInIP)){ //Compare the two substrings ! return true; ! } ! */ ! ! }//EOF Index: RARP.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/RARP.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RARP.java 8 Nov 2005 16:10:47 -0000 1.1 --- RARP.java 20 Nov 2005 20:30:53 -0000 1.2 *************** *** 1,43 **** ! /* ! 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.protocolsuite.tcp_ip; ! ! import java.io.Serializable; ! ! /** ! * This is for design and future implementation of RARP ! * @author luke_hamilton ! * @since Sep 17, 2004 ! * @version v0.20 ! */ ! ! ! public class RARP implements Serializable{ ! } --- 1,43 ---- ! /* ! 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.protocolsuite.tcp_ip; ! ! import java.io.Serializable; ! ! /** ! * This is for design and future implementation of RARP ! * @author luke_hamilton ! * @since Sep 17, 2004 ! * @version v0.20 ! */ ! ! ! public class RARP implements Serializable{ ! } Index: ProtocolStack.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/ProtocolStack.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ProtocolStack.java 20 Nov 2005 19:13:04 -0000 1.12 --- ProtocolStack.java 20 Nov 2005 20:30:53 -0000 1.13 *************** *** 767,771 **** try{ mUDPprotocol.receiveUDPPacket(temp); ! }catch(TransportLayerException te){ //here *TODO*: disconnect sender from port!!! --- 767,772 ---- try{ mUDPprotocol.receiveUDPPacket(temp); ! }catch(TransportLayerException te){} ! catch(TransportLayerPortException tpe){ //here *TODO*: disconnect sender from port!!! *************** *** 774,779 **** UDP_Info.setDataType("UDP Packet"); UDP_Info.setLayer("Transport"); ! UDP_Info.setDescription("UDP port packet receiving: \""+ te.toString() + "\"."); Simulation.addLayerInfo(UDP_Info); } --- 775,781 ---- UDP_Info.setDataType("UDP Packet"); UDP_Info.setLayer("Transport"); ! UDP_Info.setDescription("UDP port packet receiving: \""+ tpe.toString() + "\"."); Simulation.addLayerInfo(UDP_Info); + // throw tpe; } *************** *** 1323,1326 **** --- 1325,1342 ---- } + /** + * This method sets the UDP port totally free + * @author gift (sourceforge.net user) + * @param application application that uses port + * @return Nothing + * @exception TransportLayerException + * @version v0.10 + * @see TransportLayerException + */ + public void FreeUDPApplication(Object application) throws TransportLayerException + { + mUDPprotocol.FreeApplication(application); + } + /** * This method sets the UDP port status to 1 (is being listened to) Index: InvalidSubnetMaskException.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/InvalidSubnetMaskException.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** InvalidSubnetMaskException.java 8 Nov 2005 16:10:47 -0000 1.1 --- InvalidSubnetMaskException.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.protocolsuite.tcp_ip; ! ! /** ! * Exception that is called when an Invalid SubnetMask is set ! * @author robert_hulford ! * @author Bevan_Calliess ! * @version v0.20 ! */ ! public class InvalidSubnetMaskException extends ProtocolStackException { ! ! ! /** ! * call the super class and passes the message to it ! * @author bevan_calliess ! * @author luke_hamilton ! * @param inMessage ! * @version v0.20 ! */ ! public InvalidSubnetMaskException (String inMessage){ ! super(inMessage); ! } ! ! } --- 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.protocolsuite.tcp_ip; ! ! /** ! * Exception that is called when an Invalid SubnetMask is set ! * @author robert_hulford ! * @author Bevan_Calliess ! * @version v0.20 ! */ ! public class InvalidSubnetMaskException extends ProtocolStackException { ! ! ! /** ! * call the super class and passes the message to it ! * @author bevan_calliess ! * @author luke_hamilton ! * @param inMessage ! * @version v0.20 ! */ ! public InvalidSubnetMaskException (String inMessage){ ! super(inMessage); ! } ! ! } Index: ICMP_packet.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/ICMP_packet.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ICMP_packet.java 8 Nov 2005 16:10:47 -0000 1.1 --- ICMP_packet.java 20 Nov 2005 20:30:53 -0000 1.2 *************** *** 1,118 **** ! /* ! 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.protocolsuite.tcp_ip; ! ! ! /** ! * Currently the only packets being used are echo_requests and echo_reply. ! * The others are in their for future development. ! * @author luke_hamilton ! * @author angela_brown ! * @author robert_hulford ! * @author bevan_calliess ! * @version v0.20 ! */ ! public class ICMP_packet extends IP_packet{ ! private int mMessageCode; ! private String ICMP_message; ! public static final int ECHO_REPLY = 0; ! public static final int DESTINATION_UNREACHABLE = 3; ! public static final int SOURCE_QUENCH = 4; ! public static final int REDIRECT = 5; ! public static final int ECHO_REQUEST = 8; ! public static final int ROUTER_ADVERTISEMENT = 9; ! public static final int ROUTER_SOLICITATION = 10; ! public static final int TIME_EXCEEDED = 11; ! public static final int PARAMETER_PROBLEM = 12; ! public static final int TIMESTAMP_REQUEST = 13; ! public static final int TIMESTAMP_REPLY = 14; ! public static final int INFORMATION_REQUEST = 15; ! public static final int INFORMATION_REPLY= 16; ! public static final int ADDRESSMASK_REQUEST = 17; ! public static final int ADDRESSMASK_REPLY = 18; ! ! /** ! * Assigns the Destination IPAddress ! * @author bevan_calliess ! * @author luke_hamilton ! * @param inDestIPAddress ! * @version v0.20 ! **/ ! ! public ICMP_packet(String inDestIPAddress) ! { ! super (inDestIPAddress); ! } ! /** ! * sets the ICMP_message ! * @author bevan_calliess ! * @param inICMP_message ! * @version v0.20 ! */ ! public void setICMP_message(String inICMP_message) ! { ! ICMP_message = inICMP_message; ! } ! /** ! * Return the ICMP_message ! * @author bevan_calliess ! * @return ICMP_message ! * @version v0.20 ! */ ! ! public String getICMP_message() ! { ! return ICMP_message; ! } ! /** ! * This method will take an integer value representing the ICMP Packet ! * code that identifies the type of Packet. EG an echo request packet is ! * type 8, Destination unreachable is 3. You can refer to Page 133 of ! * TCP/IP Principles, protocols & architectures VOl 1 ! * and see the constants setup in this class ! * NOTE no validation of Codes is currently implemented ! * @author bevan_calliess ! * @author angela_brown ! * @param InCode - The code of the message eg: 8 ! * @version v0.20 ! */ ! public void setMessageCode(int inCode){ ! mMessageCode = inCode; ! } ! /** ! * returns the message code for this packet ! * @author angela_brown ! * @author bevan_calliess ! * @return integer representing the message code ! * @version v0.20 ! **/ ! public int getMessageCode(){ ! return mMessageCode; ! } ! }//EOF \ No newline at end of file --- 1,118 ---- ! /* ! 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 O... [truncated message content] |