0

I used pcap_sendPacket() to send raw UDP packet which i crafted manually.

i want to increase the performance of my code by reducing the

context switches.

But i got the sample code about pcap_sendqueue_queue() function

it sends variable number of packets in a time.but it reads read from

the already dumped .pcap file and .cap file.

i want to use this queue() function to send the same UDP packets which i crafted

it manually.

this is the link for sending the packets using pcap_sendpacket()?

http://pastebin.com/m402783ae

how to modify this code to send this packets in a queue()?

thanks in advance

4

1 回答 1

1

要使用 winpcap 的数据包队列,您必须调用:

  • pcap_sendqueue_alloc- 为原始数据包分配队列;
  • pcap_sendqueue_queue- 将原始数据包添加到队列中(pcap格式);
  • pcap_sendqueue_transmit- 发送队列。

但是,我没有看到 winpcap 文档(或 Google)未涵盖的问题中的要点。

于 2009-05-18T22:54:13.077 回答