-/*
- * $Id$
- */
#ifndef SQUID_CACHE_SNMP_H
#define SQUID_CACHE_SNMP_H
#if SQUID_SNMP
-#if SIZEOF_LONG == 8
-#define snint int
-#else
-#define snint long
-#endif
+typedef int64_t snint;
#ifndef MIN
#define MIN(a,b) (a<b?a:b)
SNMP_ALL_SOURCE = \
snmp_core.h \
snmp_core.cc \
+ snmp_agent.h \
snmp_agent.cc
if ENABLE_SNMP
SNMP_SOURCE = $(SNMP_ALL_SOURCE)
#include "Store.h"
#include "tools.h"
+#if SQUID_SNMP
+#include "snmp_core.h"
+#endif
+
static hash_table *client_table = NULL;
static ClientInfo *clientdbAdd(const Ip::Address &addr);
extern ClientInfo * clientdbGetInfo(const Ip::Address &addr);
#endif
+#if SQUID_SNMP
+extern Ip::Address *client_entry(Ip::Address *current);
+#endif
+
#endif /* SQUID_CLIENT_DB_H_ */
#include "util.h"
#include "wordlist.h"
+#if SQUID_SNMP
+#include "snmp_core.h"
+#endif
+
#if HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
#endif
#include "Store.h"
#include "wordlist.h"
+#if SQUID_SNMP
+#include "snmp_core.h"
+#endif
+
/**
\defgroup FQDNCacheAPI FQDN Cache API
\ingroup Components
#include "Store.h"
#include "wordlist.h"
+#if SQUID_SNMP
+#include "snmp_core.h"
+#endif
+
/**
\defgroup IPCacheAPI IP Cache API
\ingroup Components
#if USE_SQUID_ESI
#include "esi/Module.h"
#endif
+#if SQUID_SNMP
+#include "snmp_core.h"
+#endif
#if HAVE_PATHS_H
#include <paths.h>
#include "wordlist.h"
#include "anyp/ProtocolType.h"
-#if SQUID_SNMP
-SQUIDCEXTERN PF snmpHandleUdp;
-SQUIDCEXTERN void snmpInit(void);
-SQUIDCEXTERN void snmpOpenPorts(void);
-SQUIDCEXTERN void snmpClosePorts(void);
-SQUIDCEXTERN const char * snmpDebugOid(oid * Name, snint Len, MemBuf &outbuf);
-
-SQUIDCEXTERN void addr2oid(Ip::Address &addr, oid *Dest);
-SQUIDCEXTERN void oid2addr(oid *Dest, Ip::Address &addr, u_int code);
-
-SQUIDCEXTERN Ip::Address *client_entry(Ip::Address *current);
-extern variable_list *snmp_basicFn(variable_list *, snint *);
-extern variable_list *snmp_confFn(variable_list *, snint *);
-extern variable_list *snmp_sysFn(variable_list *, snint *);
-extern variable_list *snmp_prfSysFn(variable_list *, snint *);
-extern variable_list *snmp_prfProtoFn(variable_list *, snint *);
-extern variable_list *snmp_prfPeerFn(variable_list *, snint *);
-extern variable_list *snmp_netIpFn(variable_list *, snint *);
-extern variable_list *snmp_netFqdnFn(variable_list *, snint *);
-extern variable_list *snmp_netDnsFn(variable_list *, snint *);
-extern variable_list *snmp_meshPtblFn(variable_list *, snint *);
-extern variable_list *snmp_meshCtblFn(variable_list *, snint *);
-#endif /* SQUID_SNMP */
-
#include "comm/forward.h"
extern void shut_down(int);
#include "mem_node.h"
#include "neighbors.h"
#include "protos.h"
+#include "snmp_agent.h"
+#include "snmp_core.h"
#include "StatCounters.h"
#include "StatHist.h"
#include "SquidMath.h"
--- /dev/null
+#ifndef SQUID_SNMP_AGENT_H_
+#define SQUID_SNMP_AGENT_H_
+/*
+ * DEBUG: section
+ * AUTHOR:
+ *
+ * SQUID Web Proxy Cache http://www.squid-cache.org/
+ * ----------------------------------------------------------
+ *
+ * Squid is the result of efforts by numerous individuals from
+ * the Internet community; see the CONTRIBUTORS file for full
+ * details. Many organizations have provided support for Squid's
+ * development; see the SPONSORS file for full details. Squid is
+ * Copyrighted (C) 2001 by the Regents of the University of
+ * California; see the COPYRIGHT file for full details. Squid
+ * incorporates software developed and/or copyrighted by other
+ * sources; see the CREDITS file for full details.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ *
+ */
+
+#if SQUID_SNMP
+
+#include "snmp_vars.h"
+
+extern variable_list *snmp_confFn(variable_list *, snint *);
+extern variable_list *snmp_sysFn(variable_list *, snint *);
+extern variable_list *snmp_prfSysFn(variable_list *, snint *);
+extern variable_list *snmp_prfProtoFn(variable_list *, snint *);
+extern variable_list *snmp_netIpFn(variable_list *, snint *);
+extern variable_list *snmp_netFqdnFn(variable_list *, snint *);
+extern variable_list *snmp_netDnsFn(variable_list *, snint *);
+extern variable_list *snmp_meshPtblFn(variable_list *, snint *);
+extern variable_list *snmp_meshCtblFn(variable_list *, snint *);
+
+#endif /* SQUID_SNMP */
+#endif /* SQUID_SNMP_AGENT_H_ */
#include "squid.h"
#include "acl/FilledChecklist.h"
#include "base/CbcPointer.h"
+#include "client_db.h"
#include "comm.h"
#include "comm/Connection.h"
#include "comm/Loops.h"
#include "ip/Address.h"
#include "ip/tools.h"
#include "protos.h"
+#include "snmp_agent.h"
#include "snmp_core.h"
#include "snmp/Forwarder.h"
#include "tools.h"
/*
- * $Id$
- *
* DEBUG: section 49 SNMP Interface
*
*/
extern AggrType snmpAggrType(oid* Current, snint CurrentLen);
extern Comm::ConnectionPointer snmpOutgoingConn;
+extern PF snmpHandleUdp;
+extern void snmpInit(void);
+extern void snmpOpenPorts(void);
+extern void snmpClosePorts(void);
+extern const char * snmpDebugOid(oid * Name, snint Len, MemBuf &outbuf);
+extern void addr2oid(Ip::Address &addr, oid *Dest);
+extern void oid2addr(oid *Dest, Ip::Address &addr, u_int code);
+
#endif /* SQUID_SNMP_CORE_H */