David,
Currently we have needed only these two versions.
libCom/osi/os/default/osdNetIntf.c
libCom/osi/os/win32/osdNetIntf.c
Currently all of the UNIX systems have found the default version to be
sufficient after allowing for some small os dependent variations in the
implementation of ifreq_size().
> On NetBSD, this function returns information that is "inconsistent" with
> Linux, I believe.
As I understand it Darwin (MAC OSX) is working fine with the default
osdNetIntf.c but it does need the more advanced implementation of
ifreq_size(). Be careful to have a look at the two variants of ifreq_size()
and make certain that a proper implementation is selected for NetBSD. If
ifreq_size() was wrong you might see complete garbage in the returned
structures.
This is the default:
epics\base\src\libCom\osi\os\alpha\osdSock.h(70):
#define ifreq_size(pifreq) (sizeof(pifreq->ifr_name))
Here is Darwin (probably the closest relative of NetBSD supported so far):
epics\base\src\libCom\osi\os\Darwin\osdSock.h(80):
#define ifreq_size(pifreq) ((pifreq)->ifr_addr.sa_len +
sizeof((pifreq)->ifr_name))
Linux:
epics\base\src\libCom\osi\os\Linux\osdSock.h(93):
#define ifreq_size(pifreq) (sizeof(pifreq->ifr_name))
Nevertheless, the source is organized so that you could easily provide an
osdNetIntf.c override in libCom/osi/os/NetBSD based on getifaddrs should
that prove to be necessary.
An implementation based on getifaddrs might be useful but perhaps not yet a
portability bullet as it is not in, for example, my latest vxWorks at hand
(vxWorks 5.4) nor in http://www.opengroup.org/pubs/online/7908799/.
Jeff
- References:
- NetBSD: implementation of "osiSockDiscoverInterfaceAddresses()" David Dudley
- Navigate by Date:
- Prev:
Re: ezca and ENUM D. Peter Siddons
- Next:
Re: VME Bus Error handling on MVME3100 and 6100 boards Andrew Johnson
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
<2006>
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
NetBSD: implementation of "osiSockDiscoverInterfaceAddresses()" David Dudley
- Next:
New Technology Alert: X-Ray-based Ultra-high Density Optical Memory (X-ROM) X-ROM, Inc.
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
<2006>
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|