Commit Graph

26 Commits

Author SHA1 Message Date
Anders Broman d8bd66c291 From beroset:
remove C++ incompatibilities 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48409
2013-03-18 22:38:56 +00:00
Guy Harris 8ed7a73e22 Fix a bunch of warnings.
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
sizeof.

Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
strtol() and strtoul().

Change some data types to avoid those implicit conversion warnings.

When assigning a constant to a float, make sure the constant isn't a
double, by appending "f" to the constant.

Constify a bunch of variables, parameters, and return values to
eliminate warnings due to strings being given const qualifiers.  Cast
away those warnings in some cases where an API we don't control forces
us to do so.

Enable a bunch of additional warnings by default.  Note why at least
some of the other warnings aren't enabled.

randpkt.c and text2pcap.c are used to build programs, so they don't need
to be in EXTRA_DIST.

If the user specifies --enable-warnings-as-errors, add -Werror *even if
the user specified --enable-extra-gcc-flags; assume they know what
they're doing and are willing to have the compile fail due to the extra
GCC warnings being treated as errors.

svn path=/trunk/; revision=46748
2012-12-26 05:57:06 +00:00
Bill Meier 7cd0417af5 Fix numerous instances of a variable/parameter name "shadowing" a library function name;
(At least some (gcc ?) compilers give a "shadow" warning for these).

svn path=/trunk/; revision=46402
2012-12-05 15:56:36 +00:00
Bill Meier 020df2e24c Fix 2 bugs in heuristic tests which resulted in various false positives;
I believe this fix addresses the remaining issues for Bug #6047.
  https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6047

Also:
- Fix {-Wshadow] warning;
- Use tvb_get_ntoh24() in 2 places;
- Add ToDo comment about a TCP reassembly issue.

svn path=/trunk/; revision=46338
2012-12-03 01:41:32 +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 9f92dc93c5 Add data parameter to call_dissector_only.
svn path=/trunk/; revision=44872
2012-09-11 08:28:07 +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
Bill Meier 9c7f4006c0 Add editor modelines;
Do minor whitespace reformatting.

svn path=/trunk/; revision=44539
2012-08-16 13:51:54 +00:00
Bill Meier 638d74d43f Use val_to_str_const() where appropriate;
Also (for a few files):
- create/use some extended value strings;
- remove unneeded #include files;
- remove unneeded variable initialization;
- re-order fcns slightly so prefs_reg_handoff...() at end, etc

svn path=/trunk/; revision=44438
2012-08-10 22:55:02 +00:00
Evan Huus 700524155d Fix mis-allocated key size as caught by valgrind.
We have to divide the 'length' field to work with guint32 pointer arithmetic,
but we still want to allocate and memcpy the original length value, since
both of those operate in raw bytes, not blocks of sizeof(guint32).

svn path=/trunk/; revision=43901
2012-07-21 19:18:12 +00:00
Evan Huus 2949d44b74 The se_tree_* functions are destructive to the key, so save and restore
the key around each call.

Fixes part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7509

svn path=/trunk/; revision=43898
2012-07-21 16:10:16 +00:00
Guy Harris bddb918dc4 The 32-bit-key tree code assumes that the pointer to the key can be cast
to a pointer to a guint32 and dereferenced.  On some platforms, such as
SPARC, this requires that the pointer be aligned on a 4-byte boundary;
there is no guarantee that the data field of an address structure is
aligned on a 4-byte boundary, so allocate a buffer for a copy of that
data and copy the data into it, and free it when we're done with it.

Should fix bug 7501.

svn path=/trunk/; revision=43880
2012-07-21 01:24:54 +00:00
Jakub Zawadzki b18e880040 Update FSF address - part II.
svn path=/trunk/; revision=43538
2012-06-28 23:18:38 +00:00
Bill Meier 794757ae8f For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.
Also: remove trailing whitespace for a number of files.

svn path=/trunk/; revision=39503
2011-10-21 02:10:19 +00:00
Bill Meier e022b330df From Stéphane Bryant: improvements in RELOAD dissection
- Follow closely draft-ietf-p2psip-base-18
- Added support for draft-ietf-p2psip-base-18,
  draft-ietf-p2psip-sip-06,
  draft-ietf-p2psip-service-discovery-03,
  draft-ietf-p2psip-self-tuning-04,
  draft-ietf-p2psip-diagnostics-06,
  draft-zong-p2psip-drr-00,
- Handoff to the xml dissectors for
  configuration data
- export the message content dissection function
  in the new packet-reload.h file for use in
  related protocols (draft-hautakorpi-p2psip-with-hip-01)

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

From me:
- Fix a few C++ style comments;
- Fix:
packet-reload.c(2156) ... conversion from 'guint64' to 'guint32', possible loss of data
packet-reload.c(3528) ... conversion from 'guint64' to 'guint32', possible loss of data

Note: Additional fix yet req'd since checkhf.pl gives:
  ERROR: NO ARRAY: packet-reload.c, hf_reload_dmflag_underlay_hop
  Unused entry: packet-reload.c, hf_reload_storeddata_signature
  Unused entry: packet-reload.c, hf_reload_storeddataspecifiers

(Compile is OK).

svn path=/trunk/; revision=39301
2011-10-06 20:46:45 +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
Gerald Combs 0abba34b6a Only count an ACK if it's part of an existing conversation, otherwise we
get a lot of false positives.

svn path=/trunk/; revision=37631
2011-06-09 17:30:13 +00:00
Anders Broman 1a768b36b4 - Added new SignatureIdentity values.
From Marc Petit-Huguenin:
- Removed directResponseForwarding.
- The certificate_type enum is now defined as RFC 6091's CertificateType
  so moved the definition to packet-ssl-utils.[ch].
- Fixed invalid values for CERTIFICATE_BY_NODE and CERTIFICATE_BY_USER
  Kinds.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5967

svn path=/trunk/; revision=37452
2011-05-29 06:16:19 +00:00
Jeff Morriss 8058ba646a From Michael Chen via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5863 :
1. Reload framing protocol no longer encapsulates the Reload message, instead
the latter is in its own tree following Reload framing, much like IP, UDP, etc.

2. Similarly, DTLS no longer encapsulates its data payload if the payload can
be dissected. The recognized payload is in its own tree following the DTLS,
much like IP, UDP, etc.

4. DTLS now has its own heuristic table for dissecting its payload, and
reload-framing is added to this DTLS heuristic table.

6. DTLS will try to dissect its payload if the agreed upon cipher is
RSA-NULL-MD5 (0x0001) or RSA-NULL-SHA (0x0002), even when DTLS is not
configured with the client/server private keys.


Still to do: make DTLS a heuristic dissector on top of UDP (item 3 in the bug).

svn path=/trunk/; revision=37110
2011-05-13 02:48:08 +00:00
Jeff Morriss c666536162 From Marc Petit-Huguenin via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5894 :
- Use "RELOAD" everywhere.
- Fix invalid variable name "reload_framing.probe_information.type".
- Fix various names to match the spec.
- Dissect the X.509 certificate embedded in RELOAD messages.
- Use tls_signature_algorithm and tls_hash_algorithm tables in
  packet-ssl-utils.

From me: take out the tabs.  Keep the long dissector name when registering the
protocols.

svn path=/trunk/; revision=37003
2011-05-06 01:09:04 +00:00
Jeff Morriss c39c25ce9c From Stephane Bryant via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5787 :
Register the reload-framing dissector by name.  Needed when RELOAD is not used
over udp/tcp (but tls, for example)

svn path=/trunk/; revision=36380
2011-03-28 15:23:27 +00:00
Bill Meier 0da2042447 Fix Coverity 393: "DEADCODE"; Add an XXX comment
svn path=/trunk/; revision=36373
2011-03-27 16:15:19 +00:00
Stig Bjørlykke f51139e659 Allocate correct size of reload_frame.
Coverity 714.

svn path=/trunk/; revision=36263
2011-03-22 19:13:05 +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
Anders Broman 8fc5892e01 Tighten the heuristic.
svn path=/trunk/; revision=35020
2010-11-24 15:15:28 +00:00
Jeff Morriss 1f4cdf5a9d From Stephane Bryant via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5358 :
This is a dissector for reload framed message:
ReLOAD packets can be inserted in frame message, as described in
draft-ietf-p2psip-base-10

From me: remove some unnecessary includes.

svn path=/trunk/; revision=35005
2010-11-22 16:19:39 +00:00