17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21 /*
22 * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
23 * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
24 */
25
26 #ifndef _SMBSRV_SMB_XDR_H
27 #define _SMBSRV_SMB_XDR_H
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32
33 #include <rpc/xdr.h>
34 #include <sys/param.h>
35 #include <sys/avl.h>
36 #include <sys/list.h>
37 #include <smbsrv/wintypes.h>
38 #include <smbsrv/smb_sid.h>
39 #include <smbsrv/smbinfo.h>
40 #include <smbsrv/smb_ioctl.h>
41 #include <smbsrv/smb_sid.h>
42 #include <smbsrv/smb_share.h>
43 #include <smbsrv/smb_dfs.h>
44 #include <smbsrv/wintypes.h>
45
46 #if defined(_KERNEL) || defined(_FAKE_KERNEL)
47 #include <sys/sysmacros.h>
48 #define xdr_int8_t xdr_char
49 #define xdr_uint8_t xdr_u_char
50 #define xdr_int16_t xdr_short
51 #define xdr_uint16_t xdr_u_short
52 #else /* _KERNEL */
53 #include <stddef.h> /* offsetof */
54 #endif /* _KERNEL */
55
56 /*
57 * null-terminated string
58 * See also: smb_string_xdr()
59 */
60 typedef struct smb_string {
61 char *buf;
62 } smb_string_t;
63
64 struct smb_buf32;
111 */
112 typedef struct smb_doorhdr {
113 uint32_t dh_magic;
114 uint32_t dh_flags;
115 uint32_t dh_fid;
116 uint32_t dh_op;
117 uint32_t dh_txid;
118 uint32_t dh_datalen;
119 uint32_t dh_resid;
120 uint32_t dh_door_rc;
121 uint32_t dh_status;
122 } smb_doorhdr_t;
123
124 /*
125 * Information about the client of a named pipe, provided by smbsrv
126 * to the server side of the named pipe (the RPC service).
127 * See also: smb_netuserinfo_xdr()
128 */
129 typedef struct smb_netuserinfo {
130 uint64_t ui_session_id;
131 uint16_t ui_smb_uid;
132 uint16_t ui_domain_len;
133 char *ui_domain;
134 uint16_t ui_account_len;
135 char *ui_account;
136 uid_t ui_posix_uid;
137 uint16_t ui_workstation_len;
138 char *ui_workstation;
139 smb_inaddr_t ui_ipaddr;
140 int32_t ui_native_os;
141 int64_t ui_logon_time;
142 uint32_t ui_numopens;
143 uint32_t ui_flags;
144 } smb_netuserinfo_t;
145
146 typedef struct smb_opennum {
147 uint32_t open_users;
148 uint32_t open_trees;
149 uint32_t open_files;
150 uint32_t qualtype;
151 char qualifier[MAXNAMELEN];
|
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21 /*
22 * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
23 * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
24 */
25
26 #ifndef _SMBSRV_SMB_XDR_H
27 #define _SMBSRV_SMB_XDR_H
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32
33 #include <rpc/xdr.h>
34 #include <sys/param.h>
35 #include <sys/avl.h>
36 #include <sys/list.h>
37 #include <smb/wintypes.h>
38 #include <smbsrv/smb_sid.h>
39 #include <smbsrv/smbinfo.h>
40 #include <smbsrv/smb_ioctl.h>
41 #include <smbsrv/smb_sid.h>
42 #include <smbsrv/smb_share.h>
43 #include <smbsrv/smb_dfs.h>
44
45 #if defined(_KERNEL) || defined(_FAKE_KERNEL)
46 #include <sys/sysmacros.h>
47 #define xdr_int8_t xdr_char
48 #define xdr_uint8_t xdr_u_char
49 #define xdr_int16_t xdr_short
50 #define xdr_uint16_t xdr_u_short
51 #else /* _KERNEL */
52 #include <stddef.h> /* offsetof */
53 #endif /* _KERNEL */
54
55 /*
56 * null-terminated string
57 * See also: smb_string_xdr()
58 */
59 typedef struct smb_string {
60 char *buf;
61 } smb_string_t;
62
63 struct smb_buf32;
110 */
111 typedef struct smb_doorhdr {
112 uint32_t dh_magic;
113 uint32_t dh_flags;
114 uint32_t dh_fid;
115 uint32_t dh_op;
116 uint32_t dh_txid;
117 uint32_t dh_datalen;
118 uint32_t dh_resid;
119 uint32_t dh_door_rc;
120 uint32_t dh_status;
121 } smb_doorhdr_t;
122
123 /*
124 * Information about the client of a named pipe, provided by smbsrv
125 * to the server side of the named pipe (the RPC service).
126 * See also: smb_netuserinfo_xdr()
127 */
128 typedef struct smb_netuserinfo {
129 uint64_t ui_session_id;
130 uint16_t ui_domain_len;
131 char *ui_domain;
132 uint16_t ui_account_len;
133 char *ui_account;
134 uid_t ui_posix_uid;
135 uint16_t ui_workstation_len;
136 char *ui_workstation;
137 smb_inaddr_t ui_ipaddr;
138 int32_t ui_native_os;
139 int64_t ui_logon_time;
140 uint32_t ui_numopens;
141 uint32_t ui_flags;
142 } smb_netuserinfo_t;
143
144 typedef struct smb_opennum {
145 uint32_t open_users;
146 uint32_t open_trees;
147 uint32_t open_files;
148 uint32_t qualtype;
149 char qualifier[MAXNAMELEN];
|