ReactOS 0.4.16-dev-106-g10b08aa
types.h
Go to the documentation of this file.
1/* $NetBSD: types.h,v 1.13 2000/06/13 01:02:44 thorpej Exp $ */
2
3/*
4 * Copyright (c) 2009, Sun Microsystems, Inc.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions are met:
9 * - Redistributions of source code must retain the above copyright notice,
10 * this list of conditions and the following disclaimer.
11 * - Redistributions in binary form must reproduce the above copyright notice,
12 * this list of conditions and the following disclaimer in the documentation
13 * and/or other materials provided with the distribution.
14 * - Neither the name of Sun Microsystems, Inc. nor the names of its
15 * contributors may be used to endorse or promote products derived
16 * from this software without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 * POSSIBILITY OF SUCH DAMAGE.
29 *
30 * from: @(#)types.h 1.18 87/07/24 SMI
31 * from: @(#)types.h 2.3 88/08/15 4.0 RPCSRC
32 * $FreeBSD: src/include/rpc/types.h,v 1.10.6.1 2003/12/18 00:59:50 peter Exp $
33 */
34
35/* NFSv4.1 client for Windows
36 * Copyright © 2012 The Regents of the University of Michigan
37 *
38 * Olga Kornievskaia <aglo@umich.edu>
39 * Casey Bodley <cbodley@umich.edu>
40 *
41 * This library is free software; you can redistribute it and/or modify it
42 * under the terms of the GNU Lesser General Public License as published by
43 * the Free Software Foundation; either version 2.1 of the License, or (at
44 * your option) any later version.
45 *
46 * This library is distributed in the hope that it will be useful, but
47 * without any warranty; without even the implied warranty of merchantability
48 * or fitness for a particular purpose. See the GNU Lesser General Public
49 * License for more details.
50 *
51 * You should have received a copy of the GNU Lesser General Public License
52 * along with this library; if not, write to the Free Software Foundation,
53 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA
54 */
55
56/*
57 * Rpc additions to <sys/types.h>
58 */
59#ifndef _TIRPC_TYPES_H
60#define _TIRPC_TYPES_H
61
62#include <sys/types.h>
63#ifdef __REACTOS__
64#include <windef.h>
65#endif
66//#include <sys/_null.h>
67
68// Windows mappings of data types
69// Fixed size things
70typedef INT16 int16_t;
71typedef INT32 int32_t;
72typedef INT64 int64_t;
78typedef PCHAR caddr_t;
79// Scalable things
80typedef UCHAR u_char;
81typedef unsigned short u_short;
82typedef UINT32 u_int;
83typedef UINT32 uint;
84
85typedef INT64 quad_t;
87
88typedef UINT uid_t;
89typedef UINT gid_t;
90#ifndef __REACTOS__
91typedef DWORD pid_t;
92#endif
93
94#ifndef _SSIZE_T_DEFINED
95#define _SSIZE_T_DEFINED
96//typedef SIZE_T size_t; //This is causing a "benign redefinition error"
98// End of Windows...
99#endif
100
103
110
111#ifndef NULL
112# define NULL 0
113#endif
114#define __dontcare__ -1
115
116#ifndef FALSE
117# define FALSE (0)
118#endif
119#ifndef TRUE
120# define TRUE (1)
121#endif
122
123#define mem_alloc(bsize) calloc(1, bsize)
124#define mem_free(ptr, bsize) free(ptr)
125
126//#include <sys/time.h>
127//#include <sys/param.h>
128#include <stdlib.h>
129#include <netconfig.h>
130#ifdef __REACTOS__
131#include <ws2def.h>
132#include <winsock2.h>
133#endif
134
135/*
136 * The netbuf structure is defined here, because FreeBSD / NetBSD only use
137 * it inside the RPC code. It's in <xti.h> on SVR4, but it would be confusing
138 * to have an xti.h, since FreeBSD / NetBSD does not support XTI/TLI.
139 */
140
141/*
142 * The netbuf structure is used for transport-independent address storage.
143 */
144struct netbuf {
145 unsigned int maxlen;
146 unsigned int len;
147 void *buf;
148};
149
150/*
151 * The format of the addres and options arguments of the XTI t_bind call.
152 * Only provided for compatibility, it should not be used.
153 */
154
155struct t_bind {
156 struct netbuf addr;
157 unsigned int qlen;
158};
159
160/*
161 * Internal library and rpcbind use. This is not an exported interface, do
162 * not use.
163 */
169};
170
171#endif /* _TIRPC_TYPES_H */
unsigned short UINT16
signed int INT32
signed short INT16
unsigned long long UINT64
unsigned int UINT32
signed long long INT64
LONG_PTR SSIZE_T
Definition: basetsd.h:181
UINT32 u_int
Definition: types.h:82
UINT16 u_int16_t
Definition: types.h:73
INT64 quad_t
Definition: types.h:85
UINT64 u_quad_t
Definition: types.h:86
UINT32 u_int32_t
Definition: types.h:74
PCHAR caddr_t
Definition: types.h:78
UINT uid_t
Definition: types.h:88
UINT64 u_int64_t
Definition: types.h:76
u_int32_t rpcprog_t
Definition: types.h:104
int32_t bool_t
Definition: types.h:101
UINT32 uint
Definition: types.h:83
SSIZE_T ssize_t
Definition: types.h:97
u_int32_t rpcprot_t
Definition: types.h:107
int32_t rpc_inline_t
Definition: types.h:109
unsigned short u_short
Definition: types.h:81
DWORD pid_t
Definition: types.h:91
INT32 int32_t
Definition: types.h:71
u_int32_t rpcvers_t
Definition: types.h:105
UCHAR u_char
Definition: types.h:80
UINT32 uint32_t
Definition: types.h:75
INT16 int16_t
Definition: types.h:70
UINT64 uint64_t
Definition: types.h:77
u_int32_t rpcproc_t
Definition: types.h:106
int32_t enum_t
Definition: types.h:102
UINT gid_t
Definition: types.h:89
INT64 int64_t
Definition: types.h:72
u_int32_t rpcport_t
Definition: types.h:108
unsigned long DWORD
Definition: ntddk_ex.h:95
GLenum const GLvoid * addr
Definition: glext.h:9621
unsigned int UINT
Definition: ndis.h:50
unsigned int u_int32_t
Definition: rosdhcp.h:35
int si_socktype
Definition: types.h:167
int si_alen
Definition: types.h:168
ADDRESS_FAMILY si_af
Definition: types.h:165
int si_proto
Definition: types.h:166
Definition: types.h:144
void * buf
Definition: types.h:147
unsigned int len
Definition: types.h:146
unsigned int maxlen
Definition: types.h:145
Definition: types.h:155
unsigned int qlen
Definition: types.h:157
char * PCHAR
Definition: typedefs.h:51
USHORT ADDRESS_FAMILY
Definition: ws2def.h:25
unsigned char UCHAR
Definition: xmlstorage.h:181