Implement SIOCGETSGCNT_IN6 ioctl#3615
Conversation
Unfortunately this isn't really done as-is since the ioctl value does not uniquely identify this ioctl. Some way to check the socket AF is needed to disambiguate :(
|
If you extend this PR with testcases for IPv4 and IPv6, I can implement the socket-family tracking. Basically we're going to need a new subclass of Another approach would be to get the inode number by reading |
|
Attaching a FileMonitor subclass to every socket fd would be less than ideal because it would disable syscall buffering for them. |
We could do something like Another approach here might be to just ignore the socket family and treat everything as IPv6. Looks like that will mostly work since the IPv6 buffer is always longer than the IPv4 buffer and it's mostly OK to record more than we need. We would want to handle the case where the IPv4 buffer is at the end of a memory mapping so we can't record all of it. |
Unfortunately this isn't really done as-is since the ioctl value does not uniquely identify this ioctl. Some way to check the socket AF is needed to disambiguate :(
If someone with more experience in hacking on
rrcould take this off my hands that'd be much appreciated… I'm not sure I can dig through to implement figuring out the socket's AF