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