[ECOS] ioctl (SIOCADDRT) never returns
Trenton D. Adams
tadams@theone.dnsalias.com
Wed Oct 17 09:10:00 GMT 2001
Actually, I thought it was that call, but apparently it's
if (ioctl(s, SIOCSIFADDR, ifrp)) { /* set ifnet address */
Anyhow, I'm going to try and get my driver going with a static IP first.
I figured that's probably a better way of doing it since I don't know
for sure that the I/O functions actually work yet.
Meanwhile, if anyone has an idea why the above call might hang, pass it
along! Please! :)
> -----Original Message-----
> From: ecos-discuss-owner@sources.redhat.com
> [ mailto:ecos-discuss-owner@sources.redhat.com ] On Behalf Of Hugo Tyson
> Sent: October 17, 2001 9:51 AM
> To: ecos-discuss@sources.redhat.com
> Subject: Re: [ECOS] ioctl (SIOCADDRT) never returns
>
>
>
> "Trenton D. Adams" <tadams@extremeeng.com> writes:
> > The following call in bring_half_up () of
> > "net/tcpip/current/src/lib/dhcp_prot.c" is called, but
> never returns.
> > What is SIOCADDRT exactly? It doesn't lock my program
> because I still
> > receive ticker and RX interrupts from my card. I don't
> know why there
> > are RX interrupts yet, but I'm going to try and find out.
> I need to get
> > a windows packet sniffer in order to be able to find out if the RX
> > interrupts are occuring because of a DHCP packet or
> something. I don't
> > think that's possible at this stage in the startup sequence though!?
> >
> > if (ioctl(s, SIOCADDRT, &route)) { /* add route */
>
> That mnemonic always confuses me too, 'cos you can't help
> parse it as ADDR
> for address and T for ??? but it's actually as in the
> comment: ADD RouTe !
>
> I think it's adding a default global route so you can send
> packets to a
> half-up interface, IIRC. Ie. a route so that the system knows to send
> packets to that interface even without knowing IP addresses
> for the network
> that's on there.
>
> Are you sure that it never returns, rather than "that thread
> is immediately
> preempted by a higher priority thread which then never
> yields", eg. trying
> to run deliveries from your device? Just a thought.
>
> - Huge
>
More information about the Ecos-discuss
mailing list