From: "Jürgen Lambrecht" <J.Lambrecht@televic.com>
To: venice <venice.tu@live.com>, ecos-discuss@ecos.sourceware.org
Subject: Re: [ECOS] How does the freebsd socket call the drivers?
Date: Wed, 26 Mar 2008 15:27:00 -0000 [thread overview]
Message-ID: <47EA41DE.6030204@televic.com> (raw)
In-Reply-To: <BLU108-DS30EC0DA36CCD9DE1A8FA69EFD0@phx.gbl>
venice wrote:
> Hi, I'm writing a net driver and I have a driver template to do that
> but I still do not know how the applications call the drivers through
> the freebsd stack. So can you explain the calling functions of the
> freebsd stack to the drivers?
> eg:
> HRDWR_send() can send data by the hardware but who will call this
> function and provide the data buffer to be transported?
Your driver implements it in
ecos\packages\devs\eth\[family]\[platform]\current\src\xxx.c
There a macro fills in the function pointer HRDWR_send(), in my case
stdims_eth_send:
ETH_DRV_SC(stdims_eth_sc0,
(void*) &stdims_eth0,
"eth0",
stdims_eth_start,
stdims_eth_stop,
stdims_eth_control,
stdims_eth_can_send,
stdims_eth_send,
stdims_eth_recv,
stdims_eth_deliver,
stdims_eth_poll,
stdims_eth_intvector);
NETDEVTAB_ENTRY(stdims_eth_netdev0,
"stdims_eth0",
stdims_eth_init,
&stdims_eth_sc0);
In the documentation you can read the calling order.
J篓鹿rgen Lambrecht
>
> Regards,
> Venice
>
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
next prev parent reply other threads:[~2008-03-26 12:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-24 14:35 venice
2008-03-26 15:27 ` Jürgen Lambrecht [this message]
[not found] ` <BLU108-DS2355FC752EBFF4BB490D79EFE0@phx.gbl>
2008-03-27 8:28 ` Jürgen Lambrecht
2008-03-27 8:25 venice
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47EA41DE.6030204@televic.com \
--to=j.lambrecht@televic.com \
--cc=ecos-discuss@ecos.sourceware.org \
--cc=venice.tu@live.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).