/* Parameters and return values are exactly the same of pcap_setfilter().  */
static int pcap_setfilter_rpcap(pcap_t *fp, struct bpf_program *prog)
/* Parameters and return values are exactly the same of pcap_setfilter().  */
static int pcap_setfilter_rpcap(pcap_t *fp, struct bpf_program *prog)
{
	struct pcap_rpcap *pr = fp->priv;
	if (!pr->rmt_capstarted)
	{
		if (install_bpf_program(fp, prog) == -1)
			return -1;
		return 0;
	}
	if (pcap_updatefilter_remote(fp, prog))
		return -1;
	return 0;
}