Deleted Added
full compact
nfs.h (30354) nfs.h (32998)
1/*
2 * Copyright (c) 1989, 1993, 1995
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Rick Macklem at The University of Guelph.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 20 unchanged lines hidden (view full) ---

29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * @(#)nfs.h 8.4 (Berkeley) 5/1/95
1/*
2 * Copyright (c) 1989, 1993, 1995
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Rick Macklem at The University of Guelph.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 20 unchanged lines hidden (view full) ---

29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * @(#)nfs.h 8.4 (Berkeley) 5/1/95
37 * $Id: nfs.h,v 1.31 1997/09/10 19:52:24 phk Exp $
37 * $Id: nfs.h,v 1.32 1997/10/12 20:25:38 phk Exp $
38 */
39
40#ifndef _NFS_NFS_H_
41#define _NFS_NFS_H_
42
43/*
44 * Tunable constants for nfs
45 */

--- 240 unchanged lines hidden (view full) ---

286
287#define FS_NFS_NAMES { \
288 { 0, 0 }, \
289 { "nfsstats", CTLTYPE_STRUCT }, \
290 { "nfsprivport", CTLTYPE_INT }, \
291}
292
293/*
38 */
39
40#ifndef _NFS_NFS_H_
41#define _NFS_NFS_H_
42
43/*
44 * Tunable constants for nfs
45 */

--- 240 unchanged lines hidden (view full) ---

286
287#define FS_NFS_NAMES { \
288 { 0, 0 }, \
289 { "nfsstats", CTLTYPE_STRUCT }, \
290 { "nfsprivport", CTLTYPE_INT }, \
291}
292
293/*
294 * The set of signals the interrupt an I/O in progress for NFSMNT_INT mounts.
295 * What should be in this set is open to debate, but I believe that since
296 * I/O system calls on ufs are never interrupted by signals the set should
297 * be minimal. My reasoning is that many current programs that use signals
298 * such as SIGALRM will not expect file I/O system calls to be interrupted
299 * by them and break.
294 * Network address hash list element
300 */
295 */
296union nethostaddr {
297 u_long had_inetaddr;
298 struct sockaddr *had_nam;
299};
300
301#ifdef KERNEL
302
303#ifdef MALLOC_DECLARE
304MALLOC_DECLARE(M_NFSREQ);
305MALLOC_DECLARE(M_NFSMNT);
306MALLOC_DECLARE(M_NFSDIROFF);
307MALLOC_DECLARE(M_NFSRVDESC);
308MALLOC_DECLARE(M_NFSUID);
309MALLOC_DECLARE(M_NQLEASE);
310MALLOC_DECLARE(M_NFSD);
311MALLOC_DECLARE(M_NFSBIGFH);
312#endif
313
314struct uio; struct buf; struct vattr; struct nameidata; /* XXX */
315
301#ifdef KERNEL
302
303#ifdef MALLOC_DECLARE
304MALLOC_DECLARE(M_NFSREQ);
305MALLOC_DECLARE(M_NFSMNT);
306MALLOC_DECLARE(M_NFSDIROFF);
307MALLOC_DECLARE(M_NFSRVDESC);
308MALLOC_DECLARE(M_NFSUID);
309MALLOC_DECLARE(M_NQLEASE);
310MALLOC_DECLARE(M_NFSD);
311MALLOC_DECLARE(M_NFSBIGFH);
312#endif
313
314struct uio; struct buf; struct vattr; struct nameidata; /* XXX */
315
316/*
317 * The set of signals the interrupt an I/O in progress for NFSMNT_INT mounts.
318 * What should be in this set is open to debate, but I believe that since
319 * I/O system calls on ufs are never interrupted by signals the set should
320 * be minimal. My reasoning is that many current programs that use signals
321 * such as SIGALRM will not expect file I/O system calls to be interrupted
322 * by them and break.
323 */
316#define NFSINT_SIGMASK (sigmask(SIGINT)|sigmask(SIGTERM)|sigmask(SIGKILL)| \
317 sigmask(SIGHUP)|sigmask(SIGQUIT))
318
319/*
320 * Socket errors ignored for connectionless sockets??
321 * For now, ignore them all
322 */
323#define NFSIGNORE_SOERROR(s, e) \

--- 55 unchanged lines hidden (view full) ---

379#ifndef NFS_MUIDHASHSIZ
380#define NFS_MUIDHASHSIZ 63 /* Tune the size of nfsmount with this */
381#endif
382#define NMUIDHASH(nmp, uid) \
383 (&(nmp)->nm_uidhashtbl[(uid) % NFS_MUIDHASHSIZ])
384#define NFSNOHASH(fhsum) \
385 (&nfsnodehashtbl[(fhsum) & nfsnodehash])
386
324#define NFSINT_SIGMASK (sigmask(SIGINT)|sigmask(SIGTERM)|sigmask(SIGKILL)| \
325 sigmask(SIGHUP)|sigmask(SIGQUIT))
326
327/*
328 * Socket errors ignored for connectionless sockets??
329 * For now, ignore them all
330 */
331#define NFSIGNORE_SOERROR(s, e) \

--- 55 unchanged lines hidden (view full) ---

387#ifndef NFS_MUIDHASHSIZ
388#define NFS_MUIDHASHSIZ 63 /* Tune the size of nfsmount with this */
389#endif
390#define NMUIDHASH(nmp, uid) \
391 (&(nmp)->nm_uidhashtbl[(uid) % NFS_MUIDHASHSIZ])
392#define NFSNOHASH(fhsum) \
393 (&nfsnodehashtbl[(fhsum) & nfsnodehash])
394
387/*
388 * Network address hash list element
389 */
390union nethostaddr {
391 u_long had_inetaddr;
392 struct sockaddr *had_nam;
393};
394
395struct nfsuid {
396 TAILQ_ENTRY(nfsuid) nu_lru; /* LRU chain */
397 LIST_ENTRY(nfsuid) nu_hash; /* Hash list */
398 int nu_flag; /* Flags */
399 union nethostaddr nu_haddr; /* Host addr. for dgram sockets */
400 struct ucred nu_cr; /* Cred uid mapped to */
401 int nu_expire; /* Expiry time (sec) */
402 struct timeval nu_timestamp; /* Kerb. timestamp */

--- 314 unchanged lines hidden ---
395struct nfsuid {
396 TAILQ_ENTRY(nfsuid) nu_lru; /* LRU chain */
397 LIST_ENTRY(nfsuid) nu_hash; /* Hash list */
398 int nu_flag; /* Flags */
399 union nethostaddr nu_haddr; /* Host addr. for dgram sockets */
400 struct ucred nu_cr; /* Cred uid mapped to */
401 int nu_expire; /* Expiry time (sec) */
402 struct timeval nu_timestamp; /* Kerb. timestamp */

--- 314 unchanged lines hidden ---