I have a userspace C library that transffers data using RDMA / Infiniband networks protocols. This data is not seen by netstat (and neither by IP layer in the kernel). However, my library holds a standard socket file descriptior as a "shadow socket" for each of my communication handles.
The problem is that currently netstat shows that nothing is transffered on my "fake socket". I want to inject statistics of my traffic to somewhere in the system so they will be reported by netstat as the statistic of that "shadow socket".
Empahasis: RDMA/Infiniband network protocols goes from userspace directly to the network card (bypassing the kernel).
I see 2 general ways to do that:
- Extend netstat to run 3rd party plugins of user network protocols. This way I will be able to write a plugin that will return to netstat the statistics of my traffic.
- Inject to the kernel the statiscs of my traffic as the statistcs of the "shadow socket" This way they will automatically be seen when someone execue netstat.
Does someone has idea on the best way for that?