]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Handle rpcaps:// URLs as well, for rpcap-over-TLS.
authorGuy Harris <[email protected]>
Mon, 7 Jan 2019 02:30:59 +0000 (18:30 -0800)
committerGuy Harris <[email protected]>
Mon, 7 Jan 2019 02:30:59 +0000 (18:30 -0800)
tcpdump.c

index 75ec14bea9f5e3edf189284b9187b95f09e0fb3b..1ed33461cd2710735680a064a5e3107905337861 100644 (file)
--- a/tcpdump.c
+++ b/tcpdump.c
@@ -1188,9 +1188,10 @@ _U_
 
 #ifdef HAVE_PCAP_OPEN
 /*
- * Prefix for rpcap URLs.
+ * Prefixes for rpcap URLs.
  */
 static char rpcap_prefix[] = "rpcap://";
+static char rpcap_ssl_prefix[] = "rpcaps://";
 #endif
 
 static pcap_t *
@@ -1206,7 +1207,8 @@ open_interface(const char *device, netdissect_options *ndo, char *ebuf)
        /*
         * Is this an rpcap URL?
         */
-       if (strncmp(device, rpcap_prefix, sizeof(rpcap_prefix) - 1) == 0) {
+       if (strncmp(device, rpcap_prefix, sizeof(rpcap_prefix) - 1) == 0 ||
+           strncmp(device, rpcap_ssl_prefix, sizeof(rpcap_ssl_prefix) - 1) == 0) {
                /*
                 * Yes.  Open it with pcap_open().
                 */