libprocstat.h (249681) | libprocstat.h (249684) |
---|---|
1/*- 2 * Copyright (c) 2009 Stanislav Sedov <stas@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 2009 Stanislav Sedov <stas@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/lib/libprocstat/libprocstat.h 249681 2013-04-20 08:10:47Z trociny $ | 26 * $FreeBSD: head/lib/libprocstat/libprocstat.h 249684 2013-04-20 08:17:20Z trociny $ |
27 */ 28 29#ifndef _LIBPROCSTAT_H_ 30#define _LIBPROCSTAT_H_ 31 32/* 33 * XXX: sys/elf.h conflicts with zfs_context.h. Workaround this by not 34 * including conflicting parts when building zfs code. --- 57 unchanged lines hidden (view full) --- 92#define PS_FST_FFLAG_NOFOLLOW 0x0100 93#define PS_FST_FFLAG_CREAT 0x0200 94#define PS_FST_FFLAG_TRUNC 0x0400 95#define PS_FST_FFLAG_EXCL 0x0800 96#define PS_FST_FFLAG_DIRECT 0x1000 97#define PS_FST_FFLAG_EXEC 0x2000 98#define PS_FST_FFLAG_HASLOCK 0x4000 99 | 27 */ 28 29#ifndef _LIBPROCSTAT_H_ 30#define _LIBPROCSTAT_H_ 31 32/* 33 * XXX: sys/elf.h conflicts with zfs_context.h. Workaround this by not 34 * including conflicting parts when building zfs code. --- 57 unchanged lines hidden (view full) --- 92#define PS_FST_FFLAG_NOFOLLOW 0x0100 93#define PS_FST_FFLAG_CREAT 0x0200 94#define PS_FST_FFLAG_TRUNC 0x0400 95#define PS_FST_FFLAG_EXCL 0x0800 96#define PS_FST_FFLAG_DIRECT 0x1000 97#define PS_FST_FFLAG_EXEC 0x2000 98#define PS_FST_FFLAG_HASLOCK 0x4000 99 |
100struct kinfo_kstack; |
|
100struct kinfo_vmentry; 101struct procstat; 102struct rlimit; 103struct filestat { 104 int fs_type; /* Descriptor type. */ 105 int fs_flags; /* filestat specific flags. */ 106 int fs_fflags; /* Descriptor access flags. */ 107 int fs_uflags; /* How this file is used. */ --- 48 unchanged lines hidden (view full) --- 156__BEGIN_DECLS 157void procstat_close(struct procstat *procstat); 158void procstat_freeargv(struct procstat *procstat); 159#ifndef ZFS 160void procstat_freeauxv(struct procstat *procstat, Elf_Auxinfo *auxv); 161#endif 162void procstat_freeenvv(struct procstat *procstat); 163void procstat_freegroups(struct procstat *procstat, gid_t *groups); | 101struct kinfo_vmentry; 102struct procstat; 103struct rlimit; 104struct filestat { 105 int fs_type; /* Descriptor type. */ 106 int fs_flags; /* filestat specific flags. */ 107 int fs_fflags; /* Descriptor access flags. */ 108 int fs_uflags; /* How this file is used. */ --- 48 unchanged lines hidden (view full) --- 157__BEGIN_DECLS 158void procstat_close(struct procstat *procstat); 159void procstat_freeargv(struct procstat *procstat); 160#ifndef ZFS 161void procstat_freeauxv(struct procstat *procstat, Elf_Auxinfo *auxv); 162#endif 163void procstat_freeenvv(struct procstat *procstat); 164void procstat_freegroups(struct procstat *procstat, gid_t *groups); |
165void procstat_freekstack(struct procstat *procstat, 166 struct kinfo_kstack *kkstp); |
|
164void procstat_freeprocs(struct procstat *procstat, struct kinfo_proc *p); 165void procstat_freefiles(struct procstat *procstat, 166 struct filestat_list *head); 167void procstat_freevmmap(struct procstat *procstat, 168 struct kinfo_vmentry *vmmap); 169struct filestat_list *procstat_getfiles(struct procstat *procstat, 170 struct kinfo_proc *kp, int mmapped); 171struct kinfo_proc *procstat_getprocs(struct procstat *procstat, --- 13 unchanged lines hidden (view full) --- 185#ifndef ZFS 186Elf_Auxinfo *procstat_getauxv(struct procstat *procstat, 187 struct kinfo_proc *kp, unsigned int *cntp); 188#endif 189char **procstat_getenvv(struct procstat *procstat, struct kinfo_proc *p, 190 size_t nchr); 191gid_t *procstat_getgroups(struct procstat *procstat, struct kinfo_proc *kp, 192 unsigned int *count); | 167void procstat_freeprocs(struct procstat *procstat, struct kinfo_proc *p); 168void procstat_freefiles(struct procstat *procstat, 169 struct filestat_list *head); 170void procstat_freevmmap(struct procstat *procstat, 171 struct kinfo_vmentry *vmmap); 172struct filestat_list *procstat_getfiles(struct procstat *procstat, 173 struct kinfo_proc *kp, int mmapped); 174struct kinfo_proc *procstat_getprocs(struct procstat *procstat, --- 13 unchanged lines hidden (view full) --- 188#ifndef ZFS 189Elf_Auxinfo *procstat_getauxv(struct procstat *procstat, 190 struct kinfo_proc *kp, unsigned int *cntp); 191#endif 192char **procstat_getenvv(struct procstat *procstat, struct kinfo_proc *p, 193 size_t nchr); 194gid_t *procstat_getgroups(struct procstat *procstat, struct kinfo_proc *kp, 195 unsigned int *count); |
196struct kinfo_kstack *procstat_getkstack(struct procstat *procstat, 197 struct kinfo_proc *kp, unsigned int *count); |
|
193int procstat_getosrel(struct procstat *procstat, struct kinfo_proc *kp, 194 int *osrelp); 195int procstat_getpathname(struct procstat *procstat, struct kinfo_proc *kp, 196 char *pathname, size_t maxlen); 197int procstat_getrlimit(struct procstat *procstat, struct kinfo_proc *kp, 198 int which, struct rlimit* rlimit); 199int procstat_getumask(struct procstat *procstat, struct kinfo_proc *kp, 200 unsigned short* umask); 201struct kinfo_vmentry *procstat_getvmmap(struct procstat *procstat, 202 struct kinfo_proc *kp, unsigned int *count); 203struct procstat *procstat_open_core(const char *filename); 204struct procstat *procstat_open_sysctl(void); 205struct procstat *procstat_open_kvm(const char *nlistf, const char *memf); 206__END_DECLS 207 208#endif /* !_LIBPROCSTAT_H_ */ | 198int procstat_getosrel(struct procstat *procstat, struct kinfo_proc *kp, 199 int *osrelp); 200int procstat_getpathname(struct procstat *procstat, struct kinfo_proc *kp, 201 char *pathname, size_t maxlen); 202int procstat_getrlimit(struct procstat *procstat, struct kinfo_proc *kp, 203 int which, struct rlimit* rlimit); 204int procstat_getumask(struct procstat *procstat, struct kinfo_proc *kp, 205 unsigned short* umask); 206struct kinfo_vmentry *procstat_getvmmap(struct procstat *procstat, 207 struct kinfo_proc *kp, unsigned int *count); 208struct procstat *procstat_open_core(const char *filename); 209struct procstat *procstat_open_sysctl(void); 210struct procstat *procstat_open_kvm(const char *nlistf, const char *memf); 211__END_DECLS 212 213#endif /* !_LIBPROCSTAT_H_ */ |