diff options
author | Olle Johansson <oej@edvina.net> | 2006-02-24 10:17:40 +0000 |
---|---|---|
committer | Olle Johansson <oej@edvina.net> | 2006-02-24 10:17:40 +0000 |
commit | dd5222fd30b3a15c08bf267dc8c703f3a5a4eb92 (patch) | |
tree | e87ec254faa8010e08a5c4d690b63f6bfa4373e5 /include/asterisk/utils.h | |
parent | e912ad9d35ed76a8cd5f9688c7ef597029a9bc43 (diff) |
Update to trunk
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/utils.h')
-rw-r--r-- | include/asterisk/utils.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/include/asterisk/utils.h b/include/asterisk/utils.h index 416f362f6..a61133163 100644 --- a/include/asterisk/utils.h +++ b/include/asterisk/utils.h @@ -142,14 +142,15 @@ struct ast_hostent { struct hostent *ast_gethostbyname(const char *host, struct ast_hostent *hp); -/* ast_md5_hash - \brief Produces MD5 hash based on input string */ +/*! \brief Produces MD5 hash based on input string */ void ast_md5_hash(char *output, char *input); /* ast_sha1_hash \brief Produces SHA1 hash based on input string */ void ast_sha1_hash(char *output, char *input); +/*! \brief Encode string into Base 64 encoded string */ int ast_base64encode(char *dst, const unsigned char *src, int srclen, int max); +/*! \brief Decode Base 64 encoded string */ int ast_base64decode(unsigned char *dst, const char *src, int max); /*! ast_uri_encode @@ -166,7 +167,6 @@ int ast_base64decode(unsigned char *dst, const char *src, int max); \param buflen Size of output buffer \param doreserved Convert reserved characters */ - char *ast_uri_encode(const char *string, char *outbuf, int buflen, int doreserved); /*! \brief Decode URI, URN, URL (overwrite string) @@ -217,14 +217,13 @@ const char *ast_inet_ntoa(char *buf, int bufsiz, struct in_addr ia); int ast_utils_init(void); int ast_wait_for_input(int fd, int ms); -/*! Compares the source address and port of two sockaddr_in */ +/*! \brief Compares the source address and port of two sockaddr_in */ static force_inline int inaddrcmp(const struct sockaddr_in *sin1, const struct sockaddr_in *sin2) { return ((sin1->sin_addr.s_addr != sin2->sin_addr.s_addr) || (sin1->sin_port != sin2->sin_port)); } -#define AST_STACKSIZE 256 * 1024 #define ast_pthread_create(a,b,c,d) ast_pthread_create_stack(a,b,c,d,0) int ast_pthread_create_stack(pthread_t *thread, pthread_attr_t *attr, void *(*start_routine)(void *), void *data, size_t stacksize); @@ -240,6 +239,10 @@ char *ast_process_quotes_and_slashes(char *start, char find, char replace_with); int getloadavg(double *list, int nelem); #endif +#define AST_STACKSIZE 256 * 1024 +#define AST_MAX_FILENAME_LEN 256 /*!< Maximum length of file names */ +#define AST_MAX_SHELL_COMMAND 512 /*!< Maximum length of shell commands */ + #ifdef linux #define ast_random random #else |