dect
/
libpcap
Archived
13
0
Fork 0
Commit Graph

911 Commits

Author SHA1 Message Date
mcr 6e8f58c867 updated version 2006-09-19 19:27:07 +00:00
ken bea2aeb1ac Update for 0.9.5 2006-09-19 17:49:59 +00:00
guy 813d8a4238 Check in the current version. 2006-09-18 17:36:33 +00:00
guy dceecef700 Indicate *which* ioctl failed. 2006-09-18 17:34:31 +00:00
guy 7497ed25c3 Add off_ll to off_nl in cases where that's required and that we missed
in earlier checkins, now that off_nl no longer includes off_ll.

Add in more comments explaining what we're doing.
2006-09-13 07:36:19 +00:00
guy dd84e1c988 Propagate from the main branch:
revision 1.266
	date: 2006-03-16 08:46:13 +0000;  author: hannes;  state: Exp;  lines: +3 -5
	use gen_linktype() rather than a plain gen_cmp() for creating
	the link-layer specific match code for MPLS packets
2006-09-13 07:04:07 +00:00
guy bc6f4cb8a6 Propagate from the main branch:
revision 1.265
	date: 2006-03-16 08:42:14 +0000;  author: hannes;  state: Exp;  lines: +3 -2
	OR_PACKET should match at the beginning of the packet and not at
	the beginning of the packet plus variable-length link-layer
2006-09-13 07:02:15 +00:00
guy bc022c53df Make off_linktype, off_nl, and off_nl_nosnap *not* include off_ll.
Make gen_load_llrel() add in off_ll if there isn't a variable-length
radio header, so the offset passed to it is always relative to the
beginning of the link-layer header, not the beginning of the packet.
Don't add in off_ll when calling it.

Those changes centralize the addition of off_ll, so it's only done in
one place (rather than twice, where it was done before, meaning that the
offsets were wrong for the Prism and AVS headers as they had 2*off_ll
rather than just off_ll, as off_ll was added twice).
2006-09-13 06:57:07 +00:00
gianluca 1bc7157652 Added support for DLT_IEEE802_11 and DLT_IEEE802_11_RADIO link layers in windows 2006-08-09 19:18:41 +00:00
gianluca 91dfa03535 Added a new DLT and LINKTYPE value for ARINC 653 Interpartition
Communication messages.
2006-07-27 21:06:17 +00:00
gianluca c1feb6c153 Fixed a typo in a DLT value: it should start with DLT_ and not LINKTYPE_ 2006-07-25 21:37:41 +00:00
gianluca a40888d6b4 Redefined DLT_CAN20B and LINKTYPE_CAN20B as #190 (as this is the
right value for CAN).
Added the definition of DLT_A429 and LINKTYPE_A429 as #184.
Added these two link layers in the global array dlt_choices.
2006-07-19 20:59:14 +00:00
guy 8bdc90b418 C89 says that the result of shifting an N-bit value by >= N bits is
undefined; we want it to be zero, so we explicitly check for a 32-bit
shift count and clear the netmask in that case.
2006-05-28 20:13:42 +00:00
gianluca a9dcfcbcbc [From Hannes] add support for DLT_JUNIPER_VP.
Added a new DLT and LINKTYPE value for CAN v2.0B frames.
2006-05-20 00:34:41 +00:00
guy 9651ac1a9b From Ollie Wild: if we're bound to an interface, discard incoming
packets that didn't arrive on that interface, so packets from other
interfaces that get onto the socket queue before we bind the socket to
the interface don't get supplied to the application (binding the socket
doesn't discard incoming packets).
2006-04-07 08:02:45 +00:00
guy 382177b574 From Stephen Donnelly:
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.
2006-04-07 07:08:50 +00:00
guy 537a925edd putmsg() returns 0 or -1, not the number of bytes written. 2006-04-04 05:33:02 +00:00
guy 0a6304982c If we succeed in getting packet statistics with the PACKET_STATISTICS
"getsockopt()" argument, return those statistics, rather than falling
through and returning the statistics the way we would if
PACKET_STATISTICS weren't supported.
2006-02-23 07:35:35 +00:00
gianluca 3d83b3f742 Fixed some capitalization that could cause problems with cross compilers. 2006-02-22 17:09:54 +00:00
gianluca 1cec8c6181 Fixed some capitalization that could cause problems cross compiling under linux.
Updated the copyright notice.
2006-02-22 17:09:32 +00:00
hannes bea26c188b code cosmetics: clean up some if() chains and replace by switch() statements 2006-02-22 10:39:49 +00:00
hannes 28fb0bef8c code cosmetics: clean up some if() chains and replace by switch() statements 2006-02-22 10:23:19 +00:00
guy 2dda569335 Clean up some comments, and give more details so people understand what
they do, and don't, have to do about 32-bit vs. 64-bit platforms in
libpcap.
2006-02-09 22:26:49 +00:00
guy f742f4b148 From Daniele Orlandi <daniele@orlandi.com>: add support for capturing
LAPD frames with vISDN.
2006-01-22 20:12:09 +00:00
gianluca ecb745522b Updated the version of the library to 0.9.4 and to 3.2 alpha1 (for the WinPcap
wpcap.dll).
2006-01-22 18:25:14 +00:00
gianluca 54ab3ba70e Added some code to properly distinguish a failure in PacketGetAdapterNames()
from a "buffer too small" error.
2006-01-22 18:24:24 +00:00
gianluca 2314e5535e Added an implementation of gai_strerror() for the compilation of libpcap.lib
and wpcap.dll under Cygnus and MingW32. The implementation is basically
taken from the FreeBSD sources.
2006-01-22 18:14:17 +00:00
gianluca cef244077c Added a patch to make libpcap.lib and wpcap.dll compile under Cygnus and
MingW32.
2006-01-22 18:13:47 +00:00
guy e2986fd563 From Sam Leffler and Jason Evans: fix the allocation of the buffer for
the list of link-layer types.
2006-01-22 05:28:34 +00:00
guy c01d2633bd We've already used strdup(), and nobody's complained about their OS
lacking it, so use it in some other cases, instead of duplicating its
functionality.

Check, however, whether it succeeds, and fail appropriately when it
fails.

Also, when other mallocs fails, free up any memory allocated for data
structures, so it doesn't leak.
2006-01-21 10:46:13 +00:00
hannes 2d41d513cb add DLT/LINKTYPE for carrying FRF.16 Multi-link Frame Relay 2005-12-13 13:48:37 +00:00
guy cbf3dd5b5b Don't double-count received packets on Linux systems that support the
PACKET_STATISTICS getsockopt() argument on PF_PACKET sockets.
2005-11-24 19:28:23 +00:00
guy f61b55ff8b Make the "applied to" errors say "applied to net" if we're applying
bogus keywords to "net" rather than "host".
2005-11-17 04:50:13 +00:00
guy d91f7b059a Previous change was applied by hand, and deleted one line. Put that
line back.
2005-11-09 23:49:48 +00:00
guy f9b190bb4f From Rick Jones: crank up some limits so the HP-UX lex can handle this
file.
2005-11-08 02:33:37 +00:00
guy 16ff5eeb12 Handle too-short snapshot lengths in cooked mode. 2005-10-08 11:31:16 +00:00
guy bd73c7de4a Warn about some broken drivers *cough* Broadcom *cough* ignoring
DLIOCRAW and overwriting the Ethertype with the SAP we happened to bind
to (the fact that we requested SAP promiscuity nonwithstanding).
2005-09-07 08:29:17 +00:00
guy e48e814759 Mention new "pppoed" and "pppoes" filters. 2005-09-05 09:17:47 +00:00
guy 279d705cd1 Add "pppoed" and "pppoes" keywords, for PPPoE Discovery and Session
packets (based on the Ethernet type).  "pppoes" has the side-effect that
subsequent filter expressions will test the PPP header and headers
in the PPP payload, not the link-layer header and headers in the
link-layer payload.
2005-09-05 09:08:03 +00:00
risso 097cc1dd50 Added a missing check on the return value of PacketGetAdapterNames() 2005-09-01 22:07:41 +00:00
guy 2b52cc74dd Today is Tuesday, not Monday. 2005-08-31 06:52:18 +00:00
guy ef309163d8 When checking for VLAN packets, check the type field in the Ethernet
header, not the VLAN header.
2005-08-31 06:50:01 +00:00
guy e2f9d3ceaa Add another magic number (we'd have used the Navtel one, except that
nobody from Navtel has ever said whether their format differs from the
standard one anywhere other than the time stamp).
2005-08-29 21:05:45 +00:00
guy 59994a9b44 Add some more fixes to the list of changes.
Remove trailing white space.
2005-08-23 03:48:16 +00:00
ken a3ff0a365c Updated for 0.9.4 pending release 2005-08-19 15:29:59 +00:00
guy 260acf5065 From Mike "Dragorn" Kershaw: add support for the new ARPHRD_ value for
802.11 with a radiotap header (used by the madwifi driver, and in the
pipeline to be officially assigned).
2005-08-16 04:25:26 +00:00
guy 6beece9689 From Don Ebright: clean out *uerror in recv_ack() before doing anything,
so that it's not EBUSY if we didn't get an EBUSY in a
DL_ERROR_ACK/DL_SYSERR reply, and our checks for EBUSY only catch that
case.

If we *did* get EBUSY on all the SAPs we tried, supply an error.

Make "dl_dohpuxbind()" always return a value, so we don't fall off the
end and return an error indication by accident.
2005-08-13 23:15:58 +00:00
hannes fcc5e2ecfb allocate 4 new DLTs on behalf of Juniper Networks, Inc. for
prepending meta-information like interface index, interface name
before a standard Ethernet, PPP, Frame Relay, C-HDLC Frame
2005-08-13 22:29:44 +00:00
guy ddcbbde8bb The "is_mpls" Boolean isn't necessary - we can just check the MPLS label
stack depth to see whether we're processing MPLS-encapsulated packets or
not.
2005-08-08 07:25:22 +00:00
guy d845992a55 When we're processing MPLS-encapsulated packets, don't set off_linktype
to -1, set a "we're doing MPLS" flag, and check that flag rather than
checking for an off_linktype of -1; off_linktype can be -1 for reasons
having nothing to do with MPLS (e.g., a DLT_ of DLT_RAW), and those
should be handled as they have traditionally been.

Rename "gen_null()" to "gen_mpls_linktype()" to make it clearer what it
does (it checks the MPLS stack as well as the IP header).
2005-08-08 02:40:05 +00:00