Commit graph

99 commits

Author SHA1 Message Date
Stig Bjørlykke
4e42731d0b Added cast to int for nstime_t.nsecs.
svn path=/trunk/; revision=37689
2011-06-17 11:09:35 +00:00
Anders Broman
7cd35baaaf From Aamer Akhter:
This patch adds support for a number of performance related metric in NetFlow.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5986

svn path=/trunk/; revision=37556
2011-06-05 19:45:22 +00:00
Bill Meier
f3432a973c Don't assign to a proto_item* if the value won't be used:
Fixes Coverity 903,935,968,985,997,999,1024,1025,1134;
Remove unneeded #includes;
Do whitespace cleanup.

svn path=/trunk/; revision=37331
2011-05-20 15:44:25 +00:00
Jeff Morriss
e96cd69468 Avoid passing a NULL string pointer to format routines: some libc's (e.g.,
Solaris') will seg-fault on that.

svn path=/trunk/; revision=37181
2011-05-16 17:02:22 +00:00
Bill Meier
acd01c89d9 Fix a compiler warning
svn path=/trunk/; revision=37136
2011-05-13 22:10:42 +00:00
Bill Meier
716132e53a Fix Bug 5919: "IE 89 Forwarding Status - Incorrect Decoding"
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5919

svn path=/trunk/; revision=37133
2011-05-13 21:47:09 +00:00
Anders Broman
214b9c3ad0 From Motonori Shindo:
Current NetFlow V9/IPFIX dissector treats IN_BYTES (IE=1) and
IN_PERMANENT_BYTES (IE=85) exactly in the same way. The same applies to IN_PKTS
(IE=2) and IN_PERMANENT_PKTS (IE=86). However, IN_BYTES/IN_PKTS and
IN_PERMANENT_BYTES/IN_PERMANENT_PKTS have different semantics so they should be
distinguishable when they are displayed or specified in a filter. Please find
attached the patch
which does that.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5807

svn path=/trunk/; revision=36661
2011-04-16 12:03:50 +00:00
Chris Maynard
3e6bd6b558 From Andrew Feren via bug 5774: Make V9TEMPLATE_MAX_FIELDS a user preference.
From me: Use lower-case v9template_max_fields instead of upper-case to avoid
any confusion with that variable being a define.  Use STRINGIFY() so we always
keep the default and the displayed default the same.  Fix bug introduced by
Andrew's patch where option_scope_field_count was inadvertently changed to
option_field_count.  Append "Maximum value can be adjusted ..." message to all
relevant expert infos.

svn path=/trunk/; revision=36643
2011-04-14 16:17:09 +00:00
Chris Maynard
f627b9911a Via bug5774, Andrew Feren requested V9TEMPLATE_MAX_FIELDS be increased to 100.
svn path=/trunk/; revision=36633
2011-04-14 02:08:19 +00:00
Chris Maynard
0db9556757 Delete unused header fields found by running tools/checkhf.pl.
svn path=/trunk/; revision=36418
2011-03-31 14:35:40 +00:00
Chris Maynard
1e71ccef15 From Andrew Feren via bug 5775: Correct types on several info elements.
svn path=/trunk/; revision=36415
2011-03-31 14:03:23 +00:00
Jaap Keuter
740c1c4aeb Fix for bug 5702:
In RFC 5102 (for IPFIX), id=128 is defined as "bgpNextAdjacentAsNumber" which
is DST_AS_PEER and id=129 as "bgpPrevAdjacentAsNumber" which is SRC_AS_PEER.

svn path=/trunk/; revision=36028
2011-02-22 21:19:13 +00:00
Gerald Combs
46865581e5 Fix Visual C++ code analysis warnings.
svn path=/trunk/; revision=36007
2011-02-19 00:05:12 +00:00
Jeff Morriss
50e1634f4c Modify proto_tree_add_bytes_format() and proto_tree_add_bytes_format_value()
so that if the start_ptr is NULL the bytes are extracted from the given TVB
using the given offset and length.

Replace a bunch of:

proto_tree_add_bytes_format*(tree, hf, tvb, offset, length, tvb_get_ptr(tvb, offset, length), [...])

with:

proto_tree_add_bytes_format*(tree, hf, tvb, offset, length, NULL, [...])

svn path=/trunk/; revision=35896
2011-02-10 16:31:00 +00:00
Jeff Morriss
13d8e41e0f A couple of dissectors have/need an NTP-to-nstime routine, so put it in
packet-ntp and export it to the other dissectors.

Move some macros (now) only used in packet-ntp.c into that file.

svn path=/trunk/; revision=35887
2011-02-09 03:24:12 +00:00
Jeff Morriss
5d3a4a06bc Rewrite this dissector's NTP-to-nstime routine to take a TVB and an offset
instead of a pointer into the TVB.  Then use the standard accessor functions
to get data out of the TVB.


svn path=/trunk/; revision=35885
2011-02-09 02:54:12 +00:00
Jeff Morriss
a527fa4b49 Add NTP times using proto_tree_add_item().
Replace a couple not-very-descriptive blurbs with NULL.

svn path=/trunk/; revision=35883
2011-02-09 02:27:41 +00:00
Guy Harris
a8bc4a0d13 Rename the routines that handle dissector tables with unsigned integer
keys to have _uint in their names, to match the routines that handle
dissector tables with string keys.  (Using _port can confuse people into
thinking they're intended solely for use with TCP/UDP/etc. ports when,
in fact, they work better for things such as Ethernet types, where the
binding of particular values to particular protocols are a lot
stronger.)

svn path=/trunk/; revision=35224
2010-12-20 05:35:29 +00:00
Jeff Morriss
2993d4aa54 From Andrew Feren via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5377 :
Add a bunch of NetFlow/IPFIX extensions from Plixer and ntop.

A little cleanup as well.

From me: remove duplicate blurbs.

svn path=/trunk/; revision=35142
2010-12-07 03:46:10 +00:00
Jeff Morriss
132f874faa From Andrew Feren via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5380 :
Comment in the code asked....

 /*XXX: 2 bytes skipped ?? */

Here is what I have found.

The high byte (1) indicates the Classification Engine ID
The low bytes (3) indicate the application ID

Engine ID of 5 is NBAR Standard.
Engine ID of 6 is NBAR Custom.

Attached patch displays all 4 bytes (type and ID) in a readable way.  Also
allows better filtering.

svn path=/trunk/; revision=35116
2010-12-03 23:04:45 +00:00
Gerald Combs
8b468e9284 The PEN field is 32 bits.
svn path=/trunk/; revision=34802
2010-11-07 18:21:22 +00:00
Bill Meier
9675740701 Use value_string_ext fcns to access certain value_string arrays;
Sort several value_string arrays to be in ascending order.
Also: Minor whitespace cleanup.

svn path=/trunk/; revision=34766
2010-11-03 22:08:49 +00:00
Bill Meier
4a43e13976 Use value_string_ext to access several "relatively large" value-strings.
svn path=/trunk/; revision=34689
2010-10-29 17:48:39 +00:00
Bill Meier
9787a5734a From Hadriel Kaplan: IPFIX file format support.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5242

svn path=/trunk/; revision=34576
2010-10-20 00:36:53 +00:00
Bill Meier
209109c2fd Define some fcns & vars as static ...
svn path=/trunk/; revision=34458
2010-10-10 20:07:06 +00:00
Jeff Morriss
0ff5638f37 Replace blurbs that match the name (case insensitive) with NULL.
svn path=/trunk/; revision=34227
2010-09-23 21:46:31 +00:00
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