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;
169typedef bool ft_bool_t;
181typedef enum ftrepr ftrepr_t;
185ftypes_initialize(
void);
188ftypes_register_pseudofields(
void);
195ftype_similar_types(
const enum ftenum ftype_a,
const enum ftenum ftype_b);
200ftype_name(ftenum_t ftype);
207ftype_pretty_name(ftenum_t ftype);
211ftype_wire_size(ftenum_t ftype);
215ftype_can_length(
enum ftenum ftype);
219ftype_can_slice(
enum ftenum ftype);
223ftype_can_eq(
enum ftenum ftype);
227ftype_can_cmp(
enum ftenum ftype);
231ftype_can_bitwise_and(
enum ftenum ftype);
235ftype_can_unary_minus(
enum ftenum ftype);
239ftype_can_add(
enum ftenum ftype);
243ftype_can_subtract(
enum ftenum ftype);
247ftype_can_multiply(
enum ftenum ftype);
251ftype_can_divide(
enum ftenum ftype);
255ftype_can_modulo(
enum ftenum ftype);
259ftype_can_contains(
enum ftenum ftype);
263ftype_can_matches(
enum ftenum ftype);
267ftype_can_is_zero(
enum ftenum ftype);
271ftype_can_is_negative(
enum ftenum ftype);
275ftype_can_val_to_sinteger(
enum ftenum ftype);
279ftype_can_val_to_uinteger(
enum ftenum ftype);
283ftype_can_val_to_sinteger64(
enum ftenum ftype);
287ftype_can_val_to_uinteger64(
enum ftenum ftype);
310fvalue_new(ftenum_t ftype);
318fvalue_init(
fvalue_t *fv, ftenum_t ftype);
330fvalue_from_literal(ftenum_t ftype,
const char *s,
bool allow_partial_value,
char **err_msg);
334fvalue_from_string(ftenum_t ftype,
const char *s,
size_t len,
char **err_msg);
337fvalue_from_charconst(ftenum_t ftype,
unsigned long number,
char **err_msg);
340fvalue_from_sinteger64(ftenum_t ftype,
const char *s, int64_t number,
char **err_msg);
343fvalue_from_uinteger64(ftenum_t ftype,
const char *s, uint64_t number,
char **err_msg);
346fvalue_from_floating(ftenum_t ftype,
const char *s,
double number,
char **err_msg);
359#define fvalue_to_debug_repr(scope, fv) \
360 fvalue_to_string_repr(scope, fv, FTREPR_DFILTER, 0)
362WS_DLL_PUBLIC
enum ft_result
363fvalue_to_uinteger(
const fvalue_t *fv, uint32_t *repr);
365WS_DLL_PUBLIC
enum ft_result
366fvalue_to_sinteger(
const fvalue_t *fv, int32_t *repr);
368WS_DLL_PUBLIC
enum ft_result
369fvalue_to_uinteger64(
const fvalue_t *fv, uint64_t *repr);
371WS_DLL_PUBLIC
enum ft_result
372fvalue_to_sinteger64(
const fvalue_t *fv, int64_t *repr);
374WS_DLL_PUBLIC
enum ft_result
375fvalue_to_double(
const fvalue_t *fv,
double *repr);
377WS_DLL_PUBLIC ftenum_t
378fvalue_type_ftenum(
const fvalue_t *fv);
382fvalue_type_name(
const fvalue_t *fv);
387fvalue_set_bytes(
fvalue_t *fv, GBytes *value);
391fvalue_set_byte_array(
fvalue_t *fv, GByteArray *value);
395fvalue_set_bytes_data(
fvalue_t *fv,
const void *data,
size_t size);
399fvalue_set_fcwwn(
fvalue_t *fv,
const uint8_t *value);
403fvalue_set_ax25(
fvalue_t *fv,
const uint8_t *value);
407fvalue_set_vines(
fvalue_t *fv,
const uint8_t *value);
411fvalue_set_ether(
fvalue_t *fv,
const uint8_t *value);
423fvalue_set_string(
fvalue_t *fv,
const char *value);
431fvalue_set_protocol(
fvalue_t *fv,
tvbuff_t *value,
const char *name,
int length);
435fvalue_set_protocol_length(
fvalue_t *fv,
int length);
439fvalue_set_uinteger(
fvalue_t *fv, uint32_t value);
443fvalue_set_sinteger(
fvalue_t *fv, int32_t value);
447fvalue_set_uinteger64(
fvalue_t *fv, uint64_t value);
451fvalue_set_sinteger64(
fvalue_t *fv, int64_t value);
455fvalue_set_floating(
fvalue_t *fv,
double value);
565fvalue_is_negative(
const fvalue_t *a);
581fvalue_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