45e9809aff7304721fddb95654901b32195c9c7avboxsync/***********************************************************
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncCopyright 1987, 1998 The Open Group
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncPermission to use, copy, modify, distribute, and sell this software and its
45e9809aff7304721fddb95654901b32195c9c7avboxsyncdocumentation for any purpose is hereby granted without fee, provided that
45e9809aff7304721fddb95654901b32195c9c7avboxsyncthe above copyright notice appear in all copies and that both that
45e9809aff7304721fddb95654901b32195c9c7avboxsynccopyright notice and this permission notice appear in supporting
45e9809aff7304721fddb95654901b32195c9c7avboxsyncdocumentation.
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncThe above copyright notice and this permission notice shall be included in
45e9809aff7304721fddb95654901b32195c9c7avboxsyncall copies or substantial portions of the Software.
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
45e9809aff7304721fddb95654901b32195c9c7avboxsyncIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
45e9809aff7304721fddb95654901b32195c9c7avboxsyncOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
45e9809aff7304721fddb95654901b32195c9c7avboxsyncAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
45e9809aff7304721fddb95654901b32195c9c7avboxsyncCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncExcept as contained in this notice, the name of The Open Group shall not be
45e9809aff7304721fddb95654901b32195c9c7avboxsyncused in advertising or otherwise to promote the sale, use or other dealings
45e9809aff7304721fddb95654901b32195c9c7avboxsyncin this Software without prior written authorization from The Open Group.
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncCopyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync All Rights Reserved
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncPermission to use, copy, modify, and distribute this software and its
45e9809aff7304721fddb95654901b32195c9c7avboxsyncdocumentation for any purpose and without fee is hereby granted,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncprovided that the above copyright notice appear in all copies and that
45e9809aff7304721fddb95654901b32195c9c7avboxsyncboth that copyright notice and this permission notice appear in
45e9809aff7304721fddb95654901b32195c9c7avboxsyncsupporting documentation, and that the name of Digital not be
45e9809aff7304721fddb95654901b32195c9c7avboxsyncused in advertising or publicity pertaining to distribution of the
45e9809aff7304721fddb95654901b32195c9c7avboxsyncsoftware without specific, written prior permission.
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncDIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
45e9809aff7304721fddb95654901b32195c9c7avboxsyncALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
45e9809aff7304721fddb95654901b32195c9c7avboxsyncDIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
45e9809aff7304721fddb95654901b32195c9c7avboxsyncANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
45e9809aff7304721fddb95654901b32195c9c7avboxsyncSOFTWARE.
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync******************************************************************/
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#ifdef HAVE_DIX_CONFIG_H
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <dix-config.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#ifndef _OSDEP_H_
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define _OSDEP_H_ 1
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define BOTIMEOUT 200 /* in milliseconds */
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define BUFSIZE 4096
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define BUFWATERMARK 8192
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <X11/Xdmcp.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#ifndef sgi /* SGI defines OPEN_MAX in a useless way */
45e9809aff7304721fddb95654901b32195c9c7avboxsync#ifndef X_NOT_POSIX
45e9809aff7304721fddb95654901b32195c9c7avboxsync#ifdef _POSIX_SOURCE
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <limits.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync#else
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define _POSIX_SOURCE
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <limits.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync#undef _POSIX_SOURCE
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif
45e9809aff7304721fddb95654901b32195c9c7avboxsync#else /* X_NOT_POSIX */
45e9809aff7304721fddb95654901b32195c9c7avboxsync#ifdef WIN32
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define _POSIX_
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <limits.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync#undef _POSIX_
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif /* X_NOT_POSIX */
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#ifdef __QNX__
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define NOFILES_MAX 256
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif
45e9809aff7304721fddb95654901b32195c9c7avboxsync#ifndef OPEN_MAX
45e9809aff7304721fddb95654901b32195c9c7avboxsync#ifdef SVR4
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define OPEN_MAX 256
45e9809aff7304721fddb95654901b32195c9c7avboxsync#else
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <sys/param.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync#ifndef OPEN_MAX
45e9809aff7304721fddb95654901b32195c9c7avboxsync#if defined(NOFILE) && !defined(NOFILES_MAX)
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define OPEN_MAX NOFILE
45e9809aff7304721fddb95654901b32195c9c7avboxsync#else
45e9809aff7304721fddb95654901b32195c9c7avboxsync#if !defined(WIN32)
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define OPEN_MAX NOFILES_MAX
45e9809aff7304721fddb95654901b32195c9c7avboxsync#else
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define OPEN_MAX 256
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <X11/Xpoll.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/*
45e9809aff7304721fddb95654901b32195c9c7avboxsync * MAXSOCKS is used only for initialising MaxClients when no other method
45e9809aff7304721fddb95654901b32195c9c7avboxsync * like sysconf(_SC_OPEN_MAX) is not supported.
45e9809aff7304721fddb95654901b32195c9c7avboxsync */
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#if OPEN_MAX <= 256
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define MAXSOCKS (OPEN_MAX - 1)
45e9809aff7304721fddb95654901b32195c9c7avboxsync#else
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define MAXSOCKS 256
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* MAXSELECT is the number of fds that select() can handle */
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define MAXSELECT (sizeof(fd_set) * NBBY)
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#ifndef HAS_GETDTABLESIZE
45e9809aff7304721fddb95654901b32195c9c7avboxsync#if !defined(hpux) && !defined(SVR4) && !defined(SYSV)
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define HAS_GETDTABLESIZE
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <stddef.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef Bool (*ValidatorFunc)(ARRAY8Ptr Auth, ARRAY8Ptr Data, int packet_type);
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef Bool (*GeneratorFunc)(ARRAY8Ptr Auth, ARRAY8Ptr Data, int packet_type);
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef Bool (*AddAuthorFunc)(unsigned name_length, char *name, unsigned data_length, char *data);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef struct _connectionInput {
45e9809aff7304721fddb95654901b32195c9c7avboxsync struct _connectionInput *next;
45e9809aff7304721fddb95654901b32195c9c7avboxsync char *buffer; /* contains current client input */
45e9809aff7304721fddb95654901b32195c9c7avboxsync char *bufptr; /* pointer to current start of data */
45e9809aff7304721fddb95654901b32195c9c7avboxsync int bufcnt; /* count of bytes in buffer */
45e9809aff7304721fddb95654901b32195c9c7avboxsync int lenLastReq;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int size;
45e9809aff7304721fddb95654901b32195c9c7avboxsync} ConnectionInput, *ConnectionInputPtr;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef struct _connectionOutput {
45e9809aff7304721fddb95654901b32195c9c7avboxsync struct _connectionOutput *next;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int size;
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned char *buf;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int count;
45e9809aff7304721fddb95654901b32195c9c7avboxsync} ConnectionOutput, *ConnectionOutputPtr;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncstruct _osComm;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define AuthInitArgs void
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef void (*AuthInitFunc) (AuthInitArgs);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define AuthAddCArgs unsigned short data_length, char *data, XID id
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef int (*AuthAddCFunc) (AuthAddCArgs);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define AuthCheckArgs unsigned short data_length, char *data, ClientPtr client, char **reason
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef XID (*AuthCheckFunc) (AuthCheckArgs);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define AuthFromIDArgs XID id, unsigned short *data_lenp, char **datap
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef int (*AuthFromIDFunc) (AuthFromIDArgs);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define AuthGenCArgs unsigned data_length, char *data, XID id, unsigned *data_length_return, char **data_return
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef XID (*AuthGenCFunc) (AuthGenCArgs);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define AuthRemCArgs unsigned short data_length, char *data
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef int (*AuthRemCFunc) (AuthRemCArgs);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define AuthRstCArgs void
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef int (*AuthRstCFunc) (AuthRstCArgs);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define AuthToIDArgs unsigned short data_length, char *data
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef XID (*AuthToIDFunc) (AuthToIDArgs);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef void (*OsCloseFunc)(ClientPtr);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef int (*OsFlushFunc)(ClientPtr who, struct _osComm * oc, char* extraBuf, int extraCount);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef struct _osComm {
45e9809aff7304721fddb95654901b32195c9c7avboxsync int fd;
45e9809aff7304721fddb95654901b32195c9c7avboxsync ConnectionInputPtr input;
45e9809aff7304721fddb95654901b32195c9c7avboxsync ConnectionOutputPtr output;
45e9809aff7304721fddb95654901b32195c9c7avboxsync XID auth_id; /* authorization id */
45e9809aff7304721fddb95654901b32195c9c7avboxsync CARD32 conn_time; /* timestamp if not established, else 0 */
45e9809aff7304721fddb95654901b32195c9c7avboxsync struct _XtransConnInfo *trans_conn; /* transport connection object */
45e9809aff7304721fddb95654901b32195c9c7avboxsync} OsCommRec, *OsCommPtr;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int FlushClient(
45e9809aff7304721fddb95654901b32195c9c7avboxsync ClientPtr /*who*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync OsCommPtr /*oc*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync char* /*extraBuf*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /*extraCount*/
45e9809aff7304721fddb95654901b32195c9c7avboxsync);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void FreeOsBuffers(
45e9809aff7304721fddb95654901b32195c9c7avboxsync OsCommPtr /*oc*/
45e9809aff7304721fddb95654901b32195c9c7avboxsync);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include "dix.h"
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern fd_set AllSockets;
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern fd_set AllClients;
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern fd_set LastSelectMask;
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern fd_set WellKnownConnections;
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern fd_set EnabledDevices;
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern fd_set ClientsWithInput;
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern fd_set ClientsWriteBlocked;
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern fd_set OutputPending;
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern fd_set IgnoredClientsWithInput;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#ifndef WIN32
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int *ConnectionTranslation;
45e9809aff7304721fddb95654901b32195c9c7avboxsync#else
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int GetConnectionTranslation(int conn);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void SetConnectionTranslation(int conn, int client);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void ClearConnectionTranslation();
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern Bool NewOutputPending;
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern Bool AnyClientsWriteBlocked;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern WorkQueuePtr workQueue;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* added by raphael */
45e9809aff7304721fddb95654901b32195c9c7avboxsync#ifdef WIN32
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef long int fd_mask;
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define ffs mffs
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int mffs(fd_mask);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* in auth.c */
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void GenerateRandomData (int len, char *buf);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* in mitauth.c */
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern XID MitCheckCookie (AuthCheckArgs);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern XID MitGenerateCookie (AuthGenCArgs);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern XID MitToID (AuthToIDArgs);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int MitAddCookie (AuthAddCArgs);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int MitFromID (AuthFromIDArgs);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int MitRemoveCookie (AuthRemCArgs);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int MitResetCookie (AuthRstCArgs);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* in xdmauth.c */
45e9809aff7304721fddb95654901b32195c9c7avboxsync#ifdef HASXDMAUTH
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern XID XdmCheckCookie (AuthCheckArgs);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern XID XdmToID (AuthToIDArgs);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int XdmAddCookie (AuthAddCArgs);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int XdmFromID (AuthFromIDArgs);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int XdmRemoveCookie (AuthRemCArgs);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int XdmResetCookie (AuthRstCArgs);
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* in rpcauth.c */
45e9809aff7304721fddb95654901b32195c9c7avboxsync#ifdef SECURE_RPC
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void SecureRPCInit (AuthInitArgs);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern XID SecureRPCCheck (AuthCheckArgs);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern XID SecureRPCToID (AuthToIDArgs);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int SecureRPCAdd (AuthAddCArgs);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int SecureRPCFromID (AuthFromIDArgs);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int SecureRPCRemove (AuthRemCArgs);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int SecureRPCReset (AuthRstCArgs);
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* in secauth.c */
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern XID AuthSecurityCheck (AuthCheckArgs);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* in xdmcp.c */
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void XdmcpUseMsg (void);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int XdmcpOptions(int argc, char **argv, int i);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void XdmcpRegisterConnection (
45e9809aff7304721fddb95654901b32195c9c7avboxsync int type,
45e9809aff7304721fddb95654901b32195c9c7avboxsync char *address,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int addrlen);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void XdmcpRegisterAuthorizations (void);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void XdmcpRegisterAuthorization (char *name, int namelen);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void XdmcpInit (void);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void XdmcpReset (void);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void XdmcpOpenDisplay(int sock);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void XdmcpCloseDisplay(int sock);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void XdmcpRegisterAuthentication (
45e9809aff7304721fddb95654901b32195c9c7avboxsync char *name,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int namelen,
45e9809aff7304721fddb95654901b32195c9c7avboxsync char *data,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int datalen,
45e9809aff7304721fddb95654901b32195c9c7avboxsync ValidatorFunc Validator,
45e9809aff7304721fddb95654901b32195c9c7avboxsync GeneratorFunc Generator,
45e9809aff7304721fddb95654901b32195c9c7avboxsync AddAuthorFunc AddAuth);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncstruct sockaddr_in;
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void XdmcpRegisterBroadcastAddress (struct sockaddr_in *addr);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#ifdef HASXDMAUTH
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void XdmAuthenticationInit (char *cookie, int cookie_length);
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif /* _OSDEP_H_ */