aboutsummaryrefslogtreecommitdiff
path: root/pcap_activate.3pcap
Commit message (Collapse)AuthorAgeFilesLines
* Fixup some minor man page formatting issues. [skip ci]Denis Ovsienko2023-02-261-2/+2
| | | | | | | 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.
* man: Format more special constants bold. [skip ci]Denis Ovsienko2020-08-211-1/+3
| | | | | | | 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.
* Show correct last modified date in all man pages.Denis Ovsienko2020-02-161-1/+1
| | | | | | | | | 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]
* Style cleanup.Guy Harris2019-11-231-8/+8
| | | | | | | | Use the BSD house style, in which, in foobar() returns 17 on success and 137 on failure. "foobar" is boldfaced but "()" isn't.
* Remind people that if pcap_activate() fails, the pcap_t is still around.Guy Harris2019-11-231-0/+7
| | | | [skip ci]
* Fix manpage reference formatting to be consistent.Daniel Miller2018-08-241-5/+5
| | | | | | | 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.
* Refine references in some man pages, round 1.Denis Ovsienko2018-07-171-4/+4
| | | | | | | | | | | | | 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]
* Update the timestamp in some man pages.Denis Ovsienko2018-07-111-1/+1
| | | | | | | | 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]
* Remove trailing spaces/tabsFrancois-Xavier Le Bail2016-08-201-1/+1
|
* Fix a typo.Guy Harris2016-07-311-1/+1
|
* Give a better discussion of possible errors.Guy Harris2016-07-311-22/+49
| | | | | | | | | | | | | | | 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.)
* update last modified date in man page(s)Denis Ovsienko2015-12-181-1/+1
|
* refresh last midification dates for some man pagesDenis Ovsienko2014-04-071-1/+1
| | | | | This change reflects only meaningful (i.e. not purely editorial) changes in the text.
* remove libpcap's own CVS keywordsDenis Ovsienko2014-01-031-2/+0
| | | | | | 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.
* Return PCAP_ERROR_PROMISC_PERM_DENIED if you have permission to open theGuy Harris2010-09-211-0/+3
| | | | | | | | | | | | | 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().
* If the specified time stamp type isn't supported, treat that as a warning.Guy Harris2010-08-221-5/+6
|
* Add support for setting the time stamp type for a capture.Guy Harris2010-08-221-1/+5
| | | | | | Based on a patch from Scott Mcmillan <scott.a.mcmillan@intel.com>. (Second part of the commit.)
* When activating a device, return PCAP_ERROR_IFACE_NOT_UP if the deviceguy2008-07-011-3/+5
| | | | | | | | | | | | 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.
* Add some PCAP_WARNING return values for "success, but you might want toguy2008-04-091-7/+16
| | | | | | | | | | 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).
* Document the extra error information supplied forguy2008-04-091-1/+14
| | | | PCAP_ERROR_NO_SUCH_DEVICE and PCAP_ERROR_PERM_DENIED.
* Add an error for "you don't have permission to open that device", asguy2008-04-091-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | 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).
* Document the new API's, move a bunch of information about libpcapguy2008-04-061-0/+62
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.