summaryrefslogtreecommitdiffstats
path: root/lib/pthread_safe.h
diff options
context:
space:
mode:
authorChris Hall <GMCH@hestia.halldom.com>2010-04-08 19:51:10 +0100
committerChris Hall <GMCH@hestia.halldom.com>2010-04-08 19:51:10 +0100
commit83447a051fbcc88b33fcea6670520687668d3ba1 (patch)
treef3be10368d9fc6c605c1ec351bc7c1f2c0c61ff0 /lib/pthread_safe.h
parent17b711e6e4a4d5ce3728a07890434d890ebb76b4 (diff)
downloadquagga-83447a051fbcc88b33fcea6670520687668d3ba1.tar.bz2
quagga-83447a051fbcc88b33fcea6670520687668d3ba1.tar.xz
New functions for error numbers and addresses in messages.
Implemented less onerous ways of including descriptions of errors and IP addresses in logging and other messages. Implemented mapping of error numbers to error names, which is generally more meaningful.
Diffstat (limited to 'lib/pthread_safe.h')
-rw-r--r--lib/pthread_safe.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/pthread_safe.h b/lib/pthread_safe.h
index 81adc668..0b2d7cdf 100644
--- a/lib/pthread_safe.h
+++ b/lib/pthread_safe.h
@@ -24,9 +24,19 @@
#include <netinet/in.h>
+typedef struct strerror strerror_t ;
+struct strerror
+{
+ char str[121] ; /* cannot imagine anything as big */
+} ;
+
extern void safe_init_r(void);
extern void safe_finish(void);
extern const char * safe_strerror(int errnum);
extern const char * safe_inet_ntoa (struct in_addr in);
+extern strerror_t errtoa(int err, int len) ;
+extern strerror_t errtoname(int err, int len) ;
+extern strerror_t errtostr(int err, int len) ;
+
#endif /* PTHREAD_SAFE_H_ */