Wireshark-dev: Re: [Wireshark-dev] How to build the simple ASN.1 UDP-based dissector example (f
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.
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).
Hi Vicent,
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.
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
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.
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
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?
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.
___________________________________________________________________________
Sent via: Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives: https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe
___________________________________________________________________________
Sent via: Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives: https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe
___________________________________________________________________________
Sent via: Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives: https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe
___________________________________________________________________________
Sent via: Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives: https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe
___________________________________________________________________________
Sent via: Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives: https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe
___________________________________________________________________________
Sent via: Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives: https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe