Commit Graph

2836 Commits

Author SHA1 Message Date
Gilbert Ramirez 916044629f Only define next_pd and next_offet if HAVE_PLUGINS is #defined, since
that's the only time they're used.

svn path=/trunk/; revision=2875
2001-01-11 16:27:23 +00:00
Guy Harris cca256ece9 "dissect_llc()" is called for RFC 2684 LLC Encapsulation over ATM, so
LLC *does* have to support bridged frames over ATM; the correct bridge
padding is 2 (well, except for bridged 802.6 frames, but, if we ever
support that, we just wouldn't add "bridge_pad" to "offset+5" when
constructing the next tvbuff).

svn path=/trunk/; revision=2874
2001-01-11 07:24:17 +00:00
Gilbert Ramirez f9838e0b03 Add a python script which has the same functionality as the shell
script 'make-reg-dotc'. It is used only in the Win32 build because the
make-reg-dotc shell script is *so* sloooooooooow on Win32, due to the
multiple processes (grep, grep, sed) launched multiple times for each
source file. By putting all the text-mangling logic into a single Python
script, only one process is launched, and the source files are read
only once. It's *a lot* faster... seconds instead of minutes.

svn path=/trunk/; revision=2873
2001-01-11 07:21:35 +00:00
Guy Harris b7a0290c66 Provide a way by which protocols that run atop HTTP, such as IPP, can
register their port as being for XXX-over-HTTP; the HTTP dissector
registers that port in the "tcp.port" table as an HTTP port, and
registers it in its *own* table with the dissector and protocol provided
to it.

Parse the HTTP MIME headers regardless of whether we're building a
protocol tree or not; we have to do so in order to find the offset of
the payload, to hand to an XXX-over-HTTP dissector.

svn path=/trunk/; revision=2872
2001-01-11 06:30:54 +00:00
Gilbert Ramirez 8470a8e9a1 Get rid of the magic "+4" and properly calculate the lineheight so
that automatic scrolling of the hex pane continues to work, but without
any special magic constant. This works for any size font (as long
as the font isn't so big as to cause a line wrap), and has been
tested on Linux and NT4. The lineheight calculation was found in the
source code to the GtkText widget (gtk/gtktext.c in the GTK+ distribution).

svn path=/trunk/; revision=2871
2001-01-11 05:51:10 +00:00
Guy Harris 918fb90728 "dissect_http()" doesn't need to be global any more; make it static.
svn path=/trunk/; revision=2870
2001-01-11 05:41:47 +00:00
Guy Harris fc72ce7336 There's no need to register port 631 twice for IPP; do so only once.
Leave notes for a future rethinking of the way we handle protocols that
run atop HTTP.

svn path=/trunk/; revision=2869
2001-01-11 05:36:09 +00:00
Gilbert Ramirez 46d08f79f5 Show the menu_item widget during the creation of an option menu for
enumerated option lists. This to overcome a small bug in which the
menu item text doesn't have enough vertical padding.

svn path=/trunk/; revision=2868
2001-01-11 04:40:26 +00:00
Guy Harris d3c571bf5a The difference between two pointers doesn't necessarily fit in an "int"
or "unsigned int"; cast it to "unsigned long" and print it with "%lu",
so it works on ILP32 and LP64 platforms.

svn path=/trunk/; revision=2867
2001-01-10 23:42:12 +00:00
Guy Harris 8df3d51db4 Include "snprintf.h", if necessary, to declare "snprintf()".
svn path=/trunk/; revision=2866
2001-01-10 23:36:35 +00:00
Guy Harris 1305c06917 When testing the low-order bit of a pointer, cast it to "unsigned long",
not to "int", to squelch complaints from GCC on LP64 platforms such as
most UNIXes on Alpha.

svn path=/trunk/; revision=2865
2001-01-10 23:34:06 +00:00
Guy Harris c1bbd1b277 Fix call to "pntohs()" - it was missing the "pd+", so it was just
passing the offset in the packet, not a pointer into the packet, to
"pntohs()".

svn path=/trunk/; revision=2864
2001-01-10 23:30:41 +00:00
Guy Harris b6248efe1f The frame control field is, I infer from "dissect_ieee80211()",
little-endian, so "capture_ieee80211()" should use "pletohs()", not
"pntohs()", to fetch it.

Also, "pletohs()" takes a *pointer* to the object to be fetched as an
argument.

svn path=/trunk/; revision=2863
2001-01-10 23:28:46 +00:00
Guy Harris 4d3f77c65c Change from Jeff Foster to keep the dissector from crashing if the
conversation it found has no data associated with it; this is a
workaround for a problem that shows up if a conversation is between two
ports both of which have protocols associated with them - in that case,
frames going in one direction might be dissected by one of those
dissectors, and frames going in the other direction might be dissected
by the other dissector, causing untold confusion.

We really need to associate dissectors with conversations as soon as the
conversation is created, so that all packets will be handled by the same
dissector.  (The SOCKS dissector now does that.)

svn path=/trunk/; revision=2862
2001-01-10 10:59:11 +00:00
Guy Harris bd1d96cd6f In "{old_}dissector_try_port()", check whether the protocol for the
dissector is enabled and, if not, return FALSE, just as if there hadn't
been any entry for that port number in the table.  If it is enabled, set
"pinfo->current_proto" from its short name before calling the dissector.

In "dissector_try_heuristic()", check whether the protocols for
dissectors are enabled and, if not, skip those dissectors, just as if
they hadn't been in the table.  (We don't set "pinfo->current_proto"
before calling a dissector, as we don't know whether the dissector in
question will be the one to dissect the packet.  Arguably, we should
have, for heuristic dissectors, separate "recognize" and "dissect"
routines, where the former never throws an exception and returns TRUE or
FALSE, and the latter is called only if the "recognize" routine claimed
the frame, and is just a "dissector_t" that doesn't return a value.)

In "{old_}call_dissector()", check whether the protocol for the
dissector is enabled and, if not, call "{old_}dissect_data()".  if it is
enabled, set "pinfo->current_proto" from its short name before calling
the dissector.

svn path=/trunk/; revision=2861
2001-01-10 10:44:48 +00:00
Guy Harris 104385a5c0 Put in some XXX comments.
svn path=/trunk/; revision=2860
2001-01-10 10:36:02 +00:00
Guy Harris b5477dc71c Fix up Gerald's e-mail address to be his "ethereal.com" address.
svn path=/trunk/; revision=2859
2001-01-10 10:11:27 +00:00
Guy Harris ef72fa4de8 Fix up the "ethereal-dev" address to refer to "ethereal.com" rather than
"zing.org".  (We leave addresses in header lines in included mail
messages alone.)

svn path=/trunk/; revision=2858
2001-01-10 09:54:44 +00:00
Guy Harris 627b763e0c Clarify which filter expressions on the command line are capture filters
and which are display filters.

svn path=/trunk/; revision=2857
2001-01-10 09:39:24 +00:00
Guy Harris af77e61199 Update a comment.
svn path=/trunk/; revision=2856
2001-01-10 09:34:08 +00:00
Guy Harris 47b04baac4 M3UA (MTP3 User Adaptation layer) support, from Michael Tuexen.
svn path=/trunk/; revision=2855
2001-01-10 09:25:13 +00:00
Guy Harris 039bd984c0 Make the stuff to handle SNAP frames (OUI, PID, payload) a routine of
its own; it's used not only by LLC, but by Frame Relay with RFC 2427 and
ATM with RFC 2684.

Support for RFC 2427-encapsulation Frame Relay packets, from Paul
Ionescu.

Get rid of the CISCO_IP PPP protocol type - Cisco HDLC uses, in most
cases, Ethernet packet types, so use ETHERTYPE_IP instead (they're both
0x0800).

svn path=/trunk/; revision=2854
2001-01-10 09:07:35 +00:00
Gilbert Ramirez 2a8ac23dd2 Change e-mail list addresses from zing.org to ethereal.com.
svn path=/trunk/; revision=2853
2001-01-10 06:23:58 +00:00
Gilbert Ramirez d24d557800 Tvbuffify the SNA dissector.
svn path=/trunk/; revision=2852
2001-01-10 04:17:13 +00:00
Guy Harris 0998433430 Register the IPX dissector, make it static, and call it through a
handle.

Call the IP dissector through a handle in the Frame Relay dissector.

svn path=/trunk/; revision=2851
2001-01-09 09:59:28 +00:00
Guy Harris 0ae122c3a9 Add a new "ip_to_str_buf()" routine that takes a pointer to an IP
address and a pointer to a character buffer as arguments, and puts a
printable form of the IP address into the buffer.  Make "ip_to_str()"
use it.

Make "host_name_lookup()" use "ip_to_str_buf()", not "ip_to_str()", so
that it doesn't trash any strings that a dissector has gotten with
"ip_to_str()" (for example, the ARP dissector gets strings for the
source and target protocol addresses, and then may attempt to register
names for the source and target hardware addresses with
"add_ether_byip()"; if "host_name_lookup()" fails to find a host name
for the IP address, it shouldn't use "ip_to_str()" to generate an IP
address string to associate with the IP address, as if that's done twice
it'll run out of "ip_to_str()" buffers - there're only 3 of them - and
trash one of the IP address strings the ARP dissector got).

svn path=/trunk/; revision=2850
2001-01-09 09:57:06 +00:00
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