Changeset View
Changeset View
Standalone View
Standalone View
lib/libprocstat/libprocstat.h
Show First 20 Lines • Show All 162 Lines • ▼ Show 20 Lines | struct sockstat { | ||||
int type; | int type; | ||||
char dname[32]; | char dname[32]; | ||||
unsigned int sendq; | unsigned int sendq; | ||||
unsigned int recvq; | unsigned int recvq; | ||||
}; | }; | ||||
STAILQ_HEAD(filestat_list, filestat); | STAILQ_HEAD(filestat_list, filestat); | ||||
struct advlock { | |||||
int rw; /* PS_ADVLOCK_RO/RW */ | |||||
int type; /* PS_ADVLOCK_TYPE_ */ | |||||
int pid; | |||||
int sysid; | |||||
uint64_t file_fsid; | |||||
uint64_t file_rdev; | |||||
uint64_t file_fileid; | |||||
off_t start; | |||||
off_t len; /* len == 0 till the EOF */ | |||||
const char *path; | |||||
STAILQ_ENTRY(advlock) next; | |||||
}; | |||||
#define PS_ADVLOCK_RO 0x01 | |||||
#define PS_ADVLOCK_RW 0x02 | |||||
#define PS_ADVLOCK_TYPE_FLOCK 0x01 | |||||
#define PS_ADVLOCK_TYPE_PID 0x02 | |||||
#define PS_ADVLOCK_TYPE_REMOTE 0x03 | |||||
STAILQ_HEAD(advlock_list, advlock); | |||||
__BEGIN_DECLS | __BEGIN_DECLS | ||||
void procstat_close(struct procstat *procstat); | void procstat_close(struct procstat *procstat); | ||||
void procstat_freeadvlock(struct procstat *procstat, | |||||
struct advlock_list *advlocks); | |||||
void procstat_freeargv(struct procstat *procstat); | void procstat_freeargv(struct procstat *procstat); | ||||
#ifndef ZFS | #ifndef ZFS | ||||
void procstat_freeauxv(struct procstat *procstat, Elf_Auxinfo *auxv); | void procstat_freeauxv(struct procstat *procstat, Elf_Auxinfo *auxv); | ||||
#endif | #endif | ||||
void procstat_freeenvv(struct procstat *procstat); | void procstat_freeenvv(struct procstat *procstat); | ||||
void procstat_freegroups(struct procstat *procstat, gid_t *groups); | void procstat_freegroups(struct procstat *procstat, gid_t *groups); | ||||
void procstat_freekstack(struct procstat *procstat, | void procstat_freekstack(struct procstat *procstat, | ||||
struct kinfo_kstack *kkstp); | struct kinfo_kstack *kkstp); | ||||
void procstat_freeprocs(struct procstat *procstat, struct kinfo_proc *p); | void procstat_freeprocs(struct procstat *procstat, struct kinfo_proc *p); | ||||
void procstat_freefiles(struct procstat *procstat, | void procstat_freefiles(struct procstat *procstat, | ||||
struct filestat_list *head); | struct filestat_list *head); | ||||
void procstat_freeptlwpinfo(struct procstat *procstat, | void procstat_freeptlwpinfo(struct procstat *procstat, | ||||
struct ptrace_lwpinfo *pl); | struct ptrace_lwpinfo *pl); | ||||
void procstat_freevmmap(struct procstat *procstat, | void procstat_freevmmap(struct procstat *procstat, | ||||
struct kinfo_vmentry *vmmap); | struct kinfo_vmentry *vmmap); | ||||
struct advlock_list *procstat_getadvlock(struct procstat *procstat); | |||||
struct filestat_list *procstat_getfiles(struct procstat *procstat, | struct filestat_list *procstat_getfiles(struct procstat *procstat, | ||||
struct kinfo_proc *kp, int mmapped); | struct kinfo_proc *kp, int mmapped); | ||||
struct kinfo_proc *procstat_getprocs(struct procstat *procstat, | struct kinfo_proc *procstat_getprocs(struct procstat *procstat, | ||||
int what, int arg, unsigned int *count); | int what, int arg, unsigned int *count); | ||||
int procstat_get_pipe_info(struct procstat *procstat, struct filestat *fst, | int procstat_get_pipe_info(struct procstat *procstat, struct filestat *fst, | ||||
struct pipestat *pipe, char *errbuf); | struct pipestat *pipe, char *errbuf); | ||||
int procstat_get_pts_info(struct procstat *procstat, struct filestat *fst, | int procstat_get_pts_info(struct procstat *procstat, struct filestat *fst, | ||||
struct ptsstat *pts, char *errbuf); | struct ptsstat *pts, char *errbuf); | ||||
Show All 38 Lines |