2 * Definitions for address types
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 1998 Gerald Combs
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 #ifndef __ADDRESS_TYPES_H__
24 #define __ADDRESS_TYPES_H__
30 #endif /* __cplusplus */
32 typedef int (*AddrValueToString)(const address* addr, gchar *buf, int buf_len);
33 typedef int (*AddrValueToStringLen)(const address* addr);
34 typedef int (*AddrFixedLen)(void);
35 typedef const char* (*AddrColFilterString)(const address* addr, gboolean src);
36 typedef int (*AddrNameResolutionLen)(void);
37 typedef const gchar* (*AddrNameResolutionToString)(const address* addr);
39 struct _address_type_t;
40 typedef struct _address_type_t address_type_t;
42 WS_DLL_PUBLIC int address_type_dissector_register(const char* name, const char* pretty_name,
43 AddrValueToString to_str_func, AddrValueToStringLen str_len_func,
44 AddrColFilterString col_filter_str_func, AddrFixedLen fixed_len_func,
45 AddrNameResolutionToString name_res_str_func, AddrNameResolutionLen name_res_len_func);
47 void address_types_initialize(void);
49 /* Address type functions used by multiple (dissector) address types */
50 int none_addr_to_str(const address* addr, gchar *buf, int buf_len);
51 int none_addr_str_len(const address* addr);
52 int none_addr_len(void);
54 int ether_to_str(const address* addr, gchar *buf, int buf_len);
55 int ether_str_len(const address* addr);
57 const gchar* ether_name_resolution_str(const address* addr);
58 int ether_name_resolution_len(void);
62 /* XXX - Temporary? Here at least until all of the address type handling is finalized
63 * Otherwise should be folded into address_types.c or just be handled with function pointers
65 const char* address_type_column_filter_string(const address* addr, gboolean src);
70 #endif /* __cplusplus */
72 #endif /* __ADDRESS_TYPES_H__ */
75 * Editor modelines - http://www.wireshark.org/tools/modelines.html
80 * indent-tabs-mode: nil
83 * vi: set shiftwidth=4 tabstop=8 expandtab:
84 * :indentSize=4:tabSize=8:noTabs=true: