Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

how do I know if the UDP port that i'm sending requests to is blocked? I am sending a snmp request and the SNMP agent receives requests on UDP port 161. I want to know if the port is blocked or not?

share|improve this question

migrated from Jul 30 '11 at 3:02

This question came from our site for professional and enthusiast programmers.

You don't. UDP is connectionless. The only way to tell is if you have something waiting to reply to your message and it doesn't respond. Even this doesn't tell you that it is blocked, it just tells you that something is wrong, sort of like a "general error."

edit: This assumes you were speaking in terms of discovering this remotely.

share|improve this answer

The definitive way to test whether a packet is received by the recipient computer is with a network sniffer. Use Wireshark. I recommend running Wireshark on both the client and the server (assuming they're both PCs, not a network appliance) so you can see it being sent as well as received (or not received if the firewall is blocking it).

share|improve this answer

You must log in to answer this question.