MNCC socket: length of GSM TCH/F FR frame is 33 bytes _plus_ header
[lcr.git] / endpoint.h
1 /*****************************************************************************\
2 **                                                                           **
3 ** Linux Call Router                                                         **
4 **                                                                           **
5 **---------------------------------------------------------------------------**
6 ** Copyright: Andreas Eversberg                                              **
7 **                                                                           **
8 ** Endpoint header file                                                      **
9 **                                                                           **
10 \*****************************************************************************/ 
11
12
13 /* structure of port_list */
14 struct port_list {
15         struct port_list        *next;
16         unsigned int            port_id;
17         int                     port_type;
18         int                     early_b; /* if patterns are available */
19 };
20
21 /* structure of an Enpoint */
22 class Endpoint
23 {
24         public:
25         Endpoint(unsigned int port_id, unsigned int join_id);
26         ~Endpoint();
27         class Endpoint          *next;          /* next in list */
28         unsigned int            ep_serial;      /* a unique serial to identify */
29
30         /* applocaton relation */
31         class EndpointApp       *ep_app;                /* link to application class */
32
33         /* port relation */
34         struct port_list        *ep_portlist;   /* link to list of ports */
35         struct port_list *portlist_new(unsigned int port_id, int port_type, int earlyb);
36         void free_portlist(struct port_list *portlist);
37
38         /* join relation */
39         unsigned int            ep_join_id;     /* link to join */
40
41         /* if still used by threads */
42         int                     ep_use;
43         struct lcr_work         ep_delete;
44
45         /* application indipendant states */
46         int                     ep_park;                /* indicates that the epoint is parked */
47         unsigned char           ep_park_callid[8];
48         int                     ep_park_len;
49 };
50
51 extern class Endpoint *epoint_first;
52
53 class Endpoint *find_epoint_id(unsigned int epoint_id);
54