Take the 2-minute tour ×
Network Engineering Stack Exchange is a question and answer site for network engineers. It's 100% free, no registration required.

I was playing with Wireshark and noticed two filters: tcp.len and tcp.data. What is the difference between the two? As far as I know, the tcp.len (length) field tells how many bytes of data travel within a segment, correct?

thanks in advance :)

share|improve this question

1 Answer 1

up vote 5 down vote accepted

Simply put, tcp.len filters the length of TCP segment data in bytes, while tcp.data (or tcp.segment_data in newer versions of Wireshark) filters for the actual data (sequence of bytes) within the TCP segment data.

Example:

  • tcp.len == 1
    • Filters for TCP segment data that is exactly 1 byte in length

  • tcp.segment_data contains 49:27:6d:20:64:61:74:61
    • Filters for TCP segment data that contains the hexadecimal sequence of 49:27:6d:20:64:61:74:61

Quick reference for TCP filters

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.