diff options
author | Dario Lombardo <lomato@gmail.com> | 2018-01-06 21:39:26 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2018-01-08 05:50:15 +0000 |
commit | e80b40adbe823be084fb49cd84336939916120bb (patch) | |
tree | d712734b953f7df6f1f79519c7abc73029152e1d /dumpcap.c | |
parent | 6f93baced0fba7d07425e14ea698f4607964c6ed (diff) |
extcap: remove conditional compilation.
Change-Id: Ia54bba388755cf27a343fe6d69d244bf1ab897f9
Reviewed-on: https://code.wireshark.org/review/25186
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'dumpcap.c')
-rw-r--r-- | dumpcap.c | 18 |
1 files changed, 1 insertions, 17 deletions
@@ -98,9 +98,7 @@ #include "caputils/ws80211_utils.h" -#ifdef HAVE_EXTCAP #include "extcap.h" -#endif /* * Get information about libpcap format from "wiretap/libpcap.h". @@ -844,9 +842,7 @@ print_machine_readable_interfaces(GList *if_list) printf("\tloopback"); else printf("\tnetwork"); -#ifdef HAVE_EXTCAP printf("\t%s", if_info->extcap); -#endif printf("\n"); } } @@ -1493,13 +1489,9 @@ cap_pipe_open_live(char *pipename, #else /* _WIN32 */ char *pncopy, *pos; wchar_t *err_str; -#ifdef HAVE_EXTCAP char* extcap_pipe_name; #endif -#endif -#ifdef HAVE_EXTCAP gboolean extcap_pipe = FALSE; -#endif ssize_t b; int fd = -1, sel_ret; size_t bytes_read; @@ -1527,10 +1519,8 @@ cap_pipe_open_live(char *pipename, } } else { #ifndef _WIN32 -#ifdef HAVE_EXTCAP if ( g_strrstr(pipename, EXTCAP_PIPE_PREFIX) != NULL ) extcap_pipe = TRUE; -#endif if (ws_stat64(pipename, &pipe_stat) < 0) { if (errno == ENOENT || errno == ENOTDIR) @@ -1640,20 +1630,15 @@ cap_pipe_open_live(char *pipename, pcap_src->cap_pipe_err = PIPNEXIST; return; } -#ifdef HAVE_EXTCAP extcap_pipe_name = g_strconcat("\\\\.\\pipe\\", EXTCAP_PIPE_PREFIX, NULL); extcap_pipe = strstr(pipename, extcap_pipe_name) ? TRUE : FALSE; g_free(extcap_pipe_name); -#endif /* Wait for the pipe to appear */ while (1) { - -#ifdef HAVE_EXTCAP if(extcap_pipe) pcap_src->cap_pipe_h = GetStdHandle(STD_INPUT_HANDLE); else -#endif pcap_src->cap_pipe_h = CreateFile(utf_8to16(pipename), GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL); @@ -1718,11 +1703,10 @@ cap_pipe_open_live(char *pipename, b = cap_pipe_read(fd, ((char *)&magic)+bytes_read, sizeof magic-bytes_read, pcap_src->from_cap_socket); -#ifdef HAVE_EXTCAP /* jump messaging, if extcap had an error, stderr will provide the correct message */ if (extcap_pipe && b <= 0) goto error; -#endif + if (b <= 0) { if (b == 0) g_snprintf(errmsg, errmsgl, "End of file on pipe magic during open."); |