[Javanetsim-cvs] javaNetSim/core/protocolsuite/tcp_ip/ospf OSPFDTBdescription_packet.java,1.3,1.4 OS
Status: Beta
Brought to you by:
darkkey
From: Alouette <alo...@us...> - 2006-02-10 13:01:11
|
Update of /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/ospf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10149/core/protocolsuite/tcp_ip/ospf Modified Files: OSPFDTBdescription_packet.java OSPF_lsaheader.java OSPFhello_packet.java ospf_packetheader.java Log Message: Index: OSPFDTBdescription_packet.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/ospf/OSPFDTBdescription_packet.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** OSPFDTBdescription_packet.java 30 Nov 2005 08:44:51 -0000 1.3 --- OSPFDTBdescription_packet.java 10 Feb 2006 13:00:57 -0000 1.4 *************** *** 49,51 **** --- 49,74 ---- } + public Vector ReturnLsaHeader() + { + return LSAheader_list; + } + + public int ReturnMS(int innum) + { + return IMMS[innum]; + } + public int ReturnDdsn() + { + return DDSequenceNumber; + } + + /*public String GetRouterID() + { + return RouterID; + } + + public void SetRouterID(String inRouterID) + { + RouterID = inRouterID; + }*/ } Index: OSPFhello_packet.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/ospf/OSPFhello_packet.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** OSPFhello_packet.java 20 Nov 2005 14:31:16 -0000 1.3 --- OSPFhello_packet.java 10 Feb 2006 13:00:57 -0000 1.4 *************** *** 11,14 **** --- 11,15 ---- package core.protocolsuite.tcp_ip.ospf; import core.protocolsuite.tcp_ip.ospf.ospf_packetheader; + import java.util.*; /** *************** *** 24,36 **** private static final int Interval=30; // period of sending packets ??! private int Priority; ! private int DeadInterval; private String DesignatedRouter; // 0 - not chosen yet private String BackupDesignatedRouter; //0 - not chosen yet /* todo */ /* need to be list*/ ! private String[] Neighbor; /** Creates a new instance of OSPFhello_packet */ ! public OSPFhello_packet(int NeighborCount) { super(1); --- 25,37 ---- private static final int Interval=30; // period of sending packets ??! private int Priority; ! private static final int DeadInterval=300; private String DesignatedRouter; // 0 - not chosen yet private String BackupDesignatedRouter; //0 - not chosen yet /* todo */ /* need to be list*/ ! private Vector Neighbor = new Vector(); /** Creates a new instance of OSPFhello_packet */ ! public OSPFhello_packet() { super(1); *************** *** 43,50 **** BackupDesignatedRouter=""; DesignatedRouter=""; ! if (NeighborCount>0) ! { ! Neighbor = new String[NeighborCount]; ! } } --- 44,48 ---- BackupDesignatedRouter=""; DesignatedRouter=""; ! } *************** *** 103,106 **** --- 101,122 ---- *v1.0 */ + + + + + public Vector GetNeighbor() + { + return Neighbor; + } + + + public void SetAreaID(String inAreaID) + { + AreaID=inAreaID; + } + public void AddNeighbor(String inRouterID) + { + Neighbor.addElement(inRouterID); + } } Index: ospf_packetheader.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/ospf/ospf_packetheader.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ospf_packetheader.java 20 Nov 2005 14:31:16 -0000 1.3 --- ospf_packetheader.java 10 Feb 2006 13:00:57 -0000 1.4 *************** *** 10,13 **** --- 10,15 ---- package core.protocolsuite.tcp_ip.ospf; + import core.Packet; + import core.protocolsuite.tcp_ip.*; /** *************** *** 16,20 **** * */ ! public class ospf_packetheader { /* * --- 18,22 ---- * */ ! public class ospf_packetheader extends IP_packet { /* * *************** *** 23,28 **** protected int Type; // packet type protected int PacketLength; // packet length in oktets ! protected int RouterID; ! protected int AreaID; protected int Checksum; // for future developing protected boolean AuthenticationType; // if false - authentication without password, --- 25,30 ---- protected int Type; // packet type protected int PacketLength; // packet length in oktets ! protected String RouterID; ! protected String AreaID; protected int Checksum; // for future developing protected boolean AuthenticationType; // if false - authentication without password, *************** *** 63,67 **** * @version 1.0 */ ! protected int GetChecksum() { return Checksum; --- 65,69 ---- * @version 1.0 */ ! public int GetChecksum() { return Checksum; *************** *** 79,83 **** * @version 1.0 */ ! protected int GetPackettype() { return Type; --- 81,85 ---- * @version 1.0 */ ! public int GetPackettype() { return Type; *************** *** 91,95 **** * @version 1.0 */ ! protected boolean GetAuthenticationType() { return AuthenticationType; --- 93,97 ---- * @version 1.0 */ ! public boolean GetAuthenticationType() { return AuthenticationType; *************** *** 103,109 **** * @version 1.0 */ ! protected int GetPacketLength() { return PacketLength; } } --- 105,121 ---- * @version 1.0 */ ! public int GetPacketLength() { return PacketLength; } + + public String GetRouterID() + { + return RouterID; + } + + public void SetRouterID(String inRouterID) + { + RouterID = inRouterID; + } } Index: OSPF_lsaheader.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/ospf/OSPF_lsaheader.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** OSPF_lsaheader.java 28 Nov 2005 13:17:18 -0000 1.1 --- OSPF_lsaheader.java 10 Feb 2006 13:00:57 -0000 1.2 *************** *** 20,24 **** protected int[] ls_options; //options same to , for example, hello message protected int LS_type; // type of LSA ! protected int LS_ID; // link identifier protected String ls_AdvertisingRouter; protected long LS_sequencenumber; --- 20,24 ---- protected int[] ls_options; //options same to , for example, hello message protected int LS_type; // type of LSA ! protected String LS_ID; // link identifier protected String ls_AdvertisingRouter; protected long LS_sequencenumber; *************** *** 120,129 **** } ! public void SetLSID(int inID) { LS_ID=inID; } ! public int GetID() { return LS_ID; --- 120,129 ---- } ! public void SetLSID(String inID) { LS_ID=inID; } ! public String GetID() { return LS_ID; |