? autom4te.cache ? libpcap.so.0.9-PRE-CVS Index: pcap-dag.c =================================================================== RCS file: /tcpdump/master/libpcap/pcap-dag.c,v retrieving revision 1.37 diff -u -r1.37 pcap-dag.c --- pcap-dag.c 4 Apr 2008 19:37:45 -0000 1.37 +++ pcap-dag.c 8 Apr 2008 01:05:58 -0000 @@ -560,8 +560,8 @@ /* * Get a handle for a live capture from the given DAG device. Passing a NULL * device will result in a failure. The promisc flag is ignored because DAG - * cards are always promiscuous. The to_ms parameter is also ignored as it is - * not supported in hardware. + * cards are always promiscuous. The to_ms parameter is used in setting the + * API polling parameters. * * snaplen is now also ignored, until we get per-stream slen support. Set * slen with approprite DAG tool BEFORE pcap_activate(). @@ -650,11 +650,11 @@ */ mindata = 65536; - /* Obey to_ms if supplied. This is a good idea! + /* Obey md.timeout (was to_ms) if supplied. This is a good idea! * Recommend 10-100ms. Calls will time out even if no data arrived. */ - maxwait.tv_sec = to_ms/1000; - maxwait.tv_usec = (to_ms%1000) * 1000; + maxwait.tv_sec = handle->md.timeout/1000; + maxwait.tv_usec = (handle->md.timeout%1000) * 1000; if (dag_set_stream_poll(handle->fd, handle->md.dag_stream, mindata, &maxwait, &poll) < 0) { @@ -734,7 +734,7 @@ if ((n = atoi(s)) == 0 || n == 16 || n == 32) { handle->md.dag_fcs_bits = n; } else { - snprintf(ebuf, PCAP_ERRBUF_SIZE, + snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "pcap_activate %s: bad ERF_FCS_BITS value (%d) in environment\n", device, n); goto failstop; } @@ -790,7 +790,7 @@ #ifdef HAVE_DAG_STREAMS_API failstop: - if (dag_stop_stream(handle->fd, handle->md.dag_stream) < 0) + if (dag_stop_stream(handle->fd, handle->md.dag_stream) < 0) { fprintf(stderr,"dag_stop_stream: %s\n", strerror(errno)); }