#define UINTEGER (ASN_APPLICATION | 7)
#define DEBUG
#ifdef DEBUG
-#define ERROR(string) fprintf(stderr,"%s(%d): %s\n",__FILE__, __LINE__, string);
+#define ERROR(string) fprintf(stderr,"%s(%d): ERROR %s\n",__FILE__, __LINE__, string);
#else
#define ERROR(string)
#endif
md5.o usec.o snmpdump.o
CC= @CC@
-FLAGS=
+FLAGS= -g
DEFS= -DBSD4_3 -DSQUID_SNMP=1
INCLUDE= -I../include -I./../include -I../src -I./../src
MIBDEFS= -DMIBFILEPATH=\"$(prefix)/lib\"
#include "asn1.h"
+#include <assert.h>
+
#ifndef NULL
#define NULL 0
#endif
u_char type; /* IN - ASN type of object */
int length; /* IN - length of object */
{
+ assert (*datalength >= 0);
*datalength -= 4;
if (*datalength < 0) {
*datalength += 4; /* fix up before punting */
/*
- * $Id: main.cc,v 1.194 1997/11/21 01:59:16 wessels Exp $
+ * $Id: main.cc,v 1.195 1997/11/21 05:55:53 wessels Exp $
*
* DEBUG: section 1 Startup and Main Loop
* AUTHOR: Harvest Derived
static void sendSignal(void);
static void serverConnectionsOpen(void);
static void watch_child(char **);
-#ifdef SQUID_SNMP
-extern void init_snmp();
-extern void initSquidSnmp();
-#endif
static void
usage(void)
{
}
}
#ifdef SQUID_SNMP
- initSquidSnmp();
+ snmpConnectionOpen();
#endif
clientdbInit();
statAvgInit();
}
configured_once = 1;
-
#ifdef SQUID_SNMP
- init_snmp();
+ snmpInit();
#endif
}
extern PF httpAccept;
extern DEFER httpAcceptDefer;
#ifdef SQUID_SNMP
-/*extern PF snmpHandleUdp; */
-/*extern void initSquidSnmp(); */
+extern PF snmpHandleUdp;
+extern void snmpInit(void);
+extern void snmpConnectionOpen(void);
#endif /* SQUID_SNMP */
extern void icpSendERROR(int fd,