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


I have written a dissector that works on top of the Space Packet protocol (packet-ccsds) that at the same time works on top UDP in my application. My question is: As the protocol is not working neither on top of UDP nor on TCP how should I code the protocol registration in this case? More specifically, how should be the "proto_reg_handoff" routine?

This routine for CCSDS is the following:

dissector_add_handle ( "udp.port", find_dissector("ccsds") ); /* for 'decode as' */
data_handle = find_dissector("data");}

But as this protocol works on top of CCSDS I do not know how to modify it.

Thank you!

asked 16 Jul '13, 00:59

Juan_Kash's gravatar image

accept rate: 0%

I have no idea how CCSDS works but how does the actual protocol stack find the next protocol to hand off to? You will have to add code to the CCSDS dissector to hand of to the next protocol either by a preferense or by adding a register table where sub dissector can register or some other method.(register_dissector_table())

permanent link

answered 16 Jul '13, 01:26

Anders's gravatar image

Anders ♦
accept rate: 17%

Thank you for the answer! I added a register table to ccsds:

ccsds_dissector_table = register_dissector_table("ccsds.apid", "CCSDS apid", FT_UINT16, BASE_DEC);

And also modify the proto_reg_handoff of my protocol this way:

void proto_reg_handoff_cfdp(void) { dissector_handle_t cfdp_handle; cfdp_handle = create_dissector_handle(dissect_cfdp, proto_cfdp);
dissector_add_uint("ccsds.apid", 2045, cfdp_handle); }

I can see it in the menu Internal-> Dissector tables but still does not work. By doing it this way the protocol is supposed to be dissected automatically or do I have to use the menu Decode as...?

(16 Jul '13, 05:00) Juan_Kash

In the CCDSDS dissector do you use the dissector table to call the "next" dissetor for the payload? Something like this from the GTP dissector: if (length > 2) { next_tvb = tvb_new_subset(tvb, offset, length-2, length-2); if(!dissector_try_uint(gtp_priv_ext_dissector_table, ext_id, next_tvb, pinfo, ext_tree_priv_ext)){ proto_tree_add_item(ext_tree_priv_ext, hf_gtp_ext_val, tvb, offset, length - 2, ENC_NA); } }

(16 Jul '13, 05:06) Anders ♦

Ok, now the protocol gets called from CCSDS. Thank you!

(16 Jul '13, 08:04) Juan_Kash

If an answer has solved your issue, please accept the answer for the benefit of other users by clicking the checkmark icon next to the answer. Please read the FAQ for more information.

(16 Jul '13, 08:06) grahamb ♦
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: 16 Jul '13, 00:59

question was seen: 2,097 times

last updated: 16 Jul '13, 08:06

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