getifaddrs support for rtems?

Keith Robertson kjrobert at
Fri Sep 14 16:18:18 UTC 2007

Joel Sherrill wrote:
> Keith Robertson wrote:
>> Hi.
>> 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.

Stupid question: the freebsd man pages have entries for getifaddrs and 
similar, however, I can't find it mentioned anywhere on lxr for freebsd 
at:  For linux, this makes sense, as it's provided 
by glibc, however, who would provide this for freebsd?

Does anyone know where this would be implemented in the other BSDs?

> 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.

Will do, once I can find some reference material.  I'm by no means an 
expert in the vagueries of bsd/unix deep networking compatibility issues.

>> [1] I'm currently endeavouring to port norm (NACK-Oriented Reliable 
>> Multicast): although 
>> I've run across other applications that require these functions.
> Is that related to MDP from the Navy? 

It's an IETF draft standard that follows on from MDP.  Norm and it's 
implementation are based on MDP and developed by the same group at the 
US Navy.

> Please add this to the Wiki list for Free Software that supports
> RTEMS when you get far enough. :)

For sure.


More information about the users mailing list