0

For an Ethernet traffic, in the kernel stmmac driver, when an Ethernet frame is received, the function stmmac_rx is called here:

static int stmmac_rx(struct stmmac_priv *priv, int limit)

I would like to access the content of each frame in the kernel. How can I access the frame content?

Marco Bonelli
  • 63,369
  • 21
  • 118
  • 128
gregoiregentil
  • 1,793
  • 1
  • 26
  • 56
  • You want to access the content of each frame from withing `stmmac` driver's code? So you're going to modify it? Or you just want to access it from your own module? – red0ct Aug 12 '20 at 13:34
  • Looks like the packet is in `skb` after `dma_unmap_single`. – stark Aug 12 '20 at 13:35
  • @red0ct, to be honest, I'm interested for both. First, I would like to see the traffic in that function. Then I will want to process so it could be hacking into that file or doing more cleanly in a separate module. – gregoiregentil Aug 12 '20 at 15:28
  • @stark. Thank you. This is useful – gregoiregentil Aug 12 '20 at 15:56

0 Answers0