Take the 2-minute tour ×

I am searching for a method to be notified when any windows network interfaces go up or down or the addresses of any network interfaces are changed.

I would prefer solutions in C#, C is also possible. Winpcap could be used.

I am aware that there is an event for network adapter address changes in C#, but this also possible without enumerationg all adapters and looking the changed settings?

May some advanced programmer help a fellow newbie.

with best regards

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Have a look at the System.Net.NetworkInformation namespace. The NetworkChange class allows you to register for NetworkAddressChanged, and there are NetworkAvailability events and others that should cover most of what you're looking for. You will need to enumerate just like the sample shows- many machines have complex network setups that don't just boil down to "hey, something changed", so you'll need to set up the baseline before you start.

share|improve this answer
Thanks, I will try that. –  Emiswelt Oct 13 '09 at 10:14
add comment

Your Answer


