I am implementing a SMB protocol decoder.
I don’t understand how, when reading a file/named pipe, the client understands that the response is associated with one of many open files/named pipes.
The client sends the file descriptor (file id), but the server does not send it back in the response. The server does not send any data linking the request to the response.
You can verify this by reading about SMB operations such as: SMB_COM_READ, TRANS_READ_NMPIPE in the MS-CIFS standard.
If there were several read requests or even several files/named pipes open, then how does the client understand which request the server responded to?