DataDog/dd-agent — pull request #1141 by mutemule (2014-09-29 23:55:09+00:00)
Title: bsd: Pass '-W' to netstat for full interface names on FreeBSD

If you have VLAN tags on a FreeBSD systems, the interface names provided by 'netstat' are truncated after the first digit in the VLAN tag (assuming naming convention of interface.vlan). So, with interface names like 're1.200', 're1.210', and 're1.220', a single interface with a name of 're1.2' is identified by the agent.

Unfortunately, at least OpenBSD has a differing interpretation of `-W` for netstat, so limit the additional flag to just FreeBSD for now. I don't have access to any other BSD to test right now. I'm also not sure this is the best way to handle this, but it seemed reasonably clean.