title: How can I see if a network connection changes state?
body: <p>I am writing an application that checks if the computer is connected to one particular network or not, and does some magic for our users.</p>
  
  <p>The application will run in the background and perform the check if the user requests it (menu in tray). I also want the application to automatically check and do magic if the user changes from wired to wireless, or disconnects and connects to a new network.</p>
  
  <p>Is it possible to make it trigger when a network interface changes state?</p>