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

Wireshark-dev: Re: [Wireshark-dev] Wireshark-dev Digest, Vol 124, Issue 20

From: Rajan Pandey <rajanpan97@xxxxxxxxx>
Date: Wed, 7 Sep 2016 09:02:48 +0530

Hi everyone,
  I am new in open source development , if anyone can guide me .I know c,c++, little bit of php, python,c#,WordPress,jomala.I would be helpful.
Yours
Abhinav Priyadarshi

On Sep 7, 2016 3:17 AM, <wireshark-dev-request@xxxxxxxxxxxxx> wrote:
Send Wireshark-dev mailing list submissions to
        wireshark-dev@xxxxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
        https://wireshark.org/mailman/listinfo/wireshark-dev
or, via email, send a message with subject or body 'help' to
        wireshark-dev-request@wireshark.org

You can reach the person managing the list at
        wireshark-dev-owner@wireshark.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Wireshark-dev digest..."


Today's Topics:

   1. Re: Has anyone created an XDR to Dissector tool? (Richard Sharpe)
   2. Re: Has anyone created an XDR to Dissector tool? (Guy Harris)
   3. Re: Extracting field values in a C post-dissector (Paul Offord)


----------------------------------------------------------------------

Message: 1
Date: Tue, 6 Sep 2016 08:41:45 -0700
From: Richard Sharpe <realrichardsharpe@xxxxxxxxx>
To: Developer support list for Wireshark <wireshark-dev@xxxxxxxxxxxxx>
Subject: Re: [Wireshark-dev] Has anyone created an XDR to Dissector
        tool?
Message-ID:
        <CACyXjPwE5psEWYo4zMxG8580q-cQeS_Kfgz0jqQ2Y_3qcxG-QA@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

On Mon, Sep 5, 2016 at 11:03 PM, Jaap Keuter <jaap.keuter@xxxxxxxxx> wrote:
> Hi,
>
> Having zero knowledge of the original code here?s some remarks anyway.
>
> @@ -364,7 +370,7 @@ open_input (const char *infile, const char *define)
>        if (infile)
> -       addarg (infile);
> +       addarg (infilename);
>        addarg ((char *) NULL);
>
> This must be a general thing then? infile vs. infilename.
>
>
> @@ -1441,6 +1491,7 @@ options_usage (FILE *stream, int status)
> +  f_print (stream, _("-T\t\tgenerate code for a Wireshark dissector\n"));
>
> You meant to say _(?-W\t\tgenerate
>
>
>
> +/*      @(#)rpc_wireshark.c  1.0  16/09/01
> + *
> + * Copyright to be determined ...
> + *
> + * rpc_wireshark.h, Definitions for the generation of a wireshark
> + * dissector in rpcgen
> + */
>
> You probably meant to say rpc_wireshark.c, Functions for the generation of a wireshark dissector in rpcgen
>
>
>
>
> +" * GENERATED BY RPCGEN. DO NOT DO SERIOUS EDITS.\n"
>
> You might want to add a line stating the Wireshark release (2.0, 2.2, or other) this code is generated for, since the used APIs / includes may depend on it and they may change in the future.

Thanks for those. Yeah, about that last one, while they look pretty
stable, they might change.

I have approached someone on the glibc team about taking the patch,
but they might also not be interested because of potential future
changes to Wireshark, so will have to play that by ear.

If that is the case, perhaps we can add rpcgen (and the source) to
Wireshark as a tool.

--
Regards,
Richard Sharpe
(??????????--??)


------------------------------

Message: 2
Date: Tue, 6 Sep 2016 11:09:05 -0700
From: Guy Harris <guy@xxxxxxxxxxxx>
To: Developer support list for Wireshark <wireshark-dev@xxxxxxxxxxxxx>
Subject: Re: [Wireshark-dev] Has anyone created an XDR to Dissector
        tool?
Message-ID: <B41B1CA7-5A8B-4EFF-88E1-253CDCFAB3D8@xxxxxxxxxxxx>
Content-Type: text/plain; charset=us-ascii

On Sep 6, 2016, at 8:41 AM, Richard Sharpe <realrichardsharpe@xxxxxxxxx> wrote:

> If that is the case, perhaps we can add rpcgen (and the source) to
> Wireshark as a tool.

We should do that in any case; 1) it's not clear that a Wireshark dissector generator belongs in glibc and 2) not all systems on which people might want to generate a dissector use glibc.

------------------------------

Message: 3
Date: Tue, 6 Sep 2016 21:47:04 +0000
From: Paul Offord <Paul.Offord@xxxxxxxxxxxx>
To: Developer support list for Wireshark <wireshark-dev@xxxxxxxxxxxxx>
Subject: Re: [Wireshark-dev] Extracting field values in a C
        post-dissector
Message-ID:
        <69CB24EC39368E438FFE300C1813C5[email protected].local>
Content-Type: text/plain; charset="utf-8"

I?ve made some progress.  I traced MATE and looked at how it registers its post-dissector.  I now get a tree on the 1st scan.  I?ll write up some notes on C post-dissectors when I get something that works.

Best regards?Paul

From: wireshark-dev-bounces@wireshark.org [mailto:wireshark-dev-bounces@wireshark.org] On Behalf Of Paul Offord
Sent: 05 September 2016 23:12
To: Developer support list for Wireshark <wireshark-dev@xxxxxxxxxxxxx>
Subject: Re: [Wireshark-dev] Extracting field values in a C post-dissector

I've hit a problem.  WS scans the trace file twice.  I need access to protocol fields (e.g. tcp.len and smb2.ses_id) during the first scan.

Unfortunately with the C postdissector the tree value passed during the first scan is NULL.  During the second scan I do get the tree.

I guess the LUA code uses the proto_tree_prime_hfid() outlined below.

Any suggestions how I move forward gratefully accepted.

Sent from Samsung Mobile on O2

-------- Original message --------
From: Guy Harris
Date:05/09/2016 03:59 (GMT+00:00)
To: Developer support list for Wireshark
Subject: Re: [Wireshark-dev] Extracting field values in a C post-dissector

On Aug 22, 2016, at 6:40 AM, Pascal Quantin <pascal.quantin@xxxxxxxxx<mailto:pascal.quantin@gmail.com>> wrote:

> By having a quick look at the code, I *think* you will want first to retrieve the hfindex of a given field by using proto_registrar_get_id_byname(), then mark it as "interesting" with proto_tree_prime_hfid()

...which you have to do before the dissection starts.

Unfortunately, you can't do that in a post-dissector.

So...

> aOr a cll to proto_find_finfo() should work also without the need to prime the field, but should be slower according to the comments in proto.h.

...you might have to do it that way, instead.
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx<mailto:wireshark-dev@wireshark.org>>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@wireshark.org?subject=unsubscribe

______________________________________________________________________

This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.

Any views or opinions expressed are solely those of the author and do not necessarily represent those of Advance Seven Ltd. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.

Advance Seven Ltd. Registered in England & Wales numbered 2373877 at Endeavour House, Coopers End Lane, Stansted, Essex CM24 1SJ

______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________

______________________________________________________________________

This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.

Any views or opinions expressed are solely those of the author and do not necessarily represent those of Advance Seven Ltd. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.

Advance Seven Ltd. Registered in England & Wales numbered 2373877 at Endeavour House, Coopers End Lane, Stansted, Essex CM24 1SJ

______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.wireshark.org/lists/wireshark-dev/attachments/20160906/b36bcd02/attachment.html>

------------------------------

_______________________________________________
Wireshark-dev mailing list
Wireshark-dev@xxxxxxxxxxxxx
https://wireshark.org/mailman/listinfo/wireshark-dev


End of Wireshark-dev Digest, Vol 124, Issue 20
**********************************************