1 /* 2 Unix SMB/CIFS implementation. 3 RAP operations 4 Copyright (C) Volker Lendecke 2004 5 6 This program is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 2 of the License, or 9 (at your option) any later version. 10 11 This program is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with this program; if not, write to the Free Software 18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 */ 20 21 #define RAP_WshareEnum 0 22 #define RAP_WshareGetInfo 1 23 #define RAP_WshareSetInfo 2 24 #define RAP_WshareAdd 3 25 #define RAP_WshareDel 4 26 #define RAP_NetShareCheck 5 27 #define RAP_WsessionEnum 6 28 #define RAP_WsessionGetInfo 7 29 #define RAP_WsessionDel 8 30 #define RAP_WconnectionEnum 9 31 #define RAP_WfileEnum 10 32 #define RAP_WfileGetInfo 11 33 #define RAP_WfileClose 12 34 #define RAP_WserverGetInfo 13 35 #define RAP_WserverSetInfo 14 36 #define RAP_WserverDiskEnum 15 37 #define RAP_WserverAdminCommand 16 38 #define RAP_NetAuditOpen 17 39 #define RAP_WauditClear 18 40 #define RAP_NetErrorLogOpen 19 41 #define RAP_WerrorLogClear 20 42 #define RAP_NetCharDevEnum 21 43 #define RAP_NetCharDevGetInfo 22 44 #define RAP_WCharDevControl 23 45 #define RAP_NetCharDevQEnum 24 46 #define RAP_NetCharDevQGetInfo 25 47 #define RAP_WCharDevQSetInfo 26 48 #define RAP_WCharDevQPurge 27 49 #define RAP_WCharDevQPurgeSelf 28 50 #define RAP_WMessageNameEnum 29 51 #define RAP_WMessageNameGetInfo 30 52 #define RAP_WMessageNameAdd 31 53 #define RAP_WMessageNameDel 32 54 #define RAP_WMessageNameFwd 33 55 #define RAP_WMessageNameUnFwd 34 56 #define RAP_WMessageBufferSend 35 57 #define RAP_WMessageFileSend 36 58 #define RAP_WMessageLogFileSet 37 59 #define RAP_WMessageLogFileGet 38 60 #define RAP_WServiceEnum 39 61 #define RAP_WServiceInstall 40 62 #define RAP_WServiceControl 41 63 #define RAP_WAccessEnum 42 64 #define RAP_WAccessGetInfo 43 65 #define RAP_WAccessSetInfo 44 66 #define RAP_WAccessAdd 45 67 #define RAP_WAccessDel 46 68 #define RAP_WGroupEnum 47 69 #define RAP_WGroupAdd 48 70 #define RAP_WGroupDel 49 71 #define RAP_WGroupAddUser 50 72 #define RAP_WGroupDelUser 51 73 #define RAP_WGroupGetUsers 52 74 #define RAP_WUserEnum 53 75 #define RAP_WUserAdd 54 76 #define RAP_WUserDel 55 77 #define RAP_WUserGetInfo 56 78 #define RAP_WUserSetInfo 57 79 #define RAP_WUserPasswordSet 58 80 #define RAP_WUserGetGroups 59 81 #define RAP_WWkstaSetUID 62 82 #define RAP_WWkstaGetInfo 63 83 #define RAP_WWkstaSetInfo 64 84 #define RAP_WUseEnum 65 85 #define RAP_WUseAdd 66 86 #define RAP_WUseDel 67 87 #define RAP_WUseGetInfo 68 88 #define RAP_WPrintQEnum 69 89 #define RAP_WPrintQGetInfo 70 90 #define RAP_WPrintQSetInfo 71 91 #define RAP_WPrintQAdd 72 92 #define RAP_WPrintQDel 73 93 #define RAP_WPrintQPause 74 94 #define RAP_WPrintQContinue 75 95 #define RAP_WPrintJobEnum 76 96 #define RAP_WPrintJobGetInfo 77 97 #define RAP_WPrintJobSetInfo_OLD 78 98 #define RAP_WPrintJobDel 81 99 #define RAP_WPrintJobPause 82 100 #define RAP_WPrintJobContinue 83 101 #define RAP_WPrintDestEnum 84 102 #define RAP_WPrintDestGetInfo 85 103 #define RAP_WPrintDestControl 86 104 #define RAP_WProfileSave 87 105 #define RAP_WProfileLoad 88 106 #define RAP_WStatisticsGet 89 107 #define RAP_WStatisticsClear 90 108 #define RAP_NetRemoteTOD 91 109 #define RAP_WNetBiosEnum 92 110 #define RAP_WNetBiosGetInfo 93 111 #define RAP_NetServerEnum 94 112 #define RAP_I_NetServerEnum 95 113 #define RAP_WServiceGetInfo 96 114 #define RAP_WPrintQPurge 103 115 #define RAP_NetServerEnum2 104 116 #define RAP_WAccessGetUserPerms 105 117 #define RAP_WGroupGetInfo 106 118 #define RAP_WGroupSetInfo 107 119 #define RAP_WGroupSetUsers 108 120 #define RAP_WUserSetGroups 109 121 #define RAP_WUserModalsGet 110 122 #define RAP_WUserModalsSet 111 123 #define RAP_WFileEnum2 112 124 #define RAP_WUserAdd2 113 125 #define RAP_WUserSetInfo2 114 126 #define RAP_WUserPasswordSet2 115 127 #define RAP_I_NetServerEnum2 116 128 #define RAP_WConfigGet2 117 129 #define RAP_WConfigGetAll2 118 130 #define RAP_WGetDCName 119 131 #define RAP_NetHandleGetInfo 120 132 #define RAP_NetHandleSetInfo 121 133 #define RAP_WStatisticsGet2 122 134 #define RAP_WBuildGetInfo 123 135 #define RAP_WFileGetInfo2 124 136 #define RAP_WFileClose2 125 137 #define RAP_WNetServerReqChallenge 126 138 #define RAP_WNetServerAuthenticate 127 139 #define RAP_WNetServerPasswordSet 128 140 #define RAP_WNetAccountDeltas 129 141 #define RAP_WNetAccountSync 130 142 #define RAP_WUserEnum2 131 143 #define RAP_WWkstaUserLogon 132 144 #define RAP_WWkstaUserLogoff 133 145 #define RAP_WLogonEnum 134 146 #define RAP_WErrorLogRead 135 147 #define RAP_NetPathType 136 148 #define RAP_NetPathCanonicalize 137 149 #define RAP_NetPathCompare 138 150 #define RAP_NetNameValidate 139 151 #define RAP_NetNameCanonicalize 140 152 #define RAP_NetNameCompare 141 153 #define RAP_WAuditRead 142 154 #define RAP_WPrintDestAdd 143 155 #define RAP_WPrintDestSetInfo 144 156 #define RAP_WPrintDestDel 145 157 #define RAP_WUserValidate2 146 158 #define RAP_WPrintJobSetInfo 147 159 #define RAP_TI_NetServerDiskEnum 148 160 #define RAP_TI_NetServerDiskGetInfo 149 161 #define RAP_TI_FTVerifyMirror 150 162 #define RAP_TI_FTAbortVerify 151 163 #define RAP_TI_FTGetInfo 152 164 #define RAP_TI_FTSetInfo 153 165 #define RAP_TI_FTLockDisk 154 166 #define RAP_TI_FTFixError 155 167 #define RAP_TI_FTAbortFix 156 168 #define RAP_TI_FTDiagnoseError 157 169 #define RAP_TI_FTGetDriveStats 158 170 #define RAP_TI_FTErrorGetInfo 160 171 #define RAP_NetAccessCheck 163 172 #define RAP_NetAlertRaise 164 173 #define RAP_NetAlertStart 165 174 #define RAP_NetAlertStop 166 175 #define RAP_NetAuditWrite 167 176 #define RAP_NetIRemoteAPI 168 177 #define RAP_NetServiceStatus 169 178 #define RAP_NetServerRegister 170 179 #define RAP_NetServerDeregister 171 180 #define RAP_NetSessionEntryMake 172 181 #define RAP_NetSessionEntryClear 173 182 #define RAP_NetSessionEntryGetInfo 174 183 #define RAP_NetSessionEntrySetInfo 175 184 #define RAP_NetConnectionEntryMake 176 185 #define RAP_NetConnectionEntryClear 177 186 #define RAP_NetConnectionEntrySetInfo 178 187 #define RAP_NetConnectionEntryGetInfo 179 188 #define RAP_NetFileEntryMake 180 189 #define RAP_NetFileEntryClear 181 190 #define RAP_NetFileEntrySetInfo 182 191 #define RAP_NetFileEntryGetInfo 183 192 #define RAP_AltSrvMessageBufferSend 184 193 #define RAP_AltSrvMessageFileSend 185 194 #define RAP_wI_NetRplWkstaEnum 186 195 #define RAP_wI_NetRplWkstaGetInfo 187 196 #define RAP_wI_NetRplWkstaSetInfo 188 197 #define RAP_wI_NetRplWkstaAdd 189 198 #define RAP_wI_NetRplWkstaDel 190 199 #define RAP_wI_NetRplProfileEnum 191 200 #define RAP_wI_NetRplProfileGetInfo 192 201 #define RAP_wI_NetRplProfileSetInfo 193 202 #define RAP_wI_NetRplProfileAdd 194 203 #define RAP_wI_NetRplProfileDel 195 204 #define RAP_wI_NetRplProfileClone 196 205 #define RAP_wI_NetRplBaseProfileEnum 197 206 #define RAP_WIServerSetInfo 201 207 #define RAP_WPrintDriverEnum 205 208 #define RAP_WPrintQProcessorEnum 206 209 #define RAP_WPrintPortEnum 207 210 #define RAP_WNetWriteUpdateLog 208 211 #define RAP_WNetAccountUpdate 209 212 #define RAP_WNetAccountConfirmUpdate 210 213 #define RAP_WConfigSet 211 214 #define RAP_WAccountsReplicate 212 215 #define RAP_SamOEMChgPasswordUser2_P 214 216 #define RAP_NetServerEnum3 215 217 #define RAP_WprintDriverGetInfo 250 218 #define RAP_WprintDriverSetInfo 251 219 #define RAP_WaliasAdd 252 220 #define RAP_WaliasDel 253 221 #define RAP_WaliasGetInfo 254 222 #define RAP_WaliasSetInfo 255 223 #define RAP_WaliasEnum 256 224 #define RAP_WuserGetLogonAsn 257 225 #define RAP_WuserSetLogonAsn 258 226 #define RAP_WuserGetAppSel 259 227 #define RAP_WuserSetAppSel 260 228 #define RAP_WappAdd 261 229 #define RAP_WappDel 262 230 #define RAP_WappGetInfo 263 231 #define RAP_WappSetInfo 264 232 #define RAP_WappEnum 265 233 #define RAP_WUserDCDBInit 266 234 #define RAP_WDASDAdd 267 235 #define RAP_WDASDDel 268 236 #define RAP_WDASDGetInfo 269 237 #define RAP_WDASDSetInfo 270 238 #define RAP_WDASDEnum 271 239 #define RAP_WDASDCheck 272 240 #define RAP_WDASDCtl 273 241 #define RAP_WuserRemoteLogonCheck 274 242 #define RAP_WUserPasswordSet3 275 243 #define RAP_WCreateRIPLMachine 276 244 #define RAP_WDeleteRIPLMachine 277 245 #define RAP_WGetRIPLMachineInfo 278 246 #define RAP_WSetRIPLMachineInfo 279 247 #define RAP_WEnumRIPLMachine 280 248 #define RAP_I_ShareAdd 281 249 #define RAP_AliasEnum 282 250 #define RAP_WaccessApply 283 251 #define RAP_WPrt16Query 284 252 #define RAP_WPrt16Set 285 253 #define RAP_WUserDel100 286 254 #define RAP_WUserRemoteLogonCheck2 287 255 #define RAP_WRemoteTODSet 294 256 #define RAP_WprintJobMoveAll 295 257 #define RAP_W16AppParmAdd 296 258 #define RAP_W16AppParmDel 297 259 #define RAP_W16AppParmGet 298 260 #define RAP_W16AppParmSet 299 261 #define RAP_W16RIPLMachineCreate 300 262 #define RAP_W16RIPLMachineGetInfo 301 263 #define RAP_W16RIPLMachineSetInfo 302 264 #define RAP_W16RIPLMachineEnum 303 265 #define RAP_W16RIPLMachineListParmEnum 304 266 #define RAP_W16RIPLMachClassGetInfo 305 267 #define RAP_W16RIPLMachClassEnum 306 268 #define RAP_W16RIPLMachClassCreate 307 269 #define RAP_W16RIPLMachClassSetInfo 308 270 #define RAP_W16RIPLMachClassDelete 309 271 #define RAP_W16RIPLMachClassLPEnum 310 272 #define RAP_W16RIPLMachineDelete 311 273 #define RAP_W16WSLevelGetInfo 312 274 #define RAP_WserverNameAdd 313 275 #define RAP_WserverNameDel 314 276 #define RAP_WserverNameEnum 315 277 #define RAP_I_WDASDEnum 316 278 #define RAP_WDASDEnumTerminate 317 279 #define RAP_WDASDSetInfo2 318 280 #define MAX_API 318 281 282 struct rap_shareenum_info_0 { 283 char name[13]; 284 }; 285 286 struct rap_shareenum_info_1 { 287 char name[13]; 288 char pad; 289 uint16_t type; 290 char *comment; 291 }; 292 293 union rap_shareenum_info { 294 struct rap_shareenum_info_0 info0; 295 struct rap_shareenum_info_1 info1; 296 }; 297 298 struct rap_NetShareEnum { 299 struct { 300 uint16_t level; 301 uint16_t bufsize; 302 } in; 303 304 struct { 305 uint16_t status; 306 uint16_t convert; 307 uint16_t count; 308 uint16_t available; 309 union rap_shareenum_info *info; 310 } out; 311 }; 312 313 struct rap_server_info_0 { 314 char name[16]; 315 }; 316 317 struct rap_server_info_1 { 318 char name[16]; 319 uint8_t version_major; 320 uint8_t version_minor; 321 uint32_t servertype; 322 char *comment; 323 }; 324 325 union rap_server_info { 326 struct rap_server_info_0 info0; 327 struct rap_server_info_1 info1; 328 }; 329 330 struct rap_NetServerEnum2 { 331 struct { 332 uint16_t level; 333 uint16_t bufsize; 334 uint32_t servertype; 335 const char *domain; 336 } in; 337 338 struct { 339 uint16_t status; 340 uint16_t convert; 341 uint16_t count; 342 uint16_t available; 343 union rap_server_info *info; 344 } out; 345 }; 346 347 struct rap_WserverGetInfo { 348 struct { 349 uint16_t level; 350 uint16_t bufsize; 351 } in; 352 353 struct { 354 uint16_t status; 355 uint16_t convert; 356 uint16_t available; 357 union rap_server_info info; 358 } out; 359 }; 360