You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
pcap_inject doesn't provide any way to retrieve hardware timestamps for transmitted packets. Hence as a work-around, we are currently opening another instance of pcap and listening to own packets to get the timestamp and it happens to be software timestamps.
On debugging the code on our platform pcap was using tpcaket_v2.
And as described by kernel documentation packet_mmap.txt we got to know that tp_status field will be updated to determine timestamp type being reported.
In line-no 5035 of pcap_linux.c after the check of tp_status field. We are checking the tp_status field for TP_STATUS_TS_RAW_HARDWARE and TP_STATUS_TS_SOFTWARE and it happens to be TP_STATUS_TS_SOFTWARE always for transmitted packets.
Any info on how to get tx timestamp with libpcap would be of great help.
The text was updated successfully, but these errors were encountered:
Hi,
Going through kernel documentation packet_mmap.txt I can see that packet_mmap functionality is not being used for transmission of packets in Linux. Is there any particular reason for this. And is my above understanding correct? Any help would be appreciated.
Amar B S <[email protected]> wrote:
Going through kernel documentation packet_mmap.txt I can see that packet_mmap
functionality is not being used for transmission of packets in Linux. Is
there any particular reason for this. And is my above understanding correct?
Any help would be appreciated.
It's not critical path for most current libpcap uses.
Send code.
Hi,
Here is the code. I'm checking for TP_STATUS_TS_RAW_HARDWARE/TP_STATUS_TS_SOFTWARE in tp_status variable.
I have added this in line-no 5035 of pcap_linux.c
Hi,
pcap_inject doesn't provide any way to retrieve hardware timestamps for transmitted packets. Hence as a work-around, we are currently opening another instance of pcap and listening to own packets to get the timestamp and it happens to be software timestamps.
On debugging the code on our platform pcap was using tpcaket_v2.
And as described by kernel documentation packet_mmap.txt we got to know that tp_status field will be updated to determine timestamp type being reported.
In line-no 5035 of pcap_linux.c after the check of tp_status field. We are checking the tp_status field for TP_STATUS_TS_RAW_HARDWARE and TP_STATUS_TS_SOFTWARE and it happens to be TP_STATUS_TS_SOFTWARE always for transmitted packets.
Any info on how to get tx timestamp with libpcap would be of great help.
The text was updated successfully, but these errors were encountered: