10 #ifndef WTAP_OPT_TYPES_H
11 #define WTAP_OPT_TYPES_H
13 #include "ws_symbol_export.h"
29 #define OPT_CUSTOM_STR_COPY 2988
30 #define OPT_CUSTOM_BIN_COPY 2989
31 #define OPT_CUSTOM_STR_NO_COPY 19372
32 #define OPT_CUSTOM_BIN_NO_COPY 19373
35 #define OPT_SHB_HARDWARE 2
41 #define OPT_SHB_USERAPPL 4
46 #define OPT_IDB_NAME 2
50 #define OPT_IDB_DESCRIPTION 3
56 #define OPT_IDB_IP4ADDR 4
61 #define OPT_IDB_IP6ADDR 5
67 #define OPT_IDB_MACADDR 6
68 #define OPT_IDB_EUIADDR 7
69 #define OPT_IDB_SPEED 8
71 #define OPT_IDB_TSRESOL 9
80 #define OPT_IDB_TZONE 10
81 #define OPT_IDB_FILTER 11
96 #define OPT_IDB_FCSLEN 13
101 #define OPT_IDB_TSOFFSET 14
109 #define OPT_IDB_HARDWARE 15
120 #define OPT_PKT_FLAGS 2
121 #define OPT_PKT_HASH 3
122 #define OPT_PKT_DROPCOUNT 4
123 #define OPT_PKT_PACKETID 5
124 #define OPT_PKT_QUEUE 6
125 #define OPT_PKT_VERDICT 7
128 #define OPT_NS_DNSNAME 2
129 #define OPT_NS_DNSIP4ADDR 3
130 #define OPT_NS_DNSIP6ADDR 4
133 #define OPT_ISB_STARTTIME 2
134 #define OPT_ISB_ENDTIME 3
135 #define OPT_ISB_IFRECV 4
136 #define OPT_ISB_IFDROP 5
137 #define OPT_ISB_FILTERACCEPT 6
138 #define OPT_ISB_OSDROP 7
139 #define OPT_ISB_USRDELIV 8
179 WTAP_BLOCK_SECTION = 0,
180 WTAP_BLOCK_IF_ID_AND_INFO,
181 WTAP_BLOCK_NAME_RESOLUTION,
182 WTAP_BLOCK_IF_STATISTICS,
183 WTAP_BLOCK_DECRYPTION_SECRETS,
185 WTAP_BLOCK_FT_SPECIFIC_REPORT,
186 WTAP_BLOCK_FT_SPECIFIC_EVENT,
187 WTAP_BLOCK_SYSDIG_EVENT,
188 WTAP_BLOCK_META_EVENT,
189 WTAP_BLOCK_SYSTEMD_JOURNAL_EXPORT,
191 MAX_WTAP_BLOCK_TYPE_VALUE
213 GArray *interface_data;
221 guint64 time_units_per_second;
226 guint8 num_stat_entries;
235 GList *ipv4_addr_list;
236 GList *ipv6_addr_list;
243 guint32 interface_id;
252 guint32 secrets_type;
261 uint32_t mev_block_type;
276 typedef struct wtapng_packet_mandatory_s {
277 guint32 interface_id;
280 guint32 captured_len;
282 } wtapng_packet_mandatory_t;
308 WTAP_OPTTYPE_IF_FILTER,
309 WTAP_OPTTYPE_PACKET_VERDICT,
310 WTAP_OPTTYPE_PACKET_HASH,
314 WTAP_OPTTYPE_SUCCESS = 0,
315 WTAP_OPTTYPE_NO_SUCH_OPTION = -1,
316 WTAP_OPTTYPE_NOT_FOUND = -2,
317 WTAP_OPTTYPE_TYPE_MISMATCH = -3,
318 WTAP_OPTTYPE_NUMBER_MISMATCH = -4,
319 WTAP_OPTTYPE_ALREADY_EXISTS = -5,
320 WTAP_OPTTYPE_BAD_BLOCK = -6,
321 } wtap_opttype_return_val;
324 #define PEN_NFLX 10949
325 #define PEN_VCTR 46254
334 struct generic_custom_opt_data {
335 gsize custom_data_len;
338 struct nflx_custom_opt_data {
340 gsize custom_data_len;
342 gboolean use_little_endian;
351 gboolean nflx_use_little_endian;
353 gsize nflx_custom_data_len;
354 gchar *nflx_custom_data;
376 if_filter_type_e type;
379 struct wtap_bpf_insns {
392 packet_verdict_hardware = 0,
393 packet_verdict_linux_ebpf_tc = 1,
394 packet_verdict_linux_ebpf_xdp = 2
395 } packet_verdict_type_e;
398 packet_verdict_type_e type;
400 GByteArray *verdict_bytes;
401 guint64 verdict_linux_ebpf_tc;
402 guint64 verdict_linux_ebpf_xdp;
408 GByteArray *hash_bytes;
436 #define NFLX_OPT_TYPE_VERSION 1
437 #define NFLX_OPT_TYPE_TCPINFO 2
438 #define NFLX_OPT_TYPE_DUMPINFO 4
439 #define NFLX_OPT_TYPE_DUMPTIME 5
440 #define NFLX_OPT_TYPE_STACKNAME 6
446 guint16 tlh_ie_fport;
447 guint16 tlh_ie_lport;
448 guint32 tlh_ie_faddr_addr32[4];
449 guint32 tlh_ie_laddr_addr32[4];
450 guint32 tlh_ie_zoneid;
451 guint64 tlh_offset_tv_sec;
452 guint64 tlh_offset_tv_usec;
461 #define NFLX_TLB_FLAG_RXBUF 0x0001
462 #define NFLX_TLB_FLAG_TXBUF 0x0002
463 #define NFLX_TLB_FLAG_HDR 0x0004
464 #define NFLX_TLB_FLAG_VERBOSE 0x0008
465 #define NFLX_TLB_FLAG_STACKINFO 0x0010
468 #define NFLX_TLB_TF_REQ_SCALE 0x00000020
469 #define NFLX_TLB_TF_RCVD_SCALE 0x00000040
472 #define NFLX_TLB_TCPS_ESTABLISHED 4
473 #define NFLX_TLB_IS_SYNCHRONIZED(state) (state >= NFLX_TLB_TCPS_ESTABLISHED)
482 guint16 tlb_eventflags;
484 guint32 tlb_rxbuf_tls_sb_acc;
485 guint32 tlb_rxbuf_tls_sb_ccc;
486 guint32 tlb_rxbuf_tls_sb_spare;
487 guint32 tlb_txbuf_tls_sb_acc;
488 guint32 tlb_txbuf_tls_sb_ccc;
489 guint32 tlb_txbuf_tls_sb_spare;
491 guint32 tlb_starttime;
496 guint32 tlb_snd_cwnd;
498 guint32 tlb_snd_recover;
500 guint32 tlb_snd_ssthresh;
510 gint32 tlb_snd_numholes;
513 guint32 tlb_fbyte_in;
514 guint32 tlb_fbyte_out;
515 guint8 tlb_snd_scale:4,
520 guint64 tlb_stackinfo_bbr_cur_del_rate;
521 guint64 tlb_stackinfo_bbr_delRate;
522 guint64 tlb_stackinfo_bbr_rttProp;
523 guint64 tlb_stackinfo_bbr_bw_inuse;
524 guint32 tlb_stackinfo_bbr_inflight;
525 guint32 tlb_stackinfo_bbr_applimited;
526 guint32 tlb_stackinfo_bbr_delivered;
527 guint32 tlb_stackinfo_bbr_timeStamp;
528 guint32 tlb_stackinfo_bbr_epoch;
529 guint32 tlb_stackinfo_bbr_lt_epoch;
530 guint32 tlb_stackinfo_bbr_pkts_out;
531 guint32 tlb_stackinfo_bbr_flex1;
532 guint32 tlb_stackinfo_bbr_flex2;
533 guint32 tlb_stackinfo_bbr_flex3;
534 guint32 tlb_stackinfo_bbr_flex4;
535 guint32 tlb_stackinfo_bbr_flex5;
536 guint32 tlb_stackinfo_bbr_flex6;
537 guint32 tlb_stackinfo_bbr_lost;
538 guint16 tlb_stackinfo_bbr_pacing_gain;
539 guint16 tlb_stackinfo_bbr_cwnd_gain;
540 guint16 tlb_stackinfo_bbr_flex7;
541 guint8 tlb_stackinfo_bbr_bbr_state;
542 guint8 tlb_stackinfo_bbr_bbr_substate;
543 guint8 tlb_stackinfo_bbr_inhpts;
544 guint8 tlb_stackinfo_bbr_ininput;
545 guint8 tlb_stackinfo_bbr_use_lt_bw;
546 guint8 tlb_stackinfo_bbr_flex8;
547 guint32 tlb_stackinfo_bbr_pkt_epoch;
552 typedef void (*wtap_block_create_func)(
wtap_block_t block);
553 typedef void (*wtap_mand_free_func)(
wtap_block_t block);
610 WS_DLL_PUBLIC wtap_block_type_t
638 WS_DLL_PUBLIC wtap_opttype_return_val
649 WS_DLL_PUBLIC wtap_opttype_return_val
660 WS_DLL_PUBLIC wtap_opttype_return_val
671 WS_DLL_PUBLIC wtap_opttype_return_val
682 WS_DLL_PUBLIC wtap_opttype_return_val
693 WS_DLL_PUBLIC wtap_opttype_return_val
704 WS_DLL_PUBLIC wtap_opttype_return_val
715 WS_DLL_PUBLIC wtap_opttype_return_val
726 WS_DLL_PUBLIC wtap_opttype_return_val
737 WS_DLL_PUBLIC wtap_opttype_return_val
748 WS_DLL_PUBLIC wtap_opttype_return_val
759 WS_DLL_PUBLIC wtap_opttype_return_val
770 WS_DLL_PUBLIC wtap_opttype_return_val
781 WS_DLL_PUBLIC wtap_opttype_return_val
792 WS_DLL_PUBLIC wtap_opttype_return_val
804 WS_DLL_PUBLIC wtap_opttype_return_val
815 WS_DLL_PUBLIC wtap_opttype_return_val
826 WS_DLL_PUBLIC wtap_opttype_return_val
839 WS_DLL_PUBLIC wtap_opttype_return_val
853 WS_DLL_PUBLIC wtap_opttype_return_val
864 WS_DLL_PUBLIC wtap_opttype_return_val
878 WS_DLL_PUBLIC wtap_opttype_return_val
890 WS_DLL_PUBLIC wtap_opttype_return_val
903 WS_DLL_PUBLIC wtap_opttype_return_val
915 WS_DLL_PUBLIC wtap_opttype_return_val
926 WS_DLL_PUBLIC wtap_opttype_return_val
938 WS_DLL_PUBLIC wtap_opttype_return_val
950 WS_DLL_PUBLIC wtap_opttype_return_val
963 WS_DLL_PUBLIC wtap_opttype_return_val
977 WS_DLL_PUBLIC wtap_opttype_return_val
989 WS_DLL_PUBLIC wtap_opttype_return_val
1001 WS_DLL_PUBLIC wtap_opttype_return_val
1014 WS_DLL_PUBLIC wtap_opttype_return_val
1025 WS_DLL_PUBLIC wtap_opttype_return_val
1036 WS_DLL_PUBLIC wtap_opttype_return_val
1047 WS_DLL_PUBLIC wtap_opttype_return_val
1058 WS_DLL_PUBLIC wtap_opttype_return_val
1071 WS_DLL_PUBLIC wtap_opttype_return_val
1084 WS_DLL_PUBLIC wtap_opttype_return_val
1098 WS_DLL_PUBLIC wtap_opttype_return_val
1111 WS_DLL_PUBLIC wtap_opttype_return_val
1122 WS_DLL_PUBLIC wtap_opttype_return_val
1144 typedef gboolean (*wtap_block_foreach_func)(
wtap_block_t block, guint option_id, wtap_opttype_e option_type,
wtap_optval_t *option,
void *user_data);
1145 WS_DLL_PUBLIC gboolean
1146 wtap_block_foreach_option(
wtap_block_t block, wtap_block_foreach_func func,
void* user_data);
Definition: wtap_opttypes.h:331
Definition: inet_ipv6.h:21
Definition: wtap_opttypes.h:375
gchar * filter_str
Definition: wtap_opttypes.h:378
guint bpf_prog_len
Definition: wtap_opttypes.h:380
wtap_bpf_insn_t * bpf_prog
Definition: wtap_opttypes.h:381
Definition: wtap_opttypes.h:350
Definition: wtap_opttypes.h:442
Definition: wtap_opttypes.h:475
Definition: wtap_opttypes.h:406
Definition: wtap_opttypes.h:397
Definition: wtap_opttypes.c:86
Definition: wtap_opttypes.h:360
Definition: wtap_opttypes.h:431
wtap_optval_t value
Definition: wtap_opttypes.h:433
guint option_id
Definition: wtap_opttypes.h:432
Definition: wtap_opttypes.h:251
guint8 * secrets_data
Definition: wtap_opttypes.h:254
guint32 secrets_len
Definition: wtap_opttypes.h:253
Definition: wtap_opttypes.h:288
Definition: wtap_opttypes.h:219
GArray * interface_statistics
Definition: wtap_opttypes.h:227
int tsprecision
Definition: wtap_opttypes.h:222
int wtap_encap
Definition: wtap_opttypes.h:220
Definition: wtap_opttypes.h:242
Definition: wtap_opttypes.h:212
Definition: wtap_opttypes.h:234
Definition: wtap_opttypes.h:197
guint64 section_length
Definition: wtap_opttypes.h:198
Definition: wtap_opttypes.h:414
struct wtapng_meta_event_mandatory_s wtapng_meta_event_mandatory_t
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_remove_option(wtap_block_t block, guint option_id)
Definition: wtap_opttypes.c:1495
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_add_uint8_option(wtap_block_t block, guint option_id, guint8 value)
Definition: wtap_opttypes.c:744
WS_DLL_PUBLIC wtap_block_t wtap_block_make_copy(wtap_block_t block)
Definition: wtap_opttypes.c:549
struct wtapng_section_mandatory_s wtapng_section_mandatory_t
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_get_uint64_option_value(wtap_block_t block, guint option_id, guint64 *value) G_GNUC_WARN_UNUSED_RESULT
Definition: wtap_opttypes.c:848
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_set_nth_bytes_option_value(wtap_block_t block, guint option_id, guint idx, GBytes *value)
Definition: wtap_opttypes.c:1155
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_add_ipv4_option(wtap_block_t block, guint option_id, guint32 value)
Definition: wtap_opttypes.c:861
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_set_uint8_option_value(wtap_block_t block, guint option_id, guint8 value)
Definition: wtap_opttypes.c:757
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_add_nflx_custom_option(wtap_block_t block, guint32 nflx_type, const char *nflx_custom_data, gsize nflx_custom_data_len)
Definition: wtap_opttypes.c:1195
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_get_if_filter_option_value(wtap_block_t block, guint option_id, if_filter_opt_t *value) G_GNUC_WARN_UNUSED_RESULT
Definition: wtap_opttypes.c:1425
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_add_uint64_option(wtap_block_t block, guint option_id, guint64 value)
Definition: wtap_opttypes.c:822
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_add_custom_option(wtap_block_t block, guint option_id, guint32 pen, const char *custom_data, gsize custom_data_len)
Definition: wtap_opttypes.c:1379
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_add_bytes_option_borrow(wtap_block_t block, guint option_id, GBytes *value)
Definition: wtap_opttypes.c:1119
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_set_ipv4_option_value(wtap_block_t block, guint option_id, guint32 value)
Definition: wtap_opttypes.c:874
struct wtapng_if_stats_mandatory_s wtapng_if_stats_mandatory_t
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_get_uint32_option_value(wtap_block_t block, guint option_id, guint32 *value) G_GNUC_WARN_UNUSED_RESULT
Definition: wtap_opttypes.c:809
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_add_uint32_option(wtap_block_t block, guint option_id, guint32 value)
Definition: wtap_opttypes.c:783
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_get_uint8_option_value(wtap_block_t block, guint option_id, guint8 *value) G_GNUC_WARN_UNUSED_RESULT
Definition: wtap_opttypes.c:770
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_set_nth_packet_verdict_option_value(wtap_block_t block, guint option_id, guint idx, packet_verdict_opt_t *value)
Definition: wtap_opttypes.c:1451
WS_DLL_PUBLIC wtap_block_t wtap_block_create(wtap_block_type_t block_type)
Definition: wtap_opttypes.c:334
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_add_bytes_option(wtap_block_t block, guint option_id, const guint8 *value, gsize value_length)
Definition: wtap_opttypes.c:1106
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_add_string_option(wtap_block_t block, guint option_id, const char *value, gsize value_length)
Definition: wtap_opttypes.c:939
struct wtapng_dsb_mandatory_s wtapng_dsb_mandatory_t
struct wtapng_nrb_mandatory_s wtapng_nrb_mandatory_t
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_get_nflx_custom_option(wtap_block_t block, guint32 nflx_type, char *nflx_custom_data, gsize nflx_custom_data_len)
WS_DLL_PUBLIC wtap_block_t wtap_block_ref(wtap_block_t block)
Definition: wtap_opttypes.c:418
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_add_if_filter_option(wtap_block_t block, guint option_id, if_filter_opt_t *value)
Definition: wtap_opttypes.c:1394
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_set_if_filter_option_value(wtap_block_t block, guint option_id, if_filter_opt_t *value)
Definition: wtap_opttypes.c:1407
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, guint option_id, char **value) G_GNUC_WARN_UNUSED_RESULT
Definition: wtap_opttypes.c:1080
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_add_ipv6_option(wtap_block_t block, guint option_id, ws_in6_addr *value)
Definition: wtap_opttypes.c:900
WS_DLL_PUBLIC void wtap_opttypes_initialize(void)
Definition: wtap_opttypes.c:1759
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_get_nth_packet_verdict_option_value(wtap_block_t block, guint option_id, guint idx, packet_verdict_opt_t *value) G_GNUC_WARN_UNUSED_RESULT
Definition: wtap_opttypes.c:1469
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_remove_nth_option_instance(wtap_block_t block, guint option_id, guint idx)
Definition: wtap_opttypes.c:1537
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_set_bytes_option_value(wtap_block_t block, guint option_id, const guint8 *value, gsize value_length)
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_get_ipv6_option_value(wtap_block_t block, guint option_id, ws_in6_addr *value) G_GNUC_WARN_UNUSED_RESULT
Definition: wtap_opttypes.c:926
struct wtapng_if_descr_mandatory_s wtapng_if_descr_mandatory_t
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_set_ipv6_option_value(wtap_block_t block, guint option_id, ws_in6_addr *value)
Definition: wtap_opttypes.c:913
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_set_uint32_option_value(wtap_block_t block, guint option_id, guint32 value)
Definition: wtap_opttypes.c:796
struct wtapng_iface_descriptions_s wtapng_iface_descriptions_t
WS_DLL_PUBLIC void * wtap_block_get_mandatory_data(wtap_block_t block)
Definition: wtap_opttypes.c:286
WS_DLL_PUBLIC wtap_opttype_return_val WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_set_string_option_value(wtap_block_t block, guint option_id, const char *value, gsize value_length)
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_get_nth_bytes_option_value(wtap_block_t block, guint option_id, guint idx, GBytes **value) G_GNUC_WARN_UNUSED_RESULT
Definition: wtap_opttypes.c:1182
WS_DLL_PUBLIC void wtap_block_unref(wtap_block_t block)
Definition: wtap_opttypes.c:431
WS_DLL_PUBLIC void wtap_opttypes_cleanup(void)
Definition: wtap_opttypes.c:2103
WS_DLL_PUBLIC wtap_block_type_t wtap_block_get_type(wtap_block_t block)
Definition: wtap_opttypes.c:281
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_add_string_option_owned(wtap_block_t block, guint option_id, char *value)
Definition: wtap_opttypes.c:953
struct wtapng_ft_specific_mandatory_s wtapng_ft_specific_mandatory_t
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_add_string_option_format(wtap_block_t block, guint option_id, const char *format,...) G_GNUC_PRINTF(3
WS_DLL_PUBLIC void wtap_block_copy(wtap_block_t dest_block, wtap_block_t src_block)
Definition: wtap_opttypes.c:473
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, guint option_id, guint idx, const char *format,...) G_GNUC_PRINTF(4
WS_DLL_PUBLIC void wtap_block_array_free(GArray *block_array)
Definition: wtap_opttypes.c:456
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_get_ipv4_option_value(wtap_block_t block, guint option_id, guint32 *value) G_GNUC_WARN_UNUSED_RESULT
Definition: wtap_opttypes.c:887
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_set_nth_string_option_value(wtap_block_t block, guint option_id, guint idx, const char *value, gsize value_length)
WS_DLL_PUBLIC guint wtap_block_count_option(wtap_block_t block, guint option_id)
Definition: wtap_opttypes.c:559
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_get_bytes_option_value(wtap_block_t block, guint option_id, GBytes **value) G_GNUC_WARN_UNUSED_RESULT
Definition: wtap_opttypes.c:1169
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_set_uint64_option_value(wtap_block_t block, guint option_id, guint64 value)
Definition: wtap_opttypes.c:835
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_add_packet_hash_option(wtap_block_t block, guint option_id, packet_hash_opt_t *value)
Definition: wtap_opttypes.c:1482
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_get_nth_string_option_value(wtap_block_t block, guint option_id, guint idx, char **value) G_GNUC_WARN_UNUSED_RESULT
Definition: wtap_opttypes.c:1093
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_set_string_option_value_format(wtap_block_t block, guint option_id, const char *format,...) G_GNUC_PRINTF(3
WS_DLL_PUBLIC wtap_opttype_return_val wtap_block_add_packet_verdict_option(wtap_block_t block, guint option_id, packet_verdict_opt_t *value)
Definition: wtap_opttypes.c:1438