gen_gateway(), gen_scode(), gen_ecode() and gen_broadcast() all have a
switch block with 11 or 13 DLTs and a default case.
The purpose of the latter is to avoid any calls to pcap_ether_hostton()
in gen_scode() case Q_HOST proto Q_LINK if the DLT does not use MAC-48
addresses, so add a new is_mac48_linktype() function to support this
behaviour; for consistency add the same guard to gen_scode() case
Q_GATEWAY and to gen_ecode().
The purpose of the latter is to avoid any calls to pcap_ether_hostton()
in gen_scode() if the DLT does not use MAC-48 addresses, so add a new
is_mac48_linktype() function to support this behaviour; add similar
guards to gen_scode() case Q_GATEWAY and to gen_ecode() for consistency.
These changes replace a few custom messages with templates, so update,
add and coalesce the tests as required.