- etcp_metrics struct: 12-bucket RTT histogram, 11-bucket loss histogram, 10-min snapshots (>=200 pkts) - Total counters: packets/bytes sent/rcvd, losses (retrans + probe gap detection) - CSV append to <stats_dir>/<peer_id>.dat every 10 min - Ed25519 pubkey exchange in INIT handshake (V3), always present - Signed metrics exchange via ETCP_SECTION_METRICS (0x0A) - Received metrics saved as from_<peer_id>.dat with signature hex - on_metrics_rcvd callback in ETCP_BINDINGS - stats_dir derived from config file path, mkdir'd at instance init - Simplified versioning: ETCP_INIT_REQ_SIZE / ETCP_INIT_RESP_SIZE via sizeof
28 lines
631 B
C++
28 lines
631 B
C++
// settingsdialog.h — Settings dialog with category list
|
|
#pragma once
|
|
|
|
#include <QDialog>
|
|
#include <QListWidget>
|
|
#include <QStackedWidget>
|
|
#include <QPushButton>
|
|
#include <QString>
|
|
|
|
class NetworkSettingsPage;
|
|
|
|
class SettingsDialog : public QDialog {
|
|
Q_OBJECT
|
|
public:
|
|
explicit SettingsDialog(const QString& configPath, QWidget* parent = nullptr);
|
|
|
|
private slots:
|
|
void onCategoryChanged(int row);
|
|
void onSave();
|
|
|
|
private:
|
|
QString m_configPath;
|
|
QListWidget* m_categoryList;
|
|
QStackedWidget* m_pages;
|
|
QPushButton* m_saveBtn;
|
|
NetworkSettingsPage* m_networkPage;
|
|
};
|