This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Stopping and restarting Ethernet LAN
- From: Jonathan Larmour <jlarmour at redhat dot com>
- To: Geoff Patch <grp at cea dot com dot au>
- Cc: "'ecos-discuss at sources dot redhat dot com'" <ecos-discuss at sources dot redhat dot com>
- Date: Fri, 22 Feb 2002 17:52:36 +0000
- Subject: Re: [ECOS] Stopping and restarting Ethernet LAN
- Organization: Red Hat UK Ltd.
- References: <01C1BAE4.3FC3A220.grp@cea.com.au>
Geoff Patch wrote:
>
> Hi Folks,
>
> I'd like to be able to stop and restart the ethernet interface to my board.
> I know that the ethernet driver provides functions for doing this, but I'm
> unsure what the correct technique is for accessing those functions from my
> application code.
>
> At the moment, it looks like I need to search through the network device
> table until I find the interface named "eth0", and then access the driver
> functions through the device_instance field of the cyg_netdevtab_entry_t
> struct. Is this correct, or is there any easier way to do it? I have the
> feeling that I might have got bogged down in the details of the driver and
> missed something obvious.
IIRC, use the SIOCSIFFLAGS ioctl to bring the interface down and up. See
init_net in bootp_support.c for an example.
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss