Commit Graph

120 Commits

Author SHA1 Message Date
Jakub Zawadzki b18e880040 Update FSF address - part II.
svn path=/trunk/; revision=43538
2012-06-28 23:18:38 +00:00
Chris Maynard da5ea5a8dd From Evan Huus via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7239
Make inputint and outputint fields UINT32s instead of UINT16s.

svn path=/trunk/; revision=42599
2012-05-12 17:55:09 +00:00
Alexis La Goutte 26eebbc768 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=40998
2012-02-12 19:24:38 +00:00
Anders Broman 9232205821 packet-netflow.c:4407: warning: integer constant is too large for 'long' type
svn path=/trunk/; revision=40883
2012-02-06 19:05:30 +00:00
Anders Broman 76344b264f From Aamer Akhter:
performance monitor 2.0 metric additions.

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

svn path=/trunk/; revision=40882
2012-02-06 17:37:29 +00:00
Bill Meier d8027c4194 Fix gcc compile error
svn path=/trunk/; revision=39996
2011-11-24 03:33:29 +00:00
Bill Meier 6d9e776d34 Use a GHashTable to store templates instead of
using a home-grown hash table (which didn't handle collisions);
Include complete "connection info" (srcAddr,srcPort,dstAddr,dstPort) in "Template Name";
Rename various variables;
Re-indent & Re-format code.

svn path=/trunk/; revision=39995
2011-11-24 03:20:44 +00:00
Bill Meier 6f23917193 Fix two compiler errors.
svn path=/trunk/; revision=39991
2011-11-22 20:48:49 +00:00
Bill Meier 0185b61ceb Handle 2 issues related to cacheing templates:
- Use a (slightly) less simplistic hashing algorithm to reduce collisions;
   Note: A GHashTable which handles collisions rather than
         a home-grown hash table (which does not) needs to be implemented.
 - Don't replace an existing template in the cache when a collision occurs;

Fixes Bug #6325
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6325

svn path=/trunk/; revision=39990
2011-11-22 20:42:25 +00:00
Anders Broman ae8165fd4c Fix some set but not used [-Wunused-but-set-variable] warnings.
svn path=/trunk/; revision=39579
2011-10-25 20:08:26 +00:00
Guy Harris a03cc7137b As bug 3954 notes, nowhere does RFC 3954 indicate that a system or
interface scope is always 4 bytes.  For that matter, nowhere does it
indicate that the scopes have any particular interpretation except as a
sequence of octets.

Get rid of the checks for a length of 4, and make ScopeSystem an
FT_BYTES.  If, by *convention*, they're usually IPv4 or IPv6 addresses,
somebody can throw in code to display them as such if they happen to be
4 or 16 bytes, respectively.  Leave ScopeInterface as an integer for
now, in case, by convention, they're interface indices, but still leave
the length check out.

Fixes bug 3954.

svn path=/trunk/; revision=39485
2011-10-20 02:38:40 +00:00
Bill Meier 293049dfba Do some conversions of proto_tree_add_item() 'encoding' arg.
(previously missed).

    57   FT_BOOLEAN:       FALSE-->ENC_BIG_ENDIAN
    31   FT_BOOLEAN:       TRUE-->ENC_LITTLE_ENDIAN

    10   FT_BYTES:         ENC_BIG_ENDIAN-->ENC_NA
     1   FT_BYTES:         ENC_LITTLE_ENDIAN-->ENC_NA
    21   FT_BYTES:         FALSE-->ENC_NA
     2   FT_BYTES:         TRUE-->ENC_NA

     2   FT_IPXNET:        ENC_BIG_ENDIAN-->ENC_NA

     6   FT_IPv6:          ENC_BIG_ENDIAN-->ENC_NA
     1   FT_IPv6:          FALSE-->ENC_NA

     6   FT_NONE:          ENC_BIG_ENDIAN-->ENC_NA
    19   FT_NONE:          FALSE-->ENC_NA
     3   FT_NONE:          TRUE-->ENC_NA

     1   FT_STRING:        ENC_BIG_ENDIAN-->ENC_ASCII|ENC_NA
     1   FT_STRING:        ENC_LITTLE_ENDIAN-->ENC_ASCII|ENC_NA
     5   FT_STRING:        FALSE-->ENC_ASCII|ENC_NA
     1   FT_STRING:        TRUE-->ENC_ASCII|ENC_NA

     4   FT_STRINGZ:       ENC_NA-->ENC_ASCII|ENC_NA
     8   FT_STRINGZ:       FALSE-->ENC_ASCII|ENC_NA

     1   FT_INT32:         FALSE-->ENC_BIG_ENDIAN
     1   FT_INT32:         TRUE-->ENC_LITTLE_ENDIAN

    11   FT_UINT8:         0-->ENC_BIG_ENDIAN
   111   FT_UINT8:         FALSE-->ENC_BIG_ENDIAN
    17   FT_UINT8:         TRUE-->ENC_LITTLE_ENDIAN
     1   FT_UINT16:        0-->ENC_BIG_ENDIAN
    68   FT_UINT16:        FALSE-->ENC_BIG_ENDIAN
    18   FT_UINT16:        TRUE-->ENC_LITTLE_ENDIAN
     4   FT_UINT24:        FALSE-->ENC_BIG_ENDIAN
    70   FT_UINT32:        FALSE-->ENC_BIG_ENDIAN
     1   FT_UINT32:        TRUE-->ENC_LITTLE_ENDIAN
     4   FT_UINT64:        FALSE-->ENC_BIG_ENDIAN
     1   FT_UINT64:        TRUE-->ENC_LITTLE_ENDIAN

     1   FT_UINT_STRING:   FALSE-->ENC_ASCII|ENC_BIG_ENDIAN


svn path=/trunk/; revision=39442
2011-10-16 23:38:49 +00:00
Bill Meier 126aa85393 Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, FT_STRINGZ, FT_UINT_STRING as follows:
1. If there's no character encoding (ENC_ASCII, ...) specified
    then use ENC_ASCII.
 2. For all but FT_UINT_STRING, always use ENC_NA
    (replacing any existing True/1/FALSE/0
    /ENC_BIG_ENDIAN/ENC_LITTLE_ENDIAN).



svn path=/trunk/; revision=39426
2011-10-15 18:46:26 +00:00
Bill Meier b666d5ca18 Fix some proto_tree_add_item() FT_ABSOLUTE_TIME encoding parameters:
Again: a tip o'the hat to Guy.


svn path=/trunk/; revision=39383
2011-10-12 14:12:36 +00:00
Bill Meier 67ee5049d4 Convert 'encoding' parameter of certain proto_tree_add_item() calls in non-autogenerated epan/dissectors:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
  the encoding parameter for proto_tree_add_item() calls which directly reference
  an item in hf[] which has a type of:
     FT_BOOLEAN
     FT_IPv4
     FT_EUI64
     FT_GUID
     FT_UINT_STRING

Also: For type FT_ITv6 use ENC_NA. (This was missed in SVN #39260)

svn path=/trunk/; revision=39328
2011-10-10 00:39:31 +00:00
Bill Meier 4e57694d4a Convert 'encoding' parameter of certain proto_tree_add_item() calls in non-autogenerated epan/dissectors:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
 the encoding parameter for proto_tree_add_item() calls which directly reference
 an item in hf[] which has a type of:
    FT_UINT8
    FT_UINT16
    FT_UINT24
    FT_UINT32
    FT_UINT64
    FT_INT8
    FT_INT16
    FT_INT24
    FT_INT32
    FT_INT64
    FT_FLOAT
    FT_DOUBLE


svn path=/trunk/; revision=39288
2011-10-06 03:35:44 +00:00
Bill Meier 781129806f Fix ex "modeline" so it works;
See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5748

svn path=/trunk/; revision=39081
2011-09-21 17:49:11 +00:00
Bill Meier d94e18e4b3 Use NULL in pace of a few "blurbs" which are redundant; Enhance a few blurbs.
svn path=/trunk/; revision=38868
2011-09-02 19:04:39 +00:00
Guy Harris be0468fec3 Get rid of trailing space in blurbs.
svn path=/trunk/; revision=38867
2011-09-02 18:33:02 +00:00
Anders Broman 10a3cb6e0f From Andrey Rouskol:
patch for Ericsson NAT logging netflow fields
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6297

svn path=/trunk/; revision=38839
2011-09-01 05:15:41 +00:00
Bill Meier b17543e2c0 Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings.
svn path=/trunk/; revision=38049
2011-07-15 19:07:25 +00:00
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