1Download libpcap-X.Y.tar.gz from http://www.tcpdump.org/#latest-release 2and verify the signature. 3 4cd 5# Make a copy of this directory. 6cp -r ~/nmap/libpcap/NMAP_MODIFICATIONS . 7tar xzvf libpcap-X.Y.tar.gz 8cd nmap 9rsync -rv --delete ~/libpcap-X.Y/ ~/nmap/libpcap/ 10# Remove some things we don't want to ship 11rm -rf ~/nmap/libpcap/{rpcapd,testprogs,doc} 12# Apply patch to avoid those dirs 13git apply ~/NMAP_MODIFICATIONS/0002-Disable-unnecessary-features.patch 14git add -A libpcap 15cd libpcap 16autoconf 17./configure 18make 19git add grammar.[ch] scanner.[ch] 20cd .. 21# Apply remaining patches. 22git apply ~/NMAP_MODIFICATIONS/0001-Don-t-autogenerate-Lex-Yacc-files.patch 23# Make changes as necessary and update the patch files 24cd libpcap 25autoconf 26cd .. 27git add -u libpcap 28mv ~/NMAP_MODIFICATIONS libpcap/ 29git add libpcap/NMAP_MODIFICATIONS 30git commit -m "Upgrade libpcap to X.Y." 31