3 int type; /* type of BTS */
4 int card; /* E1 card number of BS11 BTS */
5 int numtrx; /* up to 8 TRXs */
6 int frequency[8]; /* up to 8 frequencies for TRXs */
10 char debug[128]; /* debug info */
11 char interface_bsc[64]; /* loopback interface BSC side */
12 char interface_lcr[64]; /* loopback interface LCR side */
13 char short_name[64]; /* short network name */
14 char long_name[64]; /* long network name */
15 int mcc; /* mobile country code */
16 int mnc; /* mobile network code */
17 int lac; /* location area code */
18 char hlr[64]; /* database name */
19 int allow_all; /* accept unknown subscribers */
20 int keep_l2; /* keep layer 2 after exit */
21 int numbts; /* number of BTS' */
22 struct bts_conf bts[8]; /* configure BTS' */
23 int noemergshut; /* don't shut down on emergency */
27 void *network; /* OpenBSC network handle */
28 struct gsm_conf conf; /* gsm.conf options */
29 int gsm_sock; /* loopback interface BSC side */
30 int gsm_port; /* loopback interface port number */
33 extern struct lcr_gsm *gsm;
36 class Pgsm : public PmISDN
39 Pgsm(int type, struct mISDNport *mISDNport, char *portname, struct port_settings *settings, int channel, int exclusive, int mode);
42 unsigned int p_m_g_callref; /* ref by OpenBSC */
43 unsigned int p_m_g_mode; /* data/transparent mode */
44 int p_m_g_gsm_b_sock; /* gsm bchannel socket */
45 int p_m_g_gsm_b_index; /* gsm bchannel socket index to use */
46 int p_m_g_gsm_b_active; /* gsm bchannel socket is activated */
47 struct lcr_msg *p_m_g_notify_pending; /* queue for NOTIFY if not connected */
48 void *p_m_g_encoder, *p_m_g_decoder; /* gsm handle */
49 signed short p_m_g_rxdata[160]; /* receive audio buffer */
50 int p_m_g_rxpos; /* position in audio buffer 0..159 */
51 int p_m_g_tch_connected; /* indicates if audio is connected */
53 void bchannel_close(void);
54 int bchannel_open(int index);
55 void bchannel_receive(struct mISDNhead *hh, unsigned char *data, int len);
56 void bchannel_send(unsigned int prim, unsigned int id, unsigned char *data, int len);
58 void trau_send(void *_tf);
59 void trau_receive(void *_frame);
61 int hunt_bchannel(void);
62 void setup_ind(unsigned int msg_type, unsigned int callref, struct gsm_mncc *mncc);
63 void start_dtmf_ind(unsigned int msg_type, unsigned int callref, struct gsm_mncc *mncc);
64 void stop_dtmf_ind(unsigned int msg_type, unsigned int callref, struct gsm_mncc *mncc);
65 void call_conf_ind(unsigned int msg_type, unsigned int callref, struct gsm_mncc *gsm);
66 void alert_ind(unsigned int msg_type, unsigned int callref, struct gsm_mncc *mncc);
67 void setup_cnf(unsigned int msg_type, unsigned int callref, struct gsm_mncc *mncc);
68 void setup_compl_ind(unsigned int msg_type, unsigned int callref, struct gsm_mncc *mncc);
69 void disc_ind(unsigned int msg_type, unsigned int callref, struct gsm_mncc *mncc);
70 void rel_ind(unsigned int msg_type, unsigned int callref, struct gsm_mncc *mncc);
71 void notify_ind(unsigned int msg_type, unsigned int callref, struct gsm_mncc *mncc);
72 void hold_ind(unsigned int msg_type, unsigned int callref, struct gsm_mncc *mncc);
73 void retr_ind(unsigned int msg_type, unsigned int callref, struct gsm_mncc *mncc);
74 void message_setup(unsigned int epoint_id, int message_id, union parameter *param);
75 void message_notify(unsigned int epoint_id, int message_id, union parameter *param);
76 void message_alerting(unsigned int epoint_id, int message_id, union parameter *param);
77 void message_connect(unsigned int epoint_id, int message_id, union parameter *param);
78 void message_disconnect(unsigned int epoint_id, int message_id, union parameter *param);
79 void message_release(unsigned int epoint_id, int message_id, union parameter *param);
80 int message_epoint(unsigned int epoint_id, int message_id, union parameter *param);
84 extern char *gsm_conf_error;
85 int gsm_conf(struct gsm_conf *gsm_conf);