| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Enumerations | Functions
ftypes.h File Reference
`#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

## Macros
#define | ASSERT_FTYPE_NOT_REACHED(ft) ws_error("Invalid field type '%s'.", ftype_name(ft))
#define | FT_IS_INT32(ft)
#define | FT_IS_INT64(ft)
#define | FT_IS_INT(ft) (FT_IS_INT32(ft) || FT_IS_INT64(ft))
#define | FT_IS_UINT32(ft)
#define | FT_IS_UINT64(ft)
#define | FT_IS_UINT(ft) (FT_IS_UINT32(ft) || FT_IS_UINT64(ft))
#define | FT_IS_INTEGER(ft) (FT_IS_INT(ft) || FT_IS_UINT(ft))
#define | FT_IS_FLOATING(ft) ((ft) == FT_FLOAT || (ft) == FT_DOUBLE)
#define | FT_IS_TIME(ft) ((ft) == FT_ABSOLUTE_TIME || (ft) == FT_RELATIVE_TIME)
#define | FT_IS_STRING(ft)
#define | FT_IS_SCALAR(ft) ((ft) == FT_INT64 || (ft) == FT_DOUBLE)
#define | FT_ETHER_LEN 6
#define | FT_GUID_LEN 16
#define | FT_IPv4_LEN 4
#define | FT_IPv6_LEN 16
#define | FT_IPXNET_LEN 4
#define | FT_EUI64_LEN 8
#define | FT_AX25_ADDR_LEN 7
#define | FT_VINES_ADDR_LEN 6
#define | FT_FCWWN_LEN 8
#define | FT_VARINT_MAX_LEN 10 /* Because 64 / 7 = 9 and 64 % 7 = 1, get an uint64 varint need reads up to 10 bytes. */
#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
typedef enum ft_framenum_type | ft_framenum_type_t
typedef struct _ftype_t | ftype_t
typedef int | ft_bool_t
typedef enum ftrepr | ftrepr_t
typedef struct _protocol_value_t | protocol_value_t
typedef struct _fvalue_t | fvalue_t

## Enumerations
enum | ftenum { FT_NONE , FT_PROTOCOL , FT_BOOLEAN , FT_CHAR , FT_UINT8 , FT_UINT16 , FT_UINT24 , FT_UINT32 , FT_UINT40 , FT_UINT48 , FT_UINT56 , FT_UINT64 , FT_INT8 , FT_INT16 , FT_INT24 , FT_INT32 , FT_INT40 , FT_INT48 , FT_INT56 , FT_INT64 , FT_IEEE_11073_SFLOAT , FT_IEEE_11073_FLOAT , FT_FLOAT , FT_DOUBLE , FT_ABSOLUTE_TIME , FT_RELATIVE_TIME , FT_STRING , FT_STRINGZ , FT_UINT_STRING , FT_ETHER , FT_BYTES , FT_UINT_BYTES , FT_IPv4 , FT_IPv6 , FT_IPXNET , FT_FRAMENUM , FT_GUID , FT_OID , FT_EUI64 , FT_AX25 , FT_VINES , FT_REL_OID , FT_SYSTEM_ID , FT_STRINGZPAD , FT_FCWWN , FT_STRINGZTRUNC , FT_NUM_TYPES , FT_SCALAR , FT_ENUM_SIZE = FT_SCALAR }
enum | ft_framenum_type { FT_FRAMENUM_NONE , FT_FRAMENUM_REQUEST , FT_FRAMENUM_RESPONSE , FT_FRAMENUM_ACK , FT_FRAMENUM_DUP_ACK , FT_FRAMENUM_RETRANS_PREV , FT_FRAMENUM_RETRANS_NEXT , FT_FRAMENUM_NUM_TYPES }
enum | ft_result { FT_OK = 0 , FT_OVERFLOW , FT_UNDERFLOW , FT_BADARG , FT_ERROR }
enum | ftrepr { FTREPR_DISPLAY , FTREPR_DFILTER , FTREPR_JSON , FTREPR_RAW , FTREPR_EK }

## 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.

## Detailed Description

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

## Macro Definition Documentation

## ◆ FT_IS_INT32

#define FT_IS_INT32 | ( |  | ft | ) |

Value:
((ft) == FT_INT8 || \
(ft) == FT_INT16 || \
(ft) == FT_INT24 || \
(ft) == FT_INT32)

## ◆ FT_IS_INT64

#define FT_IS_INT64 | ( |  | ft | ) |

Value:
((ft) == FT_INT40 || \
(ft) == FT_INT48 || \
(ft) == FT_INT56 || \
(ft) == FT_INT64)

## ◆ FT_IS_STRING

#define FT_IS_STRING | ( |  | ft | ) |

Value:
((ft) == FT_STRING || (ft) == FT_STRINGZ || (ft) == FT_STRINGZPAD || \
(ft) == FT_STRINGZTRUNC || (ft) == FT_UINT_STRING || (ft) == FT_AX25)

## ◆ FT_IS_UINT32

#define FT_IS_UINT32 | ( |  | ft | ) |

Value:
((ft) == FT_CHAR || \
(ft) == FT_UINT8 || \
(ft) == FT_UINT16 || \
(ft) == FT_UINT24 || \
(ft) == FT_UINT32 || \
(ft) == FT_FRAMENUM)

## ◆ FT_IS_UINT64

#define FT_IS_UINT64 | ( |  | ft | ) |

Value:
((ft) == FT_UINT40 || \
(ft) == FT_UINT48 || \
(ft) == FT_UINT56 || \
(ft) == FT_UINT64)

## Function Documentation

## ◆ ftype_can_add()

WS_DLL_PUBLIC bool ftype_can_add | ( | enum ftenum | ftype | ) |

Checks if a given field type can be added.

Parameters

  ftype | The field type to check.

Returns
  true If the field type can be added, false otherwise.

## ◆ ftype_can_bitwise_and()

WS_DLL_PUBLIC bool ftype_can_bitwise_and | ( | enum ftenum | ftype | ) |

Checks if a given field type can perform bitwise AND operation.

Parameters

  ftype | The field type to check.

Returns
  true If the field type supports bitwise AND, false otherwise.

## ◆ ftype_can_cmp()

WS_DLL_PUBLIC bool ftype_can_cmp | ( | enum ftenum | ftype | ) |

Determines if a given field type can be compared.

Parameters

  ftype | The field type to check.

Returns
  true If the field type can be compared, false otherwise.

## ◆ ftype_can_contains()

WS_DLL_PUBLIC bool ftype_can_contains | ( | enum ftenum | ftype | ) |

Checks if a given ftype can contain other types.

Parameters

  ftype | The type to check.

Returns
  true If the ftype can contain other types, false otherwise.

## ◆ ftype_can_divide()

WS_DLL_PUBLIC bool ftype_can_divide | ( | enum ftenum | ftype | ) |

Checks if a given field type can be divided.

Parameters

  ftype | The field type to check.

Returns
  true If the field type can be divided, false otherwise.

## ◆ ftype_can_eq()

WS_DLL_PUBLIC bool ftype_can_eq | ( | enum ftenum | ftype | ) |

Checks if a given field type can be compared.

Parameters

  ftype | The field type to check.

Returns
  true If the field type can be compared, false otherwise.

## ◆ ftype_can_is_nan()

WS_DLL_PUBLIC bool ftype_can_is_nan | ( | enum ftenum | ftype | ) |

Check if the given ftenum can represent NaN values.

Parameters

  ftype | The ftenum to check.

Returns
  true If the ftenum can represent NaN values, false otherwise.

## ◆ ftype_can_is_negative()

WS_DLL_PUBLIC bool ftype_can_is_negative | ( | enum ftenum | ftype | ) |

Determines if a given field type can represent negative values.

Parameters

  ftype | The field type to check.

Returns
  true If the field type can represent negative values, false otherwise.

## ◆ ftype_can_is_zero()

WS_DLL_PUBLIC bool ftype_can_is_zero | ( | enum ftenum | ftype | ) |

Determines if a given field type can be zero.

Parameters

  ftype | The field type to check.

Returns
  true If the field type can be zero, false otherwise.

## ◆ ftype_can_length()

WS_DLL_PUBLIC bool ftype_can_length | ( | enum ftenum | ftype | ) |

Determines if a given field type can have its length retrieved.

Parameters

  ftype | The field type to check.

Returns
  true If the field type can have its length retrieved, false otherwise.

## ◆ ftype_can_matches()

WS_DLL_PUBLIC bool ftype_can_matches | ( | enum ftenum | ftype | ) |

Checks if a given field type can match another.

Parameters

  ftype | The field type to check.

Returns
  true If the field type can match, false otherwise.

## ◆ ftype_can_modulo()

WS_DLL_PUBLIC bool ftype_can_modulo | ( | enum ftenum | ftype | ) |

Check if a given ftype can perform modulo operation.

Parameters

  ftype | The type to check.

Returns
  true If the ftype can perform modulo operation, false otherwise.

## ◆ ftype_can_multiply()

WS_DLL_PUBLIC bool ftype_can_multiply | ( | enum ftenum | ftype | ) |

Checks if the given field type can be multiplied.

Parameters

  ftype | The field type to check.

Returns
  true If the field type can be multiplied.
  false Otherwise.

## ◆ ftype_can_slice()

WS_DLL_PUBLIC bool ftype_can_slice | ( | enum ftenum | ftype | ) |

Determines if a given field type can be sliced.

Parameters

  ftype | The field type to check.

Returns
  true If the field type can be sliced, false otherwise.

## ◆ ftype_can_subtract()

WS_DLL_PUBLIC bool ftype_can_subtract | ( | enum ftenum | ftype | ) |

Checks if the given ftype can be subtracted.

Parameters

  ftype | The type to check.

Returns
  true If the ftype can be subtracted, false otherwise.

## ◆ ftype_can_unary_minus()

WS_DLL_PUBLIC bool ftype_can_unary_minus | ( | enum ftenum | ftype | ) |

Check if a given ftenum can be negated using unary minus.

Parameters

  ftype | The ftenum to check.

Returns
  true If the ftype can be negated using unary minus.
  false If the ftype cannot be negated using unary minus.

## ◆ ftype_can_val_to_double()

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.

Parameters

  ftype | The field type to check.

Returns
  true If the field type can be converted to a double, false otherwise.

## ◆ ftype_can_val_to_sinteger()

WS_DLL_PUBLIC bool ftype_can_val_to_sinteger | ( | enum ftenum | ftype | ) |

Checks if a given ftype can be converted to a signed integer.

Parameters

  ftype | The type of field to check.

Returns
  true If the ftype can be converted to a signed integer, false otherwise.

## ◆ ftype_can_val_to_sinteger64()

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.

Parameters

  ftype | The field type to check.

Returns
  true If the field type can be converted to a signed 64-bit integer, false otherwise.

## ◆ ftype_can_val_to_uinteger()

WS_DLL_PUBLIC bool ftype_can_val_to_uinteger | ( | enum ftenum | ftype | ) |

Checks if a given ftenum can be converted to an unsigned integer.

Parameters

  ftype | The ftenum type to check.

Returns
  true If the ftype can be converted to an unsigned integer, false otherwise.

## ◆ ftype_can_val_to_uinteger64()

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.

Parameters

  ftype | The ftenum to check.

Returns
  true If the ftype can be converted to an unsigned 64-bit integer.
  false Otherwise.

## ◆ ftype_name()

WS_DLL_PUBLIC const char * ftype_name | ( | ftenum_t | ftype | ) |

Get the name of a field type.

Parameters

  ftype | The field type to get the name for.

Returns
  A const char* pointing to the name of the field type, or "(null)" if not recognized.

## ◆ ftype_pretty_name()

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.

Parameters

  ftype | The field type to get the pretty name for.

Returns
  A const char* pointing to the pretty name of the field type, or "(null)" if not found.

## ◆ ftype_similar_types()

bool ftype_similar_types | ( | const enum ftenum | ftype_a,
|  | const enum ftenum | ftype_b
| ) |  |

Determine if two field types are similar.

Parameters

  ftype_a | The first field type to compare.
  ftype_b | The second field type to compare.

Returns
  true If the field types are similar.
  false If the field types are not similar.

## ◆ ftype_wire_size()

WS_DLL_PUBLIC int ftype_wire_size | ( | ftenum_t | ftype | ) |

Get the wire size of a field type.

Parameters

  ftype | The field type to query.

Returns
  int The wire size of the field type.

## ◆ ftypes_initialize()

void ftypes_initialize | ( | void |  | ) |

Initializes various field types in Wireshark.

This function registers all built-in field types used by Wireshark for packet analysis.

## ◆ ftypes_register_pseudofields()

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.

## ◆ fvalue_add()

WS_DLL_PUBLIC fvalue_t * fvalue_add | ( | const fvalue_t * | a,
|  | const fvalue_t * | b,
|  | char ** | err_msg
| ) |  |

Adds two fvalue_t objects.

Parameters

  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.

Returns
  fvalue_t* A new fvalue_t object containing the result of the addition, or NULL on failure.

## ◆ fvalue_bitwise_and()

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.

Parameters

  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.

Returns
  Pointer to the result of the bitwise AND operation, or NULL on failure.

## ◆ fvalue_cleanup()

WS_DLL_PUBLIC void fvalue_cleanup | ( | fvalue_t * | fv | ) |

Clean up a fvalue_t structure.

Parameters

  fv | Pointer to the fvalue_t structure to clean up.

## ◆ fvalue_contains()

WS_DLL_PUBLIC ft_bool_t fvalue_contains | ( | const fvalue_t * | a,
|  | const fvalue_t * | b
| ) |  |

Checks if one fvalue_t contains another.

Parameters

  a | The first fvalue_t to check.
  b | The second fvalue_t to check for containment within the first.

Returns
  true If 'a' contains 'b'.
  false Otherwise.

## ◆ fvalue_divide()

WS_DLL_PUBLIC fvalue_t * fvalue_divide | ( | const fvalue_t * | a,
|  | const fvalue_t * | b,
|  | char ** | err_msg
| ) |  |

Divides two fvalue_t objects.

Parameters

  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.

Returns
  The result of the division as an fvalue_t object, or NULL on error.

## ◆ fvalue_dup()

WS_DLL_PUBLIC fvalue_t * fvalue_dup | ( | const fvalue_t * | fv | ) |

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.

Parameters

  fv | Pointer to the original fvalue_t structure.

Returns
  A pointer to the newly created fvalue_t structure.

## ◆ fvalue_eq()

WS_DLL_PUBLIC ft_bool_t fvalue_eq | ( | const fvalue_t * | a,
|  | const fvalue_t * | b
| ) |  |

Compares two fvalue_t structures for equality.

Parameters

  a | Pointer to the first fvalue_t structure.
  b | Pointer to the second fvalue_t structure.

Returns
  ft_bool_t FT_TRUE if the values are equal, FT_FALSE otherwise.

## ◆ fvalue_equal()

WS_DLL_PUBLIC bool fvalue_equal | ( | const fvalue_t * | a,
|  | const fvalue_t * | b
| ) |  |

Compares two fvalue_t structures for equality.

This function checks if two fvalue_t structures are equal based on their values and types.

Parameters

  a | Pointer to the first fvalue_t structure.
  b | Pointer to the second fvalue_t structure.

Returns
  FT_TRUE if the two fvalue_t structures are equal, FT_FALSE otherwise.

## ◆ fvalue_free()

WS_DLL_PUBLIC void fvalue_free | ( | fvalue_t * | fv | ) |

Frees an fvalue_t structure.

Parameters

  fv | Pointer to the fvalue_t structure to be freed.

## ◆ fvalue_from_charconst()

fvalue_t * fvalue_from_charconst | ( | ftenum_t | ftype,
|  | unsigned long | number,
|  | char ** | err_msg
| ) |  |

Create a new fvalue from a character constant.

Parameters

  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.

Returns
  A pointer to the created fvalue, or NULL on failure.

## ◆ fvalue_from_floating()

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.

Parameters

  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.

Returns
  A new fvalue_t representing the floating-point value, or NULL on failure.

## ◆ fvalue_from_literal()

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.

Parameters

  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.

Returns
  A new fvalue on success, NULL otherwise.

## ◆ fvalue_from_sinteger64()

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.

Parameters

  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.

Returns
  A pointer to the created field value, or NULL if the conversion fails.

## ◆ fvalue_from_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.

Parameters

  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.

Returns
  A new fvalue_t or NULL on failure.

Note
  String MUST be null-terminated. Length is optional (pass zero) and does not include the null terminator.

## ◆ fvalue_from_uinteger64()

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.

Parameters

  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.

Returns
  A new fvalue_t containing the unsigned 64-bit integer, or NULL on failure.

## ◆ fvalue_ge()

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.

Parameters

  a | Pointer to the first fvalue_t structure.
  b | Pointer to the second fvalue_t structure.

Returns
  ft_bool_t True if a is greater than or equal to b, False otherwise.

## ◆ fvalue_get_bytes()

WS_DLL_PUBLIC GBytes * fvalue_get_bytes | ( | fvalue_t * | fv | ) |

Get the bytes value from an fvalue_t.

Parameters

  fv | The fvalue_t containing the bytes value.

Returns
  const void* A pointer to the bytes data.

## ◆ fvalue_get_bytes_data()

WS_DLL_PUBLIC const void * fvalue_get_bytes_data | ( | fvalue_t * | fv | ) |

Retrieves the bytes data from an fvalue_t.

Parameters

  fv | The fvalue_t to retrieve the bytes data from.

Returns
  const void* A pointer to the bytes data.

## ◆ fvalue_get_bytes_size()

WS_DLL_PUBLIC size_t fvalue_get_bytes_size | ( | fvalue_t * | fv | ) |

Get the size of the bytes data stored in an fvalue_t.

Parameters

  fv | Pointer to the fvalue_t containing the bytes data.

Returns
  The size of the bytes data.

## ◆ fvalue_get_floating()

WS_DLL_PUBLIC double fvalue_get_floating | ( | fvalue_t * | fv | ) |

Retrieves the floating-point value from an fvalue_t structure.

Parameters

  fv | Pointer to the fvalue_t structure containing the floating-point value.

Returns
  The floating-point value.

## ◆ fvalue_get_guid()

WS_DLL_PUBLIC const e_guid_t * fvalue_get_guid | ( | fvalue_t * | fv | ) |

Retrieves a GUID value from an fvalue_t structure.

Parameters

  fv | Pointer to the fvalue_t structure containing the GUID value.

Returns
  const char* The GUID value as a string, or NULL if not applicable.

## ◆ fvalue_get_ipv4()

WS_DLL_PUBLIC const ipv4_addr_and_mask * fvalue_get_ipv4 | ( | fvalue_t * | fv | ) |

Retrieves the IPv4 address from an fvalue_t structure.

Parameters

  fv | Pointer to the fvalue_t structure containing the IPv4 address.

Returns
  The IPv4 address as a pointer to ipv4_addr_and_mask.

## ◆ fvalue_get_ipv6()

WS_DLL_PUBLIC const ipv6_addr_and_prefix * fvalue_get_ipv6 | ( | fvalue_t * | fv | ) |

Retrieves the IPv6 value from an fvalue_t structure.

Parameters

  fv | Pointer to the fvalue_t structure containing the IPv6 value.

Returns
  The IPv6 address as a string.

## ◆ fvalue_get_protocol()

WS_DLL_PUBLIC tvbuff_t * fvalue_get_protocol | ( | fvalue_t * | fv | ) |

Get the protocol value from an fvalue_t structure.

Parameters

  fv | Pointer to the fvalue_t structure containing the protocol value.

Returns
  The protocol value as a uint32_t.

## ◆ fvalue_get_sinteger()

WS_DLL_PUBLIC int32_t fvalue_get_sinteger | ( | fvalue_t * | fv | ) |

Retrieves a signed integer value from an fvalue_t structure.

Parameters

  fv | Pointer to the fvalue_t structure containing the value.

Returns
  The signed integer value.

## ◆ fvalue_get_sinteger64()

WS_DLL_PUBLIC int64_t fvalue_get_sinteger64 | ( | fvalue_t * | fv | ) |

Get the 64-bit signed integer value from an fvalue_t structure.

Parameters

  fv | Pointer to the fvalue_t structure containing the value.

Returns
  The 64-bit signed integer value.

## ◆ fvalue_get_strbuf()

WS_DLL_PUBLIC const wmem_strbuf_t * fvalue_get_strbuf | ( | fvalue_t * | fv | ) |

Retrieves the string buffer value from an fvalue_t structure.

Parameters

  fv | Pointer to the fvalue_t structure.

Returns
  tvbuff_t* Pointer to the tvbuff_t containing the string buffer, or NULL if not applicable.

## ◆ fvalue_get_string()

WS_DLL_PUBLIC const char * fvalue_get_string | ( | fvalue_t * | fv | ) |

Get a string representation of an fvalue.

Parameters

  fv | Pointer to the fvalue structure.

Returns
  A pointer to the string representation of the fvalue.

## ◆ fvalue_get_time()

WS_DLL_PUBLIC const nstime_t * fvalue_get_time | ( | fvalue_t * | fv | ) |

Retrieves a time value from an fvalue_t structure.

Parameters

  fv | Pointer to the fvalue_t structure containing the time value.

Returns
  The time value as a pointer to an nstime_t structure.

## ◆ fvalue_get_uinteger()

WS_DLL_PUBLIC uint32_t fvalue_get_uinteger | ( | fvalue_t * | fv | ) |

Get the unsigned integer value from an fvalue_t structure.

Parameters

  fv | Pointer to the fvalue_t structure containing the value.

Returns
  The unsigned integer value.

## ◆ fvalue_get_uinteger64()

WS_DLL_PUBLIC uint64_t fvalue_get_uinteger64 | ( | fvalue_t * | fv | ) |

Retrieves an unsigned 64-bit integer value from a fvalue_t structure.

Parameters

  fv | Pointer to the fvalue_t structure containing the value.

Returns
  The retrieved unsigned 64-bit integer value.

## ◆ fvalue_gt()

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.

Parameters

  a | Pointer to the first fvalue_t structure.
  b | Pointer to the second fvalue_t structure.

Returns
  ft_bool_t FT_TRUE if a > b, otherwise FT_FALSE.

## ◆ fvalue_hash()

WS_DLL_PUBLIC unsigned fvalue_hash | ( | const fvalue_t * | fv | ) |

Calculate the hash value for a fvalue_t.

Parameters

  fv | Pointer to the fvalue_t structure.

Returns
  The calculated hash value.

## ◆ fvalue_init()

WS_DLL_PUBLIC void fvalue_init | ( | fvalue_t * | fv,
|  | ftenum_t | ftype
| ) |  |

Initialize a fvalue_t structure.

Parameters

  fv | Pointer to the fvalue_t structure to initialize.
  ftype | The type of the value to be stored in the fvalue_t structure.

## ◆ fvalue_is_nan()

WS_DLL_PUBLIC bool fvalue_is_nan | ( | const fvalue_t * | a | ) |

Checks if a fvalue_t is NaN.

Parameters

  a | Pointer to the fvalue_t to check.

Returns
  true If the fvalue_t is NaN, false otherwise.

## ◆ fvalue_is_negative()

WS_DLL_PUBLIC bool fvalue_is_negative | ( | const fvalue_t * | a | ) |

Checks if a fvalue_t is negative.

Parameters

  a | Pointer to the fvalue_t to check.

Returns
  true If the fvalue_t is negative, false otherwise.

## ◆ fvalue_is_zero()

WS_DLL_PUBLIC bool fvalue_is_zero | ( | const fvalue_t * | a | ) |

Checks if a fvalue_t is zero.

Parameters

  a | Pointer to the fvalue_t to check.

Returns
  true If the fvalue_t is zero, false otherwise.

## ◆ fvalue_le()

WS_DLL_PUBLIC ft_bool_t fvalue_le | ( | const fvalue_t * | a,
|  | const fvalue_t * | b
| ) |  |

Compares two fvalue_t objects lexicographically.

Parameters

  a | Pointer to the first fvalue_t object.
  b | Pointer to the second fvalue_t object.

Returns
  ft_bool_t FT_TRUE if a is less than or equal to b, otherwise FT_FALSE.

## ◆ fvalue_length2()

WS_DLL_PUBLIC size_t fvalue_length2 | ( | fvalue_t * | fv | ) |

Get the length of a fvalue_t.

Parameters

  fv | The fvalue_t to get the length from.

Returns
  size_t The length of the fvalue_t, or 0 if an error occurs.

## ◆ fvalue_lt()

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.

Parameters

  a | Pointer to the first fvalue_t object.
  b | Pointer to the second fvalue_t object.

Returns
  ft_bool_t FT_TRUE if a < b, otherwise FT_FALSE.

## ◆ fvalue_matches()

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.

Parameters

  a | The fvalue_t to check.
  re | The regular expression to match against.

Returns
  true If the fvalue_t matches the regular expression.
  false If the fvalue_t does not match the regular expression.

## ◆ fvalue_modulo()

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.

Parameters

  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.

Returns
  The result of the modulo operation as an fvalue_t object.

## ◆ fvalue_multiply()

WS_DLL_PUBLIC fvalue_t * fvalue_multiply | ( | const fvalue_t * | a,
|  | const fvalue_t * | b,
|  | char ** | err_msg
| ) |  |

Multiplies two fvalue_t objects.

Parameters

  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.

Returns
  A new fvalue_t object containing the result of the multiplication, or NULL on failure.

## ◆ fvalue_ne()

WS_DLL_PUBLIC ft_bool_t fvalue_ne | ( | const fvalue_t * | a,
|  | const fvalue_t * | b
| ) |  |

Compares two fvalue_t structures for inequality.

Parameters

  a | Pointer to the first fvalue_t structure.
  b | Pointer to the second fvalue_t structure.

Returns
  ft_bool_t FT_TRUE if the values are not equal, FT_FALSE otherwise.

## ◆ fvalue_new()

WS_DLL_PUBLIC fvalue_t * fvalue_new | ( | ftenum_t | ftype | ) |

Creates a new fvalue_t structure.

Parameters

  ftype | The type of the fvalue to create.

Returns
  A pointer to the newly created fvalue_t structure.

## ◆ fvalue_set_ax25()

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.

Parameters

  fv | Pointer to the fvalue_t structure to be set.
  value | Pointer to the byte array containing the AX.25 address.

## ◆ fvalue_set_byte_array()

WS_DLL_PUBLIC void fvalue_set_byte_array | ( | fvalue_t * | fv,
|  | GByteArray * | value
| ) |  |

Set the byte array value of an fvalue_t.

Parameters

  fv | Pointer to the fvalue_t structure.
  value | Pointer to the GByteArray containing the byte array data.

## ◆ fvalue_set_bytes()

WS_DLL_PUBLIC void fvalue_set_bytes | ( | fvalue_t * | fv,
|  | GBytes * | value
| ) |  |

Set the value of an fvalue_t to a GBytes object.

Parameters

  fv | Pointer to the fvalue_t structure.
  value | Pointer to the GBytes object containing the data.

## ◆ fvalue_set_bytes_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.

Parameters

  fv | The fvalue_t to set.
  data | The data to set.
  size | The size of the data.

## ◆ fvalue_set_ether()

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.

Parameters

  fv | Pointer to the fvalue_t structure to be modified.
  value | Pointer to the uint8_t array containing the Ethernet address.

## ◆ fvalue_set_fcwwn()

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).

Parameters

  fv | Pointer to the fvalue_t structure.
  value | Pointer to the uint8_t array containing the FC-WWN value.

## ◆ fvalue_set_floating()

WS_DLL_PUBLIC void fvalue_set_floating | ( | fvalue_t * | fv,
|  | double | value
| ) |  |

Set the floating-point value of an fvalue_t.

Parameters

  fv | Pointer to the fvalue_t structure.
  value | The double value to set.

## ◆ fvalue_set_guid()

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.

Parameters

  fv | Pointer to the fvalue_t structure.
  value | Pointer to the e_guid_t structure containing the GUID value.

## ◆ fvalue_set_ipv4()

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.

Parameters

  fv | Pointer to the fvalue_t structure.
  value | Pointer to the ipv4_addr_and_mask structure containing the new value.

## ◆ fvalue_set_ipv6()

WS_DLL_PUBLIC void fvalue_set_ipv6 | ( | fvalue_t * | fv,
|  | const ipv6_addr_and_prefix * | value
| ) |  |

Set the IPv6 value of an fvalue_t.

Parameters

  fv | Pointer to the fvalue_t structure.
  value | Pointer to the ipv6_addr_and_prefix structure containing the new value.

## ◆ fvalue_set_protocol()

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.

Parameters

  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.

## ◆ fvalue_set_protocol_length()

WS_DLL_PUBLIC void fvalue_set_protocol_length | ( | fvalue_t * | fv,
|  | int | length
| ) |  |

Set the protocol length for a fvalue_t structure.

Parameters

  fv | Pointer to the fvalue_t structure.
  length | The new protocol length to set.

## ◆ fvalue_set_sinteger()

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.

Parameters

  fv | Pointer to the fvalue_t structure.
  value | The signed 32-bit integer value to set.

## ◆ fvalue_set_sinteger64()

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.

Parameters

  fv | Pointer to the fvalue_t structure.
  value | The 64-bit signed integer value to set.

## ◆ fvalue_set_strbuf()

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.

Parameters

  fv | Pointer to the fvalue_t structure.
  value | Pointer to the wmem_strbuf_t containing the new value.

## ◆ fvalue_set_string()

WS_DLL_PUBLIC void fvalue_set_string | ( | fvalue_t * | fv,
|  | const char * | value
| ) |  |

Set the string value of an fvalue_t.

Parameters

  fv | Pointer to the fvalue_t structure.
  value | The string value to set.

## ◆ fvalue_set_time()

WS_DLL_PUBLIC void fvalue_set_time | ( | fvalue_t * | fv,
|  | const nstime_t * | value
| ) |  |

Set the time value of an fvalue_t structure.

Parameters

  fv | Pointer to the fvalue_t structure to be modified.
  value | Pointer to the nstime_t structure containing the new time value.

## ◆ fvalue_set_uinteger()

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.

Parameters

  fv | Pointer to the fvalue_t structure.
  value | The unsigned 32-bit integer value to set.

## ◆ fvalue_set_uinteger64()

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.

Parameters

  fv | Pointer to the fvalue_t structure.
  value | The unsigned 64-bit integer value to set.

## ◆ fvalue_set_vines()

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.

Parameters

  fv | Pointer to the fvalue_t structure.
  value | Pointer to the uint8_t array containing the VINES address.

## ◆ fvalue_slice()

WS_DLL_PUBLIC fvalue_t * fvalue_slice | ( | fvalue_t * | fv,
|  | drange_t * | dr
| ) |  |

Slices a fvalue_t based on a drange_t.

Parameters

  fv | The fvalue_t to slice.
  dr | The range to slice the fvalue_t by.

Returns
  A new fvalue_t containing the sliced data, or NULL if an error occurs.

## ◆ fvalue_subtract()

WS_DLL_PUBLIC fvalue_t * fvalue_subtract | ( | const fvalue_t * | a,
|  | const fvalue_t * | b,
|  | char ** | err_msg
| ) |  |

Subtracts one fvalue from another.

Parameters

  a | The first fvalue to subtract from.
  b | The fvalue to subtract.
  err_msg | Pointer to store error message if any.

Returns
  The result of the subtraction or NULL on failure.

## ◆ fvalue_to_double()

WS_DLL_PUBLIC enum ft_result fvalue_to_double | ( | const fvalue_t * | fv,
|  | double * | repr
| ) |  |

Convert a fvalue_t to its double representation.

Parameters

  fv | Pointer to the fvalue_t structure.
  repr | Pointer to store the double representation.

Returns
  FTENUM_T The result of the conversion or an error code.

## ◆ fvalue_to_sinteger()

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.

Parameters

  fv | The fvalue_t to convert.
  repr | Pointer to store the converted 32-bit signed integer.

Returns
  enum ft_result Result of the conversion.

## ◆ fvalue_to_sinteger64()

WS_DLL_PUBLIC enum ft_result fvalue_to_sinteger64 | ( | const fvalue_t * | fv,
|  | int64_t * | repr
| ) |  |

Convert a fvalue_t to an int64_t.

Parameters

  fv | The fvalue_t to convert.
  repr | Pointer to store the converted value.

Returns
  enum ft_result FT_OK on success, FT_BADARG if conversion is not supported.

## ◆ fvalue_to_string_repr()

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.

Parameters

  scope | Memory allocator scope.
  fv | The fvalue to convert.
  rtype | The type of representation required.
  field_display | Display options for the field.

Returns
  A pointer to the string representation, or NULL if not available.

## ◆ fvalue_to_uinteger()

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.

Parameters

  fv | The fvalue_t to convert.
  repr | Pointer to store the resulting unsigned 32-bit integer.

Returns
  enum ft_result FT_OK on success, FT_OVERFLOW if the value is too large for uint32_t.

## ◆ fvalue_to_uinteger64()

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.

Parameters

  fv | The fvalue_t to convert.
  repr | Pointer to store the converted value.

Returns
  enum ft_result FT_OK on success, FT_BADARG if conversion is not supported.

## ◆ fvalue_type_ftenum()

WS_DLL_PUBLIC ftenum_t fvalue_type_ftenum | ( | const fvalue_t * | fv | ) |

Get the ftype of a fvalue_t.

Parameters

  fv | The fvalue_t to get the ftype from.

Returns
  The ftype of the fvalue_t.

## ◆ fvalue_type_name()

WS_DLL_PUBLIC const char * fvalue_type_name | ( | const fvalue_t * | fv | ) |

Get the name of the type associated with a fvalue_t.

Parameters

  fv | Pointer to the fvalue_t structure.

Returns
  const char* The name of the type.

## ◆ fvalue_unary_minus()

WS_DLL_PUBLIC fvalue_t * fvalue_unary_minus | ( | const fvalue_t * | fv,
|  | char ** | err_msg
| ) |  |

Applies unary minus operation to a fvalue.

Parameters

  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.

Returns
  Pointer to the resulting fvalue after applying the unary minus, or NULL if an error occurred.