You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

160 lines
4.3 KiB

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