openwrtdd-wrt

Where can I get sources or detailed documentation of /usr/sbin/nas


I tried to get /usr/bin/nas sources from http://downloads.openwrt.org/sources/nas-4.80.9.1.tar.gz but found that it only contains compiled ELF binaries. I tried to get dd-wrt sources (with hope to find nas there) using the instruction on page http://www.dd-wrt.com/wiki/index.php/Development but the crucial instruction svn co http://svn.dd-wrt.com/DD-WRT return an error stating the is no source.

I need either detailed parameters of /usr/sbin/nas (as specified by nas --help or man nas if only dd/open-wrt had man pages) or nas sources.


Solution

  • The "source" code for nas in DD-WRT can be found here: http://svn.dd-wrt.com/browser#src/router/nas

    OpenWRT is what you have already seen.

    To me it appears that nas is a (possibly closed source?) binary that has been repackaged into these two distributions as a binary blob, obtained from somewhere else.

    After a bit more digging I found source code for what appears to be the same program on GitHub, which hopefully answers your question: https://github.com/jcolp/rtn66u/tree/master/release/src/router/nas

    TBH, I guessed this by running strings on the nas binary and discovered the C source files nas_wksp.c and nas_wksp_radius.c were named probably for debugging.

    There is version buried inside the Tomato firmware as well: http://repo.or.cz/w/tomato.git/tree/620424a4333f6eeaf57d8b76ee61a287b6c01683:/release/src-rt/wl/nas

    Why the source is not referenced DD-WRT and OpenWRT I have no idea...