libpnet
libpnet copied to clipboard
Cannot obtain `sockaddr_ll` from `DataLinkReceiver::next`
We want to identify whether a L3 datalink packet is sent to the interface or going outward. However, iterating over a DataLinkReceiver
through DataLinkReceiverImpl::next
only provides data packets, while caddr
and anything else is not accessible.
The man page packet(7) says the sockaddr_ll
contains some useful information where sll_pkttype
might be able to tell which direction the packet is flowing. Is it possible to expose caddr
(defined here) or encapsulate it in an idiomatic way?
I was just about to open an issue for the same thing because I want to filter on PACKET_OUTGOING
. I'm quite new to Rust, but I see caddr being passed all the way to the libc call but no access to it, and its value doesn't even seem to ever be used.
Here someone who wishes he has "close issue privilege" for this project.
So because the lack of that power, I have to be creative.
I think it woud be a good thing that issue would be (silently?) closed. Original reporter has meanwhile proven (bij six months silence) their is no further interrest in the issue.
And the last 24 hours collected this dust collecting issue another "It doesn't work I expect that I should work" plus this rant from me.
And I think another good thing would be an update that shows some effort that this issue is about.
That update should contain these items:
- (good) description of the originel challenge that issue updater is facing
- (some) explanation why libpnet could contribute to a solution of that challenge
- actual source code
- description how to use that code
- good description of the true challenge ( a.k.a. problem )
- spirit from how to ask smart questions
This is a valid feature request, I will leave the issue open.