Commit Graph

89 Commits

Author SHA1 Message Date
Ulf Lamping 013332de7f fix a bug found while fuzz testing the opcua dissector:
MSVC 2005 crashes, if localtime is called with very large numbers (in this case 218939827321) - probably due to changes that time_t is now 64bits long as default

limit the number given to localtime to a reasonable value

while this isn't a nice fix, I don't see a better way to fix it :-(

svn path=/trunk/; revision=21759
2007-05-14 13:47:03 +00:00
Guy Harris 08ab8d8734 mtp3_addr_to_str_buf() and mtp3_pc_hash() expect to be passed a pointer
to a mtp3_addr_pc_t; declare them as such, and pass the argument as
such.

svn path=/trunk/; revision=21595
2007-04-26 07:57:44 +00:00
Guy Harris 8a998bf38a For address types where the address is a bunch of bytes, convert the
address data pointer from a void * to a guint8 *.

For AT_STRINGZ, convert it to a char *.

Fix indentation.

svn path=/trunk/; revision=21584
2007-04-26 03:32:38 +00:00
Ulf Lamping 3e32597719 fix some more warnings
svn path=/trunk/; revision=21104
2007-03-22 00:40:04 +00:00
Gerald Combs 9f5386d408 From Andrej Mikus:
IMO, the function should return an error string instead of cowardly
  bailing out with an empty string.

  inet_ntop does the latter by default, so it does not need any additional
  check, just passing buf_len instead of INET6_ADDRSTRLEN.
  
  At the other side I like the check you made into ip_to_str_buf.

  My proposal would be to combine the patches and use MAX_IP_STR_LEN,
  and approach below for both IPv4 and IPv6 in address_to_str_buf.

Have the error string return a more descriptive clue.

svn path=/trunk/; revision=20658
2007-01-31 23:26:29 +00:00
Gerald Combs 063621f11b Fix potential buffer overruns in address_to_str_buf() found by Andrej
Mikus.  Add a buf_len parameter to ip_to_str_buf(), and make sure it's 
enforced.  Copy the release notes over from the 0.99.5 trunk and add a
note about the ISUP dissector (which is affected by the overrun).

svn path=/trunk/; revision=20607
2007-01-29 20:25:26 +00:00
Jörg Mayer 6f7089fe26 Commit my USB changes (change address handling)
svn path=/trunk/; revision=20346
2007-01-08 14:32:10 +00:00
Stephen Fisher 75acf34518 From Douglas Pratley with trivial changes and documentation changes
by myself:

Corrected patch; epan/column.c and epan/column_utils.c were not included. This
one has now been properly tested against a clean checkout of today's code.

- New menu option available under view\time display format
- New sub-option (e) to -t switch for both wireshark and tshark
- Extended recent settings code to handle new value
- Did NOT add new explicit epoch time column


svn path=/trunk/; revision=20040
2006-12-05 03:19:51 +00:00
Ronnie Sahlberg 24ef4fcef0 create a new address type AT_USB and start populating the packet list
with nice data




svn path=/trunk/; revision=19524
2006-10-14 05:02:40 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Guy Harris 16614b4ed1 Squelch a compiler warning.
svn path=/trunk/; revision=17759
2006-03-29 21:54:22 +00:00
Jaap Keuter b21337192c From Olivier Jacques:
- to_str.c: add support of "AT_NONE" address type in address_to_str_buf (avoid the assert failed later on
when messages have address type of AT_NONE - which can be the case for an MTP2 capture with FISU messages)
- packet-isup.c: changed source and destination addresses from (net_src and net_dst) to (src and dst) so 
that addresses taken into account in the statistics are the SS7 point codes

svn path=/trunk/; revision=17720
2006-03-24 14:26:01 +00:00
Tomas Kukosa 923855bb20 new FT_GUID handling - big/little endian supported
svn path=/trunk/; revision=17566
2006-03-10 11:58:22 +00:00
Tim Potter 0afb8cd493 Remove a linebreak to emphasise the guid structure (doesn't change
the byte ordering).

svn path=/trunk/; revision=17561
2006-03-10 03:03:06 +00:00
Anders Broman e9b933473e From Mike Duigou:
- Fixes an off by one error which had the potential to write a 
terminating '\0' one byte past the end of the URI address being printed.

svn path=/trunk/; revision=17144
2006-02-03 06:31:01 +00:00
Gerald Combs 4b15bf76a7 Fix an off-by-one error. Fixes bug 698, possibly others.
svn path=/trunk/; revision=17048
2006-01-17 18:50:02 +00:00
Tomas Kukosa 7ab60e33cc oid_to_str_buf() keep enough speace before appending next part of string (Bug 669)
svn path=/trunk/; revision=17017
2006-01-12 09:29:41 +00:00
Jörg Mayer ba31392772 warning: no newline at end of file
svn path=/trunk/; revision=16854
2005-12-18 23:23:21 +00:00
Tomas Kukosa dcae7d303f new field type FT_OID for OBJECT IDENTIFIERs
svn path=/trunk/; revision=16652
2005-12-02 13:16:58 +00:00
Anders Broman f07dd2bfcf Add TIPC address as address type and use it in TIPC.
svn path=/trunk/; revision=16641
2005-12-01 20:02:45 +00:00
Gerald Combs be65a36fcf If bytes_to_str() is passed a zero length value, return an empty string
instead of asserting.  Fixes bug 560.

Fix up whitespace.

svn path=/trunk/; revision=16350
2005-10-28 15:08:14 +00:00
Anders Broman 3a6ea1fc9b From Mike Duigou
Safer handling for building address string for AT_STRINGZ and AT_URI.

svn path=/trunk/; revision=16321
2005-10-26 19:08:37 +00:00
Guy Harris 374c3d0b75 Export "bytestring_to_str()", and use it when adding the link-layer
address for the ND_OPT_TARGET_LINKADDR ICMPv6 packet type.

svn path=/trunk/; revision=15591
2005-08-28 06:44:06 +00:00
Ulf Lamping 723c80ea90 timestamp display precision:
- automatic adjustment depending on file format
- manual adjustment through menu items

save the setting in the recent file

svn path=/trunk/; revision=15534
2005-08-25 21:29:54 +00:00
Ronnie Sahlberg a34e7e3d03 removal of even more sprintf
svn path=/trunk/; revision=15457
2005-08-20 02:33:33 +00:00
Ronnie Sahlberg aff31978c1 remove sprintf from mtp3
svn path=/trunk/; revision=15451
2005-08-20 01:24:23 +00:00
Ulf Lamping 0dc9fb3d4a various code cleanup:
-use g_snprintf instead of sprintf and snprintf
-use g_strdup_printf where appropriate
-remove #include "snprintf.h" (as only g_snprintf should be used)
-replace some more alloc/realloc/calloc/free with their glib pendants

svn path=/trunk/; revision=15264
2005-08-08 18:50:39 +00:00
Jörg Mayer 30a8557868 More 'char*' -> 'const char*' changes to fix warnings.
svn path=/trunk/; revision=15015
2005-07-23 11:41:25 +00:00
Ronnie Sahlberg 070351d090 convert all other nasty "rotating static array" from to_str.c and make them use the new emem api.
svn path=/trunk/; revision=14987
2005-07-22 08:27:20 +00:00
Ronnie Sahlberg c841beb71b EMEM : a simple and FAST api to allocate memory that will be automatically freed() when the next packet is dissected.
This offesr memory allocation with a packet  scope making memory leaks less likely and memory management faster.


Add initialization calls for both tethereal and ethereal.

Convert the ip_to_str() function to use this and avoid doing the silly rotating buffers thing it previously did.


We also need an equivalent set of functions for allocation with capture file scope (free when next capture is loaded) but i dont know where to put the free_all call.



svn path=/trunk/; revision=14984
2005-07-22 07:46:58 +00:00
Tomas Kukosa b579d77b9a GUID lowercase form seems to be preferred
svn path=/trunk/; revision=14855
2005-07-05 18:55:17 +00:00
Tomas Kukosa bab34b522b new field type FT_GUID
svn path=/trunk/; revision=14845
2005-07-04 13:04:53 +00:00
Gerald Combs 6a4b3f9cd7 Fix an off-by-four error, which should take care of bugs 254 - 258. Print
OID values as unsigned ints instead of signed.

svn path=/trunk/; revision=14729
2005-06-22 15:37:46 +00:00
Anders Broman 7ec6ab1d78 From Mike Duigou:
In order to get filtering of conversations and
> endpoints to work from the endpoints and conversations windows I found 
> it necessary to add a new AT_URI address type and a SAT_JXTA. This also 
> necessitated a change to to_str.c to avoid a buffer overflow problem. 
> Please review these changes carefully.
> 
> Also includes some changes to the jxta dissector to fix filtering on
> generated fields and some changes to the types used for ints/unsigned ints.
> 
> Fixes a bug with the processing of messages containing namespaces.

svn path=/trunk/; revision=14715
2005-06-20 20:14:57 +00:00
Anders Broman 45fb18a2d6 From Mike Duigou:
a patch to to_str.c which adds support for printing 
AT_STRINGZ address type. Amazing that this wasn't there!

svn path=/trunk/; revision=14557
2005-06-06 15:17:41 +00:00
Guy Harris 73cad260c5 "oid_to_str()" and "oid_to_str_buf()" don't modify what the "oid"
argument points to, so make it a "const" pointer.

svn path=/trunk/; revision=14311
2005-05-05 09:40:24 +00:00
Tomas Kukosa 3be38ac077 New oid_to_str() and oid_to_str_buf() functions
svn path=/trunk/; revision=14216
2005-04-28 09:51:55 +00:00
Gerald Combs af3435f669 In time_secs_to_str_buf(), handle the case where a large time value makes
things go wonky.

svn path=/trunk/; revision=14097
2005-04-15 21:38:42 +00:00
Ronnie Sahlberg 83f14e4614 change time_secs_to_str() and time_msecs_to_str() to take a signed integer as parameter so we can handle negtive times
svn path=/trunk/; revision=14055
2005-04-12 19:59:08 +00:00
Jörg Mayer c49b92ea30 Yniv Kaul: Small performance optimization
It change a while()->do, to do->while() and removes a variable (and an
  assignment to it).

svn path=/trunk/; revision=13270
2005-02-03 23:18:23 +00:00
Guy Harris 87c98feed8 "address_to_str()" and "address_to_str_buf()" don't modify the "address"
structure pointed to them by reference, so make the argument a "const"
pointer.

svn path=/trunk/; revision=12911
2005-01-01 12:29:26 +00:00
Guy Harris 3a583aeb59 From Albert Chin: rename resolv.{ch} to addr_resolv.{ch}, so that an
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-08-06 19:57:49 +00:00
Gilbert Ramirez 669db206cb Move dissectors to epan/dissectors directory.
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-18 18:06:47 +00:00
Guy Harris 8a8b883450 Set the svn:eol-style property on all text files to "native", so that
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-07-18 00:24:25 +00:00
Guy Harris e656facb26 As long as any text has been put into a time interval string, the next
clause we add will have to have ", " separating it from the text before
it.

svn path=/trunk/; revision=11160
2004-06-16 23:09:43 +00:00
Guy Harris c6aeb05249 From Michael Lum:
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-04-21 05:53:59 +00:00
Guy Harris 30b2831847 Add support for DLT_APPLE_IP_OVER_IEEE_1394.
svn path=/trunk/; revision=10446
2004-03-23 01:02:41 +00:00
Guy Harris 8061eba526 Add "ip6_to_str_buf()", by analogy to "ip_to_str_buf()".
svn path=/trunk/; revision=9216
2003-12-09 05:06:22 +00:00
Guy Harris a93463727e Get rid of the private "my_decode_bitfield_value()" a number of
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-08 23:40:13 +00:00
Guy Harris d06dc0727a From Michael Lum: support an AT_SS7PC address type for SS7 point codes,
and set the direction in pinfo for SS7 packets based on source and
destination addresses.

svn path=/trunk/; revision=9209
2003-12-08 21:36:53 +00:00