Wireshark-dev: [Wireshark-dev] How to extend value_string arrays?

From: Alex Lindberg <alindber@xxxxxxxxx>
Date: Tue, 7 Jul 2009 10:46:52 -0700 (PDT)
I am creating an extended protocol plugin that requires extending a value_string array that exists in epan/dissectors/packet-foo.c file defined like:

static const value_string foo_name_vals[] = {
  {  0, "Foo Name 1" },
  {  1, "Foo Name 2" },
  {  2, "Foo Name 3" },
  {  0, NULL }
};

This array is used as field names when decoding protocol foo.  What I would like to do in my plugin is to extend the array foo_name_vals[] by adding additional elements.

Any suggestions?

Thanks as always
Alex Lindberg