This is our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

I want to list the start of every TCP connection on a pcap file.

I know that in order to detect the end of the connection I can use this filter tcp.flags.fin eq 1 or tcp.flags.reset eq 1, because when a TCP connection is closed, the FIN flag or the RST flag are set.

But I can't seem to find what flags are set when a TCP connection is started.

Can anyone help me?

asked 08 Apr '16, 10:47

twistedx's gravatar image

twistedx
11225
accept rate: 0%

edited 08 Apr '16, 10:48


tcp.flags.syn==1

permanent link

answered 08 Apr '16, 11:02

Jim%20Aragon's gravatar image

Jim Aragon
7.2k733118
accept rate: 24%

Thank you!

(08 Apr '16, 11:08) twistedx

That filter will show the first two packets of the TCP handshake. Perhaps better, the following filter will show only the first packet of the handshake, the one that is actually requesting that a connection be established:

tcp.flags.syn==1 && tcp.flags.ack==0

(09 Apr '16, 18:49) Jim Aragon
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×1,620
×752
×349

question asked: 08 Apr '16, 10:47

question was seen: 16,876 times

last updated: 09 Apr '16, 18:49

p​o​w​e​r​e​d by O​S​Q​A