EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: osiSockDiscoverBroadcastAddresses(): pointer not word-aligned?
From: Ralph Lange <[email protected]>
To: Jeff Hill <[email protected]>, "'Eric Norum'" <[email protected]>
Cc: "'EPICS Core Talk'" <[email protected]>, "'Ralf Hartmann'" <[email protected]>
Date: Wed, 23 Aug 2006 16:05:59 +0200
Hm...

Ralf added some code to osiSockDiscoverBroadcastAddresses() that memcpy-copies the odd-length ifreq into a word-aligned buffer, then uses a pointer to this aligned copy to hand to the subsequent calls.

Effect: The RTEMS board boots, doesn't crash, and finds four interfaces (lo: and eth0: both appear twice), two of which it recognizes as AF_INET. External CA clients can connect, but get junk in the monitor updates (time stamp and data are garbled).

So it seems that the returned ifreq length of 70 for the first interface really is the reason for crashing on the second entry which is not aligned.

Would you see the additional buffer as an adequate way to handle this? (Probably not...)
If not, where in the BSD network code would we have to add the padding?

Does the CA data garbling point to the same problem or to something else?

Ralph & Ralf


Jeff Hill wrote:
Agree with Eric's comment.
So you might have a closer look at ifreq_size ensuring that it's functioning
properly implemented for your ARM RTEMS. See examples below.

Jeff

Replies:
Re: osiSockDiscoverBroadcastAddresses(): pointer not word-aligned? Andrew Johnson
Re: osiSockDiscoverBroadcastAddresses(): pointer not word-aligned? Eric Norum
References:
RE: osiSockDiscoverBroadcastAddresses(): pointer not word-aligned? Jeff Hill

Navigate by Date:
Prev: RE: osiSockDiscoverBroadcastAddresses(): pointer not word-aligned? Jeff Hill
Next: Re: osiSockDiscoverBroadcastAddresses(): pointer not word-aligned? Andrew Johnson
Index: 2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: osiSockDiscoverBroadcastAddresses(): pointer not word-aligned? Jeff Hill
Next: Re: osiSockDiscoverBroadcastAddresses(): pointer not word-aligned? Andrew Johnson
Index: 2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Feb 2012 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·