1*d8c47201Skettenis /* $OpenBSD: openpromio.h,v 1.1 2017/01/23 12:34:06 kettenis Exp $ */ 2*d8c47201Skettenis /* $NetBSD: openpromio.h,v 1.1.1.1 1998/06/20 04:58:52 eeh Exp $ */ 3*d8c47201Skettenis 4*d8c47201Skettenis /* 5*d8c47201Skettenis * Copyright (c) 1992, 1993 6*d8c47201Skettenis * The Regents of the University of California. All rights reserved. 7*d8c47201Skettenis * 8*d8c47201Skettenis * This software was developed by the Computer Systems Engineering group 9*d8c47201Skettenis * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and 10*d8c47201Skettenis * contributed to Berkeley. 11*d8c47201Skettenis * 12*d8c47201Skettenis * All advertising materials mentioning features or use of this software 13*d8c47201Skettenis * must display the following acknowledgement: 14*d8c47201Skettenis * This product includes software developed by the University of 15*d8c47201Skettenis * California, Lawrence Berkeley Laboratory. 16*d8c47201Skettenis * 17*d8c47201Skettenis * Redistribution and use in source and binary forms, with or without 18*d8c47201Skettenis * modification, are permitted provided that the following conditions 19*d8c47201Skettenis * are met: 20*d8c47201Skettenis * 1. Redistributions of source code must retain the above copyright 21*d8c47201Skettenis * notice, this list of conditions and the following disclaimer. 22*d8c47201Skettenis * 2. Redistributions in binary form must reproduce the above copyright 23*d8c47201Skettenis * notice, this list of conditions and the following disclaimer in the 24*d8c47201Skettenis * documentation and/or other materials provided with the distribution. 25*d8c47201Skettenis * 3. Neither the name of the University nor the names of its contributors 26*d8c47201Skettenis * may be used to endorse or promote products derived from this software 27*d8c47201Skettenis * without specific prior written permission. 28*d8c47201Skettenis * 29*d8c47201Skettenis * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 30*d8c47201Skettenis * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 31*d8c47201Skettenis * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 32*d8c47201Skettenis * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 33*d8c47201Skettenis * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 34*d8c47201Skettenis * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 35*d8c47201Skettenis * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 36*d8c47201Skettenis * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 37*d8c47201Skettenis * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 38*d8c47201Skettenis * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 39*d8c47201Skettenis * SUCH DAMAGE. 40*d8c47201Skettenis * 41*d8c47201Skettenis * @(#)openpromio.h 8.1 (Berkeley) 6/11/93 42*d8c47201Skettenis */ 43*d8c47201Skettenis 44*d8c47201Skettenis struct opiocdesc { 45*d8c47201Skettenis int op_nodeid; /* passed or returned node id */ 46*d8c47201Skettenis int op_namelen; /* length of op_name */ 47*d8c47201Skettenis char *op_name; /* pointer to field name */ 48*d8c47201Skettenis int op_buflen; /* length of op_buf (value-result) */ 49*d8c47201Skettenis char *op_buf; /* pointer to field value */ 50*d8c47201Skettenis }; 51*d8c47201Skettenis 52*d8c47201Skettenis #define OPIOCGET _IOWR('O', 1, struct opiocdesc) /* get openprom field */ 53*d8c47201Skettenis #define OPIOCSET _IOW('O', 2, struct opiocdesc) /* set openprom field */ 54*d8c47201Skettenis #define OPIOCNEXTPROP _IOWR('O', 3, struct opiocdesc) /* get next property */ 55*d8c47201Skettenis #define OPIOCGETOPTNODE _IOR('O', 4, int) /* get openprom field */ 56*d8c47201Skettenis #define OPIOCGETNEXT _IOWR('O', 5, int) /* get next node of node */ 57*d8c47201Skettenis #define OPIOCGETCHILD _IOWR('O', 6, int) /* get first child of node */ 58