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, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 * 22 * Copyright 1997 Sun Microsystems, Inc. All Rights Reserved. 23 * Use is subject to license terms. 24 */ 25 26 #ifndef _RES_H_ 27 #define _RES_H_ 28 29 #pragma ident "%Z%%M% %I% %E% SMI" 30 31 #define RES_NOT_VISIT 0 32 #define RES_VISIT 1 33 34 #define TYPE_LEGACY_SUB_AGENT "legacy" 35 #define POLICY_SPAWN "spawn" 36 #define POLICY_LOAD "load" 37 38 /* resouce support */ 39 typedef struct _SapResource{ 40 struct _SapResource* next_res; 41 char *res_name; 42 char *dir_file; 43 char *personal_file; 44 time_t personal_file_time; 45 char *sec_file; 46 time_t sec_file_time; 47 int invoke_mode; /* invoke it and keep it alive */ 48 char* policy; 49 char* type; 50 char* user; 51 char *start_cmd; 52 Agent* agent; 53 int mark; /* flag for visit */ 54 time_t rsrc_file_time; 55 } SapResource; 56 57 extern SapResource *first_res; 58 extern SapResource *reconfig_first_res; 59 60 extern void resource_list_delete(); 61 extern void trace_resources(); 62 extern SapResource *resource_find_by_agent(Agent* agent); 63 extern void mark_all_resources_not_visit(); 64 extern SapResource *resource_find_by_name(char* name); 65 extern void get_file_modify_time(char* filename,time_t *file_time); 66 extern void resource_free(SapResource *ap); 67 extern void resource_detach(SapResource *tgt); 68 extern void merging_resource_list(); 69 extern void resource_handling(SapResource *rp); 70 extern int ssa_subagent_is_alive(Agent *agent); 71 extern void delete_pid_rec_list(); 72 extern void delete_agent_from_resource_list(Agent *agent); 73 extern void write_pid_file(char* filename); 74 extern void watch_dog_in_action(); 75 extern void kill_all_pid_rec_list(); 76 extern void kill_part_pid_rec_list(); 77 78 #endif 79 80