Files
utun2/tools/chatgui/src/flagpainter.h
T
evgeny eaeb763412 e2e: AES-128-CCM encryption via BGP router (ROUTER_FLAG_ENCRYPTED), ECDH key per peer-pair from NODEINFO pubkeys, cache 8 entries
- etcp_router.h/c: new flag ROUTER_FLAG_ENCRYPTED (0x04), etcp_route_send_encrypted(), inflight/retrans/send_q support
- utun_instance.h: e2e_ctx_cache[8] — per-peer sc_context_t cache with derived session key
- topo_node.c: topo_node_sign_self() — single point for Ed25519 self-signing of NODEINFO
- topo_node.c: fix stale x25519_self_sig after address update (topo_node_sign_self call)
- nat_detection.c: fix stale x25519_self_sig after in-place socket meta modification
- test_etcp_router_unit: 5 E2E tests (basic round-trip, no NODEINFO drop, tampered, cache reuse, ENCRYPTED+SIGNED combined)
- builds clean, 70/70 tests pass
2026-08-09 08:19:20 +03:00

23 lines
521 B
C++

#ifndef FLAGPAINTER_H
#define FLAGPAINTER_H
#include <QPainter>
#include <QColor>
#include <stdint.h>
#define MEMBER_FLAG_SUPERNODE 0x01
#define MEMBER_FLAG_ADMIN 0x02
#define MEMBER_FLAG_MODER 0x04
class FlagPainter {
public:
static void draw(QPainter* p, uint8_t flags, int x, int y, int sz);
private:
static void drawLightning(QPainter* p, int x, int y, int sz);
static void drawStar(QPainter* p, int x, int y, int sz);
static void drawShield(QPainter* p, int x, int y, int sz);
};
#endif