-/*
- * $Source$
- * $Author$
- * $Header$
+/* $Id$
*
- * Copyright (C) 1987, 1988 by the Massachusetts Institute of Technology
- * For copying and distribution information, please see the file
- * <mit-copyright.h>.
+ * Server for user registration with Moira and Kerberos.
*
- * Server for user registration with Moira and Kerberos.
+ * This file handles the processing of requests for the register
+ * server.
*
- * This file handles the processing of requests for the register
- * server.
- */
-
-#ifndef lint
-static char *rcsid_requests_c = "$Header$";
-#endif lint
-
-/*
- * Before you add anything to the list of things that are #included and
- * #defined, make sure that it is not already done in reg_svr.h
+ * Copyright (C) 1987-1998 by the Massachusetts Institute of Technology
+ * For copying and distribution information, please see the file
+ * <mit-copyright.h>.
*/
#include <mit-copyright.h>
-#include <stdio.h>
-#include <strings.h>
-#include <ctype.h>
+#include <moira.h>
+#include <moira_site.h>
+
#include <sys/types.h>
-#include <sys/file.h>
-#include <krb.h>
-#include <des.h>
-#include <errno.h>
#include <sys/socket.h>
+
#include <netinet/in.h>
+#include <arpa/inet.h>
#include <netdb.h>
-#include "moira.h"
-#include "moira_site.h"
+
+#include <errno.h>
+#include <stdio.h>
+#include <string.h>
+
#include "reg_svr.h"
+RCSID("$Header$");
+
#define NUM_REQUESTS_SAVED 100 /* Number of transactions to save */
#define CUR_REQ (requests[cur_request_index]) /* The current request */
#define NEXT_INDEX(x) (x == NUM_REQUESTS_SAVED - 1) ? 0 : (x + 1)
static struct request_save requests[NUM_REQUESTS_SAVED]; /* Saved packets */
static int cur_request_index = 0; /* Index to the current request */
+void clear_req(struct request_save *req);
+void req_initialize(void);
+int handle_retransmitted(void);
+void respond(int status, char *text);
+void get_request(struct msg *message);
+void report(int status, char *message);
+int format_pkt(char *packet, int *pktlenp, U_32BIT seqno,
+ int cl_status, char *message);
+int ureg_validate_char(char *s);
+int parse_pkt(char *packet, int pktlen, struct msg *message);
+u_long cur_req_sender(void);
+
void clear_req(struct request_save *req)
{
req->seqno = 0;
{
while (*s)
{
- if (illegalchars[*s++])
+ if (illegalchars[(int)*s++])
return FAILURE;
}
return SUCCESS;