summaryrefslogtreecommitdiffstats
path: root/src/include/astmanproxy.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/astmanproxy.h')
-rw-r--r--src/include/astmanproxy.h146
1 files changed, 73 insertions, 73 deletions
diff --git a/src/include/astmanproxy.h b/src/include/astmanproxy.h
index 9d8ed89..b7d1629 100644
--- a/src/include/astmanproxy.h
+++ b/src/include/astmanproxy.h
@@ -19,101 +19,101 @@
#include <errno.h>
#include <dlfcn.h>
#ifdef __APPLE__
- #include "poll-compat.h"
+ #include "poll-compat.h"
#else
- #include <sys/poll.h>
+ #include <sys/poll.h>
#endif
-#define BUFSIZE 1024
-#define MAX_HEADERS 256
-#define MAX_LEN 1024
+#define BUFSIZE 1024
+#define MAX_HEADERS 256
+#define MAX_LEN 1024
-#define PROXY_BANNER "Asterisk Call Manager Proxy"
+#define PROXY_BANNER "Asterisk Call Manager Proxy"
#define PROXY_SHUTDOWN "ProxyMessage: Proxy Shutting Down"
-#define ACTION_ID "ActionID"
+#define ACTION_ID "ActionID"
struct ast_server {
- char nickname[80];
- char ast_host[40];
- char ast_port[10];
- char ast_user[80];
- char ast_pass[80];
- char ast_events[10];
- int use_ssl; /* Use SSL when Connecting to Server? */
- int status; /* TODO: have this mean something */
- struct ast_server *next;
+ char nickname[80];
+ char ast_host[40];
+ char ast_port[10];
+ char ast_user[80];
+ char ast_pass[80];
+ char ast_events[10];
+ int use_ssl; /* Use SSL when Connecting to Server? */
+ int status; /* TODO: have this mean something */
+ struct ast_server *next;
};
struct proxy_user {
- char username[80];
- char secret[80];
- char channel[80];
- char icontext[80];
- char ocontext[80];
- struct proxy_user *next;
+ char username[80];
+ char secret[80];
+ char channel[80];
+ char icontext[80];
+ char ocontext[80];
+ struct proxy_user *next;
};
struct proxyconfig {
- struct ast_server *serverlist;
- struct proxy_user *userlist;
- char listen_addr[INET_ADDRSTRLEN];
- int listen_port;
- char inputformat[80];
- char outputformat[80];
- int autofilter; /* enable autofiltering? */
- int authrequired; /* is authentication required? */
- char key[80];
- char proc_user[40];
- char proc_group[40];
- char logfile[256];
- int retryinterval;
- int maxretries;
- int asteriskwritetimeout; /* ms to wait when writing to asteriskfor ast_carefulwrite */
- int clientwritetimeout; /* ms to wait when writing to client ast_carefulwrite */
- int sslclhellotimeout; /* ssl client hello timeout -- how long to wait before assuming not ssl */
- int acceptencryptedconnection; /* accept encrypted connections? */
- int acceptunencryptedconnection; /* accept unencrypted connections? */
- char certfile[256]; /* our SERVER-side SSL certificate file */
+ struct ast_server *serverlist;
+ struct proxy_user *userlist;
+ char listen_addr[INET_ADDRSTRLEN];
+ int listen_port;
+ char inputformat[80];
+ char outputformat[80];
+ int autofilter; /* enable autofiltering? */
+ int authrequired; /* is authentication required? */
+ char key[80];
+ char proc_user[40];
+ char proc_group[40];
+ char logfile[256];
+ int retryinterval;
+ int maxretries;
+ int asteriskwritetimeout; /* ms to wait when writing to asteriskfor ast_carefulwrite */
+ int clientwritetimeout; /* ms to wait when writing to client ast_carefulwrite */
+ int sslclhellotimeout; /* ssl client hello timeout -- how long to wait before assuming not ssl */
+ int acceptencryptedconnection; /* accept encrypted connections? */
+ int acceptunencryptedconnection; /* accept unencrypted connections? */
+ char certfile[256]; /* our SERVER-side SSL certificate file */
};
struct iohandler {
- int (*read) ();
- int (*write) ();
- int (*onconnect) ();
- char formatname[80];
- void *dlhandle;
- struct iohandler *next;
+ int (*read) ();
+ int (*write) ();
+ int (*onconnect) ();
+ char formatname[80];
+ void *dlhandle;
+ struct iohandler *next;
};
struct mansession {
- pthread_t t;
- pthread_mutex_t lock;
- struct sockaddr_in sin;
- int fd;
- char inbuf[MAX_LEN];
- int inlen;
- struct iohandler *input;
- struct iohandler *output;
- int autofilter;
- int authenticated;
- int connected;
- int dead; /* Whether we are dead */
- int busy; /* Whether we are busy */
- int inputcomplete; /* Whether we want any more input from this session (http) */
- int outputcomplete; /* Whether output to this session is done (http) */
- struct ast_server *server;
- struct proxy_user user;
- char actionid[MAX_LEN];
- char challenge[10]; /*! Authentication challenge */
- int writetimeout; /* Timeout for ast_carefulwrite() */
- struct mansession *next;
+ pthread_t t;
+ pthread_mutex_t lock;
+ struct sockaddr_in sin;
+ int fd;
+ char inbuf[MAX_LEN];
+ int inlen;
+ struct iohandler *input;
+ struct iohandler *output;
+ int autofilter;
+ int authenticated;
+ int connected;
+ int dead; /* Whether we are dead */
+ int busy; /* Whether we are busy */
+ int inputcomplete; /* Whether we want any more input from this session (http) */
+ int outputcomplete; /* Whether output to this session is done (http) */
+ struct ast_server *server;
+ struct proxy_user user;
+ char actionid[MAX_LEN];
+ char challenge[10]; /*! Authentication challenge */
+ int writetimeout; /* Timeout for ast_carefulwrite() */
+ struct mansession *next;
};
struct message {
- int hdrcount;
- char headers[MAX_HEADERS][MAX_LEN];
- int in_command;
- struct mansession *session;
+ int hdrcount;
+ char headers[MAX_HEADERS][MAX_LEN];
+ int in_command;
+ struct mansession *session;
};
struct proxyconfig pc;