[SIP] Allow setting local port for SIP interface
[lcr.git] / socket_server.h
1 /*****************************************************************************\
2 **                                                                           **
3 ** PBX4Linux                                                                 **
4 **                                                                           **
5 **---------------------------------------------------------------------------**
6 ** Copyright: Andreas Eversberg                                              **
7 **                                                                           **
8 ** Administration tool header file (server)                                  **
9 **                                                                           **
10 \*****************************************************************************/
11
12 #include "lcrsocket.h"
13
14 struct admin_queue {
15         struct admin_queue      *next;
16         unsigned int            offset; /* current offset writing */
17         unsigned int            num; /* number of admin messages */
18         struct admin_message    am[0];
19 };
20
21 struct admin_list {
22         struct admin_list *next;
23         int sock;
24         struct lcr_fd fd;
25         int sockserial;
26         char remote_name[32]; /* socket is connected remote application */
27         struct admin_trace_req trace; /* stores trace, if detail != 0 */
28         unsigned int epointid;
29         struct admin_queue *response;
30 };
31
32 extern struct admin_list *admin_first;
33 int admin_init(void);
34 void admin_cleanup(void);
35 void admin_call_response(int adminid, int message, const char *connected, int cause, int location, int notify);
36 int admin_message_to_lcr(struct admin_message *msg, int remote_id);
37 int admin_message_from_lcr(int remote_id, unsigned int ref, int message_type, union parameter *param);
38 void message_bchannel_to_remote(unsigned int remote_id, unsigned int ref, int type, unsigned int handle, int tx_gain, int rx_gain, char *pipeline, unsigned char *crypt, int crypt_len, int crypt_type, int isloopback);
39
40
41