Commit Graph

2810 Commits

Author SHA1 Message Date
Guy Harris 43ccfd8054 Add an additional "protocol index" argument to "{old_}dissector_add()",
"{old_}heur_dissector_add()", "{old_}conv_dissector_add()", and
"register_dissector()", so that an entry in those tables has associated
with it the protocol index of the protocol the dissector handles (or -1,
if there is no protocol index for it).

This is for future use in a number of places.

(Arguably, "proto_register_protocol()" should take a dissector pointer
as an argument, but

	1) it'd have to handle both regular and heuristic dissectors;

	2) making it take either a "dissector_t" or a union of that and
	   a "heur_dissector_t" introduces some painful header-file
	   interdependencies

so I'm punting on that for now.  As with other Ethereal internal APIs,
these APIs are subject to change in the future, at least until Ethereal
1.0 comes out....)

svn path=/trunk/; revision=2849
2001-01-09 06:32:10 +00:00
Guy Harris 925ce16014 Add tables of "conversation" dissectors, which are associated with
particular protocols, and which keep track of all dissectors that could
be associated with conversations using those particular protocols - for
example, the RTP and RTCP dissectors could be assigned to UDP
conversations.

This is for future use with UI features allowing the dissector for a
given conversation to be set from the UI, to allow

	1) conversations between two ports, both of which have
	   dissectors associated with them, that have been given to the
	   wrong dissector to be given to the right dissector;

	2) conversations between two ports, neither of which have
	   dissectors associated with them, to be given to a dissector
	   (RTP and RTCP, for example, typically run on random ports,
	   and if you don't have, in a capture, traffic that would say
	   "OK, traffic between these two hosts and ports will be RTP
	   traffic", you may have to tell Ethereal explicitly what
	   protocol the conversation is).

svn path=/trunk/; revision=2848
2001-01-09 05:53:21 +00:00
Guy Harris 2cedf1666a If the target hardware address in an ARP packet is a broadcast address,
don't give that address the host name corresponding to the target IP
address.

svn path=/trunk/; revision=2847
2001-01-09 01:02:34 +00:00
Guy Harris 035e9caa22 Don't do the "select()" in the capture codepath on Win32; it's not
necessary, and won't necessarily work.

svn path=/trunk/; revision=2846
2001-01-09 00:53:26 +00:00
Guy Harris 3f75680191 Code to handle Frame Relay Sniffer captures, from Jeff Foster.
Code to register the Frame Relay dissector to handle Frame Relay
captures, from Paul Ionescu.

svn path=/trunk/; revision=2845
2001-01-08 22:18:22 +00:00
Guy Harris 8d514ce83c Clean up white space.
svn path=/trunk/; revision=2844
2001-01-07 22:35:21 +00:00
Guy Harris c6381f45b0 Fix the Frame Relay dissector to call subdissectors regardless of
whether a full protocol tree dissection is being done or not.

svn path=/trunk/; revision=2843
2001-01-07 22:18:32 +00:00
Guy Harris 6cc7a2e804 Frame Relay and Frame-Relay-over-GRE support, from Paul Ionescu.
Fix the GRE dissector to call subdissectors regardless of whether a full
protocol tree dissection is being done or not.

svn path=/trunk/; revision=2842
2001-01-07 22:08:31 +00:00
Guy Harris dfe798b7a9 Make the three subfields of the "flags" field real bitfields, and let
the protocol tree code do the work of constructing the display for them,
rather than doing it by hand.

svn path=/trunk/; revision=2841
2001-01-07 01:47:37 +00:00
Guy Harris c6a320d253 Update from Paul Ionescu to set the reported length of the tvbuff for
the DEC LanBridge STP packet, so that stuff after the end of the packet
gets properly reported as Ethernet trailer data.

svn path=/trunk/; revision=2840
2001-01-07 00:23:03 +00:00
Guy Harris 40a67dc59f Tvbuffify the NTP and time protocol dissectors.
svn path=/trunk/; revision=2839
2001-01-06 09:42:10 +00:00
Guy Harris f0f21e24f7 Tvbuffify the Vines dissector, and add protocols for the Vines
Fragmentation and SPP protocols.

Call the Vines dissector from the UDP dissector via a dissector table.

svn path=/trunk/; revision=2838
2001-01-06 08:44:03 +00:00
Guy Harris 518fa7cd3e Tvbuffify the "rwho" dissector.
svn path=/trunk/; revision=2837
2001-01-06 06:18:54 +00:00
Guy Harris 8bc9be60f4 Tvbuffify the VRRP dissector, and add code to check the checksum.
svn path=/trunk/; revision=2836
2001-01-06 05:43:13 +00:00
Guy Harris 36ae21593e Set "pinfo->current_proto".
svn path=/trunk/; revision=2835
2001-01-06 05:11:32 +00:00
Guy Harris 16fd5d93c3 Tvbuffify the MPLS dissector.
svn path=/trunk/; revision=2834
2001-01-06 05:09:35 +00:00
Guy Harris 89cade4c09 Tvbuffify the LPD dissector.
Use "tvb_format_text()" to display the printer and options in a request,
so that it doesn't have problems with non-printable characters - or if
we incorrectly decide that a packet is a request merely because it
happens to have what appears to be a valid request code as the first
byte.

svn path=/trunk/; revision=2833
2001-01-06 00:02:41 +00:00
Guy Harris d18149374f Map the old MGCP preference names to the new ones (including a special
hack to handle the two copies of "mgcp.{tcp,udp}.port" as best we can).

svn path=/trunk/; revision=2832
2001-01-05 22:45:26 +00:00
Guy Harris 0cc8a3b3ea Use "%u", not "%d", to print unsigned quantities.
Show the flags in hex, not decimal.

Nobody calls the LanBridge BPDU dissector directly through a handle, so
there's no need to register it.

svn path=/trunk/; revision=2831
2001-01-05 20:46:44 +00:00
Guy Harris b97efe8d42 IP Prefix field support in CDP, from Paul Ionescu.
svn path=/trunk/; revision=2830
2001-01-05 19:14:05 +00:00
Guy Harris bde0b86caf X.25-over-LLC support, from Paul Ionescu.
svn path=/trunk/; revision=2829
2001-01-05 19:07:38 +00:00
Guy Harris 499a830af6 DEC LANBridge Spanning Tree Protocol support, from Paul Ionescu.
Put "packet-lapbether.c" into "Makefile.nmake".

svn path=/trunk/; revision=2828
2001-01-05 19:00:37 +00:00
Guy Harris 9e392235ca Clear the Info column before fetching anything from the packet, so that
if we throw an exception, the stuff from the Token-Ring protocol isn't
still there.

svn path=/trunk/; revision=2827
2001-01-05 08:59:16 +00:00
Guy Harris b31b5b697b Clear the Info column before fetching anything from the packet, so that
if we throw an exception, the stuff from the protocol atop which LLC
runs isn't still there.

svn path=/trunk/; revision=2826
2001-01-05 08:43:30 +00:00
Guy Harris 40a0f2b3f0 Set "pinfo->current_proto" once we've decided it's an H1 packet.
Fix the indentation.

svn path=/trunk/; revision=2825
2001-01-05 08:34:35 +00:00
Gilbert Ramirez fd7367e9b2 Doesn't need #include "dfilter.h"
svn path=/trunk/; revision=2824
2001-01-04 04:56:20 +00:00
Gilbert Ramirez bb6df3b8c2 Doesn't need #include "dfilter.h"
svn path=/trunk/; revision=2823
2001-01-04 04:44:02 +00:00
Guy Harris 38d2f3afc3 Make the PPP-over-Ethernet discovery and session protocols registered
protocols.

svn path=/trunk/; revision=2822
2001-01-04 04:15:30 +00:00
Guy Harris b443a9295a Don't define "promisc_mode" if we weren't built with libpcap support.
svn path=/trunk/; revision=2821
2001-01-04 00:16:43 +00:00
Olivier Abad 19a997a7ad - replace x25 with x.25 in all protocol fields
- displays the GFI (the a/q/d bits and modulo are displayed in a subtree of
  the GFI)
- correctly dissect the first bit of the GFI : Address bit in call set-up
  and clearing packets, Qualifier bit in data packets.

svn path=/trunk/; revision=2820
2001-01-03 23:30:50 +00:00
Guy Harris a723a48355 Tvbuffify the BOOTP/DHCP dissector.
svn path=/trunk/; revision=2819
2001-01-03 22:49:06 +00:00
Guy Harris 5c41d2e842 "hf_sna_rh_csi" is now an FT_UINT8 field, so add it with
"proto_tree_add_uint()", not "proto_tree_add_boolean()".

svn path=/trunk/; revision=2818
2001-01-03 21:52:40 +00:00
Gilbert Ramirez 5b7f184296 Ensure that all value_string arrays end in {0, NULL}. Dissectors got away
with not terminating their arrays because they knew the limits of the
value used to look up strings in the value_string array, but the
dfilter_expr_dlg does not know these limits and must rely on the terminating
{0, NULL} record.

Also, in SNA fixed a bug in which a field should have been defined as FT_UINT8
but was defined as FT_BOOLEAN.

In WTP, fixed a value string which had duplicate keys.

svn path=/trunk/; revision=2817
2001-01-03 16:41:08 +00:00
Guy Harris b151ddecbb Have the TR MAC and LLC dissectors register themselves, make them
static, and have other dissectors call them through handles.

svn path=/trunk/; revision=2816
2001-01-03 10:34:42 +00:00
Guy Harris b92ebd4a23 Register the WSP dissector, make it static, and have the WTP dissector
call it through a handle.

svn path=/trunk/; revision=2815
2001-01-03 08:42:48 +00:00
Guy Harris bf94988818 Make the Zebra dissector, and a routine it uses, static, as they're not
called directly from outside "packet-zebra.c".

svn path=/trunk/; revision=2814
2001-01-03 08:26:40 +00:00
Guy Harris 6d7aa5a618 Update the README.developer file to reflect the recent changes to
"proto_register_protocol()" and the addition of
"prefs_register_module()".

svn path=/trunk/; revision=2813
2001-01-03 08:00:01 +00:00
Guy Harris 3613c121fe Add a new "prefs_register_protocol()" routine, which is like
"prefs_register_module()" except that it takes a protocol index as
returned by "proto_register_protocol()" as its first argument, rather
than taking two character strings as arguments as its first two
arguments, and uses the protocol's abbreviation as the name to use for
preferences in the preferences file and the "-o" flag and uses the
protocol's short name as the name to use in the tabs in the
"Edit->Preferences" window.

svn path=/trunk/; revision=2812
2001-01-03 07:53:48 +00:00
Guy Harris fee98dd944 Have "proto_register_protocol()" build a list of data structures for
protocols, in addition to adding structures to the list of filterable
fields.  Give it an extra argument that specifies a "short name" for the
protocol, for use in such places as

	pinfo->current_proto;

	the dialog box for constructing filters;

	the preferences tab for the protocol;

and so on (although we're not yet using it in all those places).

Make the preference name that appears in the preferences file and the
command line for the DIAMETER protocol "diameter", not "Diameter"; the
convention is that the name in question be all-lower-case.

Make some routines and variables that aren't exported static.

Update a comment in the ICP dissector to make it clear that the
dissector won't see fragments other than the first fragment of a
fragmented datagram.

svn path=/trunk/; revision=2811
2001-01-03 07:37:29 +00:00
Guy Harris 0e7c1de08a Have "proto_register_protocol()" build a list of data structures for
protocols, in addition to adding structures to the list of filterable
fields.  Give it an extra argument that specifies a "short name" for the
protocol, for use in such places as

	pinfo->current_proto;

	the dialog box for constructing filters;

	the preferences tab for the protocol;

and so on (although we're not yet using it in all those places).

Make the preference name that appears in the preferences file and the
command line for the DIAMETER protocol "diameter", not "Diameter"; the
convention is that the name in question be all-lower-case.

Make some routines and variables that aren't exported static.

Update a comment in the ICP dissector to make it clear that the
dissector won't see fragments other than the first fragment of a
fragmented datagram.

svn path=/trunk/; revision=2810
2001-01-03 06:56:03 +00:00
Richard Sharpe 6c75aa83f9 Fix a damn stupid mistake that stopped us seeing all the bits in the flags on a NetServerEnum2 request.
svn path=/trunk/; revision=2809
2001-01-03 04:37:07 +00:00
Guy Harris c3211e8eeb Support for HTTP methods added by GENA (the uPnP protocol), and for the
HTTP-based SSDP protocol, from David Hampton.

svn path=/trunk/; revision=2808
2001-01-03 03:40:29 +00:00
Guy Harris e87346151d Base the decision of whether selecting an entry in the value list sets
the value entry on the type of the field, not on whether the value entry
is visible; the value entry is hidden, in "field_select_row_cb()", after
"build_boolean_values()" is called, and building the list in
"build_boolean_values()" will cause an entry in that list to be
selected, and "value_list_sel_cb()" will be called as a result, so it
can't correctly base its decision on whether to set the value entry on
whether the entry is visible, as it's not yet been made invisible.

Fix a comment.

svn path=/trunk/; revision=2807
2001-01-02 19:54:50 +00:00
Guy Harris 51aceed165 Don't show "Text" as one of the available fields.
svn path=/trunk/; revision=2806
2001-01-02 19:38:20 +00:00
Guy Harris 88d157ef96 Add a dialog box for constructing expressions that test a field in the
display tree, based on Jeff Foster's dialog box for selecting fields.

Make the dialog box for browsing filters into a dialog box for
constructing filters; make the "Apply" button and the "OK" button apply
the filter in the text entry box in the dialog, not the currently
selected filter (selecting a filter puts it in that text entry box, but
the user may edit it afterwards, or may use the aforementioned dialog
box to construct a filter not in the list).

Get rid of extra declarations of "m_r_font" and "m_b_font" in
"proto_draw.c"; they're declared in "gtk/gtkglobals.h", which it includes.

svn path=/trunk/; revision=2805
2001-01-02 01:32:21 +00:00
Richard Sharpe d2f2cc6bf6 A small fix to ensure that all servers/workgroups show up ... Last one
was not being picked up ...

Will have to add proper state keeping code soon ...

svn path=/trunk/; revision=2804
2001-01-01 01:44:46 +00:00
Jun-ichiro itojun Hagino f4d523b96f understand TCP MD5 signature. Greg Hankins <gregh@twoguys.org>
svn path=/trunk/; revision=2803
2000-12-30 05:23:56 +00:00
Guy Harris f18cff183c Tvbuffify the MAPI dissector.
svn path=/trunk/; revision=2802
2000-12-29 05:15:37 +00:00
Guy Harris 02380babc1 Fix up some calls in which I didn't replace "NullTVB" with "tvb".
svn path=/trunk/; revision=2801
2000-12-29 04:41:30 +00:00
Guy Harris 5bcb17c724 If we get an exception when dissecting a packet, append "[Short Frame]"
or "[Malformed Frame]" to the Info column.

Make some dissectors set the Protocol column and clear the Info column
before fetching anything from the tvbuff they were handed, so that if
the frame is short or malformed, it'll be marked as being the right
top-level protocol, and the Info column won't have cruft left over from
the previous protocol.

svn path=/trunk/; revision=2800
2000-12-29 04:16:57 +00:00