getifaddrs support for rtems?

Joel Sherrill joel.sherrill at oarcorp.com
Wed Sep 12 20:22:56 UTC 2007


Keith Robertson wrote:
> Hi.
>
> http://www.rtems.com/ml/rtems-users/2006/december/thrd1.html#00142
>
> indicates this has been asked before, and there appears to be some sort 
> of a (AFAIK somewhat involved) work around using the SIOCGIFADDR ioctl.
>
> However, most unixes these days seem to have this function and a few 
> related ones (getifaddrs freeifaddrs if_nametoindex if_indextoname 
> if_nameindex if_freenameindex).
>
> On linux, these appear to be provided by glibc.  As newlib only provides 
> the core libc routines, it understandably doesn't appear to provide 
> these.  To improve the clean portability of other applications to rtems, 
> I'd like to find a way to implement these.   Where would rtems typically 
> obtain such helper routines?  Write them ourselves?  From somewhere in 
> the *Bsd sources?  Elsewhere?
>
>   
The BSD sources are always the best starting point.   From there,
all I can say is use the opengroup  description and write it yourself.

The glibc implementation is OK as a reference but do NOT take
code from it.  I know you wouldn't do that anyway.

If you get them implemented, submit them with a test in netdemos
and I will merge them. The netdemos examples on real hardware usually
have two interfaces so would be more interesting to test against than
just loopback.
> Any other suggestions/pointers?
>
> Cheers.
>
> Keith
>
> [1] I'm currently endeavouring to port norm (NACK-Oriented Reliable 
> Multicast):  http://cs.itd.nrl.navy.mil/work/norm/index.php although 
> I've run across other applications that require these functions.
>   
Is that related to MDP from the Navy?  

Please add this to the Wiki list for Free Software that supports
RTEMS when you get far enough. :)
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.com
> http://rtems.rtems.org/mailman/listinfo/rtems-users
>   




More information about the users mailing list