]> The Tcpdump Group git mirrors - libpcap/commitdiff
Fix some comments. [skip ci]
authorGuy Harris <[email protected]>
Wed, 21 Dec 2022 20:15:28 +0000 (12:15 -0800)
committerGuy Harris <[email protected]>
Wed, 21 Dec 2022 20:32:52 +0000 (12:32 -0800)
(cherry picked from commit 5bb93de447a57e70ade3169748117778f91f8d14)

pcap.c
savefile.c

diff --git a/pcap.c b/pcap.c
index f550ef995b4d8a9b421f811e8ae67de9570e7e22..ef1bbb71f87fed1a4d692db79b44768229f80f48 100644 (file)
--- a/pcap.c
+++ b/pcap.c
@@ -4204,7 +4204,15 @@ pcap_read_dead(pcap_t *p, int cnt _U_, pcap_handler callback _U_,
 static void
 pcap_breakloop_dead(pcap_t *p _U_)
 {
-       /* A breakloop should not be set on a pcap_open_dead pcap_t. */
+       /*
+        * A "dead" pcap_t is just a placeholder to use in order to
+        * compile a filter to BPF code or to open a savefile for
+        * writing.  It doesn't support any operations, including
+        * capturing or reading packets, so there will never be a
+        * get-packets loop in progress to break out *of*.
+        *
+        * As such, this routine doesn't need to do anything.
+        */
 }
 
 static int
index fc2dd54961669af7f93e2db5dd00c89ba786b756..db8a3aa0597206f894cd1a8cca00156ad4c475b8 100644 (file)
@@ -115,8 +115,8 @@ static int
 sf_cant_set_rfmon(pcap_t *p _U_)
 {
        /*
-        * This is a savefile, not a live capture file, so never say
-        * it's monitor mode.
+        * This is a savefile, not a device on which you can capture,
+        * so never say it supports being put into monitor mode.
         */
        return (0);
 }