+static void
+bond_event(struct ifnet * port_ifp, __unused protocol_family_t protocol,
+ const struct kev_msg * event)
+{
+ int event_code;
+
+ if (event->vendor_code != KEV_VENDOR_APPLE
+ || event->kev_class != KEV_NETWORK_CLASS
+ || event->kev_subclass != KEV_DL_SUBCLASS) {
+ return;
+ }
+ event_code = event->event_code;
+ switch (event_code) {
+ case KEV_DL_LINK_OFF:
+ case KEV_DL_LINK_ON:
+ /* we only care about link status changes */
+ bond_handle_event(port_ifp, event_code);
+ break;
+ default:
+ break;
+ }
+ return;
+}
+
+static errno_t
+bond_detached(ifnet_t port_ifp, __unused protocol_family_t protocol)
+{
+ bond_handle_event(port_ifp, KEV_DL_IF_DETACHED);
+ return (0);
+}
+