da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * CDDL HEADER START
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The contents of this file are subject to the terms of the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Common Development and Distribution License (the "License").
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * You may not use this file except in compliance with the License.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * See the License for the specific language governing permissions
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * and limitations under the License.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * When distributing Covered Code, include this CDDL HEADER in each
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * If applicable, add the following below this CDDL HEADER, with the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * fields enclosed by brackets "[]" replaced with your own identifying
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * information: Portions Copyright [yyyy] [name of copyright owner]
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * CDDL HEADER END
a0aa776e20803c84edd153d9cb584fd67163aef3Alan Wright * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Use is subject to license terms.
8d7e41661dc4633488e93b13363137523ce59977jose borrego * Opaque context handle.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#else /* NDRGEN */
8d7e41661dc4633488e93b13363137523ce59977jose borrego * When not using ndrgen, get BYTE, WORD, DWORD definitions from wintypes.h.
8d7e41661dc4633488e93b13363137523ce59977jose borrego#define EXTERNTYPEINFO(TYPE) extern struct ndr_typeinfo TYPEINFO(TYPE);
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * There is a bug in the way that midl and the marshalling code handles
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * unions so we need to fix some of the data offsets at runtime. The
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * following macros and the fixup function handle the correction.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * DECL_FIXUP_STRUCT allows us to declare external references to data
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * structures generated by ndrgen in the _ndr.c file.
8d7e41661dc4633488e93b13363137523ce59977jose borrego#define DECL_FIXUP_STRUCT(NAME) extern struct ndr_typeinfo ndt__##NAME
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * CASE_INFO_ENT is intended to simplify the declaration of the case
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * statement in the fixup function. Assuming you have followed the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * convention for naming the individual structures all you have to do
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * is add a single line to the fixup function for each new case.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * FIXUP_PDU_SIZE is used to patch the appropriate structures (identified
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * by DECL_FIXUP_STRUCT) at runtime. The values are based on the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * switch_index.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * UNION_INFO_ENT is intended to simplify adding new entries to a union.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * If the entry structures are named using the form FunctionNameX,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * where X is the sitch_value, you can just add a single line. Note
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * that you must also update the fixup function in mlsvc_xxx.c.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define UNION_INFO_ENT(N,NAME) CASE(N) struct NAME##N info##N