Commit Graph

24 Commits

Author SHA1 Message Date
Jörg Mayer eab0aeb4bb More char -> const char fixes
Declare some functions static

svn path=/trunk/; revision=15158
2005-07-30 16:34:38 +00:00
Gerald Combs 5800e255ef Fix a potential memory leak.
svn path=/trunk/; revision=14993
2005-07-22 15:51:20 +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
Ulf Lamping fdb5b1af02 just to get things straight: a dissector should *never* do any g_assert() calls!
in a simple approach, I've replaced all g_assert() and g_assert_not_reached() calls by their exception throwing counterparts DISSECTOR_ASSERT() and DISSECTOR_ASSERT_NOT_REACHED()

this will replace application crash by showing a dissector bug, which is the desired behaviour

there were some g_assert calls in the protocol registering functions, which might not be acting as expected now, but to be able to simply search for g_assert in the future I've replaced that calls too

one g_assert remained, the one when someone throws an unknown exception "into" packet_frame.c, but IMHO this one should remain.

svn path=/trunk/; revision=14608
2005-06-10 18:28:22 +00:00
Gerald Combs cd321f5958 Make sure we don't feed a null string to strncmp(). Fixes bug 161.
Make sure we don't free static memory.  Fix a small memory leak.

svn path=/trunk/; revision=14337
2005-05-10 03:08:36 +00:00
Gerald Combs 6380ee9999 Make sure we don't recurse into oblivion. Fixes bug 147.
svn path=/trunk/; revision=14238
2005-04-30 04:30:32 +00:00
Guy Harris 90f8224360 Have GSS-API subdissectors supply a "data is encrypted" flag to their
callers, so that they can tell "no decrypted tvbuff because I couldn't
decrypt it" from "no decrypted tvbuff because it's not encrypted in the
first place".  Set that based on the Kerberos seal algorithm field in
the SPNEGO Kerberos 5 wrap dissector code.

Use that to determine whether the GSS-API encapsulated data in LDAP is
encrypted or not., rather than using a heuristic.

Set the length of the SASL blob tvbuff based on the SASL length and the
length of the tvbuff from which it's consstructed, rather than setting
it to the SASL length.

svn path=/trunk/; revision=13780
2005-03-16 21:59:25 +00:00
Ronnie Sahlberg 349c5a8699 from metze
various bugfixes and enhancements to decryption of secure ldap


svn path=/trunk/; revision=13710
2005-03-11 09:31:11 +00:00
Ronnie Sahlberg 8700645d54 add support to decrypt and dissect sign-and-sealed traffic.
(cifs: dc's talking to eachother   and when longhorn comes out: anyone wanting to talk dce to a dc!)

((this is an incredibly advanced feature well worthy of mentioning in NEWS))


svn path=/trunk/; revision=13690
2005-03-10 10:16:49 +00:00
Ronnie Sahlberg 1564a2d2d3 add two nice defines for how to decrypt a GSSKRB tvb
dce has slightly different padding and checksumming so we have to tell decrypt_arcfour() about it.



svn path=/trunk/; revision=13689
2005-03-10 08:52:59 +00:00
Ronnie Sahlberg 5cfb848064 If ethereal is linked with HEIMDAL
and Kerberos decryption is enabled in preferences
and if we have the keytab file available

then attempt to decrypt Secure LDAP



svn path=/trunk/; revision=13660
2005-03-08 09:46:24 +00:00
Lars Roland ec9ca01616 Move the following files from /trunk to /trunk/epan:
asn1.[ch]
follow.[ch]
ptvcursor.[ch]
reassemble.[ch]
xmlstub.[ch]

fix #include statements accordingly.

svn path=/trunk/; revision=13366
2005-02-09 23:38:00 +00:00
Anders Broman 851ecd2ac4 From Jon Ringle:
1) Added a setup_frame parameter to conversation_t
2) Used the conversation_t next to maintain a list of conversations with the 
same src/dest tuple but different setup_frame number.
3) Changed the signature of find_conversation() and conversation_new() to pass 
in the frame number.
4) Adjusted packet-sdp to select RTP conversation if both m=audio and m=image 
are present, and T.38 conversation if only m=image is present. I expect that 
RTP/T.38 dissecting to be better, but I don't have a way to generate T.38 
packets.

svn path=/trunk/; revision=13243
2005-02-02 20:07:03 +00:00
Guy Harris ffaf53a9d6 *Correctly* append to the filter string.
svn path=/trunk/; revision=12926
2005-01-02 10:01:05 +00:00
Guy Harris 31cbbecd00 Don't assign the const pointers passed to hash routines to non-const
pointers.

Now that "col_set_str()" takes a "const char *" as the second argument,
we don't have to cast away the constness of strings passed to it.

svn path=/trunk/; revision=12892
2004-12-31 02:11:13 +00:00
Ronnie Sahlberg 97755f83fc from metze
make ethereal handle gss-api encrypted ldap blobs


svn path=/trunk/; revision=12802
2004-12-21 17:05:14 +00:00
Guy Harris 4cc0fdc5dd Put in a stub "dissector" for LDAP_FILTER EXTENSIBLE, so we can at least
dissect packets containing that filter type.

Note that if a dissector for a particular operation fails, we should
stop dissecting rather than trying to dissect the controls.

svn path=/trunk/; revision=12786
2004-12-20 09:53:27 +00:00
Ronnie Sahlberg 62f26aaeb4 abort trying to dissect ldap controls if the header doesnt look right.
it will not solve the problem in the c06-  testmenageri capture that
contains unknown types of ldap commands   but it will at least 
stop the ldap controls dissector from dumping core.

someone interested in ldap might want to look at those "unknown ldap packets"
in the trace.



svn path=/trunk/; revision=12773
2004-12-19 04:10:05 +00:00
Guy Harris 3609ea96c3 From Stefan Metzmacher: basic decoding for LDAP Controls.
svn path=/trunk/; revision=12765
2004-12-17 19:14:24 +00:00
Guy Harris 6472876ab3 Move the tap infrastructure to the epan directory.
svn path=/trunk/; revision=12128
2004-09-29 00:06:36 +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
Ronnie Sahlberg f4f2b80b21 change result code names to be the same as in the LDAP standard
so it is easier to grep between them


svn path=/trunk/; revision=11880
2004-09-02 08:12:41 +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