{ "name": "libnatpmp", "version": "20230423", "summary": "libnatpmp: NAT-PMP client library, with natpmpc, which shows the router's public address and maps a port", "category": "library", "license": "BSD-3-Clause", "homepage": "https://miniupnp.tuxfamily.org/libnatpmp.html", "source": { "url": "https://miniupnp.tuxfamily.org/files/libnatpmp-20230423.tar.gz", "sha256": "0684ed2c8406437e7519a1bd20ea83780db871b3a3a5d752311ba3e889dbfc70" }, "watch": {"kind": "index", "url": "https://miniupnp.tuxfamily.org/files/", "regex": "libnatpmp-([0-9]{8})\\.tar\\.gz", "pin": "any"}, "deps": [], "env_packages": [], "static": true, "nss": false, "check": "test -s include/natpmp_declspec.h && bin/natpmpc -h | has 'add a port mapping' && CHECK_CPPFLAGS=-DENABLE_STRNATPMPERR check_lib libnatpmp 'natpmp.h arpa/inet.h' 'natpmp_t n; int r = initnatpmp(&n, 1, inet_addr(\"127.0.0.1\")); if (r) { printf(\"initnatpmp: %d (%s)\\n\", r, strnatpmperr(r)); return 1; } r = sendpublicaddressrequest(&n); closenatpmp(&n); if (r != 2) { printf(\"sendpublicaddressrequest: %d (%s)\\n\", r, strnatpmperr(r)); return 1; } printf(\"libnatpmp 20230423: a %d-byte public address request sent to 127.0.0.1:%d\\n\", r, NATPMP_PORT)'" }