Generate cleaner code for "host", "net" and "gateway".
Following the same logic as for DECnet in commit
6f8a28c earlier, take
the link-layer protocol value out of any recursion gen_hostop() and
gen_hostop6() might do, instead just call gen_linktype() beforehand
exactly once. In gen_host6() join two equivalent cases together for
clarity.
For ARP-capable DLTs this improves SNR in the unoptimized filter
programs of:
* "arp (host|net)"
* "ip (host|net)"
* "ip6 (host|net)"
* "rarp (host|net)"
* "(host|net)" (which is a logical OR of the above four)
* "arp gateway" (which is a superset of "not arp host")
* "ip gateway" (which is a superset of "not ip host")
* "rarp gateway" (which is a superset of "not rarp host")
* "gateway" (which is a logical OR of the above three)
For DLTs with a relatively simple structure this change makes the
unoptimized filter program for most of the above primitives the same as
the optimized one. For IEEE 802.11 and ARCnet there is now fewer
instructions and less work to do for the optimizer.