Commit Graph

17 Commits

Author SHA1 Message Date
Guy Harris f249c7f2dc Fix some "proto_tree_add_text()" calls.
svn path=/trunk/; revision=1696
2000-03-07 05:28:39 +00:00
Richard Sharpe fb50fb4779 Fix NetBIOS name types as per my understanding and the MS Knowledge base
article ...

svn path=/trunk/; revision=1639
2000-02-16 00:44:45 +00:00
Gilbert Ramirez ddfa11e870 Create a header file for every packet-*.c file. Prune the packet.h file.
This change allows you to add a new packet-*.c file and not cause a
recompilation of everything that #include's packet.h

Add the plugin_api.[ch] files ot the plugins/Makefile.am packaging list.

Add #define YY_NO_UNPUT 1 to the lex source so that the yyunput symbol
is not defined, squelching a compiler complaint when compiling the generated
C file.

svn path=/trunk/; revision=1637
2000-02-15 21:06:58 +00:00
Guy Harris 2461d79698 In "dissect_eth()", update "pi.len" and "pi.captured_len" regardless of
whether we're building a protocol tree or not.

Make "dissect_eth()" use "BYTES_ARE_IN_FRAME()" to see if we have a full
Ethernet header - it can be called with a non-zero offset, if Ethernet
frames are encapsulated inside other frames (e.g., ATM LANE).

Make capture routines take an "offset" argument if the corresponding
dissect routine takes one (for symmetry, and for Cisco ISL or any other
protocol that encapsulates Ethernet or Token-Ring frames inside other
frames).

Pass the frame lengths to capture routines via the "pi" structure,
rather than as an in-line argument, so that they can macros such as
"BYTES_ARE_IN_FRAME()" the way the corresponding dissect routines do.

Make capture routines update "pi.len" and "pi.captured_len" the same way
the corresponding diseect routines do, if the capture routines then call
other capture routines.

Make "capture_vlan()" count as "other" frames that are too short, the
way other capture routines do.

svn path=/trunk/; revision=1525
2000-01-23 08:55:37 +00:00
Guy Harris cfb98c14c4 Get rid of the include of "util.h" that some dissectors do - it's not
necessary.

svn path=/trunk/; revision=1496
2000-01-16 02:54:49 +00:00
Gerald Combs a18345ca23 Fixed small typo in hex printing.
svn path=/trunk/; revision=1475
2000-01-14 17:08:41 +00:00
Guy Harris 7d35e30ca6 Make the NetBIOS dissecting routines all take a pointer to the beginning
of the frame, plus at most one offset from the beginning of the frame,
to make it clearer what the offset is.

Then use that offset in at least some places to do bounds checking.

If a packet has no payload, don't hand it to the SMB dissector.

svn path=/trunk/; revision=1165
1999-11-30 07:45:42 +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
Nathan Neulinger 06f0344358 added sap types, netbios name types, ipx socket names
svn path=/trunk/; revision=1038
1999-11-15 21:33:57 +00:00
Guy Harris cde9b4699c Add in a bunch of changes based on the IBM specification for the NetBIOS
Frame protocol (that being what this dissects).

If you're cutting up something into bitfields, the bitfield dissection
returned by "dissect_bitfield_XXX()" should be the first text on the
line - if not, then if the text items that come before the various
bitfields aren't all the same length, the bits don't line up.

Cope with packets from one of Gilbert's captures, where the sender
"name" in some NBF datagrams isn't a NetBIOS name, it's 10 octets of 0
followed by a MAC address!

The "name type" in the "Data2" field of NBF frames is 0x00 for unique
names and 0x01 for group names, not a "16th character of a NetBIOS name"
name type.

Fix up various other things.

svn path=/trunk/; revision=633
1999-09-03 07:20:15 +00:00
Guy Harris 37af231761 Add in a pile of additional packet formats from
http://ourworld.compuserve.com/homepages/TimothyDEvans/contents.htm

Assorted minor cleanups.

svn path=/trunk/; revision=632
1999-09-03 04:37:11 +00:00
Guy Harris 27c0d2d022 Use "process_netbios_name()", rather than "canonicalize_netbios_name()",
to turn NetBIOS names into a nice printable form.

Put the description of NetBIOS name types into places where it fits;
have "packet-netbios.c" export a routine to interpret them.

svn path=/trunk/; revision=630
1999-09-03 01:43:09 +00:00
Guy Harris 3d7691d432 Add a bunch more NetBIOS name types.
That makes the space of name types even more sparse; use "val_to_str()"
to decode them, rather than an indexed table.

Make a "process_netbios_name()" routine that shows non-printable
characters in NetBIOS names as <XX>, where "XX" is the value of the
character in hex (the way Network Monitor does), and have
"get_netbios_name()" use it (NetBIOS-over-TCP will be made to use it in
the future).

When displaying NetBIOS names, include the name type character at the
end, in angle brackets, the way Network Monitor does (show it in hex
even if it *is* printable - 0x20 is 0x20, not "space", in that context).

svn path=/trunk/; revision=628
1999-09-03 00:24:40 +00:00
Guy Harris f9a1fea17c Have the IPX code set "pi.len" and "pi.captured_len" based on the length
in the IPX header, and have the dissectors it calls use it rather than
being passed the length as an argument.

Treat both packet type 20 ("WAN Broadcast") and 4 ("IPX", although 3 is
also "IPX", according to Network Monitor) as potentially being NetBIOS
packets.

The packet types for the IPX NetBIOS socket (0x0455) and the NWLink
sockets (0x0551 and 0x0553) are different (perhaps because there's one
socket for the 0x0455 NBIPX, so you have to do name service and datagram
service and have the packet types distinguish them, but NWLink has
separate sockets for name service and datagram service).

The packet type for name service and for datagram service are at
*different locations* in the packet, which is unfortunate if you want to
use the packet type to distinguish name service and datagram service
packets.  Use the packet length, for now, to distinguish them, with
socket 0x0455.

Dissect datagram packets differently from name service packets.

Export "packet-netbios.c"'s "netbios_add_name()" routine, and use it
when dissecting NBIPX packets as well.

Label NBIPX packets as "NBIPX" rather than "NetBIOS".

svn path=/trunk/; revision=627
1999-09-02 23:17:58 +00:00
Gilbert Ramirez 3c793444cc Fixed the array problem in packet-netbios.
Fixed the default case in the packet-cdp while() statement to look for
non-zero offsets. I should fix the other cases where offset += length.
Meanwhile, however, I added cdp.tlv.type and cdp.tlv.len as two filterable
fields so that one can use "cdp.tlv.len == 0" as a display filter to
find the packet that was causing problems.

svn path=/trunk/; revision=568
1999-08-24 22:36:34 +00:00
Gilbert Ramirez 7843c01d38 Changes to compile in win32.
svn path=/trunk/; revision=515
1999-08-18 22:49:48 +00:00
Guy Harris 37ddd5f5ed Jeff Foster's changes to add support for NetBEUI/NBF (NetBIOS atop 802.2
LLC, the original NetBIOS encapsulation).

svn path=/trunk/; revision=466
1999-08-10 20:06:39 +00:00