util: NetworkMonitor: macOS version of fine-grained signals on interface state changes

Change-Id: I6da12356baa0038d08ff256d0d3ff726023d804b
Refs: #3817
diff --git a/tests/integrated/network-monitor.README.md b/tests/integrated/network-monitor.README.md
index b99f26c..a9a9af1 100644
--- a/tests/integrated/network-monitor.README.md
+++ b/tests/integrated/network-monitor.README.md
@@ -1,6 +1,6 @@
-## NetworkMonitor test
+# NetworkMonitor test
 
-These instructions are only for Linux.
+These instructions are only for Linux and macOS.
 
 Run the network-monitor integrated test binary, e.g.:
 ```
@@ -14,6 +14,8 @@
 `onEnumerationCompleted` is printed, along with a summary of all interfaces
 discovered thus far.
 
+## Linux
+
 [The following commands assume eth0 is the name of an ethernet interface
 on the machine. If your interfaces are named differently, replace eth0
 with the name of any ethernet interface that you have available.]
@@ -40,3 +42,29 @@
 eth0: onStateChanged no-carrier -> running
 nmtest0: onStateChanged no-carrier -> running
 ```
+
+## macOS
+
+[The following commands assume en0 is the name of an ethernet interface
+on the machine. If your interfaces are named differently, replace en0
+with the name of any ethernet interface that you have available.]
+
+Command | Expected output
+--------|----------------
+sudo ifconfig vlan1 create | `vlan1: onInterfaceAdded`
+sudo ifconfig vlan1 vlan 1 vlandev en0 | `vlan1: onStateChanged down -> running`
+sudo ifconfig vlan1 198.51.100.100/24 | `vlan1: onAddressAdded 198.51.100.100/24`
+sudo ifconfig vlan1 198.51.100.100/24 remove | `vlan1: onAddressRemoved 198.51.100.100/24`
+sudo ifconfig vlan1 inet6 2001:db8::1/80 | `vlan1: onAddressAdded 2001:db8::1/80` (and potentially link-local addresses)
+sudo ifconfig vlan1 inet6 2001:db8::1/80 remove | `vlan1: onAddressRemoved 2001:db8::1/80`
+sudo ifconfig vlan1 destroy | `vlan1: onInterfaceRemoved`
+
+If you unplug the ethernet cable from your network card, you should see:
+```
+en6: onStateChanged running -> down
+```
+
+Plugging the cable back in should produce the following messages:
+```
+en6: onStateChanged down -> running
+```