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
578WS_DLL_PUBLIC wtap_block_type_t
580
586WS_DLL_PUBLIC void*
588
595WS_DLL_PUBLIC unsigned
596wtap_block_count_option(wtap_block_t block, unsigned option_id);
597
606WS_DLL_PUBLIC wtap_opttype_return_val
607wtap_block_add_uint8_option(wtap_block_t block, unsigned option_id, uint8_t value);
608
617WS_DLL_PUBLIC wtap_opttype_return_val
618wtap_block_set_uint8_option_value(wtap_block_t block, unsigned option_id, uint8_t value);
619
628WS_DLL_PUBLIC wtap_opttype_return_val
629wtap_block_get_uint8_option_value(wtap_block_t block, unsigned option_id, uint8_t* value) G_GNUC_WARN_UNUSED_RESULT;
630
639WS_DLL_PUBLIC wtap_opttype_return_val
640wtap_block_add_uint32_option(wtap_block_t block, unsigned option_id, uint32_t value);
641
650WS_DLL_PUBLIC wtap_opttype_return_val
651wtap_block_set_uint32_option_value(wtap_block_t block, unsigned option_id, uint32_t value);
652
661WS_DLL_PUBLIC wtap_opttype_return_val
662wtap_block_get_uint32_option_value(wtap_block_t block, unsigned option_id, uint32_t* value) G_GNUC_WARN_UNUSED_RESULT;
663
672WS_DLL_PUBLIC wtap_opttype_return_val
673wtap_block_add_uint64_option(wtap_block_t block, unsigned option_id, uint64_t value);
674
683WS_DLL_PUBLIC wtap_opttype_return_val
684wtap_block_set_uint64_option_value(wtap_block_t block, unsigned option_id, uint64_t value);
685
694WS_DLL_PUBLIC wtap_opttype_return_val
695wtap_block_get_uint64_option_value(wtap_block_t block, unsigned option_id, uint64_t* value) G_GNUC_WARN_UNUSED_RESULT;
696
705WS_DLL_PUBLIC wtap_opttype_return_val
706wtap_block_add_int8_option(wtap_block_t block, unsigned option_id, int8_t value);
707
716WS_DLL_PUBLIC wtap_opttype_return_val
717wtap_block_set_int8_option_value(wtap_block_t block, unsigned option_id, int8_t value);
718
727WS_DLL_PUBLIC wtap_opttype_return_val
728wtap_block_get_int8_option_value(wtap_block_t block, unsigned option_id, int8_t* value) G_GNUC_WARN_UNUSED_RESULT;
729
738WS_DLL_PUBLIC wtap_opttype_return_val
739wtap_block_add_int32_option(wtap_block_t block, unsigned option_id, int32_t value);
740
749WS_DLL_PUBLIC wtap_opttype_return_val
750wtap_block_set_int32_option_value(wtap_block_t block, unsigned option_id, int32_t value);
751
760WS_DLL_PUBLIC wtap_opttype_return_val
761wtap_block_get_int32_option_value(wtap_block_t block, unsigned option_id, int32_t* value) G_GNUC_WARN_UNUSED_RESULT;
762
771WS_DLL_PUBLIC wtap_opttype_return_val
772wtap_block_add_int64_option(wtap_block_t block, unsigned option_id, int64_t value);
773
782WS_DLL_PUBLIC wtap_opttype_return_val
783wtap_block_set_int64_option_value(wtap_block_t block, unsigned option_id, int64_t value);
784
793WS_DLL_PUBLIC wtap_opttype_return_val
794wtap_block_get_int64_option_value(wtap_block_t block, unsigned option_id, int64_t* value) G_GNUC_WARN_UNUSED_RESULT;
795
804WS_DLL_PUBLIC wtap_opttype_return_val
805wtap_block_add_ipv4_option(wtap_block_t block, unsigned option_id, uint32_t value);
806
815WS_DLL_PUBLIC wtap_opttype_return_val
816wtap_block_set_ipv4_option_value(wtap_block_t block, unsigned option_id, uint32_t value);
817
826WS_DLL_PUBLIC wtap_opttype_return_val
827wtap_block_get_ipv4_option_value(wtap_block_t block, unsigned option_id, uint32_t* value) G_GNUC_WARN_UNUSED_RESULT;
828
837WS_DLL_PUBLIC wtap_opttype_return_val
838wtap_block_add_ipv6_option(wtap_block_t block, unsigned option_id, ws_in6_addr *value);
839
848WS_DLL_PUBLIC wtap_opttype_return_val
849wtap_block_set_ipv6_option_value(wtap_block_t block, unsigned option_id, ws_in6_addr *value);
850
859WS_DLL_PUBLIC wtap_opttype_return_val
860wtap_block_get_ipv6_option_value(wtap_block_t block, unsigned option_id, ws_in6_addr* value) G_GNUC_WARN_UNUSED_RESULT;
861
871WS_DLL_PUBLIC wtap_opttype_return_val
872wtap_block_add_string_option(wtap_block_t block, unsigned option_id, const char *value, size_t value_length);
873
882WS_DLL_PUBLIC wtap_opttype_return_val
883wtap_block_add_string_option_owned(wtap_block_t block, unsigned option_id, char *value);
884
893WS_DLL_PUBLIC wtap_opttype_return_val
894wtap_block_add_string_option_format(wtap_block_t block, unsigned option_id, const char *format, ...)
895 G_GNUC_PRINTF(3,4);
896
906WS_DLL_PUBLIC wtap_opttype_return_val
907wtap_block_set_string_option_value(wtap_block_t block, unsigned option_id, const char* value, size_t value_length);
908
920WS_DLL_PUBLIC wtap_opttype_return_val
921wtap_block_set_nth_string_option_value(wtap_block_t block, unsigned option_id, unsigned idx, const char* value, size_t value_length);
922
931WS_DLL_PUBLIC wtap_opttype_return_val
932wtap_block_set_string_option_value_format(wtap_block_t block, unsigned option_id, const char *format, ...)
933 G_GNUC_PRINTF(3,4);
934
945WS_DLL_PUBLIC wtap_opttype_return_val
946wtap_block_set_nth_string_option_value_format(wtap_block_t block, unsigned option_id, unsigned idx, const char *format, ...)
947 G_GNUC_PRINTF(4,5);
948
957WS_DLL_PUBLIC wtap_opttype_return_val
958wtap_block_get_string_option_value(wtap_block_t block, unsigned option_id, char** value) G_GNUC_WARN_UNUSED_RESULT;
959
970WS_DLL_PUBLIC wtap_opttype_return_val
971wtap_block_get_nth_string_option_value(wtap_block_t block, unsigned option_id, unsigned idx, char** value) G_GNUC_WARN_UNUSED_RESULT;
972
982WS_DLL_PUBLIC wtap_opttype_return_val
983wtap_block_add_bytes_option(wtap_block_t block, unsigned option_id, const uint8_t *value, size_t value_length);
984
993WS_DLL_PUBLIC wtap_opttype_return_val
994wtap_block_add_bytes_option_borrow(wtap_block_t block, unsigned option_id, GBytes *value);
995
1005WS_DLL_PUBLIC wtap_opttype_return_val
1006wtap_block_set_bytes_option_value(wtap_block_t block, unsigned option_id, const uint8_t* value, size_t value_length);
1007
1017WS_DLL_PUBLIC wtap_opttype_return_val
1018wtap_block_set_nth_bytes_option_value(wtap_block_t block, unsigned option_id, unsigned idx, GBytes* value);
1019
1030WS_DLL_PUBLIC wtap_opttype_return_val
1031wtap_block_get_bytes_option_value(wtap_block_t block, unsigned option_id, GBytes** value) G_GNUC_WARN_UNUSED_RESULT;
1032
1044WS_DLL_PUBLIC wtap_opttype_return_val
1045wtap_block_get_nth_bytes_option_value(wtap_block_t block, unsigned option_id, unsigned idx, GBytes** value) G_GNUC_WARN_UNUSED_RESULT;
1046
1058WS_DLL_PUBLIC wtap_opttype_return_val
1059wtap_block_add_custom_string_option(wtap_block_t block, unsigned option_id, uint32_t pen, const char *value, size_t value_length);
1060
1071WS_DLL_PUBLIC wtap_opttype_return_val
1072wtap_block_add_custom_binary_option(wtap_block_t block, unsigned option_id, uint32_t pen, binary_optdata_t *value);
1073
1085WS_DLL_PUBLIC wtap_opttype_return_val
1086wtap_block_add_custom_binary_option_from_data(wtap_block_t block, unsigned option_id, uint32_t pen, const void *data, size_t data_size);
1087
1099WS_DLL_PUBLIC wtap_opttype_return_val
1100wtap_block_get_nth_custom_binary_option_value(wtap_block_t block, unsigned option_id, uint32_t pen, unsigned idx, binary_optdata_t *value);
1101
1110WS_DLL_PUBLIC wtap_opttype_return_val
1111wtap_block_add_if_filter_option(wtap_block_t block, unsigned option_id, if_filter_opt_t* value);
1112
1121WS_DLL_PUBLIC wtap_opttype_return_val
1122wtap_block_set_if_filter_option_value(wtap_block_t block, unsigned option_id, if_filter_opt_t* value);
1123
1132WS_DLL_PUBLIC wtap_opttype_return_val
1133wtap_block_get_if_filter_option_value(wtap_block_t block, unsigned option_id, if_filter_opt_t* value) G_GNUC_WARN_UNUSED_RESULT;
1134
1143WS_DLL_PUBLIC wtap_opttype_return_val
1145
1156WS_DLL_PUBLIC wtap_opttype_return_val
1157wtap_block_set_nth_packet_verdict_option_value(wtap_block_t block, unsigned option_id, unsigned idx, packet_verdict_opt_t* value);
1158
1169WS_DLL_PUBLIC wtap_opttype_return_val
1170wtap_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;
1171
1172WS_DLL_PUBLIC void
1173wtap_packet_verdict_free(packet_verdict_opt_t* verdict);
1174
1183WS_DLL_PUBLIC wtap_opttype_return_val
1184wtap_block_add_packet_hash_option(wtap_block_t block, unsigned option_id, packet_hash_opt_t* value);
1185
1186WS_DLL_PUBLIC void
1187wtap_packet_hash_free(packet_hash_opt_t* hash);
1188
1196WS_DLL_PUBLIC wtap_opttype_return_val
1197wtap_block_remove_option(wtap_block_t block, unsigned option_id);
1198
1207WS_DLL_PUBLIC wtap_opttype_return_val
1208wtap_block_remove_nth_option_instance(wtap_block_t block, unsigned option_id, unsigned idx);
1209
1218WS_DLL_PUBLIC void
1219wtap_block_copy(wtap_block_t dest_block, wtap_block_t src_block);
1220
1226WS_DLL_PUBLIC wtap_block_t
1228
1229typedef bool (*wtap_block_foreach_func)(wtap_block_t block, unsigned option_id, wtap_opttype_e option_type, wtap_optval_t *option, void *user_data);
1230WS_DLL_PUBLIC bool
1231wtap_block_foreach_option(wtap_block_t block, wtap_block_foreach_func func, void* user_data);
1232
1235WS_DLL_PUBLIC void
1237
1238#ifdef __cplusplus
1239}
1240#endif /* __cplusplus */
1241
1242#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:1579
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:831
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:779
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:961
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:1308
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:1641
WS_DLL_PUBLIC wtap_block_t wtap_block_make_copy(wtap_block_t block)
Definition wtap_opttypes.c:571
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:792
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:935
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:987
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:1078
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:805
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:1219
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:844
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:1065
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:1597
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:1092
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:1159
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:1654
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:974
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:883
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:1321
WS_DLL_PUBLIC wtap_block_t wtap_block_create(wtap_block_type_t block_type)
Definition wtap_opttypes.c:319
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:400
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:870
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:1709
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:1039
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:1245
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:818
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:1052
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:1508
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:1493
WS_DLL_PUBLIC void wtap_opttypes_initialize(void)
Definition wtap_opttypes.c:1937
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:1013
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:922
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:948
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:1623
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:909
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:451
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:1136
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:1294
struct wtapng_iface_descriptions_s wtapng_iface_descriptions_t
WS_DLL_PUBLIC void wtap_block_unref(wtap_block_t block)
Definition wtap_opttypes.c:413
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:1566
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:1232
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:1271
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:1000
WS_DLL_PUBLIC void wtap_opttypes_cleanup(void)
Definition wtap_opttypes.c:2336
WS_DLL_PUBLIC wtap_block_type_t wtap_block_get_type(wtap_block_t block)
Definition wtap_opttypes.c:263
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:896
WS_DLL_PUBLIC void * wtap_block_get_mandatory_data(wtap_block_t block)
Definition wtap_opttypes.c:268
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:766
WS_DLL_PUBLIC void wtap_block_copy(wtap_block_t dest_block, wtap_block_t src_block)
Definition wtap_opttypes.c:481
WS_DLL_PUBLIC void wtap_block_array_free(GArray *block_array)
Definition wtap_opttypes.c:438
WS_DLL_PUBLIC void wtap_block_array_unref(GArray *block_array)
Definition wtap_opttypes.c:464
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:1258
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_remove_option(wtap_block_t block, unsigned option_id)
Definition wtap_opttypes.c:1667
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:857
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:1610
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:1526
WS_DLL_PUBLIC unsigned wtap_block_count_option(wtap_block_t block, unsigned option_id)
Definition wtap_opttypes.c:581
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:1026
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:1460