49 #define CVT_BUF_MAX 1023 65 vsnprintf (mbuf,
sizeof mbuf, fbuf, list);
79 log_error (
"This version of ISC DHCP is based on the release available");
80 log_error (
"on ftp.isc.org. Features have been added and other changes");
81 log_error (
"have been made to the base software release in order to make");
82 log_error (
"it work better with this distribution.");
84 log_error (
"Please report for this software via the Red Hat Bugzilla site:");
85 log_error (
" http://bugzilla.redhat.com");
105 va_start (list, fmt);
106 vsnprintf (mbuf,
sizeof mbuf, fbuf, list);
132 va_start (list, fmt);
133 vsnprintf (mbuf,
sizeof mbuf, fbuf, list);
159 va_start (list, fmt);
160 vsnprintf (mbuf,
sizeof mbuf, fbuf, list);
181 const char *s = ibuf;
191 m = strerror (errno);
196 m =
"<unknown error>";
225 extern char *sys_errlist [];
227 static char errbuf [128];
229 if (err < 0 || err >= sys_nerr) {
230 sprintf (errbuf,
"Error %d", err);
233 return sys_errlist [err];
240 int err = WSAGetLastError ();
245 return "Permission denied";
247 return "Address already in use";
248 case WSAEADDRNOTAVAIL:
249 return "Cannot assign requested address";
250 case WSAEAFNOSUPPORT:
251 return "Address family not supported by protocol family";
253 return "Operation already in progress";
254 case WSAECONNABORTED:
255 return "Software caused connection abort";
256 case WSAECONNREFUSED:
257 return "Connection refused";
259 return "Connection reset by peer";
260 case WSAEDESTADDRREQ:
261 return "Destination address required";
263 return "Bad address";
265 return "Host is down";
266 case WSAEHOSTUNREACH:
267 return "No route to host";
269 return "Operation now in progress";
271 return "Interrupted function call";
273 return "Invalid argument";
275 return "Socket is already connected";
277 return "Too many open files";
279 return "Message too long";
281 return "Network is down";
283 return "Network dropped connection on reset";
285 return "Network is unreachable";
287 return "No buffer space available";
289 return "Bad protocol option";
291 return "Socket is not connected";
293 return "Socket operation on non-socket";
295 return "Operation not supported";
296 case WSAEPFNOSUPPORT:
297 return "Protocol family not supported";
299 return "Too many processes";
300 case WSAEPROTONOSUPPORT:
301 return "Protocol not supported";
303 return "Protocol wrong type for socket";
305 return "Cannot send after socket shutdown";
306 case WSAESOCKTNOSUPPORT:
307 return "Socket type not supported";
309 return "Connection timed out";
311 return "Resource temporarily unavailable";
312 case WSAHOST_NOT_FOUND:
313 return "Host not found";
315 case WSA_INVALID_HANDLE:
316 return "Specified event object handle is invalid";
317 case WSA_INVALID_PARAMETER:
318 return "One or more parameters are invalid";
319 case WSAINVALIDPROCTABLE:
320 return "Invalid procedure table from service provider";
321 case WSAINVALIDPROVIDER:
322 return "Invalid service provider version number";
324 return "Overlapped operations will complete later";
325 case WSA_IO_INCOMPLETE:
326 return "Overlapped I/O event object not in signaled state";
327 case WSA_NOT_ENOUGH_MEMORY:
328 return "Insufficient memory available";
330 case WSANOTINITIALISED:
331 return "Successful WSAStartup not yet performer";
333 return "Valid name, no data record of requested type";
335 return "This is a non-recoverable error";
337 case WSAPROVIDERFAILEDINIT:
338 return "Unable to initialize a service provider";
339 case WSASYSCALLFAILURE:
340 return "System call failure";
343 return "Network subsystem is unavailable";
345 return "Non-authoritative host not found";
346 case WSAVERNOTSUPPORTED:
347 return "WINSOCK.DLL version out of range";
349 return "Graceful shutdown in progress";
351 case WSA_OPERATION_ABORTED:
352 return "Overlapped operation aborted";
355 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,...)