diff options
author | Christian Grothoff <christian@grothoff.org> | 2009-06-08 20:13:04 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2009-06-08 20:13:04 +0000 |
commit | 9c4a3cd49e5bcf2ba9995c0e344498060ac0a466 (patch) | |
tree | 987c88a0e849b7f7eca2e863f2194475ebb51f3d /src/include/gnunet_common.h | |
parent | 231af2b9e9f19d407cd174eeca2013d1363bf553 (diff) | |
download | gnunet-9c4a3cd49e5bcf2ba9995c0e344498060ac0a466.tar.gz gnunet-9c4a3cd49e5bcf2ba9995c0e344498060ac0a466.zip |
debug code
Diffstat (limited to 'src/include/gnunet_common.h')
-rw-r--r-- | src/include/gnunet_common.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h index 61b572eb8..afc9b0bcb 100644 --- a/src/include/gnunet_common.h +++ b/src/include/gnunet_common.h | |||
@@ -217,6 +217,20 @@ void GNUNET_logger_remove (GNUNET_Logger logger, void *logger_cls); | |||
217 | */ | 217 | */ |
218 | const char *GNUNET_i2s (const struct GNUNET_PeerIdentity *pid); | 218 | const char *GNUNET_i2s (const struct GNUNET_PeerIdentity *pid); |
219 | 219 | ||
220 | |||
221 | /** | ||
222 | * Convert a "struct sockaddr*" (IPv4 or IPv6 address) to a string | ||
223 | * (for printing debug messages). This is one of the very few calls | ||
224 | * in the entire API that is NOT reentrant! | ||
225 | * | ||
226 | * @param addr the address | ||
227 | * @param addrlen the length of the address | ||
228 | * @return nicely formatted string for the address | ||
229 | * will be overwritten by next call to GNUNET_a2s. | ||
230 | */ | ||
231 | const char *GNUNET_a2s (const struct sockaddr *addr, | ||
232 | socklen_t addrlen); | ||
233 | |||
220 | /** | 234 | /** |
221 | * Convert error type to string. | 235 | * Convert error type to string. |
222 | * | 236 | * |