#define NUM_AUTHORIZATION (sizeof (AuthProtocols) / sizeof (AuthProtocols[0]))
static struct AuthProtocol *
-findProtocol (name_length, name)
- unsigned short name_length;
- char *name;
+findProtocol (unsigned short name_length, const char *name)
{
int i;
return (struct AuthProtocol *) 0;
}
-ValidAuthorization (name_length, name)
+
#if NeedWidePrototypes
- unsigned int name_length;
+int
+ValidAuthorization (unsigned int name_length, char *name)
#else
- unsigned short name_length;
+int
+ValidAuthorization (unsigned short name_length, char *name)
#endif /* NeedWidePrototypes */
- char *name;
{
if (findProtocol (name_length, name))
return TRUE;
}
static Xauth *
-GenerateAuthorization (name_length, name)
-unsigned short name_length;
-char *name;
+GenerateAuthorization (unsigned short name_length, char *name)
{
struct AuthProtocol *a;
Xauth *auth = 0;
return auth;
}
-void
-SetProtoDisplayAuthorization (pdpy,
- authorizationNameLen, authorizationName)
- struct protoDisplay *pdpy;
#if NeedWidePrototypes
- unsigned int authorizationNameLen;
+void
+SetProtoDisplayAuthorization (struct protoDisplay *pdpy, unsigned int authorizationNameLen, char *authorizationName)
#else
- unsigned short authorizationNameLen;
+void
+SetProtoDisplayAuthorization (struct protoDisplay *pdpy, unsigned short authorizationNameLen, char *authorizationName)
#endif /* NeedWidePrototypes */
- char *authorizationName;
{
struct AuthProtocol *a;
Xauth *auth;
}
void
-CleanUpFileName (src, dst, len)
- char *src, *dst;
- int len;
+CleanUpFileName (char *src, char *dst, int len)
{
while (*src) {
if (--len <= 0)
static char authdir1[] = "authdir";
static char authdir2[] = "authfiles";
-static
-MakeServerAuthFile (d)
- struct display *d;
+static int
+MakeServerAuthFile (struct display *d)
{
int len;
#ifdef SYSV
return TRUE;
}
-SaveServerAuthorizations (d, auths, count)
- struct display *d;
- Xauth **auths;
- int count;
+int
+SaveServerAuthorizations (struct display *d, Xauth **auths, int count)
{
FILE *auth_file;
int mask;
}
void
-SetLocalAuthorization (d)
- struct display *d;
+SetLocalAuthorization (struct display *d)
{
Xauth *auth, **auths;
int i, j;
* to allow root in. This is bogus and should be fixed.
*/
void
-SetAuthorization (d)
- struct display *d;
+SetAuthorization (struct display *d)
{
register Xauth **auth = d->authorizations;
int i;
}
}
-static
-openFiles (name, new_name, oldp, newp)
-char *name, *new_name;
-FILE **oldp, **newp;
+static int
+openFiles (char *name, char *new_name, FILE **oldp, FILE **newp)
{
int mask;
int null_data = 0;
return 1;
}
-static
-binaryEqual (a, b, len)
-char *a, *b;
-unsigned short len;
+int
+binaryEqual (char *a, char *b, unsigned short len)
{
while (len-- > 0)
if (*a++ != *b++)
return 1;
}
-static
-dumpBytes (len, data)
-unsigned short len;
-char *data;
+int
+dumpBytes (unsigned short len, char *data)
{
unsigned short i;
Debug ("\n");
}
-static
-dumpAuth (auth)
- Xauth *auth;
+static void
+dumpAuth (Xauth *auth)
{
Debug ("family: %d\n", auth->family);
Debug ("addr: ");
static struct addrList *addrs;
-static
-initAddrs ()
+static void
+initAddrs (void)
{
addrs = 0;
}
-static
-doneAddrs ()
+static void
+doneAddrs (void)
{
struct addrList *a, *n;
for (a = addrs; a; a = n) {
}
}
-static checkEntry ();
+static int checkEntry (Xauth *auth);
static void
-saveEntry (auth)
- Xauth *auth;
+saveEntry (Xauth *auth)
{
struct addrList *new;
addrs = new;
}
-static
-checkEntry (auth)
- Xauth *auth;
+static int
+checkEntry (Xauth *auth)
{
struct addrList *a;
return 1;
}
-static
-writeAddr (family, addr_length, addr, file, auth)
- int family;
- int addr_length;
- char *addr;
- FILE *file;
- Xauth *auth;
+static void
+writeAddr (int family, int addr_length, char *addr, FILE *file, Xauth *auth)
{
auth->family = (unsigned short) family;
auth->address_length = addr_length;
saveEntry (auth);
}
-static
-DefineLocal (file, auth)
- FILE *file;
- Xauth *auth;
+static void
+DefineLocal (FILE *file, Xauth *auth)
{
char displayname[100];
#ifdef USL
/* Deal with different SIOCGIFCONF ioctl semantics on UnixWare */
static int
-ifioctl (fd, cmd, arg)
- int fd;
- int cmd;
- char *arg;
+ifioctl (int fd, int cmd, char *arg)
{
struct strioctl ioc;
int ret;
#include <netinet/in.h>
#include <netinet/in_var.h>
-static
-DefineSelf (fd, file, auth)
- int fd;
- FILE *file;
- Xauth *auth;
+static void
+DefineSelf (int fd, FILE *file, Xauth *auth)
{
/*
* The Wolongong drivers used by NCR SVR4/MP-RAS don't understand the
/* Define this host for access control. Find all the hosts the OS knows about
* for this fd and add them to the selfhosts list.
*/
-static
+static void
#ifdef __osf__
DefineSelf (fd, file, auth, addr_family)
#else
/* Define this host for access control. Find all the hosts the OS knows about
* for this fd and add them to the selfhosts list.
*/
-static
+static void
DefineSelf (fd, file, auth)
int fd;
{
#endif /* WINTCP */
-static
+static void
setAuthNumber (auth, name)
Xauth *auth;
char *name;
}
}
-static
-writeLocalAuth (file, auth, name)
- FILE *file;
- Xauth *auth;
- char *name;
+static void
+writeLocalAuth (FILE *file, Xauth *auth, char *name)
{
int fd;
#ifdef XDMCP
static void
-writeRemoteAuth (file, auth, peer, peerlen, name)
- FILE *file;
- Xauth *auth;
- XdmcpNetaddr peer;
- int peerlen;
- char *name;
+writeRemoteAuth (FILE *file, Xauth *auth, XdmcpNetaddr peer, int peerlen, char *name)
{
int family = FamilyLocal;
char *addr;
#endif /* XDMCP */
void
-SetUserAuthorization (d, verify)
- struct display *d;
- struct verify_info *verify;
+SetUserAuthorization (struct display *d, struct verify_info *verify)
{
FILE *old, *new;
char home_name[1024], backup_name[1024], new_name[1024];
}
void
-RemoveUserAuthorization (d, verify)
- struct display *d;
- struct verify_info *verify;
+RemoveUserAuthorization (struct display *d, struct verify_info *verify)
{
char *home;
Xauth **auths, *entry;
# include <ctype.h>
# include <errno.h>
-char *
-Print8Address (ARRAY8Ptr Address);
+static char *Print8Address (ARRAY8Ptr Address);
-static
+static int
FormatBytes (
unsigned char *data,
int length,
return 1;
}
-static
+static int
FormatARRAY8 (
ARRAY8Ptr a,
char *buf,
static IndirectUsersPtr indirectUsers;
+int
RememberIndirectClient (
ARRAY8Ptr clientAddress,
CARD16 connectionType)
return 1;
}
+void
ForgetIndirectClient (
ARRAY8Ptr clientAddress,
CARD16 connectionType)
}
}
+int
IsIndirectClient (
ARRAY8Ptr clientAddress,
CARD16 connectionType)
extern char *NetaddrPort();
-static
+static int
FormatChooserArgument (
char *buf,
int len)
}
#ifdef notdef
-static
+static void
RemoveIndirectChoice (clientAddress, connectionType)
ARRAY8Ptr clientAddress;
CARD16 connectionType;
}
}
+int
ProcessChooserSocket (
int fd)
{
close (client_fd);
}
- RunChooser (
+void
+RunChooser (
struct display *d)
{
char **args, **parseArgs(), **systemEnv();
exit (REMANAGE_DISPLAY);
}
-char *
+static char *
Print8Address (
ARRAY8Ptr Address)
{
int connectionType;
} app_resources;
+static int FromHex (char *s, char *d, int len);
+
#define offset(field) XtOffsetOf(struct _app_resources, field)
#define XtRARRAY8 "ARRAY8"
/* ARGSUSED */
static void
-PingHosts (closure, id)
- XtPointer closure;
- XtIntervalId *id;
+PingHosts (XtPointer closure, XtIntervalId *id)
{
HostAddr *hosts;
char **NameTable;
int NameTableSize;
-static int
-HostnameCompare (a, b)
#if defined(__STDC__)
- const void *a, *b;
+static int
+HostnameCompare (const void *a, const void *b)
#else
- char *a, *b;
+static int
+HostnameCompare (char *a, char *b)
#endif
{
return strcmp (*(char **)a, *(char **)b);
}
static void
-RebuildTable (size)
+RebuildTable (int size)
{
char **newTable = 0;
HostName *names;
}
static void
-RebuildTableAdd (size)
- int size;
+RebuildTableAdd (int size)
{
char **newTable = 0;
HostName *names;
static int
-AddHostname (hostname, status, addr, willing)
- ARRAY8Ptr hostname, status;
- struct sockaddr *addr;
- int willing;
+AddHostname (ARRAY8Ptr hostname, ARRAY8Ptr status, struct sockaddr *addr, int willing)
{
HostName *new, **names, *name;
ARRAY8 hostAddr;
return 1;
}
-static
-DisposeHostname (host)
- HostName *host;
+static void
+DisposeHostname (HostName *host)
{
XdmcpDisposeARRAY8 (&host->hostname);
XdmcpDisposeARRAY8 (&host->hostaddr);
free ((char *) host);
}
-static
-RemoveHostname (host)
- HostName *host;
+static int
+RemoveHostname (HostName *host)
{
HostName **prev, *hosts;
DisposeHostname (host);
NameTableSize--;
RebuildTable (NameTableSize);
+
+ return 1;
}
-static
-EmptyHostnames ()
+static void
+EmptyHostnames (void)
{
HostName *hosts, *next;
/* ARGSUSED */
static void
-ReceivePacket (closure, source, id)
- XtPointer closure;
- int *source;
- XtInputId *id;
+ReceivePacket (XtPointer closure, int *source, XtInputId *id)
{
XdmcpHeader header;
ARRAY8 authenticationName;
}
}
-RegisterHostaddr (addr, len, type)
- struct sockaddr *addr;
- int len;
- xdmOpCode type;
+int
+RegisterHostaddr (struct sockaddr *addr, int len, xdmOpCode type)
{
HostAddr *host, **prev;
;
*prev = host;
host->next = NULL;
+ return 1;
}
/*
* The special name "BROADCAST" looks up all the broadcast
* addresses on the local host.
*/
-
-RegisterHostname (name)
- char *name;
+int
+RegisterHostname (char *name)
{
struct hostent *hostent;
struct sockaddr_in in_addr;
RegisterHostaddr ((struct sockaddr *)&in_addr, sizeof (in_addr),
QUERY);
}
+ return 1;
}
static ARRAYofARRAY8 AuthenticationNames;
-RegisterAuthenticationName (name, namelen)
- char *name;
- int namelen;
+static int
+RegisterAuthenticationName (char *name, int namelen)
{
ARRAY8Ptr authName;
if (!XdmcpReallocARRAYofARRAY8 (&AuthenticationNames,
if (!XdmcpAllocARRAY8 (authName, namelen))
return 0;
memmove( authName->data, name, namelen);
+
+ return 1;
}
-InitXDMCP (argv)
- char **argv;
+int
+InitXDMCP (char **argv)
{
int soopts = 1;
XdmcpHeader header;
}
void
-Choose (h)
- HostName *h;
+Choose (HostName *h)
{
if (app_resources.xdmAddress)
{
/* ARGSUSED */
void
-DoAccept (w, event, params, num_params)
- Widget w;
- XEvent *event;
- String *params;
- Cardinal *num_params;
+DoAccept (Widget w, XEvent *event, String *params, Cardinal *num_params)
{
HostName *h;
XmStringTable selectedItem;
/* ARGSUSED */
static void
-DoCheckWilling (w, event, params, num_params)
- Widget w;
- XEvent *event;
- String *params;
- Cardinal *num_params;
+DoCheckWilling (Widget w, XEvent *event, String *params, Cardinal *num_params)
{
HostName *h;
XmStringTable selectedItem;
/* ARGSUSED */
void
-DoCancel (w, event, params, num_params)
- Widget w;
- XEvent *event;
- String *params;
- Cardinal *num_params;
+DoCancel (Widget w, XEvent *event, String *params, Cardinal *num_params)
{
exit (OBEYSESS_DISPLAY);
}
/* ARGSUSED */
void
-DoPing (w, event, params, num_params)
- Widget w;
- XEvent *event;
- String *params;
- Cardinal *num_params;
+DoPing (Widget w, XEvent *event, String *params, Cardinal *num_params)
{
EmptyHostnames ();
pingTry = 0;
"Ping", DoPing,
};
-main (argc, argv)
- char **argv;
+int
+main (int argc, char **argv)
{
Arg position[3];
Dimension width, height;
#endif
InitXDMCP (argv + 1);
XtMainLoop ();
- exit(0);
- /*NOTREACHED*/
+
+ return 0;
}
/* Converts the hex string s of length len into the byte array d.
Returns 0 if s was a legal hex string, 1 otherwise.
*/
-int
-FromHex (s, d, len)
- char *s, *d;
- int len;
+static int
+FromHex (char *s, char *d, int len)
{
int t;
int ret = len&1; /* odd-length hex strings are illegal */
/*ARGSUSED*/
static void
-CvtStringToARRAY8 (args, num_args, fromVal, toVal)
- XrmValuePtr args;
- Cardinal *num_args;
- XrmValuePtr fromVal;
- XrmValuePtr toVal;
+CvtStringToARRAY8 (XrmValuePtr args, Cardinal *num_args, XrmValuePtr fromVal, XrmValuePtr toVal)
{
static ARRAY8Ptr dest;
char *s;
{
ParseDisplay (servers, acceptableTypes, NumTypes, &puser);
}
+ return 1;
}
static void
d->status = running;
break;
}
+ return 1;
}
static void
free(p);
#endif
+ return 1;
}
(f2 = open(errorLogFile, O_RDWR)) < 0 ) {
Debug("TrimErrorLog(): Cannot open file %s, error number = %d\n",
errorLogFile, errno);
+ if(f1 >= 0) {
+ close(f1);
+ }
+ if(f2 >= 0) {
+ close(f2);
+ }
return;
}
if ( (status = lseek(f2, deleteBytes, SEEK_SET)) < 0 ) {
Debug("TrimErrorLog(): Cannot lseek() in file %s, error number = %d\n",
errorLogFile, errno);
+ close(f1);
+ close(f2);
return;
}
freeSomeArgs (args, argv - args);
+
+ return 1;
}
static struct displayMatch {
static int SeparateParts( char **path );
-static
+static void
DebugFontPath(char *note, char **path, int nelems)
{
int i;
if (fph) free(fph);
if (fpt) free(fpt);
XFreeFontPath(fontPath);
+
+ return 1;
}
/* ___________________________________________________________________
c[3] = l & 0xff;
}
-static
-InitXdmcpWrapper ()
+static void
+InitXdmcpWrapper (void)
{
long sum[2];
unsigned char tmpkey[8];
static unsigned long int next = 1;
static int
-xdm_rand()
+xdm_rand(void)
{
next = next * 1103515245 + 12345;
return (unsigned int)(next/65536) % 32768;
}
static void
-xdm_srand(seed)
- unsigned int seed;
+xdm_srand(unsigned int seed)
{
next = seed;
}
#endif /* no HASXDMAUTH */
#ifdef USE_ENCRYPT
-static
-bitsToBytes (bits, bytes)
-unsigned long bits[2];
-char bytes[64];
+static void
+bitsToBytes (unsigned long bits[2], char bytes[64])
{
int bit, byte;
int i;
#if defined(linux) || defined(CSRG_BASED) || defined(sun)
#define READ_LIMIT (sizeof (long) * 2)
-static sumFile (char *name, long sum[2])
+static int
+sumFile (char *name, long sum[2])
{
long buf[2];
int fd;
#else /* linux || CSRG_BASED */
-static
-sumFile (name, sum)
-char *name;
-long sum[2];
+static int
+sumFile (char *name, long sum[2])
{
long buf[1024*2];
int cnt;
}
#endif /* linux || CSRG_BASED */
-GenerateAuthData (auth, len)
-char *auth;
-int len;
+void
+GenerateAuthData (char *auth, int len)
{
long ldata[2];
XauDisposeAuth (pdpy->xdmcpAuthorization);
free ((char *) pdpy->address);
free ((char *) pdpy);
+
+ return 1;
}
char * searchPath
)
{
-char * paths = strdup(searchPath);
-char * savepaths = paths;
+char * paths = NULL;
+char * savepaths = NULL;
char * path;
char * chance;
FILE * f;
if (filename == NULL || searchPath == NULL)
return NULL;
+ paths = strdup(searchPath);
+ savepaths = paths;
+
while (1) {
/* if there is a :, zero it */
break;
}
+
+ return 1;
}
XrmOptionDescRec configTable [] = {
strncpy(newname, tempName, tempLen);
strcpy(newname+tempLen, name);
free (langString);
+ free (tempName);
return(newname);
}
}
+
+ default:
+ /* special is of an unknown value */
+ return(NULL);
}
}
*p = '_';
}
- if ( strlen(language) > 0 )
- free(language);
+ free(language);
Debug("LoadXloginResources - loading resource db from %s\n", resources);
signal (SIGALRM, SIG_DFL);
sig = SIGKILL;
}
+ return 1;
}
int
return 0;
}
+/* returns 0 on failure, -1 on out of mem, and 1 on success */
int
execute(char **argv, char **environ )
{
;
session_execve (newargv[0], newargv, environ);
}
+
+ return 1;
}
extern ARRAY8Ptr ChooseAuthentication ();
extern int SelectConnectionTypeIndex ();
+void query_respond (from, fromlen, length);
+void forward_respond (struct sockaddr *from, int fromlen, int length);
+void request_respond (struct sockaddr *from, int fromlen, int length);
+void send_willing (struct sockaddr *from, int fromlen, ARRAY8Ptr authenticationName, ARRAY8Ptr status);
+void send_unwilling (struct sockaddr *from, int fromlen, ARRAY8Ptr authenticationName, ARRAY8Ptr status);
+void send_accept (struct sockaddr *to, int tolen, CARD32 sessionID, ARRAY8Ptr authenticationName, ARRAY8Ptr authenticationData, ARRAY8Ptr authorizationName, ARRAY8Ptr authorizationData);
+void manage (struct sockaddr *from, int fromlen, int length);
+void send_decline (struct sockaddr *to, int tolen, ARRAY8Ptr authenticationName, ARRAY8Ptr authenticationData, ARRAY8Ptr status);
+
+
int xdmcpFd = -1;
int chooserFd = -1;
#define pS(s) ((s) ? ((char *) (s)) : "empty string")
-void DestroyWellKnownSockets ()
+void
+DestroyWellKnownSockets (void)
{
if (xdmcpFd != -1)
{
}
}
-AnyWellKnownSockets ()
+int
+AnyWellKnownSockets (void)
{
return xdmcpFd != -1 || chooserFd != -1;
}
/*ARGSUSED*/
static int
-sendForward (connectionType, address, closure)
- CARD16 connectionType;
- ARRAY8Ptr address;
- char *closure;
+sendForward (CARD16 connectionType, ARRAY8Ptr address, char *closure)
{
#ifdef AF_INET
struct sockaddr_in in_addr;
extern char *NetaddrPort();
static void
-ClientAddress (from, addr, port, type)
- struct sockaddr *from;
- ARRAY8Ptr addr, port; /* return */
- CARD16 *type; /* return */
+ClientAddress (struct sockaddr *from, ARRAY8Ptr addr, ARRAY8Ptr port, CARD16 *type)
{
int length, family;
char *data;
}
static void
-all_query_respond (from, fromlen, authenticationNames, type)
- struct sockaddr *from;
- int fromlen;
- ARRAYofARRAY8Ptr authenticationNames;
- xdmOpCode type;
+all_query_respond (struct sockaddr *from, int fromlen, ARRAYofARRAY8Ptr authenticationNames, xdmOpCode type)
{
ARRAY8Ptr authenticationName;
ARRAY8 status;
}
static void
-indirect_respond (from, fromlen, length)
- struct sockaddr *from;
- int fromlen;
- int length;
+indirect_respond (struct sockaddr *from, int fromlen, int length)
{
ARRAYofARRAY8 queryAuthenticationNames;
ARRAY8 clientAddress;
}
static void
-ProcessRequestSocket ()
+ProcessRequestSocket (void)
{
XdmcpHeader header;
struct sockaddr_in addr;
* dtlogin changes to WaitForSomething () merged in to support command line
* login.
*/
-void WaitForSomething ()
+void WaitForSomething (void)
{
FD_TYPE reads;
struct timeval timeout, *ptimeout;
static ARRAY8 Hostname;
void
-registerHostname (name, namelen)
- char *name;
- int namelen;
+registerHostname (char *name, int namelen)
{
int i;
}
static void
-direct_query_respond (from, fromlen, length, type)
- struct sockaddr *from;
- int fromlen;
- int length;
- xdmOpCode type;
+direct_query_respond (struct sockaddr *from, int fromlen, int length, xdmOpCode type)
{
ARRAYofARRAY8 queryAuthenticationNames;
int expectedLen;
XdmcpDisposeARRAYofARRAY8 (&queryAuthenticationNames);
}
-query_respond (from, fromlen, length)
- struct sockaddr *from;
- int fromlen;
- int length;
+void
+query_respond (struct sockaddr *from, int fromlen, int length)
{
Debug ("Query respond %d\n", length);
direct_query_respond (from, fromlen, length, QUERY);
}
-broadcast_respond (from, fromlen, length)
- struct sockaddr *from;
- int fromlen;
- int length;
+void
+broadcast_respond (struct sockaddr *from, int fromlen, int length)
{
direct_query_respond (from, fromlen, length, BROADCAST_QUERY);
}
/* computes an X display name */
-
-char *
-NetworkAddressToName(connectionType, connectionAddress, displayNumber)
#if NeedWidePrototypes
- int connectionType;
-#else
- CARD16 connectionType;
-#endif
- ARRAY8Ptr connectionAddress;
-#if NeedWidePrototypes
- int displayNumber;
+char *
+NetworkAddressToName(int connectionType, ARRAY8Ptr connectionAddress, int displayNumber)
#else
- CARD16 displayNumber;
+char *
+NetworkAddressToName(CARD16 connectionType, ARRAY8Ptr connectionAddress, CARD16 displayNumber)
#endif
{
switch (connectionType)
}
/*ARGSUSED*/
-forward_respond (from, fromlen, length)
- struct sockaddr *from;
- int fromlen;
- int length;
+void
+forward_respond (struct sockaddr *from, int fromlen, int length)
{
ARRAY8 clientAddress;
ARRAY8 clientPort;
XdmcpDisposeARRAYofARRAY8 (&authenticationNames);
}
-send_willing (from, fromlen, authenticationName, status)
- struct sockaddr *from;
- int fromlen;
- ARRAY8Ptr authenticationName;
- ARRAY8Ptr status;
+void
+send_willing (struct sockaddr *from, int fromlen, ARRAY8Ptr authenticationName, ARRAY8Ptr status)
{
XdmcpHeader header;
XdmcpFlush (xdmcpFd, &buffer, from, fromlen);
}
-send_unwilling (from, fromlen, authenticationName, status)
- struct sockaddr *from;
- int fromlen;
- ARRAY8Ptr authenticationName;
- ARRAY8Ptr status;
+void
+send_unwilling (struct sockaddr *from, int fromlen, ARRAY8Ptr authenticationName, ARRAY8Ptr status)
{
XdmcpHeader header;
#define NextSessionID() (++globalSessionID)
-void init_session_id()
+void
+init_session_id(void)
{
/* Set randomly so we are unlikely to reuse id's from a previous
* incarnation so we don't say "Alive" to those displays.
static ARRAY8 noValidAuth = { (CARD16) 22, (CARD8Ptr) "No valid authorization" };
static ARRAY8 noAuthentic = { (CARD16) 29, (CARD8Ptr) "XDM has no authentication key" };
-request_respond (from, fromlen, length)
- struct sockaddr *from;
- int fromlen;
- int length;
+void
+request_respond (struct sockaddr *from, int fromlen, int length)
{
CARD16 displayNumber;
ARRAY16 connectionTypes;
XdmcpDisposeARRAY8 (&manufacturerDisplayID);
}
-send_accept (to, tolen, sessionID,
- authenticationName, authenticationData,
- authorizationName, authorizationData)
- struct sockaddr *to;
- int tolen;
- CARD32 sessionID;
- ARRAY8Ptr authenticationName, authenticationData;
- ARRAY8Ptr authorizationName, authorizationData;
+void
+send_accept (struct sockaddr *to, int tolen, CARD32 sessionID, ARRAY8Ptr authenticationName, ARRAY8Ptr authenticationData, ARRAY8Ptr authorizationName, ARRAY8Ptr authorizationData)
{
XdmcpHeader header;
XdmcpWriteARRAY8 (&buffer, authorizationData);
XdmcpFlush (xdmcpFd, &buffer, to, tolen);
}
-
-send_decline (to, tolen, authenticationName, authenticationData, status)
- struct sockaddr *to;
- int tolen;
- ARRAY8Ptr authenticationName, authenticationData;
- ARRAY8Ptr status;
+
+void
+send_decline (struct sockaddr *to, int tolen, ARRAY8Ptr authenticationName, ARRAY8Ptr authenticationData, ARRAY8Ptr status)
{
XdmcpHeader header;
XdmcpFlush (xdmcpFd, &buffer, to, tolen);
}
-manage (from, fromlen, length)
- struct sockaddr *from;
- int fromlen;
- int length;
+void
+manage (struct sockaddr *from, int fromlen, int length)
{
CARD32 sessionID;
CARD16 displayNumber;
if (class) free ((char*) class);
}
-void SendFailed (d, reason)
- struct display *d;
- char *reason;
+void
+SendFailed (struct display *d, char *reason)
{
Debug ("Display start failed, sending Failed\n");
send_failed (d->from, d->fromlen, d->name, d->sessionID, reason);
}
-send_failed (from, fromlen, name, sessionID, reason)
- struct sockaddr *from;
- int fromlen;
- char *name;
- CARD32 sessionID;
- char *reason;
+void
+send_failed (struct sockaddr *from, int fromlen, char *name, CARD32 sessionID, char *reason)
{
static char buf[256];
XdmcpHeader header;
XdmcpFlush (xdmcpFd, &buffer, from, fromlen);
}
-send_refuse (from, fromlen, sessionID)
- struct sockaddr *from;
- int fromlen;
- CARD32 sessionID;
+void
+send_refuse (struct sockaddr *from, int fromlen, CARD32 sessionID)
{
XdmcpHeader header;
XdmcpFlush (xdmcpFd, &buffer, from, fromlen);
}
-send_alive (from, fromlen, length)
- struct sockaddr *from;
- int fromlen;
- int length;
+void
+send_alive (struct sockaddr *from, int fromlen, int length)
{
CARD32 sessionID;
CARD16 displayNumber;
}
}
-char *
-NetworkAddressToHostname (connectionType, connectionAddress)
#if NeedWidePrototypes
- int connectionType;
+char *
+NetworkAddressToHostname (int connectionType, ARRAY8Ptr connectionAddress)
#else
- CARD16 connectionType;
+char *
+NetworkAddressToHostname (CARD16 connectionType, ARRAY8Ptr connectionAddress)
#endif
- ARRAY8Ptr connectionAddress;
{
char *name = 0;
return name;
}
-static
-HostnameToNetworkAddress (name, connectionType, connectionAddress)
-char *name;
-CARD16 connectionType;
-ARRAY8Ptr connectionAddress;
+static int
+HostnameToNetworkAddress (char *name, CARD16 connectionType, ARRAY8Ptr connectionAddress)
{
switch (connectionType)
{
* the same rules as XOpenDisplay (algorithm cribbed from there)
*/
-static
-NameToNetworkAddress(name, connectionTypep, connectionAddress, displayNumber)
-char *name;
-CARD16Ptr connectionTypep;
-ARRAY8Ptr connectionAddress;
-CARD16Ptr displayNumber;
+static int
+NameToNetworkAddress(char *name, CARD16Ptr connectionTypep, ARRAY8Ptr connectionAddress, CARD16Ptr displayNumber)
{
char *colon, *display_number;
char hostname[1024];
*connectionTypep = connectionType;
return TRUE;
}
+