First time here? Check out the FAQ!
THIS IS A TEST INSTANCE. Feel free to ask and answer questions, but take care to avoid triggering too many notifications.
0

why field -e http.next_request_in in tshark see empty string?

  • retag add tags

while using tshark on windows with following command for -e http.next_request_in, I see empty string. while using the GUI I see the next request.

Command: "tshark -r example.pcapng -Y http -T fields -e http.next_request_in".

secondaviv's avatar
3
secondaviv
asked 2021-09-20 22:14:13 +0000
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

1

(example capture is sctp-www.cap from the Wireshark Wiki Sample Captures)

By default, tshark (man page) makes a single pass through the capture so it can see the current packet and into the past.

$ tshark -r ./sctp-www.cap -Y http -T fields -e frame.number -e http.request_in
5
7       5
16
21
22      21
27
29      27
50
65
68

Output can be limited to only frames that contain the fields we're interest in:

$ tshark -r ./sctp-www.cap -Y http.request_in -T fields -e frame.number -e http.request_in
7       5
22      21
29      27


To look into the future, tshark needs to make two passes through the capture file:

-2
Perform a two-pass analysis. This causes tshark to buffer output until the entire first pass is done, but allows it to fill in fields that require future knowledge, such as 'response in frame #' fields. Also permits reassembly frame dependencies to be calculated correctly.

Single pass

$ tshark -r ./sctp-www.cap -Y http.next_request_in -T fields -e frame.number -e http.next_request_in
$

Add -2 option for two-pass processing

$ tshark -2 -r ./sctp-www.cap -Y http.next_request_in -T fields -e frame.number -e http.next_request_in
5       21
7       21
Chuckc's avatar
3k
Chuckc
answered 2021-09-21 04:00:29 +0000
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer