+
+/* From dlil_post_msg() */
+void atalk_post_msg(struct ifnet *ifp, u_long event_code, struct at_addr *address, at_nvestr_t *zone)
+{
+ struct kev_atalk_data at_event_data;
+ struct kev_msg ev_msg;
+
+ ev_msg.vendor_code = KEV_VENDOR_APPLE;
+ ev_msg.kev_class = KEV_NETWORK_CLASS;
+ ev_msg.kev_subclass = KEV_ATALK_SUBCLASS;
+ ev_msg.event_code = event_code;
+
+ bzero(&at_event_data, sizeof(struct kev_atalk_data));
+
+ if (ifp != 0) {
+ strncpy(&at_event_data.link_data.if_name[0], ifp->if_name, IFNAMSIZ);
+ at_event_data.link_data.if_family = ifp->if_family;
+ at_event_data.link_data.if_unit = (unsigned long) ifp->if_unit;
+ }
+
+ if (address != 0) {
+ at_event_data.node_data.address = *address;
+ }
+ else if (zone != 0) {
+ at_event_data.node_data.zone = *zone;
+ }
+
+ ev_msg.dv[0].data_length = sizeof(struct kev_atalk_data);
+ ev_msg.dv[0].data_ptr = &at_event_data;
+ ev_msg.dv[1].data_length = 0;
+
+ kev_post_msg(&ev_msg);
+}