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