aboutsummaryrefslogtreecommitdiffstats
path: root/epan/to_str.c
AgeCommit message (Collapse)AuthorFilesLines
2014-04-30Document to_str-int.h functions.Jakub Zawadzki1-5/+5
Change argument name of hex_to_str_back pad->len it seems to sounds better. Make uint_to_str_back_len() value uint32, to be sure about required buffer size. Change-Id: I48fd560683c5c0845cbb60813887a18328ec01e6 Reviewed-on: https://code.wireshark.org/review/1448 Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-30Optimize display_signed_time() - remove g_snprintfJakub Zawadzki1-10/+60
When tshark is printing columns (default) display_signed_time() is called for every frame. Current implemention is using g_snprintf() which makes this function costly when there is lot frames. Change-Id: I109c8699d38bfbd05475d457ae4173e937c6812d Reviewed-on: https://code.wireshark.org/review/1447 Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-01-26Drop support of Visual Studio 2005Alexis La Goutte1-42/+27
* Remove _MSC_VER < 1500 check * Cleanup config.nmake See http://www.wireshark.org/lists/wireshark-dev/201305/msg00159.html svn path=/trunk/; revision=54965
2013-12-19Add bytestring_to_str() which takes a wmem scope and is otherwise identical toEvan Huus1-0/+28
bytestring_to_ep_str (now deprecated). Use the new one in a few obvious places. Also just print directly to the buffer when loading ethernet addresses for resolution. The straight-to-buffer bytes_to_hexstr seems useful, maybe it shouldn't be in a private header... svn path=/trunk/; revision=54270
2013-12-19Rename more to_str functions to have ep_ in the name if they return ephemeralEvan Huus1-42/+14
buffers. Remove two unused functions. svn path=/trunk/; revision=54250
2013-12-19Rename a couple of to_str functions to have ep_ in the name. This makes itEvan Huus1-6/+6
obvious that the returned string is ephemeral, and opens up the original names in the API for versions that take a wmem pool (and thus can work in any scope). svn path=/trunk/; revision=54249
2013-12-19Modelines and consistent indentation.Evan Huus1-553/+565
svn path=/trunk/; revision=54248
2013-12-09Fix warningsJakub Zawadzki1-2/+0
svn path=/trunk/; revision=53885
2013-11-09Put "private" to_str.c functions to to_str-int.hJakub Zawadzki1-0/+1
svn path=/trunk/; revision=53187
2013-08-15[trivial] Use g_stpcpy()Jakub Zawadzki1-2/+2
svn path=/trunk/; revision=51381
2013-06-28Rename octet_to_hex() to low_nibble_of_octet_to_hex() to indicate whatGuy Harris1-8/+8
it actually does (it takes the low-order nibble of an octet and returns a single character). Cast away some warnings. svn path=/trunk/; revision=50225
2013-06-28Use octet_to_hex() in another place.Jakub Zawadzki1-8/+4
svn path=/trunk/; revision=50223
2013-06-28#micro-optimization, remove g_snprintf()'s from _hfinfo_[u]int_value_format ↵Jakub Zawadzki1-16/+83
with some new fresh replacements. svn path=/trunk/; revision=50216
2013-06-17More PDU export work:Pascal Quantin1-0/+22
- add automatic export of port type when exporting a source / destination port - add export of SCTP PPID (usefulness to be checked) - fix some field size svn path=/trunk/; revision=49989
2013-06-04Fix warning reported by MSVC:Chris Maynard1-1/+1
to_str.c(262) : warning C4114: same type qualifier used more than once svn path=/trunk/; revision=49770
2013-06-04Change two arrays of pointer to strings, to array of characters. Save some ↵Jakub Zawadzki1-2/+2
space. svn path=/trunk/; revision=49767
2013-03-18From beroset:Anders Broman1-9/+9
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48400
2013-03-01Export libwireshark symbols using WS_DLL_PUBLIC defineBalint Reczey1-0/+1
Also remove old WS_VAR_IMPORT define and related Makefile magic everywhere in the project. svn path=/trunk/; revision=47992
2013-01-04Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8105 :Pascal Quantin1-2/+2
Allow use of huges values for localtime / ctime / gmtime with MSVC 2008 or later svn path=/trunk/; revision=46930
2012-12-26Fix a bunch of warnings.Guy Harris1-1/+1
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-09Try to speed up decode_bits_in_field().Anders Broman1-12/+19
svn path=/trunk/; revision=46487
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45016
2012-08-02Move the AX.25 address routines to address_to_str.c, where they belong;Guy Harris1-24/+0
hopefully this will fix some of the build errors. svn path=/trunk/; revision=44219
2012-08-02From Richard Stearn: support for AX.25, including support forGuy Harris1-0/+24
LINKTYPE_AX25. svn path=/trunk/; revision=44211
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-05-07Trivial typo: of -> orChris Maynard1-1/+1
svn path=/trunk/; revision=42458
2012-04-04Make bit_offset in _tvb_get_bits64 and related functions unsigned. ThisGerald Combs1-2/+1
removes a potential buffer overflow and should fix a bunch of Coverity errors mentioned in bug 6878. We might want to do the same for no_of_bits. svn path=/trunk/; revision=41945
2011-12-14Put back the checks for null arguments, but report a dissector bug ifGuy Harris1-17/+44
we're given null pointers. Put in comments clarifying that some routines intentionally do *not* null terminate the strings they produce. svn path=/trunk/; revision=40194
2011-12-14Back the previous change out; I'll be checking in a change to throw aGuy Harris1-26/+18
dissector bug exception in cases where a null pointer was passed, as those really *are* dissector bugs (and I have a fix for the bug in question in the HP Teaming heartbeat dissector, which I'll be checking in later). svn path=/trunk/; revision=40193
2011-12-13Protect against NULL pointers as input. Based on the stacktrace provided, ↵Chris Maynard1-18/+26
this should avoid crashes reported in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6634 svn path=/trunk/; revision=40176
2011-06-07Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warningsBill Meier1-2/+0
svn path=/trunk/; revision=37600
2011-05-05Introduce ip6_to_str_buf_len (little cleaner version of inet_ntop6 from ↵Jakub Zawadzki1-0/+16
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-04-12Use g_strlcat instead of strcat: Coverity 632.Chris Maynard1-8/+8
svn path=/trunk/; revision=36598
2011-02-15From Matthew Parris:Jaap Keuter1-4/+4
Display "Day of Year" for January 1 as 1, not 0. svn path=/trunk/; revision=35949
2011-01-24Print "0 seconds" when time_val==0 in functions converting seconds to string.Stig Bjørlykke1-3/+3
svn path=/trunk/; revision=35640
2010-12-21Add a comment about not needing to g_free() the value returned from ↵Bill Meier1-0/+3
g_locale_to_utf8(). svn path=/trunk/; revision=35240
2010-12-01Fix a GCC error.Bill Meier1-1/+1
svn path=/trunk/; revision=35087
2010-12-01On Windows: convert _tzname[] strings from the system charset to UTF8 before ↵Bill Meier1-18/+49
use. In the Windows C Runtime the strings in the global array _tzname[] are encoded using the "system default ansi code page". They must be converted to UTF8 before use by Wireshark/GTK. (See comment in the code for details). Fixes Bug #5421 (I hope). https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5421 Also: Fix bug: when the timezone name is not available from the system ?ST was used when ?DT should have been used (and vice-versa). svn path=/trunk/; revision=35086
2010-05-21Have abs_time_to_str() and abs_time_to_str_secs() take an additionalGuy Harris1-34/+76
argument indicating whether to include the time zone in the string. If we're constructing a display filter, don't include the time zone, otherwise do. Fixes bug 4756. svn path=/trunk/; revision=32913
2010-04-03 From Yaniv Kaul: constify parametersBill Meier1-21/+21
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-02Revert SVN #32360 until Windows compilation errors corrected.Bill Meier1-18/+18
svn path=/trunk/; revision=32361
2010-04-02From Yaniv Kaul: constify parametersBill Meier1-18/+18
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4422 svn path=/trunk/; revision=32360
2010-02-27From Jakub Zawadzki: split off the address-to-string functions, exceptGuy Harris1-367/+9
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-27Squelch some compiler warnings.Guy Harris1-6/+4
svn path=/trunk/; revision=32036
2010-02-27Add a third date format, ABSOLUTE_TIME_DOY_UTC, to show UTC with theGuy Harris1-27/+72
date as YYYY/DDD, where DDD is a 1-origin day of year. Move the formats to a "time_fmt.h" file, included by the headers that use it. Have abs_time_to_str() and abs_time_secs_to_str() take the date format value, rather than a Boolean "show this as UTC" flag, as an argument. Document the ABSOLUTE_TIME_ formats a bit better. Use that format in the CCSDS and VCDU dissectors, rather than having those dissectors do the formatting themselves. svn path=/trunk/; revision=32034
2010-02-24From Jakub Zawadzki:Anders Broman1-2/+4
Don't sigsegv on negative bd_len in bytes_to_str* svn path=/trunk/; revision=31986
2010-02-23From Jakub Zawadzki:Anders Broman1-159/+268
Optimizations. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4303 svn path=/trunk/; revision=31967
2010-01-28Fix various gcc -Wshadow warnings.Bill Meier1-43/+43
svn path=/trunk/; revision=31720
2010-01-19Use more unique names for certain enum constants.Bill Meier1-15/+15
(enum constant names are part of the global name space). (Fixes at least one gcc -Wshadow warning). svn path=/trunk/; revision=31572