Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
wtap_opttypes.h
Go to the documentation of this file.
1
10#ifndef WTAP_OPT_TYPES_H
11#define WTAP_OPT_TYPES_H
12
13#include "ws_symbol_export.h"
14
15#include <wsutil/inet_addr.h>
16
17#ifdef __cplusplus
18extern "C" {
19#endif /* __cplusplus */
20
21/*
22 * We use the pcapng option codes for option type values.
23 */
24
25/* Options for all blocks */
26#define OPT_EOFOPT 0
27#define OPT_COMMENT 1
28#define OPT_CUSTOM_STR_COPY 2988
29#define OPT_CUSTOM_BIN_COPY 2989
30#define OPT_CUSTOM_STR_NO_COPY 19372
31#define OPT_CUSTOM_BIN_NO_COPY 19373
33/* Section Header block (SHB) */
34#define OPT_SHB_HARDWARE 2
37#define OPT_SHB_OS 3
40#define OPT_SHB_USERAPPL 4
44/* Interface Description block (IDB) */
45#define OPT_IDB_NAME 2
49#define OPT_IDB_DESCRIPTION 3
55#define OPT_IDB_IP4ADDR 4
60#define OPT_IDB_IP6ADDR 5
66#define OPT_IDB_MACADDR 6
67#define OPT_IDB_EUIADDR 7
68#define OPT_IDB_SPEED 8
70#define OPT_IDB_TSRESOL 9
79#define OPT_IDB_TZONE 10
85#define OPT_IDB_FILTER 11
92#define OPT_IDB_OS 12
100#define OPT_IDB_FCSLEN 13
105#define OPT_IDB_TSOFFSET 14
115#define OPT_IDB_HARDWARE 15
122#define OPT_IDB_TXSPEED 16
125#define OPT_IDB_RXSPEED 17
128#define OPT_IDB_IANA_TZNAME 18
132/*
133 * These are the options for an EPB, but we use them for all WTAP_BLOCK_PACKET
134 */
135#define OPT_PKT_FLAGS 2
136#define OPT_PKT_HASH 3
137#define OPT_PKT_DROPCOUNT 4
138#define OPT_PKT_PACKETID 5
139#define OPT_PKT_QUEUE 6
140#define OPT_PKT_VERDICT 7
141#define OPT_PKT_PROCIDTHRDID 8
142
143/* Name Resolution Block (NRB) */
144#define OPT_NS_DNSNAME 2
145#define OPT_NS_DNSIP4ADDR 3
146#define OPT_NS_DNSIP6ADDR 4
147
148/* Interface Statistics Block (ISB) */
149#define OPT_ISB_STARTTIME 2
150#define OPT_ISB_ENDTIME 3
151#define OPT_ISB_IFRECV 4
152#define OPT_ISB_IFDROP 5
153#define OPT_ISB_FILTERACCEPT 6
154#define OPT_ISB_OSDROP 7
155#define OPT_ISB_USRDELIV 8
156
157/*
158 * Currently supported blocks; these are not the pcapng block type values
159 * for them, they're identifiers used internally, and more than one
160 * pcapng block type may use a given block type.
161 *
162 * Note that, in a given file format, this information won't necessarily
163 * appear in the form of blocks in the file, even though they're presented
164 * to the caller of libwiretap as blocks when reading and are presented
165 * by the caller of libwiretap as blocks when writing. See, for example,
166 * the iptrace file format, in which the interface name is given as part
167 * of the packet record header; we synthesize those blocks when reading
168 * (we don't currently support writing that format, but if we did, we'd
169 * get the interface name from the block and put it in the packet record
170 * header).
171 *
172 * WTAP_BLOCK_IF_ID_AND_INFO is a block that not only gives
173 * descriptive information about an interface but *also* assigns an
174 * ID to the interface, so that every packet has either an explicit
175 * or implicit interface ID indicating on which the packet arrived.
176 *
177 * It does *not* refer to information about interfaces that does not
178 * allow identification of the interface on which a packet arrives
179 * (I'm looking at *you*, Microsoft Network Monitor...). Do *not*
180 * indicate support for that block if your capture format merely
181 * gives a list of interface information without having every packet
182 * explicitly or implicitly (as in, for example, the pcapng Simple
183 * Packet Block) indicate on which of those interfaces the packet
184 * arrived.
185 *
186 * WTAP_BLOCK_PACKET (which corresponds to the Enhanced Packet Block,
187 * the Simple Packet Block, and the deprecated Packet Block) is not
188 * currently used; it's reserved for future use. The same applies
189 * to WTAP_BLOCK_SYSTEMD_JOURNAL_EXPORT.
190 */
191typedef enum {
192 WTAP_BLOCK_SECTION = 0,
193 WTAP_BLOCK_IF_ID_AND_INFO,
194 WTAP_BLOCK_NAME_RESOLUTION,
195 WTAP_BLOCK_IF_STATISTICS,
196 WTAP_BLOCK_DECRYPTION_SECRETS,
197 WTAP_BLOCK_PACKET,
198 WTAP_BLOCK_FT_SPECIFIC_REPORT,
199 WTAP_BLOCK_FT_SPECIFIC_EVENT,
200 WTAP_BLOCK_SYSDIG_EVENT,
201 WTAP_BLOCK_META_EVENT,
202 WTAP_BLOCK_SYSTEMD_JOURNAL_EXPORT,
203 WTAP_BLOCK_CUSTOM,
204 MAX_WTAP_BLOCK_TYPE_VALUE
205} wtap_block_type_t;
206
207struct wtap_block;
208typedef struct wtap_block* wtap_block_t;
209
210typedef void (*wtap_block_create_func)(wtap_block_t block);
211typedef void (*wtap_mand_free_func)(wtap_block_t block);
212typedef void (*wtap_mand_copy_func)(wtap_block_t dest_block, wtap_block_t src_block);
213
214/*
215 * Structure describing a type of block.
216 */
217typedef struct wtap_blocktype_t {
218 wtap_block_type_t block_type;
219 const char* name;
220 const char* description;
221 wtap_block_create_func create;
222 wtap_mand_free_func free_mand;
223 wtap_mand_copy_func copy_mand;
224 GHashTable* options;
226
228{
229 struct wtap_blocktype_t* info;
230 void* mandatory_data;
231 GArray* options;
232 int ref_count;
233#ifdef DEBUG_COUNT_REFS
234 unsigned id;
235#endif
236};
237
251
257 GArray *interface_data;
259
265 uint64_t time_units_per_second;
268 uint32_t snap_len;
269
270 uint8_t num_stat_entries;
274
279 GList *ipv4_addr_list;
280 GList *ipv6_addr_list;
282
287 uint32_t interface_id;
288 uint32_t ts_high;
289 uint32_t ts_low;
291
296 uint32_t secrets_type;
297 uint32_t secrets_len;
298 uint8_t *secrets_data;
300
305 uint32_t mev_block_type;
306 unsigned mev_data_len;
307 uint8_t *mev_data;
309
316#if 0
317/* Commented out for now, there's no mandatory data that isn't handled by
318 * Wireshark in other ways.
319 */
320typedef struct wtapng_packet_mandatory_s {
321 uint32_t interface_id;
322 uint32_t ts_high;
323 uint32_t ts_low;
324 uint32_t captured_len;
325 uint32_t orig_len;
326} wtapng_packet_mandatory_t;
327#endif
328
333 unsigned record_type; /* the type of record this is - file type-specific value */
335
336/*
337 * Currently supported option types. These are not option types
338 * in the sense that each one corresponds to a particular option,
339 * they are data types for the data of an option, so, for example,
340 * all options with a 32-bit unsigned integer value have the type
341 * WTAP_OPTTYPE_UINT32.
342 */
343typedef enum {
344 WTAP_OPTTYPE_UINT8,
345 WTAP_OPTTYPE_UINT32,
346 WTAP_OPTTYPE_UINT64,
347 WTAP_OPTTYPE_STRING,
348 WTAP_OPTTYPE_BYTES,
349 WTAP_OPTTYPE_IPv4,
350 WTAP_OPTTYPE_IPv6,
351 WTAP_OPTTYPE_CUSTOM_STRING,
352 WTAP_OPTTYPE_CUSTOM_BINARY,
353 WTAP_OPTTYPE_IF_FILTER,
354 WTAP_OPTTYPE_PACKET_VERDICT,
355 WTAP_OPTTYPE_PACKET_HASH,
356 WTAP_OPTTYPE_INT8,
357 WTAP_OPTTYPE_INT32,
358 WTAP_OPTTYPE_INT64,
359} wtap_opttype_e;
360
361typedef enum {
362 WTAP_OPTTYPE_SUCCESS = 0,
363 WTAP_OPTTYPE_NO_SUCH_OPTION = -1,
364 WTAP_OPTTYPE_NOT_FOUND = -2,
365 WTAP_OPTTYPE_TYPE_MISMATCH = -3,
366 WTAP_OPTTYPE_NUMBER_MISMATCH = -4,
367 WTAP_OPTTYPE_ALREADY_EXISTS = -5,
368 WTAP_OPTTYPE_BAD_BLOCK = -6,
369 WTAP_OPTTYPE_PEN_MISMATCH = -7,
370} wtap_opttype_return_val;
371
372/* https://www.iana.org/assignments/enterprise-numbers/enterprise-numbers */
373#define PEN_VCTR 46254
374
375/*
376 * Structure giving the value of a custom string option; the value
377 * includes both the Private Enterprise Number and the data following it.
378 */
379typedef struct custom_string_opt_s {
380 uint32_t pen; /* Private Enterprise Number of this option */
381 char* string;
383
384/*
385 * Structure giving the data of a custom binary option.
386 */
387typedef struct binary_optdata {
388 size_t custom_data_len;
389 void* custom_data;
391
392/*
393 * Structure giving the value of a custom binary option; the value
394 * includes both the Private Enterprise Number and the data following it.
395 */
396typedef struct custom_binary_opt_s {
397 uint32_t pen; /* Private Enterprise Number of this option */
398 binary_optdata_t data;
400
401/* Interface description data - if_filter option structure */
402
403/* BPF instruction */
404typedef struct wtap_bpf_insn_s {
405 uint16_t code;
406 uint8_t jt;
407 uint8_t jf;
408 uint32_t k;
410
411/*
412 * Type of filter.
413 */
414typedef enum {
415 if_filter_pcap = 0, /* pcap filter string */
416 if_filter_bpf = 1 /* BPF program */
417} if_filter_type_e;
418
419typedef struct if_filter_opt_s {
420 if_filter_type_e type;
421 union {
423 struct wtap_bpf_insns {
424 unsigned bpf_prog_len;
427 } data;
429
430/* Packet - packet_verdict option structure */
431
432/*
433 * Type of verdict.
434 */
435typedef enum {
436 packet_verdict_hardware = 0, /* array of octets */
437 packet_verdict_linux_ebpf_tc = 1, /* 64-bit unsigned integer TC_ACT_ value */
438 packet_verdict_linux_ebpf_xdp = 2 /* 64-bit unsigned integer xdp_action value */
439} packet_verdict_type_e;
440
441typedef struct packet_verdict_opt_s {
442 packet_verdict_type_e type;
443 union {
444 GByteArray *verdict_bytes;
445 uint64_t verdict_linux_ebpf_tc;
446 uint64_t verdict_linux_ebpf_xdp;
447 } data;
449
450typedef struct packet_hash_opt_s {
451 uint8_t type;
452 GByteArray *hash_bytes;
454
455/*
456 * Structure describing a value of an option.
457 */
458typedef union {
459 uint8_t uint8val;
460 uint32_t uint32val;
461 uint64_t uint64val;
462 int8_t int8val;
463 int32_t int32val;
464 int64_t int64val;
465 ws_in4_addr ipv4val; /* network byte order */
466 ws_in6_addr ipv6val;
467 char *stringval;
468 GBytes *byteval;
469 custom_string_opt_t custom_stringval;
470 custom_binary_opt_t custom_binaryval;
471 if_filter_opt_t if_filterval;
472 packet_verdict_opt_t packet_verdictval;
473 packet_hash_opt_t packet_hash;
475
476/*
477 * Structure describing an option in a block.
478 */
479typedef struct {
480 unsigned option_id;
483
484typedef void (*wtap_block_create_func)(wtap_block_t block);
485typedef void (*wtap_mand_free_func)(wtap_block_t block);
486typedef void (*wtap_mand_copy_func)(wtap_block_t dest_block, wtap_block_t src_block);
487
488/*
489 * Structure describing a type of option.
490 */
491typedef struct {
492 const char* name;
493 const char* description;
494 wtap_opttype_e data_type;
495 unsigned flags;
497
498#define GET_OPTION_TYPE(options, option_id) \
499 (const wtap_opttype_t *)g_hash_table_lookup((options), GUINT_TO_POINTER(option_id))
500
507WS_DLL_PUBLIC void
509
517WS_DLL_PUBLIC wtap_block_t
518wtap_block_create(wtap_block_type_t block_type);
519
527WS_DLL_PUBLIC wtap_block_t
529
536WS_DLL_PUBLIC void
538
547WS_DLL_PUBLIC void
548wtap_block_array_free(GArray* block_array);
549
560WS_DLL_PUBLIC void
561wtap_block_array_unref(GArray* block_array);
562
570WS_DLL_PUBLIC void
571wtap_block_array_ref(GArray* block_array);
572
577WS_DLL_PUBLIC void
579
585WS_DLL_PUBLIC wtap_block_type_t
587
593WS_DLL_PUBLIC void*
595
602WS_DLL_PUBLIC unsigned
603wtap_block_count_option(wtap_block_t block, unsigned option_id);
604
613WS_DLL_PUBLIC wtap_opttype_return_val
614wtap_block_add_uint8_option(wtap_block_t block, unsigned option_id, uint8_t value);
615
624WS_DLL_PUBLIC wtap_opttype_return_val
625wtap_block_set_uint8_option_value(wtap_block_t block, unsigned option_id, uint8_t value);
626
635WS_DLL_PUBLIC wtap_opttype_return_val
636wtap_block_get_uint8_option_value(wtap_block_t block, unsigned option_id, uint8_t* value) G_GNUC_WARN_UNUSED_RESULT;
637
646WS_DLL_PUBLIC wtap_opttype_return_val
647wtap_block_add_uint32_option(wtap_block_t block, unsigned option_id, uint32_t value);
648
657WS_DLL_PUBLIC wtap_opttype_return_val
658wtap_block_set_uint32_option_value(wtap_block_t block, unsigned option_id, uint32_t value);
659
668WS_DLL_PUBLIC wtap_opttype_return_val
669wtap_block_get_uint32_option_value(wtap_block_t block, unsigned option_id, uint32_t* value) G_GNUC_WARN_UNUSED_RESULT;
670
679WS_DLL_PUBLIC wtap_opttype_return_val
680wtap_block_add_uint64_option(wtap_block_t block, unsigned option_id, uint64_t value);
681
690WS_DLL_PUBLIC wtap_opttype_return_val
691wtap_block_set_uint64_option_value(wtap_block_t block, unsigned option_id, uint64_t value);
692
701WS_DLL_PUBLIC wtap_opttype_return_val
702wtap_block_get_uint64_option_value(wtap_block_t block, unsigned option_id, uint64_t* value) G_GNUC_WARN_UNUSED_RESULT;
703
712WS_DLL_PUBLIC wtap_opttype_return_val
713wtap_block_add_int8_option(wtap_block_t block, unsigned option_id, int8_t value);
714
723WS_DLL_PUBLIC wtap_opttype_return_val
724wtap_block_set_int8_option_value(wtap_block_t block, unsigned option_id, int8_t value);
725
734WS_DLL_PUBLIC wtap_opttype_return_val
735wtap_block_get_int8_option_value(wtap_block_t block, unsigned option_id, int8_t* value) G_GNUC_WARN_UNUSED_RESULT;
736
745WS_DLL_PUBLIC wtap_opttype_return_val
746wtap_block_add_int32_option(wtap_block_t block, unsigned option_id, int32_t value);
747
756WS_DLL_PUBLIC wtap_opttype_return_val
757wtap_block_set_int32_option_value(wtap_block_t block, unsigned option_id, int32_t value);
758
767WS_DLL_PUBLIC wtap_opttype_return_val
768wtap_block_get_int32_option_value(wtap_block_t block, unsigned option_id, int32_t* value) G_GNUC_WARN_UNUSED_RESULT;
769
778WS_DLL_PUBLIC wtap_opttype_return_val
779wtap_block_add_int64_option(wtap_block_t block, unsigned option_id, int64_t value);
780
789WS_DLL_PUBLIC wtap_opttype_return_val
790wtap_block_set_int64_option_value(wtap_block_t block, unsigned option_id, int64_t value);
791
800WS_DLL_PUBLIC wtap_opttype_return_val
801wtap_block_get_int64_option_value(wtap_block_t block, unsigned option_id, int64_t* value) G_GNUC_WARN_UNUSED_RESULT;
802
811WS_DLL_PUBLIC wtap_opttype_return_val
812wtap_block_add_ipv4_option(wtap_block_t block, unsigned option_id, uint32_t value);
813
822WS_DLL_PUBLIC wtap_opttype_return_val
823wtap_block_set_ipv4_option_value(wtap_block_t block, unsigned option_id, uint32_t value);
824
833WS_DLL_PUBLIC wtap_opttype_return_val
834wtap_block_get_ipv4_option_value(wtap_block_t block, unsigned option_id, uint32_t* value) G_GNUC_WARN_UNUSED_RESULT;
835
844WS_DLL_PUBLIC wtap_opttype_return_val
845wtap_block_add_ipv6_option(wtap_block_t block, unsigned option_id, ws_in6_addr *value);
846
855WS_DLL_PUBLIC wtap_opttype_return_val
856wtap_block_set_ipv6_option_value(wtap_block_t block, unsigned option_id, ws_in6_addr *value);
857
866WS_DLL_PUBLIC wtap_opttype_return_val
867wtap_block_get_ipv6_option_value(wtap_block_t block, unsigned option_id, ws_in6_addr* value) G_GNUC_WARN_UNUSED_RESULT;
868
878WS_DLL_PUBLIC wtap_opttype_return_val
879wtap_block_add_string_option(wtap_block_t block, unsigned option_id, const char *value, size_t value_length);
880
889WS_DLL_PUBLIC wtap_opttype_return_val
890wtap_block_add_string_option_owned(wtap_block_t block, unsigned option_id, char *value);
891
900WS_DLL_PUBLIC wtap_opttype_return_val
901wtap_block_add_string_option_format(wtap_block_t block, unsigned option_id, const char *format, ...)
902 G_GNUC_PRINTF(3,4);
903
913WS_DLL_PUBLIC wtap_opttype_return_val
914wtap_block_set_string_option_value(wtap_block_t block, unsigned option_id, const char* value, size_t value_length);
915
927WS_DLL_PUBLIC wtap_opttype_return_val
928wtap_block_set_nth_string_option_value(wtap_block_t block, unsigned option_id, unsigned idx, const char* value, size_t value_length);
929
938WS_DLL_PUBLIC wtap_opttype_return_val
939wtap_block_set_string_option_value_format(wtap_block_t block, unsigned option_id, const char *format, ...)
940 G_GNUC_PRINTF(3,4);
941
952WS_DLL_PUBLIC wtap_opttype_return_val
953wtap_block_set_nth_string_option_value_format(wtap_block_t block, unsigned option_id, unsigned idx, const char *format, ...)
954 G_GNUC_PRINTF(4,5);
955
964WS_DLL_PUBLIC wtap_opttype_return_val
965wtap_block_get_string_option_value(wtap_block_t block, unsigned option_id, char** value) G_GNUC_WARN_UNUSED_RESULT;
966
977WS_DLL_PUBLIC wtap_opttype_return_val
978wtap_block_get_nth_string_option_value(wtap_block_t block, unsigned option_id, unsigned idx, char** value) G_GNUC_WARN_UNUSED_RESULT;
979
989WS_DLL_PUBLIC wtap_opttype_return_val
990wtap_block_add_bytes_option(wtap_block_t block, unsigned option_id, const uint8_t *value, size_t value_length);
991
1000WS_DLL_PUBLIC wtap_opttype_return_val
1001wtap_block_add_bytes_option_borrow(wtap_block_t block, unsigned option_id, GBytes *value);
1002
1012WS_DLL_PUBLIC wtap_opttype_return_val
1013wtap_block_set_bytes_option_value(wtap_block_t block, unsigned option_id, const uint8_t* value, size_t value_length);
1014
1024WS_DLL_PUBLIC wtap_opttype_return_val
1025wtap_block_set_nth_bytes_option_value(wtap_block_t block, unsigned option_id, unsigned idx, GBytes* value);
1026
1037WS_DLL_PUBLIC wtap_opttype_return_val
1038wtap_block_get_bytes_option_value(wtap_block_t block, unsigned option_id, GBytes** value) G_GNUC_WARN_UNUSED_RESULT;
1039
1051WS_DLL_PUBLIC wtap_opttype_return_val
1052wtap_block_get_nth_bytes_option_value(wtap_block_t block, unsigned option_id, unsigned idx, GBytes** value) G_GNUC_WARN_UNUSED_RESULT;
1053
1065WS_DLL_PUBLIC wtap_opttype_return_val
1066wtap_block_add_custom_string_option(wtap_block_t block, unsigned option_id, uint32_t pen, const char *value, size_t value_length);
1067
1078WS_DLL_PUBLIC wtap_opttype_return_val
1079wtap_block_add_custom_binary_option(wtap_block_t block, unsigned option_id, uint32_t pen, binary_optdata_t *value);
1080
1092WS_DLL_PUBLIC wtap_opttype_return_val
1093wtap_block_add_custom_binary_option_from_data(wtap_block_t block, unsigned option_id, uint32_t pen, const void *data, size_t data_size);
1094
1106WS_DLL_PUBLIC wtap_opttype_return_val
1107wtap_block_get_nth_custom_binary_option_value(wtap_block_t block, unsigned option_id, uint32_t pen, unsigned idx, binary_optdata_t *value);
1108
1117WS_DLL_PUBLIC wtap_opttype_return_val
1118wtap_block_add_if_filter_option(wtap_block_t block, unsigned option_id, if_filter_opt_t* value);
1119
1128WS_DLL_PUBLIC wtap_opttype_return_val
1129wtap_block_set_if_filter_option_value(wtap_block_t block, unsigned option_id, if_filter_opt_t* value);
1130
1139WS_DLL_PUBLIC wtap_opttype_return_val
1140wtap_block_get_if_filter_option_value(wtap_block_t block, unsigned option_id, if_filter_opt_t* value) G_GNUC_WARN_UNUSED_RESULT;
1141
1150WS_DLL_PUBLIC wtap_opttype_return_val
1152
1163WS_DLL_PUBLIC wtap_opttype_return_val
1164wtap_block_set_nth_packet_verdict_option_value(wtap_block_t block, unsigned option_id, unsigned idx, packet_verdict_opt_t* value);
1165
1176WS_DLL_PUBLIC wtap_opttype_return_val
1177wtap_block_get_nth_packet_verdict_option_value(wtap_block_t block, unsigned option_id, unsigned idx, packet_verdict_opt_t* value) G_GNUC_WARN_UNUSED_RESULT;
1178
1179WS_DLL_PUBLIC void
1180wtap_packet_verdict_free(packet_verdict_opt_t* verdict);
1181
1190WS_DLL_PUBLIC wtap_opttype_return_val
1191wtap_block_add_packet_hash_option(wtap_block_t block, unsigned option_id, packet_hash_opt_t* value);
1192
1193WS_DLL_PUBLIC void
1194wtap_packet_hash_free(packet_hash_opt_t* hash);
1195
1203WS_DLL_PUBLIC wtap_opttype_return_val
1204wtap_block_remove_option(wtap_block_t block, unsigned option_id);
1205
1214WS_DLL_PUBLIC wtap_opttype_return_val
1215wtap_block_remove_nth_option_instance(wtap_block_t block, unsigned option_id, unsigned idx);
1216
1225WS_DLL_PUBLIC void
1226wtap_block_copy(wtap_block_t dest_block, wtap_block_t src_block);
1227
1233WS_DLL_PUBLIC wtap_block_t
1235
1236typedef bool (*wtap_block_foreach_func)(wtap_block_t block, unsigned option_id, wtap_opttype_e option_type, wtap_optval_t *option, void *user_data);
1237WS_DLL_PUBLIC bool
1238wtap_block_foreach_option(wtap_block_t block, wtap_block_foreach_func func, void* user_data);
1239
1242WS_DLL_PUBLIC void
1244
1245#ifdef __cplusplus
1246}
1247#endif /* __cplusplus */
1248
1249#endif /* WTAP_OPT_TYPES_H */
Definition wtap_opttypes.h:387
Definition wtap_opttypes.h:396
Definition wtap_opttypes.h:379
Definition inet_addr.h:21
Definition wtap_opttypes.h:419
char * filter_str
Definition wtap_opttypes.h:422
unsigned bpf_prog_len
Definition wtap_opttypes.h:424
wtap_bpf_insn_t * bpf_prog
Definition wtap_opttypes.h:425
Definition file-pcapng.h:57
Definition wtap_opttypes.h:450
Definition wtap_opttypes.h:441
Definition wtap_opttypes.h:228
Definition wtap_opttypes.h:217
const char * description
Definition wtap_opttypes.h:220
GHashTable * options
Definition wtap_opttypes.h:224
const char * name
Definition wtap_opttypes.h:219
wtap_block_type_t block_type
Definition wtap_opttypes.h:218
Definition wtap_opttypes.h:404
Definition wtap_opttypes.h:479
wtap_optval_t value
Definition wtap_opttypes.h:481
unsigned option_id
Definition wtap_opttypes.h:480
Definition wtap_opttypes.h:491
wtap_opttype_e data_type
Definition wtap_opttypes.h:494
const char * description
Definition wtap_opttypes.h:493
const char * name
Definition wtap_opttypes.h:492
unsigned flags
Definition wtap_opttypes.h:495
Definition wtap_opttypes.h:295
uint32_t secrets_len
Definition wtap_opttypes.h:297
uint8_t * secrets_data
Definition wtap_opttypes.h:298
Definition wtap_opttypes.h:332
Definition wtap_opttypes.h:263
GArray * interface_statistics
Definition wtap_opttypes.h:271
int tsprecision
Definition wtap_opttypes.h:266
int wtap_encap
Definition wtap_opttypes.h:264
Definition wtap_opttypes.h:286
Definition wtap_opttypes.h:256
Definition wtap_opttypes.h:304
unsigned mev_data_len
Definition wtap_opttypes.h:306
uint8_t * mev_data
Definition wtap_opttypes.h:307
Definition wtap_opttypes.h:278
Definition wtap_opttypes.h:241
uint64_t section_length
Definition wtap_opttypes.h:242
Definition wtap_opttypes.h:458
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_set_if_filter_option_value(wtap_block_t block, unsigned option_id, if_filter_opt_t *value)
Definition wtap_opttypes.c:1557
struct wtapng_meta_event_mandatory_s wtapng_meta_event_mandatory_t
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_get_uint32_option_value(wtap_block_t block, unsigned option_id, uint32_t *value) G_GNUC_WARN_UNUSED_RESULT
Definition wtap_opttypes.c:830
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_set_uint8_option_value(wtap_block_t block, unsigned option_id, uint8_t value)
Definition wtap_opttypes.c:778
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_add_int64_option(wtap_block_t block, unsigned option_id, int64_t value)
Definition wtap_opttypes.c:960
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_get_bytes_option_value(wtap_block_t block, unsigned option_id, GBytes **value) G_GNUC_WARN_UNUSED_RESULT
Definition wtap_opttypes.c:1307
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_get_nth_packet_verdict_option_value(wtap_block_t block, unsigned option_id, unsigned idx, packet_verdict_opt_t *value) G_GNUC_WARN_UNUSED_RESULT
Definition wtap_opttypes.c:1619
WS_DLL_PUBLIC wtap_block_t wtap_block_make_copy(wtap_block_t block)
Definition wtap_opttypes.c:570
struct wtapng_section_mandatory_s wtapng_section_mandatory_t
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_get_uint8_option_value(wtap_block_t block, unsigned option_id, uint8_t *value) G_GNUC_WARN_UNUSED_RESULT
Definition wtap_opttypes.c:791
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_set_int32_option_value(wtap_block_t block, unsigned option_id, int32_t value)
Definition wtap_opttypes.c:934
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_get_int64_option_value(wtap_block_t block, unsigned option_id, int64_t *value) G_GNUC_WARN_UNUSED_RESULT
Definition wtap_opttypes.c:986
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_add_string_option(wtap_block_t block, unsigned option_id, const char *value, size_t value_length)
Definition wtap_opttypes.c:1077
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_add_uint32_option(wtap_block_t block, unsigned option_id, uint32_t value)
Definition wtap_opttypes.c:804
WS_DLL_PUBLIC void wtap_opttype_block_register(wtap_blocktype_t *blocktype)
Definition wtap_opttypes.c:185
WS_DLL_PUBLIC wtap_opttype_return_val WS_DLL_PUBLIC wtap_opttype_return_val WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_get_string_option_value(wtap_block_t block, unsigned option_id, char **value) G_GNUC_WARN_UNUSED_RESULT
Definition wtap_opttypes.c:1218
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_add_uint64_option(wtap_block_t block, unsigned option_id, uint64_t value)
Definition wtap_opttypes.c:843
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_get_ipv6_option_value(wtap_block_t block, unsigned option_id, ws_in6_addr *value) G_GNUC_WARN_UNUSED_RESULT
Definition wtap_opttypes.c:1064
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_get_if_filter_option_value(wtap_block_t block, unsigned option_id, if_filter_opt_t *value) G_GNUC_WARN_UNUSED_RESULT
Definition wtap_opttypes.c:1575
struct wtapng_if_stats_mandatory_s wtapng_if_stats_mandatory_t
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_add_string_option_owned(wtap_block_t block, unsigned option_id, char *value)
Definition wtap_opttypes.c:1091
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_set_nth_string_option_value(wtap_block_t block, unsigned option_id, unsigned idx, const char *value, size_t value_length)
Definition wtap_opttypes.c:1158
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_add_packet_hash_option(wtap_block_t block, unsigned option_id, packet_hash_opt_t *value)
Definition wtap_opttypes.c:1632
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_add_string_option_format(wtap_block_t block, unsigned option_id, const char *format,...) G_GNUC_PRINTF(3
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_set_int64_option_value(wtap_block_t block, unsigned option_id, int64_t value)
Definition wtap_opttypes.c:973
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_add_int8_option(wtap_block_t block, unsigned option_id, int8_t value)
Definition wtap_opttypes.c:882
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_get_nth_bytes_option_value(wtap_block_t block, unsigned option_id, unsigned idx, GBytes **value) G_GNUC_WARN_UNUSED_RESULT
Definition wtap_opttypes.c:1320
WS_DLL_PUBLIC wtap_block_t wtap_block_create(wtap_block_type_t block_type)
Definition wtap_opttypes.c:318
struct wtapng_dsb_mandatory_s wtapng_dsb_mandatory_t
struct wtapng_nrb_mandatory_s wtapng_nrb_mandatory_t
WS_DLL_PUBLIC wtap_block_t wtap_block_ref(wtap_block_t block)
Definition wtap_opttypes.c:399
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_set_string_option_value_format(wtap_block_t block, unsigned option_id, const char *format,...) G_GNUC_PRINTF(3
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_get_uint64_option_value(wtap_block_t block, unsigned option_id, uint64_t *value) G_GNUC_WARN_UNUSED_RESULT
Definition wtap_opttypes.c:869
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_remove_nth_option_instance(wtap_block_t block, unsigned option_id, unsigned idx)
Definition wtap_opttypes.c:1687
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_add_ipv6_option(wtap_block_t block, unsigned option_id, ws_in6_addr *value)
Definition wtap_opttypes.c:1038
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_add_bytes_option(wtap_block_t block, unsigned option_id, const uint8_t *value, size_t value_length)
Definition wtap_opttypes.c:1244
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_set_uint32_option_value(wtap_block_t block, unsigned option_id, uint32_t value)
Definition wtap_opttypes.c:817
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_set_ipv6_option_value(wtap_block_t block, unsigned option_id, ws_in6_addr *value)
Definition wtap_opttypes.c:1051
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_add_custom_binary_option_from_data(wtap_block_t block, unsigned option_id, uint32_t pen, const void *data, size_t data_size)
Definition wtap_opttypes.c:1507
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_add_custom_binary_option(wtap_block_t block, unsigned option_id, uint32_t pen, binary_optdata_t *value)
Definition wtap_opttypes.c:1492
WS_DLL_PUBLIC void wtap_opttypes_initialize(void)
Definition wtap_opttypes.c:1888
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_set_ipv4_option_value(wtap_block_t block, unsigned option_id, uint32_t value)
Definition wtap_opttypes.c:1012
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_add_int32_option(wtap_block_t block, unsigned option_id, int32_t value)
Definition wtap_opttypes.c:921
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_get_int32_option_value(wtap_block_t block, unsigned option_id, int32_t *value) G_GNUC_WARN_UNUSED_RESULT
Definition wtap_opttypes.c:947
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_set_nth_packet_verdict_option_value(wtap_block_t block, unsigned option_id, unsigned idx, packet_verdict_opt_t *value)
Definition wtap_opttypes.c:1601
WS_DLL_PUBLIC wtap_opttype_return_val WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_set_nth_string_option_value_format(wtap_block_t block, unsigned option_id, unsigned idx, const char *format,...) G_GNUC_PRINTF(4
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_get_int8_option_value(wtap_block_t block, unsigned option_id, int8_t *value) G_GNUC_WARN_UNUSED_RESULT
Definition wtap_opttypes.c:908
struct wtapng_if_descr_mandatory_s wtapng_if_descr_mandatory_t
WS_DLL_PUBLIC void wtap_block_array_ref(GArray *block_array)
Definition wtap_opttypes.c:450
WS_DLL_PUBLIC wtap_opttype_return_val WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_set_string_option_value(wtap_block_t block, unsigned option_id, const char *value, size_t value_length)
Definition wtap_opttypes.c:1135
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_set_nth_bytes_option_value(wtap_block_t block, unsigned option_id, unsigned idx, GBytes *value)
Definition wtap_opttypes.c:1293
struct wtapng_iface_descriptions_s wtapng_iface_descriptions_t
WS_DLL_PUBLIC void wtap_block_unref(wtap_block_t block)
Definition wtap_opttypes.c:412
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_add_if_filter_option(wtap_block_t block, unsigned option_id, if_filter_opt_t *value)
Definition wtap_opttypes.c:1544
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_get_nth_string_option_value(wtap_block_t block, unsigned option_id, unsigned idx, char **value) G_GNUC_WARN_UNUSED_RESULT
Definition wtap_opttypes.c:1231
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_set_bytes_option_value(wtap_block_t block, unsigned option_id, const uint8_t *value, size_t value_length)
Definition wtap_opttypes.c:1270
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_add_ipv4_option(wtap_block_t block, unsigned option_id, uint32_t value)
Definition wtap_opttypes.c:999
WS_DLL_PUBLIC void wtap_opttypes_cleanup(void)
Definition wtap_opttypes.c:2257
WS_DLL_PUBLIC wtap_block_type_t wtap_block_get_type(wtap_block_t block)
Definition wtap_opttypes.c:262
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_set_int8_option_value(wtap_block_t block, unsigned option_id, int8_t value)
Definition wtap_opttypes.c:895
WS_DLL_PUBLIC void * wtap_block_get_mandatory_data(wtap_block_t block)
Definition wtap_opttypes.c:267
struct wtapng_ft_specific_mandatory_s wtapng_ft_specific_mandatory_t
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_add_uint8_option(wtap_block_t block, unsigned option_id, uint8_t value)
Definition wtap_opttypes.c:765
WS_DLL_PUBLIC void wtap_block_copy(wtap_block_t dest_block, wtap_block_t src_block)
Definition wtap_opttypes.c:480
WS_DLL_PUBLIC void wtap_block_array_free(GArray *block_array)
Definition wtap_opttypes.c:437
WS_DLL_PUBLIC void wtap_block_array_unref(GArray *block_array)
Definition wtap_opttypes.c:463
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_add_bytes_option_borrow(wtap_block_t block, unsigned option_id, GBytes *value)
Definition wtap_opttypes.c:1257
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_remove_option(wtap_block_t block, unsigned option_id)
Definition wtap_opttypes.c:1645
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_set_uint64_option_value(wtap_block_t block, unsigned option_id, uint64_t value)
Definition wtap_opttypes.c:856
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_add_packet_verdict_option(wtap_block_t block, unsigned option_id, packet_verdict_opt_t *value)
Definition wtap_opttypes.c:1588
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_get_nth_custom_binary_option_value(wtap_block_t block, unsigned option_id, uint32_t pen, unsigned idx, binary_optdata_t *value)
Definition wtap_opttypes.c:1525
WS_DLL_PUBLIC unsigned wtap_block_count_option(wtap_block_t block, unsigned option_id)
Definition wtap_opttypes.c:580
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_get_ipv4_option_value(wtap_block_t block, unsigned option_id, uint32_t *value) G_GNUC_WARN_UNUSED_RESULT
Definition wtap_opttypes.c:1025
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_add_custom_string_option(wtap_block_t block, unsigned option_id, uint32_t pen, const char *value, size_t value_length)
Definition wtap_opttypes.c:1459