c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe/*
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe * CDDL HEADER START
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe *
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe * The contents of this file are subject to the terms of the
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe * Common Development and Distribution License, Version 1.0 only
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe * (the "License"). You may not use this file except in compliance
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe * with the License.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe *
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe * or http://www.opensolaris.org/os/licensing.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe * See the License for the specific language governing permissions
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov * and limitations under the License.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe *
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov * When distributing Covered Code, include this CDDL HEADER in each
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe * If applicable, add the following below this CDDL HEADER, with the
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov * fields enclosed by brackets "[]" replaced with your own identifying
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe * information: Portions Copyright [yyyy] [name of copyright owner]
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov *
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe * CDDL HEADER END
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov */
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe/*
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe * Copyright (c) 1999 by Sun Microsystems, Inc.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe * All rights reserved.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe */
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#ifndef _FCDRIVER_FCDRIVER_H
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#define _FCDRIVER_FCDRIVER_H
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#pragma ident "%Z%%M% %I% %E% SMI"
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#include <sys/fcode.h>
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#ifdef __cplusplus
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweextern "C" {
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#endif
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowetypedef struct NODEIDs {
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov fc_phandle_t my_handle;
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe device_t *node;
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe} my_nodeid_t;
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowetypedef struct MY_GLOBAL_DATA {
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov int fcode_fd;
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe char *path;
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov char *Progname;
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe struct fc_parameters fc;
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov fc_phandle_t attach;
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov fc_resource_t *nodeids;
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe char *search_path;
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe int init_done;
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe int first_node;
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov} common_data_t;
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankovtypedef struct MY_PRIVATE_DATA {
common_data_t *common;
fc_phandle_t node;
fc_phandle_t parent;
struct fc_parameters fc;
void *debug;
int upload;
} private_data_t;
#ifdef FCODE_INTERNAL
#include <fcdriver/proto.h>
#endif
void upload_nodes(fcode_env_t *);
void validate_nodes(fcode_env_t *);
#ifdef __cplusplus
}
#endif
#endif /* _FCDRIVER_FCDRIVER_H */