- Decode some more annex C fields
[obnox/wireshark/wip.git] / epan / dissectors / packet-h248.h
1 /* Do not modify this file.                                                   */
2 /* It is created automatically by the ASN.1 to Ethereal dissector compiler    */
3 /* ./packet-h248.h                                                            */
4 /* ../../tools/asn2eth.py -X -b -e -p h248 -c h248.cnf -s packet-h248-template MEGACO.asn */
5
6 /* Input file: packet-h248-template.h */
7
8 #line 1 "packet-h248-template.h"
9 /* packet-h248.h
10  * Definitions for H.248/MEGACO packet dissection
11  *
12  * Ronnie Sahlberg 2004
13  * Luis Ontanon 2005
14  *
15  * $Id$
16  *
17  * Ethereal - Network traffic analyzer
18  * By Gerald Combs <gerald@ethereal.com>
19  * Copyright 1998 Gerald Combs
20  *
21  * This program is free software; you can redistribute it and/or
22  * modify it under the terms of the GNU General Public License
23  * as published by the Free Software Foundation; either version 2
24  * of the License, or (at your option) any later version.
25  *
26  * This program is distributed in the hope that it will be useful,
27  * but WITHOUT ANY WARRANTY; without even the implied warranty of
28  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
29  * GNU General Public License for more details.
30  *
31  * You should have received a copy of the GNU General Public License
32  * along with this program; if not, write to the Free Software
33  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
34  */
35
36 #ifndef PACKET_H248_H
37 #define PACKET_H248_H
38
39 /*#include "packet-h248-exp.h"*/
40
41 typedef enum {
42     H248_CMD_NONE,
43     H248_CMD_ADD_REQ,
44     H248_CMD_MOVE_REQ,
45     H248_CMD_MOD_REQ,
46     H248_CMD_SUB_REQ,
47     H248_CMD_AUDITCAP_REQ,
48     H248_CMD_AUDITVAL_REQ,
49     H248_CMD_NOTIFY_REQ,
50     H248_CMD_SVCCHG_REQ,
51     H248_CMD_TOPOLOGY_REQ,
52     H248_CMD_CTX_ATTR_AUDIT_REQ,
53     H248_CMD_ADD_REPLY,
54     H248_CMD_MOVE_REPLY,
55     H248_CMD_MOD_REPLY,
56     H248_CMD_SUB_REPLY,
57     H248_CMD_AUDITCAP_REPLY,
58     H248_CMD_AUDITVAL_REPLY,
59     H248_CMD_NOTIFY_REPLY,
60     H248_CMD_SVCCHG_REPLY,
61     H248_CMD_TOPOLOGY_REPLY,
62     H248_CMD_REPLY
63 } h248_cmd_type_t;
64
65 typedef enum {
66     H248_TRX_NONE,
67     H248_TRX_REQUEST,
68     H248_TRX_PENDING,
69     H248_TRX_REPLY,
70     H248_TRX_ACK
71 } h248_trx_type_t;
72
73
74 typedef struct _h248_msg_t {
75     gchar* addr_label;
76     guint framenum;
77     struct _h248_trx_msg_t* trxs;
78     gboolean commited;
79 } h248_msg_t;
80
81 typedef struct _h248_trx_msg_t {
82     struct _h248_trx_t* trx;
83     struct _h248_trx_msg_t* next;
84     struct _h248_trx_msg_t* last;
85 } h248_trx_msg_t;
86
87 typedef struct _h248_cmd_msg_t {
88     struct _h248_cmd_t* cmd;
89     struct _h248_cmd_msg_t* next;
90     struct _h248_cmd_msg_t* last;
91 } h248_cmd_msg_t;
92
93 typedef struct _h248_trx_t {
94     gchar* key;
95     guint32 id;
96     h248_trx_type_t type;
97     guint pendings;
98     struct _h248_cmd_msg_t* cmds;
99     struct _h248_trx_ctx_t* ctxs;
100     guint error;
101 } h248_trx_t;
102
103 #define H248_TERM_TYPE_UNKNOWN 0
104 #define H248_TERM_TYPE_AAL1 1
105 #define H248_TERM_TYPE_AAL2 2
106 #define H248_TERM_TYPE_AAL1_STRUCT 3
107 #define H248_TERM_TYPE_IP_RTP 4
108 #define H248_TERM_TYPE_TDM 5
109
110 typedef enum _h248_wildcard_t {
111     H248_WILDCARD_NONE,
112     H248_WILDCARD_CHOOSE,
113     H248_WILDCARD_ALL
114 } h248_wildcard_t;
115
116 typedef struct _h248_term_t {
117     gchar* str;
118     
119     guint8* buffer;
120     guint len;
121
122     guint type;
123     gchar* bir;
124     gchar* nsap;
125
126     h248_msg_t* start;
127     
128     /*
129     guint16 vp;
130     guint16 vc;
131     guint32 ts_mask;
132     address* src_addr;
133     address* dst_addr;
134     guint16 src_pt;
135     guint16 dst_pt;
136     */
137
138 } h248_term_t;
139
140 typedef struct _h248_terms_t {
141     h248_term_t* term;
142     struct _h248_terms_t* next;
143     struct _h248_terms_t* last;
144 } h248_terms_t;
145
146 typedef struct _h248_cmd_t {
147     guint offset;
148     h248_cmd_type_t type;
149     h248_terms_t terms;
150     struct _h248_msg_t* msg;
151     struct _h248_trx_t* trx;
152     struct _h248_ctx_t* ctx;
153     guint error;
154 } h248_cmd_t;
155
156
157 typedef struct _h248_ctx_t {
158     gchar* key;
159     guint32 id;
160     guint first_frame;
161     struct _h248_cmd_msg_t* cmds;
162     struct _h248_ctx_t* prev;
163     h248_terms_t terms;
164 } h248_ctx_t;
165
166
167 #endif  /* PACKET_H248_H */