diff options
author | Patrick McHardy <kaber@trash.net> | 2006-12-03 01:08:46 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-12-03 01:08:46 -0500 |
commit | f587de0e2feb9eb9b94f98d0a7b7437e4d6617b4 (patch) | |
tree | 64d29dcacf895c37c4b7520bc8b07f0845baf914 /net/ipv4 | |
parent | 16958900578b94585c2ab9a2d20d837b4d5e3ba6 (diff) |
[NETFILTER]: nf_conntrack/nf_nat: add H.323 helper port
Add IPv4 and IPv6 capable nf_conntrack port of the H.323 conntrack/NAT helper.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/netfilter/Kconfig | 5 | ||||
-rw-r--r-- | net/ipv4/netfilter/Makefile | 3 | ||||
-rw-r--r-- | net/ipv4/netfilter/ip_conntrack_helper_h323_asn1.c | 874 | ||||
-rw-r--r-- | net/ipv4/netfilter/ip_conntrack_helper_h323_types.c | 1926 | ||||
-rw-r--r-- | net/ipv4/netfilter/nf_nat_h323.c | 596 |
5 files changed, 603 insertions, 2801 deletions
diff --git a/net/ipv4/netfilter/Kconfig b/net/ipv4/netfilter/Kconfig index 6993ec53dc06..e14156d1122e 100644 --- a/net/ipv4/netfilter/Kconfig +++ b/net/ipv4/netfilter/Kconfig | |||
@@ -529,6 +529,11 @@ config IP_NF_NAT_H323 | |||
529 | default IP_NF_NAT if IP_NF_H323=y | 529 | default IP_NF_NAT if IP_NF_H323=y |
530 | default m if IP_NF_H323=m | 530 | default m if IP_NF_H323=m |
531 | 531 | ||
532 | config NF_NAT_H323 | ||
533 | tristate | ||
534 | depends on IP_NF_IPTABLES && NF_CONNTRACK && NF_NAT | ||
535 | default NF_NAT && NF_CONNTRACK_H323 | ||
536 | |||
532 | config IP_NF_NAT_SIP | 537 | config IP_NF_NAT_SIP |
533 | tristate | 538 | tristate |
534 | depends on IP_NF_IPTABLES!=n && IP_NF_CONNTRACK!=n && IP_NF_NAT!=n | 539 | depends on IP_NF_IPTABLES!=n && IP_NF_CONNTRACK!=n && IP_NF_NAT!=n |
diff --git a/net/ipv4/netfilter/Makefile b/net/ipv4/netfilter/Makefile index 8893249bbe98..bdaba4700e3b 100644 --- a/net/ipv4/netfilter/Makefile +++ b/net/ipv4/netfilter/Makefile | |||
@@ -15,7 +15,7 @@ endif | |||
15 | ip_conntrack_pptp-objs := ip_conntrack_helper_pptp.o ip_conntrack_proto_gre.o | 15 | ip_conntrack_pptp-objs := ip_conntrack_helper_pptp.o ip_conntrack_proto_gre.o |
16 | ip_nat_pptp-objs := ip_nat_helper_pptp.o ip_nat_proto_gre.o | 16 | ip_nat_pptp-objs := ip_nat_helper_pptp.o ip_nat_proto_gre.o |
17 | 17 | ||
18 | ip_conntrack_h323-objs := ip_conntrack_helper_h323.o ip_conntrack_helper_h323_asn1.o | 18 | ip_conntrack_h323-objs := ip_conntrack_helper_h323.o ../../netfilter/nf_conntrack_h323_asn1.o |
19 | ip_nat_h323-objs := ip_nat_helper_h323.o | 19 | ip_nat_h323-objs := ip_nat_helper_h323.o |
20 | 20 | ||
21 | # connection tracking | 21 | # connection tracking |
@@ -52,6 +52,7 @@ obj-$(CONFIG_IP_NF_NAT_SIP) += ip_nat_sip.o | |||
52 | # NAT helpers (nf_conntrack) | 52 | # NAT helpers (nf_conntrack) |
53 | obj-$(CONFIG_NF_NAT_AMANDA) += nf_nat_amanda.o | 53 | obj-$(CONFIG_NF_NAT_AMANDA) += nf_nat_amanda.o |
54 | obj-$(CONFIG_NF_NAT_FTP) += nf_nat_ftp.o | 54 | obj-$(CONFIG_NF_NAT_FTP) += nf_nat_ftp.o |
55 | obj-$(CONFIG_NF_NAT_H323) += nf_nat_h323.o | ||
55 | 56 | ||
56 | # generic IP tables | 57 | # generic IP tables |
57 | obj-$(CONFIG_IP_NF_IPTABLES) += ip_tables.o | 58 | obj-$(CONFIG_IP_NF_IPTABLES) += ip_tables.o |
diff --git a/net/ipv4/netfilter/ip_conntrack_helper_h323_asn1.c b/net/ipv4/netfilter/ip_conntrack_helper_h323_asn1.c deleted file mode 100644 index 26dfecadb335..000000000000 --- a/net/ipv4/netfilter/ip_conntrack_helper_h323_asn1.c +++ /dev/null | |||
@@ -1,874 +0,0 @@ | |||
1 | /**************************************************************************** | ||
2 | * ip_conntrack_helper_h323_asn1.c - BER and PER decoding library for H.323 | ||
3 | * conntrack/NAT module. | ||
4 | * | ||
5 | * Copyright (c) 2006 by Jing Min Zhao <zhaojingmin@users.sourceforge.net> | ||
6 | * | ||
7 | * This source code is licensed under General Public License version 2. | ||
8 | * | ||
9 | * See ip_conntrack_helper_h323_asn1.h for details. | ||
10 | * | ||
11 | ****************************************************************************/ | ||
12 | |||
13 | #ifdef __KERNEL__ | ||
14 | #include <linux/kernel.h> | ||
15 | #else | ||
16 | #include <stdio.h> | ||
17 | #endif | ||
18 | #include <linux/netfilter_ipv4/ip_conntrack_helper_h323_asn1.h> | ||
19 | |||
20 | /* Trace Flag */ | ||
21 | #ifndef H323_TRACE | ||
22 | #define H323_TRACE 0 | ||
23 | #endif | ||
24 | |||
25 | #if H323_TRACE | ||
26 | #define TAB_SIZE 4 | ||
27 | #define IFTHEN(cond, act) if(cond){act;} | ||
28 | #ifdef __KERNEL__ | ||
29 | #define PRINT printk | ||
30 | #else | ||
31 | #define PRINT printf | ||
32 | #endif | ||
33 | #define FNAME(name) name, | ||
34 | #else | ||
35 | #define IFTHEN(cond, act) | ||
36 | #define PRINT(fmt, args...) | ||
37 | #define FNAME(name) | ||
38 | #endif | ||
39 | |||
40 | /* ASN.1 Types */ | ||
41 | #define NUL 0 | ||
42 | #define BOOL 1 | ||
43 | #define OID 2 | ||
44 | #define INT 3 | ||
45 | #define ENUM 4 | ||
46 | #define BITSTR 5 | ||
47 | #define NUMSTR 6 | ||
48 | #define NUMDGT 6 | ||
49 | #define TBCDSTR 6 | ||
50 | #define OCTSTR 7 | ||
51 | #define PRTSTR 7 | ||
52 | #define IA5STR 7 | ||
53 | #define GENSTR 7 | ||
54 | #define BMPSTR 8 | ||
55 | #define SEQ 9 | ||
56 | #define SET 9 | ||
57 | #define SEQOF 10 | ||
58 | #define SETOF 10 | ||
59 | #define CHOICE 11 | ||
60 | |||
61 | /* Constraint Types */ | ||
62 | #define FIXD 0 | ||
63 | /* #define BITS 1-8 */ | ||
64 | #define BYTE 9 | ||
65 | #define WORD 10 | ||
66 | #define CONS 11 | ||
67 | #define SEMI 12 | ||
68 | #define UNCO 13 | ||
69 | |||
70 | /* ASN.1 Type Attributes */ | ||
71 | #define SKIP 0 | ||
72 | #define STOP 1 | ||
73 | #define DECODE 2 | ||
74 | #define EXT 4 | ||
75 | #define OPEN 8 | ||
76 | #define OPT 16 | ||
77 | |||
78 | |||
79 | /* ASN.1 Field Structure */ | ||
80 | typedef struct field_t { | ||
81 | #if H323_TRACE | ||
82 | char *name; | ||
83 | #endif | ||
84 | unsigned char type; | ||
85 | unsigned char sz; | ||
86 | unsigned char lb; | ||
87 | unsigned char ub; | ||
88 | unsigned short attr; | ||
89 | unsigned short offset; | ||
90 | struct field_t *fields; | ||
91 | } field_t; | ||
92 | |||
93 | /* Bit Stream */ | ||
94 | typedef struct { | ||
95 | unsigned char *buf; | ||
96 | unsigned char *beg; | ||
97 | unsigned char *end; | ||
98 | unsigned char *cur; | ||
99 | unsigned bit; | ||
100 | } bitstr_t; | ||
101 | |||
102 | /* Tool Functions */ | ||
103 | #define INC_BIT(bs) if((++bs->bit)>7){bs->cur++;bs->bit=0;} | ||
104 | #define INC_BITS(bs,b) if((bs->bit+=b)>7){bs->cur+=bs->bit>>3;bs->bit&=7;} | ||
105 | #define BYTE_ALIGN(bs) if(bs->bit){bs->cur++;bs->bit=0;} | ||
106 | #define CHECK_BOUND(bs,n) if(bs->cur+(n)>bs->end)return(H323_ERROR_BOUND) | ||
107 | static unsigned get_len(bitstr_t * bs); | ||
108 | static unsigned get_bit(bitstr_t * bs); | ||
109 | static unsigned get_bits(bitstr_t * bs, unsigned b); | ||
110 | static unsigned get_bitmap(bitstr_t * bs, unsigned b); | ||
111 | static unsigned get_uint(bitstr_t * bs, int b); | ||
112 | |||
113 | /* Decoder Functions */ | ||
114 | static int decode_nul(bitstr_t * bs, field_t * f, char *base, int level); | ||
115 | static int decode_bool(bitstr_t * bs, field_t * f, char *base, int level); | ||
116 | static int decode_oid(bitstr_t * bs, field_t * f, char *base, int level); | ||
117 | static int decode_int(bitstr_t * bs, field_t * f, char *base, int level); | ||
118 | static int decode_enum(bitstr_t * bs, field_t * f, char *base, int level); | ||
119 | static int decode_bitstr(bitstr_t * bs, field_t * f, char *base, int level); | ||
120 | static int decode_numstr(bitstr_t * bs, field_t * f, char *base, int level); | ||
121 | static int decode_octstr(bitstr_t * bs, field_t * f, char *base, int level); | ||
122 | static int decode_bmpstr(bitstr_t * bs, field_t * f, char *base, int level); | ||
123 | static int decode_seq(bitstr_t * bs, field_t * f, char *base, int level); | ||
124 | static int decode_seqof(bitstr_t * bs, field_t * f, char *base, int level); | ||
125 | static int decode_choice(bitstr_t * bs, field_t * f, char *base, int level); | ||
126 | |||
127 | /* Decoder Functions Vector */ | ||
128 | typedef int (*decoder_t) (bitstr_t *, field_t *, char *, int); | ||
129 | static decoder_t Decoders[] = { | ||
130 | decode_nul, | ||
131 | decode_bool, | ||
132 | decode_oid, | ||
133 | decode_int, | ||
134 | decode_enum, | ||
135 | decode_bitstr, | ||
136 | decode_numstr, | ||
137 | decode_octstr, | ||
138 | decode_bmpstr, | ||
139 | decode_seq, | ||
140 | decode_seqof, | ||
141 | decode_choice, | ||
142 | }; | ||
143 | |||
144 | /**************************************************************************** | ||
145 | * H.323 Types | ||
146 | ****************************************************************************/ | ||
147 | #include "ip_conntrack_helper_h323_types.c" | ||
148 | |||
149 | /**************************************************************************** | ||
150 | * Functions | ||
151 | ****************************************************************************/ | ||
152 | /* Assume bs is aligned && v < 16384 */ | ||
153 | unsigned get_len(bitstr_t * bs) | ||
154 | { | ||
155 | unsigned v; | ||
156 | |||
157 | v = *bs->cur++; | ||
158 | |||
159 | if (v & 0x80) { | ||
160 | v &= 0x3f; | ||
161 | v <<= 8; | ||
162 | v += *bs->cur++; | ||
163 | } | ||
164 | |||
165 | return v; | ||
166 | } | ||
167 | |||
168 | /****************************************************************************/ | ||
169 | unsigned get_bit(bitstr_t * bs) | ||
170 | { | ||
171 | unsigned b = (*bs->cur) & (0x80 >> bs->bit); | ||
172 | |||
173 | INC_BIT(bs); | ||
174 | |||
175 | return b; | ||
176 | } | ||
177 | |||
178 | /****************************************************************************/ | ||
179 | /* Assume b <= 8 */ | ||
180 | unsigned get_bits(bitstr_t * bs, unsigned b) | ||
181 | { | ||
182 | unsigned v, l; | ||
183 | |||
184 | v = (*bs->cur) & (0xffU >> bs->bit); | ||
185 | l = b + bs->bit; | ||
186 | |||
187 | if (l < 8) { | ||
188 | v >>= 8 - l; | ||
189 | bs->bit = l; | ||
190 | } else if (l == 8) { | ||
191 | bs->cur++; | ||
192 | bs->bit = 0; | ||
193 | } else { /* l > 8 */ | ||
194 | |||
195 | v <<= 8; | ||
196 | v += *(++bs->cur); | ||
197 | v >>= 16 - l; | ||
198 | bs->bit = l - 8; | ||
199 | } | ||
200 | |||
201 | return v; | ||
202 | } | ||
203 | |||
204 | /****************************************************************************/ | ||
205 | /* Assume b <= 32 */ | ||
206 | unsigned get_bitmap(bitstr_t * bs, unsigned b) | ||
207 | { | ||
208 | unsigned v, l, shift, bytes; | ||
209 | |||
210 | if (!b) | ||
211 | return 0; | ||
212 | |||
213 | l = bs->bit + b; | ||
214 | |||
215 | if (l < 8) { | ||
216 | v = (unsigned) (*bs->cur) << (bs->bit + 24); | ||
217 | bs->bit = l; | ||
218 | } else if (l == 8) { | ||
219 | v = (unsigned) (*bs->cur++) << (bs->bit + 24); | ||
220 | bs->bit = 0; | ||
221 | } else { | ||
222 | for (bytes = l >> 3, shift = 24, v = 0; bytes; | ||
223 | bytes--, shift -= 8) | ||
224 | v |= (unsigned) (*bs->cur++) << shift; | ||
225 | |||
226 | if (l < 32) { | ||
227 | v |= (unsigned) (*bs->cur) << shift; | ||
228 | v <<= bs->bit; | ||
229 | } else if (l > 32) { | ||
230 | v <<= bs->bit; | ||
231 | v |= (*bs->cur) >> (8 - bs->bit); | ||
232 | } | ||
233 | |||
234 | bs->bit = l & 0x7; | ||
235 | } | ||
236 | |||
237 | v &= 0xffffffff << (32 - b); | ||
238 | |||
239 | return v; | ||
240 | } | ||
241 | |||
242 | /**************************************************************************** | ||
243 | * Assume bs is aligned and sizeof(unsigned int) == 4 | ||
244 | ****************************************************************************/ | ||
245 | unsigned get_uint(bitstr_t * bs, int b) | ||
246 | { | ||
247 | unsigned v = 0; | ||
248 | |||
249 | switch (b) { | ||
250 | case 4: | ||
251 | v |= *bs->cur++; | ||
252 | v <<= 8; | ||
253 | case 3: | ||
254 | v |= *bs->cur++; | ||
255 | v <<= 8; | ||
256 | case 2: | ||
257 | v |= *bs->cur++; | ||
258 | v <<= 8; | ||
259 | case 1: | ||
260 | v |= *bs->cur++; | ||
261 | break; | ||
262 | } | ||
263 | return v; | ||
264 | } | ||
265 | |||
266 | /****************************************************************************/ | ||
267 | int decode_nul(bitstr_t * bs, field_t * f, char *base, int level) | ||
268 | { | ||
269 | PRINT("%*.s%s\n", level * TAB_SIZE, " ", f->name); | ||
270 | |||
271 | return H323_ERROR_NONE; | ||
272 | } | ||
273 | |||
274 | /****************************************************************************/ | ||
275 | int decode_bool(bitstr_t * bs, field_t * f, char *base, int level) | ||
276 | { | ||
277 | PRINT("%*.s%s\n", level * TAB_SIZE, " ", f->name); | ||
278 | |||
279 | INC_BIT(bs); | ||
280 | |||
281 | CHECK_BOUND(bs, 0); | ||
282 | return H323_ERROR_NONE; | ||
283 | } | ||
284 | |||
285 | /****************************************************************************/ | ||
286 | int decode_oid(bitstr_t * bs, field_t * f, char *base, int level) | ||
287 | { | ||
288 | int len; | ||
289 | |||
290 | PRINT("%*.s%s\n", level * TAB_SIZE, " ", f->name); | ||
291 | |||
292 | BYTE_ALIGN(bs); | ||
293 | CHECK_BOUND(bs, 1); | ||
294 | len = *bs->cur++; | ||
295 | bs->cur += len; | ||
296 | |||
297 | CHECK_BOUND(bs, 0); | ||
298 | return H323_ERROR_NONE; | ||
299 | } | ||
300 | |||
301 | /****************************************************************************/ | ||
302 | int decode_int(bitstr_t * bs, field_t * f, char *base, int level) | ||
303 | { | ||
304 | unsigned len; | ||
305 | |||
306 | PRINT("%*.s%s", level * TAB_SIZE, " ", f->name); | ||
307 | |||
308 | switch (f->sz) { | ||
309 | case BYTE: /* Range == 256 */ | ||
310 | BYTE_ALIGN(bs); | ||
311 | bs->cur++; | ||
312 | break; | ||
313 | case WORD: /* 257 <= Range <= 64K */ | ||
314 | BYTE_ALIGN(bs); | ||
315 | bs->cur += 2; | ||
316 | break; | ||
317 | case CONS: /* 64K < Range < 4G */ | ||
318 | len = get_bits(bs, 2) + 1; | ||
319 | BYTE_ALIGN(bs); | ||
320 | if (base && (f->attr & DECODE)) { /* timeToLive */ | ||
321 | unsigned v = get_uint(bs, len) + f->lb; | ||
322 | PRINT(" = %u", v); | ||
323 | *((unsigned *) (base + f->offset)) = v; | ||
324 | } | ||
325 | bs->cur += len; | ||
326 | break; | ||
327 | case UNCO: | ||
328 | BYTE_ALIGN(bs); | ||
329 | CHECK_BOUND(bs, 2); | ||
330 | len = get_len(bs); | ||
331 | bs->cur += len; | ||
332 | break; | ||
333 | default: /* 2 <= Range <= 255 */ | ||
334 | INC_BITS(bs, f->sz); | ||
335 | break; | ||
336 | } | ||
337 | |||
338 | PRINT("\n"); | ||
339 | |||
340 | CHECK_BOUND(bs, 0); | ||
341 | return H323_ERROR_NONE; | ||
342 | } | ||
343 | |||
344 | /****************************************************************************/ | ||
345 | int decode_enum(bitstr_t * bs, field_t * f, char *base, int level) | ||
346 | { | ||
347 | PRINT("%*.s%s\n", level * TAB_SIZE, " ", f->name); | ||
348 | |||
349 | if ((f->attr & EXT) && get_bit(bs)) { | ||
350 | INC_BITS(bs, 7); | ||
351 | } else { | ||
352 | INC_BITS(bs, f->sz); | ||
353 | } | ||
354 | |||
355 | CHECK_BOUND(bs, 0); | ||
356 | return H323_ERROR_NONE; | ||
357 | } | ||
358 | |||
359 | /****************************************************************************/ | ||
360 | int decode_bitstr(bitstr_t * bs, field_t * f, char *base, int level) | ||
361 | { | ||
362 | unsigned len; | ||
363 | |||
364 | PRINT("%*.s%s\n", level * TAB_SIZE, " ", f->name); | ||
365 | |||
366 | BYTE_ALIGN(bs); | ||
367 | switch (f->sz) { | ||
368 | case FIXD: /* fixed length > 16 */ | ||
369 | len = f->lb; | ||
370 | break; | ||
371 | case WORD: /* 2-byte length */ | ||
372 | CHECK_BOUND(bs, 2); | ||
373 | len = (*bs->cur++) << 8; | ||
374 | len += (*bs->cur++) + f->lb; | ||
375 | break; | ||
376 | case SEMI: | ||
377 | CHECK_BOUND(bs, 2); | ||
378 | len = get_len(bs); | ||
379 | break; | ||
380 | default: | ||
381 | len = 0; | ||
382 | break; | ||
383 | } | ||
384 | |||
385 | bs->cur += len >> 3; | ||
386 | bs->bit = len & 7; | ||
387 | |||
388 | CHECK_BOUND(bs, 0); | ||
389 | return H323_ERROR_NONE; | ||
390 | } | ||
391 | |||
392 | /****************************************************************************/ | ||
393 | int decode_numstr(bitstr_t * bs, field_t * f, char *base, int level) | ||
394 | { | ||
395 | unsigned len; | ||
396 | |||
397 | PRINT("%*.s%s\n", level * TAB_SIZE, " ", f->name); | ||
398 | |||
399 | /* 2 <= Range <= 255 */ | ||
400 | len = get_bits(bs, f->sz) + f->lb; | ||
401 | |||
402 | BYTE_ALIGN(bs); | ||
403 | INC_BITS(bs, (len << 2)); | ||
404 | |||
405 | CHECK_BOUND(bs, 0); | ||
406 | return H323_ERROR_NONE; | ||
407 | } | ||
408 | |||
409 | /****************************************************************************/ | ||
410 | int decode_octstr(bitstr_t * bs, field_t * f, char *base, int level) | ||
411 | { | ||
412 | unsigned len; | ||
413 | |||
414 | PRINT("%*.s%s", level * TAB_SIZE, " ", f->name); | ||
415 | |||
416 | switch (f->sz) { | ||
417 | case FIXD: /* Range == 1 */ | ||
418 | if (f->lb > 2) { | ||
419 | BYTE_ALIGN(bs); | ||
420 | if (base && (f->attr & DECODE)) { | ||
421 | /* The IP Address */ | ||
422 | IFTHEN(f->lb == 4, | ||
423 | PRINT(" = %d.%d.%d.%d:%d", | ||
424 | bs->cur[0], bs->cur[1], | ||
425 | bs->cur[2], bs->cur[3], | ||
426 | bs->cur[4] * 256 + bs->cur[5])); | ||
427 | *((unsigned *) (base + f->offset)) = | ||
428 | bs->cur - bs->buf; | ||
429 | } | ||
430 | } | ||
431 | len = f->lb; | ||
432 | break; | ||
433 | case BYTE: /* Range == 256 */ | ||
434 | BYTE_ALIGN(bs); | ||
435 | CHECK_BOUND(bs, 1); | ||
436 | len = (*bs->cur++) + f->lb; | ||
437 | break; | ||
438 | case SEMI: | ||
439 | BYTE_ALIGN(bs); | ||
440 | CHECK_BOUND(bs, 2); | ||
441 | len = get_len(bs) + f->lb; | ||
442 | break; | ||
443 | default: /* 2 <= Range <= 255 */ | ||
444 | len = get_bits(bs, f->sz) + f->lb; | ||
445 | BYTE_ALIGN(bs); | ||
446 | break; | ||
447 | } | ||
448 | |||
449 | bs->cur += len; | ||
450 | |||
451 | PRINT("\n"); | ||
452 | |||
453 | CHECK_BOUND(bs, 0); | ||
454 | return H323_ERROR_NONE; | ||
455 | } | ||
456 | |||
457 | /****************************************************************************/ | ||
458 | int decode_bmpstr(bitstr_t * bs, field_t * f, char *base, int level) | ||
459 | { | ||
460 | unsigned len; | ||
461 | |||
462 | PRINT("%*.s%s\n", level * TAB_SIZE, " ", f->name); | ||
463 | |||
464 | switch (f->sz) { | ||
465 | case BYTE: /* Range == 256 */ | ||
466 | BYTE_ALIGN(bs); | ||
467 | CHECK_BOUND(bs, 1); | ||
468 | len = (*bs->cur++) + f->lb; | ||
469 | break; | ||
470 | default: /* 2 <= Range <= 255 */ | ||
471 | len = get_bits(bs, f->sz) + f->lb; | ||
472 | BYTE_ALIGN(bs); | ||
473 | break; | ||
474 | } | ||
475 | |||
476 | bs->cur += len << 1; | ||
477 | |||
478 | CHECK_BOUND(bs, 0); | ||
479 | return H323_ERROR_NONE; | ||
480 | } | ||
481 | |||
482 | /****************************************************************************/ | ||
483 | int decode_seq(bitstr_t * bs, field_t * f, char *base, int level) | ||
484 | { | ||
485 | unsigned ext, bmp, i, opt, len = 0, bmp2, bmp2_len; | ||
486 | int err; | ||
487 | field_t *son; | ||
488 | unsigned char *beg = NULL; | ||
489 | |||
490 | PRINT("%*.s%s\n", level * TAB_SIZE, " ", f->name); | ||
491 | |||
492 | /* Decode? */ | ||
493 | base = (base && (f->attr & DECODE)) ? base + f->offset : NULL; | ||
494 | |||
495 | /* Extensible? */ | ||
496 | ext = (f->attr & EXT) ? get_bit(bs) : 0; | ||
497 | |||
498 | /* Get fields bitmap */ | ||
499 | bmp = get_bitmap(bs, f->sz); | ||
500 | if (base) | ||
501 | *(unsigned *) base = bmp; | ||
502 | |||
503 | /* Decode the root components */ | ||
504 | for (i = opt = 0, son = f->fields; i < f->lb; i++, son++) { | ||
505 | if (son->attr & STOP) { | ||
506 | PRINT("%*.s%s\n", (level + 1) * TAB_SIZE, " ", | ||
507 | son->name); | ||
508 | return H323_ERROR_STOP; | ||
509 | } | ||
510 | |||
511 | if (son->attr & OPT) { /* Optional component */ | ||
512 | if (!((0x80000000U >> (opt++)) & bmp)) /* Not exist */ | ||
513 | continue; | ||
514 | } | ||
515 | |||
516 | /* Decode */ | ||
517 | if (son->attr & OPEN) { /* Open field */ | ||
518 | CHECK_BOUND(bs, 2); | ||
519 | len = get_len(bs); | ||
520 | CHECK_BOUND(bs, len); | ||
521 | if (!base) { | ||
522 | PRINT("%*.s%s\n", (level + 1) * TAB_SIZE, | ||
523 | " ", son->name); | ||
524 | bs->cur += len; | ||
525 | continue; | ||
526 | } | ||
527 | beg = bs->cur; | ||
528 | |||
529 | /* Decode */ | ||
530 | if ((err = (Decoders[son->type]) (bs, son, base, | ||
531 | level + 1)) < | ||
532 | H323_ERROR_NONE) | ||
533 | return err; | ||
534 | |||
535 | bs->cur = beg + len; | ||
536 | bs->bit = 0; | ||
537 | } else if ((err = (Decoders[son->type]) (bs, son, base, | ||
538 | level + 1)) < | ||
539 | H323_ERROR_NONE) | ||
540 | return err; | ||
541 | } | ||
542 | |||
543 | /* No extension? */ | ||
544 | if (!ext) | ||
545 | return H323_ERROR_NONE; | ||
546 | |||
547 | /* Get the extension bitmap */ | ||
548 | bmp2_len = get_bits(bs, 7) + 1; | ||
549 | CHECK_BOUND(bs, (bmp2_len + 7) >> 3); | ||
550 | bmp2 = get_bitmap(bs, bmp2_len); | ||
551 | bmp |= bmp2 >> f->sz; | ||
552 | if (base) | ||
553 | *(unsigned *) base = bmp; | ||
554 | BYTE_ALIGN(bs); | ||
555 | |||
556 | /* Decode the extension components */ | ||
557 | for (opt = 0; opt < bmp2_len; opt++, i++, son++) { | ||
558 | if (i < f->ub && son->attr & STOP) { | ||
559 | PRINT("%*.s%s\n", (level + 1) * TAB_SIZE, " ", | ||
560 | son->name); | ||
561 | return H323_ERROR_STOP; | ||
562 | } | ||
563 | |||
564 | if (!((0x80000000 >> opt) & bmp2)) /* Not present */ | ||
565 | continue; | ||
566 | |||
567 | /* Check Range */ | ||
568 | if (i >= f->ub) { /* Newer Version? */ | ||
569 | CHECK_BOUND(bs, 2); | ||
570 | len = get_len(bs); | ||
571 | CHECK_BOUND(bs, len); | ||
572 | bs->cur += len; | ||
573 | continue; | ||
574 | } | ||
575 | |||
576 | CHECK_BOUND(bs, 2); | ||
577 | len = get_len(bs); | ||
578 | CHECK_BOUND(bs, len); | ||
579 | if (!base || !(son->attr & DECODE)) { | ||
580 | PRINT("%*.s%s\n", (level + 1) * TAB_SIZE, " ", | ||
581 | son->name); | ||
582 | bs->cur += len; | ||
583 | continue; | ||
584 | } | ||
585 | beg = bs->cur; | ||
586 | |||
587 | if ((err = (Decoders[son->type]) (bs, son, base, | ||
588 | level + 1)) < | ||
589 | H323_ERROR_NONE) | ||
590 | return err; | ||
591 | |||
592 | bs->cur = beg + len; | ||
593 | bs->bit = 0; | ||
594 | } | ||
595 | return H323_ERROR_NONE; | ||
596 | } | ||
597 | |||
598 | /****************************************************************************/ | ||
599 | int decode_seqof(bitstr_t * bs, field_t * f, char *base, int level) | ||
600 | { | ||
601 | unsigned count, effective_count = 0, i, len = 0; | ||
602 | int err; | ||
603 | field_t *son; | ||
604 | unsigned char *beg = NULL; | ||
605 | |||
606 | PRINT("%*.s%s\n", level * TAB_SIZE, " ", f->name); | ||
607 | |||
608 | /* Decode? */ | ||
609 | base = (base && (f->attr & DECODE)) ? base + f->offset : NULL; | ||
610 | |||
611 | /* Decode item count */ | ||
612 | switch (f->sz) { | ||
613 | case BYTE: | ||
614 | BYTE_ALIGN(bs); | ||
615 | CHECK_BOUND(bs, 1); | ||
616 | count = *bs->cur++; | ||
617 | break; | ||
618 | case WORD: | ||
619 | BYTE_ALIGN(bs); | ||
620 | CHECK_BOUND(bs, 2); | ||
621 | count = *bs->cur++; | ||
622 | count <<= 8; | ||
623 | count = *bs->cur++; | ||
624 | break; | ||
625 | case SEMI: | ||
626 | BYTE_ALIGN(bs); | ||
627 | CHECK_BOUND(bs, 2); | ||
628 | count = get_len(bs); | ||
629 | break; | ||
630 | default: | ||
631 | count = get_bits(bs, f->sz); | ||
632 | break; | ||
633 | } | ||
634 | count += f->lb; | ||
635 | |||
636 | /* Write Count */ | ||
637 | if (base) { | ||
638 | effective_count = count > f->ub ? f->ub : count; | ||
639 | *(unsigned *) base = effective_count; | ||
640 | base += sizeof(unsigned); | ||
641 | } | ||
642 | |||
643 | /* Decode nested field */ | ||
644 | son = f->fields; | ||
645 | if (base) | ||
646 | base -= son->offset; | ||
647 | for (i = 0; i < count; i++) { | ||
648 | if (son->attr & OPEN) { | ||
649 | BYTE_ALIGN(bs); | ||
650 | len = get_len(bs); | ||
651 | CHECK_BOUND(bs, len); | ||
652 | if (!base || !(son->attr & DECODE)) { | ||
653 | PRINT("%*.s%s\n", (level + 1) * TAB_SIZE, | ||
654 | " ", son->name); | ||
655 | bs->cur += len; | ||
656 | continue; | ||
657 | } | ||
658 | beg = bs->cur; | ||
659 | |||
660 | if ((err = (Decoders[son->type]) (bs, son, | ||
661 | i < | ||
662 | effective_count ? | ||
663 | base : NULL, | ||
664 | level + 1)) < | ||
665 | H323_ERROR_NONE) | ||
666 | return err; | ||
667 | |||
668 | bs->cur = beg + len; | ||
669 | bs->bit = 0; | ||
670 | } else | ||
671 | if ((err = (Decoders[son->type]) (bs, son, | ||
672 | i < | ||
673 | effective_count ? | ||
674 | base : NULL, | ||
675 | level + 1)) < | ||
676 | H323_ERROR_NONE) | ||
677 | return err; | ||
678 | |||
679 | if (base) | ||
680 | base += son->offset; | ||
681 | } | ||
682 | |||
683 | return H323_ERROR_NONE; | ||
684 | } | ||
685 | |||
686 | |||
687 | /****************************************************************************/ | ||
688 | int decode_choice(bitstr_t * bs, field_t * f, char *base, int level) | ||
689 | { | ||
690 | unsigned type, ext, len = 0; | ||
691 | int err; | ||
692 | field_t *son; | ||
693 | unsigned char *beg = NULL; | ||
694 | |||
695 | PRINT("%*.s%s\n", level * TAB_SIZE, " ", f->name); | ||
696 | |||
697 | /* Decode? */ | ||
698 | base = (base && (f->attr & DECODE)) ? base + f->offset : NULL; | ||
699 | |||
700 | /* Decode the choice index number */ | ||
701 | if ((f->attr & EXT) && get_bit(bs)) { | ||
702 | ext = 1; | ||
703 | type = get_bits(bs, 7) + f->lb; | ||
704 | } else { | ||
705 | ext = 0; | ||
706 | type = get_bits(bs, f->sz); | ||
707 | } | ||
708 | |||
709 | /* Write Type */ | ||
710 | if (base) | ||
711 | *(unsigned *) base = type; | ||
712 | |||
713 | /* Check Range */ | ||
714 | if (type >= f->ub) { /* Newer version? */ | ||
715 | BYTE_ALIGN(bs); | ||
716 | len = get_len(bs); | ||
717 | CHECK_BOUND(bs, len); | ||
718 | bs->cur += len; | ||
719 | return H323_ERROR_NONE; | ||
720 | } | ||
721 | |||
722 | /* Transfer to son level */ | ||
723 | son = &f->fields[type]; | ||
724 | if (son->attr & STOP) { | ||
725 | PRINT("%*.s%s\n", (level + 1) * TAB_SIZE, " ", son->name); | ||
726 | return H323_ERROR_STOP; | ||
727 | } | ||
728 | |||
729 | if (ext || (son->attr & OPEN)) { | ||
730 | BYTE_ALIGN(bs); | ||
731 | len = get_len(bs); | ||
732 | CHECK_BOUND(bs, len); | ||
733 | if (!base || !(son->attr & DECODE)) { | ||
734 | PRINT("%*.s%s\n", (level + 1) * TAB_SIZE, " ", | ||
735 | son->name); | ||
736 | bs->cur += len; | ||
737 | return H323_ERROR_NONE; | ||
738 | } | ||
739 | beg = bs->cur; | ||
740 | |||
741 | if ((err = (Decoders[son->type]) (bs, son, base, level + 1)) < | ||
742 | H323_ERROR_NONE) | ||
743 | return err; | ||
744 | |||
745 | bs->cur = beg + len; | ||
746 | bs->bit = 0; | ||
747 | } else if ((err = (Decoders[son->type]) (bs, son, base, level + 1)) < | ||
748 | H323_ERROR_NONE) | ||
749 | return err; | ||
750 | |||
751 | return H323_ERROR_NONE; | ||
752 | } | ||
753 | |||
754 | /****************************************************************************/ | ||
755 | int DecodeRasMessage(unsigned char *buf, size_t sz, RasMessage * ras) | ||
756 | { | ||
757 | static field_t ras_message = { | ||
758 | FNAME("RasMessage") CHOICE, 5, 24, 32, DECODE | EXT, | ||
759 | 0, _RasMessage | ||
760 | }; | ||
761 | bitstr_t bs; | ||
762 | |||
763 | bs.buf = bs.beg = bs.cur = buf; | ||
764 | bs.end = buf + sz; | ||
765 | bs.bit = 0; | ||
766 | |||
767 | return decode_choice(&bs, &ras_message, (char *) ras, 0); | ||
768 | } | ||
769 | |||
770 | /****************************************************************************/ | ||
771 | static int DecodeH323_UserInformation(unsigned char *buf, unsigned char *beg, | ||
772 | size_t sz, H323_UserInformation * uuie) | ||
773 | { | ||
774 | static field_t h323_userinformation = { | ||
775 | FNAME("H323-UserInformation") SEQ, 1, 2, 2, DECODE | EXT, | ||
776 | 0, _H323_UserInformation | ||
777 | }; | ||
778 | bitstr_t bs; | ||
779 | |||
780 | bs.buf = buf; | ||
781 | bs.beg = bs.cur = beg; | ||
782 | bs.end = beg + sz; | ||
783 | bs.bit = 0; | ||
784 | |||
785 | return decode_seq(&bs, &h323_userinformation, (char *) uuie, 0); | ||
786 | } | ||
787 | |||
788 | /****************************************************************************/ | ||
789 | int DecodeMultimediaSystemControlMessage(unsigned char *buf, size_t sz, | ||
790 | MultimediaSystemControlMessage * | ||
791 | mscm) | ||
792 | { | ||
793 | static field_t multimediasystemcontrolmessage = { | ||
794 | FNAME("MultimediaSystemControlMessage") CHOICE, 2, 4, 4, | ||
795 | DECODE | EXT, 0, _MultimediaSystemControlMessage | ||
796 | }; | ||
797 | bitstr_t bs; | ||
798 | |||
799 | bs.buf = bs.beg = bs.cur = buf; | ||
800 | bs.end = buf + sz; | ||
801 | bs.bit = 0; | ||
802 | |||
803 | return decode_choice(&bs, &multimediasystemcontrolmessage, | ||
804 | (char *) mscm, 0); | ||
805 | } | ||
806 | |||
807 | /****************************************************************************/ | ||
808 | int DecodeQ931(unsigned char *buf, size_t sz, Q931 * q931) | ||
809 | { | ||
810 | unsigned char *p = buf; | ||
811 | int len; | ||
812 | |||
813 | if (!p || sz < 1) | ||
814 | return H323_ERROR_BOUND; | ||
815 | |||
816 | /* Protocol Discriminator */ | ||
817 | if (*p != 0x08) { | ||
818 | PRINT("Unknown Protocol Discriminator\n"); | ||
819 | return H323_ERROR_RANGE; | ||
820 | } | ||
821 | p++; | ||
822 | sz--; | ||
823 | |||
824 | /* CallReferenceValue */ | ||
825 | if (sz < 1) | ||
826 | return H323_ERROR_BOUND; | ||
827 | len = *p++; | ||
828 | sz--; | ||
829 | if (sz < len) | ||
830 | return H323_ERROR_BOUND; | ||
831 | p += len; | ||
832 | sz -= len; | ||
833 | |||
834 | /* Message Type */ | ||
835 | if (sz < 1) | ||
836 | return H323_ERROR_BOUND; | ||
837 | q931->MessageType = *p++; | ||
838 | PRINT("MessageType = %02X\n", q931->MessageType); | ||
839 | if (*p & 0x80) { | ||
840 | p++; | ||
841 | sz--; | ||
842 | } | ||
843 | |||
844 | /* Decode Information Elements */ | ||
845 | while (sz > 0) { | ||
846 | if (*p == 0x7e) { /* UserUserIE */ | ||
847 | if (sz < 3) | ||
848 | break; | ||
849 | p++; | ||
850 | len = *p++ << 8; | ||
851 | len |= *p++; | ||
852 | sz -= 3; | ||
853 | if (sz < len) | ||
854 | break; | ||
855 | p++; | ||
856 | len--; | ||
857 | return DecodeH323_UserInformation(buf, p, len, | ||
858 | &q931->UUIE); | ||
859 | } | ||
860 | p++; | ||
861 | sz--; | ||
862 | if (sz < 1) | ||
863 | break; | ||
864 | len = *p++; | ||
865 | if (sz < len) | ||
866 | break; | ||
867 | p += len; | ||
868 | sz -= len; | ||
869 | } | ||
870 | |||
871 | PRINT("Q.931 UUIE not found\n"); | ||
872 | |||
873 | return H323_ERROR_BOUND; | ||
874 | } | ||
diff --git a/net/ipv4/netfilter/ip_conntrack_helper_h323_types.c b/net/ipv4/netfilter/ip_conntrack_helper_h323_types.c deleted file mode 100644 index 4b359618bedd..000000000000 --- a/net/ipv4/netfilter/ip_conntrack_helper_h323_types.c +++ /dev/null | |||
@@ -1,1926 +0,0 @@ | |||
1 | /* Generated by Jing Min Zhao's ASN.1 parser, Apr 20 2006 | ||
2 | * | ||
3 | * Copyright (c) 2006 Jing Min Zhao <zhaojingmin@users.sourceforge.net> | ||
4 | * | ||
5 | * This source code is licensed under General Public License version 2. | ||
6 | */ | ||
7 | |||
8 | static field_t _TransportAddress_ipAddress[] = { /* SEQUENCE */ | ||
9 | {FNAME("ip") OCTSTR, FIXD, 4, 0, DECODE, | ||
10 | offsetof(TransportAddress_ipAddress, ip), NULL}, | ||
11 | {FNAME("port") INT, WORD, 0, 0, SKIP, 0, NULL}, | ||
12 | }; | ||
13 | |||
14 | static field_t _TransportAddress_ipSourceRoute_route[] = { /* SEQUENCE OF */ | ||
15 | {FNAME("item") OCTSTR, FIXD, 4, 0, SKIP, 0, NULL}, | ||
16 | }; | ||
17 | |||
18 | static field_t _TransportAddress_ipSourceRoute_routing[] = { /* CHOICE */ | ||
19 | {FNAME("strict") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
20 | {FNAME("loose") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
21 | }; | ||
22 | |||
23 | static field_t _TransportAddress_ipSourceRoute[] = { /* SEQUENCE */ | ||
24 | {FNAME("ip") OCTSTR, FIXD, 4, 0, SKIP, 0, NULL}, | ||
25 | {FNAME("port") INT, WORD, 0, 0, SKIP, 0, NULL}, | ||
26 | {FNAME("route") SEQOF, SEMI, 0, 0, SKIP, 0, | ||
27 | _TransportAddress_ipSourceRoute_route}, | ||
28 | {FNAME("routing") CHOICE, 1, 2, 2, SKIP | EXT, 0, | ||
29 | _TransportAddress_ipSourceRoute_routing}, | ||
30 | }; | ||
31 | |||
32 | static field_t _TransportAddress_ipxAddress[] = { /* SEQUENCE */ | ||
33 | {FNAME("node") OCTSTR, FIXD, 6, 0, SKIP, 0, NULL}, | ||
34 | {FNAME("netnum") OCTSTR, FIXD, 4, 0, SKIP, 0, NULL}, | ||
35 | {FNAME("port") OCTSTR, FIXD, 2, 0, SKIP, 0, NULL}, | ||
36 | }; | ||
37 | |||
38 | static field_t _TransportAddress_ip6Address[] = { /* SEQUENCE */ | ||
39 | {FNAME("ip") OCTSTR, FIXD, 16, 0, SKIP, 0, NULL}, | ||
40 | {FNAME("port") INT, WORD, 0, 0, SKIP, 0, NULL}, | ||
41 | }; | ||
42 | |||
43 | static field_t _H221NonStandard[] = { /* SEQUENCE */ | ||
44 | {FNAME("t35CountryCode") INT, BYTE, 0, 0, SKIP, 0, NULL}, | ||
45 | {FNAME("t35Extension") INT, BYTE, 0, 0, SKIP, 0, NULL}, | ||
46 | {FNAME("manufacturerCode") INT, WORD, 0, 0, SKIP, 0, NULL}, | ||
47 | }; | ||
48 | |||
49 | static field_t _NonStandardIdentifier[] = { /* CHOICE */ | ||
50 | {FNAME("object") OID, BYTE, 0, 0, SKIP, 0, NULL}, | ||
51 | {FNAME("h221NonStandard") SEQ, 0, 3, 3, SKIP | EXT, 0, | ||
52 | _H221NonStandard}, | ||
53 | }; | ||
54 | |||
55 | static field_t _NonStandardParameter[] = { /* SEQUENCE */ | ||
56 | {FNAME("nonStandardIdentifier") CHOICE, 1, 2, 2, SKIP | EXT, 0, | ||
57 | _NonStandardIdentifier}, | ||
58 | {FNAME("data") OCTSTR, SEMI, 0, 0, SKIP, 0, NULL}, | ||
59 | }; | ||
60 | |||
61 | static field_t _TransportAddress[] = { /* CHOICE */ | ||
62 | {FNAME("ipAddress") SEQ, 0, 2, 2, DECODE, | ||
63 | offsetof(TransportAddress, ipAddress), _TransportAddress_ipAddress}, | ||
64 | {FNAME("ipSourceRoute") SEQ, 0, 4, 4, SKIP | EXT, 0, | ||
65 | _TransportAddress_ipSourceRoute}, | ||
66 | {FNAME("ipxAddress") SEQ, 0, 3, 3, SKIP, 0, | ||
67 | _TransportAddress_ipxAddress}, | ||
68 | {FNAME("ip6Address") SEQ, 0, 2, 2, SKIP | EXT, 0, | ||
69 | _TransportAddress_ip6Address}, | ||
70 | {FNAME("netBios") OCTSTR, FIXD, 16, 0, SKIP, 0, NULL}, | ||
71 | {FNAME("nsap") OCTSTR, 5, 1, 0, SKIP, 0, NULL}, | ||
72 | {FNAME("nonStandardAddress") SEQ, 0, 2, 2, SKIP, 0, | ||
73 | _NonStandardParameter}, | ||
74 | }; | ||
75 | |||
76 | static field_t _AliasAddress[] = { /* CHOICE */ | ||
77 | {FNAME("dialedDigits") NUMDGT, 7, 1, 0, SKIP, 0, NULL}, | ||
78 | {FNAME("h323-ID") BMPSTR, BYTE, 1, 0, SKIP, 0, NULL}, | ||
79 | {FNAME("url-ID") IA5STR, WORD, 1, 0, SKIP, 0, NULL}, | ||
80 | {FNAME("transportID") CHOICE, 3, 7, 7, SKIP | EXT, 0, NULL}, | ||
81 | {FNAME("email-ID") IA5STR, WORD, 1, 0, SKIP, 0, NULL}, | ||
82 | {FNAME("partyNumber") CHOICE, 3, 5, 5, SKIP | EXT, 0, NULL}, | ||
83 | {FNAME("mobileUIM") CHOICE, 1, 2, 2, SKIP | EXT, 0, NULL}, | ||
84 | }; | ||
85 | |||
86 | static field_t _Setup_UUIE_sourceAddress[] = { /* SEQUENCE OF */ | ||
87 | {FNAME("item") CHOICE, 1, 2, 7, SKIP | EXT, 0, _AliasAddress}, | ||
88 | }; | ||
89 | |||
90 | static field_t _VendorIdentifier[] = { /* SEQUENCE */ | ||
91 | {FNAME("vendor") SEQ, 0, 3, 3, SKIP | EXT, 0, _H221NonStandard}, | ||
92 | {FNAME("productId") OCTSTR, BYTE, 1, 0, SKIP | OPT, 0, NULL}, | ||
93 | {FNAME("versionId") OCTSTR, BYTE, 1, 0, SKIP | OPT, 0, NULL}, | ||
94 | }; | ||
95 | |||
96 | static field_t _GatekeeperInfo[] = { /* SEQUENCE */ | ||
97 | {FNAME("nonStandardData") SEQ, 0, 2, 2, SKIP | OPT, 0, | ||
98 | _NonStandardParameter}, | ||
99 | }; | ||
100 | |||
101 | static field_t _H310Caps[] = { /* SEQUENCE */ | ||
102 | {FNAME("nonStandardData") SEQ, 0, 2, 2, SKIP | OPT, 0, | ||
103 | _NonStandardParameter}, | ||
104 | {FNAME("dataRatesSupported") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
105 | {FNAME("supportedPrefixes") SEQOF, SEMI, 0, 0, SKIP, 0, NULL}, | ||
106 | }; | ||
107 | |||
108 | static field_t _H320Caps[] = { /* SEQUENCE */ | ||
109 | {FNAME("nonStandardData") SEQ, 0, 2, 2, SKIP | OPT, 0, | ||
110 | _NonStandardParameter}, | ||
111 | {FNAME("dataRatesSupported") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
112 | {FNAME("supportedPrefixes") SEQOF, SEMI, 0, 0, SKIP, 0, NULL}, | ||
113 | }; | ||
114 | |||
115 | static field_t _H321Caps[] = { /* SEQUENCE */ | ||
116 | {FNAME("nonStandardData") SEQ, 0, 2, 2, SKIP | OPT, 0, | ||
117 | _NonStandardParameter}, | ||
118 | {FNAME("dataRatesSupported") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
119 | {FNAME("supportedPrefixes") SEQOF, SEMI, 0, 0, SKIP, 0, NULL}, | ||
120 | }; | ||
121 | |||
122 | static field_t _H322Caps[] = { /* SEQUENCE */ | ||
123 | {FNAME("nonStandardData") SEQ, 0, 2, 2, SKIP | OPT, 0, | ||
124 | _NonStandardParameter}, | ||
125 | {FNAME("dataRatesSupported") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
126 | {FNAME("supportedPrefixes") SEQOF, SEMI, 0, 0, SKIP, 0, NULL}, | ||
127 | }; | ||
128 | |||
129 | static field_t _H323Caps[] = { /* SEQUENCE */ | ||
130 | {FNAME("nonStandardData") SEQ, 0, 2, 2, SKIP | OPT, 0, | ||
131 | _NonStandardParameter}, | ||
132 | {FNAME("dataRatesSupported") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
133 | {FNAME("supportedPrefixes") SEQOF, SEMI, 0, 0, SKIP, 0, NULL}, | ||
134 | }; | ||
135 | |||
136 | static field_t _H324Caps[] = { /* SEQUENCE */ | ||
137 | {FNAME("nonStandardData") SEQ, 0, 2, 2, SKIP | OPT, 0, | ||
138 | _NonStandardParameter}, | ||
139 | {FNAME("dataRatesSupported") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
140 | {FNAME("supportedPrefixes") SEQOF, SEMI, 0, 0, SKIP, 0, NULL}, | ||
141 | }; | ||
142 | |||
143 | static field_t _VoiceCaps[] = { /* SEQUENCE */ | ||
144 | {FNAME("nonStandardData") SEQ, 0, 2, 2, SKIP | OPT, 0, | ||
145 | _NonStandardParameter}, | ||
146 | {FNAME("dataRatesSupported") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
147 | {FNAME("supportedPrefixes") SEQOF, SEMI, 0, 0, SKIP, 0, NULL}, | ||
148 | }; | ||
149 | |||
150 | static field_t _T120OnlyCaps[] = { /* SEQUENCE */ | ||
151 | {FNAME("nonStandardData") SEQ, 0, 2, 2, SKIP | OPT, 0, | ||
152 | _NonStandardParameter}, | ||
153 | {FNAME("dataRatesSupported") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
154 | {FNAME("supportedPrefixes") SEQOF, SEMI, 0, 0, SKIP, 0, NULL}, | ||
155 | }; | ||
156 | |||
157 | static field_t _SupportedProtocols[] = { /* CHOICE */ | ||
158 | {FNAME("nonStandardData") SEQ, 0, 2, 2, SKIP, 0, | ||
159 | _NonStandardParameter}, | ||
160 | {FNAME("h310") SEQ, 1, 1, 3, SKIP | EXT, 0, _H310Caps}, | ||
161 | {FNAME("h320") SEQ, 1, 1, 3, SKIP | EXT, 0, _H320Caps}, | ||
162 | {FNAME("h321") SEQ, 1, 1, 3, SKIP | EXT, 0, _H321Caps}, | ||
163 | {FNAME("h322") SEQ, 1, 1, 3, SKIP | EXT, 0, _H322Caps}, | ||
164 | {FNAME("h323") SEQ, 1, 1, 3, SKIP | EXT, 0, _H323Caps}, | ||
165 | {FNAME("h324") SEQ, 1, 1, 3, SKIP | EXT, 0, _H324Caps}, | ||
166 | {FNAME("voice") SEQ, 1, 1, 3, SKIP | EXT, 0, _VoiceCaps}, | ||
167 | {FNAME("t120-only") SEQ, 1, 1, 3, SKIP | EXT, 0, _T120OnlyCaps}, | ||
168 | {FNAME("nonStandardProtocol") SEQ, 2, 3, 3, SKIP | EXT, 0, NULL}, | ||
169 | {FNAME("t38FaxAnnexbOnly") SEQ, 2, 5, 5, SKIP | EXT, 0, NULL}, | ||
170 | }; | ||
171 | |||
172 | static field_t _GatewayInfo_protocol[] = { /* SEQUENCE OF */ | ||
173 | {FNAME("item") CHOICE, 4, 9, 11, SKIP | EXT, 0, _SupportedProtocols}, | ||
174 | }; | ||
175 | |||
176 | static field_t _GatewayInfo[] = { /* SEQUENCE */ | ||
177 | {FNAME("protocol") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, | ||
178 | _GatewayInfo_protocol}, | ||
179 | {FNAME("nonStandardData") SEQ, 0, 2, 2, SKIP | OPT, 0, | ||
180 | _NonStandardParameter}, | ||
181 | }; | ||
182 | |||
183 | static field_t _McuInfo[] = { /* SEQUENCE */ | ||
184 | {FNAME("nonStandardData") SEQ, 0, 2, 2, SKIP | OPT, 0, | ||
185 | _NonStandardParameter}, | ||
186 | {FNAME("protocol") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
187 | }; | ||
188 | |||
189 | static field_t _TerminalInfo[] = { /* SEQUENCE */ | ||
190 | {FNAME("nonStandardData") SEQ, 0, 2, 2, SKIP | OPT, 0, | ||
191 | _NonStandardParameter}, | ||
192 | }; | ||
193 | |||
194 | static field_t _EndpointType[] = { /* SEQUENCE */ | ||
195 | {FNAME("nonStandardData") SEQ, 0, 2, 2, SKIP | OPT, 0, | ||
196 | _NonStandardParameter}, | ||
197 | {FNAME("vendor") SEQ, 2, 3, 3, SKIP | EXT | OPT, 0, | ||
198 | _VendorIdentifier}, | ||
199 | {FNAME("gatekeeper") SEQ, 1, 1, 1, SKIP | EXT | OPT, 0, | ||
200 | _GatekeeperInfo}, | ||
201 | {FNAME("gateway") SEQ, 2, 2, 2, SKIP | EXT | OPT, 0, _GatewayInfo}, | ||
202 | {FNAME("mcu") SEQ, 1, 1, 2, SKIP | EXT | OPT, 0, _McuInfo}, | ||
203 | {FNAME("terminal") SEQ, 1, 1, 1, SKIP | EXT | OPT, 0, _TerminalInfo}, | ||
204 | {FNAME("mc") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
205 | {FNAME("undefinedNode") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
206 | {FNAME("set") BITSTR, FIXD, 32, 0, SKIP | OPT, 0, NULL}, | ||
207 | {FNAME("supportedTunnelledProtocols") SEQOF, SEMI, 0, 0, SKIP | OPT, | ||
208 | 0, NULL}, | ||
209 | }; | ||
210 | |||
211 | static field_t _Setup_UUIE_destinationAddress[] = { /* SEQUENCE OF */ | ||
212 | {FNAME("item") CHOICE, 1, 2, 7, SKIP | EXT, 0, _AliasAddress}, | ||
213 | }; | ||
214 | |||
215 | static field_t _Setup_UUIE_destExtraCallInfo[] = { /* SEQUENCE OF */ | ||
216 | {FNAME("item") CHOICE, 1, 2, 7, SKIP | EXT, 0, _AliasAddress}, | ||
217 | }; | ||
218 | |||
219 | static field_t _Setup_UUIE_destExtraCRV[] = { /* SEQUENCE OF */ | ||
220 | {FNAME("item") INT, WORD, 0, 0, SKIP, 0, NULL}, | ||
221 | }; | ||
222 | |||
223 | static field_t _Setup_UUIE_conferenceGoal[] = { /* CHOICE */ | ||
224 | {FNAME("create") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
225 | {FNAME("join") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
226 | {FNAME("invite") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
227 | {FNAME("capability-negotiation") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
228 | {FNAME("callIndependentSupplementaryService") NUL, FIXD, 0, 0, SKIP, | ||
229 | 0, NULL}, | ||
230 | }; | ||
231 | |||
232 | static field_t _Q954Details[] = { /* SEQUENCE */ | ||
233 | {FNAME("conferenceCalling") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
234 | {FNAME("threePartyService") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
235 | }; | ||
236 | |||
237 | static field_t _QseriesOptions[] = { /* SEQUENCE */ | ||
238 | {FNAME("q932Full") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
239 | {FNAME("q951Full") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
240 | {FNAME("q952Full") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
241 | {FNAME("q953Full") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
242 | {FNAME("q955Full") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
243 | {FNAME("q956Full") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
244 | {FNAME("q957Full") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
245 | {FNAME("q954Info") SEQ, 0, 2, 2, SKIP | EXT, 0, _Q954Details}, | ||
246 | }; | ||
247 | |||
248 | static field_t _CallType[] = { /* CHOICE */ | ||
249 | {FNAME("pointToPoint") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
250 | {FNAME("oneToN") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
251 | {FNAME("nToOne") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
252 | {FNAME("nToN") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
253 | }; | ||
254 | |||
255 | static field_t _H245_NonStandardIdentifier_h221NonStandard[] = { /* SEQUENCE */ | ||
256 | {FNAME("t35CountryCode") INT, BYTE, 0, 0, SKIP, 0, NULL}, | ||
257 | {FNAME("t35Extension") INT, BYTE, 0, 0, SKIP, 0, NULL}, | ||
258 | {FNAME("manufacturerCode") INT, WORD, 0, 0, SKIP, 0, NULL}, | ||
259 | }; | ||
260 | |||
261 | static field_t _H245_NonStandardIdentifier[] = { /* CHOICE */ | ||
262 | {FNAME("object") OID, BYTE, 0, 0, SKIP, 0, NULL}, | ||
263 | {FNAME("h221NonStandard") SEQ, 0, 3, 3, SKIP, 0, | ||
264 | _H245_NonStandardIdentifier_h221NonStandard}, | ||
265 | }; | ||
266 | |||
267 | static field_t _H245_NonStandardParameter[] = { /* SEQUENCE */ | ||
268 | {FNAME("nonStandardIdentifier") CHOICE, 1, 2, 2, SKIP, 0, | ||
269 | _H245_NonStandardIdentifier}, | ||
270 | {FNAME("data") OCTSTR, SEMI, 0, 0, SKIP, 0, NULL}, | ||
271 | }; | ||
272 | |||
273 | static field_t _H261VideoCapability[] = { /* SEQUENCE */ | ||
274 | {FNAME("qcifMPI") INT, 2, 1, 0, SKIP | OPT, 0, NULL}, | ||
275 | {FNAME("cifMPI") INT, 2, 1, 0, SKIP | OPT, 0, NULL}, | ||
276 | {FNAME("temporalSpatialTradeOffCapability") BOOL, FIXD, 0, 0, SKIP, 0, | ||
277 | NULL}, | ||
278 | {FNAME("maxBitRate") INT, WORD, 1, 0, SKIP, 0, NULL}, | ||
279 | {FNAME("stillImageTransmission") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
280 | {FNAME("videoBadMBsCap") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
281 | }; | ||
282 | |||
283 | static field_t _H262VideoCapability[] = { /* SEQUENCE */ | ||
284 | {FNAME("profileAndLevel-SPatML") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
285 | {FNAME("profileAndLevel-MPatLL") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
286 | {FNAME("profileAndLevel-MPatML") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
287 | {FNAME("profileAndLevel-MPatH-14") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
288 | {FNAME("profileAndLevel-MPatHL") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
289 | {FNAME("profileAndLevel-SNRatLL") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
290 | {FNAME("profileAndLevel-SNRatML") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
291 | {FNAME("profileAndLevel-SpatialatH-14") BOOL, FIXD, 0, 0, SKIP, 0, | ||
292 | NULL}, | ||
293 | {FNAME("profileAndLevel-HPatML") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
294 | {FNAME("profileAndLevel-HPatH-14") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
295 | {FNAME("profileAndLevel-HPatHL") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
296 | {FNAME("videoBitRate") INT, CONS, 0, 0, SKIP | OPT, 0, NULL}, | ||
297 | {FNAME("vbvBufferSize") INT, CONS, 0, 0, SKIP | OPT, 0, NULL}, | ||
298 | {FNAME("samplesPerLine") INT, WORD, 0, 0, SKIP | OPT, 0, NULL}, | ||
299 | {FNAME("linesPerFrame") INT, WORD, 0, 0, SKIP | OPT, 0, NULL}, | ||
300 | {FNAME("framesPerSecond") INT, 4, 0, 0, SKIP | OPT, 0, NULL}, | ||
301 | {FNAME("luminanceSampleRate") INT, CONS, 0, 0, SKIP | OPT, 0, NULL}, | ||
302 | {FNAME("videoBadMBsCap") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
303 | }; | ||
304 | |||
305 | static field_t _H263VideoCapability[] = { /* SEQUENCE */ | ||
306 | {FNAME("sqcifMPI") INT, 5, 1, 0, SKIP | OPT, 0, NULL}, | ||
307 | {FNAME("qcifMPI") INT, 5, 1, 0, SKIP | OPT, 0, NULL}, | ||
308 | {FNAME("cifMPI") INT, 5, 1, 0, SKIP | OPT, 0, NULL}, | ||
309 | {FNAME("cif4MPI") INT, 5, 1, 0, SKIP | OPT, 0, NULL}, | ||
310 | {FNAME("cif16MPI") INT, 5, 1, 0, SKIP | OPT, 0, NULL}, | ||
311 | {FNAME("maxBitRate") INT, CONS, 1, 0, SKIP, 0, NULL}, | ||
312 | {FNAME("unrestrictedVector") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
313 | {FNAME("arithmeticCoding") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
314 | {FNAME("advancedPrediction") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
315 | {FNAME("pbFrames") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
316 | {FNAME("temporalSpatialTradeOffCapability") BOOL, FIXD, 0, 0, SKIP, 0, | ||
317 | NULL}, | ||
318 | {FNAME("hrd-B") INT, CONS, 0, 0, SKIP | OPT, 0, NULL}, | ||
319 | {FNAME("bppMaxKb") INT, WORD, 0, 0, SKIP | OPT, 0, NULL}, | ||
320 | {FNAME("slowSqcifMPI") INT, WORD, 1, 0, SKIP | OPT, 0, NULL}, | ||
321 | {FNAME("slowQcifMPI") INT, WORD, 1, 0, SKIP | OPT, 0, NULL}, | ||
322 | {FNAME("slowCifMPI") INT, WORD, 1, 0, SKIP | OPT, 0, NULL}, | ||
323 | {FNAME("slowCif4MPI") INT, WORD, 1, 0, SKIP | OPT, 0, NULL}, | ||
324 | {FNAME("slowCif16MPI") INT, WORD, 1, 0, SKIP | OPT, 0, NULL}, | ||
325 | {FNAME("errorCompensation") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
326 | {FNAME("enhancementLayerInfo") SEQ, 3, 4, 4, SKIP | EXT | OPT, 0, | ||
327 | NULL}, | ||
328 | {FNAME("h263Options") SEQ, 5, 29, 31, SKIP | EXT | OPT, 0, NULL}, | ||
329 | }; | ||
330 | |||
331 | static field_t _IS11172VideoCapability[] = { /* SEQUENCE */ | ||
332 | {FNAME("constrainedBitstream") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
333 | {FNAME("videoBitRate") INT, CONS, 0, 0, SKIP | OPT, 0, NULL}, | ||
334 | {FNAME("vbvBufferSize") INT, CONS, 0, 0, SKIP | OPT, 0, NULL}, | ||
335 | {FNAME("samplesPerLine") INT, WORD, 0, 0, SKIP | OPT, 0, NULL}, | ||
336 | {FNAME("linesPerFrame") INT, WORD, 0, 0, SKIP | OPT, 0, NULL}, | ||
337 | {FNAME("pictureRate") INT, 4, 0, 0, SKIP | OPT, 0, NULL}, | ||
338 | {FNAME("luminanceSampleRate") INT, CONS, 0, 0, SKIP | OPT, 0, NULL}, | ||
339 | {FNAME("videoBadMBsCap") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
340 | }; | ||
341 | |||
342 | static field_t _VideoCapability[] = { /* CHOICE */ | ||
343 | {FNAME("nonStandard") SEQ, 0, 2, 2, SKIP, 0, | ||
344 | _H245_NonStandardParameter}, | ||
345 | {FNAME("h261VideoCapability") SEQ, 2, 5, 6, SKIP | EXT, 0, | ||
346 | _H261VideoCapability}, | ||
347 | {FNAME("h262VideoCapability") SEQ, 6, 17, 18, SKIP | EXT, 0, | ||
348 | _H262VideoCapability}, | ||
349 | {FNAME("h263VideoCapability") SEQ, 7, 13, 21, SKIP | EXT, 0, | ||
350 | _H263VideoCapability}, | ||
351 | {FNAME("is11172VideoCapability") SEQ, 6, 7, 8, SKIP | EXT, 0, | ||
352 | _IS11172VideoCapability}, | ||
353 | {FNAME("genericVideoCapability") SEQ, 5, 6, 6, SKIP | EXT, 0, NULL}, | ||
354 | }; | ||
355 | |||
356 | static field_t _AudioCapability_g7231[] = { /* SEQUENCE */ | ||
357 | {FNAME("maxAl-sduAudioFrames") INT, BYTE, 1, 0, SKIP, 0, NULL}, | ||
358 | {FNAME("silenceSuppression") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
359 | }; | ||
360 | |||
361 | static field_t _IS11172AudioCapability[] = { /* SEQUENCE */ | ||
362 | {FNAME("audioLayer1") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
363 | {FNAME("audioLayer2") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
364 | {FNAME("audioLayer3") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
365 | {FNAME("audioSampling32k") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
366 | {FNAME("audioSampling44k1") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
367 | {FNAME("audioSampling48k") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
368 | {FNAME("singleChannel") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
369 | {FNAME("twoChannels") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
370 | {FNAME("bitRate") INT, WORD, 1, 0, SKIP, 0, NULL}, | ||
371 | }; | ||
372 | |||
373 | static field_t _IS13818AudioCapability[] = { /* SEQUENCE */ | ||
374 | {FNAME("audioLayer1") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
375 | {FNAME("audioLayer2") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
376 | {FNAME("audioLayer3") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
377 | {FNAME("audioSampling16k") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
378 | {FNAME("audioSampling22k05") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
379 | {FNAME("audioSampling24k") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
380 | {FNAME("audioSampling32k") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
381 | {FNAME("audioSampling44k1") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
382 | {FNAME("audioSampling48k") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
383 | {FNAME("singleChannel") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
384 | {FNAME("twoChannels") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
385 | {FNAME("threeChannels2-1") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
386 | {FNAME("threeChannels3-0") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
387 | {FNAME("fourChannels2-0-2-0") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
388 | {FNAME("fourChannels2-2") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
389 | {FNAME("fourChannels3-1") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
390 | {FNAME("fiveChannels3-0-2-0") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
391 | {FNAME("fiveChannels3-2") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
392 | {FNAME("lowFrequencyEnhancement") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
393 | {FNAME("multilingual") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
394 | {FNAME("bitRate") INT, WORD, 1, 0, SKIP, 0, NULL}, | ||
395 | }; | ||
396 | |||
397 | static field_t _AudioCapability[] = { /* CHOICE */ | ||
398 | {FNAME("nonStandard") SEQ, 0, 2, 2, SKIP, 0, | ||
399 | _H245_NonStandardParameter}, | ||
400 | {FNAME("g711Alaw64k") INT, BYTE, 1, 0, SKIP, 0, NULL}, | ||
401 | {FNAME("g711Alaw56k") INT, BYTE, 1, 0, SKIP, 0, NULL}, | ||
402 | {FNAME("g711Ulaw64k") INT, BYTE, 1, 0, SKIP, 0, NULL}, | ||
403 | {FNAME("g711Ulaw56k") INT, BYTE, 1, 0, SKIP, 0, NULL}, | ||
404 | {FNAME("g722-64k") INT, BYTE, 1, 0, SKIP, 0, NULL}, | ||
405 | {FNAME("g722-56k") INT, BYTE, 1, 0, SKIP, 0, NULL}, | ||
406 | {FNAME("g722-48k") INT, BYTE, 1, 0, SKIP, 0, NULL}, | ||
407 | {FNAME("g7231") SEQ, 0, 2, 2, SKIP, 0, _AudioCapability_g7231}, | ||
408 | {FNAME("g728") INT, BYTE, 1, 0, SKIP, 0, NULL}, | ||
409 | {FNAME("g729") INT, BYTE, 1, 0, SKIP, 0, NULL}, | ||
410 | {FNAME("g729AnnexA") INT, BYTE, 1, 0, SKIP, 0, NULL}, | ||
411 | {FNAME("is11172AudioCapability") SEQ, 0, 9, 9, SKIP | EXT, 0, | ||
412 | _IS11172AudioCapability}, | ||
413 | {FNAME("is13818AudioCapability") SEQ, 0, 21, 21, SKIP | EXT, 0, | ||
414 | _IS13818AudioCapability}, | ||
415 | {FNAME("g729wAnnexB") INT, BYTE, 1, 0, SKIP, 0, NULL}, | ||
416 | {FNAME("g729AnnexAwAnnexB") INT, BYTE, 1, 0, SKIP, 0, NULL}, | ||
417 | {FNAME("g7231AnnexCCapability") SEQ, 1, 3, 3, SKIP | EXT, 0, NULL}, | ||
418 | {FNAME("gsmFullRate") SEQ, 0, 3, 3, SKIP | EXT, 0, NULL}, | ||
419 | {FNAME("gsmHalfRate") SEQ, 0, 3, 3, SKIP | EXT, 0, NULL}, | ||
420 | {FNAME("gsmEnhancedFullRate") SEQ, 0, 3, 3, SKIP | EXT, 0, NULL}, | ||
421 | {FNAME("genericAudioCapability") SEQ, 5, 6, 6, SKIP | EXT, 0, NULL}, | ||
422 | {FNAME("g729Extensions") SEQ, 1, 8, 8, SKIP | EXT, 0, NULL}, | ||
423 | }; | ||
424 | |||
425 | static field_t _DataProtocolCapability[] = { /* CHOICE */ | ||
426 | {FNAME("nonStandard") SEQ, 0, 2, 2, SKIP, 0, | ||
427 | _H245_NonStandardParameter}, | ||
428 | {FNAME("v14buffered") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
429 | {FNAME("v42lapm") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
430 | {FNAME("hdlcFrameTunnelling") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
431 | {FNAME("h310SeparateVCStack") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
432 | {FNAME("h310SingleVCStack") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
433 | {FNAME("transparent") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
434 | {FNAME("segmentationAndReassembly") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
435 | {FNAME("hdlcFrameTunnelingwSAR") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
436 | {FNAME("v120") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
437 | {FNAME("separateLANStack") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
438 | {FNAME("v76wCompression") CHOICE, 2, 3, 3, SKIP | EXT, 0, NULL}, | ||
439 | {FNAME("tcp") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
440 | {FNAME("udp") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
441 | }; | ||
442 | |||
443 | static field_t _T84Profile_t84Restricted[] = { /* SEQUENCE */ | ||
444 | {FNAME("qcif") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
445 | {FNAME("cif") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
446 | {FNAME("ccir601Seq") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
447 | {FNAME("ccir601Prog") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
448 | {FNAME("hdtvSeq") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
449 | {FNAME("hdtvProg") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
450 | {FNAME("g3FacsMH200x100") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
451 | {FNAME("g3FacsMH200x200") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
452 | {FNAME("g4FacsMMR200x100") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
453 | {FNAME("g4FacsMMR200x200") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
454 | {FNAME("jbig200x200Seq") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
455 | {FNAME("jbig200x200Prog") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
456 | {FNAME("jbig300x300Seq") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
457 | {FNAME("jbig300x300Prog") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
458 | {FNAME("digPhotoLow") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
459 | {FNAME("digPhotoMedSeq") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
460 | {FNAME("digPhotoMedProg") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
461 | {FNAME("digPhotoHighSeq") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
462 | {FNAME("digPhotoHighProg") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
463 | }; | ||
464 | |||
465 | static field_t _T84Profile[] = { /* CHOICE */ | ||
466 | {FNAME("t84Unrestricted") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
467 | {FNAME("t84Restricted") SEQ, 0, 19, 19, SKIP | EXT, 0, | ||
468 | _T84Profile_t84Restricted}, | ||
469 | }; | ||
470 | |||
471 | static field_t _DataApplicationCapability_application_t84[] = { /* SEQUENCE */ | ||
472 | {FNAME("t84Protocol") CHOICE, 3, 7, 14, SKIP | EXT, 0, | ||
473 | _DataProtocolCapability}, | ||
474 | {FNAME("t84Profile") CHOICE, 1, 2, 2, SKIP, 0, _T84Profile}, | ||
475 | }; | ||
476 | |||
477 | static field_t _DataApplicationCapability_application_nlpid[] = { /* SEQUENCE */ | ||
478 | {FNAME("nlpidProtocol") CHOICE, 3, 7, 14, SKIP | EXT, 0, | ||
479 | _DataProtocolCapability}, | ||
480 | {FNAME("nlpidData") OCTSTR, SEMI, 0, 0, SKIP, 0, NULL}, | ||
481 | }; | ||
482 | |||
483 | static field_t _DataApplicationCapability_application[] = { /* CHOICE */ | ||
484 | {FNAME("nonStandard") SEQ, 0, 2, 2, SKIP, 0, | ||
485 | _H245_NonStandardParameter}, | ||
486 | {FNAME("t120") CHOICE, 3, 7, 14, DECODE | EXT, | ||
487 | offsetof(DataApplicationCapability_application, t120), | ||
488 | _DataProtocolCapability}, | ||
489 | {FNAME("dsm-cc") CHOICE, 3, 7, 14, SKIP | EXT, 0, | ||
490 | _DataProtocolCapability}, | ||
491 | {FNAME("userData") CHOICE, 3, 7, 14, SKIP | EXT, 0, | ||
492 | _DataProtocolCapability}, | ||
493 | {FNAME("t84") SEQ, 0, 2, 2, SKIP, 0, | ||
494 | _DataApplicationCapability_application_t84}, | ||
495 | {FNAME("t434") CHOICE, 3, 7, 14, SKIP | EXT, 0, | ||
496 | _DataProtocolCapability}, | ||
497 | {FNAME("h224") CHOICE, 3, 7, 14, SKIP | EXT, 0, | ||
498 | _DataProtocolCapability}, | ||
499 | {FNAME("nlpid") SEQ, 0, 2, 2, SKIP, 0, | ||
500 | _DataApplicationCapability_application_nlpid}, | ||
501 | {FNAME("dsvdControl") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
502 | {FNAME("h222DataPartitioning") CHOICE, 3, 7, 14, SKIP | EXT, 0, | ||
503 | _DataProtocolCapability}, | ||
504 | {FNAME("t30fax") CHOICE, 3, 7, 14, SKIP | EXT, 0, NULL}, | ||
505 | {FNAME("t140") CHOICE, 3, 7, 14, SKIP | EXT, 0, NULL}, | ||
506 | {FNAME("t38fax") SEQ, 0, 2, 2, SKIP, 0, NULL}, | ||
507 | {FNAME("genericDataCapability") SEQ, 5, 6, 6, SKIP | EXT, 0, NULL}, | ||
508 | }; | ||
509 | |||
510 | static field_t _DataApplicationCapability[] = { /* SEQUENCE */ | ||
511 | {FNAME("application") CHOICE, 4, 10, 14, DECODE | EXT, | ||
512 | offsetof(DataApplicationCapability, application), | ||
513 | _DataApplicationCapability_application}, | ||
514 | {FNAME("maxBitRate") INT, CONS, 0, 0, SKIP, 0, NULL}, | ||
515 | }; | ||
516 | |||
517 | static field_t _EncryptionMode[] = { /* CHOICE */ | ||
518 | {FNAME("nonStandard") SEQ, 0, 2, 2, SKIP, 0, | ||
519 | _H245_NonStandardParameter}, | ||
520 | {FNAME("h233Encryption") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
521 | }; | ||
522 | |||
523 | static field_t _DataType[] = { /* CHOICE */ | ||
524 | {FNAME("nonStandard") SEQ, 0, 2, 2, SKIP, 0, | ||
525 | _H245_NonStandardParameter}, | ||
526 | {FNAME("nullData") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
527 | {FNAME("videoData") CHOICE, 3, 5, 6, SKIP | EXT, 0, _VideoCapability}, | ||
528 | {FNAME("audioData") CHOICE, 4, 14, 22, SKIP | EXT, 0, | ||
529 | _AudioCapability}, | ||
530 | {FNAME("data") SEQ, 0, 2, 2, DECODE | EXT, offsetof(DataType, data), | ||
531 | _DataApplicationCapability}, | ||
532 | {FNAME("encryptionData") CHOICE, 1, 2, 2, SKIP | EXT, 0, | ||
533 | _EncryptionMode}, | ||
534 | {FNAME("h235Control") SEQ, 0, 2, 2, SKIP, 0, NULL}, | ||
535 | {FNAME("h235Media") SEQ, 0, 2, 2, SKIP | EXT, 0, NULL}, | ||
536 | {FNAME("multiplexedStream") SEQ, 0, 2, 2, SKIP | EXT, 0, NULL}, | ||
537 | }; | ||
538 | |||
539 | static field_t _H222LogicalChannelParameters[] = { /* SEQUENCE */ | ||
540 | {FNAME("resourceID") INT, WORD, 0, 0, SKIP, 0, NULL}, | ||
541 | {FNAME("subChannelID") INT, WORD, 0, 0, SKIP, 0, NULL}, | ||
542 | {FNAME("pcr-pid") INT, WORD, 0, 0, SKIP | OPT, 0, NULL}, | ||
543 | {FNAME("programDescriptors") OCTSTR, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
544 | {FNAME("streamDescriptors") OCTSTR, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
545 | }; | ||
546 | |||
547 | static field_t _H223LogicalChannelParameters_adaptationLayerType_al3[] = { /* SEQUENCE */ | ||
548 | {FNAME("controlFieldOctets") INT, 2, 0, 0, SKIP, 0, NULL}, | ||
549 | {FNAME("sendBufferSize") INT, CONS, 0, 0, SKIP, 0, NULL}, | ||
550 | }; | ||
551 | |||
552 | static field_t _H223LogicalChannelParameters_adaptationLayerType[] = { /* CHOICE */ | ||
553 | {FNAME("nonStandard") SEQ, 0, 2, 2, SKIP, 0, | ||
554 | _H245_NonStandardParameter}, | ||
555 | {FNAME("al1Framed") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
556 | {FNAME("al1NotFramed") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
557 | {FNAME("al2WithoutSequenceNumbers") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
558 | {FNAME("al2WithSequenceNumbers") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
559 | {FNAME("al3") SEQ, 0, 2, 2, SKIP, 0, | ||
560 | _H223LogicalChannelParameters_adaptationLayerType_al3}, | ||
561 | {FNAME("al1M") SEQ, 0, 7, 8, SKIP | EXT, 0, NULL}, | ||
562 | {FNAME("al2M") SEQ, 0, 2, 2, SKIP | EXT, 0, NULL}, | ||
563 | {FNAME("al3M") SEQ, 0, 5, 6, SKIP | EXT, 0, NULL}, | ||
564 | }; | ||
565 | |||
566 | static field_t _H223LogicalChannelParameters[] = { /* SEQUENCE */ | ||
567 | {FNAME("adaptationLayerType") CHOICE, 3, 6, 9, SKIP | EXT, 0, | ||
568 | _H223LogicalChannelParameters_adaptationLayerType}, | ||
569 | {FNAME("segmentableFlag") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
570 | }; | ||
571 | |||
572 | static field_t _CRCLength[] = { /* CHOICE */ | ||
573 | {FNAME("crc8bit") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
574 | {FNAME("crc16bit") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
575 | {FNAME("crc32bit") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
576 | }; | ||
577 | |||
578 | static field_t _V76HDLCParameters[] = { /* SEQUENCE */ | ||
579 | {FNAME("crcLength") CHOICE, 2, 3, 3, SKIP | EXT, 0, _CRCLength}, | ||
580 | {FNAME("n401") INT, WORD, 1, 0, SKIP, 0, NULL}, | ||
581 | {FNAME("loopbackTestProcedure") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
582 | }; | ||
583 | |||
584 | static field_t _V76LogicalChannelParameters_suspendResume[] = { /* CHOICE */ | ||
585 | {FNAME("noSuspendResume") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
586 | {FNAME("suspendResumewAddress") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
587 | {FNAME("suspendResumewoAddress") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
588 | }; | ||
589 | |||
590 | static field_t _V76LogicalChannelParameters_mode_eRM_recovery[] = { /* CHOICE */ | ||
591 | {FNAME("rej") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
592 | {FNAME("sREJ") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
593 | {FNAME("mSREJ") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
594 | }; | ||
595 | |||
596 | static field_t _V76LogicalChannelParameters_mode_eRM[] = { /* SEQUENCE */ | ||
597 | {FNAME("windowSize") INT, 7, 1, 0, SKIP, 0, NULL}, | ||
598 | {FNAME("recovery") CHOICE, 2, 3, 3, SKIP | EXT, 0, | ||
599 | _V76LogicalChannelParameters_mode_eRM_recovery}, | ||
600 | }; | ||
601 | |||
602 | static field_t _V76LogicalChannelParameters_mode[] = { /* CHOICE */ | ||
603 | {FNAME("eRM") SEQ, 0, 2, 2, SKIP | EXT, 0, | ||
604 | _V76LogicalChannelParameters_mode_eRM}, | ||
605 | {FNAME("uNERM") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
606 | }; | ||
607 | |||
608 | static field_t _V75Parameters[] = { /* SEQUENCE */ | ||
609 | {FNAME("audioHeaderPresent") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
610 | }; | ||
611 | |||
612 | static field_t _V76LogicalChannelParameters[] = { /* SEQUENCE */ | ||
613 | {FNAME("hdlcParameters") SEQ, 0, 3, 3, SKIP | EXT, 0, | ||
614 | _V76HDLCParameters}, | ||
615 | {FNAME("suspendResume") CHOICE, 2, 3, 3, SKIP | EXT, 0, | ||
616 | _V76LogicalChannelParameters_suspendResume}, | ||
617 | {FNAME("uIH") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
618 | {FNAME("mode") CHOICE, 1, 2, 2, SKIP | EXT, 0, | ||
619 | _V76LogicalChannelParameters_mode}, | ||
620 | {FNAME("v75Parameters") SEQ, 0, 1, 1, SKIP | EXT, 0, _V75Parameters}, | ||
621 | }; | ||
622 | |||
623 | static field_t _H2250LogicalChannelParameters_nonStandard[] = { /* SEQUENCE OF */ | ||
624 | {FNAME("item") SEQ, 0, 2, 2, SKIP, 0, _H245_NonStandardParameter}, | ||
625 | }; | ||
626 | |||
627 | static field_t _UnicastAddress_iPAddress[] = { /* SEQUENCE */ | ||
628 | {FNAME("network") OCTSTR, FIXD, 4, 0, DECODE, | ||
629 | offsetof(UnicastAddress_iPAddress, network), NULL}, | ||
630 | {FNAME("tsapIdentifier") INT, WORD, 0, 0, SKIP, 0, NULL}, | ||
631 | }; | ||
632 | |||
633 | static field_t _UnicastAddress_iPXAddress[] = { /* SEQUENCE */ | ||
634 | {FNAME("node") OCTSTR, FIXD, 6, 0, SKIP, 0, NULL}, | ||
635 | {FNAME("netnum") OCTSTR, FIXD, 4, 0, SKIP, 0, NULL}, | ||
636 | {FNAME("tsapIdentifier") OCTSTR, FIXD, 2, 0, SKIP, 0, NULL}, | ||
637 | }; | ||
638 | |||
639 | static field_t _UnicastAddress_iP6Address[] = { /* SEQUENCE */ | ||
640 | {FNAME("network") OCTSTR, FIXD, 16, 0, SKIP, 0, NULL}, | ||
641 | {FNAME("tsapIdentifier") INT, WORD, 0, 0, SKIP, 0, NULL}, | ||
642 | }; | ||
643 | |||
644 | static field_t _UnicastAddress_iPSourceRouteAddress_routing[] = { /* CHOICE */ | ||
645 | {FNAME("strict") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
646 | {FNAME("loose") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
647 | }; | ||
648 | |||
649 | static field_t _UnicastAddress_iPSourceRouteAddress_route[] = { /* SEQUENCE OF */ | ||
650 | {FNAME("item") OCTSTR, FIXD, 4, 0, SKIP, 0, NULL}, | ||
651 | }; | ||
652 | |||
653 | static field_t _UnicastAddress_iPSourceRouteAddress[] = { /* SEQUENCE */ | ||
654 | {FNAME("routing") CHOICE, 1, 2, 2, SKIP, 0, | ||
655 | _UnicastAddress_iPSourceRouteAddress_routing}, | ||
656 | {FNAME("network") OCTSTR, FIXD, 4, 0, SKIP, 0, NULL}, | ||
657 | {FNAME("tsapIdentifier") INT, WORD, 0, 0, SKIP, 0, NULL}, | ||
658 | {FNAME("route") SEQOF, SEMI, 0, 0, SKIP, 0, | ||
659 | _UnicastAddress_iPSourceRouteAddress_route}, | ||
660 | }; | ||
661 | |||
662 | static field_t _UnicastAddress[] = { /* CHOICE */ | ||
663 | {FNAME("iPAddress") SEQ, 0, 2, 2, DECODE | EXT, | ||
664 | offsetof(UnicastAddress, iPAddress), _UnicastAddress_iPAddress}, | ||
665 | {FNAME("iPXAddress") SEQ, 0, 3, 3, SKIP | EXT, 0, | ||
666 | _UnicastAddress_iPXAddress}, | ||
667 | {FNAME("iP6Address") SEQ, 0, 2, 2, SKIP | EXT, 0, | ||
668 | _UnicastAddress_iP6Address}, | ||
669 | {FNAME("netBios") OCTSTR, FIXD, 16, 0, SKIP, 0, NULL}, | ||
670 | {FNAME("iPSourceRouteAddress") SEQ, 0, 4, 4, SKIP | EXT, 0, | ||
671 | _UnicastAddress_iPSourceRouteAddress}, | ||
672 | {FNAME("nsap") OCTSTR, 5, 1, 0, SKIP, 0, NULL}, | ||
673 | {FNAME("nonStandardAddress") SEQ, 0, 2, 2, SKIP, 0, NULL}, | ||
674 | }; | ||
675 | |||
676 | static field_t _MulticastAddress_iPAddress[] = { /* SEQUENCE */ | ||
677 | {FNAME("network") OCTSTR, FIXD, 4, 0, SKIP, 0, NULL}, | ||
678 | {FNAME("tsapIdentifier") INT, WORD, 0, 0, SKIP, 0, NULL}, | ||
679 | }; | ||
680 | |||
681 | static field_t _MulticastAddress_iP6Address[] = { /* SEQUENCE */ | ||
682 | {FNAME("network") OCTSTR, FIXD, 16, 0, SKIP, 0, NULL}, | ||
683 | {FNAME("tsapIdentifier") INT, WORD, 0, 0, SKIP, 0, NULL}, | ||
684 | }; | ||
685 | |||
686 | static field_t _MulticastAddress[] = { /* CHOICE */ | ||
687 | {FNAME("iPAddress") SEQ, 0, 2, 2, SKIP | EXT, 0, | ||
688 | _MulticastAddress_iPAddress}, | ||
689 | {FNAME("iP6Address") SEQ, 0, 2, 2, SKIP | EXT, 0, | ||
690 | _MulticastAddress_iP6Address}, | ||
691 | {FNAME("nsap") OCTSTR, 5, 1, 0, SKIP, 0, NULL}, | ||
692 | {FNAME("nonStandardAddress") SEQ, 0, 2, 2, SKIP, 0, NULL}, | ||
693 | }; | ||
694 | |||
695 | static field_t _H245_TransportAddress[] = { /* CHOICE */ | ||
696 | {FNAME("unicastAddress") CHOICE, 3, 5, 7, DECODE | EXT, | ||
697 | offsetof(H245_TransportAddress, unicastAddress), _UnicastAddress}, | ||
698 | {FNAME("multicastAddress") CHOICE, 1, 2, 4, SKIP | EXT, 0, | ||
699 | _MulticastAddress}, | ||
700 | }; | ||
701 | |||
702 | static field_t _H2250LogicalChannelParameters[] = { /* SEQUENCE */ | ||
703 | {FNAME("nonStandard") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, | ||
704 | _H2250LogicalChannelParameters_nonStandard}, | ||
705 | {FNAME("sessionID") INT, BYTE, 0, 0, SKIP, 0, NULL}, | ||
706 | {FNAME("associatedSessionID") INT, 8, 1, 0, SKIP | OPT, 0, NULL}, | ||
707 | {FNAME("mediaChannel") CHOICE, 1, 2, 2, DECODE | EXT | OPT, | ||
708 | offsetof(H2250LogicalChannelParameters, mediaChannel), | ||
709 | _H245_TransportAddress}, | ||
710 | {FNAME("mediaGuaranteedDelivery") BOOL, FIXD, 0, 0, SKIP | OPT, 0, | ||
711 | NULL}, | ||
712 | {FNAME("mediaControlChannel") CHOICE, 1, 2, 2, DECODE | EXT | OPT, | ||
713 | offsetof(H2250LogicalChannelParameters, mediaControlChannel), | ||
714 | _H245_TransportAddress}, | ||
715 | {FNAME("mediaControlGuaranteedDelivery") BOOL, FIXD, 0, 0, STOP | OPT, | ||
716 | 0, NULL}, | ||
717 | {FNAME("silenceSuppression") BOOL, FIXD, 0, 0, STOP | OPT, 0, NULL}, | ||
718 | {FNAME("destination") SEQ, 0, 2, 2, STOP | EXT | OPT, 0, NULL}, | ||
719 | {FNAME("dynamicRTPPayloadType") INT, 5, 96, 0, STOP | OPT, 0, NULL}, | ||
720 | {FNAME("mediaPacketization") CHOICE, 0, 1, 2, STOP | EXT | OPT, 0, | ||
721 | NULL}, | ||
722 | {FNAME("transportCapability") SEQ, 3, 3, 3, STOP | EXT | OPT, 0, | ||
723 | NULL}, | ||
724 | {FNAME("redundancyEncoding") SEQ, 1, 2, 2, STOP | EXT | OPT, 0, NULL}, | ||
725 | {FNAME("source") SEQ, 0, 2, 2, SKIP | EXT | OPT, 0, NULL}, | ||
726 | }; | ||
727 | |||
728 | static field_t _OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters[] = { /* CHOICE */ | ||
729 | {FNAME("h222LogicalChannelParameters") SEQ, 3, 5, 5, SKIP | EXT, 0, | ||
730 | _H222LogicalChannelParameters}, | ||
731 | {FNAME("h223LogicalChannelParameters") SEQ, 0, 2, 2, SKIP | EXT, 0, | ||
732 | _H223LogicalChannelParameters}, | ||
733 | {FNAME("v76LogicalChannelParameters") SEQ, 0, 5, 5, SKIP | EXT, 0, | ||
734 | _V76LogicalChannelParameters}, | ||
735 | {FNAME("h2250LogicalChannelParameters") SEQ, 10, 11, 14, DECODE | EXT, | ||
736 | offsetof | ||
737 | (OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters, | ||
738 | h2250LogicalChannelParameters), _H2250LogicalChannelParameters}, | ||
739 | {FNAME("none") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
740 | }; | ||
741 | |||
742 | static field_t _OpenLogicalChannel_forwardLogicalChannelParameters[] = { /* SEQUENCE */ | ||
743 | {FNAME("portNumber") INT, WORD, 0, 0, SKIP | OPT, 0, NULL}, | ||
744 | {FNAME("dataType") CHOICE, 3, 6, 9, DECODE | EXT, | ||
745 | offsetof(OpenLogicalChannel_forwardLogicalChannelParameters, | ||
746 | dataType), _DataType}, | ||
747 | {FNAME("multiplexParameters") CHOICE, 2, 3, 5, DECODE | EXT, | ||
748 | offsetof(OpenLogicalChannel_forwardLogicalChannelParameters, | ||
749 | multiplexParameters), | ||
750 | _OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters}, | ||
751 | {FNAME("forwardLogicalChannelDependency") INT, WORD, 1, 0, SKIP | OPT, | ||
752 | 0, NULL}, | ||
753 | {FNAME("replacementFor") INT, WORD, 1, 0, SKIP | OPT, 0, NULL}, | ||
754 | }; | ||
755 | |||
756 | static field_t _OpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters[] = { /* CHOICE */ | ||
757 | {FNAME("h223LogicalChannelParameters") SEQ, 0, 2, 2, SKIP | EXT, 0, | ||
758 | _H223LogicalChannelParameters}, | ||
759 | {FNAME("v76LogicalChannelParameters") SEQ, 0, 5, 5, SKIP | EXT, 0, | ||
760 | _V76LogicalChannelParameters}, | ||
761 | {FNAME("h2250LogicalChannelParameters") SEQ, 10, 11, 14, DECODE | EXT, | ||
762 | offsetof | ||
763 | (OpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters, | ||
764 | h2250LogicalChannelParameters), _H2250LogicalChannelParameters}, | ||
765 | }; | ||
766 | |||
767 | static field_t _OpenLogicalChannel_reverseLogicalChannelParameters[] = { /* SEQUENCE */ | ||
768 | {FNAME("dataType") CHOICE, 3, 6, 9, SKIP | EXT, 0, _DataType}, | ||
769 | {FNAME("multiplexParameters") CHOICE, 1, 2, 3, DECODE | EXT | OPT, | ||
770 | offsetof(OpenLogicalChannel_reverseLogicalChannelParameters, | ||
771 | multiplexParameters), | ||
772 | _OpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters}, | ||
773 | {FNAME("reverseLogicalChannelDependency") INT, WORD, 1, 0, SKIP | OPT, | ||
774 | 0, NULL}, | ||
775 | {FNAME("replacementFor") INT, WORD, 1, 0, SKIP | OPT, 0, NULL}, | ||
776 | }; | ||
777 | |||
778 | static field_t _NetworkAccessParameters_distribution[] = { /* CHOICE */ | ||
779 | {FNAME("unicast") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
780 | {FNAME("multicast") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
781 | }; | ||
782 | |||
783 | static field_t _Q2931Address_address[] = { /* CHOICE */ | ||
784 | {FNAME("internationalNumber") NUMSTR, 4, 1, 0, SKIP, 0, NULL}, | ||
785 | {FNAME("nsapAddress") OCTSTR, 5, 1, 0, SKIP, 0, NULL}, | ||
786 | }; | ||
787 | |||
788 | static field_t _Q2931Address[] = { /* SEQUENCE */ | ||
789 | {FNAME("address") CHOICE, 1, 2, 2, SKIP | EXT, 0, | ||
790 | _Q2931Address_address}, | ||
791 | {FNAME("subaddress") OCTSTR, 5, 1, 0, SKIP | OPT, 0, NULL}, | ||
792 | }; | ||
793 | |||
794 | static field_t _NetworkAccessParameters_networkAddress[] = { /* CHOICE */ | ||
795 | {FNAME("q2931Address") SEQ, 1, 2, 2, SKIP | EXT, 0, _Q2931Address}, | ||
796 | {FNAME("e164Address") NUMDGT, 7, 1, 0, SKIP, 0, NULL}, | ||
797 | {FNAME("localAreaAddress") CHOICE, 1, 2, 2, DECODE | EXT, | ||
798 | offsetof(NetworkAccessParameters_networkAddress, localAreaAddress), | ||
799 | _H245_TransportAddress}, | ||
800 | }; | ||
801 | |||
802 | static field_t _NetworkAccessParameters[] = { /* SEQUENCE */ | ||
803 | {FNAME("distribution") CHOICE, 1, 2, 2, SKIP | EXT | OPT, 0, | ||
804 | _NetworkAccessParameters_distribution}, | ||
805 | {FNAME("networkAddress") CHOICE, 2, 3, 3, DECODE | EXT, | ||
806 | offsetof(NetworkAccessParameters, networkAddress), | ||
807 | _NetworkAccessParameters_networkAddress}, | ||
808 | {FNAME("associateConference") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
809 | {FNAME("externalReference") OCTSTR, 8, 1, 0, SKIP | OPT, 0, NULL}, | ||
810 | {FNAME("t120SetupProcedure") CHOICE, 2, 3, 3, SKIP | EXT | OPT, 0, | ||
811 | NULL}, | ||
812 | }; | ||
813 | |||
814 | static field_t _OpenLogicalChannel[] = { /* SEQUENCE */ | ||
815 | {FNAME("forwardLogicalChannelNumber") INT, WORD, 1, 0, SKIP, 0, NULL}, | ||
816 | {FNAME("forwardLogicalChannelParameters") SEQ, 1, 3, 5, DECODE | EXT, | ||
817 | offsetof(OpenLogicalChannel, forwardLogicalChannelParameters), | ||
818 | _OpenLogicalChannel_forwardLogicalChannelParameters}, | ||
819 | {FNAME("reverseLogicalChannelParameters") SEQ, 1, 2, 4, | ||
820 | DECODE | EXT | OPT, offsetof(OpenLogicalChannel, | ||
821 | reverseLogicalChannelParameters), | ||
822 | _OpenLogicalChannel_reverseLogicalChannelParameters}, | ||
823 | {FNAME("separateStack") SEQ, 2, 4, 5, DECODE | EXT | OPT, | ||
824 | offsetof(OpenLogicalChannel, separateStack), | ||
825 | _NetworkAccessParameters}, | ||
826 | {FNAME("encryptionSync") SEQ, 2, 4, 4, STOP | EXT | OPT, 0, NULL}, | ||
827 | }; | ||
828 | |||
829 | static field_t _Setup_UUIE_fastStart[] = { /* SEQUENCE OF */ | ||
830 | {FNAME("item") SEQ, 1, 3, 5, DECODE | OPEN | EXT, | ||
831 | sizeof(OpenLogicalChannel), _OpenLogicalChannel} | ||
832 | , | ||
833 | }; | ||
834 | |||
835 | static field_t _Setup_UUIE[] = { /* SEQUENCE */ | ||
836 | {FNAME("protocolIdentifier") OID, BYTE, 0, 0, SKIP, 0, NULL}, | ||
837 | {FNAME("h245Address") CHOICE, 3, 7, 7, DECODE | EXT | OPT, | ||
838 | offsetof(Setup_UUIE, h245Address), _TransportAddress}, | ||
839 | {FNAME("sourceAddress") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, | ||
840 | _Setup_UUIE_sourceAddress}, | ||
841 | {FNAME("sourceInfo") SEQ, 6, 8, 10, SKIP | EXT, 0, _EndpointType}, | ||
842 | {FNAME("destinationAddress") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, | ||
843 | _Setup_UUIE_destinationAddress}, | ||
844 | {FNAME("destCallSignalAddress") CHOICE, 3, 7, 7, DECODE | EXT | OPT, | ||
845 | offsetof(Setup_UUIE, destCallSignalAddress), _TransportAddress}, | ||
846 | {FNAME("destExtraCallInfo") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, | ||
847 | _Setup_UUIE_destExtraCallInfo}, | ||
848 | {FNAME("destExtraCRV") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, | ||
849 | _Setup_UUIE_destExtraCRV}, | ||
850 | {FNAME("activeMC") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
851 | {FNAME("conferenceID") OCTSTR, FIXD, 16, 0, SKIP, 0, NULL}, | ||
852 | {FNAME("conferenceGoal") CHOICE, 2, 3, 5, SKIP | EXT, 0, | ||
853 | _Setup_UUIE_conferenceGoal}, | ||
854 | {FNAME("callServices") SEQ, 0, 8, 8, SKIP | EXT | OPT, 0, | ||
855 | _QseriesOptions}, | ||
856 | {FNAME("callType") CHOICE, 2, 4, 4, SKIP | EXT, 0, _CallType}, | ||
857 | {FNAME("sourceCallSignalAddress") CHOICE, 3, 7, 7, DECODE | EXT | OPT, | ||
858 | offsetof(Setup_UUIE, sourceCallSignalAddress), _TransportAddress}, | ||
859 | {FNAME("remoteExtensionAddress") CHOICE, 1, 2, 7, SKIP | EXT | OPT, 0, | ||
860 | NULL}, | ||
861 | {FNAME("callIdentifier") SEQ, 0, 1, 1, SKIP | EXT, 0, NULL}, | ||
862 | {FNAME("h245SecurityCapability") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, | ||
863 | NULL}, | ||
864 | {FNAME("tokens") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
865 | {FNAME("cryptoTokens") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
866 | {FNAME("fastStart") SEQOF, SEMI, 0, 30, DECODE | OPT, | ||
867 | offsetof(Setup_UUIE, fastStart), _Setup_UUIE_fastStart}, | ||
868 | {FNAME("mediaWaitForConnect") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
869 | {FNAME("canOverlapSend") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
870 | {FNAME("endpointIdentifier") BMPSTR, 7, 1, 0, STOP | OPT, 0, NULL}, | ||
871 | {FNAME("multipleCalls") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
872 | {FNAME("maintainConnection") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
873 | {FNAME("connectionParameters") SEQ, 0, 3, 3, SKIP | EXT | OPT, 0, | ||
874 | NULL}, | ||
875 | {FNAME("language") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
876 | {FNAME("presentationIndicator") CHOICE, 2, 3, 3, SKIP | EXT | OPT, 0, | ||
877 | NULL}, | ||
878 | {FNAME("screeningIndicator") ENUM, 2, 0, 0, SKIP | EXT | OPT, 0, | ||
879 | NULL}, | ||
880 | {FNAME("serviceControl") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
881 | {FNAME("symmetricOperationRequired") NUL, FIXD, 0, 0, SKIP | OPT, 0, | ||
882 | NULL}, | ||
883 | {FNAME("capacity") SEQ, 2, 2, 2, SKIP | EXT | OPT, 0, NULL}, | ||
884 | {FNAME("circuitInfo") SEQ, 3, 3, 3, SKIP | EXT | OPT, 0, NULL}, | ||
885 | {FNAME("desiredProtocols") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
886 | {FNAME("neededFeatures") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
887 | {FNAME("desiredFeatures") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
888 | {FNAME("supportedFeatures") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
889 | {FNAME("parallelH245Control") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
890 | {FNAME("additionalSourceAddresses") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, | ||
891 | NULL}, | ||
892 | }; | ||
893 | |||
894 | static field_t _CallProceeding_UUIE_fastStart[] = { /* SEQUENCE OF */ | ||
895 | {FNAME("item") SEQ, 1, 3, 5, DECODE | OPEN | EXT, | ||
896 | sizeof(OpenLogicalChannel), _OpenLogicalChannel} | ||
897 | , | ||
898 | }; | ||
899 | |||
900 | static field_t _CallProceeding_UUIE[] = { /* SEQUENCE */ | ||
901 | {FNAME("protocolIdentifier") OID, BYTE, 0, 0, SKIP, 0, NULL}, | ||
902 | {FNAME("destinationInfo") SEQ, 6, 8, 10, SKIP | EXT, 0, | ||
903 | _EndpointType}, | ||
904 | {FNAME("h245Address") CHOICE, 3, 7, 7, DECODE | EXT | OPT, | ||
905 | offsetof(CallProceeding_UUIE, h245Address), _TransportAddress}, | ||
906 | {FNAME("callIdentifier") SEQ, 0, 1, 1, SKIP | EXT, 0, NULL}, | ||
907 | {FNAME("h245SecurityMode") CHOICE, 2, 4, 4, SKIP | EXT | OPT, 0, | ||
908 | NULL}, | ||
909 | {FNAME("tokens") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
910 | {FNAME("cryptoTokens") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
911 | {FNAME("fastStart") SEQOF, SEMI, 0, 30, DECODE | OPT, | ||
912 | offsetof(CallProceeding_UUIE, fastStart), | ||
913 | _CallProceeding_UUIE_fastStart}, | ||
914 | {FNAME("multipleCalls") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
915 | {FNAME("maintainConnection") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
916 | {FNAME("fastConnectRefused") NUL, FIXD, 0, 0, SKIP | OPT, 0, NULL}, | ||
917 | {FNAME("featureSet") SEQ, 3, 4, 4, SKIP | EXT | OPT, 0, NULL}, | ||
918 | }; | ||
919 | |||
920 | static field_t _Connect_UUIE_fastStart[] = { /* SEQUENCE OF */ | ||
921 | {FNAME("item") SEQ, 1, 3, 5, DECODE | OPEN | EXT, | ||
922 | sizeof(OpenLogicalChannel), _OpenLogicalChannel} | ||
923 | , | ||
924 | }; | ||
925 | |||
926 | static field_t _Connect_UUIE[] = { /* SEQUENCE */ | ||
927 | {FNAME("protocolIdentifier") OID, BYTE, 0, 0, SKIP, 0, NULL}, | ||
928 | {FNAME("h245Address") CHOICE, 3, 7, 7, DECODE | EXT | OPT, | ||
929 | offsetof(Connect_UUIE, h245Address), _TransportAddress}, | ||
930 | {FNAME("destinationInfo") SEQ, 6, 8, 10, SKIP | EXT, 0, | ||
931 | _EndpointType}, | ||
932 | {FNAME("conferenceID") OCTSTR, FIXD, 16, 0, SKIP, 0, NULL}, | ||
933 | {FNAME("callIdentifier") SEQ, 0, 1, 1, SKIP | EXT, 0, NULL}, | ||
934 | {FNAME("h245SecurityMode") CHOICE, 2, 4, 4, SKIP | EXT | OPT, 0, | ||
935 | NULL}, | ||
936 | {FNAME("tokens") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
937 | {FNAME("cryptoTokens") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
938 | {FNAME("fastStart") SEQOF, SEMI, 0, 30, DECODE | OPT, | ||
939 | offsetof(Connect_UUIE, fastStart), _Connect_UUIE_fastStart}, | ||
940 | {FNAME("multipleCalls") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
941 | {FNAME("maintainConnection") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
942 | {FNAME("language") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
943 | {FNAME("connectedAddress") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
944 | {FNAME("presentationIndicator") CHOICE, 2, 3, 3, SKIP | EXT | OPT, 0, | ||
945 | NULL}, | ||
946 | {FNAME("screeningIndicator") ENUM, 2, 0, 0, SKIP | EXT | OPT, 0, | ||
947 | NULL}, | ||
948 | {FNAME("fastConnectRefused") NUL, FIXD, 0, 0, SKIP | OPT, 0, NULL}, | ||
949 | {FNAME("serviceControl") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
950 | {FNAME("capacity") SEQ, 2, 2, 2, SKIP | EXT | OPT, 0, NULL}, | ||
951 | {FNAME("featureSet") SEQ, 3, 4, 4, SKIP | EXT | OPT, 0, NULL}, | ||
952 | }; | ||
953 | |||
954 | static field_t _Alerting_UUIE_fastStart[] = { /* SEQUENCE OF */ | ||
955 | {FNAME("item") SEQ, 1, 3, 5, DECODE | OPEN | EXT, | ||
956 | sizeof(OpenLogicalChannel), _OpenLogicalChannel} | ||
957 | , | ||
958 | }; | ||
959 | |||
960 | static field_t _Alerting_UUIE[] = { /* SEQUENCE */ | ||
961 | {FNAME("protocolIdentifier") OID, BYTE, 0, 0, SKIP, 0, NULL}, | ||
962 | {FNAME("destinationInfo") SEQ, 6, 8, 10, SKIP | EXT, 0, | ||
963 | _EndpointType}, | ||
964 | {FNAME("h245Address") CHOICE, 3, 7, 7, DECODE | EXT | OPT, | ||
965 | offsetof(Alerting_UUIE, h245Address), _TransportAddress}, | ||
966 | {FNAME("callIdentifier") SEQ, 0, 1, 1, SKIP | EXT, 0, NULL}, | ||
967 | {FNAME("h245SecurityMode") CHOICE, 2, 4, 4, SKIP | EXT | OPT, 0, | ||
968 | NULL}, | ||
969 | {FNAME("tokens") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
970 | {FNAME("cryptoTokens") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
971 | {FNAME("fastStart") SEQOF, SEMI, 0, 30, DECODE | OPT, | ||
972 | offsetof(Alerting_UUIE, fastStart), _Alerting_UUIE_fastStart}, | ||
973 | {FNAME("multipleCalls") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
974 | {FNAME("maintainConnection") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
975 | {FNAME("alertingAddress") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
976 | {FNAME("presentationIndicator") CHOICE, 2, 3, 3, SKIP | EXT | OPT, 0, | ||
977 | NULL}, | ||
978 | {FNAME("screeningIndicator") ENUM, 2, 0, 0, SKIP | EXT | OPT, 0, | ||
979 | NULL}, | ||
980 | {FNAME("fastConnectRefused") NUL, FIXD, 0, 0, SKIP | OPT, 0, NULL}, | ||
981 | {FNAME("serviceControl") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
982 | {FNAME("capacity") SEQ, 2, 2, 2, SKIP | EXT | OPT, 0, NULL}, | ||
983 | {FNAME("featureSet") SEQ, 3, 4, 4, SKIP | EXT | OPT, 0, NULL}, | ||
984 | }; | ||
985 | |||
986 | static field_t _Information_UUIE_fastStart[] = { /* SEQUENCE OF */ | ||
987 | {FNAME("item") SEQ, 1, 3, 5, DECODE | OPEN | EXT, | ||
988 | sizeof(OpenLogicalChannel), _OpenLogicalChannel} | ||
989 | , | ||
990 | }; | ||
991 | |||
992 | static field_t _Information_UUIE[] = { /* SEQUENCE */ | ||
993 | {FNAME("protocolIdentifier") OID, BYTE, 0, 0, SKIP, 0, NULL}, | ||
994 | {FNAME("callIdentifier") SEQ, 0, 1, 1, SKIP | EXT, 0, NULL}, | ||
995 | {FNAME("tokens") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
996 | {FNAME("cryptoTokens") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
997 | {FNAME("fastStart") SEQOF, SEMI, 0, 30, DECODE | OPT, | ||
998 | offsetof(Information_UUIE, fastStart), _Information_UUIE_fastStart}, | ||
999 | {FNAME("fastConnectRefused") NUL, FIXD, 0, 0, SKIP | OPT, 0, NULL}, | ||
1000 | {FNAME("circuitInfo") SEQ, 3, 3, 3, SKIP | EXT | OPT, 0, NULL}, | ||
1001 | }; | ||
1002 | |||
1003 | static field_t _ReleaseCompleteReason[] = { /* CHOICE */ | ||
1004 | {FNAME("noBandwidth") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1005 | {FNAME("gatekeeperResources") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1006 | {FNAME("unreachableDestination") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1007 | {FNAME("destinationRejection") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1008 | {FNAME("invalidRevision") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1009 | {FNAME("noPermission") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1010 | {FNAME("unreachableGatekeeper") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1011 | {FNAME("gatewayResources") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1012 | {FNAME("badFormatAddress") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1013 | {FNAME("adaptiveBusy") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1014 | {FNAME("inConf") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1015 | {FNAME("undefinedReason") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1016 | {FNAME("facilityCallDeflection") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1017 | {FNAME("securityDenied") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1018 | {FNAME("calledPartyNotRegistered") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1019 | {FNAME("callerNotRegistered") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1020 | {FNAME("newConnectionNeeded") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1021 | {FNAME("nonStandardReason") SEQ, 0, 2, 2, SKIP, 0, NULL}, | ||
1022 | {FNAME("replaceWithConferenceInvite") OCTSTR, FIXD, 16, 0, SKIP, 0, | ||
1023 | NULL}, | ||
1024 | {FNAME("genericDataReason") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1025 | {FNAME("neededFeatureNotSupported") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1026 | {FNAME("tunnelledSignallingRejected") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1027 | }; | ||
1028 | |||
1029 | static field_t _ReleaseComplete_UUIE[] = { /* SEQUENCE */ | ||
1030 | {FNAME("protocolIdentifier") OID, BYTE, 0, 0, SKIP, 0, NULL}, | ||
1031 | {FNAME("reason") CHOICE, 4, 12, 22, SKIP | EXT | OPT, 0, | ||
1032 | _ReleaseCompleteReason}, | ||
1033 | {FNAME("callIdentifier") SEQ, 0, 1, 1, SKIP | EXT, 0, NULL}, | ||
1034 | {FNAME("tokens") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
1035 | {FNAME("cryptoTokens") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
1036 | {FNAME("busyAddress") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
1037 | {FNAME("presentationIndicator") CHOICE, 2, 3, 3, SKIP | EXT | OPT, 0, | ||
1038 | NULL}, | ||
1039 | {FNAME("screeningIndicator") ENUM, 2, 0, 0, SKIP | EXT | OPT, 0, | ||
1040 | NULL}, | ||
1041 | {FNAME("capacity") SEQ, 2, 2, 2, SKIP | EXT | OPT, 0, NULL}, | ||
1042 | {FNAME("serviceControl") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
1043 | {FNAME("featureSet") SEQ, 3, 4, 4, SKIP | EXT | OPT, 0, NULL}, | ||
1044 | }; | ||
1045 | |||
1046 | static field_t _Facility_UUIE_alternativeAliasAddress[] = { /* SEQUENCE OF */ | ||
1047 | {FNAME("item") CHOICE, 1, 2, 7, SKIP | EXT, 0, _AliasAddress}, | ||
1048 | }; | ||
1049 | |||
1050 | static field_t _FacilityReason[] = { /* CHOICE */ | ||
1051 | {FNAME("routeCallToGatekeeper") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1052 | {FNAME("callForwarded") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1053 | {FNAME("routeCallToMC") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1054 | {FNAME("undefinedReason") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1055 | {FNAME("conferenceListChoice") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1056 | {FNAME("startH245") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1057 | {FNAME("noH245") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1058 | {FNAME("newTokens") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1059 | {FNAME("featureSetUpdate") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1060 | {FNAME("forwardedElements") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1061 | {FNAME("transportedInformation") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1062 | }; | ||
1063 | |||
1064 | static field_t _Facility_UUIE_fastStart[] = { /* SEQUENCE OF */ | ||
1065 | {FNAME("item") SEQ, 1, 3, 5, DECODE | OPEN | EXT, | ||
1066 | sizeof(OpenLogicalChannel), _OpenLogicalChannel} | ||
1067 | , | ||
1068 | }; | ||
1069 | |||
1070 | static field_t _Facility_UUIE[] = { /* SEQUENCE */ | ||
1071 | {FNAME("protocolIdentifier") OID, BYTE, 0, 0, SKIP, 0, NULL}, | ||
1072 | {FNAME("alternativeAddress") CHOICE, 3, 7, 7, DECODE | EXT | OPT, | ||
1073 | offsetof(Facility_UUIE, alternativeAddress), _TransportAddress}, | ||
1074 | {FNAME("alternativeAliasAddress") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, | ||
1075 | _Facility_UUIE_alternativeAliasAddress}, | ||
1076 | {FNAME("conferenceID") OCTSTR, FIXD, 16, 0, SKIP | OPT, 0, NULL}, | ||
1077 | {FNAME("reason") CHOICE, 2, 4, 11, DECODE | EXT, | ||
1078 | offsetof(Facility_UUIE, reason), _FacilityReason}, | ||
1079 | {FNAME("callIdentifier") SEQ, 0, 1, 1, SKIP | EXT, 0, NULL}, | ||
1080 | {FNAME("destExtraCallInfo") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
1081 | {FNAME("remoteExtensionAddress") CHOICE, 1, 2, 7, SKIP | EXT | OPT, 0, | ||
1082 | NULL}, | ||
1083 | {FNAME("tokens") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
1084 | {FNAME("cryptoTokens") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
1085 | {FNAME("conferences") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
1086 | {FNAME("h245Address") CHOICE, 3, 7, 7, DECODE | EXT | OPT, | ||
1087 | offsetof(Facility_UUIE, h245Address), _TransportAddress}, | ||
1088 | {FNAME("fastStart") SEQOF, SEMI, 0, 30, DECODE | OPT, | ||
1089 | offsetof(Facility_UUIE, fastStart), _Facility_UUIE_fastStart}, | ||
1090 | {FNAME("multipleCalls") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1091 | {FNAME("maintainConnection") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1092 | {FNAME("fastConnectRefused") NUL, FIXD, 0, 0, SKIP | OPT, 0, NULL}, | ||
1093 | {FNAME("serviceControl") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
1094 | {FNAME("circuitInfo") SEQ, 3, 3, 3, SKIP | EXT | OPT, 0, NULL}, | ||
1095 | {FNAME("featureSet") SEQ, 3, 4, 4, SKIP | EXT | OPT, 0, NULL}, | ||
1096 | {FNAME("destinationInfo") SEQ, 6, 8, 10, SKIP | EXT | OPT, 0, NULL}, | ||
1097 | {FNAME("h245SecurityMode") CHOICE, 2, 4, 4, SKIP | EXT | OPT, 0, | ||
1098 | NULL}, | ||
1099 | }; | ||
1100 | |||
1101 | static field_t _CallIdentifier[] = { /* SEQUENCE */ | ||
1102 | {FNAME("guid") OCTSTR, FIXD, 16, 0, SKIP, 0, NULL}, | ||
1103 | }; | ||
1104 | |||
1105 | static field_t _SecurityServiceMode[] = { /* CHOICE */ | ||
1106 | {FNAME("nonStandard") SEQ, 0, 2, 2, SKIP, 0, _NonStandardParameter}, | ||
1107 | {FNAME("none") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1108 | {FNAME("default") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1109 | }; | ||
1110 | |||
1111 | static field_t _SecurityCapabilities[] = { /* SEQUENCE */ | ||
1112 | {FNAME("nonStandard") SEQ, 0, 2, 2, SKIP | OPT, 0, | ||
1113 | _NonStandardParameter}, | ||
1114 | {FNAME("encryption") CHOICE, 2, 3, 3, SKIP | EXT, 0, | ||
1115 | _SecurityServiceMode}, | ||
1116 | {FNAME("authenticaton") CHOICE, 2, 3, 3, SKIP | EXT, 0, | ||
1117 | _SecurityServiceMode}, | ||
1118 | {FNAME("integrity") CHOICE, 2, 3, 3, SKIP | EXT, 0, | ||
1119 | _SecurityServiceMode}, | ||
1120 | }; | ||
1121 | |||
1122 | static field_t _H245Security[] = { /* CHOICE */ | ||
1123 | {FNAME("nonStandard") SEQ, 0, 2, 2, SKIP, 0, _NonStandardParameter}, | ||
1124 | {FNAME("noSecurity") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1125 | {FNAME("tls") SEQ, 1, 4, 4, SKIP | EXT, 0, _SecurityCapabilities}, | ||
1126 | {FNAME("ipsec") SEQ, 1, 4, 4, SKIP | EXT, 0, _SecurityCapabilities}, | ||
1127 | }; | ||
1128 | |||
1129 | static field_t _DHset[] = { /* SEQUENCE */ | ||
1130 | {FNAME("halfkey") BITSTR, WORD, 0, 0, SKIP, 0, NULL}, | ||
1131 | {FNAME("modSize") BITSTR, WORD, 0, 0, SKIP, 0, NULL}, | ||
1132 | {FNAME("generator") BITSTR, WORD, 0, 0, SKIP, 0, NULL}, | ||
1133 | }; | ||
1134 | |||
1135 | static field_t _TypedCertificate[] = { /* SEQUENCE */ | ||
1136 | {FNAME("type") OID, BYTE, 0, 0, SKIP, 0, NULL}, | ||
1137 | {FNAME("certificate") OCTSTR, SEMI, 0, 0, SKIP, 0, NULL}, | ||
1138 | }; | ||
1139 | |||
1140 | static field_t _H235_NonStandardParameter[] = { /* SEQUENCE */ | ||
1141 | {FNAME("nonStandardIdentifier") OID, BYTE, 0, 0, SKIP, 0, NULL}, | ||
1142 | {FNAME("data") OCTSTR, SEMI, 0, 0, SKIP, 0, NULL}, | ||
1143 | }; | ||
1144 | |||
1145 | static field_t _ClearToken[] = { /* SEQUENCE */ | ||
1146 | {FNAME("tokenOID") OID, BYTE, 0, 0, SKIP, 0, NULL}, | ||
1147 | {FNAME("timeStamp") INT, CONS, 1, 0, SKIP | OPT, 0, NULL}, | ||
1148 | {FNAME("password") BMPSTR, 7, 1, 0, SKIP | OPT, 0, NULL}, | ||
1149 | {FNAME("dhkey") SEQ, 0, 3, 3, SKIP | EXT | OPT, 0, _DHset}, | ||
1150 | {FNAME("challenge") OCTSTR, 7, 8, 0, SKIP | OPT, 0, NULL}, | ||
1151 | {FNAME("random") INT, UNCO, 0, 0, SKIP | OPT, 0, NULL}, | ||
1152 | {FNAME("certificate") SEQ, 0, 2, 2, SKIP | EXT | OPT, 0, | ||
1153 | _TypedCertificate}, | ||
1154 | {FNAME("generalID") BMPSTR, 7, 1, 0, SKIP | OPT, 0, NULL}, | ||
1155 | {FNAME("nonStandard") SEQ, 0, 2, 2, SKIP | OPT, 0, | ||
1156 | _H235_NonStandardParameter}, | ||
1157 | {FNAME("eckasdhkey") CHOICE, 1, 2, 2, SKIP | EXT | OPT, 0, NULL}, | ||
1158 | {FNAME("sendersID") BMPSTR, 7, 1, 0, SKIP | OPT, 0, NULL}, | ||
1159 | }; | ||
1160 | |||
1161 | static field_t _Progress_UUIE_tokens[] = { /* SEQUENCE OF */ | ||
1162 | {FNAME("item") SEQ, 8, 9, 11, SKIP | EXT, 0, _ClearToken}, | ||
1163 | }; | ||
1164 | |||
1165 | static field_t _Params[] = { /* SEQUENCE */ | ||
1166 | {FNAME("ranInt") INT, UNCO, 0, 0, SKIP | OPT, 0, NULL}, | ||
1167 | {FNAME("iv8") OCTSTR, FIXD, 8, 0, SKIP | OPT, 0, NULL}, | ||
1168 | {FNAME("iv16") OCTSTR, FIXD, 16, 0, SKIP | OPT, 0, NULL}, | ||
1169 | }; | ||
1170 | |||
1171 | static field_t _CryptoH323Token_cryptoEPPwdHash_token[] = { /* SEQUENCE */ | ||
1172 | {FNAME("algorithmOID") OID, BYTE, 0, 0, SKIP, 0, NULL}, | ||
1173 | {FNAME("paramS") SEQ, 2, 2, 3, SKIP | EXT, 0, _Params}, | ||
1174 | {FNAME("hash") BITSTR, SEMI, 0, 0, SKIP, 0, NULL}, | ||
1175 | }; | ||
1176 | |||
1177 | static field_t _CryptoH323Token_cryptoEPPwdHash[] = { /* SEQUENCE */ | ||
1178 | {FNAME("alias") CHOICE, 1, 2, 7, SKIP | EXT, 0, _AliasAddress}, | ||
1179 | {FNAME("timeStamp") INT, CONS, 1, 0, SKIP, 0, NULL}, | ||
1180 | {FNAME("token") SEQ, 0, 3, 3, SKIP, 0, | ||
1181 | _CryptoH323Token_cryptoEPPwdHash_token}, | ||
1182 | }; | ||
1183 | |||
1184 | static field_t _CryptoH323Token_cryptoGKPwdHash_token[] = { /* SEQUENCE */ | ||
1185 | {FNAME("algorithmOID") OID, BYTE, 0, 0, SKIP, 0, NULL}, | ||
1186 | {FNAME("paramS") SEQ, 2, 2, 3, SKIP | EXT, 0, _Params}, | ||
1187 | {FNAME("hash") BITSTR, SEMI, 0, 0, SKIP, 0, NULL}, | ||
1188 | }; | ||
1189 | |||
1190 | static field_t _CryptoH323Token_cryptoGKPwdHash[] = { /* SEQUENCE */ | ||
1191 | {FNAME("gatekeeperId") BMPSTR, 7, 1, 0, SKIP, 0, NULL}, | ||
1192 | {FNAME("timeStamp") INT, CONS, 1, 0, SKIP, 0, NULL}, | ||
1193 | {FNAME("token") SEQ, 0, 3, 3, SKIP, 0, | ||
1194 | _CryptoH323Token_cryptoGKPwdHash_token}, | ||
1195 | }; | ||
1196 | |||
1197 | static field_t _CryptoH323Token_cryptoEPPwdEncr[] = { /* SEQUENCE */ | ||
1198 | {FNAME("algorithmOID") OID, BYTE, 0, 0, SKIP, 0, NULL}, | ||
1199 | {FNAME("paramS") SEQ, 2, 2, 3, SKIP | EXT, 0, _Params}, | ||
1200 | {FNAME("encryptedData") OCTSTR, SEMI, 0, 0, SKIP, 0, NULL}, | ||
1201 | }; | ||
1202 | |||
1203 | static field_t _CryptoH323Token_cryptoGKPwdEncr[] = { /* SEQUENCE */ | ||
1204 | {FNAME("algorithmOID") OID, BYTE, 0, 0, SKIP, 0, NULL}, | ||
1205 | {FNAME("paramS") SEQ, 2, 2, 3, SKIP | EXT, 0, _Params}, | ||
1206 | {FNAME("encryptedData") OCTSTR, SEMI, 0, 0, SKIP, 0, NULL}, | ||
1207 | }; | ||
1208 | |||
1209 | static field_t _CryptoH323Token_cryptoEPCert[] = { /* SEQUENCE */ | ||
1210 | {FNAME("toBeSigned") SEQ, 8, 9, 11, SKIP | OPEN | EXT, 0, NULL}, | ||
1211 | {FNAME("algorithmOID") OID, BYTE, 0, 0, SKIP, 0, NULL}, | ||
1212 | {FNAME("paramS") SEQ, 2, 2, 3, SKIP | EXT, 0, _Params}, | ||
1213 | {FNAME("signature") BITSTR, SEMI, 0, 0, SKIP, 0, NULL}, | ||
1214 | }; | ||
1215 | |||
1216 | static field_t _CryptoH323Token_cryptoGKCert[] = { /* SEQUENCE */ | ||
1217 | {FNAME("toBeSigned") SEQ, 8, 9, 11, SKIP | OPEN | EXT, 0, NULL}, | ||
1218 | {FNAME("algorithmOID") OID, BYTE, 0, 0, SKIP, 0, NULL}, | ||
1219 | {FNAME("paramS") SEQ, 2, 2, 3, SKIP | EXT, 0, _Params}, | ||
1220 | {FNAME("signature") BITSTR, SEMI, 0, 0, SKIP, 0, NULL}, | ||
1221 | }; | ||
1222 | |||
1223 | static field_t _CryptoH323Token_cryptoFastStart[] = { /* SEQUENCE */ | ||
1224 | {FNAME("toBeSigned") SEQ, 8, 9, 11, SKIP | OPEN | EXT, 0, NULL}, | ||
1225 | {FNAME("algorithmOID") OID, BYTE, 0, 0, SKIP, 0, NULL}, | ||
1226 | {FNAME("paramS") SEQ, 2, 2, 3, SKIP | EXT, 0, _Params}, | ||
1227 | {FNAME("signature") BITSTR, SEMI, 0, 0, SKIP, 0, NULL}, | ||
1228 | }; | ||
1229 | |||
1230 | static field_t _CryptoToken_cryptoEncryptedToken_token[] = { /* SEQUENCE */ | ||
1231 | {FNAME("algorithmOID") OID, BYTE, 0, 0, SKIP, 0, NULL}, | ||
1232 | {FNAME("paramS") SEQ, 2, 2, 3, SKIP | EXT, 0, _Params}, | ||
1233 | {FNAME("encryptedData") OCTSTR, SEMI, 0, 0, SKIP, 0, NULL}, | ||
1234 | }; | ||
1235 | |||
1236 | static field_t _CryptoToken_cryptoEncryptedToken[] = { /* SEQUENCE */ | ||
1237 | {FNAME("tokenOID") OID, BYTE, 0, 0, SKIP, 0, NULL}, | ||
1238 | {FNAME("token") SEQ, 0, 3, 3, SKIP, 0, | ||
1239 | _CryptoToken_cryptoEncryptedToken_token}, | ||
1240 | }; | ||
1241 | |||
1242 | static field_t _CryptoToken_cryptoSignedToken_token[] = { /* SEQUENCE */ | ||
1243 | {FNAME("toBeSigned") SEQ, 8, 9, 11, SKIP | OPEN | EXT, 0, NULL}, | ||
1244 | {FNAME("algorithmOID") OID, BYTE, 0, 0, SKIP, 0, NULL}, | ||
1245 | {FNAME("paramS") SEQ, 2, 2, 3, SKIP | EXT, 0, _Params}, | ||
1246 | {FNAME("signature") BITSTR, SEMI, 0, 0, SKIP, 0, NULL}, | ||
1247 | }; | ||
1248 | |||
1249 | static field_t _CryptoToken_cryptoSignedToken[] = { /* SEQUENCE */ | ||
1250 | {FNAME("tokenOID") OID, BYTE, 0, 0, SKIP, 0, NULL}, | ||
1251 | {FNAME("token") SEQ, 0, 4, 4, SKIP, 0, | ||
1252 | _CryptoToken_cryptoSignedToken_token}, | ||
1253 | }; | ||
1254 | |||
1255 | static field_t _CryptoToken_cryptoHashedToken_token[] = { /* SEQUENCE */ | ||
1256 | {FNAME("algorithmOID") OID, BYTE, 0, 0, SKIP, 0, NULL}, | ||
1257 | {FNAME("paramS") SEQ, 2, 2, 3, SKIP | EXT, 0, _Params}, | ||
1258 | {FNAME("hash") BITSTR, SEMI, 0, 0, SKIP, 0, NULL}, | ||
1259 | }; | ||
1260 | |||
1261 | static field_t _CryptoToken_cryptoHashedToken[] = { /* SEQUENCE */ | ||
1262 | {FNAME("tokenOID") OID, BYTE, 0, 0, SKIP, 0, NULL}, | ||
1263 | {FNAME("hashedVals") SEQ, 8, 9, 11, SKIP | EXT, 0, _ClearToken}, | ||
1264 | {FNAME("token") SEQ, 0, 3, 3, SKIP, 0, | ||
1265 | _CryptoToken_cryptoHashedToken_token}, | ||
1266 | }; | ||
1267 | |||
1268 | static field_t _CryptoToken_cryptoPwdEncr[] = { /* SEQUENCE */ | ||
1269 | {FNAME("algorithmOID") OID, BYTE, 0, 0, SKIP, 0, NULL}, | ||
1270 | {FNAME("paramS") SEQ, 2, 2, 3, SKIP | EXT, 0, _Params}, | ||
1271 | {FNAME("encryptedData") OCTSTR, SEMI, 0, 0, SKIP, 0, NULL}, | ||
1272 | }; | ||
1273 | |||
1274 | static field_t _CryptoToken[] = { /* CHOICE */ | ||
1275 | {FNAME("cryptoEncryptedToken") SEQ, 0, 2, 2, SKIP, 0, | ||
1276 | _CryptoToken_cryptoEncryptedToken}, | ||
1277 | {FNAME("cryptoSignedToken") SEQ, 0, 2, 2, SKIP, 0, | ||
1278 | _CryptoToken_cryptoSignedToken}, | ||
1279 | {FNAME("cryptoHashedToken") SEQ, 0, 3, 3, SKIP, 0, | ||
1280 | _CryptoToken_cryptoHashedToken}, | ||
1281 | {FNAME("cryptoPwdEncr") SEQ, 0, 3, 3, SKIP, 0, | ||
1282 | _CryptoToken_cryptoPwdEncr}, | ||
1283 | }; | ||
1284 | |||
1285 | static field_t _CryptoH323Token[] = { /* CHOICE */ | ||
1286 | {FNAME("cryptoEPPwdHash") SEQ, 0, 3, 3, SKIP, 0, | ||
1287 | _CryptoH323Token_cryptoEPPwdHash}, | ||
1288 | {FNAME("cryptoGKPwdHash") SEQ, 0, 3, 3, SKIP, 0, | ||
1289 | _CryptoH323Token_cryptoGKPwdHash}, | ||
1290 | {FNAME("cryptoEPPwdEncr") SEQ, 0, 3, 3, SKIP, 0, | ||
1291 | _CryptoH323Token_cryptoEPPwdEncr}, | ||
1292 | {FNAME("cryptoGKPwdEncr") SEQ, 0, 3, 3, SKIP, 0, | ||
1293 | _CryptoH323Token_cryptoGKPwdEncr}, | ||
1294 | {FNAME("cryptoEPCert") SEQ, 0, 4, 4, SKIP, 0, | ||
1295 | _CryptoH323Token_cryptoEPCert}, | ||
1296 | {FNAME("cryptoGKCert") SEQ, 0, 4, 4, SKIP, 0, | ||
1297 | _CryptoH323Token_cryptoGKCert}, | ||
1298 | {FNAME("cryptoFastStart") SEQ, 0, 4, 4, SKIP, 0, | ||
1299 | _CryptoH323Token_cryptoFastStart}, | ||
1300 | {FNAME("nestedcryptoToken") CHOICE, 2, 4, 4, SKIP | EXT, 0, | ||
1301 | _CryptoToken}, | ||
1302 | }; | ||
1303 | |||
1304 | static field_t _Progress_UUIE_cryptoTokens[] = { /* SEQUENCE OF */ | ||
1305 | {FNAME("item") CHOICE, 3, 8, 8, SKIP | EXT, 0, _CryptoH323Token}, | ||
1306 | }; | ||
1307 | |||
1308 | static field_t _Progress_UUIE_fastStart[] = { /* SEQUENCE OF */ | ||
1309 | {FNAME("item") SEQ, 1, 3, 5, DECODE | OPEN | EXT, | ||
1310 | sizeof(OpenLogicalChannel), _OpenLogicalChannel} | ||
1311 | , | ||
1312 | }; | ||
1313 | |||
1314 | static field_t _Progress_UUIE[] = { /* SEQUENCE */ | ||
1315 | {FNAME("protocolIdentifier") OID, BYTE, 0, 0, SKIP, 0, NULL}, | ||
1316 | {FNAME("destinationInfo") SEQ, 6, 8, 10, SKIP | EXT, 0, | ||
1317 | _EndpointType}, | ||
1318 | {FNAME("h245Address") CHOICE, 3, 7, 7, DECODE | EXT | OPT, | ||
1319 | offsetof(Progress_UUIE, h245Address), _TransportAddress}, | ||
1320 | {FNAME("callIdentifier") SEQ, 0, 1, 1, SKIP | EXT, 0, | ||
1321 | _CallIdentifier}, | ||
1322 | {FNAME("h245SecurityMode") CHOICE, 2, 4, 4, SKIP | EXT | OPT, 0, | ||
1323 | _H245Security}, | ||
1324 | {FNAME("tokens") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, | ||
1325 | _Progress_UUIE_tokens}, | ||
1326 | {FNAME("cryptoTokens") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, | ||
1327 | _Progress_UUIE_cryptoTokens}, | ||
1328 | {FNAME("fastStart") SEQOF, SEMI, 0, 30, DECODE | OPT, | ||
1329 | offsetof(Progress_UUIE, fastStart), _Progress_UUIE_fastStart}, | ||
1330 | {FNAME("multipleCalls") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1331 | {FNAME("maintainConnection") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1332 | {FNAME("fastConnectRefused") NUL, FIXD, 0, 0, SKIP | OPT, 0, NULL}, | ||
1333 | }; | ||
1334 | |||
1335 | static field_t _H323_UU_PDU_h323_message_body[] = { /* CHOICE */ | ||
1336 | {FNAME("setup") SEQ, 7, 13, 39, DECODE | EXT, | ||
1337 | offsetof(H323_UU_PDU_h323_message_body, setup), _Setup_UUIE}, | ||
1338 | {FNAME("callProceeding") SEQ, 1, 3, 12, DECODE | EXT, | ||
1339 | offsetof(H323_UU_PDU_h323_message_body, callProceeding), | ||
1340 | _CallProceeding_UUIE}, | ||
1341 | {FNAME("connect") SEQ, 1, 4, 19, DECODE | EXT, | ||
1342 | offsetof(H323_UU_PDU_h323_message_body, connect), _Connect_UUIE}, | ||
1343 | {FNAME("alerting") SEQ, 1, 3, 17, DECODE | EXT, | ||
1344 | offsetof(H323_UU_PDU_h323_message_body, alerting), _Alerting_UUIE}, | ||
1345 | {FNAME("information") SEQ, 0, 1, 7, DECODE | EXT, | ||
1346 | offsetof(H323_UU_PDU_h323_message_body, information), | ||
1347 | _Information_UUIE}, | ||
1348 | {FNAME("releaseComplete") SEQ, 1, 2, 11, SKIP | EXT, 0, | ||
1349 | _ReleaseComplete_UUIE}, | ||
1350 | {FNAME("facility") SEQ, 3, 5, 21, DECODE | EXT, | ||
1351 | offsetof(H323_UU_PDU_h323_message_body, facility), _Facility_UUIE}, | ||
1352 | {FNAME("progress") SEQ, 5, 8, 11, DECODE | EXT, | ||
1353 | offsetof(H323_UU_PDU_h323_message_body, progress), _Progress_UUIE}, | ||
1354 | {FNAME("empty") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1355 | {FNAME("status") SEQ, 2, 4, 4, SKIP | EXT, 0, NULL}, | ||
1356 | {FNAME("statusInquiry") SEQ, 2, 4, 4, SKIP | EXT, 0, NULL}, | ||
1357 | {FNAME("setupAcknowledge") SEQ, 2, 4, 4, SKIP | EXT, 0, NULL}, | ||
1358 | {FNAME("notify") SEQ, 2, 4, 4, SKIP | EXT, 0, NULL}, | ||
1359 | }; | ||
1360 | |||
1361 | static field_t _RequestMessage[] = { /* CHOICE */ | ||
1362 | {FNAME("nonStandard") SEQ, 0, 1, 1, STOP | EXT, 0, NULL}, | ||
1363 | {FNAME("masterSlaveDetermination") SEQ, 0, 2, 2, STOP | EXT, 0, NULL}, | ||
1364 | {FNAME("terminalCapabilitySet") SEQ, 3, 5, 5, STOP | EXT, 0, NULL}, | ||
1365 | {FNAME("openLogicalChannel") SEQ, 1, 3, 5, DECODE | EXT, | ||
1366 | offsetof(RequestMessage, openLogicalChannel), _OpenLogicalChannel}, | ||
1367 | {FNAME("closeLogicalChannel") SEQ, 0, 2, 3, STOP | EXT, 0, NULL}, | ||
1368 | {FNAME("requestChannelClose") SEQ, 0, 1, 3, STOP | EXT, 0, NULL}, | ||
1369 | {FNAME("multiplexEntrySend") SEQ, 0, 2, 2, STOP | EXT, 0, NULL}, | ||
1370 | {FNAME("requestMultiplexEntry") SEQ, 0, 1, 1, STOP | EXT, 0, NULL}, | ||
1371 | {FNAME("requestMode") SEQ, 0, 2, 2, STOP | EXT, 0, NULL}, | ||
1372 | {FNAME("roundTripDelayRequest") SEQ, 0, 1, 1, STOP | EXT, 0, NULL}, | ||
1373 | {FNAME("maintenanceLoopRequest") SEQ, 0, 1, 1, STOP | EXT, 0, NULL}, | ||
1374 | {FNAME("communicationModeRequest") SEQ, 0, 0, 0, STOP | EXT, 0, NULL}, | ||
1375 | {FNAME("conferenceRequest") CHOICE, 3, 8, 16, STOP | EXT, 0, NULL}, | ||
1376 | {FNAME("multilinkRequest") CHOICE, 3, 5, 5, STOP | EXT, 0, NULL}, | ||
1377 | {FNAME("logicalChannelRateRequest") SEQ, 0, 3, 3, STOP | EXT, 0, | ||
1378 | NULL}, | ||
1379 | }; | ||
1380 | |||
1381 | static field_t _OpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters[] = { /* CHOICE */ | ||
1382 | {FNAME("h222LogicalChannelParameters") SEQ, 3, 5, 5, SKIP | EXT, 0, | ||
1383 | _H222LogicalChannelParameters}, | ||
1384 | {FNAME("h2250LogicalChannelParameters") SEQ, 10, 11, 14, DECODE | EXT, | ||
1385 | offsetof | ||
1386 | (OpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters, | ||
1387 | h2250LogicalChannelParameters), _H2250LogicalChannelParameters}, | ||
1388 | }; | ||
1389 | |||
1390 | static field_t _OpenLogicalChannelAck_reverseLogicalChannelParameters[] = { /* SEQUENCE */ | ||
1391 | {FNAME("reverseLogicalChannelNumber") INT, WORD, 1, 0, SKIP, 0, NULL}, | ||
1392 | {FNAME("portNumber") INT, WORD, 0, 0, SKIP | OPT, 0, NULL}, | ||
1393 | {FNAME("multiplexParameters") CHOICE, 0, 1, 2, DECODE | EXT | OPT, | ||
1394 | offsetof(OpenLogicalChannelAck_reverseLogicalChannelParameters, | ||
1395 | multiplexParameters), | ||
1396 | _OpenLogicalChannelAck_reverseLogicalChannelParameters_multiplexParameters}, | ||
1397 | {FNAME("replacementFor") INT, WORD, 1, 0, SKIP | OPT, 0, NULL}, | ||
1398 | }; | ||
1399 | |||
1400 | static field_t _H2250LogicalChannelAckParameters_nonStandard[] = { /* SEQUENCE OF */ | ||
1401 | {FNAME("item") SEQ, 0, 2, 2, SKIP, 0, _H245_NonStandardParameter}, | ||
1402 | }; | ||
1403 | |||
1404 | static field_t _H2250LogicalChannelAckParameters[] = { /* SEQUENCE */ | ||
1405 | {FNAME("nonStandard") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, | ||
1406 | _H2250LogicalChannelAckParameters_nonStandard}, | ||
1407 | {FNAME("sessionID") INT, 8, 1, 0, SKIP | OPT, 0, NULL}, | ||
1408 | {FNAME("mediaChannel") CHOICE, 1, 2, 2, DECODE | EXT | OPT, | ||
1409 | offsetof(H2250LogicalChannelAckParameters, mediaChannel), | ||
1410 | _H245_TransportAddress}, | ||
1411 | {FNAME("mediaControlChannel") CHOICE, 1, 2, 2, DECODE | EXT | OPT, | ||
1412 | offsetof(H2250LogicalChannelAckParameters, mediaControlChannel), | ||
1413 | _H245_TransportAddress}, | ||
1414 | {FNAME("dynamicRTPPayloadType") INT, 5, 96, 0, SKIP | OPT, 0, NULL}, | ||
1415 | {FNAME("flowControlToZero") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1416 | {FNAME("portNumber") INT, WORD, 0, 0, SKIP | OPT, 0, NULL}, | ||
1417 | }; | ||
1418 | |||
1419 | static field_t _OpenLogicalChannelAck_forwardMultiplexAckParameters[] = { /* CHOICE */ | ||
1420 | {FNAME("h2250LogicalChannelAckParameters") SEQ, 5, 5, 7, DECODE | EXT, | ||
1421 | offsetof(OpenLogicalChannelAck_forwardMultiplexAckParameters, | ||
1422 | h2250LogicalChannelAckParameters), | ||
1423 | _H2250LogicalChannelAckParameters}, | ||
1424 | }; | ||
1425 | |||
1426 | static field_t _OpenLogicalChannelAck[] = { /* SEQUENCE */ | ||
1427 | {FNAME("forwardLogicalChannelNumber") INT, WORD, 1, 0, SKIP, 0, NULL}, | ||
1428 | {FNAME("reverseLogicalChannelParameters") SEQ, 2, 3, 4, | ||
1429 | DECODE | EXT | OPT, offsetof(OpenLogicalChannelAck, | ||
1430 | reverseLogicalChannelParameters), | ||
1431 | _OpenLogicalChannelAck_reverseLogicalChannelParameters}, | ||
1432 | {FNAME("separateStack") SEQ, 2, 4, 5, SKIP | EXT | OPT, 0, NULL}, | ||
1433 | {FNAME("forwardMultiplexAckParameters") CHOICE, 0, 1, 1, | ||
1434 | DECODE | EXT | OPT, offsetof(OpenLogicalChannelAck, | ||
1435 | forwardMultiplexAckParameters), | ||
1436 | _OpenLogicalChannelAck_forwardMultiplexAckParameters}, | ||
1437 | {FNAME("encryptionSync") SEQ, 2, 4, 4, STOP | EXT | OPT, 0, NULL}, | ||
1438 | }; | ||
1439 | |||
1440 | static field_t _ResponseMessage[] = { /* CHOICE */ | ||
1441 | {FNAME("nonStandard") SEQ, 0, 1, 1, STOP | EXT, 0, NULL}, | ||
1442 | {FNAME("masterSlaveDeterminationAck") SEQ, 0, 1, 1, STOP | EXT, 0, | ||
1443 | NULL}, | ||
1444 | {FNAME("masterSlaveDeterminationReject") SEQ, 0, 1, 1, STOP | EXT, 0, | ||
1445 | NULL}, | ||
1446 | {FNAME("terminalCapabilitySetAck") SEQ, 0, 1, 1, STOP | EXT, 0, NULL}, | ||
1447 | {FNAME("terminalCapabilitySetReject") SEQ, 0, 2, 2, STOP | EXT, 0, | ||
1448 | NULL}, | ||
1449 | {FNAME("openLogicalChannelAck") SEQ, 1, 2, 5, DECODE | EXT, | ||
1450 | offsetof(ResponseMessage, openLogicalChannelAck), | ||
1451 | _OpenLogicalChannelAck}, | ||
1452 | {FNAME("openLogicalChannelReject") SEQ, 0, 2, 2, STOP | EXT, 0, NULL}, | ||
1453 | {FNAME("closeLogicalChannelAck") SEQ, 0, 1, 1, STOP | EXT, 0, NULL}, | ||
1454 | {FNAME("requestChannelCloseAck") SEQ, 0, 1, 1, STOP | EXT, 0, NULL}, | ||
1455 | {FNAME("requestChannelCloseReject") SEQ, 0, 2, 2, STOP | EXT, 0, | ||
1456 | NULL}, | ||
1457 | {FNAME("multiplexEntrySendAck") SEQ, 0, 2, 2, STOP | EXT, 0, NULL}, | ||
1458 | {FNAME("multiplexEntrySendReject") SEQ, 0, 2, 2, STOP | EXT, 0, NULL}, | ||
1459 | {FNAME("requestMultiplexEntryAck") SEQ, 0, 1, 1, STOP | EXT, 0, NULL}, | ||
1460 | {FNAME("requestMultiplexEntryReject") SEQ, 0, 2, 2, STOP | EXT, 0, | ||
1461 | NULL}, | ||
1462 | {FNAME("requestModeAck") SEQ, 0, 2, 2, STOP | EXT, 0, NULL}, | ||
1463 | {FNAME("requestModeReject") SEQ, 0, 2, 2, STOP | EXT, 0, NULL}, | ||
1464 | {FNAME("roundTripDelayResponse") SEQ, 0, 1, 1, STOP | EXT, 0, NULL}, | ||
1465 | {FNAME("maintenanceLoopAck") SEQ, 0, 1, 1, STOP | EXT, 0, NULL}, | ||
1466 | {FNAME("maintenanceLoopReject") SEQ, 0, 2, 2, STOP | EXT, 0, NULL}, | ||
1467 | {FNAME("communicationModeResponse") CHOICE, 0, 1, 1, STOP | EXT, 0, | ||
1468 | NULL}, | ||
1469 | {FNAME("conferenceResponse") CHOICE, 3, 8, 16, STOP | EXT, 0, NULL}, | ||
1470 | {FNAME("multilinkResponse") CHOICE, 3, 5, 5, STOP | EXT, 0, NULL}, | ||
1471 | {FNAME("logicalChannelRateAcknowledge") SEQ, 0, 3, 3, STOP | EXT, 0, | ||
1472 | NULL}, | ||
1473 | {FNAME("logicalChannelRateReject") SEQ, 1, 4, 4, STOP | EXT, 0, NULL}, | ||
1474 | }; | ||
1475 | |||
1476 | static field_t _MultimediaSystemControlMessage[] = { /* CHOICE */ | ||
1477 | {FNAME("request") CHOICE, 4, 11, 15, DECODE | EXT, | ||
1478 | offsetof(MultimediaSystemControlMessage, request), _RequestMessage}, | ||
1479 | {FNAME("response") CHOICE, 5, 19, 24, DECODE | EXT, | ||
1480 | offsetof(MultimediaSystemControlMessage, response), | ||
1481 | _ResponseMessage}, | ||
1482 | {FNAME("command") CHOICE, 3, 7, 12, STOP | EXT, 0, NULL}, | ||
1483 | {FNAME("indication") CHOICE, 4, 14, 23, STOP | EXT, 0, NULL}, | ||
1484 | }; | ||
1485 | |||
1486 | static field_t _H323_UU_PDU_h245Control[] = { /* SEQUENCE OF */ | ||
1487 | {FNAME("item") CHOICE, 2, 4, 4, DECODE | OPEN | EXT, | ||
1488 | sizeof(MultimediaSystemControlMessage), | ||
1489 | _MultimediaSystemControlMessage} | ||
1490 | , | ||
1491 | }; | ||
1492 | |||
1493 | static field_t _H323_UU_PDU[] = { /* SEQUENCE */ | ||
1494 | {FNAME("h323-message-body") CHOICE, 3, 7, 13, DECODE | EXT, | ||
1495 | offsetof(H323_UU_PDU, h323_message_body), | ||
1496 | _H323_UU_PDU_h323_message_body}, | ||
1497 | {FNAME("nonStandardData") SEQ, 0, 2, 2, SKIP | OPT, 0, | ||
1498 | _NonStandardParameter}, | ||
1499 | {FNAME("h4501SupplementaryService") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, | ||
1500 | NULL}, | ||
1501 | {FNAME("h245Tunneling") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1502 | {FNAME("h245Control") SEQOF, SEMI, 0, 4, DECODE | OPT, | ||
1503 | offsetof(H323_UU_PDU, h245Control), _H323_UU_PDU_h245Control}, | ||
1504 | {FNAME("nonStandardControl") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1505 | {FNAME("callLinkage") SEQ, 2, 2, 2, STOP | EXT | OPT, 0, NULL}, | ||
1506 | {FNAME("tunnelledSignallingMessage") SEQ, 2, 4, 4, STOP | EXT | OPT, | ||
1507 | 0, NULL}, | ||
1508 | {FNAME("provisionalRespToH245Tunneling") NUL, FIXD, 0, 0, STOP | OPT, | ||
1509 | 0, NULL}, | ||
1510 | {FNAME("stimulusControl") SEQ, 3, 3, 3, STOP | EXT | OPT, 0, NULL}, | ||
1511 | {FNAME("genericData") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1512 | }; | ||
1513 | |||
1514 | static field_t _H323_UserInformation[] = { /* SEQUENCE */ | ||
1515 | {FNAME("h323-uu-pdu") SEQ, 1, 2, 11, DECODE | EXT, | ||
1516 | offsetof(H323_UserInformation, h323_uu_pdu), _H323_UU_PDU}, | ||
1517 | {FNAME("user-data") SEQ, 0, 2, 2, STOP | EXT | OPT, 0, NULL}, | ||
1518 | }; | ||
1519 | |||
1520 | static field_t _GatekeeperRequest[] = { /* SEQUENCE */ | ||
1521 | {FNAME("requestSeqNum") INT, WORD, 1, 0, SKIP, 0, NULL}, | ||
1522 | {FNAME("protocolIdentifier") OID, BYTE, 0, 0, SKIP, 0, NULL}, | ||
1523 | {FNAME("nonStandardData") SEQ, 0, 2, 2, SKIP | OPT, 0, | ||
1524 | _NonStandardParameter}, | ||
1525 | {FNAME("rasAddress") CHOICE, 3, 7, 7, DECODE | EXT, | ||
1526 | offsetof(GatekeeperRequest, rasAddress), _TransportAddress}, | ||
1527 | {FNAME("endpointType") SEQ, 6, 8, 10, STOP | EXT, 0, NULL}, | ||
1528 | {FNAME("gatekeeperIdentifier") BMPSTR, 7, 1, 0, STOP | OPT, 0, NULL}, | ||
1529 | {FNAME("callServices") SEQ, 0, 8, 8, STOP | EXT | OPT, 0, NULL}, | ||
1530 | {FNAME("endpointAlias") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1531 | {FNAME("alternateEndpoints") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1532 | {FNAME("tokens") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1533 | {FNAME("cryptoTokens") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1534 | {FNAME("authenticationCapability") SEQOF, SEMI, 0, 0, STOP | OPT, 0, | ||
1535 | NULL}, | ||
1536 | {FNAME("algorithmOIDs") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1537 | {FNAME("integrity") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1538 | {FNAME("integrityCheckValue") SEQ, 0, 2, 2, STOP | OPT, 0, NULL}, | ||
1539 | {FNAME("supportsAltGK") NUL, FIXD, 0, 0, STOP | OPT, 0, NULL}, | ||
1540 | {FNAME("featureSet") SEQ, 3, 4, 4, STOP | EXT | OPT, 0, NULL}, | ||
1541 | {FNAME("genericData") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1542 | }; | ||
1543 | |||
1544 | static field_t _GatekeeperConfirm[] = { /* SEQUENCE */ | ||
1545 | {FNAME("requestSeqNum") INT, WORD, 1, 0, SKIP, 0, NULL}, | ||
1546 | {FNAME("protocolIdentifier") OID, BYTE, 0, 0, SKIP, 0, NULL}, | ||
1547 | {FNAME("nonStandardData") SEQ, 0, 2, 2, SKIP | OPT, 0, | ||
1548 | _NonStandardParameter}, | ||
1549 | {FNAME("gatekeeperIdentifier") BMPSTR, 7, 1, 0, SKIP | OPT, 0, NULL}, | ||
1550 | {FNAME("rasAddress") CHOICE, 3, 7, 7, DECODE | EXT, | ||
1551 | offsetof(GatekeeperConfirm, rasAddress), _TransportAddress}, | ||
1552 | {FNAME("alternateGatekeeper") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1553 | {FNAME("authenticationMode") CHOICE, 3, 7, 8, STOP | EXT | OPT, 0, | ||
1554 | NULL}, | ||
1555 | {FNAME("tokens") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1556 | {FNAME("cryptoTokens") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1557 | {FNAME("algorithmOID") OID, BYTE, 0, 0, STOP | OPT, 0, NULL}, | ||
1558 | {FNAME("integrity") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1559 | {FNAME("integrityCheckValue") SEQ, 0, 2, 2, STOP | OPT, 0, NULL}, | ||
1560 | {FNAME("featureSet") SEQ, 3, 4, 4, STOP | EXT | OPT, 0, NULL}, | ||
1561 | {FNAME("genericData") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1562 | }; | ||
1563 | |||
1564 | static field_t _RegistrationRequest_callSignalAddress[] = { /* SEQUENCE OF */ | ||
1565 | {FNAME("item") CHOICE, 3, 7, 7, DECODE | EXT, | ||
1566 | sizeof(TransportAddress), _TransportAddress} | ||
1567 | , | ||
1568 | }; | ||
1569 | |||
1570 | static field_t _RegistrationRequest_rasAddress[] = { /* SEQUENCE OF */ | ||
1571 | {FNAME("item") CHOICE, 3, 7, 7, DECODE | EXT, | ||
1572 | sizeof(TransportAddress), _TransportAddress} | ||
1573 | , | ||
1574 | }; | ||
1575 | |||
1576 | static field_t _RegistrationRequest_terminalAlias[] = { /* SEQUENCE OF */ | ||
1577 | {FNAME("item") CHOICE, 1, 2, 7, SKIP | EXT, 0, _AliasAddress}, | ||
1578 | }; | ||
1579 | |||
1580 | static field_t _RegistrationRequest[] = { /* SEQUENCE */ | ||
1581 | {FNAME("requestSeqNum") INT, WORD, 1, 0, SKIP, 0, NULL}, | ||
1582 | {FNAME("protocolIdentifier") OID, BYTE, 0, 0, SKIP, 0, NULL}, | ||
1583 | {FNAME("nonStandardData") SEQ, 0, 2, 2, SKIP | OPT, 0, | ||
1584 | _NonStandardParameter}, | ||
1585 | {FNAME("discoveryComplete") BOOL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1586 | {FNAME("callSignalAddress") SEQOF, SEMI, 0, 10, DECODE, | ||
1587 | offsetof(RegistrationRequest, callSignalAddress), | ||
1588 | _RegistrationRequest_callSignalAddress}, | ||
1589 | {FNAME("rasAddress") SEQOF, SEMI, 0, 10, DECODE, | ||
1590 | offsetof(RegistrationRequest, rasAddress), | ||
1591 | _RegistrationRequest_rasAddress}, | ||
1592 | {FNAME("terminalType") SEQ, 6, 8, 10, SKIP | EXT, 0, _EndpointType}, | ||
1593 | {FNAME("terminalAlias") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, | ||
1594 | _RegistrationRequest_terminalAlias}, | ||
1595 | {FNAME("gatekeeperIdentifier") BMPSTR, 7, 1, 0, SKIP | OPT, 0, NULL}, | ||
1596 | {FNAME("endpointVendor") SEQ, 2, 3, 3, SKIP | EXT, 0, | ||
1597 | _VendorIdentifier}, | ||
1598 | {FNAME("alternateEndpoints") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
1599 | {FNAME("timeToLive") INT, CONS, 1, 0, DECODE | OPT, | ||
1600 | offsetof(RegistrationRequest, timeToLive), NULL}, | ||
1601 | {FNAME("tokens") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1602 | {FNAME("cryptoTokens") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1603 | {FNAME("integrityCheckValue") SEQ, 0, 2, 2, STOP | OPT, 0, NULL}, | ||
1604 | {FNAME("keepAlive") BOOL, FIXD, 0, 0, STOP, 0, NULL}, | ||
1605 | {FNAME("endpointIdentifier") BMPSTR, 7, 1, 0, STOP | OPT, 0, NULL}, | ||
1606 | {FNAME("willSupplyUUIEs") BOOL, FIXD, 0, 0, STOP, 0, NULL}, | ||
1607 | {FNAME("maintainConnection") BOOL, FIXD, 0, 0, STOP, 0, NULL}, | ||
1608 | {FNAME("alternateTransportAddresses") SEQ, 1, 1, 1, STOP | EXT | OPT, | ||
1609 | 0, NULL}, | ||
1610 | {FNAME("additiveRegistration") NUL, FIXD, 0, 0, STOP | OPT, 0, NULL}, | ||
1611 | {FNAME("terminalAliasPattern") SEQOF, SEMI, 0, 0, STOP | OPT, 0, | ||
1612 | NULL}, | ||
1613 | {FNAME("supportsAltGK") NUL, FIXD, 0, 0, STOP | OPT, 0, NULL}, | ||
1614 | {FNAME("usageReportingCapability") SEQ, 3, 4, 4, STOP | EXT | OPT, 0, | ||
1615 | NULL}, | ||
1616 | {FNAME("multipleCalls") BOOL, FIXD, 0, 0, STOP | OPT, 0, NULL}, | ||
1617 | {FNAME("supportedH248Packages") SEQOF, SEMI, 0, 0, STOP | OPT, 0, | ||
1618 | NULL}, | ||
1619 | {FNAME("callCreditCapability") SEQ, 2, 2, 2, STOP | EXT | OPT, 0, | ||
1620 | NULL}, | ||
1621 | {FNAME("capacityReportingCapability") SEQ, 0, 1, 1, STOP | EXT | OPT, | ||
1622 | 0, NULL}, | ||
1623 | {FNAME("capacity") SEQ, 2, 2, 2, STOP | EXT | OPT, 0, NULL}, | ||
1624 | {FNAME("featureSet") SEQ, 3, 4, 4, STOP | EXT | OPT, 0, NULL}, | ||
1625 | {FNAME("genericData") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1626 | }; | ||
1627 | |||
1628 | static field_t _RegistrationConfirm_callSignalAddress[] = { /* SEQUENCE OF */ | ||
1629 | {FNAME("item") CHOICE, 3, 7, 7, DECODE | EXT, | ||
1630 | sizeof(TransportAddress), _TransportAddress} | ||
1631 | , | ||
1632 | }; | ||
1633 | |||
1634 | static field_t _RegistrationConfirm_terminalAlias[] = { /* SEQUENCE OF */ | ||
1635 | {FNAME("item") CHOICE, 1, 2, 7, SKIP | EXT, 0, _AliasAddress}, | ||
1636 | }; | ||
1637 | |||
1638 | static field_t _RegistrationConfirm[] = { /* SEQUENCE */ | ||
1639 | {FNAME("requestSeqNum") INT, WORD, 1, 0, SKIP, 0, NULL}, | ||
1640 | {FNAME("protocolIdentifier") OID, BYTE, 0, 0, SKIP, 0, NULL}, | ||
1641 | {FNAME("nonStandardData") SEQ, 0, 2, 2, SKIP | OPT, 0, | ||
1642 | _NonStandardParameter}, | ||
1643 | {FNAME("callSignalAddress") SEQOF, SEMI, 0, 10, DECODE, | ||
1644 | offsetof(RegistrationConfirm, callSignalAddress), | ||
1645 | _RegistrationConfirm_callSignalAddress}, | ||
1646 | {FNAME("terminalAlias") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, | ||
1647 | _RegistrationConfirm_terminalAlias}, | ||
1648 | {FNAME("gatekeeperIdentifier") BMPSTR, 7, 1, 0, SKIP | OPT, 0, NULL}, | ||
1649 | {FNAME("endpointIdentifier") BMPSTR, 7, 1, 0, SKIP, 0, NULL}, | ||
1650 | {FNAME("alternateGatekeeper") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, | ||
1651 | {FNAME("timeToLive") INT, CONS, 1, 0, DECODE | OPT, | ||
1652 | offsetof(RegistrationConfirm, timeToLive), NULL}, | ||
1653 | {FNAME("tokens") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1654 | {FNAME("cryptoTokens") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1655 | {FNAME("integrityCheckValue") SEQ, 0, 2, 2, STOP | OPT, 0, NULL}, | ||
1656 | {FNAME("willRespondToIRR") BOOL, FIXD, 0, 0, STOP, 0, NULL}, | ||
1657 | {FNAME("preGrantedARQ") SEQ, 0, 4, 8, STOP | EXT | OPT, 0, NULL}, | ||
1658 | {FNAME("maintainConnection") BOOL, FIXD, 0, 0, STOP, 0, NULL}, | ||
1659 | {FNAME("serviceControl") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1660 | {FNAME("supportsAdditiveRegistration") NUL, FIXD, 0, 0, STOP | OPT, 0, | ||
1661 | NULL}, | ||
1662 | {FNAME("terminalAliasPattern") SEQOF, SEMI, 0, 0, STOP | OPT, 0, | ||
1663 | NULL}, | ||
1664 | {FNAME("supportedPrefixes") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1665 | {FNAME("usageSpec") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1666 | {FNAME("featureServerAlias") CHOICE, 1, 2, 7, STOP | EXT | OPT, 0, | ||
1667 | NULL}, | ||
1668 | {FNAME("capacityReportingSpec") SEQ, 0, 1, 1, STOP | EXT | OPT, 0, | ||
1669 | NULL}, | ||
1670 | {FNAME("featureSet") SEQ, 3, 4, 4, STOP | EXT | OPT, 0, NULL}, | ||
1671 | {FNAME("genericData") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1672 | }; | ||
1673 | |||
1674 | static field_t _UnregistrationRequest_callSignalAddress[] = { /* SEQUENCE OF */ | ||
1675 | {FNAME("item") CHOICE, 3, 7, 7, DECODE | EXT, | ||
1676 | sizeof(TransportAddress), _TransportAddress} | ||
1677 | , | ||
1678 | }; | ||
1679 | |||
1680 | static field_t _UnregistrationRequest[] = { /* SEQUENCE */ | ||
1681 | {FNAME("requestSeqNum") INT, WORD, 1, 0, SKIP, 0, NULL}, | ||
1682 | {FNAME("callSignalAddress") SEQOF, SEMI, 0, 10, DECODE, | ||
1683 | offsetof(UnregistrationRequest, callSignalAddress), | ||
1684 | _UnregistrationRequest_callSignalAddress}, | ||
1685 | {FNAME("endpointAlias") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1686 | {FNAME("nonStandardData") SEQ, 0, 2, 2, STOP | OPT, 0, NULL}, | ||
1687 | {FNAME("endpointIdentifier") BMPSTR, 7, 1, 0, STOP | OPT, 0, NULL}, | ||
1688 | {FNAME("alternateEndpoints") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1689 | {FNAME("gatekeeperIdentifier") BMPSTR, 7, 1, 0, STOP | OPT, 0, NULL}, | ||
1690 | {FNAME("tokens") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1691 | {FNAME("cryptoTokens") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1692 | {FNAME("integrityCheckValue") SEQ, 0, 2, 2, STOP | OPT, 0, NULL}, | ||
1693 | {FNAME("reason") CHOICE, 2, 4, 5, STOP | EXT | OPT, 0, NULL}, | ||
1694 | {FNAME("endpointAliasPattern") SEQOF, SEMI, 0, 0, STOP | OPT, 0, | ||
1695 | NULL}, | ||
1696 | {FNAME("supportedPrefixes") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1697 | {FNAME("alternateGatekeeper") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1698 | {FNAME("genericData") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1699 | }; | ||
1700 | |||
1701 | static field_t _CallModel[] = { /* CHOICE */ | ||
1702 | {FNAME("direct") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1703 | {FNAME("gatekeeperRouted") NUL, FIXD, 0, 0, SKIP, 0, NULL}, | ||
1704 | }; | ||
1705 | |||
1706 | static field_t _AdmissionRequest_destinationInfo[] = { /* SEQUENCE OF */ | ||
1707 | {FNAME("item") CHOICE, 1, 2, 7, SKIP | EXT, 0, _AliasAddress}, | ||
1708 | }; | ||
1709 | |||
1710 | static field_t _AdmissionRequest_destExtraCallInfo[] = { /* SEQUENCE OF */ | ||
1711 | {FNAME("item") CHOICE, 1, 2, 7, SKIP | EXT, 0, _AliasAddress}, | ||
1712 | }; | ||
1713 | |||
1714 | static field_t _AdmissionRequest_srcInfo[] = { /* SEQUENCE OF */ | ||
1715 | {FNAME("item") CHOICE, 1, 2, 7, SKIP | EXT, 0, _AliasAddress}, | ||
1716 | }; | ||
1717 | |||
1718 | static field_t _AdmissionRequest[] = { /* SEQUENCE */ | ||
1719 | {FNAME("requestSeqNum") INT, WORD, 1, 0, SKIP, 0, NULL}, | ||
1720 | {FNAME("callType") CHOICE, 2, 4, 4, SKIP | EXT, 0, _CallType}, | ||
1721 | {FNAME("callModel") CHOICE, 1, 2, 2, SKIP | EXT | OPT, 0, _CallModel}, | ||
1722 | {FNAME("endpointIdentifier") BMPSTR, 7, 1, 0, SKIP, 0, NULL}, | ||
1723 | {FNAME("destinationInfo") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, | ||
1724 | _AdmissionRequest_destinationInfo}, | ||
1725 | {FNAME("destCallSignalAddress") CHOICE, 3, 7, 7, DECODE | EXT | OPT, | ||
1726 | offsetof(AdmissionRequest, destCallSignalAddress), | ||
1727 | _TransportAddress}, | ||
1728 | {FNAME("destExtraCallInfo") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, | ||
1729 | _AdmissionRequest_destExtraCallInfo}, | ||
1730 | {FNAME("srcInfo") SEQOF, SEMI, 0, 0, SKIP, 0, | ||
1731 | _AdmissionRequest_srcInfo}, | ||
1732 | {FNAME("srcCallSignalAddress") CHOICE, 3, 7, 7, DECODE | EXT | OPT, | ||
1733 | offsetof(AdmissionRequest, srcCallSignalAddress), _TransportAddress}, | ||
1734 | {FNAME("bandWidth") INT, CONS, 0, 0, STOP, 0, NULL}, | ||
1735 | {FNAME("callReferenceValue") INT, WORD, 0, 0, STOP, 0, NULL}, | ||
1736 | {FNAME("nonStandardData") SEQ, 0, 2, 2, STOP | OPT, 0, NULL}, | ||
1737 | {FNAME("callServices") SEQ, 0, 8, 8, STOP | EXT | OPT, 0, NULL}, | ||
1738 | {FNAME("conferenceID") OCTSTR, FIXD, 16, 0, STOP, 0, NULL}, | ||
1739 | {FNAME("activeMC") BOOL, FIXD, 0, 0, STOP, 0, NULL}, | ||
1740 | {FNAME("answerCall") BOOL, FIXD, 0, 0, STOP, 0, NULL}, | ||
1741 | {FNAME("canMapAlias") BOOL, FIXD, 0, 0, STOP, 0, NULL}, | ||
1742 | {FNAME("callIdentifier") SEQ, 0, 1, 1, STOP | EXT, 0, NULL}, | ||
1743 | {FNAME("srcAlternatives") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1744 | {FNAME("destAlternatives") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1745 | {FNAME("gatekeeperIdentifier") BMPSTR, 7, 1, 0, STOP | OPT, 0, NULL}, | ||
1746 | {FNAME("tokens") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1747 | {FNAME("cryptoTokens") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1748 | {FNAME("integrityCheckValue") SEQ, 0, 2, 2, STOP | OPT, 0, NULL}, | ||
1749 | {FNAME("transportQOS") CHOICE, 2, 3, 3, STOP | EXT | OPT, 0, NULL}, | ||
1750 | {FNAME("willSupplyUUIEs") BOOL, FIXD, 0, 0, STOP, 0, NULL}, | ||
1751 | {FNAME("callLinkage") SEQ, 2, 2, 2, STOP | EXT | OPT, 0, NULL}, | ||
1752 | {FNAME("gatewayDataRate") SEQ, 2, 3, 3, STOP | EXT | OPT, 0, NULL}, | ||
1753 | {FNAME("capacity") SEQ, 2, 2, 2, STOP | EXT | OPT, 0, NULL}, | ||
1754 | {FNAME("circuitInfo") SEQ, 3, 3, 3, STOP | EXT | OPT, 0, NULL}, | ||
1755 | {FNAME("desiredProtocols") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1756 | {FNAME("desiredTunnelledProtocol") SEQ, 1, 2, 2, STOP | EXT | OPT, 0, | ||
1757 | NULL}, | ||
1758 | {FNAME("featureSet") SEQ, 3, 4, 4, STOP | EXT | OPT, 0, NULL}, | ||
1759 | {FNAME("genericData") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1760 | }; | ||
1761 | |||
1762 | static field_t _AdmissionConfirm[] = { /* SEQUENCE */ | ||
1763 | {FNAME("requestSeqNum") INT, WORD, 1, 0, SKIP, 0, NULL}, | ||
1764 | {FNAME("bandWidth") INT, CONS, 0, 0, SKIP, 0, NULL}, | ||
1765 | {FNAME("callModel") CHOICE, 1, 2, 2, SKIP | EXT, 0, _CallModel}, | ||
1766 | {FNAME("destCallSignalAddress") CHOICE, 3, 7, 7, DECODE | EXT, | ||
1767 | offsetof(AdmissionConfirm, destCallSignalAddress), | ||
1768 | _TransportAddress}, | ||
1769 | {FNAME("irrFrequency") INT, WORD, 1, 0, STOP | OPT, 0, NULL}, | ||
1770 | {FNAME("nonStandardData") SEQ, 0, 2, 2, STOP | OPT, 0, NULL}, | ||
1771 | {FNAME("destinationInfo") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1772 | {FNAME("destExtraCallInfo") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1773 | {FNAME("destinationType") SEQ, 6, 8, 10, STOP | EXT | OPT, 0, NULL}, | ||
1774 | {FNAME("remoteExtensionAddress") SEQOF, SEMI, 0, 0, STOP | OPT, 0, | ||
1775 | NULL}, | ||
1776 | {FNAME("alternateEndpoints") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1777 | {FNAME("tokens") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1778 | {FNAME("cryptoTokens") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1779 | {FNAME("integrityCheckValue") SEQ, 0, 2, 2, STOP | OPT, 0, NULL}, | ||
1780 | {FNAME("transportQOS") CHOICE, 2, 3, 3, STOP | EXT | OPT, 0, NULL}, | ||
1781 | {FNAME("willRespondToIRR") BOOL, FIXD, 0, 0, STOP, 0, NULL}, | ||
1782 | {FNAME("uuiesRequested") SEQ, 0, 9, 13, STOP | EXT, 0, NULL}, | ||
1783 | {FNAME("language") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1784 | {FNAME("alternateTransportAddresses") SEQ, 1, 1, 1, STOP | EXT | OPT, | ||
1785 | 0, NULL}, | ||
1786 | {FNAME("useSpecifiedTransport") CHOICE, 1, 2, 2, STOP | EXT | OPT, 0, | ||
1787 | NULL}, | ||
1788 | {FNAME("circuitInfo") SEQ, 3, 3, 3, STOP | EXT | OPT, 0, NULL}, | ||
1789 | {FNAME("usageSpec") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1790 | {FNAME("supportedProtocols") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1791 | {FNAME("serviceControl") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1792 | {FNAME("multipleCalls") BOOL, FIXD, 0, 0, STOP | OPT, 0, NULL}, | ||
1793 | {FNAME("featureSet") SEQ, 3, 4, 4, STOP | EXT | OPT, 0, NULL}, | ||
1794 | {FNAME("genericData") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1795 | }; | ||
1796 | |||
1797 | static field_t _LocationRequest_destinationInfo[] = { /* SEQUENCE OF */ | ||
1798 | {FNAME("item") CHOICE, 1, 2, 7, SKIP | EXT, 0, _AliasAddress}, | ||
1799 | }; | ||
1800 | |||
1801 | static field_t _LocationRequest[] = { /* SEQUENCE */ | ||
1802 | {FNAME("requestSeqNum") INT, WORD, 1, 0, SKIP, 0, NULL}, | ||
1803 | {FNAME("endpointIdentifier") BMPSTR, 7, 1, 0, SKIP | OPT, 0, NULL}, | ||
1804 | {FNAME("destinationInfo") SEQOF, SEMI, 0, 0, SKIP, 0, | ||
1805 | _LocationRequest_destinationInfo}, | ||
1806 | {FNAME("nonStandardData") SEQ, 0, 2, 2, SKIP | OPT, 0, | ||
1807 | _NonStandardParameter}, | ||
1808 | {FNAME("replyAddress") CHOICE, 3, 7, 7, DECODE | EXT, | ||
1809 | offsetof(LocationRequest, replyAddress), _TransportAddress}, | ||
1810 | {FNAME("sourceInfo") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1811 | {FNAME("canMapAlias") BOOL, FIXD, 0, 0, STOP, 0, NULL}, | ||
1812 | {FNAME("gatekeeperIdentifier") BMPSTR, 7, 1, 0, STOP | OPT, 0, NULL}, | ||
1813 | {FNAME("tokens") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1814 | {FNAME("cryptoTokens") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1815 | {FNAME("integrityCheckValue") SEQ, 0, 2, 2, STOP | OPT, 0, NULL}, | ||
1816 | {FNAME("desiredProtocols") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1817 | {FNAME("desiredTunnelledProtocol") SEQ, 1, 2, 2, STOP | EXT | OPT, 0, | ||
1818 | NULL}, | ||
1819 | {FNAME("featureSet") SEQ, 3, 4, 4, STOP | EXT | OPT, 0, NULL}, | ||
1820 | {FNAME("genericData") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1821 | {FNAME("hopCount") INT, 8, 1, 0, STOP | OPT, 0, NULL}, | ||
1822 | {FNAME("circuitInfo") SEQ, 3, 3, 3, STOP | EXT | OPT, 0, NULL}, | ||
1823 | }; | ||
1824 | |||
1825 | static field_t _LocationConfirm[] = { /* SEQUENCE */ | ||
1826 | {FNAME("requestSeqNum") INT, WORD, 1, 0, SKIP, 0, NULL}, | ||
1827 | {FNAME("callSignalAddress") CHOICE, 3, 7, 7, DECODE | EXT, | ||
1828 | offsetof(LocationConfirm, callSignalAddress), _TransportAddress}, | ||
1829 | {FNAME("rasAddress") CHOICE, 3, 7, 7, DECODE | EXT, | ||
1830 | offsetof(LocationConfirm, rasAddress), _TransportAddress}, | ||
1831 | {FNAME("nonStandardData") SEQ, 0, 2, 2, STOP | OPT, 0, NULL}, | ||
1832 | {FNAME("destinationInfo") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1833 | {FNAME("destExtraCallInfo") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1834 | {FNAME("destinationType") SEQ, 6, 8, 10, STOP | EXT | OPT, 0, NULL}, | ||
1835 | {FNAME("remoteExtensionAddress") SEQOF, SEMI, 0, 0, STOP | OPT, 0, | ||
1836 | NULL}, | ||
1837 | {FNAME("alternateEndpoints") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1838 | {FNAME("tokens") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1839 | {FNAME("cryptoTokens") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1840 | {FNAME("integrityCheckValue") SEQ, 0, 2, 2, STOP | OPT, 0, NULL}, | ||
1841 | {FNAME("alternateTransportAddresses") SEQ, 1, 1, 1, STOP | EXT | OPT, | ||
1842 | 0, NULL}, | ||
1843 | {FNAME("supportedProtocols") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1844 | {FNAME("multipleCalls") BOOL, FIXD, 0, 0, STOP | OPT, 0, NULL}, | ||
1845 | {FNAME("featureSet") SEQ, 3, 4, 4, STOP | EXT | OPT, 0, NULL}, | ||
1846 | {FNAME("genericData") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1847 | {FNAME("circuitInfo") SEQ, 3, 3, 3, STOP | EXT | OPT, 0, NULL}, | ||
1848 | {FNAME("serviceControl") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1849 | }; | ||
1850 | |||
1851 | static field_t _InfoRequestResponse_callSignalAddress[] = { /* SEQUENCE OF */ | ||
1852 | {FNAME("item") CHOICE, 3, 7, 7, DECODE | EXT, | ||
1853 | sizeof(TransportAddress), _TransportAddress} | ||
1854 | , | ||
1855 | }; | ||
1856 | |||
1857 | static field_t _InfoRequestResponse[] = { /* SEQUENCE */ | ||
1858 | {FNAME("nonStandardData") SEQ, 0, 2, 2, SKIP | OPT, 0, | ||
1859 | _NonStandardParameter}, | ||
1860 | {FNAME("requestSeqNum") INT, WORD, 1, 0, SKIP, 0, NULL}, | ||
1861 | {FNAME("endpointType") SEQ, 6, 8, 10, SKIP | EXT, 0, _EndpointType}, | ||
1862 | {FNAME("endpointIdentifier") BMPSTR, 7, 1, 0, SKIP, 0, NULL}, | ||
1863 | {FNAME("rasAddress") CHOICE, 3, 7, 7, DECODE | EXT, | ||
1864 | offsetof(InfoRequestResponse, rasAddress), _TransportAddress}, | ||
1865 | {FNAME("callSignalAddress") SEQOF, SEMI, 0, 10, DECODE, | ||
1866 | offsetof(InfoRequestResponse, callSignalAddress), | ||
1867 | _InfoRequestResponse_callSignalAddress}, | ||
1868 | {FNAME("endpointAlias") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1869 | {FNAME("perCallInfo") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1870 | {FNAME("tokens") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1871 | {FNAME("cryptoTokens") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1872 | {FNAME("integrityCheckValue") SEQ, 0, 2, 2, STOP | OPT, 0, NULL}, | ||
1873 | {FNAME("needResponse") BOOL, FIXD, 0, 0, STOP, 0, NULL}, | ||
1874 | {FNAME("capacity") SEQ, 2, 2, 2, STOP | EXT | OPT, 0, NULL}, | ||
1875 | {FNAME("irrStatus") CHOICE, 2, 4, 4, STOP | EXT | OPT, 0, NULL}, | ||
1876 | {FNAME("unsolicited") BOOL, FIXD, 0, 0, STOP, 0, NULL}, | ||
1877 | {FNAME("genericData") SEQOF, SEMI, 0, 0, STOP | OPT, 0, NULL}, | ||
1878 | }; | ||
1879 | |||
1880 | static field_t _RasMessage[] = { /* CHOICE */ | ||
1881 | {FNAME("gatekeeperRequest") SEQ, 4, 8, 18, DECODE | EXT, | ||
1882 | offsetof(RasMessage, gatekeeperRequest), _GatekeeperRequest}, | ||
1883 | {FNAME("gatekeeperConfirm") SEQ, 2, 5, 14, DECODE | EXT, | ||
1884 | offsetof(RasMessage, gatekeeperConfirm), _GatekeeperConfirm}, | ||
1885 | {FNAME("gatekeeperReject") SEQ, 2, 5, 11, STOP | EXT, 0, NULL}, | ||
1886 | {FNAME("registrationRequest") SEQ, 3, 10, 31, DECODE | EXT, | ||
1887 | offsetof(RasMessage, registrationRequest), _RegistrationRequest}, | ||
1888 | {FNAME("registrationConfirm") SEQ, 3, 7, 24, DECODE | EXT, | ||
1889 | offsetof(RasMessage, registrationConfirm), _RegistrationConfirm}, | ||
1890 | {FNAME("registrationReject") SEQ, 2, 5, 11, STOP | EXT, 0, NULL}, | ||
1891 | {FNAME("unregistrationRequest") SEQ, 3, 5, 15, DECODE | EXT, | ||
1892 | offsetof(RasMessage, unregistrationRequest), _UnregistrationRequest}, | ||
1893 | {FNAME("unregistrationConfirm") SEQ, 1, 2, 6, STOP | EXT, 0, NULL}, | ||
1894 | {FNAME("unregistrationReject") SEQ, 1, 3, 8, STOP | EXT, 0, NULL}, | ||
1895 | {FNAME("admissionRequest") SEQ, 7, 16, 34, DECODE | EXT, | ||
1896 | offsetof(RasMessage, admissionRequest), _AdmissionRequest}, | ||
1897 | {FNAME("admissionConfirm") SEQ, 2, 6, 27, DECODE | EXT, | ||
1898 | offsetof(RasMessage, admissionConfirm), _AdmissionConfirm}, | ||
1899 | {FNAME("admissionReject") SEQ, 1, 3, 11, STOP | EXT, 0, NULL}, | ||
1900 | {FNAME("bandwidthRequest") SEQ, 2, 7, 18, STOP | EXT, 0, NULL}, | ||
1901 | {FNAME("bandwidthConfirm") SEQ, 1, 3, 8, STOP | EXT, 0, NULL}, | ||
1902 | {FNAME("bandwidthReject") SEQ, 1, 4, 9, STOP | EXT, 0, NULL}, | ||
1903 | {FNAME("disengageRequest") SEQ, 1, 6, 19, STOP | EXT, 0, NULL}, | ||
1904 | {FNAME("disengageConfirm") SEQ, 1, 2, 9, STOP | EXT, 0, NULL}, | ||
1905 | {FNAME("disengageReject") SEQ, 1, 3, 8, STOP | EXT, 0, NULL}, | ||
1906 | {FNAME("locationRequest") SEQ, 2, 5, 17, DECODE | EXT, | ||
1907 | offsetof(RasMessage, locationRequest), _LocationRequest}, | ||
1908 | {FNAME("locationConfirm") SEQ, 1, 4, 19, DECODE | EXT, | ||
1909 | offsetof(RasMessage, locationConfirm), _LocationConfirm}, | ||
1910 | {FNAME("locationReject") SEQ, 1, 3, 10, STOP | EXT, 0, NULL}, | ||
1911 | {FNAME("infoRequest") SEQ, 2, 4, 15, STOP | EXT, 0, NULL}, | ||
1912 | {FNAME("infoRequestResponse") SEQ, 3, 8, 16, DECODE | EXT, | ||
1913 | offsetof(RasMessage, infoRequestResponse), _InfoRequestResponse}, | ||
1914 | {FNAME("nonStandardMessage") SEQ, 0, 2, 7, STOP | EXT, 0, NULL}, | ||
1915 | {FNAME("unknownMessageResponse") SEQ, 0, 1, 5, STOP | EXT, 0, NULL}, | ||
1916 | {FNAME("requestInProgress") SEQ, 4, 6, 6, STOP | EXT, 0, NULL}, | ||
1917 | {FNAME("resourcesAvailableIndicate") SEQ, 4, 9, 11, STOP | EXT, 0, | ||
1918 | NULL}, | ||
1919 | {FNAME("resourcesAvailableConfirm") SEQ, 4, 6, 7, STOP | EXT, 0, | ||
1920 | NULL}, | ||
1921 | {FNAME("infoRequestAck") SEQ, 4, 5, 5, STOP | EXT, 0, NULL}, | ||
1922 | {FNAME("infoRequestNak") SEQ, 5, 7, 7, STOP | EXT, 0, NULL}, | ||
1923 | {FNAME("serviceControlIndication") SEQ, 8, 10, 10, STOP | EXT, 0, | ||
1924 | NULL}, | ||
1925 | {FNAME("serviceControlResponse") SEQ, 7, 8, 8, STOP | EXT, 0, NULL}, | ||
1926 | }; | ||
diff --git a/net/ipv4/netfilter/nf_nat_h323.c b/net/ipv4/netfilter/nf_nat_h323.c new file mode 100644 index 000000000000..fb9ab0114c23 --- /dev/null +++ b/net/ipv4/netfilter/nf_nat_h323.c | |||
@@ -0,0 +1,596 @@ | |||
1 | /* | ||
2 | * H.323 extension for NAT alteration. | ||
3 | * | ||
4 | * Copyright (c) 2006 Jing Min Zhao <zhaojingmin@users.sourceforge.net> | ||
5 | * | ||
6 | * This source code is licensed under General Public License version 2. | ||
7 | * | ||
8 | * Based on the 'brute force' H.323 NAT module by | ||
9 | * Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | ||
10 | */ | ||
11 | |||
12 | #include <linux/module.h> | ||
13 | #include <linux/moduleparam.h> | ||
14 | #include <linux/tcp.h> | ||
15 | #include <net/tcp.h> | ||
16 | |||
17 | #include <net/netfilter/nf_nat.h> | ||
18 | #include <net/netfilter/nf_nat_helper.h> | ||
19 | #include <net/netfilter/nf_nat_rule.h> | ||
20 | #include <net/netfilter/nf_conntrack_helper.h> | ||
21 | #include <net/netfilter/nf_conntrack_expect.h> | ||
22 | #include <linux/netfilter/nf_conntrack_h323.h> | ||
23 | |||
24 | #if 0 | ||
25 | #define DEBUGP printk | ||
26 | #else | ||
27 | #define DEBUGP(format, args...) | ||
28 | #endif | ||
29 | |||
30 | /****************************************************************************/ | ||
31 | static int set_addr(struct sk_buff **pskb, | ||
32 | unsigned char **data, int dataoff, | ||
33 | unsigned int addroff, __be32 ip, __be16 port) | ||
34 | { | ||
35 | enum ip_conntrack_info ctinfo; | ||
36 | struct nf_conn *ct = ip_conntrack_get(*pskb, &ctinfo); | ||
37 | struct { | ||
38 | __be32 ip; | ||
39 | __be16 port; | ||
40 | } __attribute__ ((__packed__)) buf; | ||
41 | struct tcphdr _tcph, *th; | ||
42 | |||
43 | buf.ip = ip; | ||
44 | buf.port = port; | ||
45 | addroff += dataoff; | ||
46 | |||
47 | if ((*pskb)->nh.iph->protocol == IPPROTO_TCP) { | ||
48 | if (!nf_nat_mangle_tcp_packet(pskb, ct, ctinfo, | ||
49 | addroff, sizeof(buf), | ||
50 | (char *) &buf, sizeof(buf))) { | ||
51 | if (net_ratelimit()) | ||
52 | printk("nf_nat_h323: nf_nat_mangle_tcp_packet" | ||
53 | " error\n"); | ||
54 | return -1; | ||
55 | } | ||
56 | |||
57 | /* Relocate data pointer */ | ||
58 | th = skb_header_pointer(*pskb, (*pskb)->nh.iph->ihl * 4, | ||
59 | sizeof(_tcph), &_tcph); | ||
60 | if (th == NULL) | ||
61 | return -1; | ||
62 | *data = (*pskb)->data + (*pskb)->nh.iph->ihl * 4 + | ||
63 | th->doff * 4 + dataoff; | ||
64 | } else { | ||
65 | if (!nf_nat_mangle_udp_packet(pskb, ct, ctinfo, | ||
66 | addroff, sizeof(buf), | ||
67 | (char *) &buf, sizeof(buf))) { | ||
68 | if (net_ratelimit()) | ||
69 | printk("nf_nat_h323: nf_nat_mangle_udp_packet" | ||
70 | " error\n"); | ||
71 | return -1; | ||
72 | } | ||
73 | /* nf_nat_mangle_udp_packet uses skb_make_writable() to copy | ||
74 | * or pull everything in a linear buffer, so we can safely | ||
75 | * use the skb pointers now */ | ||
76 | *data = (*pskb)->data + (*pskb)->nh.iph->ihl * 4 + | ||
77 | sizeof(struct udphdr); | ||
78 | } | ||
79 | |||
80 | return 0; | ||
81 | } | ||
82 | |||
83 | /****************************************************************************/ | ||
84 | static int set_h225_addr(struct sk_buff **pskb, | ||
85 | unsigned char **data, int dataoff, | ||
86 | TransportAddress *taddr, | ||
87 | union nf_conntrack_address *addr, __be16 port) | ||
88 | { | ||
89 | return set_addr(pskb, data, dataoff, taddr->ipAddress.ip, | ||
90 | addr->ip, port); | ||
91 | } | ||
92 | |||
93 | /****************************************************************************/ | ||
94 | static int set_h245_addr(struct sk_buff **pskb, | ||
95 | unsigned char **data, int dataoff, | ||
96 | H245_TransportAddress *taddr, | ||
97 | union nf_conntrack_address *addr, __be16 port) | ||
98 | { | ||
99 | return set_addr(pskb, data, dataoff, | ||
100 | taddr->unicastAddress.iPAddress.network, | ||
101 | addr->ip, port); | ||
102 | } | ||
103 | |||
104 | /****************************************************************************/ | ||
105 | static int set_sig_addr(struct sk_buff **pskb, struct nf_conn *ct, | ||
106 | enum ip_conntrack_info ctinfo, | ||
107 | unsigned char **data, | ||
108 | TransportAddress *taddr, int count) | ||
109 | { | ||
110 | struct nf_ct_h323_master *info = &nfct_help(ct)->help.ct_h323_info; | ||
111 | int dir = CTINFO2DIR(ctinfo); | ||
112 | int i; | ||
113 | __be16 port; | ||
114 | union nf_conntrack_address addr; | ||
115 | |||
116 | for (i = 0; i < count; i++) { | ||
117 | if (get_h225_addr(ct, *data, &taddr[i], &addr, &port)) { | ||
118 | if (addr.ip == ct->tuplehash[dir].tuple.src.u3.ip && | ||
119 | port == info->sig_port[dir]) { | ||
120 | /* GW->GK */ | ||
121 | |||
122 | /* Fix for Gnomemeeting */ | ||
123 | if (i > 0 && | ||
124 | get_h225_addr(ct, *data, &taddr[0], | ||
125 | &addr, &port) && | ||
126 | (ntohl(addr.ip) & 0xff000000) == 0x7f000000) | ||
127 | i = 0; | ||
128 | |||
129 | DEBUGP | ||
130 | ("nf_nat_ras: set signal address " | ||
131 | "%u.%u.%u.%u:%hu->%u.%u.%u.%u:%hu\n", | ||
132 | NIPQUAD(ip), port, | ||
133 | NIPQUAD(ct->tuplehash[!dir].tuple.dst. | ||
134 | ip), info->sig_port[!dir]); | ||
135 | return set_h225_addr(pskb, data, 0, &taddr[i], | ||
136 | &ct->tuplehash[!dir]. | ||
137 | tuple.dst.u3, | ||
138 | info->sig_port[!dir]); | ||
139 | } else if (addr.ip == ct->tuplehash[dir].tuple.dst.u3.ip && | ||
140 | port == info->sig_port[dir]) { | ||
141 | /* GK->GW */ | ||
142 | DEBUGP | ||
143 | ("nf_nat_ras: set signal address " | ||
144 | "%u.%u.%u.%u:%hu->%u.%u.%u.%u:%hu\n", | ||
145 | NIPQUAD(ip), port, | ||
146 | NIPQUAD(ct->tuplehash[!dir].tuple.src. | ||
147 | ip), info->sig_port[!dir]); | ||
148 | return set_h225_addr(pskb, data, 0, &taddr[i], | ||
149 | &ct->tuplehash[!dir]. | ||
150 | tuple.src.u3, | ||
151 | info->sig_port[!dir]); | ||
152 | } | ||
153 | } | ||
154 | } | ||
155 | |||
156 | return 0; | ||
157 | } | ||
158 | |||
159 | /****************************************************************************/ | ||
160 | static int set_ras_addr(struct sk_buff **pskb, struct nf_conn *ct, | ||
161 | enum ip_conntrack_info ctinfo, | ||
162 | unsigned char **data, | ||
163 | TransportAddress *taddr, int count) | ||
164 | { | ||
165 | int dir = CTINFO2DIR(ctinfo); | ||
166 | int i; | ||
167 | __be16 port; | ||
168 | union nf_conntrack_address addr; | ||
169 | |||
170 | for (i = 0; i < count; i++) { | ||
171 | if (get_h225_addr(ct, *data, &taddr[i], &addr, &port) && | ||
172 | addr.ip == ct->tuplehash[dir].tuple.src.u3.ip && | ||
173 | port == ct->tuplehash[dir].tuple.src.u.udp.port) { | ||
174 | DEBUGP("nf_nat_ras: set rasAddress " | ||
175 | "%u.%u.%u.%u:%hu->%u.%u.%u.%u:%hu\n", | ||
176 | NIPQUAD(ip), ntohs(port), | ||
177 | NIPQUAD(ct->tuplehash[!dir].tuple.dst.u3.ip), | ||
178 | ntohs(ct->tuplehash[!dir].tuple.dst.u.udp. | ||
179 | port)); | ||
180 | return set_h225_addr(pskb, data, 0, &taddr[i], | ||
181 | &ct->tuplehash[!dir].tuple.dst.u3, | ||
182 | ct->tuplehash[!dir].tuple. | ||
183 | dst.u.udp.port); | ||
184 | } | ||
185 | } | ||
186 | |||
187 | return 0; | ||
188 | } | ||
189 | |||
190 | /****************************************************************************/ | ||
191 | static int nat_rtp_rtcp(struct sk_buff **pskb, struct nf_conn *ct, | ||
192 | enum ip_conntrack_info ctinfo, | ||
193 | unsigned char **data, int dataoff, | ||
194 | H245_TransportAddress *taddr, | ||
195 | __be16 port, __be16 rtp_port, | ||
196 | struct nf_conntrack_expect *rtp_exp, | ||
197 | struct nf_conntrack_expect *rtcp_exp) | ||
198 | { | ||
199 | struct nf_ct_h323_master *info = &nfct_help(ct)->help.ct_h323_info; | ||
200 | int dir = CTINFO2DIR(ctinfo); | ||
201 | int i; | ||
202 | u_int16_t nated_port; | ||
203 | |||
204 | /* Set expectations for NAT */ | ||
205 | rtp_exp->saved_proto.udp.port = rtp_exp->tuple.dst.u.udp.port; | ||
206 | rtp_exp->expectfn = nf_nat_follow_master; | ||
207 | rtp_exp->dir = !dir; | ||
208 | rtcp_exp->saved_proto.udp.port = rtcp_exp->tuple.dst.u.udp.port; | ||
209 | rtcp_exp->expectfn = nf_nat_follow_master; | ||
210 | rtcp_exp->dir = !dir; | ||
211 | |||
212 | /* Lookup existing expects */ | ||
213 | for (i = 0; i < H323_RTP_CHANNEL_MAX; i++) { | ||
214 | if (info->rtp_port[i][dir] == rtp_port) { | ||
215 | /* Expected */ | ||
216 | |||
217 | /* Use allocated ports first. This will refresh | ||
218 | * the expects */ | ||
219 | rtp_exp->tuple.dst.u.udp.port = info->rtp_port[i][dir]; | ||
220 | rtcp_exp->tuple.dst.u.udp.port = | ||
221 | htons(ntohs(info->rtp_port[i][dir]) + 1); | ||
222 | break; | ||
223 | } else if (info->rtp_port[i][dir] == 0) { | ||
224 | /* Not expected */ | ||
225 | break; | ||
226 | } | ||
227 | } | ||
228 | |||
229 | /* Run out of expectations */ | ||
230 | if (i >= H323_RTP_CHANNEL_MAX) { | ||
231 | if (net_ratelimit()) | ||
232 | printk("nf_nat_h323: out of expectations\n"); | ||
233 | return 0; | ||
234 | } | ||
235 | |||
236 | /* Try to get a pair of ports. */ | ||
237 | for (nated_port = ntohs(rtp_exp->tuple.dst.u.udp.port); | ||
238 | nated_port != 0; nated_port += 2) { | ||
239 | rtp_exp->tuple.dst.u.udp.port = htons(nated_port); | ||
240 | if (nf_conntrack_expect_related(rtp_exp) == 0) { | ||
241 | rtcp_exp->tuple.dst.u.udp.port = | ||
242 | htons(nated_port + 1); | ||
243 | if (nf_conntrack_expect_related(rtcp_exp) == 0) | ||
244 | break; | ||
245 | nf_conntrack_unexpect_related(rtp_exp); | ||
246 | } | ||
247 | } | ||
248 | |||
249 | if (nated_port == 0) { /* No port available */ | ||
250 | if (net_ratelimit()) | ||
251 | printk("nf_nat_h323: out of RTP ports\n"); | ||
252 | return 0; | ||
253 | } | ||
254 | |||
255 | /* Modify signal */ | ||
256 | if (set_h245_addr(pskb, data, dataoff, taddr, | ||
257 | &ct->tuplehash[!dir].tuple.dst.u3, | ||
258 | htons((port & htons(1)) ? nated_port + 1 : | ||
259 | nated_port)) == 0) { | ||
260 | /* Save ports */ | ||
261 | info->rtp_port[i][dir] = rtp_port; | ||
262 | info->rtp_port[i][!dir] = htons(nated_port); | ||
263 | } else { | ||
264 | nf_conntrack_unexpect_related(rtp_exp); | ||
265 | nf_conntrack_unexpect_related(rtcp_exp); | ||
266 | return -1; | ||
267 | } | ||
268 | |||
269 | /* Success */ | ||
270 | DEBUGP("nf_nat_h323: expect RTP %u.%u.%u.%u:%hu->%u.%u.%u.%u:%hu\n", | ||
271 | NIPQUAD(rtp_exp->tuple.src.ip), | ||
272 | ntohs(rtp_exp->tuple.src.u.udp.port), | ||
273 | NIPQUAD(rtp_exp->tuple.dst.ip), | ||
274 | ntohs(rtp_exp->tuple.dst.u.udp.port)); | ||
275 | DEBUGP("nf_nat_h323: expect RTCP %u.%u.%u.%u:%hu->%u.%u.%u.%u:%hu\n", | ||
276 | NIPQUAD(rtcp_exp->tuple.src.ip), | ||
277 | ntohs(rtcp_exp->tuple.src.u.udp.port), | ||
278 | NIPQUAD(rtcp_exp->tuple.dst.ip), | ||
279 | ntohs(rtcp_exp->tuple.dst.u.udp.port)); | ||
280 | |||
281 | return 0; | ||
282 | } | ||
283 | |||
284 | /****************************************************************************/ | ||
285 | static int nat_t120(struct sk_buff **pskb, struct nf_conn *ct, | ||
286 | enum ip_conntrack_info ctinfo, | ||
287 | unsigned char **data, int dataoff, | ||
288 | H245_TransportAddress *taddr, __be16 port, | ||
289 | struct nf_conntrack_expect *exp) | ||
290 | { | ||
291 | int dir = CTINFO2DIR(ctinfo); | ||
292 | u_int16_t nated_port = ntohs(port); | ||
293 | |||
294 | /* Set expectations for NAT */ | ||
295 | exp->saved_proto.tcp.port = exp->tuple.dst.u.tcp.port; | ||
296 | exp->expectfn = nf_nat_follow_master; | ||
297 | exp->dir = !dir; | ||
298 | |||
299 | /* Try to get same port: if not, try to change it. */ | ||
300 | for (; nated_port != 0; nated_port++) { | ||
301 | exp->tuple.dst.u.tcp.port = htons(nated_port); | ||
302 | if (nf_conntrack_expect_related(exp) == 0) | ||
303 | break; | ||
304 | } | ||
305 | |||
306 | if (nated_port == 0) { /* No port available */ | ||
307 | if (net_ratelimit()) | ||
308 | printk("nf_nat_h323: out of TCP ports\n"); | ||
309 | return 0; | ||
310 | } | ||
311 | |||
312 | /* Modify signal */ | ||
313 | if (set_h245_addr(pskb, data, dataoff, taddr, | ||
314 | &ct->tuplehash[!dir].tuple.dst.u3, | ||
315 | htons(nated_port)) < 0) { | ||
316 | nf_conntrack_unexpect_related(exp); | ||
317 | return -1; | ||
318 | } | ||
319 | |||
320 | DEBUGP("nf_nat_h323: expect T.120 %u.%u.%u.%u:%hu->%u.%u.%u.%u:%hu\n", | ||
321 | NIPQUAD(exp->tuple.src.ip), ntohs(exp->tuple.src.u.tcp.port), | ||
322 | NIPQUAD(exp->tuple.dst.ip), ntohs(exp->tuple.dst.u.tcp.port)); | ||
323 | |||
324 | return 0; | ||
325 | } | ||
326 | |||
327 | /****************************************************************************/ | ||
328 | static int nat_h245(struct sk_buff **pskb, struct nf_conn *ct, | ||
329 | enum ip_conntrack_info ctinfo, | ||
330 | unsigned char **data, int dataoff, | ||
331 | TransportAddress *taddr, __be16 port, | ||
332 | struct nf_conntrack_expect *exp) | ||
333 | { | ||
334 | struct nf_ct_h323_master *info = &nfct_help(ct)->help.ct_h323_info; | ||
335 | int dir = CTINFO2DIR(ctinfo); | ||
336 | u_int16_t nated_port = ntohs(port); | ||
337 | |||
338 | /* Set expectations for NAT */ | ||
339 | exp->saved_proto.tcp.port = exp->tuple.dst.u.tcp.port; | ||
340 | exp->expectfn = nf_nat_follow_master; | ||
341 | exp->dir = !dir; | ||
342 | |||
343 | /* Check existing expects */ | ||
344 | if (info->sig_port[dir] == port) | ||
345 | nated_port = ntohs(info->sig_port[!dir]); | ||
346 | |||
347 | /* Try to get same port: if not, try to change it. */ | ||
348 | for (; nated_port != 0; nated_port++) { | ||
349 | exp->tuple.dst.u.tcp.port = htons(nated_port); | ||
350 | if (nf_conntrack_expect_related(exp) == 0) | ||
351 | break; | ||
352 | } | ||
353 | |||
354 | if (nated_port == 0) { /* No port available */ | ||
355 | if (net_ratelimit()) | ||
356 | printk("nf_nat_q931: out of TCP ports\n"); | ||
357 | return 0; | ||
358 | } | ||
359 | |||
360 | /* Modify signal */ | ||
361 | if (set_h225_addr(pskb, data, dataoff, taddr, | ||
362 | &ct->tuplehash[!dir].tuple.dst.u3, | ||
363 | htons(nated_port)) == 0) { | ||
364 | /* Save ports */ | ||
365 | info->sig_port[dir] = port; | ||
366 | info->sig_port[!dir] = htons(nated_port); | ||
367 | } else { | ||
368 | nf_conntrack_unexpect_related(exp); | ||
369 | return -1; | ||
370 | } | ||
371 | |||
372 | DEBUGP("nf_nat_q931: expect H.245 %u.%u.%u.%u:%hu->%u.%u.%u.%u:%hu\n", | ||
373 | NIPQUAD(exp->tuple.src.ip), ntohs(exp->tuple.src.u.tcp.port), | ||
374 | NIPQUAD(exp->tuple.dst.ip), ntohs(exp->tuple.dst.u.tcp.port)); | ||
375 | |||
376 | return 0; | ||
377 | } | ||
378 | |||
379 | /**************************************************************************** | ||
380 | * This conntrack expect function replaces nf_conntrack_q931_expect() | ||
381 | * which was set by nf_conntrack_h323.c. | ||
382 | ****************************************************************************/ | ||
383 | static void ip_nat_q931_expect(struct nf_conn *new, | ||
384 | struct nf_conntrack_expect *this) | ||
385 | { | ||
386 | struct ip_nat_range range; | ||
387 | |||
388 | if (this->tuple.src.u3.ip != 0) { /* Only accept calls from GK */ | ||
389 | nf_nat_follow_master(new, this); | ||
390 | return; | ||
391 | } | ||
392 | |||
393 | /* This must be a fresh one. */ | ||
394 | BUG_ON(new->status & IPS_NAT_DONE_MASK); | ||
395 | |||
396 | /* Change src to where master sends to */ | ||
397 | range.flags = IP_NAT_RANGE_MAP_IPS; | ||
398 | range.min_ip = range.max_ip = new->tuplehash[!this->dir].tuple.src.u3.ip; | ||
399 | |||
400 | /* hook doesn't matter, but it has to do source manip */ | ||
401 | nf_nat_setup_info(new, &range, NF_IP_POST_ROUTING); | ||
402 | |||
403 | /* For DST manip, map port here to where it's expected. */ | ||
404 | range.flags = (IP_NAT_RANGE_MAP_IPS | IP_NAT_RANGE_PROTO_SPECIFIED); | ||
405 | range.min = range.max = this->saved_proto; | ||
406 | range.min_ip = range.max_ip = | ||
407 | new->master->tuplehash[!this->dir].tuple.src.u3.ip; | ||
408 | |||
409 | /* hook doesn't matter, but it has to do destination manip */ | ||
410 | nf_nat_setup_info(new, &range, NF_IP_PRE_ROUTING); | ||
411 | } | ||
412 | |||
413 | /****************************************************************************/ | ||
414 | static int nat_q931(struct sk_buff **pskb, struct nf_conn *ct, | ||
415 | enum ip_conntrack_info ctinfo, | ||
416 | unsigned char **data, TransportAddress *taddr, int idx, | ||
417 | __be16 port, struct nf_conntrack_expect *exp) | ||
418 | { | ||
419 | struct nf_ct_h323_master *info = &nfct_help(ct)->help.ct_h323_info; | ||
420 | int dir = CTINFO2DIR(ctinfo); | ||
421 | u_int16_t nated_port = ntohs(port); | ||
422 | union nf_conntrack_address addr; | ||
423 | |||
424 | /* Set expectations for NAT */ | ||
425 | exp->saved_proto.tcp.port = exp->tuple.dst.u.tcp.port; | ||
426 | exp->expectfn = ip_nat_q931_expect; | ||
427 | exp->dir = !dir; | ||
428 | |||
429 | /* Check existing expects */ | ||
430 | if (info->sig_port[dir] == port) | ||
431 | nated_port = ntohs(info->sig_port[!dir]); | ||
432 | |||
433 | /* Try to get same port: if not, try to change it. */ | ||
434 | for (; nated_port != 0; nated_port++) { | ||
435 | exp->tuple.dst.u.tcp.port = htons(nated_port); | ||
436 | if (nf_conntrack_expect_related(exp) == 0) | ||
437 | break; | ||
438 | } | ||
439 | |||
440 | if (nated_port == 0) { /* No port available */ | ||
441 | if (net_ratelimit()) | ||
442 | printk("nf_nat_ras: out of TCP ports\n"); | ||
443 | return 0; | ||
444 | } | ||
445 | |||
446 | /* Modify signal */ | ||
447 | if (set_h225_addr(pskb, data, 0, &taddr[idx], | ||
448 | &ct->tuplehash[!dir].tuple.dst.u3, | ||
449 | htons(nated_port)) == 0) { | ||
450 | /* Save ports */ | ||
451 | info->sig_port[dir] = port; | ||
452 | info->sig_port[!dir] = htons(nated_port); | ||
453 | |||
454 | /* Fix for Gnomemeeting */ | ||
455 | if (idx > 0 && | ||
456 | get_h225_addr(ct, *data, &taddr[0], &addr, &port) && | ||
457 | (ntohl(addr.ip) & 0xff000000) == 0x7f000000) { | ||
458 | set_h225_addr_hook(pskb, data, 0, &taddr[0], | ||
459 | &ct->tuplehash[!dir].tuple.dst.u3, | ||
460 | info->sig_port[!dir]); | ||
461 | } | ||
462 | } else { | ||
463 | nf_conntrack_unexpect_related(exp); | ||
464 | return -1; | ||
465 | } | ||
466 | |||
467 | /* Success */ | ||
468 | DEBUGP("nf_nat_ras: expect Q.931 %u.%u.%u.%u:%hu->%u.%u.%u.%u:%hu\n", | ||
469 | NIPQUAD(exp->tuple.src.ip), ntohs(exp->tuple.src.u.tcp.port), | ||
470 | NIPQUAD(exp->tuple.dst.ip), ntohs(exp->tuple.dst.u.tcp.port)); | ||
471 | |||
472 | return 0; | ||
473 | } | ||
474 | |||
475 | /****************************************************************************/ | ||
476 | static void ip_nat_callforwarding_expect(struct nf_conn *new, | ||
477 | struct nf_conntrack_expect *this) | ||
478 | { | ||
479 | struct nf_nat_range range; | ||
480 | |||
481 | /* This must be a fresh one. */ | ||
482 | BUG_ON(new->status & IPS_NAT_DONE_MASK); | ||
483 | |||
484 | /* Change src to where master sends to */ | ||
485 | range.flags = IP_NAT_RANGE_MAP_IPS; | ||
486 | range.min_ip = range.max_ip = new->tuplehash[!this->dir].tuple.src.u3.ip; | ||
487 | |||
488 | /* hook doesn't matter, but it has to do source manip */ | ||
489 | nf_nat_setup_info(new, &range, NF_IP_POST_ROUTING); | ||
490 | |||
491 | /* For DST manip, map port here to where it's expected. */ | ||
492 | range.flags = (IP_NAT_RANGE_MAP_IPS | IP_NAT_RANGE_PROTO_SPECIFIED); | ||
493 | range.min = range.max = this->saved_proto; | ||
494 | range.min_ip = range.max_ip = this->saved_ip; | ||
495 | |||
496 | /* hook doesn't matter, but it has to do destination manip */ | ||
497 | nf_nat_setup_info(new, &range, NF_IP_PRE_ROUTING); | ||
498 | } | ||
499 | |||
500 | /****************************************************************************/ | ||
501 | static int nat_callforwarding(struct sk_buff **pskb, struct nf_conn *ct, | ||
502 | enum ip_conntrack_info ctinfo, | ||
503 | unsigned char **data, int dataoff, | ||
504 | TransportAddress *taddr, __be16 port, | ||
505 | struct nf_conntrack_expect *exp) | ||
506 | { | ||
507 | int dir = CTINFO2DIR(ctinfo); | ||
508 | u_int16_t nated_port; | ||
509 | |||
510 | /* Set expectations for NAT */ | ||
511 | exp->saved_ip = exp->tuple.dst.u3.ip; | ||
512 | exp->tuple.dst.u3.ip = ct->tuplehash[!dir].tuple.dst.u3.ip; | ||
513 | exp->saved_proto.tcp.port = exp->tuple.dst.u.tcp.port; | ||
514 | exp->expectfn = ip_nat_callforwarding_expect; | ||
515 | exp->dir = !dir; | ||
516 | |||
517 | /* Try to get same port: if not, try to change it. */ | ||
518 | for (nated_port = ntohs(port); nated_port != 0; nated_port++) { | ||
519 | exp->tuple.dst.u.tcp.port = htons(nated_port); | ||
520 | if (nf_conntrack_expect_related(exp) == 0) | ||
521 | break; | ||
522 | } | ||
523 | |||
524 | if (nated_port == 0) { /* No port available */ | ||
525 | if (net_ratelimit()) | ||
526 | printk("nf_nat_q931: out of TCP ports\n"); | ||
527 | return 0; | ||
528 | } | ||
529 | |||
530 | /* Modify signal */ | ||
531 | if (!set_h225_addr(pskb, data, dataoff, taddr, | ||
532 | &ct->tuplehash[!dir].tuple.dst.u3, | ||
533 | htons(nated_port)) == 0) { | ||
534 | nf_conntrack_unexpect_related(exp); | ||
535 | return -1; | ||
536 | } | ||
537 | |||
538 | /* Success */ | ||
539 | DEBUGP("nf_nat_q931: expect Call Forwarding " | ||
540 | "%u.%u.%u.%u:%hu->%u.%u.%u.%u:%hu\n", | ||
541 | NIPQUAD(exp->tuple.src.ip), ntohs(exp->tuple.src.u.tcp.port), | ||
542 | NIPQUAD(exp->tuple.dst.ip), ntohs(exp->tuple.dst.u.tcp.port)); | ||
543 | |||
544 | return 0; | ||
545 | } | ||
546 | |||
547 | /****************************************************************************/ | ||
548 | static int __init init(void) | ||
549 | { | ||
550 | BUG_ON(rcu_dereference(set_h245_addr_hook) != NULL); | ||
551 | BUG_ON(rcu_dereference(set_h225_addr_hook) != NULL); | ||
552 | BUG_ON(rcu_dereference(set_sig_addr_hook) != NULL); | ||
553 | BUG_ON(rcu_dereference(set_ras_addr_hook) != NULL); | ||
554 | BUG_ON(rcu_dereference(nat_rtp_rtcp_hook) != NULL); | ||
555 | BUG_ON(rcu_dereference(nat_t120_hook) != NULL); | ||
556 | BUG_ON(rcu_dereference(nat_h245_hook) != NULL); | ||
557 | BUG_ON(rcu_dereference(nat_callforwarding_hook) != NULL); | ||
558 | BUG_ON(rcu_dereference(nat_q931_hook) != NULL); | ||
559 | |||
560 | rcu_assign_pointer(set_h245_addr_hook, set_h245_addr); | ||
561 | rcu_assign_pointer(set_h225_addr_hook, set_h225_addr); | ||
562 | rcu_assign_pointer(set_sig_addr_hook, set_sig_addr); | ||
563 | rcu_assign_pointer(set_ras_addr_hook, set_ras_addr); | ||
564 | rcu_assign_pointer(nat_rtp_rtcp_hook, nat_rtp_rtcp); | ||
565 | rcu_assign_pointer(nat_t120_hook, nat_t120); | ||
566 | rcu_assign_pointer(nat_h245_hook, nat_h245); | ||
567 | rcu_assign_pointer(nat_callforwarding_hook, nat_callforwarding); | ||
568 | rcu_assign_pointer(nat_q931_hook, nat_q931); | ||
569 | |||
570 | DEBUGP("nf_nat_h323: init success\n"); | ||
571 | return 0; | ||
572 | } | ||
573 | |||
574 | /****************************************************************************/ | ||
575 | static void __exit fini(void) | ||
576 | { | ||
577 | rcu_assign_pointer(set_h245_addr_hook, NULL); | ||
578 | rcu_assign_pointer(set_h225_addr_hook, NULL); | ||
579 | rcu_assign_pointer(set_sig_addr_hook, NULL); | ||
580 | rcu_assign_pointer(set_ras_addr_hook, NULL); | ||
581 | rcu_assign_pointer(nat_rtp_rtcp_hook, NULL); | ||
582 | rcu_assign_pointer(nat_t120_hook, NULL); | ||
583 | rcu_assign_pointer(nat_h245_hook, NULL); | ||
584 | rcu_assign_pointer(nat_callforwarding_hook, NULL); | ||
585 | rcu_assign_pointer(nat_q931_hook, NULL); | ||
586 | synchronize_rcu(); | ||
587 | } | ||
588 | |||
589 | /****************************************************************************/ | ||
590 | module_init(init); | ||
591 | module_exit(fini); | ||
592 | |||
593 | MODULE_AUTHOR("Jing Min Zhao <zhaojingmin@users.sourceforge.net>"); | ||
594 | MODULE_DESCRIPTION("H.323 NAT helper"); | ||
595 | MODULE_LICENSE("GPL"); | ||
596 | MODULE_ALIAS("ip_nat_h323"); | ||