31 uint16_t sfloat_ieee_11073;
32 uint32_t float_ieee_11073;
36 extern ftype_t* type_list[FT_NUM_TYPES];
39 #define FTYPE_LOOKUP(ftype, result) \
41 ws_assert(ftype < FT_NUM_TYPES); \
42 result = type_list[ftype];
44 typedef void (*FvalueNewFunc)(
fvalue_t*);
46 typedef void (*FvalueFreeFunc)(
fvalue_t*);
48 typedef bool (*FvalueFromLiteral)(
fvalue_t*,
const char*, bool,
char **);
49 typedef bool (*FvalueFromString)(
fvalue_t*,
const char*, size_t,
char **);
50 typedef bool (*FvalueFromCharConst)(
fvalue_t*,
unsigned long,
char **);
53 typedef enum ft_result (*FvalueToUnsignedInteger64Func)(
const fvalue_t*, uint64_t *);
54 typedef enum ft_result (*FvalueToSignedInteger64Func)(
const fvalue_t*, int64_t *);
56 typedef void (*FvalueSetBytesFunc)(
fvalue_t*, GBytes *);
60 typedef void (*FvalueSetProtocolFunc)(
fvalue_t*,
tvbuff_t *value,
const char *name,
int length);
61 typedef void (*FvalueSetUnsignedIntegerFunc)(
fvalue_t*, uint32_t);
62 typedef void (*FvalueSetSignedIntegerFunc)(
fvalue_t*, int32_t);
63 typedef void (*FvalueSetUnsignedInteger64Func)(
fvalue_t*, uint64_t);
64 typedef void (*FvalueSetSignedInteger64Func)(
fvalue_t*, int64_t);
65 typedef void (*FvalueSetFloatingFunc)(
fvalue_t*, double);
68 typedef GBytes *(*FvalueGetBytesFunc)(
fvalue_t*);
73 typedef uint32_t (*FvalueGetUnsignedIntegerFunc)(
fvalue_t*);
74 typedef int32_t (*FvalueGetSignedIntegerFunc)(
fvalue_t*);
75 typedef uint64_t (*FvalueGetUnsignedInteger64Func)(
fvalue_t*);
76 typedef int64_t (*FvalueGetSignedInteger64Func)(
fvalue_t*);
77 typedef double (*FvalueGetFloatingFunc)(
fvalue_t*);
80 typedef enum ft_result (*FvalueCompare)(
const fvalue_t*,
const fvalue_t*,
int*);
81 typedef enum ft_result (*FvalueContains)(
const fvalue_t*,
const fvalue_t*,
bool*);
84 typedef bool (*FvalueIs)(
const fvalue_t*);
85 typedef unsigned (*FvalueLen)(
fvalue_t*);
86 typedef unsigned (*FvalueHashFunc)(
const fvalue_t *);
87 typedef void (*FvalueSlice)(
fvalue_t*,
void *,
unsigned offset,
unsigned length);
88 typedef enum ft_result (*FvalueUnaryOp)(
fvalue_t *,
const fvalue_t*,
char **);
94 const char *pretty_name;
96 FvalueNewFunc new_value;
97 FvalueCopyFunc copy_value;
98 FvalueFreeFunc free_value;
99 FvalueFromLiteral val_from_literal;
100 FvalueFromString val_from_string;
101 FvalueFromCharConst val_from_charconst;
102 FvalueToStringRepr val_to_string_repr;
104 FvalueToUnsignedInteger64Func val_to_uinteger64;
105 FvalueToSignedInteger64Func val_to_sinteger64;
108 FvalueSetBytesFunc set_value_bytes;
109 FvalueSetGuidFunc set_value_guid;
110 FvalueSetTimeFunc set_value_time;
111 FvalueSetStrbufFunc set_value_strbuf;
112 FvalueSetProtocolFunc set_value_protocol;
113 FvalueSetUnsignedIntegerFunc set_value_uinteger;
114 FvalueSetSignedIntegerFunc set_value_sinteger;
115 FvalueSetUnsignedInteger64Func set_value_uinteger64;
116 FvalueSetSignedInteger64Func set_value_sinteger64;
117 FvalueSetFloatingFunc set_value_floating;
118 FvalueSetIpv6Func set_value_ipv6;
122 FvalueGetBytesFunc get_value_bytes;
123 FvalueGetGuidFunc get_value_guid;
124 FvalueGetTimeFunc get_value_time;
125 FvalueGetStrbufFunc get_value_strbuf;
126 FvalueGetProtocolFunc get_value_protocol;
127 FvalueGetUnsignedIntegerFunc get_value_uinteger;
128 FvalueGetSignedIntegerFunc get_value_sinteger;
129 FvalueGetUnsignedInteger64Func get_value_uinteger64;
130 FvalueGetSignedInteger64Func get_value_sinteger64;
131 FvalueGetFloatingFunc get_value_floating;
132 FvalueGetIpv6Func get_value_ipv6;
135 FvalueCompare compare;
136 FvalueContains contains;
137 FvalueMatches matches;
141 FvalueIs is_negative;
144 FvalueBinaryOp bitwise_and;
145 FvalueUnaryOp unary_minus;
147 FvalueBinaryOp subtract;
148 FvalueBinaryOp multiply;
149 FvalueBinaryOp divide;
150 FvalueBinaryOp modulo;
153 void ftype_register(
enum ftenum ftype,
ftype_t *ft);
155 void ftype_register_bytes(
void);
156 void ftype_register_double(
void);
157 void ftype_register_ieee_11073_float(
void);
158 void ftype_register_integers(
void);
159 void ftype_register_ipv4(
void);
160 void ftype_register_ipv6(
void);
161 void ftype_register_guid(
void);
162 void ftype_register_none(
void);
163 void ftype_register_string(
void);
164 void ftype_register_time(
void);
165 void ftype_register_tvbuff(
void);
168 void ftype_register_pseudofields_bytes(
int proto);
169 void ftype_register_pseudofields_double(
int proto);
170 void ftype_register_pseudofields_ieee_11073_float(
int proto);
171 void ftype_register_pseudofields_integer(
int proto);
172 void ftype_register_pseudofields_ipv4(
int proto);
173 void ftype_register_pseudofields_ipv6(
int proto);
174 void ftype_register_pseudofields_guid(
int proto);
175 void ftype_register_pseudofields_none(
int proto);
176 void ftype_register_pseudofields_string(
int proto);
177 void ftype_register_pseudofields_time(
int proto);
178 void ftype_register_pseudofields_tvbuff(
int proto);
181 byte_array_from_literal(
const char *s,
char **err_msg);
184 byte_array_from_charconst(
unsigned long num,
char **err_msg);
188 const uint8_t *src,
size_t src_size);
Definition: guid-utils.h:22
Definition: ftypes-int.h:91
Definition: ftypes-int.h:17
Definition: wmem_allocator.h:27
Definition: wmem_strbuf.h:42
Definition: tvbuff-int.h:35