EPL: Fix segmented transfer complete detection
[metze/wireshark/wip.git] / epan / address_types.h
1 /* address_types.h
2  * Definitions for address types
3  *
4  * Wireshark - Network traffic analyzer
5  * By Gerald Combs <gerald@wireshark.org>
6  * Copyright 1998 Gerald Combs
7  *
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.
12  *
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.
17  *
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.
21  */
22
23 #ifndef __ADDRESS_TYPES_H__
24 #define __ADDRESS_TYPES_H__
25
26 #include "address.h"
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif /* __cplusplus */
31
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);
38
39 struct _address_type_t;
40 typedef struct _address_type_t address_type_t;
41
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);
46
47 void address_types_initialize(void);
48
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);
53
54 int ether_to_str(const address* addr, gchar *buf, int buf_len);
55 int ether_str_len(const address* addr);
56 int ether_len(void);
57 const gchar* ether_name_resolution_str(const address* addr);
58 int ether_name_resolution_len(void);
59
60
61
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
64  */
65 const char* address_type_column_filter_string(const address* addr, gboolean src);
66
67
68 #ifdef __cplusplus
69 }
70 #endif /* __cplusplus */
71
72 #endif /* __ADDRESS_TYPES_H__ */
73
74 /*
75  * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
76  *
77  * Local variables:
78  * c-basic-offset: 4
79  * tab-width: 8
80  * indent-tabs-mode: nil
81  * End:
82  *
83  * vi: set shiftwidth=4 tabstop=8 expandtab:
84  * :indentSize=4:tabSize=8:noTabs=true:
85  */