From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30006 invoked by alias); 25 Sep 2007 13:45:33 -0000 Received: (qmail 29994 invoked by uid 22791); 25 Sep 2007 13:45:32 -0000 X-Spam-Check-By: sourceware.org Received: from ip-212-239-176-5.dsl-static.scarlet.be (HELO lx-dmz.televic.com) (212.239.176.5) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 25 Sep 2007 13:45:26 +0000 Received: (qmail 29154 invoked from network); 25 Sep 2007 13:45:15 -0000 Received: from nt-email.televic.com (10.0.0.9) by lx-dmz.televic.com with SMTP; 25 Sep 2007 13:45:15 -0000 Received: from [127.0.0.1] ([10.0.60.1]) by nt-email.TELEVIC.COM with Microsoft SMTPSVC(6.0.3790.1830); Tue, 25 Sep 2007 15:45:15 +0200 Message-ID: <46F910E9.4080100@televic.com> Date: Tue, 25 Sep 2007 13:45:00 -0000 From: Juergen Lambrecht User-Agent: Thunderbird 1.5.0.13 (Windows/20070809) MIME-Version: 1.0 To: Emmanuel Coullien CC: ecos-discuss@ecos.sourceware.org References: <3fae21000709250637y28a6d067gf0dec5c844ee2f7d@mail.gmail.com> In-Reply-To: <3fae21000709250637y28a6d067gf0dec5c844ee2f7d@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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] Ethernet Link status question X-SW-Source: 2007-09/txt/msg00130.txt.bz2 If your network driver supports the ETH_DRV_GET_IF_STATS option of the control function, then you can poll the control function. See cyg/io/eth/eth_drv_stats.h for the struct ether_drv_stats.operational. See http://ecos.sourceware.org/docs-latest/ref/io-eth-drv-api-funcs.html. Emmanuel Coullien wrote: > Hi, > > I try to know what is the Ethernet link status from the application level. > I just would like to write a function like this : int > eth_link_state ("eth0"); which return 1 if the Ethernet is up. > I want to respect the different ecos layer to do this but I didn't > find any answer in the ecos-discuss history. > Do someone have an idea how to do this properly ? > > Thank you for your response. > > Emmanuel Coullien > > -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss