Wireshark 2.9.0-477-g68ec514b The Wireshark network protocol analyzer

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

proto.h
Go to the documentation of this file.
1 /* proto.h
2 * Definitions for protocol display
3 *
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 1998 Gerald Combs
7 *
8 * SPDX-License-Identifier: GPL-2.0-or-later
9 */
10
11
23 #ifndef __PROTO_H__
24 #define __PROTO_H__
25
26 #include <stdarg.h>
27
28 #include <glib.h>
29
30 #include <epan/wmem/wmem.h>
31
32 #include "ipv4.h"
33 #include "wsutil/nstime.h"
34 #include "time_fmt.h"
35 #include "tvbuff.h"
36 #include "value_string.h"
37 #include "tfs.h"
38 #include "packet_info.h"
39 #include "ftypes/ftypes.h"
40 #include "register.h"
41 #include "ws_symbol_export.h"
42 #include "ws_attributes.h"
43 #ifdef HAVE_PLUGINS
44 #include "wsutil/plugins.h"
45 #endif
46
47 #ifdef __cplusplus
48 extern "C" {
49 #endif /* __cplusplus */
50
60 WS_DLL_PUBLIC int hf_text_only;
61
63 #define ITEM_LABEL_LENGTH 240
64
65 #define ITEM_LABEL_UNKNOWN_STR "Unknown"
66
67 struct expert_field;
68
70 #define VALS(x) (const struct _value_string*)(x)
71
73 #define VALS64(x) (const struct _val64_string*)(x)
74
76 #define VALS_EXT_PTR(x) (x)
77
79 #define TFS(x) (const struct true_false_string*)(x)
80
81 typedef void (*custom_fmt_func_t)(gchar *, guint32);
82
83 typedef void (*custom_fmt_func_64_t)(gchar *, guint64);
84
92 #define CF_FUNC(x) ((const void *) (gsize) (x))
93
96 #define RVALS(x) (const struct _range_string*)(x)
97
99 #define FRAMENUM_TYPE(x) GINT_TO_POINTER(x)
100
101 struct _protocol;
102
104 typedef struct _protocol protocol_t;
105
116 WS_DLL_PUBLIC WS_NORETURN
117 void proto_report_dissector_bug(const char *format, ...)
118 G_GNUC_PRINTF(1, 2);
119
120 #define REPORT_DISSECTOR_BUG(...) \
121 proto_report_dissector_bug(__VA_ARGS__)
122
126 #if _MSC_VER >= 1400
127 /* XXX - Is there a way to say "quit checking at this point"? */
128 #define __DISSECTOR_ASSERT_STATIC_ANALYSIS_HINT(expression) \
129 ; __analysis_assume(expression);
130 #else
131 #define __DISSECTOR_ASSERT_STATIC_ANALYSIS_HINT(expression)
132 #endif
133
145 #define __DISSECTOR_ASSERT_STRINGIFY(s) # s
146
147 #define __DISSECTOR_ASSERT(expression, file, lineno) \
148 (REPORT_DISSECTOR_BUG("%s:%u: failed assertion \"%s\"", \
149 file, lineno, __DISSECTOR_ASSERT_STRINGIFY(expression)))
150
151 #define __DISSECTOR_ASSERT_HINT(expression, file, lineno, hint) \
152 (REPORT_DISSECTOR_BUG("%s:%u: failed assertion \"%s\" (%s)", \
153 file, lineno, __DISSECTOR_ASSERT_STRINGIFY(expression), hint))
154
155 #define DISSECTOR_ASSERT(expression) \
156 ((void) ((expression) ? (void)0 : \
157 __DISSECTOR_ASSERT (expression, __FILE__, __LINE__))) \
158 __DISSECTOR_ASSERT_STATIC_ANALYSIS_HINT(expression)
159
167 #define DISSECTOR_ASSERT_HINT(expression, hint) \
168 ((void) ((expression) ? (void)0 : \
169 __DISSECTOR_ASSERT_HINT (expression, __FILE__, __LINE__, hint))) \
170 __DISSECTOR_ASSERT_STATIC_ANALYSIS_HINT(expression)
171
172 #if 0
173 /* win32: using a debug breakpoint (int 3) can be very handy while debugging,
174 * as the assert handling of GTK/GLib is currently not very helpful */
175 #define DISSECTOR_ASSERT(expression) \
176 { if(!(expression)) _asm { int 3}; }
177 #endif
178
187 #define DISSECTOR_ASSERT_NOT_REACHED() \
188 (REPORT_DISSECTOR_BUG("%s:%u: failed assertion \"DISSECTOR_ASSERT_NOT_REACHED\"", \
189 __FILE__, __LINE__))
190
210 #define __DISSECTOR_ASSERT_CMPINT(a, op, b, type, fmt) \
211 (REPORT_DISSECTOR_BUG("%s:%u: failed assertion " #a " " #op " " #b " (" fmt " " #op " " fmt ")", \
212 __FILE__, __LINE__, (type)a, (type)b))
213
214 #define DISSECTOR_ASSERT_CMPINT(a, op, b) \
215 ((void) ((a op b) ? (void)0 : \
216 __DISSECTOR_ASSERT_CMPINT (a, op, b, gint64, "%" G_GINT64_MODIFIER "d"))) \
217 __DISSECTOR_ASSERT_STATIC_ANALYSIS_HINT(a op b)
218
224 #define DISSECTOR_ASSERT_CMPUINT(a, op, b) \
225 ((void) ((a op b) ? (void)0 : \
226 __DISSECTOR_ASSERT_CMPINT (a, op, b, guint64, "%" G_GINT64_MODIFIER "u"))) \
227 __DISSECTOR_ASSERT_STATIC_ANALYSIS_HINT(a op b)
228
232 #define DISSECTOR_ASSERT_CMPUINTHEX(a, op, b) \
233 ((void) ((a op b) ? (void)0 : \
234 __DISSECTOR_ASSERT_CMPINT (a, op, b, guint64, "0x%" G_GINT64_MODIFIER "X"))) \
235 __DISSECTOR_ASSERT_STATIC_ANALYSIS_HINT(a op b)
236
237 /*
238 * This is similar to DISSECTOR_ASSERT(hfinfo->type == type) except that
239 * it will report the name of the field with the wrong type as well as
240 * the type.
241 *
242 * @param hfinfo The hfinfo for the field being tested
243 * @param type The type it's expected to have
244 */
245 #define __DISSECTOR_ASSERT_FIELD_TYPE(hfinfo, t) \
246 (REPORT_DISSECTOR_BUG("%s:%u: field %s is not of type "#t, \
247 __FILE__, __LINE__, (hfinfo)->abbrev))
248
249 #define DISSECTOR_ASSERT_FIELD_TYPE(hfinfo, t) \
250 ((void) (((hfinfo)->type == t) ? (void)0 : \
251 __DISSECTOR_ASSERT_FIELD_TYPE ((hfinfo), t))) \
252 __DISSECTOR_ASSERT_STATIC_ANALYSIS_HINT((hfinfo)->type == t)
253
254 #define DISSECTOR_ASSERT_FIELD_TYPE_IS_INTEGRAL(hfinfo) \
255 ((void) ((IS_FT_INT((hfinfo)->type) || \
256 IS_FT_UINT((hfinfo)->type)) ? (void)0 : \
257 REPORT_DISSECTOR_BUG("%s:%u: field %s is not of type FT_CHAR or an FT_{U}INTn type", \
258 __FILE__, __LINE__, (hfinfo)->abbrev))) \
259 __DISSECTOR_ASSERT_STATIC_ANALYSIS_HINT(IS_FT_INT((hfinfo)->type) || \
260 IS_FT_UINT((hfinfo)->type))
261
262 #define __DISSECTOR_ASSERT_FIELD_TYPE_IS_STRING(hfinfo) \
263 (REPORT_DISSECTOR_BUG("%s:%u: field %s is not of type FT_STRING, FT_STRINGZ, or FT_STRINGZPAD", \
264 __FILE__, __LINE__, (hfinfo)->abbrev))
265
266 #define DISSECTOR_ASSERT_FIELD_TYPE_IS_STRING(hfinfo) \
267 ((void) (((hfinfo)->type == FT_STRING || (hfinfo)->type == FT_STRINGZ || \
268 (hfinfo)->type == FT_STRINGZPAD) ? (void)0 : \
269 __DISSECTOR_ASSERT_FIELD_TYPE_IS_STRING ((hfinfo)))) \
270 __DISSECTOR_ASSERT_STATIC_ANALYSIS_HINT((hfinfo)->type == FT_STRING || \
271 (hfinfo)->type == FT_STRINGZ || \
272 (hfinfo)->type == FT_STRINGZPAD)
273
274 #define __DISSECTOR_ASSERT_FIELD_TYPE_IS_TIME(hfinfo) \
275 (REPORT_DISSECTOR_BUG("%s:%u: field %s is not of type FT_ABSOLUTE_TIME or FT_RELATIVE_TIME", \
276 __FILE__, __LINE__, (hfinfo)->abbrev))
277
278 #define DISSECTOR_ASSERT_FIELD_TYPE_IS_TIME(hfinfo) \
279 ((void) (((hfinfo)->type == FT_ABSOLUTE_TIME || \
280 (hfinfo)->type == FT_RELATIVE_TIME) ? (void)0 : \
281 __DISSECTOR_ASSERT_FIELD_TYPE_IS_TIME ((hfinfo)))) \
282 __DISSECTOR_ASSERT_STATIC_ANALYSIS_HINT((hfinfo)->type == FT_ABSOLUTE_TIME || \
283 (hfinfo)->type == FT_RELATIVE_TIME)
284
285 /*
286 * The encoding of a field of a particular type may involve more
287 * than just whether it's big-endian or little-endian and its size.
288 *
289 * For integral values, that's it, as 99.9999999999999% of the machines
290 * out there are 2's complement binary machines with 8-bit bytes,
291 * so the protocols out there expect that and, for example, any Unisys
292 * 2200 series machines out there just have to translate between 2's
293 * complement and 1's complement (and nobody's put any IBM 709x's on
294 * any networks lately :-)).
295 *
296 * However:
297 *
298 * for floating-point numbers, in addition to IEEE decimal
299 * floating-point, there's also IBM System/3x0 and PDP-11/VAX
300 * floating-point - most protocols use IEEE binary, but DCE RPC
301 * can use other formats if that's what the sending host uses;
302 *
303 * for character strings, there are various character encodings
304 * (various ISO 646 sets, ISO 8859/x, various other national
305 * standards, various DOS and Windows encodings, various Mac
306 * encodings, UTF-8, UTF-16, other extensions to ASCII, EBCDIC,
307 * etc.);
308 *
309 * for absolute times, there's UNIX time_t, UNIX time_t followed
310 * by 32-bit microseconds, UNIX time_t followed by 32-bit
311 * nanoseconds, DOS date/time, Windows FILETIME, NTP time, etc..
312 *
313 * We might also, in the future, want to allow a field specifier to
314 * indicate the encoding of the field, or at least its default
315 * encoding, as most fields in most protocols always use the
316 * same encoding (although that's not true of all fields, so we
317 * still need to be able to specify that at run time).
318 *
319 * So, for now, we define ENC_BIG_ENDIAN and ENC_LITTLE_ENDIAN as
320 * bit flags, to be combined, in the future, with other information
321 * to specify the encoding in the last argument to
322 * proto_tree_add_item(), and possibly to specify in a field
323 * definition (e.g., ORed in with the type value).
324 *
325 * Currently, proto_tree_add_item() treats its last argument as a
326 * Boolean - if it's zero, the field is big-endian, and if it's non-zero,
327 * the field is little-endian - and other code in epan/proto.c does
328 * the same. We therefore define ENC_BIG_ENDIAN as 0x00000000 and
329 * ENC_LITTLE_ENDIAN as 0x80000000 - we're using the high-order bit
330 * so that we could put a field type and/or a value such as a character
331 * encoding in the lower bits.
332 */
333 #define ENC_BIG_ENDIAN 0x00000000
334 #define ENC_LITTLE_ENDIAN 0x80000000
335
336 #if G_BYTE_ORDER == G_LITTLE_ENDIAN
337 #define ENC_HOST_ENDIAN ENC_LITTLE_ENDIAN
338 #else
339 #define ENC_HOST_ENDIAN ENC_BIG_ENDIAN
340 #endif
341
342 /*
343 * Historically FT_TIMEs were only timespecs; the only question was whether
344 * they were stored in big- or little-endian format.
345 *
346 * For backwards compatibility, we interpret an encoding of 1 as meaning
347 * "little-endian timespec", so that passing TRUE is interpreted as that.
348 *
349 * We now support:
350 *
351 * ENC_TIME_TIMESPEC - 8 bytes; the first 4 bytes are seconds and the
352 * next 4 bytes are nanoseconds. If the time is absolute, the seconds
353 * are seconds since the UN*X epoch (1970-01-01 00:00:00 UTC). (I.e.,
354 * a UN*X struct timespec with a 4-byte time_t.)
355 *
356 * ENC_TIME_NTP - 8 bytes; the first 4 bytes are seconds since the NTP
357 * epoch (1901-01-01 00:00:00 GMT) and the next 4 bytes are 1/2^32's of
358 * a second since that second. (I.e., a 64-bit count of 1/2^32's of a
359 * second since the NTP epoch, with the upper 32 bits first and the
360 * lower 32 bits second, even when little-endian.)
361 *
362 * ENC_TIME_TOD - 8 bytes, as a count of microseconds since the System/3x0
363 * and z/Architecture epoch (1900-01-01 00:00:00 GMT).
364 *
365 * ENC_TIME_RTPS - 8 bytes; the first 4 bytes are seconds since the UN*X
366 * epoch and the next 4 bytes are are 1/2^32's of a second since that
367 * second. (I.e., it's the offspring of a mating between UN*X time and
368 * NTP time.) It's used by the Object Management Group's Real-Time
369 * Publish-Subscribe Wire Protocol for the Data Distribution Service.
370 *
371 * ENC_TIME_TIMEVAL - 8 bytes; the first 4 bytes are seconds and the
372 * next 4 bytes are microseconds. If the time is absolute, the seconds
373 * are seconds since the UN*X epoch. (I.e., a UN*X struct timeval with
374 * a 4-byte time_t.)
375 *
376 * ENC_TIME_SECS - 4 to 8 bytes, representing a value in seconds.
377 * If the time is absolute, it's seconds since the UN*X epoch.
378 *
379 * ENC_TIME_MSECS - 6 to 8 bytes, representing a value in milliseconds.
380 * If the time is absolute, it's milliseconds since the UN*X epoch.
381 *
382 * ENC_TIME_SECS_NTP - 4 bytes, representing a count of seconds since
383 * the NTP epoch. (I.e., seconds since the NTP epoch.)
384 *
385 * ENC_TIME_RFC_3971 - 8 bytes, representing a count of 1/64ths of a
386 * second since the UN*X epoch; see section 5.3.1 "Timestamp Option"
387 * in RFC 3971.
388 *
389 * ENC_TIME_MSEC_NTP - 4-8 bytes, representing a count of milliseconds since
390 * the NTP epoch. (I.e., milliseconds since the NTP epoch.)
391 */
392 #define ENC_TIME_TIMESPEC 0x00000000
393 #define ENC_TIME_NTP 0x00000002
394 #define ENC_TIME_TOD 0x00000004
395 #define ENC_TIME_RTPS 0x00000008
396 #define ENC_TIME_NTP_BASE_ZERO ENC_TIME_RTPS /* for backwards source compatibility */
397 #define ENC_TIME_TIMEVAL 0x00000010
398 #define ENC_TIME_SECS 0x00000012
399 #define ENC_TIME_MSECS 0x00000014
400 #define ENC_TIME_SECS_NTP 0x00000018
401 #define ENC_TIME_RFC_3971 0x00000020
402 #define ENC_TIME_MSEC_NTP 0x00000022
403
404 /*
405 * Historically, the only place the representation mattered for strings
406 * was with FT_UINT_STRINGs, where we had FALSE for the string length
407 * being big-endian and TRUE for it being little-endian.
408 *
409 * We now have encoding values for the character encoding. The encoding
410 * values are encoded in all but the top bit (which is the byte-order
411 * bit, required for FT_UINT_STRING and for UCS-2 and UTF-16 strings)
412 * and the bottom bit (which we ignore for now so that programs that
413 * pass TRUE for the encoding just do ASCII). (The encodings are given
414 * directly as even numbers in hex, so that make-init-lua.pl can just
415 * turn them into numbers for use in init.lua.)
416 *
417 * We don't yet process ASCII and UTF-8 differently. Ultimately, for
418 * ASCII, all bytes with the 8th bit set should be mapped to some "this
419 * is not a valid character" code point, as ENC_ASCII should mean "this
420 * is ASCII, not some extended variant thereof". We should also map
421 * 0x00 to that as well - null-terminated and null-padded strings
422 * never have NULs in them, but counted strings might. (Either that,
423 * or the values for strings should be counted, not null-terminated.)
424 * For UTF-8, invalid UTF-8 sequences should be mapped to the same
425 * code point.
426 *
427 * For display, perhaps we should also map control characters to the
428 * Unicode glyphs showing the name of the control character in small
429 * caps, diagonally. (Unfortunately, those only exist for C0, not C1.)
430 */
431 #define ENC_CHARENCODING_MASK 0x7FFFFFFE /* mask out byte-order bits */
432 #define ENC_ASCII 0x00000000
433 #define ENC_UTF_8 0x00000002
434 #define ENC_UTF_16 0x00000004
435 #define ENC_UCS_2 0x00000006
436 #define ENC_UCS_4 0x00000008
437 #define ENC_ISO_8859_1 0x0000000A
438 #define ENC_ISO_8859_2 0x0000000C
439 #define ENC_ISO_8859_3 0x0000000E
440 #define ENC_ISO_8859_4 0x00000010
441 #define ENC_ISO_8859_5 0x00000012
442 #define ENC_ISO_8859_6 0x00000014
443 #define ENC_ISO_8859_7 0x00000016
444 #define ENC_ISO_8859_8 0x00000018
445 #define ENC_ISO_8859_9 0x0000001A
446 #define ENC_ISO_8859_10 0x0000001C
447 #define ENC_ISO_8859_11 0x0000001E
448 /* #define ENC_ISO_8859_12 0x00000020 ISO 8859-12 was abandoned */
449 #define ENC_ISO_8859_13 0x00000022
450 #define ENC_ISO_8859_14 0x00000024
451 #define ENC_ISO_8859_15 0x00000026
452 #define ENC_ISO_8859_16 0x00000028
453 #define ENC_WINDOWS_1250 0x0000002A
454 #define ENC_3GPP_TS_23_038_7BITS 0x0000002C
455 #define ENC_EBCDIC 0x0000002E
456 #define ENC_MAC_ROMAN 0x00000030
457 #define ENC_CP437 0x00000032
458 #define ENC_ASCII_7BITS 0x00000034
459 #define ENC_T61 0x00000036
460 #define ENC_EBCDIC_CP037 0x00000038
461 #define ENC_ZIGBEE 0x0000003A
462
463
464 /*
465 * TODO:
466 *
467 * These could probably be used by existing code:
468 *
469 * "IBM MS DBCS"
470 * JIS C 6226
471 *
472 * As those are added, change code such as the code in packet-bacapp.c
473 * to use them.
474 */
475
476 /*
477 * For protocols (FT_PROTOCOL), aggregate items with subtrees (FT_NONE),
478 * opaque byte-array fields (FT_BYTES), and other fields where there
479 * is no choice of encoding (either because it's "just a bucket
480 * of bytes" or because the encoding is completely fixed), we
481 * have ENC_NA (for "Not Applicable").
482 */
483 #define ENC_NA 0x00000000
484
485 /* For cases where either native type or string encodings could both be
486 * valid arguments, we need something to distinguish which one is being
487 * passed as the argument, because ENC_BIG_ENDIAN and ENC_ASCII are both
488 * 0x00000000. So we use ENC_STR_NUM or ENC_STR_HEX bit-or'ed with
489 * ENC_ASCII and its ilk.
490 */
491 /* this is for strings as numbers "12345" */
492 #define ENC_STR_NUM 0x01000000
493 /* this is for strings as hex "1a2b3c" */
494 #define ENC_STR_HEX 0x02000000
495 /* a convenience macro for either of the above */
496 #define ENC_STRING 0x03000000
497 /* mask out ENC_STR_* and related bits - should this replace ENC_CHARENCODING_MASK? */
498 #define ENC_STR_MASK 0x0000FFFE
499
500 /* for cases where the number is allowed to have a leading '+'/'-' */
501 /* this can't collide with ENC_SEP_* because they can be used simultaneously */
502 #define ENC_NUM_PREF 0x00200000
503
504 /* Use varint format as described in Protobuf protocol
505 * https://developers.google.cn/protocol-buffers/docs/encoding
506 */
507 #define ENC_VARINT_PROTOBUF 0x00000002
508 /*
509 * Decodes a variable-length integer used in QUIC protocol
510 * See https://tools.ietf.org/html/draft-ietf-quic-transport-08#section-8.1
511 */
512 #define ENC_VARINT_QUIC 0x00000004
513
514 /* For cases where a string encoding contains hex, bit-or one or more
515 * of these for the allowed separator(s), as well as with ENC_STR_HEX.
516 * See hex_str_to_bytes_encoding() in epan/strutil.h for details.
517 */
518 #define ENC_SEP_NONE 0x00010000
519 #define ENC_SEP_COLON 0x00020000
520 #define ENC_SEP_DASH 0x00040000
521 #define ENC_SEP_DOT 0x00080000
522 #define ENC_SEP_SPACE 0x00100000
523 /* a convenience macro for the above */
524 #define ENC_SEP_MASK 0x001F0000
525
526 /* For cases where a string encoding contains a timestamp, use one
527 * of these (but only one). These values can collide with above, because
528 * you can't do both at the same time.
529 */
530 #define ENC_ISO_8601_DATE 0x00010000
531 #define ENC_ISO_8601_TIME 0x00020000
532 #define ENC_ISO_8601_DATE_TIME 0x00030000
533 #define ENC_RFC_822 0x00040000
534 #define ENC_RFC_1123 0x00080000
535 /* a convenience macro for the above - for internal use only */
536 #define ENC_STR_TIME_MASK 0x000F0000
537
538 /* Values for header_field_info.display */
539
540 /* For integral types, the display format is a BASE_* field_display_e value
541 * possibly ORed with BASE_*_STRING */
542
544 #define FIELD_DISPLAY_E_MASK 0xFF
545
546 /*
547 * Note that this enum values are parsed in make-init-lua.pl so make sure
548 * any changes here still makes valid entries in init.lua.
549 */
550 typedef enum {
551 /* Integral types */
552 BASE_NONE = 0,
553 BASE_DEC = 1,
554 BASE_HEX = 2,
555 BASE_OCT = 3,
556 BASE_DEC_HEX = 4,
557 BASE_HEX_DEC = 5,
558 BASE_CUSTOM = 6,
560 /* Float types */
561 BASE_FLOAT = BASE_NONE,
563 /* String types */
564 STR_ASCII = 0,
565 /* XXX, support for format_text_wsp() ? */
566 STR_UNICODE = 7,
568 /* Byte separators */
569 SEP_DOT = 8,
570 SEP_DASH = 9,
571 SEP_COLON = 10,
572 SEP_SPACE = 11,
574 /* Address types */
575 BASE_NETMASK = 12,
577 /* Port types */
578 BASE_PT_UDP = 13,
579 BASE_PT_TCP = 14,
580 BASE_PT_DCCP = 15,
581 BASE_PT_SCTP = 16,
583 /* OUI types */
584 BASE_OUI = 17
586 } field_display_e;
587
588 #define FIELD_DISPLAY(d) ((d) & FIELD_DISPLAY_E_MASK)
589
590 /* Following constants have to be ORed with a field_display_e when dissector
591 * want to use specials value-string MACROs for a header_field_info */
592 #define BASE_RANGE_STRING 0x0100
593 #define BASE_EXT_STRING 0x0200
594 #define BASE_VAL64_STRING 0x0400
595 #define BASE_ALLOW_ZERO 0x0800
596 #define BASE_UNIT_STRING 0x1000
597 #define BASE_NO_DISPLAY_VALUE 0x2000
599 #define BASE_PROTOCOL_INFO 0x4000
600 #define BASE_SPECIAL_VALS 0x8000
603 #define IS_BASE_DUAL(b) ((b)==BASE_DEC_HEX||(b)==BASE_HEX_DEC)
604
606 #define IS_BASE_PORT(b) (((b)==BASE_PT_UDP||(b)==BASE_PT_TCP||(b)==BASE_PT_DCCP||(b)==BASE_PT_SCTP))
607
608 /* For FT_ABSOLUTE_TIME, the display format is an absolute_time_display_e
609 * as per time_fmt.h. */
610
611 typedef enum {
612 HF_REF_TYPE_NONE,
613 HF_REF_TYPE_INDIRECT,
614 HF_REF_TYPE_DIRECT
615 } hf_ref_type;
616
618 typedef struct _header_field_info header_field_info;
619
621 struct _header_field_info {
622 /* ---------- set by dissector --------- */
623 const char *name;
624 const char *abbrev;
625 enum ftenum type;
626 int display;
627 const void *strings;
631 guint64 bitmask;
632 const char *blurb;
634 /* ------- set by proto routines (prefilled by HFILL macro, see below) ------ */
635 int id;
636 int parent;
637 hf_ref_type ref_type;
638 int same_name_prev_id;
639 header_field_info *same_name_next;
640 };
641
647 #define HFILL -1, 0, HF_REF_TYPE_NONE, -1, NULL
648
649 #define HFILL_INIT(hf) \
650 (hf).hfinfo.id = -1; \
651 (hf).hfinfo.parent = 0; \
652 (hf).hfinfo.ref_type = HF_REF_TYPE_NONE; \
653 (hf).hfinfo.same_name_prev_id = -1; \
654 (hf).hfinfo.same_name_next = NULL;
655
657 typedef struct hf_register_info {
658 int *p_id;
659 header_field_info hfinfo;
660 } hf_register_info;
661
662
663
664
666 typedef struct _item_label_t {
667 char representation[ITEM_LABEL_LENGTH];
668 } item_label_t;
669
670
672 typedef struct field_info {
673 header_field_info *hfinfo;
674 gint start;
675 gint length;
676 gint appendix_start;
677 gint appendix_length;
678 gint tree_type;
679 guint32 flags;
680 item_label_t *rep;
681 tvbuff_t *ds_tvb;
682 fvalue_t value;
683 } field_info;
684
685
686 /*
687 * This structure describes one segment of a split-bits item
688 * crumb_bit_offset is the bit offset in the input tvb of the first (most significant) bit of this crumb
689 * crumb_bit_length is the number of contiguous bits of this crumb.
690 * The first element of an array of bits_specs describes the most significant crumb of the output value.
691 * The second element of an array of bits_specs describes the next-most significant crumb of the output value, etc.
692 * The array is terminated by a sentinel entry with crumb_bit_length of 0.
693 */
694 typedef struct
695 {
696 guint crumb_bit_offset;
697 guint8 crumb_bit_length;
698 }crumb_spec_t;
699
700 /*
701 * Flag fields. Do not assign values greater than 0x00000080 unless you
702 * shuffle the expert information upward; see below.
703 */
704
710 #define FI_HIDDEN 0x00000001
711
713 #define FI_GENERATED 0x00000002
714
715 #define FI_URL 0x00000004
716
718 #define FI_LITTLE_ENDIAN 0x00000008
719
720 #define FI_BIG_ENDIAN 0x00000010
721
722 #define FI_BITS_OFFSET(n) (((n) & 7) << 5)
723
724 /* if 0, it means that field takes fi->length * 8 */
725 #define FI_BITS_SIZE(n) (((n) & 63) << 8)
726
727 #define FI_VARINT 0x00004000
728
730 #define FI_GET_FLAG(fi, flag) ((fi) ? ((fi)->flags & (flag)) : 0)
731
732 #define FI_SET_FLAG(fi, flag) \
733 do { \
734 if (fi) \
735 (fi)->flags = (fi)->flags | (flag); \
736 } while(0)
737
738 #define FI_RESET_FLAG(fi, flag) \
739 do { \
740 if (fi) \
741 (fi)->flags = (fi)->flags & ~(flag); \
742 } while(0)
743
744 #define FI_GET_BITS_OFFSET(fi) (FI_GET_FLAG(fi, FI_BITS_OFFSET(7)) >> 5)
745 #define FI_GET_BITS_SIZE(fi) (FI_GET_FLAG(fi, FI_BITS_SIZE(63)) >> 8)
746
749 typedef struct {
750 GHashTable *interesting_hfids;
751 gboolean visible;
752 gboolean fake_protocols;
753 gint count;
754 struct _packet_info *pinfo;
755 } tree_data_t;
756
758 typedef struct _proto_node {
759 struct _proto_node *first_child;
760 struct _proto_node *last_child;
761 struct _proto_node *next;
762 struct _proto_node *parent;
763 field_info *finfo;
764 tree_data_t *tree_data;
765 } proto_node;
766
768 typedef proto_node proto_tree;
770 typedef proto_node proto_item;
771
772 /*
773 * Expert information.
774 * This is in the flags field; we allocate this from the top down,
775 * so as not to collide with FI_ flags, which are allocated from
776 * the bottom up.
777 */
778
779 /* do not modify the PI_SEVERITY_MASK name - it's used by make-init-lua.pl */
780 /* expert severities */
781 #define PI_SEVERITY_MASK 0x00F00000
783 #define PI_COMMENT 0x00100000
784
785 #define PI_CHAT 0x00200000
786
787 #define PI_NOTE 0x00400000
788
789 #define PI_WARN 0x00600000
790
791 #define PI_ERROR 0x00800000
792
793 /* do not modify the PI_GROUP_MASK name - it's used by make-init-lua.pl */
794 /* expert "event groups" */
795 #define PI_GROUP_MASK 0xFF000000
797 #define PI_CHECKSUM 0x01000000
798
799 #define PI_SEQUENCE 0x02000000
800
801 #define PI_RESPONSE_CODE 0x03000000
802
803 #define PI_REQUEST_CODE 0x04000000
804
805 #define PI_UNDECODED 0x05000000
806
807 #define PI_REASSEMBLE 0x06000000
808
809 #define PI_MALFORMED 0x07000000
810
811 #define PI_DEBUG 0x08000000
812
813 #define PI_PROTOCOL 0x09000000
814
815 #define PI_SECURITY 0x0a000000
816
817 #define PI_COMMENTS_GROUP 0x0b000000
818
819 #define PI_DECRYPTION 0x0c000000
820
821 #define PI_ASSUMPTION 0x0d000000
822
823 #define PI_DEPRECATED 0x0e000000
824
825 /* add more, see https://wiki.wireshark.org/Development/ExpertInfo */
826
827
829 /* HIDING PROTOCOL FIELDS IS DEPRECATED, IT'S CONSIDERED TO BE BAD GUI DESIGN! */
830 #define PROTO_ITEM_IS_HIDDEN(proto_item) \
831 ((proto_item) ? FI_GET_FLAG(PITEM_FINFO(proto_item), FI_HIDDEN) : 0)
832
833 /* HIDING PROTOCOL FIELDS IS DEPRECATED, IT'S CONSIDERED TO BE BAD GUI DESIGN! */
834 #define PROTO_ITEM_SET_HIDDEN(proto_item) \
835 do { \
836 if (proto_item) \
837 FI_SET_FLAG(PITEM_FINFO(proto_item), FI_HIDDEN); \
838 } while(0)
839
840 #define PROTO_ITEM_SET_VISIBLE(proto_item) \
841 do { \
842 if (proto_item) \
843 FI_RESET_FLAG(PITEM_FINFO(proto_item), FI_HIDDEN); \
844 } while(0)
845
847 #define PROTO_ITEM_IS_GENERATED(proto_item) \
848 ((proto_item) ? FI_GET_FLAG(PITEM_FINFO(proto_item), FI_GENERATED) : 0)
849
850 #define PROTO_ITEM_SET_GENERATED(proto_item) \
851 do { \
852 if (proto_item) \
853 FI_SET_FLAG(PITEM_FINFO(proto_item), FI_GENERATED); \
854 } while(0)
855
856 #define PROTO_ITEM_IS_URL(proto_item) \
857 ((proto_item) ? FI_GET_FLAG(PITEM_FINFO(proto_item), FI_URL) : 0)
858
859 #define PROTO_ITEM_SET_URL(proto_item) \
860 do { \
861 if (proto_item) \
862 FI_SET_FLAG(PITEM_FINFO(proto_item), FI_URL); \
863 } while(0)
864
865 typedef void (*proto_tree_foreach_func)(proto_node *, gpointer);
866 typedef gboolean (*proto_tree_traverse_func)(proto_node *, gpointer);
867
868 extern gboolean proto_tree_traverse_post_order(proto_tree *tree,
869 proto_tree_traverse_func func, gpointer data);
870
871 WS_DLL_PUBLIC void proto_tree_children_foreach(proto_tree *tree,
872 proto_tree_foreach_func func, gpointer data);
873
875 #define PNODE_FINFO(proto_node) ((proto_node)->finfo)
876
878 #define PITEM_FINFO(proto_item) PNODE_FINFO(proto_item)
879
881 #define PTREE_FINFO(proto_tree) PNODE_FINFO(proto_tree)
882
884 #define PTREE_DATA(proto_tree) ((proto_tree)->tree_data)
885
887 #define PNODE_POOL(proto_node) ((proto_node)->tree_data->pinfo->pool)
888
889 #ifdef HAVE_PLUGINS
890 typedef struct {
891 void (*register_protoinfo)(void); /* routine to call to register protocol information */
892 void (*register_handoff)(void); /* routine to call to register dissector handoff */
893 } proto_plugin;
894
896 WS_DLL_PUBLIC void proto_register_plugin(const proto_plugin *plugin);
897 #endif
898
900 void proto_init(GSList *register_all_protocols_list, GSList *register_all_handoffs_list,
901 register_cb cb, void *client_data);
902
903
905 extern void proto_cleanup(void);
906
920 WS_DLL_PUBLIC gboolean proto_field_is_referenced(proto_tree *tree, int proto_id);
921
926 WS_DLL_PUBLIC proto_tree* proto_item_add_subtree(proto_item *ti, const gint idx) G_GNUC_WARN_UNUSED_RESULT;
927
931 WS_DLL_PUBLIC proto_tree* proto_item_get_subtree(proto_item *ti);
932
936 WS_DLL_PUBLIC proto_item* proto_item_get_parent(const proto_item *ti);
937
942 WS_DLL_PUBLIC proto_item* proto_item_get_parent_nth(proto_item *ti, int gen);
943
948 WS_DLL_PUBLIC void proto_item_set_text(proto_item *ti, const char *format, ...)
949 G_GNUC_PRINTF(2,3);
950
955 WS_DLL_PUBLIC void proto_item_append_text(proto_item *ti, const char *format, ...)
956 G_GNUC_PRINTF(2,3);
957
962 WS_DLL_PUBLIC void proto_item_prepend_text(proto_item *ti, const char *format, ...)
963 G_GNUC_PRINTF(2,3);
964
968 WS_DLL_PUBLIC void proto_item_set_len(proto_item *ti, const gint length);
969
980 WS_DLL_PUBLIC void proto_item_set_end(proto_item *ti, tvbuff_t *tvb, gint end);
981
986 WS_DLL_PUBLIC int proto_item_get_len(const proto_item *ti);
987
988
989
992 extern proto_tree* proto_tree_create_root(struct _packet_info *pinfo);
993
994 void proto_tree_reset(proto_tree *tree);
995
998 WS_DLL_PUBLIC void proto_tree_free(proto_tree *tree);
999
1007 WS_DLL_PUBLIC gboolean
1008 proto_tree_set_visible(proto_tree *tree, gboolean visible);
1009
1013 extern void
1014 proto_tree_set_fake_protocols(proto_tree *tree, gboolean fake_protocols);
1015
1020 extern void
1021 proto_tree_prime_with_hfid(proto_tree *tree, const int hfid);
1022
1026 WS_DLL_PUBLIC proto_item* proto_tree_get_parent(proto_tree *tree);
1027
1031 WS_DLL_PUBLIC proto_tree *proto_tree_get_parent_tree(proto_tree *tree);
1032
1036 WS_DLL_PUBLIC proto_tree* proto_tree_get_root(proto_tree *tree);
1037
1042 WS_DLL_PUBLIC void proto_tree_move_item(proto_tree *tree, proto_item *fixed_item, proto_item *item_to_move);
1043
1044
1050 WS_DLL_PUBLIC void proto_tree_set_appendix(proto_tree *tree, tvbuff_t *tvb, gint start, const gint length);
1051
1052
1062 WS_DLL_PUBLIC proto_item *
1063 proto_tree_add_item_new(proto_tree *tree, header_field_info *hfinfo, tvbuff_t *tvb,
1064 const gint start, gint length, const guint encoding);
1065
1066 WS_DLL_PUBLIC proto_item *
1067 proto_tree_add_item(proto_tree *tree, int hfindex, tvbuff_t *tvb,
1068 const gint start, gint length, const guint encoding);
1069
1082 WS_DLL_PUBLIC proto_item *
1083 proto_tree_add_item_new_ret_length(proto_tree *tree, header_field_info *hfinfo, tvbuff_t *tvb,
1084 const gint start, gint length, const guint encoding, gint *lenretval);
1085
1086 WS_DLL_PUBLIC proto_item *
1087 proto_tree_add_item_ret_length(proto_tree *tree, int hfindex, tvbuff_t *tvb,
1088 const gint start, gint length,
1089 const guint encoding, gint *lenretval);
1090
1122 WS_DLL_PUBLIC proto_item *
1123 proto_tree_add_item_ret_int(proto_tree *tree, int hfindex, tvbuff_t *tvb,
1124 const gint start, gint length, const guint encoding, gint32 *retval);
1125
1126 WS_DLL_PUBLIC proto_item *
1127 proto_tree_add_item_ret_uint(proto_tree *tree, int hfindex, tvbuff_t *tvb,
1128 const gint start, gint length, const guint encoding, guint32 *retval);
1129
1130 WS_DLL_PUBLIC proto_item *
1131 proto_tree_add_item_ret_uint64(proto_tree *tree, int hfindex, tvbuff_t *tvb,
1132 const gint start, gint length, const guint encoding, guint64 *retval);
1133
1134 WS_DLL_PUBLIC proto_item *
1135 proto_tree_add_item_ret_varint(proto_tree *tree, int hfindex, tvbuff_t *tvb,
1136 const gint start, gint length, const guint encoding, guint64 *retval, gint *lenretval);
1137
1138 WS_DLL_PUBLIC proto_item *
1139 proto_tree_add_item_ret_boolean(proto_tree *tree, int hfindex, tvbuff_t *tvb,
1140 const gint start, gint length, const guint encoding, gboolean *retval);
1141
1171 WS_DLL_PUBLIC proto_item *
1172 proto_tree_add_item_ret_string_and_length(proto_tree *tree, int hfindex,
1173 tvbuff_t *tvb, const gint start, gint length, const guint encoding,
1174 wmem_allocator_t *scope, const guint8 **retval, gint *lenretval);
1175
1203 WS_DLL_PUBLIC proto_item *
1204 proto_tree_add_item_ret_string(proto_tree *tree, int hfindex, tvbuff_t *tvb,
1205 const gint start, gint length, const guint encoding,
1206 wmem_allocator_t *scope, const guint8 **retval);
1207
1216 proto_item *
1217 proto_tree_add_text_internal(proto_tree *tree, tvbuff_t *tvb, gint start, gint length, const char *format,
1218 ...) G_GNUC_PRINTF(5,6);
1219
1228 proto_item *
1229 proto_tree_add_text_valist_internal(proto_tree *tree, tvbuff_t *tvb, gint start,
1230 gint length, const char *format, va_list ap)
1231 G_GNUC_PRINTF(5, 0);
1232
1242 WS_DLL_PUBLIC proto_tree *
1243 proto_tree_add_subtree(proto_tree *tree, tvbuff_t *tvb, gint start, gint length, gint idx, proto_item **tree_item, const char *text);
1244
1255 WS_DLL_PUBLIC proto_tree *
1256 proto_tree_add_subtree_format(proto_tree *tree, tvbuff_t *tvb, gint start, gint length, gint idx, proto_item **tree_item, const char *format, ...) G_GNUC_PRINTF(7,8);
1257
1259 proto_item *
1260 proto_tree_add_format_text(proto_tree *tree, tvbuff_t *tvb, gint start, gint length);
1261
1263 proto_item *
1264 proto_tree_add_format_wsp_text(proto_tree *tree, tvbuff_t *tvb, gint start, gint length);
1265
1275 WS_DLL_PUBLIC proto_item *
1276 proto_tree_add_none_format(proto_tree *tree, const int hfindex, tvbuff_t *tvb, const gint start,
1277 gint length, const char *format, ...) G_GNUC_PRINTF(6,7);
1278
1288 WS_DLL_PUBLIC proto_item *
1289 proto_tree_add_protocol_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
1290 gint length, const char *format, ...) G_GNUC_PRINTF(6,7);
1291
1292
1293
1294
1303 WS_DLL_PUBLIC proto_item *
1304 proto_tree_add_bytes(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
1305 gint length, const guint8* start_ptr);
1306
1317 WS_DLL_PUBLIC proto_item *
1318 proto_tree_add_bytes_with_length(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
1319 gint length, const guint8 *start_ptr, gint ptr_length);
1320
1354 WS_DLL_PUBLIC proto_item *
1355 proto_tree_add_bytes_item(proto_tree *tree, int hfindex, tvbuff_t *tvb,
1356 const gint start, gint length, const guint encoding,
1357 GByteArray *retval, gint *endoff, gint *err);
1358
1371 WS_DLL_PUBLIC proto_item *
1372 proto_tree_add_bytes_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb,
1373 gint start, gint length, const guint8* start_ptr, const char *format,
1374 ...) G_GNUC_PRINTF(7,8);
1375
1387 WS_DLL_PUBLIC proto_item *
1388 proto_tree_add_bytes_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
1389 gint length, const guint8* start_ptr, const char *format, ...) G_GNUC_PRINTF(7,8);
1390
1399 WS_DLL_PUBLIC proto_item *
1400 proto_tree_add_time(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
1401 gint length, const nstime_t* value_ptr);
1402
1433 WS_DLL_PUBLIC proto_item *
1434 proto_tree_add_time_item(proto_tree *tree, int hfindex, tvbuff_t *tvb,
1435 const gint start, gint length, const guint encoding,
1436 nstime_t *retval, gint *endoff, gint *err);
1437
1438
1451 WS_DLL_PUBLIC proto_item *
1452 proto_tree_add_time_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb,
1453 gint start, gint length, nstime_t* value_ptr, const char *format, ...)
1454 G_GNUC_PRINTF(7,8);
1455
1468 WS_DLL_PUBLIC proto_item *
1469 proto_tree_add_time_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
1470 gint length, nstime_t* value_ptr, const char *format, ...) G_GNUC_PRINTF(7,8);
1471
1480 WS_DLL_PUBLIC proto_item *
1481 proto_tree_add_ipxnet(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
1482 gint length, guint32 value);
1483
1496 WS_DLL_PUBLIC proto_item *
1497 proto_tree_add_ipxnet_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb,
1498 gint start, gint length, guint32 value, const char *format, ...)
1499 G_GNUC_PRINTF(7,8);
1500
1512 WS_DLL_PUBLIC proto_item *
1513 proto_tree_add_ipxnet_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
1514 gint length, guint32 value, const char *format, ...) G_GNUC_PRINTF(7,8);
1515
1524 WS_DLL_PUBLIC proto_item *
1525 proto_tree_add_ipv4(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
1526 gint length, guint32 value);
1527
1540 WS_DLL_PUBLIC proto_item *
1541 proto_tree_add_ipv4_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb,
1542 gint start, gint length, guint32 value, const char *format, ...)
1543 G_GNUC_PRINTF(7,8);
1544
1556 WS_DLL_PUBLIC proto_item *
1557 proto_tree_add_ipv4_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
1558 gint length, guint32 value, const char *format, ...) G_GNUC_PRINTF(7,8);
1559
1568 WS_DLL_PUBLIC proto_item *
1569 proto_tree_add_ipv6(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
1570 gint length, const ws_in6_addr *value_ptr);
1571
1584 WS_DLL_PUBLIC proto_item *
1585 proto_tree_add_ipv6_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb,
1586 gint start, gint length, const ws_in6_addr *value_ptr, const char *format,
1587 ...) G_GNUC_PRINTF(7,8);
1588
1600 WS_DLL_PUBLIC proto_item *
1601 proto_tree_add_ipv6_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
1602 gint length, const ws_in6_addr *value_ptr, const char *format, ...) G_GNUC_PRINTF(7,8);
1603
1612 WS_DLL_PUBLIC proto_item *
1613 proto_tree_add_ether(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
1614 gint length, const guint8* value);
1615
1628 WS_DLL_PUBLIC proto_item *
1629 proto_tree_add_ether_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb,
1630 gint start, gint length, const guint8* value, const char *format, ...)
1631 G_GNUC_PRINTF(7,8);
1632
1644 WS_DLL_PUBLIC proto_item *
1645 proto_tree_add_ether_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
1646 gint length, const guint8* value, const char *format, ...) G_GNUC_PRINTF(7,8);
1647
1656 WS_DLL_PUBLIC proto_item *
1657 proto_tree_add_guid(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
1658 gint length, const e_guid_t *value_ptr);
1659
1672 WS_DLL_PUBLIC proto_item *
1673 proto_tree_add_guid_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb,
1674 gint start, gint length, const e_guid_t *value_ptr, const char *format,
1675 ...) G_GNUC_PRINTF(7,8);
1676
1688 WS_DLL_PUBLIC proto_item *
1689 proto_tree_add_guid_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
1690 gint length, const e_guid_t *value_ptr, const char *format, ...) G_GNUC_PRINTF(7,8);
1691
1700 extern proto_item *
1701 proto_tree_add_oid(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
1702 gint length, const guint8* value_ptr);
1703
1716 extern proto_item *
1717 proto_tree_add_oid_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb,
1718 gint start, gint length, const guint8* value_ptr, const char *format,
1719 ...) G_GNUC_PRINTF(7,8);
1720
1732 extern proto_item *
1733 proto_tree_add_oid_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
1734 gint length, const guint8* value_ptr, const char *format, ...) G_GNUC_PRINTF(7,8);
1735
1744 WS_DLL_PUBLIC proto_item *
1745 proto_tree_add_string(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
1746 gint length, const char* value);
1747
1760 WS_DLL_PUBLIC proto_item *
1761 proto_tree_add_string_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb,
1762 gint start, gint length, const char* value, const char *format, ...)
1763 G_GNUC_PRINTF(7,8);
1764
1777 WS_DLL_PUBLIC proto_item *
1778 proto_tree_add_string_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
1779 gint length, const char* value, const char *format, ...) G_GNUC_PRINTF(7,8);
1780
1789 WS_DLL_PUBLIC proto_item *
1790 proto_tree_add_boolean(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
1791 gint length, guint32 value);
1792
1805 WS_DLL_PUBLIC proto_item *
1806 proto_tree_add_boolean_format_value(proto_tree *tree, int hfindex,
1807 tvbuff_t *tvb, gint start, gint length, guint32 value,
1808 const char *format, ...) G_GNUC_PRINTF(7,8);
1809
1821 WS_DLL_PUBLIC proto_item *
1822 proto_tree_add_boolean_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
1823 gint length, guint32 value, const char *format, ...) G_GNUC_PRINTF(7,8);
1824
1833 WS_DLL_PUBLIC proto_item *
1834 proto_tree_add_float(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
1835 gint length, float value);
1836
1849 WS_DLL_PUBLIC proto_item *
1850 proto_tree_add_float_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb,
1851 gint start, gint length, float value, const char *format, ...)
1852 G_GNUC_PRINTF(7,8);
1853
1865 WS_DLL_PUBLIC proto_item *
1866 proto_tree_add_float_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
1867 gint length, float value, const char *format, ...) G_GNUC_PRINTF(7,8);
1868
1877 WS_DLL_PUBLIC proto_item *
1878 proto_tree_add_double(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
1879 gint length, double value);
1880
1893 WS_DLL_PUBLIC proto_item *
1894 proto_tree_add_double_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb,
1895 gint start, gint length, double value, const char *format, ...)
1896 G_GNUC_PRINTF(7,8);
1897
1909 WS_DLL_PUBLIC proto_item *
1910 proto_tree_add_double_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
1911 gint length, double value, const char *format, ...) G_GNUC_PRINTF(7,8);
1912
1921 WS_DLL_PUBLIC proto_item *
1922 proto_tree_add_uint(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
1923 gint length, guint32 value);
1924
1937 WS_DLL_PUBLIC proto_item *
1938 proto_tree_add_uint_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb,
1939 gint start, gint length, guint32 value, const char *format, ...)
1940 G_GNUC_PRINTF(7,8);
1941
1954 WS_DLL_PUBLIC proto_item *
1955 proto_tree_add_uint_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
1956 gint length, guint32 value, const char *format, ...) G_GNUC_PRINTF(7,8);
1957
1966 WS_DLL_PUBLIC proto_item *
1967 proto_tree_add_uint64(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
1968 gint length, guint64 value);
1969
1982 WS_DLL_PUBLIC proto_item *
1983 proto_tree_add_uint64_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb,
1984 gint start, gint length, guint64 value, const char *format, ...)
1985 G_GNUC_PRINTF(7,8);
1986
1998 WS_DLL_PUBLIC proto_item *
1999 proto_tree_add_uint64_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
2000 gint length, guint64 value, const char *format, ...) G_GNUC_PRINTF(7,8);
2001
2010 WS_DLL_PUBLIC proto_item *
2011 proto_tree_add_int(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
2012 gint length, gint32 value);
2013
2026 WS_DLL_PUBLIC proto_item *
2027 proto_tree_add_int_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb,
2028 gint start, gint length, gint32 value, const char *format, ...)
2029 G_GNUC_PRINTF(7,8);
2030
2043 WS_DLL_PUBLIC proto_item *
2044 proto_tree_add_int_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
2045 gint length, gint32 value, const char *format, ...) G_GNUC_PRINTF(7,8);
2046
2055 WS_DLL_PUBLIC proto_item *
2056 proto_tree_add_int64(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
2057 gint length, gint64 value);
2058
2071 WS_DLL_PUBLIC proto_item *
2072 proto_tree_add_int64_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb,
2073 gint start, gint length, gint64 value, const char *format, ...)
2074 G_GNUC_PRINTF(7,8);
2075
2087 WS_DLL_PUBLIC proto_item *
2088 proto_tree_add_int64_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
2089 gint length, gint64 value, const char *format, ...) G_GNUC_PRINTF(7,8);
2090
2099 WS_DLL_PUBLIC proto_item *
2100 proto_tree_add_eui64(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
2101 gint length, const guint64 value);
2102
2115 WS_DLL_PUBLIC proto_item *
2116 proto_tree_add_eui64_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb,
2117 gint start, gint length, const guint64 value, const char *format, ...)
2118 G_GNUC_PRINTF(7,8);
2119
2131 WS_DLL_PUBLIC proto_item *
2132 proto_tree_add_eui64_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
2133 gint length, const guint64 value, const char *format, ...) G_GNUC_PRINTF(7,8);
2134
2135
2142 WS_DLL_PUBLIC proto_item *
2143 proto_tree_add_debug_text(proto_tree *tree, const char *format,
2144 ...) G_GNUC_PRINTF(2,3);
2145
2146
2151 WS_DLL_PUBLIC void
2152 proto_item_fill_label(field_info *fi, gchar *label_str);
2153
2154
2160 WS_DLL_PUBLIC int
2161 proto_register_protocol(const char *name, const char *short_name, const char *filter_name);
2162
2177 WS_DLL_PUBLIC int
2178 proto_register_protocol_in_name_only(const char *name, const char *short_name, const char *filter_name, int parent_proto, enum ftenum field_type);
2179
2183 gboolean
2184 proto_deregister_protocol(const char *short_name);
2185
2190 typedef void (*prefix_initializer_t)(const char* match);
2191
2199 WS_DLL_PUBLIC void
2200 proto_register_prefix(const char *prefix, prefix_initializer_t initializer);
2201
2203 WS_DLL_PUBLIC void proto_initialize_all_prefixes(void);
2204
2205 WS_DLL_PUBLIC void proto_register_fields_manual(const int parent, header_field_info **hfi, const int num_records);
2206 WS_DLL_PUBLIC void proto_register_fields_section(const int parent, header_field_info *hfi, const int num_records);
2207
2212 WS_DLL_PUBLIC void
2213 proto_register_field_array(const int parent, hf_register_info *hf, const int num_records);
2214
2218 WS_DLL_PUBLIC void
2219 proto_deregister_field (const int parent, gint hf_id);
2220
2223 WS_DLL_PUBLIC void
2224 proto_add_deregistered_data (void *data);
2225
2227 WS_DLL_PUBLIC void
2228 proto_free_deregistered_fields (void);
2229
2233 WS_DLL_PUBLIC void
2234 proto_register_subtree_array(gint *const *indices, const int num_indices);
2235
2239 WS_DLL_PUBLIC const char* proto_registrar_get_name(const int n);
2240
2244 WS_DLL_PUBLIC const char* proto_registrar_get_abbrev(const int n);
2245
2249 WS_DLL_PUBLIC header_field_info* proto_registrar_get_nth(guint hfindex);
2250
2254 WS_DLL_PUBLIC header_field_info* proto_registrar_get_byname(const char *field_name);
2255
2259 WS_DLL_PUBLIC int proto_registrar_get_id_byname(const char *field_name);
2260
2264 WS_DLL_PUBLIC enum ftenum proto_registrar_get_ftype(const int n);
2265
2269 WS_DLL_PUBLIC int proto_registrar_get_parent(const int n);
2270
2274 WS_DLL_PUBLIC gboolean proto_registrar_is_protocol(const int n);
2275
2279 extern gint proto_registrar_get_length(const int n);
2280
2281
2285 WS_DLL_PUBLIC int proto_get_first_protocol(void **cookie);
2286 WS_DLL_PUBLIC int proto_get_data_protocol(void *cookie);
2287 WS_DLL_PUBLIC int proto_get_next_protocol(void **cookie);
2288 WS_DLL_PUBLIC header_field_info *proto_get_first_protocol_field(const int proto_id, void **cookie);
2289 WS_DLL_PUBLIC header_field_info *proto_get_next_protocol_field(const int proto_id, void **cookie);
2290
2294 WS_DLL_PUBLIC int proto_name_already_registered(const gchar *name);
2295
2299 WS_DLL_PUBLIC int proto_get_id_by_filter_name(const gchar* filter_name);
2300
2304 WS_DLL_PUBLIC int proto_get_id_by_short_name(const gchar* short_name);
2305
2309 WS_DLL_PUBLIC gboolean proto_can_toggle_protocol(const int proto_id);
2310
2313 WS_DLL_PUBLIC protocol_t *find_protocol_by_id(const int proto_id);
2314
2318 WS_DLL_PUBLIC const char *proto_get_protocol_name(const int proto_id);
2319
2322 WS_DLL_PUBLIC int proto_get_id(const protocol_t *protocol);
2323
2326 WS_DLL_PUBLIC const char *proto_get_protocol_short_name(const protocol_t *protocol);
2327
2330 WS_DLL_PUBLIC const char *proto_get_protocol_long_name(const protocol_t *protocol);
2331
2334 WS_DLL_PUBLIC gboolean proto_is_protocol_enabled(const protocol_t *protocol);
2335
2338 WS_DLL_PUBLIC gboolean proto_is_protocol_enabled_by_default(const protocol_t *protocol);
2339
2342 WS_DLL_PUBLIC gboolean proto_is_pino(const protocol_t *protocol);
2343
2347 WS_DLL_PUBLIC const char *proto_get_protocol_filter_name(const int proto_id);
2348
2354 extern void proto_add_heuristic_dissector(protocol_t *protocol, const char *short_name);
2355
2361 WS_DLL_PUBLIC void proto_heuristic_dissector_foreach(const protocol_t *protocol, GFunc func, gpointer user_data);
2362
2363
2381 WS_DLL_PUBLIC void proto_get_frame_protocols(const wmem_list_t *layers,
2382 gboolean *is_ip, gboolean *is_tcp, gboolean *is_udp, gboolean *is_sctp,
2383 gboolean *is_ssl, gboolean *is_rtp, gboolean *is_lte_rlc);
2384
2390 WS_DLL_PUBLIC gboolean proto_is_frame_protocol(const wmem_list_t *layers, const char* proto_name);
2391
2394 WS_DLL_PUBLIC void proto_disable_by_default(const int proto_id);
2395
2399 WS_DLL_PUBLIC void proto_set_decoding(const int proto_id, const gboolean enabled);
2400
2402 WS_DLL_PUBLIC void proto_reenable_all(void);
2403
2406 WS_DLL_PUBLIC void proto_set_cant_toggle(const int proto_id);
2407
2413 extern gboolean proto_check_for_protocol_or_field(const proto_tree* tree, const int id);
2414
2420 WS_DLL_PUBLIC GPtrArray* proto_get_finfo_ptr_array(const proto_tree *tree, const int hfindex);
2421
2426 WS_DLL_PUBLIC gboolean proto_tracking_interesting_fields(const proto_tree *tree);
2427
2434 WS_DLL_PUBLIC GPtrArray* proto_find_finfo(proto_tree *tree, const int hfindex);
2435
2442 WS_DLL_PUBLIC GPtrArray* proto_find_first_finfo(proto_tree *tree, const int hfindex);
2443
2448 WS_DLL_PUBLIC GPtrArray* proto_all_finfos(proto_tree *tree);
2449
2451 WS_DLL_PUBLIC void proto_registrar_dump_protocols(void);
2452
2454 WS_DLL_PUBLIC void proto_registrar_dump_values(void);
2455
2456 #ifdef HAVE_JSONGLIB
2457
2458 WS_DLL_PUBLIC void proto_registrar_dump_elastic(const gchar* filter);
2459 #endif
2460
2463 WS_DLL_PUBLIC gboolean proto_registrar_dump_fieldcount(void);
2464
2466 WS_DLL_PUBLIC void proto_registrar_dump_fields(void);
2467
2469 WS_DLL_PUBLIC void proto_registrar_dump_ftypes(void);
2470
2474 WS_DLL_PUBLIC const char* proto_field_display_to_string(int field_display);
2475
2478 WS_DLL_PUBLIC int num_tree_types;
2479
2481 WS_DLL_PUBLIC gboolean tree_expanded(int tree_type);
2482
2484 WS_DLL_PUBLIC void tree_expanded_set(int tree_type, gboolean value);
2485
2487 #ifndef g_ptr_array_len
2488 #define g_ptr_array_len(a) ((a)?(a)->len:0)
2489 #endif
2490
2491 WS_DLL_PUBLIC int
2492 hfinfo_bitshift(const header_field_info *hfinfo);
2493
2494 struct epan_dissect;
2495
2500 WS_DLL_PUBLIC gboolean
2501 proto_can_match_selected(field_info *finfo, struct epan_dissect *edt);
2502
2507 WS_DLL_PUBLIC char*
2508 proto_construct_match_selected_string(field_info *finfo, struct epan_dissect *edt);
2509
2515 WS_DLL_PUBLIC field_info*
2516 proto_find_field_from_offset(proto_tree *tree, guint offset, tvbuff_t *tvb);
2517
2522 WS_DLL_PUBLIC gchar*
2523 proto_find_undecoded_data(proto_tree *tree, guint length);
2524
2544 WS_DLL_PUBLIC proto_item *
2545 proto_tree_add_bitmask(proto_tree *tree, tvbuff_t *tvb, const guint offset,
2546 const int hf_hdr, const gint ett, const int **fields, const guint encoding);
2547
2571 WS_DLL_PUBLIC proto_item *
2572 proto_tree_add_bitmask_ret_uint64(proto_tree *tree, tvbuff_t *tvb, const guint offset,
2573 const int hf_hdr, const gint ett, const int **fields,
2574 const guint encoding, guint64 *retval);
2575
2599 WS_DLL_PUBLIC proto_item *
2600 proto_tree_add_bitmask_with_flags(proto_tree *tree, tvbuff_t *tvb, const guint offset,
2601 const int hf_hdr, const gint ett, const int **fields, const guint encoding, const int flags);
2602
2630 WS_DLL_PUBLIC proto_item *
2631 proto_tree_add_bitmask_with_flags_ret_uint64(proto_tree *tree, tvbuff_t *tvb, const guint offset,
2632 const int hf_hdr, const gint ett, const int **fields,
2633 const guint encoding, const int flags, guint64 *retval);
2634
2654 WS_DLL_PUBLIC proto_item *
2655 proto_tree_add_bitmask_value(proto_tree *tree, tvbuff_t *tvb, const guint offset,
2656 const int hf_hdr, const gint ett, const int **fields, const guint64 value);
2657
2681 WS_DLL_PUBLIC proto_item *
2682 proto_tree_add_bitmask_value_with_flags(proto_tree *tree, tvbuff_t *tvb, const guint offset,
2683 const int hf_hdr, const gint ett, const int **fields, const guint64 value, const int flags);
2684
2700 WS_DLL_PUBLIC void
2701 proto_tree_add_bitmask_list(proto_tree *tree, tvbuff_t *tvb, const guint offset,
2702 const int len, const int **fields, const guint encoding);
2703
2718 WS_DLL_PUBLIC void
2719 proto_tree_add_bitmask_list_value(proto_tree *tree, tvbuff_t *tvb, const guint offset,
2720 const int len, const int **fields, const guint64 value);
2721
2722
2744 WS_DLL_PUBLIC proto_item *
2745 proto_tree_add_bitmask_len(proto_tree *tree, tvbuff_t *tvb, const guint offset, const guint len,
2746 const int hf_hdr, const gint ett, const int **fields, struct expert_field* exp, const guint encoding);
2747
2760 WS_DLL_PUBLIC proto_item *
2761 proto_tree_add_bitmask_text(proto_tree *tree, tvbuff_t *tvb, const guint offset, const guint len,
2762 const char *name, const char *fallback,
2763 const gint ett, const int **fields, const guint encoding, const int flags);
2764
2765 #define BMT_NO_FLAGS 0x00
2766 #define BMT_NO_APPEND 0x01
2767 #define BMT_NO_INT 0x02
2768 #define BMT_NO_FALSE 0x04
2769 #define BMT_NO_TFS 0x08
2780 WS_DLL_PUBLIC proto_item *
2781 proto_tree_add_bits_item(proto_tree *tree, const int hf_index, tvbuff_t *tvb, const guint bit_offset, const gint no_of_bits, const guint encoding);
2782
2798 WS_DLL_PUBLIC proto_item *
2799 proto_tree_add_split_bits_item_ret_val(proto_tree *tree, const int hf_index, tvbuff_t *tvb,
2800 const guint bit_offset, const crumb_spec_t *crumb_spec,
2801 guint64 *return_value);
2802
2803
2817 void
2818 proto_tree_add_split_bits_crumb(proto_tree *tree, const int hf_index, tvbuff_t *tvb, const guint bit_offset,
2819 const crumb_spec_t *crumb_spec, guint16 crumb_index);
2820
2831 WS_DLL_PUBLIC proto_item *
2832 proto_tree_add_bits_ret_val(proto_tree *tree, const int hf_index, tvbuff_t *tvb, const guint bit_offset, const gint no_of_bits, guint64 *return_value, const guint encoding);
2833
2845 WS_DLL_PUBLIC proto_item *
2846 proto_tree_add_uint_bits_format_value(proto_tree *tree, const int hf_index, tvbuff_t *tvb, const guint bit_offset, const gint no_of_bits,
2847 guint32 value, const char *format, ...) G_GNUC_PRINTF(7,8);
2848
2860 WS_DLL_PUBLIC proto_item *
2861 proto_tree_add_uint64_bits_format_value(proto_tree *tree, const int hf_index, tvbuff_t *tvb, const guint bit_offset, const gint no_of_bits,
2862 guint64 value, const char *format, ...) G_GNUC_PRINTF(7,8);
2863
2876 proto_item *
2877 proto_tree_add_boolean_bits_format_value(proto_tree *tree, const int hf_index, tvbuff_t *tvb, const guint bit_offset, const gint no_of_bits,
2878 guint32 value, const char *format, ...) G_GNUC_PRINTF(7,8);
2879
2892 proto_item *
2893 proto_tree_add_boolean_bits_format_value64(proto_tree *tree, const int hf_index, tvbuff_t *tvb, const guint bit_offset, const gint no_of_bits,
2894 guint64 value, const char *format, ...) G_GNUC_PRINTF(7,8);
2895
2908 proto_item *
2909 proto_tree_add_int_bits_format_value(proto_tree *tree, const int hf_index, tvbuff_t *tvb, const guint bit_offset, const gint no_of_bits,
2910 gint32 value, const char *format, ...) G_GNUC_PRINTF(7,8);
2911
2924 proto_item *
2925 proto_tree_add_int64_bits_format_value(proto_tree *tree, const int hf_index, tvbuff_t *tvb, const guint bit_offset, const gint no_of_bits,
2926 gint64 value, const char *format, ...) G_GNUC_PRINTF(7,8);
2927
2940 proto_item *
2941 proto_tree_add_float_bits_format_value(proto_tree *tree, const int hf_index, tvbuff_t *tvb, const guint bit_offset, const gint no_of_bits,
2942 float value, const char *format, ...) G_GNUC_PRINTF(7,8);
2943
2944
2952 WS_DLL_PUBLIC proto_item *
2953 proto_tree_add_ts_23_038_7bits_item(proto_tree *tree, const int hfindex, tvbuff_t *tvb,
2954 const guint bit_offset, const gint no_of_chars);
2955
2963 WS_DLL_PUBLIC proto_item *
2964 proto_tree_add_ascii_7bits_item(proto_tree *tree, const int hfindex, tvbuff_t *tvb,
2965 const guint bit_offset, const gint no_of_chars);
2966
2984 WS_DLL_PUBLIC proto_item *
2985 proto_tree_add_checksum(proto_tree *tree, tvbuff_t *tvb, const guint offset,
2986 const int hf_checksum, const int hf_checksum_status, struct expert_field* bad_checksum_expert,
2987 packet_info *pinfo, guint32 computed_checksum, const guint encoding, const guint flags);
2988
2989 typedef enum
2990 {
2991 PROTO_CHECKSUM_E_BAD = 0,
2992 PROTO_CHECKSUM_E_GOOD,
2993 PROTO_CHECKSUM_E_UNVERIFIED,
2994 PROTO_CHECKSUM_E_NOT_PRESENT
2995
2996 } proto_checksum_enum_e;
2997
2998 #define PROTO_CHECKSUM_NO_FLAGS 0x00
2999 #define PROTO_CHECKSUM_VERIFY 0x01
3000 #define PROTO_CHECKSUM_GENERATED 0x02
3001 #define PROTO_CHECKSUM_IN_CKSUM 0x04
3002 #define PROTO_CHECKSUM_ZERO 0x08
3003 #define PROTO_CHECKSUM_NOT_PRESENT 0x10
3005 WS_DLL_PUBLIC const value_string proto_checksum_vals[];
3006
3007
3011 WS_DLL_PUBLIC guchar
3012 proto_check_field_name(const gchar *field_name);
3013
3014
3022 const gchar *
3023 proto_custom_set(proto_tree* tree, GSList *field_id,
3024 gint occurrence,
3025 gchar *result,
3026 gchar *expr, const int size );
3027
3028 /* #define HAVE_HFI_SECTION_INIT */
3029
3030 #ifdef HAVE_HFI_SECTION_INIT
3031 #define HFI_INIT(proto) __attribute__((section( "_data_" G_STRINGIFY(proto)))) __attribute__((aligned(sizeof(void *))))
3032
3033 #define proto_register_fields(proto, hfi, count) \
3034 do { \
3035 extern header_field_info __start__data_ ##proto[]; \
3036 extern header_field_info __stop__data_ ##proto[]; \
3037 \
3038 proto_register_fields_section(proto, __start__data_ ##proto, (int) (__stop__data_ ##proto - __start__data_ ##proto)); \
3039 } while(0)
3040 #else
3041 #define HFI_INIT(proto)
3042 #define proto_register_fields(proto, hfi, count) \
3043 proto_register_fields_manual(proto, hfi, count)
3044 #endif
3045
3046 #ifdef NEW_PROTO_TREE_API
3047 #define proto_tree_add_item(tree, hfinfo, tvb, start, length, encoding) \
3048 proto_tree_add_item_new(tree, hfinfo, tvb, start, length, encoding)
3049
3050 #define proto_tree_add_item_ret_length(tree, hfinfo, tvb, start, length, encoding, retval) \
3051 proto_tree_add_item_new_ret_length(tree, hfinfo, tvb, start, length, encoding, retval)
3052
3053 #define proto_tree_add_boolean(tree, hfinfo, tvb, start, length, value) \
3054 proto_tree_add_boolean(tree, (hfinfo)->id, tvb, start, length, value)
3055
3056 #define proto_tree_add_string(tree, hfinfo, tvb, start, length, value) \
3057 proto_tree_add_string(tree, (hfinfo)->id, tvb, start, length, value)
3058
3059 #define proto_tree_add_time(tree, hfinfo, tvb, start, length, value) \
3060 proto_tree_add_time(tree, (hfinfo)->id, tvb, start, length, value)
3061
3062 #define proto_tree_add_int(tree, hfinfo, tvb, start, length, value) \
3063 proto_tree_add_int(tree, (hfinfo)->id, tvb, start, length, value)
3064
3065 #define proto_tree_add_uint(tree, hfinfo, tvb, start, length, value) \
3066 proto_tree_add_uint(tree, (hfinfo)->id, tvb, start, length, value)
3067
3068 #define proto_tree_add_float(tree, hfinfo, tvb, start, length, value) \
3069 proto_tree_add_float(tree, (hfinfo)->id, tvb, start, length, value)
3070
3071 #define proto_tree_add_float_format_value(tree, hfinfo, \
3072 tvb, start, length, value, format, ...) \
3073 proto_tree_add_float_format_value(tree, (hfinfo)->id, \
3074 tvb, start, length, value, format, __VA_ARGS__)
3075 #endif
3076
3079 #ifdef __cplusplus
3080 }
3081 #endif /* __cplusplus */
3082
3083 #endif /* proto.h */
proto_tree_add_ether_format_value
WS_DLL_PUBLIC proto_item * proto_tree_add_ether_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const guint8 *value, const char *format,...) G_GNUC_PRINTF(7
proto_tracking_interesting_fields
WS_DLL_PUBLIC gboolean proto_tracking_interesting_fields(const proto_tree *tree)
Definition: proto.c:9455
proto_tree_add_protocol_format
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item * proto_tree_add_protocol_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const char *format,...) G_GNUC_PRINTF(6
proto_heuristic_dissector_foreach
WS_DLL_PUBLIC void proto_heuristic_dissector_foreach(const protocol_t *protocol, GFunc func, gpointer user_data)
Definition: proto.c:6815
proto_tree_add_bytes_with_length
WS_DLL_PUBLIC proto_item * proto_tree_add_bytes_with_length(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const guint8 *start_ptr, gint ptr_length)
Definition: proto.c:3564
proto_tree_set_fake_protocols
void proto_tree_set_fake_protocols(proto_tree *tree, gboolean fake_protocols)
Definition: proto.c:782
BASE_NETMASK
Definition: proto.h:575
proto_registrar_get_id_byname
WS_DLL_PUBLIC int proto_registrar_get_id_byname(const char *field_name)
Definition: proto.c:947
e_in6_addr
Definition: inet_ipv6.h:20
proto_tree_add_int
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item * proto_tree_add_int(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, gint32 value)
Definition: proto.c:4786
HF_REF_TYPE_DIRECT
Definition: proto.h:615
hf_register_info
struct hf_register_info hf_register_info
HF_REF_TYPE_INDIRECT
Definition: proto.h:614
_header_field_info
Definition: proto.h:622
proto_tree_add_string
proto_item proto_item WS_DLL_PUBLIC proto_item * proto_tree_add_string(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const char *value)
Definition: proto.c:4131
proto_add_deregistered_data
WS_DLL_PUBLIC void proto_add_deregistered_data(void *data)
Definition: proto.c:7112
proto_tree_add_bitmask
WS_DLL_PUBLIC proto_item * proto_tree_add_bitmask(proto_tree *tree, tvbuff_t *tvb, const guint offset, const int hf_hdr, const gint ett, const int **fields, const guint encoding)
Definition: proto.c:10974
proto_get_protocol_short_name
WS_DLL_PUBLIC const char * proto_get_protocol_short_name(const protocol_t *protocol)
Definition: proto.c:6775
proto_tree_add_bitmask_len
WS_DLL_PUBLIC proto_item * proto_tree_add_bitmask_len(proto_tree *tree, tvbuff_t *tvb, const guint offset, const guint len, const int hf_hdr, const gint ett, const int **fields, struct expert_field *exp, const guint encoding)
Definition: proto.c:11118
proto_register_subtree_array
WS_DLL_PUBLIC void proto_register_subtree_array(gint *const *indices, const int num_indices)
Definition: proto.c:7930
proto_register_field_array
WS_DLL_PUBLIC void proto_register_field_array(const int parent, hf_register_info *hf, const int num_records)
Definition: proto.c:6993
proto_check_field_name
WS_DLL_PUBLIC guchar proto_check_field_name(const gchar *field_name)
Definition: proto.c:12052
proto_tree_prime_with_hfid
void proto_tree_prime_with_hfid(proto_tree *tree, const int hfid)
proto_tree_add_uint_format_value
WS_DLL_PUBLIC proto_item * proto_tree_add_uint_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, guint32 value, const char *format,...) G_GNUC_PRINTF(7
SEP_DOT
Definition: proto.h:569
find_protocol_by_id
WS_DLL_PUBLIC protocol_t * find_protocol_by_id(const int proto_id)
Definition: proto.c:6704
proto_tree_add_boolean_format
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item * proto_tree_add_boolean_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, guint32 value, const char *format,...) G_GNUC_PRINTF(7
prefix_initializer_t
void(* prefix_initializer_t)(const char *match)
Definition: proto.h:2191
proto_tree_add_bitmask_with_flags_ret_uint64
WS_DLL_PUBLIC proto_item * proto_tree_add_bitmask_with_flags_ret_uint64(proto_tree *tree, tvbuff_t *tvb, const guint offset, const int hf_hdr, const gint ett, const int **fields, const guint encoding, const int flags, guint64 *retval)
Definition: proto.c:10986
proto_tree_add_int64
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item * proto_tree_add_int64(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, gint64 value)
Definition: proto.c:4878
BASE_HEX
Definition: proto.h:554
proto_find_finfo
WS_DLL_PUBLIC GPtrArray * proto_find_finfo(proto_tree *tree, const int hfindex)
Definition: proto.c:9513
proto_tree_add_ipv6_format_value
WS_DLL_PUBLIC proto_item * proto_tree_add_ipv6_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const ws_in6_addr *value_ptr, const char *format,...) G_GNUC_PRINTF(7
proto_tree_add_double_format
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item * proto_tree_add_double_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, double value, const char *format,...) G_GNUC_PRINTF(7
proto_tree_add_uint64
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item * proto_tree_add_uint64(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, guint64 value)
Definition: proto.c:4697
_packet_info
Definition: packet_info.h:44
proto_item_prepend_text
WS_DLL_PUBLIC void WS_DLL_PUBLIC void WS_DLL_PUBLIC void proto_item_prepend_text(proto_item *ti, const char *format,...) G_GNUC_PRINTF(2
proto_registrar_get_abbrev
WS_DLL_PUBLIC const char * proto_registrar_get_abbrev(const int n)
Definition: proto.c:9373
proto_tree_add_uint
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item * proto_tree_add_uint(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, guint32 value)
Definition: proto.c:4607
proto_registrar_dump_protocols
WS_DLL_PUBLIC void proto_registrar_dump_protocols(void)
Definition: proto.c:9666
proto_item_get_parent_nth
WS_DLL_PUBLIC proto_item * proto_item_get_parent_nth(proto_item *ti, int gen)
Definition: proto.c:6322
item_label_t
struct _item_label_t item_label_t
proto_tree_add_none_format
WS_DLL_PUBLIC proto_item * proto_tree_add_none_format(proto_tree *tree, const int hfindex, tvbuff_t *tvb, const gint start, gint length, const char *format,...) G_GNUC_PRINTF(6
proto_tree_add_oid_format_value
proto_item * proto_tree_add_oid_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const guint8 *value_ptr, const char *format,...) G_GNUC_PRINTF(7
proto_item_get_len
WS_DLL_PUBLIC int proto_item_get_len(const proto_item *ti)
Definition: proto.c:6216
proto_register_prefix
WS_DLL_PUBLIC void proto_register_prefix(const char *prefix, prefix_initializer_t initializer)
Definition: proto.c:877
tree_expanded
WS_DLL_PUBLIC gboolean tree_expanded(int tree_type)
Definition: proto.c:12074
_header_field_info::abbrev
const char * abbrev
Definition: proto.h:625
BASE_PT_UDP
Definition: proto.h:578
proto_tree_add_bitmask_ret_uint64
WS_DLL_PUBLIC proto_item * proto_tree_add_bitmask_ret_uint64(proto_tree *tree, tvbuff_t *tvb, const guint offset, const int hf_hdr, const gint ett, const int **fields, const guint encoding, guint64 *retval)
Definition: proto.c:10948
proto_get_finfo_ptr_array
WS_DLL_PUBLIC GPtrArray * proto_get_finfo_ptr_array(const proto_tree *tree, const int hfindex)
Definition: proto.c:9442
proto_item_get_parent
WS_DLL_PUBLIC proto_item * proto_item_get_parent(const proto_item *ti)
Definition: proto.c:6315
proto_tree_add_ipv6_format
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item * proto_tree_add_ipv6_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const ws_in6_addr *value_ptr, const char *format,...) G_GNUC_PRINTF(7
proto_tree_add_uint64_format_value
WS_DLL_PUBLIC proto_item * proto_tree_add_uint64_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, guint64 value, const char *format,...) G_GNUC_PRINTF(7
BASE_DEC_HEX
Definition: proto.h:556
proto_tree_add_ipxnet_format_value
WS_DLL_PUBLIC proto_item * proto_tree_add_ipxnet_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, guint32 value, const char *format,...) G_GNUC_PRINTF(7
proto_tree_add_guid_format_value
WS_DLL_PUBLIC proto_item * proto_tree_add_guid_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const e_guid_t *value_ptr, const char *format,...) G_GNUC_PRINTF(7
proto_get_frame_protocols
WS_DLL_PUBLIC void proto_get_frame_protocols(const wmem_list_t *layers, gboolean *is_ip, gboolean *is_tcp, gboolean *is_udp, gboolean *is_sctp, gboolean *is_ssl, gboolean *is_rtp, gboolean *is_lte_rlc)
Definition: proto.c:6824
proto_tree_add_bytes
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item * proto_tree_add_bytes(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const guint8 *start_ptr)
Definition: proto.c:3539
proto_tree_add_subtree_format
WS_DLL_PUBLIC proto_tree * proto_tree_add_subtree_format(proto_tree *tree, tvbuff_t *tvb, gint start, gint length, gint idx, proto_item **tree_item, const char *format,...) G_GNUC_PRINTF(7
proto_tree_add_ipxnet
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item * proto_tree_add_ipxnet(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, guint32 value)
Definition: proto.c:3734
proto_tree_add_float_format_value
WS_DLL_PUBLIC proto_item * proto_tree_add_float_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, float value, const char *format,...) G_GNUC_PRINTF(7
proto_tree_add_text_valist_internal
proto_item proto_item * proto_tree_add_text_valist_internal(proto_tree *tree, tvbuff_t *tvb, gint start, gint length, const char *format, va_list ap) G_GNUC_PRINTF(5
BASE_NONE
Definition: proto.h:552
proto_get_id_by_filter_name
WS_DLL_PUBLIC int proto_get_id_by_filter_name(const gchar *filter_name)
Definition: proto.c:6735
proto_free_deregistered_fields
WS_DLL_PUBLIC void proto_free_deregistered_fields(void)
Definition: proto.c:7218
proto_is_frame_protocol
WS_DLL_PUBLIC gboolean proto_is_frame_protocol(const wmem_list_t *layers, const char *proto_name)
Definition: proto.c:6864
proto_tree_add_debug_text
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item * proto_tree_add_debug_text(proto_tree *tree, const char *format,...) G_GNUC_PRINTF(2
ITEM_LABEL_LENGTH
#define ITEM_LABEL_LENGTH
Definition: proto.h:63
proto_tree_add_ipv4
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item * proto_tree_add_ipv4(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, guint32 value)
Definition: proto.c:3799
BASE_PT_DCCP
Definition: proto.h:580
proto_tree_add_int_format_value
WS_DLL_PUBLIC proto_item * proto_tree_add_int_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, gint32 value, const char *format,...) G_GNUC_PRINTF(7
hf_register_info
Definition: proto.h:658
proto_tree_add_item_ret_string_and_length
WS_DLL_PUBLIC proto_item * proto_tree_add_item_ret_string_and_length(proto_tree *tree, int hfindex, tvbuff_t *tvb, const gint start, gint length, const guint encoding, wmem_allocator_t *scope, const guint8 **retval, gint *lenretval)
Definition: proto.c:3058
proto_registrar_get_byname
WS_DLL_PUBLIC header_field_info * proto_registrar_get_byname(const char *field_name)
Definition: proto.c:905
proto_tree_add_split_bits_item_ret_val
WS_DLL_PUBLIC proto_item * proto_tree_add_split_bits_item_ret_val(proto_tree *tree, const int hf_index, tvbuff_t *tvb, const guint bit_offset, const crumb_spec_t *crumb_spec, guint64 *return_value)
Definition: proto.c:11354
tvbuff
Definition: tvbuff-int.h:35
proto_check_for_protocol_or_field
gboolean proto_check_for_protocol_or_field(const proto_tree *tree, const int id)
Definition: proto.c:9424
proto_item_fill_label
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC void proto_item_fill_label(field_info *fi, gchar *label_str)
Definition: proto.c:8066
proto_tree_add_uint64_format
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item * proto_tree_add_uint64_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, guint64 value, const char *format,...) G_GNUC_PRINTF(7
proto_field_is_referenced
WS_DLL_PUBLIC gboolean proto_field_is_referenced(proto_tree *tree, int proto_id)
Definition: proto.c:795
BASE_CUSTOM
Definition: proto.h:558
proto_tree_add_item_new_ret_length
WS_DLL_PUBLIC proto_item * proto_tree_add_item_new_ret_length(proto_tree *tree, header_field_info *hfinfo, tvbuff_t *tvb, const gint start, gint length, const guint encoding, gint *lenretval)
Definition: proto.c:3185
proto_tree_add_ts_23_038_7bits_item
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item proto_item proto_item proto_item proto_item proto_item WS_DLL_PUBLIC proto_item * proto_tree_add_ts_23_038_7bits_item(proto_tree *tree, const int hfindex, tvbuff_t *tvb, const guint bit_offset, const gint no_of_chars)
Definition: proto.c:11883
nstime_t
Definition: nstime.h:27
proto_tree_add_bitmask_list
WS_DLL_PUBLIC void proto_tree_add_bitmask_list(proto_tree *tree, tvbuff_t *tvb, const guint offset, const int len, const int **fields, const guint encoding)
Definition: proto.c:11083
proto_tree_add_ether
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item * proto_tree_add_ether(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const guint8 *value)
Definition: proto.c:4232
proto_tree_add_string_format
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item * proto_tree_add_string_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const char *value, const char *format,...) G_GNUC_PRINTF(7
proto_tree_set_visible
WS_DLL_PUBLIC gboolean proto_tree_set_visible(proto_tree *tree, gboolean visible)
Definition: proto.c:772
proto_tree_add_boolean_format_value
WS_DLL_PUBLIC proto_item * proto_tree_add_boolean_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, guint32 value, const char *format,...) G_GNUC_PRINTF(7
proto_tree_add_uint64_bits_format_value
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item * proto_tree_add_uint64_bits_format_value(proto_tree *tree, const int hf_index, tvbuff_t *tvb, const guint bit_offset, const gint no_of_bits, guint64 value, const char *format,...) G_GNUC_PRINTF(7
proto_tree_add_ipv6
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item * proto_tree_add_ipv6(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const ws_in6_addr *value_ptr)
Definition: proto.c:3864
proto_tree_add_bits_item
WS_DLL_PUBLIC proto_item * proto_tree_add_bits_item(proto_tree *tree, const int hf_index, tvbuff_t *tvb, const guint bit_offset, const gint no_of_bits, const guint encoding)
Definition: proto.c:11193
proto_item_append_text
WS_DLL_PUBLIC void WS_DLL_PUBLIC void proto_item_append_text(proto_item *ti, const char *format,...) G_GNUC_PRINTF(2
field_info
Definition: proto.h:673
proto_tree_set_appendix
WS_DLL_PUBLIC void proto_tree_set_appendix(proto_tree *tree, tvbuff_t *tvb, gint start, const gint length)
Definition: proto.c:6416
proto_tree_add_bitmask_with_flags
WS_DLL_PUBLIC proto_item * proto_tree_add_bitmask_with_flags(proto_tree *tree, tvbuff_t *tvb, const guint offset, const int hf_hdr, const gint ett, const int **fields, const guint encoding, const int flags)
Definition: proto.c:11021
_header_field_info::type
enum ftenum type
Definition: proto.h:626
proto_reenable_all
WS_DLL_PUBLIC void proto_reenable_all(void)
Definition: proto.c:6955
HF_REF_TYPE_NONE
Definition: proto.h:613
proto_item_set_len
WS_DLL_PUBLIC void WS_DLL_PUBLIC void WS_DLL_PUBLIC void WS_DLL_PUBLIC void proto_item_set_len(proto_item *ti, const gint length)
Definition: proto.c:6176
proto_tree_get_parent
WS_DLL_PUBLIC proto_item * proto_tree_get_parent(proto_tree *tree)
Definition: proto.c:6335
proto_item
proto_node proto_item
Definition: proto.h:771
_plugin
Definition: plugins.c:31
SEP_COLON
Definition: proto.h:571
proto_tree_add_int_bits_format_value
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item proto_item proto_item proto_item * proto_tree_add_int_bits_format_value(proto_tree *tree, const int hf_index, tvbuff_t *tvb, const guint bit_offset, const gint no_of_bits, gint32 value, const char *format,...) G_GNUC_PRINTF(7
tfs.h
proto_tree_get_root
WS_DLL_PUBLIC proto_tree * proto_tree_get_root(proto_tree *tree)
Definition: proto.c:6355
BASE_DEC
Definition: proto.h:553
proto_custom_set
const gchar * proto_custom_set(proto_tree *tree, GSList *field_id, gint occurrence, gchar *result, gchar *expr, const int size)
Definition: proto.c:5582
nstime.h
proto_find_undecoded_data
WS_DLL_PUBLIC gchar * proto_find_undecoded_data(proto_tree *tree, guint length)
Definition: proto.c:9645
_e_guid_t
Definition: guid-utils.h:21
_header_field_info::bitmask
guint64 bitmask
Definition: proto.h:632
proto_tree_add_ipv4_format_value
WS_DLL_PUBLIC proto_item * proto_tree_add_ipv4_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, guint32 value, const char *format,...) G_GNUC_PRINTF(7
proto_tree_add_double
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item * proto_tree_add_double(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, double value)
Definition: proto.c:4542
proto_can_match_selected
WS_DLL_PUBLIC gboolean proto_can_match_selected(field_info *finfo, struct epan_dissect *edt)
Definition: proto.c:10607
_header_field_info::strings
const void * strings
Definition: proto.h:628
proto_tree_add_boolean_bits_format_value64
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item proto_item proto_item * proto_tree_add_boolean_bits_format_value64(proto_tree *tree, const int hf_index, tvbuff_t *tvb, const guint bit_offset, const gint no_of_bits, guint64 value, const char *format,...) G_GNUC_PRINTF(7
proto_tree_add_uint_format
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item * proto_tree_add_uint_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, guint32 value, const char *format,...) G_GNUC_PRINTF(7
proto_can_toggle_protocol
WS_DLL_PUBLIC gboolean proto_can_toggle_protocol(const int proto_id)
Definition: proto.c:6919
proto_registrar_dump_ftypes
WS_DLL_PUBLIC void proto_registrar_dump_ftypes(void)
Definition: proto.c:10336
proto_tree_add_time_format_value
WS_DLL_PUBLIC proto_item * proto_tree_add_time_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, nstime_t *value_ptr, const char *format,...) G_GNUC_PRINTF(7
proto_item_set_end
WS_DLL_PUBLIC void proto_item_set_end(proto_item *ti, tvbuff_t *tvb, gint end)
Definition: proto.c:6197
proto_field_display_to_string
WS_DLL_PUBLIC const char * proto_field_display_to_string(int field_display)
Definition: proto.c:7287
proto_report_dissector_bug
WS_DLL_PUBLIC WS_NORETURN void proto_report_dissector_bug(const char *format,...) G_GNUC_PRINTF(1
proto_tree_add_double_format_value
WS_DLL_PUBLIC proto_item * proto_tree_add_double_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, double value, const char *format,...) G_GNUC_PRINTF(7
proto_tree_add_item_new
WS_DLL_PUBLIC proto_item * proto_tree_add_item_new(proto_tree *tree, header_field_info *hfinfo, tvbuff_t *tvb, const gint start, gint length, const guint encoding)
Definition: proto.c:3150
proto_item_set_text
WS_DLL_PUBLIC void proto_item_set_text(proto_item *ti, const char *format,...) G_GNUC_PRINTF(2
proto_item_add_subtree
WS_DLL_PUBLIC proto_tree * proto_item_add_subtree(proto_item *ti, const gint idx) G_GNUC_WARN_UNUSED_RESULT
Definition: proto.c:6285
BASE_HEX_DEC
Definition: proto.h:557
proto_tree_add_time_format
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item * proto_tree_add_time_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, nstime_t *value_ptr, const char *format,...) G_GNUC_PRINTF(7
proto_tree_add_oid_format
proto_item proto_item * proto_tree_add_oid_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const guint8 *value_ptr, const char *format,...) G_GNUC_PRINTF(7
proto_tree_add_ether_format
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item * proto_tree_add_ether_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const guint8 *value, const char *format,...) G_GNUC_PRINTF(7
proto_tree_add_int_format
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item * proto_tree_add_int_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, gint32 value, const char *format,...) G_GNUC_PRINTF(7
proto_tree_add_item_ret_string
WS_DLL_PUBLIC proto_item * proto_tree_add_item_ret_string(proto_tree *tree, int hfindex, tvbuff_t *tvb, const gint start, gint length, const guint encoding, wmem_allocator_t *scope, const guint8 **retval)
Definition: proto.c:3107
proto_all_finfos
WS_DLL_PUBLIC GPtrArray * proto_all_finfos(proto_tree *tree)
Definition: proto.c:9559
tree_data_t
Definition: proto.h:750
proto_tree_add_text_internal
proto_item * proto_tree_add_text_internal(proto_tree *tree, tvbuff_t *tvb, gint start, gint length, const char *format,...) G_GNUC_PRINTF(5
proto_deregister_field
WS_DLL_PUBLIC void proto_deregister_field(const int parent, gint hf_id)
Definition: proto.c:7082
proto_tree
proto_node proto_tree
Definition: proto.h:769
proto_set_decoding
WS_DLL_PUBLIC void proto_set_decoding(const int proto_id, const gboolean enabled)
Definition: proto.c:6944
proto_tree_add_format_wsp_text
proto_item * proto_tree_add_format_wsp_text(proto_tree *tree, tvbuff_t *tvb, gint start, gint length)
Definition: proto.c:1296
proto_tree_add_eui64_format
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item * proto_tree_add_eui64_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const guint64 value, const char *format,...) G_GNUC_PRINTF(7
proto_get_protocol_long_name
WS_DLL_PUBLIC const char * proto_get_protocol_long_name(const protocol_t *protocol)
Definition: proto.c:6783
proto_tree_move_item
WS_DLL_PUBLIC void proto_tree_move_item(proto_tree *tree, proto_item *fixed_item, proto_item *item_to_move)
Definition: proto.c:6365
_header_field_info::same_name_next
header_field_info * same_name_next
Definition: proto.h:640
proto_initialize_all_prefixes
WS_DLL_PUBLIC void proto_initialize_all_prefixes(void)
Definition: proto.c:894
proto_tree_add_ipv4_format
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item * proto_tree_add_ipv4_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, guint32 value, const char *format,...) G_GNUC_PRINTF(7
_wmem_allocator_t
Definition: wmem_allocator.h:26
proto_registrar_dump_fieldcount
WS_DLL_PUBLIC gboolean proto_registrar_dump_fieldcount(void)
Definition: proto.c:9921
proto_find_field_from_offset
WS_DLL_PUBLIC field_info * proto_find_field_from_offset(proto_tree *tree, guint offset, tvbuff_t *tvb)
Definition: proto.c:9606
STR_ASCII
Definition: proto.h:564
proto_tree_add_time
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item * proto_tree_add_time(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const nstime_t *value_ptr)
Definition: proto.c:3667
_header_field_info::ref_type
hf_ref_type ref_type
Definition: proto.h:638
proto_tree_get_parent_tree
WS_DLL_PUBLIC proto_tree * proto_tree_get_parent_tree(proto_tree *tree)
Definition: proto.c:6342
expert_field
Definition: expert.h:37
_header_field_info::display
int display
Definition: proto.h:627
proto_get_protocol_filter_name
WS_DLL_PUBLIC const char * proto_get_protocol_filter_name(const int proto_id)
Definition: proto.c:6791
proto_tree_add_int64_format
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item * proto_tree_add_int64_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, gint64 value, const char *format,...) G_GNUC_PRINTF(7
proto_tree_add_boolean
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item * proto_tree_add_boolean(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, guint32 value)
Definition: proto.c:4303
proto_tree_add_bitmask_value_with_flags
WS_DLL_PUBLIC proto_item * proto_tree_add_bitmask_value_with_flags(proto_tree *tree, tvbuff_t *tvb, const guint offset, const int hf_hdr, const gint ett, const int **fields, const guint64 value, const int flags)
Definition: proto.c:11055
_fvalue_t
Definition: ftypes.h:200
BASE_OUI
Definition: proto.h:584
proto_registrar_get_length
gint proto_registrar_get_length(const int n)
Definition: proto.c:9413
SEP_DASH
Definition: proto.h:570
hf_text_only
WS_DLL_PUBLIC int hf_text_only
Definition: proto.h:60
BASE_FLOAT
Definition: proto.h:561
proto_tree_add_ascii_7bits_item
WS_DLL_PUBLIC proto_item * proto_tree_add_ascii_7bits_item(proto_tree *tree, const int hfindex, tvbuff_t *tvb, const guint bit_offset, const gint no_of_chars)
Definition: proto.c:11915
proto_tree_add_checksum
WS_DLL_PUBLIC proto_item * proto_tree_add_checksum(proto_tree *tree, tvbuff_t *tvb, const guint offset, const int hf_checksum, const int hf_checksum_status, struct expert_field *bad_checksum_expert, packet_info *pinfo, guint32 computed_checksum, const guint encoding, const guint flags)
Definition: proto.c:11956
proto_tree_add_bitmask_value
WS_DLL_PUBLIC proto_item * proto_tree_add_bitmask_value(proto_tree *tree, tvbuff_t *tvb, const guint offset, const int hf_hdr, const gint ett, const int **fields, const guint64 value)
Definition: proto.c:11046
proto_tree_add_bits_ret_val
WS_DLL_PUBLIC proto_item * proto_tree_add_bits_ret_val(proto_tree *tree, const int hf_index, tvbuff_t *tvb, const guint bit_offset, const gint no_of_bits, guint64 *return_value, const guint encoding)
Definition: proto.c:11547
proto_tree_add_format_text
WS_DLL_PUBLIC proto_tree proto_item * proto_tree_add_format_text(proto_tree *tree, tvbuff_t *tvb, gint start, gint length)
Definition: proto.c:1277
_header_field_info::id
int id
Definition: proto.h:636
proto_set_cant_toggle
WS_DLL_PUBLIC void proto_set_cant_toggle(const int proto_id)
Definition: proto.c:6972
_header_field_info::name
const char * name
Definition: proto.h:624
SEP_SPACE
Definition: proto.h:572
proto_node
struct _proto_node proto_node
proto_add_heuristic_dissector
void proto_add_heuristic_dissector(protocol_t *protocol, const char *short_name)
Definition: proto.c:6801
proto_get_id
WS_DLL_PUBLIC int proto_get_id(const protocol_t *protocol)
Definition: proto.c:6719
proto_registrar_get_ftype
WS_DLL_PUBLIC enum ftenum proto_registrar_get_ftype(const int n)
Definition: proto.c:9382
proto_tree_add_float_format
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item * proto_tree_add_float_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, float value, const char *format,...) G_GNUC_PRINTF(7
_item_label_t
Definition: proto.h:667
BASE_PT_SCTP
Definition: proto.h:581
proto_tree_create_root
proto_tree * proto_tree_create_root(struct _packet_info *pinfo)
Definition: proto.c:6223
proto_find_first_finfo
WS_DLL_PUBLIC GPtrArray * proto_find_first_finfo(proto_tree *tree, const int hfindex)
Definition: proto.c:9532
proto_tree_add_bytes_format_value
WS_DLL_PUBLIC proto_item * proto_tree_add_bytes_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const guint8 *start_ptr, const char *format,...) G_GNUC_PRINTF(7
proto_registrar_is_protocol
WS_DLL_PUBLIC gboolean proto_registrar_is_protocol(const int n)
Definition: proto.c:9400
proto_tree_free
WS_DLL_PUBLIC void proto_tree_free(proto_tree *tree)
Definition: proto.c:746
epan_dissect
Definition: epan_dissect.h:28
proto_tree_add_time_item
WS_DLL_PUBLIC proto_item * proto_tree_add_time_item(proto_tree *tree, int hfindex, tvbuff_t *tvb, const gint start, gint length, const guint encoding, nstime_t *retval, gint *endoff, gint *err)
Definition: proto.c:3373
num_tree_types
WS_DLL_PUBLIC int num_tree_types
Definition: proto.h:2479
proto_get_first_protocol
WS_DLL_PUBLIC int proto_get_first_protocol(void **cookie)
Definition: proto.c:6635
BASE_PT_TCP
Definition: proto.h:579
proto_registrar_get_name
WS_DLL_PUBLIC const char * proto_registrar_get_name(const int n)
Definition: proto.c:9364
proto_is_pino
WS_DLL_PUBLIC gboolean proto_is_pino(const protocol_t *protocol)
Definition: proto.c:6890
proto_tree_add_ipxnet_format
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item * proto_tree_add_ipxnet_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, guint32 value, const char *format,...) G_GNUC_PRINTF(7
proto_tree_add_int64_bits_format_value
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item proto_item proto_item proto_item proto_item * proto_tree_add_int64_bits_format_value(proto_tree *tree, const int hf_index, tvbuff_t *tvb, const guint bit_offset, const gint no_of_bits, gint64 value, const char *format,...) G_GNUC_PRINTF(7
proto_get_protocol_name
WS_DLL_PUBLIC const char * proto_get_protocol_name(const int proto_id)
Definition: proto.c:6763
_header_field_info::same_name_prev_id
int same_name_prev_id
Definition: proto.h:639
proto_tree_add_guid
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item * proto_tree_add_guid(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const e_guid_t *value_ptr)
Definition: proto.c:3952
proto_init
void proto_init(GSList *register_all_protocols_list, GSList *register_all_handoffs_list, register_cb cb, void *client_data)
proto_tree_add_uint_bits_format_value
WS_DLL_PUBLIC proto_item * proto_tree_add_uint_bits_format_value(proto_tree *tree, const int hf_index, tvbuff_t *tvb, const guint bit_offset, const gint no_of_bits, guint32 value, const char *format,...) G_GNUC_PRINTF(7
_proto_node
Definition: proto.h:759
proto_tree_add_string_format_value
WS_DLL_PUBLIC proto_item * proto_tree_add_string_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const char *value, const char *format,...) G_GNUC_PRINTF(7
crumb_spec_t
Definition: proto.h:695
proto_deregister_protocol
gboolean proto_deregister_protocol(const char *short_name)
Definition: proto.c:6588
proto_tree_add_bitmask_list_value
WS_DLL_PUBLIC void proto_tree_add_bitmask_list_value(proto_tree *tree, tvbuff_t *tvb, const guint offset, const int len, const int **fields, const guint64 value)
Definition: proto.c:11096
proto_get_id_by_short_name
WS_DLL_PUBLIC int proto_get_id_by_short_name(const gchar *short_name)
Definition: proto.c:6749
_wmem_list_t
Definition: wmem_list.c:23
proto_tree_add_eui64_format_value
WS_DLL_PUBLIC proto_item * proto_tree_add_eui64_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const guint64 value, const char *format,...) G_GNUC_PRINTF(7
proto_construct_match_selected_string
WS_DLL_PUBLIC char * proto_construct_match_selected_string(field_info *finfo, struct epan_dissect *edt)
Definition: proto.c:10619
packet_info.h
field_info
struct field_info field_info
BASE_OCT
Definition: proto.h:555
_header_field_info::parent
int parent
Definition: proto.h:637
proto_is_protocol_enabled
WS_DLL_PUBLIC gboolean proto_is_protocol_enabled(const protocol_t *protocol)
Definition: proto.c:6896
proto_tree_add_bitmask_text
WS_DLL_PUBLIC proto_item * proto_tree_add_bitmask_text(proto_tree *tree, tvbuff_t *tvb, const guint offset, const guint len, const char *name, const char *fallback, const gint ett, const int **fields, const guint encoding, const int flags)
Definition: proto.c:11170
field_display_e
field_display_e
Definition: proto.h:550
proto_tree_add_eui64
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item * proto_tree_add_eui64(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const guint64 value)
Definition: proto.c:4970
STR_UNICODE
Definition: proto.h:566
proto_is_protocol_enabled_by_default
WS_DLL_PUBLIC gboolean proto_is_protocol_enabled_by_default(const protocol_t *protocol)
Definition: proto.c:6909
proto_tree_add_int64_format_value
WS_DLL_PUBLIC proto_item * proto_tree_add_int64_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, gint64 value, const char *format,...) G_GNUC_PRINTF(7
proto_disable_by_default
WS_DLL_PUBLIC void proto_disable_by_default(const int proto_id)
Definition: proto.c:6932
proto_tree_add_float
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item * proto_tree_add_float(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, float value)
Definition: proto.c:4477
proto_register_protocol_in_name_only
WS_DLL_PUBLIC int proto_register_protocol_in_name_only(const char *name, const char *short_name, const char *filter_name, int parent_proto, enum ftenum field_type)
Definition: proto.c:6529
proto_registrar_get_parent
WS_DLL_PUBLIC int proto_registrar_get_parent(const int n)
Definition: proto.c:9391
proto_registrar_dump_fields
WS_DLL_PUBLIC void proto_registrar_dump_fields(void)
Definition: proto.c:10220
_protocol
Definition: proto.c:312
proto_item_get_subtree
WS_DLL_PUBLIC proto_tree * proto_item_get_subtree(proto_item *ti)
Definition: proto.c:6303
proto_tree_add_oid
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item proto_item * proto_tree_add_oid(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const guint8 *value_ptr)
Definition: proto.c:4029
proto_tree_add_split_bits_crumb
void proto_tree_add_split_bits_crumb(proto_tree *tree, const int hf_index, tvbuff_t *tvb, const guint bit_offset, const crumb_spec_t *crumb_spec, guint16 crumb_index)
Definition: proto.c:11527
proto_tree_add_bytes_format
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item * proto_tree_add_bytes_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const guint8 *start_ptr, const char *format,...) G_GNUC_PRINTF(7
_header_field_info::blurb
const char * blurb
Definition: proto.h:633
proto_tree_add_float_bits_format_value
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item proto_item proto_item proto_item proto_item proto_item * proto_tree_add_float_bits_format_value(proto_tree *tree, const int hf_index, tvbuff_t *tvb, const guint bit_offset, const gint no_of_bits, float value, const char *format,...) G_GNUC_PRINTF(7
tree_expanded_set
WS_DLL_PUBLIC void tree_expanded_set(int tree_type, gboolean value)
Definition: proto.c:12084
proto_tree_add_subtree
proto_item proto_item WS_DLL_PUBLIC proto_tree * proto_tree_add_subtree(proto_tree *tree, tvbuff_t *tvb, gint start, gint length, gint idx, proto_item **tree_item, const char *text)
Definition: proto.c:1226
proto_tree_add_item_ret_int
WS_DLL_PUBLIC proto_item * proto_tree_add_item_ret_int(proto_tree *tree, int hfindex, tvbuff_t *tvb, const gint start, gint length, const guint encoding, gint32 *retval)
Definition: proto.c:2544
proto_registrar_get_nth
WS_DLL_PUBLIC header_field_info * proto_registrar_get_nth(guint hfindex)
Definition: proto.c:819
proto_register_protocol
WS_DLL_PUBLIC int proto_register_protocol(const char *name, const char *short_name, const char *filter_name)
Definition: proto.c:6459
proto_cleanup
void proto_cleanup(void)
Definition: proto.c:606
proto_tree_add_guid_format
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item * proto_tree_add_guid_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const e_guid_t *value_ptr, const char *format,...) G_GNUC_PRINTF(7
hf_ref_type
hf_ref_type
Definition: proto.h:612
proto_registrar_dump_values
WS_DLL_PUBLIC void proto_registrar_dump_values(void)
Definition: proto.c:9724
proto_tree_add_boolean_bits_format_value
WS_DLL_PUBLIC proto_item WS_DLL_PUBLIC proto_item proto_item * proto_tree_add_boolean_bits_format_value(proto_tree *tree, const int hf_index, tvbuff_t *tvb, const guint bit_offset, const gint no_of_bits, guint32 value, const char *format,...) G_GNUC_PRINTF(7
proto_name_already_registered
WS_DLL_PUBLIC int proto_name_already_registered(const gchar *name)
Definition: proto.c:6725
proto_tree_add_bytes_item
WS_DLL_PUBLIC proto_item * proto_tree_add_bytes_item(proto_tree *tree, int hfindex, tvbuff_t *tvb, const gint start, gint length, const guint encoding, GByteArray *retval, gint *endoff, gint *err)
Definition: proto.c:3253