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

So with the custom protocol I'm writing there are a lot of properties that need to be added to the hf array.

I was wondering if it's possible to add items to it as I'm parsing the packet. That is, not every packet will have a header for every single property so I would only add the ones that are present.

asked 14 Feb '11, 15:13

Rodayo's gravatar image

Rodayo
61111115
accept rate: 0%

edited 14 Feb '11, 15:14


The short answer: All the needed hf[] entries should be specified in the proto_register function.

Even it might be possible to do late registration, I don't think anything is really gained and your code would definitely be more complex.

permanent link

answered 14 Feb '11, 22:46

Bill%20Meier's gravatar image

Bill Meier ♦♦
3.2k1850
accept rate: 17%

Actually, I looked at packet-http.c and it looked like that file was doing just what I was proposing. I followed it as a guideline and it seems to have worked without any problems. Thanks anyways =]

(15 Feb '11, 11:11) Rodayo
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:

×6
×6
×3

question asked: 14 Feb '11, 15:13

question was seen: 1,416 times

last updated: 15 Feb '11, 11:11

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