- Extended String object to use memory pools. Most fixed size char
array fields will be replaced using string pools. Same for most
malloc()-ed buffers.
+ - Changed icon handling to use the hostname and port of the squid
+ server, instead of the special hostname "internal.squid".
+ - All icons are now configured in mime.conf. No hardcoded icons,
+ including gohper icons.
- Fixed ICP bug when we send queries, but expect zero
replies.
- Fixed alignment/casting bugs for ICP messages.
Code is still beta and interoperability with browsers etc has
not been tested.
- Put #ifdefs around 'source_ping' code.
+ - Added missing typedef for _arp_ip_data (Wesha).
+ - Added regular-expression-based ACLs for client and server
+ domain names (Henrik Nordstrom).
+ - Fixed ident-related coredumps from incorrect callback data.
+ - Fixed parse_rfc1123() "space" bug.
+ - Fixed xrealloc() XMALLOC_DEBUG bug (not calling check_free())..
+ - Fixed some src/asn.c end-of-reply bugs and memory leaks.
+ - Fixed some peer->options flag-setting bugs.
+ - Fixed single-parent feature to work again
+ - Removed 'single_parent_bypass' configuration option; instead
+ just use 'no-query'.
+ - Surrounded 'source_ping' code with #ifdefs.
+ - Changed 'deny_info URL' to use a custom Error page.
+ - Modified src/client.c for testing POST requests.
Changes to squid-1.2.beta16 (Mar 4, 1998):
}
if (root == NULL){
- snmplib_debug(0, "Mib not initialized. Exiting.\n");
+ snmplib_debug(0, "Mib not initialized.\n");
return 0;
}
if ((*out_len = parse_subtree(root, input, output, out_len)) == 0)
}
struct snmp_mib_tree *
-read_mib(filename)
- char *filename;
+read_mib(char *filename)
{
FILE *fp;
struct node *nodes;
fp = fopen(filename, "r");
if (fp == NULL) {
- snmplib_debug(0, "failed to open MIB file: '%s'\n", filename);
+ snmplib_debug(1, "init_mib: %s: %s\n", filename, xstrerror());
return(NULL);
}
#include <varargs.h>
#endif
+#if !HAVE_SNPRINTF
+#include "snprintf.h"
+#endif
+
#ifdef __STDC__
void (*snmplib_debug_hook) (int,char *,...) = NULL;
#else
extern void
#ifdef __STDC__
-snmplib_debug(int lvl,char *fmt,...)
+snmplib_debug(int lvl, char *fmt,...)
{
- va_list args;
- va_start(args, fmt);
+ char buf[BUFSIZ];
+ va_list args;
+ va_start(args, fmt);
#else
snmplib_debug(va_alist)
- va_dcl
+ va_dcl
{
- va_list args;
- int lvl;
- char char *fmt;
- va_start(args);
- lvl = va_arg(args, int);
- fmt = va_arg(args, char *);
+ va_list args;
+ int lvl;
+ char char *fmt;
+ char buf[BUFSIZ];
+ va_start(args);
+ lvl = va_arg(args, int);
+ fmt = va_arg(args, char *);
#endif
- if (snmplib_debug_hook != NULL)
- snmplib_debug_hook(lvl, fmt, args);
- else
- vfprintf(stderr, fmt, args);
- va_end(args);
+ if (snmplib_debug_hook != NULL) {
+ vsnprintf(buf, BUFSIZ, fmt, args);
+ snmplib_debug_hook(lvl, buf);
+ } else {
+ vfprintf(stderr, fmt, args);
+ }
+ va_end(args);
}
/*
- * $Id: cache_cf.cc,v 1.258 1998/03/16 21:45:00 wessels Exp $
+ * $Id: cache_cf.cc,v 1.259 1998/03/17 05:12:34 wessels Exp $
*
* DEBUG: section 3 Configuration File Parsing
* AUTHOR: Harvest Derived
static void wordlistAdd(wordlist **, const char *);
static void configDoConfigure(void);
-#if SQUID_SNMP
-static void parse_snmp_conf(snmpconf **);
-#endif
static void parse_refreshpattern(refresh_t **);
static int parseTimeUnits(const char *unit);
static void parseTimeLine(time_t * tptr, const char *units);
static void parse_string(char **);
static void parse_wordlist(wordlist **);
+static void parse_stringlist(wordlist **);
static void default_all(void);
static void defaults_if_none(void);
static int parse_line(char *);
}
}
-#if SQUID_SNMP
-static void
-parse_snmp_conf(snmpconf ** s)
-{
- static char buff[256];
- static char *tokens[10], *p;
-
- if (Mib == NULL) {
- if (Config.Snmp.mibPath)
- init_mib(Config.Snmp.mibPath);
- else
- fatal("snmp_mib_path should be defined before any snmp_agent_conf\n");
- }
- p = strtok(NULL, null_string);
- xstrncpy(buff, p, 256);
- tokenize(buff, tokens, 10);
- if (!strcmp("view", tokens[0])) {
- if (create_view(tokens) < 0)
- debug(49, 5) ("snmp: parse_snmpconf(): error\n");
- } else if (!strcmp("user", tokens[0])) {
- if (create_user(tokens) < 0)
- debug(49, 5) ("snmp: parse_snmpconf(): error\n");
- } else if (!strcmp("community", tokens[0])) {
- if (create_community(tokens) < 0)
- debug(49, 5) ("snmp: parse_snmpconf(): error\n");
- } else
- debug(49, 5) ("snmp: unknown directive %s\n", tokens[0]);
-}
-
-static void
-dump_snmp_conf(StoreEntry * entry, const char *name, snmpconf * head)
-{
- storeAppendPrintf(entry, "%s -- UNIMPLEMENTED\n", name);
-}
-
-static void
-free_snmp_conf(snmpconf ** head)
-{
- snmpconf *t;
- while ((t = *head) != NULL) {
- *head = t->next;
- safe_free(t->line);
- safe_free(t);
- }
-}
-#endif
-
static void
parse_acl(acl ** acl)
{
parse_wordlist(wordlist ** list)
{
char *token;
-
while ((token = strtok(NULL, w_space)))
wordlistAdd(list, token);
}
+static void
+parse_stringlist(wordlist ** list)
+{
+ char *token;
+ while ((token = strtok(NULL, null_string)))
+ wordlistAdd(list, token);
+}
+#define free_stringlist free_wordlist
+#define dump_stringlist dump_wordlist
+
#define free_wordlist wordlistDestroy
#include "cf_parser.c"
DOC_END
NAME: snmp_agent_conf
-TYPE: snmp_conf
+TYPE: stringlist
LOC: Config.Snmp.snmpconf
DEFAULT: none
IFDEF: SQUID_SNMP
/*
- * $Id: main.cc,v 1.236 1998/03/13 05:41:37 wessels Exp $
+ * $Id: main.cc,v 1.237 1998/03/17 05:12:36 wessels Exp $
*
* DEBUG: section 1 Startup and Main Loop
* AUTHOR: Harvest Derived
httpHeaderInitModule(); /* must go before any header processing (e.g. the one in errorInitialize) */
errorInitialize();
accessLogInit();
+#ifdef SQUID_SNMP
+ snmpInit();
+#endif
#if MALLOC_DBG
malloc_debug(0, malloc_debug_level);
eventAdd("fqdncache_purgelru", fqdncache_purgelru, NULL, 15);
}
configured_once = 1;
-#ifdef SQUID_SNMP
- snmpInit();
-#endif
}
int
acl_arp_data *next;
#endif
};
-
#endif
struct _String {
};
#if SQUID_SNMP
-struct _snmpconf {
- char *line;
- int type;
- snmpconf *next;
-};
-
struct _snmp_request_t {
u_char *buf;
u_char *outbuf;
int authWriteView;
struct _usecEntry *next;
} usecEntry;
-
#endif
struct _acl {
u_short localPort;
int do_queueing;
int conf_authtraps;
- struct _snmpconf *snmpconf;
+ wordlist *snmpconf;
viewEntry *views;
usecEntry *users;
communityEntry *communities;
typedef struct _acl_proxy_auth acl_proxy_auth;
typedef struct _acl_arp_data acl_arp_data;
typedef struct _acl acl;
-typedef struct _snmpconf snmpconf;
typedef struct _snmp_request_t snmp_request_t;
typedef struct _acl_list acl_list;
typedef struct _acl_access acl_access;