nx_dht_ping.nx
buildroot/runtime/nx_dht_ping.nx
about
nx_dht_ping.nx -- LIVE DHT reachability probe (X-TORRENT-LIVE-002 R4b). Resolves real BEP-5
bootstrap nodes and KRPC-pings them over UDP:6881; GREEN if any returns a valid response dict.
This is the EMPIRICAL test of whether the DHT is reachable from here, or whether the ISP/network
blocks UDP:6881 (the same class of blocking that already kills UDP tracker ports :1337/:6969).
Composes nx_dht (KRPC build/parse) + nx_dns_a (resolve) + raw UDP syscalls. NO external resolver.
license_tier: ORIGINAL layer: peer-discovery probe
module: nishi-core.torrent.dht_ping
depends: nishi-core.torrent.dht, nishi-core.dns_a
dependencies 2 imports · 0 importers
imports: nx_dht.nxnx_dns_a.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 11 | const K_MAGIC_6881: i64 = 6881 |
| 12 | const K_MAGIC_2048: i64 = 2048 |
functions
| 14 | func dp_strlen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } called by 1: dp_p2 |
| 15 | func dp_p2(s: *u8) -> i64 { sys_write(1, s, dp_strlen(s)); return 0 } |
| 17 | func dp_sockaddr(out: *u8, port: i64, a: i64, b: i64, c: i64, d: i64) -> i64 called by 1: dp_try |
| 26 | func dp_try(host: *u8, nid: *u8) -> i64 called by 1: main calls 9: nx_dns_a_resolvedp_p2sys_socketsys_set_socket_timeoutdp_sockaddrdht_build_ping+3 |
| 43 | func main() -> i64 |