ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] bytes

Date: Tue, 8 Jan 2008 18:32:25 +0530
While trying to write a protocol dissector for a pseudo protocol , I
used this and it did work.
The packet (generated manually using text2pcap) had data in hex , and
the field value in the display was also getting displayed in hex . So I
did not do any special formatting for it .I think due to the FT_BYTES,
the data is simply displayed as hex.



-----Original Message-----
From: wireshark-dev-bounces@xxxxxxxxxxxxx
[mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of bijjou2000
Sent: Tuesday, January 08, 2008 6:22 PM
To: wireshark-dev
Subject: Re: [Wireshark-dev] bytes

thanks for your help, but with proto_tree_add_item is formatting not
possible.  and i muss display it with a 0x......... form.




> De: <jaiswal.vikash@xxxxxxxxx>
> A: <wireshark-dev@xxxxxxxxxxxxx>
> Objet: Re: [Wireshark-dev] bytes
> Date: Tue, 8 Jan 2008 18:09:39 +0530

> You may try the following
>
>
> proto_tree_add_item(xxx_tree, hf_xxx_abc,parameter_tvb, param_offset,
> 9, FALSE);
>
>
> { &hf_xxx_abc,
>    {    "ABC",      "xxx.abc",      FT_BYTES,       BASE_DEC,
> NULL,   0x0,    "",     HFILL }},
>
> Hopefully the above will help you display the 9 bytes .
>
>
> -----Original Message-----
> From: <a
> href=mailto:"wireshark-dev-bounces@xxxxxxxxxxxxx";>wireshark-dev-bounce
> s@xxxxxxxxxxxxx</a> [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On
> Behalf Of bijjou2000
> Sent: Tuesday, January 08, 2008 5:58 PM
> To: wireshark-dev
> Subject: [Wireshark-dev] bytes
>
> hi I want spend a 9 bytes address as a hex value (0x. ....) , I tried
> as follows; proto_tree_add_bytes_format_value(lon_tree, hf_unicast,
> tvb, offset,9,lon_unicast,"0xX",lon_unicast); { &hf_unicast, {
> "Unicast", "lon.Unicast", FT_BYTES, BASE_HEX ,NULL, 0x0, "unicast",
> HFILL } }, i don't know what kind of tvb_get_xxx funktion ,is usefull
> . they unfortunately do I get an error. Do not know why! I would be
> grateful for your help. bijjou
>
>
>
> The information contained in this electronic message and any
> attachments to this message are intended for the exclusive use of the
> addressee(s) and may contain proprietary, confidential or privileged
> information. If you are not the intended recipient, you should not
> disseminate, distribute or copy this e-mail. Please notify the sender
> immediately and destroy all copies of this message and any
attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient
> should check this email and any attachments for the presence of
viruses.
> The company accepts no liability for any damage caused by any virus
> transmitted by this email.
>
> www.wipro.com
>
> _______________________________________________
> Wireshark-dev mailing list
> <a
> href=mailto:"Wireshark-dev@xxxxxxxxxxxxx";>Wireshark-dev@xxxxxxxxxxxxx<
> /a>
> <a target="_blank"
> href='http://www.wireshark.org/mailman/listinfo/wireshark-dev'>http://
> www.wi reshark.org/mailman/listinfo/wireshark-dev</a>


The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com