# -*- 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

name                tcpreplay
categories          net security
license             BSD ISC
version             4.3.1
platforms           darwin
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  a71e5d7b85951ebc34c49c36d18e7abac67e2d4f \
                    sha256  95ba661011689a4a6c03896ba7fa549470c2c2d4d0e907dd0c4a4580bbe25e34 \
                    size    3725070

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

patchfiles          strl.patch

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