# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4

PortSystem          1.0

# FIXME: 4.5.2 is broken:
# https://github.com/appneta/tcpreplay/issues/987

name                tcpreplay
version             4.3.3
revision            0
categories          net security
license             BSD ISC
maintainers         {wohner.eu:normen @Gminfly} openmaintainer

description         Replay pcap files at arbitrary speeds onto the network
long_description    \
    Tcpreplay is a suite of BSD licensed tools written by Aaron Turner for \
    *NIX operating systems which gives you the ability to use previously \
    captured traffic in libpcap format to test a variety of network devices. \
    It allows you to classify traffic as client or server, rewrite Layer 2, 3 \
    and 4 headers and finally replay the traffic back onto the network and \
    through other devices such as switches, routers, firewalls, NIDS and \
    IPS's. Tcpreplay supports both single and dual NIC modes for testing both \
    sniffing and inline devices.

homepage            https://tcpreplay.appneta.com
master_sites        sourceforge:project/tcpreplay/tcpreplay/${version}
checksums           rmd160  ce88930ca1cb87487ccb645bcaf23b92cb4bbb43 \
                    sha256  ed2402caa9434ff5c74b2e7b31178c73e7c7c5c4ea1e1d0e2e39a7dc46958fde \
                    size    3727820

installs_libs       no

# TODO use libpcapnav
# libdnet is required for fragroute support
depends_lib         port:libdnet \
                    port:libpcap \
                    port:tcpdump

patchfiles          strl.patch

configure.args      --with-libpcap=${prefix} \
                    --with-tcpdump=${prefix}/sbin/tcpdump
