]>
git.saurik.com Git - apple/xnu.git/blob - bsd/netat/aurp_cfg.c
97f8c6d33f467cf3ee17f14345543e25d2bfacf9
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
20 * @APPLE_LICENSE_HEADER_END@
23 * Copyright (c) 1996 Apple Computer, Inc.
25 * Created April 8, 1996 by Tuyen Nguyen
26 * Modified, March 17, 1997 by Tuyen Nguyen for MacOSX.
31 #include <sys/errno.h>
32 #include <sys/types.h>
33 #include <sys/param.h>
34 #include <machine/spl.h>
35 #include <sys/systm.h>
36 #include <sys/kernel.h>
38 #include <sys/filedesc.h>
39 #include <sys/fcntl.h>
41 #include <sys/socket.h>
42 #include <sys/socketvar.h>
45 #include <netat/sysglue.h>
46 #include <netat/appletalk.h>
47 #include <netat/at_var.h>
48 #include <netat/routing_tables.h>
49 #include <netat/at_pcb.h>
50 #include <netat/aurp.h>
52 extern atlock_t aurpgen_lock
;
53 static int aurp_inited
= 0;
54 static char aurp_minor_no
[4];
59 extern void AURPcmdx();
64 ATLOCKINIT(aurpgen_lock
);
67 for (i
=1; i
< sizeof(aurp_minor_no
); i
++) {
68 if (aurp_minor_no
[i
] == 0) {
69 aurp_minor_no
[i
] = (char )i
;
73 if (i
== sizeof(aurp_minor_no
))
77 if (ddp_AURPfuncx(AURPCODE_REG
, AURPcmdx
, 0)) {
84 gref
->info
= (void *)&aurp_minor_no
[i
];
91 if (*(char *)gref
->info
== 1) {
94 ddp_AURPfuncx(AURPCODE_REG
, 0, 0);
97 *(char *)gref
->info
= 0;