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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
37 hf_register_info *hf_register_info_create(const guint8 size)
39 hf_register_info *hf = g_malloc0(sizeof(hf_register_info) * size);
42 * if (!hf_register_info)
49 void hf_register_info_destroy(hf_register_info *hf)
56 void hf_register_info_add(hf_register_info *hf, guint8 index,
57 int *p_id, const char *name, const char *abbrev,
58 enum ftenum type, int display, const void *strings,
59 guint32 bitmask, const char *blurb)
61 hf[index].p_id = p_id;
62 hf[index].hfinfo.name = name;
63 hf[index].hfinfo.abbrev = abbrev;
64 hf[index].hfinfo.type = type;
65 hf[index].hfinfo.display = display;
66 hf[index].hfinfo.strings = strings;
67 hf[index].hfinfo.bitmask = bitmask;
68 hf[index].hfinfo.blurb = blurb;
69 hf[index].hfinfo.id = 0;
70 hf[index].hfinfo.parent = 0;
71 hf[index].hfinfo.ref_type = HF_REF_TYPE_NONE;
72 hf[index].hfinfo.bitshift = 0;
73 hf[index].hfinfo.same_name_next = NULL;
74 hf[index].hfinfo.same_name_prev = NULL;
77 void hf_register_info_print(hf_register_info *hf, guint8 size)
83 for (c = 0; c < size; c++) {
84 printf("%s : %s : %s\n", hf[c].hfinfo.name,
90 #endif /* HAVE_PYTHON */