summaryrefslogtreecommitdiffstats
path: root/include/dect/cc.h
blob: d5c3f65bf833186128e258498be39d422f1c93b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
/*
 * DECT Call-Control (CC) NWK <-> IWU interface
 *
 * Copyright (c) 2009 Patrick McHardy <kaber@trash.net>
 */

#ifndef _LIBDECT_DECT_CC_H
#define _LIBDECT_DECT_CC_H

#include <dect/ie.h>

/**
 * struct dect_mncc_setup_param - MNCC_SETUP primitive parameters
 */
struct dect_mncc_setup_param {
	struct dect_ie_basic_service		*basic_service;
	struct dect_ie_repeat_indicator		iwu_attributes;
	struct dect_ie_cipher_info		*cipher_info;
	struct dect_ie_repeat_indicator		facility;
	struct dect_ie_repeat_indicator		progress_indicator;
	struct dect_ie_display			*display;
	struct dect_ie_keypad			*keypad;
	struct dect_ie_signal			*signal;
	struct dect_ie_feature_activate		*feature_activate;
	struct dect_ie_feature_indicate		*feature_indicate;
	struct dect_ie_network_parameter	*network_parameter;
	struct dect_ie_terminal_capability	*terminal_capability;
	struct dect_ie_end_to_end_compatibility	*end_to_end_compatibility;
	struct dect_ie_rate_parameters		*rate_parameters;
	struct dect_ie_transit_delay		*transit_delay;
	struct dect_ie_window_size		*window_size;
	struct dect_ie_called_party_number	*called_party_number;
	struct dect_ie_called_party_subaddress	*called_party_subaddress;
	struct dect_ie_calling_party_number	*calling_party_number;
	struct dect_ie_calling_party_name	*calling_party_name;
	struct dect_ie_sending_complete		*sending_complete;
	struct dect_ie_iwu_to_iwu		*iwu_to_iwu;
	struct dect_ie_iwu_packet		*iwu_packet;
};

struct dect_mncc_setup_ack_param {
	struct dect_ie_info_type		*info_type;
	struct dect_ie_location_area		*location_area;
	struct dect_ie_repeat_indicator		facility;
	struct dect_ie_repeat_indicator		progress_indicator;
	struct dect_ie_display			*display;
	struct dect_ie_signal			*signal;
	struct dect_ie_feature_indicate		*feature_indicate;
	struct dect_ie_transit_delay		*transit_delay;
	struct dect_ie_window_size		*window_size;
	struct dect_ie_delimiter_request	*delimiter_request;
	struct dect_ie_repeat_indicator		iwu_to_iwu;
	struct dect_ie_iwu_packet		*iwu_packet;
};

struct dect_mncc_release_param {
	struct dect_ie_release_reason		*release_reason;
	struct dect_ie_identity_type		*identity_type;
	struct dect_ie_location_area		*location_area;
	struct dect_ie_iwu_attributes		*iwu_attributes;
	struct dect_ie_repeat_indicator		facility;
	struct dect_ie_display			*display;
	struct dect_ie_feature_indicate		*feature_indicate;
	struct dect_ie_network_parameter	*network_parameter;
	struct dect_ie_iwu_to_iwu		*iwu_to_iwu;
	struct dect_ie_iwu_packet		*iwu_packet;
};

struct dect_mncc_call_proc_param {
	struct dect_ie_repeat_indicator		facility;
	struct dect_ie_repeat_indicator		progress_indicator;
	struct dect_ie_display			*display;
	struct dect_ie_signal			*signal;
	struct dect_ie_feature_indicate		*feature_indicate;
	struct dect_ie_transit_delay		*transit_delay;
	struct dect_ie_window_size		*window_size;
	struct dect_ie_repeat_indicator		iwu_to_iwu;
	struct dect_ie_iwu_packet		*iwu_packet;
};

struct dect_mncc_alert_param {
	struct dect_ie_repeat_indicator		facility;
	struct dect_ie_repeat_indicator		progress_indicator;
	struct dect_ie_display			*display;
	struct dect_ie_signal			*signal;
	struct dect_ie_feature_indicate		*feature_indicate;
	struct dect_ie_terminal_capability	*terminal_capability;
	struct dect_ie_transit_delay		*transit_delay;
	struct dect_ie_window_size		*window_size;
	struct dect_ie_repeat_indicator		iwu_to_iwu;
	struct dect_ie_iwu_packet		*iwu_packet;
};

struct dect_mncc_connect_param {
	struct dect_ie_repeat_indicator		facility;
	struct dect_ie_repeat_indicator		progress_indicator;
	struct dect_ie_display			*display;
	struct dect_ie_signal			*signal;
	struct dect_ie_feature_indicate		*feature_indicate;
	struct dect_ie_terminal_capability	*terminal_capability;
	struct dect_ie_transit_delay		*transit_delay;
	struct dect_ie_window_size		*window_size;
	struct dect_ie_iwu_to_iwu		*iwu_to_iwu;
	struct dect_ie_iwu_packet		*iwu_packet;
};

struct dect_mncc_facility_param {
	struct dect_ie_repeat_indicator		facility;
	struct dect_ie_repeat_indicator		progress_indicator;
	struct dect_ie_display			*display;
	struct dect_ie_keypad			*keypad;
	struct dect_ie_feature_activate		*feature_activate;
	struct dect_ie_feature_indicate		*feature_indicate;
};

struct dect_mncc_info_param {
	struct dect_ie_location_area		*location_area;
	struct dect_ie_nwk_assigned_identity	*nwk_assigned_identity;
	struct dect_ie_repeat_indicator		facility;
	struct dect_ie_repeat_indicator		progress_indicator;
	struct dect_ie_display			*display;
	struct dect_ie_keypad			*keypad;
	struct dect_ie_signal			*signal;
	struct dect_ie_feature_activate		*feature_activate;
	struct dect_ie_feature_indicate		*feature_indicate;
	struct dect_ie_network_parameter	*network_parameter;
	struct dect_ie_called_party_number	*called_party_number;
	struct dect_ie_called_party_subaddress	*called_party_subaddress;
	struct dect_ie_calling_party_number	*calling_party_number;
	struct dect_ie_calling_party_name	*calling_party_name;
	struct dect_ie_sending_complete		*sending_complete;
	struct dect_ie_repeat_indicator		iwu_to_iwu;
	struct dect_ie_iwu_packet		*iwu_packet;
};

struct dect_mncc_modify_param {
	struct dect_ie_service_change_info	*service_change_info;
	struct dect_ie_repeat_indicator		iwu_attributes;
	struct dect_ie_repeat_indicator		iwu_to_iwu;
};

struct dect_mncc_hold_param {
	struct dect_ie_display			*display;
	struct dect_ie_release_reason		*release_reason;
};

struct dect_mncc_iwu_info_param {
	struct dect_ie_alphanumeric		*alphanumeric;
	struct dect_ie_iwu_to_iwu		*iwu_to_iwu;
	struct dect_ie_iwu_packet		*iwu_packet;
};

struct dect_handle;
struct dect_call;
struct dect_msg_buf;

extern struct dect_call *dect_call_alloc(const struct dect_handle *dh);
extern void *dect_call_priv(struct dect_call *call);

extern const struct dect_ipui *dect_call_portable_identity(const struct dect_call *call);

struct dect_cc_ops {
	size_t	priv_size;
	void	(*mncc_setup_ind)(struct dect_handle *dh, struct dect_call *call,
				  const struct dect_mncc_setup_param *param);
	void	(*mncc_setup_ack_ind)(struct dect_handle *dh, struct dect_call *call,
				      const struct dect_mncc_setup_ack_param *param);
	void	(*mncc_reject_ind)(struct dect_handle *dh, struct dect_call *call,
				   const struct dect_mncc_release_param *param);
	void	(*mncc_call_proc_ind)(struct dect_handle *dh, struct dect_call *call,
				      const struct dect_mncc_call_proc_param *param);
	void	(*mncc_alert_ind)(struct dect_handle *dh, struct dect_call *call,
				  const struct dect_mncc_alert_param *param);
	void	(*mncc_connect_ind)(struct dect_handle *dh, struct dect_call *call,
				    const struct dect_mncc_connect_param *param);
	void	(*mncc_connect_cfm)(struct dect_handle *dh, struct dect_call *call,
				    const struct dect_mncc_connect_param *param);
	void	(*mncc_release_ind)(struct dect_handle *dh, struct dect_call *call,
				    const struct dect_mncc_release_param *param);
	void	(*mncc_release_cfm)(struct dect_handle *dh, struct dect_call *call,
				    const struct dect_mncc_release_param *param);
	void	(*mncc_facility_ind)(struct dect_handle *dh, struct dect_call *call,
				     const struct dect_mncc_facility_param *param);
	void	(*mncc_info_ind)(struct dect_handle *dh, struct dect_call *call,
				 const struct dect_mncc_info_param *param);
	void	(*mncc_modify_ind)(struct dect_handle *dh, struct dect_call *call,
				   const struct dect_mncc_modify_param *param);
	void	(*mncc_modify_cfm)(struct dect_handle *dh, struct dect_call *call,
				   const struct dect_mncc_modify_param *param);
	void	(*mncc_hold_ind)(struct dect_handle *dh, struct dect_call *call,
				 const struct dect_mncc_hold_param *param);
	void	(*mncc_hold_cfm)(struct dect_handle *dh, struct dect_call *call,
				 const struct dect_mncc_hold_param *param);
	void	(*mncc_retrieve_ind)(struct dect_handle *dh, struct dect_call *call,
				     const struct dect_mncc_hold_param *param);
	void	(*mncc_retrieve_cfm)(struct dect_handle *dh, struct dect_call *call,
				     const struct dect_mncc_hold_param *param);
	void	(*mncc_iwu_info_ind)(struct dect_handle *dh, struct dect_call *call,
				     const struct dect_mncc_iwu_info_param *param);

	void	(*dl_u_data_ind)(struct dect_handle *dh, struct dect_call *call,
				 struct dect_msg_buf *mb);
};

extern int dect_mncc_setup_req(struct dect_handle *dh, struct dect_call *call,
			       const struct dect_ipui *ipui,
			       const struct dect_mncc_setup_param *param);
extern int dect_mncc_setup_ack_req(struct dect_handle *dh, struct dect_call *call,
				   const struct dect_mncc_setup_ack_param *param);
extern int dect_mncc_reject_req(struct dect_handle *dh, struct dect_call *call,
				const struct dect_mncc_release_param *param);
extern int dect_mncc_call_proc_req(struct dect_handle *dh, struct dect_call *call,
				   const struct dect_mncc_call_proc_param *param);
extern int dect_mncc_alert_req(struct dect_handle *dh, struct dect_call *call,
			       const struct dect_mncc_alert_param *param);
extern int dect_mncc_connect_req(struct dect_handle *dh, struct dect_call *call,
				 const struct dect_mncc_connect_param *param);
extern int dect_mncc_connect_res(struct dect_handle *dh, struct dect_call *call,
				 const struct dect_mncc_connect_param *param);
extern int dect_mncc_release_req(struct dect_handle *dh, struct dect_call *call,
				 const struct dect_mncc_release_param *param);
extern int dect_mncc_release_res(struct dect_handle *dh, struct dect_call *call,
				 const struct dect_mncc_release_param *param);
extern int dect_mncc_facility_req(struct dect_handle *dh, struct dect_call *call,
				  const struct dect_mncc_facility_param *param);
extern int dect_mncc_info_req(struct dect_handle *dh, struct dect_call *call,
			      const struct dect_mncc_info_param *param);
extern int dect_mncc_modify_req(struct dect_handle *dh, struct dect_call *call,
				const struct dect_mncc_modify_param *param);
extern int dect_mncc_modify_res(struct dect_handle *dh, struct dect_call *call,
				const struct dect_mncc_modify_param *param);
extern int dect_mncc_hold_req(struct dect_handle *dh, struct dect_call *call,
			      const struct dect_mncc_hold_param *param);
extern int dect_mncc_hold_res(struct dect_handle *dh, struct dect_call *call,
			      const struct dect_mncc_hold_param *param);
extern int dect_mncc_retrieve_req(struct dect_handle *dh, struct dect_call *call,
				  const struct dect_mncc_hold_param *param);
extern int dect_mncc_retrieve_res(struct dect_handle *dh, struct dect_call *call,
				  const struct dect_mncc_hold_param *param);
extern int dect_mncc_iwu_info_req(struct dect_handle *dh, struct dect_call *call,
				  const struct dect_mncc_iwu_info_param *param);

extern int dect_dl_u_data_req(const struct dect_handle *dh, struct dect_call *call,
			      struct dect_msg_buf *mb);

#endif /* _LIBDECT_DECT_CC_H */