aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-h248.h
blob: 89249df0cd013c8873d4d809919ac06cbb3a89e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
/* Do not modify this file.                                                   */
/* It is created automatically by the ASN.1 to Ethereal dissector compiler    */
/* ./packet-h248.h                                                            */
/* ../../tools/asn2eth.py -X -b -e -p h248 -c h248.cnf -s packet-h248-template MEGACO.asn */

/* Input file: packet-h248-template.h */

/* packet-h248.h
 * Routines for H.248/MEGACO packet dissection
 * Ronnie Sahlberg 2004
 *
 * $Id$
 *
 * Ethereal - Network traffic analyzer
 * By Gerald Combs <gerald@ethereal.com>
 * Copyright 1998 Gerald Combs
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */

#ifndef PACKET_H248_H
#define PACKET_H248_H

/*#include "packet-h248-exp.h"*/

typedef enum {
    H248_CMD_NONE,
    H248_CMD_ADD,
    H248_CMD_MOVE,
    H248_CMD_MOD,
    H248_CMD_SUB,
    H248_CMD_AUDITCAP,
    H248_CMD_AUDITVAL,
    H248_CMD_NOTIFY,
    H248_CMD_SVCCHG,
} h248_cmd_type_t;

typedef enum {
    H248_TRX_NONE,
    H248_TRX_REQUEST,
    H248_TRX_PENDING,
    H248_TRX_REPLY,
    H248_TRX_ACK,
} h248_msg_type_t;

/* per command info */
typedef struct _h248_cmd_info_t h248_cmd_info_t;

/* per context info */
typedef struct _h248_context_info_t h248_context_info_t;

/* per command message info */
typedef struct _h248_cmdmsg_info_t {
    guint32 transaction_id;
    guint32 context_id;
    guint offset;
    h248_cmd_type_t cmd_type;
    h248_msg_type_t msg_type;
    guint error_code;
    gboolean term_is_wildcard;
    gchar* term_id;
    h248_cmd_info_t* cmd_info;
} h248_cmdmsg_info_t;


struct _h248_cmd_info_t {
    gchar* key;
    
    guint32 trx_id;
    h248_cmd_type_t type;

    guint request_frame;
    guint response_frame;
    guint pendings;
    
    gboolean choose_ctx;
    guint error_code;
     
    h248_context_info_t* context;
    
    h248_cmd_info_t* next;
    h248_cmd_info_t* last;
};

struct _h248_context_info_t {
    gchar* key;

    guint32 ctx_id;

    guint creation_frame;
    guint last_frame;

    h248_cmd_info_t* cmds;
    h248_context_info_t* prior;
};

typedef void (*h248_dissect_pkg_item_t)(gboolean implicit_tag, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);

extern void h248_add_package_property(guint package, guint property, h248_dissect_pkg_item_t);
extern void h248_add_package_event(guint package, guint property, h248_dissect_pkg_item_t);
extern void h248_add_package_signal(guint package, guint property, h248_dissect_pkg_item_t);

#endif  /* PACKET_H248_H */