squid-
cache.org
Optimising Web Delivery
Docs
Download
Donate
Support
About
Contact
Shop
Blog
lib
snmplib
snmplib_debug.c
Go to the documentation of this file.
1
/*
2
* Copyright (C) 1996-2023 The Squid Software Foundation and contributors
3
*
4
* Squid software is distributed under GPLv2+ license and includes
5
* contributions from numerous individuals and organizations.
6
* Please see the COPYING and CONTRIBUTORS files for details.
7
*/
8
9
#include "
squid.h
"
10
11
#if HAVE_SYS_TYPES_H
12
#include <sys/types.h>
13
#endif
14
#include <stdarg.h>
15
16
#include "
snmp_debug.h
"
17
18
void (*
snmplib_debug_hook
) (
int
,
char
*,...) =
NULL
;
19
20
extern
void
21
snmplib_debug
(
int
lvl,
const
char
*fmt,...)
22
{
23
char
buf[
BUFSIZ
];
24
va_list args;
25
va_start(args, fmt);
26
27
if
(
snmplib_debug_hook
!=
NULL
) {
28
vsnprintf(buf,
BUFSIZ
, fmt, args);
29
snmplib_debug_hook
(lvl, buf);
30
}
else
{
31
vfprintf(stderr, fmt, args);
32
}
33
va_end(args);
34
}
35
BUFSIZ
#define BUFSIZ
Definition:
defines.h:20
snmp_debug.h
snmplib_debug_hook
void(* snmplib_debug_hook)(int, char *,...)
Definition:
snmplib_debug.c:18
snmplib_debug
void snmplib_debug(int lvl, const char *fmt,...)
Definition:
snmplib_debug.c:21
squid.h
int
int unsigned int
Definition:
stub_fd.cc:19
NULL
#define NULL
Definition:
types.h:145
Introduction
About Squid
Why Squid?
Squid Developers
How to Donate
How to Help Out
Getting Squid
Squid Source Packages
Squid Deployment Case-Studies
Squid Software Foundation
Documentation
Quick Setup
Configuration:
Reference
Examples
FAQ
and
Wiki
Guide Books:
Beginners
Definitive
Non-English
More...
Support
Security Advisories
Bugzilla Database
Mailing lists
Contacting us
Commercial services
Project Sponsors
Squid-based products
Miscellaneous
Developer Resources
Related Writings
Related Software:
Authenticators
Ecap
Icap
Ident
Log Analysis
Monitor
Proxies
Redirectors
General
Squid Artwork
Web Site Translations
Japanese
Mirrors
Website:
gr
il
pl
...
full list
FTP Package Archive