/* Installs the given bpf filter program in the given pcap structure. There is no attempt to store the filter in kernel memory as that is not supported with DAG cards.  */
static int dag_setfilter(pcap_t *p, struct bpf_program *fp)
/* Installs the given bpf filter program in the given pcap structure. There is no attempt to store the filter in kernel memory as that is not supported with DAG cards.  */
static int dag_setfilter(pcap_t *p, struct bpf_program *fp)
{
	if (!p)
		return -1;
	if (!fp) {
		strncpy(p->errbuf, "setfilter: No filter specified",
			sizeof(p->errbuf));
		return -1;
	}
	if (install_bpf_program(p, fp) < 0)
		return -1;
	return (0);
}