Tracing a network device

Dave Cecil (dcecil@oz.agile.tv)
Tue, 15 May 2001 19:03:57 +1000


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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/