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