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

Hi

I have a requirement in which enums are defined from 1 to 225, but the problem of here is 1 to 10 enum strings are different and from 11 to 225 are same.

const value_string Fields_Emun_validate_Errors[] = { { 0, "Port_Error" }, { 1, "IP_Error" }, { 2, "Stack_Error" }, { 3, "Val_Error" }, { 4, "range_Error" },.. .. .. { 11, "Field Error" },.. .. .. { 225, "Field Erro" }, };

Should we need to write for 11 to 225 or else any range is allowed ?

asked 17 May '16, 06:07

Dinesh%20Babu%20Sadu's gravatar image

Dinesh Babu ...
16131517
accept rate: 0%

edited 17 May '16, 07:07

grahamb's gravatar image

grahamb ♦
19.8k330206


Hi,

given your description you should use a range_string array instead of value_string array. Please have a look at doc/README.dissector document, more specifically the chapter 1.5 and "ranges" section.

permanent link

answered 17 May '16, 06:14

Pascal%20Quantin's gravatar image

Pascal Quantin
5.5k1060
accept rate: 30%

Thanks Pascal, It worked for me.

(17 May '16, 07:16) Dinesh Babu ...
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
×78
×7
×1

question asked: 17 May '16, 06:07

question was seen: 1,227 times

last updated: 17 May '16, 07:16

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