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);
18 int p_m_d_l3id; /* current l3 process id */
19 int p_m_d_ces; /* ntmode: tei&sapi */
21 int message_epoint(unsigned long epoint_id, int message, union parameter *param);
22 void message_isdn(unsigned long prim, unsigned long dinfo, void *data);
24 int p_m_d_ntmode; /* flags the nt-mode */
25 struct message *p_m_d_queue; /* queue for SETUP if link is down */
26 struct message *p_m_d_notify_pending; /* queue for NOTIFY if not connected */
28 int p_m_d_collect_cause; /* collecting cause and location */
29 int p_m_d_collect_location;
31 void new_state(int state); /* set new state */
32 void isdn_show_send_message(unsigned long prim, msg_t *msg);
33 int received_first_reply_to_setup(unsigned long prim, int exclusive, int channel);
34 int hunt_bchannel(int exclusive, int channel);
35 void information_ind(unsigned long prim, unsigned long dinfo, void *data);
36 void setup_ind(unsigned long prim, unsigned long dinfo, void *data);
37 void setup_acknowledge_ind(unsigned long prim, unsigned long dinfo, void *data);
38 void proceeding_ind(unsigned long prim, unsigned long dinfo, void *data);
39 void alerting_ind(unsigned long prim, unsigned long dinfo, void *data);
40 void connect_ind(unsigned long prim, unsigned long dinfo, void *data);
41 void disconnect_ind(unsigned long prim, unsigned long dinfo, void *data);
42 void release_ind(unsigned long prim, unsigned long dinfo, void *data);
43 void release_complete_ind(unsigned long prim, unsigned long dinfo, void *data);
44 void disconnect_ind_i(unsigned long prim, unsigned long dinfo, void *data);
45 void t312_timeout(unsigned long prim, unsigned long dinfo, void *data);
46 void notify_ind(unsigned long prim, unsigned long dinfo, void *data);
47 void facility_ind(unsigned long prim, unsigned long dinfo, void *data);
48 void hold_ind(unsigned long prim, unsigned long dinfo, void *data);
49 void retrieve_ind(unsigned long prim, unsigned long dinfo, void *data);
50 void suspend_ind(unsigned long prim, unsigned long dinfo, void *data);
51 void resume_ind(unsigned long prim, unsigned long dinfo, void *data);
52 void message_information(unsigned long epoint_id, int message_id, union parameter *param);
53 void message_setup(unsigned long epoint_id, int message_id, union parameter *param);
54 void message_notify(unsigned long epoint_id, int message_id, union parameter *param);
55 void message_facility(unsigned long epoint_id, int message_id, union parameter *param);
56 void message_overlap(unsigned long epoint_id, int message_id, union parameter *param);
57 void message_proceeding(unsigned long epoint_id, int message_id, union parameter *param);
58 void message_alerting(unsigned long epoint_id, int message_id, union parameter *param);
59 void message_connect(unsigned long epoint_id, int message_id, union parameter *param);
60 void message_disconnect(unsigned long epoint_id, int message_id, union parameter *param);
61 void message_release(unsigned long epoint_id, int message_id, union parameter *param);
64 void enc_ie_complete(unsigned char **ntmode, msg_t *msg, int complete);
65 void dec_ie_complete(unsigned char *p, Q931_info_t *qi, int *complete);
66 void enc_ie_bearer(unsigned char **ntmode, msg_t *msg, int coding, int capability, int mode, int rate, int multi, int user);
67 void dec_ie_bearer(unsigned char *p, Q931_info_t *qi, int *coding, int *capability, int *mode, int *rate, int *multi, int *user);
68 void enc_ie_call_id(unsigned char **ntmode, msg_t *msg, unsigned char *callid, int callid_len);
69 void dec_ie_call_id(unsigned char *p, Q931_info_t *qi, unsigned char *callid, int *callid_len);
70 void enc_ie_called_pn(unsigned char **ntmode, msg_t *msg, int type, int plan, unsigned char *number);
71 void dec_ie_called_pn(unsigned char *p, Q931_info_t *qi, int *type, int *plan, unsigned char *number, int number_len);
72 void enc_ie_calling_pn(unsigned char **ntmode, msg_t *msg, int type, int plan, int present, int screen, unsigned char *number);
73 void dec_ie_calling_pn(unsigned char *p, Q931_info_t *qi, int *type, int *plan, int *present, int *screen, unsigned char *number, int number_len);
74 void enc_ie_connected_pn(unsigned char **ntmode, msg_t *msg, int type, int plan, int present, int screen, unsigned char *number);
75 void dec_ie_connected_pn(unsigned char *p, Q931_info_t *qi, int *type, int *plan, int *present, int *screen, unsigned char *number, int number_len);
76 void enc_ie_cause(unsigned char **ntmode, msg_t *msg, int location, int cause);
77 void dec_ie_cause(unsigned char *p, Q931_info_t *qi, int *location, int *cause);
78 void enc_ie_channel_id(unsigned char **ntmode, msg_t *msg, int exclusive, int channel);
79 void dec_ie_channel_id(unsigned char *p, Q931_info_t *qi, int *exclusive, int *channel);
80 void enc_ie_date(unsigned char **ntmode, msg_t *msg, time_t ti, int seconds);
81 void enc_ie_display(unsigned char **ntmode, msg_t *msg, unsigned char *display);
82 void dec_ie_display(unsigned char *p, Q931_info_t *qi, unsigned char *display, int display_len);
83 void enc_ie_keypad(unsigned char **ntmode, msg_t *msg, unsigned char *keypad);
84 void dec_ie_keypad(unsigned char *p, Q931_info_t *qi, unsigned char *keypad, int keypad_len);
85 void enc_ie_notify(unsigned char **ntmode, msg_t *msg, int notify);
86 void dec_ie_notify(unsigned char *p, Q931_info_t *qi, int *notify);
87 void enc_ie_progress(unsigned char **ntmode, msg_t *msg, int coding, int location, int progress);
88 void dec_ie_progress(unsigned char *p, Q931_info_t *qi, int *coding, int *location, int *progress);
89 void enc_ie_hlc(unsigned char **ntmode, msg_t *msg, int coding, int interpretation, int presentation, int hlc, int exthlc);
90 void dec_ie_hlc(unsigned char *p, Q931_info_t *qi, int *coding, int *interpretation, int *presentation, int *hlc, int *exthlc);
91 void enc_ie_redir_nr(unsigned char **ntmode, msg_t *msg, int type, int plan, int present, int screen, int reason, unsigned char *number);
92 void dec_ie_redir_nr(unsigned char *p, Q931_info_t *qi, int *type, int *plan, int *present, int *screen, int *reason, unsigned char *number, int number_len);
93 void enc_ie_redir_dn(unsigned char **ntmode, msg_t *msg, int type, int plan, int present, unsigned char *number);
94 void dec_ie_redir_dn(unsigned char *p, Q931_info_t *qi, int *type, int *plan, int *present, unsigned char *number, int number_len);
95 void enc_ie_facility(unsigned char **ntmode, msg_t *msg, unsigned char *facility, int facility_len);
96 void dec_ie_facility(unsigned char *p, Q931_info_t *qi, unsigned char *facility, int *facility_len);
97 void enc_facility_centrex(unsigned char **ntmode, msg_t *msg, unsigned char *cnip, int setup);
98 void dec_facility_centrex(unsigned char *p, Q931_info_t *qi, unsigned char *cnip, int cnip_len);
99 void enc_ie_useruser(unsigned char **ntmode, msg_t *msg, int protocol, unsigned char *user, int user_len);
100 void dec_ie_useruser(unsigned char *p, Q931_info_t *qi, int *protocol, unsigned char *user, int *user_len);