tcpreplay: update to version 4.2.5
[feed/packages.git] / net / tcpreplay / Makefile
1 #
2 # Copyright (C) 2016 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=tcpreplay
11 PKG_VERSION:=4.2.5
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://github.com/appneta/tcpreplay/releases/download/v$(PKG_VERSION)
16 PKG_HASH:=941026be34e1db5101d3d22ebddd6fff76179a1ee81e273338f533ba4eca89d7
17
18 PKG_LICENSE:=GPL-3.0
19 PKG_LICENSE_FILES:=docs/LICENSE
20
21 PKG_FIXUP:=libtool
22 PKG_INSTALL:=1
23
24 include $(INCLUDE_DIR)/package.mk
25
26 TCPREPLAY_MODULES:= \
27 tcpbridge tcpcapinfo tcpliveplay tcpprep \
28 tcpreplay tcpreplay-edit tcprewrite
29
30 define Package/tcpreplay/default
31 SUBMENU:=tcprelay
32 SECTION:=net
33 CATEGORY:=Network
34 URL:=http://tcpreplay.appneta.com/
35 MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
36 DEPENDS:=+librt +libpcap
37 endef
38
39 define Package/tcpbridge
40 $(call Package/tcpreplay/default)
41 TITLE:=Bridge network traffic across two interfaces
42 endef
43
44 define Package/tcpcapinfo
45 $(call Package/tcpreplay/default)
46 TITLE:=Pcap file dissector for debugging broken pcap files
47 endef
48
49 define Package/tcpliveplay
50 $(call Package/tcpreplay/default)
51 TITLE:=Replays network traffic stored in a pcap file on live networks using new TCP connections
52 endef
53
54 define Package/tcpprep
55 $(call Package/tcpreplay/default)
56 TITLE:=Create a tcpreplay cache file from a pcap file
57 endef
58
59 define Package/tcpreplay
60 $(call Package/tcpreplay/default)
61 TITLE:=Replay network traffic stored in pcap files
62 endef
63
64 define Package/tcpreplay-edit
65 $(call Package/tcpreplay/default)
66 TITLE:=Replay network traffic stored in pcap files
67 endef
68
69 define Package/tcprewrite
70 $(call Package/tcpreplay/default)
71 TITLE:=Rewrite the packets in a pcap file
72 endef
73
74 define Package/tcpreplay-all
75 $(call Package/tcpreplay/default)
76 TITLE:=Pcap editing and replaying utilities
77 DEPENDS:=$(foreach m,$(TCPREPLAY_MODULES),+$(m))
78 endef
79
80 define Package/tcpbridge/description
81 tcpbridge is a tool for selectively briding network traffic across two
82 interfaces and optionally modifying the packets in between
83 endef
84
85 define Package/tcpcapinfo/description
86 tcpcapinfo is a tool for decoding the structure of a pcap(3) file with a
87 focus on finding broken pcap files and determining how two related pcap
88 files might differ.
89 endef
90
91 define Package/tcpliveplay/description
92 This program, 'tcpliveplay' replays a captured set of packets using new TCP
93 connections with the captured TCP payloads against a remote host in order
94 to do comprehensive vulnerability testings.
95 endef
96
97 define Package/tcpprep/description
98 tcpprep is a ``pcap(3)'' file pre-processor which creates a cache file
99 which provides "rules" for ``tcprewrite(1)'' and ``tcpreplay(1)'' on how to
100 process and send packets.
101 endef
102
103 define Package/tcpreplay/description
104 tcpreplay is a tool for replaying network traffic from files saved with
105 tcpdump or other tools which write pcap(3) files.
106 endef
107
108 define Package/tcpreplay-edit/description
109 tcpreplay-edit includes all the functionality of both tcpreplay
110 and tcprewrite.
111 endef
112
113 define Package/tcprewrite/description
114 Rewrite/edit the packets in a pcap file
115 endef
116
117 define Package/tcpreplay-all/description
118 Tcpreplay is a suite of free Open Source utilities for
119 editing and replaying previously captured network traffic.
120 Originally designed to replay malicious traffic patterns to
121 Intrusion Detection/Prevention Systems, it has seen many evolutions
122 including capabilities to replay to web servers.
123
124 Version 4.0.0 introduces features and performance enhancements
125 to support switches, routers, and IP Flow/NetFlow appliances.
126 endef
127
128 CONFIGURE_VARS += \
129 ac_cv_lib_nl_nl_cache_alloc=no \
130 ac_cv_lib_nl_genl_3_genl_connect=no \
131 ac_cv_lib_nl_3_nl_cache_alloc=no \
132 ac_cv_lib_dbus_1_dbus_malloc=no
133
134 CONFIGURE_ARGS += \
135 --enable-force-pf \
136 --enable-dynamic-link \
137 --prefix="$(PKG_INSTALL_DIR)/usr" \
138 --exec-prefix="$(PKG_INSTALL_DIR)/usr" \
139 --with-libpcap="$(STAGING_DIR)/usr"
140
141 define tcpreplayTemplate
142 define Package/$(1)/install
143 $(INSTALL_DIR) $$(1)/usr/bin ; \
144 $(CP) $$(PKG_INSTALL_DIR)/usr/bin/$(1) $$(1)/usr/bin
145 endef
146 endef
147
148 define Package/tcpreplay-all/install
149 :
150 endef
151
152 $(foreach m, $(TCPREPLAY_MODULES), \
153 $(eval $(call tcpreplayTemplate,$(m))) \
154 $(eval $(call BuildPackage,$(m))) \
155 )
156
157 $(eval $(call BuildPackage,tcpreplay-all))
158