prb_proc.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 (c) 1994, by Sun Microsytems, Inc.
*/
#ifndef _PRB_PROC_H
#define _PRB_PROC_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* Header file that gives the interfaces to the proc layer. These are the
* interfaces for "native" /proc i.e. when libtnfctl uses /proc directly
* on the target process (tnfctl_exec_open() and tnfctl_pid_open())
*/
/*
* Includes
*/
#include <signal.h>
#include <note.h>
/*
* Typedefs
*/
typedef enum prb_status {
/* successful status */
PRB_STATUS_OK = 0,
/* errors */
/*
* Status values in the range 1 to -1023 are reserved for mapping
* standard errno values.
*/
PRB_STATUS_ALLOCFAIL, /* memory allocation failed */
PRB_STATUS_BADARG, /* bad input argument */
PRB_STATUS_BADSYNC, /* couldn't sync with rtld */
PRB_STATUS_BADLMAPSTATE /* inconsistent link map */
} prb_status_t;
typedef enum prb_syscall_op {
PRB_SYS_ALL, /* turn on all system calls */
PRB_SYS_NONE, /* clears all system calls */
PRB_SYS_ADD, /* add a system call */
PRB_SYS_DEL /* delete a system call */
/*
* status of /proc file descriptor
*/
typedef struct prb_proc_state {
long ps_syscallnum;
/*
* Opaque /proc handle
*/
typedef struct prb_proc_ctl prb_proc_ctl_t;
/*
* prb_dbgaddr() has to be called with the address of DT_DEBUG before
* most other interfaces in the prb layer can be used.
*/
/*
* loadobject iteration callback specification
* WARNING: keep this structure in sync with tnfctl_ind_obj_info_t
*/
typedef struct prb_loadobj {
int objfd;
const char *objname;
void *calldata);
/* rtld interfaces */
/* generic /proc wrapper interfaces */
/* exec a child */
const char *loption, const char *libtnfprobe_path,
#ifdef __cplusplus
}
#endif
#endif /* _PRB_PROC_H */