Home | History | Annotate | Download | only in common
      1 /*
      2  * CDDL HEADER START
      3  *
      4  * The contents of this file are subject to the terms of the
      5  * Common Development and Distribution License (the License).
      6  * You may not use this file except in compliance with the License.
      7  *
      8  * You can obtain a copy of the license at usr/src/CDDL.txt
      9  * or http://www.opensolaris.org/os/licensing.
     10  * See the License for the specific language governing permissions
     11  * and limitations under the License.
     12  *
     13  * When distributing Covered Code, include this CDDL HEADER in each
     14  * file and include the License file at usr/src/CDDL.txt.
     15  * If applicable, add the following below this CDDL HEADER, with the
     16  * fields enclosed by brackets [] replaced with your own identifying
     17  * information: Portions Copyright [yyyy] [name of copyright owner]
     18  *
     19  * CDDL HEADER END
     20  */
     21 
     22 /*
     23  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
     24  * Use is subject to license terms.
     25  *
     26  * sap_common.h - Common utilities for SAP Netweaver data services.
     27  */
     28 
     29 
     30 #ifndef	_SAP_COMMON_H
     31 #define	_SAP_COMMON_H
     32 
     33 #pragma ident	"@(#)sap_common.h	1.12	07/06/06 SMI"
     34 
     35 #ifdef __cplusplus
     36 extern "C" {
     37 #endif
     38 
     39 /* Debug levels for error messages */
     40 #define	SCDS_DBG_HIGH		9
     41 
     42 /* buffer size for getpwdnam_r */
     43 #define	SCDS_ARRAY_SIZE		1024
     44 
     45 #define	DBG_LEVEL_HIGH		9
     46 
     47 #define	INT_ERR_MSG_SIZE	2048
     48 
     49 /* wait for an hour */
     50 #define	DEFAULT_HATIMERUN_TIMEOUT	3600
     51 
     52 /* INT_MAX divided by 4 since scds_timerun doesn't take INT_MAX */
     53 #define	MAX_TIMEOUT		(INT_MAX >> 2)
     54 
     55 /* PATH for the commands */
     56 #define	PATH_ENV		"/usr/sbin:/usr/bin:/usr/cluster/bin"
     57 /* max arg for execv */
     58 #define	MAX_ARGV		16
     59 
     60 #define	TEMP_DIR		"/var/run/cluster/"
     61 
     62 /* project name in S9 */
     63 #define	DEFAULT_PROJ		"default"
     64 
     65 int validate_hasp(int print, scds_handle_t handle);
     66 
     67 scha_err_t get_string_ext_property(scds_handle_t scds_handle,
     68 	char *prop_name, char **stringval);
     69 
     70 int validate_project_name(scds_handle_t handle, char *user);
     71 
     72 #ifdef  SAP_WEBAS_J2EE
     73 int
     74 timeout_run(scds_handle_t handle,
     75 	char *argvs,
     76 	boolean_t log_console,
     77 	int timeout,
     78 	int *ret_val,
     79 	char *sid,
     80 	char *homedir,
     81 	char *username,
     82 	uid_t uid,
     83 	gid_t gid,
     84 	char *sysn,
     85 	char *logdir);
     86 #else
     87 int
     88 timeout_run(scds_handle_t handle,
     89 	char *argvs,
     90 	boolean_t log_console,
     91 	int timeout,
     92 	int *ret_val,
     93 	char *sid,
     94 	char *homedir,
     95 	char *username,
     96 	uid_t uid,
     97 	gid_t gid,
     98 	char *sysn);
     99 #endif
    100 
    101 #ifdef __cplusplus
    102 }
    103 #endif
    104 
    105 #endif /* _SAP_COMMON_H */
    106