/* We filter at user level, since the kernel driver does't process the packets  */
static int TcSetFilter(pcap_t *p, struct bpf_program *fp)
/* We filter at user level, since the kernel driver does't process the packets  */
static int TcSetFilter(pcap_t *p, struct bpf_program *fp)
{
	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;
}