Re: [Wireshark-dev] How to build the simple ASN.1 UDP-based dissector example (foo)

2021-04-16 Thread Graham Bloice
t;>
>>>
>>>> On Tue, Apr 13, 2021 at 8:47 AM Anders Broman via Wireshark-dev <
>>>> wireshark-dev@wireshark.org> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I don’t think they are generated what will be generated are the files
>>>>> needed to *DO *the generation.
>>>>>
>>>>> On windows the next step is to run
>>>>>
>>>>> msbuild /m /p:Configuration=RelWithDebInfo
>>>>> epan\dissectors\asn1\h248\generate_dissector-h248.vcxproj
>>>>>
>>>>> which will the generate the .c and .h files
>>>>>
>>>>> Regards
>>>>>
>>>>> Anders
>>>>>
>>>>>
>>>>>
>>>>> *From:* Wireshark-dev  *On
>>>>> Behalf Of *Vincent Randal
>>>>> *Sent:* den 13 april 2021 16:40
>>>>> *To:* Developer support list for Wireshark <
>>>>> wireshark-dev@wireshark.org>
>>>>> *Subject:* Re: [Wireshark-dev] How to build the simple ASN.1
>>>>> UDP-based dissector example (foo)
>>>>>
>>>>>
>>>>>
>>>>> Correct insofar as there are no generated files associated with
>>>>> asn1/foo directory. Namely, packet-foo.c and packet-foo.h did not get
>>>>> generated. But maybe that's not definitive proof that asn1/foo dissector
>>>>> did not get built. How else can I confirm the dissector was or was not
>>>>> built? Open Wireshark and attempt to apply "foo" as a display filter? It's
>>>>> not there.
>>>>>
>>>>>
>>>>>
>>>>> On Tue, Apr 13, 2021 at 8:10 AM Anders Broman via Wireshark-dev <
>>>>> wireshark-dev@wireshark.org> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> So you are saying that if you create foo dir like
>>>>>
>>>>> epan/dissectors/asn1/foo/
>>>>>
>>>>> Rename and update the custom cmake file to
>>>>>
>>>>> set(CUSTOM_ASN1_SRC_DIR
>>>>>
>>>>>foo
>>>>>
>>>>> )
>>>>>
>>>>> And place your source file and cmake.txt in the foo dir then rerun the
>>>>> cmake process
>>>>>
>>>>> Nothing happens?
>>>>>
>>>>> Try to delete the build dir  before rerunning cmake again?
>>>>>
>>>>> I’m not sure on linux if the generate cmake file ends up under the
>>>>> build dir or in the source dir.
>>>>>
>>>>>
>>>>>
>>>>> Regards
>>>>>
>>>>> Anders
>>>>>
>>>>> *From:* Wireshark-dev  *On
>>>>> Behalf Of *Vincent Randal
>>>>> *Sent:* den 13 april 2021 15:32
>>>>> *To:* Developer support list for Wireshark <
>>>>> wireshark-dev@wireshark.org>
>>>>> *Subject:* Re: [Wireshark-dev] How to build the simple ASN.1
>>>>> UDP-based dissector example (foo)
>>>>>
>>>>>
>>>>>
>>>>> I tried renaming ./epan/dissectors/asn1/CMakeListsCustom.txt.example
>>>>> to CMakeListsCustom.txt with an entry as follows:
>>>>>
>>>>> # Add a list of your custom asn1 dissectors here
>>>>> set(CUSTOM_ASN1_SRC_DIR
>>>>>foo
>>>>> )
>>>>>
>>>>>
>>>>>
>>>>> Again, the build did not update any targets even with that change. But
>>>>> this is progress because that underscores the Step by Step instructions
>>>>> need to be updated to something that works. Any more ideas?
>>>>>
>>>>>
>>>>>
>>>>> On Tue, Apr 13, 2021 at 7:12 AM John Thacker 
>>>>> wrote:
>>>>>
>>>>> On Tue, Apr 13, 2021, 8:32 AM Vincent Randal 
>>>>> wrote:
>>>>>
>>>>> Hello everyone,
>>>>>
>>>>>
>>>>>
>>>>> I need help building the simple ASN.1 UDP-based dissector example
>>>>> (foo); specifically, I need help building the generate_dissector-*proto*
>>>>> target (Step #6 below). I'm certainly missing something here.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> (c) I created directory "foo" by extracting the attachment (foo.tgz)
>>>>> in epan/dissectors/asn1/
>>>>>
>>>>> (d) There is a CMakeListsCustom.txt.example file in
>>>>> epan/dissectors/asn1 which already contains an entry for "foo".
>>>>>
>>>>> (e) Since I don't know what to do in Step #6, I build Wireshare (using
>>>>> cmake), but no build targets get updated.
>>>>>
>>>>>
>>>>>
>>>>> If the solution to this problem belongs in the Wireshark
>>>>> documentation, I would be glad to help update the documentation. Namely, I
>>>>> don't understand the usage of the 5 (five) CMakeListsCustom.txt.example
>>>>> files inWireshark source code.
>>>>>
>>>>>
>>>>>
>>>>> The CMakeListsCustom.txt.example files are just that, examples. You
>>>>> need to copy or rename them to CMakeListsCustom.txt (without the .example)
>>>>> for them to have any effect (and edit them appropriately to add the
>>>>> dissector name to the list, not commented out.)
>>>>>
>>>>>
>>>>>
>>>>> CMake is configured to look for the files by that name.
>>>>>
>>>>>
>>>>>
>>>>> John Thacker
>>>>>
>>>>>
>>>>>
>> --
>> Graham Bloice
>>
>> ___
>> 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



-- 
Graham Bloice
___
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] How to build the simple ASN.1 UDP-based dissector example (foo)

2021-04-15 Thread Vincent Randal
Hi Graham,

Thank you for taking the time to help with some potential misconceptions. I
apologize for not replying to your concerns sooner. I can reassure you we
have the same understanding regarding the role of cmake and make in the
build process. When I refer to cmake I mean the build method that begins
with cmake similar to how you put it: "We're doing cmake builds these days.
All our Wireshark builds are cmake." per your SF19 presentation [
https://www.youtube.com/watch?v=Fp_7g5as1VY=3380s]

Given that the Wireshark documentation for building the simple ASN.1-based
dissector example is not quite up to date for "cmake builds" .AND. and
cmake has no requirement that the build folder be named build, it was just
a matter of time that someone would point that out as I did. Maybe they
already have. So then I also apologize for not using the preferred method
for reporting bugs: the Wireshark bug database <https://bugs.wireshark.org/>
.

It's been 14 years since I looked (glanced I might say) at Wireshark
dissector code. As I gain a bit more confidence I will report bugs to the
bug database rather than discussing them in the mailing list. Many people
on this mailing list have indulged my need for guidance for which I am
sincerely grateful. It's my intention to reciprocate by helping when and
where I can in due time.

Thank you,
Vincent Randal

On Tue, Apr 13, 2021 at 9:46 AM Graham Bloice 
wrote:

> Just to reset what I think are some misconceptions here:
>
>
>1. CMake, despite having the verb "Make" in its name, doesn't make the
>application.  CMake makes something (depends on the platform, i.e. a
>Makefile or ninja build file or Visual Studio solution\project files) that
>then allows you to make the application, this is the "generator" specified
>when running CMake.  CMake can also create some source files, e.g. config.h
>for use when making the application.
>2. The CMake generation produces build artefacts that have multiple
>targets to make the distinct parts of a complex application such as
>Wireshark.
>3. There is a build target , that will generate all the asn1 based
>dissectors.  Each dissector also has its own specific target, e.g. .  This
>isn't run from the top level Wireshark target as we don't need to
>degenerate the asn1 dissectors on each build, only when something in them
>changes.
>4. The method to specify a build target vary with the build
>mechanism.  For VisualStudio you can specify the project file or the
>solution file with a /t:xxx argument to specify the target (each project
>file is a target).  Pascal has shown how it's done for Ninja builds.
>5. There is a target for each asn1 based dissector;
>"generate_dissector-foo" and a target to generate all the asn1 dissectors,
>"asn1".
>6. The magic part of CMake that invokes asn2wrs to generate the
>dissectors from the asn1 files (and other bits) is in
>cmake\modules\UserAsn2Wrs.cmake and this is invoked in each dissectors
>specific CMakeLists.txt via the CMake macro ASN2WRS().  The asn1 target is
>generated by the CMakeLists.txt in epan/dissectors/asn1 and simply adds
>each generated dissector target as a dependency of the asn1 target.
>
>
> On Tue, 13 Apr 2021 at 16:03, Pascal Quantin  wrote:
>
>> Hi Vicent,
>>
>> Le mar. 13 avr. 2021 à 16:53, Vincent Randal  a
>> écrit :
>>
>>> I should give that a try. What version of Windows and tools are you
>>> using? I’m beat. I need to do something that works soon.
>>>
>>
>> No need to install Windows; it works the same way on Linux. Go to your
>> build folder and run:
>> ninja epan/dissectors/asn1/foo/generate_dissector-foo
>> Assuming you are using ninja, otherwise replace it by make.
>> The target should have been created iby running CMake after the addition
>> of the CMakeListsCustom.txt file.
>>
>> Best regards.
>>
>>
>>> On Tue, Apr 13, 2021 at 8:47 AM Anders Broman via Wireshark-dev <
>>> wireshark-dev@wireshark.org> wrote:
>>>
>>>> Hi,
>>>>
>>>> I don’t think they are generated what will be generated are the files
>>>> needed to *DO *the generation.
>>>>
>>>> On windows the next step is to run
>>>>
>>>> msbuild /m /p:Configuration=RelWithDebInfo
>>>> epan\dissectors\asn1\h248\generate_dissector-h248.vcxproj
>>>>
>>>> which will the generate the .c and .h files
>>>>
>>>> Regards
>>>>
>>>> Anders
>>>>
>>>>
>>>>
>>>> *From:* Wireshark-dev  *O

Re: [Wireshark-dev] How to build the simple ASN.1 UDP-based dissector example (foo)

2021-04-14 Thread Vincent Randal
Thank you, Guy, Pascal, John, Anders, Graham, Richard et al,

So that’s what CI Build means. Very nice.
https://www.wireshark.org/docs/wsdg_html_chunked/ChIntroAutomated.html

Okay. I will not make a very big effort to insert ifdef’s throughout
affected source files (relevant to the simple ASN.1 UDP-based dissector) in
support of 2..6.20  builds. I will do what I can to get involved:
https://www.wireshark.org/develop.html

Thank you.
Vincent

On Tue, Apr 13, 2021 at 11:16 PM Guy Harris  wrote:

> On Apr 13, 2021, at 5:36 PM, Vincent Randal  wrote:
>
> > If it’s important not to break wireshark-2.6.20
>
> It's not.
>
> All I'm saying there is that there are different levels of support:
>
> for Windows and macOS, we do CI builds, so we know Wireshark
> builds and runs, and supply binaries;
>
> for Linux, we do CI builds, so we know Wireshark builds and runs,
> and supply source tarballs, from which many distributions construct
> packages;
>
> for FreeBSD/NetBSD/OpenBSD/DragonFly BSD, we don't currently do CI
> builds, but that might be worth looking into for at least some of those
> OSes, and we supply source tarballs, from which at least some of those
> construct packages, so, to that extent, we know it works;
>
> for Solaris, we don't do CI builds, but we supply source tarballs,
> and Oracle might make a package from that - if so, we know that it works;
>
> for AIX, we don't do CI builds, but we supply source tarballs -
> however, I don't know whether anybody packages them, so I don't know
> whether it works;
>
> for HP-UX, we don't do CI builds, but we supply source tarballs -
> but the HP-UX Porting and Archive Centre hasn't offered packages for
> anything newer than 2.6.20, and don't even offer packages for any version
> of Qt with which Wireshark works, so it might be extremely difficult, if
> not impossible, to make any remotely modern Wireshark work, given that they
> haven't bothered.
>
> 2.6.20 is a *REALLY* out-of-date version, and we don't support it; if
> somebody *wants* their plugin to work on it, they can try to make it work,
> but I don't think we think that's at all important.
>
> > and the wide array of operating systems you mentioned previously.
>
> I just mentioned them to indicate why we talk about "Unix and Unix-like
> systems" rather than "Linux" - we're not a "Windows and Linux" application,
> or even a "Windows, Linux, and macOS" application, the goal is to work on
> as many living UN*Xes as we can.  (HP-UX may, at this time, be on life
> support - I don't think HPE have any plans to port it to x86-64, and they
> *do* plan to switch to x86-64 for their hardware, given the death of
> Itanium.)
>
> > Do you use Homebrew or MacPorts to configure your MacOS build
> environment for Wireshark development?
>
> No, I just use the tools/macos-setup.sh script.
>
> > It’s been awhile since I used either. Also, I wonder if there are issues
> with Qt vs XQuartz.
>
> The versions of Qt that Wireshark can use all work directly atop whatever
> Apple calls the graphics layer - they do *NOT* use X11, so they don't
> require or use Xquartz.
>
> And, most of the time, with a small amount of care your code will work on
> all platforms - and a generated ASN.1 dissector is probably even *more*
> likely to Just Work, especially if it doesn't run into any of the compiler
> warnings our build process turns on, as errors, by default.
> ___
> 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] How to build the simple ASN.1 UDP-based dissector example (foo)

2021-04-13 Thread Guy Harris
On Apr 13, 2021, at 5:36 PM, Vincent Randal  wrote:

> If it’s important not to break wireshark-2.6.20

It's not.

All I'm saying there is that there are different levels of support:

for Windows and macOS, we do CI builds, so we know Wireshark builds and 
runs, and supply binaries;

for Linux, we do CI builds, so we know Wireshark builds and runs, and 
supply source tarballs, from which many distributions construct packages;

for FreeBSD/NetBSD/OpenBSD/DragonFly BSD, we don't currently do CI 
builds, but that might be worth looking into for at least some of those OSes, 
and we supply source tarballs, from which at least some of those construct 
packages, so, to that extent, we know it works;

for Solaris, we don't do CI builds, but we supply source tarballs, and 
Oracle might make a package from that - if so, we know that it works;

for AIX, we don't do CI builds, but we supply source tarballs - 
however, I don't know whether anybody packages them, so I don't know whether it 
works;

for HP-UX, we don't do CI builds, but we supply source tarballs - but 
the HP-UX Porting and Archive Centre hasn't offered packages for anything newer 
than 2.6.20, and don't even offer packages for any version of Qt with which 
Wireshark works, so it might be extremely difficult, if not impossible, to make 
any remotely modern Wireshark work, given that they haven't bothered.

2.6.20 is a *REALLY* out-of-date version, and we don't support it; if somebody 
*wants* their plugin to work on it, they can try to make it work, but I don't 
think we think that's at all important.

> and the wide array of operating systems you mentioned previously.

I just mentioned them to indicate why we talk about "Unix and Unix-like 
systems" rather than "Linux" - we're not a "Windows and Linux" application, or 
even a "Windows, Linux, and macOS" application, the goal is to work on as many 
living UN*Xes as we can.  (HP-UX may, at this time, be on life support - I 
don't think HPE have any plans to port it to x86-64, and they *do* plan to 
switch to x86-64 for their hardware, given the death of Itanium.)

> Do you use Homebrew or MacPorts to configure your MacOS build environment for 
> Wireshark development?

No, I just use the tools/macos-setup.sh script.

> It’s been awhile since I used either. Also, I wonder if there are issues with 
> Qt vs XQuartz.

The versions of Qt that Wireshark can use all work directly atop whatever Apple 
calls the graphics layer - they do *NOT* use X11, so they don't require or use 
Xquartz.

And, most of the time, with a small amount of care your code will work on all 
platforms - and a generated ASN.1 dissector is probably even *more* likely to 
Just Work, especially if it doesn't run into any of the compiler warnings our 
build process turns on, as errors, by default.
___
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] How to build the simple ASN.1 UDP-based dissector example (foo)

2021-04-13 Thread Vincent Randal
Guy,

I want keep my promise to update the Wireshark documentation for the simple
ASN.1 UDP-based dissector example so that it more accurately reflects the
current build method that starts with cmake. I will do a better job now
with input and help I’ve received.

If it’s important not to break wireshark-2.6.20 then I will make my
revisions conditioned on wireshark-3.4.4 and wireshark-2.6.20 tags and the
wide array of operating systems you mentioned previously. I’ve have most
OS’s except HP-UX.

Do you use Homebrew or MacPorts to configure your MacOS build environment
for Wireshark development? It’s been awhile since I used either. Also, I
wonder if there are issues with Qt vs XQuartz.

I sincerely appreciate the help I received today from many people.

Vincent Randal

On Tue, Apr 13, 2021 at 5:40 PM Guy Harris  wrote:

> On Apr 13, 2021, at 9:21 AM, Pascal Quantin  wrote:
>
> > 13 avr. 2021 17:36:20 John Thacker :
> >
> > > Depending on your build system, the other ASN.1 dissectors can be
> regenerated with either
> > >
> > > ninja asn1
> > >   Or
> > > make asn1
> > >
> > > without starting the full build process.
> >
> > Those commands will regenerate all the ASN.1 dissectors.
>
> At least on my Mac, "ninja asn1" did "regenerate" them all (making no
> changes, according to "git status"), but when I tried it again in the same
> build directory, Ninja said "ninja: no work to do."
> ___
> 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] How to build the simple ASN.1 UDP-based dissector example (foo)

2021-04-13 Thread Guy Harris
On Apr 13, 2021, at 9:21 AM, Pascal Quantin  wrote:

> 13 avr. 2021 17:36:20 John Thacker : 
> 
> > Depending on your build system, the other ASN.1 dissectors can be 
> > regenerated with either 
> > 
> > ninja asn1 
> >   Or 
> > make asn1 
> > 
> > without starting the full build process. 
> 
> Those commands will regenerate all the ASN.1 dissectors.

At least on my Mac, "ninja asn1" did "regenerate" them all (making no changes, 
according to "git status"), but when I tried it again in the same build 
directory, Ninja said "ninja: no work to do."
___
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] How to build the simple ASN.1 UDP-based dissector example (foo)

2021-04-13 Thread Guy Harris
On Apr 13, 2021, at 6:03 AM, Vincent Randal  wrote:

> I'm building Wireshark on Linux. Wireshark documentation refers to it as UNIX 
> or UNIX-like.

Linux is one of the UNIX-like systems we support, yes.  We also officially 
support macOS, and the build process may also work on FreeBSD, NetBSD, OpenBSD, 
DragonFly BSD, Solaris, AIX, HP-UX, etc..  (The hardest part might be getting 
Qt working; the HP-UX Porting and Archive Centre at

http://hpux.connect.org.uk

only has Wireshark 1.10.5 and 2.6.20; they have Qt, but it's only 3.0.5.)
___
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] How to build the simple ASN.1 UDP-based dissector example (foo)

2021-04-13 Thread Vincent Randal
With everyone's help I have successfully built the simple ASN.1 UDP-based
dissector in Linux (Ubuntu 18.04). And it is available in my Wireshark
build for use in the display filter as shown in the screenshot below. I
made my changes against wireshark-3.4.4, but I did not use
CMakeListsCustom.txt.example (renamed as CMakeListsCustom.txt with
appropriate entry or entries for "foo" (asn1/foo)). Instead, I mimicked
asn1/snmp and asn1/h248 and added entries for "foo" in
epan/dissectors/CMakeLists.txt and epan/dissectors/asn1/CMakeLists.txt
files. Thank you!
[image: image.png]
Thank you! I have not yet figured out how to edit the various
CMakeListsCustom.txt files so that it builds the .o file in addition to
packet-foo.[ch]. If anyone has ideas how to edit the relevant
CMakeListsCustom.txt file(s), I'm eager to help test the ideas.
Vincent Randal

On Tue, Apr 13, 2021 at 9:46 AM Graham Bloice 
wrote:

> Just to reset what I think are some misconceptions here:
>
>
>1. CMake, despite having the verb "Make" in its name, doesn't make the
>application.  CMake makes something (depends on the platform, i.e. a
>Makefile or ninja build file or Visual Studio solution\project files) that
>then allows you to make the application, this is the "generator" specified
>when running CMake.  CMake can also create some source files, e.g. config.h
>for use when making the application.
>2. The CMake generation produces build artefacts that have multiple
>targets to make the distinct parts of a complex application such as
>Wireshark.
>3. There is a build target , that will generate all the asn1 based
>dissectors.  Each dissector also has its own specific target, e.g. .  This
>isn't run from the top level Wireshark target as we don't need to
>degenerate the asn1 dissectors on each build, only when something in them
>changes.
>4. The method to specify a build target vary with the build
>mechanism.  For VisualStudio you can specify the project file or the
>solution file with a /t:xxx argument to specify the target (each project
>file is a target).  Pascal has shown how it's done for Ninja builds.
>5. There is a target for each asn1 based dissector;
>"generate_dissector-foo" and a target to generate all the asn1 dissectors,
>"asn1".
>6. The magic part of CMake that invokes asn2wrs to generate the
>dissectors from the asn1 files (and other bits) is in
>cmake\modules\UserAsn2Wrs.cmake and this is invoked in each dissectors
>specific CMakeLists.txt via the CMake macro ASN2WRS().  The asn1 target is
>generated by the CMakeLists.txt in epan/dissectors/asn1 and simply adds
>each generated dissector target as a dependency of the asn1 target.
>
>
> On Tue, 13 Apr 2021 at 16:03, Pascal Quantin  wrote:
>
>> Hi Vicent,
>>
>> Le mar. 13 avr. 2021 à 16:53, Vincent Randal  a
>> écrit :
>>
>>> I should give that a try. What version of Windows and tools are you
>>> using? I’m beat. I need to do something that works soon.
>>>
>>
>> No need to install Windows; it works the same way on Linux. Go to your
>> build folder and run:
>> ninja epan/dissectors/asn1/foo/generate_dissector-foo
>> Assuming you are using ninja, otherwise replace it by make.
>> The target should have been created iby running CMake after the addition
>> of the CMakeListsCustom.txt file.
>>
>> Best regards.
>>
>>
>>> On Tue, Apr 13, 2021 at 8:47 AM Anders Broman via Wireshark-dev <
>>> wireshark-dev@wireshark.org> wrote:
>>>
>>>> Hi,
>>>>
>>>> I don’t think they are generated what will be generated are the files
>>>> needed to *DO *the generation.
>>>>
>>>> On windows the next step is to run
>>>>
>>>> msbuild /m /p:Configuration=RelWithDebInfo
>>>> epan\dissectors\asn1\h248\generate_dissector-h248.vcxproj
>>>>
>>>> which will the generate the .c and .h files
>>>>
>>>> Regards
>>>>
>>>> Anders
>>>>
>>>>
>>>>
>>>> *From:* Wireshark-dev  *On Behalf
>>>> Of *Vincent Randal
>>>> *Sent:* den 13 april 2021 16:40
>>>> *To:* Developer support list for Wireshark >>> >
>>>> *Subject:* Re: [Wireshark-dev] How to build the simple ASN.1 UDP-based
>>>> dissector example (foo)
>>>>
>>>>
>>>>
>>>> Correct insofar as there are no generated files associated with
>>>> asn1/foo directory. Namely, packet-foo.c and packet-foo.h did not get

Re: [Wireshark-dev] How to build the simple ASN.1 UDP-based dissector example (foo)

2021-04-13 Thread Graham Bloice
Keyboard and brain got a little misconnected there.  The first 2 sentences
of item 3, which are missing some things I meant to fill in, can be
replaced with the text from item 5.

On Tue, 13 Apr 2021 at 16:45, Graham Bloice 
wrote:

> Just to reset what I think are some misconceptions here:
>
>
>1. CMake, despite having the verb "Make" in its name, doesn't make the
>application.  CMake makes something (depends on the platform, i.e. a
>Makefile or ninja build file or Visual Studio solution\project files) that
>then allows you to make the application, this is the "generator" specified
>when running CMake.  CMake can also create some source files, e.g. config.h
>for use when making the application.
>2. The CMake generation produces build artefacts that have multiple
>targets to make the distinct parts of a complex application such as
>Wireshark.
>3. There is a build target , that will generate all the asn1 based
>dissectors.  Each dissector also has its own specific target, e.g. .  This
>isn't run from the top level Wireshark target as we don't need to
>degenerate the asn1 dissectors on each build, only when something in them
>changes.
>4. The method to specify a build target vary with the build
>mechanism.  For VisualStudio you can specify the project file or the
>solution file with a /t:xxx argument to specify the target (each project
>file is a target).  Pascal has shown how it's done for Ninja builds.
>5. There is a target for each asn1 based dissector;
>"generate_dissector-foo" and a target to generate all the asn1 dissectors,
>"asn1".
>6. The magic part of CMake that invokes asn2wrs to generate the
>dissectors from the asn1 files (and other bits) is in
>cmake\modules\UserAsn2Wrs.cmake and this is invoked in each dissectors
>specific CMakeLists.txt via the CMake macro ASN2WRS().  The asn1 target is
>generated by the CMakeLists.txt in epan/dissectors/asn1 and simply adds
>each generated dissector target as a dependency of the asn1 target.
>
>
> On Tue, 13 Apr 2021 at 16:03, Pascal Quantin  wrote:
>
>> Hi Vicent,
>>
>> Le mar. 13 avr. 2021 à 16:53, Vincent Randal  a
>> écrit :
>>
>>> I should give that a try. What version of Windows and tools are you
>>> using? I’m beat. I need to do something that works soon.
>>>
>>
>> No need to install Windows; it works the same way on Linux. Go to your
>> build folder and run:
>> ninja epan/dissectors/asn1/foo/generate_dissector-foo
>> Assuming you are using ninja, otherwise replace it by make.
>> The target should have been created iby running CMake after the addition
>> of the CMakeListsCustom.txt file.
>>
>> Best regards.
>>
>>
>>> On Tue, Apr 13, 2021 at 8:47 AM Anders Broman via Wireshark-dev <
>>> wireshark-dev@wireshark.org> wrote:
>>>
>>>> Hi,
>>>>
>>>> I don’t think they are generated what will be generated are the files
>>>> needed to *DO *the generation.
>>>>
>>>> On windows the next step is to run
>>>>
>>>> msbuild /m /p:Configuration=RelWithDebInfo
>>>> epan\dissectors\asn1\h248\generate_dissector-h248.vcxproj
>>>>
>>>> which will the generate the .c and .h files
>>>>
>>>> Regards
>>>>
>>>> Anders
>>>>
>>>>
>>>>
>>>> *From:* Wireshark-dev  *On Behalf
>>>> Of *Vincent Randal
>>>> *Sent:* den 13 april 2021 16:40
>>>> *To:* Developer support list for Wireshark >>> >
>>>> *Subject:* Re: [Wireshark-dev] How to build the simple ASN.1 UDP-based
>>>> dissector example (foo)
>>>>
>>>>
>>>>
>>>> Correct insofar as there are no generated files associated with
>>>> asn1/foo directory. Namely, packet-foo.c and packet-foo.h did not get
>>>> generated. But maybe that's not definitive proof that asn1/foo dissector
>>>> did not get built. How else can I confirm the dissector was or was not
>>>> built? Open Wireshark and attempt to apply "foo" as a display filter? It's
>>>> not there.
>>>>
>>>>
>>>>
>>>> On Tue, Apr 13, 2021 at 8:10 AM Anders Broman via Wireshark-dev <
>>>> wireshark-dev@wireshark.org> wrote:
>>>>
>>>> Hi,
>>>>
>>>> So you are saying that if you create foo dir like
>>>>
>>>> epan/dissectors/asn

Re: [Wireshark-dev] How to build the simple ASN.1 UDP-based dissector example (foo)

2021-04-13 Thread Pascal Quantin

13 avr. 2021 17:36:20 John Thacker :

> Depending on your build system, the other ASN.1 dissectors can be regenerated 
> with either
>
> ninja asn1
>   Or
> make asn1
>
> without starting the full build process.

Those commands will regenerate all the ASN.1 dissectors. The command I gave 
allows to regenerate a single dissector (which is much faster), something I do 
each time I update the 3GPP dissectors I maintain (using Linux and not Windows).

>
> I do it all the time, last did it a week ago when developing on Linux and 
> just did it two minutes ago before writing this email to check the command. 
> That is for the built in ones not a new custom one, but I have added a custom 
> dissector before and it works perfectly fine on Linux.
>
>
> On Tue, Apr 13, 2021, 11:23 AM Vincent Randal  wrote:
>> Before or After running cmake (in Linux) there are no files containing 
>> "generate_dissector" in the filename in asn1/foo. And they do not exist 
>> anywhere in the source tree.
>>
>> How did the other asn1 dissectors get generated in Linux? When was the last 
>> time anyone generated or updated a dissector in epan/dissectors/asn1 using 
>> Linux? Maybe this step has been broken for a while in Linux (assuming it 
>> works in Windows).
>>
>> On Tue, Apr 13, 2021 at 9:03 AM Pascal Quantin  wrote:
>>> Hi Vicent,
>>>
>>> Le mar. 13 avr. 2021 à 16:53, Vincent Randal  a écrit :
>>>> I should give that a try. What version of Windows and tools are you using? 
>>>> I’m beat. I need to do something that works soon.
>>>
>>> No need to install Windows; it works the same way on Linux. Go to your 
>>> build folder and run:
>>> ninja epan/dissectors/asn1/foo/generate_dissector-foo
>>> Assuming you are using ninja, otherwise replace it by make.
>>> The target should have been created iby running CMake after the addition of 
>>> the CMakeListsCustom.txt file.
>>>
>>> Best regards.
>>>
>>>>
>>>> On Tue, Apr 13, 2021 at 8:47 AM Anders Broman via Wireshark-dev 
>>>>  wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I don’t think they are generated what will be generated are the files 
>>>>> needed to *DO *the generation.
>>>>>
>>>>> On windows the next step is to run
>>>>>
>>>>> msbuild /m /p:Configuration=RelWithDebInfo  
>>>>> epan\dissectors\asn1\h248\generate_dissector-h248.vcxproj
>>>>>
>>>>> which will the generate the .c and .h files
>>>>>
>>>>> Regards
>>>>>
>>>>> Anders
>>>>>
>>>>>  
>>>>>
>>>>> *From:* Wireshark-dev  *On Behalf Of 
>>>>> *Vincent Randal
>>>>> *Sent:* den 13 april 2021 16:40
>>>>> *To:* Developer support list for Wireshark 
>>>>> *Subject:* Re: [Wireshark-dev] How to build the simple ASN.1 UDP-based 
>>>>> dissector example (foo)
>>>>>
>>>>>  
>>>>>
>>>>> Correct insofar as there are no generated files associated with asn1/foo 
>>>>> directory. Namely, packet-foo.c and packet-foo.h did not get generated. 
>>>>> But maybe that's not definitive proof that asn1/foo dissector did not get 
>>>>> built. How else can I confirm the dissector was or was not built? Open 
>>>>> Wireshark and attempt to apply "foo" as a display filter? It's not there.
>>>>>
>>>>>  
>>>>>
>>>>> On Tue, Apr 13, 2021 at 8:10 AM Anders Broman via Wireshark-dev 
>>>>>  wrote:
>>>>>
>>>>>> …
>>>>> ___
>>>>> 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] How to build the simple ASN.1 UDP-based dissector example (foo)

2021-04-13 Thread Graham Bloice
Just to reset what I think are some misconceptions here:


   1. CMake, despite having the verb "Make" in its name, doesn't make the
   application.  CMake makes something (depends on the platform, i.e. a
   Makefile or ninja build file or Visual Studio solution\project files) that
   then allows you to make the application, this is the "generator" specified
   when running CMake.  CMake can also create some source files, e.g. config.h
   for use when making the application.
   2. The CMake generation produces build artefacts that have multiple
   targets to make the distinct parts of a complex application such as
   Wireshark.
   3. There is a build target , that will generate all the asn1 based
   dissectors.  Each dissector also has its own specific target, e.g. .  This
   isn't run from the top level Wireshark target as we don't need to
   degenerate the asn1 dissectors on each build, only when something in them
   changes.
   4. The method to specify a build target vary with the build mechanism.
   For VisualStudio you can specify the project file or the solution file with
   a /t:xxx argument to specify the target (each project file is a target).
   Pascal has shown how it's done for Ninja builds.
   5. There is a target for each asn1 based dissector;
   "generate_dissector-foo" and a target to generate all the asn1 dissectors,
   "asn1".
   6. The magic part of CMake that invokes asn2wrs to generate the
   dissectors from the asn1 files (and other bits) is in
   cmake\modules\UserAsn2Wrs.cmake and this is invoked in each dissectors
   specific CMakeLists.txt via the CMake macro ASN2WRS().  The asn1 target is
   generated by the CMakeLists.txt in epan/dissectors/asn1 and simply adds
   each generated dissector target as a dependency of the asn1 target.


On Tue, 13 Apr 2021 at 16:03, Pascal Quantin  wrote:

> Hi Vicent,
>
> Le mar. 13 avr. 2021 à 16:53, Vincent Randal  a
> écrit :
>
>> I should give that a try. What version of Windows and tools are you
>> using? I’m beat. I need to do something that works soon.
>>
>
> No need to install Windows; it works the same way on Linux. Go to your
> build folder and run:
> ninja epan/dissectors/asn1/foo/generate_dissector-foo
> Assuming you are using ninja, otherwise replace it by make.
> The target should have been created iby running CMake after the addition
> of the CMakeListsCustom.txt file.
>
> Best regards.
>
>
>> On Tue, Apr 13, 2021 at 8:47 AM Anders Broman via Wireshark-dev <
>> wireshark-dev@wireshark.org> wrote:
>>
>>> Hi,
>>>
>>> I don’t think they are generated what will be generated are the files
>>> needed to *DO *the generation.
>>>
>>> On windows the next step is to run
>>>
>>> msbuild /m /p:Configuration=RelWithDebInfo
>>> epan\dissectors\asn1\h248\generate_dissector-h248.vcxproj
>>>
>>> which will the generate the .c and .h files
>>>
>>> Regards
>>>
>>> Anders
>>>
>>>
>>>
>>> *From:* Wireshark-dev  *On Behalf
>>> Of *Vincent Randal
>>> *Sent:* den 13 april 2021 16:40
>>> *To:* Developer support list for Wireshark 
>>> *Subject:* Re: [Wireshark-dev] How to build the simple ASN.1 UDP-based
>>> dissector example (foo)
>>>
>>>
>>>
>>> Correct insofar as there are no generated files associated with asn1/foo
>>> directory. Namely, packet-foo.c and packet-foo.h did not get generated. But
>>> maybe that's not definitive proof that asn1/foo dissector did not get
>>> built. How else can I confirm the dissector was or was not built? Open
>>> Wireshark and attempt to apply "foo" as a display filter? It's not there.
>>>
>>>
>>>
>>> On Tue, Apr 13, 2021 at 8:10 AM Anders Broman via Wireshark-dev <
>>> wireshark-dev@wireshark.org> wrote:
>>>
>>> Hi,
>>>
>>> So you are saying that if you create foo dir like
>>>
>>> epan/dissectors/asn1/foo/
>>>
>>> Rename and update the custom cmake file to
>>>
>>> set(CUSTOM_ASN1_SRC_DIR
>>>
>>>                foo
>>>
>>> )
>>>
>>> And place your source file and cmake.txt in the foo dir then rerun the
>>> cmake process
>>>
>>> Nothing happens?
>>>
>>> Try to delete the build dir  before rerunning cmake again?
>>>
>>> I’m not sure on linux if the generate cmake file ends up under the build
>>> dir or in the source dir.
>>>
>>>
>>>
>>> Regards
>>>
>>> Anders
>>>
>&

Re: [Wireshark-dev] How to build the simple ASN.1 UDP-based dissector example (foo)

2021-04-13 Thread John Thacker
Depending on your build system, the other ASN.1 dissectors can be
regenerated with either

ninja asn1
  Or
make asn1

without starting the full build process.

I do it all the time, last did it a week ago when developing on Linux and
just did it two minutes ago before writing this email to check the command.
That is for the built in ones not a new custom one, but I have added a
custom dissector before and it works perfectly fine on Linux.


On Tue, Apr 13, 2021, 11:23 AM Vincent Randal  wrote:

> Before or After running cmake (in Linux) there are no files containing
> "generate_dissector" in the filename in asn1/foo. And they do not exist
> anywhere in the source tree.
>
> How did the other asn1 dissectors get generated in Linux? When was the
> last time anyone generated or updated a dissector in epan/dissectors/asn1
> using Linux? Maybe this step has been broken for a while in Linux (assuming
> it works in Windows).
>
> On Tue, Apr 13, 2021 at 9:03 AM Pascal Quantin 
> wrote:
>
>> Hi Vicent,
>>
>> Le mar. 13 avr. 2021 à 16:53, Vincent Randal  a
>> écrit :
>>
>>> I should give that a try. What version of Windows and tools are you
>>> using? I’m beat. I need to do something that works soon.
>>>
>>
>> No need to install Windows; it works the same way on Linux. Go to your
>> build folder and run:
>> ninja epan/dissectors/asn1/foo/generate_dissector-foo
>> Assuming you are using ninja, otherwise replace it by make.
>> The target should have been created iby running CMake after the addition
>> of the CMakeListsCustom.txt file.
>>
>> Best regards.
>>
>>
>>> On Tue, Apr 13, 2021 at 8:47 AM Anders Broman via Wireshark-dev <
>>> wireshark-dev@wireshark.org> wrote:
>>>
>>>> Hi,
>>>>
>>>> I don’t think they are generated what will be generated are the files
>>>> needed to *DO *the generation.
>>>>
>>>> On windows the next step is to run
>>>>
>>>> msbuild /m /p:Configuration=RelWithDebInfo
>>>> epan\dissectors\asn1\h248\generate_dissector-h248.vcxproj
>>>>
>>>> which will the generate the .c and .h files
>>>>
>>>> Regards
>>>>
>>>> Anders
>>>>
>>>>
>>>>
>>>> *From:* Wireshark-dev  *On Behalf
>>>> Of *Vincent Randal
>>>> *Sent:* den 13 april 2021 16:40
>>>> *To:* Developer support list for Wireshark >>> >
>>>> *Subject:* Re: [Wireshark-dev] How to build the simple ASN.1 UDP-based
>>>> dissector example (foo)
>>>>
>>>>
>>>>
>>>> Correct insofar as there are no generated files associated with
>>>> asn1/foo directory. Namely, packet-foo.c and packet-foo.h did not get
>>>> generated. But maybe that's not definitive proof that asn1/foo dissector
>>>> did not get built. How else can I confirm the dissector was or was not
>>>> built? Open Wireshark and attempt to apply "foo" as a display filter? It's
>>>> not there.
>>>>
>>>>
>>>>
>>>> On Tue, Apr 13, 2021 at 8:10 AM Anders Broman via Wireshark-dev <
>>>> wireshark-dev@wireshark.org> wrote:
>>>>
>>>> Hi,
>>>>
>>>> So you are saying that if you create foo dir like
>>>>
>>>> epan/dissectors/asn1/foo/
>>>>
>>>> Rename and update the custom cmake file to
>>>>
>>>> set(CUSTOM_ASN1_SRC_DIR
>>>>
>>>>foo
>>>>
>>>> )
>>>>
>>>> And place your source file and cmake.txt in the foo dir then rerun the
>>>> cmake process
>>>>
>>>> Nothing happens?
>>>>
>>>> Try to delete the build dir  before rerunning cmake again?
>>>>
>>>> I’m not sure on linux if the generate cmake file ends up under the
>>>> build dir or in the source dir.
>>>>
>>>>
>>>>
>>>> Regards
>>>>
>>>> Anders
>>>>
>>>> *From:* Wireshark-dev  *On Behalf
>>>> Of *Vincent Randal
>>>> *Sent:* den 13 april 2021 15:32
>>>> *To:* Developer support list for Wireshark >>> >
>>>> *Subject:* Re: [Wireshark-dev] How to build the simple ASN.1 UDP-based
>>>> dissector example (foo)
>>>>
>>>>
>>>>
>>>> I tried renaming ./epan/dissectors/asn1/CMa

Re: [Wireshark-dev] How to build the simple ASN.1 UDP-based dissector example (foo)

2021-04-13 Thread Vincent Randal
Before or After running cmake (in Linux) there are no files containing
"generate_dissector" in the filename in asn1/foo. And they do not exist
anywhere in the source tree.

How did the other asn1 dissectors get generated in Linux? When was the last
time anyone generated or updated a dissector in epan/dissectors/asn1 using
Linux? Maybe this step has been broken for a while in Linux (assuming it
works in Windows).

On Tue, Apr 13, 2021 at 9:03 AM Pascal Quantin  wrote:

> Hi Vicent,
>
> Le mar. 13 avr. 2021 à 16:53, Vincent Randal  a
> écrit :
>
>> I should give that a try. What version of Windows and tools are you
>> using? I’m beat. I need to do something that works soon.
>>
>
> No need to install Windows; it works the same way on Linux. Go to your
> build folder and run:
> ninja epan/dissectors/asn1/foo/generate_dissector-foo
> Assuming you are using ninja, otherwise replace it by make.
> The target should have been created iby running CMake after the addition
> of the CMakeListsCustom.txt file.
>
> Best regards.
>
>
>> On Tue, Apr 13, 2021 at 8:47 AM Anders Broman via Wireshark-dev <
>> wireshark-dev@wireshark.org> wrote:
>>
>>> Hi,
>>>
>>> I don’t think they are generated what will be generated are the files
>>> needed to *DO *the generation.
>>>
>>> On windows the next step is to run
>>>
>>> msbuild /m /p:Configuration=RelWithDebInfo
>>> epan\dissectors\asn1\h248\generate_dissector-h248.vcxproj
>>>
>>> which will the generate the .c and .h files
>>>
>>> Regards
>>>
>>> Anders
>>>
>>>
>>>
>>> *From:* Wireshark-dev  *On Behalf
>>> Of *Vincent Randal
>>> *Sent:* den 13 april 2021 16:40
>>> *To:* Developer support list for Wireshark 
>>> *Subject:* Re: [Wireshark-dev] How to build the simple ASN.1 UDP-based
>>> dissector example (foo)
>>>
>>>
>>>
>>> Correct insofar as there are no generated files associated with asn1/foo
>>> directory. Namely, packet-foo.c and packet-foo.h did not get generated. But
>>> maybe that's not definitive proof that asn1/foo dissector did not get
>>> built. How else can I confirm the dissector was or was not built? Open
>>> Wireshark and attempt to apply "foo" as a display filter? It's not there.
>>>
>>>
>>>
>>> On Tue, Apr 13, 2021 at 8:10 AM Anders Broman via Wireshark-dev <
>>> wireshark-dev@wireshark.org> wrote:
>>>
>>> Hi,
>>>
>>> So you are saying that if you create foo dir like
>>>
>>> epan/dissectors/asn1/foo/
>>>
>>> Rename and update the custom cmake file to
>>>
>>> set(CUSTOM_ASN1_SRC_DIR
>>>
>>>                foo
>>>
>>> )
>>>
>>> And place your source file and cmake.txt in the foo dir then rerun the
>>> cmake process
>>>
>>> Nothing happens?
>>>
>>> Try to delete the build dir  before rerunning cmake again?
>>>
>>> I’m not sure on linux if the generate cmake file ends up under the build
>>> dir or in the source dir.
>>>
>>>
>>>
>>> Regards
>>>
>>> Anders
>>>
>>> *From:* Wireshark-dev  *On Behalf
>>> Of *Vincent Randal
>>> *Sent:* den 13 april 2021 15:32
>>> *To:* Developer support list for Wireshark 
>>> *Subject:* Re: [Wireshark-dev] How to build the simple ASN.1 UDP-based
>>> dissector example (foo)
>>>
>>>
>>>
>>> I tried renaming ./epan/dissectors/asn1/CMakeListsCustom.txt.example to
>>> CMakeListsCustom.txt with an entry as follows:
>>>
>>> # Add a list of your custom asn1 dissectors here
>>> set(CUSTOM_ASN1_SRC_DIR
>>>foo
>>> )
>>>
>>>
>>>
>>> Again, the build did not update any targets even with that change. But
>>> this is progress because that underscores the Step by Step instructions
>>> need to be updated to something that works. Any more ideas?
>>>
>>>
>>>
>>> On Tue, Apr 13, 2021 at 7:12 AM John Thacker 
>>> wrote:
>>>
>>> On Tue, Apr 13, 2021, 8:32 AM Vincent Randal  wrote:
>>>
>>> Hello everyone,
>>>
>>>
>>>
>>> I need help building the simple ASN.1 UDP-based dissector example (foo);
>>> specifically, I need help building the generate_dissector-*proto* target
>>> (Step #6 below). I'

Re: [Wireshark-dev] How to build the simple ASN.1 UDP-based dissector example (foo)

2021-04-13 Thread Pascal Quantin
Hi Vicent,

Le mar. 13 avr. 2021 à 16:53, Vincent Randal  a écrit :

> I should give that a try. What version of Windows and tools are you using?
> I’m beat. I need to do something that works soon.
>

No need to install Windows; it works the same way on Linux. Go to your
build folder and run:
ninja epan/dissectors/asn1/foo/generate_dissector-foo
Assuming you are using ninja, otherwise replace it by make.
The target should have been created iby running CMake after the addition of
the CMakeListsCustom.txt file.

Best regards.


> On Tue, Apr 13, 2021 at 8:47 AM Anders Broman via Wireshark-dev <
> wireshark-dev@wireshark.org> wrote:
>
>> Hi,
>>
>> I don’t think they are generated what will be generated are the files
>> needed to *DO *the generation.
>>
>> On windows the next step is to run
>>
>> msbuild /m /p:Configuration=RelWithDebInfo
>> epan\dissectors\asn1\h248\generate_dissector-h248.vcxproj
>>
>> which will the generate the .c and .h files
>>
>> Regards
>>
>> Anders
>>
>>
>>
>> *From:* Wireshark-dev  *On Behalf
>> Of *Vincent Randal
>> *Sent:* den 13 april 2021 16:40
>> *To:* Developer support list for Wireshark 
>> *Subject:* Re: [Wireshark-dev] How to build the simple ASN.1 UDP-based
>> dissector example (foo)
>>
>>
>>
>> Correct insofar as there are no generated files associated with asn1/foo
>> directory. Namely, packet-foo.c and packet-foo.h did not get generated. But
>> maybe that's not definitive proof that asn1/foo dissector did not get
>> built. How else can I confirm the dissector was or was not built? Open
>> Wireshark and attempt to apply "foo" as a display filter? It's not there.
>>
>>
>>
>> On Tue, Apr 13, 2021 at 8:10 AM Anders Broman via Wireshark-dev <
>> wireshark-dev@wireshark.org> wrote:
>>
>> Hi,
>>
>> So you are saying that if you create foo dir like
>>
>> epan/dissectors/asn1/foo/
>>
>> Rename and update the custom cmake file to
>>
>> set(CUSTOM_ASN1_SRC_DIR
>>
>>foo
>>
>> )
>>
>> And place your source file and cmake.txt in the foo dir then rerun the
>> cmake process
>>
>> Nothing happens?
>>
>> Try to delete the build dir  before rerunning cmake again?
>>
>> I’m not sure on linux if the generate cmake file ends up under the build
>> dir or in the source dir.
>>
>>
>>
>> Regards
>>
>> Anders
>>
>> *From:* Wireshark-dev  *On Behalf
>> Of *Vincent Randal
>> *Sent:* den 13 april 2021 15:32
>> *To:* Developer support list for Wireshark 
>> *Subject:* Re: [Wireshark-dev] How to build the simple ASN.1 UDP-based
>> dissector example (foo)
>>
>>
>>
>> I tried renaming ./epan/dissectors/asn1/CMakeListsCustom.txt.example to
>> CMakeListsCustom.txt with an entry as follows:
>>
>> # Add a list of your custom asn1 dissectors here
>> set(CUSTOM_ASN1_SRC_DIR
>>foo
>> )
>>
>>
>>
>> Again, the build did not update any targets even with that change. But
>> this is progress because that underscores the Step by Step instructions
>> need to be updated to something that works. Any more ideas?
>>
>>
>>
>> On Tue, Apr 13, 2021 at 7:12 AM John Thacker 
>> wrote:
>>
>> On Tue, Apr 13, 2021, 8:32 AM Vincent Randal  wrote:
>>
>> Hello everyone,
>>
>>
>>
>> I need help building the simple ASN.1 UDP-based dissector example (foo);
>> specifically, I need help building the generate_dissector-*proto* target
>> (Step #6 below). I'm certainly missing something here.
>>
>>
>>
>>
>>
>> (c) I created directory "foo" by extracting the attachment (foo.tgz) in
>> epan/dissectors/asn1/
>>
>> (d) There is a CMakeListsCustom.txt.example file in epan/dissectors/asn1
>> which already contains an entry for "foo".
>>
>> (e) Since I don't know what to do in Step #6, I build Wireshare (using
>> cmake), but no build targets get updated.
>>
>>
>>
>> If the solution to this problem belongs in the Wireshark documentation, I
>> would be glad to help update the documentation. Namely, I don't understand
>> the usage of the 5 (five) CMakeListsCustom.txt.example files inWireshark
>> source code.
>>
>>
>>
>> The CMakeListsCustom.txt.example files are just that, examples. You need
>> to copy or rename them to CMakeListsCustom.txt (without the .example) for
>> them to have

Re: [Wireshark-dev] How to build the simple ASN.1 UDP-based dissector example (foo)

2021-04-13 Thread Vincent Randal
I should give that a try. What version of Windows and tools are you using?
I’m beat. I need to do something that works soon.

On Tue, Apr 13, 2021 at 8:47 AM Anders Broman via Wireshark-dev <
wireshark-dev@wireshark.org> wrote:

> Hi,
>
> I don’t think they are generated what will be generated are the files
> needed to *DO *the generation.
>
> On windows the next step is to run
>
> msbuild /m /p:Configuration=RelWithDebInfo
> epan\dissectors\asn1\h248\generate_dissector-h248.vcxproj
>
> which will the generate the .c and .h files
>
> Regards
>
> Anders
>
>
>
> *From:* Wireshark-dev  *On Behalf Of
> *Vincent Randal
> *Sent:* den 13 april 2021 16:40
> *To:* Developer support list for Wireshark 
> *Subject:* Re: [Wireshark-dev] How to build the simple ASN.1 UDP-based
> dissector example (foo)
>
>
>
> Correct insofar as there are no generated files associated with asn1/foo
> directory. Namely, packet-foo.c and packet-foo.h did not get generated. But
> maybe that's not definitive proof that asn1/foo dissector did not get
> built. How else can I confirm the dissector was or was not built? Open
> Wireshark and attempt to apply "foo" as a display filter? It's not there.
>
>
>
> On Tue, Apr 13, 2021 at 8:10 AM Anders Broman via Wireshark-dev <
> wireshark-dev@wireshark.org> wrote:
>
> Hi,
>
> So you are saying that if you create foo dir like
>
> epan/dissectors/asn1/foo/
>
> Rename and update the custom cmake file to
>
> set(CUSTOM_ASN1_SRC_DIR
>
>foo
>
> )
>
> And place your source file and cmake.txt in the foo dir then rerun the
> cmake process
>
> Nothing happens?
>
> Try to delete the build dir  before rerunning cmake again?
>
> I’m not sure on linux if the generate cmake file ends up under the build
> dir or in the source dir.
>
>
>
> Regards
>
> Anders
>
> *From:* Wireshark-dev  *On Behalf Of
> *Vincent Randal
> *Sent:* den 13 april 2021 15:32
> *To:* Developer support list for Wireshark 
> *Subject:* Re: [Wireshark-dev] How to build the simple ASN.1 UDP-based
> dissector example (foo)
>
>
>
> I tried renaming ./epan/dissectors/asn1/CMakeListsCustom.txt.example to
> CMakeListsCustom.txt with an entry as follows:
>
> # Add a list of your custom asn1 dissectors here
> set(CUSTOM_ASN1_SRC_DIR
>foo
> )
>
>
>
> Again, the build did not update any targets even with that change. But
> this is progress because that underscores the Step by Step instructions
> need to be updated to something that works. Any more ideas?
>
>
>
> On Tue, Apr 13, 2021 at 7:12 AM John Thacker 
> wrote:
>
> On Tue, Apr 13, 2021, 8:32 AM Vincent Randal  wrote:
>
> Hello everyone,
>
>
>
> I need help building the simple ASN.1 UDP-based dissector example (foo);
> specifically, I need help building the generate_dissector-*proto* target
> (Step #6 below). I'm certainly missing something here.
>
>
>
>
>
> (c) I created directory "foo" by extracting the attachment (foo.tgz) in
> epan/dissectors/asn1/
>
> (d) There is a CMakeListsCustom.txt.example file in epan/dissectors/asn1
> which already contains an entry for "foo".
>
> (e) Since I don't know what to do in Step #6, I build Wireshare (using
> cmake), but no build targets get updated.
>
>
>
> If the solution to this problem belongs in the Wireshark documentation, I
> would be glad to help update the documentation. Namely, I don't understand
> the usage of the 5 (five) CMakeListsCustom.txt.example files inWireshark
> source code.
>
>
>
> The CMakeListsCustom.txt.example files are just that, examples. You need
> to copy or rename them to CMakeListsCustom.txt (without the .example) for
> them to have any effect (and edit them appropriately to add the dissector
> name to the list, not commented out.)
>
>
>
> CMake is configured to look for the files by that name.
>
>
>
> John Thacker
>
> ___
> 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] How to build the simple ASN.1 UDP-based dissector example (foo)

2021-04-13 Thread Anders Broman via Wireshark-dev
Hi,

I don’t think they are generated what will be generated are the files needed to 
DO the generation.

On windows the next step is to run

msbuild /m /p:Configuration=RelWithDebInfo  
epan\dissectors\asn1\h248\generate_dissector-h248.vcxproj

which will the generate the .c and .h files

Regards

Anders

 

From: Wireshark-dev  On Behalf Of Vincent 
Randal
Sent: den 13 april 2021 16:40
To: Developer support list for Wireshark 
Subject: Re: [Wireshark-dev] How to build the simple ASN.1 UDP-based dissector 
example (foo)

 

Correct insofar as there are no generated files associated with asn1/foo 
directory. Namely, packet-foo.c and packet-foo.h did not get generated. But 
maybe that's not definitive proof that asn1/foo dissector did not get built. 
How else can I confirm the dissector was or was not built? Open Wireshark and 
attempt to apply "foo" as a display filter? It's not there.

 

On Tue, Apr 13, 2021 at 8:10 AM Anders Broman via Wireshark-dev 
mailto:wireshark-dev@wireshark.org> > wrote:

Hi,

So you are saying that if you create foo dir like

epan/dissectors/asn1/foo/

Rename and update the custom cmake file to

set(CUSTOM_ASN1_SRC_DIR

   foo

)

And place your source file and cmake.txt in the foo dir then rerun the cmake 
process

Nothing happens?

Try to delete the build dir  before rerunning cmake again?

I’m not sure on linux if the generate cmake file ends up under the build dir or 
in the source dir.

 

Regards

Anders

From: Wireshark-dev mailto:wireshark-dev-boun...@wireshark.org> > On Behalf Of Vincent Randal
Sent: den 13 april 2021 15:32
To: Developer support list for Wireshark mailto:wireshark-dev@wireshark.org> >
Subject: Re: [Wireshark-dev] How to build the simple ASN.1 UDP-based dissector 
example (foo)

 

I tried renaming ./epan/dissectors/asn1/CMakeListsCustom.txt.example to 
CMakeListsCustom.txt with an entry as follows:

# Add a list of your custom asn1 dissectors here
set(CUSTOM_ASN1_SRC_DIR
   foo
)

 

Again, the build did not update any targets even with that change. But this is 
progress because that underscores the Step by Step instructions need to be 
updated to something that works. Any more ideas?

 

On Tue, Apr 13, 2021 at 7:12 AM John Thacker mailto:johnthac...@gmail.com> > wrote:

On Tue, Apr 13, 2021, 8:32 AM Vincent Randal mailto:vtran...@gmail.com> > wrote:

Hello everyone,

 

I need help building the simple ASN.1 UDP-based dissector example (foo); 
specifically, I need help building the generate_dissector-*proto* target (Step 
#6 below). I'm certainly missing something here.

 

 

(c) I created directory "foo" by extracting the attachment (foo.tgz) in 
epan/dissectors/asn1/

(d) There is a CMakeListsCustom.txt.example file in epan/dissectors/asn1 which 
already contains an entry for "foo". 

(e) Since I don't know what to do in Step #6, I build Wireshare (using cmake), 
but no build targets get updated.

 

If the solution to this problem belongs in the Wireshark documentation, I would 
be glad to help update the documentation. Namely, I don't understand the usage 
of the 5 (five) CMakeListsCustom.txt.example files inWireshark source code.

 

The CMakeListsCustom.txt.example files are just that, examples. You need to 
copy or rename them to CMakeListsCustom.txt (without the .example) for them to 
have any effect (and edit them appropriately to add the dissector name to the 
list, not commented out.)

 

CMake is configured to look for the files by that name.

 

John Thacker

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

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



smime.p7s
Description: S/MIME cryptographic signature
___
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] How to build the simple ASN.1 UDP-based dissector example (foo)

2021-04-13 Thread Vincent Randal
Correct insofar as there are no generated files associated with asn1/foo
directory. Namely, packet-foo.c and packet-foo.h did not get generated. But
maybe that's not definitive proof that asn1/foo dissector did not get
built. How else can I confirm the dissector was or was not built? Open
Wireshark and attempt to apply "foo" as a display filter? It's not there.

On Tue, Apr 13, 2021 at 8:10 AM Anders Broman via Wireshark-dev <
wireshark-dev@wireshark.org> wrote:

> Hi,
>
> So you are saying that if you create foo dir like
>
> epan/dissectors/asn1/foo/
>
> Rename and update the custom cmake file to
>
> set(CUSTOM_ASN1_SRC_DIR
>
>foo
>
> )
>
> And place your source file and cmake.txt in the foo dir then rerun the
> cmake process
>
> Nothing happens?
>
> Try to delete the build dir  before rerunning cmake again?
>
> I’m not sure on linux if the generate cmake file ends up under the build
> dir or in the source dir.
>
>
>
> Regards
>
> Anders
>
> *From:* Wireshark-dev  *On Behalf Of
> *Vincent Randal
> *Sent:* den 13 april 2021 15:32
> *To:* Developer support list for Wireshark 
> *Subject:* Re: [Wireshark-dev] How to build the simple ASN.1 UDP-based
> dissector example (foo)
>
>
>
> I tried renaming ./epan/dissectors/asn1/CMakeListsCustom.txt.example to
> CMakeListsCustom.txt with an entry as follows:
>
> # Add a list of your custom asn1 dissectors here
> set(CUSTOM_ASN1_SRC_DIR
>foo
> )
>
>
>
> Again, the build did not update any targets even with that change. But
> this is progress because that underscores the Step by Step instructions
> need to be updated to something that works. Any more ideas?
>
>
>
> On Tue, Apr 13, 2021 at 7:12 AM John Thacker 
> wrote:
>
> On Tue, Apr 13, 2021, 8:32 AM Vincent Randal  wrote:
>
> Hello everyone,
>
>
>
> I need help building the simple ASN.1 UDP-based dissector example (foo);
> specifically, I need help building the generate_dissector-*proto* target
> (Step #6 below). I'm certainly missing something here.
>
>
>
>
>
> (c) I created directory "foo" by extracting the attachment (foo.tgz) in
> epan/dissectors/asn1/
>
> (d) There is a CMakeListsCustom.txt.example file in epan/dissectors/asn1
> which already contains an entry for "foo".
>
> (e) Since I don't know what to do in Step #6, I build Wireshare (using
> cmake), but no build targets get updated.
>
>
>
> If the solution to this problem belongs in the Wireshark documentation, I
> would be glad to help update the documentation. Namely, I don't understand
> the usage of the 5 (five) CMakeListsCustom.txt.example files inWireshark
> source code.
>
>
>
> The CMakeListsCustom.txt.example files are just that, examples. You need
> to copy or rename them to CMakeListsCustom.txt (without the .example) for
> them to have any effect (and edit them appropriately to add the dissector
> name to the list, not commented out.)
>
>
>
> CMake is configured to look for the files by that name.
>
>
>
> John Thacker
>
> ___
> 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
___
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] How to build the simple ASN.1 UDP-based dissector example (foo)

2021-04-13 Thread Anders Broman via Wireshark-dev
Hi,

So you are saying that if you create foo dir like

epan/dissectors/asn1/foo/

Rename and update the custom cmake file to

set(CUSTOM_ASN1_SRC_DIR

   foo

)

And place your source file and cmake.txt in the foo dir then rerun the cmake 
process

Nothing happens?

Try to delete the build dir  before rerunning cmake again?

I’m not sure on linux if the generate cmake file ends up under the build dir or 
in the source dir.

 

Regards

Anders

From: Wireshark-dev  On Behalf Of Vincent 
Randal
Sent: den 13 april 2021 15:32
To: Developer support list for Wireshark 
Subject: Re: [Wireshark-dev] How to build the simple ASN.1 UDP-based dissector 
example (foo)

 

I tried renaming ./epan/dissectors/asn1/CMakeListsCustom.txt.example to 
CMakeListsCustom.txt with an entry as follows:

# Add a list of your custom asn1 dissectors here
set(CUSTOM_ASN1_SRC_DIR
   foo
)

 

Again, the build did not update any targets even with that change. But this is 
progress because that underscores the Step by Step instructions need to be 
updated to something that works. Any more ideas?

 

On Tue, Apr 13, 2021 at 7:12 AM John Thacker mailto:johnthac...@gmail.com> > wrote:

On Tue, Apr 13, 2021, 8:32 AM Vincent Randal mailto:vtran...@gmail.com> > wrote:

Hello everyone,

 

I need help building the simple ASN.1 UDP-based dissector example (foo); 
specifically, I need help building the generate_dissector-*proto* target (Step 
#6 below). I'm certainly missing something here.

 

 

(c) I created directory "foo" by extracting the attachment (foo.tgz) in 
epan/dissectors/asn1/

(d) There is a CMakeListsCustom.txt.example file in epan/dissectors/asn1 which 
already contains an entry for "foo". 

(e) Since I don't know what to do in Step #6, I build Wireshare (using cmake), 
but no build targets get updated.

 

If the solution to this problem belongs in the Wireshark documentation, I would 
be glad to help update the documentation. Namely, I don't understand the usage 
of the 5 (five) CMakeListsCustom.txt.example files inWireshark source code.

 

The CMakeListsCustom.txt.example files are just that, examples. You need to 
copy or rename them to CMakeListsCustom.txt (without the .example) for them to 
have any effect (and edit them appropriately to add the dissector name to the 
list, not commented out.)

 

CMake is configured to look for the files by that name.

 

John Thacker

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



smime.p7s
Description: S/MIME cryptographic signature
___
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] How to build the simple ASN.1 UDP-based dissector example (foo)

2021-04-13 Thread Vincent Randal
I tried renaming ./epan/dissectors/asn1/CMakeListsCustom.txt.example to
CMakeListsCustom.txt with an entry as follows:
# Add a list of your custom asn1 dissectors here
set(CUSTOM_ASN1_SRC_DIR
   foo
)

Again, the build did not update any targets even with that change. But this
is progress because that underscores the Step by Step instructions need to
be updated to something that works. Any more ideas?

On Tue, Apr 13, 2021 at 7:12 AM John Thacker  wrote:

> On Tue, Apr 13, 2021, 8:32 AM Vincent Randal  wrote:
>
>> Hello everyone,
>>
>> I need help building the simple ASN.1 UDP-based dissector example (foo);
>> specifically, I need help building the generate_dissector-*proto* target
>> (Step #6 below). I'm certainly missing something here.
>>
>>
>> (c) I created directory "foo" by extracting the attachment (foo.tgz) in
>> epan/dissectors/asn1/
>> (d) There is a CMakeListsCustom.txt.example file in epan/dissectors/asn1
>> which already contains an entry for "foo".
>> (e) Since I don't know what to do in Step #6, I build Wireshare (using
>> cmake), but no build targets get updated.
>>
>> If the solution to this problem belongs in the Wireshark documentation, I
>> would be glad to help update the documentation. Namely, I don't understand
>> the usage of the 5 (five) CMakeListsCustom.txt.example files inWireshark
>> source code.
>>
>
> The CMakeListsCustom.txt.example files are just that, examples. You need
> to copy or rename them to CMakeListsCustom.txt (without the .example) for
> them to have any effect (and edit them appropriately to add the dissector
> name to the list, not commented out.)
>
> CMake is configured to look for the files by that name.
>
> John Thacker
> ___
> 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] How to build the simple ASN.1 UDP-based dissector example (foo)

2021-04-13 Thread John Thacker
On Tue, Apr 13, 2021, 8:32 AM Vincent Randal  wrote:

> Hello everyone,
>
> I need help building the simple ASN.1 UDP-based dissector example (foo);
> specifically, I need help building the generate_dissector-*proto* target
> (Step #6 below). I'm certainly missing something here.
>
>
> (c) I created directory "foo" by extracting the attachment (foo.tgz) in
> epan/dissectors/asn1/
> (d) There is a CMakeListsCustom.txt.example file in epan/dissectors/asn1
> which already contains an entry for "foo".
> (e) Since I don't know what to do in Step #6, I build Wireshare (using
> cmake), but no build targets get updated.
>
> If the solution to this problem belongs in the Wireshark documentation, I
> would be glad to help update the documentation. Namely, I don't understand
> the usage of the 5 (five) CMakeListsCustom.txt.example files inWireshark
> source code.
>

The CMakeListsCustom.txt.example files are just that, examples. You need to
copy or rename them to CMakeListsCustom.txt (without the .example) for them
to have any effect (and edit them appropriately to add the dissector name
to the list, not commented out.)

CMake is configured to look for the files by that name.

John Thacker
___
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] How to build the simple ASN.1 UDP-based dissector example (foo)

2021-04-13 Thread Vincent Randal
I'm building Wireshark on Linux. Wireshark documentation refers to it as
UNIX or UNIX-like.

At the moment I'm using Ubuntu 18.04 LTS to build wireshark-3.4.4

On Tue, Apr 13, 2021 at 6:38 AM Anders Broman via Wireshark-dev <
wireshark-dev@wireshark.org> wrote:

> Hi,
>
> On what OS are you doing this?
>
> Regards
>
> Anders
>
>
>
> *From:* Wireshark-dev  *On Behalf Of
> *Vincent Randal
> *Sent:* den 13 april 2021 14:32
> *To:* Developer support list for Wireshark 
> *Subject:* [Wireshark-dev] How to build the simple ASN.1 UDP-based
> dissector example (foo)
>
>
>
> Hello everyone,
>
>
>
> I need help building the simple ASN.1 UDP-based dissector example (foo);
> specifically, I need help building the generate_dissector-*proto* target
> (Step #6 below). I'm certainly missing something here.
>
>
>
> I'm following the Step by Step instructions (shown below) to create the simple
> ASN1 UDP-based dissector
> <https://www.wireshark.org/docs/wsdg_html_chunked/SimpleASN1BasedDissector.html>
> mentioned in 14.2. ASN.1 Dissector Requirements
> <https://www.wireshark.org/docs/wsdg_html_chunked/Asn1DissectorRequirements.html>
> and I'm stuck on step #6. In this case *proto* = "foo" (the simple ASN1
> UDP-based dissector, attached to this email as foo.tgz).
> 14.7. Step By Step Instructions [Creating ASN.1 Dissectors]
>
>1. Create a directory for your protocol in the *epan/dissectors/asn1*
>directory and put your ASN.1 file there.
>2. Copy *CMakeLists.txt* from another ASN.1 dissector and edit it to
>suit your needs.
>3. Create a .cnf file either by copying an existing one and editing it
>or using the empty example above.
>4. Create template files either by copying suitable existing ones and
>editing them or use the examples above, putting your protocol name in the
>appropriate places.
>5. Add your dissector to *epan/dissectors/asn1/CMakeLists.txt*
>6. Test generating your dissector by building the
>*generate_dissector-*proto** target. <== how? using cmake?
>7. Depending on the outcome you may have to edit your .cnf file, ASN.1
>file etc…
>8. Build Wireshark. <== with cmake
>
> NOTES:
>
> (a) The above Step by Step instructions come from here:
>
>
> https://www.wireshark.org/docs/wsdg_html_chunked/ASN1StepByStepInstructions.html
>
> (b) Prior to attempting any dissector development I built and installed
> wireshark-3.4.4 successfully (using cmake).
>
> (c) I created directory "foo" by extracting the attachment (foo.tgz) in
> epan/dissectors/asn1/
>
> (d) There is a CMakeListsCustom.txt.example file in epan/dissectors/asn1
> which already contains an entry for "foo".
>
> (e) Since I don't know what to do in Step #6, I build Wireshare (using
> cmake), but no build targets get updated.
>
>
>
> If the solution to this problem belongs in the Wireshark documentation, I
> would be glad to help update the documentation. Namely, I don't understand
> the usage of the 5 (five) CMakeListsCustom.txt.example files inWireshark
> source code.
>
>
>
> Sincerely,
>
> Vincent Randal
> ___
> 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] How to build the simple ASN.1 UDP-based dissector example (foo)

2021-04-13 Thread Anders Broman via Wireshark-dev
Hi,

On what OS are you doing this?

Regards

Anders

 

From: Wireshark-dev  On Behalf Of Vincent 
Randal
Sent: den 13 april 2021 14:32
To: Developer support list for Wireshark 
Subject: [Wireshark-dev] How to build the simple ASN.1 UDP-based dissector 
example (foo)

 

Hello everyone,

 

I need help building the simple ASN.1 UDP-based dissector example (foo); 
specifically, I need help building the generate_dissector-*proto* target (Step 
#6 below). I'm certainly missing something here.

 

I'm following the Step by Step instructions (shown below) to create the simple 
ASN1 UDP-based dissector 
<https://www.wireshark.org/docs/wsdg_html_chunked/SimpleASN1BasedDissector.html>
  mentioned in 14.2. ASN.1 Dissector Requirements 
<https://www.wireshark.org/docs/wsdg_html_chunked/Asn1DissectorRequirements.html>
  and I'm stuck on step #6. In this case *proto* = "foo" (the simple ASN1 
UDP-based dissector, attached to this email as foo.tgz).


14.7. Step By Step Instructions [Creating ASN.1 Dissectors]


1.  Create a directory for your protocol in the epan/dissectors/asn1 
directory and put your ASN.1 file there. 
2.  Copy CMakeLists.txt from another ASN.1 dissector and edit it to suit 
your needs. 
3.  Create a .cnf file either by copying an existing one and editing it or 
using the empty example above. 
4.  Create template files either by copying suitable existing ones and 
editing them or use the examples above, putting your protocol name in the 
appropriate places. 
5.  Add your dissector to epan/dissectors/asn1/CMakeLists.txt 
6.  Test generating your dissector by building the 
generate_dissector-*proto* target. <== how? using cmake?
7.  Depending on the outcome you may have to edit your .cnf file, ASN.1 
file etc… 
8.  Build Wireshark. <== with cmake

NOTES:

(a) The above Step by Step instructions come from here:

https://www.wireshark.org/docs/wsdg_html_chunked/ASN1StepByStepInstructions.html

(b) Prior to attempting any dissector development I built and installed 
wireshark-3.4.4 successfully (using cmake).

(c) I created directory "foo" by extracting the attachment (foo.tgz) in 
epan/dissectors/asn1/

(d) There is a CMakeListsCustom.txt.example file in epan/dissectors/asn1 which 
already contains an entry for "foo". 

(e) Since I don't know what to do in Step #6, I build Wireshare (using cmake), 
but no build targets get updated.

 

If the solution to this problem belongs in the Wireshark documentation, I would 
be glad to help update the documentation. Namely, I don't understand the usage 
of the 5 (five) CMakeListsCustom.txt.example files inWireshark source code.

 

Sincerely,

Vincent Randal



smime.p7s
Description: S/MIME cryptographic signature
___
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

[Wireshark-dev] How to build the simple ASN.1 UDP-based dissector example (foo)

2021-04-13 Thread Vincent Randal
Hello everyone,

I need help building the simple ASN.1 UDP-based dissector example (foo);
specifically, I need help building the generate_dissector-*proto* target
(Step #6 below). I'm certainly missing something here.

I'm following the Step by Step instructions (shown below) to create the simple
ASN1 UDP-based dissector

mentioned in 14.2. ASN.1 Dissector Requirements

and I'm stuck on step #6. In this case *proto* = "foo" (the simple ASN1
UDP-based dissector, attached to this email as foo.tgz).
14.7. Step By Step Instructions [Creating ASN.1 Dissectors]

   1. Create a directory for your protocol in the *epan/dissectors/asn1*
   directory and put your ASN.1 file there.
   2. Copy *CMakeLists.txt* from another ASN.1 dissector and edit it to
   suit your needs.
   3. Create a .cnf file either by copying an existing one and editing it
   or using the empty example above.
   4. Create template files either by copying suitable existing ones and
   editing them or use the examples above, putting your protocol name in the
   appropriate places.
   5. Add your dissector to *epan/dissectors/asn1/CMakeLists.txt*
   6. Test generating your dissector by building the
   *generate_dissector-*proto** target. <== how? using cmake?
   7. Depending on the outcome you may have to edit your .cnf file, ASN.1
   file etc…
   8. Build Wireshark. <== with cmake

NOTES:
(a) The above Step by Step instructions come from here:
https://www.wireshark.org/docs/wsdg_html_chunked/ASN1StepByStepInstructions.html
(b) Prior to attempting any dissector development I built and installed
wireshark-3.4.4 successfully (using cmake).
(c) I created directory "foo" by extracting the attachment (foo.tgz) in
epan/dissectors/asn1/
(d) There is a CMakeListsCustom.txt.example file in epan/dissectors/asn1
which already contains an entry for "foo".
(e) Since I don't know what to do in Step #6, I build Wireshare (using
cmake), but no build targets get updated.

If the solution to this problem belongs in the Wireshark documentation, I
would be glad to help update the documentation. Namely, I don't understand
the usage of the 5 (five) CMakeListsCustom.txt.example files inWireshark
source code.

Sincerely,
Vincent Randal


foo.tgz
Description: application/compressed-tar
___
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