Connected to network or peer-to-peer?

  • Thread starter Thread starter Michael Bauer
  • Start date Start date
M

Michael Bauer

Hello,

is there a simple way to detect whether the host machine of my c#
application is connected to a windows network or whether it is connected
peer-to-peer simply to one other machine (IP-adress unknown)?

My first try would be to find typical UDP broadcasts within a certain period
of time. If there are no such broadcast packages then I could assume that it
is a peer-to-peer connection otherwise it is a windows network.

But I guess this is not reliable, isn't it?

Any tipps or suggestions?

Thanks!
 
I wouldn't think that you would need to get that complicated about it. I
would just query network properties to see if I am part of a workgroup or
part of a domain. This way, I wouldn't have to worry about protocols
(TCP/IP, IPX/SPX, etc)

I would most likely use wmi to query this.
 
Back
Top