nfs_lock.h (86363) | nfs_lock.h (100134) |
---|---|
1/*- 2 * Copyright (c) 1998 Berkeley Software Design, Inc. All rights reserved. 3 * Redistribution and use in source and binary forms, with or without 4 * modification, are permitted provided that the following conditions 5 * are met: 6 * 1. Redistributions of source code must retain the above copyright 7 * notice, this list of conditions and the following disclaimer. 8 * 2. Redistributions in binary form must reproduce the above copyright --- 11 unchanged lines hidden (view full) --- 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * 27 * from nfs_lock.h,v 2.2 1998/04/28 19:38:41 don Exp | 1/*- 2 * Copyright (c) 1998 Berkeley Software Design, Inc. All rights reserved. 3 * Redistribution and use in source and binary forms, with or without 4 * modification, are permitted provided that the following conditions 5 * are met: 6 * 1. Redistributions of source code must retain the above copyright 7 * notice, this list of conditions and the following disclaimer. 8 * 2. Redistributions in binary form must reproduce the above copyright --- 11 unchanged lines hidden (view full) --- 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * 27 * from nfs_lock.h,v 2.2 1998/04/28 19:38:41 don Exp |
28 * $FreeBSD: head/sys/nfsclient/nfs_lock.h 86363 2001-11-14 18:20:45Z rwatson $ | 28 * $FreeBSD: head/sys/nfsclient/nfs_lock.h 100134 2002-07-15 19:40:23Z alfred $ |
29 */ 30 31/* 32 * lockd uses the nfssvc system call to get the unique kernel services it needs. 33 * It passes in a request structure with a version number at the start. 34 * This prevents libc from needing to change if the information passed 35 * between lockd and the kernel needs to change. 36 * --- 16 unchanged lines hidden (view full) --- 53 * detect the unlikely, but possible, event of the recycling of a pid. 54 */ 55struct lockd_msg_ident { 56 pid_t pid; /* The process ID. */ 57 struct timeval pid_start; /* Start time of process id */ 58 int msg_seq; /* Sequence number of message */ 59}; 60 | 29 */ 30 31/* 32 * lockd uses the nfssvc system call to get the unique kernel services it needs. 33 * It passes in a request structure with a version number at the start. 34 * This prevents libc from needing to change if the information passed 35 * between lockd and the kernel needs to change. 36 * --- 16 unchanged lines hidden (view full) --- 53 * detect the unlikely, but possible, event of the recycling of a pid. 54 */ 55struct lockd_msg_ident { 56 pid_t pid; /* The process ID. */ 57 struct timeval pid_start; /* Start time of process id */ 58 int msg_seq; /* Sequence number of message */ 59}; 60 |
61#define LOCKD_MSG_VERSION 1 | 61#define LOCKD_MSG_VERSION 2 |
62 63/* 64 * The structure that the kernel hands us for each lock request. 65 */ 66typedef struct __lock_msg { 67 int lm_version; /* which version is this */ 68 struct lockd_msg_ident lm_msg_ident; /* originator of the message */ 69 struct flock lm_fl; /* The lock request. */ 70 int lm_wait; /* The F_WAIT flag. */ 71 int lm_getlk; /* is this a F_GETLK request */ | 62 63/* 64 * The structure that the kernel hands us for each lock request. 65 */ 66typedef struct __lock_msg { 67 int lm_version; /* which version is this */ 68 struct lockd_msg_ident lm_msg_ident; /* originator of the message */ 69 struct flock lm_fl; /* The lock request. */ 70 int lm_wait; /* The F_WAIT flag. */ 71 int lm_getlk; /* is this a F_GETLK request */ |
72 struct sockaddr lm_addr; /* The address. */ | 72 struct sockaddr_storage lm_addr; /* The address. */ |
73 int lm_nfsv3; /* If NFS version 3. */ 74 size_t lm_fh_len; /* The file handle length. */ 75 struct ucred lm_cred; /* user cred for lock req */ 76 u_int8_t lm_fh[NFS_SMALLFH];/* The file handle. */ 77} LOCKD_MSG; 78 79#define LOCKD_ANS_VERSION 1 80 --- 12 unchanged lines hidden --- | 73 int lm_nfsv3; /* If NFS version 3. */ 74 size_t lm_fh_len; /* The file handle length. */ 75 struct ucred lm_cred; /* user cred for lock req */ 76 u_int8_t lm_fh[NFS_SMALLFH];/* The file handle. */ 77} LOCKD_MSG; 78 79#define LOCKD_ANS_VERSION 1 80 --- 12 unchanged lines hidden --- |