+static struct block *
+gen_mac48host_byname(compiler_state_t *cstate, const char *name,
+ const u_char dir, const char *context)
+{
+ if (! is_mac48_linktype(cstate->linktype))
+ fail_kw_on_dlt(cstate, context);
+
+ u_char *eaddrp = pcap_ether_hostton(name);
+ if (eaddrp == NULL)
+ bpf_error(cstate, ERRSTR_UNKNOWN_MAC48HOST, name);
+ u_char eaddr[6];
+ memcpy(eaddr, eaddrp, sizeof(eaddr));
+ free(eaddrp);
+
+ return gen_mac48host(cstate, eaddr, dir, context);
+}
+