24#define ASSERT_FTYPE_NOT_REACHED(ft) \
25 ws_error("Invalid field type '%s'.", ftype_name(ft))
78 FT_ENUM_SIZE = FT_SCALAR
81#define FT_IS_INT32(ft) \
87#define FT_IS_INT64(ft) \
88 ((ft) == FT_INT40 || \
93#define FT_IS_INT(ft) (FT_IS_INT32(ft) || FT_IS_INT64(ft))
95#define FT_IS_UINT32(ft) \
98 (ft) == FT_UINT16 || \
99 (ft) == FT_UINT24 || \
100 (ft) == FT_UINT32 || \
103#define FT_IS_UINT64(ft) \
104 ((ft) == FT_UINT40 || \
105 (ft) == FT_UINT48 || \
106 (ft) == FT_UINT56 || \
109#define FT_IS_UINT(ft) (FT_IS_UINT32(ft) || FT_IS_UINT64(ft))
111#define FT_IS_INTEGER(ft) (FT_IS_INT(ft) || FT_IS_UINT(ft))
113#define FT_IS_FLOATING(ft) ((ft) == FT_FLOAT || (ft) == FT_DOUBLE)
115#define FT_IS_TIME(ft) \
116 ((ft) == FT_ABSOLUTE_TIME || (ft) == FT_RELATIVE_TIME)
118#define FT_IS_STRING(ft) \
119 ((ft) == FT_STRING || (ft) == FT_STRINGZ || (ft) == FT_STRINGZPAD || \
120 (ft) == FT_STRINGZTRUNC || (ft) == FT_UINT_STRING || (ft) == FT_AX25)
122#define FT_IS_SCALAR(ft) ((ft) == FT_INT64 || (ft) == FT_DOUBLE)
125#define FT_ETHER_LEN 6
126#define FT_GUID_LEN 16
128#define FT_IPv6_LEN 16
129#define FT_IPXNET_LEN 4
130#define FT_EUI64_LEN 8
131#define FT_AX25_ADDR_LEN 7
132#define FT_VINES_ADDR_LEN 6
133#define FT_FCWWN_LEN 8
134#define FT_VARINT_MAX_LEN 10
136typedef enum ftenum ftenum_t;
138enum ft_framenum_type {
141 FT_FRAMENUM_RESPONSE,
144 FT_FRAMENUM_RETRANS_PREV,
145 FT_FRAMENUM_RETRANS_NEXT,
146 FT_FRAMENUM_NUM_TYPES
149typedef enum ft_framenum_type ft_framenum_type_t;
170typedef int ft_bool_t;
183typedef enum ftrepr ftrepr_t;
187ftypes_initialize(
void);
190ftypes_register_pseudofields(
void);
197ftype_similar_types(
const enum ftenum ftype_a,
const enum ftenum ftype_b);
202ftype_name(ftenum_t
ftype);
209ftype_pretty_name(ftenum_t
ftype);
214ftype_wire_size(ftenum_t
ftype);
218ftype_can_length(
enum ftenum
ftype);
222ftype_can_slice(
enum ftenum
ftype);
226ftype_can_eq(
enum ftenum
ftype);
230ftype_can_cmp(
enum ftenum
ftype);
234ftype_can_bitwise_and(
enum ftenum
ftype);
238ftype_can_unary_minus(
enum ftenum
ftype);
242ftype_can_add(
enum ftenum
ftype);
246ftype_can_subtract(
enum ftenum
ftype);
250ftype_can_multiply(
enum ftenum
ftype);
254ftype_can_divide(
enum ftenum
ftype);
258ftype_can_modulo(
enum ftenum
ftype);
262ftype_can_contains(
enum ftenum
ftype);
266ftype_can_matches(
enum ftenum
ftype);
270ftype_can_is_zero(
enum ftenum
ftype);
274ftype_can_is_negative(
enum ftenum
ftype);
278ftype_can_is_nan(
enum ftenum
ftype);
282ftype_can_val_to_sinteger(
enum ftenum
ftype);
286ftype_can_val_to_uinteger(
enum ftenum
ftype);
290ftype_can_val_to_sinteger64(
enum ftenum
ftype);
294ftype_can_val_to_uinteger64(
enum ftenum
ftype);
298ftype_can_val_to_double(
enum ftenum
ftype);
321fvalue_new(ftenum_t
ftype);
341fvalue_from_literal(ftenum_t
ftype,
const char *s,
bool allow_partial_value,
char **err_msg);
345fvalue_from_string(ftenum_t
ftype,
const char *s,
size_t len,
char **err_msg);
348fvalue_from_charconst(ftenum_t
ftype,
unsigned long number,
char **err_msg);
351fvalue_from_sinteger64(ftenum_t
ftype,
const char *s, int64_t number,
char **err_msg);
354fvalue_from_uinteger64(ftenum_t
ftype,
const char *s, uint64_t number,
char **err_msg);
357fvalue_from_floating(ftenum_t
ftype,
const char *s,
double number,
char **err_msg);
370#define fvalue_to_debug_repr(scope, fv) \
371 fvalue_to_string_repr(scope, fv, FTREPR_DFILTER, 0)
373WS_DLL_PUBLIC
enum ft_result
374fvalue_to_uinteger(
const fvalue_t *fv, uint32_t *repr);
376WS_DLL_PUBLIC
enum ft_result
377fvalue_to_sinteger(
const fvalue_t *fv, int32_t *repr);
379WS_DLL_PUBLIC
enum ft_result
380fvalue_to_uinteger64(
const fvalue_t *fv, uint64_t *repr);
382WS_DLL_PUBLIC
enum ft_result
383fvalue_to_sinteger64(
const fvalue_t *fv, int64_t *repr);
385WS_DLL_PUBLIC
enum ft_result
386fvalue_to_double(
const fvalue_t *fv,
double *repr);
388WS_DLL_PUBLIC ftenum_t
389fvalue_type_ftenum(
const fvalue_t *fv);
393fvalue_type_name(
const fvalue_t *fv);
406fvalue_set_bytes_data(
fvalue_t *fv,
const void *data,
size_t size);
446fvalue_set_protocol_length(
fvalue_t *fv,
int length);
576fvalue_is_negative(
const fvalue_t *a);
596fvalue_unary_minus(
const fvalue_t *fv,
char **err_msg);
Definition guid-utils.h:23
Describes a field type and its associated operations for display filtering.
Definition ftypes-int.h:112
ftenum_t ftype
Definition ftypes-int.h:113
Represents a typed field value used in protocol dissection.
Definition ftypes-int.h:24
const ftype_t * ftype
Definition ftypes-int.h:25
union _fvalue_t::@479 value
Internal memory allocator interface used by the wmem subsystem.
Definition wmem_allocator.h:34
Internal structure representing a wmem-allocated string buffer.
Definition wmem_strbuf.h:38
Definition inet_cidr.h:22
Definition inet_cidr.h:27
Definition tvbuff-int.h:35