mirror of
https://github.com/the-tcpdump-group/tcpdump.git
synced 2024-11-30 21:44:49 +08:00
Handle rpcaps:// URLs as well, for rpcap-over-TLS.
This commit is contained in:
parent
e6fc07a516
commit
0f24a43a7e
@ -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().
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user