diff options
author | Guy Harris <guy@alum.mit.edu> | 2009-11-03 14:18:11 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2009-11-03 14:18:11 -0800 |
commit | 6b414c082f0079664c0535963108ae4a648dba47 (patch) | |
tree | 00c6d239a690de3a1b630bcb26c3232a7721dd4e | |
parent | 339d28cefc11bbadaa92005b4f7b365f4732432c (diff) | |
download | libpcap-6b414c082f0079664c0535963108ae4a648dba47.tar.gz |
Describe all the cases where pcap_fileno() returns a file descriptor and
where it returns -1. Based on a patch from Fumiyuki Shimizu.
-rw-r--r-- | CREDITS | 1 | ||||
-rw-r--r-- | pcap_fileno.3pcap | 37 |
2 files changed, 30 insertions, 8 deletions
@@ -38,6 +38,7 @@ Additional people who have contributed patches: Florent Drouin <Florent dot Drouin at alcatel-lucent dot fr> Franz Schaefer <schaefer at mond dot at> Fulko Hew <fulko dot hew at gmail dot com> + Fumiyuki Shimizu <fumifumi at abacustech dot jp> Gianluca Varenni <varenni at netgroup-serv dot polito dot it> Gilbert Hoyek <gil_hoyek at hotmail dot com> Gisle Vanem <gvanem at broadpark dot no> diff --git a/pcap_fileno.3pcap b/pcap_fileno.3pcap index 28eac428..02d24b53 100644 --- a/pcap_fileno.3pcap +++ b/pcap_fileno.3pcap @@ -33,15 +33,36 @@ int pcap_fileno(pcap_t *p); .ft .fi .SH DESCRIPTION -.B pcap_fileno() -returns the file descriptor number from which captured packets are read, -if a network device was opened with +If +.I p +refers to a network device that was opened for a live capture using +a combination of .B pcap_create() and -.B pcap_activate() -or with +.BR pcap_activate() , +or using .BR pcap_open_live() , -or \-1, if a ``savefile'' was opened with -.BR pcap_open_offline() . +.B pcap_fileno() +returns the file descriptor from which captured packets are read. +.LP +If +.I p +refers to a ``savefile'' that was opened using fuctions such as +.BR pcap_open_offline() +or +.BR pcap_fopen_offline() , +a ``dead'' +.B pcap_t +opened using +.BR pcap_open_dead() , +or a +.B pcap_t +that was created with +.B pcap_create() +but that has not yet been activated with +.BR pcap_activate() , +it returns \-1. .SH SEE ALSO -pcap(3PCAP), pcap_create(3PCAP), pcap_activate(3PCAP) +pcap(3PCAP), pcap_create(3PCAP), pcap_activate(3PCAP), +pcap_open_live(3PCAP), pcap_open_offline(3PCAP), +pcap_fopen_offline(3PCAP), pcap_open_dead(3PCAP) |