aboutsummaryrefslogtreecommitdiffstats
path: root/epan/to_str.c
AgeCommit message (Collapse)AuthorFilesLines
2004-08-06From Albert Chin: rename resolv.{ch} to addr_resolv.{ch}, so that anGuy Harris1-1/+1
include of <resolv.h> in any system header file gets the system <resolv.h> (needed for builds on Tru64 with GTK+ 1.2[.x]). svn path=/trunk/; revision=11615
2004-07-18Move dissectors to epan/dissectors directory.Gilbert Ramirez1-1/+1
Also move ncp222.py, x11-fields, process-x11-fields.pl, make-reg-dotc, and make-reg-dotc.py. Adjust #include lines in files that include packet-*.h files. svn path=/trunk/; revision=11410
2004-07-18Set the svn:eol-style property on all text files to "native", so thatGuy Harris1-1/+1
they have LF at the end of the line on UN*X and CR/LF on Windows; hopefully this means that if a CR/LF version is checked in on Windows, the CRs will be stripped so that they show up only when checked out on Windows, not on UN*X. svn path=/trunk/; revision=11400
2004-06-16As long as any text has been put into a time interval string, the nextGuy Harris1-11/+8
clause we add will have to have ", " separating it from the text before it. svn path=/trunk/; revision=11160
2004-04-21From Michael Lum:Guy Harris1-1/+2
ANSI and GSM MAP stats enhancements and cleanups; enhanced parameter dissection related to SS for GSM A-interface and MAP; minor GSM SMS fix; GSM SS enhancements for parameter dissection; MTP3 statistics tap. svn path=/trunk/; revision=10655
2004-03-23Add support for DLT_APPLE_IP_OVER_IEEE_1394.Guy Harris1-1/+6
svn path=/trunk/; revision=10446
2003-12-09Add "ip6_to_str_buf()", by analogy to "ip_to_str_buf()".Guy Harris1-2/+8
svn path=/trunk/; revision=9216
2003-12-08Get rid of the private "my_decode_bitfield_value()" a number ofGuy Harris1-2/+12
dissectors had. Instead, rename it "other_decode_bitfield_value()", put it in "epan/to_str.c", and make "decode_bitfield_value()" use it. svn path=/trunk/; revision=9213
2003-12-08From Michael Lum: support an AT_SS7PC address type for SS7 point codes,Guy Harris1-1/+5
and set the direction in pinfo for SS7 packets based on source and destination addresses. svn path=/trunk/; revision=9209
2003-11-17updates to ip_to_str[_buf]() to make them faster.Ronnie Sahlberg1-39/+79
This functin was in a recent profiling run the fifth most expensive function. It consumed ~3.5% of the total cpu in that run. Using a static table this function is now just over twice as fast as previously. My testrun calling it 10.000.000 times in a loop changed the execution time from ~17.3s ro ~8.2s If this test was representative for the speedup and if ~3.5 in the profile run was representative for normal cases this should make ethereal ~1.8% faster. Woohoo. (low hanging fruit) svn path=/trunk/; revision=8992
2003-10-07Get rid of an out-of-date comment.Guy Harris1-3/+1
svn path=/trunk/; revision=8643
2003-08-26Include "osi-utils.h" to define "print_nsap_net_buf()".Guy Harris1-1/+2
svn path=/trunk/; revision=8261
2003-08-26Create an "address_to_str_buf()" routine, called by "address_to_str()",Guy Harris1-22/+42
which fills in a caller-supplied buffer. Create "_buf()" versions of various "to_str" routines for various address types, and create a routine to map SNA FIDs to strings, and use them to finish up "address_to_str_buf()". Get rid of the declaration of "sna_fid_type_4_addr_to_str()" in "packet-sna.h", as that routine has been swallowed up in "sna_fid_to_str()". svn path=/trunk/; revision=8260
2003-08-24Put in some comments about possible future work on "address_to_str()".Guy Harris1-4/+25
Put in some additional "case AT_" statements to 1) squelch compiler warnings; 2) add AT_ARCNET (cheap and easy); 3) add placeholders for some other address types. svn path=/trunk/; revision=8243
2003-08-24Add endpoint talker support for IPXRonnie Sahlberg1-1/+6
svn path=/trunk/; revision=8240
2003-08-24Update address_to_str to handle FC and ETH addresses as well.Ronnie Sahlberg1-2/+13
Update the fc and eth and tr endpoint talker list to use the new api svn path=/trunk/; revision=8235
2003-08-24Add a new function address_to_str to to_str.cRonnie Sahlberg1-1/+39
Implement conersion from address to string for IPv4 and IPv6 and update the conversation tables to use the new interface. svn path=/trunk/; revision=8234
2003-08-24FC addresses are no longer extracted into guint32s, so "fc32_to_str()"Guy Harris1-19/+1
is no longer needed. svn path=/trunk/; revision=8226
2003-08-23Update the UDP and the TCP conversation list tool so that it can handle IPv6 ↵Ronnie Sahlberg1-4/+11
as well. Make no distinction between UDP/TCP over IPv4 and UDP/TCP over IPv6 and present them in the same list. svn path=/trunk/; revision=8224
2003-08-23Add FibreChannel to the types of protocols we can show a conversation list forRonnie Sahlberg1-5/+3
svn path=/trunk/; revision=8223
2003-06-26Make the definition of "fc32_to_str()" match its prototype.Guy Harris1-5/+15
Make it have the usual collection of 3 static buffers, just in case somebody decides to call it more than once in the same printf-like-routine call. svn path=/trunk/; revision=7940
2003-06-24Updates to the fibre channel dissectorRonnie Sahlberg1-3/+4
removed two hf fields that are now redundant since F_CTL is decoded placed most interesting header fields in a struct added request response matching and measurement of delta time between the first and the last frame of an exchange. todo: 1, finish restructure of decoding of fc header so that it will populate the tree as it reads more data fields from the tvb so that we can get useful info in the tree even for short frames. 2, add TAP to fc and pass the header struct and the time delta struct to tap listeners 3, add ServiceResponseTime tap listener for FC svn path=/trunk/; revision=7923
2003-06-23Update to FC to store the source and destination id in a guintRonnie Sahlberg1-1/+11
to make it easier to add matching and response times later. svn path=/trunk/; revision=7916
2003-02-12Make the argument to "abs_time_secs_to_str()" a "time_t" - it's in ANSIGuy Harris1-2/+2
C, and it's the right thing to pass to "localtime()". svn path=/trunk/; revision=7125
2003-02-11Add a "abs_time_secs_to_str()" routine that takes a UNIX time-since-the-Guy Harris1-11/+39
epoch-in-seconds value and converts it to a string. Use that routine in the RADIUS dissector, rather than using "ctime()" and "tzname[]" - "tzname[]" strings might contain non-ASCII characters, which currently give the GTK+ 1.3[.x] used on Windows, and also, I think, GTK+ 2.x, heartburn, as they expect UTF-8, not, for example, ISO 8859/1. Fix the string length in "abs_time_to_str()". svn path=/trunk/; revision=7124
2003-01-21From Brian Ginsbach: symbolic names for Fibre Channel Network AddressGuy Harris1-6/+24
Authority identifiers. svn path=/trunk/; revision=6954
2002-12-10Fix the formal argument list to "bytestring_to_str()" to match theGuy Harris1-8/+14
changes to the actual argument lists in the calls (putting the byte string length after the byte string pointer). Make the byte string length actually be the length, not the length - 1. Use a #define for the longest byte string it can handle, and put in a "g_assert()" to check the sanity of that length. svn path=/trunk/; revision=6774
2002-12-09Work around annoying Apple C compiler/linker bug.Guy Harris1-86/+40
"ether_to_str_punct()" no longer deals only with Ethernet-style addresses, as it now takes a length argument, rename it "bytestring_to_str()" - and make it static, as it's not used outside "to_str.c". Get rid of unused "fc_to_str_buf()" routine. svn path=/trunk/; revision=6770
2002-12-08From Dinesh Dutt: Add Fibre Channel support, including FCIP, Basic FCGerald Combs1-5/+109
header, Extended Link Service, Interswitch Link Service, FCP, and IPFC. svn path=/trunk/; revision=6757
2002-11-28Make "ip6_to_str()" take a const pointer as an argument.Guy Harris1-3/+3
svn path=/trunk/; revision=6687
2002-10-29Note why we're including <sys/socket.h> and <winsock2.h> in places whereGuy Harris1-2/+6
we're including them to get AF_ values. Shuffle the order of those includes in "inet_pton.c" to match the order in "inet_ntop.c". Include <winsock2.h> in "resolv.c" and "to_str.c" so that we get AF_ values from it - including AF_INET6 - if they exist, as we want to have everybody who uses AF_INET6 get the same value. svn path=/trunk/; revision=6517
2002-08-28Removed trailing whitespaces from .h and .c files using theJörg Mayer1-13/+13
winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6116
2002-08-03<netinet/in.h> is needed for <arpa/inet.h>, at least on some platforms,Guy Harris1-1/+9
and <sys/types.h> is needed for <netinet/in.h>. svn path=/trunk/; revision=5936
2002-08-02Replace the types from sys/types.h and netinet/in.h by their glib.hJörg Mayer1-14/+2
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-06-23WinPcap 2.3's <pcap.h> includes <packet32.h>, and WinPcap 2.3'sGuy Harris1-3/+3
<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
2001-09-14Get rid of no-longer-necessary includes of <sys/time.h>.Guy Harris1-5/+1
svn path=/trunk/; revision=3936
2001-09-14Make the resolution for time values be nanoseconds rather thanGuy Harris1-31/+45
microseconds. Fix some "signed vs. unsigned" comparison warnings. svn path=/trunk/; revision=3934
2001-08-01Add a "time_secs_to_str_buf()" routine, which takes seconds andGuy Harris1-66/+113
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-07-15Fixes, from Scott Renfro, for some calls to "localtime()" that didn'tGuy Harris1-10/+13
check whether the call succeeded (it doesn't always do so on Windows, for example). svn path=/trunk/; revision=3722
2001-07-13Add a "time_msecs_to_str()" routine, to turn a time interval, expressedGuy Harris1-1/+61
as a 32-bit number of milliseconds, to a descriptive string. Use that in the MS Browser dissector. svn path=/trunk/; revision=3708
2001-05-31Display all the digits of the microsecond field of an absolute timeGuy Harris1-4/+4
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-28We now might print four IP addresses on a protocol tree line, so makeGuy Harris1-3/+5
"ip_to_str()" capable of producing up to four separate strings. svn path=/trunk/; revision=3474
2001-04-02Include <string.h> to declare "strlen()", and include <winsock.h> toGuy Harris1-5/+10
declare "struct timeval", so that MSVC++ 6.0 doesn't give an error. svn path=/trunk/; revision=3247
2001-04-02"to_str.c" uses "size_t"; include <stdlib.h>, to declare it (necessaryGuy Harris1-1/+3
on Windows). svn path=/trunk/; revision=3244
2001-04-02Include <sys/time.h> as well as <time.h> in "column-utils.c" andGuy Harris1-6/+9
"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-01Added #include<sys/time.h> to to_str.cEd Warnicke1-1/+7
svn path=/trunk/; revision=3232
2001-04-01Moved vines_addr_to_str() from packet-vines.{h,c} to epan/to_str.{c,h}.Ed Warnicke1-1/+18
svn path=/trunk/; revision=3229
2001-04-01Moved various to_str files from packet.{c,h} to a separateEd Warnicke1-0/+443
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