From 974a15bf74df43e1d431bec84d5043ef8b8059df Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Mon, 9 Apr 2018 12:11:26 +0800 Subject: [PATCH] Docs: Remove a bunch of GTK+ references. Change-Id: Icab98813d0b81a7337562e9857429d4bb98dc44c Reviewed-on: https://code.wireshark.org/review/26817 Petri-Dish: Gerald Combs Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs --- doc/README.capture | 74 ++++----- doc/README.display_filter | 6 +- doc/README.plugins | 4 - doc/README.tapping | 4 +- doc/wireshark.pod.template | 17 +- .../WSDG_chapter_build_intro.asciidoc | 8 +- .../wsdg_src/WSDG_chapter_env_intro.asciidoc | 2 +- .../wsdg_src/WSDG_chapter_libraries.asciidoc | 54 ++---- .../wsdg_src/WSDG_chapter_sources.asciidoc | 10 +- .../WSDG_chapter_userinterface.asciidoc | 156 +----------------- docbook/wsdg_src/WSDG_chapter_works.asciidoc | 2 +- .../WSUG_chapter_build_install.asciidoc | 9 +- docbook/wsug_src/WSUG_chapter_io.asciidoc | 2 +- 13 files changed, 79 insertions(+), 269 deletions(-) diff --git a/doc/README.capture b/doc/README.capture index 5cddb2cdef..a453eecf71 100644 --- a/doc/README.capture +++ b/doc/README.capture @@ -1,10 +1,10 @@ -This document is an attempt, to bring some light to the things done, when -packet capturing is performed. There might be things missing, and others -maybe wrong :-( The following will concentrate a bit on the win32 gtk -port of wireshark. +This document is an attempt, to bring some light to the things done, when +packet capturing is performed. There might be things missing, and others +maybe wrong :-( The following will concentrate a bit on the Windows +port of Wireshark. -XXX: when ongoing file reorganization will be completed, the following +XXX: when ongoing file reorganization will be completed, the following two lists maybe won't be needed any longer! libpcap related source files: @@ -36,11 +36,11 @@ conditions.h Capture driver -------------- -Wireshark doesn't have direct access to the capture hardware. Instead of this, +Wireshark doesn't have direct access to the capture hardware. Instead of this, it uses the Libpcap/Winpcap library to capture data from network cards. -On Win32, in capture-wpcap.c the function ws_module_open("wpcap.dll") is called -to load the wpcap.dll. This dll includes all functions needed for +On Win32, in capture-wpcap.c the function ws_module_open("wpcap.dll") is called +to load the wpcap.dll. This dll includes all functions needed for packet capturing. @@ -53,8 +53,8 @@ There are some kinds of targets to put the capture data into: -user specified "single" capture file -user specified "ringbuffer" capture file -Which kind of file is used depends on the user settings. In principle there -is no difference in handling these files, so if not otherwise notified, +Which kind of file is used depends on the user settings. In principle there +is no difference in handling these files, so if not otherwise notified, it will be called the capture file. The capture file is stored, using the wiretap library. @@ -62,70 +62,70 @@ The capture file is stored, using the wiretap library. Overview -------- -Capturing is done using a two task model: the currently running (parent) -process will spawn a child process to do the real capture work, namely -controlling libpcap. This two task model is used because it's necessary +Capturing is done using a two task model: the currently running (parent) +process will spawn a child process to do the real capture work, namely +controlling libpcap. This two task model is used because it's necessary to split the capturing process (which should avoid packet drop) from the parent process which might need significant time to display the data. -When a capture is started, the parent builds a "command line" and creates a -new child process with it. A pipe from the child to the parent is created -which is used to transfer control messages. +When a capture is started, the parent builds a "command line" and creates a +new child process with it. A pipe from the child to the parent is created +which is used to transfer control messages. The child will init libpcap and send the parent a "new capture file is used" control message through the pipe. -The child cyclically takes the packet data from libpcap and saves it to disk. -From time to time it will send the parent a "new packets" control message. +The child cyclically takes the packet data from libpcap and saves it to disk. +From time to time it will send the parent a "new packets" control message. -If the parent process receives this "new packets" message and the option -"Update list of packets in real time" is used, it will read the packet data +If the parent process receives this "new packets" message and the option +"Update list of packets in real time" is used, it will read the packet data from the file, dissect and display it. -If the user wants to stop the capture, this can be done in two ways: by -menu/toolbar of the parent process or the Stop button of the child processes +If the user wants to stop the capture, this can be done in two ways: by +menu/toolbar of the parent process or the Stop button of the child processes dialog box (which obviously cannot be used it this dialog is hidden). -The Stop button will stop the capture itself, close the control pipe and then +The Stop button will stop the capture itself, close the control pipe and then closes itself. The parent will detect this and stop its part of the capture. -If the menu/toolbar is used, the parent will send a break signal to the child +If the menu/toolbar is used, the parent will send a break signal to the child which will lead to the same sequence as described above. -Win32 only: as the windows implementation of signals simply doesn't work, -another pipe from the parent to the child is used to send a "close capture" +Win32 only: as the windows implementation of signals simply doesn't work, +another pipe from the parent to the child is used to send a "close capture" message instead of a signal. Start capture ------------- -A capture is started, by specifying to start the capture at the command line, -trigger the OK button in the "Capture Options" dialog box and some more. The -capture start is actually done by calling the capture_start() function in +A capture is started, by specifying to start the capture at the command line, +trigger the OK button in the "Capture Options" dialog box and some more. The +capture start is actually done by calling the capture_start() function in capture.c. Capture child (Loop) -------------------- The capture child will open the target capture file, prepare pcap things, -init stop conditions, init the capture statistic dialog (if not hidden) and +init stop conditions, init the capture statistic dialog (if not hidden) and start a loop which is running until the flag ld.go is FALSE. -Inside this loop, +Inside this loop, --gtk main things are updated +-Qt main things are updated -pcap_dispatch(capture_pcap_cb) is called -the capture stop conditions are checked (ld.go is set to FALSE to finish) -update the capture statistic dialog (if not hidden) -While this loop is running, the pcap_dispatch() will call capture_pcap_cb() -for every packet captured. Inside this, the packet data is converted into -wtap (wiretap) format and saved to file. Beside saving, it is trying to -do some basic dissecting (for the statistic window), by calling the +While this loop is running, the pcap_dispatch() will call capture_pcap_cb() +for every packet captured. Inside this, the packet data is converted into +wtap (wiretap) format and saved to file. Beside saving, it is trying to +do some basic dissecting (for the statistic window), by calling the appropriate capture_xxx function. -When the user triggered a capture stop or one of the capture stop conditions +When the user triggered a capture stop or one of the capture stop conditions matched, the ld.go flag is set to FALSE, and the loop will stop shortly after. diff --git a/doc/README.display_filter b/doc/README.display_filter index ce1df39e91..85ce9de6b3 100644 --- a/doc/README.display_filter +++ b/doc/README.display_filter @@ -367,7 +367,7 @@ in the proto_tree, then we jump to instruction 3. 00002 ANY_EQ reg#0 == reg#1 -This checks to see if any of the fields in register 0 +This checks to see if any of the fields in register 0 (which has the pre-loaded constant value of 127.0.0.1) are equal to any of the fields in register 1 (which are all of the ip.addr fields in the proto tree). The resulting value in the @@ -550,8 +550,8 @@ Go to wireshark/ and run make. One thing to do is make dftest and see if you can construct valid display filters with your new operator. Or you may want to move directly to the generation of Wireshark. -Look also at wireshark/gtk/dfilter_expr_dlg.c and edit the display filter -expression generator. +Also look at ui/qt/display_filter_expression_dialog.cpp and the display +filter expression generator. How to add a new test to dfilter-test.py ======================================== diff --git a/doc/README.plugins b/doc/README.plugins index 14b1896870..b8f716a3d2 100644 --- a/doc/README.plugins +++ b/doc/README.plugins @@ -348,10 +348,6 @@ The menu entries themselves are generated with the following code structure: ext_menubar_add_entry(os_menu, "Test Entry B", NULL, menu_cb, ); -This will not work with the GTK version on macOS; the GTK interface is -currently not supported on this platform. The Qt interface on macOS -provides the menu. - For a more detailed information, please refer to plugin_if.h 6.2 Implement interactions with the main interface diff --git a/doc/README.tapping b/doc/README.tapping index 56b7a4ba1c..5c62a475f0 100644 --- a/doc/README.tapping +++ b/doc/README.tapping @@ -5,7 +5,7 @@ internals are required. As examples on how to use the tap system see the implementation of tap-rpcstat.c (tshark version) -gtk/rpc_stat.c (gtk-wireshark version) +ui/qt/rpc_service_response_time_dialog.cpp (wireshark version) If all you need is to keep some counters, there's the stats_tree API, which offers a simple way to make a GUI and tshark tap-listener; see @@ -151,7 +151,7 @@ void (*draw)(void *tapdata) This callback is used when Wireshark wants your application to redraw its output. It will usually not be called unless your application has received new data through the (*packet) callback. -On some ports of Wireshark (gtk2) (*draw) will be called asynchronously +On some ports of Wireshark (Qt) (*draw) will be called asynchronously from a separate thread up to once every 2-3 seconds. On other ports it might only be called once when the capture is finished or the file has been [re]read completely. diff --git a/doc/wireshark.pod.template b/doc/wireshark.pod.template index a5960f22a4..039fb7138f 100644 --- a/doc/wireshark.pod.template +++ b/doc/wireshark.pod.template @@ -1522,10 +1522,9 @@ Below the drawing area and the scrollbar are the controls. On the bottom left there will be five similar sets of controls to control each individual graph such as "Display: