Ask Your Question
0

Can I automatically fill a value_string array?

asked 2019-01-16 09:17:51 +0000

MaxiKoh95 gravatar image

updated 2019-01-16 13:15:46 +0000

cmaynard gravatar image

Hey Guys, I want to write a dissector for eCPRI. In this protocol you find some byte-fields, which are reserved. Is it possible to fill a value_string array?

static const value_string reset_coding[] = {
    { 0x00, "Reserved" },
    { 0x01, "Remote reset request" },
    { 0x02, "Remote reset response" },
    { 0x03, "Remote Request" },
    { 0x04, "Remote request with Follow_Up" },
    { 0x05, "Follow_Up" },
    { 0x06, "Reserved" },
    { 0x07, "Reserved" },
    { 0x08, "Reserved" },
    { 0x09, "Reserved" },
    { 0x0A, "Reserved" },
    { 0x0B, "Reserved" },
    { 0x0C, "Reserved" },
    { 0x0D, "Reserved" },
    { 0x0E, "Reserved" },
    { 0x0F, "Reserved" }, // to 0xFF
    //...
    { 0xFF, "Reserved" },
    { 0, NULL}

};

Thanks a lot!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-01-16 11:04:08 +0000

Pascal Quantin gravatar image

For this kind of arrays, you might be interested by range_string rather than value_string. See doc/README.dissector for more details.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-01-16 09:17:51 +0000

Seen: 559 times

Last updated: Jan 16 '19