]>
git.saurik.com Git - apple/xnu.git/blob - bsd/netat/aurp_cfg.c
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
23 * @APPLE_LICENSE_HEADER_END@
26 * Copyright (c) 1996 Apple Computer, Inc.
28 * Created April 8, 1996 by Tuyen Nguyen
29 * Modified, March 17, 1997 by Tuyen Nguyen for MacOSX.
34 #include <sys/errno.h>
35 #include <sys/types.h>
36 #include <sys/param.h>
37 #include <machine/spl.h>
38 #include <sys/systm.h>
39 #include <sys/kernel.h>
41 #include <sys/filedesc.h>
42 #include <sys/fcntl.h>
44 #include <sys/socket.h>
45 #include <sys/socketvar.h>
48 #include <netat/sysglue.h>
49 #include <netat/appletalk.h>
50 #include <netat/at_var.h>
51 #include <netat/routing_tables.h>
52 #include <netat/at_pcb.h>
53 #include <netat/aurp.h>
55 extern atlock_t aurpgen_lock
;
56 static int aurp_inited
= 0;
57 static char aurp_minor_no
[4];
62 extern void AURPcmdx();
67 ATLOCKINIT(aurpgen_lock
);
70 for (i
=1; i
< sizeof(aurp_minor_no
); i
++) {
71 if (aurp_minor_no
[i
] == 0) {
72 aurp_minor_no
[i
] = (char )i
;
76 if (i
== sizeof(aurp_minor_no
))
80 if (ddp_AURPfuncx(AURPCODE_REG
, AURPcmdx
, 0)) {
87 gref
->info
= (void *)&aurp_minor_no
[i
];
94 if (*(char *)gref
->info
== 1) {
97 ddp_AURPfuncx(AURPCODE_REG
, 0, 0);
100 *(char *)gref
->info
= 0;