Deleted Added
full compact
main.c (155094) main.c (156066)
1/*
2 * Copyright (c) 2001-2003
3 * Fraunhofer Institute for Open Communication Systems (FhG Fokus).
4 * All rights reserved.
5 *
6 * Author: Harti Brandt <harti@freebsd.org>
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 12 unchanged lines hidden (view full) ---

21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
1/*
2 * Copyright (c) 2001-2003
3 * Fraunhofer Institute for Open Communication Systems (FhG Fokus).
4 * All rights reserved.
5 *
6 * Author: Harti Brandt <harti@freebsd.org>
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 12 unchanged lines hidden (view full) ---

21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * $Begemot: bsnmp/snmpd/main.c,v 1.97 2005/10/04 14:32:45 brandt_h Exp $
29 * $Begemot: bsnmp/snmpd/main.c,v 1.100 2006/02/14 09:04:20 brandt_h Exp $
30 *
31 * SNMPd main stuff.
32 */
33#include <sys/param.h>
34#include <sys/un.h>
35#include <sys/ucred.h>
36#include <sys/uio.h>
37#include <stdio.h>

--- 9 unchanged lines hidden (view full) ---

47#include <dlfcn.h>
48#include <inttypes.h>
49
50#ifdef USE_TCPWRAPPERS
51#include <arpa/inet.h>
52#include <tcpd.h>
53#endif
54
30 *
31 * SNMPd main stuff.
32 */
33#include <sys/param.h>
34#include <sys/un.h>
35#include <sys/ucred.h>
36#include <sys/uio.h>
37#include <stdio.h>

--- 9 unchanged lines hidden (view full) ---

47#include <dlfcn.h>
48#include <inttypes.h>
49
50#ifdef USE_TCPWRAPPERS
51#include <arpa/inet.h>
52#include <tcpd.h>
53#endif
54
55#include "support.h"
55#include "snmpmod.h"
56#include "snmpd.h"
57#include "tree.h"
58#include "oid.h"
59
56#include "snmpmod.h"
57#include "snmpd.h"
58#include "tree.h"
59#include "oid.h"
60
60#if !defined(INT32_MAX)
61#define INT32_MAX (0x7fffffff)
62#endif
63
64#define PATH_PID "/var/run/%s.pid"
65#define PATH_CONFIG "/etc/%s.config"
66
67uint64_t this_tick; /* start of processing of current packet (absolute) */
68uint64_t start_tick; /* start of processing */
69
70struct systemg systemg = {
71 NULL,

--- 1310 unchanged lines hidden (view full) ---

1382 debug.evdebug++;
1383 break;
1384
1385 case DBG_TRACE:
1386 if (value == NULL)
1387 syslog(LOG_ERR,
1388 "no value for 'trace'");
1389 else
61#define PATH_PID "/var/run/%s.pid"
62#define PATH_CONFIG "/etc/%s.config"
63
64uint64_t this_tick; /* start of processing of current packet (absolute) */
65uint64_t start_tick; /* start of processing */
66
67struct systemg systemg = {
68 NULL,

--- 1310 unchanged lines hidden (view full) ---

1379 debug.evdebug++;
1380 break;
1381
1382 case DBG_TRACE:
1383 if (value == NULL)
1384 syslog(LOG_ERR,
1385 "no value for 'trace'");
1386 else
1390 snmp_trace =
1391 strtoul(value, NULL, 0);
1387 snmp_trace = strtoul(value,
1388 NULL, 0);
1392 break;
1393
1394 case -1:
1395 if (suboptarg)
1396 syslog(LOG_ERR,
1397 "unknown debug flag '%s'",
1398 option);
1399 else

--- 978 unchanged lines hidden ---
1389 break;
1390
1391 case -1:
1392 if (suboptarg)
1393 syslog(LOG_ERR,
1394 "unknown debug flag '%s'",
1395 option);
1396 else

--- 978 unchanged lines hidden ---