Deleted Added
full compact
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 * Copyright (c) 2010 The FreeBSD Foundation
9 * All rights reserved.
10 *
11 * Portions of this software were developed by Shteryana Sotirova Shopova
12 * under sponsorship from the FreeBSD Foundation.
13 *
14 * Redistribution and use in source and binary forms, with or without
15 * modification, are permitted provided that the following conditions
16 * are met:
17 * 1. Redistributions of source code must retain the above copyright
18 * notice, this list of conditions and the following disclaimer.
19 * 2. Redistributions in binary form must reproduce the above copyright
20 * notice, this list of conditions and the following disclaimer in the
21 * documentation and/or other materials provided with the distribution.

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

99struct snmpd_usmstat snmpd_usmstats;
100
101/* snmpEngine */
102struct snmp_engine snmpd_engine;
103
104/* snmpSerialNo */
105int32_t snmp_serial_no;
106
107struct snmpd_target_stats snmpd_target_stats;
108
109/* search path for config files */
110const char *syspath = PATH_SYSCONFIG;
111
112/* list of all loaded modules */
113struct lmodules lmodules = TAILQ_HEAD_INITIALIZER(lmodules);
114
115/* list of loaded modules during start-up in the order they were loaded */
116static struct lmodules modules_start = TAILQ_HEAD_INITIALIZER(modules_start);

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

364
365 return (SNMP_CODE_OK);
366}
367
368/*
369 * Check whether access to each of var bindings in the PDU is allowed based
370 * on the user credentials against the configured User groups & VACM views.
371 */
364static enum snmp_code
372enum snmp_code
373snmp_pdu_auth_access(struct snmp_pdu *pdu, int32_t *ip)
374{
375 const char *uname;
376 int32_t suboid, smodel;
377 uint32_t i;
378 struct vacm_user *vuser;
379 struct vacm_access *acl;
380 struct vacm_context *vacmctx;

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

1841 exit(1);
1842 }
1843 if (or_register(&oid_begemotSnmpd, "The MIB module for the Begemot SNMPd.",
1844 NULL) == 0) {
1845 syslog(LOG_ERR, "cannot register begemotSnmpd MIB");
1846 exit(1);
1847 }
1848
1841 snmp_send_trap(&oid_coldStart, (struct snmp_value *)NULL);
1842
1849 while ((m = TAILQ_FIRST(&modules_start)) != NULL) {
1850 m->flags &= ~LM_ONSTARTLIST;
1851 TAILQ_REMOVE(&modules_start, m, start);
1852 lm_start(m);
1853 }
1854
1855 snmp_send_trap(&oid_coldStart, (struct snmp_value *)NULL);
1856
1857 for (;;) {
1858#ifndef USE_LIBBEGEMOT
1859 evEvent event;
1860#endif
1861 struct lmodule *mod;
1862
1863 TAILQ_FOREACH(mod, &lmodules, link)
1864 if (mod->config->idle != NULL)

--- 1389 unchanged lines hidden ---