defs.h revision cee0fb94c0d4227de0a00efc162fb2739844b641
/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _DEFS_
#define _DEFS_
#if ! defined(__sys_types_h) && ! defined(_H_TYPES)
#endif
#ifndef sun
#ifndef _H_SELECT
#endif
#endif
#ifndef _DB_DEFS_
#include "db_defs.h"
#endif
#ifndef _DEFS_API_
#include "api/defs_api.h"
#endif
#ifndef SA_RESTART
#define SA_RESTART 0
#endif
#ifndef MAX
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
#endif
#ifndef MIN
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
#endif
#define DEFAULT_TIME_FORMAT "%m-%d-%y %H:%M:%S"
typedef enum {
LH_ERR_FIRST = 0,
} LH_ERR_TYPE;
#define CAP_MSG_INTERVAL 120
#define DATAGRAM_PATH "/tmp/"
#define MAX_ACSMT_PROCS 2
#define MAX_CSI 20
#define MAX_LSM_PTP 5
#define MAX_PORTS 16
#define MAX_RETRY 10
#define RETRY_TIMEOUT 2
#define RETRY 0x01
#define ACSEL "50001"
#define ACSLH "50002"
#define ACSLM "50003"
#define ACSSA "50004"
#define ACSSS "50005"
#define ACSPD "50006"
#define ACSLOCK "50007"
#define ACSSV "50008"
#define ACSCM "50009"
#define ACES "50010"
#define ACSMT "50100"
#define ANY_PORT "0"
#define TRACE_ACSSS_DAEMON 0x00000100L
#define TRACE_CSI 0x00000200L
#define TRACE_ACSLM 0x00000400L
#define TRACE_MOUNT 0x00000800L
#define TRACE_DISMOUNT 0x00001000L
#define TRACE_ENTER 0x00002000L
#define TRACE_EJECT 0x00004000L
#define TRACE_AUDIT 0x00008000L
#define TRACE_QUERY 0x00010000L
#define TRACE_VARY 0x00020000L
#define TRACE_RECOVERY 0x00040000L
#define TRACE_ACSSA 0x00080000L
#define TRACE_CP 0x00100000L
#define TRACE_LIBRARY_HANDLER 0x00200000L
#define TRACE_EVENT_LOGGER 0x00400000L
#define TRACE_CSI_PACKETS 0x00800000L
#define TRACE_LOCK_SERVER 0x01000000L
#define TRACE_SET_CAP 0x02000000L
#define TRACE_SET_CLEAN 0x04000000L
#define TRACE_ACSCM 0x08000000L
typedef void (*SIGFUNCP)();
typedef enum {
CLM_FIRST = 0,
} CL_MESSAGE;
typedef enum {
FIELD_FIRST = 0,
} FIELD;
typedef enum {
LOG_OPTION_FIRST = 0,
} LOG_OPTION;
typedef enum {
QUERY_TYPE_FIRST = 0,
} QUERY_TYPE;
typedef enum {
SELECT_OPTION_FIRST = 0,
typedef enum {
WRITE_MODE_FIRST = 0,
} WRITE_MODE;
#define MEDIA_TYPE_LEN 3
#define DRIVE_TYPE_LEN 3
#define MM_MAX_MEDIA_TYPES 36
#define MM_MAX_DRIVE_TYPES 40
#ifndef LINUX
extern char *sys_errlist[];
extern char *sys_siglist[];
#endif
extern char acsss_version[];
extern int sd_in;
extern int n_fds;
extern int fd_list[FD_SETSIZE];
extern char my_sock_name[SOCKET_NAME_SIZE];
extern TYPE my_module_type;
extern TYPE requestor_type;
extern int restart_count;
extern MESSAGE_ID request_id;
extern STATE process_state;
extern unsigned long trace_module;
extern unsigned long trace_value;
#endif /* _DEFS_ */