Commit Graph

22 Commits

Author SHA1 Message Date
Guy Harris 83fc9d5e09 Constify a bunch of stuff, to squelch -Wwrite-strings warnings.
epan/dissectors/packet-ncp2222.inc is a bit hard to fix, so we're not
ready to enable that warning by default yet.

Throw in some casts to handle GLib routines that take arbitrary
non-const pointers (they can later return the pointers, and some
callers might want to modify or free up those pointers in cases where
they're known to be writable or allocated).

Use ep_tvb_memdup() rather than a combination of ep_alloc() and
tvb_memcpy().

Clean up some indentation.

svn path=/trunk/; revision=25601
2008-06-25 09:12:35 +00:00
Anders Broman 1950ffc214 Apply the small performance enhancment patches for:
- if offset is 0, tvb_length is the same as tvb_length_remaining, just faster.
Replace 
- col_append_fstr() with faster  col_append_str() 
- col_add_str() with col_set_str()
when it's safe

svn path=/trunk/; revision=23252
2007-10-23 05:50:00 +00:00
Stephen Fisher 8fd3ee0560 Remove almost all of the casts I committed recently and in place of
them, add -Wno-pointer-sign to CFLAGS when gcc will accept it.


svn path=/trunk/; revision=21253
2007-03-28 21:55:11 +00:00
Stephen Fisher ab8f589336 Fix about 100 simple to fix warnings from gcc 4.0 in epan/dissectors
svn path=/trunk/; revision=21233
2007-03-27 22:50:11 +00:00
Ronnie Sahlberg 2d1bb39121 change the signature for the get_pdu_len() function pointer passed to tcp_dissect_pdus() to also include a packet_info pointer.
there are many reasons why some protocols actually need to be able to access the pinfo structure while determining the pdu size



svn path=/trunk/; revision=19751
2006-10-31 09:29:07 +00:00
Jaap Keuter a3821bf4c3 Licepnse -> License
svn path=/trunk/; revision=19254
2006-09-18 13:59:30 +00:00
Gerald Combs b15974d094 libethereal -> libwireshark. idl2eth -> idl2wrs. There are a _lot_ of
changes here.  It compiles OK on OS X, but hasn't been tested anywhere else.

svn path=/trunk/; revision=18260
2006-05-31 00:23:01 +00:00
Ronnie Sahlberg feab79e328 change a whole bunch of ethereal into wireshark
svn path=/trunk/; revision=18196
2006-05-21 04:49:01 +00:00
Ronnie Sahlberg f331077a60 waste a couple of bytes per tcp conversation and make the tree for acked_packets (i.e. packets that have interesting tcp properties such as being retransmissions etc) hang off the per conversation tcpd struct instead of being global.
while this should improve performance by unmeasurably little it does have the sideeffect that once we finish the rewrite   tcp analysis might actually work and work well even for tcp over tcp tunnelling. 

this also means that if you include packet-tcp.h   you also need to include emem.h .




svn path=/trunk/; revision=17681
2006-03-20 10:52:53 +00:00
Ronnie Sahlberg e6dd3c8b22 more sprintf updates
svn path=/trunk/; revision=15469
2005-08-20 13:02:08 +00:00
Ulf Lamping 994496a184 several times replacing:
sprintf -> g_snprintf
snprintf -> g_snprintf
vsnprintf -> g_vsnprintf
strdup -> g_strdup

svn path=/trunk/; revision=15412
2005-08-18 19:31:15 +00:00
Ronnie Sahlberg 12e2db899c ememify g_malloc() calls
svn path=/trunk/; revision=15357
2005-08-15 12:04:15 +00:00
Ronnie Sahlberg ec3ab9ec3e rename ep_tvb_get_string() to tvb_get_ephemeral_string() asnd update the documentation in README.developer
svn path=/trunk/; revision=15270
2005-08-10 13:41:13 +00:00
Ronnie Sahlberg 835df3a1d2 convert some uses of tvb_get_string() to ep_tvb_get_string()
there was at least one obvious memleak in one of the uses of tvb_get_string()



svn path=/trunk/; revision=15027
2005-07-24 02:43:41 +00:00
Guy Harris 68b1ab41d7 Use "tvb_get_string()" rather than duplicating its functionality by
hand.

Use "g_strdup()" rather than duplicating its functionality by hand.

Make the magic number an array of "guint8", as "tvb_memeql()" expects a
pointer to "guint8".

svn path=/trunk/; revision=14881
2005-07-09 00:35:13 +00:00
Gerald Combs 522e204d87 Don't try to free the same memory twice.
svn path=/trunk/; revision=14176
2005-04-24 00:36:11 +00:00
Guy Harris 8b8e67ccbe "tvb_reported_length_remaining()" returns a "gint", so assign its return
value to a "gint".

svn path=/trunk/; revision=12223
2004-10-06 17:37:47 +00:00
Ulf Lamping 871ada80d8 remove MSVC compiler warning
svn path=/trunk/; revision=12221
2004-10-06 17:08:25 +00:00
Ulf Lamping 9fd6789da8 bring MSVC generation back to live, as elipses in macros are not alowed. May need some more rework.
svn path=/trunk/; revision=12220
2004-10-06 17:06:12 +00:00
Guy Harris 69e4cb6a93 We now do reassembly.
Use "tvb_reported_length_remaining()", not "tvb_length_remaining()", to
find out how much encapsulated data there is, so we properly handle
short frames (reporting how much was really there, not how much was
captured).

svn path=/trunk/; revision=12219
2004-10-06 10:14:56 +00:00
Guy Harris 1e47d6557f Add support for reassembly.
The reason why you need to turn on "Try heuristic sub-dissector first"
is that the traffic might be port 10000 traffic, and the NDMP dissector
gets that but doesn't properly reject it if it doesn't look like NDMP -
that's been fixed.

svn path=/trunk/; revision=12217
2004-10-06 10:01:36 +00:00
Guy Harris fdd1b1dba5 From Francesco Fondelli: ICE protocol support.
svn path=/trunk/; revision=12215
2004-10-06 09:03:42 +00:00