This repository was archived by the owner on Jun 3, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathglobals.c
More file actions
75 lines (62 loc) · 2.07 KB
/
globals.c
File metadata and controls
75 lines (62 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/* Global variables
*
* Copyright (C) 2008-2010 Robert Ernst <robert.ernst@linux-solutions.at>
*
* This file may be distributed and/or modified under the terms of the
* GNU General Public License version 2 as published by the Free Software
* Foundation and appearing in the file LICENSE.GPL included in the
* packaging of this file.
*
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* See COPYING for GPL licensing information.
*/
#include <stdio.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include "mini_snmpd.h"
const struct in_addr inaddr_any = { INADDR_ANY };
int g_family = AF_INET;
int g_timeout = 250; // once a 2,5 seconds
int g_auth = 0;
int g_daemon = 1;
int g_syslog = 0;
int g_verbose = 0;
int g_quit = 0;
char *g_community = "public";
char *g_vendor = VENDOR;
char *g_description = NULL;
char *g_location = NULL;
char *g_contact = NULL;
char *g_bind_to_device = NULL;
char *g_disk_list[MAX_NR_DISKS];
size_t g_disk_list_length;
char *g_interface_list[MAX_NR_INTERFACES];
#ifdef NDM
char *g_interface_name_list[MAX_NR_INTERFACES];
char *g_interface_descr_list[MAX_NR_INTERFACES];
size_t g_interface_type[MAX_NR_INTERFACES];
size_t g_interface_mtu[MAX_NR_INTERFACES];
char *g_interface_mac[MAX_NR_INTERFACES];
int g_interface_ip_address[MAX_NR_INTERFACES];
int g_interface_ip_mask[MAX_NR_INTERFACES];
#endif
size_t g_interface_list_length = 0;
in_port_t g_udp_port = 161;
in_port_t g_tcp_port = 161;
int g_udp_sockfd = -1;
int g_tcp_sockfd = -1;
client_t g_udp_client = { 0, };
client_t *g_tcp_client_list[MAX_NR_CLIENTS];
size_t g_tcp_client_list_length = 0;
value_t g_mib[MAX_NR_VALUES];
size_t g_mib_length = 0;
#ifdef NDM
struct ndm_core_t *g_ndmcore = NULL;
struct ndm_core_response_t *g_ndmresp = NULL;
#endif
/* vim: ts=4 sts=4 sw=4 nowrap
*/