Commit Graph

47857 Commits

Author SHA1 Message Date
Guy Harris 2bf78ceca9 In the comments for pcap_link_type, point to
http://www.tcpdump.org/linktypes.html for the details, rather than to
some particular OS's net/bpf.h (assuming it even has one), and speak of
it as a LINKTYPE_ value rather than a DLT_ value (in those cases where
the LINKTYPE_ value for a given link-layer header type is different from
the DLT_ value, it's the LINKTYPE_ value that should be passed to
text2pcap, as it's what gets written to the file, and those should be
the always-platform-independent LINKTYPE_ values rather than the
possibly-platform-dependent DLT_ values).

svn path=/trunk/; revision=51008
2013-07-29 08:37:18 +00:00
Guy Harris 7c3e7c9506 The argument to the -l flag to text2pcap is a LINKTYPE_ value, not a
DLT_ value, which is good because it's a numerical value and the
numerical values for some link-layer header types are OS-dependent, but
the numerical values for all LINKTYPE_ values are OS-independent.  Use
LINKTYPE_RAW, not the value for the DLT_RAW on some but not all OSes,
for raw IP.

Also, 7 is LINKTYPE_ARCNET_BSD, emphasis on the "_BSD"; there's also a
Linux encapsulation for ARCNet that is different.  Note that it's the
BSD flavor.

svn path=/trunk/; revision=51005
2013-07-29 08:30:42 +00:00
Pascal Quantin 3e4e1448d2 Try to fix error: uninitialized const 'zeroes' is invalid in C++ [-Werror=c++-compat]
svn path=/trunk/; revision=51004
2013-07-29 07:54:24 +00:00
Guy Harris bf9ec45248 Make a never-changed pile-o-zeroes const.
svn path=/trunk/; revision=51003
2013-07-29 07:34:07 +00:00
Guy Harris 847257a27d Make a never-changed table const.
svn path=/trunk/; revision=51002
2013-07-29 07:30:34 +00:00
Guy Harris 0c2c7eac71 Make non-static a variable that doesn't need to be static.
svn path=/trunk/; revision=51001
2013-07-29 07:28:28 +00:00
Guy Harris 31731e9b91 The base_secs value should be a time_t, as it's calculated using
mktime().  That eliminates the need for casts.

It should *also* be part of a per-wtap-structure private data structure,
not a global variable; make it so.

svn path=/trunk/; revision=51000
2013-07-29 00:54:33 +00:00
Guy Harris 47c81238db Add a URL for a STANAG 4607 spec.
Fix some typoes in comments.

svn path=/trunk/; revision=50999
2013-07-29 00:34:23 +00:00
Guy Harris afe77c5a4e Clean up white space a bit, make the description of the capture column
type depend on what values are supported, add some comments.

Regularize the curly bracket style a bit.

svn path=/trunk/; revision=50998
2013-07-29 00:27:20 +00:00
Evan Huus 851c8bb487 Use the portable g_ntohl, also add some casts.
svn path=/trunk/; revision=50997
2013-07-28 23:58:30 +00:00
Evan Huus 0b796e53cf From Linas Vepstas via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8962
Enhancement: Add STANAG 4607 file format

svn path=/trunk/; revision=50996
2013-07-28 23:41:18 +00:00
Guy Harris 21ba3c2352 Close a memory leak.
svn path=/trunk/; revision=50993
2013-07-28 22:37:45 +00:00
Evan Huus f3fb2c00ec Remove unused variable caught by GCC 4.8.
svn path=/trunk/; revision=50992
2013-07-28 22:02:00 +00:00
Guy Harris a4ad9e9f74 If a core Wireshark developer repeatedly can't remember that the
argument to the -F flag for pcap format is "libpcap", not "pcap", we
have a problem.  Make it "pcap", and add a backwards-compatibility hack
to support using "libpcap" as well.

Update the man pages to refer to it as pcap as well, and fix the
capitalization of "WinPcap" (see http://www.winpcap.org) while we're at
it.

Also, refer to http://www.tcpdump.org/linktypes.html for the list of
link-layer header types for pcap and pcap-ng.

svn path=/trunk/; revision=50989
2013-07-28 21:12:07 +00:00
Stig Bjørlykke 0f13e3c95d Add support for 64 bit value string in Lua.
Lua cannot store a 64 bit integer with full precision, which is used
for keys in tables, so this is not a 100% solution.  But it will probably
be good enough for value strings, and it is better to have some support
than no support.

svn path=/trunk/; revision=50988
2013-07-28 20:59:59 +00:00
Guy Harris 974d0509e8 Explain what the big loop in update_properties_all() is doing, and
what's done after that.

If we want to set the all-interfaces capture filter string, just set it,
don't add anything to the drop-down list for it.

If, after we've succeeded starting a capture, all active interfaces have
the same capture filter, *do* add that filter to the all-interfaces
recent capture filters list.

Also, free g_strduped capture filter strings when we're done with them.

svn path=/trunk/; revision=50986
2013-07-28 20:34:52 +00:00
Guy Harris e65c5cc89e Add a comment.
In recent_add_cfilter(), the list we're working on is cfilter_list;
properly remove an item from it - don't assign the result to
recent_cfilter_list, assign it to cfilter_list.  This may fix some
crashes and Valgrind errors.

svn path=/trunk/; revision=50984
2013-07-28 20:24:27 +00:00
Evan Huus dbabc55955 Much simpler (and possibly faster) fix for the 64-bit value string label issue.
svn path=/trunk/; revision=50983
2013-07-28 20:05:04 +00:00
Evan Huus 4e5ac2989c As caught by Stig: 64-bit value strings could print the field name twice.
Don't do that.

svn path=/trunk/; revision=50982
2013-07-28 19:56:23 +00:00
Anders Broman 266e577aee Update to handle version 9.
svn path=/trunk/; revision=50981
2013-07-28 19:25:14 +00:00
Pascal Quantin deee570058 From David Richards via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8870 :
Add Windows specific items to .gitignore

svn path=/trunk/; revision=50979
2013-07-28 16:26:29 +00:00
Jörg Mayer cb3d6a9eda Looks like cfilter_combo_utils.c got removed.
svn path=/trunk/; revision=50978
2013-07-28 15:48:34 +00:00
Graham Bloice 2f6ee944d8 Added more build artefacts to the clean target
svn path=/trunk/; revision=50977
2013-07-28 14:40:56 +00:00
Pascal Quantin e533453ee4 Align info column for UM MCCH/MTCH PDUs
svn path=/trunk/; revision=50976
2013-07-28 14:35:42 +00:00
Gerald Combs 12e86ee2cd [Automatic manuf, services and enterprise-numbers update for 2013-07-28]
svn path=/trunk/; revision=50973
2013-07-28 14:03:35 +00:00
Graham Bloice 71921ced57 clean target misses some build artefacts; capinfos.lib and editcap.lib
svn path=/trunk/; revision=50972
2013-07-28 13:57:12 +00:00
Evan Huus a9bccc8dc8 Don't force the allocator choice in the data-structure tests, we want to be able
to override that to simple for valgrinding (we still force the allocator in the
allocator and timing tests, of course).

svn path=/trunk/; revision=50971
2013-07-28 12:55:37 +00:00
Evan Huus b43996c8ab Fix a bug in the gc routine discovered while formally working out parts of the
algorithm.

Also add a test case to excercise it for future.

svn path=/trunk/; revision=50970
2013-07-28 12:46:44 +00:00
Pascal Quantin 23d40bcfcf Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8841 :
Fix PER normally small non-negative whole number dissection when it is greater than or equal to 64

svn path=/trunk/; revision=50969
2013-07-28 12:36:48 +00:00
Pascal Quantin eddc421d85 From Michal Labedzki via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8948 :
Bluetooth: add missing PSM strings

svn path=/trunk/; revision=50968
2013-07-28 11:32:06 +00:00
Jakub Zawadzki 5b15390b3a Store protocol fields in single linked list, saves about 1 MB of memory.
svn path=/trunk/; revision=50967
2013-07-28 10:47:31 +00:00
Graham Bloice 243a76b04f Improved info column with multiple pdu's in a frame
svn path=/trunk/; revision=50966
2013-07-28 09:57:52 +00:00
Guy Harris 51047d02a1 Get rid of some unused variables.
Register those hf[] arrays that weren't getting registered.

Reformat all hf[] array initializations.

svn path=/trunk/; revision=50965
2013-07-28 09:36:31 +00:00
Jakub Zawadzki d6f249633a dfilter: move convertion to byte to seperate function
svn path=/trunk/; revision=50964
2013-07-28 08:41:26 +00:00
Michael Mann f3dac73d38 Fix compile error that resulted from whitespace cleanup.
svn path=/trunk/; revision=50963
2013-07-28 00:11:30 +00:00
Michael Mann a87f47c02c Make many items filterable for Vines dissectors.
Add support for FT_VINES type.

svn path=/trunk/; revision=50962
2013-07-28 00:07:49 +00:00
Evan Huus b9870c0969 Little optimizations.
Move a few assignments around to avoid one extra subtraction. I suspect having
the two if statements next to each other is friendly to the compiler's optimizer
as well.

Shaves ~1.3% off my timing tests, bringing the new design *very* close to the
old one in raw allocation speed.

svn path=/trunk/; revision=50961
2013-07-28 00:00:37 +00:00
Evan Huus e7dfea82f3 Little things make big differences: somehow while I was experimenting this
unobtrusive if statement got dropped. Without it the allocator exhibits the old
bad behaviour of 3x memory usage and heavy fragmentation.

We want it back, thank you very much.

svn path=/trunk/; revision=50960
2013-07-27 23:35:59 +00:00
Evan Huus 9b9467cb79 Small optimization: conjoin two mutually exclusive ifs with an else.
svn path=/trunk/; revision=50959
2013-07-27 23:01:24 +00:00
Evan Huus 720cce4102 Simplify out an addition that happened a lot by performing it once on the
variable it affected, since that variable wasn't used for any other purpose.

svn path=/trunk/; revision=50958
2013-07-27 22:51:27 +00:00
Guy Harris 210507cc76 Have separate lists of recent capture filters for all interfaces, in
addition to a "global" list.  Store all of those lists in the recent
file.  Maintain the lists in ui/recent.c, rather than attaching them to
widgets; have the code that populates the combo boxes get the lists from
the ui/recent.c code.

This makes a little more of the code GUI-toolkit-independent, and should
fix bug 7278.

#BACKPORT 1.10, 1.8

svn path=/trunk/; revision=50956
2013-07-27 22:37:26 +00:00
Evan Huus 3663498a8b Redesign of the wmem block allocator.
What was becoming apparent as more dissectors started using wmem was that the
old block allocator design had issues with memory fragmentation. This keeps the
same underlying memory layout, but completely changes how free blocks are kept.
It runs about 3% slower in my tests (still an order of magnitude faster than
g_malloc) but uses about 1/3 the memory.

I suspect some simple optimizations could reclaim that 3% as well - the design
is fast, but I did not code particularly for speed.

Thoroughly tested with the existing test suite (which caught half a dozen bugs
in my first draft) so it should actually work!

svn path=/trunk/; revision=50955
2013-07-27 22:27:28 +00:00
Evan Huus a076d6332e Use a #define, tweak a comment.
svn path=/trunk/; revision=50954
2013-07-27 21:56:43 +00:00
Guy Harris b50424fad8 Clean up indentation.
svn path=/trunk/; revision=50953
2013-07-27 21:23:19 +00:00
Jakub Zawadzki 0d414ac0fd make some variables static
svn path=/trunk/; revision=50952
2013-07-27 20:57:58 +00:00
Jakub Zawadzki 73aa1e7807 Support drange for functions
last think from bug #8979
+ fix semcheck.c:875: warning: signed and unsigned type in conditional expression

svn path=/trunk/; revision=50951
2013-07-27 19:14:34 +00:00
Jakub Zawadzki 1f4d76a6ca Some more work related to bug #8979 and previous commit
- Make http.location[0:4] == lower(http.location) behave the same as lower(http.location) == http.location[0:4]
- fix compiler errors + comments

svn path=/trunk/; revision=50950
2013-07-27 18:55:05 +00:00
Jakub Zawadzki da170f1d04 Fix bug #8979: Comparing function call and a range in the filter crashes Wireshark
store whole node, don't assume it's always STTYPE_FIELD

svn path=/trunk/; revision=50949
2013-07-27 17:17:15 +00:00
Martin Kaiser 9e33a6bade if we capture on multiple interfaces, the output file will be pcapn-ng
even if we enforce pcap ouput format via -P
    
in such a case, we *can* write a capture comment to the output file

svn path=/trunk/; revision=50948
2013-07-27 16:48:06 +00:00
Martin Kaiser 834b464844 add --capture-comment to dumpcap's manpage
svn path=/trunk/; revision=50947
2013-07-27 16:39:10 +00:00