aboutsummaryrefslogtreecommitdiffstats
path: root/capture_info.c
AgeCommit message (Collapse)AuthorFilesLines
2014-05-23Revert "Allow wtap_read() and wtap_seek_read() to return non-packet records."Guy Harris1-15/+11
This reverts commit c0c480d08c175eed4524ea9e73ec86298f468cf4. A better way to do this is to have the record type be part of struct wtap_pkthdr; that keeps the metadata for the record together and requires fewer API changes. That is in-progress. Change-Id: Ic558f163a48e2c6d0df7f55e81a35a5e24b53bc6 Reviewed-on: https://code.wireshark.org/review/1741 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-05-23Allow wtap_read() and wtap_seek_read() to return non-packet records.Guy Harris1-11/+15
This is the first step towards implementing the mechanisms requestd in bug 8590; currently, we don't return any records other than packet records from libwiretap, and just ignore non-packet records in the rest of Wireshark, but this at least gets the ball rolling. Change-Id: I34a45b54dd361f69fdad1a758d8ca4f42d67d574 Reviewed-on: https://code.wireshark.org/review/1736 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-05-09Revert "Refactor Wiretap"Guy Harris1-12/+12
This reverts commit 1abeb277f5e6bd27fbaebfecc8184e37ba9d008a. This isn't building, and looks as if it requires significant work to fix. Change-Id: I622b1bb243e353e874883a302ab419532b7601f2 Reviewed-on: https://code.wireshark.org/review/1568 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-05-09Refactor WiretapMichael Mann1-12/+12
Start of refactoring Wiretap and breaking structures down into "generally useful fields for dissection" and "capture specific". Since this in intended as a "base" for Wiretap and Filetap, the "wft" prefix is used for "common" functionality. The "architectural" changes can be found in cfile.h, wtap.h, wtap-int.h and (new file) wftap-int.h. Most of the other (painstaking) changes were really just the result of compiling those new architecture changes. bug:9607 Change-Id: Ife858a61760d7a8a03be073546c0e7e582cab2ae Reviewed-on: https://code.wireshark.org/review/1485 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-04-03Handle DLT_USER2 as PKTAP, to handle Mavericks.Guy Harris1-0/+5
Change-Id: Ic58c3584994f822d5d5a1434050aaa61f86ba17c Reviewed-on: https://code.wireshark.org/review/937 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-04-03Add a capture_pktap() routine and use it.Guy Harris1-0/+4
That way, the packet counts are will be valid when capturing. Change-Id: I0a21cc817d918e7f849620db5ca6dfd84bd2cd87 Reviewed-on: https://code.wireshark.org/review/936 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-02-25Wireshark: Add option to choose format type of capture fileMichal Labedzki1-1/+1
The best heuristic can fail, so add possibility to manually choose capture file format type, so not correctly recognize file format can be loaded in Wireshark. On the other side now it is possible to open capture file as file format to be dissected. Change-Id: I5a9f662b32ff7e042f753a92eaaa86c6e41f400a Reviewed-on: https://code.wireshark.org/review/16 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Reviewed-by: Evan Huus <eapache@gmail.com> Tested-by: Evan Huus <eapache@gmail.com>
2013-12-21Add missing includesJakub Zawadzki1-0/+2
svn path=/trunk/; revision=54332
2013-11-17Move the epan/filesystem.c routines to wsutil; they're not specific toGuy Harris1-1/+2
packet dissection, they're specific to the entire Wireshark suite of programs. svn path=/trunk/; revision=53377
2013-11-08The "file types" we have are actually combinations of types andGuy Harris1-2/+2
subtypes, e.g. Network Monitor version 1 and Network Monitor version 2 are separate "file types", even though they both come from Network Monitor. Rename various functions, #defines, and variables appropriately. svn path=/trunk/; revision=53166
2013-05-22Pull the capture-session state information out of capture_opts and putGuy Harris1-2/+2
it into a separate capture_session structure. capture_opts should contain only user-specified option information (and stuff directly derived from it, such as the "capturing from a pipe" flag). svn path=/trunk/; revision=49493
2012-10-16Add wtap_pseudo_header union to wtap_pkthdr structure.Jakub Zawadzki1-2/+2
Use pkthdr instead of pseudo_header as argument for dissecting. svn path=/trunk/; revision=45601
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45015
2012-08-02From Richard Stearn: support for AX.25, including support forGuy Harris1-0/+4
LINKTYPE_AX25. svn path=/trunk/; revision=44211
2012-08-02From Richard Stearn: AX.25 KISS protocol support.Guy Harris1-0/+4
Part 1 of the fix for bug 7529. svn path=/trunk/; revision=44202
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-05-02Rename the NetMon 802.11 radio header and radiotap 802.11 radio headerGuy Harris1-1/+1
dissector source files to match the "packet-ieee80211-XXX" pattern used for other 802.11 radio header dissectors. svn path=/trunk/; revision=42380
2012-05-02Use WTAP_ENCAP_IEEE_802_11_xxx for all the "802.11 plus radio header"Guy Harris1-3/+3
encapsulations. For pre-V9 AiroPeek captures, leave the radio information in the packet data, just as we do with the Prism, AVS, radiotap, and NetMon headers. Add a dissector for it. svn path=/trunk/; revision=42379
2011-12-13Rename WTAP_ERR_BAD_RECORD to WTAP_ERR_BAD_FILE; it really reports anyGuy Harris1-1/+1
form of corruption/bogosity in a file, including in a file header as well as in records in the file. Change the error message wtap_strerror() returns for it to reflect that. Use it for some file header problems for which it wasn't already being used - WTAP_ERR_UNSUPPORTED shouldn't be used for that, it should only be used for files that we have no reason to believe are invalid but that have a version number we don't know about or some other non-link-layer-encapsulation-type value we don't know about. svn path=/trunk/; revision=40175
2011-05-19Fix the capture info dialog. Reset the EOF state such that theMichael Tüxen1-10/+13
number get actually updated. svn path=/trunk/; revision=37279
2011-04-21Add a new WTAP_ERR_DECOMPRESS error, and use that for errors discoveredGuy Harris1-0/+8
by the gunzipping code. Have it also supply a err_info string, and report it. Have file_error() supply an err_info string. Put "the file" - or, for WTAP_ERR_DECOMPRESS, "the compressed file", to suggest a decompression error - into the rawshark and tshark errors, along the lines of what other programs print. Fix a case in the Netscaler code where we weren't fetching the error code on a read failure. svn path=/trunk/; revision=36748
2011-03-22Rewrote error reporting to avoid using a 2048 bytes stack buffer.Stig Bjørlykke1-4/+4
Coverity 726. svn path=/trunk/; revision=36245
2010-10-12Define some vars & fcns as static;Bill Meier1-146/+146
Also: do some minor reformmating and cleanup of whitespace. svn path=/trunk/; revision=34492
2008-08-12From Alexey Neyman:Anders Broman1-0/+6
Implement dissector for IPMB (DLT_IPMB_LINUX, 209). svn path=/trunk/; revision=25986
2008-06-24Add gtk/capture_globals.h, to declare global_capture_opts, so files thatGuy Harris1-1/+1
don't need global_capture_opts don't need to have it declared and thus don't need capture_options defined. Include gtk/capture_globals in the files in question. Change some more capture_opts references to refer to global_capture_opts. Change some global_capture_opts references in routines with a capture_opts argument to refer to capture_opts. The structure type is capture_options, not capture_opts; fix some references. Include <sys/types.h>, if it's present, in capture_opts.h, so we get gid_t defined. Clean up indentation. svn path=/trunk/; revision=25574
2008-06-24Have capture_info_ui_create() and capture_info_open() take a pointer toGuy Harris1-2/+2
the capture_opts structure as an argument, rather than just a pointer to the interface name. Don't declare a global "capture_opts" pointer, as we don't define it any more. svn path=/trunk/; revision=25570
2007-12-18Fold the Prism and AVS header dissectors into packet-ieee80211.c, andGuy Harris1-2/+0
have them use least some of the radio-information fields, so that the same field name can be used for multiple radio header types. The AVS header can supply the data rate in bits/second, so have that field be in those units, and make it 64 bits to leave room for the future, Just In Case. Display it as Mb/s, however. svn path=/trunk/; revision=23911
2007-10-05If wtap_open_offline() fails, print the errno tooJeff Morriss1-1/+1
svn path=/trunk/; revision=23077
2007-08-30And include packet-wlancap.hStig Bjørlykke1-0/+1
svn path=/trunk/; revision=22752
2007-08-30Count IEEE 802.11 WLAN AVS packets.Stig Bjørlykke1-0/+3
svn path=/trunk/; revision=22750
2007-06-26Add capture counts for PPI.Gerald Combs1-0/+4
svn path=/trunk/; revision=22195
2006-11-05change all file offsets from long to gint64 so we can - theoretically - ↵Ulf Lamping1-1/+1
handle files > 2GB correct. Please distclean Win32 builds! svn path=/trunk/; revision=19814
2006-05-31Tethereal/tethereal -> TShark/tshark.Gerald Combs1-7/+7
svn path=/trunk/; revision=18268
2006-05-28Ethereal->WiresharkAnders Broman1-7/+7
svn path=/trunk/; revision=18235
2006-05-21name changeRonnie Sahlberg1-2/+2
svn path=/trunk/; revision=18197
2006-03-01Clean up indentation a bit.Guy Harris1-4/+109
In "capture_input_new_file()", don't call the callbacks unless we succeed in opening the new file. Have "capture_info_new_file()" return a success/failure indication. Improve the message logged when we fail to open the new file if we're only opening it for the quick packet counts. We really should put up an alert box and give up on the capture at that point. svn path=/trunk/; revision=17437
2006-01-23Call capture_radiotap() when capturing on a device supplying RadiotapGuy Harris1-0/+4
headers. Fix capture_radiotap() to check for padding between the 802.11 header and the 802.11 payload and to call different capture routines depending on whether it's present or not, and create capture_ieee80211_datapad() to handle the case where it's present. Fix capture_radiotap() to convert the Radiotap header length from little-endian, and to do some sanity checking of that length. Fix capture_ieee80211_common() to use the offset supplied to it to fetch the frame control field, as that offset isn't necessarily 0. svn path=/trunk/; revision=17083
2005-12-13don't try to close wtap, if we couldn't load the wiretap fileUlf Lamping1-1/+2
svn path=/trunk/; revision=16771
2005-12-06Clean up capture_enc(), export it, and use it in the capture window.Guy Harris1-2/+4
svn path=/trunk/; revision=16709
2005-12-04Declare "capture_info_packet()"'s as static, to match the definition.Guy Harris1-3/+3
Declare the "pd" argument to be "const guchar *", to match the way packet data is declared elsewhere, and so that if the headers "capture_info.c" includes don't define "u_char" it still compiles. svn path=/trunk/; revision=16671
2005-12-04move the complete functionality of the capture info dialog from ↵Ulf Lamping1-17/+97
capture_loop.c to capture_info.c and call it from capture.c (instead of capture_loop.c). This way, the capture child don't need to now any of the packet_counter things (no epan/packet.h and all alike). Currently the capture_info code will always open another wiretap file instance to build it's own counter values. This isn't optimized for now (next step: use data from cf_continue_tail() somehow). svn path=/trunk/; revision=16669
2005-12-03split some parts of the packet counting functions into their own files ↵Ulf Lamping1-0/+146
capture_info(.c/.h), so we can use it from the main program svn path=/trunk/; revision=16668