1105401Stmm/*- 2105401Stmm * Copyright (c) 2002 by Thomas Moestl <tmm@FreeBSD.org>. 3105401Stmm * All rights reserved. 4105401Stmm * 5105401Stmm * Redistribution and use in source and binary forms, with or without 6105401Stmm * modification, are permitted provided that the following conditions 7105401Stmm * are met: 8105401Stmm * 1. Redistributions of source code must retain the above copyright 9105401Stmm * notice, this list of conditions and the following disclaimer. 10105401Stmm * 2. Redistributions in binary form must reproduce the above copyright 11105401Stmm * notice, this list of conditions and the following disclaimer in the 12105401Stmm * documentation and/or other materials provided with the distribution. 13105401Stmm * 14105401Stmm * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15105401Stmm * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16105401Stmm * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17105401Stmm * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18105401Stmm * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19105401Stmm * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 20105401Stmm * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 21105401Stmm * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 22105401Stmm * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 23105401Stmm * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24105401Stmm * 25105401Stmm * $FreeBSD: releng/11.0/usr.sbin/ofwdump/ofw_util.h 129589 2004-05-22 16:51:11Z marius $ 26105401Stmm */ 27105401Stmm 28105401Stmm#ifndef OFW_UTIL_H 29105401Stmm#define OFW_UTIL_H 30105401Stmm 31105401Stmm#include <dev/ofw/openfirm.h> 32105401Stmm 33129589Smariusint ofw_open(int); 34105401Stmmvoid ofw_close(int); 35105401Stmm 36105401Stmmphandle_t ofw_root(int); 37129589Smariusphandle_t ofw_optnode(int); 38105401Stmmphandle_t ofw_peer(int, phandle_t); 39105401Stmmphandle_t ofw_child(int, phandle_t); 40129589Smariusphandle_t ofw_finddevice(int, const char *); 41105401Stmm 42105401Stmmint ofw_firstprop(int, phandle_t, char *, int); 43129589Smariusint ofw_nextprop(int, phandle_t, const char *, char *, int); 44105401Stmmint ofw_getprop(int, phandle_t, const char *, void *, int); 45129589Smariusint ofw_setprop(int, phandle_t, const char *, const void *, int); 46116212Stmmint ofw_getproplen(int, phandle_t, const char *); 47116212Stmmint ofw_getprop_alloc(int, phandle_t, const char *, void **, int *, 48116212Stmm int); 49105401Stmm 50105401Stmm#endif /* OFW_UTIL_H */ 51