EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: epics on FreeBSD: broadcast problem
From: Gerrit Kühn <[email protected]>
To: "Jeff Hill" <[email protected]>
Cc: [email protected]
Date: Fri, 25 Feb 2011 10:09:55 +0100
On Thu, 24 Feb 2011 09:37:07 -0700 "Jeff Hill" <[email protected]> wrote
about RE: epics on FreeBSD: broadcast problem:

Hi Jeff,

JH> In particular, you may, on this version of free bsd, need this
JH> 
JH> #define ifreq_size(pifreq) ((pifreq)->ifr_addr.sa_len +
JH> sizeof((pifreq)->ifr_name))

This mostly fixes the problem for me. Now casr gives me

---
epics> casr 100
Channel Access Server V4.13
No clients connected.
[...]
Channel Access Address List
10.117.255.255:5065
192.168.95.255:5065
10.15.254.2:5065
---

Now I can caget PVs from my subnet:

---
firefly1# /opt/epics/epics/bin/freebsd-x86_64/caget G3:PSL-OSC_PZTVOLT
G3:PSL-OSC_PZTVOLT             0.00427259
---

One thing is left: With the softIOC I defined a TEST PV:

---
epics> dbl
TEST
---

This resolves fine from a Linux machine in the subnet (already worked
before changing the macro):

---
psl@psl-fe4 ~ $ caget TEST
TEST                           0
---

However, it does not resolve from the FreeBSD machine itself:

---
firefly1# /opt/epics/epics/bin/freebsd-x86_64/caget TEST
Channel connect timed out: 'TEST' not found.
---

This only changes if I put the machine's IP explicitely into the ADDR_LIST:

---
firefly1# setenv|grep EPICS
EPICS_HOST_ARCH=freebsd-x86_64
EPICS_CA_AUTO_ADDR_LIST=YES
EPICS_CAS_AUTO_BEACON_ADDR_LIST=YES
EPICS_CA_ADDR_LIST=192.168.64.254
firefly1# /opt/epics/epics/bin/freebsd-x86_64/caget TEST
TEST                           0
---


JH> to support a range of free bsd versions you will most likely need a BSD
JH> version switch - this is what we have currently for vxWorks
JH> 
JH> #if ( defined (BSD) && ( BSD >= 44 ) )
JH> #   define ifreq_size(pifreq) (pifreq->ifr_addr.sa_len +
JH> sizeof(pifreq->ifr_name))
JH> #else
JH> #   define ifreq_size(pifreq) sizeof(*pifreq)
JH> #endif

When I played around with the extensions yesterday, I mostly followed the
settings for Apple/Darwin to get code working for FreeBSD. I don't know
where I would have to get the BSD defined in the build chain... right now
it seems not to be there:

---
ahvbuildbox-fbsd64# gcc -dM -E src/libCom/osi/osiSock.c | grep BSD
#define __FreeBSD_cc_version 800001
#define __BSD_VISIBLE 1
#define __VERSION__ "4.2.1 20070719  [FreeBSD]"
#define __FBSDID(s) __IDSTRING(__CONCAT(__rcsid_,__LINE__),s)
#define __FreeBSD__ 8
---

Oh, I see
(<http://www.freebsd.org/doc/en/books/porters-handbook/porting-versions.html>),
it comes in via sys/param.h, which is already included:

---
#define BSD     199506          /* System version (year & month). */
#define BSD4_3  1
#define BSD4_4  1
---

Can't tell for sure if this is the right thing to do for other flavours
like OpenBSD oder NetBSD, though.

JH> let us know how this goes so we can fix the distribution

Apart from the issue resolving PVs from the machine itself it looks fine
so far. Thanks you very much for your support!

Background for me here is that I have FreeBSD-based router/infrastructure
(dns, dhcp, cups, vpn etc.) servers for epics subnets. Now I want to use
the gateway extension to provide channel access to the outside, and these
FreeBSD machines would be the obvious location to run the gateway. I'll
report back if I can get the gateway to work now.


One other thing I noted while installing the gateway extension is the
following:
I install to a different location using
"INSTALL_LOCATION=/opt/epics/epics/" in CONFIG_SITE. With this setting I
was not able to compile the gateway extension due to two missing headers
I needed to copy manually:

---
cp /root/epics/base-3.14.12/src/cas/generic/caHdrLargeArray.h /opt/epics/epics/include/
cp /root/epics/base-3.14.12/src/cas/generic/casCtx.h /opt/epics/epics/include/
---

Am I still doing something wrong with the INSTALL_LOCATION, or are these
files just missed during the install phase?


cu
  Gerrit

Replies:
RE: epics on FreeBSD: broadcast problem Jeff Hill
References:
epics on FreeBSD: broadcast problem Gerrit Kühn
Re: epics on FreeBSD: broadcast problem Gerrit Kühn

Navigate by Date:
Prev: RE: Does areadetector drvier support Procilica GE1650 CCD? Mark Rivers
Next: Re: About pvPut dafault behavior Benjamin Franksen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: epics on FreeBSD: broadcast problem Jeff Hill
Next: RE: epics on FreeBSD: broadcast problem Jeff Hill
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·