I have the IP address info which is only available at run-time when
the board boots up. What is the easiest way to pass this info from
kernel space to an user app running in user space?
Thanks,
Peter
Same way you'd do it on any other operating system. Open a socket,
call ioctl(fd, SIOCGIFCONF...).
Mind, that particular interface is horribly ugly, and it's possible
that the getifaddrs() API is available.
--
Steve Watt KD6GGD PP-ASEL-IA ICBM: 121W 56' 57.5" / 37N 20' 15.3"
Internet: steve @ Watt.COM Whois: SW32-ARIN
Free time? There's no such thing. It just comes in varying prices...
Any idea? Thanks.
This doesn't make sense.
IP addresses are not configured into kernels. Period. You don't need
to modify an Ethernet driver to change the IP address unless the person
who coded the Ethernet driver Just Didn't Get It(TM).
They are sometimes configured into KDIs, which is a kernel and a
filesystem joined at the hip for ease of handling in an embedded
system.
So, where's the IP address in question coming from? If it's in the KDI,
then you need to change the KDI. If it's something that gets set via,
say, dhcp, you need to fetch it from there.
If it's provided via some web form or similar configuration mechanism,
you make sure that the rc script in the KDI knows what bit of non-volatile
memory to look at to find the non-default IP address to use.