Naut/include/naut/dht.h
ookami125 b633b7d216 nautd/webui: scripting, labels, settings, set-location, pause fix
Session checkpoint on webui-plugin:
- engine dump (nautctl dump) + engine endgame integration
- per-file move locations persistence; torrent-level "Set location"
  with reset/keep-relative/leave-separate handling + residual prune
- Lua: naut.get_labels, define_settings/get_setting (script_host struct)
- daemon-owned labels (category+tags) + taxonomy persistence; webui write-through
- fix: pausing a completed/seeding torrent now sticks (stop wins over result)
- automation tab responsive layout; anime_sort label gating + settings

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 23:19:41 -04:00

19 lines
708 B
C

/* dht.h - bounded IPv4 BEP-5 get_peers traversal (KRPC codec from
* torrent-tracker; iterative walk + UDP socket in src/discovery). */
#ifndef NAUT_DHT_H
#define NAUT_DHT_H
#include "naut/common.h"
#include "naut/tracker.h"
#define NAUT_DHT_ID_LEN 20
#define NAUT_DHT_MAX_NODES 256
#define NAUT_DHT_MAX_PEERS 256
/* Query bootstrap endpoints ("host:port") and iteratively follow returned
* compact nodes until peers are found or the bounded traversal is exhausted. */
naut_err naut_dht_get_peers(const char *const *bootstrap, size_t num_bootstrap,
const uint8_t info_hash[20],
naut_peer_addr **peers, size_t *num_peers);
#endif /* NAUT_DHT_H */