e4f24acc3f88b8b716fdd20203718243ec2a0313
[obnox/wireshark/wip.git] / asn1 / ftbp / packet-ftbp-template.c
1 /* packet-ftbp.c
2  * Routines for File Transfer Body Part (FTBP) dissection (used in X.420 content)
3  * Graeme Lunt 2005
4  *
5  * $Id$
6  *
7  * Ethereal - Network traffic analyzer
8  * By Gerald Combs <gerald@ethereal.com>
9  * Copyright 1998 Gerald Combs
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
24  */
25
26 #ifdef HAVE_CONFIG_H
27 # include "config.h"
28 #endif
29
30 #include <glib.h>
31 #include <epan/packet.h>
32 #include <epan/conversation.h>
33
34 #include <stdio.h>
35 #include <string.h>
36
37 #include "packet-ber.h"
38
39 #include "packet-acse.h"
40 #include "packet-ftam.h"
41 #include "packet-x411.h" 
42 #include "packet-x420.h" 
43
44 #include "packet-ftbp.h"
45
46 #define PNAME  "X.420 File Transfer Body Part"
47 #define PSNAME "FTBP"
48 #define PFNAME "ftbp"
49
50 /* Initialize the protocol and registered fields */
51 int proto_ftbp = -1;
52
53 #include "packet-ftbp-hf.c"
54
55 /* Initialize the subtree pointers */
56 static gint ett_ftbp = -1;
57 #include "packet-ftbp-ett.c"
58
59 #include "packet-ftbp-fn.c"
60
61
62 /*--- proto_register_ftbp -------------------------------------------*/
63 void proto_register_ftbp(void) {
64
65   /* List of fields */
66   static hf_register_info hf[] =
67   {
68 #include "packet-ftbp-hfarr.c"
69   };
70
71   /* List of subtrees */
72   static gint *ett[] = {
73     &ett_ftbp,
74 #include "packet-ftbp-ettarr.c"
75   };
76
77   /* Register protocol */
78   proto_ftbp = proto_register_protocol(PNAME, PSNAME, PFNAME);
79
80   /* Register fields and subtrees */
81   proto_register_field_array(proto_ftbp, hf, array_length(hf));
82   proto_register_subtree_array(ett, array_length(ett));
83
84 }
85
86
87 /*--- proto_reg_handoff_ftbp --- */
88 void proto_reg_handoff_ftbp(void) {
89 #include "packet-ftbp-dis-tab.c"
90
91 }