summaryrefslogtreecommitdiff
path: root/pcap-bpf.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2019-11-08 11:42:37 -0800
committerGuy Harris <guy@alum.mit.edu>2019-11-08 11:42:51 -0800
commit2c2c323c392980edc4a1044f08d9c2889f336dd3 (patch)
treec26ce2258cbaebe9d678937bd15750736e6f786d /pcap-bpf.c
parent88a0f88dbe73f57b69940d1ede8d0eb375f13095 (diff)
downloadlibpcap-2c2c323c392980edc4a1044f08d9c2889f336dd3.tar.gz
More pcap_setdirection() cleanups.
Say "...on this device" for errors; it may be the OS's capture mechanism that doesn't support setting the direction, but there may be other devices on the system that *do* support it. Check the validity of the direction argument in more places.
Diffstat (limited to 'pcap-bpf.c')
-rw-r--r--pcap-bpf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pcap-bpf.c b/pcap-bpf.c
index 1690baa2..1f2b96b9 100644
--- a/pcap-bpf.c
+++ b/pcap-bpf.c
@@ -3383,7 +3383,7 @@ pcap_setdirection_bpf(pcap_t *p, pcap_direction_t d)
* Outgoing, but not incoming; we can't specify that.
*/
snprintf(p->errbuf, sizeof(p->errbuf),
- "Setting direction to \"outgoing only\" is not supported on this operating system");
+ "Setting direction to \"outgoing only\" is not supported on this device");
return (-1);
case PCAP_D_INOUT:
@@ -3412,7 +3412,7 @@ static int
pcap_setdirection_bpf(pcap_t *p, pcap_direction_t d _U_)
{
(void) snprintf(p->errbuf, sizeof(p->errbuf),
- "Setting direction is not supported on this operating system");
+ "Setting direction is not supported on this device");
return (-1);
}
#endif