Commit Graph

17 Commits

Author SHA1 Message Date
Jörg Mayer 48be4e530d Removed trailing whitespaces from .h and .c files using the
winapi_cleanup tool written by Patrik Stridvall for the wine
project.

svn path=/trunk/; revision=6116
2002-08-28 20:41:00 +00:00
Guy Harris 38d08c8883 <netinet/in.h> is needed for <arpa/inet.h>, at least on some platforms,
and <sys/types.h> is needed for <netinet/in.h>.

svn path=/trunk/; revision=5936
2002-08-03 19:35:16 +00:00
Jörg Mayer 3105ee542f Replace the types from sys/types.h and netinet/in.h by their glib.h
equivalents for the epan/ directory but leave winsock2.h in inet_pton.c
and inet_ntop.c for now (can't estimate the consequences).

svn path=/trunk/; revision=5928
2002-08-02 21:29:45 +00:00
Guy Harris 73ef5a2753 WinPcap 2.3's <pcap.h> includes <packet32.h>, and WinPcap 2.3's
<packet32.h> includes <winsock2.h>; we include that rather than
<winsock.h>, to avoid errors due to conflicting declarations in
<winsock.h> and <winsock2.h>.

svn path=/trunk/; revision=5742
2002-06-23 10:32:36 +00:00
Guy Harris 07c2ce1bad Get rid of no-longer-necessary includes of <sys/time.h>.
svn path=/trunk/; revision=3936
2001-09-14 07:23:34 +00:00
Guy Harris 1d42c94b05 Make the resolution for time values be nanoseconds rather than
microseconds.

Fix some "signed vs. unsigned" comparison warnings.

svn path=/trunk/; revision=3934
2001-09-14 07:10:13 +00:00
Guy Harris d451acb66c Add a "time_secs_to_str_buf()" routine, which takes seconds and
fractions-of-a-second (the units of which are either milliseconds or
microseconds, specified by a Boolean argument), and formats it into a
"DD days, HH hours, MM minutes, SS seconds" using a buffer supplied to
it.  Have "time_secs_to_str()" and "time_msecs_to_str()" both use it.
Also, have it correctly handle the case of SS being > 0 but < 1 (which
"time_msecs_to_str()" didn't do).

Rename "rel_time_to_str()" to "rel_time_to_secs_str()", and add a
"rel_time_to_str()" routine that takes a "struct timeval" and hands its
seconds and microseconds values to "time_secs_to_str_buf()".  Use
"rel_time_to_secs_str()" to format FT_RELATIVE_TIME values for now; we
might want to use "rel_time_to_str()" for them, though, or make it an
option (either a user option, or a per-field option, using the field
that also holds BASE_ values).

svn path=/trunk/; revision=3806
2001-08-01 08:27:00 +00:00
Guy Harris b7255e108a Fixes, from Scott Renfro, for some calls to "localtime()" that didn't
check whether the call succeeded (it doesn't always do so on Windows,
for example).

svn path=/trunk/; revision=3722
2001-07-15 19:14:03 +00:00
Guy Harris 82a553e9c9 Add a "time_msecs_to_str()" routine, to turn a time interval, expressed
as a 32-bit number of milliseconds, to a descriptive string.

Use that in the MS Browser dissector.

svn path=/trunk/; revision=3708
2001-07-13 00:27:51 +00:00
Guy Harris 52025d6956 Display all the digits of the microsecond field of an absolute time
value.

Check that the microseconds field of an absolute time is valid, if it's
present.

Set "tm_isdst" in the "struct tm" handed to "mktime()" to -1, so that
"mktime()" will attempt to figure out whether the time is daylight
savings time or not.

Check that "mktime()" was able to convert the time.

svn path=/trunk/; revision=3487
2001-05-31 06:48:00 +00:00
Guy Harris 73daa09911 We now might print four IP addresses on a protocol tree line, so make
"ip_to_str()" capable of producing up to four separate strings.

svn path=/trunk/; revision=3474
2001-05-28 20:12:30 +00:00
Guy Harris 6270db715c Include <string.h> to declare "strlen()", and include <winsock.h> to
declare "struct timeval", so that MSVC++ 6.0 doesn't give an error.

svn path=/trunk/; revision=3247
2001-04-02 10:44:09 +00:00
Guy Harris ce01c4e7ef "to_str.c" uses "size_t"; include <stdlib.h>, to declare it (necessary
on Windows).

svn path=/trunk/; revision=3244
2001-04-02 09:59:41 +00:00
Guy Harris 13681cf12b Include <sys/time.h> as well as <time.h> in "column-utils.c" and
"value_string.c", as they include "epan/to_str.h", and that uses "struct
timeval" in some function prototypes.

In "to_str.c", include <sys/types.h> before including <netinet/in.h>; on
at least some platforms, definitions in <netinet/in.h> require types
defined in <sys/types.h>.

In "to_str.c", include <sys/socket.h>, so that AF_INET6 is defined.

svn path=/trunk/; revision=3238
2001-04-02 02:30:06 +00:00
Ed Warnicke 80f1da63b0 Added #include<sys/time.h> to to_str.c
svn path=/trunk/; revision=3232
2001-04-01 17:35:21 +00:00
Ed Warnicke 1d4e847837 Moved vines_addr_to_str() from packet-vines.{h,c} to epan/to_str.{c,h}.
svn path=/trunk/; revision=3229
2001-04-01 06:32:10 +00:00
Ed Warnicke c17e3b00c6 Moved various to_str files from packet.{c,h} to a separate
to_str.{c,h}.  Resolved strange situation where ipx_addr_to_str was
declared in packet.h but defined in packet-ipx.c by moving
ipx_addr_to_str, ipxnet_to_str_punct, and ipxnet_to_str from packet-ipx.{c,h}   to to_str.{c,h}

svn path=/trunk/; revision=3219
2001-04-01 02:47:56 +00:00