/* 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 */