Tracing a network device
Guys,
I'm working on a network device that will forward some packets before they get to netif_rx and thus net_rx_action. Thus, the forwarded packets handled by my device/protocol would not be traced by the existing trace utility (AF_PACKET etc.), correct? Am I correct in assuming that there is no existing way to trace such fast-forwarded packets?
Mmy proposed solution to the problem is to implement a socket type for my (new) protocol family that will allow such packets to be traced. Simply open a socket eg socket(AF_MINE, SOCK_RAW, MYPROTO_TRACE) and you get a copy of the packets from the driver. Is this an acceptable solution or are people cringing at the thought?
I came across the ethertap driver and it seems to do something along the lines of what I want to do, but I need to look at it more closely.
Comments?
Thanks,
Dave