1c5c4113nw/*
2c5c4113nw * CDDL HEADER START
3c5c4113nw *
4c5c4113nw * The contents of this file are subject to the terms of the
5c5c4113nw * Common Development and Distribution License (the "License").
6c5c4113nw * You may not use this file except in compliance with the License.
7c5c4113nw *
8c5c4113nw * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9c5c4113nw * or http://www.opensolaris.org/os/licensing.
10c5c4113nw * See the License for the specific language governing permissions
11c5c4113nw * and limitations under the License.
12c5c4113nw *
13c5c4113nw * When distributing Covered Code, include this CDDL HEADER in each
14c5c4113nw * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15c5c4113nw * If applicable, add the following below this CDDL HEADER, with the
16c5c4113nw * fields enclosed by brackets "[]" replaced with your own identifying
17c5c4113nw * information: Portions Copyright [yyyy] [name of copyright owner]
18c5c4113nw *
19c5c4113nw * CDDL HEADER END
20c5c4113nw */
21c5c4113nw/*
22c586600Keyur Desai * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
23c5c4113nw */
24c5c4113nw
25c5c4113nw/*
26c5c4113nw * Private Header for Identity Mapping
27c5c4113nw */
28c5c4113nw
29c5c4113nw#ifndef _IDMAP_IMPL_H
30c5c4113nw#define	_IDMAP_IMPL_H
31c5c4113nw
32c5c4113nw
33479ac37dm#include <rpc/xdr.h>
34479ac37dm#include <libscf.h>
35479ac37dm#include <resolv.h>
36479ac37dm
379b214d3Jordan Brown#include <rpcsvc/idmap_prot.h>
38c5c4113nw#include "idmap_priv.h"
397a8a68fJulian Pullen
40479ac37dm
41c5c4113nw
42c5c4113nw#ifdef __cplusplus
43c5c4113nwextern "C" {
44c5c4113nw#endif
45c5c4113nw
46c5c4113nwstruct idmap_udt_handle {
47c5c4113nw	idmap_update_batch	batch;
48c5c4113nw	uint64_t		next;
498e22821dm	int64_t			error_index;
508e22821dm	idmap_stat		commit_stat;
518e22821dm	idmap_namerule		error_rule;
528e22821dm	idmap_namerule		conflict_rule;
53c5c4113nw};
54c5c4113nw
55651c013baban#define	_IDMAP_RESET_UDT_HANDLE(uh) \
56a17ce84Marcel Telka	xdr_free(xdr_idmap_update_batch, (caddr_t)&uh->batch);\
578e22821dm	uh->next = 0;\
588e22821dm	uh->error_index = -1;\
59a17ce84Marcel Telka	xdr_free(xdr_idmap_namerule, (caddr_t)&uh->error_rule);\
60a17ce84Marcel Telka	xdr_free(xdr_idmap_namerule, (caddr_t)&uh->conflict_rule);
61651c013baban
62