CPMConnect: unify version handling
[wireshark-wip.git] / epan / tpg.c
blob4c6f26858aa0fbe15f31caaf54bec8b17e1b6ca0
1 /* tpg.c
2 * helper functions for TPG
4 * (c) 2005, Luis E. Garcia Ontanon <luis@ontanon.org>
5 *
6 * $Id$
8 * Wireshark - Network traffic analyzer
9 * By Gerald Combs <gerald@wireshark.org>
10 * Copyright 1998 Gerald Combs
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
28 #include "config.h"
30 #include "tpg.h"
31 #include <epan/emem.h>
32 #include <epan/packet.h>
34 extern guint32 tpg_ipv4(tvbparse_elem_t* e _U_) {
35 /* XXX TO DO */
36 return 0;
39 extern guint8* tpg_ipv6(tvbparse_elem_t* e _U_) {
40 /* XXX TO DO */
41 return NULL;
44 extern tpg_parser_data_t* tpg_start(proto_tree* root_tree,
45 tvbuff_t* tvb,
46 int offset,
47 int len,
48 tvbparse_wanted_t* ignore,
49 void* private_data) {
50 tpg_parser_data_t* tpg = ep_alloc(sizeof(tpg_parser_data_t));
51 tpg->private_data = private_data;
52 tpg->tt = tvbparse_init(tvb,offset,len,tpg,ignore);
54 tpg->stack = ep_stack_new();
55 ep_stack_push(tpg->stack,root_tree);
57 return tpg;