![]() Keys: Help Display mode Restart statistics Order of fields quitġ. ![]() 140 * 141 * XXX - with TPACKET_V1 and TPACKET_V2, it currently uses select() 142 * internally, and, with TPACKET_V3, once that's supported, it'll 143 * support timeouts, at least as I understand the way the code works. 139 * Hence we use a select for that come what may. */ 132 static void capture_loop_stop ( void ) 133 /** Close a pipe, or socket if \a from_socket is TRUE */ 134 static void cap_pipe_close ( int pipe_fd, gboolean from_socket ) 135 136 #if defined (_linux_) 137 /* whatever the deal with pcap_breakloop, linux doesn't support timeouts 138 * in pcap_dispatch() on the other hand, select() works just fine there. ![]() ![]() 90 * XXX - can we just use pcap_open_offline() to read the pipe? 91 */ 92 #include "wiretap/libpcap.h" 93 #include "wiretap/pcapng_module.h" 94 #include "wiretap/pcapng.h" 95 96 /**#define DEBUG_DUMPCAP**/ 97 /**#define DEBUG_CHILD_DUMPCAP**/ 98 99 #ifdef _WIN32 100 #include "wsutil/win32-utils.h" 101 #ifdef DEBUG_DUMPCAP 102 #include /* _getch() */ 103 #endif 104 #endif 105 106 #ifdef DEBUG_CHILD_DUMPCAP 107 FILE *debug_log /* for logging debug messages to */ 108 /* a file if DEBUG_CHILD_DUMPCAP */ 109 /* is defined */ 110 #endif 111 112 static GAsyncQueue *pcap_queue 113 static gint64 pcap_queue_bytes 114 static gint64 pcap_queue_packets 115 static gint64 pcap_queue_byte_limit = 0 116 static gint64 pcap_queue_packet_limit = 0 117 118 static gboolean capture_child = FALSE /* FALSE: standalone call, TRUE: this is an Wireshark capture child */ 119 static const char *report_capture_filename = NULL /* capture child file name */ 120 #ifdef _WIN32 121 static gchar *sig_pipe_name = NULL 122 static HANDLE sig_pipe_handle = NULL 123 static gboolean signal_pipe_check_running ( void ) 124 #endif 125 126 #ifdef SIGINFO 127 static gboolean infodelay /* if TRUE, don't print capture info in SIGINFO handler */ 128 static gboolean infoprint /* if TRUE, print capture info after clearing infodelay */ 129 #endif /* SIGINFO */ 130 131 /** Stop a low-level capture (stops the capture child). 89 * Get information about pcapng format from "wiretap/pcapng_module.h". ![]() As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option.Īlternatively you can here view or download the uninterpreted source code file.įor more information about "dumpcap.c" see the Fossies "Dox" file reference documentation and the last Fossies "Diffs" side-by-side code changes report: 4.0.5_vs_4.0.6.Ī hint: This file contains one or more very long lines, so maybe it is better readable using the pure text view mode that shows the contents as wrapped lines within the browser window.ġ /* dumpcap.c 2 * 3 * Wireshark - Network traffic analyzer 4 * By Gerald Combs 5 * Copyright 1998 Gerald Combs 6 * 7 * SPDX-License-Identifier: GPL-2.0-or-later 8 */ 9 10 #include 11 #define WS_LOG_DOMAIN LOG_DOMAIN_CAPCHILD 12 13 #include 14 #include /* for exit() */ 15 #include 16 17 #include 18 19 #include 20 21 #ifdef HAVE_NETINET_IN_H 22 #include 23 #endif 24 25 #include 26 27 #if defined(_APPLE_) & defined(_LP64_) 28 #include 29 #endif 30 31 #include 32 #include 33 34 #include 35 #include 36 #include 37 #include 38 39 #include 40 #include 41 #include 42 43 #ifdef HAVE_LIBCAP 44 # include 45 # include 46 #endif 47 48 #include "ringbuffer.h" 49 50 #include "capture/capture_ifinfo.h" 51 #include "capture/capture-pcap-util.h" 52 #include "capture/capture-pcap-util-int.h" 53 #ifdef _WIN32 54 #include "capture/capture-wpcap.h" 55 #endif /* _WIN32 */ 56 57 #include "writecap/pcapio.h" 58 59 #ifndef _WIN32 60 #include 61 #endif 62 63 #include 64 #include 65 66 #include "sync_pipe.h" 67 68 #include "capture_opts.h" 69 #include 70 #include 71 72 #include "wsutil/tempfile.h" 73 #include "wsutil/file_util.h" 74 #include "wsutil/cpu_info.h" 75 #include "wsutil/os_version_info.h" 76 #include "wsutil/str_util.h" 77 #include "wsutil/inet_addr.h" 78 #include "wsutil/time_util.h" 79 #include "wsutil/please_report_bug.h" 80 #include "wsutil/glib-compat.h" 81 #include 82 83 #include "capture/ws80211_utils.h" 84 85 #include "extcap.h" 86 87 /* 88 * Get information about libpcap format from "wiretap/libpcap.h". ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |