1/*
2 * Copyright (c) 2010 Apple Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *
10 * 1.  Redistributions of source code must retain the above copyright
11 *     notice, this list of conditions and the following disclaimer.
12 * 2.  Redistributions in binary form must reproduce the above copyright
13 *     notice, this list of conditions and the following disclaimer in the
14 *     documentation and/or other materials provided with the distribution.
15 * 3.  Neither the name of Apple Inc. ("Apple") nor the names of its
16 *     contributors may be used to endorse or promote products derived from
17 *     this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
20 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
23 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 *
30 * Portions of this software have been released under the following terms:
31 *
32 * (c) Copyright 1989-1993 OPEN SOFTWARE FOUNDATION, INC.
33 * (c) Copyright 1989-1993 HEWLETT-PACKARD COMPANY
34 * (c) Copyright 1989-1993 DIGITAL EQUIPMENT CORPORATION
35 *
36 * To anyone who acknowledges that this file is provided "AS IS"
37 * without any express or implied warranty:
38 * permission to use, copy, modify, and distribute this file for any
39 * purpose is hereby granted without fee, provided that the above
40 * copyright notices and this notice appears in all source code copies,
41 * and that none of the names of Open Software Foundation, Inc., Hewlett-
42 * Packard Company or Digital Equipment Corporation be used
43 * in advertising or publicity pertaining to distribution of the software
44 * without specific, written prior permission.  Neither Open Software
45 * Foundation, Inc., Hewlett-Packard Company nor Digital
46 * Equipment Corporation makes any representations about the suitability
47 * of this software for any purpose.
48 *
49 * Copyright (c) 2007, Novell, Inc. All rights reserved.
50 * Redistribution and use in source and binary forms, with or without
51 * modification, are permitted provided that the following conditions
52 * are met:
53 *
54 * 1.  Redistributions of source code must retain the above copyright
55 *     notice, this list of conditions and the following disclaimer.
56 * 2.  Redistributions in binary form must reproduce the above copyright
57 *     notice, this list of conditions and the following disclaimer in the
58 *     documentation and/or other materials provided with the distribution.
59 * 3.  Neither the name of Novell Inc. nor the names of its contributors
60 *     may be used to endorse or promote products derived from this
61 *     this software without specific prior written permission.
62 *
63 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
64 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
65 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
66 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY
67 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
68 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
69 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
70 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
71 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
72 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
73 *
74 * @APPLE_LICENSE_HEADER_END@
75 */
76
77/*
78**
79**  NAME:
80**
81**      nbase.idl
82**
83**  FACILITY:
84**
85**      Network Computing Architecture (NCA)
86**
87**  ABSTRACT:
88**
89**  Definitions of NCA architecturally defined types and constants.
90**
91**
92*/
93
94[pointer_default(ptr)] interface nbase
95{
96
97/*
98 * Type definitions for specific size integers.
99 */
100typedef unsigned small  unsigned8;          /* positive 8 bit integer */
101typedef unsigned short  unsigned16;         /* positive 16 bit integer */
102typedef unsigned long   unsigned32;         /* positive 32 bit integer */
103
104typedef small           signed8;            /* signed 8 bit integer */
105typedef short           signed16;           /* signed 16 bit integer */
106typedef long            signed32;           /* signed 32 bit integer */
107
108/*
109 * Type definition for 32-bit wide booleans.
110 */
111typedef unsigned32      boolean32;
112
113/*
114 * Canonical types for expressing procedure return status.
115 */
116typedef unsigned long   error_status_t;
117const long              error_status_ok = 0;
118
119/*
120 * Universal Unique Identifier (UUID) types.
121 */
122typedef struct
123{
124    unsigned32          time_low;
125    unsigned16          time_mid;
126    unsigned16          time_hi_and_version;
127    unsigned8           clock_seq_hi_and_reserved;
128    unsigned8           clock_seq_low;
129    byte                node[6];
130} idl_uuid_t, *uuid_p_t;
131
132/*
133 * Old UUID type.
134 */
135
136typedef [v1_struct] struct
137{
138    unsigned long       time_high;
139    unsigned short      time_low;
140    unsigned short      reserved;
141    byte                family;
142    byte                host[7];
143} uuid_old_t;
144
145/*
146 * Protocol Tower.  The network representation of network addressing information
147 * (e.g., RPC bindings).
148 */
149typedef struct {
150    [range(0,2000)] unsigned32          tower_length;
151    [size_is(tower_length)]
152    byte                tower_octet_string[];
153} twr_t, *twr_p_t;
154
155/*
156 * NDR format flag type definition and values.
157 */
158const long  ndr_c_int_big_endian    = 0;
159const long  ndr_c_int_little_endian = 1;
160const long  ndr_c_float_ieee        = 0;
161const long  ndr_c_float_vax         = 1;
162const long  ndr_c_float_cray        = 2;
163const long  ndr_c_float_ibm         = 3;
164const long  ndr_c_char_ascii        = 0;
165const long  ndr_c_char_ebcdic       = 1;
166
167typedef struct
168{
169    unsigned8       int_rep;
170    unsigned8       char_rep;
171    unsigned8       float_rep;
172    byte            reserved;
173} ndr_format_t, *ndr_format_p_t;
174
175/*
176 * Network representation of a NIDL context handle.
177 */
178typedef struct ndr_context_handle
179{
180    unsigned32      context_handle_attributes;
181    idl_uuid_t          context_handle_uuid;
182} ndr_context_handle;
183
184/*
185 * International character types.
186 */
187typedef byte ISO_LATIN_1;
188
189typedef struct
190{
191    byte            row;
192    byte            column;
193} ISO_MULTI_LINGUAL;
194
195typedef struct
196{
197    byte            group;
198    byte            plane;
199    byte            row;
200    byte            column;
201} ISO_UCS;
202
203/*
204 * Authentication protocol IDs.  These are architectural values that
205 * are carried in RPC protocol messages.
206 */
207const long  dce_c_rpc_authn_protocol_none  = 0;   /* No authentication */
208const long  dce_c_rpc_authn_protocol_krb5  = 1;   /* Kerberos v5 authentication */
209const long  dce_c_rpc_authn_protocol_dummy = 2;   /* Non-crypto authentication */
210const long  dce_c_rpc_authn_protocol_dssa  = 3;   /* DEC DSSA authentication */
211const long  dce_c_rpc_authn_protocol_gss_negotiate = 9;   /* GSS-API, SPNEGO mech */
212const long  dce_c_rpc_authn_protocol_winnt         = 10;  /* NTLMSSP authentication */
213const long  dce_c_rpc_authn_protocol_gss_tls        = 14; /* SSL/TLS */
214const long  dce_c_rpc_authn_protocol_gss_mskrb      = 16; /* GSS-API, Kerberos mech */
215const long  dce_c_rpc_authn_protocol_msn            = 17; /* MSN proprietary */
216const long  dce_c_rpc_authn_protocol_dpa            = 18; /* DPA proprietary */
217const long  dce_c_rpc_authn_protocol_netlogon       = 68; /* Netlogon secure channel */
218const long  dce_c_rpc_authn_protocol_schannel       = 68; /* Netlogon secure channel */
219
220typedef unsigned8 dce_rpc_authn_protocol_id_t;
221
222}
223