| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
In pcap_activate(3PCAP) style a C type consistently and format the first
reference to pcap_close() properly. In pcap_findalldevs(3PCAP) format
NULL consistently. In pcap_set_tstamp_precision(3PCAP) take "and" out
of the constant name.
|
|
|
|
|
|
|
| |
Some man pages used bold font for special meaning constants (e.g. -1 for
infinity, 0 for false, 1 for true, NULL), but some didn't. Make the
formatting consistently bold, but leave ordinary constants (number of
packets in a buffer, a timeout, a buffer size) intact.
|
|
|
|
|
|
|
|
|
| |
For clarity, as before, the last modified date stands for changes more
substantial than trivial editorial and formatting fixups. That, for
example, would be at least a change of the described behaviour, return
value, semantics or backward compatibility.
[skip ci]
|
|
|
|
|
|
|
|
| |
Use the BSD house style, in which, in
foobar() returns 17 on success and 137 on failure.
"foobar" is boldfaced but "()" isn't.
|
|
|
|
| |
[skip ci]
|
|
|
|
|
|
|
| |
All manpage references such as pcap_create(3PCAP) will now be formatted
with the identifier (e.g. "pcap_create") in **bold** and the section
name (e.g. "(3PCAP)") in roman (default) face. This is how most manpages
seem to be formatted and makes things more consistent.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a man page text for the first time refers to a libpcap function that
is not a topic of the man page, make sure it points to the 3PCAP section.
This way the reference becomes a hyperlink in the HTML version and the
web-site cohesion improves.
Make sure the SEE ALSO section does not list references already present
in the main text. This way the references that appear only in SEE ALSO
are much easier to notice, and cohesion remains the same.
[skip ci]
|
|
|
|
|
|
|
|
| |
In the man pages that since the previous timestamp had meaningful (i.e.
not typos or whitespace fixups) changes set the timestamp to the date
of such last meaningful change.
[skip ci]
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Give each warning and error code its own paragraph.
Note that, in the future, additional warning and error codes may be
added, so programs should treat *all* positive return codes as warnings
and *all* negative return codes as errors, and, if the warning or error
code isn't one the program specifically checks for, and isn't
PCAP_WARNING or PCAP_ERROR, it should use pcap_statustostr() to report
the warning or error.
(Yes, we've added additional return codes in the past, subsequent to
release 1.0, so it's not as if we're changing anything with this
announcement.)
|
| |
|
|
|
|
|
| |
This change reflects only meaningful (i.e. not purely editorial) changes
in the text.
|
|
|
|
|
|
| |
This change removes CVS keywords that express that the file belongs to
libpcap repository. All such keywords represented the revision and
timestamp by the end of 2008 or even older.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DLPI device but don't have permission to put the interface in
promiscuous mode; some systems using DLPI work that way.
Change the libdlpi code to return a warning if you *are* using
physical promiscuous mode and you fail to turn on SAP promiscuous mode,
not if you *aren't* using physical promiscuous mode and you fail to turn
on SAP promiscuous mode; that matches with the no-libdlpi code does, and
matches what the comment says.
Pull dlattachreq up into dl_doattach().
|
| |
|
|
|
|
|
|
| |
Based on a patch from Scott Mcmillan <scott.a.mcmillan@intel.com>.
(Second part of the commit.)
|
|
|
|
|
|
|
|
|
|
|
|
| |
isn't up, so applications can report that differently from a generic
error (the latter could mean there's a bug somewhere in libpcap).
When capturing on a device without mmap on Linux, ignore ENETDOWN, so
that we can continue to capture traffic if the interface goes down and
comes back up again; comments in the kernel indicate that we'll just
block waiting for packets if we try to receive from a socket that
delivered ENETDOWN, and, if we're using a memory-mapped buffer, we won't
even get notified of "network down" events.
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
| |
PCAP_ERROR_NO_SUCH_DEVICE and PCAP_ERROR_PERM_DENIED.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
concepts to the pcap(3PCAP) man page, refer people to the pcap(3PCAP)
man page from the man pages for libpcap functions, and clean up some
errors.
|