Commit Graph

139 Commits

Author SHA1 Message Date
Jakub Zawadzki 7b89063243 Don't include <epan/strutil.h> when not needed.
svn path=/trunk/; revision=53194
2013-11-09 14:58:28 +00:00
Jakub Zawadzki 0b0bbf0965 Replace STRINGIFY with glib version.
svn path=/trunk/; revision=53193
2013-11-09 14:37:13 +00:00
Jeff Morriss 8601a75d51 Finish implementing https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7263 :
Change cflow.sysuptime from an FT_UINT32 (milliseconds since the router booted)
to an FT_RELATIVE_TIME (seconds since the router booted).  I don't imagine
anyone will care if we show them seconds or milliseconds and it satisfy the
user's request (in that bug) to compare cflow.sysuptime to cflow.timeend (which
is already an FT_RELATIVE_TIME).

(If someone does care, we could always display the field twice, once in
milliseconds and once in seconds.)

svn path=/trunk/; revision=52821
2013-10-24 20:52:00 +00:00
Pascal Quantin 7850883904 emem -> wmem
svn path=/trunk/; revision=52063
2013-09-15 15:11:11 +00:00
Michael Mann 9e3f9b449f expert_add_info_format_text -> expert_add_info_format
svn path=/trunk/; revision=51852
2013-09-09 00:44:09 +00:00
Michael Mann 17fbd9028a Batch of filterable expert info
svn path=/trunk/; revision=51823
2013-09-07 16:07:02 +00:00
Anders Broman 7e3922cf43 Use dissector_delete_uint_range/dissector_add_uint_range
svn path=/trunk/; revision=51540
2013-08-27 19:21:20 +00:00
Evan Huus d22919194a Switch on field length for the length_min/max fields of IPFix. Like several
other nearby fields, they are different lengths in different versions of the
spec.

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

svn path=/trunk/; revision=50940
2013-07-26 23:16:16 +00:00
Guy Harris b0a94d2b98 ASes can now be 32-bits; make the fields for them 32-bit so that you can
filter on all possible values of them.

Fixes bug 8959.

#BACKPORT 1.10, 1.8

svn path=/trunk/; revision=50791
2013-07-22 16:56:56 +00:00
Martin Kaiser 19de5ccfa1 From Vaibhav Katkade
Add Netflow Record TrustSec fields
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8928

svn path=/trunk/; revision=50553
2013-07-13 11:33:44 +00:00
Michael Mann de68fd6eea Removed check_col() and the occasional tree.
svn path=/trunk/; revision=49938
2013-06-14 17:49:53 +00:00
Anders Broman 84241f46ad From beroset:
remove C++ incompatibilities 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48399
2013-03-18 20:44:36 +00:00
Pascal Quantin b5bbd0712e From J. Schoenwaelder via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8410 :
Fix dissection of flowDurationMicroseconds in Netflow dissector

svn path=/trunk/; revision=47921
2013-02-27 21:19:37 +00:00
Bill Meier d3a7f4b817 Use '#if 0 ... #endif' rather than /** ... **/ to comment out
unused hf[] entries (which I should have done in the first place).

svn path=/trunk/; revision=47390
2013-01-31 18:31:28 +00:00
Bill Meier 0960e508e4 Comment out cases of unused hf array entries found by checkhf.
svn path=/trunk/; revision=47302
2013-01-26 18:54:53 +00:00
Guy Harris 688b567111 And more 64-bit-to-32-bit time issues on 32-bit platforms.
svn path=/trunk/; revision=46763
2012-12-26 09:56:18 +00:00
Jeff Morriss 49466f95bc Introduce, and start using, TVB_SET_ADDRESS() and TVB_SET_ADDRESS_HF(). They
are like the non-TVB versions except that they take a TVB and an offset
instead of (frequently) a pointer into the TVB.

Calling tvb_get_ptr() before modifying the rest of the fields should help fix
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7960 (though I can't
reproduce that problem).


Replace a bunch of calls like:

SET_ADDRESS(..., AT_XXX, length, tvb_get_ptr(tvb, offset, length));

with:

TVB_SET_ADDRESS(..., AT_XXX, tvb, offset, length);

svn path=/trunk/; revision=46324
2012-12-02 04:49:13 +00:00
Jeff Morriss 2552c750e5 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45017
2012-09-20 02:03:38 +00:00
Jakub Zawadzki 5a8783f5b1 Initial commit to support yet another method of passing data between dissectors.
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL

svn path=/trunk/; revision=44860
2012-09-10 21:40:21 +00:00
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