summaryrefslogtreecommitdiff
path: root/packet-nbipx.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>1999-08-25 01:36:21 +0000
committerGuy Harris <guy@alum.mit.edu>1999-08-25 01:36:21 +0000
commita5fd84715424b62edbf6f0b20767592bfd58fd86 (patch)
tree3f2e33bfa3a0b52be9fc2863386594a8d9613e6c /packet-nbipx.c
parent265b8eeaee371118e80d65aa5e09c384050b0b7e (diff)
downloadwireshark-a5fd84715424b62edbf6f0b20767592bfd58fd86.tar.gz
NBIPX packet type 3 appears to be the equivalent, in NBIPXland, of the
NetBIOS Datagram Service in NBTland; a capture Gilbert sent had a pile of those packets containing what looked like SMB browser announcements, which are sent out as broadcast datagrams. Label them as such, and treat them as such. Might packet type 2 be the equivalent of the NetBIOS Session Service - both of them contain SMBs, but the former is a connection-oriented service (LLC I frames, presumably, in NBF, and TCP in NBT), and the latter is a datagram-oriented service (LLC UI frames, presumably, in NBF, and UDP in NBT)? For now, we leave type 2 as "SMB (over NBIPX)", but we might want to label it as "NetBIOS session" or whatever the appropriate term is. svn path=/trunk/; revision=574
Diffstat (limited to 'packet-nbipx.c')
-rw-r--r--packet-nbipx.c46
1 files changed, 28 insertions, 18 deletions
diff --git a/packet-nbipx.c b/packet-nbipx.c
index 4555d26791..4f5a12f0f7 100644
--- a/packet-nbipx.c
+++ b/packet-nbipx.c
@@ -2,7 +2,7 @@
* Routines for NetBIOS over IPX packet disassembly
* Gilbert Ramirez <gram@verdict.uthscsa.edu>
*
- * $Id: packet-nbipx.c,v 1.9 1999/07/29 05:46:58 gram Exp $
+ * $Id: packet-nbipx.c,v 1.10 1999/08/25 01:36:21 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -51,12 +51,15 @@ nbipx_ns(const u_char *pd, int offset, frame_data *fd, proto_tree *tree,
* NetBIOS over IPX packets. I have had to decode the protocol myself,
* so there are holes and perhaps errors in this code. (gram)
*/
-static char
-*packet_type[] = {
- "",
- "Name Query"
+static char *packet_type[] = {
+ "",
+ "Name Query",
+ "SMB",
+ "NetBIOS Datagram"
};
+#define N_PACKET_TYPES (sizeof packet_type / sizeof packet_type[0])
+
struct nbipx_header {
/* Netware & NT NetBIOS over IPX */
guint32 router[8];
@@ -126,26 +129,32 @@ nbipx_ns(const u_char *pd, int offset, frame_data *fd, proto_tree *tree,
}
if (check_col(fd, COL_INFO)) {
- switch (header.packet_type) {
- case 1:
- col_add_fstr(fd, COL_INFO, "Name Query for %s", header.name);
- break;
-
- case 2:
- col_add_fstr(fd, COL_INFO, "SMB over NBIPX");
- break;
+ switch (header.packet_type) {
+ case 1:
+ col_add_fstr(fd, COL_INFO, "Name Query for %s", header.name);
+ break;
+
+ case 2:
+ /* Session? */
+ col_add_fstr(fd, COL_INFO, "SMB over NBIPX");
+ break;
+
+ case 3:
+ /* Datagram */
+ col_add_fstr(fd, COL_INFO, "NetBIOS datagram over NBIPX");
+ break;
-
- default:
- col_add_str(fd, COL_INFO, "NetBIOS over IPX");
- }
+ default:
+ col_add_str(fd, COL_INFO, "NetBIOS over IPX");
+ break;
+ }
}
if (tree) {
ti = proto_tree_add_item(tree, proto_nbipx, offset, 68, NULL);
nbipx_tree = proto_item_add_subtree(ti, ETT_NBIPX);
- if (header.packet_type <= 1) {
+ if (header.packet_type < N_PACKET_TYPES) {
proto_tree_add_text(nbipx_tree, offset+33, 1,
"Packet Type: %s (%02X)", packet_type[header.packet_type],
header.packet_type);
@@ -184,6 +193,7 @@ nbipx_ns(const u_char *pd, int offset, frame_data *fd, proto_tree *tree,
if (nbipx == NETBIOS_NWLINK) {
switch (header.packet_type) {
case 2:
+ case 3:
dissect_smb(pd, offset + 68, fd, tree, max_data - 68);
break;