1 /*****************************************************************************\
5 **---------------------------------------------------------------------------**
6 ** Copyright: Andreas Eversberg **
8 ** dss1-port header file **
10 \*****************************************************************************/
12 /* DSS1 port classes */
13 class Pdss1 : public PmISDN
16 Pdss1(int type, struct mISDNport *mISDNport, char *portname, struct port_settings *settings, int channel, int exclusive, int mode);
18 unsigned int p_m_d_l3id; /* current l3 process id */
19 void message_isdn(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
20 int p_m_d_ces; /* ntmode: tei&sapi */
22 int message_epoint(unsigned int epoint_id, int message, union parameter *param);
24 int p_m_d_ntmode; /* flags the nt-mode */
25 int p_m_d_tespecial; /* special te-mode with all nt-mode IEs */
26 struct lcr_msg *p_m_d_queue; /* queue for SETUP if link is down */
27 struct lcr_msg *p_m_d_notify_pending; /* queue for NOTIFY if not connected */
29 int p_m_d_collect_cause; /* collecting cause and location */
30 int p_m_d_collect_location;
32 void new_state(int state); /* set new state */
33 // void isdn_show_send_message(unsigned int prim, msg_t *msg);
34 int hunt_bchannel(int exclusive, int channel);
35 int received_first_reply_to_setup(unsigned int cmd, int channel, int exclusive);
36 void information_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
37 void setup_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
38 void setup_acknowledge_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
39 void proceeding_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
40 void alerting_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
41 void connect_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
42 void disconnect_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
43 void release_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
44 void restart_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
45 void release_complete_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
46 void disconnect_ind_i(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
47 void t312_timeout_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
48 void notify_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
49 void facility_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
50 void hold_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
51 void retrieve_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
52 void suspend_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
53 void resume_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m);
54 void message_information(unsigned int epoint_id, int message_id, union parameter *param);
55 void message_setup(unsigned int epoint_id, int message_id, union parameter *param);
56 void message_notify(unsigned int epoint_id, int message_id, union parameter *param);
57 void message_facility(unsigned int epoint_id, int message_id, union parameter *param);
58 void message_overlap(unsigned int epoint_id, int message_id, union parameter *param);
59 void message_proceeding(unsigned int epoint_id, int message_id, union parameter *param);
60 void message_alerting(unsigned int epoint_id, int message_id, union parameter *param);
61 void message_connect(unsigned int epoint_id, int message_id, union parameter *param);
62 void message_disconnect(unsigned int epoint_id, int message_id, union parameter *param);
63 void message_release(unsigned int epoint_id, int message_id, union parameter *param);
66 void enc_ie_complete(struct l3_msg *l3m, int complete);
67 void dec_ie_complete(struct l3_msg *l3m, int *complete);
68 void enc_ie_bearer(struct l3_msg *l3m, int coding, int capability, int mode, int rate, int multi, int user);
69 void dec_ie_bearer(struct l3_msg *l3m, int *coding, int *capability, int *mode, int *rate, int *multi, int *user);
70 void enc_ie_call_id(struct l3_msg *l3m, unsigned char *callid, int callid_len);
71 void dec_ie_call_id(struct l3_msg *l3m, unsigned char *callid, int *callid_len);
72 void enc_ie_called_pn(struct l3_msg *l3m, int type, int plan, unsigned char *number);
73 void dec_ie_called_pn(struct l3_msg *l3m, int *type, int *plan, unsigned char *number, int number_len);
74 void enc_ie_calling_pn(struct l3_msg *l3m, int type, int plan, int present, int screen, unsigned char *number);
75 void dec_ie_calling_pn(struct l3_msg *l3m, int *type, int *plan, int *present, int *screen, unsigned char *number, int number_len);
76 void enc_ie_connected_pn(struct l3_msg *l3m, int type, int plan, int present, int screen, unsigned char *number);
77 void dec_ie_connected_pn(struct l3_msg *l3m, int *type, int *plan, int *present, int *screen, unsigned char *number, int number_len);
78 void enc_ie_cause(struct l3_msg *l3m, int location, int cause);
79 void dec_ie_cause(struct l3_msg *l3m, int *location, int *cause);
80 void enc_ie_channel_id(struct l3_msg *l3m, int exclusive, int channel);
81 void dec_ie_channel_id(struct l3_msg *l3m, int *exclusive, int *channel);
82 void enc_ie_date(struct l3_msg *l3m, time_t ti, int seconds);
83 void enc_ie_display(struct l3_msg *l3m, unsigned char *display);
84 void dec_ie_display(struct l3_msg *l3m, unsigned char *display, int display_len);
85 void enc_ie_keypad(struct l3_msg *l3m, unsigned char *keypad);
86 void dec_ie_keypad(struct l3_msg *l3m, unsigned char *keypad, int keypad_len);
87 void enc_ie_notify(struct l3_msg *l3m, int notify);
88 void dec_ie_notify(struct l3_msg *l3m, int *notify);
89 void enc_ie_progress(struct l3_msg *l3m, int coding, int location, int progress);
90 void dec_ie_progress(struct l3_msg *l3m, int *coding, int *location, int *progress);
91 void enc_ie_hlc(struct l3_msg *l3m, int coding, int interpretation, int presentation, int hlc, int exthlc);
92 void dec_ie_hlc(struct l3_msg *l3m, int *coding, int *interpretation, int *presentation, int *hlc, int *exthlc);
93 void enc_ie_redir_nr(struct l3_msg *l3m, int type, int plan, int present, int screen, int reason, unsigned char *number);
94 void dec_ie_redir_nr(struct l3_msg *l3m, int *type, int *plan, int *present, int *screen, int *reason, unsigned char *number, int number_len);
95 void enc_ie_redir_dn(struct l3_msg *l3m, int type, int plan, int present, unsigned char *number);
96 void dec_ie_redir_dn(struct l3_msg *l3m, int *type, int *plan, int *present, unsigned char *number, int number_len);
97 void enc_ie_facility(struct l3_msg *l3m, unsigned char *facility, int facility_len);
98 void dec_ie_facility(struct l3_msg *l3m, unsigned char *facility, int *facility_len);
99 void dec_facility_centrex(struct l3_msg *l3m, unsigned char *cnip, int cnip_len);
100 void enc_ie_useruser(struct l3_msg *l3m, int protocol, unsigned char *user, int user_len);
101 void dec_ie_useruser(struct l3_msg *l3m, int *protocol, unsigned char *user, int *user_len);