Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: [Wireshark-dev] Related Information (again)

From: "Graeme Lunt" <graeme.lunt@xxxxxxxxx>
Date: Sat, 23 Sep 2006 17:27:15 +0200
Hi,

Attached is a new version of the related information functionality I had
previously submitted (back in May).
I thought I would ask for comments before checking it in this time! 8^)

It adds a new menu item "Related Information" and provides a generic
mechanism to register related information for:
* a specific hf_index - register_related_hfid_callback()
* a range of hf_indexes (e.g. "owned" by a given dissector) -
register_related_range_callback() 
and 
* a type e.g. FT_OID - register_related_type_callback();
In addition, a new FI_URL flag has been defined to mark a field as a URL,
together associated macros - e.g. PROTO_ITEM_SET_URL().

This patch shows three different "related information" handlers:
(use the x509-with-logo.cap example capture (packet 2 - Handshake Protocol:
Certificate) to view these)

URL:
The logotypeURI_item has been marked as FI_URL and can be opened in a
browser (e.g. showing the logo)
The uniformResourceIdentifier in a GeneralName has been marked as a FI_URL
(e.g. can be used to download the CRL from the CRLDP)

OID:
All fields of type FT_OID can bring up the Harald Alvestrand web page (e.g.
certificatePolicies 2.5.29.32).
The actual template URL can be configured on the BER preferences page (may
be moved later). It is a text field (rather than option menu) for those with
no Internet connection, or prefer the elibel site.

ASN.1 Modules:
Fields of type "x509.*" can be referenced in the associated ASN.1 module
(usually on the ITU web site) - (e.g. certificate "validity"). Again,
configuration is a text field for those with no Internet connection. 
All asn2wrs generated dissectors that use modules hosted on the ITU site can
use this mechanism.

[NOTE: This patch changes prefs.c as it does not allow a '#' character in a
preference value (it treats everything after the '#' as a comment). Some of
the template URLs that are used in the above contain a '#' character. Is
there a reason for this behaviour in prefs.c?]

At the moment, only a single related page can be brought up, but I have
played with a dialog for if/when there are multiple hits.

Other people should be able to add further related information for their
fields using this mechanism.

Hopefully this is a cleaner and more acceptable mechanism than last time. 
If it is, I will check it in.

Comments?

Graeme


Attachment: relatedII.patch
Description: Binary data