All Instructions Updated - Ready For Use/Testing
diff --git a/NDNTrafficClient.sample.conf b/NDNTrafficClient.sample.conf
index c045749..ea08c50 100644
--- a/NDNTrafficClient.sample.conf
+++ b/NDNTrafficClient.sample.conf
@@ -1,24 +1,41 @@
 #

-#TrafficPercentage

+#THIS IS A SAMPLE CLIENT INTEREST TRAFFIC CONFIGURATION FILE

 #

-#Name

-#NameAppendBytes

-#NameAppendSequenceNumber

+# * TO BE USED TO GENERATE INTEREST MESSAGES BASED ON A PROBABILITY

+#   PATTERN.

+# * EVERY INIVIDUAL PATTERN DESCRIPTION MUST BE SEPARATED BY ONE

+#   OR MORE '#' CHARACTERS FOR THE TOOL TO DISTINGUISH THEM

+#   INDIVIUDALLY

+# * THE FOLLOWING PARAMETERS MAY BE ADDED FOR EVERY TRAFFIC PATTERN

+# * (Mandatory) NEXT TO A PARAMETER MEANS EVERY PATTERN SHOULD HAVE

+#   IT FOR BEING CONSIDERED VALID

+#   (Optional) MEANS OTHERWISE

+# * ALSO PROVIDED ARE VALID VALUES POSSIBLE FOR EACH PARAMETER

+# * PLEASE ENSURE THAT THE SUM OF TRAFFIC PERCENTAGE FOR ALL PATTERNS

+#   PROVIDED DOES NOT EXCEED 100 IN ORDER TO MAINTAIN CORRECT BEHAVIOR

+# * NNI STANDS FOR NON-NEGATIVE INTEGER

+# * RANGE OF POSSIBLE VALUES IS SPECIFIED IN [] 

 #

-#MinSuffixComponents

-#MaxSuffixComponents

-#ExcludeBefore

-#ExcludeAfter

-#ExcludeBeforeBytes

-#ExcludeAfterBytes

-#ChildSelector

-#MustBeFresh

 #

-#NonceDuplicationPercentage

+#(Mandatory)

+#TrafficPercentage=NNI [0-100]

+#Name=NDN Name

 #

-#Scope

+#(Optional)

+#NameAppendBytes=NNI [>0]

+#NameAppendSequenceNumber=NNI [>=0]

+#MinSuffixComponents=NNI

+#MaxSuffixComponents=NNI

+#ExcludeBefore=NDN Name Component

+#ExcludeAfter=NDN Name Component

+#ExcludeBeforeBytes=NNI [>0]

+#ExcludeAfterBytes=NNI [>0]

+#ChildSelector=NNI [0-1]

+#MustBeFresh=NNI [0-1]

+#NonceDuplicationPercentage=NNI [0-100]

+#Scope=NNI

+#InterestLifetime=NNI [Milliseconds]

 #

-#InterestLifetime

 #

 ##########

 TrafficPercentage=10

@@ -39,4 +56,4 @@
 Name=/example/B

 NameAppendSequenceNumber=1

 Scope=2

-##########
\ No newline at end of file
+##########

diff --git a/NDNTrafficServer.sample.conf b/NDNTrafficServer.sample.conf
index 2bdfb24..40ec726 100644
--- a/NDNTrafficServer.sample.conf
+++ b/NDNTrafficServer.sample.conf
@@ -1,19 +1,37 @@
 #

-#Name

+#THIS IS A SAMPLE SERVER DATA TRAFFIC CONFIGURATION FILE

 #

-#ContentType

+# * TO BE USED TO CONFIGURE RESPONSE TO INTERESTS

+# * MULTIPLE SERVER PREFIXES CAN BE CONFIGURED FOR BEING HANDLED

+# * EVERY INIVIDUAL PATTERN DESCRIPTION MUST BE SEPARATED BY ONE

+#   OR MORE '#' CHARACTERS FOR THE TOOL TO DISTINGUISH THEM

+#   INDIVIUDALLY

+# * THE FOLLOWING PARAMETERS MAY BE ADDED FOR EVERY TRAFFIC PATTERN

+# * (Mandatory) NEXT TO A PARAMETER MEANS EVERY PATTERN SHOULD HAVE

+#   IT FOR BEING CONSIDERED VALID

+#   (Optional) MEANS OTHERWISE

+# * ALSO PROVIDED ARE VALID VALUES POSSIBLE FOR EACH PARAMETER

+# * NNI STANDS FOR NON-NEGATIVE INTEGER

+# * RANGE OF POSSIBLE VALUES IS SPECIFIED IN [] 

 #

-#FreshnessPeriod

 #

-#ContentBytes

-#Content

+#(Mandatory)

+#Name=NDN Name

 #

-##########

-#Name=/example

-#ContentType=1

-#ContentBytes=10

+#

+#(Optional)

+#ContentType=NNI [>=0]

+#FreshnessPeriod=NNI [Milliseconds]

+#ContentBytes=NNI [>0]

+#Content=String

+#

+#

 ##########

 Name=/example/A

+ContentType=1

+ContentBytes=10

+##########

+Name=/example/B

 ContentType=0

 FreshnessPeriod=0

 Content=NoData

diff --git a/README.md b/README.md
index ff2f497..7218965 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,11 @@
 Traffic Generator For NDN (ndn-traffic)

-======================================

+=======================================

+

+This tool is designed to generate interest and data traffic in an NDN network.

+The client and server tool accept traffic configuration files which can be

+used to specify the pattern of NDN traffic that is required to be generated.

+Sample configuration files are provided which include instructions on how 

+to configure various parameters. 

 

 This is an application tool developed over ndn-cpp APIs for TLV packet

 based communication over NDN configured network. The NDN network has to

@@ -31,10 +37,46 @@
 

 ## 2. Tool Run Instructions & Command Line Options: ##

 

-     TBU

+    Usage: ndntrafficserver [options] <Traffic_Configuration_File>

+    Respond to Interest as per provided Traffic Configuration File

+    Multiple Prefixes can be configured for handling.

+    Set environment variable NDN_TRAFFIC_LOGFOLDER for redirecting output to a log.

+      [-d interval] - set delay before responding to interest in milliseconds (minimum 0 milliseconds)

+      [-h] - print help and exit

+

+    Usage: ndntraffic [options] <Traffic_Configuration_File>

+    Generate Interest Traffic as per provided Traffic Configuration File

+    Interests are continuously generated unless a total number is specified.

+    Set environment variable NDN_TRAFFIC_LOGFOLDER for redirecting output to a log.

+      [-i interval] - set interest generation interval in milliseconds (minimum 1000 milliseconds)

+      [-c count] - set total number of interests to be generated

+      [-h] - print help and exit

+

 

 ## 3. Sample Run Instructions ##

 

-     TBU

+__ON MACHINE #1__

 

+Start the ndnd-tlv daemon

+

+        ndnd-tlv-start

+

+Start traffic server

+

+        ndntrafficserver NDNTrafficServer.conf

+

+__ON MACHINE #2__

+

+Start the ndnd-tlv daemon

+

+        ndnd-tlv-start

+

+Start the traffic client

+        

+        ndntraffic NDNTrafficClient.conf

+

+

+* These tools need not be used together and can be used individually as well.

+* Please refer sample configuration files provided for details on how to create your own.

 * Use command line options shown above to adjust traffic configuration.

+

diff --git a/ndn-traffic-client.cpp b/ndn-traffic-client.cpp
index aa909cd..1e159ff 100644
--- a/ndn-traffic-client.cpp
+++ b/ndn-traffic-client.cpp
@@ -340,9 +340,17 @@
   void

   usage()

   {

-    std::cout << "\nUsage: " << programName_ << " Printing Usage"

-              << std::endl << std::endl;

+

+    std::cout << "\nUsage: " << programName_ << " [options] <Traffic_Configuration_File>\n"

+        "Generate Interest Traffic as per provided Traffic Configuration File\n"

+        "Interests are continuously generated unless a total number is specified.\n"

+        "Set environment variable NDN_TRAFFIC_LOGFOLDER for redirecting output to a log.\n"

+        "  [-i interval] - set interest generation interval in milliseconds (minimum "

+        << getDefaultInterestInterval() << " milliseconds)\n"

+        "  [-c count] - set total number of interests to be generated\n"

+        "  [-h] - print help and exit\n\n";

     exit(1);

+

   }

 

   int

diff --git a/ndn-traffic-server.cpp b/ndn-traffic-server.cpp
index 41527e0..38b3461 100644
--- a/ndn-traffic-server.cpp
+++ b/ndn-traffic-server.cpp
@@ -255,9 +255,16 @@
   void

   usage()

   {

-    std::cout << "\nUsage: " << programName_ << " Printing Usage"

-      "\n\n";

+

+    std::cout << "\nUsage: " << programName_ << " [options] <Traffic_Configuration_File>\n"

+        "Respond to Interest as per provided Traffic Configuration File\n"

+        "Multiple Prefixes can be configured for handling.\n"

+        "Set environment variable NDN_TRAFFIC_LOGFOLDER for redirecting output to a log.\n"

+        "  [-d interval] - set delay before responding to interest in milliseconds (minimum "

+        << getDefaultContentDelayTime() << " milliseconds)\n"

+        "  [-h] - print help and exit\n\n";

     exit(1);

+

   }

 

   int

@@ -419,6 +426,7 @@
     std::string content, logLine;

     content = "";

     logLine = "";

+

     Data data(interest.getName());

     if (trafficPattern_[patternId].contentType >= 0)

       data.setContentType(trafficPattern_[patternId].contentType);

@@ -437,6 +445,7 @@
     logLine += ", LocalID="+toString(trafficPattern_[patternId].totalInterestReceived);

     logLine += ", Name="+trafficPattern_[patternId].name;

     logger_.log(logLine, true, false);

+    usleep(contentDelayTime_*1000);

     face_.put(data);

   }