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