Commit graph

47 commits

Author SHA1 Message Date
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
Anders Broman
7be2278d3c From Hitoshi Irino:
This patch
(1) fixes to decode IPFIX packets.
The revision 25601 warns and be not able to decodes IPFIX packets fully,
because the array "hf_register_info" does not have an entry
"hf_cflow_datarecord_length", and a length check for IPFIX packets is incorrect
in "dissect_netflow" function.
(2) is able to decode all Information Elements standardized by RFC 5102
(3) is able to decode IPFIX templates and data that contains PEN (Private
Enterprise Number) fields standardized by RFC 5101, and is able to decode
bi-directional flow standardized by RFC 5103.

svn path=/trunk/; revision=25905
2008-08-02 13:53:49 +00:00
Guy Harris
83fc9d5e09 Constify a bunch of stuff, to squelch -Wwrite-strings warnings.
epan/dissectors/packet-ncp2222.inc is a bit hard to fix, so we're not
ready to enable that warning by default yet.

Throw in some casts to handle GLib routines that take arbitrary
non-const pointers (they can later return the pointers, and some
callers might want to modify or free up those pointers in cases where
they're known to be writable or allocated).

Use ep_tvb_memdup() rather than a combination of ep_alloc() and
tvb_memcpy().

Clean up some indentation.

svn path=/trunk/; revision=25601
2008-06-25 09:12:35 +00:00
Bill Meier
b3aa52f573 Fix some of the Errors/warnings detected by checkapi.
svn path=/trunk/; revision=25307
2008-05-15 12:54:27 +00:00
Sake Blok
a4cec1cf5f From Andrew Ferren (big 2434):
While borrowing code from an other dissector I have worked on I realized I
previously "borrowed" a comment and typo.  Here's a fix.


svn path=/trunk/; revision=24928
2008-04-12 09:35:48 +00:00
Stig Bjørlykke
86358dc032 From Olivier Montanuy (bug 2198):
Fix the bug related to Option template:
- System scope (check that options scope size is == 4, not <= 4)
- Interface scope (same)
Same fix for fields BytesExported PacketsExported FlowsExported.
Also fix some tabulations in a previous patch related to IPv6 Addresses.

svn path=/trunk/; revision=24138
2008-01-19 10:46:13 +00:00
Bill Meier
e4d58aa9f0 From Andrew feren; Fix typos in two comments ....
svn path=/trunk/; revision=23147
2007-10-11 16:40:12 +00:00
Jeff Morriss
d3600969fb From Andrew Feren via http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1606 :
1) IPFIX port (4739) should be configurable without recompiling
2) It should be possible to specify more than one port to be dissected as
   Netflow and/or IPFIX
3) Netflow should recognize UDP ports 2055 and 9996 (Both are common)

Also (from me):
- make Netflow a "new style" dissector: return 0 if it doesn't appear to be a
  valid netflow packet
- register the old preference (cflow.udp.port) as obsolete so users don't see
  warnings about it not being valid

svn path=/trunk/; revision=23075
2007-10-05 21:25:35 +00:00
Jaap Keuter
02e0c97eed From Munenori Ohuchi:
packet-netflow.c is lack of the capability to decode ipv6 address related fields in netflow v9.

This patch enables dissecting the following fields:
 Type 27 IPV6_SRC_ADDR,
 Type 28 IPV6_DST_ADDR,
 Type 29 IPV6_SRC_MASK,
 Type 30 IPV6_DST_MASK and
 Type 62 IPV6_NEXT_HOP.

svn path=/trunk/; revision=22793
2007-09-05 06:59:24 +00:00
Jeff Morriss
f8e0d53ecf Use SET_ADDRESS (instead of COPY_ADDRESS) for an address that has "ephemeral" scope. Use SE_COPY_ADDRESS when the address is copied to the template cache (with "seasonal" scope.)
svn path=/trunk/; revision=22571
2007-08-21 21:03:59 +00:00
Anders Broman
2427e6390d From Andrew Feren:
This patch collapses start and end time for each flow to a single duration item.  The duration item can, of course, be expanded to display the start and end time.

svn path=/trunk/; revision=21746
2007-05-11 06:21:18 +00:00
Anders Broman
386af8e774 From Olivier Montanuy:
Patch tested against traces obtained from Cisco IOS 12.4 Flexible Netflow,
IOS-XR 3.3, Huawei VRP 5.30.

Features:
- Decodes Netflow v9 option templates
- Decodes quite a few additional Netflow v9 types
- Packets and octets counters can be 64-bit
- Show unknown Netflow v9 fields as hexa, useful when using tshark -V with
  Netflow v9 implementations that use undocumented proprietary types.
  Enabled by:  "#define SHOW_UNKNOWN_TYPES 1"

svn path=/trunk/; revision=21672
2007-05-04 06:07:30 +00:00
Guy Harris
ba3792fc78 memmove() is needed only if the source and destination might overlap.
svn path=/trunk/; revision=21590
2007-04-26 05:40:48 +00:00
Stephen Fisher
69ddfdb12e From Motonori Shindo:
As per NetFlow V9 protocol, Template ID is guaranteed to be unique per
Observation Domain (identified by Source ID) and the Exporter
(identified by the source IP address of NetFlow PDU).

The former code was ignoring these information for simplicity, but
noticing such a necessity.


svn path=/trunk/; revision=20182
2006-12-21 06:41:11 +00:00
Guy Harris
2e64b81928 Not all platforms define "u_short", and "tvb_length_remaining()+4" isn't
guaranteed to fit into a "u_short" in any case.  Use "gint" instead.

Squelch some compiler warnings.

svn path=/trunk/; revision=19225
2006-09-13 01:28:07 +00:00
Anders Broman
5dd7a4e7f9 From: Luca Deri via Andrew Feren:
> please find enclosed a patch to the CFlow dissector (packet-netflow.c) 
> that enables it to decode IPFIX packet traces.

svn path=/trunk/; revision=19221
2006-09-12 19:11:45 +00:00
Ronnie Sahlberg
feab79e328 change a whole bunch of ethereal into wireshark
svn path=/trunk/; revision=18196
2006-05-21 04:49:01 +00:00
Anders Broman
441d892b13 From Motonori Shindo:
find attached the patch that reflects this interpretation of 
> this field accordingly. It also fixes a few minor bugs associated with 
> the handling of 'UNIX Secs' field and two field types
> (LAST_SWITCHED(21) and FIRST_SWITCHED(22)) in case of NetFlow V9.

svn path=/trunk/; revision=17698
2006-03-22 17:19:56 +00:00
Anders Broman
38d4e1d0c8 From Motonori Shindo:
The code assumes Template FlowSet contains only one Template Record, which is not necessarily true. Please find attached the patch to fix it.

svn path=/trunk/; revision=17630
2006-03-15 06:19:15 +00:00
Jörg Mayer
caad611a07 Olivier Montanuy:
This is a simple patch to the Netflow v9 dissector, that let it decode
Netflow v9 MPLS-Aware, a feature of Cisco 12000 IOS 12.0.24S and above
on Cisco 12000, 7500 and 7200 that is very useful for MPLS-VPN networks.


svn path=/trunk/; revision=17225
2006-02-09 09:11:06 +00:00
Guy Harris
25c4bc9379 Replace tvb_memcpy() calls that extract IPv4 addresses into a guint32,
and that extract IPv6 addresses into a "struct e_in6_addr", with
tvb_get_ipv4() and tvb_get_ipv6() calls - except for some that we
remove, by using proto_tree_add_item(), rather than replacing.

Have epan/tvbuff.h include epan/ipv6-utils.h, to define "struct
e_in6_addr" (not necessary to declare the tvbuff routines, but including
it there means "struct e_in6_addr" is guaranteed to be defined before
those declarations, so we don't get compiler complaints if we define it
*after* those declarations).

svn path=/trunk/; revision=15758
2005-09-11 21:25:37 +00:00
Guy Harris
bbe7f89742 Move prefs.c and prefs.h into the epan subdirectory.
svn path=/trunk/; revision=12115
2004-09-27 22:55:15 +00:00
Guy Harris
a8d0f1d31f From Luca Deri: NetFlow v9 enhancements.
svn path=/trunk/; revision=11947
2004-09-09 06:27:43 +00:00
Gilbert Ramirez
669db206cb Move dissectors to epan/dissectors directory.
Also move ncp222.py, x11-fields, process-x11-fields.pl,
make-reg-dotc, and make-reg-dotc.py.

Adjust #include lines in files that include packet-*.h
files.

svn path=/trunk/; revision=11410
2004-07-18 18:06:47 +00:00
Renamed from packet-netflow.c (Browse further)