Merged ARCH and bind fixes from 3.14 branch, revno 12696
This commit is contained in:
@@ -14,7 +14,7 @@ build$(DIVIDER)$(ARCH) build: buildInstall
|
|||||||
install$(DIVIDER)$(ARCH) install: buildInstall
|
install$(DIVIDER)$(ARCH) install: buildInstall
|
||||||
$(ARCH): buildInstall
|
$(ARCH): buildInstall
|
||||||
|
|
||||||
ifeq ($(filter $(ARCH),$(BUILD_ARCHS)),$(ARCH))
|
ifeq ($(filter $(ARCH),$(BUILD_ARCHS)),$(strip $(ARCH)))
|
||||||
buildInstall$(DIVIDER)$(ARCH) buildInstall: $(TARGETS)
|
buildInstall$(DIVIDER)$(ARCH) buildInstall: $(TARGETS)
|
||||||
|
|
||||||
clean$(DIVIDER)$(ARCH) clean:
|
clean$(DIVIDER)$(ARCH) clean:
|
||||||
@@ -35,4 +35,3 @@ envPaths: $(wildcard $(TOP)/configure/RELEASE*) \
|
|||||||
|
|
||||||
realclean:
|
realclean:
|
||||||
$(RM) cdCommands envPaths dllPath.bat relPaths.sh
|
$(RM) cdCommands envPaths dllPath.bat relPaths.sh
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,17 @@
|
|||||||
|
|
||||||
<!-- Insert inherited items immediately below here ... -->
|
<!-- Insert inherited items immediately below here ... -->
|
||||||
|
|
||||||
|
<h3>Server bind issue on Windows</h3>
|
||||||
|
|
||||||
|
<p>When a National Instruments network variables CA server is already running on
|
||||||
|
a Windows system and an IOC or PCAS server is started, the IOC's attempt to
|
||||||
|
bind a TCP socket to the CA server port number fails, but Windows returns a
|
||||||
|
different error status value than the IOC is expecting in that circumstance
|
||||||
|
(because the National Instruments code requests exclusive use of that port,
|
||||||
|
unlike the EPICS code) so the IOC fails to start properly. The relevent EPICS
|
||||||
|
bind() checks have now been updated so the IOC will request that a dynamic port
|
||||||
|
number be allocated for this TCP socket instead when this happens.</p>
|
||||||
|
|
||||||
<h3>Checking Periodic Scan Rates</h3>
|
<h3>Checking Periodic Scan Rates</h3>
|
||||||
|
|
||||||
<p>Code has been added to the IOC startup to better protect it against bad
|
<p>Code has been added to the IOC startup to better protect it against bad
|
||||||
@@ -1533,7 +1544,7 @@ The iocLogServer was moved into the same directory (src/libCom/log) as
|
|||||||
the log client code.</p>
|
the log client code.</p>
|
||||||
|
|
||||||
<p><a name="as">3</a>
|
<p><a name="as">3</a>
|
||||||
The Access Security code has been divided, with the parts not related to the
|
The Access Security code has been divided, with the parts not related to the
|
||||||
database (lexer/parser and trap registration) becoming part of libCom.
|
database (lexer/parser and trap registration) becoming part of libCom.
|
||||||
The remaining components are included in the dbCore library</p>
|
The remaining components are included in the dbCore library</p>
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* Copyright (c) 2002 The Regents of the University of California, as
|
* Copyright (c) 2002 The Regents of the University of California, as
|
||||||
* Operator of Los Alamos National Laboratory.
|
* Operator of Los Alamos National Laboratory.
|
||||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||||
* in file LICENSE that is included with this distribution.
|
* in file LICENSE that is included with this distribution.
|
||||||
\*************************************************************************/
|
\*************************************************************************/
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -32,7 +32,7 @@ const unsigned caServerConnectPendQueueSize = 5u;
|
|||||||
//
|
//
|
||||||
// casIntfIO::casIntfIO()
|
// casIntfIO::casIntfIO()
|
||||||
//
|
//
|
||||||
casIntfIO::casIntfIO ( const caNetAddr & addrIn ) :
|
casIntfIO::casIntfIO ( const caNetAddr & addrIn ) :
|
||||||
sock ( INVALID_SOCKET ),
|
sock ( INVALID_SOCKET ),
|
||||||
addr ( addrIn.getSockIP() )
|
addr ( addrIn.getSockIP() )
|
||||||
{
|
{
|
||||||
@@ -40,80 +40,79 @@ casIntfIO::casIntfIO ( const caNetAddr & addrIn ) :
|
|||||||
osiSocklen_t addrSize;
|
osiSocklen_t addrSize;
|
||||||
bool portChange;
|
bool portChange;
|
||||||
|
|
||||||
if ( ! osiSockAttach () ) {
|
if ( ! osiSockAttach () ) {
|
||||||
throw S_cas_internal;
|
throw S_cas_internal;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Setup the server socket
|
* Setup the server socket
|
||||||
*/
|
*/
|
||||||
this->sock = epicsSocketCreate ( AF_INET, SOCK_STREAM, IPPROTO_TCP );
|
this->sock = epicsSocketCreate ( AF_INET, SOCK_STREAM, IPPROTO_TCP );
|
||||||
if (this->sock==INVALID_SOCKET) {
|
if (this->sock == INVALID_SOCKET) {
|
||||||
char sockErrBuf[64];
|
char sockErrBuf[64];
|
||||||
epicsSocketConvertErrnoToString ( sockErrBuf, sizeof ( sockErrBuf ) );
|
epicsSocketConvertErrnoToString ( sockErrBuf, sizeof ( sockErrBuf ) );
|
||||||
printf ( "No socket error was %s\n", sockErrBuf );
|
printf ( "No socket error was %s\n", sockErrBuf );
|
||||||
throw S_cas_noFD;
|
throw S_cas_noFD;
|
||||||
}
|
}
|
||||||
|
|
||||||
epicsSocketEnableAddressReuseDuringTimeWaitState ( this->sock );
|
epicsSocketEnableAddressReuseDuringTimeWaitState ( this->sock );
|
||||||
|
|
||||||
status = bind ( this->sock,
|
status = bind ( this->sock,
|
||||||
reinterpret_cast <sockaddr *> (&this->addr),
|
reinterpret_cast <sockaddr *> (&this->addr),
|
||||||
sizeof(this->addr) );
|
sizeof(this->addr) );
|
||||||
if (status<0) {
|
if (status < 0) {
|
||||||
if (SOCKERRNO == SOCK_EADDRINUSE) {
|
if (SOCKERRNO == SOCK_EADDRINUSE ||
|
||||||
//
|
SOCKERRNO == SOCK_EACCES) {
|
||||||
// enable assignment of a default port
|
//
|
||||||
// (so the getsockname() call below will
|
// enable assignment of a default port
|
||||||
// work correctly)
|
// (so the getsockname() call below will
|
||||||
//
|
// work correctly)
|
||||||
this->addr.sin_port = ntohs (0);
|
//
|
||||||
status = bind(
|
this->addr.sin_port = ntohs (0);
|
||||||
|
status = bind(
|
||||||
this->sock,
|
this->sock,
|
||||||
reinterpret_cast <sockaddr *> (&this->addr),
|
reinterpret_cast <sockaddr *> (&this->addr),
|
||||||
sizeof(this->addr) );
|
sizeof(this->addr) );
|
||||||
}
|
}
|
||||||
if (status<0) {
|
if (status < 0) {
|
||||||
char sockErrBuf[64];
|
char sockErrBuf[64];
|
||||||
epicsSocketConvertErrnoToString ( sockErrBuf, sizeof ( sockErrBuf ) );
|
epicsSocketConvertErrnoToString ( sockErrBuf, sizeof ( sockErrBuf ) );
|
||||||
char buf[64];
|
char buf[64];
|
||||||
ipAddrToA (&this->addr, buf, sizeof(buf));
|
ipAddrToA (&this->addr, buf, sizeof(buf));
|
||||||
errPrintf ( S_cas_bindFail,
|
errlogPrintf ( "CAS: Socket bind TCP to %s failed with %s",
|
||||||
__FILE__, __LINE__,
|
buf, sockErrBuf );
|
||||||
"- bind TCP IP addr=%s failed because %s",
|
|
||||||
buf, sockErrBuf );
|
|
||||||
epicsSocketDestroy (this->sock);
|
epicsSocketDestroy (this->sock);
|
||||||
throw S_cas_bindFail;
|
throw S_cas_bindFail;
|
||||||
}
|
}
|
||||||
portChange = true;
|
portChange = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
portChange = false;
|
portChange = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
addrSize = ( osiSocklen_t ) sizeof (this->addr);
|
addrSize = ( osiSocklen_t ) sizeof (this->addr);
|
||||||
status = getsockname (
|
status = getsockname (
|
||||||
this->sock,
|
this->sock,
|
||||||
reinterpret_cast <sockaddr *> ( &this->addr ),
|
reinterpret_cast <sockaddr *> ( &this->addr ),
|
||||||
&addrSize );
|
&addrSize );
|
||||||
if (status) {
|
if (status) {
|
||||||
char sockErrBuf[64];
|
char sockErrBuf[64];
|
||||||
epicsSocketConvertErrnoToString ( sockErrBuf, sizeof ( sockErrBuf ) );
|
epicsSocketConvertErrnoToString ( sockErrBuf, sizeof ( sockErrBuf ) );
|
||||||
errlogPrintf ( "CAS: getsockname() error %s\n",
|
errlogPrintf ( "CAS: getsockname() error %s\n",
|
||||||
sockErrBuf );
|
sockErrBuf );
|
||||||
epicsSocketDestroy (this->sock);
|
epicsSocketDestroy (this->sock);
|
||||||
throw S_cas_internal;
|
throw S_cas_internal;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// be sure of this now so that we can fetch the IP
|
// be sure of this now so that we can fetch the IP
|
||||||
// address and port number later
|
// address and port number later
|
||||||
//
|
//
|
||||||
assert (this->addr.sin_family == AF_INET);
|
assert (this->addr.sin_family == AF_INET);
|
||||||
|
|
||||||
if ( portChange ) {
|
if ( portChange ) {
|
||||||
errlogPrintf ( "cas warning: Configured TCP port was unavailable.\n");
|
errlogPrintf ( "cas warning: Configured TCP port was unavailable.\n");
|
||||||
errlogPrintf ( "cas warning: Using dynamically assigned TCP port %hu,\n",
|
errlogPrintf ( "cas warning: Using dynamically assigned TCP port %hu,\n",
|
||||||
ntohs (this->addr.sin_port) );
|
ntohs (this->addr.sin_port) );
|
||||||
errlogPrintf ( "cas warning: but now two or more servers share the same UDP port.\n");
|
errlogPrintf ( "cas warning: but now two or more servers share the same UDP port.\n");
|
||||||
errlogPrintf ( "cas warning: Depending on your IP kernel this server may not be\n" );
|
errlogPrintf ( "cas warning: Depending on your IP kernel this server may not be\n" );
|
||||||
@@ -121,12 +120,12 @@ casIntfIO::casIntfIO ( const caNetAddr & addrIn ) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
status = listen(this->sock, caServerConnectPendQueueSize);
|
status = listen(this->sock, caServerConnectPendQueueSize);
|
||||||
if(status < 0) {
|
if (status < 0) {
|
||||||
char sockErrBuf[64];
|
char sockErrBuf[64];
|
||||||
epicsSocketConvertErrnoToString ( sockErrBuf, sizeof ( sockErrBuf ) );
|
epicsSocketConvertErrnoToString ( sockErrBuf, sizeof ( sockErrBuf ) );
|
||||||
errlogPrintf ( "CAS: listen() error %s\n", sockErrBuf );
|
errlogPrintf ( "CAS: listen() error %s\n", sockErrBuf );
|
||||||
epicsSocketDestroy (this->sock);
|
epicsSocketDestroy (this->sock);
|
||||||
throw S_cas_internal;
|
throw S_cas_internal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -135,17 +134,17 @@ casIntfIO::casIntfIO ( const caNetAddr & addrIn ) :
|
|||||||
//
|
//
|
||||||
casIntfIO::~casIntfIO()
|
casIntfIO::~casIntfIO()
|
||||||
{
|
{
|
||||||
if (this->sock != INVALID_SOCKET) {
|
if (this->sock != INVALID_SOCKET) {
|
||||||
epicsSocketDestroy (this->sock);
|
epicsSocketDestroy (this->sock);
|
||||||
}
|
}
|
||||||
|
|
||||||
osiSockRelease ();
|
osiSockRelease ();
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// newStreamIO::newStreamClient()
|
// newStreamIO::newStreamClient()
|
||||||
//
|
//
|
||||||
casStreamOS *casIntfIO::newStreamClient ( caServerI & cas,
|
casStreamOS *casIntfIO::newStreamClient ( caServerI & cas,
|
||||||
clientBufMemoryManager & bufMgr ) const
|
clientBufMemoryManager & bufMgr ) const
|
||||||
{
|
{
|
||||||
static bool oneMsgFlag = false;
|
static bool oneMsgFlag = false;
|
||||||
@@ -175,14 +174,14 @@ casStreamOS *casIntfIO::newStreamClient ( caServerI & cas,
|
|||||||
args.sock = newSock;
|
args.sock = newSock;
|
||||||
casStreamOS * pOS = new casStreamOS ( cas, bufMgr, args );
|
casStreamOS * pOS = new casStreamOS ( cas, bufMgr, args );
|
||||||
if ( ! pOS ) {
|
if ( ! pOS ) {
|
||||||
errMessage ( S_cas_noMemory,
|
errMessage ( S_cas_noMemory,
|
||||||
"unable to create data structures for a new client" );
|
"unable to create data structures for a new client" );
|
||||||
epicsSocketDestroy ( newSock );
|
epicsSocketDestroy ( newSock );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ( cas.getDebugLevel() > 0u ) {
|
if ( cas.getDebugLevel() > 0u ) {
|
||||||
char pName[64u];
|
char pName[64u];
|
||||||
|
|
||||||
pOS->hostName ( pName, sizeof ( pName ) );
|
pOS->hostName ( pName, sizeof ( pName ) );
|
||||||
errlogPrintf ( "CAS: allocated client object for \"%s\"\n", pName );
|
errlogPrintf ( "CAS: allocated client object for \"%s\"\n", pName );
|
||||||
}
|
}
|
||||||
@@ -197,7 +196,7 @@ void casIntfIO::setNonBlocking()
|
|||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
osiSockIoctl_t yes = true;
|
osiSockIoctl_t yes = true;
|
||||||
|
|
||||||
status = socket_ioctl(this->sock, FIONBIO, &yes);
|
status = socket_ioctl(this->sock, FIONBIO, &yes);
|
||||||
if ( status < 0 ) {
|
if ( status < 0 ) {
|
||||||
char sockErrBuf[64];
|
char sockErrBuf[64];
|
||||||
|
|||||||
@@ -232,16 +232,17 @@ SOCKET* rsrv_grab_tcp(unsigned short *port)
|
|||||||
ok = 0;
|
ok = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* if SOCK_EADDRINUSE then try again with a different port number.
|
/* if SOCK_EADDRINUSE or SOCK_EACCES try again with a different
|
||||||
* otherwise, fail hard
|
* port number, otherwise fail hard.
|
||||||
*/
|
*/
|
||||||
if(errcode!=SOCK_EADDRINUSE) {
|
if (errcode != SOCK_EADDRINUSE &&
|
||||||
|
errcode != SOCK_EACCES) {
|
||||||
char name[40];
|
char name[40];
|
||||||
char sockErrBuf[64];
|
char sockErrBuf[64];
|
||||||
epicsSocketConvertErrnoToString (
|
epicsSocketConvertErrnoToString (
|
||||||
sockErrBuf, sizeof ( sockErrBuf ) );
|
sockErrBuf, sizeof ( sockErrBuf ) );
|
||||||
ipAddrToDottedIP(&scratch.ia, name, sizeof(name));
|
ipAddrToDottedIP(&scratch.ia, name, sizeof(name));
|
||||||
cantProceed( "CAS: Socket bind %s error was \"%s\"\n",
|
cantProceed( "CAS: Socket bind %s error was %s\n",
|
||||||
name, sockErrBuf );
|
name, sockErrBuf );
|
||||||
}
|
}
|
||||||
ok = 0;
|
ok = 0;
|
||||||
@@ -852,7 +853,7 @@ static void log_one_client (struct client *client, unsigned level)
|
|||||||
printf(
|
printf(
|
||||||
"\tUnprocessed request bytes = %u, Undelivered response bytes = %u\n",
|
"\tUnprocessed request bytes = %u, Undelivered response bytes = %u\n",
|
||||||
client->recv.cnt - client->recv.stk,
|
client->recv.cnt - client->recv.stk,
|
||||||
client->send.stk );
|
client->send.stk );
|
||||||
printf(
|
printf(
|
||||||
"\tState = %s%s%s\n",
|
"\tState = %s%s%s\n",
|
||||||
state[client->disconnect?1:0],
|
state[client->disconnect?1:0],
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*************************************************************************\
|
/*************************************************************************\
|
||||||
* Copyright (c) 2002 The University of Saskatchewan
|
* Copyright (c) 2002 The University of Saskatchewan
|
||||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||||
* in file LICENSE that is included with this distribution.
|
* in file LICENSE that is included with this distribution.
|
||||||
\*************************************************************************/
|
\*************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Author: Eric Norum
|
* Author: Eric Norum
|
||||||
@@ -38,6 +38,7 @@ typedef socklen_t osiSocklen_t;
|
|||||||
#define SOCK_ENOBUFS ENOBUFS
|
#define SOCK_ENOBUFS ENOBUFS
|
||||||
#define SOCK_ECONNRESET ECONNRESET
|
#define SOCK_ECONNRESET ECONNRESET
|
||||||
#define SOCK_ETIMEDOUT ETIMEDOUT
|
#define SOCK_ETIMEDOUT ETIMEDOUT
|
||||||
|
#define SOCK_EACCES EACCES
|
||||||
#define SOCK_EADDRINUSE EADDRINUSE
|
#define SOCK_EADDRINUSE EADDRINUSE
|
||||||
#define SOCK_EADDRNOTAVAIL EADDRNOTAVAIL
|
#define SOCK_EADDRNOTAVAIL EADDRNOTAVAIL
|
||||||
#define SOCK_ECONNREFUSED ECONNREFUSED
|
#define SOCK_ECONNREFUSED ECONNREFUSED
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* Copyright (c) 2002 The Regents of the University of California, as
|
* Copyright (c) 2002 The Regents of the University of California, as
|
||||||
* Operator of Los Alamos National Laboratory.
|
* Operator of Los Alamos National Laboratory.
|
||||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||||
* in file LICENSE that is included with this distribution.
|
* in file LICENSE that is included with this distribution.
|
||||||
\*************************************************************************/
|
\*************************************************************************/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -42,6 +42,7 @@ typedef socklen_t osiSocklen_t;
|
|||||||
#define SOCK_ENOBUFS ENOBUFS
|
#define SOCK_ENOBUFS ENOBUFS
|
||||||
#define SOCK_ECONNRESET ECONNRESET
|
#define SOCK_ECONNRESET ECONNRESET
|
||||||
#define SOCK_ETIMEDOUT ETIMEDOUT
|
#define SOCK_ETIMEDOUT ETIMEDOUT
|
||||||
|
#define SOCK_EACCES EACCES
|
||||||
#define SOCK_EADDRINUSE EADDRINUSE
|
#define SOCK_EADDRINUSE EADDRINUSE
|
||||||
#define SOCK_EADDRNOTAVAIL EADDRNOTAVAIL
|
#define SOCK_EADDRNOTAVAIL EADDRNOTAVAIL
|
||||||
#define SOCK_ECONNREFUSED ECONNREFUSED
|
#define SOCK_ECONNREFUSED ECONNREFUSED
|
||||||
@@ -72,4 +73,3 @@ typedef socklen_t osiSocklen_t;
|
|||||||
#define ifreq_size(pifreq) (sizeof(pifreq->ifr_name))
|
#define ifreq_size(pifreq) (sizeof(pifreq->ifr_name))
|
||||||
|
|
||||||
#endif /*osdSockH*/
|
#endif /*osdSockH*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*************************************************************************\
|
/*************************************************************************\
|
||||||
* Copyright (c) 2002 The University of Saskatchewan
|
* Copyright (c) 2002 The University of Saskatchewan
|
||||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||||
* in file LICENSE that is included with this distribution.
|
* in file LICENSE that is included with this distribution.
|
||||||
\*************************************************************************/
|
\*************************************************************************/
|
||||||
/*
|
/*
|
||||||
* RTEMS osdSock.h
|
* RTEMS osdSock.h
|
||||||
@@ -35,7 +35,7 @@ int select(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, str
|
|||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef int SOCKET;
|
typedef int SOCKET;
|
||||||
#define INVALID_SOCKET (-1)
|
#define INVALID_SOCKET (-1)
|
||||||
#define SOCKERRNO errno
|
#define SOCKERRNO errno
|
||||||
@@ -49,6 +49,7 @@ typedef socklen_t osiSocklen_t;
|
|||||||
#define SOCK_ENOBUFS ENOBUFS
|
#define SOCK_ENOBUFS ENOBUFS
|
||||||
#define SOCK_ECONNRESET ECONNRESET
|
#define SOCK_ECONNRESET ECONNRESET
|
||||||
#define SOCK_ETIMEDOUT ETIMEDOUT
|
#define SOCK_ETIMEDOUT ETIMEDOUT
|
||||||
|
#define SOCK_EACCES EACCES
|
||||||
#define SOCK_EADDRINUSE EADDRINUSE
|
#define SOCK_EADDRINUSE EADDRINUSE
|
||||||
#define SOCK_EADDRNOTAVAIL EADDRNOTAVAIL
|
#define SOCK_EADDRNOTAVAIL EADDRNOTAVAIL
|
||||||
#define SOCK_ECONNREFUSED ECONNREFUSED
|
#define SOCK_ECONNREFUSED ECONNREFUSED
|
||||||
@@ -75,7 +76,7 @@ typedef socklen_t osiSocklen_t;
|
|||||||
|
|
||||||
#ifndef INADDR_NONE
|
#ifndef INADDR_NONE
|
||||||
# define INADDR_NONE (0xffffffff)
|
# define INADDR_NONE (0xffffffff)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For shutdown()
|
* For shutdown()
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* Copyright (c) 2002 The Regents of the University of California, as
|
* Copyright (c) 2002 The Regents of the University of California, as
|
||||||
* Operator of Los Alamos National Laboratory.
|
* Operator of Los Alamos National Laboratory.
|
||||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||||
* in file LICENSE that is included with this distribution.
|
* in file LICENSE that is included with this distribution.
|
||||||
\*************************************************************************/
|
\*************************************************************************/
|
||||||
|
|
||||||
#ifndef osdSockH
|
#ifndef osdSockH
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* winsock2.h changes the structure alignment to 4 if
|
* winsock2.h changes the structure alignment to 4 if
|
||||||
* WIN32 isnt set which can be a source of confusion
|
* WIN32 isnt set which can be a source of confusion
|
||||||
*/
|
*/
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
@@ -48,6 +48,7 @@ typedef int osiSocklen_t;
|
|||||||
#define SOCK_ENOBUFS WSAENOBUFS
|
#define SOCK_ENOBUFS WSAENOBUFS
|
||||||
#define SOCK_ECONNRESET WSAECONNRESET
|
#define SOCK_ECONNRESET WSAECONNRESET
|
||||||
#define SOCK_ETIMEDOUT WSAETIMEDOUT
|
#define SOCK_ETIMEDOUT WSAETIMEDOUT
|
||||||
|
#define SOCK_EACCES WSAEACCES
|
||||||
#define SOCK_EADDRINUSE WSAEADDRINUSE
|
#define SOCK_EADDRINUSE WSAEADDRINUSE
|
||||||
#define SOCK_EADDRNOTAVAIL WSAEADDRNOTAVAIL
|
#define SOCK_EADDRNOTAVAIL WSAEADDRNOTAVAIL
|
||||||
#define SOCK_ECONNREFUSED WSAECONNREFUSED
|
#define SOCK_ECONNREFUSED WSAECONNREFUSED
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* Copyright (c) 2002 The Regents of the University of California, as
|
* Copyright (c) 2002 The Regents of the University of California, as
|
||||||
* Operator of Los Alamos National Laboratory.
|
* Operator of Los Alamos National Laboratory.
|
||||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||||
* in file LICENSE that is included with this distribution.
|
* in file LICENSE that is included with this distribution.
|
||||||
\*************************************************************************/
|
\*************************************************************************/
|
||||||
/*
|
/*
|
||||||
* cygwin32 specific include
|
* cygwin32 specific include
|
||||||
@@ -49,6 +49,7 @@ typedef int osiSocklen_t;
|
|||||||
#define SOCK_ENOBUFS ENOBUFS
|
#define SOCK_ENOBUFS ENOBUFS
|
||||||
#define SOCK_ECONNRESET ECONNRESET
|
#define SOCK_ECONNRESET ECONNRESET
|
||||||
#define SOCK_ETIMEDOUT ETIMEDOUT
|
#define SOCK_ETIMEDOUT ETIMEDOUT
|
||||||
|
#define SOCK_EACCES EACCES
|
||||||
#define SOCK_EADDRINUSE EADDRINUSE
|
#define SOCK_EADDRINUSE EADDRINUSE
|
||||||
#define SOCK_EADDRNOTAVAIL EADDRNOTAVAIL
|
#define SOCK_EADDRNOTAVAIL EADDRNOTAVAIL
|
||||||
#define SOCK_ECONNREFUSED ECONNREFUSED
|
#define SOCK_ECONNREFUSED ECONNREFUSED
|
||||||
@@ -67,4 +68,3 @@ typedef int osiSocklen_t;
|
|||||||
#define ifreq_size(pifreq) (sizeof(pifreq->ifr_name))
|
#define ifreq_size(pifreq) (sizeof(pifreq->ifr_name))
|
||||||
|
|
||||||
#endif /*osdSockH*/
|
#endif /*osdSockH*/
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* Copyright (c) 2002 The Regents of the University of California, as
|
* Copyright (c) 2002 The Regents of the University of California, as
|
||||||
* Operator of Los Alamos National Laboratory.
|
* Operator of Los Alamos National Laboratory.
|
||||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||||
* in file LICENSE that is included with this distribution.
|
* in file LICENSE that is included with this distribution.
|
||||||
\*************************************************************************/
|
\*************************************************************************/
|
||||||
|
|
||||||
#ifndef osdSockH
|
#ifndef osdSockH
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
#define IPPORT_USERRESERVED 5000
|
#define IPPORT_USERRESERVED 5000
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
typedef int SOCKET;
|
typedef int SOCKET;
|
||||||
#define INVALID_SOCKET (-1)
|
#define INVALID_SOCKET (-1)
|
||||||
#define SOCKERRNO errno
|
#define SOCKERRNO errno
|
||||||
@@ -43,6 +43,7 @@ typedef socklen_t osiSocklen_t;
|
|||||||
#define SOCK_ENOBUFS ENOBUFS
|
#define SOCK_ENOBUFS ENOBUFS
|
||||||
#define SOCK_ECONNRESET ECONNRESET
|
#define SOCK_ECONNRESET ECONNRESET
|
||||||
#define SOCK_ETIMEDOUT ETIMEDOUT
|
#define SOCK_ETIMEDOUT ETIMEDOUT
|
||||||
|
#define SOCK_EACCES EACCES
|
||||||
#define SOCK_EADDRINUSE EADDRINUSE
|
#define SOCK_EADDRINUSE EADDRINUSE
|
||||||
#define SOCK_EADDRNOTAVAIL EADDRNOTAVAIL
|
#define SOCK_EADDRNOTAVAIL EADDRNOTAVAIL
|
||||||
#define SOCK_ECONNREFUSED ECONNREFUSED
|
#define SOCK_ECONNREFUSED ECONNREFUSED
|
||||||
@@ -77,4 +78,3 @@ typedef socklen_t osiSocklen_t;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /*osdSockH*/
|
#endif /*osdSockH*/
|
||||||
|
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ typedef socklen_t osiSocklen_t;
|
|||||||
#define SOCK_ENOBUFS ENOBUFS
|
#define SOCK_ENOBUFS ENOBUFS
|
||||||
#define SOCK_ECONNRESET ECONNRESET
|
#define SOCK_ECONNRESET ECONNRESET
|
||||||
#define SOCK_ETIMEDOUT ETIMEDOUT
|
#define SOCK_ETIMEDOUT ETIMEDOUT
|
||||||
|
#define SOCK_EACCES EACCES
|
||||||
#define SOCK_EADDRINUSE EADDRINUSE
|
#define SOCK_EADDRINUSE EADDRINUSE
|
||||||
#define SOCK_EADDRNOTAVAIL EADDRNOTAVAIL
|
#define SOCK_EADDRNOTAVAIL EADDRNOTAVAIL
|
||||||
#define SOCK_ECONNREFUSED ECONNREFUSED
|
#define SOCK_ECONNREFUSED ECONNREFUSED
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* Copyright (c) 2002 The Regents of the University of California, as
|
* Copyright (c) 2002 The Regents of the University of California, as
|
||||||
* Operator of Los Alamos National Laboratory.
|
* Operator of Los Alamos National Laboratory.
|
||||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||||
* in file LICENSE that is included with this distribution.
|
* in file LICENSE that is included with this distribution.
|
||||||
\*************************************************************************/
|
\*************************************************************************/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -39,7 +39,7 @@ typedef int osiSockIoctl_t;
|
|||||||
|
|
||||||
#if SOLARIS > 6 || defined ( _SOCKLEN_T )
|
#if SOLARIS > 6 || defined ( _SOCKLEN_T )
|
||||||
typedef uint32_t osiSocklen_t;
|
typedef uint32_t osiSocklen_t;
|
||||||
#else
|
#else
|
||||||
typedef int osiSocklen_t;
|
typedef int osiSocklen_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -51,6 +51,7 @@ typedef int osiSockIoctl_t;
|
|||||||
#define SOCK_ENOBUFS ENOBUFS
|
#define SOCK_ENOBUFS ENOBUFS
|
||||||
#define SOCK_ECONNRESET ECONNRESET
|
#define SOCK_ECONNRESET ECONNRESET
|
||||||
#define SOCK_ETIMEDOUT ETIMEDOUT
|
#define SOCK_ETIMEDOUT ETIMEDOUT
|
||||||
|
#define SOCK_EACCES EACCES
|
||||||
#define SOCK_EADDRINUSE EADDRINUSE
|
#define SOCK_EADDRINUSE EADDRINUSE
|
||||||
#define SOCK_EADDRNOTAVAIL EADDRNOTAVAIL
|
#define SOCK_EADDRNOTAVAIL EADDRNOTAVAIL
|
||||||
#define SOCK_ECONNREFUSED ECONNREFUSED
|
#define SOCK_ECONNREFUSED ECONNREFUSED
|
||||||
@@ -80,9 +81,8 @@ typedef int osiSockIoctl_t;
|
|||||||
|
|
||||||
#ifndef INADDR_NONE
|
#ifndef INADDR_NONE
|
||||||
# define INADDR_NONE (0xffffffff)
|
# define INADDR_NONE (0xffffffff)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ifreq_size(pifreq) (sizeof(pifreq->ifr_name))
|
#define ifreq_size(pifreq) (sizeof(pifreq->ifr_name))
|
||||||
|
|
||||||
#endif /*osdSockH*/
|
#endif /*osdSockH*/
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* Copyright (c) 2002 The Regents of the University of California, as
|
* Copyright (c) 2002 The Regents of the University of California, as
|
||||||
* Operator of Los Alamos National Laboratory.
|
* Operator of Los Alamos National Laboratory.
|
||||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||||
* in file LICENSE that is included with this distribution.
|
* in file LICENSE that is included with this distribution.
|
||||||
\*************************************************************************/
|
\*************************************************************************/
|
||||||
/*
|
/*
|
||||||
* vxWorks specific socket include
|
* vxWorks specific socket include
|
||||||
@@ -44,7 +44,7 @@ int sysClkRateGet(void);
|
|||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef int SOCKET;
|
typedef int SOCKET;
|
||||||
#define INVALID_SOCKET (-1)
|
#define INVALID_SOCKET (-1)
|
||||||
#define SOCKERRNO errno
|
#define SOCKERRNO errno
|
||||||
@@ -72,6 +72,7 @@ typedef int osiSocklen_t;
|
|||||||
#define SOCK_ENOBUFS ENOBUFS
|
#define SOCK_ENOBUFS ENOBUFS
|
||||||
#define SOCK_ECONNRESET ECONNRESET
|
#define SOCK_ECONNRESET ECONNRESET
|
||||||
#define SOCK_ETIMEDOUT ETIMEDOUT
|
#define SOCK_ETIMEDOUT ETIMEDOUT
|
||||||
|
#define SOCK_EACCES EACCES
|
||||||
#define SOCK_EADDRINUSE EADDRINUSE
|
#define SOCK_EADDRINUSE EADDRINUSE
|
||||||
#define SOCK_EADDRNOTAVAIL EADDRNOTAVAIL
|
#define SOCK_EADDRNOTAVAIL EADDRNOTAVAIL
|
||||||
#define SOCK_ECONNREFUSED ECONNREFUSED
|
#define SOCK_ECONNREFUSED ECONNREFUSED
|
||||||
@@ -93,7 +94,7 @@ typedef int osiSocklen_t;
|
|||||||
|
|
||||||
#ifndef INADDR_NONE
|
#ifndef INADDR_NONE
|
||||||
# define INADDR_NONE (0xffffffff)
|
# define INADDR_NONE (0xffffffff)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_SIZEOF_ADDR_IFREQ)
|
#if defined(_SIZEOF_ADDR_IFREQ)
|
||||||
# define ifreq_size(pifreq) _SIZEOF_ADDR_IFREQ(*pifreq)
|
# define ifreq_size(pifreq) _SIZEOF_ADDR_IFREQ(*pifreq)
|
||||||
@@ -104,5 +105,3 @@ typedef int osiSocklen_t;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /*osdSockH*/
|
#endif /*osdSockH*/
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user