Wireshark 4.5.0
The Wireshark network protocol analyzer
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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 WTAP_BLOCK_FT_SPECIFIC_INFORMATION,
205 MAX_WTAP_BLOCK_TYPE_VALUE
206} wtap_block_type_t;
207
208struct wtap_block;
209typedef struct wtap_block* wtap_block_t;
210
211typedef void (*wtap_block_create_func)(wtap_block_t block);
212typedef void (*wtap_mand_free_func)(wtap_block_t block);
213typedef void (*wtap_mand_copy_func)(wtap_block_t dest_block, wtap_block_t src_block);
214
215/*
216 * Structure describing a type of block.
217 */
218typedef struct wtap_blocktype_t {
219 wtap_block_type_t block_type;
220 const char* name;
221 const char* description;
222 wtap_block_create_func create;
223 wtap_mand_free_func free_mand;
224 wtap_mand_copy_func copy_mand;
225 GHashTable* options;
227
229{
230 struct wtap_blocktype_t* info;
231 void* mandatory_data;
232 GArray* options;
233 int ref_count;
234#ifdef DEBUG_COUNT_REFS
235 unsigned id;
236#endif
237};
238
252
258 GArray *interface_data;
260
266 uint64_t time_units_per_second;
269 uint32_t snap_len;
270
271 uint8_t num_stat_entries;
275
280 GList *ipv4_addr_list;
281 GList *ipv6_addr_list;
283
288 uint32_t interface_id;
289 uint32_t ts_high;
290 uint32_t ts_low;
292
297 uint32_t secrets_type;
298 uint32_t secrets_len;
299 uint8_t *secrets_data;
301
306 uint32_t mev_block_type;
307 unsigned mev_data_len;
308 uint8_t *mev_data;
310
317#if 0
318/* Commented out for now, there's no mandatory data that isn't handled by
319 * Wireshark in other ways.
320 */
321typedef struct wtapng_packet_mandatory_s {
322 uint32_t interface_id;
323 uint32_t ts_high;
324 uint32_t ts_low;
325 uint32_t captured_len;
326 uint32_t orig_len;
327} wtapng_packet_mandatory_t;
328#endif
329
334 unsigned record_type; /* the type of record this is - file type-specific value */
336
337/*
338 * Currently supported option types. These are not option types
339 * in the sense that each one corresponds to a particular option,
340 * they are data types for the data of an option, so, for example,
341 * all options with a 32-bit unsigned integer value have the type
342 * WTAP_OPTTYPE_UINT32.
343 */
344typedef enum {
345 WTAP_OPTTYPE_UINT8,
346 WTAP_OPTTYPE_UINT32,
347 WTAP_OPTTYPE_UINT64,
348 WTAP_OPTTYPE_STRING,
349 WTAP_OPTTYPE_BYTES,
350 WTAP_OPTTYPE_IPv4,
351 WTAP_OPTTYPE_IPv6,
352 WTAP_OPTTYPE_CUSTOM_STRING,
353 WTAP_OPTTYPE_CUSTOM_BINARY,
354 WTAP_OPTTYPE_IF_FILTER,
355 WTAP_OPTTYPE_PACKET_VERDICT,
356 WTAP_OPTTYPE_PACKET_HASH,
357 WTAP_OPTTYPE_INT8,
358 WTAP_OPTTYPE_INT32,
359 WTAP_OPTTYPE_INT64,
360} wtap_opttype_e;
361
362typedef enum {
363 WTAP_OPTTYPE_SUCCESS = 0,
364 WTAP_OPTTYPE_NO_SUCH_OPTION = -1,
365 WTAP_OPTTYPE_NOT_FOUND = -2,
366 WTAP_OPTTYPE_TYPE_MISMATCH = -3,
367 WTAP_OPTTYPE_NUMBER_MISMATCH = -4,
368 WTAP_OPTTYPE_ALREADY_EXISTS = -5,
369 WTAP_OPTTYPE_BAD_BLOCK = -6,
370 WTAP_OPTTYPE_PEN_MISMATCH = -7,
371} wtap_opttype_return_val;
372
373/* https://www.iana.org/assignments/enterprise-numbers/enterprise-numbers */
374#define PEN_VCTR 46254
375
376/*
377 * Structure giving the value of a custom string option; the value
378 * includes both the Private Enterprise Number and the data following it.
379 */
380typedef struct custom_string_opt_s {
381 uint32_t pen; /* Private Enterprise Number of this option */
382 char* string;
384
385/*
386 * Structure giving the data of a custom binary option.
387 */
388typedef struct binary_optdata {
389 size_t custom_data_len;
390 void* custom_data;
392
393/*
394 * Structure giving the value of a custom binary option; the value
395 * includes both the Private Enterprise Number and the data following it.
396 */
397typedef struct custom_binary_opt_s {
398 uint32_t pen; /* Private Enterprise Number of this option */
399 binary_optdata_t data;
401
402/* Interface description data - if_filter option structure */
403
404/* BPF instruction */
405typedef struct wtap_bpf_insn_s {
406 uint16_t code;
407 uint8_t jt;
408 uint8_t jf;
409 uint32_t k;
411
412/*
413 * Type of filter.
414 */
415typedef enum {
416 if_filter_pcap = 0, /* pcap filter string */
417 if_filter_bpf = 1 /* BPF program */
418} if_filter_type_e;
419
420typedef struct if_filter_opt_s {
421 if_filter_type_e type;
422 union {
424 struct wtap_bpf_insns {
425 unsigned bpf_prog_len;
428 } data;
430
431/* Packet - packet_verdict option structure */
432
433/*
434 * Type of verdict.
435 */
436typedef enum {
437 packet_verdict_hardware = 0, /* array of octets */
438 packet_verdict_linux_ebpf_tc = 1, /* 64-bit unsigned integer TC_ACT_ value */
439 packet_verdict_linux_ebpf_xdp = 2 /* 64-bit unsigned integer xdp_action value */
440} packet_verdict_type_e;
441
442typedef struct packet_verdict_opt_s {
443 packet_verdict_type_e type;
444 union {
445 GByteArray *verdict_bytes;
446 uint64_t verdict_linux_ebpf_tc;
447 uint64_t verdict_linux_ebpf_xdp;
448 } data;
450
451typedef struct packet_hash_opt_s {
452 uint8_t type;
453 GByteArray *hash_bytes;
455
456/*
457 * Structure describing a value of an option.
458 */
459typedef union {
460 uint8_t uint8val;
461 uint32_t uint32val;
462 uint64_t uint64val;
463 int8_t int8val;
464 int32_t int32val;
465 int64_t int64val;
466 ws_in4_addr ipv4val; /* network byte order */
467 ws_in6_addr ipv6val;
468 char *stringval;
469 GBytes *byteval;
470 custom_string_opt_t custom_stringval;
471 custom_binary_opt_t custom_binaryval;
472 if_filter_opt_t if_filterval;
473 packet_verdict_opt_t packet_verdictval;
474 packet_hash_opt_t packet_hash;
476
477/*
478 * Structure describing an option in a block.
479 */
480typedef struct {
481 unsigned option_id;
484
485typedef void (*wtap_block_create_func)(wtap_block_t block);
486typedef void (*wtap_mand_free_func)(wtap_block_t block);
487typedef void (*wtap_mand_copy_func)(wtap_block_t dest_block, wtap_block_t src_block);
488
489/*
490 * Structure describing a type of option.
491 */
492typedef struct {
493 const char* name;
494 const char* description;
495 wtap_opttype_e data_type;
496 unsigned flags;
498
499#define GET_OPTION_TYPE(options, option_id) \
500 (const wtap_opttype_t *)g_hash_table_lookup((options), GUINT_TO_POINTER(option_id))
501
508WS_DLL_PUBLIC void
510
518WS_DLL_PUBLIC wtap_block_t
519wtap_block_create(wtap_block_type_t block_type);
520
528WS_DLL_PUBLIC wtap_block_t
530
537WS_DLL_PUBLIC void
539
548WS_DLL_PUBLIC void
549wtap_block_array_free(GArray* block_array);
550
561WS_DLL_PUBLIC void
562wtap_block_array_unref(GArray* block_array);
563
571WS_DLL_PUBLIC void
572wtap_block_array_ref(GArray* block_array);
573
578WS_DLL_PUBLIC void
580
586WS_DLL_PUBLIC wtap_block_type_t
588
594WS_DLL_PUBLIC void*
596
603WS_DLL_PUBLIC unsigned
604wtap_block_count_option(wtap_block_t block, unsigned option_id);
605
614WS_DLL_PUBLIC wtap_opttype_return_val
615wtap_block_add_uint8_option(wtap_block_t block, unsigned option_id, uint8_t value);
616
625WS_DLL_PUBLIC wtap_opttype_return_val
626wtap_block_set_uint8_option_value(wtap_block_t block, unsigned option_id, uint8_t value);
627
636WS_DLL_PUBLIC wtap_opttype_return_val
637wtap_block_get_uint8_option_value(wtap_block_t block, unsigned option_id, uint8_t* value) G_GNUC_WARN_UNUSED_RESULT;
638
647WS_DLL_PUBLIC wtap_opttype_return_val
648wtap_block_add_uint32_option(wtap_block_t block, unsigned option_id, uint32_t value);
649
658WS_DLL_PUBLIC wtap_opttype_return_val
659wtap_block_set_uint32_option_value(wtap_block_t block, unsigned option_id, uint32_t value);
660
669WS_DLL_PUBLIC wtap_opttype_return_val
670wtap_block_get_uint32_option_value(wtap_block_t block, unsigned option_id, uint32_t* value) G_GNUC_WARN_UNUSED_RESULT;
671
680WS_DLL_PUBLIC wtap_opttype_return_val
681wtap_block_add_uint64_option(wtap_block_t block, unsigned option_id, uint64_t value);
682
691WS_DLL_PUBLIC wtap_opttype_return_val
692wtap_block_set_uint64_option_value(wtap_block_t block, unsigned option_id, uint64_t value);
693
702WS_DLL_PUBLIC wtap_opttype_return_val
703wtap_block_get_uint64_option_value(wtap_block_t block, unsigned option_id, uint64_t* value) G_GNUC_WARN_UNUSED_RESULT;
704
713WS_DLL_PUBLIC wtap_opttype_return_val
714wtap_block_add_int8_option(wtap_block_t block, unsigned option_id, int8_t value);
715
724WS_DLL_PUBLIC wtap_opttype_return_val
725wtap_block_set_int8_option_value(wtap_block_t block, unsigned option_id, int8_t value);
726
735WS_DLL_PUBLIC wtap_opttype_return_val
736wtap_block_get_int8_option_value(wtap_block_t block, unsigned option_id, int8_t* value) G_GNUC_WARN_UNUSED_RESULT;
737
746WS_DLL_PUBLIC wtap_opttype_return_val
747wtap_block_add_int32_option(wtap_block_t block, unsigned option_id, int32_t value);
748
757WS_DLL_PUBLIC wtap_opttype_return_val
758wtap_block_set_int32_option_value(wtap_block_t block, unsigned option_id, int32_t value);
759
768WS_DLL_PUBLIC wtap_opttype_return_val
769wtap_block_get_int32_option_value(wtap_block_t block, unsigned option_id, int32_t* value) G_GNUC_WARN_UNUSED_RESULT;
770
779WS_DLL_PUBLIC wtap_opttype_return_val
780wtap_block_add_int64_option(wtap_block_t block, unsigned option_id, int64_t value);
781
790WS_DLL_PUBLIC wtap_opttype_return_val
791wtap_block_set_int64_option_value(wtap_block_t block, unsigned option_id, int64_t value);
792
801WS_DLL_PUBLIC wtap_opttype_return_val
802wtap_block_get_int64_option_value(wtap_block_t block, unsigned option_id, int64_t* value) G_GNUC_WARN_UNUSED_RESULT;
803
812WS_DLL_PUBLIC wtap_opttype_return_val
813wtap_block_add_ipv4_option(wtap_block_t block, unsigned option_id, uint32_t value);
814
823WS_DLL_PUBLIC wtap_opttype_return_val
824wtap_block_set_ipv4_option_value(wtap_block_t block, unsigned option_id, uint32_t value);
825
834WS_DLL_PUBLIC wtap_opttype_return_val
835wtap_block_get_ipv4_option_value(wtap_block_t block, unsigned option_id, uint32_t* value) G_GNUC_WARN_UNUSED_RESULT;
836
845WS_DLL_PUBLIC wtap_opttype_return_val
846wtap_block_add_ipv6_option(wtap_block_t block, unsigned option_id, ws_in6_addr *value);
847
856WS_DLL_PUBLIC wtap_opttype_return_val
857wtap_block_set_ipv6_option_value(wtap_block_t block, unsigned option_id, ws_in6_addr *value);
858
867WS_DLL_PUBLIC wtap_opttype_return_val
868wtap_block_get_ipv6_option_value(wtap_block_t block, unsigned option_id, ws_in6_addr* value) G_GNUC_WARN_UNUSED_RESULT;
869
879WS_DLL_PUBLIC wtap_opttype_return_val
880wtap_block_add_string_option(wtap_block_t block, unsigned option_id, const char *value, size_t value_length);
881
890WS_DLL_PUBLIC wtap_opttype_return_val
891wtap_block_add_string_option_owned(wtap_block_t block, unsigned option_id, char *value);
892
901WS_DLL_PUBLIC wtap_opttype_return_val
902wtap_block_add_string_option_format(wtap_block_t block, unsigned option_id, const char *format, ...)
903 G_GNUC_PRINTF(3,4);
904
914WS_DLL_PUBLIC wtap_opttype_return_val
915wtap_block_set_string_option_value(wtap_block_t block, unsigned option_id, const char* value, size_t value_length);
916
928WS_DLL_PUBLIC wtap_opttype_return_val
929wtap_block_set_nth_string_option_value(wtap_block_t block, unsigned option_id, unsigned idx, const char* value, size_t value_length);
930
939WS_DLL_PUBLIC wtap_opttype_return_val
940wtap_block_set_string_option_value_format(wtap_block_t block, unsigned option_id, const char *format, ...)
941 G_GNUC_PRINTF(3,4);
942
953WS_DLL_PUBLIC wtap_opttype_return_val
954wtap_block_set_nth_string_option_value_format(wtap_block_t block, unsigned option_id, unsigned idx, const char *format, ...)
955 G_GNUC_PRINTF(4,5);
956
965WS_DLL_PUBLIC wtap_opttype_return_val
966wtap_block_get_string_option_value(wtap_block_t block, unsigned option_id, char** value) G_GNUC_WARN_UNUSED_RESULT;
967
978WS_DLL_PUBLIC wtap_opttype_return_val
979wtap_block_get_nth_string_option_value(wtap_block_t block, unsigned option_id, unsigned idx, char** value) G_GNUC_WARN_UNUSED_RESULT;
980
990WS_DLL_PUBLIC wtap_opttype_return_val
991wtap_block_add_bytes_option(wtap_block_t block, unsigned option_id, const uint8_t *value, size_t value_length);
992
1001WS_DLL_PUBLIC wtap_opttype_return_val
1002wtap_block_add_bytes_option_borrow(wtap_block_t block, unsigned option_id, GBytes *value);
1003
1013WS_DLL_PUBLIC wtap_opttype_return_val
1014wtap_block_set_bytes_option_value(wtap_block_t block, unsigned option_id, const uint8_t* value, size_t value_length);
1015
1025WS_DLL_PUBLIC wtap_opttype_return_val
1026wtap_block_set_nth_bytes_option_value(wtap_block_t block, unsigned option_id, unsigned idx, GBytes* value);
1027
1038WS_DLL_PUBLIC wtap_opttype_return_val
1039wtap_block_get_bytes_option_value(wtap_block_t block, unsigned option_id, GBytes** value) G_GNUC_WARN_UNUSED_RESULT;
1040
1052WS_DLL_PUBLIC wtap_opttype_return_val
1053wtap_block_get_nth_bytes_option_value(wtap_block_t block, unsigned option_id, unsigned idx, GBytes** value) G_GNUC_WARN_UNUSED_RESULT;
1054
1066WS_DLL_PUBLIC wtap_opttype_return_val
1067wtap_block_add_custom_string_option(wtap_block_t block, unsigned option_id, uint32_t pen, const char *value, size_t value_length);
1068
1079WS_DLL_PUBLIC wtap_opttype_return_val
1080wtap_block_add_custom_binary_option(wtap_block_t block, unsigned option_id, uint32_t pen, binary_optdata_t *value);
1081
1093WS_DLL_PUBLIC wtap_opttype_return_val
1094wtap_block_add_custom_binary_option_from_data(wtap_block_t block, unsigned option_id, uint32_t pen, const void *data, size_t data_size);
1095
1107WS_DLL_PUBLIC wtap_opttype_return_val
1108wtap_block_get_nth_custom_binary_option_value(wtap_block_t block, unsigned option_id, uint32_t pen, unsigned idx, binary_optdata_t *value);
1109
1118WS_DLL_PUBLIC wtap_opttype_return_val
1119wtap_block_add_if_filter_option(wtap_block_t block, unsigned option_id, if_filter_opt_t* value);
1120
1129WS_DLL_PUBLIC wtap_opttype_return_val
1130wtap_block_set_if_filter_option_value(wtap_block_t block, unsigned option_id, if_filter_opt_t* value);
1131
1140WS_DLL_PUBLIC wtap_opttype_return_val
1141wtap_block_get_if_filter_option_value(wtap_block_t block, unsigned option_id, if_filter_opt_t* value) G_GNUC_WARN_UNUSED_RESULT;
1142
1151WS_DLL_PUBLIC wtap_opttype_return_val
1153
1164WS_DLL_PUBLIC wtap_opttype_return_val
1165wtap_block_set_nth_packet_verdict_option_value(wtap_block_t block, unsigned option_id, unsigned idx, packet_verdict_opt_t* value);
1166
1177WS_DLL_PUBLIC wtap_opttype_return_val
1178wtap_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;
1179
1180WS_DLL_PUBLIC void
1181wtap_packet_verdict_free(packet_verdict_opt_t* verdict);
1182
1191WS_DLL_PUBLIC wtap_opttype_return_val
1192wtap_block_add_packet_hash_option(wtap_block_t block, unsigned option_id, packet_hash_opt_t* value);
1193
1194WS_DLL_PUBLIC void
1195wtap_packet_hash_free(packet_hash_opt_t* hash);
1196
1204WS_DLL_PUBLIC wtap_opttype_return_val
1205wtap_block_remove_option(wtap_block_t block, unsigned option_id);
1206
1215WS_DLL_PUBLIC wtap_opttype_return_val
1216wtap_block_remove_nth_option_instance(wtap_block_t block, unsigned option_id, unsigned idx);
1217
1226WS_DLL_PUBLIC void
1227wtap_block_copy(wtap_block_t dest_block, wtap_block_t src_block);
1228
1234WS_DLL_PUBLIC wtap_block_t
1236
1237typedef bool (*wtap_block_foreach_func)(wtap_block_t block, unsigned option_id, wtap_opttype_e option_type, wtap_optval_t *option, void *user_data);
1238WS_DLL_PUBLIC bool
1239wtap_block_foreach_option(wtap_block_t block, wtap_block_foreach_func func, void* user_data);
1240
1243WS_DLL_PUBLIC void
1245
1246#ifdef __cplusplus
1247}
1248#endif /* __cplusplus */
1249
1250#endif /* WTAP_OPT_TYPES_H */
Definition wtap_opttypes.h:388
Definition wtap_opttypes.h:397
Definition wtap_opttypes.h:380
Definition inet_addr.h:21
Definition wtap_opttypes.h:420
char * filter_str
Definition wtap_opttypes.h:423
unsigned bpf_prog_len
Definition wtap_opttypes.h:425
wtap_bpf_insn_t * bpf_prog
Definition wtap_opttypes.h:426
Definition file-pcapng.h:57
Definition wtap_opttypes.h:451
Definition wtap_opttypes.h:442
Definition wtap_opttypes.h:229
Definition wtap_opttypes.h:218
const char * description
Definition wtap_opttypes.h:221
GHashTable * options
Definition wtap_opttypes.h:225
const char * name
Definition wtap_opttypes.h:220
wtap_block_type_t block_type
Definition wtap_opttypes.h:219
Definition wtap_opttypes.h:405
Definition wtap_opttypes.h:480
wtap_optval_t value
Definition wtap_opttypes.h:482
unsigned option_id
Definition wtap_opttypes.h:481
Definition wtap_opttypes.h:492
wtap_opttype_e data_type
Definition wtap_opttypes.h:495
const char * description
Definition wtap_opttypes.h:494
const char * name
Definition wtap_opttypes.h:493
unsigned flags
Definition wtap_opttypes.h:496
Definition wtap_opttypes.h:296
uint32_t secrets_len
Definition wtap_opttypes.h:298
uint8_t * secrets_data
Definition wtap_opttypes.h:299
Definition wtap_opttypes.h:333
Definition wtap_opttypes.h:264
GArray * interface_statistics
Definition wtap_opttypes.h:272
int tsprecision
Definition wtap_opttypes.h:267
int wtap_encap
Definition wtap_opttypes.h:265
Definition wtap_opttypes.h:287
Definition wtap_opttypes.h:257
Definition wtap_opttypes.h:305
unsigned mev_data_len
Definition wtap_opttypes.h:307
uint8_t * mev_data
Definition wtap_opttypes.h:308
Definition wtap_opttypes.h:279
Definition wtap_opttypes.h:242
uint64_t section_length
Definition wtap_opttypes.h:243
Definition wtap_opttypes.h:459
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:1906
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:2323
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