sad.h (1110f384) | sad.h (f4b3ec61) |
---|---|
1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 5 unchanged lines hidden (view full) --- 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21/* | 1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 5 unchanged lines hidden (view full) --- 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21/* |
22 * Copyright 2006 Sun Microsystems, Inc. All rights reserved. | 22 * Copyright 2007 Sun Microsystems, Inc. All rights reserved. |
23 * Use is subject to license terms. 24 */ 25 26/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ 27/* All Rights Reserved */ 28 29 30#ifndef _SYS_SAD_H 31#define _SYS_SAD_H 32 33#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.5 */ 34 35#include <sys/types.h> | 23 * Use is subject to license terms. 24 */ 25 26/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ 27/* All Rights Reserved */ 28 29 30#ifndef _SYS_SAD_H 31#define _SYS_SAD_H 32 33#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.5 */ 34 35#include <sys/types.h> |
36#ifdef _KERNEL 37#include <sys/strsubr.h> 38#endif |
|
36#include <sys/modhash.h> 37 38#ifdef __cplusplus 39extern "C" { 40#endif 41 42/* 43 * Streams Administrative Driver --- 119 unchanged lines hidden (view full) --- 163 164#define STRAPUSH_V0_LEN (size_t)(&((struct strapush *)0)->sap_data) 165#define STRAPUSH_V1_LEN (size_t)(STRAPUSH_V0_LEN + sizeof (uint_t)) 166 167struct saddev { 168 queue_t *sa_qp; /* pointer to read queue */ 169 caddr_t sa_addr; /* saved address for copyout */ 170 int sa_flags; /* see below */ | 39#include <sys/modhash.h> 40 41#ifdef __cplusplus 42extern "C" { 43#endif 44 45/* 46 * Streams Administrative Driver --- 119 unchanged lines hidden (view full) --- 166 167#define STRAPUSH_V0_LEN (size_t)(&((struct strapush *)0)->sap_data) 168#define STRAPUSH_V1_LEN (size_t)(STRAPUSH_V0_LEN + sizeof (uint_t)) 169 170struct saddev { 171 queue_t *sa_qp; /* pointer to read queue */ 172 caddr_t sa_addr; /* saved address for copyout */ 173 int sa_flags; /* see below */ |
174 str_stack_t *sa_ss; |
|
171}; 172 173/* 174 * values for saddev flags field. 175 */ 176#define SADPRIV 0x01 177 178/* --- 17 unchanged lines hidden (view full) --- 196 */ 197#define ap_type ap_common.apc_cmd 198#define ap_major ap_common.apc_major 199#define ap_minor ap_common.apc_minor 200#define ap_lastminor ap_common.apc_lastminor 201#define ap_npush ap_common.apc_npush 202#define ap_anchor ap_data.apd_anchor 203 | 175}; 176 177/* 178 * values for saddev flags field. 179 */ 180#define SADPRIV 0x01 181 182/* --- 17 unchanged lines hidden (view full) --- 200 */ 201#define ap_type ap_common.apc_cmd 202#define ap_major ap_common.apc_major 203#define ap_minor ap_common.apc_minor 204#define ap_lastminor ap_common.apc_lastminor 205#define ap_npush ap_common.apc_npush 206#define ap_anchor ap_data.apd_anchor 207 |
204extern struct saddev *saddev; /* sad device array */ 205extern int sadcnt; /* number of elements in saddev */ 206 207extern kmutex_t sad_lock; /* protects sad ap data store */ 208 | |
209/* 210 * function prototypes 211 */ 212#ifdef C2_AUDIT 213void audit_stropen(struct vnode *, dev_t *, int, cred_t *); 214void audit_strclose(struct vnode *, int, cred_t *); 215void audit_strioctl(struct vnode *, int, intptr_t, int, int, cred_t *, int *); 216struct strbuf; 217void audit_strputmsg(struct vnode *, struct strbuf *, struct strbuf *, 218 unsigned char, int, int); 219void audit_fdsend(int, struct file *, int); 220void audit_fdrecv(int, struct file *); 221#endif 222 | 208/* 209 * function prototypes 210 */ 211#ifdef C2_AUDIT 212void audit_stropen(struct vnode *, dev_t *, int, cred_t *); 213void audit_strclose(struct vnode *, int, cred_t *); 214void audit_strioctl(struct vnode *, int, intptr_t, int, int, cred_t *, int *); 215struct strbuf; 216void audit_strputmsg(struct vnode *, struct strbuf *, struct strbuf *, 217 unsigned char, int, int); 218void audit_fdsend(int, struct file *, int); 219void audit_fdrecv(int, struct file *); 220#endif 221 |
223extern void sad_initspace(void); | 222extern void sad_initspace(str_stack_t *); 223extern void sad_freespace(str_stack_t *); |
224 225/* | 224 225/* |
226 * The following interfaces do not care about sad_lock. | 226 * The following interfaces do not care about ss_sad_lock. |
227 */ 228extern struct autopush *sad_ap_alloc(void); 229extern int sad_apc_verify(struct apcommon *); 230extern int sad_ap_verify(struct autopush *); 231 232/* | 227 */ 228extern struct autopush *sad_ap_alloc(void); 229extern int sad_apc_verify(struct apcommon *); 230extern int sad_ap_verify(struct autopush *); 231 232/* |
233 * The following interfaces attempt to acquire sad_lock. | 233 * The following interfaces attempt to acquire ss_sad_lock. |
234 */ | 234 */ |
235extern void sad_ap_rele(struct autopush *); 236extern struct autopush *sad_ap_find_by_dev(dev_t); | 235extern void sad_ap_rele(struct autopush *, str_stack_t *); 236extern struct autopush *sad_ap_find_by_dev(dev_t, str_stack_t *); |
237 238/* | 237 238/* |
239 * The following interfaces require sad_lock to be held when invoked. | 239 * The following interfaces require ss_sad_lock to be held when invoked. |
240 */ | 240 */ |
241extern void sad_ap_insert(struct autopush *); 242extern void sad_ap_remove(struct autopush *); 243extern struct autopush *sad_ap_find(struct apcommon *); | 241extern void sad_ap_insert(struct autopush *, str_stack_t *); 242extern void sad_ap_remove(struct autopush *, str_stack_t *); 243extern struct autopush *sad_ap_find(struct apcommon *, str_stack_t *); |
244 245#endif /* _KERNEL */ 246 247#ifdef __cplusplus 248} 249#endif 250 251#endif /* _SYS_SAD_H */ | 244 245#endif /* _KERNEL */ 246 247#ifdef __cplusplus 248} 249#endif 250 251#endif /* _SYS_SAD_H */ |