dect
/
libpcap
Archived
13
0
Fork 0
Commit Graph

137 Commits

Author SHA1 Message Date
guy 93e7c744cd Get rid of declaration of non-existent routine. 2008-07-01 07:06:37 +00:00
guy 65deb394b2 Handle ARPHRD_NONE, used by some tunnel devices, by mapping to DLT_RAW,
as it has a zero-length link-layer header.
2008-06-24 06:45:04 +00:00
guy a297a204e7 Update the NeXTStEP, SCO UNIX/SCO OpenServer, and UnixWare information. 2008-06-12 20:25:38 +00:00
guy 44378dee90 Make sure <sys/dlpi.h> is usable; it exists in SCO OpenServer 5, but it
doesn't define what we need for DLPI support.
2008-06-12 20:01:10 +00:00
guy 583f36ebe3 Improve the help message for --enable-ipv6. 2008-06-11 09:05:43 +00:00
guy 32fa6c0fa8 It's 2008 - time to enable IPv6 support by default, as long as you have
getaddrinfo().
2008-06-11 08:53:11 +00:00
guy 1a1b21c8ed Update README.macosx to talk about the launchd daemon, and to give more
information.
2008-06-07 18:53:55 +00:00
guy d0b5df5ab6 This is probably the right way to run something once at startup time; it
works on Tiger, and setting OnDemand to false appears to cause the job
to be run over and over again on Leopard.
2008-06-05 08:14:37 +00:00
guy 9bc00397cb Fix more patches@tcpdump.org references to point to the SourceForge
site.
2008-05-30 01:43:44 +00:00
guy 839343cdce packaging/pcap.spec is generated from packaging/pcap.spec.in; don't
check in the generated version, and don't put it into the distribution.

Fix a bunch of references to tcpdump-workers@tcpdump.org to refer to the
new address, tcpdump-workers@lists.tcpdump.org.

Fix a reference to the pcap man page from the pcap-filter(4) man page.

Note that patches should be submitted on the SourceForge site, not sent
to the spam-trap patches@tcpdump.org list.
2008-05-30 01:36:06 +00:00
guy 2b31a188b5 Get rid of the AUTHORS and BUGS section; only the main pcap(3PCAP) man
page should have that (no other pages for particular functions have it).
2008-05-30 01:32:55 +00:00
guy 39cc3ad4bf Add a script to change the permissions of /dev/bpf*, and a launchd plist
for it, for Mac OS X 10.4 and later.  (The script could be useful for
BPF-based systems that don't use devfs as well.) We're not installing it
at this point; that might happen later.
2008-05-28 02:15:05 +00:00
guy 182976cafc Don't echo the commands for "make releasetar" (they were echoed when
debugging, but they're not supposed to be echoed).
2008-05-27 07:17:28 +00:00
guy 8219a9539b Add a missing file to EXTRA_DIST. 2008-05-26 21:12:38 +00:00
guy 426ac2cbc2 FILES isn't used to make the tarball any more; get rid of it.
Update HDR in Makefile.in to include all headers.

Add pcap_activate.3pcap to the list of man pages in the 3PCAP section.

Add an EXTRA_DIST variable to include all the files that should go into
the tarball and that aren't in CSRC, HDR, MAN3PCAP, or MAN4.

Use CSRC, HDR, MAN3PCAP, MAN4, and EXTRA_DIST to determine what goes
into the tarball, rather than doing a "make distclean" and putting
everything into the tarball; that way, you can do "make releasetar"
without cleaning out the current directory.

Given that we're not just tarring up the entire source directory, we can
make the tarball directory as a subdirectory of the current directory and
put the tarball into the current directory, rather than putting it into
a (not-entirely-obvious) ../n directory.  Clean out the tarball
directory when we're done.
2008-05-26 21:06:27 +00:00
guy b2f90cbe9a Add pcap_free_datalinks() - on Windows, something allocated in Vegas^Wa
library has to be freed by the library, as an application or other
library using that library might have been built with a different
version of the C runtime library.
2008-05-26 19:58:59 +00:00
gianluca 1f99790075 pcap_create() should accept UNICODE device names as well as ASCII ones
on Windows.
2008-05-21 22:11:26 +00:00
guy eedbb73887 Pick up pcap_offline_filter() from WinPcap.
Add pcap_compile() to the SEE ALSO section for pcap_setfilter().
2008-05-13 15:20:44 +00:00
gianluca 45b0e40966 Fixed a couple initializations related to the buffer sizes. Removed some duplicated
code.
2008-04-25 20:01:55 +00:00
guy cd651b8f4b From Gisle Vanem:
* gnuc.h not needed.

* sys/pack*.h was renamed in a recent Watt-32 distro.
2008-04-22 17:20:42 +00:00
guy 159a093d02 From Gisle Vanem:
Update his e-mail address.

	Make a table const.
2008-04-22 17:16:49 +00:00
guy f2438e55d4 Expand a comment with more information on getting interface names. 2008-04-20 18:19:24 +00:00
guy 7304ca039f From Gisle Vanem and me: fix some typoes of mine in the conversion to
the new pcap_create/pcap_activate model, use pcap->opt.source rather
than pcap->md.device in the activate routine (pcap->md.device isn't
set), don't free the pcap_t if the activate routine fails, fix the
error return code paths not to set handle_to_device, fix references to
pcap_close_dos() to refer to pcap_cleanup_dos() as we renamed the
routine.
2008-04-19 17:49:37 +00:00
guy e1cc8ee902 Update a comment. 2008-04-17 19:17:27 +00:00
guy 0861b5ae83 Fix a typo. 2008-04-17 19:10:04 +00:00
guy 34b33137fb Use SIOCGIFDESCR to get the interface description if we have
SIOCGIFDESCR.
2008-04-17 18:58:03 +00:00
guy 6dd2181acf Fix typoes (sigh, using both "p" and "handle" for the pcap_t pointer in
different modules can lead to confusion).
2008-04-14 21:06:29 +00:00
guy ae77c4a44d Fix a typo (sigh, using both "p" and "handle" for the pcap_t pointer in
different modules can lead to confusion).
2008-04-14 21:05:03 +00:00
guy cfa5a9af6c Turn close_op into cleanup_op; the routine that handles it can also be
used to clean up after a failed pcap_activate() call.  Convert the
existing close_op routines to cleanup_op routines, and use them to clean
up; rename pcap_close_common() to pcap_cleanup_live_common(), and use it
directly if there's no platform-dependent cleanup needed.  That means we
don't have to write the same cleanup code twice (and possibly forget
stuff in the version done on a failed pcap_activate() call).

Have the cleanup routines do whatever is necessary to indicate that
cleanup has been done, and not do any particular cleaning up if it's
already been done (i.e., don't free something if the pointer to it is
null and null out the pointer once it's been freed, don't close an FD if
it's -1 and set it to -1 once it's been closed, etc.).

For device types/platforms where we don't support monitor mode, check
for it and return PCAP_ERROR_RFMON_NOTSUP - but do so after we've
checked whether we can open the device, so we return "no such device" or
"permission denied" rather than "that device doesn't support monitor
mode" if we can't open the device in the first place.

Fix a comment.
2008-04-14 20:41:51 +00:00
guy 89aaa53a74 Plug some leaks. 2008-04-10 03:10:59 +00:00
guy c801c7cccd Add commands use to configure capture privileges to the SEE ALSO list. 2008-04-10 01:56:38 +00:00
guy 4a38554027 Copy information about privileges need to capture from the tcpdump man
page here, and update the information on Solaris to talk about the
net_rawaccess privileges.
2008-04-10 01:52:58 +00:00
guy 99fbd52af2 Report PCAP_ERROR_PERM_DENIED if you don't have permission to open a
PF_PACKET socket.
2008-04-10 01:26:57 +00:00
guy 166c9ed802 Catch another place where you could get told "no, you may not open that
device" and arrange that PCAP_ERROR_PERM_DENIED be returned.
2008-04-10 00:50:54 +00:00
guy 80e8c86ab3 Fix an sprintf call. 2008-04-09 22:02:59 +00:00
guy 31e17a2401 Rename pcap_errtostr() to pcap_statustostr(), and have it handle
PCAP_WARNING values as well.
2008-04-09 21:41:53 +00:00
guy 48fa7d73f4 Add some PCAP_WARNING return values for "success, but you might want to
know that..."; currently, only pcap_activate() returns them, but we
might want some more warning returns for some other calls, such as the
ones that set filters.  It's a little cleaner than "clear out the error
message buffer and, if it's not empty after a successful return, it has
a warning", and a little cleaner than spewing a warning to the standard
error (as that might not be visible to the user if they're running a GUI
application).
2008-04-09 21:26:37 +00:00
gianluca 7475f55714 Fixed a compilation error under Windows. Some code left while porting the
libpcap code to the new pcap_create() pcap_activate() pattern.
2008-04-09 21:17:54 +00:00
guy fa39cf1285 Document the extra error information supplied for
PCAP_ERROR_NO_SUCH_DEVICE and PCAP_ERROR_PERM_DENIED.
2008-04-09 20:20:59 +00:00
guy b84a0c1cf2 Add an error for "you don't have permission to open that device", as
that often means "sorry, this platform requires you to run as root or to
somehow tweak the system to give you capture privileges", and
applications might want to explain that in a way that does a better job
of letting the user know what they have to do.

Try to return or PCAP_ERROR_PERM_DENIED for open errors, rather than
just returning PCAP_ERROR, so that the application can, if it chooses,
try to explain the error better (as those two errors are the ones that
don't mean "there's probably some obscure OS or libpcap problem", but
mean, instead, "you made an error" or "you need to get permission to
capture").

Check for monitor mode *after* checking whether the device exists in the
first place; a non-existent device doesn't support monitor mode, but
that's because it doesn't, well, exist, and the latter would be a more
meaningful error.

Have pcap_open_live() supply an error message for return values other
than PCAP_ERROR, PCAP_ERROR_NO_SUCH_DEVICE, and PCAP_ERROR_PERM_DENIED -
those all supply error strings (PCAP_ERROR because it's for various OS
problems that might require debugging, and the other two because there
might be multiple causes).
2008-04-09 19:58:34 +00:00
guy ea0d8ff531 Fix some errors left behind by the conversion to the create/activate
model.
2008-04-08 03:06:18 +00:00
guy 6c82113026 From Stephen Donnelly: fix some compile errors from the conversion to
the create/activate mode.
2008-04-08 03:01:05 +00:00
guy 094ce6a1b8 For Linux non-mmapped captures, Linux bluetooth captures, and Irix
captures, set the socket buffer size to the value specified by
pcap_set_buffer_size() if a value was set.

Clean up if memory buffer allocation fails on Linux.
2008-04-07 04:06:36 +00:00
guy 06eacc4ae7 Free the memory allocated for the Wireless Extensions private ioctl list
before returning.
2008-04-07 00:39:20 +00:00
guy 2a0df0ba23 In pcap_activate() on OS X 10.4, if a device isn't an "enN" device, and
we're supposed to open the device in monitor mode, don't just say
"sorry, it doesn't support monitor mode" - first, check whether it even
exists.
2008-04-06 22:23:37 +00:00
guy d4ba48c9ea Make pcap_datalink_val_to_description.3pcap a link to
pcap_datalink_val_to_name.3pcap.
2008-04-06 20:22:24 +00:00
guy 49f1ffcc91 Fix the pcap_datalink_val_to_name() man page. 2008-04-06 20:18:33 +00:00
guy 868bb3f8c0 Have a separate pcap_errtostr() routine to turn PCAP_ERROR_ values to
strings; leave pcap_strerror() for UN*X errnos.
2008-04-06 20:03:13 +00:00
guy 513315e4d8 Add more data types for X2E, requested by Hannes Kaelber. 2008-04-06 18:10:08 +00:00
guy 81122bf284 Add in the new man pages. Just use a single generic entry in
INSTALL.txt for all the man pages for functions.
2008-04-06 17:30:06 +00:00