]>
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 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
21 * @APPLE_LICENSE_HEADER_END@
24 * Copyright (c) 1996 Apple Computer, Inc.
26 * Created April 8, 1996 by Tuyen Nguyen
27 * Modified, March 17, 1997 by Tuyen Nguyen for MacOSX.
32 #include <sys/errno.h>
33 #include <sys/types.h>
34 #include <sys/param.h>
35 #include <machine/spl.h>
36 #include <sys/systm.h>
37 #include <sys/kernel.h>
39 #include <sys/filedesc.h>
40 #include <sys/fcntl.h>
42 #include <sys/socket.h>
43 #include <sys/socketvar.h>
46 #include <netat/sysglue.h>
47 #include <netat/appletalk.h>
48 #include <netat/at_var.h>
49 #include <netat/routing_tables.h>
50 #include <netat/at_pcb.h>
51 #include <netat/aurp.h>
53 extern atlock_t aurpgen_lock
;
54 static int aurp_inited
= 0;
55 static char aurp_minor_no
[4];
60 extern void AURPcmdx();
65 ATLOCKINIT(aurpgen_lock
);
68 for (i
=1; i
< sizeof(aurp_minor_no
); i
++) {
69 if (aurp_minor_no
[i
] == 0) {
70 aurp_minor_no
[i
] = (char )i
;
74 if (i
== sizeof(aurp_minor_no
))
78 if (ddp_AURPfuncx(AURPCODE_REG
, AURPcmdx
, 0)) {
85 gref
->info
= (void *)&aurp_minor_no
[i
];
92 if (*(char *)gref
->info
== 1) {
95 ddp_AURPfuncx(AURPCODE_REG
, 0, 0);
98 *(char *)gref
->info
= 0;