29#define AST_DIR_MODE 0777 
   32#define AST_FILE_MODE 0666 
   44#define AST_CURL_USER_AGENT "asterisk-libcurl-agent/1.0" 
   46#define DEFAULT_LANGUAGE "en" 
   48#define DEFAULT_SAMPLE_RATE 8000 
   49#define DEFAULT_SAMPLES_PER_MS  ((DEFAULT_SAMPLE_RATE)/1000) 
   50#define setpriority __PLEASE_USE_ast_set_priority_INSTEAD_OF_setpriority__ 
   51#define sched_setscheduler  __PLEASE_USE_ast_set_priority_INSTEAD_OF_sched_setscheduler__ 
   52#define strtok  __PLEASE_USE_strtok_r_INSTEAD_OF_strtok__ 
   54#if defined(DEBUG_FD_LEAKS) && !defined(STANDALONE) && !defined(STANDALONE2) && !defined(STANDALONE_AEL) 
   57#include <sys/socket.h> 
   60#define open(a,...) __ast_fdleak_open(__FILE__,__LINE__,__PRETTY_FUNCTION__, a, __VA_ARGS__) 
   61#define pipe(a)     __ast_fdleak_pipe(a, __FILE__,__LINE__,__PRETTY_FUNCTION__) 
   62#define socketpair(a,b,c,d) __ast_fdleak_socketpair(a, b, c, d, __FILE__,__LINE__,__PRETTY_FUNCTION__) 
   63#define socket(a,b,c)   __ast_fdleak_socket(a, b, c, __FILE__,__LINE__,__PRETTY_FUNCTION__) 
   64#define accept(a,b,c)   __ast_fdleak_accept(a, b, c, __FILE__,__LINE__,__PRETTY_FUNCTION__) 
   65#define close(a)    __ast_fdleak_close(a) 
   66#define fopen(a,b)  __ast_fdleak_fopen(a, b, __FILE__,__LINE__,__PRETTY_FUNCTION__) 
   67#define fclose(a)   __ast_fdleak_fclose(a) 
   68#define dup2(a,b)   __ast_fdleak_dup2(a, b, __FILE__,__LINE__,__PRETTY_FUNCTION__) 
   69#define dup(a)      __ast_fdleak_dup(a, __FILE__,__LINE__,__PRETTY_FUNCTION__) 
   71#if defined(__cplusplus) || defined(c_plusplus) 
   74int __ast_fdleak_open(
const char *file, 
int line, 
const char *func, 
const char *path, 
int flags, ...);
 
   75int __ast_fdleak_pipe(
int *fds, 
const char *file, 
int line, 
const char *func);
 
   76int __ast_fdleak_socketpair(
int domain, 
int type, 
int protocol, 
int sv[2],
 
   77    const char *file, 
int line, 
const char *func);
 
   78int __ast_fdleak_socket(
int domain, 
int type, 
int protocol, 
const char *file, 
int line, 
const char *func);
 
   79int __ast_fdleak_accept(
int socket, 
struct sockaddr *
address, socklen_t *address_len,
 
   80    const char *file, 
int line, 
const char *func);
 
   81#if defined(HAVE_EVENTFD) 
   82#include <sys/eventfd.h> 
   83#define eventfd(a,b)    __ast_fdleak_eventfd(a,b, __FILE__,__LINE__,__PRETTY_FUNCTION__) 
   84int __ast_fdleak_eventfd(
unsigned int initval, 
int flags, 
const char *file, 
int line, 
const char *func);
 
   86#if defined(HAVE_TIMERFD) 
   87#include <sys/timerfd.h> 
   88#define timerfd_create(a,b) __ast_fdleak_timerfd_create(a,b, __FILE__,__LINE__,__PRETTY_FUNCTION__) 
   89int __ast_fdleak_timerfd_create(
int clockid, 
int flags, 
const char *file, 
int line, 
const char *func);
 
   91int __ast_fdleak_close(
int fd);
 
   92FILE *__ast_fdleak_fopen(
const char *path, 
const char *mode, 
const char *file, 
int line, 
const char *func);
 
   93int __ast_fdleak_fclose(FILE *ptr);
 
   94int __ast_fdleak_dup2(
int oldfd, 
int newfd, 
const char *file, 
int line, 
const char *func);
 
   95int __ast_fdleak_dup(
int oldfd, 
const char *file, 
int line, 
const char *func);
 
   96#if defined(__cplusplus) || defined(c_plusplus) 
  178#define HAVE_MTX_PROFILE     
  198int64_t 
ast_mark(
int, 
int start1_stop0);
 
  215#define __stringify_1(x)    #x 
  216#define __stringify(x)      __stringify_1(x) 
  218#if defined(AST_IN_CORE) \ 
  219    || (!defined(AST_MODULE_SELF_SYM) \ 
  220        && (defined(STANDALONE) || defined(STANDALONE2) || defined(AST_NOT_MODULE))) 
  222#define AST_MODULE_SELF NULL 
  224#elif defined(AST_MODULE_SELF_SYM) 
  227#define AST_MODULE_SELF AST_MODULE_SELF_SYM() 
  235#error "Externally compiled modules must declare AST_MODULE_SELF_SYM." 
General Definitions for Asterisk top level program Included by asterisk.h to handle platform-specific...
int ast_add_profile(const char *, uint64_t scale)
support for event profiling
int ast_shutdown_final(void)
int ast_register_cleanup(void(*func)(void))
Register a function to be executed before Asterisk gracefully exits.
int ast_shutting_down(void)
int ast_pbx_uuid_get(char *pbx_uuid, int length)
Retrieve the PBX UUID.
int ast_cancel_shutdown(void)
Cancel an existing shutdown and return to normal operation.
void ast_unregister_atexit(void(*func)(void))
Unregister a function registered with ast_register_atexit().
int64_t ast_mark(int, int start1_stop0)
int64_t ast_profile(int, int64_t)
int ast_register_atexit(void(*func)(void))
Register a function to be executed before Asterisk exits.
int ast_set_priority(int)
We set ourselves to a high priority, that we might pre-empt everything else. If your PBX has heavy ac...
Asterisk memory management routines.
#define AST_MODULE_SELF_SYM
Main Channel structure associated with a channel.
Data structure associated with a single frame of data.
Abstract JSON element (object, array, string, int, ...).
Support for dynamic strings.
Structure for variables, used for configurations and for channel variables.