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

[closed] How to format the value_string

0

Hi,

Iam developing a dissector

i have used value string

          static const value_string fwd_type_vals[]={
           {0x00,    "undefined" },
           { 0x01,    " Info" },
            { 0, NULL }};
   and 
     { &hf_type,
{ "Com Type ", "com_type",FT_UINT8, BASE_HEX, VALS(fwd_type_vals), 0x80, NULL, HFILL }
},</code></pre><p>Iam using Bitmask 0x80 here and when i use to call this i get the output as</p><pre><code>               1... .... = com Type : 0x01 (info)</code></pre><p>How can i format and display only com Type : 0x01 (info) how to trim/remove this</p><pre><code>              1... ....=</code></pre><p>Please help!</p><p>Thanks!</p></div><div id="question-tags" class="tags-container tags"><span class="post-tag tag-link-value_string" rel="tag" title="see questions tagged &#39;value_string&#39;">value_string</span> <span class="post-tag tag-link-format" rel="tag" title="see questions tagged &#39;format&#39;">format</span></div><div id="question-controls" class="post-controls"></div><div class="post-update-info-container"><div class="post-update-info post-update-info-user"><p>asked <strong>04 Jul '14, 03:23</strong></p><img src="https://secure.gravatar.com/avatar/1339589a92af9455063c09e56bfc6299?s=32&amp;d=identicon&amp;r=g" class="gravatar" width="32" height="32" alt="umar&#39;s gravatar image" /><p><span>umar</span><br />

26222427
accept rate: 0%

closed 04 Jul ‘14, 03:47

grahamb's gravatar image

grahamb ♦
19.8k330206

This seems to be the same as your other questions:

Asking the same question multiple times isn't helpful for other users.

(04 Jul '14, 03:47) grahamb ♦

The question has been closed for the following reason “Duplicate Question” by grahamb 04 Jul ‘14, 03:47