This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Stopping and restarting Ethernet LAN


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]