]> The Tcpdump Group git mirrors - libpcap/commitdiff
Improve a comment.
authorGuy Harris <[email protected]>
Mon, 2 Oct 2017 04:22:46 +0000 (21:22 -0700)
committerGuy Harris <[email protected]>
Mon, 2 Oct 2017 04:22:46 +0000 (21:22 -0700)
Make it clearer why we have a set_datalink_op that just says "OK".

pcap-tc.c

index 742915b25a74d5ed396b4e8bb52cfdb86c7e73fe..5aabbd507011459359ece29ea156a2831b97f25c 100644 (file)
--- a/pcap-tc.c
+++ b/pcap-tc.c
@@ -791,7 +791,11 @@ TcCreate(const char *device, char *ebuf, int *is_ours)
 static int TcSetDatalink(pcap_t *p, int dlt)
 {
        /*
-        * always return 0, as the check is done by pcap_set_datalink
+        * We don't have to do anything; pcap_set_datalink() checks
+        * whether the value is in the list of DLT_ values we
+        * supplied, so we don't have to, and, if it is valid, sets
+        * p->linktype to the new value; we don't have to do anything
+        * in hardware, we just use what's in p->linktype.
         */
        return 0;
 }