Commit Graph

22 Commits

Author SHA1 Message Date
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
Guy Harris 7c76ad78d3 Add an AT_ value for 802.15.4 short addresses.
Note that, if you want EUI-64's to resolve the OUI in the display,
hacking individual dissectors to do it themselves and use AT_STRINGZ is
*not* the right way to do it.

svn path=/trunk/; revision=45743
2012-10-23 21:19:02 +00:00
Jeff Morriss 3729335973 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45016
2012-09-20 01:48:30 +00:00
Guy Harris dfe0389590 Move the AX.25 address routines to address_to_str.c, where they belong;
hopefully this will fix some of the build errors.

svn path=/trunk/; revision=44219
2012-08-02 18:51:40 +00:00
Guy Harris 835111692f From Richard Stearn: support for AX.25, including support for
LINKTYPE_AX25.

svn path=/trunk/; revision=44211
2012-08-02 16:54:43 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Guy Harris 3a62afcfed Attempt to squelch some compiler warnings.
svn path=/trunk/; revision=37679
2011-06-16 07:02:23 +00:00
Stig Bjørlykke e4d168c5dc Please don't use prohibited APIs in new code:
sprintf -> g_snprintf

Fixes coverity 1197 & 1198.

svn path=/trunk/; revision=37664
2011-06-14 20:37:53 +00:00
Guy Harris f153eb070b Cast away some warnings about alignment; ep_alloc() guarantees
sufficient alignment for all types of data.

svn path=/trunk/; revision=37190
2011-05-16 21:42:49 +00:00
Alexis La Goutte 7d317e553b Add FT_EUI64 Field Type
* Remove proto_tree_add_eui64 function from 802.15.4 Dissector 
* Replace print_eui64/print_eui64 by eui64_to_str/get_eui64_name
* Update Documentation (README.dev)
* Add new function in libwireshark.def
* Support of encoding for tvb_eui64_to_str
* Use FT_EUI64 for ICMPv6, CAPWAP, Zbee ... dissector

svn path=/trunk/; revision=37015
2011-05-08 10:23:53 +00:00
Jakub Zawadzki 4194ee7f89 Add note about ::/96 being deprecated.
svn path=/trunk/; revision=37008
2011-05-06 11:39:11 +00:00
Jakub Zawadzki d079e29cac Fix false positive compiler warnings:
address_to_str.c:157: warning: 'cur.len' may be used uninitialized in this function
	address_to_str.c:157: warning: 'best.len' may be used uninitialized in this function


svn path=/trunk/; revision=37001
2011-05-05 21:15:33 +00:00
Jakub Zawadzki 453d0a8568 Introduce ip6_to_str_buf_len (little cleaner version of inet_ntop6 from wsutil/inet_ntop.c)
and use it instead of inet_ntop(AF_INET6, ...)

- Add MAX_IP6_STR_LEN define.
- use MAX_IP6_STR_LEN as a buffer size when ip6_to_str_buf() is used.

svn path=/trunk/; revision=37000
2011-05-05 20:48:21 +00:00
Jakub Zawadzki 892da10a29 Subtract (not add!) preamble length from remaining buffer length.
svn path=/trunk/; revision=36998
2011-05-05 16:41:52 +00:00
Jeff Morriss 0f59bc7c45 Rename vines_to_str() to tvb_vines_to_str() and make it take a pointer a TVB
and an offset instead of (generally) a pointer into a TVB.

Move most of the contents of packet-vines.h into packet-vines.c: the moved
content is only needed in that file.

svn path=/trunk/; revision=35912
2011-02-11 03:13:24 +00:00
Jeff Morriss 6e0fcb7ab5 Introduce, and start using, tvb_eth_to_str().
Export tvb_*_to_str() and put them in alphabetical order.

svn path=/trunk/; revision=35602
2011-01-21 02:48:55 +00:00
Jeff Morriss 77b3392e72 Introduce, and start using, tvb_fc_to_str() and tvb_fcwwm_to_str(): these
functions act like their non-tvb counterparts except that they take a tvb and
and offset instead of a pointer to a byte array.

This basically saves the dissectors from having to call tvb_get_ptr()--which in
this case eliminates a couple of typos in the length given to tvb_get_ptr().

svn path=/trunk/; revision=35549
2011-01-16 04:33:42 +00:00
Jeff Morriss a167206685 Introduce, and start using, tvb_ip_to_str() and tvb_ip6_to_str(). These
do the same as the non-tvb equivalents but take a TVB and an offset instead
of a pointer to an array of bytes.

Their purpose is to prevent (many) dissectors from doing:
ip_to_str(tvb_get_ptr(...)).

(About the names and the location: I like the names as they are but the names
imply that they should live in tvbuff.c.  That would make some sense but
I didn't want to pull to_str.h into tvbuff.c...)

svn path=/trunk/; revision=35519
2011-01-13 15:53:30 +00:00
Jeff Morriss 37d4ccff56 From Slava via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5335 :
This patch adds to Wireshark the ability to dissect Infiniband SDP (Socket
Direct Protocol) and CM MADs traffic.

It also contains various other bug-fixes and enhancements. SDP traffic can be
identified automatically (analyzing SDP CM MADs) or manually.

SDP, or Sockets Direct Protocol, is a protocol developed by the Infiniband
Trade Association which enables existing socket-based applications to
transparently utilize the Infiniband capabilities. 

This patch is submitted on behalf of Mellanox Technologies Ltd.

svn path=/trunk/; revision=34918
2010-11-17 02:57:22 +00:00
Jeff Morriss 47e2d75820 Move some code (including the optional objects) into libwsutil
svn path=/trunk/; revision=33012
2010-05-28 20:19:55 +00:00
Bill Meier 6812b68eb1 From Yaniv Kaul: constify parameters
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4422

 From me: Fix a number of instances where the function prototype or
  the function definition wasn't changed so there was a mismatch 
  thus causing Windows (but not gcc) compilation errors.

svn path=/trunk/; revision=32365
2010-04-03 18:18:50 +00:00
Guy Harris adde80ad43 From Jakub Zawadzki: split off the address-to-string functions, except
for ip_to_str_buf(), into address_to_str.c.

Fix up the SVN attributes for time_fmt.h while we're at it.

svn path=/trunk/; revision=32038
2010-02-27 21:41:12 +00:00