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.

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