Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals

utils.h

Go to the documentation of this file.
00001 /* 00002 * Asterisk -- A telephony toolkit for Linux. 00003 * 00004 * Utility functions 00005 * 00006 * Copyright (C) 2004, Digium 00007 * 00008 * This program is free software, distributed under the terms of 00009 * the GNU General Public License 00010 */ 00011 00012 #ifndef _ASTERISK_UTIL_H 00013 #define _ASTERISK_UTIL_H 00014 00015 #include <netdb.h> 00016 00017 static inline int ast_strlen_zero(const char *s) 00018 { 00019 return (*s == '\0'); 00020 } 00021 00022 struct ast_hostent { 00023 struct hostent hp; 00024 char buf[1024]; 00025 }; 00026 00027 extern struct hostent *ast_gethostbyname(const char *host, struct ast_hostent *hp); 00028 extern int ast_base64encode(char *dst, unsigned char *src, int srclen, int max); 00029 extern int ast_base64decode(unsigned char *dst, char *src, int max); 00030 00031 extern int test_for_thread_safety(void); 00032 extern const char *ast_inet_ntoa(char *buf, int bufsiz, struct in_addr ia); 00033 extern int ast_utils_init(void); 00034 00035 #ifdef inet_ntoa 00036 #undef inet_ntoa 00037 #endif 00038 #define inet_ntoa __dont__use__inet_ntoa__use__ast_inet_ntoa__instead__ 00039 00040 #endif

Generated on Tue Aug 17 16:13:54 2004 for Asterisk by doxygen 1.3.8