MATLAB: Read the commands being sent out on Ethernet port

data packetsetherenetkeithley

I have a Keithley 3706 – S switcher, which is supplied with its own software. This software communicates with the device via TCP IP. I know that I could send packets using Matlab. I am trying to interact with a Keithley 3706 – S switcher via Matlab(R2007a) using the ethernet.
I need to know the structure of the commands being sent from the software to the device so that I can send the same structure using Matlab. Is there a way I can read what structure is being sent out on the ethernet port using Matlab so that, I could initiate the same directly from Matlab.

Best Answer

It is possible using the netcat libraries that underlie the tcpudpip user contributed program. Usually, though, you would use a program made for this purpose, as such programs can decode the tcp headers (which can be crucial.)
I suggest starting with windump
Related Question