Re: [Wireshark-dev] Its possible to build and run wireshark from IDE
Hello Tomer, W dniu 2018-11-08 10:46, Guy Harris napisaĆ(a): On Nov 8, 2018, at 12:52 AM, Dario Lombardo wrote: On Wed, Nov 7, 2018 at 5:39 PM Tomer Bar wrote: i want to expose the validation of the display filter and use it like service? any idea? Do you want to do it programmatically (I mean you have a C code and you want to link with wireshark in some way) or can you do it running binary tshark? If the latter, you can run "tshark -Y FILTER" and check the return code. 2 means error in the filter. You need something more that that, but it may be a starting point. Or use "dftest FILTER" - redirect its standard output and error to the null device (/dev/null on UN*X or NUL: on Windows), and check the exit status - again, 2 is an error, 0 is no error: (...) if you would like to have JSON output instead you can use sharkd: $ echo '{"req":"check","filter":"ip.addr == 127.0.0.1"}' | build/run/sharkd - 2>/dev/null {"err":0,"filter":"ok"} for HTTP service you can use demo.webshark.io: $ wget -q -O - 'http://demo.webshark.io/webshark/json?req=check=ip.addr != 127.0.0.1'; echo {"err":0,"filter":"warn"} filter JSON key can be also like: {"err":0,"filter":"\"foobar\" is not a valid hostname or IPv4 address."} ___ 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] Its possible to build and run wireshark from IDE
On Nov 8, 2018, at 12:52 AM, Dario Lombardo wrote: > On Wed, Nov 7, 2018 at 5:39 PM Tomer Bar wrote: >> i want to expose the validation of the display filter and use it like >> service? >> any idea? > > Do you want to do it programmatically (I mean you have a C code and you want > to link with wireshark in some way) or can you do it running binary tshark? > If the latter, you can run "tshark -Y FILTER" and check the return code. 2 > means error in the filter. You need something more that that, but it may be a > starting point. Or use "dftest FILTER" - redirect its standard output and error to the null device (/dev/null on UN*X or NUL: on Windows), and check the exit status - again, 2 is an error, 0 is no error: $ build/run/dftest 'not a valid filter' >/dev/null 2>&1 $ echo $? 2 $ build/run/dftest 'ip.addr == 127.0.0.1' >/dev/null 2>&1 $ echo $? 0 ___ 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] Its possible to build and run wireshark from IDE
On Wed, Nov 7, 2018 at 5:39 PM Tomer Bar wrote: > i want to expose the validation of the display filter and use it like > service? > any idea? > > Do you want to do it programmatically (I mean you have a C code and you want to link with wireshark in some way) or can you do it running binary tshark? If the latter, you can run "tshark -Y FILTER" and check the return code. 2 means error in the filter. You need something more that that, but it may be a starting point. ___ 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] Its possible to build and run wireshark from IDE
On Wed, 7 Nov 2018 at 16:39, Tomer Bar wrote: > Hi, > I a new in wireshark development, > can you tell me if its possible to import the all source code to > eclipse?build it?debug it?and run it? > otherwise, there is any IDE that can do it? > That's not directly supported but as we use CMake to generate the build files and that has support for a number of generators that do produce IDE build files it might be possible. See here for the list of CMake generators: https://cmake.org/cmake/help/v3.13/manual/cmake-generators.7.html i want to expose the validation of the display filter and use it like > service? > any idea? > > I think that display filters are somewhat integral to the Wireshark dissection engine so that might be difficult to break out. > > Tnx, > Tomer > -- 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] Its possible to build and run wireshark from IDE
Hi Wireshark is based on the meta-build system make. Therefore you can use pretty much any IDE you want to use. Personally I am using QtCreator, which works if you use "CodeBuilder - Ninja" as a cmake target and import the generated CMakeLists.txt in QtCreator. kind regards Roland Am Mi., 7. Nov. 2018 um 17:39 Uhr schrieb Tomer Bar < tomer.turman...@gmail.com>: > Hi, > I a new in wireshark development, > can you tell me if its possible to import the all source code to > eclipse?build it?debug it?and run it? > otherwise, there is any IDE that can do it? > i want to expose the validation of the display filter and use it like > service? > any idea? > > > Tnx, > Tomer > ___ > 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