2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
14 /* Include afs installation dir retrieval routines */
15 #include <afs/dirpath.h>
17 /* These macros are return values from extractAddr. They do not represent
18 * any valid IP address and so can indicate a failure.
20 #define AFS_IPINVALID 0xffffffff /* invalid IP address */
21 #define AFS_IPINVALIDIGNORE 0xfffffffe /* no input given to extractAddr */
26 #include <sys/types.h>
27 #include <sys/socket.h>
28 #include <netinet/in.h>
29 #include <arpa/inet.h> /* for inet_ntoa() */
37 extern int mrafsStyleLogs;
39 extern int serverLogSyslog;
40 extern int serverLogSyslogFacility;
41 extern char *serverLogSyslogTag;
43 extern void vFSLog(const char *format, va_list args)
44 AFS_ATTRIBUTE_FORMAT(__printf__, 1, 0);
46 extern void SetLogThreadNumProgram(int (*func) (void) );
48 extern void FSLog(const char *format, ...)
49 AFS_ATTRIBUTE_FORMAT(__printf__, 1, 2);
51 #define ViceLog(level, str) do { if ((level) <= LogLevel) (FSLog str); } while (0)
52 #define vViceLog(level, str) do { if ((level) <= LogLevel) (vFSLog str); } while (0)
53 #define ViceLogThenPanic(level, str) \
54 do { ViceLog(level, str); osi_Panic str; } while(0);
56 extern int OpenLog(const char *filename);
57 extern int ReOpenLog(const char *fileName);
58 extern void SetupLogSignals(void);
65 /* Initialize the windows sockets before calling networking routines. */
66 extern int afs_winsockInit(void);
67 extern void afs_winsockCleanup(void);
69 /* Unbuffer output when Un*x would do line buffering. */
70 #define setlinebuf(S) setvbuf(S, NULL, _IONBF, 0)
72 #endif /* AFS_NT40_ENV */
74 #ifndef HAVE_POSIX_REGEX
75 extern char *re_comp(const char *sp);
76 extern int re_exec(const char *p1);
79 typedef char b32_string_t[8];
80 /* b64_string_t is 8 bytes, in stds.h */
81 typedef char lb64_string_t[12];
83 #include <afs/ktime.h>
84 #include "afsutil_prototypes.h"
86 #endif /* _AFSUTIL_H_ */