diff options
Diffstat (limited to 'epan/dissectors/packet-dsi.c')
-rw-r--r-- | epan/dissectors/packet-dsi.c | 90 |
1 files changed, 48 insertions, 42 deletions
diff --git a/epan/dissectors/packet-dsi.c b/epan/dissectors/packet-dsi.c index d063906641..5702da5c7e 100644 --- a/epan/dissectors/packet-dsi.c +++ b/epan/dissectors/packet-dsi.c @@ -25,15 +25,21 @@ http://developer.apple.com/DOCUMENTATION/macos8/pdf/ASAppleTalkFiling2.1_2.2.pdf + which is no longer available and does not appear to be in the Wayback Machine. + The netatalk source code by Wesley Craig & Adrian Sun The Data Stream Interface description from - http://developer.apple.com/documentation/Networking/Conceptual/AFPClient/AFPClient-6.html -(no longer available, apparently) +http://developer.apple.com/documentation/Networking/Conceptual/AFPClient/AFPClient-6.html + + which is no longer available, but is archived at + +https://web.archive.org/web/20040924082047/http://developer.apple.com/documentation/Networking/Conceptual/AFPClient/AFPClient-6.html Also, AFP 3.3 documents parts of DSI at: - http://developer.apple.com/mac/library/documentation/Networking/Conceptual/AFP/Introduction/Introduction.html + +http://developer.apple.com/mac/library/documentation/Networking/Conceptual/AFP/Introduction/Introduction.html * What a Data Stream Interface packet looks like: * 0 32 @@ -51,34 +57,36 @@ http://developer.apple.com/DOCUMENTATION/macos8/pdf/ASAppleTalkFiling2.1_2.2.pdf void proto_register_dsi(void); void proto_reg_handoff_dsi(void); -static int proto_dsi = -1; -static int hf_dsi_flags = -1; -static int hf_dsi_command = -1; -static int hf_dsi_requestid = -1; -static int hf_dsi_offset = -1; -static int hf_dsi_error = -1; -static int hf_dsi_length = -1; -static int hf_dsi_reserved = -1; - -static gint ett_dsi = -1; - -static int hf_dsi_open_type = -1; -static int hf_dsi_open_len = -1; -static int hf_dsi_open_quantum = -1; -static int hf_dsi_replay_cache_size = -1; -static int hf_dsi_open_option = -1; - -static int hf_dsi_attn_flag = -1; -static int hf_dsi_attn_flag_shutdown = -1; -static int hf_dsi_attn_flag_crash = -1; -static int hf_dsi_attn_flag_msg = -1; -static int hf_dsi_attn_flag_reconnect = -1; -static int hf_dsi_attn_flag_time = -1; -static int hf_dsi_attn_flag_bitmap = -1; - -static gint ett_dsi_open = -1; -static gint ett_dsi_attn = -1; -static gint ett_dsi_attn_flag = -1; +static dissector_handle_t dsi_handle; + +static int proto_dsi; +static int hf_dsi_flags; +static int hf_dsi_command; +static int hf_dsi_requestid; +static int hf_dsi_offset; +static int hf_dsi_error; +static int hf_dsi_length; +static int hf_dsi_reserved; + +static gint ett_dsi; + +static int hf_dsi_open_type; +static int hf_dsi_open_len; +static int hf_dsi_open_quantum; +static int hf_dsi_replay_cache_size; +static int hf_dsi_open_option; + +static int hf_dsi_attn_flag; +static int hf_dsi_attn_flag_shutdown; +static int hf_dsi_attn_flag_crash; +static int hf_dsi_attn_flag_msg; +static int hf_dsi_attn_flag_reconnect; +static int hf_dsi_attn_flag_time; +static int hf_dsi_attn_flag_bitmap; + +static gint ett_dsi_open; +static gint ett_dsi_attn; +static gint ett_dsi_attn_flag; static const value_string dsi_attn_flag_vals[] = { {0x0, "Reserved" }, /* 0000 */ @@ -216,7 +224,7 @@ dissect_dsi_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* da guint16 dsi_requestid; gint32 dsi_code; guint32 dsi_length; - struct aspinfo aspinfo; + struct atp_asp_dsi_info atp_asp_dsi_info; col_set_str(pinfo->cinfo, COL_PROTOCOL, "DSI"); @@ -288,14 +296,13 @@ dissect_dsi_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* da { tvbuff_t *new_tvb; - aspinfo.reply = (dsi_flags == DSIFL_REPLY); - aspinfo.command = dsi_command; - aspinfo.seq = dsi_requestid; - aspinfo.code = dsi_code; + atp_asp_dsi_info.reply = (dsi_flags == DSIFL_REPLY); + atp_asp_dsi_info.tid = dsi_requestid; + atp_asp_dsi_info.code = dsi_code; proto_item_set_len(dsi_ti, DSI_BLOCKSIZ); new_tvb = tvb_new_subset_remaining(tvb, DSI_BLOCKSIZ); - call_dissector_with_data(afp_handle, new_tvb, pinfo, tree, &aspinfo); + call_dissector_with_data(afp_handle, new_tvb, pinfo, tree, &atp_asp_dsi_info); } break; default: @@ -429,11 +436,11 @@ proto_register_dsi(void) "Attention flag, don't reconnect bit", HFILL }}, { &hf_dsi_attn_flag_time, { "Minutes", "dsi.attn_flag.time", - FT_UINT16, BASE_DEC, NULL, 0xfff, + FT_UINT16, BASE_DEC, NULL, 0x0fff, "Number of minutes", HFILL }}, { &hf_dsi_attn_flag_bitmap, { "Bitmap", "dsi.attn_flag.bitmap", - FT_UINT16, BASE_HEX, NULL, 0xfff, + FT_UINT16, BASE_HEX, NULL, 0x0fff, "Attention extended bitmap", HFILL }}, }; @@ -455,14 +462,13 @@ proto_register_dsi(void) "Whether the DSI dissector should reassemble messages spanning multiple TCP segments." " To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.", &dsi_desegment); + + dsi_handle = register_dissector("dsi", dissect_dsi, proto_dsi); } void proto_reg_handoff_dsi(void) { - dissector_handle_t dsi_handle; - - dsi_handle = create_dissector_handle(dissect_dsi, proto_dsi); dissector_add_uint_with_preference("tcp.port", TCP_PORT_DSI, dsi_handle); afp_handle = find_dissector_add_dependency("afp", proto_dsi); |