diff options
author | Thomas Dreibholz <dreibh@simula.no> | 2021-02-22 12:48:46 +0100 |
---|---|---|
committer | Thomas Dreibholz <dreibh@simula.no> | 2021-02-22 12:48:46 +0100 |
commit | 2e7f2ffb7ae0b56646b96321cfaa3920dc5903c6 (patch) | |
tree | 64aa1fbb4a3e2d03ce381ea1ee8409e4f366fff8 /ui/qt | |
parent | a57a32c04e0e0a9b709af69fb1e6377e049a14b5 (diff) |
Added "Follow DCCP stream" feature.
This pull request includes:
* The "Follow DCCP stream" feature.
* Updated docbook documentation for the "Follow DCCP stream" feature.
* Test for the feature.
* Corresponding packet trace for the test.
Diffstat (limited to 'ui/qt')
-rw-r--r-- | ui/qt/follow_stream_dialog.cpp | 17 | ||||
-rw-r--r-- | ui/qt/main_window.h | 1 | ||||
-rw-r--r-- | ui/qt/main_window.ui | 11 | ||||
-rw-r--r-- | ui/qt/main_window_slots.cpp | 9 | ||||
-rw-r--r-- | ui/qt/packet_list.cpp | 1 | ||||
-rw-r--r-- | ui/qt/proto_tree.cpp | 1 |
6 files changed, 39 insertions, 1 deletions
diff --git a/ui/qt/follow_stream_dialog.cpp b/ui/qt/follow_stream_dialog.cpp index 2489f75e93..f700c9d224 100644 --- a/ui/qt/follow_stream_dialog.cpp +++ b/ui/qt/follow_stream_dialog.cpp @@ -16,6 +16,7 @@ #include "epan/follow.h" #include "epan/dissectors/packet-tcp.h" #include "epan/dissectors/packet-udp.h" +#include "epan/dissectors/packet-dccp.h" #include "epan/dissectors/packet-http2.h" #include "epan/dissectors/packet-quic.h" #include "epan/prefs.h" @@ -93,6 +94,9 @@ FollowStreamDialog::FollowStreamDialog(QWidget &parent, CaptureFile &cf, follow_ case FOLLOW_UDP: follower_ = get_follow_by_name("UDP"); break; + case FOLLOW_DCCP: + follower_ = get_follow_by_name("DCCP"); + break; case FOLLOW_HTTP: follower_ = get_follow_by_name("HTTP"); break; @@ -519,6 +523,7 @@ FollowStreamDialog::readStream() case FOLLOW_TCP : case FOLLOW_UDP : + case FOLLOW_DCCP : case FOLLOW_HTTP : case FOLLOW_HTTP2: case FOLLOW_QUIC: @@ -941,6 +946,18 @@ bool FollowStreamDialog::follow(QString previous_filter, bool use_stream_index, break; } + case FOLLOW_DCCP: + { + int stream_count = get_dccp_stream_count(); + ui->streamNumberSpinBox->blockSignals(true); + ui->streamNumberSpinBox->setMaximum(stream_count-1); + ui->streamNumberSpinBox->setValue(stream_num); + ui->streamNumberSpinBox->blockSignals(false); + ui->streamNumberSpinBox->setToolTip(tr("%Ln total stream(s).", "", stream_count)); + ui->streamNumberLabel->setToolTip(ui->streamNumberSpinBox->toolTip()); + + break; + } case FOLLOW_HTTP2: { int stream_count = get_tcp_stream_count(); diff --git a/ui/qt/main_window.h b/ui/qt/main_window.h index f7dc597030..c8f3e46d8c 100644 --- a/ui/qt/main_window.h +++ b/ui/qt/main_window.h @@ -574,6 +574,7 @@ private slots: void openFollowStreamDialogForType(follow_type_t type); void on_actionAnalyzeFollowTCPStream_triggered(); void on_actionAnalyzeFollowUDPStream_triggered(); + void on_actionAnalyzeFollowDCCPStream_triggered(); void on_actionAnalyzeFollowTLSStream_triggered(); void on_actionAnalyzeFollowHTTPStream_triggered(); void on_actionAnalyzeFollowHTTP2Stream_triggered(); diff --git a/ui/qt/main_window.ui b/ui/qt/main_window.ui index d33df6e877..4c1f1eaaf1 100644 --- a/ui/qt/main_window.ui +++ b/ui/qt/main_window.ui @@ -1710,6 +1710,17 @@ <string notr="true">Ctrl+Alt+Shift+U</string> </property> </action> + <action name="actionAnalyzeFollowDCCPStream"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>DCCP Stream</string> + </property> + <property name="shortcut"> + <string notr="true">Ctrl+Alt+Shift+E</string> + </property> + </action> <action name="actionAnalyzeFollowTLSStream"> <property name="enabled"> <bool>false</bool> diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp index fcf2b99f31..669bf301c1 100644 --- a/ui/qt/main_window_slots.cpp +++ b/ui/qt/main_window_slots.cpp @@ -1123,7 +1123,7 @@ void MainWindow::recentActionTriggered() { void MainWindow::setMenusForSelectedPacket() { - gboolean is_ip = FALSE, is_tcp = FALSE, is_udp = FALSE, is_sctp = FALSE, is_tls = FALSE, is_rtp = FALSE, is_lte_rlc = FALSE, + gboolean is_ip = FALSE, is_tcp = FALSE, is_udp = FALSE, is_dccp = FALSE, is_sctp = FALSE, is_tls = FALSE, is_rtp = FALSE, is_lte_rlc = FALSE, is_http = FALSE, is_http2 = FALSE, is_quic = FALSE; /* Making the menu context-sensitive allows for easier selection of the @@ -1193,6 +1193,7 @@ void MainWindow::setMenusForSelectedPacket() proto_get_frame_protocols(capture_file_.capFile()->edt->pi.layers, &is_ip, &is_tcp, &is_udp, &is_sctp, &is_tls, &is_rtp, &is_lte_rlc); + is_dccp = proto_is_frame_protocol(capture_file_.capFile()->edt->pi.layers, "dccp"); is_http = proto_is_frame_protocol(capture_file_.capFile()->edt->pi.layers, "http"); is_http2 = proto_is_frame_protocol(capture_file_.capFile()->edt->pi.layers, "http2"); is_quic = proto_is_frame_protocol(capture_file_.capFile()->edt->pi.layers, "quic"); @@ -1237,6 +1238,7 @@ void MainWindow::setMenusForSelectedPacket() main_ui_->actionAnalyzeFollowTCPStream->setEnabled(is_tcp); main_ui_->actionAnalyzeFollowUDPStream->setEnabled(is_udp); + main_ui_->actionAnalyzeFollowDCCPStream->setEnabled(is_dccp); main_ui_->actionAnalyzeFollowTLSStream->setEnabled(is_tls); main_ui_->actionAnalyzeFollowHTTPStream->setEnabled(is_http); main_ui_->actionAnalyzeFollowHTTP2Stream->setEnabled(is_http2); @@ -2880,6 +2882,11 @@ void MainWindow::on_actionAnalyzeFollowUDPStream_triggered() openFollowStreamDialogForType(FOLLOW_UDP); } +void MainWindow::on_actionAnalyzeFollowDCCPStream_triggered() +{ + openFollowStreamDialogForType(FOLLOW_DCCP); +} + void MainWindow::on_actionAnalyzeFollowTLSStream_triggered() { openFollowStreamDialogForType(FOLLOW_TLS); diff --git a/ui/qt/packet_list.cpp b/ui/qt/packet_list.cpp index 6978bc675f..2d1c3dbfc3 100644 --- a/ui/qt/packet_list.cpp +++ b/ui/qt/packet_list.cpp @@ -683,6 +683,7 @@ void PacketList::contextMenuEvent(QContextMenuEvent *event) ctx_menu->addMenu(submenu); submenu->addAction(window()->findChild<QAction *>("actionAnalyzeFollowTCPStream")); submenu->addAction(window()->findChild<QAction *>("actionAnalyzeFollowUDPStream")); + submenu->addAction(window()->findChild<QAction *>("actionAnalyzeFollowDCCPStream")); submenu->addAction(window()->findChild<QAction *>("actionAnalyzeFollowTLSStream")); submenu->addAction(window()->findChild<QAction *>("actionAnalyzeFollowHTTPStream")); submenu->addAction(window()->findChild<QAction *>("actionAnalyzeFollowHTTP2Stream")); diff --git a/ui/qt/proto_tree.cpp b/ui/qt/proto_tree.cpp index 8a52142ca9..91d8badce6 100644 --- a/ui/qt/proto_tree.cpp +++ b/ui/qt/proto_tree.cpp @@ -304,6 +304,7 @@ void ProtoTree::contextMenuEvent(QContextMenuEvent *event) ctx_menu.addMenu(submenu); submenu->addAction(window()->findChild<QAction *>("actionAnalyzeFollowTCPStream")); submenu->addAction(window()->findChild<QAction *>("actionAnalyzeFollowUDPStream")); + submenu->addAction(window()->findChild<QAction *>("actionAnalyzeFollowDCCPStream")); submenu->addAction(window()->findChild<QAction *>("actionAnalyzeFollowTLSStream")); submenu->addAction(window()->findChild<QAction *>("actionAnalyzeFollowHTTPStream")); submenu->addAction(window()->findChild<QAction *>("actionAnalyzeFollowHTTP2Stream")); |