From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23696 invoked by alias); 26 Mar 2008 12:30:54 -0000 Received: (qmail 23679 invoked by uid 22791); 26 Mar 2008 12:30:52 -0000 X-Spam-Check-By: sourceware.org Received: from d5152C2DE.access.telenet.be (HELO lx-dmz.televic.com) (81.82.194.222) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 26 Mar 2008 12:30:26 +0000 Received: (qmail 3225 invoked from network); 26 Mar 2008 12:30:23 -0000 Received: from nt-email.televic.com (10.0.0.9) by lx-dmz.televic.com with SMTP; 26 Mar 2008 12:30:23 -0000 Received: from [10.0.56.4] ([10.0.56.4]) by nt-email.TELEVIC.COM with Microsoft SMTPSVC(6.0.3790.1830); Wed, 26 Mar 2008 13:30:22 +0100 Message-ID: <47EA41DE.6030204@televic.com> Date: Wed, 26 Mar 2008 15:27:00 -0000 From: =?GB2312?B?Sqi5cmdlbiBMYW1icmVjaHQ=?= User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.13) Gecko/20060414 MIME-Version: 1.0 To: venice , ecos-discuss@ecos.sourceware.org References: In-Reply-To: Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] How does the freebsd socket call the drivers? X-SW-Source: 2008-03/txt/msg00146.txt.bz2 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