Commit Graph

148 Commits

Author SHA1 Message Date
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
Ulf Lamping 20c5d50269 bugfix: in an attepmt to fix a crash while doing reassemling of connection oriented packets, some weeks ago I've added some tvb_ensure_bytes_exist() calls to test the case that the alloc_hint value is bogus (found in private fuzz testing).
Unfortunately, this is *very* safe now as it will mark a lot of DCE/RPC packets as malformed, thus the reassembling code won't work with most packets :-(

I've replaced this with the correct check and used THROW(ReportedBoundsError) instead which is hopefully the right error in this case.

BTW: could someone please add a description of the ReportedBoundsError vs. BoundsError to the code as I still don't get it.

In addition: Use a toplevel tree item to display the DCE/RPC defragmentation just as it's done in the TCP desegmentation code.

svn path=/trunk/; revision=15188
2005-08-02 07:26:57 +00:00
Jörg Mayer 7949c7f31c char -> const char warning fixes
svn path=/trunk/; revision=15079
2005-07-26 08:01:16 +00:00
Jörg Mayer 88895e2f02 Warning fixes
svn path=/trunk/; revision=15067
2005-07-25 21:08:14 +00:00
Guy Harris 554f620001 Constify to remove a bunch of warnings. Add some casts to squelch
(presumably-)harmless-but-otherwise-unremovable const-to-nonconst
warnings.

In the TACACS dissector, clean up the variables used in option parsing
to avoid some const-to-nonconst warnings.

Clean up some white space.

svn path=/trunk/; revision=15043
2005-07-24 19:01:28 +00:00
Ronnie Sahlberg 3905fca8bc make idl2eth generate FT_GUID hf fields for uuid_t and GUID types.
make dissect_dcerpc_uuid_t() accept eitehr FT_STRING (old style) and FT_GUID (new style) hf fields. once all dissectors are modified to use FT_GUID we can remove the FT_STRING support here.

regenerate the DRSUAPI interface with the new FT_GUID support.




svn path=/trunk/; revision=14912
2005-07-13 08:00:15 +00:00
Ulf Lamping dd1287fc71 add some more information to the DCE/RPC packet details summary line
svn path=/trunk/; revision=14827
2005-06-30 22:51:17 +00:00
Ulf Lamping 3d831f4bfb add a new DCE/RPC related column, which contains the call_id for connection oriented packets or the sequence number for connectionless (datagram) packets.
This is extremely useful, to keep track of the corresponding request/response packets of a DCE/RPC call (which can be quite a lot packets if fragmentation is used).

svn path=/trunk/; revision=14826
2005-06-30 22:46:19 +00:00
Ulf Lamping 2cecaba970 add references to the corresponding request of datagram ping and ack packets
svn path=/trunk/; revision=14815
2005-06-29 08:03:06 +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
Ulf Lamping 56a9fe6d2a add a generated toplevel line between the connectionless DCE/RPC protocol and the defragmented DCE/RPC content, to better understand what's going on if defragmentation is done.
svn path=/trunk/; revision=14531
2005-06-02 20:55:58 +00:00
Ulf Lamping e2c3b60280 add a generated toplevel line between the TCP protocol and the desegmented content, to better understand what's going on while desegmenting.
We'll have to add similar mechanisms for other protocols as well...

svn path=/trunk/; revision=14527
2005-06-02 18:52:55 +00:00
Ulf Lamping 3c4401b95d bugfix (fuzz_tested): add tvb_ensure_bytes_exist() before adding a fragment at two places, otherwise we get an access violation
svn path=/trunk/; revision=14525
2005-06-02 18:39:45 +00:00
Ulf Lamping cb51c2662a fix highlighting length, if more than one RPC call is in a TCP PDU
set "n*DCERPC" in the proto column if more than one RPC call in a TCP PDU, overwriting the interface name, as there's probably more than one interface involved

add some more RPC info to the toplevel RPC proto_item

add a comment, if some bytes are not dissected but might be in the next TCP PDU

svn path=/trunk/; revision=14490
2005-05-30 18:37:19 +00:00
Ronnie Sahlberg cb2fc4e58b from martin m
prettify dcerpc


svn path=/trunk/; revision=14369
2005-05-14 22:05:56 +00:00
Ronnie Sahlberg 3a6778b8e7 fix for bug 91
make the heuristics for detecting connection-less dce/rpc a bit sharper to reduce the number of false positives



svn path=/trunk/; revision=14190
2005-04-26 09:03:30 +00:00
Gerald Combs 50d0f95328 Add more tvb_ensure_bytes_exist() calls.
svn path=/trunk/; revision=14171
2005-04-23 13:24:57 +00:00
Gerald Combs 028075b673 Add a couple of tvb_ensure_bytes_exist() calls to avoid dissector bug
exceptions.

svn path=/trunk/; revision=14170
2005-04-23 04:06:45 +00:00
Ronnie Sahlberg 1fe0f9022e a lot of people dont specify top level pointers in teh idl and just
cerlare it as a parameter that is a struct/union and not a ref pointer to one.

this is ok since toplevel ref pointers are invisible in the wire encoding anyway.

unfortunatelky  ethereal dce runtime needed to see that pointer to keep track of whisch one was a toplevel and which one wasnt.


implement a new api to call pointers which explicitely specifies whether the pointer is toplevel or embedded.
eventually all dce dissectors will use this new interface and the generic dissect_ndr_pointer() can be retired.



svn path=/trunk/; revision=13755
2005-03-14 20:51:13 +00:00
Ronnie Sahlberg 8123288f6d some auth padding update from metze
svn path=/trunk/; revision=13736
2005-03-12 21:01:38 +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 0180d280fe change the signature for the functions to decrypt data for the
dcerpc_auth_subdissector_fns structure.

the SignAndSeal decryption (which works really well) needs this.



svn path=/trunk/; revision=13688
2005-03-10 08:50:18 +00:00
Ronnie Sahlberg 4a338216da pinfo->private_data was a quite subptimal idea
change the decodeas for dcerpc so that it actually works again for dcerpc over smb



svn path=/trunk/; revision=13515
2005-02-25 10:30:21 +00:00
Ronnie Sahlberg 1d8e70b969 add extra sanity check.
dont match a request with a reply that came earlier in the trace or SRT will
look funny :-)



svn path=/trunk/; revision=13409
2005-02-16 00:19:52 +00:00
Ronnie Sahlberg 1c644d6ff7 add support for varying arrays
svn path=/trunk/; revision=13399
2005-02-14 19:43:34 +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
Ronnie Sahlberg e95485ff81 add support for varying strings in addition to conformant and varying strings that we already support
svn path=/trunk/; revision=13278
2005-02-04 04:02:36 +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 75e4d0a2ce Use the 64-bit integer fetch routines to support 64-bit NDR integers.
svn path=/trunk/; revision=13198
2005-01-29 20:39:14 +00:00
Ulf Lamping 13e90b72b3 use col_set_fence for COL_INFO, if multiple DCE/RPC requests/responses are in one (TCP)PDU. I've used " # " as the delimiter string, BTW: do we have an "official" one yet?
svn path=/trunk/; revision=13149
2005-01-20 19:26:24 +00:00
Ulf Lamping 39a6232a8d try to defragment DCE/RPC fragments (simply one after the other), if alloc_hint is zero
svn path=/trunk/; revision=13126
2005-01-19 23:41:07 +00:00
Ulf Lamping 1c9781b4ec throw the new FieldError exception, if a dissector tries to add a field with invalid parameters
add a message parameter to the show_exception function

svn path=/trunk/; revision=13074
2005-01-16 16:06:15 +00:00
Ulf Lamping aa139758f9 add new function dissect_dcerpc_uuid_t and let dissect_ndr_uuid_t call it
svn path=/trunk/; revision=13006
2005-01-12 21:20:50 +00:00
Ulf Lamping dc0fc1896e use GLib's pointer to int conversion macros to prevent compiler warnings
svn path=/trunk/; revision=12830
2004-12-24 23:17:38 +00:00
Ronnie Sahlberg 0b6ae100fe add another error code to dcerpc
svn path=/trunk/; revision=12822
2004-12-23 19:53:24 +00:00
Ulf Lamping ea0baf468e (on behalf of the PROFIBUS Nutzerorganisation e.V. Deutschland):
another part of the PROFINET dissectors (PN-CBA, including a lot of generic DCOM dissection) still some work to be done ...

svn path=/trunk/; revision=12776
2004-12-19 13:46:09 +00:00
Guy Harris c2b55b8d97 From Yaniv Kaul: DCERPC-over-HTTP(!) support. (But why didn't whoever
came up with that not go whole hog and implement RFC 3093?)

svn path=/trunk/; revision=12756
2004-12-15 09:10:07 +00:00
Guy Harris 7b81bb17f3 According to the part of the DCE RPC spec at
http://www.opengroup.org/onlinepubs/009629399/chap12.htm#tagcjh_17_06_01

the number of transfer syntaxes is a u_int8, with an alignment pad byte
following it, not a u_int16.

svn path=/trunk/; revision=12631
2004-12-01 06:44:54 +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
Guy Harris f23f4ecf04 Use _WIN32 rather than WIN32 to determine if we're compiling on Win32;
according to Gisle Vanem, WIN32 isn't a built-in in MSVC, but _WIN32 is.

svn path=/trunk/; revision=11972
2004-09-11 23:03:36 +00:00
Guy Harris d8eefd6115 Squelch a compiler warning. (We really might want a
"tvb_ensure_reported_length_remaining()" call here.)

svn path=/trunk/; revision=11946
2004-09-08 21:14:40 +00:00
Guy Harris 005aa9f66d From Devin Heitmuller: decode verifiers after stub decryption - for
NTLMSSP, the state of the RC4 stream is dependent on the stub being
decrypted before the verifier.

Correctly set the length and reported length of the tvb for the stub
(the reported length of that tvb should be set based on the *reported*
length of the parent tvbuff, not the captured length).

svn path=/trunk/; revision=11938
2004-09-08 09:35:47 +00:00
Ulf Lamping 26afcbd9cc First working implementation of "Decode As" for DCE-RPC interface bindings. Ethereal needs to capture the DCE-RPC bind sequence, to get a relationsship between the interface UUID and the current conversation. If this binding wasn't captured, one can use "Decode As" and choose the interface from a list corresponding to a specific conversation. Currently "only" implemented for connectionoriented (TCP) DCE-RPC, but connectionless is a work in progress.
svn path=/trunk/; revision=11924
2004-09-07 16:19:56 +00:00
Ulf Lamping 7125550f19 rename add_conv_to_dcerpc_bind_table to dcerpc_add_conv_to_bind_table and don't use packet_info as a parameter
svn path=/trunk/; revision=11916
2004-09-06 19:51:33 +00:00
Ulf Lamping 4777e5ef7b From Eric Wedel: backend things for "Decode As" of DCE-RPC interfaces
svn path=/trunk/; revision=11894
2004-09-04 11:35:26 +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