No description
This repository has been archived on 2026-06-16. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
  • C 69.2%
  • Makefile 13.9%
  • Shell 11.2%
  • Roff 3.3%
  • M4 2.2%
  • Other 0.2%
Find a file
2020-08-05 11:53:56 +08:00
config copy from intranet. 2019-07-10 17:54:02 +08:00
docs copy from intranet. 2019-07-10 17:54:02 +08:00
lib copy from intranet. 2019-07-10 17:54:02 +08:00
libopts copy from intranet. 2019-07-10 17:54:02 +08:00
m4 copy from intranet. 2019-07-10 17:54:02 +08:00
scripts copy from intranet. 2019-07-10 17:54:02 +08:00
src 调整回放包逻辑,仅当使用marsio编译且使用marsio模式回放流量时,启用marsio_thread 2020-08-05 11:53:56 +08:00
test copy from intranet. 2019-07-10 17:54:02 +08:00
vendor 添加libpcap源码至vendor目录方便安装 2019-07-12 16:39:16 +08:00
.gitignore 调整回放包逻辑,仅当使用marsio编译且使用marsio模式回放流量时,启用marsio_thread 2020-08-05 11:53:56 +08:00
aclocal.m4 copy from intranet. 2019-07-10 17:54:02 +08:00
autogen.sh copy from intranet. 2019-07-10 17:54:02 +08:00
build.sh 1、新增build.sh和clean.sh,用于辅助编译 2019-08-02 17:06:26 +08:00
clean.sh 新增MAX_BURST_PKTLEN和MIN_BURST_PKTLEN两个环境变量控制放大包的长度范围 2019-09-03 17:02:15 +08:00
compile_cn.txt copy from intranet. 2019-07-10 17:54:02 +08:00
configure 修改原版代码中strlcpy最大8个字节的限制, "enp175s0f0"这种网卡名被截断的BUG. 2019-07-12 14:50:30 +08:00
configure.ac copy from intranet. 2019-07-10 17:54:02 +08:00
doxygen.cfg.in copy from intranet. 2019-07-10 17:54:02 +08:00
INSTALL copy from intranet. 2019-07-10 17:54:02 +08:00
Makefile.am copy from intranet. 2019-07-10 17:54:02 +08:00
Makefile.in copy from intranet. 2019-07-10 17:54:02 +08:00
README.md copy from intranet. 2019-07-10 17:54:02 +08:00
README.tcpreplay copy from intranet. 2019-07-10 17:54:02 +08:00

/* Version Maintenance : LiJia(lijia01@iie.ac.cn) Create Time : 2013-06-06 Latest Time : 2018-06-12

tcpburst-2.1: 支持vxlan封装格式, 将已有的pcap包内容封装在vxlan数据包内, 用于模拟测试串联模式下的平台处理流量情况.

tcpburst-2.0: 支持marsio发包接口.

tcpburst-1.2: 20161214, 增加对GRE, 6over4, IPinIP等隧道协议的支持.

tcpburst-1.1 修改流放大部分算法.

tcpburst-1.0: 基于标准tcpreplay增加基于TCP或UDP流的放大功能可用于大流量包回放、性能测试等.

修改背景: 标准的tcpreplay读包速率受硬盘传输速度影响一般最高在600Mbps左右. 本程序在tcpreplay的基础上针对上述瓶颈做了一些修改: 每读到一个TCP或UDP包原始包原样转发然后对其IP地址进行修改后再次发送N个包 这样捕包时会得到不同四元组、但应用层数据相同的流,达到流量放大目的.

功能介绍: 例: 原始TCP流 1.1.1.1:12345<-->10.10.10.10:80

假设流放大倍数=4则新回放的包中包含如下TCP流:
                  1.1.1.1:12345<-->10.10.10.10:80
                  2.1.1.1:12345<-->9.10.10.10:80
                  3.1.1.1:12345<-->8.10.10.10:80	
                  4.1.1.1:12345<-->7.10.10.10:80	
                  5.1.1.1:12345<--->6.10.10.10:80	

使用说明: configure make make install

在标准tcpreplay基础上新增加了2个参数:

-m, --stream-multiple=num  Replay streams at a given multiple流放大倍数;  
-d, --packet-distance=num  The distance between raw packet and fake replay packet原始包与虚假回放包的间距. 

packet-distance的作用:
假设原始流CPU近似占用率如下:
  cpu
  20|      /\
  15|     /  \	
  10|    /    \    /\
  05|   /      \  /  \
   0|--/--------\/----\-----time

设参数stream-multiple=4,  packet-distance=0 CPU近似占用率(注意纵坐标的变化!!!):

  cpu
  80|      /\
  40|     /  \	
  60|    /    \    /\
  20|   /      \  /  \
   0|--/--------\/----\-----time
(因为只改变了四元组,应用层数据是相同的,包间距=0的话即同样的应用层数据会在短时间内重复处理N次)

设参数stream-multiple=4,  packet-distance=100有可能会得到这样的CPU占用率:
  cpu
  40| /\/\/\/\/\/\/\/\/\/\/
  30|     
  20|  
  10|
   0|---------------------- time

所以,使用流放大功能的话,强烈推荐加-d选项合理设置packet-distance的值

*/