From: Guy Harris Date: Sat, 20 Jan 2018 19:21:44 +0000 (-0800) Subject: Use the right name for calls to wait for events. X-Git-Tag: libpcap-1.9-bp~287 X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/9bf72506a091c4acbd8b2dc34e876a01ed3f2bfe Use the right name for calls to wait for events. For the epoll mechanism, the call to wait for events is epoll_wait() (and epoll_pwait()); for the kqueue mechanism, the call to wait for events is kevent() (and additional calls in Darwin-based systems). --- diff --git a/pcap-dbus.c b/pcap-dbus.c index f179fe61..7f835d1d 100644 --- a/pcap-dbus.c +++ b/pcap-dbus.c @@ -148,7 +148,7 @@ dbus_cleanup(pcap_t *handle) /* * We don't support non-blocking mode. I'm not sure what we'd * do to support it and, given that we don't support select()/ - * poll()/epoll()/kqueue watch etc., it probably doesn't + * poll()/epoll_wait()/kevent() etc., it probably doesn't * matter. */ static int @@ -237,8 +237,8 @@ dbus_activate(pcap_t *handle) #ifndef _WIN32 /* - * Unfortunately, trying to do a select()/poll()/epoll()/ - * kqueue watch/etc. on a D-Bus connection isn't a simple + * Unfortunately, trying to do a select()/poll()/epoll_wait()/ + * kevent()/etc. on a D-Bus connection isn't a simple * case of "give me an FD on which to wait". * * Apparently, you have to register "add watch", "remove watch", diff --git a/pcap-int.h b/pcap-int.h index 2af36f17..7383ee03 100644 --- a/pcap-int.h +++ b/pcap-int.h @@ -221,14 +221,14 @@ struct pcap { int bpf_codegen_flags; #ifndef _WIN32 - int selectable_fd; /* FD on which select()/poll()/epoll()/kevent()/etc. can be done */ + int selectable_fd; /* FD on which select()/poll()/epoll_wait()/kevent()/etc. can be done */ /* * In case there either is no selectable FD, or there is but * it doesn't necessarily work (e.g., if it doesn't get notified * if the packet capture timeout expires before the buffer * fills up), this points to a timeout that should be used - * in select()/poll()/epoll()/kevent() call. The pcap_t should + * in select()/poll()/epoll_wait()/kevent() call. The pcap_t should * be put into non-blocking mode, and, if the timeout expires on * the call, an attempt should be made to read packets from all * pcap_t's with a required timeout, and the code must be diff --git a/pcap-septel.c b/pcap-septel.c index 124d29e0..f812154c 100644 --- a/pcap-septel.c +++ b/pcap-septel.c @@ -306,7 +306,7 @@ static int septel_setfilter(pcap_t *p, struct bpf_program *fp) { /* * We don't support non-blocking mode. I'm not sure what we'd * do to support it and, given that we don't support select()/ - * poll()/epoll()/kqueue watch etc., it probably doesn't + * poll()/epoll_wait()/kevent() etc., it probably doesn't * matter. */ static int diff --git a/pcap_get_required_select_timeout.3pcap b/pcap_get_required_select_timeout.3pcap index 8ef6611a..09b39348 100644 --- a/pcap_get_required_select_timeout.3pcap +++ b/pcap_get_required_select_timeout.3pcap @@ -38,7 +38,7 @@ returns, on UNIX, a pointer to a containing a value that must be used as the minimum timeout in .BR select() , .BR poll() , -.BR epoll() , +.BR epoll_wait() , and .B kevent() calls if @@ -58,7 +58,7 @@ and an attempt must always be made to read packets from the device when the .BR select() , .BR poll() , -.BR epoll() , +.BR epoll_wait() , or .B kevent() call returns. @@ -81,4 +81,4 @@ is returned if the timeout is required; otherwise is returned. .SH SEE ALSO pcap(3PCAP), pcap_get_selectable_fd(3PCAP), select(2), poll(2), -epoll(2), kqueue(2) +epoll_wait(2), kqueue(2) diff --git a/pcap_get_selectable_fd.3pcap b/pcap_get_selectable_fd.3pcap index c1c617c7..160a23f7 100644 --- a/pcap_get_selectable_fd.3pcap +++ b/pcap_get_selectable_fd.3pcap @@ -38,7 +38,7 @@ which one can do a .BR select() , .BR poll() , -.BR epoll() , +.BR epoll_wait() , .BR kevent() , or other such call to wait for it to be possible to read packets without blocking, if such @@ -142,4 +142,4 @@ A selectable file descriptor is returned if one exists; otherwise, \-1 is returned. .SH SEE ALSO pcap(3PCAP), pcap_get_required_select_timeout(3PCAP), -pcap_setnonblock(3PCAP), select(2), poll(2), epoll(2), kqueue(2) +pcap_setnonblock(3PCAP), select(2), poll(2), epoll_wait(2), kqueue(2)