Commit Graph

73 Commits

Author SHA1 Message Date
Bill Meier 7219ee2a49 Use val_to_str_ext() & friends to access sminmpec_values[];
Also: packet-nhrp.c: #include sminmpec.h not req'd;

svn path=/trunk/; revision=34143
2010-09-17 04:51:21 +00:00
Bill Meier 252df40cc2 Extensive V9/V10 code clean up, bug fixing & dissection display improvements:
Bugs fixed:
 - Invalid time display for various time fields;
     Millisecs for types 152, 153 are actually stored as 64 bit integers;
     Microsecs, nanosecs are actually stored  in "NTP format";
     Times for fields 158, 159 are relative to "export time";
     SystemInitTime displayed incorrectly;
     ...
 - Options template not cached when only scope fields in template.
 - Templates not processed on first pass thru capture file:
    (In some cases data flows might not be handled until options template later displayed).
 - V9: number of options template entries limited to about 8 instead of intended 42;
 - Multiple options temlate flows in an Options Template flowset not handled;
 - "NotSentOctets" dislayed as "NotSentPackets";
   ...

Cleanups:
 - Options and data template processing code more or less rewritten;
 - options template displayed with format similar to that used for data templates;
 - Handling and display of PEN field (including use to indicate REVERSE) improved;
 - Don't use same filter name for two similar fields which only differ in size;
 - Handling & dislay of "variable length" fields improved;
 - sminmec lookup (PEN) done only during template processing & cached for later use;
   ...
 - Whitespace/Formatting

svn path=/trunk/; revision=34140
2010-09-17 01:45:29 +00:00
Anders Broman e9f4c63c1d From Aamer Akhter:
NetFlow forwarding status and template fixes.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5083

svn path=/trunk/; revision=33766
2010-08-11 11:54:25 +00:00
Stig Bjørlykke c7f2634f52 Removed non-ASCII characters.
svn path=/trunk/; revision=33450
2010-07-06 06:54:51 +00:00
Anders Broman 8d917e7bca From Andrew Feren:
Several small fixes to NetFlow decoding.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4962

svn path=/trunk/; revision=33443
2010-07-06 04:20:27 +00:00
Stig Bjørlykke 9c20c7b510 From Hitoshi Irino via bug 4942:
1. fix the bug in dissect_v9_pdu.
(The bug is introduced in r32627, It's my fault, I'm sorry.)
When option data record is decoded, unpatched dissect_v9_pdu decode only scope
fields, it does not decode following data fields. And it runs in endless loop
when length of a scope filed is 0. This patch solve these problem.
2. defines some value_strings for some fields.
3. updates URLs in comment.

svn path=/trunk/; revision=33348
2010-06-28 12:42:40 +00:00
Stig Bjørlykke eec58bc3e9 Remove C++ comment.
svn path=/trunk/; revision=33238
2010-06-16 17:47:42 +00:00
Stig Bjørlykke ed71ce4407 From Hitoshi Irino via bug 4883:
Support NetFlow exported from Cisco ASA5500 series.

From me:
Fixed some hf description entries.

svn path=/trunk/; revision=33236
2010-06-16 15:36:02 +00:00
Anders Broman fe206f0d1b From Andrew Feren:
The current implementation of options templates continues reading past the end
of the option template.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4744

svn path=/trunk/; revision=32669
2010-05-05 05:41:07 +00:00
Anders Broman cc0e177b54 From Andrew Feren:
Solve Problems decoding variable length strings in IPFIX.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4742

svn path=/trunk/; revision=32657
2010-05-04 05:34:14 +00:00
Jaap Keuter 9b0019e3e7 From Hitoshi Irino:
The function "dissect_v9_pdu" of "epan/dissectors/packet-netflow.c" decodes
NetFlow v9 packets and IPFIX packets with same logic. But, the "scope field" is
different between NetFlow v9 and IPFIX. NetFlow v9 has only 5 kind of scopes.
On the other hand, many Information Elements can be used as scope fields in 
IPFIX packets.

svn path=/trunk/; revision=32627
2010-05-02 12:50:54 +00:00
Anders Broman 149c7ae55f From Hitoshi Irino:
Displaying value and type of IPFIX reverse PEN elements in data records
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4399

svn path=/trunk/; revision=32082
2010-03-02 06:12:21 +00:00
Gerald Combs fe6dc2f7c3 Fix for bug 4444.
svn path=/trunk/; revision=31780
2010-02-03 23:10:45 +00:00
Jeff Morriss 96044c161d From Hitoshi Irino via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4381 : restore dissection of netflow v9 packets.
svn path=/trunk/; revision=31745
2010-01-31 22:10:17 +00:00
Gerald Combs 080bbacb41 Preliminary fix for bug 4423.
svn path=/trunk/; revision=31735
2010-01-29 21:57:32 +00:00
Jeff Morriss aa5feea5b3 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4368 :
Don't use add_item() to add FT_ABSOLUTE_TIMEs. Instead either:
	- fetch the seconds (and maybe milliseconds) and use add_time()
	- (or) change the field to FT_BYTES and give the raw data to
	  ntp_fmt_ts() for presentation 

Also change BASE_NONE to ABSOLUTE_TIME_LOCAL for the remaining time fields.

svn path=/trunk/; revision=31725
2010-01-29 04:05:49 +00:00
Bill Meier 9b568ea691 Fix gcc -Wshadow warnings
svn path=/trunk/; revision=31561
2010-01-19 00:37:39 +00:00
Anders Broman dd9d463bcf From Hitoshi Irino:
Failed to decode NetFlow v9 packets including a 0 length scope field.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4381

svn path=/trunk/; revision=31488
2010-01-11 08:05:09 +00:00
Anders Broman 5e60817e81 From Hitoshi Irino:
More complete support for IPFIX Information Elements for packet-netflow.c
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4365

svn path=/trunk/; revision=31416
2010-01-03 14:23:08 +00:00
Stephen Fisher 49d7118bd2 Change two cases of FT_STRINGZ to BASE_NONE from BASE_HEX and BASE_DEC as
introduced in the last revision to this file.  This prevents an assertion
when starting tshark/wireshark.


svn path=/trunk/; revision=31359
2009-12-24 00:36:05 +00:00
Jaap Keuter 126782cfa9 From Kirby Files:
Cisco has recently released (in 15.0.1) support for integration between NBAR
and Flexible Netflow (FNF). This allows NBAR-recognized applications to be
identified in the Netflow output. To do so, 3 new template fields were added:
94: APPLICATION_DESC
95: APPLICATION_ID
96: APPLICATION_NAME

svn path=/trunk/; revision=31357
2009-12-23 20:24:41 +00:00
Guy Harris 8e236e55de For fields of type FT_ABSOLUTE_TIME, have the "display" value be one of
ABSOLUTE_TIME_LOCAL or ABSOLUTE_TIME_UTC, indicating whether to display
the date/time in local time or UTC. (int)ABSOLUTE_TIME_LOCAL ==
(int)BASE_NONE, so there's no source or binary compatiblity issue,
although we might want to eliminate BASE_NONE at some point and have the
BASE_ values used with integral types start at 0, so that you can't
specify BASE_NONE for an integral field.

svn path=/trunk/; revision=31319
2009-12-19 03:17:44 +00:00
Gerald Combs b11e3a7ea3 From Jason Rusmisel via bug 4199: Increase the maximum number of
template fields we handle from 20 to 30.

svn path=/trunk/; revision=30827
2009-11-05 01:01:01 +00:00
Jaap Keuter 8041e9732e From Jason Rusmisel:
The netflow implementation has a bug where the code exists to extract four
fields from a packet, however, the decoder for these fields has not been
registered in proto_register_netflow in the hf_register_info array. 
The fix is to include decoders for the fields in the proto_register_netflow.

svn path=/trunk/; revision=30809
2009-11-03 23:01:03 +00:00
Bill Meier c680dc89a3 Don't coerce a possibly unaligned ptr to a (guint32 *);
Also: Calculate the same template hash whether on a LE or BE machine.

svn path=/trunk/; revision=29598
2009-08-28 16:36:24 +00:00
Kovarththanan Rajaratnam 0a5b014cec Don't guard col_clear with col_check
svn path=/trunk/; revision=29344
2009-08-09 07:36:13 +00:00
Kovarththanan Rajaratnam e971354a54 Don't guard col_set_str (COL_PROTOCOL) with col_check
svn path=/trunk/; revision=29340
2009-08-09 06:26:46 +00:00
Gerald Combs e951661130 Remove some unused variable assignments.
svn path=/trunk/; revision=29243
2009-07-30 16:17:46 +00:00
Gerald Combs 16c1dd1b2d Don't use tvb_memcpy to fill in a struct. (Cue Jamie Hyneman saying
"EVER!") Expand the entry/scope struct to include private enterprise
numbers instead of casting guint32s to arbritrary chunks of memory.
Limit the number of entries and scopes we allocate.  Don't allocate
memory every time we see a new template.  Don't use a C++ keyword for
variable names.

svn path=/trunk/; revision=29061
2009-07-10 23:39:23 +00:00
Stig Bjørlykke 0437f102c3 From Kovarththanan Rajaratnam:
More FT_XXX cleanup.

svn path=/trunk/; revision=28971
2009-07-07 09:02:59 +00:00
Anders Broman 3cc1acb3b1 CFLOW decoding is wrong for IPv6 fields.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3328

svn path=/trunk/; revision=28957
2009-07-06 17:37:03 +00:00
Gerald Combs 5631122d1d Try to allocate enough memory on all platforms.
svn path=/trunk/; revision=28930
2009-07-03 00:17:06 +00:00
Gerald Combs 88ba030310 From Kovarththanan Rajaratnam via bug 3567:
The template cache contains pointers that are session-scope (only freed in
netflow_reinit()) but still we use g_malloc(). This patch changes that so we
now use se_alloc(). With this patch I'm able to reproduce the crash
("Per-session memory corrupted").

svn path=/trunk/; revision=28927
2009-07-02 20:35:58 +00:00
Gerald Combs e2890d4053 Fix a couple of labels.
svn path=/trunk/; revision=28914
2009-07-01 23:36:35 +00:00
Gerald Combs a66905c3d2 Add a couple of IPFIX labels where they differ from Netflow.
svn path=/trunk/; revision=28912
2009-07-01 20:56:03 +00:00
Gerald Combs 0aaad68faf Try to fix fuzzing errors in bug 3636. When dissecting an options
template, differentiate between Netflow v9 and IPFIX, which require
different interpretations. Add other minor fixes and comments.

svn path=/trunk/; revision=28911
2009-07-01 19:36:24 +00:00
Stig Bjørlykke b228488bc0 From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
    for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
    FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero

svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
Bill Meier 548e468959 Misc dissector cleanup:
- Make some fcns & vars static
- hf[] blurbs: "" and repeated text --> NULL
- Move proto_register & proto_reg_handoff to end of source
- packet-catapult-dct2000: simplify proto_reg_handoff
- Use consistent indentation

svn path=/trunk/; revision=28488
2009-05-26 16:01:12 +00:00
Gerald Combs 9a72434b1e Add support for process flow records to IPFIX, which required adding
support for vendor-specific IEs. Fix variable-length record handling. Add
conversation tracking to the UDP dissector and add process flow
information to TCP and UDP conversations.

This lets us run process flow collectors on one or more machines and
have the process username, PID, command name, etc. show up in the TCP
and UDP protocol trees.

svn path=/trunk/; revision=28366
2009-05-14 23:33:17 +00:00
Bill Meier d6a5a7c761 P64 changes: Fix some cases for which size_t is not required
svn path=/trunk/; revision=27822
2009-03-22 20:55:31 +00:00
Gerald Combs e4892bb6c3 Make sure our offset increases, otherwise we'll go into a large loop.
svn path=/trunk/; revision=27682
2009-03-09 20:52:24 +00:00
Bill Meier c0e92cbc04 Fix various typos and spelling errors (mostly in text strings)
svn path=/trunk/; revision=27065
2008-12-20 00:09:02 +00:00
Bill Meier 49465bc00c Process port prefs only in prefs callback and not in registered init fcn
svn path=/trunk/; revision=26679
2008-11-03 15:15:56 +00:00
Jaap Keuter 8ddc5acb3c From Alexander Dupuy:
When dissecting an IPFIX PDU containing start and end times for both directions
of a biflow, no distinction is made between forward and reverse directions. 
This can lead to bizarre (or worse, subtly incorrect) output for the flow
durations computed from start and end times.
This patch fixes the specific problem of duration display in wireshark for
IPFIX biflow PDUs.  It does not address the general issue of tracking different
types of start/end timestamps separately - it is unlikely that the general case
will occur in practice, although it is certainly possible.

svn path=/trunk/; revision=26663
2008-10-31 23:00:57 +00:00
Stig Bjørlykke bd08ae7ee6 Fix some "format not a string literal and no format arguments" warnings.
svn path=/trunk/; revision=26647
2008-10-31 15:11:57 +00:00
Jaap Keuter 3934dfb936 From Alexander Dupuy:
More complete support for IPFIX RFC 5103 biflows.

svn path=/trunk/; revision=26536
2008-10-24 07:32:16 +00:00
Bill Meier 6aa5f8aa6a Minor cleanup related to proto_reg_handoff
svn path=/trunk/; revision=26246
2008-09-22 16:26:41 +00:00
Bill Meier 38eb4d6ce3 Use const with value_string array definitions
svn path=/trunk/; revision=26028
2008-08-14 23:51:52 +00:00
Guy Harris ea4fbda062 Don't fetch data until you need it.
svn path=/trunk/; revision=25907
2008-08-02 21:59:33 +00:00
Anders Broman 38ac851958 Fix packet-netflow.c:2666: warning: 'pen' may be used uninitialized in this function
and remove some C++ comments - some compilers don't allow them (at least not by default).

svn path=/trunk/; revision=25906
2008-08-02 16:13:40 +00:00