Browse Source

Implement kvm_getproc2(), kvm_getargv2() and kvm_getenvv2() that use

the KERN_PROC2 sysctl.  Based on changes from NetBSD but uses our
own kvm_arg_sysctl().
OPENBSD_3_5
millert 21 years ago
parent
commit
3bdc00b537
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      src/include/kvm.h

+ 6
- 1
src/include/kvm.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: kvm.h,v 1.9 2003/08/01 17:38:33 avsm Exp $ */
/* $OpenBSD: kvm.h,v 1.10 2004/01/07 02:16:32 millert Exp $ */
/* $NetBSD: kvm.h,v 1.7 1996/04/19 12:02:50 leo Exp $ */ /* $NetBSD: kvm.h,v 1.7 1996/04/19 12:02:50 leo Exp $ */
/*- /*-
@ -54,17 +54,22 @@ __BEGIN_DECLS
typedef struct __kvm kvm_t; typedef struct __kvm kvm_t;
struct kinfo_proc; struct kinfo_proc;
struct kinfo_proc2;
int kvm_close(kvm_t *); int kvm_close(kvm_t *);
int kvm_dump_inval(kvm_t *); int kvm_dump_inval(kvm_t *);
int kvm_dump_mkheader(kvm_t *, off_t); int kvm_dump_mkheader(kvm_t *, off_t);
int kvm_dump_wrtheader(kvm_t *, FILE *, int); int kvm_dump_wrtheader(kvm_t *, FILE *, int);
char **kvm_getargv(kvm_t *, const struct kinfo_proc *, int); char **kvm_getargv(kvm_t *, const struct kinfo_proc *, int);
char **kvm_getargv2(kvm_t *, const struct kinfo_proc2 *, int);
char **kvm_getenvv(kvm_t *, const struct kinfo_proc *, int); char **kvm_getenvv(kvm_t *, const struct kinfo_proc *, int);
char **kvm_getenvv2(kvm_t *, const struct kinfo_proc2 *, int);
char *kvm_geterr(kvm_t *); char *kvm_geterr(kvm_t *);
int kvm_getloadavg(kvm_t *, double [], int); int kvm_getloadavg(kvm_t *, double [], int);
char *kvm_getfiles(kvm_t *, int, int, int *); char *kvm_getfiles(kvm_t *, int, int, int *);
struct kinfo_proc * struct kinfo_proc *
kvm_getprocs(kvm_t *, int, int, int *); kvm_getprocs(kvm_t *, int, int, int *);
struct kinfo_proc2 *
kvm_getproc2(kvm_t *, int, int, size_t, int *);
int kvm_nlist(kvm_t *, struct nlist *); int kvm_nlist(kvm_t *, struct nlist *);
kvm_t *kvm_open kvm_t *kvm_open
(const char *, const char *, const char *, int, const char *); (const char *, const char *, const char *, int, const char *);


Loading…
Cancel
Save