48 #define CVT_BUF_MAX 1023 64 vsnprintf (mbuf,
sizeof mbuf, fbuf, list);
68 syslog (LOG_ERR,
"%s", mbuf);
78 log_error (
"This version of ISC DHCP is based on the release available");
79 log_error (
"on ftp.isc.org. Features have been added and other changes");
80 log_error (
"have been made to the base software release in order to make");
81 log_error (
"it work better with this distribution.");
83 log_error (
"Please report for this software via the Red Hat Bugzilla site:");
84 log_error (
" http://bugzilla.redhat.com");
104 va_start (list, fmt);
105 vsnprintf (mbuf,
sizeof mbuf, fbuf, list);
109 syslog (LOG_ERR,
"%s", mbuf);
131 va_start (list, fmt);
132 vsnprintf (mbuf,
sizeof mbuf, fbuf, list);
136 syslog (LOG_INFO,
"%s", mbuf);
158 va_start (list, fmt);
159 vsnprintf (mbuf,
sizeof mbuf, fbuf, list);
163 syslog (LOG_DEBUG,
"%s", mbuf);
180 const char *s = ibuf;
190 m = strerror (errno);
195 m =
"<unknown error>";
224 extern char *sys_errlist [];
226 static char errbuf [128];
228 if (err < 0 || err >= sys_nerr) {
229 sprintf (errbuf,
"Error %d", err);
232 return sys_errlist [err];
239 int err = WSAGetLastError ();
244 return "Permission denied";
246 return "Address already in use";
247 case WSAEADDRNOTAVAIL:
248 return "Cannot assign requested address";
249 case WSAEAFNOSUPPORT:
250 return "Address family not supported by protocol family";
252 return "Operation already in progress";
253 case WSAECONNABORTED:
254 return "Software caused connection abort";
255 case WSAECONNREFUSED:
256 return "Connection refused";
258 return "Connection reset by peer";
259 case WSAEDESTADDRREQ:
260 return "Destination address required";
262 return "Bad address";
264 return "Host is down";
265 case WSAEHOSTUNREACH:
266 return "No route to host";
268 return "Operation now in progress";
270 return "Interrupted function call";
272 return "Invalid argument";
274 return "Socket is already connected";
276 return "Too many open files";
278 return "Message too long";
280 return "Network is down";
282 return "Network dropped connection on reset";
284 return "Network is unreachable";
286 return "No buffer space available";
288 return "Bad protocol option";
290 return "Socket is not connected";
292 return "Socket operation on non-socket";
294 return "Operation not supported";
295 case WSAEPFNOSUPPORT:
296 return "Protocol family not supported";
298 return "Too many processes";
299 case WSAEPROTONOSUPPORT:
300 return "Protocol not supported";
302 return "Protocol wrong type for socket";
304 return "Cannot send after socket shutdown";
305 case WSAESOCKTNOSUPPORT:
306 return "Socket type not supported";
308 return "Connection timed out";
310 return "Resource temporarily unavailable";
311 case WSAHOST_NOT_FOUND:
312 return "Host not found";
314 case WSA_INVALID_HANDLE:
315 return "Specified event object handle is invalid";
316 case WSA_INVALID_PARAMETER:
317 return "One or more parameters are invalid";
318 case WSAINVALIDPROCTABLE:
319 return "Invalid procedure table from service provider";
320 case WSAINVALIDPROVIDER:
321 return "Invalid service provider version number";
323 return "Overlapped operations will complete later";
324 case WSA_IO_INCOMPLETE:
325 return "Overlapped I/O event object not in signaled state";
326 case WSA_NOT_ENOUGH_MEMORY:
327 return "Insufficient memory available";
329 case WSANOTINITIALISED:
330 return "Successful WSAStartup not yet performer";
332 return "Valid name, no data record of requested type";
334 return "This is a non-recoverable error";
336 case WSAPROVIDERFAILEDINIT:
337 return "Unable to initialize a service provider";
338 case WSASYSCALLFAILURE:
339 return "System call failure";
342 return "Network subsystem is unavailable";
344 return "Non-authoritative host not found";
345 case WSAVERNOTSUPPORTED:
346 return "WINSOCK.DLL version out of range";
348 return "Graceful shutdown in progress";
350 case WSA_OPERATION_ABORTED:
351 return "Overlapped operation aborted";
354 return "Unknown WinSock error";
int log_debug(const char *fmt,...)
int log_error(const char *fmt,...)
void log_fatal(const char *fmt,...)
void(* log_cleanup)(void)
void do_percentm(char *obuf, const char *ibuf)
int log_info(const char *fmt,...)