[Rtl]rtNet: howto send raw ethernet frames.
kleine-budde at gmx.de
Wed Nov 6 18:22:33 CET 2002
On Wed, 6 Nov 2002 yodaiken at fsmlabs.com wrote:
> On Wed, Nov 06, 2002 at 04:22:41PM +0100, Marc Kleine-Budde wrote:
> > Hi!
> > You can send RAW Ethernet frames with rtai & RTnet, you just have to
> > export some symbols. But this function is protected by a semaphore, so you
> > should use them only in rtai. Contact me, and I can send you a patch...
> What? I didn't realize that RTnet could do raw frames that's good.
> What is the semaphore needed for and why does that matter?
Well, it's a complete stack ;) somewhere you have the RAW packets...:
And you can send raw packets. I cannot rate how good or bad the Interface
is, cause I've never send RAW packets before, but it works.
Concerning the semaphore:
Wenn you want to send a packet, you have to call the rtskb_xmit()
function. This functions is used by the stack, and thus beeing used by the
apps. This function is the sending routine in the appropriate NIC driver.
The sema grants exclusive access.
If you use this function in kernel space (in an init routine of a
module...) and the sema block, or wants to block. But block what? If
understand rtai right, you can only block a rtai task, right?
regards - Marc
More information about the Rtai