~ubuntu-branches/ubuntu/gutsy/wireshark/gutsy-security

« back to all changes in this revision

Viewing changes to epan/dissectors/packet-scsi-smc.c

  • Committer: Bazaar Package Importer
  • Author(s): Frederic Peters
  • Date: 2007-04-01 08:58:40 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070401085840-or3qhrpv8alt1bwg
Tags: 0.99.5-1
* New upstream release.
* debian/patches/09_idl2wrs.dpatch: updated to patch idl2wrs.sh.in.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* packet-scsi-smc.c
 
2
 * Dissector for the SCSI SMC commandset
 
3
 * Extracted from packet-scsi.c
 
4
 *
 
5
 * Dinesh G Dutt (ddutt@cisco.com)
 
6
 * Ronnie sahlberg 2006
 
7
 *
 
8
 * $Id: packet-scsi-smc.c 19964 2006-11-23 09:21:16Z sahlberg $
 
9
 *
 
10
 * Wireshark - Network traffic analyzer
 
11
 * By Gerald Combs <gerald@wireshark.org>
 
12
 * Copyright 2002 Gerald Combs
 
13
 *
 
14
 * This program is free software; you can redistribute it and/or
 
15
 * modify it under the terms of the GNU General Public License
 
16
 * as published by the Free Software Foundation; either version 2
 
17
 * of the License, or (at your option) any later version.
 
18
 *
 
19
 * This program is distributed in the hope that it will be useful,
 
20
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
21
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
22
 * GNU General Public License for more details.
 
23
 *
 
24
 * You should have received a copy of the GNU General Public License
 
25
 * along with this program; if not, write to the Free Software
 
26
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
27
 */
 
28
 
 
29
#ifdef HAVE_CONFIG_H
 
30
# include "config.h"
 
31
#endif
 
32
 
 
33
#include <glib.h>
 
34
#include <string.h>
 
35
#include <epan/strutil.h>
 
36
#include <epan/packet.h>
 
37
#include <epan/prefs.h>
 
38
#include <epan/emem.h>
 
39
#include <epan/conversation.h>
 
40
#include <epan/tap.h>
 
41
#include "packet-scsi.h"
 
42
#include "packet-fc.h"
 
43
#include "packet-scsi-smc.h"
 
44
 
 
45
 
 
46
static int proto_scsi_smc               = -1;
 
47
int hf_scsi_smc_opcode                  = -1;
 
48
 
 
49
 
 
50
 
 
51
void
 
52
dissect_smc2_movemedium (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
 
53
                    guint offset, gboolean isreq, gboolean iscdb,
 
54
                    guint payload_len _U_, scsi_task_data_t *cdata _U_)
 
55
{
 
56
    guint8 flags;
 
57
 
 
58
    if (tree && isreq && iscdb) {
 
59
        proto_tree_add_text (tree, tvb, offset+1, 2,
 
60
                             "Medium Transport Address: %u",
 
61
                             tvb_get_ntohs (tvb, offset+1));
 
62
        proto_tree_add_text (tree, tvb, offset+3, 2,
 
63
                             "Source Address: %u",
 
64
                             tvb_get_ntohs (tvb, offset+3));
 
65
        proto_tree_add_text (tree, tvb, offset+5, 2,
 
66
                             "Destination Address: %u",
 
67
                             tvb_get_ntohs (tvb, offset+5));
 
68
        flags = tvb_get_guint8 (tvb, offset+9);
 
69
        proto_tree_add_text (tree, tvb, offset+9, 1,
 
70
                             "INV: %u", flags & 0x01);
 
71
        flags = tvb_get_guint8 (tvb, offset+10);
 
72
        proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+10, 1,
 
73
                                    flags,
 
74
                                    "Vendor Unique = %u, NACA = %u, Link = %u",
 
75
                                    flags & 0xC0, flags & 0x4, flags & 0x1);
 
76
    }
 
77
}
 
78
 
 
79
#define MT_ELEM  0x1
 
80
#define ST_ELEM  0x2
 
81
#define I_E_ELEM 0x3
 
82
#define DT_ELEM  0x4
 
83
 
 
84
static const value_string element_type_code_vals[] = {
 
85
    {0x0,      "All element types"},
 
86
    {MT_ELEM,  "Medium transport element"},
 
87
    {ST_ELEM,  "Storage element"},
 
88
    {I_E_ELEM, "Import/export element"},
 
89
    {DT_ELEM,  "Data transfer element"},
 
90
    {0, NULL}
 
91
};
 
92
 
 
93
#define PVOLTAG 0x80
 
94
#define AVOLTAG 0x40
 
95
 
 
96
#define EXCEPT 0x04
 
97
 
 
98
#define ID_VALID 0x20
 
99
#define LU_VALID 0x10
 
100
 
 
101
#define SVALID 0x80
 
102
 
 
103
static void
 
104
dissect_scsi_smc2_volume_tag (tvbuff_t *tvb, packet_info *pinfo _U_,
 
105
                              proto_tree *tree, guint offset,
 
106
                              const char *name)
 
107
{
 
108
    char volid[32+1];
 
109
    char *p;
 
110
 
 
111
    tvb_memcpy (tvb, (guint8 *)volid, offset, 32);
 
112
    p = &volid[32];
 
113
    for (;;) {
 
114
        *p = '\0';
 
115
        if (p == volid)
 
116
            break;
 
117
        if (*(p - 1) != ' ')
 
118
            break;
 
119
        p--;
 
120
    }
 
121
    proto_tree_add_text (tree, tvb, offset, 36,
 
122
                         "%s: Volume Identification = \"%s\", Volume Sequence Number = %u",
 
123
                         name, volid, tvb_get_ntohs (tvb, offset+34));
 
124
}
 
125
 
 
126
 
 
127
static void
 
128
dissect_scsi_smc2_element (tvbuff_t *tvb, packet_info *pinfo _U_,
 
129
                         proto_tree *tree, guint offset,
 
130
                         guint elem_bytecnt, guint8 elem_type,
 
131
                         guint8 voltag_flags)
 
132
{
 
133
    guint8 flags;
 
134
    guint8 ident_len;
 
135
 
 
136
    if (elem_bytecnt < 2)
 
137
        return;
 
138
    proto_tree_add_text (tree, tvb, offset, 2,
 
139
                         "Element Address: %u",
 
140
                         tvb_get_ntohs (tvb, offset));
 
141
    offset += 2;
 
142
    elem_bytecnt -= 2;
 
143
 
 
144
    if (elem_bytecnt < 1)
 
145
        return;
 
146
    flags = tvb_get_guint8 (tvb, offset);
 
147
    switch (elem_type) {
 
148
 
 
149
    case MT_ELEM:
 
150
        proto_tree_add_text (tree, tvb, offset, 1,
 
151
                            "EXCEPT: %u, FULL: %u",
 
152
                             (flags & EXCEPT) >> 2, flags & 0x01);
 
153
        break;
 
154
 
 
155
    case ST_ELEM:
 
156
    case DT_ELEM:
 
157
        proto_tree_add_text (tree, tvb, offset, 1,
 
158
                             "ACCESS: %u, EXCEPT: %u, FULL: %u",
 
159
                             (flags & 0x08) >> 3,
 
160
                             (flags & EXCEPT) >> 2, flags & 0x01);
 
161
        break;
 
162
 
 
163
    case I_E_ELEM:
 
164
        proto_tree_add_text (tree, tvb, offset, 1,
 
165
                             "cmc: %u, INENAB: %u, EXENAB: %u, ACCESS: %u, EXCEPT: %u, IMPEXP: %u, FULL: %u",
 
166
                             (flags & 0x40) >> 6,
 
167
                             (flags & 0x20) >> 5,
 
168
                             (flags & 0x10) >> 4,
 
169
                             (flags & 0x08) >> 3,
 
170
                             (flags & EXCEPT) >> 2,
 
171
                             (flags & 0x02) >> 1,
 
172
                             flags & 0x01);
 
173
        break;
 
174
    }
 
175
    offset += 1;
 
176
    elem_bytecnt -= 1;
 
177
 
 
178
    if (elem_bytecnt < 1)
 
179
        return;
 
180
    offset += 1; /* reserved */
 
181
    elem_bytecnt -= 1;
 
182
 
 
183
    if (elem_bytecnt < 2)
 
184
        return;
 
185
    if (flags & EXCEPT) {
 
186
        proto_tree_add_text (tree, tvb, offset, 2,
 
187
                             "Additional Sense Code+Qualifier: %s",
 
188
                             val_to_str (tvb_get_ntohs (tvb, offset),
 
189
                                         scsi_asc_val, "Unknown (0x%04x)"));
 
190
    }
 
191
    offset += 2;
 
192
    elem_bytecnt -= 2;
 
193
 
 
194
    if (elem_bytecnt < 3)
 
195
        return;
 
196
    switch (elem_type) {
 
197
 
 
198
    case DT_ELEM:
 
199
        flags = tvb_get_guint8 (tvb, offset);
 
200
        if (flags & LU_VALID) {
 
201
            proto_tree_add_text (tree, tvb, offset, 1,
 
202
                                 "NOT BUS: %u, ID VALID: %u, LU VALID: 1, LUN: %u",
 
203
                                 (flags & 0x80) >> 7,
 
204
                                 (flags & ID_VALID) >> 5,
 
205
                                 flags & 0x07);
 
206
        } else if (flags & ID_VALID) {
 
207
            proto_tree_add_text (tree, tvb, offset, 1,
 
208
                                 "ID VALID: 1, LU VALID: 0");
 
209
        } else {
 
210
            proto_tree_add_text (tree, tvb, offset, 1,
 
211
                                 "ID VALID: 0, LU VALID: 0");
 
212
        }
 
213
        offset += 1;
 
214
        if (flags & ID_VALID) {
 
215
            proto_tree_add_text (tree, tvb, offset, 1,
 
216
                                 "SCSI Bus Address: %u",
 
217
                                 tvb_get_guint8 (tvb, offset));
 
218
        }
 
219
        offset += 1;
 
220
        offset += 1; /* reserved */
 
221
        break;
 
222
 
 
223
    default:
 
224
        offset += 3; /* reserved */
 
225
        break;
 
226
    }
 
227
    elem_bytecnt -= 3;
 
228
 
 
229
    if (elem_bytecnt < 3)
 
230
        return;
 
231
    flags = tvb_get_guint8 (tvb, offset);
 
232
    if (flags & SVALID) {
 
233
        proto_tree_add_text (tree, tvb, offset, 1,
 
234
                             "SVALID: 1, INVERT: %u",
 
235
                             (flags & 0x40) >> 6);
 
236
        offset += 1;
 
237
        proto_tree_add_text (tree, tvb, offset, 2,
 
238
                             "Source Storage Element Address: %u",
 
239
                             tvb_get_ntohs (tvb, offset));
 
240
        offset += 2;
 
241
    } else {
 
242
        proto_tree_add_text (tree, tvb, offset, 1,
 
243
                             "SVALID: 0");
 
244
        offset += 3;
 
245
    }
 
246
    elem_bytecnt -= 3;
 
247
 
 
248
    if (voltag_flags & PVOLTAG) {
 
249
        if (elem_bytecnt < 36)
 
250
            return;
 
251
        dissect_scsi_smc2_volume_tag (tvb, pinfo, tree, offset,
 
252
                                      "Primary Volume Tag Information");
 
253
        offset += 36;
 
254
        elem_bytecnt -= 36;
 
255
    }
 
256
 
 
257
    if (voltag_flags & AVOLTAG) {
 
258
        if (elem_bytecnt < 36)
 
259
            return;
 
260
        dissect_scsi_smc2_volume_tag (tvb, pinfo, tree, offset,
 
261
                                      "Alternate Volume Tag Information");
 
262
        offset += 36;
 
263
        elem_bytecnt -= 36;
 
264
    }
 
265
 
 
266
    if (elem_bytecnt < 1)
 
267
        return;
 
268
    flags = tvb_get_guint8 (tvb, offset);
 
269
    proto_tree_add_text (tree, tvb, offset, 1,
 
270
                         "Code Set: %s",
 
271
                         val_to_str (flags & 0x0F,
 
272
                                     scsi_devid_codeset_val,
 
273
                                     "Unknown (0x%02x)"));
 
274
    offset += 1;
 
275
    elem_bytecnt -= 1;
 
276
 
 
277
    if (elem_bytecnt < 1)
 
278
        return;
 
279
    flags = tvb_get_guint8 (tvb, offset);
 
280
    proto_tree_add_text (tree, tvb, offset, 1,
 
281
                         "Identifier Type: %s",
 
282
                         val_to_str ((flags & 0x0F),
 
283
                                     scsi_devid_idtype_val,
 
284
                                     "Unknown (0x%02x)"));
 
285
    offset += 1;
 
286
    elem_bytecnt -= 1;
 
287
 
 
288
    if (elem_bytecnt < 1)
 
289
        return;
 
290
    offset += 1; /* reserved */
 
291
    elem_bytecnt -= 1;
 
292
 
 
293
    if (elem_bytecnt < 1)
 
294
        return;
 
295
    ident_len = tvb_get_guint8 (tvb, offset);
 
296
    proto_tree_add_text (tree, tvb, offset, 1,
 
297
                         "Identifier Length: %u",
 
298
                         ident_len);
 
299
    offset += 1;
 
300
    elem_bytecnt -= 1;
 
301
 
 
302
    if (ident_len != 0) {
 
303
        if (elem_bytecnt < ident_len)
 
304
            return;
 
305
        proto_tree_add_text (tree, tvb, offset, ident_len,
 
306
                             "Identifier: %s",
 
307
                             tvb_bytes_to_str (tvb, offset, ident_len));
 
308
        offset += ident_len;
 
309
        elem_bytecnt -= ident_len;
 
310
    }
 
311
    if (elem_bytecnt != 0) {
 
312
        proto_tree_add_text (tree, tvb, offset, elem_bytecnt,
 
313
                             "Vendor-specific Data: %s",
 
314
                             tvb_bytes_to_str (tvb, offset, elem_bytecnt));
 
315
    }
 
316
}
 
317
 
 
318
 
 
319
static void
 
320
dissect_scsi_smc2_elements (tvbuff_t *tvb, packet_info *pinfo,
 
321
                            proto_tree *tree, guint offset,
 
322
                            guint desc_bytecnt, guint8 elem_type,
 
323
                            guint8 voltag_flags, guint16 elem_desc_len)
 
324
{
 
325
    guint elem_bytecnt;
 
326
 
 
327
    while (desc_bytecnt != 0) {
 
328
        elem_bytecnt = elem_desc_len;
 
329
        if (elem_bytecnt > desc_bytecnt)
 
330
            elem_bytecnt = desc_bytecnt;
 
331
        dissect_scsi_smc2_element (tvb, pinfo, tree, offset, elem_bytecnt,
 
332
                                   elem_type, voltag_flags);
 
333
        offset += elem_bytecnt;
 
334
        desc_bytecnt -= elem_bytecnt;
 
335
    }
 
336
}
 
337
 
 
338
 
 
339
void
 
340
dissect_smc2_readelementstatus (tvbuff_t *tvb, packet_info *pinfo,
 
341
                         proto_tree *tree, guint offset, gboolean isreq,
 
342
                         gboolean iscdb,
 
343
                         guint payload_len _U_, scsi_task_data_t *cdata _U_)
 
344
{
 
345
    guint8 flags;
 
346
    guint numelem, bytecnt, desc_bytecnt;
 
347
    guint8 elem_type;
 
348
    guint8 voltag_flags;
 
349
    guint16 elem_desc_len;
 
350
 
 
351
    if (!tree)
 
352
        return;
 
353
 
 
354
    if (isreq && iscdb) {
 
355
        flags = tvb_get_guint8 (tvb, offset);
 
356
        proto_tree_add_text (tree, tvb, offset, 1,
 
357
                             "VOLTAG: %u, Element Type Code: %s",
 
358
                             (flags & 0x10) >> 4,
 
359
                             val_to_str (flags & 0xF, element_type_code_vals,
 
360
                                         "Unknown (0x%x)"));
 
361
        proto_tree_add_text (tree, tvb, offset+1, 2,
 
362
                             "Starting Element Address: %u",
 
363
                             tvb_get_ntohs (tvb, offset+1));
 
364
        proto_tree_add_text (tree, tvb, offset+3, 2,
 
365
                             "Number of Elements: %u",
 
366
                             tvb_get_ntohs (tvb, offset+3));
 
367
        flags = tvb_get_guint8 (tvb, offset+4);
 
368
        proto_tree_add_text (tree, tvb, offset+4, 1,
 
369
                             "CURDATA: %u, DVCID: %u",
 
370
                             (flags & 0x02) >> 1, flags & 0x01);
 
371
        proto_tree_add_text (tree, tvb, offset+6, 3,
 
372
                             "Allocation Length: %u",
 
373
                             tvb_get_ntoh24 (tvb, offset+6));
 
374
        flags = tvb_get_guint8 (tvb, offset+10);
 
375
        proto_tree_add_uint_format (tree, hf_scsi_control, tvb, offset+10, 1,
 
376
                                    flags,
 
377
                                    "Vendor Unique = %u, NACA = %u, Link = %u",
 
378
                                    flags & 0xC0, flags & 0x4, flags & 0x1);
 
379
    }
 
380
    else if (!isreq) {
 
381
        proto_tree_add_text (tree, tvb, offset, 2,
 
382
                             "First Element Address Reported: %u",
 
383
                             tvb_get_ntohs (tvb, offset));
 
384
        offset += 2;
 
385
        numelem = tvb_get_ntohs (tvb, offset);
 
386
        proto_tree_add_text (tree, tvb, offset, 2,
 
387
                             "Number of Elements Available: %u", numelem);
 
388
        offset += 2;
 
389
        offset += 1; /* reserved */
 
390
        bytecnt = tvb_get_ntoh24 (tvb, offset);
 
391
        proto_tree_add_text (tree, tvb, offset, 3,
 
392
                             "Byte Count of Report Available: %u", bytecnt);
 
393
        offset += 3;
 
394
        while (bytecnt != 0) {
 
395
            if (bytecnt < 1)
 
396
                break;
 
397
            elem_type = tvb_get_guint8 (tvb, offset);
 
398
            proto_tree_add_text (tree, tvb, offset, 1,
 
399
                                 "Element Type Code: %s",
 
400
                                 val_to_str (elem_type, element_type_code_vals,
 
401
                                             "Unknown (0x%x)"));
 
402
            offset += 1;
 
403
            bytecnt -= 1;
 
404
 
 
405
            if (bytecnt < 1)
 
406
                break;
 
407
            voltag_flags = tvb_get_guint8 (tvb, offset);
 
408
            proto_tree_add_text (tree, tvb, offset, 1,
 
409
                                 "PVOLTAG: %u, AVOLTAG: %u",
 
410
                                 (voltag_flags & PVOLTAG) >> 7,
 
411
                                 (voltag_flags & AVOLTAG) >> 6);
 
412
            offset += 1;
 
413
            bytecnt -= 1;
 
414
 
 
415
            if (bytecnt < 2)
 
416
                break;
 
417
            elem_desc_len = tvb_get_ntohs (tvb, offset);
 
418
            proto_tree_add_text (tree, tvb, offset, 2,
 
419
                                 "Element Descriptor Length: %u",
 
420
                                 elem_desc_len);
 
421
            offset += 2;
 
422
            bytecnt -= 2;
 
423
 
 
424
            if (bytecnt < 1)
 
425
                break;
 
426
            offset += 1; /* reserved */
 
427
            bytecnt -= 1;
 
428
 
 
429
            if (bytecnt < 3)
 
430
                break;
 
431
            desc_bytecnt = tvb_get_ntoh24 (tvb, offset);
 
432
            proto_tree_add_text (tree, tvb, offset, 3,
 
433
                                 "Byte Count Of Descriptor Data Available: %u",
 
434
                                 desc_bytecnt);
 
435
            offset += 3;
 
436
            bytecnt -= 3;
 
437
 
 
438
            if (desc_bytecnt > bytecnt)
 
439
                desc_bytecnt = bytecnt;
 
440
            dissect_scsi_smc2_elements (tvb, pinfo, tree, offset,
 
441
                                        desc_bytecnt, elem_type,
 
442
                                        voltag_flags, elem_desc_len);
 
443
            offset += desc_bytecnt;
 
444
            bytecnt -= desc_bytecnt;
 
445
        }
 
446
    }
 
447
}
 
448
 
 
449
 
 
450
 
 
451
/* SMC Commands */
 
452
const value_string scsi_smc_vals[] = {
 
453
    {SCSI_SMC2_EXCHANGE_MEDIUM                , "Exchange Medium"},
 
454
    {SCSI_SMC2_INITIALIZE_ELEMENT_STATUS      , "Initialize Element Status"},
 
455
    {SCSI_SMC2_INITIALIZE_ELEMENT_STATUS_RANGE, "Initialize Element Status With Range"},
 
456
    {SCSI_SPC2_INQUIRY                        , "Inquiry"},
 
457
    {SCSI_SPC2_LOGSELECT                      , "Log Select"},
 
458
    {SCSI_SPC2_LOGSENSE                       , "Log Sense"},
 
459
    {SCSI_SPC2_MODESELECT6                    , "Mode Select(6)"},
 
460
    {SCSI_SPC2_MODESELECT10                   , "Mode Select(10)"},
 
461
    {SCSI_SPC2_MODESENSE6                     , "Mode Sense(6)"},
 
462
    {SCSI_SPC2_MODESENSE10                    , "Mode Sense(10)"},
 
463
    {SCSI_SMC2_MOVE_MEDIUM                    , "Move Medium"},
 
464
    {SCSI_SMC2_MOVE_MEDIUM_ATTACHED           , "Move Medium Attached"},
 
465
    {SCSI_SPC2_PERSRESVIN                     , "Persistent Reserve In"},
 
466
    {SCSI_SPC2_PERSRESVOUT                    , "Persistent Reserve Out"},
 
467
    {SCSI_SMC2_POSITION_TO_ELEMENT            , "Position To Element"},
 
468
    {SCSI_SPC2_PREVMEDREMOVAL                 , "Prevent/Allow Medium Removal"},
 
469
    {SCSI_SMC2_READ_ATTRIBUTE                 , "Read Attribute"},
 
470
    {SCSI_SMC2_READ_ELEMENT_STATUS            , "Read Element Status"},
 
471
    {SCSI_SMC2_READ_ELEMENT_STATUS_ATTACHED   , "Read Element Status Attached"},
 
472
    {SCSI_SPC2_RELEASE6                       , "Release(6)"},
 
473
    {SCSI_SPC2_RELEASE10                      , "Release(10)"},
 
474
    {SCSI_SPC2_REPORTLUNS                     , "Report LUNs"},
 
475
    {SCSI_SPC2_REQSENSE                       , "Request Sense"},
 
476
    {SCSI_SMC2_REQUEST_VOLUME_ELEMENT_ADDRESS , "Request Volume Element Address"},
 
477
    {SCSI_SPC2_RESERVE6                       , "Reserve(6)"},
 
478
    {SCSI_SPC2_RESERVE10                      , "Reserve(10)"},
 
479
    {SCSI_SMC2_SEND_VOLUME_TAG                , "Send Volume Tag"},
 
480
    {SCSI_SPC2_SENDDIAG                       , "Send Diagnostic"},
 
481
    {SCSI_SPC2_TESTUNITRDY                    , "Test Unit Ready"},
 
482
    {SCSI_SMC2_WRITE_ATTRIBUTE                , "Write Attribute"},
 
483
    {SCSI_SPC2_WRITEBUFFER                    , "Write Buffer"},
 
484
    {0, NULL},
 
485
};
 
486
 
 
487
scsi_cdb_table_t scsi_smc_table[256] = {
 
488
/*SPC 0x00*/{dissect_spc3_testunitready},
 
489
/*SMC 0x01*/{NULL},
 
490
/*SMC 0x02*/{NULL},
 
491
/*SPC 0x03*/{dissect_spc3_requestsense},
 
492
/*SMC 0x04*/{NULL},
 
493
/*SMC 0x05*/{NULL},
 
494
/*SMC 0x06*/{NULL},
 
495
/*SMC 0x07*/{NULL},
 
496
/*SMC 0x08*/{NULL},
 
497
/*SMC 0x09*/{NULL},
 
498
/*SMC 0x0a*/{NULL},
 
499
/*SMC 0x0b*/{NULL},
 
500
/*SMC 0x0c*/{NULL},
 
501
/*SMC 0x0d*/{NULL},
 
502
/*SMC 0x0e*/{NULL},
 
503
/*SMC 0x0f*/{NULL},
 
504
/*SMC 0x10*/{NULL},
 
505
/*SMC 0x11*/{NULL},
 
506
/*SPC 0x12*/{dissect_spc3_inquiry},
 
507
/*SMC 0x13*/{NULL},
 
508
/*SMC 0x14*/{NULL},
 
509
/*SPC 0x15*/{dissect_spc3_modeselect6},
 
510
/*SPC 0x16*/{dissect_spc2_reserve6},
 
511
/*SPC 0x17*/{dissect_spc2_release6},
 
512
/*SMC 0x18*/{NULL},
 
513
/*SMC 0x19*/{NULL},
 
514
/*SPC 0x1a*/{dissect_spc3_modesense6},
 
515
/*SMC 0x1b*/{NULL},
 
516
/*SMC 0x1c*/{NULL},
 
517
/*SPC 0x1d*/{dissect_spc3_senddiagnostic},
 
518
/*SMC 0x1e*/{dissect_spc3_preventallowmediaremoval},
 
519
/*SMC 0x1f*/{NULL},
 
520
/*SMC 0x20*/{NULL},
 
521
/*SMC 0x21*/{NULL},
 
522
/*SMC 0x22*/{NULL},
 
523
/*SMC 0x23*/{NULL},
 
524
/*SMC 0x24*/{NULL},
 
525
/*SMC 0x25*/{NULL},
 
526
/*SMC 0x26*/{NULL},
 
527
/*SMC 0x27*/{NULL},
 
528
/*SMC 0x28*/{NULL},
 
529
/*SMC 0x29*/{NULL},
 
530
/*SMC 0x2a*/{NULL},
 
531
/*SMC 0x2b*/{NULL},
 
532
/*SMC 0x2c*/{NULL},
 
533
/*SMC 0x2d*/{NULL},
 
534
/*SMC 0x2e*/{NULL},
 
535
/*SMC 0x2f*/{NULL},
 
536
/*SMC 0x30*/{NULL},
 
537
/*SMC 0x31*/{NULL},
 
538
/*SMC 0x32*/{NULL},
 
539
/*SMC 0x33*/{NULL},
 
540
/*SMC 0x34*/{NULL},
 
541
/*SMC 0x35*/{NULL},
 
542
/*SMC 0x36*/{NULL},
 
543
/*SMC 0x37*/{NULL},
 
544
/*SMC 0x38*/{NULL},
 
545
/*SMC 0x39*/{NULL},
 
546
/*SMC 0x3a*/{NULL},
 
547
/*SPC 0x3b*/{dissect_spc3_writebuffer},
 
548
/*SMC 0x3c*/{NULL},
 
549
/*SMC 0x3d*/{NULL},
 
550
/*SMC 0x3e*/{NULL},
 
551
/*SMC 0x3f*/{NULL},
 
552
/*SMC 0x40*/{NULL},
 
553
/*SMC 0x41*/{NULL},
 
554
/*SMC 0x42*/{NULL},
 
555
/*SMC 0x43*/{NULL},
 
556
/*SMC 0x44*/{NULL},
 
557
/*SMC 0x45*/{NULL},
 
558
/*SMC 0x46*/{NULL},
 
559
/*SMC 0x47*/{NULL},
 
560
/*SMC 0x48*/{NULL},
 
561
/*SMC 0x49*/{NULL},
 
562
/*SMC 0x4a*/{NULL},
 
563
/*SMC 0x4b*/{NULL},
 
564
/*SPC 0x4c*/{dissect_spc3_logselect},
 
565
/*SPC 0x4d*/{dissect_spc3_logsense},
 
566
/*SMC 0x4e*/{NULL},
 
567
/*SMC 0x4f*/{NULL},
 
568
/*SMC 0x50*/{NULL},
 
569
/*SMC 0x51*/{NULL},
 
570
/*SMC 0x52*/{NULL},
 
571
/*SMC 0x53*/{NULL},
 
572
/*SMC 0x54*/{NULL},
 
573
/*SPC 0x55*/{dissect_spc3_modeselect10},
 
574
/*SPC 0x56*/{dissect_spc2_reserve10},
 
575
/*SPC 0x57*/{dissect_spc2_release10},
 
576
/*SMC 0x58*/{NULL},
 
577
/*SMC 0x59*/{NULL},
 
578
/*SPC 0x5a*/{dissect_spc3_modesense10},
 
579
/*SMC 0x5b*/{NULL},
 
580
/*SMC 0x5c*/{NULL},
 
581
/*SMC 0x5d*/{NULL},
 
582
/*SPC 0x5e*/{dissect_spc3_persistentreservein},
 
583
/*SPC 0x5f*/{dissect_spc3_persistentreserveout},
 
584
/*SMC 0x60*/{NULL},
 
585
/*SMC 0x61*/{NULL},
 
586
/*SMC 0x62*/{NULL},
 
587
/*SMC 0x63*/{NULL},
 
588
/*SMC 0x64*/{NULL},
 
589
/*SMC 0x65*/{NULL},
 
590
/*SMC 0x66*/{NULL},
 
591
/*SMC 0x67*/{NULL},
 
592
/*SMC 0x68*/{NULL},
 
593
/*SMC 0x69*/{NULL},
 
594
/*SMC 0x6a*/{NULL},
 
595
/*SMC 0x6b*/{NULL},
 
596
/*SMC 0x6c*/{NULL},
 
597
/*SMC 0x6d*/{NULL},
 
598
/*SMC 0x6e*/{NULL},
 
599
/*SMC 0x6f*/{NULL},
 
600
/*SMC 0x70*/{NULL},
 
601
/*SMC 0x71*/{NULL},
 
602
/*SMC 0x72*/{NULL},
 
603
/*SMC 0x73*/{NULL},
 
604
/*SMC 0x74*/{NULL},
 
605
/*SMC 0x75*/{NULL},
 
606
/*SMC 0x76*/{NULL},
 
607
/*SMC 0x77*/{NULL},
 
608
/*SMC 0x78*/{NULL},
 
609
/*SMC 0x79*/{NULL},
 
610
/*SMC 0x7a*/{NULL},
 
611
/*SMC 0x7b*/{NULL},
 
612
/*SMC 0x7c*/{NULL},
 
613
/*SMC 0x7d*/{NULL},
 
614
/*SMC 0x7e*/{NULL},
 
615
/*SMC 0x7f*/{NULL},
 
616
/*SMC 0x80*/{NULL},
 
617
/*SMC 0x81*/{NULL},
 
618
/*SMC 0x82*/{NULL},
 
619
/*SMC 0x83*/{NULL},
 
620
/*SMC 0x84*/{NULL},
 
621
/*SMC 0x85*/{NULL},
 
622
/*SMC 0x86*/{NULL},
 
623
/*SMC 0x87*/{NULL},
 
624
/*SMC 0x88*/{NULL},
 
625
/*SMC 0x89*/{NULL},
 
626
/*SMC 0x8a*/{NULL},
 
627
/*SMC 0x8b*/{NULL},
 
628
/*SMC 0x8c*/{NULL},
 
629
/*SMC 0x8d*/{NULL},
 
630
/*SMC 0x8e*/{NULL},
 
631
/*SMC 0x8f*/{NULL},
 
632
/*SMC 0x90*/{NULL},
 
633
/*SMC 0x91*/{NULL},
 
634
/*SMC 0x92*/{NULL},
 
635
/*SMC 0x93*/{NULL},
 
636
/*SMC 0x94*/{NULL},
 
637
/*SMC 0x95*/{NULL},
 
638
/*SMC 0x96*/{NULL},
 
639
/*SMC 0x97*/{NULL},
 
640
/*SMC 0x98*/{NULL},
 
641
/*SMC 0x99*/{NULL},
 
642
/*SMC 0x9a*/{NULL},
 
643
/*SMC 0x9b*/{NULL},
 
644
/*SMC 0x9c*/{NULL},
 
645
/*SMC 0x9d*/{NULL},
 
646
/*SMC 0x9e*/{NULL},
 
647
/*SMC 0x9f*/{NULL},
 
648
/*SPC 0xa0*/{dissect_spc3_reportluns},
 
649
/*SMC 0xa1*/{NULL},
 
650
/*SMC 0xa2*/{NULL},
 
651
/*SMC 0xa3*/{NULL},
 
652
/*SMC 0xa4*/{NULL},
 
653
/*SMC 0xa5*/{dissect_smc2_movemedium},
 
654
/*SMC 0xa6*/{NULL},
 
655
/*SMC 0xa7*/{dissect_smc2_movemedium},
 
656
/*SMC 0xa8*/{NULL},
 
657
/*SMC 0xa9*/{NULL},
 
658
/*SMC 0xaa*/{NULL},
 
659
/*SMC 0xab*/{NULL},
 
660
/*SMC 0xac*/{NULL},
 
661
/*SMC 0xad*/{NULL},
 
662
/*SMC 0xae*/{NULL},
 
663
/*SMC 0xaf*/{NULL},
 
664
/*SMC 0xb0*/{NULL},
 
665
/*SMC 0xb1*/{NULL},
 
666
/*SMC 0xb2*/{NULL},
 
667
/*SMC 0xb3*/{NULL},
 
668
/*SMC 0xb4*/{dissect_smc2_readelementstatus},
 
669
/*SMC 0xb5*/{NULL},
 
670
/*SMC 0xb6*/{NULL},
 
671
/*SMC 0xb7*/{NULL},
 
672
/*SMC 0xb8*/{dissect_smc2_readelementstatus},
 
673
/*SMC 0xb9*/{NULL},
 
674
/*SMC 0xba*/{NULL},
 
675
/*SMC 0xbb*/{NULL},
 
676
/*SMC 0xbc*/{NULL},
 
677
/*SMC 0xbd*/{NULL},
 
678
/*SMC 0xbe*/{NULL},
 
679
/*SMC 0xbf*/{NULL},
 
680
/*SMC 0xc0*/{NULL},
 
681
/*SMC 0xc1*/{NULL},
 
682
/*SMC 0xc2*/{NULL},
 
683
/*SMC 0xc3*/{NULL},
 
684
/*SMC 0xc4*/{NULL},
 
685
/*SMC 0xc5*/{NULL},
 
686
/*SMC 0xc6*/{NULL},
 
687
/*SMC 0xc7*/{NULL},
 
688
/*SMC 0xc8*/{NULL},
 
689
/*SMC 0xc9*/{NULL},
 
690
/*SMC 0xca*/{NULL},
 
691
/*SMC 0xcb*/{NULL},
 
692
/*SMC 0xcc*/{NULL},
 
693
/*SMC 0xcd*/{NULL},
 
694
/*SMC 0xce*/{NULL},
 
695
/*SMC 0xcf*/{NULL},
 
696
/*SMC 0xd0*/{NULL},
 
697
/*SMC 0xd1*/{NULL},
 
698
/*SMC 0xd2*/{NULL},
 
699
/*SMC 0xd3*/{NULL},
 
700
/*SMC 0xd4*/{NULL},
 
701
/*SMC 0xd5*/{NULL},
 
702
/*SMC 0xd6*/{NULL},
 
703
/*SMC 0xd7*/{NULL},
 
704
/*SMC 0xd8*/{NULL},
 
705
/*SMC 0xd9*/{NULL},
 
706
/*SMC 0xda*/{NULL},
 
707
/*SMC 0xdb*/{NULL},
 
708
/*SMC 0xdc*/{NULL},
 
709
/*SMC 0xdd*/{NULL},
 
710
/*SMC 0xde*/{NULL},
 
711
/*SMC 0xdf*/{NULL},
 
712
/*SMC 0xe0*/{NULL},
 
713
/*SMC 0xe1*/{NULL},
 
714
/*SMC 0xe2*/{NULL},
 
715
/*SMC 0xe3*/{NULL},
 
716
/*SMC 0xe4*/{NULL},
 
717
/*SMC 0xe5*/{NULL},
 
718
/*SMC 0xe6*/{NULL},
 
719
/*SMC 0xe7*/{NULL},
 
720
/*SMC 0xe8*/{NULL},
 
721
/*SMC 0xe9*/{NULL},
 
722
/*SMC 0xea*/{NULL},
 
723
/*SMC 0xeb*/{NULL},
 
724
/*SMC 0xec*/{NULL},
 
725
/*SMC 0xed*/{NULL},
 
726
/*SMC 0xee*/{NULL},
 
727
/*SMC 0xef*/{NULL},
 
728
/*SMC 0xf0*/{NULL},
 
729
/*SMC 0xf1*/{NULL},
 
730
/*SMC 0xf2*/{NULL},
 
731
/*SMC 0xf3*/{NULL},
 
732
/*SMC 0xf4*/{NULL},
 
733
/*SMC 0xf5*/{NULL},
 
734
/*SMC 0xf6*/{NULL},
 
735
/*SMC 0xf7*/{NULL},
 
736
/*SMC 0xf8*/{NULL},
 
737
/*SMC 0xf9*/{NULL},
 
738
/*SMC 0xfa*/{NULL},
 
739
/*SMC 0xfb*/{NULL},
 
740
/*SMC 0xfc*/{NULL},
 
741
/*SMC 0xfd*/{NULL},
 
742
/*SMC 0xfe*/{NULL},
 
743
/*SMC 0xff*/{NULL}
 
744
};
 
745
 
 
746
 
 
747
void
 
748
proto_register_scsi_smc(void)
 
749
{
 
750
        static hf_register_info hf[] = {
 
751
        { &hf_scsi_smc_opcode,
 
752
          {"SMC Opcode", "scsi.smc.opcode", FT_UINT8, BASE_HEX,
 
753
           VALS (scsi_smc_vals), 0x0, "", HFILL}},
 
754
        };
 
755
 
 
756
 
 
757
        /* Setup protocol subtree array */
 
758
/*
 
759
        static gint *ett[] = {
 
760
        };
 
761
*/
 
762
 
 
763
        /* Register the protocol name and description */
 
764
        proto_scsi_smc = proto_register_protocol("SCSI_SMC", "SCSI_SMC", "scsi_smc");
 
765
 
 
766
        /* Required function calls to register the header fields and subtrees used */
 
767
        proto_register_field_array(proto_scsi_smc, hf, array_length(hf));
 
768
/*
 
769
        proto_register_subtree_array(ett, array_length(ett));
 
770
*/
 
771
}
 
772
 
 
773
void
 
774
proto_reg_handoff_scsi_smc(void)
 
775
{
 
776
}
 
777