Add action_discover and action_link_down.

The paths from the controller are known so that the currently visible nodes from the controller can be determined.
Remove direct access to global variable.