]> The Tcpdump Group git mirrors - libpcap/commitdiff
Don't print the warning for an ARP type not supported by libpcap, return
authorguy <guy>
Thu, 25 Oct 2001 06:46:14 +0000 (06:46 +0000)
committerguy <guy>
Thu, 25 Oct 2001 06:46:14 +0000 (06:46 +0000)
it in the error message buffer, as is done for warnings in other
implementations of "pcap_open_live()".

pcap-linux.c

index 0211c2d297983e969bd8824b479316fac43c56da..0263d5f6573da0901ae2e8a0208caa87516dcc44 100644 (file)
@@ -26,7 +26,7 @@
  */
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/libpcap/pcap-linux.c,v 1.68 2001-10-08 01:06:21 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/libpcap/pcap-linux.c,v 1.69 2001-10-25 06:46:14 guy Exp $ (LBL)";
 #endif
 
 /*
@@ -1051,11 +1051,11 @@ live_open_new(pcap_t *handle, char *device, int promisc,
                                         * update "map_arphrd_to_dlt()"
                                         * to handle the new type.
                                         */
-                                       fprintf(stderr, 
+                                       snprintf(ebuf, PCAP_ERRBUF_SIZE,
                                                "Warning: arptype %d not "
                                                "supported by libpcap - "
                                                "falling back to cooked "
-                                               "socket\n",
+                                               "socket",
                                                arptype);
                                }
                                handle->linktype = DLT_LINUX_SLL;