README.dag 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. The following instructions apply if you have a Linux or FreeBSD platform and
  2. want libpcap to support the DAG range of passive network monitoring cards from
  3. Endace (http://www.endace.com, see below for further contact details).
  4. 1) Install and build the DAG software distribution by following the
  5. instructions supplied with that package. Current Endace customers can download
  6. the DAG software distibution from https://www.endace.com
  7. 2) Configure libcap. To allow the 'configure' script to locate the DAG
  8. software distribution use the '--with-dag' option:
  9. ./configure --with-dag=DIR
  10. Where DIR is the root of the DAG software distribution, for example
  11. /var/src/dag. If the DAG software is correctly detected 'configure' will
  12. report:
  13. checking whether we have DAG API... yes
  14. If 'configure' reports that there is no DAG API, the directory may have been
  15. incorrectly specified or the DAG software was not built before configuring
  16. libpcap.
  17. See also the libpcap INSTALL.txt file for further libpcap configuration
  18. options.
  19. Building libpcap at this stage will include support for both the native packet
  20. capture stream (linux or bpf) and for capturing from DAG cards. To build
  21. libpcap with only DAG support specify the capture type as 'dag' when
  22. configuring libpcap:
  23. ./configure --with-dag=DIR --with-pcap=dag
  24. Applications built with libpcap configured in this way will only detect DAG
  25. cards and will not capture from the native OS packet stream.
  26. ----------------------------------------------------------------------
  27. Libpcap when built for DAG cards against dag-2.5.1 or later releases:
  28. Timeouts are supported. pcap_dispatch() will return after to_ms milliseconds
  29. regardless of how many packets are received. If to_ms is zero pcap_dispatch()
  30. will block waiting for data indefinitely.
  31. pcap_dispatch() will block on and process a minimum of 64kB of data (before
  32. filtering) for efficiency. This can introduce high latencies on quiet
  33. interfaces unless a timeout value is set. The timeout expiring will override
  34. the 64kB minimum causing pcap_dispatch() to process any available data and
  35. return.
  36. pcap_setnonblock is supported. When nonblock is set, pcap_dispatch() will
  37. check once for available data, process any data available up to count, then
  38. return immediately.
  39. pcap_findalldevs() is supported, e.g. dag0, dag1...
  40. Some DAG cards can provide more than one 'stream' of received data.
  41. This can be data from different physical ports, or separated by filtering
  42. or load balancing mechanisms. Receive streams have even numbers, e.g.
  43. dag0:0, dag0:2 etc. Specifying transmit streams for capture is not supported.
  44. pcap_setfilter() is supported, BPF programs run in userspace.
  45. pcap_setdirection() is not supported. Only received traffic is captured.
  46. DAG cards normally do not have IP or link layer addresses assigned as
  47. they are used to passively monitor links.
  48. pcap_breakloop() is supported.
  49. pcap_datalink() and pcap_list_datalinks() are supported. The DAG card does
  50. not attempt to set the correct datalink type automatically where more than
  51. one type is possible.
  52. pcap_stats() is supported. ps_drop is the number of packets dropped due to
  53. RX stream buffer overflow, this count is before filters are applied (it will
  54. include packets that would have been dropped by the filter). The RX stream
  55. buffer size is user configurable outside libpcap, typically 16-512MB.
  56. pcap_get_selectable_fd() is not supported, as DAG cards do not support
  57. poll/select methods.
  58. pcap_inject() and pcap_sendpacket() are not supported.
  59. Some DAG cards now support capturing to multiple virtual interfaces, called
  60. streams. Capture streams have even numbers. These are available via libpcap
  61. as separate interfaces, e.g. dag0:0, dag0:2, dag0:4 etc. dag0:0 is the same
  62. as dag0. These are visible via pcap_findalldevs().
  63. libpcap now does NOT set the card's hardware snaplen (slen). This must now be
  64. set using the appropriate DAG coniguration program, e.g. dagthree, dagfour,
  65. dagsix, dagconfig. This is because the snaplen is currently shared between
  66. all of the streams. In future this may change if per-stream slen is
  67. implemented.
  68. DAG cards by default capture entire packets including the L2
  69. CRC/FCS. If the card is not configured to discard the CRC/FCS, this
  70. can confuse applications that use libpcap if they're not prepared for
  71. packets to have an FCS.
  72. Libpcap now reads the environment variable ERF_FCS_BITS to determine
  73. how many bits of CRC/FCS to strip from the end of the captured
  74. frame. This defaults to 32 for use with Ethernet. If the card is
  75. configured to strip the CRC/FCS, then set ERF_FCS_BITS=0. If used with
  76. a HDLC/PoS/PPP/Frame Relay link with 16 bit CRC/FCS, then set
  77. ERF_FCS_BITS=16.
  78. If you wish to create a pcap file that DOES contain the Ethernet FCS,
  79. specify the environment variable ERF_DONT_STRIP_FCS. This will cause
  80. the existing FCS to be captured into the pcap file. Note some
  81. applications may incorrectly report capture errors or oversize packets
  82. when reading these files.
  83. ----------------------------------------------------------------------
  84. Please submit bug reports via <support@endace.com>.
  85. Please also visit our Web site at:
  86. http://www.endace.com/
  87. For more information about Endace DAG cards contact <sales@endace.com>.