nfsid_map.h (0:68f95e015346) nfsid_map.h (11291:80bdcd03e626)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
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, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22/*
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
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/*
23 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27#ifndef _NFSID_MAP_H
28#define _NFSID_MAP_H
29
23 * Use is subject to license terms.
24 */
25
26#ifndef _NFSID_MAP_H
27#define _NFSID_MAP_H
28
30#pragma ident "%Z%%M% %I% %E% SMI"
31
32#ifndef _KERNEL
33#include <stddef.h>
34#endif
35#include <sys/sysmacros.h>
36#include <sys/types.h>
37
38/*
39 * NFSv4 id mapping daemon

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

54
55/*
56 * mapid commands
57 */
58#define NFSMAPID_STR_UID 1
59#define NFSMAPID_UID_STR 2
60#define NFSMAPID_STR_GID 3
61#define NFSMAPID_GID_STR 4
29#ifndef _KERNEL
30#include <stddef.h>
31#endif
32#include <sys/sysmacros.h>
33#include <sys/types.h>
34
35/*
36 * NFSv4 id mapping daemon

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

51
52/*
53 * mapid commands
54 */
55#define NFSMAPID_STR_UID 1
56#define NFSMAPID_UID_STR 2
57#define NFSMAPID_STR_GID 3
58#define NFSMAPID_GID_STR 4
59#define NFSMAPID_SRV_NETINFO 5
62
63/*
64 * We are passing in arguments in a variable length struct
65 * similar to a dirent_t. We break apart a utf8string into
66 * its components and allocate a struct long enough to hold
67 * the string and a NUL terminator. The caller must ensure the
68 * terminator is set.
69 */

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

140typedef struct mapid_res mapid_res_t;
141
142/*
143 * The actual required size of the result, rounded up to a 64 bit boundary
144 */
145#define MAPID_RES_LEN(str_length) \
146 ((offsetof(mapid_res_t, str[0]) + 1 + (str_length) + 7) & ~ 7)
147
60
61/*
62 * We are passing in arguments in a variable length struct
63 * similar to a dirent_t. We break apart a utf8string into
64 * its components and allocate a struct long enough to hold
65 * the string and a NUL terminator. The caller must ensure the
66 * terminator is set.
67 */

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

138typedef struct mapid_res mapid_res_t;
139
140/*
141 * The actual required size of the result, rounded up to a 64 bit boundary
142 */
143#define MAPID_RES_LEN(str_length) \
144 ((offsetof(mapid_res_t, str[0]) + 1 + (str_length) + 7) & ~ 7)
145
146/*
147 * Support for referral name resolution by the NFS client
148 */
149typedef struct refd_door_args {
150 int cmd; /* NFS4_FS_LOCATIONS/NFS4_SRV_NETINFO */
151 int xdr_len; /* Length of xdr Buffer */
152 char xdr_arg[1]; /* Buffer holding xdr encoded data */
153} refd_door_args_t;
154
155typedef struct refd_door_res {
156 int res_status;
157 int xdr_len;
158 char xdr_res[1];
159} refd_door_res_t;
160
161#ifdef _SYSCALL32
162typedef struct refd_door_args32 {
163 int32_t cmd;
164 int32_t xdr_len;
165 char xdr_arg[1];
166} refd_door_args32_t;
167
168typedef struct refd_door_res32 {
169 int32_t res_status;
170 int32_t xdr_len;
171 char xdr_res[1];
172} refd_door_res32_t;
173#endif
174
148#ifdef __cplusplus
149}
150#endif
151
152#endif /* _NFSID_MAP_H */
175#ifdef __cplusplus
176}
177#endif
178
179#endif /* _NFSID_MAP_H */