|
Wireshark 4.7.0
The Wireshark network protocol analyzer
|
#include <wireshark.h>#include <wsutil/regex.h>#include <epan/wmem_scopes.h>#include <wsutil/inet_cidr.h>#include <epan/guid-utils.h>#include <epan/tvbuff.h>#include <wsutil/nstime.h>#include <epan/dfilter/drange.h>Go to the source code of this file.
Classes | |
| struct | _protocol_value_t |
| Holds a protocol value's buffer and associated metadata for use in display filter evaluation. More... | |
Macros | |
| #define | ASSERT_FTYPE_NOT_REACHED(ft) ws_error("Invalid field type '%s'.", ftype_name(ft)) |
| #define | FT_IS_INT32(ft) |
True if ft is a signed integer type backed by a 32-bit value. | |
| #define | FT_IS_INT64(ft) |
True if ft is a signed integer type backed by a 64-bit value. | |
| #define | FT_IS_INT(ft) (FT_IS_INT32(ft) || FT_IS_INT64(ft)) |
True if ft is any signed integer type (INT8 through INT64). | |
| #define | FT_IS_UINT32(ft) |
True if ft is an unsigned integer type backed by a 32-bit value. | |
| #define | FT_IS_UINT64(ft) |
True if ft is an unsigned integer type backed by a 64-bit value. | |
| #define | FT_IS_UINT(ft) (FT_IS_UINT32(ft) || FT_IS_UINT64(ft)) |
True if ft is any unsigned integer type (CHAR, UINT8 through UINT64, FRAMENUM). | |
| #define | FT_IS_INTEGER(ft) (FT_IS_INT(ft) || FT_IS_UINT(ft)) |
True if ft is any signed or unsigned integer type. | |
| #define | FT_IS_FLOATING(ft) ((ft) == FT_FLOAT || (ft) == FT_DOUBLE) |
True if ft is a floating-point type (FT_FLOAT or FT_DOUBLE). | |
| #define | FT_IS_TIME(ft) ((ft) == FT_ABSOLUTE_TIME || (ft) == FT_RELATIVE_TIME) |
True if ft is a time type (FT_ABSOLUTE_TIME or FT_RELATIVE_TIME). | |
| #define | FT_IS_STRING(ft) |
True if ft is any string-like type. | |
| #define | FT_IS_SCALAR(ft) ((ft) == FT_INT64 || (ft) == FT_DOUBLE) |
True if ft is a scalar type suitable for internal arithmetic (FT_INT64 or FT_DOUBLE). | |
| #define | FT_ETHER_LEN 6 |
| Fixed byte length of an FT_ETHER (IEEE 802 MAC address) field. | |
| #define | FT_GUID_LEN 16 |
| Fixed byte length of an FT_GUID (UUID) field. | |
| #define | FT_IPv4_LEN 4 |
| Fixed byte length of an FT_IPv4 address field. | |
| #define | FT_IPv6_LEN 16 |
| Fixed byte length of an FT_IPv6 address field. | |
| #define | FT_IPXNET_LEN 4 |
| Fixed byte length of an FT_IPXNET address field. | |
| #define | FT_EUI64_LEN 8 |
| Fixed byte length of an FT_EUI64 identifier field. | |
| #define | FT_AX25_ADDR_LEN 7 |
| Fixed byte length of an FT_AX25 address field. | |
| #define | FT_VINES_ADDR_LEN 6 |
| Fixed byte length of an FT_VINES address field. | |
| #define | FT_FCWWN_LEN 8 |
| Fixed byte length of an FT_FCWWN (Fibre Channel WWN) field. | |
| #define | FT_VARINT_MAX_LEN 10 |
| Maximum byte length of a variable-length base-128 (varint) encoded uint64; ceil(64/7) = 10. | |
| #define | FT_TRUE 1 |
| #define | FT_FALSE 0 |
| #define | fvalue_to_debug_repr(scope, fv) fvalue_to_string_repr(scope, fv, FTREPR_DFILTER, 0) |
Typedefs | |
| typedef enum ftenum | ftenum_t |
| Convenience typedef for ftenum. | |
| typedef enum ft_framenum_type | ft_framenum_type_t |
| Convenience typedef for ft_framenum_type. | |
| typedef struct _ftype_t | ftype_t |
| typedef int | ft_bool_t |
| Three-state boolean type for ftype comparison results. | |
| typedef enum ftrepr | ftrepr_t |
| typedef struct _protocol_value_t | protocol_value_t |
| Holds a protocol value's buffer and associated metadata for use in display filter evaluation. | |
| typedef struct _fvalue_t | fvalue_t |
Functions | |
| void | ftypes_initialize (void) |
| Initializes various field types in Wireshark. | |
| void | ftypes_register_pseudofields (void) |
| Registers pseudofields for various data types in Wireshark. | |
| bool | ftype_similar_types (const enum ftenum ftype_a, const enum ftenum ftype_b) |
| Determine if two field types are similar. | |
| WS_DLL_PUBLIC const char * | ftype_name (ftenum_t ftype) |
| Get the name of a field type. | |
| WS_DLL_PUBLIC const char * | ftype_pretty_name (ftenum_t ftype) |
| Returns a string representing the "pretty" name of the field type. | |
| WS_DLL_PUBLIC int | ftype_wire_size (ftenum_t ftype) |
| Get the wire size of a field type. | |
| WS_DLL_PUBLIC bool | ftype_can_length (enum ftenum ftype) |
| Determines if a given field type can have its length retrieved. | |
| WS_DLL_PUBLIC bool | ftype_can_slice (enum ftenum ftype) |
| Determines if a given field type can be sliced. | |
| WS_DLL_PUBLIC bool | ftype_can_eq (enum ftenum ftype) |
| Checks if a given field type can be compared. | |
| WS_DLL_PUBLIC bool | ftype_can_cmp (enum ftenum ftype) |
| Determines if a given field type can be compared. | |
| WS_DLL_PUBLIC bool | ftype_can_bitwise_and (enum ftenum ftype) |
| Checks if a given field type can perform bitwise AND operation. | |
| WS_DLL_PUBLIC bool | ftype_can_unary_minus (enum ftenum ftype) |
| Check if a given ftenum can be negated using unary minus. | |
| WS_DLL_PUBLIC bool | ftype_can_add (enum ftenum ftype) |
| Checks if a given field type can be added. | |
| WS_DLL_PUBLIC bool | ftype_can_subtract (enum ftenum ftype) |
| Checks if the given ftype can be subtracted. | |
| WS_DLL_PUBLIC bool | ftype_can_multiply (enum ftenum ftype) |
| Checks if the given field type can be multiplied. | |
| WS_DLL_PUBLIC bool | ftype_can_divide (enum ftenum ftype) |
| Checks if a given field type can be divided. | |
| WS_DLL_PUBLIC bool | ftype_can_modulo (enum ftenum ftype) |
| Check if a given ftype can perform modulo operation. | |
| WS_DLL_PUBLIC bool | ftype_can_contains (enum ftenum ftype) |
| Checks if a given ftype can contain other types. | |
| WS_DLL_PUBLIC bool | ftype_can_matches (enum ftenum ftype) |
| Checks if a given field type can match another. | |
| WS_DLL_PUBLIC bool | ftype_can_is_zero (enum ftenum ftype) |
| Determines if a given field type can be zero. | |
| WS_DLL_PUBLIC bool | ftype_can_is_negative (enum ftenum ftype) |
| Determines if a given field type can represent negative values. | |
| WS_DLL_PUBLIC bool | ftype_can_is_nan (enum ftenum ftype) |
| Check if the given ftenum can represent NaN values. | |
| WS_DLL_PUBLIC bool | ftype_can_val_to_sinteger (enum ftenum ftype) |
| Checks if a given ftype can be converted to a signed integer. | |
| WS_DLL_PUBLIC bool | ftype_can_val_to_uinteger (enum ftenum ftype) |
| Checks if a given ftenum can be converted to an unsigned integer. | |
| WS_DLL_PUBLIC bool | ftype_can_val_to_sinteger64 (enum ftenum ftype) |
| Checks if a given field type can be converted to a signed 64-bit integer. | |
| WS_DLL_PUBLIC bool | ftype_can_val_to_uinteger64 (enum ftenum ftype) |
| Checks if a given ftenum can be converted to an unsigned 64-bit integer. | |
| WS_DLL_PUBLIC bool | ftype_can_val_to_double (enum ftenum ftype) |
| Determines if a given field type can be converted to a double. | |
| WS_DLL_PUBLIC fvalue_t * | fvalue_new (ftenum_t ftype) |
| Creates a new fvalue_t structure. | |
| WS_DLL_PUBLIC fvalue_t * | fvalue_dup (const fvalue_t *fv) |
| Duplicates a fvalue_t structure. | |
| WS_DLL_PUBLIC void | fvalue_init (fvalue_t *fv, ftenum_t ftype) |
| Initialize a fvalue_t structure. | |
| WS_DLL_PUBLIC void | fvalue_cleanup (fvalue_t *fv) |
| Clean up a fvalue_t structure. | |
| WS_DLL_PUBLIC void | fvalue_free (fvalue_t *fv) |
| Frees an fvalue_t structure. | |
| WS_DLL_PUBLIC fvalue_t * | fvalue_from_literal (ftenum_t ftype, const char *s, bool allow_partial_value, char **err_msg) |
| Create a new fvalue from a literal string. | |
| fvalue_t * | fvalue_from_string (ftenum_t ftype, const char *s, size_t len, char **err_msg) |
| Create a new fvalue_t from a string. | |
| fvalue_t * | fvalue_from_charconst (ftenum_t ftype, unsigned long number, char **err_msg) |
| Create a new fvalue from a character constant. | |
| fvalue_t * | fvalue_from_sinteger64 (ftenum_t ftype, const char *s, int64_t number, char **err_msg) |
| Creates a field value from a signed 64-bit integer. | |
| fvalue_t * | fvalue_from_uinteger64 (ftenum_t ftype, const char *s, uint64_t number, char **err_msg) |
| Creates a new fvalue_t from an unsigned 64-bit integer. | |
| fvalue_t * | fvalue_from_floating (ftenum_t ftype, const char *s, double number, char **err_msg) |
| Creates a floating-point field value from a string representation. | |
| WS_DLL_PUBLIC char * | fvalue_to_string_repr (wmem_allocator_t *scope, const fvalue_t *fv, ftrepr_t rtype, int field_display) |
| Convert a fvalue to its string representation. | |
| WS_DLL_PUBLIC enum ft_result | fvalue_to_uinteger (const fvalue_t *fv, uint32_t *repr) |
| Convert a fvalue_t to an unsigned 32-bit integer. | |
| WS_DLL_PUBLIC enum ft_result | fvalue_to_sinteger (const fvalue_t *fv, int32_t *repr) |
| Convert a fvalue_t to a 32-bit signed integer. | |
| WS_DLL_PUBLIC enum ft_result | fvalue_to_uinteger64 (const fvalue_t *fv, uint64_t *repr) |
| Convert a fvalue_t to an unsigned 64-bit integer. | |
| WS_DLL_PUBLIC enum ft_result | fvalue_to_sinteger64 (const fvalue_t *fv, int64_t *repr) |
| Convert a fvalue_t to an int64_t. | |
| WS_DLL_PUBLIC enum ft_result | fvalue_to_double (const fvalue_t *fv, double *repr) |
| Convert a fvalue_t to its double representation. | |
| WS_DLL_PUBLIC ftenum_t | fvalue_type_ftenum (const fvalue_t *fv) |
| Get the ftype of a fvalue_t. | |
| WS_DLL_PUBLIC const char * | fvalue_type_name (const fvalue_t *fv) |
| Get the name of the type associated with a fvalue_t. | |
| WS_DLL_PUBLIC void | fvalue_set_bytes (fvalue_t *fv, GBytes *value) |
| Set the value of an fvalue_t to a GBytes object. | |
| WS_DLL_PUBLIC void | fvalue_set_byte_array (fvalue_t *fv, GByteArray *value) |
| Set the byte array value of an fvalue_t. | |
| WS_DLL_PUBLIC void | fvalue_set_bytes_data (fvalue_t *fv, const void *data, size_t size) |
| Set the bytes data for a fvalue_t. | |
| WS_DLL_PUBLIC void | fvalue_set_fcwwn (fvalue_t *fv, const uint8_t *value) |
| Set the value of an fvalue_t to a FC-WWN (Fibre Channel World Wide Name). | |
| WS_DLL_PUBLIC void | fvalue_set_ax25 (fvalue_t *fv, const uint8_t *value) |
| Set the value of an fvalue_t to an AX.25 address. | |
| WS_DLL_PUBLIC void | fvalue_set_vines (fvalue_t *fv, const uint8_t *value) |
| Set the value of an fvalue_t to a VINES address. | |
| WS_DLL_PUBLIC void | fvalue_set_ether (fvalue_t *fv, const uint8_t *value) |
| Set the value of an fvalue_t to a new Ethernet address. | |
| WS_DLL_PUBLIC void | fvalue_set_guid (fvalue_t *fv, const e_guid_t *value) |
| Set the value of a fvalue_t to a GUID. | |
| WS_DLL_PUBLIC void | fvalue_set_time (fvalue_t *fv, const nstime_t *value) |
| Set the time value of an fvalue_t structure. | |
| WS_DLL_PUBLIC void | fvalue_set_string (fvalue_t *fv, const char *value) |
| Set the string value of an fvalue_t. | |
| WS_DLL_PUBLIC void | fvalue_set_strbuf (fvalue_t *fv, wmem_strbuf_t *value) |
| Set the value of an fvalue_t to a string buffer. | |
| WS_DLL_PUBLIC void | fvalue_set_protocol (fvalue_t *fv, tvbuff_t *value, const char *name, int length) |
| Set the protocol value for a field value. | |
| WS_DLL_PUBLIC void | fvalue_set_protocol_length (fvalue_t *fv, int length) |
| Set the protocol length for a fvalue_t structure. | |
| WS_DLL_PUBLIC void | fvalue_set_uinteger (fvalue_t *fv, uint32_t value) |
| Set the value of a fvalue_t to an unsigned 32-bit integer. | |
| WS_DLL_PUBLIC void | fvalue_set_sinteger (fvalue_t *fv, int32_t value) |
| Set the value of an fvalue_t to a signed 32-bit integer. | |
| WS_DLL_PUBLIC void | fvalue_set_uinteger64 (fvalue_t *fv, uint64_t value) |
| Set the value of a fvalue_t to an unsigned 64-bit integer. | |
| WS_DLL_PUBLIC void | fvalue_set_sinteger64 (fvalue_t *fv, int64_t value) |
| Set the value of an fvalue_t to a 64-bit signed integer. | |
| WS_DLL_PUBLIC void | fvalue_set_floating (fvalue_t *fv, double value) |
| Set the floating-point value of an fvalue_t. | |
| WS_DLL_PUBLIC void | fvalue_set_ipv4 (fvalue_t *fv, const ipv4_addr_and_mask *value) |
| Set the IPv4 value of an fvalue_t structure. | |
| WS_DLL_PUBLIC void | fvalue_set_ipv6 (fvalue_t *fv, const ipv6_addr_and_prefix *value) |
| Set the IPv6 value of an fvalue_t. | |
| WS_DLL_PUBLIC GBytes * | fvalue_get_bytes (fvalue_t *fv) |
| Get the bytes value from an fvalue_t. | |
| WS_DLL_PUBLIC size_t | fvalue_get_bytes_size (fvalue_t *fv) |
| Get the size of the bytes data stored in an fvalue_t. | |
| WS_DLL_PUBLIC const void * | fvalue_get_bytes_data (fvalue_t *fv) |
| Retrieves the bytes data from an fvalue_t. | |
| WS_DLL_PUBLIC const e_guid_t * | fvalue_get_guid (fvalue_t *fv) |
| Retrieves a GUID value from an fvalue_t structure. | |
| WS_DLL_PUBLIC const nstime_t * | fvalue_get_time (fvalue_t *fv) |
| Retrieves a time value from an fvalue_t structure. | |
| WS_DLL_PUBLIC const char * | fvalue_get_string (fvalue_t *fv) |
| Get a string representation of an fvalue. | |
| WS_DLL_PUBLIC const wmem_strbuf_t * | fvalue_get_strbuf (fvalue_t *fv) |
| Retrieves the string buffer value from an fvalue_t structure. | |
| WS_DLL_PUBLIC tvbuff_t * | fvalue_get_protocol (fvalue_t *fv) |
| Get the protocol value from an fvalue_t structure. | |
| WS_DLL_PUBLIC uint32_t | fvalue_get_uinteger (fvalue_t *fv) |
| Get the unsigned integer value from an fvalue_t structure. | |
| WS_DLL_PUBLIC int32_t | fvalue_get_sinteger (fvalue_t *fv) |
| Retrieves a signed integer value from an fvalue_t structure. | |
| WS_DLL_PUBLIC uint64_t | fvalue_get_uinteger64 (fvalue_t *fv) |
| Retrieves an unsigned 64-bit integer value from a fvalue_t structure. | |
| WS_DLL_PUBLIC int64_t | fvalue_get_sinteger64 (fvalue_t *fv) |
| Get the 64-bit signed integer value from an fvalue_t structure. | |
| WS_DLL_PUBLIC double | fvalue_get_floating (fvalue_t *fv) |
| Retrieves the floating-point value from an fvalue_t structure. | |
| WS_DLL_PUBLIC const ipv4_addr_and_mask * | fvalue_get_ipv4 (fvalue_t *fv) |
| Retrieves the IPv4 address from an fvalue_t structure. | |
| WS_DLL_PUBLIC const ipv6_addr_and_prefix * | fvalue_get_ipv6 (fvalue_t *fv) |
| Retrieves the IPv6 value from an fvalue_t structure. | |
| WS_DLL_PUBLIC ft_bool_t | fvalue_eq (const fvalue_t *a, const fvalue_t *b) |
| Compares two fvalue_t structures for equality. | |
| WS_DLL_PUBLIC ft_bool_t | fvalue_ne (const fvalue_t *a, const fvalue_t *b) |
| Compares two fvalue_t structures for inequality. | |
| WS_DLL_PUBLIC ft_bool_t | fvalue_gt (const fvalue_t *a, const fvalue_t *b) |
| Compares two fvalue_t structures to determine if the first is greater than the second. | |
| WS_DLL_PUBLIC ft_bool_t | fvalue_ge (const fvalue_t *a, const fvalue_t *b) |
| Compares two fvalue_t structures for greater than or equal to. | |
| WS_DLL_PUBLIC ft_bool_t | fvalue_lt (const fvalue_t *a, const fvalue_t *b) |
| Compares two fvalue_t objects to determine if the first is less than the second. | |
| WS_DLL_PUBLIC ft_bool_t | fvalue_le (const fvalue_t *a, const fvalue_t *b) |
| Compares two fvalue_t objects lexicographically. | |
| WS_DLL_PUBLIC ft_bool_t | fvalue_contains (const fvalue_t *a, const fvalue_t *b) |
| Checks if one fvalue_t contains another. | |
| WS_DLL_PUBLIC ft_bool_t | fvalue_matches (const fvalue_t *a, const ws_regex_t *re) |
| Checks if a fvalue_t matches a regular expression. | |
| WS_DLL_PUBLIC bool | fvalue_is_zero (const fvalue_t *a) |
| Checks if a fvalue_t is zero. | |
| WS_DLL_PUBLIC bool | fvalue_is_negative (const fvalue_t *a) |
| Checks if a fvalue_t is negative. | |
| WS_DLL_PUBLIC bool | fvalue_is_nan (const fvalue_t *a) |
| Checks if a fvalue_t is NaN. | |
| WS_DLL_PUBLIC size_t | fvalue_length2 (fvalue_t *fv) |
| Get the length of a fvalue_t. | |
| WS_DLL_PUBLIC fvalue_t * | fvalue_slice (fvalue_t *fv, drange_t *dr) |
| Slices a fvalue_t based on a drange_t. | |
| WS_DLL_PUBLIC fvalue_t * | fvalue_bitwise_and (const fvalue_t *a, const fvalue_t *b, char **err_msg) |
| Perform a bitwise AND operation on two fvalue_t objects. | |
| WS_DLL_PUBLIC fvalue_t * | fvalue_unary_minus (const fvalue_t *fv, char **err_msg) |
| Applies unary minus operation to a fvalue. | |
| WS_DLL_PUBLIC fvalue_t * | fvalue_add (const fvalue_t *a, const fvalue_t *b, char **err_msg) |
| Adds two fvalue_t objects. | |
| WS_DLL_PUBLIC fvalue_t * | fvalue_subtract (const fvalue_t *a, const fvalue_t *b, char **err_msg) |
| Subtracts one fvalue from another. | |
| WS_DLL_PUBLIC fvalue_t * | fvalue_multiply (const fvalue_t *a, const fvalue_t *b, char **err_msg) |
| Multiplies two fvalue_t objects. | |
| WS_DLL_PUBLIC fvalue_t * | fvalue_divide (const fvalue_t *a, const fvalue_t *b, char **err_msg) |
| Divides two fvalue_t objects. | |
| WS_DLL_PUBLIC fvalue_t * | fvalue_modulo (const fvalue_t *a, const fvalue_t *b, char **err_msg) |
| Calculate the modulo of two fvalue_t objects. | |
| WS_DLL_PUBLIC unsigned | fvalue_hash (const fvalue_t *fv) |
| Calculate the hash value for a fvalue_t. | |
| WS_DLL_PUBLIC bool | fvalue_equal (const fvalue_t *a, const fvalue_t *b) |
| Compares two fvalue_t structures for equality. | |
Definitions for field types
Wireshark - Network traffic analyzer By Gerald Combs geral.nosp@m.d@wi.nosp@m.resha.nosp@m.rk.o.nosp@m.rg Copyright 2001 Gerald Combs
SPDX-License-Identifier: GPL-2.0-or-later
| #define FT_FALSE 0 |
Comparison result: false
True if ft is a floating-point type (FT_FLOAT or FT_DOUBLE).
| ft | An ftenum value to test. |
| #define FT_IS_INT | ( | ft | ) | (FT_IS_INT32(ft) || FT_IS_INT64(ft)) |
True if ft is any signed integer type (INT8 through INT64).
| ft | An ftenum value to test. |
| #define FT_IS_INT32 | ( | ft | ) |
| #define FT_IS_INT64 | ( | ft | ) |
| #define FT_IS_INTEGER | ( | ft | ) | (FT_IS_INT(ft) || FT_IS_UINT(ft)) |
True if ft is any signed or unsigned integer type.
| ft | An ftenum value to test. |
True if ft is a scalar type suitable for internal arithmetic (FT_INT64 or FT_DOUBLE).
| ft | An ftenum value to test. |
| #define FT_IS_STRING | ( | ft | ) |
True if ft is any string-like type.
| ft | An ftenum value to test. |
| #define FT_IS_TIME | ( | ft | ) | ((ft) == FT_ABSOLUTE_TIME || (ft) == FT_RELATIVE_TIME) |
True if ft is a time type (FT_ABSOLUTE_TIME or FT_RELATIVE_TIME).
| ft | An ftenum value to test. |
| #define FT_IS_UINT | ( | ft | ) | (FT_IS_UINT32(ft) || FT_IS_UINT64(ft)) |
True if ft is any unsigned integer type (CHAR, UINT8 through UINT64, FRAMENUM).
| ft | An ftenum value to test. |
| #define FT_IS_UINT32 | ( | ft | ) |
| #define FT_IS_UINT64 | ( | ft | ) |
| #define FT_TRUE 1 |
Comparison result: true
| typedef int ft_bool_t |
Three-state boolean type for ftype comparison results.
Note that ft_bool == FT_FALSE and ft_bool != FT_TRUE are semantically distinct results due to the three-state (true / false / error) logic. Negative values indicate an error condition.
| enum ft_framenum_type |
Semantic role of an FT_FRAMENUM field, describing the relationship it encodes.
| enum ft_result |
Return codes for ftype operations such as conversion and comparison.
| enum ftenum |
Fundamental field value types used throughout the Wireshark dissector framework.
| enum ftrepr |
Output representation formats for field value serialization.
| WS_DLL_PUBLIC bool ftype_can_add | ( | enum ftenum | ftype | ) |
Checks if a given field type can be added.
| ftype | The field type to check. |
| WS_DLL_PUBLIC bool ftype_can_bitwise_and | ( | enum ftenum | ftype | ) |
Checks if a given field type can perform bitwise AND operation.
| ftype | The field type to check. |
| WS_DLL_PUBLIC bool ftype_can_cmp | ( | enum ftenum | ftype | ) |
Determines if a given field type can be compared.
| ftype | The field type to check. |
| WS_DLL_PUBLIC bool ftype_can_contains | ( | enum ftenum | ftype | ) |
Checks if a given ftype can contain other types.
| ftype | The type to check. |
| WS_DLL_PUBLIC bool ftype_can_divide | ( | enum ftenum | ftype | ) |
Checks if a given field type can be divided.
| ftype | The field type to check. |
| WS_DLL_PUBLIC bool ftype_can_eq | ( | enum ftenum | ftype | ) |
Checks if a given field type can be compared.
| ftype | The field type to check. |
| WS_DLL_PUBLIC bool ftype_can_is_nan | ( | enum ftenum | ftype | ) |
Check if the given ftenum can represent NaN values.
| ftype | The ftenum to check. |
| WS_DLL_PUBLIC bool ftype_can_is_negative | ( | enum ftenum | ftype | ) |
Determines if a given field type can represent negative values.
| ftype | The field type to check. |
| WS_DLL_PUBLIC bool ftype_can_is_zero | ( | enum ftenum | ftype | ) |
Determines if a given field type can be zero.
| ftype | The field type to check. |
| WS_DLL_PUBLIC bool ftype_can_length | ( | enum ftenum | ftype | ) |
Determines if a given field type can have its length retrieved.
| ftype | The field type to check. |
| WS_DLL_PUBLIC bool ftype_can_matches | ( | enum ftenum | ftype | ) |
Checks if a given field type can match another.
| ftype | The field type to check. |
| WS_DLL_PUBLIC bool ftype_can_modulo | ( | enum ftenum | ftype | ) |
Check if a given ftype can perform modulo operation.
| ftype | The type to check. |
| WS_DLL_PUBLIC bool ftype_can_multiply | ( | enum ftenum | ftype | ) |
Checks if the given field type can be multiplied.
| ftype | The field type to check. |
| WS_DLL_PUBLIC bool ftype_can_slice | ( | enum ftenum | ftype | ) |
Determines if a given field type can be sliced.
| ftype | The field type to check. |
| WS_DLL_PUBLIC bool ftype_can_subtract | ( | enum ftenum | ftype | ) |
Checks if the given ftype can be subtracted.
| ftype | The type to check. |
| WS_DLL_PUBLIC bool ftype_can_unary_minus | ( | enum ftenum | ftype | ) |
Check if a given ftenum can be negated using unary minus.
| ftype | The ftenum to check. |
| WS_DLL_PUBLIC bool ftype_can_val_to_double | ( | enum ftenum | ftype | ) |
Determines if a given field type can be converted to a double.
This function checks whether the specified field type supports conversion to a double value.
| ftype | The field type to check. |
| WS_DLL_PUBLIC bool ftype_can_val_to_sinteger | ( | enum ftenum | ftype | ) |
Checks if a given ftype can be converted to a signed integer.
| ftype | The type of field to check. |
| WS_DLL_PUBLIC bool ftype_can_val_to_sinteger64 | ( | enum ftenum | ftype | ) |
Checks if a given field type can be converted to a signed 64-bit integer.
| ftype | The field type to check. |
| WS_DLL_PUBLIC bool ftype_can_val_to_uinteger | ( | enum ftenum | ftype | ) |
Checks if a given ftenum can be converted to an unsigned integer.
| ftype | The ftenum type to check. |
| WS_DLL_PUBLIC bool ftype_can_val_to_uinteger64 | ( | enum ftenum | ftype | ) |
Checks if a given ftenum can be converted to an unsigned 64-bit integer.
| ftype | The ftenum to check. |
| WS_DLL_PUBLIC const char * ftype_name | ( | ftenum_t | ftype | ) |
Get the name of a field type.
| ftype | The field type to get the name for. |
| WS_DLL_PUBLIC const char * ftype_pretty_name | ( | ftenum_t | ftype | ) |
Returns a string representing the "pretty" name of the field type.
The pretty name is more user-friendly than the internal "FT_*" name.
| ftype | The field type to get the pretty name for. |
Determine if two field types are similar.
| ftype_a | The first field type to compare. |
| ftype_b | The second field type to compare. |
| WS_DLL_PUBLIC int ftype_wire_size | ( | ftenum_t | ftype | ) |
Get the wire size of a field type.
| ftype | The field type to query. |
| void ftypes_initialize | ( | void | ) |
Initializes various field types in Wireshark.
This function registers all built-in field types used by Wireshark for packet analysis.
| void ftypes_register_pseudofields | ( | void | ) |
Registers pseudofields for various data types in Wireshark.
This function registers a set of pseudofields that can be used to represent different data types within Wireshark. This includes bytes, double, IEEE 11073 float, integers, IPv4, IPv6, GUIDs, none, strings, time, and TV buffers.
Adds two fvalue_t objects.
| a | The first fvalue_t object to add. |
| b | The second fvalue_t object to add. |
| err_msg | A pointer to a char pointer that will store any error message. |
| WS_DLL_PUBLIC fvalue_t * fvalue_bitwise_and | ( | const fvalue_t * | a, |
| const fvalue_t * | b, | ||
| char ** | err_msg | ||
| ) |
Perform a bitwise AND operation on two fvalue_t objects.
| a | Pointer to the first fvalue_t object. |
| b | Pointer to the second fvalue_t object. |
| err_msg | Pointer to a string that will hold any error message if an error occurs. |
| WS_DLL_PUBLIC void fvalue_cleanup | ( | fvalue_t * | fv | ) |
Clean up a fvalue_t structure.
| fv | Pointer to the fvalue_t structure to clean up. |
Checks if one fvalue_t contains another.
| a | The first fvalue_t to check. |
| b | The second fvalue_t to check for containment within the first. |
< Comparison result: true
< Comparison result: false
Divides two fvalue_t objects.
| a | Pointer to the first fvalue_t object. |
| b | Pointer to the second fvalue_t object. |
| err_msg | Pointer to a string that will hold an error message if an error occurs. |
Duplicates a fvalue_t structure.
Creates a new fvalue_t structure and copies the data from the original one. If a deep copy is required, it uses the appropriate copy function.
| fv | Pointer to the original fvalue_t structure. |
Compares two fvalue_t structures for equality.
| a | Pointer to the first fvalue_t structure. |
| b | Pointer to the second fvalue_t structure. |
< Comparison result: true
< Comparison result: false
Compares two fvalue_t structures for equality.
This function checks if two fvalue_t structures are equal based on their values and types.
| a | Pointer to the first fvalue_t structure. |
| b | Pointer to the second fvalue_t structure. |
< Comparison result: true
| WS_DLL_PUBLIC void fvalue_free | ( | fvalue_t * | fv | ) |
Frees an fvalue_t structure.
| fv | Pointer to the fvalue_t structure to be freed. |
Create a new fvalue from a character constant.
| ftype | The type of the fvalue to create. |
| number | The character constant value. |
| err_msg | A pointer to a string that will be set if an error occurs. |
Creates a floating-point field value from a string representation.
| ftype | The type of the field. |
| s | The string representation of the number. |
| number | The numeric value to be converted. |
| err_msg | A pointer to a buffer where an error message will be stored if conversion fails. |
| WS_DLL_PUBLIC fvalue_t * fvalue_from_literal | ( | ftenum_t | ftype, |
| const char * | s, | ||
| bool | allow_partial_value, | ||
| char ** | err_msg | ||
| ) |
Create a new fvalue from a literal string.
| ftype | The type of the fvalue to create. |
| s | The literal string to convert. |
| allow_partial_value | Whether partial values are allowed. |
| err_msg | Pointer to store error message if conversion fails. |
| fvalue_t * fvalue_from_sinteger64 | ( | ftenum_t | ftype, |
| const char * | s, | ||
| int64_t | number, | ||
| char ** | err_msg | ||
| ) |
Creates a field value from a signed 64-bit integer.
| ftype | The type of the field value to create. |
| s | A string representation of the number. |
| number | The signed 64-bit integer value. |
| err_msg | Pointer to a string that will receive an error message if the conversion fails. |
Create a new fvalue_t from a string.
| ftype | The type of the fvalue to create. |
| s | The string to convert. |
| len | The length of the string. |
| err_msg | A pointer to a char pointer that will receive an error message if conversion fails. |
| fvalue_t * fvalue_from_uinteger64 | ( | ftenum_t | ftype, |
| const char * | s, | ||
| uint64_t | number, | ||
| char ** | err_msg | ||
| ) |
Creates a new fvalue_t from an unsigned 64-bit integer.
| ftype | The field type of the value to create. |
| s | A string representation of the number (for error messages). |
| number | The unsigned 64-bit integer value. |
| err_msg | Pointer to a char pointer that will receive an error message if conversion fails. |
Compares two fvalue_t structures for greater than or equal to.
| a | Pointer to the first fvalue_t structure. |
| b | Pointer to the second fvalue_t structure. |
< Comparison result: true
< Comparison result: false
| WS_DLL_PUBLIC GBytes * fvalue_get_bytes | ( | fvalue_t * | fv | ) |
Get the bytes value from an fvalue_t.
| fv | The fvalue_t containing the bytes value. |
| WS_DLL_PUBLIC const void * fvalue_get_bytes_data | ( | fvalue_t * | fv | ) |
Retrieves the bytes data from an fvalue_t.
| fv | The fvalue_t to retrieve the bytes data from. |
| WS_DLL_PUBLIC size_t fvalue_get_bytes_size | ( | fvalue_t * | fv | ) |
Get the size of the bytes data stored in an fvalue_t.
| fv | Pointer to the fvalue_t containing the bytes data. |
| WS_DLL_PUBLIC double fvalue_get_floating | ( | fvalue_t * | fv | ) |
Retrieves the floating-point value from an fvalue_t structure.
| fv | Pointer to the fvalue_t structure containing the floating-point value. |
Retrieves a GUID value from an fvalue_t structure.
| fv | Pointer to the fvalue_t structure containing the GUID value. |
| WS_DLL_PUBLIC const ipv4_addr_and_mask * fvalue_get_ipv4 | ( | fvalue_t * | fv | ) |
Retrieves the IPv4 address from an fvalue_t structure.
| fv | Pointer to the fvalue_t structure containing the IPv4 address. |
| WS_DLL_PUBLIC const ipv6_addr_and_prefix * fvalue_get_ipv6 | ( | fvalue_t * | fv | ) |
Retrieves the IPv6 value from an fvalue_t structure.
| fv | Pointer to the fvalue_t structure containing the IPv6 value. |
Get the protocol value from an fvalue_t structure.
| fv | Pointer to the fvalue_t structure containing the protocol value. |
| WS_DLL_PUBLIC int32_t fvalue_get_sinteger | ( | fvalue_t * | fv | ) |
Retrieves a signed integer value from an fvalue_t structure.
| fv | Pointer to the fvalue_t structure containing the value. |
| WS_DLL_PUBLIC int64_t fvalue_get_sinteger64 | ( | fvalue_t * | fv | ) |
Get the 64-bit signed integer value from an fvalue_t structure.
| fv | Pointer to the fvalue_t structure containing the value. |
| WS_DLL_PUBLIC const wmem_strbuf_t * fvalue_get_strbuf | ( | fvalue_t * | fv | ) |
Retrieves the string buffer value from an fvalue_t structure.
| fv | Pointer to the fvalue_t structure. |
| WS_DLL_PUBLIC const char * fvalue_get_string | ( | fvalue_t * | fv | ) |
Get a string representation of an fvalue.
| fv | Pointer to the fvalue structure. |
Retrieves a time value from an fvalue_t structure.
| fv | Pointer to the fvalue_t structure containing the time value. |
| WS_DLL_PUBLIC uint32_t fvalue_get_uinteger | ( | fvalue_t * | fv | ) |
Get the unsigned integer value from an fvalue_t structure.
| fv | Pointer to the fvalue_t structure containing the value. |
| WS_DLL_PUBLIC uint64_t fvalue_get_uinteger64 | ( | fvalue_t * | fv | ) |
Retrieves an unsigned 64-bit integer value from a fvalue_t structure.
| fv | Pointer to the fvalue_t structure containing the value. |
Compares two fvalue_t structures to determine if the first is greater than the second.
| a | Pointer to the first fvalue_t structure. |
| b | Pointer to the second fvalue_t structure. |
< Comparison result: true
< Comparison result: false
| WS_DLL_PUBLIC unsigned fvalue_hash | ( | const fvalue_t * | fv | ) |
Calculate the hash value for a fvalue_t.
| fv | Pointer to the fvalue_t structure. |
Initialize a fvalue_t structure.
| fv | Pointer to the fvalue_t structure to initialize. |
| ftype | The type of the value to be stored in the fvalue_t structure. |
| WS_DLL_PUBLIC bool fvalue_is_nan | ( | const fvalue_t * | a | ) |
Checks if a fvalue_t is NaN.
| a | Pointer to the fvalue_t to check. |
| WS_DLL_PUBLIC bool fvalue_is_negative | ( | const fvalue_t * | a | ) |
Checks if a fvalue_t is negative.
| a | Pointer to the fvalue_t to check. |
| WS_DLL_PUBLIC bool fvalue_is_zero | ( | const fvalue_t * | a | ) |
Checks if a fvalue_t is zero.
| a | Pointer to the fvalue_t to check. |
Compares two fvalue_t objects lexicographically.
| a | Pointer to the first fvalue_t object. |
| b | Pointer to the second fvalue_t object. |
< Comparison result: true
< Comparison result: false
| WS_DLL_PUBLIC size_t fvalue_length2 | ( | fvalue_t * | fv | ) |
Get the length of a fvalue_t.
| fv | The fvalue_t to get the length from. |
Compares two fvalue_t objects to determine if the first is less than the second.
| a | Pointer to the first fvalue_t object. |
| b | Pointer to the second fvalue_t object. |
< Comparison result: true
< Comparison result: false
| WS_DLL_PUBLIC ft_bool_t fvalue_matches | ( | const fvalue_t * | a, |
| const ws_regex_t * | re | ||
| ) |
Checks if a fvalue_t matches a regular expression.
| a | The fvalue_t to check. |
| re | The regular expression to match against. |
< Comparison result: true
< Comparison result: false
Calculate the modulo of two fvalue_t objects.
| a | Pointer to the first fvalue_t object. |
| b | Pointer to the second fvalue_t object. |
| err_msg | Pointer to store error message if any. |
| WS_DLL_PUBLIC fvalue_t * fvalue_multiply | ( | const fvalue_t * | a, |
| const fvalue_t * | b, | ||
| char ** | err_msg | ||
| ) |
Multiplies two fvalue_t objects.
| a | Pointer to the first fvalue_t object. |
| b | Pointer to the second fvalue_t object. |
| err_msg | Pointer to a string that will hold any error message if an error occurs. |
Compares two fvalue_t structures for inequality.
| a | Pointer to the first fvalue_t structure. |
| b | Pointer to the second fvalue_t structure. |
< Comparison result: true
< Comparison result: false
Creates a new fvalue_t structure.
| ftype | The type of the fvalue to create. |
| WS_DLL_PUBLIC void fvalue_set_ax25 | ( | fvalue_t * | fv, |
| const uint8_t * | value | ||
| ) |
Set the value of an fvalue_t to an AX.25 address.
| fv | Pointer to the fvalue_t structure to be set. |
| value | Pointer to the byte array containing the AX.25 address. |
| WS_DLL_PUBLIC void fvalue_set_byte_array | ( | fvalue_t * | fv, |
| GByteArray * | value | ||
| ) |
Set the byte array value of an fvalue_t.
| fv | Pointer to the fvalue_t structure. |
| value | Pointer to the GByteArray containing the byte array data. |
| WS_DLL_PUBLIC void fvalue_set_bytes | ( | fvalue_t * | fv, |
| GBytes * | value | ||
| ) |
Set the value of an fvalue_t to a GBytes object.
| fv | Pointer to the fvalue_t structure. |
| value | Pointer to the GBytes object containing the data. |
| WS_DLL_PUBLIC void fvalue_set_bytes_data | ( | fvalue_t * | fv, |
| const void * | data, | ||
| size_t | size | ||
| ) |
Set the bytes data for a fvalue_t.
| fv | The fvalue_t to set. |
| data | The data to set. |
| size | The size of the data. |
| WS_DLL_PUBLIC void fvalue_set_ether | ( | fvalue_t * | fv, |
| const uint8_t * | value | ||
| ) |
Set the value of an fvalue_t to a new Ethernet address.
| fv | Pointer to the fvalue_t structure to be modified. |
| value | Pointer to the uint8_t array containing the Ethernet address. |
| WS_DLL_PUBLIC void fvalue_set_fcwwn | ( | fvalue_t * | fv, |
| const uint8_t * | value | ||
| ) |
Set the value of an fvalue_t to a FC-WWN (Fibre Channel World Wide Name).
| fv | Pointer to the fvalue_t structure. |
| value | Pointer to the uint8_t array containing the FC-WWN value. |
| WS_DLL_PUBLIC void fvalue_set_floating | ( | fvalue_t * | fv, |
| double | value | ||
| ) |
Set the floating-point value of an fvalue_t.
| fv | Pointer to the fvalue_t structure. |
| value | The double value to set. |
Set the value of a fvalue_t to a GUID.
| fv | Pointer to the fvalue_t structure. |
| value | Pointer to the e_guid_t structure containing the GUID value. |
| WS_DLL_PUBLIC void fvalue_set_ipv4 | ( | fvalue_t * | fv, |
| const ipv4_addr_and_mask * | value | ||
| ) |
Set the IPv4 value of an fvalue_t structure.
| fv | Pointer to the fvalue_t structure. |
| value | Pointer to the ipv4_addr_and_mask structure containing the new value. |
| WS_DLL_PUBLIC void fvalue_set_ipv6 | ( | fvalue_t * | fv, |
| const ipv6_addr_and_prefix * | value | ||
| ) |
Set the IPv6 value of an fvalue_t.
| fv | Pointer to the fvalue_t structure. |
| value | Pointer to the ipv6_addr_and_prefix structure containing the new value. |
| WS_DLL_PUBLIC void fvalue_set_protocol | ( | fvalue_t * | fv, |
| tvbuff_t * | value, | ||
| const char * | name, | ||
| int | length | ||
| ) |
Set the protocol value for a field value.
| fv | Pointer to the field value structure. |
| value | Pointer to the tvbuff containing the protocol data. |
| name | Name of the protocol. |
| length | Length of the protocol data. |
| WS_DLL_PUBLIC void fvalue_set_protocol_length | ( | fvalue_t * | fv, |
| int | length | ||
| ) |
Set the protocol length for a fvalue_t structure.
| fv | Pointer to the fvalue_t structure. |
| length | The new protocol length to set. |
| WS_DLL_PUBLIC void fvalue_set_sinteger | ( | fvalue_t * | fv, |
| int32_t | value | ||
| ) |
Set the value of an fvalue_t to a signed 32-bit integer.
| fv | Pointer to the fvalue_t structure. |
| value | The signed 32-bit integer value to set. |
| WS_DLL_PUBLIC void fvalue_set_sinteger64 | ( | fvalue_t * | fv, |
| int64_t | value | ||
| ) |
Set the value of an fvalue_t to a 64-bit signed integer.
| fv | Pointer to the fvalue_t structure. |
| value | The 64-bit signed integer value to set. |
| WS_DLL_PUBLIC void fvalue_set_strbuf | ( | fvalue_t * | fv, |
| wmem_strbuf_t * | value | ||
| ) |
Set the value of an fvalue_t to a string buffer.
| fv | Pointer to the fvalue_t structure. |
| value | Pointer to the wmem_strbuf_t containing the new value. |
| WS_DLL_PUBLIC void fvalue_set_string | ( | fvalue_t * | fv, |
| const char * | value | ||
| ) |
Set the string value of an fvalue_t.
| fv | Pointer to the fvalue_t structure. |
| value | The string value to set. |
Set the time value of an fvalue_t structure.
| fv | Pointer to the fvalue_t structure to be modified. |
| value | Pointer to the nstime_t structure containing the new time value. |
| WS_DLL_PUBLIC void fvalue_set_uinteger | ( | fvalue_t * | fv, |
| uint32_t | value | ||
| ) |
Set the value of a fvalue_t to an unsigned 32-bit integer.
| fv | Pointer to the fvalue_t structure. |
| value | The unsigned 32-bit integer value to set. |
| WS_DLL_PUBLIC void fvalue_set_uinteger64 | ( | fvalue_t * | fv, |
| uint64_t | value | ||
| ) |
Set the value of a fvalue_t to an unsigned 64-bit integer.
| fv | Pointer to the fvalue_t structure. |
| value | The unsigned 64-bit integer value to set. |
| WS_DLL_PUBLIC void fvalue_set_vines | ( | fvalue_t * | fv, |
| const uint8_t * | value | ||
| ) |
Set the value of an fvalue_t to a VINES address.
| fv | Pointer to the fvalue_t structure. |
| value | Pointer to the uint8_t array containing the VINES address. |
Slices a fvalue_t based on a drange_t.
| fv | The fvalue_t to slice. |
| dr | The range to slice the fvalue_t by. |
| WS_DLL_PUBLIC fvalue_t * fvalue_subtract | ( | const fvalue_t * | a, |
| const fvalue_t * | b, | ||
| char ** | err_msg | ||
| ) |
Subtracts one fvalue from another.
| a | The first fvalue to subtract from. |
| b | The fvalue to subtract. |
| err_msg | Pointer to store error message if any. |
Convert a fvalue_t to its double representation.
| fv | Pointer to the fvalue_t structure. |
| repr | Pointer to store the double representation. |
Convert a fvalue_t to a 32-bit signed integer.
| fv | The fvalue_t to convert. |
| repr | Pointer to store the converted 32-bit signed integer. |
Convert a fvalue_t to an int64_t.
| fv | The fvalue_t to convert. |
| repr | Pointer to store the converted value. |
| WS_DLL_PUBLIC char * fvalue_to_string_repr | ( | wmem_allocator_t * | scope, |
| const fvalue_t * | fv, | ||
| ftrepr_t | rtype, | ||
| int | field_display | ||
| ) |
Convert a fvalue to its string representation.
Creates the string representation of the field value. Memory for the buffer is allocated based on wmem allocator provided.
field_display parameter should be a BASE_ value (enum field_display_e) BASE_NONE should be used if field information isn't available.
Returns NULL if the string cannot be represented in the given rtype.
| scope | Memory allocator scope. |
| fv | The fvalue to convert. |
| rtype | The type of representation required. |
| field_display | Display options for the field. |
Convert a fvalue_t to an unsigned 32-bit integer.
| fv | The fvalue_t to convert. |
| repr | Pointer to store the resulting unsigned 32-bit integer. |
Convert a fvalue_t to an unsigned 64-bit integer.
| fv | The fvalue_t to convert. |
| repr | Pointer to store the converted value. |
Get the ftype of a fvalue_t.
| fv | The fvalue_t to get the ftype from. |
| WS_DLL_PUBLIC const char * fvalue_type_name | ( | const fvalue_t * | fv | ) |
Get the name of the type associated with a fvalue_t.
| fv | Pointer to the fvalue_t structure. |
Applies unary minus operation to a fvalue.
| fv | Pointer to the fvalue to apply the unary minus operation on. |
| err_msg | Pointer to a string that will hold any error message if an error occurs. |