Age | Commit message (Collapse) | Author | Files | Lines |
|
Changing the behaviour when the ERF type is unknown, and for ERF
TYPE_PAD.
Unknown ERF types can always be captured as DLT_ERF. TYPE_PAD
records are dropped silently.
|
|
support ERF extension headers;
collect the ifdefs for different ERF types into a header
to improve readability;
add in a couple of new types.
|
|
Clean up the configure output for the dag libraries a bit.
Add Florent Drouin's changes for DLT_ERF.
Some other DAG changes.
|
|
* Improved error checking in dag_read().
* More efficient dag_platform_finddevs().
* Support for new DAG API function dag_get_stream_erf_types().
|
|
field in a capture file into:
a 16-bit link-layer type field (it's 16 bits in pcap-NG, and
that'll probably be enough for the foreseeable future);
a 10-bit "class" field, indicating the group of link-layer type
values to which the link-layer type belongs - class 0 is for
regular DLT_ values, and class 0x224 grandfathers in the NetBSD
"raw address family" link-layer types;
a 6-bit "extension" field, storing information about the
capture, such an indication of whether the packets include an
FCS and, if so, how many bytes of FCS are present.
|
|
This patch introduces support for the DAG ERF type
TYPE_COLOR_MC_HDLC_POS.
The patch also allows appropriate DAG cards (DAG 3.7T, DAG 7.1S)
to optionally produce DLT_MTP2_WITH_PHDR (139) traces when
capturing from channelised HDLC links, as an alternative to
DLT_MTP2 (140). When using the new DLT, the 'DAG channel' is
recorded in the pcap record pseudo header as the 'link_number'.
Basic BPF filtering support for DLT_MTP2_WITH_PHDR is also
added.
Fix some warnings.
|
|
In addition, clean up the allocation and freeing of the temporary
pathname string buffer.
Also, there's no need to set "md.device" (it's only used on Linux, and
even then used only with the old SOCK_PACKET sockets, where you have to
turn promiscuous mode off explicitly rather than having it turn off
automatically when you close the socket) or "md.timeout".
|
|
The USB pseudo-header in DLT_USB_LINUX captures is in the host
byte order for the machine on which the capture was done. When
reading a capture file, convert the pseudo-header to the host
byte order of the host on which the file is being read.
There's a 64-bit quantity in that pseudo-header; move the 64-bit
byte-swap macro from the DAG code to pcap-int.h for use by other
code.
|
|
|
|
If the DAG API supports asking a card for the set of ERF types
it supports, use that capability, to handle cards that support
multiple ERF types. This is to support channelised/fractional
T1/E1.
Don't set the snapshot length - some DAG cards support multiple
capture streams, but the snapshot length is global, so it'd
affect other captures.
Update README.dag.
|
|
values for an HDLC link (MTP2 is what's usually run on those links, with
MTP3 atop it); remove them. Also, boost dlt_count to match the number
of DLT_ values.
|
|
updated API if available.
|
|
packets, only sent packets, or all packets be accepted, with an
implementation for Linux.
Add an implementation for BPF platforms that support BIOCSSEESENT.
|
|
it fails; there's no need for "dag_setfilter()" to do so.
|
|
The DAG 4.2 OC-48 cards (and revisions thereof) produce ERF
records that do not contain the trailing FCS. However,
pcap-dag.c assumed that there is an FCS and strips the final
word of the packet. This meant that packets captured with
libpcap on a DAG 4.2 are truncated by four bytes, unless a
magical environment variable (ERF_FCS_BITS) was set. This patch
autodetects when the DAG card is a 4.2, and turns off the
FCS-stripping feature so that packets are no longer truncated.
Also, include "dagnew.h" and "dagapi.h" with quotes, not angle
brackets, as they should be in the user search path, not the
system search path.
|
|
correctly detect a rare error condition and return a sensible
error message instead of blindly continuing;
clean up some endian-specific code.
|
|
Pizzolato <List-tcpdump-workers@subscriptions.pizzolato.net>.
|
|
|
|
- don't auto-detect HDLC DLT on serial links, use
"pcap_set_datalink()" to choose the link-layer header
- for ATM, allow selecting SUNATM rather than the default
RFC1483 with "pcap_set_datalink()"
- reformat and otherwise clean up the code.
|
|
devices, offer DLT_DOCSIS as one of the choices of link-layer type, and
support setting that type as meaning just "set libpcap's notion of the
link-layer type to DLT_DOCSIS" without telling the driver to use
DLT_DOCSIS.
|
|
"select()" or "poll()" - or -1 if that won't work.
|
|
pointers appropriately, rather than using #ifdefs and run-time checks.
Get rid of declaration of non-existent "pcap_set_datalink_platform()"
routine.
|
|
Added support for nonblocking operation.
Added support for processing more than a single packet in
pcap_dispatch().
Fixed bug in loss counter code.
Improved portability of loss counter code (e.g. use UINT_MAX
instead of 0xffff).
Removed unused local variables.
Added required headers (ctype.h, limits.h, unistd.h,
netinet/in.h).
Changed semantics to match those of standard pcap on linux.
- packets rejected by the filter are not counted.
|
|
warnings from newer versions of GCC.
|
|
"pcap_dispatch()" and "pcap_loop()".
|
|
Fix the pcap-dag atexit() handler for non-execing child
processes. Previously a fork()/exit() would stop the packet
capture (doh!).
Add a couple of optimizations.
|
|
assume Cisco HDLC, look at the first frame to see whether it has a
PPP-in-HDLC-like-frameing header, and use DLT_PPP_SERIAL for that and
DLT_CHDLC otherwise.
|
|
|
|
reading packets from a pcap_t, and make "pcap_read()" call it. That
removes the last place where we have to check for a pcap_t that refers
to a DAG card rather than a live capture, so get rid of the "is_dag" flag.
|
|
setting a filter for a pcap_t. Have "pcap_set_datalink()" call it,
rather than explicitly calling "pcap_set_datalink_platform()".
|
|
handles setting a filter for a pcap_t. Have "pcap_setfilter()" call it,
rather than being a per-platform function. The per-platform functions
don't need to check for an offline capture any more, as they're not
called for an offline capture (and the ones that just call
"install_bpf_program()" don't need to exist at all).
|
|
getting statistics for a pcap_t. Have "pcap_stats()" call it, rather
than being a per-platform function; have stats routines for non-live
pcap_t's that return an error.
|
|
the platform-dependent part of closing a pcap_t (and the
live-vs-savefile part as well, so that function must close the file
descriptor and free up any buffers allocated).
In the Digital UNIX support, add in a check for a memory allocation
failure.
|
|
Endace DAG devices.
|