1 /* $NetBSD: vaxstand.h,v 1.5 2000/06/15 19:53:23 ragge Exp $ */ 2 /* 3 * Copyright (c) 1994 Ludd, University of Lule}, Sweden. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 1. Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * 2. Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * 3. All advertising materials mentioning features or use of this software 15 * must display the following acknowledgement: 16 * This product includes software developed at Ludd, University of Lule}. 17 * 4. The name of the author may not be used to endorse or promote products 18 * derived from this software without specific prior written permission 19 * 20 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 21 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 22 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 23 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 */ 31 32 /* Variables used in autoconf */ 33 extern int askname; 34 extern struct rpb bootrpb; 35 extern int csrbase, nexaddr; 36 37 /* devsw type definitions, used in bootxx and conf */ 38 #define SADEV(name,strategy,open,close,ioctl) \ 39 { (char *)name, \ 40 (int(*)(void *, int ,daddr_t , size_t, void *, size_t *))strategy, \ 41 (int(*)(struct open_file *, ...))open, \ 42 (int(*)(struct open_file *))close, \ 43 (int(*)(struct open_file *,u_long, void *))ioctl} 44 45 #define SDELAY(count) {volatile int i; for (i = count; i; i--);} 46 /* 47 * Easy-to-use definitions 48 */ 49 #define min(x,y) (x < y ? x : y) 50 51 struct netif_driver; 52 53 char *index(char *, int); 54 int net_devinit(struct open_file *f, struct netif_driver *drv, u_char *eaddr); 55 56 /* device calls */ 57 int raopen(struct open_file *, int, int, int, int), 58 rastrategy(void *, int, daddr_t, size_t, void *, size_t *); 59 int hpopen(struct open_file *, int, int, int, int), 60 hpstrategy(void *, int, daddr_t, size_t, void *, size_t *); 61 int ctuopen(struct open_file *, int, int, int, int), 62 ctustrategy(void *, int, daddr_t, size_t, void *, size_t *); 63 int tmscpopen(struct open_file *, int, int, int, int), 64 tmscpstrategy(void *, int, daddr_t, size_t, void *, size_t *); 65 int romopen(struct open_file *, int, int, int, int), 66 romstrategy(void *, int, daddr_t, size_t, void *, size_t *); 67 int mfmopen(struct open_file *, int, int, int, int), 68 mfmstrategy(void *, int, daddr_t, size_t, void *, size_t *); 69 int sdopen(struct open_file *), 70 sdstrategy(void *, int, daddr_t, size_t, void *, size_t *); 71 int leopen(struct open_file *, int, int, int, int), 72 leclose(struct open_file *); 73 int qeopen(struct open_file *, int, int, int, int), 74 qeclose(struct open_file *); 75 int zeopen(struct open_file *, int, int, int, int), 76 zeclose(struct open_file *); 77 int deopen(struct open_file *, int, int, int, int), 78 declose(struct open_file *); 79 int niopen(struct open_file *, int, int, int, int), 80 niclose(struct open_file *); 81 int netopen(struct open_file *), netclose(struct open_file *); 82 83