#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/libpcap/pcap-dag.c,v 1.25 2006-04-07 07:07:25 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/pcap-dag.c,v 1.26 2006-09-25 18:18:18 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
}
break;
+#ifdef TYPE_DSM_COLOR_ETH
+ case TYPE_DSM_COLOR_ETH:
+#endif
#ifdef TYPE_COLOR_ETH
case TYPE_COLOR_ETH:
#endif
}
dp += 2;
break;
+#ifdef TYPE_DSM_COLOR_HDLC_POS
+ case TYPE_DSM_COLOR_HDLC_POS:
+#endif
#ifdef TYPE_COLOR_HDLC_POS
case TYPE_COLOR_HDLC_POS:
#endif
dp += 4;
break;
#endif
+ default:
+ /* Unhandled ERF type.
+ * Ignore rather than generating error
+ */
+ continue;
}
if (caplen > p->snapshot)
case TYPE_COLOR_ETH:
break;
#endif
+#ifdef TYPE_DSM_COLOR_HDLC_POS
+ /* in this type the color value overwrites the lctr */
+ case TYPE_DSM_COLOR_HDLC_POS:
+ break;
+#endif
+#ifdef TYPE_DSM_COLOR_ETH
+ /* in this type the color value overwrites the lctr */
+ case TYPE_DSM_COLOR_ETH:
+ break;
+#endif
+
default:
if (header->lctr) {
if (p->md.stat.ps_drop > (UINT_MAX - ntohs(header->lctr))) {
* cards are always promiscuous. The to_ms parameter is also ignored as it is
* not supported in hardware.
*
+ * snaplen is now also ignored, until we get per-stream slen support. Set
+ * slen with approprite DAG tool BEFORE pcap_open_live().
+ *
* See also pcap(3).
*/
pcap_t *
handle->setnonblock_op = dag_setnonblock;
handle->stats_op = dag_stats;
handle->close_op = dag_platform_close;
-
+ handle->md.stat.ps_drop = 0;
+ handle->md.stat.ps_recv = 0;
return handle;
fail:
case TYPE_HDLC_POS:
#ifdef TYPE_COLOR_HDLC_POS
case TYPE_COLOR_HDLC_POS:
+#endif
+#ifdef TYPE_DSM_COLOR_HDLC_POS
+ case TYPE_DSM_COLOR_HDLC_POS:
#endif
if (p->dlt_list != NULL) {
p->dlt_list[index++] = DLT_CHDLC;
case TYPE_ETH:
#ifdef TYPE_COLOR_ETH
case TYPE_COLOR_ETH:
+#endif
+#ifdef TYPE_DSM_COLOR_ETH
+ case TYPE_DSM_COLOR_ETH:
#endif
/*
* This is (presumably) a real Ethernet capture; give it a