Commit Graph

23 Commits

Author SHA1 Message Date
Bill Meier f8e3822738 Fix some warnings reported by gcc -Wshadow ...
Fix some spacing in packet-dcom.c

svn path=/trunk/; revision=25618
2008-06-27 16:15:30 +00:00
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
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
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
Guy Harris b13f6dcbd3 Use the new "proto_tree_add_*_format_value" routines.
svn path=/trunk/; revision=17316
2006-02-16 11:43:38 +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 19dd9f8159 ememify tywo more tvb_get_string()
svn path=/trunk/; revision=15269
2005-08-10 13:01:16 +00:00
Guy Harris 3d3dbb9b15 DHCP Failover runs over TCP; use tcp_dissect_pdus.
There's no need to build a list of all the options and then dissect them
individually; just have one loop that dissects them.  (The full list
wasn't being freed, so we were leaking memory.)

Add some more sanity checks.

Clean up a bunch of other things.

svn path=/trunk/; revision=15255
2005-08-07 20:06:01 +00:00
Guy Harris 194fdb6676 Fix the spelling of "transferred".
Fix the sizes of some items to match what's in the I-D and what's being
fetched from the packet.

Check for the length of items before doing *anything* with the item,
including fetching the data from the packet.  Just put a "bad length"
indication into the protocol tree; don't abort the dissection (we can
just move on to the next TLV).

svn path=/trunk/; revision=15254
2005-08-07 18:03:34 +00:00
Guy Harris 3607e8299d Squelch another qualifier warning.
svn path=/trunk/; revision=15122
2005-07-27 18:38:35 +00:00
Jörg Mayer 2280b847f9 More warining fixes: char -> const char
svn path=/trunk/; revision=14976
2005-07-21 17:23:29 +00:00
Guy Harris ab797734dd Get rid of the private "my_match_strval()" routine in many dissectors;
add a "match_strval_idx()" routine that does the same thing, and have
"match_strval()" call it.

Make those routines, and "val_to_str()", return a "const" pointer. 
Update dissectors as necessary to squelch compiler warnings produced by
that.

Use "val_to_str()" rather than using "match_strval()" and then, if the
result is null, substituting a specific string.  Clean up some other
"match_strval()"/"val_to_str()" usages.

Add a null pointer check in the NDPS dissector's "attribute_value()"
routine, as it's not clear that "global_attribute_name" won't be null at
that point.

Make some global variables in the AFS4INT dissector local.

Make some routines not used outside the module they're in static.

Make some tables "static const".

Clean up white space.

Fix Gerald's address in some files.

svn path=/trunk/; revision=14786
2005-06-26 19:56:52 +00:00
Gerald Combs 614a46f36e Make sure we're passing the proper lengths to proto_tree_add_item(). Fixes
bug 142.

svn path=/trunk/; revision=14230
2005-04-29 14:40:04 +00:00
Guy Harris 90d05b46d1 According to draft-ietf-dhc-failover-10, the message digest type is 1
byte - and a length of 1 is used to put the message digest into the
protocol tree, which agrees with that.  Therefore, "tvb_get_guint8()"
should be used to fetch it.

svn path=/trunk/; revision=11746
2004-08-16 01:13:11 +00:00
Jörg Mayer 4bd2d5b0be Make message_digest_type a guint16. Removed cast.
Spotted by Ulf Lamping.

svn path=/trunk/; revision=11742
2004-08-15 11:39:13 +00:00
Ulf Lamping 60eb7df5b5 remove MSVC compiler warning (required a type cast)
svn path=/trunk/; revision=11741
2004-08-15 11:25:35 +00:00
Guy Harris e7fbdca940 Use the protocol short name as the Protocol column value, as is done in
other dissectors.

svn path=/trunk/; revision=11640
2004-08-10 07:03:21 +00:00
Jörg Mayer 4e9e5a4a08 - Small cosmetic fix to DHCP failover prefs
- free -> g_free (we are using g_malloc)
- remove debug prinf

svn path=/trunk/; revision=11632
2004-08-09 03:07:50 +00:00
Guy Harris 7950acd597 Enable the configurable port number - and make the filter name for the
protocol "dhcpfo", to match the filter names of its fields; that - or
changing the long name or abbreviation of the protocol - fixes the core
dump (which was in a check for a name being legal).

svn path=/trunk/; revision=11631
2004-08-09 02:41:41 +00:00
Jörg Mayer c015a1e1f1 M. Ortega y Strupp <moys@loplof.de>
ISC DHCP Server 3.0 failover protocol dissection

Note: I tried to make the port configurable via prefs
but failed to do so: It always cashed on startup so it
is commented out for now.


svn path=/trunk/; revision=11630
2004-08-09 01:53:26 +00:00