Commit graph

3011 commits

Author SHA1 Message Date
Guy Harris
3787d34ade Don't do anything with 64-bit integral types if G_HAVE_GINT64 isn't
defined.

Use "gint64" and "guint64", not "long long int", for 64-bit integral
types, so that this code works with compilers (such as Microsoft Visual
C++) that have 64-bit integral types but that don't call them "long
long".

Use "pntohll()" to extract 64-bit integral types from a field.

Put a "break;" into a "default:" clause - MSVC++ doesn't like

	switch (XXX) {

		...

	default:
	}

svn path=/trunk/; revision=3051
2001-02-20 01:20:24 +00:00
Guy Harris
e917aa9088 As "dissect_diameter()" is now static to "packet-diameter.c", there's no
need to declare it in "packet-diameter.h" - and no need for
"packet-diameter.h".

svn path=/trunk/; revision=3050
2001-02-19 23:16:36 +00:00
Guy Harris
6c655bb1c5 New tvbuffified DIAMETER dissector, from David Frascone.
It doesn't do DIAMETER-over-UDP, so the RADIUS dissector no longer
checks for DIAMETER packets and calls the DIAMETER dissector if it finds
one.

svn path=/trunk/; revision=3049
2001-02-19 23:14:02 +00:00
Guy Harris
1574eec2f4 Updates from Alexandre P. Ferreira.
svn path=/trunk/; revision=3048
2001-02-19 21:02:33 +00:00
Guy Harris
fd6cd6f9bc In the MSVC++ 6.0 C library, "line-buffered" doesn't mean what one might
expect - it means "same as fully-buffered".  This means that the "-l"
flag is a no-op on Windows.

Instead of setting line-buffered mode with "setvbuf()", set a flag and,
if that flag is set, flush the standard output after the information for
ever packet is printed; this isn't "line-buffered", either, but, as the
reason for doing line-buffering is to allow the output of Tethereal to
be piped to a program and to have that program see the output for a
packet as soon as the packet is seen and dissected, it should be just as
good as line-buffered.

svn path=/trunk/; revision=3047
2001-02-18 03:38:44 +00:00
Gilbert Ramirez
9be2e1df55 3rd time's a charm.
Check against the *correct* buffer size.

svn path=/trunk/; revision=3046
2001-02-16 22:53:07 +00:00
Gilbert Ramirez
4d63c20e59 Off-by-a-little-bit in adjusting the offset.
svn path=/trunk/; revision=3045
2001-02-16 21:44:54 +00:00
Gilbert Ramirez
87b6e2dd62 Don't trust avp_length, which is taken directly from the packet data.
svn path=/trunk/; revision=3044
2001-02-16 21:41:00 +00:00
Gilbert Ramirez
728ec7f581 Actually, this works better.
svn path=/trunk/; revision=3043
2001-02-16 19:45:38 +00:00
Gilbert Ramirez
9bf1a2e8d0 Use the proper way to denote that a single operation
produces 2 files. (grammar.lemon --> grammar.c grammar.h)

svn path=/trunk/; revision=3042
2001-02-16 19:44:16 +00:00
Guy Harris
843dbe1e82 Updates from Alexandre P. Ferreira.
svn path=/trunk/; revision=3041
2001-02-15 19:46:41 +00:00
Guy Harris
7a47c7ef24 Don't cast the function argument to "qsort()" to the expected type, make
the function have the expected type.

Make the arguments to comparison functions used by the merge sort be
"const void *", not "void *", just as the arguments to the comparison
functions used by "qsort()" are "const void *".

svn path=/trunk/; revision=3040
2001-02-15 09:25:38 +00:00
Guy Harris
352eec3037 More prototype fun - make the Lemon parser allocate and free routines
take fully-prototyped function arguments with types appropriate to
"g_malloc()" and "g_free()", and change the calls to the functions
pointed to by those arguments not pass the extra __FILE__ and __LINE__
arguments.

svn path=/trunk/; revision=3039
2001-02-15 06:22:46 +00:00
Guy Harris
6eaa148b30 More paranoia - when compiling with GCC 2.x, do checks of the format
string argument and subsequent arguments to "ErrorMsg()".

Fix up the bugs the checks in question found.

svn path=/trunk/; revision=3038
2001-02-15 06:08:23 +00:00
Guy Harris
efabd03215 Change "lemon" *NOT* to cast pointers to "int", as that doesn't work on
LP64 platforms.

Change "lemon" to use function prototypes and the official ANSI C style
of variable-argument-list functions, and to include various system
header files rather than to use non-prototype declaration of various
system functions, to do a lot more type checking.

svn path=/trunk/; revision=3037
2001-02-15 06:01:23 +00:00
Guy Harris
737add8165 Get rid of the "CHECK_DISPLAY_AS_DATA()" call and the setting of
"pinfo->current_proto" - this routine is called only through a dissector
table, and the code to call through a dissector table does that stuff
for you.

Clear the Info column before doing anything that could throw an
execption, so that if an exception is thrown the display doesn't show
junk left over from the protocol above us.

Get rid of the GCCism "case N ... M".

svn path=/trunk/; revision=3036
2001-02-14 20:03:05 +00:00
Gilbert Ramirez
bd0e066445 Add MIP extensions. Re-work some of the tvbuff-handling logic.
Update Stefan's e-mail address.

svn path=/trunk/; revision=3035
2001-02-14 17:01:44 +00:00
Guy Harris
4dee072069 Rename "SP_ERROR" to "SP_ERROR_MSG" to avoid a #define collision with
yet another Windows #define.

svn path=/trunk/; revision=3034
2001-02-14 09:40:20 +00:00
Guy Harris
33ca70bed1 Sigh. Microsoft Visual C++ 6.0 won't convert a "guint64" to a "double"
- it only allows you to convert a *signed* 64-bit integer to a "double".
Cast the result of "pletohll()" to "gint64" before returning it from a
function that returns a "double".

svn path=/trunk/; revision=3033
2001-02-14 09:38:10 +00:00
Guy Harris
f6f6aa6424 "Decode As" UI cleanups, and documentation, from David Hampton.
svn path=/trunk/; revision=3032
2001-02-14 07:15:39 +00:00
Guy Harris
7fa0ba0a11 Updates from Yaniv Kaul to show the certificate encoding and type
symbolically.

svn path=/trunk/; revision=3031
2001-02-13 20:47:17 +00:00
Guy Harris
bea00e22cf In a display filter expression, make a field name refer to any of the
fields with that name.

svn path=/trunk/; revision=3030
2001-02-13 18:34:51 +00:00
Guy Harris
cb58c92d1d Updates from Mike Frisch.
svn path=/trunk/; revision=3029
2001-02-13 18:28:29 +00:00
Guy Harris
2833a57f09 You have to define "htolell()" on little-endian platforms, too....
svn path=/trunk/; revision=3028
2001-02-13 07:07:17 +00:00
Guy Harris
b3f35be74a Changes from Chris Jepeway to
in some places use "guint64", on plaforms where it's available,
	rather than floating point (we don't yet use it universally, as
	we'd have to provide code to do 64-bit arithmetic on
	platforms/compilers where 64-bit integral types aren't
	supported);

	use .838096 microseconds rather than 1 microseconds as the time
	stamp units for NetXRay 2.x format, as those capture files seem
	to use that time stamp (that's the Sniffer "PC" time stamp;
	perhaps when Network Associates assimilated Cinco, they changed
	the time stamp units).

svn path=/trunk/; revision=3027
2001-02-13 00:50:05 +00:00
Guy Harris
35dfa54307 Updates from Neil Hunter.
svn path=/trunk/; revision=3026
2001-02-13 00:17:55 +00:00
Guy Harris
30d13244eb Changes to correctly decode BOOTP option 82, from Greg Kilfoyle.
svn path=/trunk/; revision=3025
2001-02-13 00:01:08 +00:00
Guy Harris
0196634a17 If there are multiple fields with the same name, list only one of them
in the output of "{ethereal,tethereal} -G", so that it appears only once
in the documentation.

Expand some comments to give more details.

svn path=/trunk/; revision=3024
2001-02-12 10:06:51 +00:00
Guy Harris
32a7b693f9 If you register more than one field with the same name, the dfilter code
can now handle that; this allows us to register both the modulo-8 and
the modulo-128 versions of various X.25 bitfields with "x.25.XXX" names,
which lets us get rid of the "ex.25" protocol stuff completely and use
"x.25" for both modulo-8 and modulo-128 X.25.  Do so.  (Also, fix up
some cases where we appeared to be using the modulo-8 fields when
dissecting modulo-128 X.25.)

This, in turn, allows us to register the X.25 dissector, as there's now
only one protocol with which it's associated, and make it static and
have it called only through a handle, and to, when registering it with
the "llc.dsap" dissector table, associate it with "proto_x25".

That, in turn, allows us to get rid of the "CHECK_DISPLAY_AS_DATA()"
calls, and the code to set "pinfo->current_proto", in the X.25
dissector.

The code for the display filter expression dialog would, if there are
two fields with the same name registered under a protocol, list both of
them; have it list only one of them - the fields should have the same
type, the same radix, and the same value_string/true_false_string table
if any (if they don't, they're really not the same field...).

svn path=/trunk/; revision=3023
2001-02-12 09:06:19 +00:00
Guy Harris
076c614cfb Display Ethernet protocol types in hex, not decimal (that's how they're
generally shown), and display port numbers and IP protocol numbers as
unsigned.

svn path=/trunk/; revision=3022
2001-02-12 01:17:23 +00:00
Guy Harris
6e250ba730 "Off-hoke"? What had I been smoking when I typed that?
svn path=/trunk/; revision=3021
2001-02-11 23:19:00 +00:00
Guy Harris
55662a3607 Inactivate the "Decode As" menu item if the "Decode As" dialog box
wouldn't actually offer any options to the user.

Make a bunch of routines static that aren't used outside
"decode_as_dlg.c".

Remove the declaration of the nonexistent "decode_as_register_tcpudp()"
routine.

svn path=/trunk/; revision=3020
2001-02-11 23:02:05 +00:00
Guy Harris
cb1f3a8093 In an "Update list of packets in real time" capture, pass the number of
dropped packets from the child to the parent.

svn path=/trunk/; revision=3019
2001-02-11 22:46:27 +00:00
Guy Harris
56875e0937 Change the protocol between the parent and child processes in an "Update
list of packets in real time" capture so that "!" always indicates an
error, with the "!" preceded by a count of characters in the error
message and followed by the text of the error, and so that those error
messages can be sent after the capture has started.

Use that to report capture errors, and errors writing to the capture
file, while the capture is under way.

Use #defines for the message type characters in that protocol.

svn path=/trunk/; revision=3018
2001-02-11 22:36:57 +00:00
Guy Harris
35a14714c0 Report failures of "pcap_stats()", as tcpdump does.
Print the "Capturing on <interface>" message, the running count of
packets captured, and error messages to the standard error in Tethereal,
so that you can pipe the output of a live capture that's printing
packets to a program or script without that script having to worry about
parsing stuff other than dissected packet summaries or details (tcpdump
does the same).

svn path=/trunk/; revision=3017
2001-02-11 21:29:03 +00:00
Guy Harris
bf0a3a32d1 In Ethereal, attempt to get the packet statistics from libpcap when
capturing; if we succeed, display the packet drops count as the "Drops"
value in the status line and as the "Dropped packets" statistics in the
summary dialog box, otherwise don't display it at all.

In Tethereal, attempt to get the packet statistics from libpcap when
capturing; if we succeed, and if there were any dropped packets, print
out the count of dropped packets when the capture finishes.

svn path=/trunk/; revision=3016
2001-02-11 09:28:17 +00:00
Gilbert Ramirez
8cd8391b9a Make boolean equality/inequality tests smarter; they don't test
for exact value matches, but just that the two values are either zero
or non-zero.

svn path=/trunk/; revision=3015
2001-02-11 03:29:53 +00:00
Gilbert Ramirez
8d34a213ec Add rule for dftest.exe
svn path=/trunk/; revision=3014
2001-02-11 03:19:45 +00:00
Gilbert Ramirez
ea7ef0fb0c Remove unused variable and add copyright and RCS ID.
svn path=/trunk/; revision=3013
2001-02-11 03:12:46 +00:00
Guy Harris
0c8ed39229 Updates from Alexandre P. Ferreira.
svn path=/trunk/; revision=3012
2001-02-10 09:28:04 +00:00
Guy Harris
261f3f1a6c Check for errors when writing a capture file.
Report errors when writing or closing a capture file.

Clean up some I/O error messages.

svn path=/trunk/; revision=3011
2001-02-10 09:08:14 +00:00
Guy Harris
776490b1db Further NFSV4 updates from Mike Frisch.
svn path=/trunk/; revision=3010
2001-02-09 18:26:04 +00:00
Guy Harris
58c5f7523d When dissecting an indirect call reply, if either there's an old-style
or new-style dissector for the reply, we can dissect the reply; there
doesn't have to be a new-style dissector.

svn path=/trunk/; revision=3009
2001-02-09 08:38:13 +00:00
Guy Harris
ea037e9084 For indirect RPC calls, remember the call information, and add a
dissector for indirect replies that looks up the call.  Use them in the
portmapper/RPCBIND dissector.

svn path=/trunk/; revision=3008
2001-02-09 07:59:00 +00:00
Guy Harris
f190eff056 Make a "dissect_rpc_indir_call()" routine to dissect arguments to a
specified program/version/procedure, and a "rpc_proc_name()" routine to
return the name of a specified program/version/procedure, and make the
callit dissector use those, rather than doing the work itself.

Un-export various routines and declarations that can again be private to
the RPC dissector.

svn path=/trunk/; revision=3007
2001-02-09 06:49:29 +00:00
Guy Harris
a6216089a8 Add "TFTP_" before the packet type names, to avoid compiler warnings on
Windows where ERROR is #defined by some header file that gets included
by "packet-tftp.c".

svn path=/trunk/; revision=3006
2001-02-09 06:08:11 +00:00
Guy Harris
f116900cac Change to include Service ID field in dissection of Service Info
component of WCCP 2 messages even if the service type is
WCCP2_SERVICE_DYNAMIC, from Simharajan Srishylam.

svn path=/trunk/; revision=3005
2001-02-09 00:11:44 +00:00
Guy Harris
6742f8bec9 On at least one capture, the PIM checksum appears to be correct, so
add code to check it - I've no idea what's going on with the other
captures where it's not correct, but those captures have a different
(and apparently incorrect) checksum for packets with the *exact same
contents* (other than the checksum) as the PIM packet in the capture
where the checksum is correct, so perhaps those packets actually had bad
checksums.

svn path=/trunk/; revision=3004
2001-02-08 08:38:58 +00:00
Guy Harris
d59ab05745 Don't fetch any of the fields past the BPDU type if the BPDU type isn't
0; topology change notification frames don't *have* anything past the
BPDU type to fetch.

svn path=/trunk/; revision=3003
2001-02-08 07:32:11 +00:00
Guy Harris
7f4a71ab8b Pull a lot of common code for handling 802.3 frames (i.e., frames with a
length field rather than an Ethernet type field) into a
"dissect_802_3()" routine.

In that routine, catch exceptions thrown by the IPX or LLC dissector or
dissectors under them, so that the trailer information is added to the
tree even if an exception is thrown (similar to what "ethertype()"
does).

svn path=/trunk/; revision=3002
2001-02-08 07:08:05 +00:00