| 1 |
/* |
| 2 |
* Copyright (c) 2009, Giampaolo Rodola'. All rights reserved. |
| 3 |
* Use of this source code is governed by a BSD-style license that can be |
| 4 |
* found in the LICENSE file. |
| 5 |
*/ |
| 6 |
|
| 7 |
#if !defined(PSUTIL_OPENBSD) && !defined(PSUTIL_AIX) |
| 8 |
#define PSUTIL_HAS_POSIX_USERS |
| 9 |
|
| 10 |
PyObject *psutil_users(PyObject *self, PyObject *args); |
| 11 |
#endif |
| 12 |
|
| 13 |
#if defined(PSUTIL_BSD) || defined(PSUTIL_OSX) |
| 14 |
#include <sys/types.h> |
| 15 |
|
| 16 |
#define PSUTIL_HAS_SYSCTL |
| 17 |
|
| 18 |
int psutil_sysctl(int *mib, u_int miblen, void *buf, size_t buflen); |
| 19 |
int psutil_sysctl_malloc(int *mib, u_int miblen, char **buf, size_t *buflen); |
| 20 |
int psutil_sysctl_argmax(); |
| 21 |
|
| 22 |
#if !defined(PSUTIL_OPENBSD) |
| 23 |
|
| 24 |
#define PSUTIL_HAS_SYSCTLBYNAME |
| 25 |
|
| 26 |
int psutil_sysctlbyname(const char *name, void *buf, size_t buflen); |
| 27 |
int psutil_sysctlbyname_malloc(const char *name, char **buf, size_t *buflen); |
| 28 |
#endif |
| 29 |
#endif |
| 30 |
|
| 31 |
#if defined(PSUTIL_BSD) || defined(PSUTIL_OSX) |
| 32 |
#define PSUTIL_HAS_NET_IF_DUPLEX_SPEED |
| 33 |
|
| 34 |
PyObject *psutil_net_if_duplex_speed(PyObject *self, PyObject *args); |
| 35 |
#endif |
| 36 |
|
| 37 |
int psutil_pid_exists(pid_t pid); |
| 38 |
long psutil_getpagesize(void); |
| 39 |
void psutil_raise_for_pid(pid_t pid, char *msg); |
| 40 |
|
| 41 |
PyObject *psutil_getpagesize_pywrapper(PyObject *self, PyObject *args); |
| 42 |
PyObject *psutil_net_if_addrs(PyObject *self, PyObject *args); |
| 43 |
PyObject *psutil_net_if_flags(PyObject *self, PyObject *args); |
| 44 |
PyObject *psutil_net_if_is_running(PyObject *self, PyObject *args); |
| 45 |
PyObject *psutil_net_if_mtu(PyObject *self, PyObject *args); |
| 46 |
PyObject *psutil_posix_getpriority(PyObject *self, PyObject *args); |
| 47 |
PyObject *psutil_posix_setpriority(PyObject *self, PyObject *args); |