Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
pcapng-netflix-custom.h
Go to the documentation of this file.
1
10#ifndef WTAP_PCAPNG_NETFLIX_CUSTOM_H
11#define WTAP_PCAPNG_NETFLIX_CUSTOM_H
12
13#ifdef __cplusplus
14extern "C" {
15#endif /* __cplusplus */
16
17/*
18 * Netflix custom blocks and options.
19 *
20 * https://www.iana.org/assignments/enterprise-numbers/enterprise-numbers
21 */
22#define PEN_NFLX 10949
23
24/*
25 * Netflix BBLog custom block types.
26 */
27#define NFLX_BLOCK_TYPE_EVENT 1
28#define NFLX_BLOCK_TYPE_SKIP 2
29
30/*
31 * Mandatory data for a Netflix WTAP_BLOCK_CUSTOM.
32 */
33typedef struct nflx {
34 uint32_t type; /* block type */
35 uint32_t skipped; /* Used if type == NFLX_BLOCK_TYPE_SKIP */
37
38#define NFLX_OPT_TYPE_VERSION 1
39#define NFLX_OPT_TYPE_TCPINFO 2
40#define NFLX_OPT_TYPE_DUMPINFO 4
41#define NFLX_OPT_TYPE_DUMPTIME 5
42#define NFLX_OPT_TYPE_STACKNAME 6
43
44/* Flags used in tlb_eventflags */
45#define NFLX_TLB_FLAG_RXBUF 0x0001 /* Includes receive buffer info */
46#define NFLX_TLB_FLAG_TXBUF 0x0002 /* Includes send buffer info */
47#define NFLX_TLB_FLAG_HDR 0x0004 /* Includes a TCP header */
48#define NFLX_TLB_FLAG_VERBOSE 0x0008 /* Includes function/line numbers */
49#define NFLX_TLB_FLAG_STACKINFO 0x0010 /* Includes stack-specific info */
50
51/* Flags used in tlb_flags */
52#define NFLX_TLB_TF_REQ_SCALE 0x00000020 /* Sent WS option */
53#define NFLX_TLB_TF_RCVD_SCALE 0x00000040 /* Received WS option */
54
55/* Values of tlb_state */
56#define NFLX_TLB_TCPS_ESTABLISHED 4
57#define NFLX_TLB_IS_SYNCHRONIZED(state) (state >= NFLX_TLB_TCPS_ESTABLISHED)
58
59/*
60 * DO NOT USE sizeof (struct nflx_tcpinfo) AS THE SIZE OF THE CUSTOM
61 * OPTION DATA FOLLOWING THE TYPE. This structure has 64-bit integral
62 * type values in it, but the sum of the sizes of the elements plus
63 * internal padding is *not* a multiple of 8, so, on a platform
64 * on which 64-bit integral type values are aligned on an 8-byte
65 * boundary - i.e., on all 64-bit platforms on which we run,
66 * probably meaning on the majority of machines on which Wireshark
67 * is run these days, especially given that we don't support 32-bit
68 * Windows or macOS any more - it will have 4 bytes of unnamed padding
69 * at the end.
70 *
71 * The custom option data in capture files does *not* necessarily include
72 * the unnamed padding.
73 */
74#define OPT_NFLX_TCPINFO_SIZE 268U
75
77 uint64_t tlb_tv_sec;
78 uint64_t tlb_tv_usec;
79 uint32_t tlb_ticks;
80 uint32_t tlb_sn;
81 uint8_t tlb_stackid;
82 uint8_t tlb_eventid;
83 uint16_t tlb_eventflags;
84 int32_t tlb_errno;
85 uint32_t tlb_rxbuf_tls_sb_acc;
86 uint32_t tlb_rxbuf_tls_sb_ccc;
87 uint32_t tlb_rxbuf_tls_sb_spare;
88 uint32_t tlb_txbuf_tls_sb_acc;
89 uint32_t tlb_txbuf_tls_sb_ccc;
90 uint32_t tlb_txbuf_tls_sb_spare;
91 int32_t tlb_state;
92 uint32_t tlb_starttime;
93 uint32_t tlb_iss;
94 uint32_t tlb_flags;
95 uint32_t tlb_snd_una;
96 uint32_t tlb_snd_max;
97 uint32_t tlb_snd_cwnd;
98 uint32_t tlb_snd_nxt;
99 uint32_t tlb_snd_recover;
100 uint32_t tlb_snd_wnd;
101 uint32_t tlb_snd_ssthresh;
102 uint32_t tlb_srtt;
103 uint32_t tlb_rttvar;
104 uint32_t tlb_rcv_up;
105 uint32_t tlb_rcv_adv;
106 uint32_t tlb_flags2;
107 uint32_t tlb_rcv_nxt;
108 uint32_t tlb_rcv_wnd;
109 uint32_t tlb_dupacks;
110 int32_t tlb_segqlen;
111 int32_t tlb_snd_numholes;
112 uint32_t tlb_flex1;
113 uint32_t tlb_flex2;
114 uint32_t tlb_fbyte_in;
115 uint32_t tlb_fbyte_out;
116 uint8_t tlb_snd_scale:4,
117 tlb_rcv_scale:4;
118 uint8_t _pad[3];
119
120 /* The following fields might become part of a union */
121 uint64_t tlb_stackinfo_bbr_cur_del_rate;
122 uint64_t tlb_stackinfo_bbr_delRate;
123 uint64_t tlb_stackinfo_bbr_rttProp;
124 uint64_t tlb_stackinfo_bbr_bw_inuse;
125 uint32_t tlb_stackinfo_bbr_inflight;
126 uint32_t tlb_stackinfo_bbr_applimited;
127 uint32_t tlb_stackinfo_bbr_delivered;
128 uint32_t tlb_stackinfo_bbr_timeStamp;
129 uint32_t tlb_stackinfo_bbr_epoch;
130 uint32_t tlb_stackinfo_bbr_lt_epoch;
131 uint32_t tlb_stackinfo_bbr_pkts_out;
132 uint32_t tlb_stackinfo_bbr_flex1;
133 uint32_t tlb_stackinfo_bbr_flex2;
134 uint32_t tlb_stackinfo_bbr_flex3;
135 uint32_t tlb_stackinfo_bbr_flex4;
136 uint32_t tlb_stackinfo_bbr_flex5;
137 uint32_t tlb_stackinfo_bbr_flex6;
138 uint32_t tlb_stackinfo_bbr_lost;
139 uint16_t tlb_stackinfo_bbr_pacing_gain;
140 uint16_t tlb_stackinfo_bbr_cwnd_gain;
141 uint16_t tlb_stackinfo_bbr_flex7;
142 uint8_t tlb_stackinfo_bbr_bbr_state;
143 uint8_t tlb_stackinfo_bbr_bbr_substate;
144 uint8_t tlb_stackinfo_bbr_inhpts;
145 uint8_t tlb_stackinfo_bbr_ininput;
146 uint8_t tlb_stackinfo_bbr_use_lt_bw;
147 uint8_t tlb_stackinfo_bbr_flex8;
148 uint32_t tlb_stackinfo_bbr_pkt_epoch;
149
150 uint32_t tlb_len;
151};
152
153/*
154 * This is 208 bytes long, and that's a multiple of 8, so the padding
155 * problem that struct nflx_tcpinfo has doesn't appear here.
156 */
158 uint32_t tlh_version;
159 uint32_t tlh_type;
160 uint64_t tlh_length;
161 uint16_t tlh_ie_fport;
162 uint16_t tlh_ie_lport;
163 uint32_t tlh_ie_faddr_addr32[4];
164 uint32_t tlh_ie_laddr_addr32[4];
165 uint32_t tlh_ie_zoneid;
166 uint64_t tlh_offset_tv_sec;
167 uint64_t tlh_offset_tv_usec;
168 char tlh_id[64];
169 char tlh_reason[32];
170 char tlh_tag[32];
171 uint8_t tlh_af;
172 uint8_t _pad[7];
173};
174
175#ifdef __cplusplus
176}
177#endif /* __cplusplus */
178
179#endif /* WTAP_PCAPNG_NETFLIX_CUSTOM_H */
Definition pcapng-netflix-custom.h:157
Definition pcapng-netflix-custom.h:76
Definition pcapng-netflix-custom.h:33