aboutsummaryrefslogtreecommitdiffstats
path: root/pcap.h
diff options
context:
space:
mode:
authorguy <guy>2001-12-09 05:10:02 +0000
committerguy <guy>2001-12-09 05:10:02 +0000
commita82f1618b8a3e6203923618b8c9dad07d4bdea4d (patch)
tree7b96a269c3b134d7eca781387d42c0ea043ca596 /pcap.h
parentb0ea1152b6f3a59ece2c2cb5777ffd80a17e5209 (diff)
Add APIs to put a "pcap_t" into or out of non-blocking mode, and to get
the current state of non-blocking mode; this allows us to implement, for example, memory-mapped capture devices, where "pcap_read()" uses "select()" or "poll()" to wait for packets to arrive, and hide that implementation detail from applications using this API ("pcap_setnonblock()" would set or clear a non-blocking mode flag in the "pcap_t", and the "select()" or "poll()" would not be done if the "pcap_t" is in non-blocking mode).
Diffstat (limited to 'pcap.h')
-rw-r--r--pcap.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/pcap.h b/pcap.h
index 111a0a5..83ec14c 100644
--- a/pcap.h
+++ b/pcap.h
@@ -31,7 +31,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * @(#) $Header: /tcpdump/master/libpcap/pcap.h,v 1.33 2001-10-28 02:31:50 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/libpcap/pcap.h,v 1.34 2001-12-09 05:10:03 guy Exp $ (LBL)
*/
#ifndef lib_pcap_h
@@ -170,6 +170,8 @@ const u_char*
pcap_next(pcap_t *, struct pcap_pkthdr *);
int pcap_stats(pcap_t *, struct pcap_stat *);
int pcap_setfilter(pcap_t *, struct bpf_program *);
+int pcap_getnonblock(pcap_t *, char *);
+int pcap_setnonblock(pcap_t *, int, char *);
void pcap_perror(pcap_t *, char *);
char *pcap_strerror(int);
char *pcap_geterr(pcap_t *);