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] Extracting a GUID as a string from a TVB, SMB2 Extra Create Para

From: Richard Sharpe <realrichardsharpe@xxxxxxxxx>
Date: Sat, 4 Oct 2014 14:17:08 -0700
Hi folks,

I have come across a case where an Extra Create Parameter's TAG for a
CREATE request is a GUID. This is like things like DH2C (Durable
Handles V2) but it is for SHVXD, the crazy VHD over SMB2 stuff.

The tag is a GUID.

In dissect_smb2_olb_string, or something like it, I want to extract
the GUID as a string, eg "9ECFCB9C-04C1-980E-..." and use that to look
up the dissection routines ... [1]

How do I extract such as a string?

[1] Curiously there seems to be an example of such already in the form
of APP_INSTANCE stuff, but it seems like the tag is encoded in that
case in the string form of a GUID. In the SHVX case, it is a binary
GUID. Sigh.

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)