Re: raw network packets

Andi Kleen (ak@muc.de)
Sat, 29 May 1999 10:11:17 +0200


In muc.lists.linux-kernel, you wrote:
>I receive packets from my fieldbus driver. I want to do the
>protocol-stuff in userland. How can I pass the raw packets up to a
>socket created by a userland application?
>of cause I would like to limit my coding to the driver module and keep
>my fingers away from the original kernel files.
>
>I guess it must be something about skb->mac.raw, skb->nh.raw and
>skb->h.raw.
>
>But I do seem to need to register a protocol type with the network core
>so my packets would not get droped. Is this right? What else do I need
>to get my packets though to userland with minimal effort?

Such a facility is already builtin - SOCK_PACKET (2.0)/PF_PACKET (2.2). There
you can bind to L2 protocol types.

-Andi

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