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.
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.
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]
22 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
29 #pragma ident "%Z%%M% %I% %E% SMI"
31 #include <sys/types.h>
33 #include <sys/procset.h>
37 #include <sys/sysmacros.h>
38 #include <sys/varargs.h>
45 #define KLPDCALL_VERS 1
47 #define KLPDARG_NOMORE 0 /* End of argument List */
48 #define KLPDARG_NONE 0 /* No argument */
49 #define KLPDARG_VNODE 1 /* vnode_t * */
50 #define KLPDARG_INT 2 /* int */
51 #define KLPDARG_PORT 3 /* int, port number */
52 #define KLPDARG_TCPPORT 4 /* int, tcp port number */
53 #define KLPDARG_UDPPORT 5 /* int, udp port number */
54 #define KLPDARG_SCTPPORT 6 /* int, sctp port number */
55 #define KLPDARG_SDPPORT 7 /* int, sdp port number */
62 int klpd_reg(int, idtype_t
, id_t
, priv_set_t
*);
63 int klpd_unreg(int, idtype_t
, id_t
);
64 void klpd_remove(struct klpd_reg
**);
65 void klpd_rele(struct klpd_reg
*);
66 int klpd_call(const cred_t
*, const priv_set_t
*, va_list);
67 void crklpd_hold(struct credklpd
*);
68 void crklpd_rele(struct credklpd
*);
72 typedef struct klpd_head
{
73 uint32_t klh_vers
; /* Version */
74 uint32_t klh_len
; /* Length of full packet */
75 uint32_t klh_argoff
; /* Offset of argument */
76 uint32_t klh_privoff
; /* Offset of privilege set */
79 #define KLH_PRIVSET(kh) ((priv_set_t *)(((kh)->klh_privoff == 0 ? NULL : \
80 (char *)(kh) + (kh)->klh_privoff)))
81 #define KLH_ARG(kh) ((void *)((kh)->klh_argoff != 0 ? \
82 (char *)(kh) + (kh)->klh_argoff : NULL))
84 typedef struct klpd_arg
{
94 #define kla_str kla_data.__cdata
95 #define kla_int kla_data.__idata
96 #define kla_uint kla_data.__uidata
102 #endif /* _SYS_KLPD_H */