/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Routines for controlled update/initialization of request structures.
*
* request_init() initializes its argument. Pointers and string-valued members
* are initialized to zero, to indicate that no lookup has been attempted.
*
* request_set() adds information to an already initialized request structure.
*
* Both functions take a variable-length name-value list.
*
* Diagnostics are reported through syslog(3).
*
* Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
*/
#ifndef lint
#endif
/* System libraries */
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <syslog.h>
#include <string.h>
/* Local stuff. */
#include "mystdarg.h"
#include "tcpd.h"
/* request_fill - request update engine */
struct request_info *request;
{
int key;
char *ptr;
switch (key) {
default:
return (request);
case RQ_FILE:
continue;
case RQ_CLIENT_SIN:
continue;
case RQ_SERVER_SIN:
continue;
/*
* All other fields are strings with the same maximal length.
*/
case RQ_DAEMON:
break;
case RQ_USER:
break;
case RQ_CLIENT_NAME:
break;
case RQ_CLIENT_ADDR:
break;
case RQ_SERVER_NAME:
break;
case RQ_SERVER_ADDR:
break;
}
}
return (request);
}
/* request_init - initialize request structure */
{
struct request_info *r;
/*
* Initialize data members. We do not assign default function pointer
* members, to avoid pulling in the whole socket module when it is not
* really needed.
*/
*request = default_info;
return (r);
}
/* request_set - update request structure */
{
struct request_info *r;
return (r);
}