2 * Collecting of Expert information.
4 * For further info, see: http://wiki.wireshark.org/Development/ExpertInfo
8 * Wireshark - Network traffic analyzer
9 * By Gerald Combs <gerald@wireshark.org>
10 * Copyright 1998 Gerald Combs
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
30 #include <epan/packet_info.h>
31 #include <epan/proto.h>
32 #include "value_string.h"
33 #include "ws_symbol_export.h"
37 #endif /* __cplusplus */
39 /** only for internal and display use. */
40 typedef struct expert_info_s {
44 const gchar *protocol;
49 static const value_string expert_group_vals[] = {
50 { PI_CHECKSUM, "Checksum" },
51 { PI_SEQUENCE, "Sequence" },
52 { PI_RESPONSE_CODE, "Response" },
53 { PI_REQUEST_CODE, "Request" },
54 { PI_UNDECODED, "Undecoded" },
55 { PI_REASSEMBLE, "Reassemble" },
56 { PI_MALFORMED, "Malformed" },
57 { PI_DEBUG, "Debug" },
58 { PI_PROTOCOL, "Protocol" },
59 { PI_SECURITY, "Security" },
60 { PI_COMMENTS_GROUP, "Comment" },
64 static const value_string expert_severity_vals[] = {
65 { PI_ERROR, "Error" },
69 { PI_COMMENT, "Comment" },
74 /* "proto_expert" is exported from libwireshark.dll.
75 * Thus we need a special declaration.
77 WS_DLL_PUBLIC int proto_expert;
86 expert_get_highest_severity(void);
88 /** Add an expert info.
89 Add an expert info tree to a protocol item, with classification and message.
90 @param pinfo Packet info of the currently processed packet. May be NULL if
92 @param pi Current protocol item (or NULL)
93 @param group The expert group (like PI_CHECKSUM - see: proto.h)
94 @param severity The expert severity (like PI_WARN - see: proto.h)
95 @param format Printf-style format string for additional arguments
98 expert_add_info_format(packet_info *pinfo, proto_item *pi, int group,
99 int severity, const char *format, ...)
102 /** Add an expert info about not dissected "item"
103 Add an expert info tree to a not dissected protocol item.
104 @param tvb The tvb associated with the item.
105 @param pinfo Packet info of the currently processed packet. May be NULL.
106 @param tree Tree to add the item to
107 @param offset Offset in tvb
108 @param length The length of the item.
109 @param severity The expert severity (like PI_WARN - see: proto.h)
113 expert_add_undecoded_item(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, int length, const int severity);
116 #endif /* __cplusplus */
118 #endif /* __EXPERT_H__ */