1*29295d1cSmillert /* $OpenBSD: openpromio.h,v 1.3 2003/06/02 23:27:56 millert Exp $ */ 2284584b0Sjason /* $NetBSD: openpromio.h,v 1.1.1.1 1998/06/20 04:58:52 eeh Exp $ */ 3284584b0Sjason 4284584b0Sjason /* 5284584b0Sjason * Copyright (c) 1992, 1993 6284584b0Sjason * The Regents of the University of California. All rights reserved. 7284584b0Sjason * 8284584b0Sjason * This software was developed by the Computer Systems Engineering group 9284584b0Sjason * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and 10284584b0Sjason * contributed to Berkeley. 11284584b0Sjason * 12284584b0Sjason * All advertising materials mentioning features or use of this software 13284584b0Sjason * must display the following acknowledgement: 14284584b0Sjason * This product includes software developed by the University of 15284584b0Sjason * California, Lawrence Berkeley Laboratory. 16284584b0Sjason * 17284584b0Sjason * Redistribution and use in source and binary forms, with or without 18284584b0Sjason * modification, are permitted provided that the following conditions 19284584b0Sjason * are met: 20284584b0Sjason * 1. Redistributions of source code must retain the above copyright 21284584b0Sjason * notice, this list of conditions and the following disclaimer. 22284584b0Sjason * 2. Redistributions in binary form must reproduce the above copyright 23284584b0Sjason * notice, this list of conditions and the following disclaimer in the 24284584b0Sjason * documentation and/or other materials provided with the distribution. 25*29295d1cSmillert * 3. Neither the name of the University nor the names of its contributors 26284584b0Sjason * may be used to endorse or promote products derived from this software 27284584b0Sjason * without specific prior written permission. 28284584b0Sjason * 29284584b0Sjason * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 30284584b0Sjason * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 31284584b0Sjason * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 32284584b0Sjason * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 33284584b0Sjason * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 34284584b0Sjason * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 35284584b0Sjason * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 36284584b0Sjason * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 37284584b0Sjason * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 38284584b0Sjason * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 39284584b0Sjason * SUCH DAMAGE. 40284584b0Sjason * 41284584b0Sjason * @(#)openpromio.h 8.1 (Berkeley) 6/11/93 42284584b0Sjason */ 43284584b0Sjason 44284584b0Sjason struct opiocdesc { 45284584b0Sjason int op_nodeid; /* passed or returned node id */ 46284584b0Sjason int op_namelen; /* length of op_name */ 47284584b0Sjason char *op_name; /* pointer to field name */ 48284584b0Sjason int op_buflen; /* length of op_buf (value-result) */ 49284584b0Sjason char *op_buf; /* pointer to field value */ 50284584b0Sjason }; 51284584b0Sjason 52284584b0Sjason #define OPIOCGET _IOWR('O', 1, struct opiocdesc) /* get openprom field */ 53284584b0Sjason #define OPIOCSET _IOW('O', 2, struct opiocdesc) /* set openprom field */ 54284584b0Sjason #define OPIOCNEXTPROP _IOWR('O', 3, struct opiocdesc) /* get next property */ 55284584b0Sjason #define OPIOCGETOPTNODE _IOR('O', 4, int) /* get openprom field */ 56284584b0Sjason #define OPIOCGETNEXT _IOWR('O', 5, int) /* get next node of node */ 57284584b0Sjason #define OPIOCGETCHILD _IOWR('O', 6, int) /* get first child of node */ 58