Re: scsi traffic sniffing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2009/9/2 Jonathan Nell <crtrn13@xxxxxxxxx>:
> 2009/9/2 谢纲 <xiegang112@xxxxxxxxx>:
>> On Tue, Sep 1, 2009 at 6:40 PM, 谢纲<xiegang112@xxxxxxxxx> wrote:
>>> On Tue, Sep 1, 2009 at 2:13 PM, Jonathan Nell<crtrn13@xxxxxxxxx> wrote:
>>>> Is there any way to sniff the traffic of a scsi device? I need to
>>>> debug a firmware update and need to see the traffic being passed to
>>>> the drive
>>> You may hook the queue_command function of the scsi host. It can sniff
>>> all scsi request to scsi host driver.
>>> Thanks,
>>
>> I developed a tool to dump all the SCSI cmds to SCSI device. The idea
>> is, every SCSI host controller driver should give the queue_command
>> fucntion. This is the entrance for SCSI request to SCSI host
>> controller driver. I replace this function with my own dump methord
>> and after dump, I restore this function.
>>
>> I do't know if it's what you need.
>
> That would be great! Could you send the code to me? How does your tool
> hook into queue_command?
The code could be found at
http://blog.chinaunix.net/u/15278/showart_1966962.html. You need do
some modification according your kernel.
It's very simple to hook the queue_command. I just backup the original
function pointer somewhere and after dump, I restore it. Pls refer the
code for detail.

Thanks,
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>



-- 
Xie Gang
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux