44#define FTYPE_LOOKUP(ftype, result) \
46 ws_assert(ftype < FT_NUM_TYPES); \
47 result = type_list[ftype];
49typedef void (*FvalueNewFunc)(
fvalue_t*);
51typedef void (*FvalueFreeFunc)(
fvalue_t*);
53typedef bool (*FvalueFromLiteral)(
fvalue_t*,
const char*, bool,
char **);
54typedef bool (*FvalueFromString)(
fvalue_t*,
const char*, size_t,
char **);
55typedef bool (*FvalueFromCharConst)(
fvalue_t*,
unsigned long,
char **);
56typedef bool (*FvalueFromUnsignedInt64)(
fvalue_t*,
const char *, uint64_t,
char **);
57typedef bool (*FvalueFromSignedInt64)(
fvalue_t*,
const char *, int64_t,
char **);
58typedef bool (*FvalueFromDouble)(
fvalue_t*,
const char *, double,
char **);
66typedef void (*FvalueSetBytesFunc)(
fvalue_t*, GBytes *);
70typedef void (*FvalueSetProtocolFunc)(
fvalue_t*,
tvbuff_t *value,
const char *name,
int length);
71typedef void (*FvalueSetUnsignedIntegerFunc)(
fvalue_t*, uint32_t);
72typedef void (*FvalueSetSignedIntegerFunc)(
fvalue_t*, int32_t);
73typedef void (*FvalueSetUnsignedInteger64Func)(
fvalue_t*, uint64_t);
74typedef void (*FvalueSetSignedInteger64Func)(
fvalue_t*, int64_t);
75typedef void (*FvalueSetFloatingFunc)(
fvalue_t*, double);
79typedef GBytes *(*FvalueGetBytesFunc)(
fvalue_t*);
84typedef uint32_t (*FvalueGetUnsignedIntegerFunc)(
fvalue_t*);
85typedef int32_t (*FvalueGetSignedIntegerFunc)(
fvalue_t*);
86typedef uint64_t (*FvalueGetUnsignedInteger64Func)(
fvalue_t*);
87typedef int64_t (*FvalueGetSignedInteger64Func)(
fvalue_t*);
88typedef double (*FvalueGetFloatingFunc)(
fvalue_t*);
96typedef bool (*FvalueIs)(
const fvalue_t*);
97typedef unsigned (*FvalueLen)(
fvalue_t*);
98typedef unsigned (*FvalueHashFunc)(
const fvalue_t *);
99typedef void (*FvalueSlice)(
fvalue_t*,
void *,
unsigned offset,
unsigned length);
371 const uint8_t *src,
size_t src_size);
void ftype_register_ipv4(void)
Registers IPv4 data type.
Definition ftype-ipv4.c:171
void ftype_register_pseudofields_bytes(int proto)
Registers pseudofields for byte-related data types.
Definition ftype-bytes.c:983
void ftype_register_ipv6(void)
Registers IPv6 data type.
Definition ftype-ipv6.c:202
void ftype_register_pseudofields_guid(int proto)
Registers pseudofields for GUID type.
Definition ftype-guid.c:152
void ftype_register(enum ftenum ftype, const ftype_t *ft)
Registers a field type handler for Wireshark.
Definition ftypes.c:59
void ftype_register_pseudofields_string(int proto)
Registers pseudofields for string types.
Definition ftype-string.c:511
GByteArray * byte_array_from_charconst(unsigned long num, char **err_msg)
Convert an unsigned long to a byte array.
Definition ftype-bytes.c:223
void ftype_register_pseudofields_tvbuff(int proto)
Registers pseudofields for TVB (Protocol Data Unit) data.
Definition ftype-protocol.c:416
char * bytes_to_dfilter_repr(wmem_allocator_t *scope, const uint8_t *src, size_t src_size)
Convert bytes to a string representation suitable for display filters.
Definition ftype-bytes.c:79
void ftype_register_guid(void)
Registers the GUID data type.
Definition ftype-guid.c:105
void ftype_register_tvbuff(void)
Registers a new ftype for TVB (Protocol Data Unit) data.
Definition ftype-protocol.c:368
void ftype_register_pseudofields_ipv6(int proto)
Registers pseudofields for IPv6 data types.
Definition ftype-ipv6.c:248
void ftype_register_pseudofields_ieee_11073_float(int proto)
Registers pseudofields for IEEE 11073 float type.
Definition ftype-ieee-11073-float.c:1259
void ftype_register_ieee_11073_float(void)
Registers the IEEE 11073 float data type.
Definition ftype-ieee-11073-float.c:1103
void ftype_register_pseudofields_integer(int proto)
Registers pseudofields for integer types.
Definition ftype-integer.c:1754
void ftype_register_bytes(void)
Registers the bytes data type handler for Wireshark.
Definition ftype-bytes.c:608
void ftype_register_pseudofields_time(int proto)
Registers pseudofields for time-related data types.
Definition ftype-time.c:776
GByteArray * byte_array_from_literal(const char *s, char **err_msg)
Convert a literal string to a GByteArray.
Definition ftype-bytes.c:157
void ftype_register_pseudofields_none(int proto)
Registers pseudofields for a protocol with no specific type.
Definition ftype-none.c:61
void ftype_register_double(void)
Registers the double data type handler for Wireshark.
Definition ftype-double.c:186
void ftype_register_string(void)
Registers string field types.
Definition ftype-string.c:263
void ftype_register_time(void)
Registers time-related field types.
Definition ftype-time.c:689
void ftype_register_integers(void)
Registers all integer-related field types.
Definition ftype-integer.c:946
void ftype_register_none(void)
Registers the "none" data type.
Definition ftype-none.c:15
void ftype_register_pseudofields_ipv4(int proto)
Registers pseudofields for IPv4 data types.
Definition ftype-ipv4.c:218
void ftype_register_pseudofields_double(int proto)
Registers pseudofields for double type.
Definition ftype-double.c:274
enum ftenum ftenum_t
Convenience typedef for ftenum.
Definition ftypes.h:190
ftenum
Fundamental field value types used throughout the Wireshark dissector framework.
Definition ftypes.h:26
@ FT_ENUM_SIZE
Definition ftypes.h:75
ft_result
Return codes for ftype operations such as conversion and comparison.
Definition ftypes.h:217
Represents a GUID/UUID value; may be larger than GUID_LEN so must not be used to directly overlay pac...
Definition guid-utils.h:21
Describes a field type and its associated operations for display filtering.
Definition ftypes-int.h:110
FvalueToDouble val_to_double
Definition ftypes-int.h:129
FvalueSetIpv6Func set_value_ipv6
Definition ftypes-int.h:148
FvalueFromCharConst val_from_charconst
Definition ftypes-int.h:120
FvalueSetFloatingFunc set_value_floating
Definition ftypes-int.h:146
FvalueIs is_nan
Definition ftypes-int.h:178
FvalueGetUnsignedIntegerFunc get_value_uinteger
Definition ftypes-int.h:162
FvalueSetStrbufFunc set_value_strbuf
Definition ftypes-int.h:140
FvalueFromDouble val_from_double
Definition ftypes-int.h:123
FvalueContains contains
Definition ftypes-int.h:172
union _ftype_t::@481 set_value
Union of function pointers for setting typed field values.
FvalueSetSignedInteger64Func set_value_sinteger64
Definition ftypes-int.h:145
FvalueBinaryOp subtract
Definition ftypes-int.h:185
FvalueCompare compare
Definition ftypes-int.h:171
FvalueGetSignedIntegerFunc get_value_sinteger
Definition ftypes-int.h:163
FvalueLen len
Definition ftypes-int.h:179
FvalueIs is_negative
Definition ftypes-int.h:177
FvalueSetIpv4Func set_value_ipv4
Definition ftypes-int.h:147
FvalueGetIpv4Func get_value_ipv4
Definition ftypes-int.h:167
FvalueSetTimeFunc set_value_time
Definition ftypes-int.h:139
FvalueFreeFunc free_value
Definition ftypes-int.h:116
FvalueMatches matches
Definition ftypes-int.h:173
FvalueFromSignedInt64 val_from_sinteger64
Definition ftypes-int.h:122
FvalueGetSignedInteger64Func get_value_sinteger64
Definition ftypes-int.h:165
FvalueSlice slice
Definition ftypes-int.h:180
FvalueToSignedInt64 val_to_sinteger64
Definition ftypes-int.h:128
FvalueFromLiteral val_from_literal
Definition ftypes-int.h:118
FvalueBinaryOp modulo
Definition ftypes-int.h:188
FvalueFromUnsignedInt64 val_from_uinteger64
Definition ftypes-int.h:121
FvalueGetProtocolFunc get_value_protocol
Definition ftypes-int.h:161
FvalueSetGuidFunc set_value_guid
Definition ftypes-int.h:138
FvalueSetBytesFunc set_value_bytes
Definition ftypes-int.h:137
FvalueBinaryOp divide
Definition ftypes-int.h:187
FvalueSetUnsignedIntegerFunc set_value_uinteger
Definition ftypes-int.h:142
FvalueFromString val_from_string
Definition ftypes-int.h:119
FvalueBinaryOp bitwise_and
Definition ftypes-int.h:182
FvalueGetStrbufFunc get_value_strbuf
Definition ftypes-int.h:160
FvalueUnaryOp unary_minus
Definition ftypes-int.h:183
FvalueSetUnsignedInteger64Func set_value_uinteger64
Definition ftypes-int.h:144
FvalueSetProtocolFunc set_value_protocol
Definition ftypes-int.h:141
int wire_size
Definition ftypes-int.h:112
FvalueBinaryOp multiply
Definition ftypes-int.h:186
FvalueGetBytesFunc get_value_bytes
Definition ftypes-int.h:157
FvalueToUnsignedInt64 val_to_uinteger64
Definition ftypes-int.h:127
FvalueGetGuidFunc get_value_guid
Definition ftypes-int.h:158
ftenum_t ftype
Definition ftypes-int.h:111
FvalueHashFunc hash
Definition ftypes-int.h:175
FvalueBinaryOp add
Definition ftypes-int.h:184
FvalueGetUnsignedInteger64Func get_value_uinteger64
Definition ftypes-int.h:164
FvalueGetIpv6Func get_value_ipv6
Definition ftypes-int.h:168
FvalueSetSignedIntegerFunc set_value_sinteger
Definition ftypes-int.h:143
FvalueToStringRepr val_to_string_repr
Definition ftypes-int.h:125
FvalueGetTimeFunc get_value_time
Definition ftypes-int.h:159
union _ftype_t::@482 get_value
Union of function pointers for retrieving typed field values.
FvalueCopyFunc copy_value
Definition ftypes-int.h:115
FvalueNewFunc new_value
Definition ftypes-int.h:114
FvalueGetFloatingFunc get_value_floating
Definition ftypes-int.h:166
FvalueIs is_zero
Definition ftypes-int.h:176
Represents a typed field value used in protocol dissection.
Definition ftypes-int.h:22
protocol_value_t protocol
Definition ftypes-int.h:35
double floating
Definition ftypes-int.h:28
int64_t sinteger64
Definition ftypes-int.h:27
uint16_t sfloat_ieee_11073
Definition ftypes-int.h:36
ipv4_addr_and_mask ipv4
Definition ftypes-int.h:31
uint64_t uinteger64
Definition ftypes-int.h:26
GBytes * bytes
Definition ftypes-int.h:30
ipv6_addr_and_prefix ipv6
Definition ftypes-int.h:32
e_guid_t guid
Definition ftypes-int.h:33
const ftype_t * ftype
Definition ftypes-int.h:23
wmem_strbuf_t * strbuf
Definition ftypes-int.h:29
union _fvalue_t::@480 value
uint32_t float_ieee_11073
Definition ftypes-int.h:37
nstime_t time
Definition ftypes-int.h:34
Holds a protocol value's buffer and associated metadata for use in display filter evaluation.
Definition ftypes.h:552
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
Core tvbuff (testy virtual buffer) structure representing a region of packet data,...
Definition tvbuff-int.h:95