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.

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