diff options
author | Guy Harris <guy@alum.mit.edu> | 2016-01-24 17:10:20 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2016-01-25 02:24:34 +0000 |
commit | 099698445b5cd60b00777ae47f68fba620fa975e (patch) | |
tree | 8c37921e0fa9893dd0c00e3b66f287c4d7d1a78d /epan/proto_data.h | |
parent | 6beb19af8e86c17d9b2d69bf1cc0b2e24fbc111b (diff) |
Move the proto data stuff out of frame_data.[ch].
It's not tied to the frame_data structure any more, so it belongs by
itself.
Clean up some #includes while we're at it; in particular, frame_data.h
doesn't use anything related to tvbuffs, so don't have it gratuitiously
include tvbuff.h.
Change-Id: Ic32922d4a3840bac47007c5d4c546b8842245e0c
Reviewed-on: https://code.wireshark.org/review/13518
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/proto_data.h')
-rw-r--r-- | epan/proto_data.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/epan/proto_data.h b/epan/proto_data.h new file mode 100644 index 0000000000..987eca7b9e --- /dev/null +++ b/epan/proto_data.h @@ -0,0 +1,54 @@ +/* proto_data.h + * Definitions for protocol-specific data + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1998 Gerald Combs + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#ifndef __PROTO_DATA_H__ +#define __PROTO_DATA_H__ + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +#include "ws_symbol_export.h" + +WS_DLL_PUBLIC void p_add_proto_data(wmem_allocator_t *scope, struct _packet_info* pinfo, int proto, guint32 key, void *proto_data); +WS_DLL_PUBLIC void *p_get_proto_data(wmem_allocator_t *scope, struct _packet_info* pinfo, int proto, guint32 key); +WS_DLL_PUBLIC void p_remove_proto_data(wmem_allocator_t *scope, struct _packet_info* pinfo, int proto, guint32 key); +gchar *p_get_proto_name_and_key(wmem_allocator_t *scope, struct _packet_info* pinfo, guint pfd_index); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* __PROTO_DATA__ */ + +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 2 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * vi: set shiftwidth=2 tabstop=8 expandtab: + * :indentSize=2:tabSize=8:noTabs=true: + */ |