Wireshark-dev: Re: [Wireshark-dev] Has anyone created an XDR to Dissector tool?
From: Richard Sharpe <[email protected]>
Date: Thu, 1 Sep 2016 17:32:37 -0700
On Thu, Sep 1, 2016 at 10:04 AM, Richard Sharpe
<[email protected]> wrote:
> On Thu, Sep 1, 2016 at 4:41 AM, Guy Harris <[email protected]> wrote:
>> On Aug 31, 2016, at 3:19 PM, Richard Sharpe <[email protected]> wrote:
>>
>>> Has anyone written a tool that can go from XDR to a dissector?
>>>
>>> If not, I can give it a try.
>>
>> One possibility would be to take rpcgen:
>>
>>         https://svnweb.freebsd.org/base/head/usr.bin/rpcgen/
>>
>> and modify it to generate dissector source - rpcgen takes a description of an ONC RPC protocol, so it might need to be tweaked to handle XDR without the rest of RPC.
>
> Great, thanks to both Guy and Jaap for their suggestions. I also
> looked at PLY (http://www.dabeaz.com/ply/ply.html) but that seems to
> involve a fair amount of work and would be similar to the approach I
> took with the SMB dissector a long time ago.
>
> I will look at both of those and see which will be easier of the three
> approaches I have so far.
>
> Modifying a version of rpcgen has some attraction since it means that
> the same tool can be used to generate a Wireshark dissector as is used
> to generate the stubs etc.

OK, so it looks like modifying rpcgen is going to be the fastest. It
has pretty much all I need, I just need to add a function or two ...

I could have something that works in a couple of days. I am using
glibc's version ... wonder if I could get it accepted upstream.

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