2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, libpcap, tcpdump, Carbon, CoreServices }:
|
2017-05-20 06:51:36 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "tcpreplay";
|
2020-06-30 16:42:43 +00:00
|
|
|
version = "4.3.3";
|
2017-05-20 06:51:36 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/appneta/tcpreplay/releases/download/v${version}/tcpreplay-${version}.tar.gz";
|
2020-06-30 16:42:43 +00:00
|
|
|
sha256 = "1plgjm3dr9rr5q71s7paqk2wgrvkihbk2yrf9g3zaks3m750497d";
|
2017-05-20 06:51:36 +00:00
|
|
|
};
|
|
|
|
|
2020-11-18 06:02:58 +00:00
|
|
|
buildInputs = [ libpcap ]
|
2021-01-15 09:19:50 +00:00
|
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
2020-11-18 06:02:58 +00:00
|
|
|
Carbon CoreServices
|
|
|
|
];
|
|
|
|
|
2017-05-20 06:51:36 +00:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--disable-local-libopts"
|
|
|
|
"--disable-libopts-install"
|
|
|
|
"--enable-dynamic-link"
|
|
|
|
"--enable-shared"
|
|
|
|
"--enable-tcpreplay-edit"
|
|
|
|
"--with-libpcap=${libpcap}"
|
|
|
|
"--with-tcpdump=${tcpdump}/bin"
|
|
|
|
];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-05-20 06:51:36 +00:00
|
|
|
description = "A suite of utilities for editing and replaying network traffic";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://tcpreplay.appneta.com/";
|
2017-05-20 06:51:36 +00:00
|
|
|
license = with licenses; [ bsd3 gpl3 ];
|
|
|
|
maintainers = with maintainers; [ eleanor ];
|
2020-11-18 06:02:58 +00:00
|
|
|
platforms = platforms.unix;
|
2021-02-04 09:02:37 +00:00
|
|
|
knownVulnerabilities = [
|
|
|
|
"CVE-2020-24265" # https://github.com/appneta/tcpreplay/issues/616
|
|
|
|
"CVE-2020-24266" # https://github.com/appneta/tcpreplay/issues/617
|
|
|
|
];
|
2017-05-20 06:51:36 +00:00
|
|
|
};
|
|
|
|
}
|