HomeFreeBSD

Fix userland tools that don't check the format of routing socket

Description

Fix userland tools that don't check the format of routing socket
messages before accessing message fields that may not be present,
removing dead/duplicate/misleading code along the way.

Document the message format for each routing socket message in
route.h.

Fix a bug in usr.bin/netstat introduced in r287351 that resulted in
pointer computation with essentially random 16-bit offsets and
dereferencing of the results.

Reviewed by: ae
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D10330

Details