在UDP通信中避免过多的ARP请求 [英] Avoid of excessive ARP requests in UDP communication

查看:246
本文介绍了在UDP通信中避免过多的ARP请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用MFC CSocket类使用UDP进行通信。过程非常简单:只要收到数据包,程序就会使用相同的套接字向发送方发送响应。一切正常,但看着WireShark的屏幕,我注意到一件奇怪的事情:每次程序发送一个ARP请求(如果你相信WireShark,发送一个响应后)。更奇怪的是,ARP请求不作为广播请求和发送方的有效MAC地址发送(事实上,必须确定)。

我使用SendTo()发送。如果之前未调用Connect(),则Send()不能与UDP套接字一起使用。有很多发件人,但程序在收到数据包后立即回复,并且收到此数据包的发件人立即回复。

如果有人向我解释这些冗余请求是多少,我将不胜感激(MAC已知!) ,以及如何避免它们。

I'm using MFC CSocket class to communicate using UDP. The procedure is very simple: as soon as the packet is received, the program sends a response to the sender, using the same socket. Everything works fine, but looking at the screen of WireShark, I noticed a strange thing: every time the program sends an ARP request (if you believe WireShark, after transmitting a response). What is even more strange, the ARP request is not sent as a broadcast request and a valid MAC address of the sender (which, in fact, would have to be determined).
I use SendTo() to transmit. Send() does not work with UDP socket if Connect() is not called before. There are many senders but program replies immediately on receiving a packet and to that sender from which this packet has been received.
I would be grateful if anyone explain to me how these redundant requests (MAC known!), And how to avoid them.

推荐答案

https://www.google.com/search?q=ARP+with+UDP [ ^ ]。


这篇关于在UDP通信中避免过多的ARP请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆