ncalogd.h revision 458cf4d67cff5ff99a68a866b7657f1b1d6fe61c
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _INET_NCALOGD_H
#define _INET_NCALOGD_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#define MAX_URL_LEN (8192)
#define NCA_DEFAULT_LOG_BUF_SIZE (65536)
typedef struct log_buf {
#ifndef _KERNEL
#else
void *pad1; /* padding so kernel and user-space */
void *pad2; /* are the same size */
#endif /* _KERNEL */
} log_buf_t;
/*
* Defines the data structures used by NCA and Webservers/log daemons.
*/
typedef struct {
/* size in bytes of nca_remote_user field */
#ifndef _KERNEL
/* presumption: user space time_t is 32 bit long */
#else
#endif /* _KERNEL */
/* length in bytes of first line of HTTP request */
/* need for extended common log format */
/* Need for ELF */
/*
* This structure is optionally followed by null terminated strings
* that contain "remote_user","auth_user", etc.
*/
typedef struct {
} nca_ver_op_t;
typedef struct {
typedef struct {
/*
* log_op_fiov ...
*/
#ifdef _KERNEL
#define NCA_FIOV_SZ 16
typedef struct {
struct {
int ix; /* Current log file [ix] */
int cnt; /* Count of valid log file [ix]s */
} hdr;
struct {
int file; /* Index of file (for reference only) */
} nca_fio_t;
#endif /* _KERNEL */
/*
* Macro to get size of a log record
*/
#define NCA_LOG_REC_SIZE(p) (sizeof (nca_request_log_t) + \
p->remote_user_len + \
p->auth_user_len + \
p->request_url_len + \
p->referer_len + p->useragent_len)
/*
* Used to align start of log record on a uint32_t boundary .
*/
~(sizeof (uint32_t)-1))
/*
* Macros to get at char string data given a pointer to a
* nca_request_log_t structure.
*/
(p->name))
/* write data as offsets at end of nca_request_log_t buf */
if (!(val)) { \
p->len = 0; \
p->off = 0; \
} else { \
} \
}
#ifdef __cplusplus
}
#endif
#endif /* _INET_NCALOGD_H */