Debian Codegraph @

contrib/mod_snmp/mod_snmp.h.in

raw
1 /*
2 * ProFTPD - mod_snmp
3 * Copyright (c) 2008-2016 TJ Saunders
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
18 *
19 * As a special exemption, TJ Saunders and other respective copyright holders
20 * give permission to link this program with OpenSSL, and distribute the
21 * resulting executable, without including the source code for OpenSSL in the
22 * source distribution.
23 */
24
25 #ifndef MOD_SNMP_H
26 #define MOD_SNMP_H
27
28 #include "conf.h"
29 #include "privs.h"
30
31 /* Define if you have the <sys/sysctl.h> header. */
32 #undef HAVE_SYS_SYSCTL_H
33
34 /* Define if you have the <sys/sysinfo.h> header. */
35 #undef HAVE_SYS_SYSINFO_H
36
37 /* Define if you have the random(3) function. */
38 #undef HAVE_RANDOM
39
40 /* Define if you have the sysctl(3) function. */
41 #undef HAVE_SYSCTL
42
43 /* Define if you have the sysinfo(2) function. */
44 #undef HAVE_SYSINFO
45
46 #include <signal.h>
47
48 #if HAVE_SYS_MMAN_H
49 # include <sys/mman.h>
50 #endif
51
52 #if HAVE_SYS_UIO_H
53 # include <sys/uio.h>
54 #endif
55
56 #define MOD_SNMP_VERSION "mod_snmp/0.2"
57
58 /* Make sure the version of proftpd is as necessary. */
59 #if PROFTPD_VERSION_NUMBER < 0x0001030403
60 # error "ProFTPD 1.3.4rc3 or later required"
61 #endif
62
63 /* RFC1157, Section 4 defines SNMPv1 as having a version value of 0. */
64 #define SNMP_PROTOCOL_VERSION_1 0
65
66 /* RFC1901 defines SNMPv2 as having a version value of 1. */
67 #define SNMP_PROTOCOL_VERSION_2 1
68
69 #define SNMP_PROTOCOL_VERSION_3 3
70
71 /* Miscellaneous */
72 extern int snmp_logfd;
73 extern pool *snmp_pool;
74 extern struct timeval snmp_start_tv;
75 extern int snmp_proto_udp;
76
77 #endif