pem.h revision 3db86aab554edbb4244c8d1a1c90f152eee768af
/*
* 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 1999 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* PCMCIA Event Manager Driver
*/
#ifndef _PEM_H
#define _PEM_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/* #define PEM_DEBUG */
#define PEM_MAX_EVENTS 64
#define PEM_IDNUM 0x454D
#define PEM_NAME "pem"
#define PEM_MIN 0
#define PEM_MAX 1024
#define PEM_HIWATER 4096
#define PEM_LOWATER 1024
#define EM_INIT_REQ 0
#define EM_INFO_REQ 1
#define EM_MODIFY_EVENT_MASK_REQ 2
#define EM_GET_FIRST_TUPLE_REQ 3
#define EM_GET_NEXT_TUPLE_REQ 4
#define EM_INIT_ACK 5
#define EM_INFO_ACK 6
#define EM_EVENT_IND 7
#define EM_ADAPTER_INFO_REQ 8
#define EM_ADAPTER_INFO_ACK 9
#define EM_SOCKET_INFO_REQ 10
#define EM_SOCKET_INFO_ACK 11
#define EM_GET_SOCKET_REQ 12
#define EM_GET_SOCKET_ACK 13
#define EM_IDENT_SOCKET_REQ 14
#define EM_GET_FIRST_TUPLE_ACK 15
#define EM_BADPRIM 1
#define ___VERSION(a, b) (((a)<<8)|(b))
#define EM_CURRENT_VERSION EM_VERSION
typedef
struct em_init_req {
typedef
struct em_info_req {
typedef
struct em_modify_event_mask_req {
typedef
struct em_get_first_tuple_req {
typedef
struct em_get_first_tuple_ack {
typedef
struct em_get_next_tuple_req {
typedef
struct em_get_next_tuple_ack {
typedef
struct em_info_ack {
typedef
struct em_event_ind {
typedef
struct em_init_ack {
/* adapter info is essentially InquireAdapter */
typedef
struct em_adapter_info_req {
typedef
struct em_adapter_info_ack {
/* socket_info is essentially InquireSocket */
typedef
struct em_socket_info_req {
typedef
struct em_socket_info_ack {
/* get_socket */
typedef
struct em_get_socket_req {
typedef
struct em_get_socket_ack {
typedef
struct em_ident_socket_req {
union em_primitives {
};
#define EM_CLASS_SIZE 32
#define EM_EVENT_MASK_SIZE 32
#if defined(_KERNEL)
#define EM_EVENT_SIZE 4
typedef struct pem {
} pem_t;
#define EM_INIT 1
#define PEMF_EVENTS 0x0001
#define PEMF_CLASSES 0x0002
#define PEMF_INIT 0x0004
struct pem_event {
int pe_owner;
int pe_id;
int pe_event;
int pe_socket;
};
#define PE_OWN_FREE 0
#define PE_OWN_CLAIMED 1
#define PE_OWN_HANDLER 2
#define PEME_OK 0
#define PEME_NO_INFO 1
#define PEME_UNAVAILABLE 2
#define PEME_NO_CIS 3
#define PEME_NO_TUPLE 4
#define PEMTRACE 0x0001
#define PEMERRS 0x0002
#endif
#ifdef __cplusplus
}
#endif
#endif /* _PEM_H */