31 uint16_t sfloat_ieee_11073;
32 uint32_t float_ieee_11073;
36 extern const 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 **);
51 typedef bool (*FvalueFromUnsignedInt64)(
fvalue_t*,
const char *, uint64_t,
char **);
52 typedef bool (*FvalueFromSignedInt64)(
fvalue_t*,
const char *, int64_t,
char **);
53 typedef bool (*FvalueFromDouble)(
fvalue_t*,
const char *, double,
char **);
57 typedef enum ft_result (*FvalueToUnsignedInt64)(
const fvalue_t*, uint64_t *);
58 typedef enum ft_result (*FvalueToSignedInt64)(
const fvalue_t*, int64_t *);
59 typedef enum ft_result (*FvalueToDouble)(
const fvalue_t*,
double *);
61 typedef void (*FvalueSetBytesFunc)(
fvalue_t*, GBytes *);
65 typedef void (*FvalueSetProtocolFunc)(
fvalue_t*,
tvbuff_t *value,
const char *name,
int length);
66 typedef void (*FvalueSetUnsignedIntegerFunc)(
fvalue_t*, uint32_t);
67 typedef void (*FvalueSetSignedIntegerFunc)(
fvalue_t*, int32_t);
68 typedef void (*FvalueSetUnsignedInteger64Func)(
fvalue_t*, uint64_t);
69 typedef void (*FvalueSetSignedInteger64Func)(
fvalue_t*, int64_t);
70 typedef void (*FvalueSetFloatingFunc)(
fvalue_t*, double);
74 typedef GBytes *(*FvalueGetBytesFunc)(
fvalue_t*);
79 typedef uint32_t (*FvalueGetUnsignedIntegerFunc)(
fvalue_t*);
80 typedef int32_t (*FvalueGetSignedIntegerFunc)(
fvalue_t*);
81 typedef uint64_t (*FvalueGetUnsignedInteger64Func)(
fvalue_t*);
82 typedef int64_t (*FvalueGetSignedInteger64Func)(
fvalue_t*);
83 typedef double (*FvalueGetFloatingFunc)(
fvalue_t*);
87 typedef enum ft_result (*FvalueCompare)(
const fvalue_t*,
const fvalue_t*,
int*);
88 typedef enum ft_result (*FvalueContains)(
const fvalue_t*,
const fvalue_t*,
bool*);
91 typedef bool (*FvalueIs)(
const fvalue_t*);
92 typedef unsigned (*FvalueLen)(
fvalue_t*);
93 typedef unsigned (*FvalueHashFunc)(
const fvalue_t *);
94 typedef void (*FvalueSlice)(
fvalue_t*,
void *,
unsigned offset,
unsigned length);
95 typedef enum ft_result (*FvalueUnaryOp)(
fvalue_t *,
const fvalue_t*,
char **);
101 FvalueNewFunc new_value;
102 FvalueCopyFunc copy_value;
103 FvalueFreeFunc free_value;
105 FvalueFromLiteral val_from_literal;
106 FvalueFromString val_from_string;
107 FvalueFromCharConst val_from_charconst;
108 FvalueFromUnsignedInt64 val_from_uinteger64;
109 FvalueFromSignedInt64 val_from_sinteger64;
110 FvalueFromDouble val_from_double;
112 FvalueToStringRepr val_to_string_repr;
114 FvalueToUnsignedInt64 val_to_uinteger64;
115 FvalueToSignedInt64 val_to_sinteger64;
116 FvalueToDouble val_to_double;
119 FvalueSetBytesFunc set_value_bytes;
120 FvalueSetGuidFunc set_value_guid;
121 FvalueSetTimeFunc set_value_time;
122 FvalueSetStrbufFunc set_value_strbuf;
123 FvalueSetProtocolFunc set_value_protocol;
124 FvalueSetUnsignedIntegerFunc set_value_uinteger;
125 FvalueSetSignedIntegerFunc set_value_sinteger;
126 FvalueSetUnsignedInteger64Func set_value_uinteger64;
127 FvalueSetSignedInteger64Func set_value_sinteger64;
128 FvalueSetFloatingFunc set_value_floating;
129 FvalueSetIpv4Func set_value_ipv4;
130 FvalueSetIpv6Func set_value_ipv6;
134 FvalueGetBytesFunc get_value_bytes;
135 FvalueGetGuidFunc get_value_guid;
136 FvalueGetTimeFunc get_value_time;
137 FvalueGetStrbufFunc get_value_strbuf;
138 FvalueGetProtocolFunc get_value_protocol;
139 FvalueGetUnsignedIntegerFunc get_value_uinteger;
140 FvalueGetSignedIntegerFunc get_value_sinteger;
141 FvalueGetUnsignedInteger64Func get_value_uinteger64;
142 FvalueGetSignedInteger64Func get_value_sinteger64;
143 FvalueGetFloatingFunc get_value_floating;
144 FvalueGetIpv4Func get_value_ipv4;
145 FvalueGetIpv6Func get_value_ipv6;
148 FvalueCompare compare;
149 FvalueContains contains;
150 FvalueMatches matches;
154 FvalueIs is_negative;
157 FvalueBinaryOp bitwise_and;
158 FvalueUnaryOp unary_minus;
160 FvalueBinaryOp subtract;
161 FvalueBinaryOp multiply;
162 FvalueBinaryOp divide;
163 FvalueBinaryOp modulo;
166 void ftype_register(
enum ftenum ftype,
const ftype_t *ft);
168 void ftype_register_bytes(
void);
169 void ftype_register_double(
void);
170 void ftype_register_ieee_11073_float(
void);
171 void ftype_register_integers(
void);
172 void ftype_register_ipv4(
void);
173 void ftype_register_ipv6(
void);
174 void ftype_register_guid(
void);
175 void ftype_register_none(
void);
176 void ftype_register_string(
void);
177 void ftype_register_time(
void);
178 void ftype_register_tvbuff(
void);
181 void ftype_register_pseudofields_bytes(
int proto);
182 void ftype_register_pseudofields_double(
int proto);
183 void ftype_register_pseudofields_ieee_11073_float(
int proto);
184 void ftype_register_pseudofields_integer(
int proto);
185 void ftype_register_pseudofields_ipv4(
int proto);
186 void ftype_register_pseudofields_ipv6(
int proto);
187 void ftype_register_pseudofields_guid(
int proto);
188 void ftype_register_pseudofields_none(
int proto);
189 void ftype_register_pseudofields_string(
int proto);
190 void ftype_register_pseudofields_time(
int proto);
191 void ftype_register_pseudofields_tvbuff(
int proto);
194 byte_array_from_literal(
const char *s,
char **err_msg);
197 byte_array_from_charconst(
unsigned long num,
char **err_msg);
201 const uint8_t *src,
size_t src_size);
Definition: guid-utils.h:22
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