Lines Matching refs:handlep
87 struct pcap_haiku* handlep = (struct pcap_haiku*)handle->priv;
101 handlep->stat.ps_recv++;
133 handlep->stat.ps_drop++;
167 struct pcap_haiku *handlep = (struct pcap_haiku *)handle->priv;
169 if (ioctl_ifreq(handlep->aux_socket, SIOCGIFFLAGS, "SIOCGIFFLAGS",
170 &handlep->ifreq, handle->errbuf) < 0)
172 return (handlep->ifreq.ifr_flags & IFF_PROMISC) != 0;
179 struct pcap_haiku *handlep = (struct pcap_haiku *)handle->priv;
181 handlep->ifreq.ifr_flags |= IFF_PROMISC;
183 handlep->ifreq.ifr_flags &= ~IFF_PROMISC;
185 return ioctl_ifreq(handlep->aux_socket, SIOCSIFFLAGS, "SIOCSIFFLAGS",
186 &handlep->ifreq, handle->errbuf);
193 struct pcap_haiku *handlep = (struct pcap_haiku *)handle->priv;
194 if (handlep->aux_socket >= 0) {
200 if (handle->opt.promisc && ! handlep->orig_promisc &&
203 close(handlep->aux_socket);
204 handlep->aux_socket = -1;
224 struct pcap_haiku* handlep = (struct pcap_haiku*)handle->priv;
225 *stats = handlep->stat;
228 if (ioctl_ifreq(handlep->aux_socket, SIOCGIFSTATS, "SIOCGIFSTATS",
229 &handlep->ifreq, handle->errbuf) < 0)
234 stats->ps_ifdrop = handlep->ifreq.ifr_stats.receive.dropped - stats->ps_ifdrop;
242 struct pcap_haiku *handlep = (struct pcap_haiku *)handle->priv;
246 if ((handlep->aux_socket = dgram_socket(AF_INET, handle->errbuf)) < 0)
252 if (ioctl_ifreq(handlep->aux_socket, SIOCGIFSTATS, "SIOCGIFSTATS",
253 &handlep->ifreq, handle->errbuf) < 0) {
260 handlep->stat.ps_ifdrop = handlep->ifreq.ifr_stats.receive.dropped;
272 &handlep->ifreq, handle->errbuf) < 0)
274 struct sockaddr_dl *sdl = (struct sockaddr_dl *)&handlep->ifreq.ifr_addr;
305 &handlep->ifreq, handle->errbuf) < 0)
362 if ((handlep->orig_promisc = get_promisc(handle)) < 0)
364 if (! handlep->orig_promisc && set_promisc(handle, 1) < 0)
436 struct pcap_haiku *handlep = (struct pcap_haiku *)handle->priv;
437 handlep->aux_socket = -1;
439 (void)pcapint_strlcpy(handlep->ifreq.ifr_name, device, IF_NAMESIZE);