Commit e828bf71 authored by Garey Hassler's avatar Garey Hassler

Deliver the open source version of the PCSim2 tool, libraries and test scripts.

parent 6bc4a833

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

To download ANT
1. Goto http://ant.apache.org/bindownload.cgi and download latest version
(as of today 1.7 is latest).
2. You would get a package such as
apache-ant-1.7.0-bin.zip or apache-ant-1.7.0-bin.tar.gz
3. Now extract the contents of this package to c:\ or /usr/local/
4. Now your ant-home directory would be
c:\apache-ant-1.7.0 or /usr/local/apache-ant-1.7.0
5. In your environment set ANT_HOME above directory
6. Set PATH environment variable to include ANT_HOME/bin
To use ANT, at the command prompt, do the following
1. set variable JAVA_HOME to the value of java install dir
2. set variable ANT_HOME to the value of ant-home dir
3. In the path include, JAVA_HOME/bin and ANT_HOME/bin
4. And goto the project directory (where build.xml file exists) and run
a. ant # to build PCSim2 and parser.jar
b. ant utils # to build the bns_utility_protocol.jar and bns_logger.jar
README_Build_Instructions
1. In src/META-INF/
edit MANIFEST.FM_PCSim2, MANIFEST.MF_PARSER, MANIFEST.MF_SDT
by replacing
build version : Specification-Version: x.x.xx-xxxx (e.g., 0.1.18-beta)
The build process will automatically update
repository number Implementation-Version: xxxx (e.g., 7242)
2. Ensure the templates directory is under bin/
3. If USING ANT to build then, in root directory, type 'ant'.
4. Rename the setup zip file, for example PCSim2_Setup-7242.zip
5. Install using setup executable and start PCSim2
6. Run regression test of templates and confirm everything passed.
Note: You are using two instances of PCSim2, one is core, one is DUT.
Verify the configuration files for both.
Note: Scripts between CORE and DUT must be lined up in order.
(DUT is in directory 'ut').
This file defines the changes that have been made to the JAIN-SIP stack
for purposes of integrating the libraries into the PC 2.0 Test Platform.
Some of the changes have been made to integrate other libraries such as
stun4j and a common logging mechanism into the SIP libraries.
The intent of this file is to provide a guide to the changes that are
required for integrating new releases of the JAIN-SIP stack into the
Platform. It is important to note that this is only a guide as subsequent
releases of the SIP stack may undergo significant design changes between
each release and the information provided in this file may become
inaccurrate or obsolete.
In an effort to provide clarity and information to other developers. All
code modifications to the JAIN-SIP stack should begin with a comment block
beginning with "PC 2.0" and description of the change.
1. Automatic transmitting of TRYING for an INVITE.
gov.nist.javax.sip.stack.SIPServerTransaction.java
The run method of the SendTrying class was complete commented out of the
system since its basic operation is to respond to any INVITE that the
stack receives from a peer with a TRYING whenever the application layer
fails to respond to it in 200ms. Since for the PC 2.0's requirements,
the application is responsible for all responses, the code should be
removed.
2. Processing of STUN packets received on a SIP transport channel.
gov.nist.javax.sip.SipStackImpl.java
Added a boolean flag to the stack to allow the global enabling/disabling
of STUN message processing received on a port used by the SIP stack. The
flag is owned by the gov.nist.javax.sip.stack.SIPMessageStack.java and
is controlled by the property setting of "gov.nist.javax.sip.EMBEDDED_STUN".
gov.nist.java.sip.stack.SIPMessageStack.java
Added the boolean flag, embeddedStun, to the class. It is set in the
gov.nist.javax.sip.SipStackImpl.java class during construction based upon
the property setting of "gov.nist.javax.sip.EMBEDDED_STUN".
gov.nist.java.sip.stack.MessageProcessor.java
Added two imports to the class to allow the forwarding of STUN messages
received on a SIP message processor to the STUN stack. This change creates
a dependency between the JAIN-SIP stack and the STUN library.
import com.cablelabs.stun.EmbeddedStun;
import com.cablelabs.stun.EmbeddedStunListener;
Also create the local variables in order to deliver STUN messages to the
STUN stack for processing and to allow the STUN stack to share the socket
the message was received upon for transmitting any responses.
protected static EmbeddedStunListener stunListener = EmbeddedStunListener.getInstance();
protected EmbeddedStun embeddedStun = null;
gov.nist.java.sip.stack.UDPMessageProcessor.java
The start method add a significant portion of its code commented out for
supporting STUN processing on port 3478, the default STUN port. Since STUN
packets in PC 2.0 actually are transported over the same channel as the SIP
packets, a new design was integrated into the processors. The change for
this specific class is directly below the old code that has been commented
out.
In the run method code has been added to examine every packet received by
the processor over its' socket for the possiblity that it is a STUN message.
If "embedded stun" processing is enabled, then all STUN message will be
delivered to the STUN stack for processing.
3. Integration of Apache Logging model into the JAIN-SIP stack.
gov.nist.core.LogWriter.java
gov.nist.javax.sip.stack.ServerLog.java
gov.nist.javax.sip.stack.SIPMessageStack.java
Each of these class underwent major revisioning to attempt to minimize the
changes to all of the other files that log a message to a file. The files
have been altered to encapsulate the new logging library.
gov.nist.javax.sip.SipStackImpl.java
gov.nist.javax.sip.stack.MessageChannel.java
gov.nist.javax.sip.stack.TCPMessageChannel.java
gov.nist.javax.sip.stack.TLSMessageChannel.java
gov.nist.javax.sip.stack.UDPMessageChannel.java
gov.nist.javax.sip.stack.SIPDialog.java
gov.nist.javax.sip.stack.SIPClientTransaction.java
gov.nist.
Each of these files had minor changes to invoked the proper methods of the
ServerLog or LogWriter classes. Each of the changes made for logging are
commented with the standard "PC 2.0" heading.
4. Changes to complete error testing for SIP adherence to 3261.
gov.nist.javax.sip.parser.StringMsgParser
Added the InspectionListener to the parseMessage method to notify the SIPInspector that an error
occurred in the stack while trying to parse a message.
gov.nist.core.NameValueList
Added a LogWriter to the class as well as added a log message to declare an error when
a parameter appears more than once in a header.
gov.nist.javax.sip.parser.Parser.java
Added keyword throw to createParserExpection method calls in the sipVersion method and
changed the message syntax of the expection.
5. In order to provide support for the transmission of modified SIP messages, the
stack had to have several methods converted from protected to public and a new method
added to the SipProvierImpl class.
A list of classes affected by change are:
gov.nist.javax.sip.SipProviderImpl.java
gov.nist.javax.sip.stack.SIPTransaction.java
gov.nist.javax.sip.stack.UDPMessageChannel.java
gov.nist.javax.sip.stack.TCPMessageChannel.java
gov.nist.javax.sip.stack.TLSMessageChannel.java
6. Modified the setNonceCount and getNonceCount methods of AuthenticationHeader to
retrieve/receive a String argument instead of an int. The value was already stored as
a String, but the conversion to integer resulted in leading zeros to be truncated which
results in an invalid digest calculation.
gov.nist.javax.sip.header.AuthenticationHeader.java
7. Modified the ListeningPoint.java interface to include the getHost() method that is
defined in the ListeningPointImpl.java class for easy retrieval of the IP address being
used by a SipProvider class.
8. Modified the TCPMessageChannel.java and TLSMessageChannel.java classes to not automatically
reconnect a TCP socket when it has been lost.
9. Changed several of the thread names created in the stack to be more meaningful to the
PCSim2 users. The threads changed include the following:
gov.nist.javax.sip.stack.UDPMessageProcessor
gov.nist.javax.sip.stack.TCPMessageProcessor (also moved location to below socket creation)
gov.nist.javax.sip.stack.TLSMessageProcessor (also moved location to below socket creation)
10. The MessageChannel objects are automatically setting the value of the rport and received
parameters upon receiving a SIP message. Since the Distributor handles this validation processing,
comment out this code in each of the channel objects.
gov.nist.javax.sip.stack.UDPMessageChannel.java
gov.nist.javax.sip.stack.TCpMessageChannel.java
gov.nist.javax.sip.stack.TLSMessageChannel.java
\ No newline at end of file
The PC Sim2 (PC_Sim2-0.1.jar) application requires all of packages under the com, gov,
and javax directories.
The MANIFEST to use when creating the jar file is located in META-INF/MANIFEST.MF_PCSim2.
This file should be modified to include the Tortoise revision head used to construct
the application. This information is included in any logs generated by the application
for future platform issue management.
PC Sim2 is dependent on several third-party libraries. Currently these are from the poi
(vers. 2.5.1) and log4j (vers. 1.2.13) Apache/Jakarta open source libraries. These are included
in the zip file under the lib directory.
An optional set of libraries come from jung(vers. 2.2.0.1) for visualizing parsed scripts.
These should be placed under lib/jung/* if the visualization feature is desired.
The PCSim2's zip file also include the config directory. At a minimum this directory
should contain the LogConfig.txt file, server.pfx (server-side keystore for TLS),
client.pfx (client-side keystore for TLS), DUT.xls (example DUT configuration file)
and PLATFORM.xls (example Platform settings file). The LogConfig.txt is used by the
log4j library to configure the debugging levels for various components within the application.
The .pfx files are used for TLS negotiation. The .xls files are used to configure the
settings for the test to be conducted.
The Parser (pc2_parser-0.1.jar) application requires three packages to be included in the jar file.
These include the com.cablelabs.log, com.cablelabs.fsm, com.cablelabs.tools and com.cablelabs.parser.
The MANIFEST to use when creating the jar file is located in META-INF/MANIFEST.MF_PARSER.
This file should be modified to include the Tortoise revision head used to construct
the application. This information is included in any logs generated by the application
for future platform issue management.
The Parser is dependent on several third-party libraries. Currently these are from the poi
(vers. 2.5.1) and log4j (vers. 1.2.13) Apache/Jakarta open source libraries.
These are included under the lib directory.
An optional set of libraries come from jung(vers. 2.2.0.1) for visualizing parsed scripts.
These should be placed under lib/jung/* if the visualization feature is desired.
The Parser's zip file also include the config directory. At a minimum this directory
should contain the LogConfig.txt file which is used by the log4j library to configure
the debugging levels for various components within the Parser.
The only two packages necessary to create the pc2_utility-0.1.jar library are
com.cablelabs.log and com.cablelabs.utils. Otherwise it doesn't have any
dependencies on any other packages.
\ No newline at end of file