How to check the status of the UDP port status

  • Thread starter Thread starter tsgd84
  • Start date Start date
T

tsgd84

I am writing a small application to check the status the given TCP and
UDP ports in a machine.

I have created a socket and connected to the machine using connect()
while specifying SOCK_STREAM [for TCP] in socket() the connect()
method fails as expected if the particular TCP port remain closed or
not permitted from TCP/IP filtering in Windows 2000 Professional.

But when SOCK_DGRAM [for UDP] in socket(), the connect() method
doesnot fail as expected if the particular UDP port remain closed or
not permitted from TCP/IP filtering in Windows 2000 Professional.

How do I check whether the particular UDP port is closed/opened/
restricted/permitted.

Thanks
Deenad
 
Back
Top