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)
54 extern int OpenLog(const char *filename);
55 extern int ReOpenLog(const char *fileName);
56 extern void SetupLogSignals(void);
58 /* abort the current process. */
60 #define afs_abort() afs_NTAbort()
62 #define afs_abort() abort()
71 /* Initialize the windows sockets before calling networking routines. */
72 extern int afs_winsockInit(void);
73 extern void afs_winsockCleanup(void);
76 int tz_minuteswest; /* of Greenwich */
77 int tz_dsttime; /* type of dst correction to apply */
79 #define gettimeofday afs_gettimeofday
80 int afs_gettimeofday(struct timeval *tv, struct timezone *tz);
82 /* Unbuffer output when Un*x would do line buffering. */
83 #define setlinebuf(S) setvbuf(S, NULL, _IONBF, 0)
85 /* Abort on error, possibly trapping to debugger or dumping a trace. */
86 void afs_NTAbort(void);
87 #endif /* AFS_NT40_ENV */
89 #ifndef HAVE_POSIX_REGEX
90 extern char *re_comp(const char *sp);
91 extern int re_exec(const char *p1);
94 typedef char b32_string_t[8];
95 /* b64_string_t is 8 bytes, in stds.h */
96 typedef char lb64_string_t[12];
98 #include <afs/ktime.h>
99 #include "afsutil_prototypes.h"
101 #endif /* _AFSUTIL_H_ */