- Add ed25519_public_key[32] to NODEINFO struct for pubkey distribution - Add ed25519_public_key[32] to ROUTE_BGP (derived from X25519 privkey at init) - Add ROUTER_FLAG_SIGNED (0x08) to SVC_ROUTE_HDR flags byte - router_send_one_flags: when is_signed, sign [hdr][payload] and append 64-byte sig - etcp_router_recv_cb: verify Ed25519 signature when ROUTER_FLAG_SIGNED set - New API: etcp_router_conn_send_signed() - Drop signed packets if sender node not in routing table or no Ed25519 key - 5 unit tests in test_etcp_router_unit.c covering OK/tampered/unknown/no-key/short
15 lines
385 B
C
15 lines
385 B
C
#ifndef ROUTE_NODE_LMDB_H
|
|
#define ROUTE_NODE_LMDB_H
|
|
|
|
#include <stdint.h>
|
|
#include "route_node.h"
|
|
|
|
struct ROUTE_BGP;
|
|
|
|
int route_node_lmdb_init(struct ROUTE_BGP* bgp, const char* db_path);
|
|
void route_node_lmdb_destroy(struct ROUTE_BGP* bgp);
|
|
int route_node_lmdb_put(struct ROUTE_BGP* bgp, struct NODEINFO_Q* nq);
|
|
int route_node_lmdb_del(struct ROUTE_BGP* bgp, uint64_t node_id);
|
|
|
|
#endif
|