This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: How does the freebsd socket call the drivers?
- From: Jürgen Lambrecht <J dot Lambrecht at televic dot com>
- To: venice <venice dot tu at live dot com>, ecos-discuss at ecos dot sourceware dot org
- Date: Wed, 26 Mar 2008 13:30:22 +0100
- Subject: Re: [ECOS] How does the freebsd socket call the drivers?
- References: <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