Link discovery

Adds a couple API tweeks. Also fixes a packet parsing issue in stream.go. In addition link discovery has been added.