Makefile 4.3 KB

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