how to find out time of received tcp packet?

i want know, how i can get time, when i received a tcp packet from socket by recv().is it real?

Do you want to find out what time it is when you recv() returns? What do you mean by “is it real?”. What is real, the packet or the time?

Unless you use libcap it is not possible.

libcap? what is it?

lmgtfy.com/?q=what+is+libcap

lmqtfy.com that’s hilarious Mario, and so much more polite than rtfm.

How does the saying goes? Don’t give fish to the starved but instead show them how to fish ;-)