You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by al...@apache.org on 2017/11/14 01:48:39 UTC

[25/25] nifi-minifi-cpp git commit: MINIFICPP-250: Initial implementation fo CapturePacket Processor that uses lipcap.

MINIFICPP-250: Initial implementation fo CapturePacket Processor that uses lipcap.

This closes #170.

Signed-off-by: Aldrin Piri <al...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/commit/c0a788b3
Tree: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/tree/c0a788b3
Diff: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/diff/c0a788b3

Branch: refs/heads/master
Commit: c0a788b3539da254265f7a74b99289bdbc71af03
Parents: f529a5f
Author: Marc Parisi <ph...@apache.org>
Authored: Sun Oct 8 19:24:09 2017 -0400
Committer: Aldrin Piri <al...@apache.org>
Committed: Mon Nov 13 20:47:11 2017 -0500

----------------------------------------------------------------------
 .gitignore                                      |    1 -
 .travis.yml                                     |   12 +-
 CMakeLists.txt                                  |    6 +
 Extensions.md                                   |   27 +
 LICENSE                                         |   28 +
 README.md                                       |   13 +-
 cmake/BuildTests.cmake                          |    2 -
 cmake/Extensions.cmake                          |    2 +-
 cmake/FindPCAP.cmake                            |   40 +
 extensions/http-curl/CMakeLists.txt             |    1 -
 extensions/pcap/CMakeLists.txt                  |   94 +
 extensions/pcap/CapturePacket.cpp               |  188 ++
 extensions/pcap/CapturePacket.h                 |  168 ++
 extensions/pcap/PcapLoader.cpp                  |   29 +
 extensions/pcap/PcapLoader.h                    |   67 +
 libminifi/test/pcap-tests/CMakeLists.txt        |   44 +
 libminifi/test/pcap-tests/PcapTest.cpp          |  103 +
 libminifi/test/resources/TestPcap.yml           |   72 +
 libminifi/test/resources/TestPcapLinux.yml      |   72 +
 .../3rdParty/Getopt-for-Visual-Studio/README.md |   16 +
 .../3rdParty/Getopt-for-Visual-Studio/getopt.h  |  653 +++++++
 .../3rdParty/LightPcapNg/LightPcapNg/.gitignore |   13 +
 .../LightPcapNg/LightPcapNg/CMakeLists.txt      |   79 +
 .../LightPcapNg/LightPcapNg/LICENSE.txt         |   21 +
 .../3rdParty/LightPcapNg/LightPcapNg/README     |    8 +
 .../LightPcapNg/include/light_debug.h           |   96 +
 .../LightPcapNg/include/light_internal.h        |   64 +
 .../LightPcapNg/include/light_pcapng.h          |  136 ++
 .../LightPcapNg/include/light_pcapng_ext.h      |  102 +
 .../LightPcapNg/include/light_platform.h        |   59 +
 .../LightPcapNg/include/light_special.h         |   74 +
 .../LightPcapNg/include/light_types.h           |   41 +
 .../LightPcapNg/include/light_util.h            |   32 +
 .../LightPcapNg/LightPcapNg/src/Makefile        |   36 +
 .../LightPcapNg/src/light_advanced.c            |   68 +
 .../LightPcapNg/LightPcapNg/src/light_alloc.c   |   83 +
 .../LightPcapNg/src/light_internal.c            |  161 ++
 .../LightPcapNg/LightPcapNg/src/light_io.c      |   65 +
 .../LightPcapNg/src/light_manipulate.c          |  504 +++++
 .../LightPcapNg/LightPcapNg/src/light_option.c  |   66 +
 .../LightPcapNg/LightPcapNg/src/light_pcapng.c  |  551 ++++++
 .../LightPcapNg/src/light_pcapng_cont.c         |   77 +
 .../LightPcapNg/src/light_pcapng_ext.c          |  528 ++++++
 .../LightPcapNg/src/light_platform.c            |   89 +
 .../LightPcapNg/src/tests/features/Makefile     |   10 +
 .../LightPcapNg/src/tests/features/cluster.cc   |  173 ++
 .../LightPcapNg/src/tests/features/cluster.h    |   63 +
 .../src/tests/features/feature_list.txt         |    2 +
 .../LightPcapNg/src/tests/features/features.h   |   15 +
 .../src/tests/features/features_cluster.cc      |  166 ++
 .../src/tests/features/features_impl.c          |  106 ++
 .../LightPcapNg/src/tests/test_feature.c        |  176 ++
 .../src/tests/test_feature_advanced.c           |  171 ++
 .../LightPcapNg/src/tests/test_flow.c           |  123 ++
 .../LightPcapNg/src/tests/test_histogram.c      |   64 +
 .../LightPcapNg/src/tests/test_mem.c            |   86 +
 .../LightPcapNg/src/tests/test_read.c           |   47 +
 .../LightPcapNg/src/tests/test_read_packets.c   |   86 +
 .../LightPcapNg/src/tests/test_read_write.c     |   90 +
 .../src/tests/test_read_write_packets.c         |  131 ++
 .../LightPcapNg/src/tests/test_subcapture.c     |   83 +
 thirdparty/pcap++/3rdParty/LightPcapNg/Makefile |   42 +
 .../3rdParty/LightPcapNg/current_commit.git     |    1 +
 thirdparty/pcap++/3rdParty/debug-new/Makefile   |   29 +
 .../pcap++/3rdParty/debug-new/debug_new.cpp     |  572 ++++++
 .../pcap++/3rdParty/debug-new/debug_new.h       |   76 +
 .../dirent-for-Visual-Studio/.gitignore         |   23 +
 .../dirent-for-Visual-Studio/CMakeLists.txt     |   32 +
 .../3rdParty/dirent-for-Visual-Studio/ChangeLog |  117 ++
 .../3rdParty/dirent-for-Visual-Studio/LICENSE   |   22 +
 .../dirent-for-Visual-Studio/Makefile.linux     |   69 +
 .../3rdParty/dirent-for-Visual-Studio/README.md |   77 +
 .../dirent-for-Visual-Studio/examples/find.c    |  144 ++
 .../dirent-for-Visual-Studio/examples/locate.c  |  281 +++
 .../dirent-for-Visual-Studio/examples/ls.c      |   99 +
 .../examples/updatedb.c                         |  234 +++
 .../dirent-for-Visual-Studio/include/dirent.h   |  929 +++++++++
 .../tests/1/dir/readme.txt                      |    4 +
 .../dirent-for-Visual-Studio/tests/1/file       |    0
 .../tests/2/Testfile-1.2.3.dat                  |    0
 .../dirent-for-Visual-Studio/tests/2/file.txt   |    1 +
 .../dirent-for-Visual-Studio/tests/t-compile.c  |   30 +
 .../dirent-for-Visual-Studio/tests/t-dirent.c   |  389 ++++
 thirdparty/pcap++/Common++/Makefile             |   71 +
 thirdparty/pcap++/Common++/header/IpAddress.h   |  281 +++
 thirdparty/pcap++/Common++/header/IpUtils.h     |  124 ++
 thirdparty/pcap++/Common++/header/LRUList.h     |   98 +
 thirdparty/pcap++/Common++/header/Logger.h      |  195 ++
 thirdparty/pcap++/Common++/header/MacAddress.h  |  123 ++
 .../Common++/header/PcapPlusPlusVersion.h       |   52 +
 .../Common++/header/PlatformSpecificUtils.h     |   35 +
 .../pcap++/Common++/header/PointerVector.h      |  164 ++
 thirdparty/pcap++/Common++/header/SystemUtils.h |  344 ++++
 thirdparty/pcap++/Common++/src/IpAddress.cpp    |  223 +++
 thirdparty/pcap++/Common++/src/IpUtils.cpp      |  435 +++++
 thirdparty/pcap++/Common++/src/Logger.cpp       |   11 +
 thirdparty/pcap++/Common++/src/MacAddress.cpp   |   93 +
 .../pcap++/Common++/src/PcapPlusPlusVersion.cpp |   27 +
 thirdparty/pcap++/Common++/src/SystemUtils.cpp  |  270 +++
 thirdparty/pcap++/LICENSE                       |   24 +
 thirdparty/pcap++/Makefile                      |   65 +
 thirdparty/pcap++/Packet++/Makefile             |   61 +
 thirdparty/pcap++/Packet++/header/ArpLayer.h    |  140 ++
 thirdparty/pcap++/Packet++/header/DhcpLayer.h   |  751 ++++++++
 thirdparty/pcap++/Packet++/header/DnsLayer.h    |  785 ++++++++
 thirdparty/pcap++/Packet++/header/EthLayer.h    |  155 ++
 thirdparty/pcap++/Packet++/header/GreLayer.h    |  425 +++++
 thirdparty/pcap++/Packet++/header/HttpLayer.h   |  700 +++++++
 thirdparty/pcap++/Packet++/header/IPv4Layer.h   |  603 ++++++
 thirdparty/pcap++/Packet++/header/IPv6Layer.h   |  125 ++
 thirdparty/pcap++/Packet++/header/IcmpLayer.h   |  703 +++++++
 thirdparty/pcap++/Packet++/header/IgmpLayer.h   |  509 +++++
 thirdparty/pcap++/Packet++/header/Layer.h       |  167 ++
 thirdparty/pcap++/Packet++/header/MplsLayer.h   |  126 ++
 .../pcap++/Packet++/header/NullLoopbackLayer.h  |   92 +
 thirdparty/pcap++/Packet++/header/PPPoELayer.h  |  661 +++++++
 thirdparty/pcap++/Packet++/header/Packet.h      |  257 +++
 thirdparty/pcap++/Packet++/header/PacketUtils.h |   34 +
 .../pcap++/Packet++/header/PayloadLayer.h       |   78 +
 .../pcap++/Packet++/header/ProtocolType.h       |  225 +++
 thirdparty/pcap++/Packet++/header/RawPacket.h   |  378 ++++
 thirdparty/pcap++/Packet++/header/SSLCommon.h   |  495 +++++
 .../pcap++/Packet++/header/SSLHandshake.h       |  946 ++++++++++
 thirdparty/pcap++/Packet++/header/SSLLayer.h    |  528 ++++++
 thirdparty/pcap++/Packet++/header/SdpLayer.h    |  169 ++
 thirdparty/pcap++/Packet++/header/SipLayer.h    |  665 +++++++
 thirdparty/pcap++/Packet++/header/SllLayer.h    |  111 ++
 thirdparty/pcap++/Packet++/header/TcpLayer.h    |  416 +++++
 .../pcap++/Packet++/header/TcpReassembly.h      |  309 +++
 .../pcap++/Packet++/header/TextBasedProtocol.h  |  251 +++
 thirdparty/pcap++/Packet++/header/UdpLayer.h    |   93 +
 thirdparty/pcap++/Packet++/header/VlanLayer.h   |  141 ++
 thirdparty/pcap++/Packet++/header/VxlanLayer.h  |  137 ++
 thirdparty/pcap++/Packet++/src/ArpLayer.cpp     |   58 +
 thirdparty/pcap++/Packet++/src/DhcpLayer.cpp    |  390 ++++
 thirdparty/pcap++/Packet++/src/DnsLayer.cpp     | 1240 ++++++++++++
 thirdparty/pcap++/Packet++/src/EthLayer.cpp     |   99 +
 thirdparty/pcap++/Packet++/src/GreLayer.cpp     |  595 ++++++
 thirdparty/pcap++/Packet++/src/HttpLayer.cpp    | 1322 +++++++++++++
 thirdparty/pcap++/Packet++/src/IPv4Layer.cpp    |  609 ++++++
 thirdparty/pcap++/Packet++/src/IPv6Layer.cpp    |  112 ++
 thirdparty/pcap++/Packet++/src/IcmpLayer.cpp    |  721 +++++++
 thirdparty/pcap++/Packet++/src/IgmpLayer.cpp    |  600 ++++++
 thirdparty/pcap++/Packet++/src/Layer.cpp        |  103 +
 thirdparty/pcap++/Packet++/src/MplsLayer.cpp    |  151 ++
 .../pcap++/Packet++/src/NullLoopbackLayer.cpp   |   79 +
 thirdparty/pcap++/Packet++/src/PPPoELayer.cpp   |  414 ++++
 thirdparty/pcap++/Packet++/src/Packet.cpp       |  504 +++++
 thirdparty/pcap++/Packet++/src/PacketUtils.cpp  |  118 ++
 thirdparty/pcap++/Packet++/src/PayloadLayer.cpp |   26 +
 thirdparty/pcap++/Packet++/src/RawPacket.cpp    |  200 ++
 thirdparty/pcap++/Packet++/src/SSLHandshake.cpp | 1765 ++++++++++++++++++
 thirdparty/pcap++/Packet++/src/SSLLayer.cpp     |  314 ++++
 thirdparty/pcap++/Packet++/src/SdpLayer.cpp     |  136 ++
 thirdparty/pcap++/Packet++/src/SipLayer.cpp     | 1261 +++++++++++++
 thirdparty/pcap++/Packet++/src/SllLayer.cpp     |  129 ++
 thirdparty/pcap++/Packet++/src/TcpLayer.cpp     |  387 ++++
 .../pcap++/Packet++/src/TcpReassembly.cpp       |  695 +++++++
 .../pcap++/Packet++/src/TextBasedProtocol.cpp   |  651 +++++++
 thirdparty/pcap++/Packet++/src/UdpLayer.cpp     |  122 ++
 thirdparty/pcap++/Packet++/src/VlanLayer.cpp    |   81 +
 thirdparty/pcap++/Packet++/src/VxlanLayer.cpp   |   64 +
 thirdparty/pcap++/Pcap++/Makefile               |   95 +
 thirdparty/pcap++/Pcap++/header/DpdkDevice.h    |  747 ++++++++
 .../pcap++/Pcap++/header/DpdkDeviceList.h       |  198 ++
 thirdparty/pcap++/Pcap++/header/NetworkUtils.h  |   90 +
 thirdparty/pcap++/Pcap++/header/PcapDevice.h    |  101 +
 .../pcap++/Pcap++/header/PcapFileDevice.h       |  480 +++++
 thirdparty/pcap++/Pcap++/header/PcapFilter.h    |  690 +++++++
 .../pcap++/Pcap++/header/PcapLiveDevice.h       |  405 ++++
 .../pcap++/Pcap++/header/PcapLiveDeviceList.h   |  101 +
 .../pcap++/Pcap++/header/PcapRemoteDevice.h     |  147 ++
 .../pcap++/Pcap++/header/PcapRemoteDeviceList.h |  152 ++
 thirdparty/pcap++/Pcap++/header/PfRingDevice.h  |  345 ++++
 .../pcap++/Pcap++/header/PfRingDeviceList.h     |   68 +
 .../pcap++/Pcap++/header/WinPcapLiveDevice.h    |   64 +
 thirdparty/pcap++/Pcap++/src/DpdkDevice.cpp     | 1208 ++++++++++++
 thirdparty/pcap++/Pcap++/src/DpdkDeviceList.cpp |  378 ++++
 thirdparty/pcap++/Pcap++/src/NetworkUtils.cpp   |  484 +++++
 thirdparty/pcap++/Pcap++/src/PcapDevice.cpp     |   98 +
 thirdparty/pcap++/Pcap++/src/PcapFileDevice.cpp |  796 ++++++++
 thirdparty/pcap++/Pcap++/src/PcapFilter.cpp     |  370 ++++
 thirdparty/pcap++/Pcap++/src/PcapLiveDevice.cpp |  833 +++++++++
 .../pcap++/Pcap++/src/PcapLiveDeviceList.cpp    |  309 +++
 .../pcap++/Pcap++/src/PcapRemoteDevice.cpp      |  140 ++
 .../pcap++/Pcap++/src/PcapRemoteDeviceList.cpp  |  233 +++
 thirdparty/pcap++/Pcap++/src/PfRingDevice.cpp   |  887 +++++++++
 .../pcap++/Pcap++/src/PfRingDeviceList.cpp      |  104 ++
 .../pcap++/Pcap++/src/WinPcapLiveDevice.cpp     |  111 ++
 thirdparty/pcap++/README.md                     |  163 ++
 thirdparty/pcap++/appveyor.yml                  |   49 +
 thirdparty/pcap++/configure-linux.sh            |  255 +++
 thirdparty/pcap++/configure-mac_os_x.sh         |   84 +
 thirdparty/pcap++/configure-windows-mingw.bat   |  288 +++
 .../pcap++/configure-windows-visual-studio.bat  |  202 ++
 thirdparty/pcap++/mk/PcapPlusPlus.mk.common     |   17 +
 thirdparty/pcap++/mk/PcapPlusPlus.mk.dpdk       |   15 +
 thirdparty/pcap++/mk/PcapPlusPlus.mk.linux      |    9 +
 thirdparty/pcap++/mk/PcapPlusPlus.mk.macosx     |    9 +
 thirdparty/pcap++/mk/PcapPlusPlus.mk.mingw-w64  |   15 +
 thirdparty/pcap++/mk/PcapPlusPlus.mk.mingw32    |   15 +
 thirdparty/pcap++/mk/PcapPlusPlus.mk.pf_ring    |   12 +
 thirdparty/pcap++/mk/install.sh                 |   48 +
 thirdparty/pcap++/mk/platform.mk.linux          |   23 +
 thirdparty/pcap++/mk/platform.mk.macosx         |   23 +
 thirdparty/pcap++/mk/platform.mk.mingw-w64      |   21 +
 thirdparty/pcap++/mk/platform.mk.mingw32        |   21 +
 thirdparty/pcap++/mk/setup-dpdk.sh.template     |  119 ++
 thirdparty/pcap++/mk/uninstall.sh               |   18 +
 thirdparty/pcap++/mk/vs2015/ArpSpoofing.vcxproj |  196 ++
 .../mk/vs2015/ArpSpoofing.vcxproj.filters       |   22 +
 thirdparty/pcap++/mk/vs2015/Arping.vcxproj      |  196 ++
 .../pcap++/mk/vs2015/Arping.vcxproj.filters     |   22 +
 thirdparty/pcap++/mk/vs2015/Common++.vcxproj    |  210 +++
 .../pcap++/mk/vs2015/Common++.vcxproj.filters   |   63 +
 thirdparty/pcap++/mk/vs2015/DNSResolver.vcxproj |  196 ++
 .../mk/vs2015/DNSResolver.vcxproj.filters       |   22 +
 thirdparty/pcap++/mk/vs2015/DnsSpoofing.vcxproj |  196 ++
 .../mk/vs2015/DnsSpoofing.vcxproj.filters       |   22 +
 .../pcap++/mk/vs2015/GitInfoPropertySheet.props |   11 +
 .../pcap++/mk/vs2015/HttpAnalyzer.vcxproj       |  200 ++
 .../mk/vs2015/HttpAnalyzer.vcxproj.filters      |   30 +
 .../mk/vs2015/IcmpFileTransfer-catcher.vcxproj  |  203 ++
 .../IcmpFileTransfer-catcher.vcxproj.filters    |   35 +
 .../mk/vs2015/IcmpFileTransfer-pitcher.vcxproj  |  203 ++
 .../IcmpFileTransfer-pitcher.vcxproj.filters    |   35 +
 thirdparty/pcap++/mk/vs2015/LightPcapNg.vcxproj |  173 ++
 .../mk/vs2015/LightPcapNg.vcxproj.filters       |   75 +
 thirdparty/pcap++/mk/vs2015/Packet++.vcxproj    |  246 +++
 .../pcap++/mk/vs2015/Packet++.vcxproj.filters   |  195 ++
 .../pcap++/mk/vs2015/Packet++Test.vcxproj       |  180 ++
 .../mk/vs2015/Packet++Test.vcxproj.filters      |   25 +
 thirdparty/pcap++/mk/vs2015/Pcap++.vcxproj      |  220 +++
 .../pcap++/mk/vs2015/Pcap++.vcxproj.filters     |   99 +
 thirdparty/pcap++/mk/vs2015/Pcap++Test.vcxproj  |  197 ++
 .../pcap++/mk/vs2015/Pcap++Test.vcxproj.filters |   22 +
 .../pcap++/mk/vs2015/PcapPlusPlus-Examples.sln  |  138 ++
 thirdparty/pcap++/mk/vs2015/PcapPlusPlus.sln    |   78 +
 .../mk/vs2015/PcapPlusPlusPropertySheet.props   |   16 +
 .../PcapPlusPlusPropertySheet.props.template    |   12 +
 thirdparty/pcap++/mk/vs2015/PcapPrinter.vcxproj |  196 ++
 .../mk/vs2015/PcapPrinter.vcxproj.filters       |   22 +
 thirdparty/pcap++/mk/vs2015/PcapSearch.vcxproj  |  196 ++
 .../pcap++/mk/vs2015/PcapSearch.vcxproj.filters |   22 +
 .../pcap++/mk/vs2015/PcapSplitter.vcxproj       |  202 ++
 .../mk/vs2015/PcapSplitter.vcxproj.filters      |   34 +
 thirdparty/pcap++/mk/vs2015/SSLAnalyzer.vcxproj |  200 ++
 .../mk/vs2015/SSLAnalyzer.vcxproj.filters       |   28 +
 .../pcap++/mk/vs2015/TcpReassembly.vcxproj      |  196 ++
 .../mk/vs2015/TcpReassembly.vcxproj.filters     |   22 +
 .../mk/vs2015/Tutorial-HelloWorld.vcxproj       |  188 ++
 .../vs2015/Tutorial-HelloWorld.vcxproj.filters  |   22 +
 .../mk/vs2015/Tutorial-LiveTraffic.vcxproj      |  188 ++
 .../vs2015/Tutorial-LiveTraffic.vcxproj.filters |   22 +
 .../vs2015/Tutorial-PacketCraftAndEdit.vcxproj  |  188 ++
 .../Tutorial-PacketCraftAndEdit.vcxproj.filters |   22 +
 .../mk/vs2015/Tutorial-PacketParsing.vcxproj    |  188 ++
 .../Tutorial-PacketParsing.vcxproj.filters      |   22 +
 .../pcap++/mk/vs2015/Tutorial-PcapFiles.vcxproj |  188 ++
 .../vs2015/Tutorial-PcapFiles.vcxproj.filters   |   22 +
 thirdparty/pcap++/mk/vs2015/Tutorials.sln       |   68 +
 thirdparty/pcap++/mk/vs2015/fetch-git-info.bat  |   17 +
 262 files changed, 52988 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c0a788b3/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 0d62996..c687dee 100644
--- a/.gitignore
+++ b/.gitignore
@@ -35,7 +35,6 @@ assemblies
 CMakeCache.txt
 CMakeFiles
 CMakeScripts
-Makefile
 cmake_install.cmake
 install_manifest.txt
 CTestTestfile.cmake

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c0a788b3/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 1bec32e..d17cece 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -20,6 +20,9 @@ cache:
   - $HOME/Library/Caches/Homebrew
   timeout: 300
 
+env:
+   CMAKE_BUILD_OPTIONS="-DENABLE_PCAP=TRUE"
+
 matrix:
     include:
     - os: linux
@@ -42,6 +45,7 @@ matrix:
           - liblua5.1-0-dev
           - libusb-1.0-0-dev
           - libpng12-dev
+          - libpcap-dev
       before_install:
         # Establish updated toolchain as default
         - sudo unlink /usr/bin/gcc && sudo ln -s /usr/bin/gcc-4.8 /usr/bin/gcc
@@ -49,7 +53,7 @@ matrix:
     - os: osx
       osx_image: xcode7.3
       env:
-        - CMAKE_BUILD_OPTIONS="-DENABLE_LUA_SCRIPTING=1"
+        - CMAKE_BUILD_OPTIONS="${CMAKE_BUILD_OPTIONS} -DENABLE_LUA_SCRIPTING=1"
       # https://docs.travis-ci.com/user/osx-ci-environment/#Homebrew
       before_install:
         - brew update
@@ -64,10 +68,11 @@ matrix:
         - package='lua'; [[ $(brew ls --versions ${package}) ]] && { brew outdated ${package} || brew upgrade ${package}; } || brew install ${package}
         - package='libusb'; [[ $(brew ls --versions ${package}) ]] && { brew outdated ${package} || brew upgrade ${package}; } || brew install ${package}
         - package='libpng'; [[ $(brew ls --versions ${package}) ]] && { brew outdated ${package} || brew upgrade ${package}; } || brew install ${package}
+        - package='libpcap'; [[ $(brew ls --versions ${package}) ]] && { brew outdated ${package} || brew upgrade ${package}; } || brew install ${package}
     - os: osx
       osx_image: xcode8.3
       env:
-        - CMAKE_BUILD_OPTIONS="-DENABLE_LUA_SCRIPTING=1"
+        - CMAKE_BUILD_OPTIONS="${CMAKE_BUILD_OPTIONS} -DENABLE_LUA_SCRIPTING=1"
       # https://docs.travis-ci.com/user/osx-ci-environment/#Homebrew
       before_install:
         - brew update
@@ -82,6 +87,7 @@ matrix:
         - package='lua'; [[ $(brew ls --versions ${package}) ]] && { brew outdated ${package} || brew upgrade ${package}; } || brew install ${package}
         - package='libusb'; [[ $(brew ls --versions ${package}) ]] && { brew outdated ${package} || brew upgrade ${package}; } || brew install ${package}
         - package='libpng'; [[ $(brew ls --versions ${package}) ]] && { brew outdated ${package} || brew upgrade ${package}; } || brew install ${package}
+        - package='libpcap'; [[ $(brew ls --versions ${package}) ]] && { brew outdated ${package} || brew upgrade ${package}; } || brew install ${package}
 
 script:
-  - mkdir ./build && cd ./build && cmake .. ${CMAKE_BUILD_OPTIONS} && make -j2 VERBOSE=1 && make test ARGS="-j2 --output-on-failure" && make linter && make apache-rat && make docs
+  - mkdir ./build && cd ./build && cmake .. ${CMAKE_BUILD_OPTIONS} && make -j2 VERBOSE=1 && sudo make test ARGS="-j2 --output-on-failure" && make linter && make apache-rat && make docs

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c0a788b3/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1eaa6ce..5a9c97b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -143,12 +143,18 @@ if (ENABLE_GPS)
 	createExtension(GPS-EXTENSION "GPS EXTENSIONS" "Enables LibGPS Functionality and the GetGPS processor." "extensions/gps" "${TEST_DIR}/gps-tests")
 endif(ENABLE_GPS)
 
+option(ENABLE_PCAP "Enables the PCAP extension." OFF)
+if(ENABLE_PCAP)
+	createExtension(PCAP-EXTENSION "PCAP EXTENSIONS" "Enables libPCAP Functionality and the PacketCapture processor." "extensions/pcap" "${TEST_DIR}/pcap-tests")
+endif(ENABLE_PCAP)
+
 ## Scripting extensions
 option(DISABLE_SCRIPTING "Disables the scripting extensions." OFF)
 if (NOT DISABLE_SCRIPTING)
     createExtension(SCRIPTING-EXTENSIONS "SCRIPTING EXTENSIONS" "This enables scripting" "extensions/script" "${TEST_DIR}/script-tests")
 endif()
 
+
 ## USB camera extensions
 option(ENABLE_USB_CAMERA "Enables USB camera support." OFF)
 if (ENABLE_USB_CAMERA)

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c0a788b3/Extensions.md
----------------------------------------------------------------------
diff --git a/Extensions.md b/Extensions.md
index 95625c5..86a4f59 100644
--- a/Extensions.md
+++ b/Extensions.md
@@ -109,3 +109,30 @@ To use your C function, you must define the sequence "Class Loader Functions" in
 
 Note that for the case of HTTP-CURL we have made it so that if libcURL exists and it is not disabled, the createHttpCurlFactory function is automatically loaded. To do this use the function FlowConfiguration::add_static_func -- this will add your function to the list of registered resources and will do so in a thread safe way. If you take this approach you cannot disable your library with an argument within the YAML file.
 
+
+#Enabling Modules
+
+#Enabling PacketCapture
+
+Packet Capture can be enabled to support capturing pcap files from all network interfaces on the machine. To do enable this, you must type the following when building MiNiFi C++
+```
+	cmake -DENABLE_PCAP=TRUE ..
+```
+
+The cmake process will include a notification that the third party dependency, PcapPlusPlus has created its platform specific modules. 
+
+You will see a message such as this when building. This configuration script will contain the name of your platforma and be an indication that 
+the configuration was successful:
+
+		****************************************
+		PcapPlusPlus Linux configuration script 
+		****************************************
+
+When the PCAP extension is built, you will be able to use the PacketCapture Processor, which has two major options: 'Batch Size' and 'Batch Directory'
+
+Batch Size will limit the number of packets taht are combined within a given PCAP. Batch Directory will allow the user to specify the scratch directory for network data to be written to. 
+
+Note that if Batch Directory is not specified, /tmp/ will be used.
+
+*Running PcapTests requires root privileges on Linux.
+

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c0a788b3/LICENSE
----------------------------------------------------------------------
diff --git a/LICENSE b/LICENSE
index 7ba88e2..dd8fff1 100644
--- a/LICENSE
+++ b/LICENSE
@@ -629,6 +629,34 @@ BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 SOFTWARE.
+=======================================================================
+This project includes PcapPlusPlus (https://github.com/seladb/PcapPlusPlus)
+which is available under the unlicense
+
+This is free and unencumbered software released into the public domain.
+
+Anyone is free to copy, modify, publish, use, compile, sell, or
+distribute this software, either in source code form or as a compiled
+binary, for any purpose, commercial or non-commercial, and by any
+means.
+
+In jurisdictions that recognize copyright laws, the author or authors
+of this software dedicate any and all copyright interest in the
+software to the public domain. We make this dedication for the benefit
+of the public at large and to the detriment of our heirs and
+successors. We intend this dedication to be an overt act of
+relinquishment in perpetuity of all present and future rights to this
+software under copyright law.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+For more information, please refer to <http://unlicense.org>
 ========================================================================
 This projects includes libarchive bundle (https://www.libarchive.org)
 which is available under a BSD License by Tim Kientzle and others

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c0a788b3/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index cbe577b..b4ff57e 100644
--- a/README.md
+++ b/README.md
@@ -91,7 +91,6 @@ or greater is recommended.
 * Lua and development headers -- Optional, unless Lua support is enabled
 * libgps-dev -- Required if building libGPS support
 
-
 ** NOTE: IF ROCKSDB IS NOT INSTALLED, IT WILL BE BUILT FROM THE THIRD PARTY
 DIRECTORY UNLESS YOU SPECIFY -DDISABLE_ROCKSDB=true WITH CMAKE ***
 
@@ -107,6 +106,7 @@ DIRECTORY UNLESS YOU SPECIFY -DDISABLE_ROCKSDB=true WITH CMAKE ***
 * Lua -- Optional, unless Lua support is enabled
 * libusb -- Optional, unless USB Camera support is enabled
 * libpng -- Optional, unless USB Camera support is enabled
+* libpcap -- Optional, unless ENABLE_PCAP specified
 
 The needed dependencies can be installed with the following commands for:
 
@@ -135,10 +135,10 @@ $ # (Optional) for building docker image
 $ yum install docker
 $ # (Optional) for system integration tests
 $ yum install docker python-virtualenv
-
 # If building with GPS support
 $ yum install gpsd-devel
-
+$ # (Optional) for PacketCapture Processor
+$ yum install libpcap-devel
 ```
 
 Aptitude based Linux Distributions
@@ -161,10 +161,10 @@ $ # (Optional) for building docker image
 $ apt-get install docker.io
 $ # (Optional) for system integration tests
 $ apt-get install docker.io python-virtualenv
-
 # If building with GPS support
 $ apt-get install libgps-dev
-
+$ # (Optional) for PacketCapture Processor
+$ apt-get install libpcap-dev
 ```
 
 OS X Using Homebrew (with XCode Command Line Tools installed)
@@ -185,9 +185,10 @@ $ brew install libusb libpng
 $ # (Optional) for building docker image/running system integration tests
 $ # Install docker using instructions at https://docs.docker.com/docker-for-mac/install/
 $ sudo pip install virtualenv
-
 # If building with GPS support
 $ brew install gpsd
+$ # (Optional) for PacketCapture Processor
+$ sudo brew install libpcap
 ```
 
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c0a788b3/cmake/BuildTests.cmake
----------------------------------------------------------------------
diff --git a/cmake/BuildTests.cmake b/cmake/BuildTests.cmake
index 90e910f..5b5fa0f 100644
--- a/cmake/BuildTests.cmake
+++ b/cmake/BuildTests.cmake
@@ -60,7 +60,6 @@ function(createTests testName)
     target_link_libraries(${testName} ${Boost_FILESYSTEM_LIBRARY})
 endfunction()
 
-
 enable_testing(test)
 
 SET(SPD_LIB spd_lib)
@@ -104,7 +103,6 @@ message("-- Finished building ${INT_TEST_COUNT} integration test file(s)...")
 
 get_property(extensions GLOBAL PROPERTY EXTENSION-TESTS)
 foreach(EXTENSION ${extensions})
-	message("Adding ${EXTENSION} ? ")
 	add_subdirectory(${EXTENSION})
 endforeach()
 

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c0a788b3/cmake/Extensions.cmake
----------------------------------------------------------------------
diff --git a/cmake/Extensions.cmake b/cmake/Extensions.cmake
index 0a1895a..b945f0b 100644
--- a/cmake/Extensions.cmake
+++ b/cmake/Extensions.cmake
@@ -62,4 +62,4 @@ function(createExtension extensionGuard extensionName description dirName)
 			add_subdirectory(${ARGV6})	
 		endif()
     endif()
-endfunction(createExtension)
\ No newline at end of file
+endfunction()

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c0a788b3/cmake/FindPCAP.cmake
----------------------------------------------------------------------
diff --git a/cmake/FindPCAP.cmake b/cmake/FindPCAP.cmake
new file mode 100644
index 0000000..7f5ac8b
--- /dev/null
+++ b/cmake/FindPCAP.cmake
@@ -0,0 +1,40 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#  Variables defined here
+#  PCAP_FOUND              System has PCAP libs/headers
+#  PCAP_LIBRARIES          The PCAP libraries
+#  PCAP_INCLUDE_DIR        The location of PCAP headers
+
+find_path(PCAP_INCLUDE_DIR
+  NAMES pcap.h
+  HINTS ${PCAP_ROOT_DIR}/include)
+
+find_library(PCAP_LIBRARIES
+  NAMES pcap
+  HINTS ${PCAP_ROOT_DIR}/lib)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(
+  PCAP
+  DEFAULT_MSG
+  PCAP_LIBRARIES
+  PCAP_INCLUDE_DIR)
+
+mark_as_advanced(
+  PCAP_ROOT_DIR
+  PCAP_LIBRARIES
+  PCAP_INCLUDE_DIR)

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c0a788b3/extensions/http-curl/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/extensions/http-curl/CMakeLists.txt b/extensions/http-curl/CMakeLists.txt
index cd9f3ba..0458504 100644
--- a/extensions/http-curl/CMakeLists.txt
+++ b/extensions/http-curl/CMakeLists.txt
@@ -21,7 +21,6 @@ find_package(CURL REQUIRED)
 
 set(CMAKE_EXE_LINKER_FLAGS "-Wl,--export-all-symbols")
 set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--export-symbols")
-set(CMAKE_CXX_VISIBILITY_PRESET default)
 
 include_directories(../../libminifi/include  ../../libminifi/include/core/yaml  ../../libminifi/include/core  ../../thirdparty/spdlog-20170710/include ../../thirdparty/concurrentqueue ../../thirdparty/yaml-cpp-yaml-cpp-0.5.3/include ../../thirdparty/civetweb-1.9.1/include ../../thirdparty/jsoncpp/include  ../../thirdparty/)
 include_directories(protocols client processors sitetosite)

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c0a788b3/extensions/pcap/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/extensions/pcap/CMakeLists.txt b/extensions/pcap/CMakeLists.txt
new file mode 100644
index 0000000..61ec6bc
--- /dev/null
+++ b/extensions/pcap/CMakeLists.txt
@@ -0,0 +1,94 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+find_package(PCAP REQUIRED)
+
+set(CMAKE_EXE_LINKER_FLAGS "-Wl,--export-all-symbols")
+set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--export-symbols")
+
+include_directories(../../libminifi/include ../../libminifi/include/c2  ../../libminifi/include/c2/protocols/  ../../libminifi/include/core/state ./libminifi/include/core/statemanagement/metrics  ../../libminifi/include/core/yaml  ../../libminifi/include/core  ../../thirdparty/spdlog-20170710/include ../../thirdparty/concurrentqueue ../../thirdparty/yaml-cpp-yaml-cpp-0.5.3/include ../../thirdparty/civetweb-1.9.1/include ../../thirdparty/jsoncpp/include  ../../thirdparty/)
+include_directories(/usr/include/netinet)
+
+set(PCAPPLUSPLUS_TP_BASE_DIR "${CMAKE_SOURCE_DIR}/thirdparty/pcap++/")
+set(PCAPPLUSPLUS_BASE_DIR "${CMAKE_CURRENT_BINARY_DIR}/pcap++" )
+set(PCAPPLUSPLUS_BASE_DIR PCAPPLUSPLUS_BASE_DIR PARENT_SCOPE)
+set(PCAPPLUSPLUS_HEADER_DIR "${PCAPPLUSPLUS_BASE_DIR}/Dist/header" )
+set(PCAPPLUSPLUS_HEADER_DIR PCAPPLUSPLUS_HEADER_DIR PARENT_SCOPE)
+
+include_directories(${PCAPPLUSPLUS_HEADER_DIR})
+
+file(COPY ${PCAPPLUSPLUS_TP_BASE_DIR} DESTINATION ${PCAPPLUSPLUS_BASE_DIR})
+
+if (WIN32)
+	execute_process(COMMAND  ${PCAPPLUSPLUS_BASE_DIR}/configure-windows-visual-studio.bat WORKING_DIRECTORY  ${PCAPPLUSPLUS_BASE_DIR})
+elseif (APPLE)
+	execute_process(COMMAND  ${PCAPPLUSPLUS_BASE_DIR}/configure-mac_os_x.sh  WORKING_DIRECTORY  ${PCAPPLUSPLUS_BASE_DIR})
+else ()
+	execute_process(COMMAND  ${PCAPPLUSPLUS_BASE_DIR}/configure-linux.sh --default WORKING_DIRECTORY  ${PCAPPLUSPLUS_BASE_DIR})
+endif ()
+
+add_custom_target(
+   pcappp
+   COMMAND make libs
+   WORKING_DIRECTORY ${PCAPPLUSPLUS_BASE_DIR}
+)
+
+set(PCAPPLUSPLUS_LIB_DIR "${PCAPPLUSPLUS_BASE_DIR}/Dist")
+
+file(GLOB SOURCES  "*.cpp")
+
+add_library(minifi-pcap STATIC ${SOURCES})
+set_property(TARGET minifi-pcap PROPERTY POSITION_INDEPENDENT_CODE ON)
+if(THREADS_HAVE_PTHREAD_ARG)
+  target_compile_options(PUBLIC minifi-pcap "-pthread")
+endif()
+if(CMAKE_THREAD_LIBS_INIT)
+  target_link_libraries(minifi-pcap "${CMAKE_THREAD_LIBS_INIT}")
+endif()
+
+add_dependencies(minifi-pcap pcappp)
+
+if (WIN32)
+	target_link_libraries (minifi-pcap ${PCAP_LIBRARIES} ${PCAPPLUSPLUS_LIB_DIR}/libPcap++.a ${PCAPPLUSPLUS_LIB_DIR}/libPacket++.a ${PCAPPLUSPLUS_LIB_DIR}/libCommon++.a )
+    set_target_properties(minifi-pcap PROPERTIES
+        LINK_FLAGS "/WHOLEARCHIVE"
+    )
+elseif (APPLE)
+	target_link_libraries (minifi-pcap -Wl,-all_load ${PCAP_LIBRARIES} ${PCAPPLUSPLUS_LIB_DIR}/libPcap++.a ${PCAPPLUSPLUS_LIB_DIR}/libPacket++.a ${PCAPPLUSPLUS_LIB_DIR}/libCommon++.a )
+	target_link_libraries(minifi-pcap "-framework CoreFoundation")
+	target_link_libraries(minifi-pcap "-framework SystemConfiguration")
+	set_target_properties(minifi-pcap PROPERTIES LINK_FLAGS "-Wl,-F/Library/Frameworks -Wl,-all_load")
+else ()
+	target_link_libraries (minifi-pcap ${PCAPPLUSPLUS_LIB_DIR}/libPcap++.a ${PCAPPLUSPLUS_LIB_DIR}/libPacket++.a ${PCAPPLUSPLUS_LIB_DIR}/libCommon++.a ${PCAP_LIBRARIES})
+endif ()
+
+# Include UUID
+find_package(UUID REQUIRED)
+target_link_libraries(minifi-pcap ${LIBMINIFI} ${UUID_LIBRARIES} ${JSONCPP_LIB})
+add_dependencies(minifi-pcap jsoncpp_project)
+find_package(OpenSSL REQUIRED)
+include_directories(${OPENSSL_INCLUDE_DIR})
+target_link_libraries(minifi-pcap ${CMAKE_DL_LIBS} )
+find_package(ZLIB REQUIRED)
+include_directories(${ZLIB_INCLUDE_DIRS})
+target_link_libraries (minifi-pcap ${ZLIB_LIBRARIES})
+
+SET (PCAP-EXTENSION minifi-pcap PARENT_SCOPE)
+register_extension(minifi-pcap)
+

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c0a788b3/extensions/pcap/CapturePacket.cpp
----------------------------------------------------------------------
diff --git a/extensions/pcap/CapturePacket.cpp b/extensions/pcap/CapturePacket.cpp
new file mode 100644
index 0000000..0e6bdbd
--- /dev/null
+++ b/extensions/pcap/CapturePacket.cpp
@@ -0,0 +1,188 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <regex.h>
+#include <uuid/uuid.h>
+#include <memory>
+#include <algorithm>
+#include <cctype>
+#include <cstdint>
+#include <cstring>
+#include <iostream>
+#include <iterator>
+#include <map>
+#include <set>
+#include <string>
+#include <utility>
+#include <vector>
+
+#include "PcapLiveDeviceList.h"
+#include "PcapFilter.h"
+#include "PcapPlusPlusVersion.h"
+#include "PcapFileDevice.h"
+#include "PlatformSpecificUtils.h"
+#include "core/FlowFile.h"
+#include "core/logging/Logger.h"
+#include "core/ProcessContext.h"
+#include "core/Relationship.h"
+#include "CapturePacket.h"
+#include "ResourceClaim.h"
+#include "utils/StringUtils.h"
+#include "utils/ByteArrayCallback.h"
+
+namespace org {
+namespace apache {
+namespace nifi {
+namespace minifi {
+namespace processors {
+
+std::shared_ptr<utils::IdGenerator> CapturePacket::id_generator_ = utils::IdGenerator::getIdGenerator();
+core::Property CapturePacket::BaseDir("Base Directory", "Scratch directory for PCAP files", "/tmp/");
+core::Property CapturePacket::BatchSize("Batch Size", "The number of packets to combine within a given PCAP", "50");
+
+const char *CapturePacket::ProcessorName = "CapturePacket";
+
+std::string CapturePacket::generate_new_pcap(const std::string &base_path) {
+  std::string path = base_path;
+  // can use relaxed for a counter
+  int cnt = num_.fetch_add(1, std::memory_order_relaxed);
+  std::string filename = std::to_string(cnt);
+  path.append(filename);
+  return path;
+}
+
+void CapturePacket::packet_callback(pcpp::RawPacket* packet, pcpp::PcapLiveDevice* dev, void* data) {
+  // parse the packet
+  PacketMovers* capture_mechanism = (PacketMovers*) data;
+
+  CapturePacketMechanism *capture;
+
+  if (capture_mechanism->source.try_dequeue(capture)) {
+
+    // if needed - write the packet to the output pcap file
+
+    if (capture->writer_ != nullptr) {
+      capture->writer_->writePacket(*packet);
+
+      if (capture->incrementAndCheck()) {
+
+        capture->writer_->close();
+
+        capture_mechanism->sink.enqueue(capture);
+
+        capture_mechanism->source.enqueue(create_new_capture(capture->getBasePath(), capture->getMaxSize()));
+      } else {
+        capture_mechanism->source.enqueue(capture);
+      }
+
+    }
+  }
+}
+
+CapturePacketMechanism *CapturePacket::create_new_capture(const std::string &base_path, int64_t *max_size) {
+  CapturePacketMechanism *new_capture = new CapturePacketMechanism(base_path, generate_new_pcap(base_path), max_size);
+  new_capture->writer_ = new pcpp::PcapFileWriterDevice(new_capture->getFile().c_str());
+  if (!new_capture->writer_->open())
+    throw std::exception();
+
+  return new_capture;
+}
+
+std::atomic<int> CapturePacket::num_(0);
+core::Relationship CapturePacket::Success("success", "All files are routed to success");
+void CapturePacket::initialize() {
+  logger_->log_info("Initializing CapturePacket");
+
+  // Set the supported properties
+  std::set<core::Property> properties;
+  properties.insert(BatchSize);
+  properties.insert(BaseDir);
+  setSupportedProperties(properties);
+  // Set the supported relationships
+  std::set<core::Relationship> relationships;
+  relationships.insert(Success);
+  setSupportedRelationships(relationships);
+}
+
+void CapturePacket::onSchedule(const std::shared_ptr<core::ProcessContext> &context, const std::shared_ptr<core::ProcessSessionFactory> &sessionFactory) {
+
+  std::string value;
+  if (context->getProperty(BatchSize.getName(), value)) {
+    core::Property::StringToInt(value, pcap_batch_size_);
+  }
+  value = "";
+  if (context->getProperty(BaseDir.getName(), value)) {
+    base_dir_ = value;
+  }
+  if (IsNullOrEmpty(base_dir_)) {
+    base_dir_ = "/tmp/";
+  }
+
+  uuid_t dir_ext;
+
+  id_generator_->generate(dir_ext);
+
+  char id[37];
+  uuid_unparse(dir_ext, id);
+  base_path_ = id;
+
+  const std::vector<pcpp::PcapLiveDevice*>& devList = pcpp::PcapLiveDeviceList::getInstance().getPcapLiveDevicesList();
+  for (auto iter : devList) {
+    const std::string name = iter->getName();
+
+    if (!iter->open()) {
+      logger_->log_error("Could not open device %s", name);
+      continue;
+    }
+    device_list_.push_back(iter);
+    CapturePacketMechanism *aa = create_new_capture(getPath(), &pcap_batch_size_);
+    logger_->log_debug("Creating packet capture in %s",aa->getFile());
+    mover->source.enqueue(aa);
+  }
+  if (IsNullOrEmpty(devList)){
+    logger_->log_error("Could not open any devices");
+    throw std::exception();
+  }
+  for (auto iter : devList) {
+    logger_->log_debug("Starting capture on %s", iter->getName());
+    iter->startCapture(packet_callback, mover.get());
+  }
+}
+
+CapturePacket::~CapturePacket() {
+}
+
+void CapturePacket::onTrigger(const std::shared_ptr<core::ProcessContext> &context, const std::shared_ptr<core::ProcessSession> &session) {
+  CapturePacketMechanism *capture;
+  if (mover->sink.try_dequeue(capture)) {
+    logger_->log_debug("Received packet capture in file %s", capture->getFile());
+    auto ff = session->create();
+    session->import(capture->getFile(), ff, false, 0);
+    session->transfer(ff, Success);
+    delete capture;
+  } else {
+    context->yield();
+  }
+}
+
+}
+/* namespace processors */
+} /* namespace minifi */
+} /* namespace nifi */
+} /* namespace apache */
+} /* namespace org */

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c0a788b3/extensions/pcap/CapturePacket.h
----------------------------------------------------------------------
diff --git a/extensions/pcap/CapturePacket.h b/extensions/pcap/CapturePacket.h
new file mode 100644
index 0000000..0e5f6a6
--- /dev/null
+++ b/extensions/pcap/CapturePacket.h
@@ -0,0 +1,168 @@
+/**
+ * CapturePacket class declaration
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef __INVOKE_HTTP_H__
+#define __INVOKE_HTTP_H__
+
+#include <memory>
+#include <regex>
+
+#include "PcapLiveDeviceList.h"
+#include "PcapFilter.h"
+#include "PcapFileDevice.h"
+#include "FlowFileRecord.h"
+#include "core/Processor.h"
+#include "core/ProcessSession.h"
+#include "core/Core.h"
+#include "core/Property.h"
+#include "core/Resource.h"
+#include "concurrentqueue.h"
+#include "core/logging/LoggerConfiguration.h"
+#include "utils/Id.h"
+
+namespace org {
+namespace apache {
+namespace nifi {
+namespace minifi {
+namespace processors {
+
+class CapturePacketMechanism {
+ public:
+  explicit CapturePacketMechanism(const std::string &base_path, const std::string &file, int64_t *max_size)
+      : writer_(nullptr),
+        file_(file),
+        path_(base_path),
+        max_size_(max_size) {
+    atomic_count_.store(0);
+  }
+
+  ~CapturePacketMechanism() {
+    delete writer_;
+  }
+
+  bool inline incrementAndCheck() {
+    return atomic_count_++ >= *max_size_;
+  }
+
+  int64_t *getMaxSize() {
+    return max_size_;
+  }
+
+  pcpp::PcapFileWriterDevice *writer_;
+
+  const std::string &getBasePath() {
+    return path_;
+  }
+
+  const std::string &getFile() {
+    return file_;
+  }
+ protected:
+  CapturePacketMechanism &operator=(const CapturePacketMechanism &other) = delete;
+  std::string path_;
+  std::string file_;
+  int64_t *max_size_;
+  std::atomic<long> atomic_count_;
+};
+
+struct PacketMovers {
+  moodycamel::ConcurrentQueue<CapturePacketMechanism*> source;
+  moodycamel::ConcurrentQueue<CapturePacketMechanism*> sink;
+};
+
+// CapturePacket Class
+class CapturePacket : public core::Processor {
+ public:
+
+  // Constructor
+  /*!
+   * Create a new processor
+   */
+  explicit CapturePacket(std::string name, uuid_t uuid = NULL)
+      : Processor(name, uuid),
+        pcap_batch_size_(50),
+        logger_(logging::LoggerFactory<CapturePacket>::getLogger()) {
+    num_ = 0;
+    mover = std::unique_ptr<PacketMovers>(new PacketMovers());
+  }
+  // Destructor
+  virtual ~CapturePacket();
+  // Processor Name
+  static const char *ProcessorName;
+  static core::Property BatchSize;
+  static core::Property BaseDir;
+  // Supported Relationships
+  static core::Relationship Success;
+
+  virtual void onTrigger(const std::shared_ptr<core::ProcessContext> &context, const std::shared_ptr<core::ProcessSession> &session) override;
+  virtual void initialize() override;
+  virtual void onSchedule(const std::shared_ptr<core::ProcessContext> &context, const std::shared_ptr<core::ProcessSessionFactory> &sessionFactory) override;
+
+  static void packet_callback(pcpp::RawPacket* packet, pcpp::PcapLiveDevice* dev, void* data);
+
+ protected:
+
+  virtual void notifyStop() override {
+    logger_->log_info("Stopping capture");
+    for (auto dev : device_list_) {
+      dev->stopCapture();
+      dev->close();
+    }
+    logger_->log_info("Stopped device capture. clearing queues");
+    CapturePacketMechanism *capture;
+    while (mover->source.try_dequeue(capture)) {
+      std::remove(capture->getFile().c_str());
+      delete capture;
+    }
+    logger_->log_info("Cleared source queue");
+    while (mover->sink.try_dequeue(capture)) {
+      std::remove(capture->getFile().c_str());
+      delete capture;
+    }
+    device_list_.clear();
+    logger_->log_info("Cleared sink queue");
+  }
+
+  static std::string generate_new_pcap(const std::string &base_path);
+
+  static CapturePacketMechanism *create_new_capture(const std::string &base_path, int64_t *max_size);
+
+ private:
+
+  inline std::string getPath() {
+    return base_dir_ + "/" + base_path_;
+  }
+  std::string base_dir_;
+  std::string base_path_;
+  int64_t pcap_batch_size_;
+  std::unique_ptr<PacketMovers> mover;
+  static std::atomic<int> num_;
+  std::vector<pcpp::PcapLiveDevice*> device_list_;
+  std::shared_ptr<logging::Logger> logger_;
+  static std::shared_ptr<utils::IdGenerator> id_generator_;
+};
+
+REGISTER_RESOURCE(CapturePacket)
+
+} /* namespace processors */
+} /* namespace minifi */
+} /* namespace nifi */
+} /* namespace apache */
+} /* namespace org */
+
+#endif

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c0a788b3/extensions/pcap/PcapLoader.cpp
----------------------------------------------------------------------
diff --git a/extensions/pcap/PcapLoader.cpp b/extensions/pcap/PcapLoader.cpp
new file mode 100644
index 0000000..c26b80c
--- /dev/null
+++ b/extensions/pcap/PcapLoader.cpp
@@ -0,0 +1,29 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "core/FlowConfiguration.h"
+#include "PcapLoader.h"
+
+bool PcapFactory::added = core::FlowConfiguration::add_static_func("createPcapFactory");
+
+extern "C" {
+
+void *createPcapFactory(void) {
+  return new PcapFactory();
+}
+
+}

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c0a788b3/extensions/pcap/PcapLoader.h
----------------------------------------------------------------------
diff --git a/extensions/pcap/PcapLoader.h b/extensions/pcap/PcapLoader.h
new file mode 100644
index 0000000..38cd4b8
--- /dev/null
+++ b/extensions/pcap/PcapLoader.h
@@ -0,0 +1,67 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef EXTENSIONS_PCAPLOADER_H
+#define EXTENSIONS_PCAPLOADER_H
+
+#include "core/ClassLoader.h"
+#include "CapturePacket.h"
+#include "utils/StringUtils.h"
+
+class __attribute__((visibility("default"))) PcapFactory : public core::ObjectFactory {
+ public:
+  PcapFactory() {
+
+  }
+
+  /**
+   * Gets the name of the object.
+   * @return class name of processor
+   */
+  virtual std::string getName() {
+    return "PcapFactory";
+  }
+
+  virtual std::string getClassName() {
+    return "PcapFactory";
+  }
+  /**
+   * Gets the class name for the object
+   * @return class name for the processor.
+   */
+  virtual std::vector<std::string> getClassNames() {
+    std::vector<std::string> class_names;
+    class_names.push_back("CapturePacket");
+    return class_names;
+  }
+
+  virtual std::unique_ptr<ObjectFactory> assign(const std::string &class_name) {
+    if (utils::StringUtils::equalsIgnoreCase(class_name,"CapturePacket")) {
+      return std::unique_ptr<ObjectFactory>(new core::DefautObjectFactory<processors::CapturePacket>());
+    } else {
+      return nullptr;
+    }
+  }
+
+  static bool added;
+
+};
+
+extern "C" {
+void *createPcapFactory(void);
+}
+#endif /* EXTENSIONS_PCAPLOADER_H */

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c0a788b3/libminifi/test/pcap-tests/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/libminifi/test/pcap-tests/CMakeLists.txt b/libminifi/test/pcap-tests/CMakeLists.txt
new file mode 100644
index 0000000..ba4d7d2
--- /dev/null
+++ b/libminifi/test/pcap-tests/CMakeLists.txt
@@ -0,0 +1,44 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+file(GLOB PCAP_TESTS  "*.cpp")
+
+SET(PCAP_INT_TEST_COUNT 0)
+
+FOREACH(testfile ${PCAP_TESTS})
+  	get_filename_component(testfilename "${testfile}" NAME_WE)
+  	add_executable("${testfilename}" "${testfile}" )
+  	target_include_directories(${testfilename} PRIVATE BEFORE "${CMAKE_SOURCE_DIR}/extensions/pcap/")
+  	target_include_directories(${testfilename} PRIVATE BEFORE "${CMAKE_BINARY_DIR}/extensions/pcap/pcap++/Dist/header/")
+    createTests("${testfilename}")
+    if(APPLE)    
+    	target_link_libraries ("${testfilename}" -Wl,-all_load minifi-pcap )
+	else()
+  		target_link_libraries ("${testfilename}" -Wl,--whole-archive minifi-pcap -Wl,--no-whole-archive)
+  	endif()
+  MATH(EXPR PCAP_INT_TEST_COUNT "${PCAP_INT_TEST_COUNT}+1")
+ENDFOREACH()
+
+message("-- Finished building ${PCAP_INT_TEST_COUNT} libPCAP test file(s)...")
+if(APPLE)    
+	add_test(NAME PcapTest COMMAND PcapTest "${TEST_RESOURCES}/TestPcap.yml"  "${TEST_RESOURCES}/")
+else()
+	add_test(NAME PcapTest COMMAND PcapTest "${TEST_RESOURCES}/TestPcapLinux.yml"  "${TEST_RESOURCES}/")
+endif()
+

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c0a788b3/libminifi/test/pcap-tests/PcapTest.cpp
----------------------------------------------------------------------
diff --git a/libminifi/test/pcap-tests/PcapTest.cpp b/libminifi/test/pcap-tests/PcapTest.cpp
new file mode 100644
index 0000000..39cf374
--- /dev/null
+++ b/libminifi/test/pcap-tests/PcapTest.cpp
@@ -0,0 +1,103 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <sys/stat.h>
+#undef NDEBUG
+#include <cassert>
+#include <utility>
+#include <chrono>
+#include <fstream>
+#include <memory>
+#include <string>
+#include <thread>
+#include <type_traits>
+#include <vector>
+#include <iostream>
+#include <sstream>
+#include "../TestBase.h"
+#include "utils/StringUtils.h"
+#include "core/Core.h"
+#include "core/logging/Logger.h"
+#include "core/ProcessGroup.h"
+#include "core/yaml/YamlConfiguration.h"
+#include "FlowController.h"
+#include "properties/Configure.h"
+#include "../unit/ProvenanceTestHelper.h"
+#include "io/StreamFactory.h"
+#include "core/ConfigurableComponent.h"
+#include "../integration/IntegrationBase.h"
+#include "CapturePacket.h"
+
+class PcapTestHarness : public IntegrationBase {
+ public:
+  PcapTestHarness() {
+    char format[] = "/tmp/ssth.XXXXXX";
+    dir = testController.createTempDirectory(format);
+  }
+
+  void testSetup() {
+    LogTestController::getInstance().setDebug<minifi::processors::CapturePacket>();
+    LogTestController::getInstance().setDebug<minifi::FlowController>();
+    LogTestController::getInstance().setDebug<minifi::SchedulingAgent>();
+    LogTestController::getInstance().setDebug<minifi::core::ProcessGroup>();
+    LogTestController::getInstance().setDebug<minifi::core::Processor>();
+    LogTestController::getInstance().setDebug<minifi::ThreadedSchedulingAgent>();
+  }
+
+  void cleanup() {
+    LogTestController::getInstance().reset();
+  }
+
+  void runAssertions() {
+    assert(LogTestController::getInstance().contains("Starting capture") == true);
+    assert(LogTestController::getInstance().contains("Stopping capture") == true);
+    assert(LogTestController::getInstance().contains("Stopped device capture. clearing queues") == true);
+  }
+
+  void queryRootProcessGroup(std::shared_ptr<core::ProcessGroup> pg) {
+    std::shared_ptr<core::Processor> proc = pg->findProcessor("pcap");
+    assert(proc != nullptr);
+
+    auto inv = std::dynamic_pointer_cast<minifi::processors::CapturePacket>(proc);
+    assert(inv != nullptr);
+
+    configuration->set(minifi::processors::CapturePacket::BaseDir.getName(), dir);
+    configuration->set("nifi.c2.enable", "false");
+  }
+
+ protected:
+  char *dir;
+  TestController testController;
+};
+
+int main(int argc, char **argv) {
+  std::string key_dir, test_file_location, url;
+
+  if (argc > 1) {
+    test_file_location = argv[1];
+  }
+
+
+  PcapTestHarness harness;
+
+  harness.setKeyDir(key_dir);
+
+  harness.run(test_file_location);
+
+  return 0;
+}

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c0a788b3/libminifi/test/resources/TestPcap.yml
----------------------------------------------------------------------
diff --git a/libminifi/test/resources/TestPcap.yml b/libminifi/test/resources/TestPcap.yml
new file mode 100644
index 0000000..1135972
--- /dev/null
+++ b/libminifi/test/resources/TestPcap.yml
@@ -0,0 +1,72 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+Flow Controller:
+    name: MiNiFi Flow
+    id: 2438e3c8-015a-1000-79ca-83af40ec1990
+Processors:
+    - name: pcap
+      id: 2438e3c8-015a-1000-79ca-83af40ec1991
+      class: org.apache.nifi.processors.standard.CapturePacket
+      max concurrent tasks: 1
+      scheduling strategy: TIMER_DRIVEN
+      scheduling period: 10 msec
+      penalization period: 1 sec
+      yield period: 10 msec
+      run duration nanos: 0
+      auto-terminated relationships list:
+      Properties:
+        Batch Size: 1
+    - name: LogAttribute
+      id: 2438e3c8-015a-1000-79ca-83af40ec1992
+      class: org.apache.nifi.processors.standard.LogAttribute
+      max concurrent tasks: 1
+      scheduling strategy: TIMER_DRIVEN
+      scheduling period: 1 sec
+      penalization period: 30 sec
+      yield period: 1 sec
+      run duration nanos: 0
+      auto-terminated relationships list: response
+      Properties:
+        Log Level: info
+        Log Payload: true
+
+Connections:
+    - name: TransferFilesToRPG
+      id: 2438e3c8-015a-1000-79ca-83af40ec1997
+      source name: pcap
+      source id: 2438e3c8-015a-1000-79ca-83af40ec1991
+      source relationship name: success
+      destination name: LogAttribute
+      destination id: 2438e3c8-015a-1000-79ca-83af40ec1992
+      max work queue size: 0
+      max work queue data size: 1 MB
+      flowfile expiration: 60 sec
+    - name: TransferFilesToRPG2
+      id: 2438e3c8-015a-1000-79ca-83af40ec1917
+      source name: LogAttribute
+      source id: 2438e3c8-015a-1000-79ca-83af40ec1992
+      destination name: LogAttribute
+      destination id: 2438e3c8-015a-1000-79ca-83af40ec1992  
+      source relationship name: success
+      max work queue size: 0
+      max work queue data size: 1 MB
+      flowfile expiration: 60 sec
+
+Remote Processing Groups:
+    

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c0a788b3/libminifi/test/resources/TestPcapLinux.yml
----------------------------------------------------------------------
diff --git a/libminifi/test/resources/TestPcapLinux.yml b/libminifi/test/resources/TestPcapLinux.yml
new file mode 100644
index 0000000..d0a5b5f
--- /dev/null
+++ b/libminifi/test/resources/TestPcapLinux.yml
@@ -0,0 +1,72 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+Flow Controller:
+    name: MiNiFi Flow
+    id: 2438e3c8-015a-1000-79ca-83af40ec1990
+Processors:
+    - name: pcap
+      id: 2438e3c8-015a-1000-79ca-83af40ec1991
+      class: org.apache.nifi.processors.standard.CapturePacket
+      max concurrent tasks: 1
+      scheduling strategy: TIMER_DRIVEN
+      scheduling period: 10 msec
+      penalization period: 10 msec
+      yield period: 10 msec
+      run duration nanos: 0
+      auto-terminated relationships list:
+      Properties:
+        Batch Size: 1
+    - name: LogAttribute
+      id: 2438e3c8-015a-1000-79ca-83af40ec1992
+      class: org.apache.nifi.processors.standard.LogAttribute
+      max concurrent tasks: 1
+      scheduling strategy: TIMER_DRIVEN
+      scheduling period: 1 sec
+      penalization period: 30 sec
+      yield period: 1 sec
+      run duration nanos: 0
+      auto-terminated relationships list: response
+      Properties:
+        Log Level: info
+        Log Payload: true
+
+Connections:
+    - name: TransferFilesToRPG
+      id: 2438e3c8-015a-1000-79ca-83af40ec1997
+      source name: pcap
+      source id: 2438e3c8-015a-1000-79ca-83af40ec1991
+      source relationship name: success
+      destination name: LogAttribute
+      destination id: 2438e3c8-015a-1000-79ca-83af40ec1992
+      max work queue size: 0
+      max work queue data size: 1 MB
+      flowfile expiration: 60 sec
+    - name: TransferFilesToRPG2
+      id: 2438e3c8-015a-1000-79ca-83af40ec1917
+      source name: LogAttribute
+      source id: 2438e3c8-015a-1000-79ca-83af40ec1992
+      destination name: LogAttribute
+      destination id: 2438e3c8-015a-1000-79ca-83af40ec1992  
+      source relationship name: success
+      max work queue size: 0
+      max work queue data size: 1 MB
+      flowfile expiration: 60 sec
+
+Remote Processing Groups:
+    

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c0a788b3/thirdparty/pcap++/3rdParty/Getopt-for-Visual-Studio/README.md
----------------------------------------------------------------------
diff --git a/thirdparty/pcap++/3rdParty/Getopt-for-Visual-Studio/README.md b/thirdparty/pcap++/3rdParty/Getopt-for-Visual-Studio/README.md
new file mode 100644
index 0000000..a2af23f
--- /dev/null
+++ b/thirdparty/pcap++/3rdParty/Getopt-for-Visual-Studio/README.md
@@ -0,0 +1,16 @@
+getopt
+======
+
+GNU getopt for Visual Studio
+
+Copyright
+---------
+
+This project contains code from getopt.h and getopt.c from the MinGW
+repositories. The license terms from MinGW apply when using these files.
+
+Usage
+-----
+
+Copy the file to the include folder in Visual Studio. That should be in
+Program Files\Microsoft Visual Studio xxx\VC\include
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c0a788b3/thirdparty/pcap++/3rdParty/Getopt-for-Visual-Studio/getopt.h
----------------------------------------------------------------------
diff --git a/thirdparty/pcap++/3rdParty/Getopt-for-Visual-Studio/getopt.h b/thirdparty/pcap++/3rdParty/Getopt-for-Visual-Studio/getopt.h
new file mode 100644
index 0000000..0cb8889
--- /dev/null
+++ b/thirdparty/pcap++/3rdParty/Getopt-for-Visual-Studio/getopt.h
@@ -0,0 +1,653 @@
+#ifndef __GETOPT_H__
+/**
+ * DISCLAIMER
+ * This file is part of the mingw-w64 runtime package.
+ *
+ * The mingw-w64 runtime package and its code is distributed in the hope that it 
+ * will be useful but WITHOUT ANY WARRANTY.  ALL WARRANTIES, EXPRESSED OR 
+ * IMPLIED ARE HEREBY DISCLAIMED.  This includes but is not limited to 
+ * warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+ /*
+ * Copyright (c) 2002 Todd C. Miller <To...@courtesan.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Sponsored in part by the Defense Advanced Research Projects
+ * Agency (DARPA) and Air Force Research Laboratory, Air Force
+ * Materiel Command, USAF, under agreement number F39502-99-1-0512.
+ */
+/*-
+ * Copyright (c) 2000 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Dieter Baron and Thomas Klausner.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
+ */
+
+#pragma warning(disable:4996);
+
+#define __GETOPT_H__
+
+/* All the headers include this file. */
+#include <crtdefs.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <windows.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define	REPLACE_GETOPT		/* use this getopt as the system getopt(3) */
+
+#ifdef REPLACE_GETOPT
+int	opterr = 1;		/* if error message should be printed */
+int	optind = 1;		/* index into parent argv vector */
+int	optopt = '?';		/* character checked for validity */
+#undef	optreset		/* see getopt.h */
+#define	optreset		__mingw_optreset
+int	optreset;		/* reset getopt */
+char    *optarg;		/* argument associated with option */
+#endif
+
+//extern int optind;		/* index of first non-option in argv      */
+//extern int optopt;		/* single option character, as parsed     */
+//extern int opterr;		/* flag to enable built-in diagnostics... */
+//				/* (user may set to zero, to suppress)    */
+//
+//extern char *optarg;		/* pointer to argument of current option  */
+
+#define PRINT_ERROR	((opterr) && (*options != ':'))
+
+#define FLAG_PERMUTE	0x01	/* permute non-options to the end of argv */
+#define FLAG_ALLARGS	0x02	/* treat non-options as args to option "-1" */
+#define FLAG_LONGONLY	0x04	/* operate as getopt_long_only */
+
+/* return values */
+#define	BADCH		(int)'?'
+#define	BADARG		((*options == ':') ? (int)':' : (int)'?')
+#define	INORDER 	(int)1
+
+#ifndef __CYGWIN__
+#define __progname __argv[0]
+#else
+extern char __declspec(dllimport) *__progname;
+#endif
+
+#ifdef __CYGWIN__
+static char EMSG[] = "";
+#else
+#define	EMSG		""
+#endif
+
+static int getopt_internal(int, char * const *, const char *,
+			   const struct option *, int *, int);
+static int parse_long_options(char * const *, const char *,
+			      const struct option *, int *, int);
+static int gcd(int, int);
+static void permute_args(int, int, int, char * const *);
+
+static char *place = EMSG; /* option letter processing */
+
+/* XXX: set optreset to 1 rather than these two */
+static int nonopt_start = -1; /* first non option argument (for permute) */
+static int nonopt_end = -1;   /* first option after non options (for permute) */
+
+/* Error messages */
+static const char recargchar[] = "option requires an argument -- %c";
+static const char recargstring[] = "option requires an argument -- %s";
+static const char ambig[] = "ambiguous option -- %.*s";
+static const char noarg[] = "option doesn't take an argument -- %.*s";
+static const char illoptchar[] = "unknown option -- %c";
+static const char illoptstring[] = "unknown option -- %s";
+
+static void
+_vwarnx(const char *fmt,va_list ap)
+{
+  (void)fprintf(stderr,"%s: ",__progname);
+  if (fmt != NULL)
+    (void)vfprintf(stderr,fmt,ap);
+  (void)fprintf(stderr,"\n");
+}
+
+static void
+warnx(const char *fmt,...)
+{
+  va_list ap;
+  va_start(ap,fmt);
+  _vwarnx(fmt,ap);
+  va_end(ap);
+}
+
+/*
+ * Compute the greatest common divisor of a and b.
+ */
+static int
+gcd(int a, int b)
+{
+	int c;
+
+	c = a % b;
+	while (c != 0) {
+		a = b;
+		b = c;
+		c = a % b;
+	}
+
+	return (b);
+}
+
+/*
+ * Exchange the block from nonopt_start to nonopt_end with the block
+ * from nonopt_end to opt_end (keeping the same order of arguments
+ * in each block).
+ */
+static void
+permute_args(int panonopt_start, int panonopt_end, int opt_end,
+	char * const *nargv)
+{
+	int cstart, cyclelen, i, j, ncycle, nnonopts, nopts, pos;
+	char *swap;
+
+	/*
+	 * compute lengths of blocks and number and size of cycles
+	 */
+	nnonopts = panonopt_end - panonopt_start;
+	nopts = opt_end - panonopt_end;
+	ncycle = gcd(nnonopts, nopts);
+	cyclelen = (opt_end - panonopt_start) / ncycle;
+
+	for (i = 0; i < ncycle; i++) {
+		cstart = panonopt_end+i;
+		pos = cstart;
+		for (j = 0; j < cyclelen; j++) {
+			if (pos >= panonopt_end)
+				pos -= nnonopts;
+			else
+				pos += nopts;
+			swap = nargv[pos];
+			/* LINTED const cast */
+			((char **) nargv)[pos] = nargv[cstart];
+			/* LINTED const cast */
+			((char **)nargv)[cstart] = swap;
+		}
+	}
+}
+
+#ifdef REPLACE_GETOPT
+/*
+ * getopt --
+ *	Parse argc/argv argument vector.
+ *
+ * [eventually this will replace the BSD getopt]
+ */
+int
+getopt(int nargc, char * const *nargv, const char *options)
+{
+
+	/*
+	 * We don't pass FLAG_PERMUTE to getopt_internal() since
+	 * the BSD getopt(3) (unlike GNU) has never done this.
+	 *
+	 * Furthermore, since many privileged programs call getopt()
+	 * before dropping privileges it makes sense to keep things
+	 * as simple (and bug-free) as possible.
+	 */
+	return (getopt_internal(nargc, nargv, options, NULL, NULL, 0));
+}
+#endif /* REPLACE_GETOPT */
+
+//extern int getopt(int nargc, char * const *nargv, const char *options);
+
+#ifdef _BSD_SOURCE
+/*
+ * BSD adds the non-standard `optreset' feature, for reinitialisation
+ * of `getopt' parsing.  We support this feature, for applications which
+ * proclaim their BSD heritage, before including this header; however,
+ * to maintain portability, developers are advised to avoid it.
+ */
+# define optreset  __mingw_optreset
+extern int optreset;
+#endif
+#ifdef __cplusplus
+}
+#endif
+/*
+ * POSIX requires the `getopt' API to be specified in `unistd.h';
+ * thus, `unistd.h' includes this header.  However, we do not want
+ * to expose the `getopt_long' or `getopt_long_only' APIs, when
+ * included in this manner.  Thus, close the standard __GETOPT_H__
+ * declarations block, and open an additional __GETOPT_LONG_H__
+ * specific block, only when *not* __UNISTD_H_SOURCED__, in which
+ * to declare the extended API.
+ */
+#endif /* !defined(__GETOPT_H__) */
+
+#if !defined(__UNISTD_H_SOURCED__) && !defined(__GETOPT_LONG_H__)
+#define __GETOPT_LONG_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct option		/* specification for a long form option...	*/
+{
+  const char *name;		/* option name, without leading hyphens */
+  int         has_arg;		/* does it take an argument?		*/
+  int        *flag;		/* where to save its status, or NULL	*/
+  int         val;		/* its associated status value		*/
+};
+
+enum    		/* permitted values for its `has_arg' field...	*/
+{
+  no_argument = 0,      	/* option never takes an argument	*/
+  required_argument,		/* option always requires an argument	*/
+  optional_argument		/* option may take an argument		*/
+};
+
+/*
+ * parse_long_options --
+ *	Parse long options in argc/argv argument vector.
+ * Returns -1 if short_too is set and the option does not match long_options.
+ */
+static int
+parse_long_options(char * const *nargv, const char *options,
+	const struct option *long_options, int *idx, int short_too)
+{
+	char *current_argv, *has_equal;
+	size_t current_argv_len;
+	int i, ambiguous, match;
+
+#define IDENTICAL_INTERPRETATION(_x, _y)                                \
+	(long_options[(_x)].has_arg == long_options[(_y)].has_arg &&    \
+	 long_options[(_x)].flag == long_options[(_y)].flag &&          \
+	 long_options[(_x)].val == long_options[(_y)].val)
+
+	current_argv = place;
+	match = -1;
+	ambiguous = 0;
+
+	optind++;
+
+	if ((has_equal = strchr(current_argv, '=')) != NULL) {
+		/* argument found (--option=arg) */
+		current_argv_len = has_equal - current_argv;
+		has_equal++;
+	} else
+		current_argv_len = strlen(current_argv);
+
+	for (i = 0; long_options[i].name; i++) {
+		/* find matching long option */
+		if (strncmp(current_argv, long_options[i].name,
+		    current_argv_len))
+			continue;
+
+		if (strlen(long_options[i].name) == current_argv_len) {
+			/* exact match */
+			match = i;
+			ambiguous = 0;
+			break;
+		}
+		/*
+		 * If this is a known short option, don't allow
+		 * a partial match of a single character.
+		 */
+		if (short_too && current_argv_len == 1)
+			continue;
+
+		if (match == -1)	/* partial match */
+			match = i;
+		else if (!IDENTICAL_INTERPRETATION(i, match))
+			ambiguous = 1;
+	}
+	if (ambiguous) {
+		/* ambiguous abbreviation */
+		if (PRINT_ERROR)
+			warnx(ambig, (int)current_argv_len,
+			     current_argv);
+		optopt = 0;
+		return (BADCH);
+	}
+	if (match != -1) {		/* option found */
+		if (long_options[match].has_arg == no_argument
+		    && has_equal) {
+			if (PRINT_ERROR)
+				warnx(noarg, (int)current_argv_len,
+				     current_argv);
+			/*
+			 * XXX: GNU sets optopt to val regardless of flag
+			 */
+			if (long_options[match].flag == NULL)
+				optopt = long_options[match].val;
+			else
+				optopt = 0;
+			return (BADARG);
+		}
+		if (long_options[match].has_arg == required_argument ||
+		    long_options[match].has_arg == optional_argument) {
+			if (has_equal)
+				optarg = has_equal;
+			else if (long_options[match].has_arg ==
+			    required_argument) {
+				/*
+				 * optional argument doesn't use next nargv
+				 */
+				optarg = nargv[optind++];
+			}
+		}
+		if ((long_options[match].has_arg == required_argument)
+		    && (optarg == NULL)) {
+			/*
+			 * Missing argument; leading ':' indicates no error
+			 * should be generated.
+			 */
+			if (PRINT_ERROR)
+				warnx(recargstring,
+				    current_argv);
+			/*
+			 * XXX: GNU sets optopt to val regardless of flag
+			 */
+			if (long_options[match].flag == NULL)
+				optopt = long_options[match].val;
+			else
+				optopt = 0;
+			--optind;
+			return (BADARG);
+		}
+	} else {			/* unknown option */
+		if (short_too) {
+			--optind;
+			return (-1);
+		}
+		if (PRINT_ERROR)
+			warnx(illoptstring, current_argv);
+		optopt = 0;
+		return (BADCH);
+	}
+	if (idx)
+		*idx = match;
+	if (long_options[match].flag) {
+		*long_options[match].flag = long_options[match].val;
+		return (0);
+	} else
+		return (long_options[match].val);
+#undef IDENTICAL_INTERPRETATION
+}
+
+/*
+ * getopt_internal --
+ *	Parse argc/argv argument vector.  Called by user level routines.
+ */
+static int
+getopt_internal(int nargc, char * const *nargv, const char *options,
+	const struct option *long_options, int *idx, int flags)
+{
+	char *oli;				/* option letter list index */
+	int optchar, short_too;
+	static int posixly_correct = -1;
+
+	if (options == NULL)
+		return (-1);
+
+	/*
+	 * XXX Some GNU programs (like cvs) set optind to 0 instead of
+	 * XXX using optreset.  Work around this braindamage.
+	 */
+	if (optind == 0)
+		optind = optreset = 1;
+
+	/*
+	 * Disable GNU extensions if POSIXLY_CORRECT is set or options
+	 * string begins with a '+'.
+	 *
+	 * CV, 2009-12-14: Check POSIXLY_CORRECT anew if optind == 0 or
+	 *                 optreset != 0 for GNU compatibility.
+	 */
+	if (posixly_correct == -1 || optreset != 0)
+		posixly_correct = (getenv("POSIXLY_CORRECT") != NULL);
+	if (*options == '-')
+		flags |= FLAG_ALLARGS;
+	else if (posixly_correct || *options == '+')
+		flags &= ~FLAG_PERMUTE;
+	if (*options == '+' || *options == '-')
+		options++;
+
+	optarg = NULL;
+	if (optreset)
+		nonopt_start = nonopt_end = -1;
+start:
+	if (optreset || !*place) {		/* update scanning pointer */
+		optreset = 0;
+		if (optind >= nargc) {          /* end of argument vector */
+			place = EMSG;
+			if (nonopt_end != -1) {
+				/* do permutation, if we have to */
+				permute_args(nonopt_start, nonopt_end,
+				    optind, nargv);
+				optind -= nonopt_end - nonopt_start;
+			}
+			else if (nonopt_start != -1) {
+				/*
+				 * If we skipped non-options, set optind
+				 * to the first of them.
+				 */
+				optind = nonopt_start;
+			}
+			nonopt_start = nonopt_end = -1;
+			return (-1);
+		}
+		if (*(place = nargv[optind]) != '-' ||
+		    (place[1] == '\0' && strchr(options, '-') == NULL)) {
+			place = EMSG;		/* found non-option */
+			if (flags & FLAG_ALLARGS) {
+				/*
+				 * GNU extension:
+				 * return non-option as argument to option 1
+				 */
+				optarg = nargv[optind++];
+				return (INORDER);
+			}
+			if (!(flags & FLAG_PERMUTE)) {
+				/*
+				 * If no permutation wanted, stop parsing
+				 * at first non-option.
+				 */
+				return (-1);
+			}
+			/* do permutation */
+			if (nonopt_start == -1)
+				nonopt_start = optind;
+			else if (nonopt_end != -1) {
+				permute_args(nonopt_start, nonopt_end,
+				    optind, nargv);
+				nonopt_start = optind -
+				    (nonopt_end - nonopt_start);
+				nonopt_end = -1;
+			}
+			optind++;
+			/* process next argument */
+			goto start;
+		}
+		if (nonopt_start != -1 && nonopt_end == -1)
+			nonopt_end = optind;
+
+		/*
+		 * If we have "-" do nothing, if "--" we are done.
+		 */
+		if (place[1] != '\0' && *++place == '-' && place[1] == '\0') {
+			optind++;
+			place = EMSG;
+			/*
+			 * We found an option (--), so if we skipped
+			 * non-options, we have to permute.
+			 */
+			if (nonopt_end != -1) {
+				permute_args(nonopt_start, nonopt_end,
+				    optind, nargv);
+				optind -= nonopt_end - nonopt_start;
+			}
+			nonopt_start = nonopt_end = -1;
+			return (-1);
+		}
+	}
+
+	/*
+	 * Check long options if:
+	 *  1) we were passed some
+	 *  2) the arg is not just "-"
+	 *  3) either the arg starts with -- we are getopt_long_only()
+	 */
+	if (long_options != NULL && place != nargv[optind] &&
+	    (*place == '-' || (flags & FLAG_LONGONLY))) {
+		short_too = 0;
+		if (*place == '-')
+			place++;		/* --foo long option */
+		else if (*place != ':' && strchr(options, *place) != NULL)
+			short_too = 1;		/* could be short option too */
+
+		optchar = parse_long_options(nargv, options, long_options,
+		    idx, short_too);
+		if (optchar != -1) {
+			place = EMSG;
+			return (optchar);
+		}
+	}
+
+	if ((optchar = (int)*place++) == (int)':' ||
+	    (optchar == (int)'-' && *place != '\0') ||
+	    (oli = (char*)strchr(options, optchar)) == NULL) {
+		/*
+		 * If the user specified "-" and  '-' isn't listed in
+		 * options, return -1 (non-option) as per POSIX.
+		 * Otherwise, it is an unknown option character (or ':').
+		 */
+		if (optchar == (int)'-' && *place == '\0')
+			return (-1);
+		if (!*place)
+			++optind;
+		if (PRINT_ERROR)
+			warnx(illoptchar, optchar);
+		optopt = optchar;
+		return (BADCH);
+	}
+	if (long_options != NULL && optchar == 'W' && oli[1] == ';') {
+		/* -W long-option */
+		if (*place)			/* no space */
+			/* NOTHING */;
+		else if (++optind >= nargc) {	/* no arg */
+			place = EMSG;
+			if (PRINT_ERROR)
+				warnx(recargchar, optchar);
+			optopt = optchar;
+			return (BADARG);
+		} else				/* white space */
+			place = nargv[optind];
+		optchar = parse_long_options(nargv, options, long_options,
+		    idx, 0);
+		place = EMSG;
+		return (optchar);
+	}
+	if (*++oli != ':') {			/* doesn't take argument */
+		if (!*place)
+			++optind;
+	} else {				/* takes (optional) argument */
+		optarg = NULL;
+		if (*place)			/* no white space */
+			optarg = place;
+		else if (oli[1] != ':') {	/* arg not optional */
+			if (++optind >= nargc) {	/* no arg */
+				place = EMSG;
+				if (PRINT_ERROR)
+					warnx(recargchar, optchar);
+				optopt = optchar;
+				return (BADARG);
+			} else
+				optarg = nargv[optind];
+		}
+		place = EMSG;
+		++optind;
+	}
+	/* dump back option letter */
+	return (optchar);
+}
+
+/*
+ * getopt_long --
+ *	Parse argc/argv argument vector.
+ */
+int
+getopt_long(int nargc, char * const *nargv, const char *options,
+    const struct option *long_options, int *idx)
+{
+
+	return (getopt_internal(nargc, nargv, options, long_options, idx,
+	    FLAG_PERMUTE));
+}
+
+/*
+ * getopt_long_only --
+ *	Parse argc/argv argument vector.
+ */
+int
+getopt_long_only(int nargc, char * const *nargv, const char *options,
+    const struct option *long_options, int *idx)
+{
+
+	return (getopt_internal(nargc, nargv, options, long_options, idx,
+	    FLAG_PERMUTE|FLAG_LONGONLY));
+}
+
+//extern int getopt_long(int nargc, char * const *nargv, const char *options,
+//    const struct option *long_options, int *idx);
+//extern int getopt_long_only(int nargc, char * const *nargv, const char *options,
+//    const struct option *long_options, int *idx);
+/*
+ * Previous MinGW implementation had...
+ */
+#ifndef HAVE_DECL_GETOPT
+/*
+ * ...for the long form API only; keep this for compatibility.
+ */
+# define HAVE_DECL_GETOPT	1
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* !defined(__UNISTD_H_SOURCED__) && !defined(__GETOPT_LONG_H__) */

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c0a788b3/thirdparty/pcap++/3rdParty/LightPcapNg/LightPcapNg/.gitignore
----------------------------------------------------------------------
diff --git a/thirdparty/pcap++/3rdParty/LightPcapNg/LightPcapNg/.gitignore b/thirdparty/pcap++/3rdParty/LightPcapNg/LightPcapNg/.gitignore
new file mode 100644
index 0000000..027ce0c
--- /dev/null
+++ b/thirdparty/pcap++/3rdParty/LightPcapNg/LightPcapNg/.gitignore
@@ -0,0 +1,13 @@
+*.o
+*.zip
+*.gch
+*.test
+*.pcapng
+*.data
+*.old
+*.a
+*.so
+*.cap
+*.ntar
+*.log
+*.cmake

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c0a788b3/thirdparty/pcap++/3rdParty/LightPcapNg/LightPcapNg/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/thirdparty/pcap++/3rdParty/LightPcapNg/LightPcapNg/CMakeLists.txt b/thirdparty/pcap++/3rdParty/LightPcapNg/LightPcapNg/CMakeLists.txt
new file mode 100644
index 0000000..2f3964c
--- /dev/null
+++ b/thirdparty/pcap++/3rdParty/LightPcapNg/LightPcapNg/CMakeLists.txt
@@ -0,0 +1,79 @@
+cmake_minimum_required (VERSION 2.6)
+project (light_pcapng C)
+set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I${CMAKE_CURRENT_SOURCE_DIR}/include/ -Wall -O2 -fPIC -DUNIVERSAL -g")
+
+add_library (light_pcapng SHARED
+    src/light_io.c
+    src/light_pcapng.c
+    src/light_pcapng_cont.c
+    src/light_platform.c
+    src/light_manipulate.c
+    src/light_internal.c
+    src/light_alloc.c
+    src/light_advanced.c
+    src/light_option.c
+    src/light_pcapng_ext.c
+    )
+
+add_library (light_pcapng_static STATIC
+    src/light_io.c
+    src/light_pcapng.c
+    src/light_pcapng_cont.c
+    src/light_platform.c
+    src/light_manipulate.c
+    src/light_internal.c
+    src/light_alloc.c
+    src/light_advanced.c
+    src/light_option.c
+    src/light_pcapng_ext.c
+    )
+
+add_executable (test_read.test
+    src/tests/test_read.c
+    )
+target_link_libraries(test_read.test light_pcapng_static)
+
+add_executable (test_read_write.test
+    src/tests/test_read_write.c
+    )
+target_link_libraries(test_read_write.test light_pcapng_static)
+
+add_executable (test_mem.test
+    src/tests/test_mem.c
+    )
+target_link_libraries(test_mem.test light_pcapng_static)
+
+add_executable (test_histogram.test
+    src/tests/test_histogram.c
+    )
+target_link_libraries(test_histogram.test light_pcapng_static)
+
+add_executable (test_subcapture.test
+    src/tests/test_subcapture.c
+    )
+target_link_libraries(test_subcapture.test light_pcapng_static)
+
+add_executable (test_feature.test
+    src/tests/test_feature.c
+    )
+target_link_libraries(test_feature.test light_pcapng_static)
+
+add_executable (test_flow.test
+    src/tests/test_flow.c
+    )
+target_link_libraries(test_flow.test light_pcapng_static)
+
+add_executable (test_feature_advanced.test
+    src/tests/test_feature_advanced.c
+    )
+target_link_libraries(test_feature_advanced.test light_pcapng_static dl)
+
+add_executable (test_read_packets.test
+    src/tests/test_read_packets.c
+    )
+target_link_libraries(test_read_packets.test light_pcapng_static)
+
+add_executable (test_read_write_packets.test
+    src/tests/test_read_write_packets.c
+    )
+target_link_libraries(test_read_write_packets.test light_pcapng_static)

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c0a788b3/thirdparty/pcap++/3rdParty/LightPcapNg/LightPcapNg/LICENSE.txt
----------------------------------------------------------------------
diff --git a/thirdparty/pcap++/3rdParty/LightPcapNg/LightPcapNg/LICENSE.txt b/thirdparty/pcap++/3rdParty/LightPcapNg/LightPcapNg/LICENSE.txt
new file mode 100644
index 0000000..8cd5356
--- /dev/null
+++ b/thirdparty/pcap++/3rdParty/LightPcapNg/LightPcapNg/LICENSE.txt
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2016 Radu Velea, radu.velea@gmail.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
\ No newline at end of file