summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Neulinger <nneul@umr.edu>2000-11-03 22:11:36 +0000
committerNathan Neulinger <nneul@umr.edu>2000-11-03 22:11:36 +0000
commit019109a76483593d7d5e614b1fceeefa7a45ffe2 (patch)
tree997e9fa1318e0abb7c7eb4f151af11b01488feb0
parentc63dddfcd33c956267f406dfb559832a001c9f8a (diff)
downloadwireshark-019109a76483593d7d5e614b1fceeefa7a45ffe2.tar.gz
more decoding of afs bos traffic
svn path=/trunk/; revision=2556
-rw-r--r--packet-afs-defs.h28
-rw-r--r--packet-afs-macros.h63
-rw-r--r--packet-afs-register-info.h274
-rw-r--r--packet-afs.c235
4 files changed, 414 insertions, 186 deletions
diff --git a/packet-afs-defs.h b/packet-afs-defs.h
index 4d23db0725..82d6faadd6 100644
--- a/packet-afs-defs.h
+++ b/packet-afs-defs.h
@@ -8,7 +8,7 @@
* Portions based on information/specs retrieved from the OpenAFS sources at
* www.openafs.org, Copyright IBM.
*
- * $Id: packet-afs-defs.h,v 1.3 2000/11/03 19:27:11 nneul Exp $
+ * $Id: packet-afs-defs.h,v 1.4 2000/11/03 22:11:36 nneul Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -469,6 +469,13 @@ static const value_string ubik_lock_types[] = {
{ 0, NULL },
};
+static const value_string xstat_collections[] = {
+ { 0, "call counting & info" },
+ { 1, "performance info" },
+ { 2, "full performance info" },
+ { 0, NULL },
+};
+
static const value_string vice_lock_types[] = {
{ 0, "read" },
{ 1, "write" },
@@ -539,6 +546,7 @@ static int hf_afs_fs_cps_spare3 = -1;
static int hf_afs_fs_vicelocktype = -1;
static int hf_afs_fs_viceid = -1;
static int hf_afs_fs_ipaddr = -1;
+static int hf_afs_fs_token = -1;
static int hf_afs_fs_status_anonymousaccess = -1;
static int hf_afs_fs_status_author = -1;
@@ -596,11 +604,29 @@ static int hf_afs_bos_errcode = -1;
static int hf_afs_bos_type = -1;
static int hf_afs_bos_instance = -1;
static int hf_afs_bos_status = -1;
+static int hf_afs_bos_statusdesc = -1;
static int hf_afs_bos_num = -1;
static int hf_afs_bos_size = -1;
static int hf_afs_bos_flags = -1;
static int hf_afs_bos_date = -1;
static int hf_afs_bos_content = -1;
+static int hf_afs_bos_user = -1;
+static int hf_afs_bos_key = -1;
+static int hf_afs_bos_path = -1;
+static int hf_afs_bos_file = -1;
+static int hf_afs_bos_cmd = -1;
+static int hf_afs_bos_error = -1;
+static int hf_afs_bos_spare1 = -1;
+static int hf_afs_bos_spare2 = -1;
+static int hf_afs_bos_spare3 = -1;
+static int hf_afs_bos_parm = -1;
+static int hf_afs_bos_kvno = -1;
+static int hf_afs_bos_cell = -1;
+static int hf_afs_bos_host = -1;
+static int hf_afs_bos_newtime = -1;
+static int hf_afs_bos_baktime = -1;
+static int hf_afs_bos_oldtime = -1;
+static int hf_afs_bos_data = -1;
static int hf_afs_vldb_errcode = -1;
static int hf_afs_vldb_name = -1;
diff --git a/packet-afs-macros.h b/packet-afs-macros.h
index 48b24ae9d1..0d23eb584a 100644
--- a/packet-afs-macros.h
+++ b/packet-afs-macros.h
@@ -8,7 +8,7 @@
* Portions based on information/specs retrieved from the OpenAFS sources at
* www.openafs.org, Copyright IBM.
*
- * $Id: packet-afs-macros.h,v 1.3 2000/11/03 19:27:11 nneul Exp $
+ * $Id: packet-afs-macros.h,v 1.4 2000/11/03 22:11:36 nneul Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -63,6 +63,13 @@
TRUNC(sizeof(guint32)) \
proto_tree_add_uint(tree,field, NullTVB,curoffset,sizeof(guint32), GETINT()); \
curoffset += 4;
+
+/* Output a unsigned integer, stored into field 'field'
+ Assumes it is in network byte order, converts to host before using */
+#define OUT_INT(field) \
+ TRUNC(sizeof(guint32)) \
+ proto_tree_add_int(tree,field, NullTVB,curoffset,sizeof(gint32), GETINT()); \
+ curoffset += 4;
/* Output a unsigned integer, stored into field 'field'
Assumes it is in network byte order, converts to host before using,
@@ -277,10 +284,29 @@
}
/* Output a AFSCBs */
-#define OUT_FS_AFSCBs()
+#define OUT_FS_AFSCBs() \
+ { \
+ unsigned int j,i; \
+ TRUNC(1); \
+ j = pntohl(&pd[curoffset]); \
+ curoffset += 1; \
+ for (i=0; i<j; i++) { \
+ OUT_FS_AFSCallBack(); \
+ } \
+ }
+
/* Output a AFSBulkStats */
-#define OUT_FS_AFSBulkStats()
+#define OUT_FS_AFSBulkStats() \
+ { \
+ unsigned int j,i; \
+ TRUNC(1); \
+ j = pntohl(&pd[curoffset]); \
+ curoffset += 1; \
+ for (i=0; i<j; i++) { \
+ OUT_FS_AFSFetchStatus("Status"); \
+ } \
+ }
/* Output a AFSFetchVolumeStatus */
#define OUT_FS_AFSFetchVolumeStatus()
@@ -298,7 +324,7 @@
#define OUT_FS_VolumeInfo()
/* Output an AFS Token - might just be bytes though */
-#define OUT_FS_AFSTOKEN()
+#define OUT_FS_AFSTOKEN() VECOUT(hf_afs_fs_token, 1024)
/* Output a AFS acl */
#define ACLOUT(who, positive, acl, bytes) \
@@ -332,11 +358,27 @@
tree = save; \
}
+/* output a bozo_key */
+#define OUT_BOS_KEY() \
+ OUT_BYTES(hf_afs_bos_key, 8);
+
+/* output a bozo_key */
+#define OUT_BOS_KEYINFO() \
+ OUT_BYTES(hf_afs_bos_key, 4*4);
+
+/* output a bozo_netKTime */
+#define OUT_BOS_TIME() \
+ SKIP(4); SKIP(2); SKIP(2); SKIP(2); SKIP(2);
+
+/* output a bozo_status */
+#define OUT_BOS_STATUS() \
+ SKIP(10 * 4);
+
/* Skip a certain number of bytes */
#define SKIP(bytes) \
TRUNC(bytes) \
curoffset += bytes;
-
+
/* Raw data - to end of frame */
#define OUT_BYTES_ALL(field) OUT_BYTES(field, offset+END_OF_FRAME-curoffset)
@@ -352,12 +394,17 @@
#define OUT_STRING(field) \
{ int i; \
TRUNC(4); \
- i = pntohl(&pd[curoffset]); \
+ i = GETINT(); \
curoffset += 4; \
- TRUNC(i); \
if ( i > 0 ) { \
+ char *tmp; \
+ TRUNC(i); \
+ tmp = g_malloc(i+1); \
+ memcpy(tmp, &pd[curoffset], i); \
+ tmp[i] = '\0'; \
proto_tree_add_string(tree, field, NullTVB, curoffset-4, i+4, \
- (void *)&pd[curoffset]); \
+ (void *)tmp); \
+ g_free(tmp); \
} else { \
proto_tree_add_string(tree, field, NullTVB, curoffset-4, 4, \
""); \
diff --git a/packet-afs-register-info.h b/packet-afs-register-info.h
index adcffd58d9..d255c92066 100644
--- a/packet-afs-register-info.h
+++ b/packet-afs-register-info.h
@@ -8,7 +8,7 @@
* Portions based on information/specs retrieved from the OpenAFS sources at
* www.openafs.org, Copyright IBM.
*
- * $Id: packet-afs-register-info.h,v 1.3 2000/11/03 19:27:11 nneul Exp $
+ * $Id: packet-afs-register-info.h,v 1.4 2000/11/03 22:11:36 nneul Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -117,6 +117,8 @@
FT_UINT32, BASE_DEC, VALS(afs_errors), 0, "Error Code" }},
{ &hf_afs_fs_data, { "Data", "afs.fs.data",
FT_BYTES, BASE_HEX, 0, 0, "Data" }},
+{ &hf_afs_fs_token, { "Token", "afs.fs.token",
+ FT_BYTES, BASE_HEX, 0, 0, "Token" }},
{ &hf_afs_fs_oldname, { "Old Name", "afs.fs.oldname",
FT_STRING, BASE_HEX, 0, 0, "Old Name" }},
{ &hf_afs_fs_newname, { "New Name", "afs.fs.newname",
@@ -142,7 +144,7 @@
{ &hf_afs_fs_xstats_clientversion, { "Client Version", "afs.fs.xstats.clientversion",
FT_UINT32, BASE_DEC, 0, 0, "Client Version" }},
{ &hf_afs_fs_xstats_version, { "Collection Number", "afs.fs.xstats.collnumber",
- FT_UINT32, BASE_DEC, 0, 0, "Collection Number" }},
+ FT_UINT32, BASE_DEC, VALS(xstat_collections), 0, "Collection Number" }},
{ &hf_afs_fs_xstats_timestamp, { "XStats Timestamp", "afs.fs.xstats.timestamp",
FT_UINT32, BASE_DEC, 0, 0, "XStats Timestamp" }},
{ &hf_afs_fs_cps_spare1, { "CPS Spare1", "afs.fs.cps.spare1",
@@ -258,246 +260,206 @@
"_I_nsert", "afs.fs.acl.i",
FT_UINT8, BASE_BIN,
0, PRSFS_INSERT, "Insert" }},
-{ &hf_afs_fs_acl_d, {
- "_D_elete", "afs.fs.acl.d",
+{ &hf_afs_fs_acl_d, { "_D_elete", "afs.fs.acl.d",
FT_UINT8, BASE_BIN,
0, PRSFS_DELETE, "Delete" }},
-{ &hf_afs_fs_acl_w, {
- "_W_rite", "afs.fs.acl.w",
- FT_UINT8, BASE_BIN,
- 0, PRSFS_WRITE, "Write" }},
-{ &hf_afs_fs_acl_k, {
- "_L_ock", "afs.fs.acl.k",
- FT_UINT8, BASE_BIN,
- 0, PRSFS_LOCK, "Lock" }},
-{ &hf_afs_fs_acl_a, {
- "_A_dminister", "afs.fs.acl.a",
- FT_UINT8, BASE_BIN,
- 0, PRSFS_ADMINISTER, "Administer" }},
+{ &hf_afs_fs_acl_w, { "_W_rite", "afs.fs.acl.w",
+ FT_UINT8, BASE_BIN, 0, PRSFS_WRITE, "Write" }},
+{ &hf_afs_fs_acl_k, { "_L_ock", "afs.fs.acl.k",
+ FT_UINT8, BASE_BIN, 0, PRSFS_LOCK, "Lock" }},
+{ &hf_afs_fs_acl_a, { "_A_dminister", "afs.fs.acl.a",
+ FT_UINT8, BASE_BIN, 0, PRSFS_ADMINISTER, "Administer" }},
{ &hf_afs_fs_callback_version, { "Version", "afs.fs.callback.version",
- FT_UINT32, BASE_DEC,
- 0, 0, "Version" }},
+ FT_UINT32, BASE_DEC, 0, 0, "Version" }},
{ &hf_afs_fs_callback_expires, { "Expires", "afs.fs.callback.expires",
- FT_ABSOLUTE_TIME, BASE_DEC,
- 0, 0, "Expires" }},
+ FT_ABSOLUTE_TIME, BASE_DEC, 0, 0, "Expires" }},
{ &hf_afs_fs_callback_type, { "Type", "afs.fs.callback.type",
- FT_UINT32, BASE_DEC,
- VALS(cb_types), 0, "Type" }},
+ FT_UINT32, BASE_DEC, VALS(cb_types), 0, "Type" }},
/* BOS Server Fields */
-{ &hf_afs_bos_errcode, {
- "Error Code", "afs.bos.errcode",
- FT_UINT32, BASE_DEC,
- VALS(afs_errors), 0, "Error Code" }},
+{ &hf_afs_bos_errcode, { "Error Code", "afs.bos.errcode",
+ FT_UINT32, BASE_DEC, VALS(afs_errors), 0, "Error Code" }},
{ &hf_afs_bos_type, { "Type", "afs.bos.type",
- FT_STRING, BASE_HEX,
- 0, 0, "Type" }},
+ FT_STRING, BASE_HEX, 0, 0, "Type" }},
{ &hf_afs_bos_content, { "Content", "afs.bos.content",
- FT_STRING, BASE_HEX,
- 0, 0, "Content" }},
+ FT_STRING, BASE_HEX, 0, 0, "Content" }},
+{ &hf_afs_bos_data, { "Data", "afs.bos.data",
+ FT_BYTES, BASE_HEX, 0, 0, "Data" }},
+{ &hf_afs_bos_path, { "Path", "afs.bos.path",
+ FT_STRING, BASE_HEX, 0, 0, "Path" }},
+{ &hf_afs_bos_parm, { "Parm", "afs.bos.parm",
+ FT_STRING, BASE_HEX, 0, 0, "Parm" }},
+{ &hf_afs_bos_error, { "Error", "afs.bos.error",
+ FT_STRING, BASE_HEX, 0, 0, "Error" }},
+{ &hf_afs_bos_spare1, { "Spare1", "afs.bos.spare1",
+ FT_STRING, BASE_HEX, 0, 0, "Spare1" }},
+{ &hf_afs_bos_spare2, { "Spare2", "afs.bos.spare2",
+ FT_STRING, BASE_HEX, 0, 0, "Spare2" }},
+{ &hf_afs_bos_spare3, { "Spare3", "afs.bos.spare3",
+ FT_STRING, BASE_HEX, 0, 0, "Spare3" }},
+{ &hf_afs_bos_file, { "File", "afs.bos.file",
+ FT_STRING, BASE_HEX, 0, 0, "File" }},
+{ &hf_afs_bos_cmd, { "Command", "afs.bos.cmd",
+ FT_STRING, BASE_HEX, 0, 0, "Command" }},
+{ &hf_afs_bos_key, { "Key", "afs.bos.key",
+ FT_BYTES, BASE_HEX, 0, 0, "key" }},
+{ &hf_afs_bos_user, { "User", "afs.bos.user",
+ FT_STRING, BASE_HEX, 0, 0, "User" }},
{ &hf_afs_bos_instance, { "Instance", "afs.bos.instance",
- FT_STRING, BASE_HEX,
- 0, 0, "Instance" }},
+ FT_STRING, BASE_HEX, 0, 0, "Instance" }},
{ &hf_afs_bos_status, { "Status", "afs.bos.status",
- FT_INT32, BASE_DEC,
- 0, 0, "Status" }},
+ FT_INT32, BASE_DEC, 0, 0, "Status" }},
+{ &hf_afs_bos_statusdesc, { "Status Description", "afs.bos.statusdesc",
+ FT_STRING, BASE_DEC, 0, 0, "Status Description" }},
{ &hf_afs_bos_num, { "Number", "afs.bos.number",
- FT_UINT32, BASE_DEC,
- 0, 0, "Number" }},
+ FT_UINT32, BASE_DEC, 0, 0, "Number" }},
{ &hf_afs_bos_size, { "Size", "afs.bos.size",
- FT_UINT32, BASE_DEC,
- 0, 0, "Size" }},
+ FT_UINT32, BASE_DEC, 0, 0, "Size" }},
{ &hf_afs_bos_flags, { "Flags", "afs.bos.flags",
- FT_UINT32, BASE_DEC,
- 0, 0, "Flags" }},
+ FT_UINT32, BASE_DEC, 0, 0, "Flags" }},
{ &hf_afs_bos_date, { "Date", "afs.bos.date",
- FT_UINT32, BASE_DEC,
- 0, 0, "Date" }},
+ FT_UINT32, BASE_DEC, 0, 0, "Date" }},
+{ &hf_afs_bos_kvno, { "Key Version Number", "afs.bos.kvno",
+ FT_UINT32, BASE_DEC, 0, 0, "Key Version Number" }},
+{ &hf_afs_bos_cell, { "Cell", "afs.bos.cell",
+ FT_STRING, BASE_HEX, 0, 0, "Cell" }},
+{ &hf_afs_bos_host, { "Host", "afs.bos.host",
+ FT_STRING, BASE_HEX, 0, 0, "Host" }},
+{ &hf_afs_bos_newtime, { "New Time", "afs.bos.newtime",
+ FT_ABSOLUTE_TIME, BASE_DEC, 0, 0, "New Time" }},
+{ &hf_afs_bos_baktime, { "Backup Time", "afs.bos.baktime",
+ FT_ABSOLUTE_TIME, BASE_DEC, 0, 0, "Backup Time" }},
+{ &hf_afs_bos_oldtime, { "Old Time", "afs.bos.oldtime",
+ FT_ABSOLUTE_TIME, BASE_DEC, 0, 0, "Old Time" }},
+
/* KAUTH Server Fields */
{ &hf_afs_kauth_errcode, { "Error Code", "afs.kauth.errcode",
- FT_UINT32, BASE_DEC,
- VALS(afs_errors), 0, "Error Code" }},
+ FT_UINT32, BASE_DEC, VALS(afs_errors), 0, "Error Code" }},
{ &hf_afs_kauth_princ, { "Principal", "afs.kauth.princ",
- FT_STRING, BASE_HEX,
- 0, 0, "Principal" }},
+ FT_STRING, BASE_HEX, 0, 0, "Principal" }},
{ &hf_afs_kauth_realm, { "Realm", "afs.kauth.realm",
- FT_STRING, BASE_HEX,
- 0, 0, "Realm" }},
+ FT_STRING, BASE_HEX, 0, 0, "Realm" }},
{ &hf_afs_kauth_domain, { "Domain", "afs.kauth.domain",
- FT_STRING, BASE_HEX,
- 0, 0, "Domain" }},
+ FT_STRING, BASE_HEX, 0, 0, "Domain" }},
{ &hf_afs_kauth_name, { "Name", "afs.kauth.name",
- FT_STRING, BASE_HEX,
- 0, 0, "Name" }},
+ FT_STRING, BASE_HEX, 0, 0, "Name" }},
{ &hf_afs_kauth_data, { "Data", "afs.kauth.data",
- FT_BYTES, BASE_HEX,
- 0, 0, "Data" }},
+ FT_BYTES, BASE_HEX, 0, 0, "Data" }},
{ &hf_afs_kauth_kvno, { "Key Version Number", "afs.kauth.kvno",
- FT_UINT32, BASE_DEC,
- 0, 0, "Key Version Number" }},
+ FT_UINT32, BASE_DEC, 0, 0, "Key Version Number" }},
/* VOL Server Fields */
{ &hf_afs_vol_errcode, { "Error Code", "afs.vol.errcode",
- FT_UINT32, BASE_DEC,
- VALS(afs_errors), 0, "Error Code" }},
+ FT_UINT32, BASE_DEC, VALS(afs_errors), 0, "Error Code" }},
{ &hf_afs_vol_id, { "Volume ID", "afs.vol.id",
- FT_UINT32, BASE_DEC,
- 0, 0, "Volume ID" }},
+ FT_UINT32, BASE_DEC, 0, 0, "Volume ID" }},
{ &hf_afs_vol_count, { "Volume Count", "afs.vol.count",
- FT_UINT32, BASE_DEC,
- 0, 0, "Volume Count" }},
+ FT_UINT32, BASE_DEC, 0, 0, "Volume Count" }},
{ &hf_afs_vol_name, { "Volume Name", "afs.vol.name",
- FT_STRING, BASE_HEX,
- 0, 0, "Volume Name" }},
+ FT_STRING, BASE_HEX, 0, 0, "Volume Name" }},
/* VLDB Server Fields */
{ &hf_afs_vldb_errcode, { "Error Code", "afs.vldb.errcode",
- FT_UINT32, BASE_DEC,
- VALS(afs_errors), 0, "Error Code" }},
+ FT_UINT32, BASE_DEC, VALS(afs_errors), 0, "Error Code" }},
{ &hf_afs_vldb_type, { "Volume Type", "afs.vldb.type",
- FT_UINT32, BASE_DEC,
- VALS(volume_types), 0, "Volume Type" }},
+ FT_UINT32, BASE_DEC, VALS(volume_types), 0, "Volume Type" }},
{ &hf_afs_vldb_id, { "Volume ID", "afs.vldb.id",
- FT_UINT32, BASE_DEC,
- 0, 0, "Volume ID" }},
+ FT_UINT32, BASE_DEC, 0, 0, "Volume ID" }},
{ &hf_afs_vldb_bump, { "Bumped Volume ID", "afs.vldb.bump",
- FT_UINT32, BASE_DEC,
- 0, 0, "Bumped Volume ID" }},
+ FT_UINT32, BASE_DEC, 0, 0, "Bumped Volume ID" }},
{ &hf_afs_vldb_index, { "Volume Index", "afs.vldb.index",
- FT_UINT32, BASE_DEC,
- 0, 0, "Volume Index" }},
+ FT_UINT32, BASE_DEC, 0, 0, "Volume Index" }},
{ &hf_afs_vldb_count, { "Volume Count", "afs.vldb.count",
- FT_UINT32, BASE_DEC,
- 0, 0, "Volume Count" }},
+ FT_UINT32, BASE_DEC, 0, 0, "Volume Count" }},
{ &hf_afs_vldb_numservers, { "Number of Servers", "afs.vldb.numservers",
- FT_UINT32, BASE_DEC,
- 0, 0, "Number of Servers" }},
+ FT_UINT32, BASE_DEC, 0, 0, "Number of Servers" }},
{ &hf_afs_vldb_nextindex, { "Next Volume Index", "afs.vldb.nextindex",
- FT_UINT32, BASE_DEC,
- 0, 0, "Next Volume Index" }},
+ FT_UINT32, BASE_DEC, 0, 0, "Next Volume Index" }},
{ &hf_afs_vldb_rovol, { "Read-Only Volume ID", "afs.vldb.rovol",
- FT_UINT32, BASE_DEC,
- 0, 0, "Read-Only Volume ID" }},
+ FT_UINT32, BASE_DEC, 0, 0, "Read-Only Volume ID" }},
{ &hf_afs_vldb_rwvol, { "Read-Write Volume ID", "afs.vldb.rwvol",
- FT_UINT32, BASE_DEC,
- 0, 0, "Read-Only Volume ID" }},
+ FT_UINT32, BASE_DEC, 0, 0, "Read-Only Volume ID" }},
{ &hf_afs_vldb_bkvol, { "Backup Volume ID", "afs.vldb.bkvol",
- FT_UINT32, BASE_DEC,
- 0, 0, "Read-Only Volume ID" }},
+ FT_UINT32, BASE_DEC, 0, 0, "Read-Only Volume ID" }},
{ &hf_afs_vldb_name, { "Volume Name", "afs.vldb.name",
- FT_STRING, BASE_HEX,
- 0, 0, "Volume Name" }},
+ FT_STRING, BASE_HEX, 0, 0, "Volume Name" }},
{ &hf_afs_vldb_partition, { "Partition", "afs.vldb.partition",
- FT_STRING, BASE_HEX,
- 0, 0, "Partition" }},
+ FT_STRING, BASE_HEX, 0, 0, "Partition" }},
{ &hf_afs_vldb_server, { "Server", "afs.vldb.server",
- FT_IPv4, BASE_HEX,
- 0, 0, "Server" }},
+ FT_IPv4, BASE_HEX, 0, 0, "Server" }},
{ &hf_afs_vldb_serveruuid, { "Server UUID", "afs.vldb.serveruuid",
- FT_BYTES, BASE_HEX,
- 0, 0, "Server UUID" }},
+ FT_BYTES, BASE_HEX, 0, 0, "Server UUID" }},
/* BACKUP Server Fields */
{ &hf_afs_backup_errcode, { "Error Code", "afs.backup.errcode",
- FT_UINT32, BASE_DEC,
- VALS(afs_errors), 0, "Error Code" }},
+ FT_UINT32, BASE_DEC, VALS(afs_errors), 0, "Error Code" }},
/* CB Server Fields */
{ &hf_afs_cb_errcode, { "Error Code", "afs.cb.errcode",
- FT_UINT32, BASE_DEC,
- VALS(afs_errors), 0, "Error Code" }},
+ FT_UINT32, BASE_DEC, VALS(afs_errors), 0, "Error Code" }},
{ &hf_afs_cb_callback_version, { "Version", "afs.cb.callback.version",
- FT_UINT32, BASE_DEC,
- 0, 0, "Version" }},
+ FT_UINT32, BASE_DEC, 0, 0, "Version" }},
{ &hf_afs_cb_callback_expires, { "Expires", "afs.cb.callback.expires",
- FT_ABSOLUTE_TIME, BASE_DEC,
- 0, 0, "Expires" }},
+ FT_ABSOLUTE_TIME, BASE_DEC, 0, 0, "Expires" }},
{ &hf_afs_cb_callback_type, { "Type", "afs.cb.callback.type",
- FT_UINT32, BASE_DEC,
- VALS(cb_types), 0, "Type" }},
+ FT_UINT32, BASE_DEC, VALS(cb_types), 0, "Type" }},
{ &hf_afs_cb_fid_volume, { "FileID (Volume)", "afs.cb.fid.volume",
- FT_UINT32, BASE_DEC,
- 0, 0, "File ID (Volume)" }},
+ FT_UINT32, BASE_DEC, 0, 0, "File ID (Volume)" }},
{ &hf_afs_cb_fid_vnode, { "FileID (VNode)", "afs.cb.fid.vnode",
- FT_UINT32, BASE_DEC,
- 0, 0, "File ID (VNode)" }},
+ FT_UINT32, BASE_DEC, 0, 0, "File ID (VNode)" }},
{ &hf_afs_cb_fid_uniqifier, { "FileID (Uniqifier)", "afs.cb.fid.uniq",
- FT_UINT32, BASE_DEC,
- 0, 0, "File ID (Uniqifier)" }},
+ FT_UINT32, BASE_DEC, 0, 0, "File ID (Uniqifier)" }},
/* PROT Server Fields */
{ &hf_afs_prot_errcode, { "Error Code", "afs.prot.errcode",
- FT_UINT32, BASE_DEC,
- VALS(afs_errors), 0, "Error Code" }},
+ FT_UINT32, BASE_DEC, VALS(afs_errors), 0, "Error Code" }},
{ &hf_afs_prot_name, { "Name", "afs.prot.name",
- FT_STRING, BASE_HEX,
- 0, 0, "Name" }},
+ FT_STRING, BASE_HEX, 0, 0, "Name" }},
{ &hf_afs_prot_id, { "ID", "afs.prot.id",
- FT_UINT32, BASE_DEC,
- 0, 0, "ID" }},
+ FT_UINT32, BASE_DEC, 0, 0, "ID" }},
{ &hf_afs_prot_oldid, { "Old ID", "afs.prot.oldid",
- FT_UINT32, BASE_DEC,
- 0, 0, "Old ID" }},
+ FT_UINT32, BASE_DEC, 0, 0, "Old ID" }},
{ &hf_afs_prot_newid, { "New ID", "afs.prot.newid",
- FT_UINT32, BASE_DEC,
- 0, 0, "New ID" }},
+ FT_UINT32, BASE_DEC, 0, 0, "New ID" }},
{ &hf_afs_prot_gid, { "Group ID", "afs.prot.gid",
- FT_UINT32, BASE_DEC,
- 0, 0, "Group ID" }},
+ FT_UINT32, BASE_DEC, 0, 0, "Group ID" }},
{ &hf_afs_prot_uid, { "User ID", "afs.prot.uid",
- FT_UINT32, BASE_DEC,
- 0, 0, "User ID" }},
+ FT_UINT32, BASE_DEC, 0, 0, "User ID" }},
{ &hf_afs_prot_count, { "Count", "afs.prot.count",
- FT_UINT32, BASE_DEC,
- 0, 0, "Count" }},
+ FT_UINT32, BASE_DEC, 0, 0, "Count" }},
{ &hf_afs_prot_maxgid, { "Maximum Group ID", "afs.prot.maxgid",
- FT_UINT32, BASE_DEC,
- 0, 0, "Maximum Group ID" }},
+ FT_UINT32, BASE_DEC, 0, 0, "Maximum Group ID" }},
{ &hf_afs_prot_maxuid, { "Maximum User ID", "afs.prot.maxuid",
- FT_UINT32, BASE_DEC,
- 0, 0, "Maximum User ID" }},
+ FT_UINT32, BASE_DEC, 0, 0, "Maximum User ID" }},
{ &hf_afs_prot_pos, { "Position", "afs.prot.pos",
- FT_UINT32, BASE_DEC,
- 0, 0, "Position" }},
+ FT_UINT32, BASE_DEC, 0, 0, "Position" }},
{ &hf_afs_prot_flag, { "Flag", "afs.prot.flag",
- FT_UINT32, BASE_HEX,
- 0, 0, "Flag" }},
+ FT_UINT32, BASE_HEX, 0, 0, "Flag" }},
/* UBIK Fields */
{ &hf_afs_ubik_errcode, { "Error Code", "afs.ubik.errcode",
- FT_UINT32, BASE_DEC,
- VALS(afs_errors), 0, "Error Code" }},
+ FT_UINT32, BASE_DEC, VALS(afs_errors), 0, "Error Code" }},
{ &hf_afs_ubik_version_epoch, { "Epoch", "afs.ubik.version.epoch",
- FT_ABSOLUTE_TIME, BASE_DEC,
- 0, 0, "Epoch" }},
+ FT_ABSOLUTE_TIME, BASE_DEC, 0, 0, "Epoch" }},
{ &hf_afs_ubik_votestart, { "Vote Started", "afs.ubik.votestart",
- FT_ABSOLUTE_TIME, BASE_DEC,
- 0, 0, "Vote Started" }},
+ FT_ABSOLUTE_TIME, BASE_DEC, 0, 0, "Vote Started" }},
{ &hf_afs_ubik_voteend, { "Vote Ends", "afs.ubik.voteend",
- FT_ABSOLUTE_TIME, BASE_DEC,
- 0, 0, "Vote Ends" }},
+ FT_ABSOLUTE_TIME, BASE_DEC, 0, 0, "Vote Ends" }},
{ &hf_afs_ubik_version_counter, { "Counter", "afs.ubik.version.counter",
- FT_UINT32, BASE_DEC,
- 0, 0, "Counter" }},
+ FT_UINT32, BASE_DEC, 0, 0, "Counter" }},
{ &hf_afs_ubik_file, { "File", "afs.ubik.file",
- FT_UINT32, BASE_DEC,
- 0, 0, "File" }},
+ FT_UINT32, BASE_DEC, 0, 0, "File" }},
{ &hf_afs_ubik_pos, { "Position", "afs.ubik.position",
- FT_UINT32, BASE_DEC,
- 0, 0, "Position" }},
+ FT_UINT32, BASE_DEC, 0, 0, "Position" }},
{ &hf_afs_ubik_length, { "Length", "afs.ubik.length",
- FT_UINT32, BASE_DEC,
- 0, 0, "Length" }},
+ FT_UINT32, BASE_DEC, 0, 0, "Length" }},
{ &hf_afs_ubik_locktype, { "Lock Type", "afs.ubik.locktype",
- FT_UINT32, BASE_DEC,
- VALS(ubik_lock_types), 0, "Lock Type" }},
+ FT_UINT32, BASE_DEC, VALS(ubik_lock_types), 0, "Lock Type" }},
{ &hf_afs_ubik_votetype, { "Vote Type", "afs.ubik.votetype",
- FT_BOOLEAN, BASE_HEX,
- 0, 0, "Vote Type" }},
+ FT_BOOLEAN, BASE_HEX, 0, 0, "Vote Type" }},
{ &hf_afs_ubik_syncsite, { "Syncsite", "afs.ubik.syncsite",
- FT_BOOLEAN, BASE_HEX,
- 0, 0, "Syncsite" }},
+ FT_BOOLEAN, BASE_HEX, 0, 0, "Syncsite" }},
{ &hf_afs_ubik_site, { "Site", "afs.ubik.site",
FT_IPv4, BASE_HEX, 0, 0, "Site" }},
diff --git a/packet-afs.c b/packet-afs.c
index 5ccee4ca20..1e62d7c35b 100644
--- a/packet-afs.c
+++ b/packet-afs.c
@@ -8,7 +8,7 @@
* Portions based on information/specs retrieved from the OpenAFS sources at
* www.openafs.org, Copyright IBM.
*
- * $Id: packet-afs.c,v 1.21 2000/11/03 19:27:11 nneul Exp $
+ * $Id: packet-afs.c,v 1.22 2000/11/03 22:11:36 nneul Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -509,20 +509,26 @@ dissect_fs_reply(const u_char *pd, int offset, frame_data *fd, proto_tree *tree,
struct rx_header *rxh;
unsigned char *data;
int doffset, curoffset;
+ int seq;
rxh = (struct rx_header *) &pd[offset];
data = (char *)rxh + sizeof(struct rx_header);
doffset = offset + sizeof(struct rx_header);
curoffset = doffset;
+ seq = pntohl(&rxh->seq);
+
if ( rxh->type == RX_PACKET_TYPE_DATA )
{
switch ( opcode )
{
case 130: /* fetch data */
- OUT_FS_AFSFetchStatus("Status");
- OUT_FS_AFSCallBack();
- OUT_FS_AFSVolSync();
+ if ( seq == 1 ) /* only on first packet */
+ {
+ OUT_FS_AFSFetchStatus("Status");
+ OUT_FS_AFSCallBack();
+ OUT_FS_AFSVolSync();
+ }
OUT_BYTES_ALL(hf_afs_fs_data);
break;
case 131: /* fetch acl */
@@ -852,8 +858,120 @@ dissect_bos_reply(const u_char *pd, int offset, frame_data *fd, proto_tree *tree
{
switch ( opcode )
{
+ case 80: /* create bnode */
+ /* no output */
+ break;
+ case 81: /* delete bnode */
+ /* no output */
+ break;
+ case 82: /* set status */
+ /* no output */
+ break;
+ case 83: /* get status */
+ OUT_INT(hf_afs_bos_status);
+ OUT_STRING(hf_afs_bos_statusdesc);
+ break;
+ case 84: /* enumerate instance */
+ OUT_STRING(hf_afs_bos_instance);
+ break;
case 85: /* get instance info */
OUT_STRING(hf_afs_bos_type);
+ OUT_BOS_STATUS();
+ break;
+ case 86: /* get instance parm */
+ OUT_STRING(hf_afs_bos_parm);
+ break;
+ case 87: /* add siperuser */
+ /* no output */
+ break;
+ case 88: /* delete superuser */
+ /* no output */
+ break;
+ case 89: /* list superusers */
+ OUT_STRING(hf_afs_bos_user);
+ break;
+ case 90: /* list keys */
+ OUT_UINT(hf_afs_bos_kvno);
+ OUT_BOS_KEY();
+ OUT_BOS_KEYINFO();
+ break;
+ case 91: /* add key */
+ /* no output */
+ break;
+ case 92: /* delete key */
+ /* no output */
+ break;
+ case 93: /* set cell name */
+ /* no output */
+ break;
+ case 94: /* get cell name */
+ OUT_STRING(hf_afs_bos_cell);
+ break;
+ case 95: /* get cell host */
+ OUT_STRING(hf_afs_bos_host);
+ break;
+ case 96: /* add cell host */
+ /* no output */
+ break;
+ case 97: /* delete cell host */
+ /* no output */
+ break;
+ case 98: /* set tstatus */
+ /* no output */
+ break;
+ case 99: /* shutdown all */
+ /* no output */
+ break;
+ case 100: /* restart all */
+ /* no output */
+ break;
+ case 101: /* startup all */
+ /* no output */
+ break;
+ case 102: /* set noauth flag */
+ /* no output */
+ break;
+ case 103: /* rebozo */
+ /* no output */
+ break;
+ case 104: /* restart */
+ /* no output */
+ break;
+ case 105: /* install */
+ /* no output */
+ break;
+ case 106: /* uninstall */
+ /* no output */
+ break;
+ case 107: /* get dates */
+ OUT_DATE(hf_afs_bos_newtime);
+ OUT_DATE(hf_afs_bos_baktime);
+ OUT_DATE(hf_afs_bos_oldtime);
+ break;
+ case 108: /* exec */
+ /* no output */
+ break;
+ case 109: /* prune */
+ /* no output */
+ break;
+ case 110: /* set restart time */
+ /* no output */
+ break;
+ case 111: /* get restart time */
+ OUT_BOS_TIME();
+ break;
+ case 112: /* get log */
+ /* need to make this dump a big string somehow */
+ OUT_BYTES_ALL(hf_afs_bos_data);
+ break;
+ case 113: /* wait all */
+ /* no output */
+ break;
+ case 114: /* get instance strings */
+ OUT_STRING(hf_afs_bos_error);
+ OUT_STRING(hf_afs_bos_spare1);
+ OUT_STRING(hf_afs_bos_spare2);
+ OUT_STRING(hf_afs_bos_spare3);
break;
}
}
@@ -882,45 +1000,120 @@ dissect_bos_request(const u_char *pd, int offset, frame_data *fd, proto_tree *tr
case 80: /* create b node */
OUT_STRING(hf_afs_bos_type);
OUT_STRING(hf_afs_bos_instance);
+ OUT_STRING(hf_afs_bos_parm);
+ OUT_STRING(hf_afs_bos_parm);
+ OUT_STRING(hf_afs_bos_parm);
+ OUT_STRING(hf_afs_bos_parm);
+ OUT_STRING(hf_afs_bos_parm);
+ OUT_STRING(hf_afs_bos_parm);
break;
case 81: /* delete b node */
- case 83: /* get status */
- case 85: /* get instance info */
- case 87: /* add super user */
- case 88: /* delete super user */
- case 93: /* set cell name */
- case 96: /* add cell host */
- case 97: /* delete cell host */
- case 104: /* restart */
- case 106: /* uninstall */
- case 108: /* exec */
- case 112: /* get log */
- case 114: /* get instance strings */
- OUT_STRING(hf_afs_bos_content);
+ OUT_STRING(hf_afs_bos_instance);
break;
case 82: /* set status */
- case 98: /* set t status */
- OUT_STRING(hf_afs_bos_content);
+ OUT_STRING(hf_afs_bos_instance);
OUT_UINT(hf_afs_bos_status);
break;
+ case 83: /* get status */
+ OUT_STRING(hf_afs_bos_instance);
+ break;
+ case 84: /* enumerate instance */
+ OUT_UINT(hf_afs_bos_num);
+ break;
+ case 85: /* get instance info */
+ OUT_STRING(hf_afs_bos_instance);
+ break;
case 86: /* get instance parm */
OUT_STRING(hf_afs_bos_instance);
OUT_UINT(hf_afs_bos_num);
break;
- case 84: /* enumerate instance */
+ case 87: /* add super user */
+ OUT_STRING(hf_afs_bos_user);
+ break;
+ case 88: /* delete super user */
+ OUT_STRING(hf_afs_bos_user);
+ break;
case 89: /* list super users */
+ OUT_UINT(hf_afs_bos_num);
+ break;
case 90: /* list keys */
+ OUT_UINT(hf_afs_bos_num);
+ break;
case 91: /* add key */
+ OUT_UINT(hf_afs_bos_num);
+ OUT_BOS_KEY();
+ break;
case 92: /* delete key */
+ OUT_UINT(hf_afs_bos_num);
+ break;
+ case 93: /* set cell name */
+ OUT_STRING(hf_afs_bos_content);
+ break;
case 95: /* set cell host */
OUT_UINT(hf_afs_bos_num);
break;
- case 105: /* install */
+ case 96: /* add cell host */
OUT_STRING(hf_afs_bos_content);
+ break;
+ case 97: /* delete cell host */
+ OUT_STRING(hf_afs_bos_content);
+ break;
+ case 98: /* set t status */
+ OUT_STRING(hf_afs_bos_content);
+ OUT_UINT(hf_afs_bos_status);
+ break;
+ case 99: /* shutdown all */
+ /* no params */
+ break;
+ case 100: /* restart all */
+ /* no params */
+ break;
+ case 101: /* startup all */
+ /* no params */
+ break;
+ case 102: /* set no-auth flag */
+ OUT_UINT(hf_afs_bos_flags);
+ break;
+ case 103: /* re-bozo? */
+ /* no params */
+ break;
+ case 104: /* restart */
+ OUT_STRING(hf_afs_bos_instance);
+ break;
+ case 105: /* install */
+ OUT_STRING(hf_afs_bos_path);
OUT_UINT(hf_afs_bos_size);
OUT_UINT(hf_afs_bos_flags);
OUT_UINT(hf_afs_bos_date);
break;
+ case 106: /* uninstall */
+ OUT_STRING(hf_afs_bos_path);
+ break;
+ case 107: /* get dates */
+ OUT_STRING(hf_afs_bos_path);
+ break;
+ case 108: /* exec */
+ OUT_STRING(hf_afs_bos_cmd);
+ break;
+ case 109: /* prune */
+ OUT_UINT(hf_afs_bos_flags);
+ break;
+ case 110: /* set restart time */
+ OUT_UINT(hf_afs_bos_num);
+ OUT_BOS_TIME();
+ break;
+ case 111: /* get restart time */
+ OUT_UINT(hf_afs_bos_num);
+ break;
+ case 112: /* get log */
+ OUT_STRING(hf_afs_bos_file);
+ break;
+ case 113: /* wait all */
+ /* no params */
+ break;
+ case 114: /* get instance strings */
+ OUT_STRING(hf_afs_bos_content);
+ break;
}
}