diff options
author | Joerg Mayer <jmayer@loplof.de> | 2017-03-08 14:01:59 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2017-03-08 14:01:59 -0800 |
commit | 864f61c775d1898f76453ec17a9b894500da104a (patch) | |
tree | c16e2536294d81b1252dbd30490f6252eee7f459 /pcap-new.c | |
parent | 5ffc1b3b74cc639ca0d4b43ef3844c4a5c1d4307 (diff) |
Get remote capture almost working.
Pass the full interface string, rather than just the name, to
pcap_open_rpcap().
Diffstat (limited to 'pcap-new.c')
-rw-r--r-- | pcap-new.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -893,8 +893,8 @@ pcap_t *pcap_open(const char *source, int snaplen, int flags, int read_timeout, return NULL; } - /* determine the type of the source (file, local, remote) */ - if (pcap_parsesrcstr(source, &type, host, port, name, errbuf) == -1) + /* determine the type of the source (file, local, remote) and name if file or local */ + if (pcap_parsesrcstr(source, &type, NULL, NULL, name, errbuf) == -1) return NULL; @@ -911,7 +911,7 @@ pcap_t *pcap_open(const char *source, int snaplen, int flags, int read_timeout, * to call pcap_parsesrcstr() again. * This is less optimized, but much clearer. */ - fp = pcap_open_rpcap(name, snaplen, flags, read_timeout, auth, errbuf); + fp = pcap_open_rpcap(source, snaplen, flags, read_timeout, auth, errbuf); break; case PCAP_SRC_IFLOCAL: |