Get Destination Ip/Port of active udp Connection?

江枫思渺然 提交于 2019-12-04 06:36:19

问题


I m able to retrieved active TCP and UDP connection using iphlpapi. The TCP Connection showing with source info(ip/port), Destination info(ip/port), state and process id. But for UDP Connection its no giving remote IP and port. That what i want to get. Any way to get destination information using source information or process id in Delphi or c++.


回答1:


UDP is a connectionless protocol. You can only get the local port that has been opened.

UPDATE: This applies for a static look at the port usage. However, if you have active UDP trafic you can still retrieve the remote endpoint.

User Ishmeet suggested uIP or LwIP in the comments.

UDP - Wikipedia

Connectionless Protocol - Wikipedia



来源:https://stackoverflow.com/questions/17745971/get-destination-ip-port-of-active-udp-connection

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!