-
Notifications
You must be signed in to change notification settings - Fork 854
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP/RFC] [skip ci] Add initial implementation for pcap-openvizsla module #840
base: master
Are you sure you want to change the base?
Conversation
Could you rebase? |
Please add support to the autoconf script as well. |
return PCAP_ERROR; | ||
} | ||
|
||
if ((ret = ov_capture_dispatch(handlep->ov, max_packets)) < 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way in which the callback routine can break out of the loop? If, for example, a callback routine calls pcap_breakloop()
, that should cause pcap_loop()
or pcap_breakloop()
not to process any more packets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
breakloop_op
implementation has been added.
struct pcap_pkthdr pkth; | ||
pkth.caplen = ov_to_host_16(packet->size) + sizeof(struct ov_packet); | ||
pkth.len = pkth.caplen; | ||
pkth.ts.tv_sec = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can no time stamp be supplied?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The device provides 24-bit timestamp with precision of 1/60 usec
. Unfortunately, this value wraps around many times during the capture. What would be preferred way to provide best possible timestamp (combining 24-bit timestamp and the host wall clock)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the 24-bit timestamp goes back to zero about 3.58 times per second, is that correct? (If yes, then just a combination of UNIX time and the 24-bit timestamp does not tell the exact time when a packet was received, especially at less then 3.58 packets per second, it needs to be something else.)
Is there any way to keep the 24-bit timestamp in sync with the host clock, such as sending a pulse to the device every second or a fraction of a second?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct. I think that the simplest way would be to use host receive UNIX timestamp and keep the counter as is.
Could you rebase on top of the-tcpdump-group:master? |
Rebased on master |
|
The module requires libopenvizsla library to communicate with the device.
Hi,
This module is for supporting OpenVizsla hardware USB sniffer. The implementation is based on libopenvizsla library.
DLT was assigned previously: a69f42f