Commit Graph

46 Commits

Author SHA1 Message Date
Gilbert Ramirez 339d67b043 Merge in the final code to make Ethereal run on Win32, compiled
with MSVC 6.0 and 'nmake', the make tool that comes with MSVC.

It compiles, links, and runs. It doesn't run correctly. There's a problem
when reading files. I'm getting short reads.  I'm not linking in zlib or
libsnmp because it first needs to be debugged.

I changed the plugin code to use gmodule instead of libltdl, but the
Unix build still links ethereal against libltdl. I'll fix that tonight; sorry
about leaving it in such a sad state, but I wanted to check in this code
before I left work on a Friday night. Ethereal still works, but the
building is less than optimal.

svn path=/trunk/; revision=1479
2000-01-15 00:23:13 +00:00
Guy Harris 355bd9d8ac Add John Thomas' L2TP dissector.
svn path=/trunk/; revision=1433
2000-01-07 09:10:22 +00:00
Gilbert Ramirez d85f804b4b Add the who protocol (rwho/rwhod/ruptime)
In packet_hex_print(), compute (bstart + blen) only once.

In time_secs_to_str(), return a meaningful string when time == 0, instead
of returing pointer to char buffer with old, inappropriate data in it.

svn path=/trunk/; revision=1297
1999-12-12 05:11:57 +00:00
Guy Harris 5a4d9d6d68 WCCP 1.0 dissection, from Jerry Talkington.
svn path=/trunk/; revision=1295
1999-12-12 03:05:57 +00:00
Olivier Abad 564a1c1d62 plugins support (i.e. Dynamically loadable dissectors)
depends on dlopen() being available on the target platform

svn path=/trunk/; revision=1263
1999-12-09 20:43:38 +00:00
Guy Harris e5f812d6ed James Coe's patch to add SRVLOC and NCP-over-IP support.
svn path=/trunk/; revision=1234
1999-12-07 06:13:19 +00:00
Guy Harris 272505c220 As per Nathan Leulinger's suggestion, have a stub SNMP dissector if
there are no SNMP libraries to use in a real dissector; this means that
other dissectors don't have to care if there are SNMP libraries, they
can just call "dissect_snmp()" - and this also simplifies "Makefile.am"
and "configure.in" a bit, as they just treat "packet-snmp.c" and
"packet-snmp.h" the same way they treat other dissector source files.

svn path=/trunk/; revision=1214
1999-12-05 02:33:52 +00:00
Nathan Neulinger fb6821f059 added skeletal tacplus/xtacacs dissector
svn path=/trunk/; revision=1191
1999-12-03 21:50:31 +00:00
Gilbert Ramirez de2370185d Added Cisco Auto-RP dissector from Heikki Vatiainen <hessu@cs.tut.fi>
svn path=/trunk/; revision=1099
1999-11-23 17:09:58 +00:00
Gilbert Ramirez 1cbedad8d6 Added Heikki Vatiainen's <hessu@cs.tut.fi> HSRP dissector.
svn path=/trunk/; revision=1086
1999-11-21 20:02:32 +00:00
Guy Harris b68f2dde89 Heikki Vatiainen's SAP (Session Announcement Protocol) dissector.
Rename the dissector for the Netware SAP protocol to "dissect_ipxsap()",
so as to keep its name from colliding with that of the dissector for the
Session Announcement Protocol.

svn path=/trunk/; revision=1046
1999-11-17 02:17:29 +00:00
Guy Harris a7aba0a288 Replace the ETT_ "enum" members, declared in "packet.h", with
dynamically-assigned "ett_" integer values, assigned by
"proto_register_subtree_array()"; this:

	obviates the need to update "packet.h" whenever you add a new
	subtree type - you only have to add a call to
	"proto_register_subtree_array()" to a "register" routine and an
	array of pointers to "ett_", if they're not already there, and
	add a pointer to the new "ett_" variable to the array, if they
	are there;

	would allow run-time-loaded dissectors to allocate subtree types
	when they're loaded.

svn path=/trunk/; revision=1043
1999-11-16 11:44:20 +00:00
Guy Harris 1f31ab9cbb Move the test to see if something looks like an ONC RPC request or reply
into "dissect_rpc()" itself; it returns TRUE if it is, FALSE if it
isn't.

svn path=/trunk/; revision=1030
1999-11-14 20:44:52 +00:00
Guy Harris 21c466ed25 Uwe Girlich's ONC RPC and NFS dissectors.
svn path=/trunk/; revision=945
1999-10-29 01:04:44 +00:00
Guy Harris da1fdf005f Kojak's ICQ dissector.
svn path=/trunk/; revision=919
1999-10-24 00:56:11 +00:00
Guy Harris 047b8751f3 Generalize the "ip_src" and "ip_dst" members of the "packet_info"
structure to "dl_src"/"dl_dst", "net_src"/"net_dst", and "src"/"dst"
addresses, where an address is an address type, an address length in
bytes, and a pointer to that many bytes.

"dl_{src,dst}" are the link-layer source/destination; "net_{src,dst}"
are the network-layer source/destination; "{src,dst}" are the
source/destination from the highest of those two layers that we have in
the packet.

Add a port type to "packet_info" as well, specifying whether it's a TCP
or UDP port.

Don't set the address and port columns in the dissector functions; just
set the address and port members of the "packet_info" structure.  Set
the columns in "fill_in_columns()"; this means that if we're showing
COL_{DEF,RES,UNRES}_SRC" or "COL_{DEF,RES,UNRES}_DST", we only generate
the string from "src" or "dst", we don't generate a string for the
link-layer address and then overwrite it with a string for the
network-layer address (generating those strings costs CPU).

Add support for "conversations", where a "conversation" is (at present)
a source and destination address and a source and destination port.  (In
the future, we may support "conversations" above the transport layer,
e.g. a TFTP conversation, where the first packet goes from the client to
the TFTP server port, but the reply comes back from a different port,
and all subsequent packets go between the client address/port and the
server address/new port, or an NFS conversation, which might include
lock manager, status monitor, and mount packets, as well as NFS
packets.)

Currently, all we support is a call that takes the source and
destination address/port pairs, looks them up in a hash table, and:

	if nothing is found, creates a new entry in the hash table, and
	assigns it a unique 32-bit conversation ID, and returns that
	conversation ID;

	if an entry is found, returns its conversation ID.

Use that in the SMB and AFS code to keep track of individual SMB or AFS
conversations.  We need to match up requests and replies, as, for
certain replies, the operation code for the request to which it's a
reply doesn't show up in the reply - you have to find the request with a
matching transaction ID.  Transaction IDs are per-conversation, so the
hash table for requests should include a conversation ID and transaction
ID as the key.

This allows SMB and AFS decoders to handle IPv4 or IPv6 addresses
transparently (and should allow the SMB decoder to handle NetBIOS atop
other protocols as well, if the source and destination address and port
values in the "packet_info" structure are set appropriately).

In the "Follow TCP Connection" code, check to make sure that the
addresses are IPv4 addressses; ultimately, that code should be changed
to use the conversation code instead, which will let it handle IPv6
transparently.

svn path=/trunk/; revision=909
1999-10-22 07:18:23 +00:00
Gilbert Ramirez 08292071f4 Added Nathan's patch for AFS and RX dissection.
svn path=/trunk/; revision=894
1999-10-20 16:41:20 +00:00
Guy Harris c36e5fd163 Nathan Neulinger's patch to set "pi.srcport" and "pi.dstport".
svn path=/trunk/; revision=844
1999-10-15 18:33:44 +00:00
Guy Harris 5ed4011c30 Nathan Neulinger's NTP dissector.
svn path=/trunk/; revision=828
1999-10-14 05:10:33 +00:00
Guy Harris 66d84f1093 Jun-ichiro itojun Hagino's changes for IPv6 extension header decoding
and RIPng decoding.

svn path=/trunk/; revision=818
1999-10-12 23:12:06 +00:00
Gilbert Ramirez bacb9d5bae New proto_tree header_field_info stuff. Header_field_infos now contain
the base for numbers to be displayed in, bitmasks for bitfields, and blurbs
(which are one or two sentences describing the field).

proto_tree_add*() routines now automatically handle bitfields. You tell
it which header field you are adding, and just pass it the value of the
entire field, and the proto_tree routines will do the masking and shifting
for you.

This means that bitfields are more naturally filtered via dfilter now.

Added Phil Techau's support for signed integers in dfilters/proto_tree.

Added the beginning of the SNA dissector. It's not complete, but I'm
committing it now because it has example after example of how to use
bitfields with the new header_field_info struct and proto_tree routines.
It was the impetus to change how header_field_info works.

svn path=/trunk/; revision=815
1999-10-12 06:21:15 +00:00
Laurent Deniel 3d59704877 Check for truncated header.
svn path=/trunk/; revision=752
1999-10-02 16:58:41 +00:00
Guy Harris f4ac555e90 Peter Torvals' Internet Cache Protocol dissector.
svn path=/trunk/; revision=677
1999-09-14 08:06:47 +00:00
Guy Harris ac4f87218d Declare the "packet_info" structure "pi" in "packet.h", rather than in a
bunch of source files.

Replace the "payload" field of a "packet_info" structure with "len" and
"captured_len" fields, which contain the total packet length and total
captured packet length (including all headers) at the current protocol
layer (i.e., if a given layer has a length field, and that length field
says its shorter than the length we got from the capture, reduce the
"pi.len" and "pi.captured_len" values appropriately).  Those fields can
be used in the future if we add checks to make sure a field we're
extracting from a packet doesn't go past the end of the packet, or past
the captured part of the packet.

Get rid of the additional payload argument to some dissection functions;
use "pi.captured_len - offset" instead.

Have the END_OF_FRAME macro use "pi.captured_len" rather than
"fd->cap_len", so that "dissect the rest of the frame" becomes "dissect
the rest of the packet", and doesn't dissect end-of-frame padding such
as padding added to make an Ethernet frame 60 or more octets long.  (We
might want to rename it END_OF_PACKET; if we ever want to label the
end-of-frame padding for the benefit of people curious what that extra
gunk is, we could have a separate END_OF_FRAME macro that uses
"fd->cap_len".)

svn path=/trunk/; revision=506
1999-08-18 00:57:54 +00:00
Guy Harris 621c56ed1e "packet-udp.c" and "packet-x25.c" both have global variables named
"hash_table", but each of them is used only in the file in question;
make them static, so that they don't collide.

svn path=/trunk/; revision=440
1999-08-05 00:05:01 +00:00
Gilbert Ramirez 0e7a2d905a Converted UDP fields to new proto_tree functions.
svn path=/trunk/; revision=376
1999-07-22 16:41:22 +00:00
Gilbert Ramirez 53d2a96094 Added Johan's RADIUS dissector, finally. I modified it to fit in with the
new proto_tree routines. I also removed the check for lex and yacc from
wiretap's configure script. The IP dissector now uses
proto_register_field_array().

svn path=/trunk/; revision=348
1999-07-08 04:23:28 +00:00
Gilbert Ramirez 07f42b5b31 Created a new protocol tree implementation and a new display filter
mechanism that is built into ethereal. Wiretap is now used to read all
file formats. Libpcap is used only for capturing.

svn path=/trunk/; revision=342
1999-07-07 22:52:57 +00:00
Guy Harris ea9053b4f7 When checking to see if a packet is of a given type by checking the
source and destination port numbers, check both port numbers against the
specified port, rather than checking the lower of the two port numbers
against the specified port, just in case you happen to either have

	1) the port number for that type being high enough that you can
	   get client sockets using it

or

	2) client sockets using it for some other reason.

svn path=/trunk/; revision=333
1999-06-25 07:15:02 +00:00
Gilbert Ramirez 34450a8a35 Added PPPoE, PPTP, GRE, and ISAKMP dissectors.
svn path=/trunk/; revision=303
1999-06-11 15:30:55 +00:00
Gilbert Ramirez c50d66ba7c Added Didier Jorand's dissect_snmp routine. This is only compiled in
if you have the UCD or CMU SNMP library available. If you have the SNMP
library but do not with to have SNMP support, use the
	./configure --disable-snmp
option. Otherwise 'configure' finds the SNMP library and uses it.

svn path=/trunk/; revision=281
1999-05-12 05:56:42 +00:00
Guy Harris 93aab5c7b0 Decode SMB requests inside NetBIOS Datagram Service packets.
svn path=/trunk/; revision=269
1999-05-10 21:50:13 +00:00
Gilbert Ramirez ef3dfe2077 Removed all references to gtk objects from packet*.[ch] files. They now
reference the protocol tree with struct proto_tree and struct proto_item
objects. That way, the packet decoding source code file can be used with
non-gtk packet decoders, like a curses-based ethereal, e.g. I also re-arranged
some of the information in packet.h to more appropriate places (like other
packet-*.[ch] files).

svn path=/trunk/; revision=223
1999-03-23 03:14:46 +00:00
Gilbert Ramirez 2744866326 Small fixes for alignment, and #include for gtk+-1.1.x/glib-1.1.x
svn path=/trunk/; revision=197
1999-03-01 18:28:12 +00:00
Guy Harris 38a04d2660 Added Richard Sharpe's TFTP support.
svn path=/trunk/; revision=190
1999-02-15 06:36:57 +00:00
Gerald Combs cb1f8e34c5 * Added Joerg Mayer's Vines patch
* Added Joerg to the AUTHORS file
* Added Guy's bitfield decode patch
* Fixed time output

svn path=/trunk/; revision=142
1998-12-29 04:05:38 +00:00
Gerald Combs 719fd89b5f Changed port print formats to unsigned, added raw port number to tree output.
svn path=/trunk/; revision=132
1998-12-21 03:42:22 +00:00
Gilbert Ramirez d570947a14 Added NetBIOS Datagram (over UDP) support.
svn path=/trunk/; revision=113
1998-11-20 05:58:42 +00:00
Gerald Combs e1b6a91df5 * Fixes for TCP and UDP port number display.
svn path=/trunk/; revision=98
1998-11-17 05:04:04 +00:00
Gerald Combs 6ca358948b * Added column formatting functionality.
* Added check_col(), add_col_str() and add_col_fmt() to replace references
  to ft->win_info.
* Added column prefs handling code.

svn path=/trunk/; revision=97
1998-11-17 04:29:13 +00:00
Guy Harris b3da21d812 Don't assume the UDP header is always properly aligned (sometimes it
isn't).

svn path=/trunk/; revision=54
1998-10-14 08:47:16 +00:00
Gilbert Ramirez 4ef47e6cfb Added preliminary support for NetBIOS Name Services over IPX and UDP. Note
that these are two very different implementations of NetBIOS name services and
at the protocol level are not similar. I have put the UDP protocol in
packet-nbns.c, since it will be a very big module. I have all of rfc 1002 to
read and implement. I am planning on putting many different NetBIOS over IPX
functions in packet-nbipx.c, however, since there is no RFC or published
standard. I have to hack the protocol, and as such, I do not expect it to be
as full-featured as the IP-world equivalents.

svn path=/trunk/; revision=50
1998-10-14 04:09:15 +00:00
Gerald Combs 2e7e493198 Merged in a _huge_ patch from Guy Harris. It adds a time stap column,
generalizes the column printing code, adds a "frame" tree item to
   the tree view, and fixes a bunch of miscellaneous coding bugs.

svn path=/trunk/; revision=31
1998-09-27 22:12:47 +00:00
Gilbert Ramirez 663ddc59c1 IPX over IP (rfc 1234) added. Very trivial.
svn path=/trunk/; revision=20
1998-09-21 16:16:01 +00:00
Gerald Combs 576024f903 Added ID tags to the beginning of each source file.
svn path=/trunk/; revision=7
1998-09-16 03:22:19 +00:00
Gerald Combs 86534f46e1 Initial revision
svn path=/trunk/; revision=2
1998-09-16 02:39:15 +00:00