This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Can't get socket's IP address w/ new stack?
On Mon, Aug 18, 2003 at 10:15:44AM -0500, Grant Edwards wrote:
> On Fri, Aug 15, 2003 at 03:45:50PM -0600, Gary Thomas wrote:
>
> > > I've been googling all afternoon for example code using
> > > SIOCGIFADDR, but all the examples I can find are identical to
> > > what I did with the old stack -- and that doesn't work with the
> > > new stack.
> >
> > What happens if you call _show_all_interfaces() (defined in
> > net/common/current/src/ifaddrs.c)?
>
> 0x003dfd94 - eth0 -
That fact it prints nothing is interesting. That means its not an IPv4
(or IPv6 if you have it configured) address that the interface has. It
would be interesting to print ifp->ifa_addr->sa_family and see what
sort of address it is.
Andrew
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss