PSARC/2016/205 Support for 'any' keyword in libpcap s11u3-sru
authorVardhnee Ramanujam Ravi <vardhnee.ramanujam.ravi@oracle.com>
Tue, 12 Jul 2016 12:47:25 -0700
branchs11u3-sru
changeset 6387 77663b44ddf4
parent 6383 b75d30310eac
child 6398 4178ba9ebde4
PSARC/2016/205 Support for 'any' keyword in libpcap 23004201 Add "any" pseudo-device to the list of packet capture devices in libpcap
components/libpcap/patches/02-pcap-bpf-any.patch
components/tcpdump/patches/man.patch
components/wireshark/patches/man.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/libpcap/patches/02-pcap-bpf-any.patch	Tue Jul 12 12:47:25 2016 -0700
@@ -0,0 +1,23 @@
+Adding the "any" pseudo-device since Solaris supports it.
+This is an in-house patch and will eventually be sent upstream.
+
+--- libpcap-1.5.1/pcap-bpf.c	Fri Jun 17 13:21:04 2016
++++ new/pcap-bpf.c	Fri Jun 17 13:20:50 2016
[email protected]@ -2305,6 +2305,17 @@
+ int
+ pcap_platform_finddevs(pcap_if_t **alldevsp, char *errbuf)
+ {
++
++#ifdef DLT_IPNET
++	/*
++	 * Adding the "any" pseudo-device
++	 */
++	const char any_descr[] = "Pseudo-device that captures on all interfaces";
++	if (pcap_add_if(alldevsp, "any", IFF_UP|IFF_RUNNING,
++	    any_descr, errbuf) < 0)
++		return (-1);
++#endif
++
+ 	return (0);
+ }
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/tcpdump/patches/man.patch	Tue Jul 12 12:47:25 2016 -0700
@@ -0,0 +1,16 @@
+Patch origin: in-house
+Patch status: Solaris-specific; not suitable for upstream
+
+Solaris specific documentation changes.
+
+--- tcpdump-4.7.4/tcpdump.1.in.orig	Fri Jun 17 13:10:42 2016
++++ tcpdump-4.7.4/tcpdump.1.in	Fri Jun 17 13:11:22 2016
[email protected]@ -393,7 +393,7 @@
+ .I interface
+ argument of ``any'' can be used to capture packets from all interfaces.
+ Note that captures on the ``any'' device will not be done in promiscuous
+-mode.
++mode. Currently, Solaris supports the ``any'' interface argument as well.
+ .IP
+ If the
+ .B \-D
--- a/components/wireshark/patches/man.patch	Fri Jul 08 09:47:12 2016 -0700
+++ b/components/wireshark/patches/man.patch	Tue Jul 12 12:47:25 2016 -0700
@@ -3,10 +3,10 @@
 
 Solaris specific documentation changes.
 
---- doc/tshark.pod
-+++ doc/tshark.pod
[email protected]@ -488,9 +488,9 @@
- 
+--- doc/tshark.pod.~1~  2016-04-22 10:12:55.000000000 -0700
++++ doc/tshark.pod      2016-06-17 10:29:10.712527957 -0700
[email protected]@ -488,9 +488,11 @@
+
  Network interface names should match one of the names listed in
  "B<tshark -D>" (described above); a number, as reported by
 -"B<tshark -D>", can also be used.  If you're using UNIX, "B<netstat
@@ -14,12 +14,14 @@
 -although not all versions of UNIX support the B<-a> option to B<ifconfig>.
 +"B<tshark -D>", can also be used.  On Solaris, all network interfaces
 +that are displayed with the command "dladm show-link" or "ipadm show-if"
-+can be used with the "-i" command line option.
- 
++can be used with the "-i" command line option. An interface argument of
++"any" can be used to capture packets from all interfaces. Note that
++captures using "any" will not be done in promiscuous mode.
+
  If no interface is specified, B<TShark> searches the list of
  interfaces, choosing the first non-loopback interface if there are any
[email protected]@ -1551,7 +1551,7 @@
- 
[email protected]@ -1551,7 +1553,7 @@
+
  =head1 CAPTURE FILTER SYNTAX
  
 -See the manual page of pcap-filter(7) or, if that doesn't exist, tcpdump(8),
@@ -27,7 +29,7 @@
  or, if that doesn't exist, L<https://wiki.wireshark.org/CaptureFilters>.
  
  =head1 READ FILTER SYNTAX
[email protected]@ -1812,7 +1812,7 @@
[email protected]@ -1812,7 +1814,7 @@
  =head1 SEE ALSO
  
  wireshark-filter(4), wireshark(1), editcap(1), pcap(3), dumpcap(1),