5 * Wireshark Protocol Python Binding
7 * Copyright (c) 2009 by Sebastien Tandel <sebastien [AT] tandel [dot] be>
8 * Copyright (c) 2001 by Gerald Combs <gerald@wireshark.org>
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.
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.
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.
39 hf_register_info *hf_register_info_create(const guint8 size)
41 hf_register_info *hf = g_malloc0(sizeof(hf_register_info) * size);
44 * if (!hf_register_info)
51 void hf_register_info_destroy(hf_register_info *hf)
58 void hf_register_info_add(hf_register_info *hf, guint8 index,
59 int *p_id, const char *name, const char *abbrev,
60 enum ftenum type, int display, const void *strings,
61 guint32 bitmask, const char *blurb)
63 hf[index].p_id = p_id;
64 hf[index].hfinfo.name = name;
65 hf[index].hfinfo.abbrev = abbrev;
66 hf[index].hfinfo.type = type;
67 hf[index].hfinfo.display = display;
68 hf[index].hfinfo.strings = strings;
69 hf[index].hfinfo.bitmask = bitmask;
70 hf[index].hfinfo.blurb = blurb;
71 hf[index].hfinfo.id = 0;
72 hf[index].hfinfo.parent = 0;
73 hf[index].hfinfo.ref_count = 0;
74 hf[index].hfinfo.bitshift = 0;
75 hf[index].hfinfo.same_name_next = NULL;
76 hf[index].hfinfo.same_name_prev = NULL;
79 void hf_register_info_print(hf_register_info *hf, guint8 size)
85 for (c = 0; c < size; c++) {
86 printf("%s : %s : %s\n", hf[c].hfinfo.name,
92 #endif /* HAVE_PYTHON */