• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/contrib/libpcap/

Lines Matching refs:pd

243 	struct pcap_dag *pd = p->priv;
245 if(dag_stop_stream(p->fd, pd->dag_stream) < 0)
248 if(dag_detach_stream(p->fd, pd->dag_stream) < 0)
251 if(pd->dag_ref != NULL) {
252 dag_config_dispose(pd->dag_ref);
255 * dag_close(p->fd), as dag_config_dispose(pd->dag_ref)
261 pd->dag_ref = NULL;
343 struct pcap_dag *pd = p->priv;
345 unsigned int nonblocking = pd->dag_flags & DAGF_NONBLOCK;
350 while (pd->dag_mem_top - pd->dag_mem_bottom < dag_record_size) {
376 if ( NULL == (pd->dag_mem_top = dag_advance_stream(p->fd, pd->dag_stream, &(pd->dag_mem_bottom))) ) {
380 if (nonblocking && (pd->dag_mem_top - pd->dag_mem_bottom < dag_record_size))
387 pd->dag_timeout &&
388 (pd->dag_mem_top - pd->dag_mem_bottom < dag_record_size))
397 while (pd->dag_mem_top - pd->dag_mem_bottom >= dag_record_size) {
403 dag_record_t *header = (dag_record_t *)(pd->dag_mem_bottom);
427 pd->dag_mem_bottom += rlen;
442 if ( (pd->drop_attr == kNullAttributeUuid) && (header->lctr) ) {
443 pd->stat.ps_drop += ntohs(header->lctr);
557 packet_len -= (pd->dag_fcs_bits >> 3);
576 packet_len -= (pd->dag_fcs_bits >> 3);
595 packet_len -= (pd->dag_fcs_bits >> 3);
702 pd->stat.ps_recv++;
741 struct pcap_dag *pd = p->priv;
767 if (dag_parse_name(device, newDev, strlen(device) + 16, &pd->dag_stream) < 0) {
781 if (pd->dag_stream%2) {
788 if((pd->dag_ref = dag_config_init((char *)device)) == NULL) {
803 if((p->fd = dag_config_get_card_fd(pd->dag_ref)) < 0) {
814 if (dag_attach_stream64(p->fd, pd->dag_stream, 0, 0) < 0) {
822 pd->drop_attr = kNullAttributeUuid;
823 pd->dag_root = dag_config_get_root_component(pd->dag_ref);
824 if ( dag_component_get_subcomponent(pd->dag_root, kComponentStreamFeatures, 0) )
826 pd->drop_attr = dag_config_get_indexed_attribute_uuid(pd->dag_ref, kUint32AttributeStreamDropCount, pd->dag_stream/2);
832 if (dag_get_stream_poll64(p->fd, pd->dag_stream,
844 pd->required_select_timeout = poll;
845 p->required_select_timeout = &pd->required_select_timeout;
877 if (dag_set_stream_poll64(p->fd, pd->dag_stream,
901 if(dag_start_stream(p->fd, pd->dag_stream) < 0) {
913 pd->dag_mem_bottom = 0;
914 pd->dag_mem_top = 0;
923 pd->dag_fcs_bits = 0;
931 pd->dag_fcs_bits = 32;
936 pd->dag_fcs_bits = n;
951 p->linktype_ext = LT_FCS_DATALINK_EXT(pd->dag_fcs_bits/16);
954 pd->dag_fcs_bits = 0;
958 pd->dag_timeout = p->opt.timeout;
993 pd->stat.ps_drop = 0;
994 pd->stat.ps_recv = 0;
995 pd->stat.ps_ifdrop = 0;
999 if (dag_stop_stream(p->fd, pd->dag_stream) < 0) {
1004 if (dag_detach_stream(p->fd, pd->dag_stream) < 0)
1008 dag_config_dispose(pd->dag_ref);
1011 * as dag_config_dispose(pd->dag_ref) does this.
1016 pd->dag_ref = NULL;
1103 struct pcap_dag *pd = p->priv;
1114 if(pd->drop_attr != kNullAttributeUuid) {
1118 if ((dag_error = dag_config_get_uint32_attribute_ex(pd->dag_ref, pd->drop_attr, &stream_drop) == kDagErrNone)) {
1119 pd->stat.ps_drop = stream_drop;
1127 *ps = pd->stat;
1236 struct pcap_dag *pd = p->priv;
1245 * "pd->dag_flags".
1250 if (dag_get_stream_poll64(p->fd, pd->dag_stream,
1266 if (dag_set_stream_poll64(p->fd, pd->dag_stream,
1274 pd->dag_flags |= DAGF_NONBLOCK;
1276 pd->dag_flags &= ~DAGF_NONBLOCK;
1284 struct pcap_dag *pd = p->priv;
1300 if (dag_get_stream_erf_types(p->fd, pd->dag_stream, types, 255) < 0) {