nx_seed_announce_all.nx
buildroot/runtime/nx_seed_announce_all.nx
about
nx_seed_announce_all.nx -- DURABLE DHT discoverability for the seeder: periodically announce_peer EVERY
torrent registered in seed_index.conf so strangers can FIND our seeder via the DHT (BEP-5). Must run ON
the NAS -- BEP-5 infers the peer's IP from the announce packet's SOURCE, so announcing from the NAS makes
the DHT record the NAS's address for each info_hash. Composes nx_dht_announce (dan_announce). Announces
expire (~15-30 min in mainline), so this loops: announce-all -> sleep 900s -> repeat. Supervised daemon.
nx_seed_announce_all [registry] -- loop: announce every registered info_hash, sleep 15m, repeat
license_tier: ORIGINAL layer: peer-discovery (announce) module: nishi-core.torrent.seed_announce_all
depends: nishi-core.torrent.dht_announce
dependencies 1 imports · 0 importers
imports: nx_dht_announce.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 SA_MAGIC_1048576: i64 = 1048576 |
| 12 | const SA_MAGIC_60000: i64 = 60000 |
| 14 | const SA_REG: *u8 = "/volume1/ai/torrent/seed_index.conf" as *u8 |
| 15 | const SA_PORT: i64 = 6881 |
| 16 | const SA_INTERVAL_SEC: i64 = 900 // 15 min between announce sweeps (announces expire ~15-30m) |
functions
| 23 | func sa_wait_scratch() -> *i64 { if SA_ST == 0 { SA_ST = sys_mmap(64) as i64 } return SA_ST as *i64 } |
| 25 | func sa_eol(b: *u8, from: i64, blen: i64) -> i64 { var e: i64=from; while e<blen { if b[e]==(10 as u8) { return e } e=e+1 } return blen } called by 1: main |
| 26 | func sa_tab(b: *u8, from: i64, limit: i64) -> i64 { var e: i64=from; while e<limit { if b[e]==(9 as u8) { return e } e=e+1 } return limit } called by 1: main |
| 31 | func sa_trackerrefresh() -> i64 |
| 49 | func sa_ipfilter() -> i64 |
| 67 | func sa_portmap() -> i64 |
| 86 | func sa_routerfw() -> i64 |
| 104 | func sa_lsd() -> i64 |
| 121 | func main(argc: i64, argv: *i64) -> i64 |