vscan.h revision bfc848c632c9eacb2a640246d96e198f1b185c03
911106dfb16696472af8c1b7b4c554a829354fa8jm * CDDL HEADER START
911106dfb16696472af8c1b7b4c554a829354fa8jm * The contents of this file are subject to the terms of the
911106dfb16696472af8c1b7b4c554a829354fa8jm * Common Development and Distribution License (the "License").
911106dfb16696472af8c1b7b4c554a829354fa8jm * You may not use this file except in compliance with the License.
911106dfb16696472af8c1b7b4c554a829354fa8jm * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
911106dfb16696472af8c1b7b4c554a829354fa8jm * See the License for the specific language governing permissions
911106dfb16696472af8c1b7b4c554a829354fa8jm * and limitations under the License.
911106dfb16696472af8c1b7b4c554a829354fa8jm * When distributing Covered Code, include this CDDL HEADER in each
911106dfb16696472af8c1b7b4c554a829354fa8jm * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
911106dfb16696472af8c1b7b4c554a829354fa8jm * If applicable, add the following below this CDDL HEADER, with the
911106dfb16696472af8c1b7b4c554a829354fa8jm * fields enclosed by brackets "[]" replaced with your own identifying
911106dfb16696472af8c1b7b4c554a829354fa8jm * information: Portions Copyright [yyyy] [name of copyright owner]
911106dfb16696472af8c1b7b4c554a829354fa8jm * CDDL HEADER END
53c110294d8b1410cabc201a52f94b03ae2ef448jm * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
911106dfb16696472af8c1b7b4c554a829354fa8jm * Use is subject to license terms.
911106dfb16696472af8c1b7b4c554a829354fa8jm#pragma ident "%Z%%M% %I% %E% SMI"
911106dfb16696472af8c1b7b4c554a829354fa8jmextern "C" {
911106dfb16696472af8c1b7b4c554a829354fa8jm * vscan.h provides definitions for vscan kernel module
bfc848c632c9eacb2a640246d96e198f1b185c03jm#define VS_DRV_PATH "/dev/vscan/vscan" /* append minor dev num */
bfc848c632c9eacb2a640246d96e198f1b185c03jm#define VS_IOCTL_CONFIG 0x03 /* vscand config data update */
bfc848c632c9eacb2a640246d96e198f1b185c03jm#define VS_IOCTL_MAX_REQ 0x05 /* max in-progress req vscand */
53c110294d8b1410cabc201a52f94b03ae2ef448jm/* Scan Result - vsr_result */
bfc848c632c9eacb2a640246d96e198f1b185c03jm#define VS_STATUS_CLEAN 3 /* scan successful, file clean */
bfc848c632c9eacb2a640246d96e198f1b185c03jm#define VS_STATUS_INFECTED 4 /* scan successful, file infected */
bfc848c632c9eacb2a640246d96e198f1b185c03jm#define VS_STATUS_SCANNING 5 /* scan in progress - async */
bfc848c632c9eacb2a640246d96e198f1b185c03jm/* Configuration data vs_config_t - vsc_types */
911106dfb16696472af8c1b7b4c554a829354fa8jm#define VS_TYPES_LEN 4096 /* vs_config_t - types buffer */
911106dfb16696472af8c1b7b4c554a829354fa8jm * AV_SCANSTAMP_SZ is the size of the scanstamp stored in the
911106dfb16696472af8c1b7b4c554a829354fa8jm * filesystem. vs_scanstamp_t is 1 character longer to allow
911106dfb16696472af8c1b7b4c554a829354fa8jm * a null terminated string to be used within vscan
bfc848c632c9eacb2a640246d96e198f1b185c03jm/* used for door request to vscand */
911106dfb16696472af8c1b7b4c554a829354fa8jmtypedef struct vs_scan_req {
bfc848c632c9eacb2a640246d96e198f1b185c03jm/* passed in VS_IOCTL_RESULT - async response from vscand */
bfc848c632c9eacb2a640246d96e198f1b185c03jmtypedef struct vs_scan_rsp {
bfc848c632c9eacb2a640246d96e198f1b185c03jm/* passed in VS_IOCTL_CONFIG */
911106dfb16696472af8c1b7b4c554a829354fa8jmtypedef struct vs_config {
911106dfb16696472af8c1b7b4c554a829354fa8jm uint64_t vsc_max_size; /* files > max size (bytes) not scan */
911106dfb16696472af8c1b7b4c554a829354fa8jm uint64_t vsc_allow; /* allow access to file exceeding max_size? */
911106dfb16696472af8c1b7b4c554a829354fa8jm#endif /* _KERNEL */
911106dfb16696472af8c1b7b4c554a829354fa8jm#endif /* _VSCAN_H */