As the title says, I used the command candump can0 can1
to watch frames on the CAN bus, but I can't distinguish which frames are received and which are sent.
Sometimes I need the timestamp of received frames to analyze problems.
I don`t know if candump supports these.
As said in the comments, the CAN protocol does not keep tracks of sender/receiver. The only data identifying a message is the message ID. In a common CAN network, each devices is assigned specifc ID for transmission and reception. You need to know the CAN network definition (or CAN matrix) to properly understand the content of a CAN bus.
The definition are most commonly stored into a .dbc file, a proprietary file format that many tools supports. These file describe how to interpret CAN messages, but also list the nodes in the network and what message ID is attributed to each node. Car manufacturers normally don't share these definition files. Some big manufacturer won't even share them with their partners developping ECU going inside the car... (and I am talking of experience here)
Note that some protocols layered above the CAN layer encode a source/destination address in the message ID (generally only through extended CAN frame with 29bits ID). Protocol such as J1939 and ISO-15765-3 (used with UDS) does that.