Re: [Wireshark-dev] How to recognize that live capture is running?

2021-04-20 Thread chuck c
Are you looking to copy the state of the Stop Capture button on the main
toolbar?
https://www.wireshark.org/docs/wsug_html_chunked/ChUseMainToolbarSection.html

On Tue, Apr 20, 2021 at 1:39 PM Jirka Novak  wrote:

> Hi,
>
>   I need to show a button in a dialog just in case that live capture is
> running, but I'm not able to find how to get this information.
>   I'm able to get information about change of state during e.g. closing
> capture, but not get current state.
>   Can anyone advice me, how to get current status?
>
> Best regards,
>
> Jirka Novak
> ___
> Sent via:Wireshark-dev mailing list 
> Archives:https://www.wireshark.org/lists/wireshark-dev
> Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
>  mailto:wireshark-dev-requ...@wireshark.org
> ?subject=unsubscribe
___
Sent via:Wireshark-dev mailing list 
Archives:https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
 mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe

Re: [Wireshark-dev] still unclear how to build a new ASN.1-based dissector

2021-04-20 Thread Vincent Randal
Wait! I've overlooked the Wireshark documentation of all things. I will
check there.
https://www.wireshark.org/docs/wsdg_html_chunked/ChapterTests.html

and a couple other places might have clues
https://github.com/wireshark/happy-shark
https://tewarid.github.io/2018/02/27/regression-test-a-wireshark-dissector-using-tshark.html


On Tue, Apr 20, 2021 at 2:47 PM Vincent Randal  wrote:

> Hello,
>
> Anders, thank you. I think I've finally got the separate "generate" and
> "compile" steps clear now. Thank you.
>
> What I think remains is regression testing. Yes? No? For a new dissector
> should there be entry in some file (somewhere) that tells the build tools
> what to test (if anything) regarding a new dissector in the asn1 directory?
>
> I've been digging around a bit in the source files and I have not yet made
> sense of how regression testing (or any testing) is done, or even if it
> applies to dissectors let alone a new dissector.
>
> Vincent Randal
>
> On Mon, Apr 19, 2021 at 12:52 AM Anders Broman via Wireshark-dev <
> wireshark-dev@wireshark.org> wrote:
>
>> Hi,
>>
>> Perhaps a misconception here, the generated files are part of the source
>> tree currently so when you change any of the files in the
>>
>> ../asn1/foo directory you need to run make foo and check in the generated
>> .c and optionally .h file.
>>
>>
>>
>> So on the very first round add the directory and files in the /foo
>> directory DO NOT change cmake for the generated files yet
>>
>> Run cmake to have the cmake files generated needed to generate asn1
>> dissectors.
>>
>> Run make foo
>>
>> You should now have generated .c and possibly .h files in your src dir
>>
>> Check them in and update the cmake files to include the f´generated .c .h
>> files
>>
>> Run make to have them built
>>
>>
>>
>> Best regards
>>
>> Anders
>>
>>
>>
>> *From:* Wireshark-dev  *On Behalf
>> Of *Vincent Randal
>> *Sent:* den 19 april 2021 05:06
>> *To:* Developer support list for Wireshark 
>> *Subject:* Re: [Wireshark-dev] still unclear how to build a new
>> ASN.1-based dissector
>>
>>
>>
>> CORRECTION:  I omitted the troublesome steps (underlined) when describing
>> the problem:
>>
>> git clone https:// wireshark
>>
>> cd wireshark
>>
>> git checkout wireshark-3.4.4
>>
>> cd wireshark/epan/dissectors
>>
>> *cp ~/myfoo.tgz . #copy dissector code into wireshark clone*
>>
>> *tar xvf myfoo.tgz #extract the dissector code (details in previous
>> email)*
>>
>> cd ../../..
>>
>> mkdir build
>>
>> cd build
>>
>> cmake ../wireshark #this step worked previously but not on a fresh
>> wireshark clone now
>>
>> make asn1 #with relevant entries in two CMakeListsCustom files
>>
>> make
>>
>>
>>
>> On Sun, Apr 18, 2021 at 8:15 PM Vincent Randal 
>> wrote:
>>
>> Hello Wireshark-dev community,
>>
>>
>>
>> Apparently, I still don't have the correct sequence of steps necessary
>> for first time generation of "packet-myfoo.c" and "packet-myfoo.h" for a
>> new ASN.1-based dissector called myfoo. Details follow.
>>
>>
>>
>> I would like to understand (much better than I do) how to add an
>> ASN.1-based dissector to epan/dissectors/asn1 in a fresh clone of
>> wireshark. I got a lot of help from a lot of people last week (for which I
>> am grateful) but I must still be missing a step here:
>>
>> git clone https:// wireshark
>>
>> cd wireshark
>>
>> git checkout wireshark-3.4.4
>>
>> cd ..
>>
>> mkdir build
>>
>> cd build
>>
>> cmake ../wireshark #this step worked previously but not on a fresh
>> wireshark clone now
>>
>> make asn1 #with relevant entries in two CMakeListsCustom files
>>
>> make
>>
>>
>>
>> When I add my dissector folder "myfoo" to epan/dissectors/asn1 here's the
>> relevant error messages from cmake (with some highlighting by me):
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *-- Configuring doneCMake Error at epan/dissectors/CMakeLists.txt:2004
>> (add_library):  Cannot find source file:
>> /home/vtrandal/ws1/wireshark/epan/dissectors/packet-myfoo.c  Tried
>> extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm  .hpp
>> .hxx .in .txxCMake Error at epan/dissectors/CMakeLists.txt:2004
>> (add_library):  No SOURCES given to target: dissectors*
>>
>> [end of cmake error messages]
>>
>>
>>
>> The point of the above cmake error messages is that the "packet-myfoo.c"
>> and "packet-myfoo.h" files have not yet been generated (and I don't know
>> how to generate them). I do not know how I got past the cmake step before,
>> but I was lucky (and unlucky now). The ASN.1-based dissector code is in the
>> attached .tgz file which I extract in epan/dissectors as follows:
>>
>> tar xvf myfoo.tgz
>>
>> ./CMakeListsCustom.txt <== contains entry for myfoo
>> ./asn1/CMakeListsCustom.txt <== contains entry for myfoo
>> ./asn1/myfoo/
>> ./asn1/myfoo/myfoo.asn
>> ./asn1/myfoo/myfoo.cnf
>> ./asn1/myfoo/CMakeLists.txt
>> ./asn1/myfoo/packet-myfoo-template.h
>> ./asn1/myfoo/packet-myfoo-template.c
>>
>>
>>
>> I apologize in advance for being thick-headed about the process of adding
>> a n

Re: [Wireshark-dev] still unclear how to build a new ASN.1-based dissector

2021-04-20 Thread Vincent Randal
Hello,

Anders, thank you. I think I've finally got the separate "generate" and
"compile" steps clear now. Thank you.

What I think remains is regression testing. Yes? No? For a new dissector
should there be entry in some file (somewhere) that tells the build tools
what to test (if anything) regarding a new dissector in the asn1 directory?

I've been digging around a bit in the source files and I have not yet made
sense of how regression testing (or any testing) is done, or even if it
applies to dissectors let alone a new dissector.

Vincent Randal

On Mon, Apr 19, 2021 at 12:52 AM Anders Broman via Wireshark-dev <
wireshark-dev@wireshark.org> wrote:

> Hi,
>
> Perhaps a misconception here, the generated files are part of the source
> tree currently so when you change any of the files in the
>
> ../asn1/foo directory you need to run make foo and check in the generated
> .c and optionally .h file.
>
>
>
> So on the very first round add the directory and files in the /foo
> directory DO NOT change cmake for the generated files yet
>
> Run cmake to have the cmake files generated needed to generate asn1
> dissectors.
>
> Run make foo
>
> You should now have generated .c and possibly .h files in your src dir
>
> Check them in and update the cmake files to include the f´generated .c .h
> files
>
> Run make to have them built
>
>
>
> Best regards
>
> Anders
>
>
>
> *From:* Wireshark-dev  *On Behalf Of
> *Vincent Randal
> *Sent:* den 19 april 2021 05:06
> *To:* Developer support list for Wireshark 
> *Subject:* Re: [Wireshark-dev] still unclear how to build a new
> ASN.1-based dissector
>
>
>
> CORRECTION:  I omitted the troublesome steps (underlined) when describing
> the problem:
>
> git clone https:// wireshark
>
> cd wireshark
>
> git checkout wireshark-3.4.4
>
> cd wireshark/epan/dissectors
>
> *cp ~/myfoo.tgz . #copy dissector code into wireshark clone*
>
> *tar xvf myfoo.tgz #extract the dissector code (details in previous email)*
>
> cd ../../..
>
> mkdir build
>
> cd build
>
> cmake ../wireshark #this step worked previously but not on a fresh
> wireshark clone now
>
> make asn1 #with relevant entries in two CMakeListsCustom files
>
> make
>
>
>
> On Sun, Apr 18, 2021 at 8:15 PM Vincent Randal  wrote:
>
> Hello Wireshark-dev community,
>
>
>
> Apparently, I still don't have the correct sequence of steps necessary for
> first time generation of "packet-myfoo.c" and "packet-myfoo.h" for a new
> ASN.1-based dissector called myfoo. Details follow.
>
>
>
> I would like to understand (much better than I do) how to add an
> ASN.1-based dissector to epan/dissectors/asn1 in a fresh clone of
> wireshark. I got a lot of help from a lot of people last week (for which I
> am grateful) but I must still be missing a step here:
>
> git clone https:// wireshark
>
> cd wireshark
>
> git checkout wireshark-3.4.4
>
> cd ..
>
> mkdir build
>
> cd build
>
> cmake ../wireshark #this step worked previously but not on a fresh
> wireshark clone now
>
> make asn1 #with relevant entries in two CMakeListsCustom files
>
> make
>
>
>
> When I add my dissector folder "myfoo" to epan/dissectors/asn1 here's the
> relevant error messages from cmake (with some highlighting by me):
>
>
>
>
>
>
>
>
>
>
>
> *-- Configuring doneCMake Error at epan/dissectors/CMakeLists.txt:2004
> (add_library):  Cannot find source file:
> /home/vtrandal/ws1/wireshark/epan/dissectors/packet-myfoo.c  Tried
> extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm  .hpp
> .hxx .in .txxCMake Error at epan/dissectors/CMakeLists.txt:2004
> (add_library):  No SOURCES given to target: dissectors*
>
> [end of cmake error messages]
>
>
>
> The point of the above cmake error messages is that the "packet-myfoo.c"
> and "packet-myfoo.h" files have not yet been generated (and I don't know
> how to generate them). I do not know how I got past the cmake step before,
> but I was lucky (and unlucky now). The ASN.1-based dissector code is in the
> attached .tgz file which I extract in epan/dissectors as follows:
>
> tar xvf myfoo.tgz
>
> ./CMakeListsCustom.txt <== contains entry for myfoo
> ./asn1/CMakeListsCustom.txt <== contains entry for myfoo
> ./asn1/myfoo/
> ./asn1/myfoo/myfoo.asn
> ./asn1/myfoo/myfoo.cnf
> ./asn1/myfoo/CMakeLists.txt
> ./asn1/myfoo/packet-myfoo-template.h
> ./asn1/myfoo/packet-myfoo-template.c
>
>
>
> I apologize in advance for being thick-headed about the process of adding
> a new ASN.1-based dissector to epan/dissectors/asn1 in Wireshark. With help
> from a lot of people I got it to compile previously (again for which I am
> grateful). But I cannot repeat that success starting with a fresh clone of
> wireshark regardless of the branch. Somehow I still don't have the correct
> sequence of steps necessary to generate "packet-myfoo.c" and
> "packet-myfoo.h" the first time. With my dissector code in epan/dissectors
> the cmake step fails and I cannot make  anything.
>
>
>
> Vincent
>
>
>
> NOTE: The attached dissector code is based on the simple ASN

[Wireshark-dev] How to recognize that live capture is running?

2021-04-20 Thread Jirka Novak
Hi,

  I need to show a button in a dialog just in case that live capture is
running, but I'm not able to find how to get this information.
  I'm able to get information about change of state during e.g. closing
capture, but not get current state.
  Can anyone advice me, how to get current status?

Best regards,

Jirka Novak
___
Sent via:Wireshark-dev mailing list 
Archives:https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
 mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe

Re: [Wireshark-dev] Fwd: Tshark feature request

2021-04-20 Thread Jirka Novak
Hi,

> I hope you are doing well, We are looking for feature request on Tshark,
> 
> We would like to have mean,avg and max delta values print out,

I propose to create change request on
https://gitlab.com/wireshark/wireshark/-/issues

I propose to clarify which formula you would like to use for 'Mean' and
'Avg'. For example provide formulas, short sample and expected results
for formula - you can probably use RTP Analysis to get inputs for
calculation.

Best regards,

Jirka Novak
___
Sent via:Wireshark-dev mailing list 
Archives:https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
 mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe