diff --git a/README.md b/README.md
new file mode 100644
index 0000000..ff2f497
--- /dev/null
+++ b/README.md
@@ -0,0 +1,40 @@
+Traffic Generator For NDN (ndn-traffic)
+======================================
+
+This is an application tool developed over ndn-cpp APIs for TLV packet
+based communication over NDN configured network. The NDN network has to
+be first created with 'ndnx' and 'ndnd-tlv'. This is followed by environment
+security setup with 'ndn-cpp-security-tools'. The application also requires
+installation of ndn-cpp and CPP boost libraries. The installations need to
+follow a strict order as the ndnd
+
+To run the following must be ensured(FOLLOW ORDER STRICTLY)
+
+1. Install ndnx (install all necessary dependencies)
+2. Install CPP Boost Library > 1.47
+
+        sudo apt-get install libboost1.48-all-dev
+
+3. Install ndn-cpp-dev (install all necessary dependencies except boost)
+4. Install ndnd-tlv install all necessary dependencies except boost)
+5. Install and Configure Security Environment with ndn-cpp-security-tools
+
+-----------------------------------------------------
+
+## 1. Compile And Installation Instructions: ##
+
+    git clone git://github.com/jeraldabraham/ndn-traffic ndn-traffic
+    cd ndn-traffic
+    ./waf configure 
+    ./waf
+    sudo ./waf install
+
+## 2. Tool Run Instructions & Command Line Options: ##
+
+     TBU
+
+## 3. Sample Run Instructions ##
+
+     TBU
+
+* Use command line options shown above to adjust traffic configuration.
diff --git a/ndn-traffic-client.cpp b/ndn-traffic-client.cpp
new file mode 100644
index 0000000..ed243be
--- /dev/null
+++ b/ndn-traffic-client.cpp
@@ -0,0 +1,131 @@
+/**
+ *
+ * Copyright (C) 2013 University of Arizona.
+ * @author: Jerald Paul Abraham <jeraldabraham@email.arizona.edu>
+ *
+ */
+
+#include <ndn-cpp-dev/security/key-chain.hpp>
+
+using namespace ndn;
+
+class NdnTrafficClient
+{
+public:
+
+  NdnTrafficClient( char* programName )
+  {
+    programName_ = programName;
+    interestInterval_ = getDefaultInterestInterval();
+    interestCount_ = getDefaultInterestCount();
+    prefix_ = "";
+    configurationFile_ = "";
+  }
+
+  NdnTrafficClient()
+  : keyChain_()
+  {
+  }
+
+  void
+  usage()
+  {
+    std::cout << "\nUsage: " << programName_ << " Printing Usage"
+      "\n\n";
+    exit(1);
+  }
+
+  int
+  getDefaultInterestInterval()
+  {
+    return -1;
+  }
+
+  int
+  getDefaultInterestCount()
+  {
+    return -1;
+  }
+
+  bool
+  isPrefixSet()
+  {
+    if ( prefix_.length() > 0 )
+      return true;
+    else
+      return false;
+  }
+
+  void
+  setInterestInterval( int interestInterval )
+  {
+    if (interestInterval < 0)
+      usage();
+    interestInterval_ = interestInterval;
+  }
+
+  void
+  setInterestCount( int interestCount )
+  {
+    if (interestCount < 0)
+      usage();
+    interestCount_ = interestCount;
+  }
+
+  void
+  setPrefix( char* prefix )
+  {
+    prefix_ = prefix;
+  }
+
+  void
+  setConfigurationFile( char* configurationFile )
+  {
+    configurationFile_ = configurationFile;
+  }
+
+private:
+
+  KeyChain keyChain_;
+  std::string programName_;
+  int interestInterval_;
+  int interestCount_;
+  std::string prefix_;
+  std::string configurationFile_;
+
+};
+
+int main( int argc, char* argv[] )
+{
+  int option;
+  NdnTrafficClient ndnTrafficClient (argv[0]);
+  while ((option = getopt(argc, argv, "hi:c:p:")) != -1) {
+    switch (option) {
+      case 'h'  :
+        ndnTrafficClient.usage();
+        break;
+      case 'i'  :
+        ndnTrafficClient.setInterestInterval(atoi(optarg));
+        break;
+      case 'c'  :
+        ndnTrafficClient.setInterestCount(atoi(optarg));
+        break;
+      case 'p'  :
+        ndnTrafficClient.setPrefix(optarg);
+        break;
+      default   :
+        ndnTrafficClient.usage();
+        break;
+    }
+  }
+
+  argc -= optind;
+  argv += optind;
+
+  if (argv[0] == NULL && !ndnTrafficClient.isPrefixSet() )
+    ndnTrafficClient.usage();
+
+  ndnTrafficClient.setConfigurationFile(argv[0]);
+
+  return 0;
+}
diff --git a/ndn-traffic-server.cpp b/ndn-traffic-server.cpp
new file mode 100644
index 0000000..fbc92ce
--- /dev/null
+++ b/ndn-traffic-server.cpp
@@ -0,0 +1,112 @@
+/**
+ *
+ * Copyright (C) 2013 University of Arizona.
+ * @author: Jerald Paul Abraham <jeraldabraham@email.arizona.edu>
+ *
+ */
+
+#include <ndn-cpp-dev/security/key-chain.hpp>
+
+using namespace ndn;
+
+class NdnTrafficServer
+{
+public:
+
+  NdnTrafficServer( char* programName )
+  {
+    programName_ = programName;
+    contentDelayTime_ = getDefaultContentDelayTime();
+    prefix_ = "";
+    configurationFile_ = "";
+  }
+
+  NdnTrafficServer()
+  : keyChain_()
+  {
+  }
+
+  void
+  usage()
+  {
+    std::cout << "\nUsage: " << programName_ << " Printing Usage"
+      "\n\n";
+    exit(1);
+  }
+
+  int
+  getDefaultContentDelayTime()
+  {
+    return 0;
+  }
+
+  bool
+  isPrefixSet()
+  {
+    if (prefix_.length() > 0)
+      return true;
+    else
+      return false;
+  }
+
+  void
+  setContentDelayTime( int contentDelayTime )
+  {
+    if (contentDelayTime < 0)
+      usage();
+    contentDelayTime_ = contentDelayTime;
+  }
+
+  void
+  setPrefix( char* prefix )
+  {
+    prefix_ = prefix;
+  }
+
+  void
+  setConfigurationFile( char* configurationFile )
+  {
+    configurationFile_ = configurationFile;
+  }
+
+private:
+
+  KeyChain keyChain_;
+  std::string programName_;
+  int contentDelayTime_;
+  std::string prefix_;
+  std::string configurationFile_;
+
+};
+
+int main( int argc, char* argv[] )
+{
+  int option;
+  NdnTrafficServer ndnTrafficServer (argv[0]);
+  while ((option = getopt(argc, argv, "hd:p:")) != -1) {
+    switch (option) {
+      case 'h'  :
+        ndnTrafficServer.usage();
+        break;
+      case 'd'  :
+        ndnTrafficServer.setContentDelayTime(atoi(optarg));
+        break;
+      case 'p'  :
+        ndnTrafficServer.setPrefix(optarg);
+        break;
+      default   :
+        ndnTrafficServer.usage();
+        break;
+    }
+  }
+
+  argc -= optind;
+  argv += optind;
+
+  if (argv[0] == NULL && !ndnTrafficServer.isPrefixSet() )
+    ndnTrafficServer.usage();
+
+  ndnTrafficServer.setConfigurationFile(argv[0]);
+
+  return 0;
+}
diff --git a/waf b/waf
new file mode 100755
index 0000000..78a44f3
--- /dev/null
+++ b/waf
Binary files differ
diff --git a/wscript b/wscript
new file mode 100644
index 0000000..bb8df5b
--- /dev/null
+++ b/wscript
@@ -0,0 +1,25 @@
+# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
+VERSION='0.3'
+NAME="ndn-traffic"
+
+def options(opt):
+    opt.load('compiler_cxx')
+
+def configure(conf):
+    conf.load("compiler_cxx")
+    conf.check_cfg(package='libndn-cpp-dev', args=['--cflags', '--libs'], uselib_store='NDN_CPP', mandatory=True)
+
+def build (bld):
+    bld.program (
+        features = 'cxx',
+        target   = 'ndntraffic',
+        source   = 'ndn-traffic-client.cpp',
+        use      = 'NDN_CPP',
+        )
+
+    bld.program (
+        features = 'cxx',
+        target   = 'ndntrafficserver',
+        source   = 'ndn-traffic-server.cpp',
+        use      = 'NDN_CPP',
+        )
