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

The proto_tree_add_item displays each filter in a newline in the CLI. Is there a way to display the filters in the same line.


    proto_tree_add_uint(tree, hf_s1, tvb, 0, 1, s1);    
    proto_tree_add_uint(tree, hf_s2, tvb, 0, 1, s2);

I want them to be s1 and s2 to be displayed in the same line as

    s1 : 12,  s2 : 13

rather than

   s1 : 12
   s2 : 13

asked 28 Sep '15, 04:03

samprit's gravatar image

accept rate: 0%

edited 30 Sep '15, 03:01

Not for a filter (I think you actually mean an hf item). The text for each entry can be built from multiple packets in the frame, or synthesise out of thin air if you wish though.

permanent link

answered 28 Sep '15, 07:38

grahamb's gravatar image

grahamb ♦
accept rate: 22%

Yes, I meant an hf item. How to display different hf items in the same line in CLI.

(28 Sep '15, 07:46) samprit

The only way to display multiple fields on the same line is to use the -T fields option to TShark, for example

tshark -r inputfile -T fields -e ip.src -e ip.dst -e ip.ttl

which will show the IPv4 source address, destination address, and TTL on the same line. If any of those fields are missing, it will show a blank, so, for example, non-IPv4 packets will show a blank line.

permanent link

answered 28 Sep '15, 14:32

Guy%20Harris's gravatar image

Guy Harris ♦♦
accept rate: 19%

Your answer
toggle preview

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 28 Sep '15, 04:03

question was seen: 1,691 times

last updated: 30 Sep '15, 03:01

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