简体   繁体   English

使用libpcap速度限制发送数据包

[英]Sending packet using libpcap speed limitation

I wrote a program that captures Ethernet packets from some NIC (ie eth0) at high speed (about 1Gbps) and forward traffic using pcap_sendpacket() to another NIC (ie eth1). 我编写了一个程序,该程序可以高速(大约1Gbps)捕获来自某些NIC(即eth0)的以太网数据包,并使用pcap_sendpacket()将流量转发到另一个NIC(即eth1)。

While the forwarder Ethernet interface is not connected to another computer NIC, forwarding speed is desired, but when I connect it, sending speed gets down awfully (from 900 Mbps to 100 Mbps). 虽然转发器以太网接口未连接到另一台计算机NIC,但仍需要转发速度,但是当我将其连接时,发送速度会大大降低(从900 Mbps到100 Mbps)。

Can anybody explain the reason? 有人可以解释原因吗?

OS : Kubuntu linux 10.10 操作系统 :Kubuntu Linux 10.10
Language : C++ 语言 :C ++
Library : Libpcap 图书馆 :Libpcap

因为目标NIC是100 Bbps接口:D:p

或者网络设备的自动协商已关闭,并且首先尝试100Mbps。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM