What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

What is asusdiscovery?

DrPozo

Occasional Visitor
Go to line 80
 
I suspect it's used for services such as printer sharing, or allowing the router to see access points/repeaters/media bridges on the LAN. But I've never really dug into that code.
 
Out of curiosity, why does that output what it does? Also, what made you look at the Asus_discover.c program in the first place?

A final question, I was trying to issue a find command and not look in my 3tb usb mount using the prune command. in looking at the busybox find options, it appears to be there, however I am not getting syntax correct.

works in debian: find ./ -type d \( -path /media/* \) -prune -name e*.log

however, cant seem to get the desired results on the router (rt-ac68 merlin 378.56_2).

A final comment, in looking at the c program, wouldnt you thing the code around line 357 where it says covert 1.1.168.192 to 192.168.1.1, shouldnt that be a function somewhere already as it seems to me that would be done quite a bit and could be reused. granted its a small bit of code, just sayin'...
 
Code:
BusyBox v1.20.2 (2016-02-02 14:51:43 MST) multi-call binary.

Usage: find [PATH]... [OPTIONS] [ACTIONS]

Search for files and perform actions on them.
First failed action stops processing of current file.
Defaults: PATH is current directory, action is '-print'

        -follow         Follow symlinks

Actions:
        ! ACT           Invert ACT's success/failure
        ACT1 [-a] ACT2  If ACT1 fails, stop, else do ACT2
        ACT1 -o ACT2    If ACT1 succeeds, stop, else do ACT2
                        Note: -a has higher priority than -o
        -name PATTERN   Match file name (w/o directory name) to PATTERN
        -iname PATTERN  Case insensitive -name
        -mtime DAYS     mtime is greater than (+N), less than (-N),
                        or exactly N days in the past
If none of the following actions is specified, -print is assumed
        -print          Print file name
        -print0         Print file name, NUL terminated
        -exec CMD ARG ; Run CMD with all instances of {} replaced by
                        file name. Fails if CMD exits with nonzero
 
thanks for the explanation, not a big deal. the find still works but just takes a long time. i saw that error too, but without a man page i didnt know if it was complete or not, so i simply went to what i believed to be was the documentation for the command understating that the options may be limited from the normal find command. even though the version is old I didnt see anything in the revisions that would have added any behavior that isnt in doc that i linked, so it must be some compile time option that limiting it.

sure its something in here https://github.com/RMerl/asuswrt-merlin/blob/380.58/release/src/router/busybox/Config.in , but didnt read through the whole thing. will have to read through the docs more to see what compile options are being set. sorry, not that famliar with embedded linux type systems, but trying.

update - seems that the options are really set in the find.c program itself....again, have yet to look through the whole thing. merlin, please correct me if i am in the wrong place, not that i want to change anything, but just curious.
 
Last edited:
what made you look at the Asus_discover.c program in the first place?
When I witnessed the "asusdiscovery" program appear and then quickly disappear, I go to https://github.com/RMerl/asuswrt-merlin to search the source code. There is no faster way.

I found that the output of this program is to set the nvram variable, "asus_device_list", on line 201 in ASUS_Discovery.c (https://github.com/RMerl/asuswrt-me...elease/src/router/networkmap/ASUS_Discovery.c).

Then, the firmware exposes this information through the WebUI, in a downloadable TAR archive, from the do_networkmap_file function, on line 8529, in web.c (https://github.com/RMerl/asuswrt-me...cbccb885e5eeff/release/src/router/httpd/web.c)

In looking at the do_networkmap_file function in web.c, you will also witness another nvram variable, "nmp_client_list", being read. However, I didn't research where it gets set.

Ultimately, these pieces of information are stored in nvram variables, and then get exposed here: http://192.168.1.1/networkmap.tar
 
thanks for the explanation, will retrace your steps for fun. I take it you were simply looking at the top output and noticed that? I see that the file is then unlinked a couple of lines or so later which is why i couldnt find it on the filesystem itself, correct (ie, only avail for when the function is run? Seems unnecessary to unlink it though. who is that avatar? it looks familiar but just cant place it....google image search...linda carter. god i shouldnt be so lazy
 
Last edited:
I think the asusdiscovery may be a leftover from the option to send diagnostic information to ASUS which is removed from the Merlin code.
 
When I witnessed the "asusdiscovery" program appear and then quickly disappear, I go to https://github.com/RMerl/asuswrt-merlin to search the source code. There is no faster way.

Do you also notice that on regular interval (a few minutes apart) a process is spawned to "ping 8.8.4.4"?

I want to know who is spawning such as process and for what purpose. Haven't got time to trace it down myself. Perhaps you would want to have a look too? :)
 
I don't get the sarcasm. Perhaps because you are more intelligent you can explain it to me. That address is google dns right, so how exactly is that related to the original post and what he was seeing? I'm just a dolt, so please do your best as I just don't get it.
 
Are you referring to my post? If you have a problem with it, simply ignore..
 
Do you also notice that on regular interval (a few minutes apart) a process is spawned to "ping 8.8.4.4"?

I want to know who is spawning such as process and for what purpose. Haven't got time to trace it down myself. Perhaps you would want to have a look too? :)

Might be from the watchdog, tho I'd expect it to only be used in Dual WAN mode.
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top