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;
182typedef enum ftrepr ftrepr_t;
186ftypes_initialize(
void);
189ftypes_register_pseudofields(
void);
196ftype_similar_types(
const enum ftenum ftype_a,
const enum ftenum ftype_b);
201ftype_name(ftenum_t ftype);
208ftype_pretty_name(ftenum_t ftype);
212ftype_wire_size(ftenum_t ftype);
216ftype_can_length(
enum ftenum ftype);
220ftype_can_slice(
enum ftenum ftype);
224ftype_can_eq(
enum ftenum ftype);
228ftype_can_cmp(
enum ftenum ftype);
232ftype_can_bitwise_and(
enum ftenum ftype);
236ftype_can_unary_minus(
enum ftenum ftype);
240ftype_can_add(
enum ftenum ftype);
244ftype_can_subtract(
enum ftenum ftype);
248ftype_can_multiply(
enum ftenum ftype);
252ftype_can_divide(
enum ftenum ftype);
256ftype_can_modulo(
enum ftenum ftype);
260ftype_can_contains(
enum ftenum ftype);
264ftype_can_matches(
enum ftenum ftype);
268ftype_can_is_zero(
enum ftenum ftype);
272ftype_can_is_negative(
enum ftenum ftype);
276ftype_can_val_to_sinteger(
enum ftenum ftype);
280ftype_can_val_to_uinteger(
enum ftenum ftype);
284ftype_can_val_to_sinteger64(
enum ftenum ftype);
288ftype_can_val_to_uinteger64(
enum ftenum ftype);
292ftype_can_val_to_double(
enum ftenum ftype);
315fvalue_new(ftenum_t ftype);
323fvalue_init(
fvalue_t *fv, ftenum_t ftype);
335fvalue_from_literal(ftenum_t ftype,
const char *s,
bool allow_partial_value,
char **err_msg);
339fvalue_from_string(ftenum_t ftype,
const char *s,
size_t len,
char **err_msg);
342fvalue_from_charconst(ftenum_t ftype,
unsigned long number,
char **err_msg);
345fvalue_from_sinteger64(ftenum_t ftype,
const char *s, int64_t number,
char **err_msg);
348fvalue_from_uinteger64(ftenum_t ftype,
const char *s, uint64_t number,
char **err_msg);
351fvalue_from_floating(ftenum_t ftype,
const char *s,
double number,
char **err_msg);
364#define fvalue_to_debug_repr(scope, fv) \
365 fvalue_to_string_repr(scope, fv, FTREPR_DFILTER, 0)
367WS_DLL_PUBLIC
enum ft_result
368fvalue_to_uinteger(
const fvalue_t *fv, uint32_t *repr);
370WS_DLL_PUBLIC
enum ft_result
371fvalue_to_sinteger(
const fvalue_t *fv, int32_t *repr);
373WS_DLL_PUBLIC
enum ft_result
374fvalue_to_uinteger64(
const fvalue_t *fv, uint64_t *repr);
376WS_DLL_PUBLIC
enum ft_result
377fvalue_to_sinteger64(
const fvalue_t *fv, int64_t *repr);
379WS_DLL_PUBLIC
enum ft_result
380fvalue_to_double(
const fvalue_t *fv,
double *repr);
382WS_DLL_PUBLIC ftenum_t
383fvalue_type_ftenum(
const fvalue_t *fv);
387fvalue_type_name(
const fvalue_t *fv);
392fvalue_set_bytes(
fvalue_t *fv, GBytes *value);
396fvalue_set_byte_array(
fvalue_t *fv, GByteArray *value);
400fvalue_set_bytes_data(
fvalue_t *fv,
const void *data,
size_t size);
404fvalue_set_fcwwn(
fvalue_t *fv,
const uint8_t *value);
408fvalue_set_ax25(
fvalue_t *fv,
const uint8_t *value);
412fvalue_set_vines(
fvalue_t *fv,
const uint8_t *value);
416fvalue_set_ether(
fvalue_t *fv,
const uint8_t *value);
428fvalue_set_string(
fvalue_t *fv,
const char *value);
436fvalue_set_protocol(
fvalue_t *fv,
tvbuff_t *value,
const char *name,
int length);
440fvalue_set_protocol_length(
fvalue_t *fv,
int length);
444fvalue_set_uinteger(
fvalue_t *fv, uint32_t value);
448fvalue_set_sinteger(
fvalue_t *fv, int32_t value);
452fvalue_set_uinteger64(
fvalue_t *fv, uint64_t value);
456fvalue_set_sinteger64(
fvalue_t *fv, int64_t value);
460fvalue_set_floating(
fvalue_t *fv,
double value);
570fvalue_is_negative(
const fvalue_t *a);
586fvalue_unary_minus(
const fvalue_t *fv,
char **err_msg);
Definition guid-utils.h:23
Definition ftypes-int.h:98
Definition ftypes-int.h:17
Definition wmem_allocator.h:27
Definition wmem_strbuf.h:42
Definition inet_cidr.h:22
Definition inet_cidr.h:27
Definition tvbuff-int.h:35