Lines Matching refs:pd
147 struct pcap_dag *pd; in dag_platform_cleanup() local
150 pd = p->priv; in dag_platform_cleanup()
152 if(dag_stop_stream(p->fd, pd->dag_stream) < 0) in dag_platform_cleanup()
155 if(dag_detach_stream(p->fd, pd->dag_stream) < 0) in dag_platform_cleanup()
247 struct pcap_dag *pd = p->priv; in dag_read() local
249 int flags = pd->dag_offset_flags; in dag_read()
255 while (pd->dag_mem_top - pd->dag_mem_bottom < dag_record_size) { in dag_read()
282 …if ( NULL == (pd->dag_mem_top = dag_advance_stream(p->fd, pd->dag_stream, &(pd->dag_mem_bottom))) … in dag_read()
287 pd->dag_mem_top = dag_offset(p->fd, &(pd->dag_mem_bottom), flags); in dag_read()
290 if (nonblocking && (pd->dag_mem_top - pd->dag_mem_bottom < dag_record_size)) in dag_read()
297 pd->dag_timeout && in dag_read()
298 (pd->dag_mem_top - pd->dag_mem_bottom < dag_record_size)) in dag_read()
307 while (pd->dag_mem_top - pd->dag_mem_bottom >= dag_record_size) { in dag_read()
314 dag_record_t *header = (dag_record_t *)(pd->dag_mem_bottom); in dag_read()
316 dag_record_t *header = (dag_record_t *)(pd->dag_mem_base + pd->dag_mem_bottom); in dag_read()
341 pd->dag_mem_bottom += rlen; in dag_read()
357 if (pd->stat.ps_drop > (UINT_MAX - ntohs(header->lctr))) { in dag_read()
358 pd->stat.ps_drop = UINT_MAX; in dag_read()
360 pd->stat.ps_drop += ntohs(header->lctr); in dag_read()
471 packet_len -= (pd->dag_fcs_bits >> 3); in dag_read()
486 packet_len -= (pd->dag_fcs_bits >> 3); in dag_read()
498 packet_len -= (pd->dag_fcs_bits >> 3); in dag_read()
590 pd->stat.ps_recv++; in dag_read()
965 struct pcap_dag *pd = p->priv; in dag_stats() local
973 *ps = pd->stat; in dag_stats()
1082 struct pcap_dag *pd = p->priv; in dag_setnonblock() local
1098 if (dag_get_stream_poll(p->fd, pd->dag_stream, in dag_setnonblock()
1113 if (dag_set_stream_poll(p->fd, pd->dag_stream, in dag_setnonblock()
1121 pd->dag_offset_flags |= DAGF_NONBLOCK; in dag_setnonblock()
1123 pd->dag_offset_flags &= ~DAGF_NONBLOCK; in dag_setnonblock()
1131 struct pcap_dag *pd = p->priv; local
1146 if (dag_get_stream_erf_types(p->fd, pd->dag_stream, types, 255) < 0) {