1249666Strociny/*- 2249666Strociny * Copyright (c) 2013 Mikolaj Golub <trociny@FreeBSD.org> 3324932Sbdrewery * Copyright (c) 2017 Dell EMC 4249666Strociny * All rights reserved. 5249666Strociny * 6249666Strociny * Redistribution and use in source and binary forms, with or without 7249666Strociny * modification, are permitted provided that the following conditions 8249666Strociny * are met: 9249666Strociny * 1. Redistributions of source code must retain the above copyright 10249666Strociny * notice, this list of conditions and the following disclaimer. 11249666Strociny * 2. Redistributions in binary form must reproduce the above copyright 12249666Strociny * notice, this list of conditions and the following disclaimer in the 13249666Strociny * documentation and/or other materials provided with the distribution. 14249666Strociny * 15249666Strociny * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 16249666Strociny * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17249666Strociny * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18249666Strociny * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 19249666Strociny * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20249666Strociny * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21249666Strociny * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22249666Strociny * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23249666Strociny * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24249666Strociny * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25249666Strociny * SUCH DAMAGE. 26249666Strociny * 27249666Strociny * $FreeBSD: stable/11/lib/libprocstat/core.h 324932 2017-10-23 18:25:21Z bdrewery $ 28249666Strociny */ 29249666Strociny 30249666Strociny#ifndef _CORE_H 31249666Strociny#define _CORE_H 32249666Strociny 33249666Strocinyenum psc_type { 34249666Strociny PSC_TYPE_PROC, 35249666Strociny PSC_TYPE_FILES, 36249666Strociny PSC_TYPE_VMMAP, 37249670Strociny PSC_TYPE_GROUPS, 38249672Strociny PSC_TYPE_UMASK, 39249674Strociny PSC_TYPE_RLIMIT, 40249677Strociny PSC_TYPE_OSREL, 41249679Strociny PSC_TYPE_PSSTRINGS, 42249679Strociny PSC_TYPE_ARGV, 43249679Strociny PSC_TYPE_ENVV, 44249681Strociny PSC_TYPE_AUXV, 45324932Sbdrewery PSC_TYPE_PTLWPINFO, 46324932Sbdrewery PSC_TYPE_MAX 47249666Strociny}; 48249666Strociny 49249666Strocinystruct procstat_core; 50249666Strociny 51249666Strocinyvoid procstat_core_close(struct procstat_core *core); 52249666Strocinyvoid *procstat_core_get(struct procstat_core *core, enum psc_type type, 53249666Strociny void * buf, size_t *lenp); 54324932Sbdreweryint procstat_core_note_count(struct procstat_core *core, enum psc_type type); 55249666Strocinystruct procstat_core *procstat_core_open(const char *filename); 56249666Strociny 57249666Strociny#endif /* !_CORE_H_ */ 58