stmf_state.h revision 09409df0fea2444decd38bc1b87ab7a80d3251e5
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
/*
* Copyright 2011, Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2013 by Delphix. All rights reserved.
*/
#ifndef _STMF_STATE_H
#define _STMF_STATE_H
#ifdef __cplusplus
extern "C" {
#endif
typedef struct stmf_state {
int stmf_nlps;
int stmf_npps;
int stmf_nlus;
int stmf_nlports;
stmf_opened:1,
rsvd:3;
struct stmf_svc_req *stmf_svc_active;
struct stmf_svc_req **stmf_svc_tailp;
} stmf_state_t;
/*
* svc flags
*/
#define STMF_SVC_STARTED 1
#define STMF_SVC_ACTIVE 2
#define STMF_SVC_TERMINATE 4
/*
* svc request. We probably have to modify it once more services (and probably
* different types of services) are added to the stmf_svc_thread.
*/
typedef struct stmf_svc_req {
struct stmf_svc_req *svc_next;
int svc_req_alloc_size;
int svc_cmd;
void *svc_obj;
struct stmf_state_change_info svc_info;
extern stmf_state_t stmf_state;
#ifdef __cplusplus
}
#endif
#endif /* _STMF_STATE_H */