*
* @APPLE_LICENSE_HEADER_START@
*
- * The contents of this file constitute Original Code as defined in and
- * are subject to the Apple Public Source License Version 1.1 (the
- * "License"). You may not use this file except in compliance with the
- * License. Please obtain a copy of the License at
- * http://www.apple.com/publicsource and read it before using this file.
+ * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
*
- * This Original Code and all software distributed under the License are
- * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
- * License for the specific language governing rights and limitations
- * under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
*
* @APPLE_LICENSE_HEADER_END@
*/
#include <netat/routing_tables.h>
#include <netat/debug.h>
+#include <sys/kern_event.h>
+
static void zip_reply_to_getmyzone();
extern int at_reg_mcast(), at_unreg_mcast();
bcopy((caddr_t)new_zone, (caddr_t)&ifID->ifZoneName,
new_zone_len+1);
+ /* Send network zone change event and new zone for this interface. */
+ atalk_post_msg(ifID->aa_ifp, KEV_ATALK_ZONEUPDATED, 0, &(ifID->ifZoneName));
+ atalk_post_msg(ifID->aa_ifp, KEV_ATALK_ZONELISTCHANGED, 0, 0);
+
/* add the new zone to the list of local zones */
if (!MULTIPORT_MODE && !DEFAULT_ZONE(&ifID->ifZoneName))
(void)setLocalZones(&ifID->ifZoneName,
* to us.
*/
/* *** Do we really need to check this? *** */
- if (!zonename_equal((at_nvestr_t *)netinfo->data, &ifID->ifZoneName))
+ if (!zonename_equal((at_nvestr_t *)netinfo->data, &ifID->ifZoneName)) {
+ dPrintf(D_M_ZIP, D_L_INFO, ("zip_netinfo_reply, !zonename_equal!!!"));
return;
+ }
ifID->ifThisCableStart = NET_VALUE(netinfo->cable_range_start);
ifID->ifThisCableEnd = NET_VALUE(netinfo->cable_range_end);
ZIPwakeup(ifID, ZIP_RE_AARP);
return;
}
+
+ if (!ifID->startup_inprogress) {
+ /* Send event with zone info. This covers case where we get zone info
+ after startup. During startup this event is sent from ZIPwakeup. */
+ atalk_post_msg(ifID->aa_ifp, KEV_ATALK_ZONEUPDATED, 0, &(ifID->ifZoneName));
+ }
ZIPwakeup(ifID, 0); /* no error */
return;
ifID->ifZoneName.len = 1;
ifID->ifZoneName.str[0] = '*';
ifID->ifZoneName.str[1] = '\0';
+
+ /* Send event with zone info. */
+ atalk_post_msg(ifID->aa_ifp, KEV_ATALK_ZONEUPDATED, 0, &(ifID->ifZoneName));
+
break;
default :
break;