Better debugging

Most of the time in ZT my problem is that the daemon start up (contact root servers, establish connections to peers in same network, etc) doesn’t work. Debugging this is basically impossible, and it should be easy.

I’d like to be able to enable debugging from a command-line flag to show:

  • peer state changes (leaf/direct/available/missing type stuff)
  • route changes (the adding/deleting of ZT routes to the kernel tables)
  • ip changes (adding/creating/deleteing ZT IPs)
  • any failures in connectivity (lost a connection via a given peer)

Maybe others have better suggestions or examples?

I’d like specifically to see the shelled out commands (like /sbin/ifconfig or /sbin/route) have the command and the results echoed to stdout or stderr, even if not in debug mode - these are key state changes in ZT and making them easily visible when debugging wll save huge amounts or effort.