source: a synthetic probe kind, and sessions that remember their source kind

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Martino FerrariandClaude Opus 4.6 committed 2026-10-31 20:04:42 +01:00
1 parent 4ae91bd58b
commit 059b660586
9 files changed
+231 -3

No files matched your search

+10 -2
View File
@@ -33,6 +33,7 @@
#include "model.hpp"
#include "plot_host.hpp"
#include "search.hpp"
#include "source/registry.hpp"
#include "source_dialog.hpp"
#include <adwaita.h>
@@ -100,8 +101,7 @@ void open_configurations(App& app) {
GtkWidget* title = gtk_label_new(nullptr);
gtk_label_set_markup(GTK_LABEL(title),
("<b>" + app.source_host + ":" + std::to_string(app.source_port) +
"</b>")
("<b>" + app.source_title + "</b>")
.c_str());
gtk_widget_set_halign(title, GTK_ALIGN_START);
gtk_box_append(GTK_BOX(box), title);
@@ -5918,6 +5918,14 @@ int run_ui(int argc, char** argv, const Config& cfg, ScopeModel& model, Acquisit
app.source_port = cfg.open_waveform.empty() ? cfg.session_port() : 0;
app.source_multicast = cfg.open_waveform.empty() ? cfg.multicast : std::string();
app.source_interface = cfg.interface_addr;
app.source_kind = cfg.source_kind;
app.source_opts = cfg.source_opts;
if (cfg.source_kind != "udps" && find_kind(cfg.source_kind) != nullptr) {
app.source_title = find_kind(cfg.source_kind)->display_name() + " " +
find_kind(cfg.source_kind)->identity(cfg.source_config());
} else {
app.source_title = app.source_host + ":" + std::to_string(app.source_port);
}
// The event cache is keyed on the source, like the packet capture. A waveform has no source, so a
// file-mode run has no cache either -- there are no latches in a file.
if (!app.source_host.empty() && app.source_port != 0) {