Commit Graph

336 Commits

Author SHA1 Message Date
Gerald Combs 21e87a963f Replace a lot of pointer tracking and some GStrings with emem_strbufs. Add
ep_strbuf_printf and ep_strbuf_append_c.

svn path=/trunk/; revision=27873
2009-03-28 00:27:03 +00:00
Jaap Keuter 5d9a041d91 Fix for bug 3247:
Incorrect index adjustment causes failure to dissect multiple capabilities in optional parameters.

svn path=/trunk/; revision=27529
2009-02-23 22:07:19 +00:00
Jaap Keuter 1be7c5c1a4 From Thomas M. Knoll:
- New dissector for CoS Capability attributes added
- tiny changes in my committed dissector for QoS Marking attributes

svn path=/trunk/; revision=27232
2009-01-14 22:01:10 +00:00
Jaap Keuter fa9fc03b4f From Thomas M. Knoll:
Added a new dissector for BGP QoS Marking extended community attributes as
defined in http://tools.ietf.org/id/draft-knoll-idr-qos-attribute.

svn path=/trunk/; revision=27206
2009-01-10 11:06:50 +00:00
Stig Bjørlykke 9a0020f2f9 From Peter (bug 2942):
Allow optimalization with -ftracer.

svn path=/trunk/; revision=26822
2008-11-22 15:55:01 +00:00
Bill Meier 7aaadd9bec Fix some warnings reported by gcc -Wshadow ...
svn path=/trunk/; revision=25616
2008-06-27 04:52:56 +00:00
Anders Broman e623809550 Fix some of the Errors/warnings detected by checkapi.
svn path=/trunk/; revision=25264
2008-05-09 13:59:10 +00:00
Anders Broman 45b8ffd1ec Remove depreciated functions g_string_sprint, g_string_sprintfa.
svn path=/trunk/; revision=25238
2008-05-05 19:52:59 +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
Stig Bjørlykke 4024a6e592 Swapped block-size and block-offset in BGP VPLS NLRI - fixes bug 1907.
svn path=/trunk/; revision=23151
2007-10-11 22:04:32 +00:00
Jaap Keuter a061f172d1 Clean up the code.
- Move add. info from header
- Remove excess comma's
- Use plurality macro
- NULL pointer for field descriptions

svn path=/trunk/; revision=22607
2007-08-23 20:42:27 +00:00
Jaap Keuter 902737dfff From David Helder:
The MP_REACH_NLRI (and MP_UNREACH_NLRI) parser incorrectly increments a buffer
offset.  Any attributes following will be skipped and/or parsed incorrectly. 
No security problem I see - the bounds are checked before parsing each attribute.

svn path=/trunk/; revision=22598
2007-08-23 09:16:31 +00:00
Bill Meier 0775839c11 fix compiler warning
svn path=/trunk/; revision=19991
2006-11-26 18:20:51 +00:00
Jaap Keuter 004cb06d90 From Aaron Campbell:
The expression (BGP_OSPF_RTYPE_EXT ||BGP_OSPF_RTYPE_NSSA) will always
evaluate to 1.  As well, neither of these constants are defined as flag
values, so a bitwise op was probably not intended either.

svn path=/trunk/; revision=19444
2006-10-06 19:18:55 +00:00
Jaap Keuter 3e2659699e From: Hannes Gredler
attached a patch for the BGP dissector for correct display of
VPLS NLRIs as per the latest spec (draft-ietf-l2vpn-vpls-bgp-08).

svn path=/trunk/; revision=18638
2006-07-03 08:38:30 +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
Anders Broman c26db21d54 From RABRET Laurent RD-MAPS-ISS:
Please find enclosed a patch for the BGP dissector.
A 0 length IP address is valid in NLRI dissection. It just means "0/0 address".

svn path=/trunk/; revision=17634
2006-03-15 18:53:54 +00:00
Ronnie Sahlberg 3cd2777adc fix minor bug coverity 74
length_remaining could become -1 and if so the next tvb access (tvb_memcpy()) would cause an exception.    not really an ethereal since it would have no ill effects in reality.



change !=0   to >0    to make it more clear what we actually test.




svn path=/trunk/; revision=17528
2006-03-08 11:09:02 +00:00
Jörg Mayer a052b3a98b packet-bgp.c: Fix incorrect use of g_snprintf return value
mp_addr_to_str was unnecessary 'complex' - simplified it
packet-dns.c: Fix incorrect use of g_snprintf return value
packet-dcm.c: Fix incorrect use of g_snprintf return value
        Someone who understands the protocol should look at the
        "vr, tr might be used uninitialized..." warning.
packet-x11.c: Fix incorrect use of g_snprintf return value
packet-kerberos.c: Fix incorrect use of g_snprintf return value
        Someone should take a look at the
        "longjump might clobber ..." messages
packet-diameter.c: Fix incorrect use of g_snprintf return value
        Get rid of unsigned < 0 check
packet-pgm.c: Fix incorrect use of g_snprintf return value
packet-nbns.c: Fix incorrect use of g_snprintf return value
packet-winsrepl.c: Collateral damage to packet-nbns.c fix
packet-netbios.c: Collateral damage to packet-nbns.c fix
packet-netbios.h: Collateral damage to packet-nbns.c fix
packet-kerberos.c: Collateral damage to packet-nbns.c fix
packet-nbipx.c: Collateral damage to packet-nbns.c fix


svn path=/trunk/; revision=17065
2006-01-20 21:18:18 +00:00
Ronnie Sahlberg 7cde2cd67a get rid of one stack buffer and some strcpy() and strcat()
svn path=/trunk/; revision=16233
2005-10-15 23:59:56 +00:00
Anders Broman b854132495 From Hannes Gredler:
fixes the AF/SAFI codepoints
for BGP Layer-2 VPNs from  a Juniper pre-standard implementation to the new "official" IANA assigned codepoints.

From Julian Onions
packet-rmt-norm.ch Decode more oif the protocol

svn path=/trunk/; revision=16183
2005-10-11 05:23:27 +00:00
Guy Harris 973920e91d Convert some more "tvb_memcpy()"s fetching IPv4 and IPv6 addresses to
calls to "tvb_get_ipv4()" and "tvb_get_ipv6()".

Fix a call in the BGP dissector to properly fetch an IEEE floating-point
number.

Update some I-D info.

svn path=/trunk/; revision=15774
2005-09-13 00:50:43 +00:00
Guy Harris 39fd819fb4 Don't collide with the "regular" IPv6 defintions in at least some
platforms in ipv6-utils.h.

svn path=/trunk/; revision=15764
2005-09-12 06:21:35 +00:00
Guy Harris 25c4bc9379 Replace tvb_memcpy() calls that extract IPv4 addresses into a guint32,
and that extract IPv6 addresses into a "struct e_in6_addr", with
tvb_get_ipv4() and tvb_get_ipv6() calls - except for some that we
remove, by using proto_tree_add_item(), rather than replacing.

Have epan/tvbuff.h include epan/ipv6-utils.h, to define "struct
e_in6_addr" (not necessary to declare the tvbuff routines, but including
it there means "struct e_in6_addr" is guaranteed to be defined before
those declarations, so we don't get compiler complaints if we define it
*after* those declarations).

svn path=/trunk/; revision=15758
2005-09-11 21:25:37 +00:00
Guy Harris 69ce025a0b Get rid of a trailing comma.
svn path=/trunk/; revision=15654
2005-09-01 09:56:23 +00:00
Ronnie Sahlberg c7cb2cf0d2 remove some g_string_printf[a]() and replace with g_snprintf()
svn path=/trunk/; revision=15632
2005-08-31 08:49:10 +00:00
Ronnie Sahlberg cb14c85728 add missing value_string termination
svn path=/trunk/; revision=15575
2005-08-28 01:42:51 +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 34493e8f9e char -> const char warning fixes
svn path=/trunk/; revision=15126
2005-07-28 07:53:38 +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
Guy Harris b2aee79a35 From Carlos Pignataro:
o BGPv4 SAFI-Specific Attribute support
	  - draft-kapoor-nalawade-idr-bgp-ssa-00.txt
	o Tunnel SAFI support for BGP
	  - draft-nalawade-kapoor-tunnel-safi-02.txt
	o Small length fix

svn path=/trunk/; revision=12977
2005-01-07 11:43:05 +00:00
Guy Harris 6d36dda70b From Carlos Pignataro:
o Fix EXTENDED_COMMUNITIES output that was appending the Carried
  Extended communities; fix BGP_EXT_COM_L2INFO was not appending to the
  bgpext_com_type
o Update various text with the specific afi/safi
o Decode fields in MP Reach NLRI for labeled VPNv4 and labeled IPv4
  (and small offset fix for the latter)
o Decode unknown address family in MP Reach NLRI

svn path=/trunk/; revision=12165
2004-10-01 07:07:03 +00:00
Guy Harris eaadcc4c62 Move various tables into the epan directory.
svn path=/trunk/; revision=12130
2004-09-29 00:52:45 +00:00
Guy Harris bbe7f89742 Move prefs.c and prefs.h into the epan subdirectory.
svn path=/trunk/; revision=12115
2004-09-27 22:55:15 +00:00
Ulf Lamping d530bd4e14 Prevent the word "desegmentation" at the GUI, but use reassembling at that places, as we also use "defragmentation" and "reassembling". Use reassembling as the general term for such actions.
I (hopefully) didn't changed any protocol fields or preference file names, but only the GUI labels appearing in the protocol display and the protocol preferences.

Also added a note to the protocol preferences (where appropriate), that you have to enable "Allow subdissectors to reassemble TCP streams" at the corresponding protocol settings for TCP reassembling to take effect.

If you encounter any mistakes I've made here, please let me know...

svn path=/trunk/; revision=11784
2004-08-21 09:02:52 +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