diff --git a/packet-afs-defs.h b/packet-afs-defs.h index 31162f7637..4ee17e3991 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.5 2000/11/03 22:38:07 nneul Exp $ + * $Id: packet-afs-defs.h,v 1.6 2001/03/23 21:42:37 nneul Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -289,6 +289,8 @@ static const value_string ubik_req[] = { { 10003, "vote-getsyncsite" }, { 10004, "vote-debug" }, { 10005, "vote-sdebug" }, + { 10006, "vote-xdebug" }, + { 10007, "vote-xsdebug" }, { 20000, "disk-begin" }, { 20001, "disk-commit" }, { 20002, "disk-lock" }, @@ -687,7 +689,7 @@ static int hf_afs_ubik_errcode = -1; static int hf_afs_ubik_version_epoch = -1; static int hf_afs_ubik_version_counter = -1; static int hf_afs_ubik_votestart = -1; -static int hf_afs_ubik_syncsite = -1; +static int hf_afs_ubik_state = -1; static int hf_afs_ubik_site = -1; static int hf_afs_ubik_file = -1; static int hf_afs_ubik_pos = -1; diff --git a/packet-afs-macros.h b/packet-afs-macros.h index 31fde80310..6d88af76e5 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.5 2000/11/03 22:38:07 nneul Exp $ + * $Id: packet-afs-macros.h,v 1.6 2001/03/23 21:42:37 nneul Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -451,8 +451,12 @@ "UBIK Version (%s): %u.%u", label, epoch, counter ); \ save = tree; \ tree = proto_item_add_subtree(ti, ett_afs_ubikver); \ + if ( epoch != 0 ) \ proto_tree_add_time(tree,hf_afs_ubik_version_epoch, NullTVB,curoffset-8, \ sizeof(guint32),&tv); \ + else \ + proto_tree_add_text(tree, NullTVB, curoffset-8, \ + sizeof(guint32),"Epoch: 0"); \ proto_tree_add_uint(tree,hf_afs_ubik_version_counter, NullTVB,curoffset-4, \ sizeof(guint32),counter); \ tree = save; \ diff --git a/packet-afs-register-info.h b/packet-afs-register-info.h index d92985c686..fe3cd101e9 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.5 2000/11/03 22:38:07 nneul Exp $ + * $Id: packet-afs-register-info.h,v 1.6 2001/03/23 21:42:37 nneul Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -447,14 +447,16 @@ /* UBIK Fields */ { &hf_afs_ubik_errcode, { "Error Code", "afs.ubik.errcode", FT_UINT32, BASE_DEC, VALS(afs_errors), 0, "Error Code" }}, +{ &hf_afs_ubik_state, { "State", "afs.ubik.state", + FT_UINT32, BASE_HEX, 0, 0, "State" }}, { &hf_afs_ubik_version_epoch, { "Epoch", "afs.ubik.version.epoch", FT_ABSOLUTE_TIME, BASE_DEC, 0, 0, "Epoch" }}, +{ &hf_afs_ubik_version_counter, { "Counter", "afs.ubik.version.counter", + FT_UINT32, BASE_DEC, 0, 0, "Counter" }}, { &hf_afs_ubik_votestart, { "Vote Started", "afs.ubik.votestart", 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" }}, -{ &hf_afs_ubik_version_counter, { "Counter", "afs.ubik.version.counter", - FT_UINT32, BASE_DEC, 0, 0, "Counter" }}, { &hf_afs_ubik_file, { "File", "afs.ubik.file", FT_UINT32, BASE_DEC, 0, 0, "File" }}, { &hf_afs_ubik_pos, { "Position", "afs.ubik.position", @@ -464,8 +466,6 @@ { &hf_afs_ubik_locktype, { "Lock Type", "afs.ubik.locktype", 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" }}, -{ &hf_afs_ubik_syncsite, { "Syncsite", "afs.ubik.syncsite", - FT_BOOLEAN, BASE_HEX, 0, 0, "Syncsite" }}, + FT_UINT32, BASE_HEX, 0, 0, "Vote Type" }}, { &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 b371c380b1..4b85210c17 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.26 2001/01/03 06:55:26 guy Exp $ + * $Id: packet-afs.c,v 1.27 2001/03/23 21:42:37 nneul Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -254,8 +254,6 @@ dissect_afs(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) opcode = request_val->opcode; } - - node = 0; typenode = 0; vals = NULL; @@ -359,7 +357,8 @@ dissect_afs(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) afs_tree = proto_item_add_subtree(ti, ett_afs); if ( !BYTES_ARE_IN_FRAME(offset, sizeof(struct rx_header) + - sizeof(struct afs_header)) ) + sizeof(struct afs_header)) && + typenode != hf_afs_ubik ) { proto_tree_add_text(afs_tree, NullTVB, doffset, END_OF_FRAME, "Service: %s %s (Truncated)", @@ -1651,30 +1650,41 @@ dissect_ubik_reply(const u_char *pd, int offset, frame_data *fd, proto_tree *tre doffset = offset + sizeof(struct rx_header); curoffset = doffset; - if ( rxh->type == RX_PACKET_TYPE_DATA ) + switch ( opcode ) { - switch ( opcode ) - { - case 10000: /* beacon */ - proto_tree_add_boolean(tree,hf_afs_ubik_votetype, NullTVB,0,0,0); - break; - case 20004: /* get version */ - OUT_UBIKVERSION("DB Version"); - break; - } - } - else if ( rxh->type == RX_PACKET_TYPE_ABORT ) - { - switch ( opcode ) - { - case 10000: - proto_tree_add_boolean(tree,hf_afs_ubik_votetype, NullTVB,0,0,1); - OUT_DATE(hf_afs_ubik_voteend); - break; - default: - OUT_UINT(hf_afs_ubik_errcode); - break; - } + case 10000: /* vote-beacon */ + break; + case 10001: /* vote-debug-old */ + /* ubik_debug_old */ + break; + case 10002: /* vote-sdebug-old */ + /* ubik_sdebug_old */ + break; + case 10003: /* vote-get syncsite */ + break; + case 10004: /* vote-debug */ + /* ubik_debug */ + break; + case 10005: /* vote-sdebug */ + /* ubik_sdebug */ + break; + case 10006: /* vote-xdebug */ + /* ubik_debug */ + /* isClone */ + break; + case 10007: /* vote-xsdebug */ + /* ubik_sdebug */ + /* isClone */ + break; + + case 20000: /* disk-begin */ + break; + case 20004: /* get version */ + OUT_UBIKVERSION("DB Version"); + break; + case 20010: /* disk-probe */ + break; + } } @@ -1694,48 +1704,65 @@ dissect_ubik_request(const u_char *pd, int offset, frame_data *fd, proto_tree *t switch ( opcode ) { - case 10000: /* beacon */ - OUT_UINT(hf_afs_ubik_syncsite); + case 10000: /* vote-beacon */ + OUT_UINT(hf_afs_ubik_state); OUT_DATE(hf_afs_ubik_votestart); OUT_UBIKVERSION("DB Version"); OUT_UBIKVERSION("TID"); break; - case 10003: /* get sync site */ + case 10001: /* vote-debug-old */ + break; + case 10002: /* vote-sdebug-old */ + OUT_UINT(hf_afs_ubik_site); + break; + case 10003: /* vote-get sync site */ OUT_IP(hf_afs_ubik_site); break; - case 20000: /* begin */ - case 20001: /* commit */ - case 20007: /* abort */ - case 20008: /* release locks */ - case 20010: /* writev */ + case 10004: /* vote-debug */ + case 10005: /* vote-sdebug */ + OUT_IP(hf_afs_ubik_site); + break; + case 20000: /* disk-begin */ OUT_UBIKVERSION("TID"); break; - case 20002: /* lock */ + case 20001: /* disk-commit */ + OUT_UBIKVERSION("TID"); + break; + case 20002: /* disk-lock */ OUT_UBIKVERSION("TID"); OUT_UINT(hf_afs_ubik_file); OUT_UINT(hf_afs_ubik_pos); OUT_UINT(hf_afs_ubik_length); OUT_UINT(hf_afs_ubik_locktype); break; - case 20003: /* write */ + case 20003: /* disk-write */ OUT_UBIKVERSION("TID"); OUT_UINT(hf_afs_ubik_file); OUT_UINT(hf_afs_ubik_pos); break; - case 20005: /* get file */ + case 20004: /* disk-get version */ + break; + case 20005: /* disk-get file */ OUT_UINT(hf_afs_ubik_file); break; - case 20006: /* send file */ + case 20006: /* disk-send file */ OUT_UINT(hf_afs_ubik_file); OUT_UINT(hf_afs_ubik_length); OUT_UBIKVERSION("DB Version"); break; - case 20009: /* truncate */ + case 20007: /* disk-abort */ + case 20008: /* disk-release locks */ + case 20010: /* disk-probe */ + break; + case 20009: /* disk-truncate */ OUT_UBIKVERSION("TID"); OUT_UINT(hf_afs_ubik_file); OUT_UINT(hf_afs_ubik_length); break; - case 20012: /* set version */ + case 20011: /* disk-writev */ + OUT_UBIKVERSION("TID"); + break; + case 20012: /* disk-set version */ OUT_UBIKVERSION("TID"); OUT_UBIKVERSION("Old DB Version"); OUT_UBIKVERSION("New DB Version"); diff --git a/packet-afs.h b/packet-afs.h index 456f473dd4..43d4e2b70d 100644 --- a/packet-afs.h +++ b/packet-afs.h @@ -1,7 +1,7 @@ /* packet-afs.h * Definitions for packet disassembly structures and routines * - * $Id: packet-afs.h,v 1.2 2000/02/15 21:01:57 gram Exp $ + * $Id: packet-afs.h,v 1.3 2001/03/23 21:42:37 nneul Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -67,7 +67,7 @@ void dissect_afs(const u_char *, int, frame_data *, proto_tree *); #define CB_TYPE_DROPPED 3 #define VOTE_LOW 10000 -#define VOTE_HIGH 10005 +#define VOTE_HIGH 10007 #define DISK_LOW 20000 #define DISK_HIGH 20013