Unverified Commit 107e72b0 authored by Mike Gabriel's avatar Mike Gabriel

Merge branch 'uli42-pr/upgrade_xtrans' into 3.6.x

parents a9b145d4 6a186b92
...@@ -375,12 +375,6 @@ XCOMM the platform-specific parameters - edit site.def to change ...@@ -375,12 +375,6 @@ XCOMM the platform-specific parameters - edit site.def to change
#ifndef HasSockets #ifndef HasSockets
#define HasSockets YES #define HasSockets YES
#endif #endif
#ifndef HasStreams
#define HasStreams !HasSockets
#endif
#ifndef HasDECnet
#define HasDECnet NO
#endif
#ifndef HasPoll #ifndef HasPoll
#if SystemV || SystemV4 #if SystemV || SystemV4
#define HasPoll YES #define HasPoll YES
......
...@@ -53,7 +53,6 @@ Imake.tmpl provides defaults for the following variables: ...@@ -53,7 +53,6 @@ Imake.tmpl provides defaults for the following variables:
HasCodeCenter boolean for system has CodeCenter HasCodeCenter boolean for system has CodeCenter
HasCookieMaker boolean for system has xauth cookie generator HasCookieMaker boolean for system has xauth cookie generator
HasCplusplus system has a C++ compiler? HasCplusplus system has a C++ compiler?
HasDECnet system has DECnet?
HasFortran boolean for system has Fortran compiler HasFortran boolean for system has Fortran compiler
HasGcc boolean for system has GNU gcc compiler HasGcc boolean for system has GNU gcc compiler
HasGcc2 boolean for system has GNU gcc 2.x compiler HasGcc2 boolean for system has GNU gcc 2.x compiler
...@@ -78,7 +77,6 @@ Imake.tmpl provides defaults for the following variables: ...@@ -78,7 +77,6 @@ Imake.tmpl provides defaults for the following variables:
HasShm boolean for System V shared memory HasShm boolean for System V shared memory
HasSockets boolean for system has BSD sockets HasSockets boolean for system has BSD sockets
HasStrcasecmp boolean for system implements str[n]casecmp HasStrcasecmp boolean for system implements str[n]casecmp
HasStreams use STREAMS I/O interface?
HasSymLinks boolean for system has symbolic links HasSymLinks boolean for system has symbolic links
HasTestCenter boolean for system has TestCenter HasTestCenter boolean for system has TestCenter
HasVarDirectory boolean for system has /var HasVarDirectory boolean for system has /var
......
...@@ -334,8 +334,7 @@ XORGRELSTRING = XorgManVersionString ...@@ -334,8 +334,7 @@ XORGRELSTRING = XorgManVersionString
* NOTE: IPv6Flags could be tacked on to either ConnectionFlags or * NOTE: IPv6Flags could be tacked on to either ConnectionFlags or
* ExtraConnectionDefs. Here, we choose the later in order to * ExtraConnectionDefs. Here, we choose the later in order to
* maximise exposure of the IPv6 code (a number of <OS>.def files * maximise exposure of the IPv6 code (a number of <OS>.def files
* contain ConnectionFlags overrides). Mind you, this might not * contain ConnectionFlags overrides).
* the right thing to do when HasStreams is asserted.
*/ */
#ifndef BuildIPv6 /* If the OS also #define's AF_INET6 */ #ifndef BuildIPv6 /* If the OS also #define's AF_INET6 */
#define BuildIPv6 YES #define BuildIPv6 YES
...@@ -355,19 +354,8 @@ XORGRELSTRING = XorgManVersionString ...@@ -355,19 +354,8 @@ XORGRELSTRING = XorgManVersionString
#ifndef IPv6SocketsAlsoIPv4 #ifndef IPv6SocketsAlsoIPv4
#define IPv6SocketsAlsoIPv4 YES #define IPv6SocketsAlsoIPv4 YES
#endif #endif
#ifndef DECnetFlags
#if HasDECnet
#define DECnetFlags -DDNETCONN
#else
#define DECnetFlags
#endif
#endif
#ifndef ConnectionFlags #ifndef ConnectionFlags
#if HasStreams #define ConnectionFlags -DTCPCONN -DUNIXCONN
#define ConnectionFlags -DSTREAMSCONN
#else
#define ConnectionFlags -DTCPCONN -DUNIXCONN DECnetFlags
#endif
#endif #endif
#if HasStickyDirBit #if HasStickyDirBit
STICKY_DEFINES = -DHAS_STICKY_DIR_BIT STICKY_DEFINES = -DHAS_STICKY_DIR_BIT
......
...@@ -430,13 +430,6 @@ ...@@ -430,13 +430,6 @@
#endif /* #if defined(LinuxArchitecture) */ #endif /* #if defined(LinuxArchitecture) */
/* /*
* If you have Linux DECnet support, and want to build XFree86 with support
* for connections over DECnet, uncomment this.
*
#define HasDECnet YES
*/
/*
* To build static and shared libraries with debugging information, uncomment * To build static and shared libraries with debugging information, uncomment
* this. Assumes you have Gcc2. * this. Assumes you have Gcc2.
* (If you don't have Gcc2, you can use the DebugLib{X11,...} variables * (If you don't have Gcc2, you can use the DebugLib{X11,...} variables
......
...@@ -861,15 +861,8 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion) ...@@ -861,15 +861,8 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion)
#define PamMiscLibraries -lpam_misc #define PamMiscLibraries -lpam_misc
#endif #endif
#ifndef HasDECnet #define ConnectionFlags -DUNIXCONN -DTCPCONN
#define HasDECnet NO
#endif
#if HasDECnet
# define ConnectionFlags -DUNIXCONN -DTCPCONN -DDNETCONN
# define ExtraLibraries -ldnet
#else
# define ConnectionFlags -DUNIXCONN -DTCPCONN
#endif
/* Some of these man page defaults are overriden in the above OS sections */ /* Some of these man page defaults are overriden in the above OS sections */
#ifndef ManSuffix #ifndef ManSuffix
......
...@@ -276,13 +276,6 @@ ...@@ -276,13 +276,6 @@
#define HasXdmAuth YES #define HasXdmAuth YES
/* /*
* If you have Linux DECnet support, and want to build XFree86 with support
* for connections over DECnet, uncomment this.
*
#define HasDECnet YES
*/
/*
* To build static and shared libraries with debugging information, uncomment * To build static and shared libraries with debugging information, uncomment
* this. Assumes you have Gcc2. * this. Assumes you have Gcc2.
* (If you don't have Gcc2, you can use the DebugLib{X11,...} variables * (If you don't have Gcc2, you can use the DebugLib{X11,...} variables
......
...@@ -115,7 +115,7 @@ static char *copystring (const char *src, int len) ...@@ -115,7 +115,7 @@ static char *copystring (const char *src, int len)
#ifdef UNIXCONN #ifdef UNIXCONN
# define UNIX_TRANS "unix" # define UNIX_TRANS "unix"
#endif #endif
#if defined(LOCALCONN) || defined(OS2PIPECONN) || defined(UNIXCONN) #if defined(LOCALCONN) || defined(UNIXCONN)
# define LOCAL_TRANS "local" # define LOCAL_TRANS "local"
#endif #endif
...@@ -145,14 +145,15 @@ static char *copystring (const char *src, int len) ...@@ -145,14 +145,15 @@ static char *copystring (const char *src, int len)
* *
* [protocol/] [hostname] : [:] displaynumber [.screennumber] * [protocol/] [hostname] : [:] displaynumber [.screennumber]
* *
* A string with exactly two colons seperating hostname from the display * A string with exactly two colons seperating hostname from the
* indicates a DECnet style name. Colons in the hostname may occur if an * display indicates a (now unsupported) DECnet style name. Colons in
* IPv6 numeric address is used as the hostname. An IPv6 numeric address * the hostname may occur if an IPv6 numeric address is used as the
* may also end in a double colon, so three colons in a row indicates an * hostname. An IPv6 numeric address may also end in a double colon,
* IPv6 address ending in :: followed by :display. To make it easier for * so three colons in a row indicates an IPv6 address ending in ::
* people to read, an IPv6 numeric address hostname may be surrounded by * followed by :display. To make it easier for people to read, an
* [ ] in a similar fashion to the IPv6 numeric address URL syntax defined * IPv6 numeric address hostname may be surrounded by [ ] in a similar
* by IETF RFC 2732. * fashion to the IPv6 numeric address URL syntax defined by IETF RFC
* 2732.
* *
* If no hostname and no protocol is specified, the string is interpreted * If no hostname and no protocol is specified, the string is interpreted
* as the most efficient local connection to a server on the same machine. * as the most efficient local connection to a server on the same machine.
...@@ -188,7 +189,6 @@ _X11TransConnectDisplay ( ...@@ -188,7 +189,6 @@ _X11TransConnectDisplay (
char *phostname = NULL; /* start of host of display */ char *phostname = NULL; /* start of host of display */
char *pdpynum = NULL; /* start of dpynum of display */ char *pdpynum = NULL; /* start of dpynum of display */
char *pscrnum = NULL; /* start of screen of display */ char *pscrnum = NULL; /* start of screen of display */
Bool dnet = False; /* if true, then DECnet format */
int idisplay = 0; /* required display number */ int idisplay = 0; /* required display number */
int iscreen = 0; /* optional screen number */ int iscreen = 0; /* optional screen number */
/* int (*connfunc)(); */ /* method to create connection */ /* int (*connfunc)(); */ /* method to create connection */
...@@ -318,6 +318,7 @@ _X11TransConnectDisplay ( ...@@ -318,6 +318,7 @@ _X11TransConnectDisplay (
* or two colons in the case of DECnet (DECnet Phase V allows a single * or two colons in the case of DECnet (DECnet Phase V allows a single
* colon in the hostname). (See note above regarding IPv6 numeric * colon in the hostname). (See note above regarding IPv6 numeric
* addresses with triple colons or [] brackets.) * addresses with triple colons or [] brackets.)
* FIXME: we do not support DECnet anymore, so maybe remove these checks?
*/ */
lastp = p; lastp = p;
...@@ -335,16 +336,7 @@ _X11TransConnectDisplay ( ...@@ -335,16 +336,7 @@ _X11TransConnectDisplay (
) { ) {
/* DECnet display specified */ /* DECnet display specified */
#ifndef DNETCONN
goto bad; goto bad;
#else
dnet = True;
/* override the protocol specified */
if (pprotocol)
Xfree (pprotocol);
pprotocol = copystring ("dnet", 4);
hostlen = lastc - 1 - lastp;
#endif
} }
else else
hostlen = lastc - lastp; hostlen = lastc - lastp;
...@@ -482,7 +474,6 @@ _X11TransConnectDisplay ( ...@@ -482,7 +474,6 @@ _X11TransConnectDisplay (
* phostname hostname string or NULL * phostname hostname string or NULL
* idisplay display number * idisplay display number
* iscreen screen number * iscreen screen number
* dnet DECnet boolean
* *
* We can now decide which transport to use based on the ConnectionFlags * We can now decide which transport to use based on the ConnectionFlags
* build parameter the hostname string. If phostname is NULL or equals * build parameter the hostname string. If phostname is NULL or equals
...@@ -511,7 +502,7 @@ _X11TransConnectDisplay ( ...@@ -511,7 +502,7 @@ _X11TransConnectDisplay (
#endif #endif
#if defined(TCPCONN) || defined(UNIXCONN) || defined(LOCALCONN) || defined(MNX_TCPCONN) || defined(OS2PIPECONN) #if defined(TCPCONN) || defined(UNIXCONN) || defined(LOCALCONN) || defined(MNX_TCPCONN)
if (!pprotocol) { if (!pprotocol) {
#if defined(UNIXCONN) #if defined(UNIXCONN)
if (phostname && (strcmp (phostname, "unix") == 0)) { if (phostname && (strcmp (phostname, "unix") == 0)) {
...@@ -654,7 +645,7 @@ _X11TransConnectDisplay ( ...@@ -654,7 +645,7 @@ _X11TransConnectDisplay (
original_hostname = NULL; original_hostname = NULL;
} }
#endif #endif
len = ((phostname ? strlen(phostname) : 0) + 1 + (dnet ? 1 : 0) + len = ((phostname ? strlen(phostname) : 0) + 1 +
strlen(pdpynum) + 1 + (pscrnum ? strlen(pscrnum) : 1) + 1); strlen(pdpynum) + 1 + (pscrnum ? strlen(pscrnum) : 1) + 1);
*fullnamep = (char *) Xmalloc (len); *fullnamep = (char *) Xmalloc (len);
if (!*fullnamep) goto bad; if (!*fullnamep) goto bad;
...@@ -663,13 +654,13 @@ _X11TransConnectDisplay ( ...@@ -663,13 +654,13 @@ _X11TransConnectDisplay (
if (phostname && strlen(phostname) > 11 && !strncmp(phostname, "/tmp/launch", 11)) if (phostname && strlen(phostname) > 11 && !strncmp(phostname, "/tmp/launch", 11))
sprintf (*fullnamep, "%s%s%d", sprintf (*fullnamep, "%s%s%d",
(phostname ? phostname : ""), (phostname ? phostname : ""),
(dnet ? "::" : ":"), ":",
idisplay); idisplay);
else else
#endif #endif
sprintf (*fullnamep, "%s%s%d.%d", sprintf (*fullnamep, "%s%s%d.%d",
(phostname ? phostname : ""), (phostname ? phostname : ""),
(dnet ? "::" : ":"), ":",
idisplay, iscreen); idisplay, iscreen);
*dpynump = idisplay; *dpynump = idisplay;
...@@ -855,13 +846,6 @@ _XSendClientPrefix( ...@@ -855,13 +846,6 @@ _XSendClientPrefix(
} }
#ifdef STREAMSCONN
#ifdef SVR4
#include <tiuser.h>
#else
#undef HASXDMAUTH
#endif
#endif
#ifdef SECURE_RPC #ifdef SECURE_RPC
#include <rpc/rpc.h> #include <rpc/rpc.h>
...@@ -1419,13 +1403,6 @@ GetAuthorization( ...@@ -1419,13 +1403,6 @@ GetAuthorization(
break; break;
} }
#endif /* AF_UNIX */ #endif /* AF_UNIX */
#ifdef AF_DECnet
case AF_DECnet:
/*
* What is the defined encoding for this?
*/
break;
#endif /* AF_DECnet */
default: default:
/* /*
* Need to return some kind of errro status here. * Need to return some kind of errro status here.
......
...@@ -9,12 +9,9 @@ DEFINES = $(FAILDEFINES) ...@@ -9,12 +9,9 @@ DEFINES = $(FAILDEFINES)
HEADERS = \ HEADERS = \
Xtrans.h \ Xtrans.h \
Xtrans.c \ Xtrans.c \
Xtransdnet.c \
Xtransint.h \ Xtransint.h \
Xtranslcl.c \ Xtranslcl.c \
Xtransos2.c \
Xtranssock.c \ Xtranssock.c \
Xtranstli.c \
Xtransutil.c \ Xtransutil.c \
transport.c transport.c
......
...@@ -24,9 +24,7 @@ not be used in advertising or otherwise to promote the sale, use or ...@@ -24,9 +24,7 @@ not be used in advertising or otherwise to promote the sale, use or
other dealings in this Software without prior written authorization other dealings in this Software without prior written authorization
from The Open Group. from The Open Group.
*/ * Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA
/* Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA
* *
* All Rights Reserved * All Rights Reserved
* *
...@@ -54,121 +52,75 @@ from The Open Group. ...@@ -54,121 +52,75 @@ from The Open Group.
#include <nx-X11/Xfuncproto.h> #include <nx-X11/Xfuncproto.h>
#include <nx-X11/Xos.h> #include <nx-X11/Xos.h>
#include <nx-X11/Xmd.h>
#ifndef WIN32 #ifndef WIN32
#ifndef Lynx
#include <sys/socket.h> #include <sys/socket.h>
#else
#include <socket.h>
#endif
#endif #endif
#ifdef __clang__
/* Not all clients make use of all provided statics */
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-function"
#endif
/* /*
* Set the functions names according to where this code is being compiled. * Set the functions names according to where this code is being compiled.
*/ */
#ifdef X11_t #ifdef X11_t
#if !defined(UNIXCPP) || defined(ANSICPP)
#define TRANS(func) _X11Trans##func #define TRANS(func) _X11Trans##func
#else
#define TRANS(func) _X11Trans/**/func
#endif
#ifdef XTRANSDEBUG #ifdef XTRANSDEBUG
static char* __xtransname = "_X11Trans"; static const char *__xtransname = "_X11Trans";
#endif #endif
#endif /* X11_t */ #endif /* X11_t */
#ifdef XSERV_t #ifdef XSERV_t
#if !defined(UNIXCPP) || defined(ANSICPP)
#define TRANS(func) _XSERVTrans##func #define TRANS(func) _XSERVTrans##func
#else
#define TRANS(func) _XSERVTrans/**/func
#endif
#ifdef XTRANSDEBUG #ifdef XTRANSDEBUG
static char* __xtransname = "_XSERVTrans"; static const char *__xtransname = "_XSERVTrans";
#endif #endif
#define X11_t #define X11_t
#endif /* XSERV_t */ #endif /* XSERV_t */
#ifdef XIM_t #ifdef XIM_t
#if !defined(UNIXCPP) || defined(ANSICPP)
#define TRANS(func) _XimXTrans##func #define TRANS(func) _XimXTrans##func
#else
#define TRANS(func) _XimXTrans/**/func
#endif
#ifdef XTRANSDEBUG #ifdef XTRANSDEBUG
static char* __xtransname = "_XimTrans"; static const char *__xtransname = "_XimTrans";
#endif #endif
#endif /* XIM_t */ #endif /* XIM_t */
#ifdef FS_t #ifdef FS_t
#if !defined(UNIXCPP) || defined(ANSICPP)
#define TRANS(func) _FSTrans##func #define TRANS(func) _FSTrans##func
#else
#define TRANS(func) _FSTrans/**/func
#endif
#ifdef XTRANSDEBUG #ifdef XTRANSDEBUG
static char* __xtransname = "_FSTrans"; static const char *__xtransname = "_FSTrans";
#endif #endif
#endif /* FS_t */ #endif /* FS_t */
#ifdef FONT_t #ifdef FONT_t
#if !defined(UNIXCPP) || defined(ANSICPP)
#define TRANS(func) _FontTrans##func #define TRANS(func) _FontTrans##func
#else
#define TRANS(func) _FontTrans/**/func
#endif
#ifdef XTRANSDEBUG #ifdef XTRANSDEBUG
static char* __xtransname = "_FontTrans"; static const char *__xtransname = "_FontTrans";
#endif #endif
#endif /* FONT_t */ #endif /* FONT_t */
#ifdef ICE_t #ifdef ICE_t
#if !defined(UNIXCPP) || defined(ANSICPP)
#define TRANS(func) _IceTrans##func #define TRANS(func) _IceTrans##func
#else
#define TRANS(func) _IceTrans/**/func
#endif
#ifdef XTRANSDEBUG #ifdef XTRANSDEBUG
static char* __xtransname = "_IceTrans"; static const char *__xtransname = "_IceTrans";
#endif #endif
#endif /* ICE_t */ #endif /* ICE_t */
#ifdef TEST_t
#if !defined(UNIXCPP) || defined(ANSICPP)
#define TRANS(func) _TESTTrans##func
#else
#define TRANS(func) _TESTTrans/**/func
#endif
#ifdef XTRANSDEBUG
static char* __xtransname = "_TESTTrans";
#endif
#endif /* TEST_t */
#ifdef LBXPROXY_t
#if !defined(UNIXCPP) || defined(ANSICPP)
#define TRANS(func) _LBXPROXYTrans##func
#else
#define TRANS(func) _LBXPROXYTrans/**/func
#endif
#define X11_t /* The server defines this - so should the LBX proxy */
#ifdef XTRANSDEBUG
static char* __xtransname = "_LBXPROXYTrans";
#endif
#endif /* LBXPROXY_t */
#if !defined(TRANS) #if !defined(TRANS)
#if !defined(UNIXCPP) || defined(ANSICPP)
#define TRANS(func) _XTrans##func #define TRANS(func) _XTrans##func
#else
#define TRANS(func) _XTrans/**/func
#endif
#ifdef XTRANSDEBUG #ifdef XTRANSDEBUG
static char* __xtransname = "_XTrans"; static const char *__xtransname = "_XTrans";
#endif #endif
#endif /* !TRANS */ #endif /* !TRANS */
#ifdef __clang__
#pragma clang diagnostic pop
#endif
/* /*
* Create a single address structure that can be used wherever * Create a single address structure that can be used wherever
...@@ -196,7 +148,7 @@ typedef long BytesReadable_t; ...@@ -196,7 +148,7 @@ typedef long BytesReadable_t;
#endif #endif
#if defined(WIN32) || (defined(USG) && !defined(umips) && !defined(MOTOROLA) && !defined(uniosu) && !defined(__sxg__)) #if defined(WIN32) || defined(USG)
/* /*
* TRANS(Readv) and TRANS(Writev) use struct iovec, normally found * TRANS(Readv) and TRANS(Writev) use struct iovec, normally found
...@@ -210,11 +162,7 @@ struct iovec { ...@@ -210,11 +162,7 @@ struct iovec {
}; };
#else #else
#ifndef Lynx
#include <sys/uio.h> #include <sys/uio.h>
#else
#include <uio.h>
#endif
#endif #endif
typedef struct _XtransConnInfo *XtransConnInfo; typedef struct _XtransConnInfo *XtransConnInfo;
...@@ -274,7 +222,7 @@ void TRANS(FreeConnInfo) ( ...@@ -274,7 +222,7 @@ void TRANS(FreeConnInfo) (
#ifdef TRANS_CLIENT #ifdef TRANS_CLIENT
XtransConnInfo TRANS(OpenCOTSClient)( XtransConnInfo TRANS(OpenCOTSClient)(
char * /* address */ const char * /* address */
); );
#endif /* TRANS_CLIENT */ #endif /* TRANS_CLIENT */
...@@ -282,23 +230,7 @@ XtransConnInfo TRANS(OpenCOTSClient)( ...@@ -282,23 +230,7 @@ XtransConnInfo TRANS(OpenCOTSClient)(
#ifdef TRANS_SERVER #ifdef TRANS_SERVER
XtransConnInfo TRANS(OpenCOTSServer)( XtransConnInfo TRANS(OpenCOTSServer)(
char * /* address */ const char * /* address */
);
#endif /* TRANS_SERVER */
#ifdef TRANS_CLIENT
XtransConnInfo TRANS(OpenCLTSClient)(
char * /* address */
);
#endif /* TRANS_CLIENT */
#ifdef TRANS_SERVER
XtransConnInfo TRANS(OpenCLTSServer)(
char * /* address */
); );
#endif /* TRANS_SERVER */ #endif /* TRANS_SERVER */
...@@ -308,13 +240,7 @@ XtransConnInfo TRANS(OpenCLTSServer)( ...@@ -308,13 +240,7 @@ XtransConnInfo TRANS(OpenCLTSServer)(
XtransConnInfo TRANS(ReopenCOTSServer)( XtransConnInfo TRANS(ReopenCOTSServer)(
int, /* trans_id */ int, /* trans_id */
int, /* fd */ int, /* fd */
char * /* port */ const char * /* port */
);
XtransConnInfo TRANS(ReopenCLTSServer)(
int, /* trans_id */
int, /* fd */
char * /* port */
); );
int TRANS(GetReopenInfo)( int TRANS(GetReopenInfo)(
...@@ -337,12 +263,24 @@ int TRANS(SetOption)( ...@@ -337,12 +263,24 @@ int TRANS(SetOption)(
int TRANS(CreateListener)( int TRANS(CreateListener)(
XtransConnInfo, /* ciptr */ XtransConnInfo, /* ciptr */
char *, /* port */ const char *, /* port */
unsigned int /* flags */ unsigned int /* flags */
); );
int TRANS(Received) (
const char* /* protocol*/
);
int TRANS(NoListen) ( int TRANS(NoListen) (
char* /* protocol*/ const char* /* protocol*/
);
int TRANS(Listen) (
const char* /* protocol*/
);
int TRANS(IsListening) (
const char* /* protocol*/
); );
int TRANS(ResetListener)( int TRANS(ResetListener)(
...@@ -360,7 +298,7 @@ XtransConnInfo TRANS(Accept)( ...@@ -360,7 +298,7 @@ XtransConnInfo TRANS(Accept)(
int TRANS(Connect)( int TRANS(Connect)(
XtransConnInfo, /* ciptr */ XtransConnInfo, /* ciptr */
char * /* address */ const char * /* address */
); );
#endif /* TRANS_CLIENT */ #endif /* TRANS_CLIENT */
...@@ -394,6 +332,10 @@ int TRANS(Writev)( ...@@ -394,6 +332,10 @@ int TRANS(Writev)(
int /* size */ int /* size */
); );
int TRANS(SendFd) (XtransConnInfo ciptr, int fd, int do_close);
int TRANS(RecvFd) (XtransConnInfo ciptr);
int TRANS(Disconnect)( int TRANS(Disconnect)(
XtransConnInfo /* ciptr */ XtransConnInfo /* ciptr */
); );
...@@ -410,12 +352,15 @@ int TRANS(IsLocal)( ...@@ -410,12 +352,15 @@ int TRANS(IsLocal)(
XtransConnInfo /* ciptr */ XtransConnInfo /* ciptr */
); );
#ifdef NX_TRANS_SOCKET
/* needed for pre-xcb libX11 as we have in NX */
int TRANS(GetMyAddr)( int TRANS(GetMyAddr)(
XtransConnInfo, /* ciptr */ XtransConnInfo, /* ciptr */
int *, /* familyp */ int *, /* familyp */
int *, /* addrlenp */ int *, /* addrlenp */
Xtransaddr ** /* addrp */ Xtransaddr ** /* addrp */
); );
#endif
int TRANS(GetPeerAddr)( int TRANS(GetPeerAddr)(
XtransConnInfo, /* ciptr */ XtransConnInfo, /* ciptr */
...@@ -431,14 +376,7 @@ int TRANS(GetConnectionNumber)( ...@@ -431,14 +376,7 @@ int TRANS(GetConnectionNumber)(
#ifdef TRANS_SERVER #ifdef TRANS_SERVER
int TRANS(MakeAllCOTSServerListeners)( int TRANS(MakeAllCOTSServerListeners)(
char *, /* port */ const char *, /* port */
int *, /* partial */
int *, /* count_ret */
XtransConnInfo ** /* ciptrs_ret */
);
int TRANS(MakeAllCLTSServerListeners)(
char *, /* port */
int *, /* partial */ int *, /* partial */
int *, /* count_ret */ int *, /* count_ret */
XtransConnInfo ** /* ciptrs_ret */ XtransConnInfo ** /* ciptrs_ret */
...@@ -475,13 +413,13 @@ TRANS(GetPeerNetworkId)( ...@@ -475,13 +413,13 @@ TRANS(GetPeerNetworkId)(
#endif /* ICE_t */ #endif /* ICE_t */
int int
TRANS(GetHostname) ( TRANS(GetHostname) (
char * /* buf */, char * /* buf */,
int /* maxlen */ int /* maxlen */
); );
#if defined(WIN32) && (defined(TCPCONN) || defined(DNETCONN)) #if defined(WIN32) && defined(TCPCONN)
int TRANS(WSAStartup)(); int TRANS(WSAStartup)();
#endif #endif
......
...@@ -24,9 +24,7 @@ not be used in advertising or otherwise to promote the sale, use or ...@@ -24,9 +24,7 @@ not be used in advertising or otherwise to promote the sale, use or
other dealings in this Software without prior written authorization other dealings in this Software without prior written authorization
from The Open Group. from The Open Group.
*/ * Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA
/* Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA
* *
* All Rights Reserved * All Rights Reserved
* *
...@@ -49,32 +47,28 @@ from The Open Group. ...@@ -49,32 +47,28 @@ from The Open Group.
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
#ifdef __UNIXOS2__
#define I_NEED_OS2_H
#endif
#ifdef XSERV_t
#include "os.h"
#else
#include <stdlib.h> #include <stdlib.h>
#endif
#define XTRANS_TRANSPORT_C /* used to flag Xtransint.h that it's being used
here, not just #included in another file */
#include "Xtransint.h" #include "Xtransint.h"
#ifdef DNETCONN #ifdef __clang__
#include "Xtransdnet.c" #pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wformat-nonliteral"
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#endif #endif
#ifdef LOCALCONN #ifdef LOCALCONN
#include "Xtranslcl.c" #include "Xtranslcl.c"
#endif #endif
#ifdef OS2PIPECONN
#include "Xtransos2.c"
#endif
#if defined(TCPCONN) || defined(UNIXCONN) #if defined(TCPCONN) || defined(UNIXCONN)
#include "Xtranssock.c" #include "Xtranssock.c"
#endif #endif
#ifdef STREAMSCONN
#include "Xtranstli.c"
#endif
#include "Xtrans.c" #include "Xtrans.c"
#include "Xtransutil.c" #include "Xtransutil.c"
#ifdef __clang__
#pragma clang diagnostic pop
#endif
...@@ -852,7 +852,7 @@ property Woo-Hoo OhBoy = "*son" ad ...@@ -852,7 +852,7 @@ property Woo-Hoo OhBoy = "*son" ad
.fi .fi
.SH "NETWORK CONNECTIONS" .SH "NETWORK CONNECTIONS"
The X server supports client connections via a platform-dependent subset of The X server supports client connections via a platform-dependent subset of
the following transport types: TCP\/IP, Unix Domain sockets, DECnet, the following transport types: TCP\/IP, Unix Domain sockets
and several varieties of SVR4 local connections. See the DISPLAY and several varieties of SVR4 local connections. See the DISPLAY
NAMES section of the \fIX\fP(__miscmansuffix__) manual page to learn how to NAMES section of the \fIX\fP(__miscmansuffix__) manual page to learn how to
specify which transport type clients should try to use. specify which transport type clients should try to use.
...@@ -882,9 +882,9 @@ If no other authorization mechanism is being used, ...@@ -882,9 +882,9 @@ If no other authorization mechanism is being used,
this list initially consists of the host on which the server is running as this list initially consists of the host on which the server is running as
well as any machines listed in the file \fI/etc/X\fBn\fI.hosts\fR, where well as any machines listed in the file \fI/etc/X\fBn\fI.hosts\fR, where
\fBn\fP is the display number of the server. Each line of the file should \fBn\fP is the display number of the server. Each line of the file should
contain either an Internet hostname (e.g. expo.lcs.mit.edu) or a DECnet contain either an Internet hostname (e.g. expo.lcs.mit.edu) or a complete
hostname in double colon format (e.g. hydra::) or a complete name in the format name in the format \fIfamily\fP:\fIname\fP as described in the
\fIfamily\fP:\fIname\fP as described in the \fIxhost\fP(1) manual page. \fIxhost\fP(1) manual page.
There should be no leading or trailing spaces on any lines. For example: There should be no leading or trailing spaces on any lines. For example:
.sp .sp
.in +8 .in +8
......
...@@ -84,13 +84,9 @@ SOFTWARE. ...@@ -84,13 +84,9 @@ SOFTWARE.
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <ctype.h> #include <ctype.h>
#if defined(TCPCONN) || defined(STREAMSCONN) || defined(ISC) || defined(__SCO__) #if defined(TCPCONN) || defined(ISC) || defined(__SCO__)
#include <netinet/in.h> #include <netinet/in.h>
#endif /* TCPCONN || STREAMSCONN || ISC || __SCO__ */ #endif /* TCPCONN || ISC || __SCO__ */
#ifdef DNETCONN
#include <netdnet/dn.h>
#include <netdnet/dnetdb.h>
#endif
#ifdef HAS_GETPEERUCRED #ifdef HAS_GETPEERUCRED
# include <ucred.h> # include <ucred.h>
...@@ -529,7 +525,7 @@ DefineSelf (int fd) ...@@ -529,7 +525,7 @@ DefineSelf (int fd)
void void
DefineSelf (int fd) DefineSelf (int fd)
{ {
#if !defined(TCPCONN) && !defined(STREAMSCONN) && !defined(UNIXCONN) && !defined(MNX_TCPCONN) #if !defined(TCPCONN) && !defined(UNIXCONN) && !defined(MNX_TCPCONN)
return; return;
#else #else
register int n; register int n;
...@@ -672,7 +668,7 @@ DefineLocalHost: ...@@ -672,7 +668,7 @@ DefineLocalHost:
selfhosts = host; selfhosts = host;
} }
} }
#endif /* !TCPCONN && !STREAMSCONN && !UNIXCONN && !MNX_TCPCONN */ #endif /* !TCPCONN && !UNIXCONN && !MNX_TCPCONN */
} }
#else #else
...@@ -740,35 +736,6 @@ DefineSelf (int fd) ...@@ -740,35 +736,6 @@ DefineSelf (int fd)
int family; int family;
register HOST *host; register HOST *host;
#ifdef DNETCONN
struct dn_naddr *dnaddr = getnodeadd();
/*
* AF_DECnet may not be listed in the interface list. Instead use
* the supported library call to find out the local address (if any).
*/
if (dnaddr)
{
addr = (unsigned char *) dnaddr;
len = dnaddr->a_len + sizeof(dnaddr->a_len);
family = FamilyDECnet;
for (host = selfhosts;
host && !addrEqual (family, addr, len, host);
host = host->next)
;
if (!host)
{
MakeHost(host,len)
if (host)
{
host->family = family;
host->len = len;
acopy(addr, host->addr, len);
host->next = selfhosts;
selfhosts = host;
}
}
}
#endif /* DNETCONN */
#ifndef HAS_GETIFADDRS #ifndef HAS_GETIFADDRS
len = sizeof(buf); len = sizeof(buf);
...@@ -823,13 +790,6 @@ DefineSelf (int fd) ...@@ -823,13 +790,6 @@ DefineSelf (int fd)
len = ifraddr_size (IFR_IFR_ADDR); len = ifraddr_size (IFR_IFR_ADDR);
family = ConvertAddr ((struct sockaddr *) &IFR_IFR_ADDR, family = ConvertAddr ((struct sockaddr *) &IFR_IFR_ADDR,
&len, (void **)&addr); &len, (void **)&addr);
#ifdef DNETCONN
/*
* DECnet was handled up above.
*/
if (family == AF_DECnet)
continue;
#endif /* DNETCONN */
if (family == -1 || family == FamilyLocal) if (family == -1 || family == FamilyLocal)
continue; continue;
#if defined(IPv6) && defined(AF_INET6) #if defined(IPv6) && defined(AF_INET6)
...@@ -975,10 +935,6 @@ DefineSelf (int fd) ...@@ -975,10 +935,6 @@ DefineSelf (int fd)
return; return;
} }
for (ifr = ifap; ifr != NULL; ifr = ifr->ifa_next) { for (ifr = ifap; ifr != NULL; ifr = ifr->ifa_next) {
#ifdef DNETCONN
if (ifr->ifa_addr.sa_family == AF_DECnet)
continue;
#endif /* DNETCONN */
len = sizeof(*(ifr->ifa_addr)); len = sizeof(*(ifr->ifa_addr));
family = ConvertAddr(ifr->ifa_addr, &len, (void **)&addr); family = ConvertAddr(ifr->ifa_addr, &len, (void **)&addr);
if (family == -1 || family == FamilyLocal) if (family == -1 || family == FamilyLocal)
...@@ -1154,22 +1110,15 @@ ResetHosts (char *display) ...@@ -1154,22 +1110,15 @@ ResetHosts (char *display)
FILE *fd; FILE *fd;
char *ptr; char *ptr;
int i, hostlen; int i, hostlen;
#if ((defined(TCPCONN) || defined(STREAMSCONN) || defined(MNX_TCPCONN)) && \ #if ((defined(TCPCONN) || defined(MNX_TCPCONN)) && \
(!defined(IPv6) || !defined(AF_INET6))) || defined(DNETCONN) (!defined(IPv6) || !defined(AF_INET6)))
union { union {
struct sockaddr sa; struct sockaddr sa;
#if defined(TCPCONN) || defined(STREAMSCONN) || defined(MNX_TCPCONN) #if defined(TCPCONN) || defined(MNX_TCPCONN)
struct sockaddr_in in; struct sockaddr_in in;
#endif /* TCPCONN || STREAMSCONN */ #endif /* TCPCONN */
#ifdef DNETCONN
struct sockaddr_dn dn;
#endif
} saddr; } saddr;
#endif #endif
#ifdef DNETCONN
struct nodeent *np;
struct dn_naddr dnaddr, *dnaddrp, *dnet_addr();
#endif
int family = 0; int family = 0;
void *addr = NULL; void *addr = NULL;
int len; int len;
...@@ -1217,7 +1166,7 @@ ResetHosts (char *display) ...@@ -1217,7 +1166,7 @@ ResetHosts (char *display)
NewHost(family, "", 0, FALSE); NewHost(family, "", 0, FALSE);
LocalHostRequested = TRUE; /* Fix for XFree86 bug #156 */ LocalHostRequested = TRUE; /* Fix for XFree86 bug #156 */
} }
#if defined(TCPCONN) || defined(STREAMSCONN) || defined(MNX_TCPCONN) #if defined(TCPCONN) || defined(MNX_TCPCONN)
else if (!strncmp("inet:", lhostname, 5)) else if (!strncmp("inet:", lhostname, 5))
{ {
family = FamilyInternet; family = FamilyInternet;
...@@ -1231,13 +1180,6 @@ ResetHosts (char *display) ...@@ -1231,13 +1180,6 @@ ResetHosts (char *display)
} }
#endif #endif
#endif #endif
#ifdef DNETCONN
else if (!strncmp("dnet:", lhostname, 5))
{
family = FamilyDECnet;
hostname = ohostname + 5;
}
#endif
#ifdef SECURE_RPC #ifdef SECURE_RPC
else if (!strncmp("nis:", lhostname, 4)) else if (!strncmp("nis:", lhostname, 4))
{ {
...@@ -1261,32 +1203,6 @@ ResetHosts (char *display) ...@@ -1261,32 +1203,6 @@ ResetHosts (char *display)
} }
} }
else else
#ifdef DNETCONN
if ((family == FamilyDECnet) || ((family == FamilyWild) &&
(ptr = strchr(hostname, ':')) && (*(ptr + 1) == ':') &&
!(*ptr = '\0'))) /* bash trailing colons if necessary */
{
/* node name (DECnet names end in "::") */
dnaddrp = dnet_addr(hostname);
if (!dnaddrp && (np = getnodebyname (hostname)))
{
/* node was specified by name */
saddr.sa.sa_family = np->n_addrtype;
len = sizeof(saddr.sa);
if (ConvertAddr (&saddr.sa, &len, (void **)&addr) == FamilyDECnet)
{
bzero ((char *) &dnaddr, sizeof (dnaddr));
dnaddr.a_len = np->n_length;
acopy (np->n_addr, dnaddr.a_addr, np->n_length);
dnaddrp = &dnaddr;
}
}
if (dnaddrp)
(void) NewHost(FamilyDECnet, (void *)dnaddrp,
(int)(dnaddrp->a_len + sizeof(dnaddrp->a_len)), FALSE);
}
else
#endif /* DNETCONN */
#ifdef SECURE_RPC #ifdef SECURE_RPC
if ((family == FamilyNetname) || (strchr(hostname, '@'))) if ((family == FamilyNetname) || (strchr(hostname, '@')))
{ {
...@@ -1295,7 +1211,7 @@ ResetHosts (char *display) ...@@ -1295,7 +1211,7 @@ ResetHosts (char *display)
} }
else else
#endif /* SECURE_RPC */ #endif /* SECURE_RPC */
#if defined(TCPCONN) || defined(STREAMSCONN) || defined(MNX_TCPCONN) #if defined(TCPCONN) || defined(MNX_TCPCONN)
{ {
#if defined(IPv6) && defined(AF_INET6) #if defined(IPv6) && defined(AF_INET6)
if ( (family == FamilyInternet) || (family == FamilyInternet6) || if ( (family == FamilyInternet) || (family == FamilyInternet6) ||
...@@ -1345,7 +1261,7 @@ ResetHosts (char *display) ...@@ -1345,7 +1261,7 @@ ResetHosts (char *display)
} }
#endif /* IPv6 */ #endif /* IPv6 */
} }
#endif /* TCPCONN || STREAMSCONN */ #endif /* TCPCONN */
family = FamilyWild; family = FamilyWild;
} }
fclose (fd); fclose (fd);
...@@ -1542,7 +1458,6 @@ AddHost (ClientPtr client, ...@@ -1542,7 +1458,6 @@ AddHost (ClientPtr client,
#if defined(IPv6) && defined(AF_INET6) #if defined(IPv6) && defined(AF_INET6)
case FamilyInternet6: case FamilyInternet6:
#endif #endif
case FamilyDECnet:
case FamilyChaos: case FamilyChaos:
case FamilyServerInterpreted: case FamilyServerInterpreted:
if ((len = CheckAddr (family, pAddr, length)) < 0) if ((len = CheckAddr (family, pAddr, length)) < 0)
...@@ -1639,7 +1554,6 @@ RemoveHost ( ...@@ -1639,7 +1554,6 @@ RemoveHost (
#if defined(IPv6) && defined(AF_INET6) #if defined(IPv6) && defined(AF_INET6)
case FamilyInternet6: case FamilyInternet6:
#endif #endif
case FamilyDECnet:
case FamilyChaos: case FamilyChaos:
case FamilyServerInterpreted: case FamilyServerInterpreted:
if ((len = CheckAddr (family, pAddr, length)) < 0) if ((len = CheckAddr (family, pAddr, length)) < 0)
...@@ -1728,7 +1642,7 @@ CheckAddr ( ...@@ -1728,7 +1642,7 @@ CheckAddr (
switch (family) switch (family)
{ {
#if defined(TCPCONN) || defined(STREAMSCONN) || defined(MNX_TCPCONN) #if defined(TCPCONN) || defined(MNX_TCPCONN)
case FamilyInternet: case FamilyInternet:
if (length == sizeof (struct in_addr)) if (length == sizeof (struct in_addr))
len = length; len = length;
...@@ -1744,21 +1658,6 @@ CheckAddr ( ...@@ -1744,21 +1658,6 @@ CheckAddr (
break; break;
#endif #endif
#endif #endif
#ifdef DNETCONN
case FamilyDECnet:
{
struct dn_naddr *dnaddr = (struct dn_naddr *) pAddr;
if ((length < sizeof(dnaddr->a_len)) ||
(length < dnaddr->a_len + sizeof(dnaddr->a_len)))
len = -1;
else
len = dnaddr->a_len + sizeof(dnaddr->a_len);
if (len > sizeof(struct dn_naddr))
len = -1;
}
break;
#endif
case FamilyServerInterpreted: case FamilyServerInterpreted:
len = siCheckAddr(pAddr, length); len = siCheckAddr(pAddr, length);
break; break;
...@@ -1832,11 +1731,11 @@ ConvertAddr ( ...@@ -1832,11 +1731,11 @@ ConvertAddr (
switch (saddr->sa_family) switch (saddr->sa_family)
{ {
case AF_UNSPEC: case AF_UNSPEC:
#if defined(UNIXCONN) || defined(LOCALCONN) || defined(OS2PIPECONN) #if defined(UNIXCONN) || defined(LOCALCONN)
case AF_UNIX: case AF_UNIX:
#endif #endif
return FamilyLocal; return FamilyLocal;
#if defined(TCPCONN) || defined(STREAMSCONN) || defined(MNX_TCPCONN) #if defined(TCPCONN) || defined(MNX_TCPCONN)
case AF_INET: case AF_INET:
#ifdef WIN32 #ifdef WIN32
if (16777343 == *(long*)&((struct sockaddr_in *) saddr)->sin_addr) if (16777343 == *(long*)&((struct sockaddr_in *) saddr)->sin_addr)
...@@ -1861,15 +1760,6 @@ ConvertAddr ( ...@@ -1861,15 +1760,6 @@ ConvertAddr (
} }
#endif #endif
#endif #endif
#ifdef DNETCONN
case AF_DECnet:
{
struct sockaddr_dn *sdn = (struct sockaddr_dn *) saddr;
*len = sdn->sdn_nodeaddrl + sizeof(sdn->sdn_nodeaddrl);
*addr = (void *) &(sdn->sdn_add);
}
return FamilyDECnet;
#endif
#ifdef CHAOSCONN #ifdef CHAOSCONN
case AF_CHAOS: case AF_CHAOS:
{ {
......
...@@ -112,7 +112,7 @@ SOFTWARE. ...@@ -112,7 +112,7 @@ SOFTWARE.
extern __const__ int _nfiles; extern __const__ int _nfiles;
#endif #endif
#if defined(TCPCONN) || defined(STREAMSCONN) #if defined(TCPCONN)
# include <netinet/in.h> # include <netinet/in.h>
# include <arpa/inet.h> # include <arpa/inet.h>
# if !defined(hpux) # if !defined(hpux)
...@@ -156,10 +156,6 @@ extern __const__ int _nfiles; ...@@ -156,10 +156,6 @@ extern __const__ int _nfiles;
#define Pid_t pid_t #define Pid_t pid_t
#endif #endif
#ifdef DNETCONN
#include <netdnet/dn.h>
#endif /* DNETCONN */
int lastfdesc; /* maximum file descriptor */ int lastfdesc; /* maximum file descriptor */
fd_set WellKnownConnections; /* Listener mask */ fd_set WellKnownConnections; /* Listener mask */
...@@ -600,12 +596,12 @@ AuthAudit (ClientPtr client, Bool letin, ...@@ -600,12 +596,12 @@ AuthAudit (ClientPtr client, Bool letin,
switch (saddr->sa_family) switch (saddr->sa_family)
{ {
case AF_UNSPEC: case AF_UNSPEC:
#if defined(UNIXCONN) || defined(LOCALCONN) || defined(OS2PIPECONN) #if defined(UNIXCONN) || defined(LOCALCONN)
case AF_UNIX: case AF_UNIX:
#endif #endif
strcpy(out, "local host"); strcpy(out, "local host");
break; break;
#if defined(TCPCONN) || defined(STREAMSCONN) || defined(MNX_TCPCONN) #if defined(TCPCONN) || defined(MNX_TCPCONN)
case AF_INET: case AF_INET:
sprintf(out, "IP %s", sprintf(out, "IP %s",
inet_ntoa(((struct sockaddr_in *) saddr)->sin_addr)); inet_ntoa(((struct sockaddr_in *) saddr)->sin_addr));
...@@ -620,12 +616,6 @@ AuthAudit (ClientPtr client, Bool letin, ...@@ -620,12 +616,6 @@ AuthAudit (ClientPtr client, Bool letin,
break; break;
#endif #endif
#endif #endif
#ifdef DNETCONN
case AF_DECnet:
sprintf(out, "DN %s",
dnet_ntoa(&((struct sockaddr_dn *) saddr)->sdn_add));
break;
#endif
default: default:
strcpy(out, "unknown address"); strcpy(out, "unknown address");
} }
......
...@@ -131,7 +131,7 @@ OR PERFORMANCE OF THIS SOFTWARE. ...@@ -131,7 +131,7 @@ OR PERFORMANCE OF THIS SOFTWARE.
#include <stdlib.h> /* for malloc() */ #include <stdlib.h> /* for malloc() */
#if defined(TCPCONN) || defined(STREAMSCONN) #if defined(TCPCONN)
# ifndef WIN32 # ifndef WIN32
# include <netdb.h> # include <netdb.h>
# endif # endif
...@@ -1285,7 +1285,7 @@ int ...@@ -1285,7 +1285,7 @@ int
set_font_authorizations(char **authorizations, int *authlen, void * client) set_font_authorizations(char **authorizations, int *authlen, void * client)
{ {
#define AUTHORIZATION_NAME "hp-hostname-1" #define AUTHORIZATION_NAME "hp-hostname-1"
#if defined(TCPCONN) || defined(STREAMSCONN) #if defined(TCPCONN)
static char *result = NULL; static char *result = NULL;
static char *p = NULL; static char *p = NULL;
......
...@@ -284,7 +284,7 @@ XdmAuthorizationValidate (unsigned char *plain, int length, ...@@ -284,7 +284,7 @@ XdmAuthorizationValidate (unsigned char *plain, int length,
if (_XSERVTransGetPeerAddr(((OsCommPtr)xclient->osPrivate)->trans_conn, if (_XSERVTransGetPeerAddr(((OsCommPtr)xclient->osPrivate)->trans_conn,
&family, &addr_len, &addr) == 0 &family, &addr_len, &addr) == 0
&& _XSERVTransConvertAddress(&family, &addr_len, &addr) == 0) { && _XSERVTransConvertAddress(&family, &addr_len, &addr) == 0) {
#if defined(TCPCONN) || defined(STREAMSCONN) #if defined(TCPCONN)
if (family == FamilyInternet && if (family == FamilyInternet &&
memcmp((char *)addr, client->client, 4) != 0) { memcmp((char *)addr, client->client, 4) != 0) {
free (client); free (client);
......
...@@ -54,11 +54,6 @@ ...@@ -54,11 +54,6 @@
#include <sys/ioctl.h> #include <sys/ioctl.h>
#endif #endif
#ifdef STREAMSCONN
#include <tiuser.h>
#include <netconfig.h>
#include <netdir.h>
#endif
#ifndef NX_TRANS_SOCKET #ifndef NX_TRANS_SOCKET
...@@ -1029,43 +1024,6 @@ XdmcpAddAuthorization ( ...@@ -1029,43 +1024,6 @@ XdmcpAddAuthorization (
static void static void
get_xdmcp_sock(void) get_xdmcp_sock(void)
{ {
#ifdef STREAMSCONN
struct netconfig *nconf;
if ((xdmcpSocket = t_open("/dev/udp", O_RDWR, 0)) < 0) {
XdmcpWarning("t_open() of /dev/udp failed");
return;
}
if( t_bind(xdmcpSocket,NULL,NULL) < 0 ) {
XdmcpWarning("UDP socket creation failed");
t_error("t_bind(xdmcpSocket) failed" );
t_close(xdmcpSocket);
return;
}
/*
* This part of the code looks contrived. It will actually fit in nicely
* when the CLTS part of Xtrans is implemented.
*/
if( (nconf=getnetconfigent("udp")) == NULL ) {
XdmcpWarning("UDP socket creation failed: getnetconfigent()");
t_unbind(xdmcpSocket);
t_close(xdmcpSocket);
return;
}
if( netdir_options(nconf, ND_SET_BROADCAST, xdmcpSocket, NULL) ) {
XdmcpWarning("UDP set broadcast option failed: netdir_options()");
freenetconfigent(nconf);
t_unbind(xdmcpSocket);
t_close(xdmcpSocket);
return;
}
freenetconfigent(nconf);
#else
int soopts = 1; int soopts = 1;
#if defined(IPv6) && defined(AF_INET6) #if defined(IPv6) && defined(AF_INET6)
...@@ -1085,7 +1043,6 @@ get_xdmcp_sock(void) ...@@ -1085,7 +1043,6 @@ get_xdmcp_sock(void)
FatalError("Xserver: failed to bind to -from address: %s\n", xdm_from); FatalError("Xserver: failed to bind to -from address: %s\n", xdm_from);
} }
} }
#endif /* STREAMSCONN */
} }
static void static void
...@@ -1572,7 +1529,7 @@ get_addr_by_name( ...@@ -1572,7 +1529,7 @@ get_addr_by_name(
#ifdef XTHREADS_NEEDS_BYNAMEPARAMS #ifdef XTHREADS_NEEDS_BYNAMEPARAMS
_Xgethostbynameparams hparams; _Xgethostbynameparams hparams;
#endif #endif
#if defined(WIN32) && (defined(TCPCONN) || defined(DNETCONN)) #if defined(WIN32) && defined(TCPCONN)
_XSERVTransWSAStartup(); _XSERVTransWSAStartup();
#endif #endif
if (!(hep = _XGethostbyname(namestr, hparams))) if (!(hep = _XGethostbyname(namestr, hparams)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment