Changeset 988 for vendor/current/source3/libsmb/proto.h
- Timestamp:
- Nov 24, 2016, 1:14:11 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source3/libsmb/proto.h
r740 r988 27 27 #define _LIBSMB_PROTO_H_ 28 28 29 #include "ads.h" 30 #include "auth_info.h" 31 32 struct smb_trans_enc_state; 33 29 34 /* The following definitions come from libsmb/cliconnect.c */ 30 35 31 ADS_STATUS cli_session_setup_spnego(struct cli_state *cli, const char *user, 32 const char *pass, const char *user_domain, 33 const char * dest_realm); 34 36 struct tevent_req *cli_session_setup_send(TALLOC_CTX *mem_ctx, 37 struct tevent_context *ev, 38 struct cli_state *cli, 39 const char *user, 40 const char *pass, int passlen, 41 const char *ntpass, int ntpasslen, 42 const char *workgroup); 43 NTSTATUS cli_session_setup_recv(struct tevent_req *req); 35 44 NTSTATUS cli_session_setup(struct cli_state *cli, 36 45 const char *user, … … 39 48 const char *workgroup); 40 49 struct tevent_req *cli_session_setup_guest_create(TALLOC_CTX *mem_ctx, 41 struct event_context *ev,50 struct tevent_context *ev, 42 51 struct cli_state *cli, 43 52 struct tevent_req **psmbreq); 44 53 struct tevent_req *cli_session_setup_guest_send(TALLOC_CTX *mem_ctx, 45 struct event_context *ev,54 struct tevent_context *ev, 46 55 struct cli_state *cli); 47 56 NTSTATUS cli_session_setup_guest_recv(struct tevent_req *req); 48 struct tevent_req *cli_ulogoff_send(TALLOC_CTX *mem_ctx,49 struct tevent_context *ev,50 struct cli_state *cli);51 NTSTATUS cli_ulogoff_recv(struct tevent_req *req);52 57 NTSTATUS cli_ulogoff(struct cli_state *cli); 53 58 struct tevent_req *cli_tcon_andx_create(TALLOC_CTX *mem_ctx, 54 struct event_context *ev,59 struct tevent_context *ev, 55 60 struct cli_state *cli, 56 61 const char *share, const char *dev, … … 58 63 struct tevent_req **psmbreq); 59 64 struct tevent_req *cli_tcon_andx_send(TALLOC_CTX *mem_ctx, 60 struct event_context *ev,65 struct tevent_context *ev, 61 66 struct cli_state *cli, 62 67 const char *share, const char *dev, … … 65 70 NTSTATUS cli_tcon_andx(struct cli_state *cli, const char *share, 66 71 const char *dev, const char *pass, int passlen); 67 struct tevent_req *cli_tdis_send(TALLOC_CTX *mem_ctx, 68 struct tevent_context *ev, 69 struct cli_state *cli); 70 NTSTATUS cli_tdis_recv(struct tevent_req *req); 72 NTSTATUS cli_tree_connect(struct cli_state *cli, const char *share, 73 const char *dev, const char *pass, int passlen); 71 74 NTSTATUS cli_tdis(struct cli_state *cli); 72 NTSTATUS cli_negprot(struct cli_state *cli); 73 struct tevent_req *cli_negprot_send(TALLOC_CTX *mem_ctx, 74 struct event_context *ev, 75 struct cli_state *cli); 76 NTSTATUS cli_negprot_recv(struct tevent_req *req); 77 bool cli_session_request(struct cli_state *cli, 78 struct nmb_name *calling, struct nmb_name *called); 79 NTSTATUS cli_connect(struct cli_state *cli, 80 const char *host, 81 struct sockaddr_storage *dest_ss); 75 NTSTATUS cli_connect_nb(const char *host, const struct sockaddr_storage *dest_ss, 76 uint16_t port, int name_type, const char *myname, 77 int signing_state, int flags, struct cli_state **pcli); 82 78 NTSTATUS cli_start_connection(struct cli_state **output_cli, 83 79 const char *my_name, 84 80 const char *dest_host, 85 struct sockaddr_storage *dest_ss, int port,81 const struct sockaddr_storage *dest_ss, int port, 86 82 int signing_state, int flags); 83 struct tevent_req *cli_full_connection_send( 84 TALLOC_CTX *mem_ctx, struct tevent_context *ev, 85 const char *my_name, const char *dest_host, 86 const struct sockaddr_storage *dest_ss, int port, 87 const char *service, const char *service_type, 88 const char *user, const char *domain, 89 const char *password, int flags, int signing_state); 90 NTSTATUS cli_full_connection_recv(struct tevent_req *req, 91 struct cli_state **output_cli); 87 92 NTSTATUS cli_full_connection(struct cli_state **output_cli, 88 93 const char *my_name, 89 94 const char *dest_host, 90 struct sockaddr_storage *dest_ss, int port,95 const struct sockaddr_storage *dest_ss, int port, 91 96 const char *service, const char *service_type, 92 97 const char *user, const char *domain, 93 98 const char *password, int flags, 94 99 int signing_state); 95 bool attempt_netbios_session_request(struct cli_state **ppcli, const char *srchost, const char *desthost,96 struct sockaddr_storage *pdest_ss);97 100 NTSTATUS cli_raw_tcon(struct cli_state *cli, 98 101 const char *service, const char *pass, const char *dev, 99 uint16 *max_xmit, uint16*tid);102 uint16_t *max_xmit, uint16_t *tid); 100 103 struct cli_state *get_ipc_connect(char *server, 101 104 struct sockaddr_storage *server_ss, … … 116 119 const char *domain, 117 120 const char *sharename); 118 struct cli_state *cli_cm_open(TALLOC_CTX *ctx,121 NTSTATUS cli_cm_open(TALLOC_CTX *ctx, 119 122 struct cli_state *referring_cli, 120 123 const char *server, … … 125 128 int max_protocol, 126 129 int port, 127 int name_type); 128 void cli_cm_display(const struct cli_state *c); 130 int name_type, 131 struct cli_state **pcli); 132 void cli_cm_display(struct cli_state *c); 129 133 struct client_dfs_referral; 130 134 NTSTATUS cli_dfs_get_referral(TALLOC_CTX *ctx, … … 134 138 size_t *num_refs, 135 139 size_t *consumed); 136 boolcli_resolve_path(TALLOC_CTX *ctx,137 const char *mountpt,138 const struct user_auth_info *dfs_auth_info,139 struct cli_state *rootcli,140 const char *path,141 struct cli_state **targetcli,142 char **pp_targetpath);140 NTSTATUS cli_resolve_path(TALLOC_CTX *ctx, 141 const char *mountpt, 142 const struct user_auth_info *dfs_auth_info, 143 struct cli_state *rootcli, 144 const char *path, 145 struct cli_state **targetcli, 146 char **pp_targetpath); 143 147 144 148 bool cli_check_msdfs_proxy(TALLOC_CTX *ctx, … … 156 160 int cli_set_message(char *buf,int num_words,int num_bytes,bool zero); 157 161 unsigned int cli_set_timeout(struct cli_state *cli, unsigned int timeout); 158 void cli_set_port(struct cli_state *cli, int port); 159 bool cli_state_seqnum_persistent(struct cli_state *cli, 160 uint16_t mid); 161 bool cli_state_seqnum_remove(struct cli_state *cli, 162 uint16_t mid); 163 bool cli_receive_smb(struct cli_state *cli); 164 bool cli_send_smb(struct cli_state *cli); 162 bool cli_set_backup_intent(struct cli_state *cli, bool flag); 165 163 void cli_setup_packet_buf(struct cli_state *cli, char *buf); 166 void cli_setup_packet(struct cli_state *cli); 167 void cli_setup_bcc(struct cli_state *cli, void *p); 168 NTSTATUS cli_set_domain(struct cli_state *cli, const char *domain); 169 NTSTATUS cli_set_username(struct cli_state *cli, const char *username); 170 NTSTATUS cli_set_password(struct cli_state *cli, const char *password); 171 NTSTATUS cli_init_creds(struct cli_state *cli, const char *username, const char *domain, const char *password); 172 struct cli_state *cli_initialise(void); 173 struct cli_state *cli_initialise_ex(int signing_state); 164 extern struct GUID cli_state_client_guid; 165 struct cli_state *cli_state_create(TALLOC_CTX *mem_ctx, 166 int fd, 167 const char *remote_name, 168 const char *remote_realm, 169 int signing_state, 170 int flags); 174 171 void cli_nt_pipes_close(struct cli_state *cli); 175 172 void cli_shutdown(struct cli_state *cli); 176 void cli_sockopt(struct cli_state *cli, const char *options); 177 uint16 cli_setpid(struct cli_state *cli, uint16 pid); 173 const char *cli_state_remote_realm(struct cli_state *cli); 174 uint16_t cli_state_get_vc_num(struct cli_state *cli); 175 uint16_t cli_setpid(struct cli_state *cli, uint16_t pid); 176 uint16_t cli_getpid(struct cli_state *cli); 177 bool cli_state_has_tcon(struct cli_state *cli); 178 uint16_t cli_state_get_tid(struct cli_state *cli); 179 uint16_t cli_state_set_tid(struct cli_state *cli, uint16_t tid); 180 uint16_t cli_state_get_uid(struct cli_state *cli); 181 uint16_t cli_state_set_uid(struct cli_state *cli, uint16_t uid); 178 182 bool cli_set_case_sensitive(struct cli_state *cli, bool case_sensitive); 179 struct tevent_req *cli_echo_send(TALLOC_CTX *mem_ctx, struct event_context *ev, 183 uint32_t cli_state_available_size(struct cli_state *cli, uint32_t ofs); 184 time_t cli_state_server_time(struct cli_state *cli); 185 struct tevent_req *cli_echo_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, 180 186 struct cli_state *cli, uint16_t num_echos, 181 187 DATA_BLOB data); 182 188 NTSTATUS cli_echo_recv(struct tevent_req *req); 183 189 NTSTATUS cli_echo(struct cli_state *cli, uint16_t num_echos, DATA_BLOB data); 184 bool cli_ucs2(struct cli_state *cli);185 190 bool is_andx_req(uint8_t cmd); 186 191 NTSTATUS cli_smb(TALLOC_CTX *mem_ctx, struct cli_state *cli, … … 196 201 const char *cli_errstr(struct cli_state *cli); 197 202 NTSTATUS cli_nt_error(struct cli_state *cli); 198 void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32*ecode);203 void cli_dos_error(struct cli_state *cli, uint8_t *eclass, uint32_t *ecode); 199 204 int cli_errno(struct cli_state *cli); 200 205 bool cli_is_error(struct cli_state *cli); 201 206 bool cli_is_nt_error(struct cli_state *cli); 202 207 bool cli_is_dos_error(struct cli_state *cli); 203 NTSTATUS cli_get_nt_error(struct cli_state *cli);204 void cli_set_nt_error(struct cli_state *cli, NTSTATUS status);205 void cli_reset_error(struct cli_state *cli);206 208 bool cli_state_is_connected(struct cli_state *cli); 207 209 … … 223 225 224 226 struct tevent_req *cli_posix_symlink_send(TALLOC_CTX *mem_ctx, 225 struct event_context *ev,227 struct tevent_context *ev, 226 228 struct cli_state *cli, 227 229 const char *oldname, … … 232 234 const char *newname); 233 235 struct tevent_req *cli_posix_readlink_send(TALLOC_CTX *mem_ctx, 234 struct event_context *ev,236 struct tevent_context *ev, 235 237 struct cli_state *cli, 236 238 const char *fname, … … 241 243 char *linkpath, size_t len); 242 244 struct tevent_req *cli_posix_hardlink_send(TALLOC_CTX *mem_ctx, 243 struct event_context *ev,245 struct tevent_context *ev, 244 246 struct cli_state *cli, 245 247 const char *oldname, … … 251 253 uint32_t unix_perms_to_wire(mode_t perms); 252 254 mode_t wire_perms_to_unix(uint32_t perms); 253 struct tevent_req *cli_posix_get facl_send(TALLOC_CTX *mem_ctx,254 struct event_context *ev,255 struct tevent_req *cli_posix_getacl_send(TALLOC_CTX *mem_ctx, 256 struct tevent_context *ev, 255 257 struct cli_state *cli, 256 258 const char *fname); 257 NTSTATUS cli_posix_get facl_recv(struct tevent_req *req,259 NTSTATUS cli_posix_getacl_recv(struct tevent_req *req, 258 260 TALLOC_CTX *mem_ctx, 259 261 size_t *prb_size, 260 262 char **retbuf); 261 NTSTATUS cli_posix_get facl(struct cli_state *cli,263 NTSTATUS cli_posix_getacl(struct cli_state *cli, 262 264 const char *fname, 263 265 TALLOC_CTX *mem_ctx, 264 266 size_t *prb_size, 265 267 char **retbuf); 268 struct tevent_req *cli_posix_setacl_send(TALLOC_CTX *mem_ctx, 269 struct tevent_context *ev, 270 struct cli_state *cli, 271 const char *fname, 272 const void *acl_buf, 273 size_t acl_buf_size); 274 NTSTATUS cli_posix_setacl_recv(struct tevent_req *req); 275 NTSTATUS cli_posix_setacl(struct cli_state *cli, 276 const char *fname, 277 const void *acl_buf, 278 size_t acl_buf_size); 266 279 struct tevent_req *cli_posix_stat_send(TALLOC_CTX *mem_ctx, 267 struct event_context *ev,280 struct tevent_context *ev, 268 281 struct cli_state *cli, 269 282 const char *fname); … … 274 287 SMB_STRUCT_STAT *sbuf); 275 288 struct tevent_req *cli_posix_chmod_send(TALLOC_CTX *mem_ctx, 276 struct event_context *ev,289 struct tevent_context *ev, 277 290 struct cli_state *cli, 278 291 const char *fname, … … 281 294 NTSTATUS cli_posix_chmod(struct cli_state *cli, const char *fname, mode_t mode); 282 295 struct tevent_req *cli_posix_chown_send(TALLOC_CTX *mem_ctx, 283 struct event_context *ev,296 struct tevent_context *ev, 284 297 struct cli_state *cli, 285 298 const char *fname, … … 292 305 gid_t gid); 293 306 struct tevent_req *cli_rename_send(TALLOC_CTX *mem_ctx, 294 struct event_context *ev,307 struct tevent_context *ev, 295 308 struct cli_state *cli, 296 309 const char *fname_src, … … 299 312 NTSTATUS cli_rename(struct cli_state *cli, const char *fname_src, const char *fname_dst); 300 313 struct tevent_req *cli_ntrename_send(TALLOC_CTX *mem_ctx, 301 struct event_context *ev,314 struct tevent_context *ev, 302 315 struct cli_state *cli, 303 316 const char *fname_src, … … 307 320 308 321 struct tevent_req *cli_nt_hardlink_send(TALLOC_CTX *mem_ctx, 309 struct event_context *ev,322 struct tevent_context *ev, 310 323 struct cli_state *cli, 311 324 const char *fname_src, … … 315 328 316 329 struct tevent_req *cli_unlink_send(TALLOC_CTX *mem_ctx, 317 struct event_context *ev,330 struct tevent_context *ev, 318 331 struct cli_state *cli, 319 332 const char *fname, … … 323 336 324 337 struct tevent_req *cli_mkdir_send(TALLOC_CTX *mem_ctx, 325 struct event_context *ev,338 struct tevent_context *ev, 326 339 struct cli_state *cli, 327 340 const char *dname); … … 329 342 NTSTATUS cli_mkdir(struct cli_state *cli, const char *dname); 330 343 struct tevent_req *cli_rmdir_send(TALLOC_CTX *mem_ctx, 331 struct event_context *ev,344 struct tevent_context *ev, 332 345 struct cli_state *cli, 333 346 const char *dname); … … 335 348 NTSTATUS cli_rmdir(struct cli_state *cli, const char *dname); 336 349 struct tevent_req *cli_nt_delete_on_close_send(TALLOC_CTX *mem_ctx, 337 struct event_context *ev,350 struct tevent_context *ev, 338 351 struct cli_state *cli, 339 352 uint16_t fnum, … … 342 355 NTSTATUS cli_nt_delete_on_close(struct cli_state *cli, uint16_t fnum, bool flag); 343 356 struct tevent_req *cli_ntcreate_send(TALLOC_CTX *mem_ctx, 344 struct event_context *ev,357 struct tevent_context *ev, 345 358 struct cli_state *cli, 346 359 const char *fname, … … 352 365 uint32_t CreateOptions, 353 366 uint8_t SecurityFlags); 354 NTSTATUS cli_ntcreate_recv(struct tevent_req *req, uint16_t *pfnum); 367 NTSTATUS cli_ntcreate_recv(struct tevent_req *req, 368 uint16_t *pfnum, 369 struct smb_create_returns *cr); 355 370 NTSTATUS cli_ntcreate(struct cli_state *cli, 356 371 const char *fname, … … 362 377 uint32_t CreateOptions, 363 378 uint8_t SecurityFlags, 364 uint16_t *pfid); 379 uint16_t *pfid, 380 struct smb_create_returns *cr); 365 381 uint8_t *smb_bytes_push_str(uint8_t *buf, bool ucs2, const char *str, 366 382 size_t str_len, size_t *pconverted_size); 367 383 uint8_t *smb_bytes_push_bytes(uint8_t *buf, uint8_t prefix, 368 384 const uint8_t *bytes, size_t num_bytes); 369 struct tevent_req *cli_open_create(TALLOC_CTX *mem_ctx, 370 struct event_context *ev, 385 uint8_t *trans2_bytes_push_str(uint8_t *buf, bool ucs2, 386 const char *str, size_t str_len, 387 size_t *pconverted_size); 388 uint8_t *trans2_bytes_push_bytes(uint8_t *buf, 389 const uint8_t *bytes, size_t num_bytes); 390 struct tevent_req *cli_openx_create(TALLOC_CTX *mem_ctx, 391 struct tevent_context *ev, 371 392 struct cli_state *cli, const char *fname, 372 393 int flags, int share_mode, 373 394 struct tevent_req **psmbreq); 374 struct tevent_req *cli_open _send(TALLOC_CTX *mem_ctx, structevent_context *ev,395 struct tevent_req *cli_openx_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, 375 396 struct cli_state *cli, const char *fname, 376 397 int flags, int share_mode); 377 NTSTATUS cli_open_recv(struct tevent_req *req, uint16_t *fnum); 398 NTSTATUS cli_openx_recv(struct tevent_req *req, uint16_t *fnum); 399 NTSTATUS cli_openx(struct cli_state *cli, const char *fname, int flags, int share_mode, uint16_t *pfnum); 378 400 NTSTATUS cli_open(struct cli_state *cli, const char *fname, int flags, int share_mode, uint16_t *pfnum); 379 401 struct tevent_req *cli_close_create(TALLOC_CTX *mem_ctx, 380 struct event_context *ev,402 struct tevent_context *ev, 381 403 struct cli_state *cli, uint16_t fnum, 382 404 struct tevent_req **psubreq); 383 405 struct tevent_req *cli_close_send(TALLOC_CTX *mem_ctx, 384 struct event_context *ev,406 struct tevent_context *ev, 385 407 struct cli_state *cli, uint16_t fnum); 386 408 NTSTATUS cli_close_recv(struct tevent_req *req); 387 409 NTSTATUS cli_close(struct cli_state *cli, uint16_t fnum); 388 410 struct tevent_req *cli_ftruncate_send(TALLOC_CTX *mem_ctx, 389 struct event_context *ev,411 struct tevent_context *ev, 390 412 struct cli_state *cli, 391 413 uint16_t fnum, … … 396 418 uint32_t offset, uint32_t len, 397 419 int timeout, unsigned char locktype); 398 bool cli_lock(struct cli_state *cli, uint16_t fnum,399 uint32_t offset,uint32_t len, int timeout, enum brl_type lock_type);420 NTSTATUS cli_lock32(struct cli_state *cli, uint16_t fnum, uint32_t offset, 421 uint32_t len, int timeout, enum brl_type lock_type); 400 422 struct tevent_req *cli_unlock_send(TALLOC_CTX *mem_ctx, 401 struct event_context *ev,423 struct tevent_context *ev, 402 424 struct cli_state *cli, 403 425 uint16_t fnum, … … 406 428 NTSTATUS cli_unlock_recv(struct tevent_req *req); 407 429 NTSTATUS cli_unlock(struct cli_state *cli, uint16_t fnum, uint32_t offset, uint32_t len); 408 bool cli_lock64(struct cli_state *cli, uint16_t fnum, 409 uint64_t offset, uint64_t len, int timeout, enum brl_type lock_type); 430 NTSTATUS cli_lock64(struct cli_state *cli, uint16_t fnum, 431 uint64_t offset, uint64_t len, int timeout, 432 enum brl_type lock_type); 410 433 struct tevent_req *cli_unlock64_send(TALLOC_CTX *mem_ctx, 411 struct event_context *ev,434 struct tevent_context *ev, 412 435 struct cli_state *cli, 413 436 uint16_t fnum, … … 417 440 NTSTATUS cli_unlock64(struct cli_state *cli, uint16_t fnum, uint64_t offset, uint64_t len); 418 441 struct tevent_req *cli_posix_lock_send(TALLOC_CTX *mem_ctx, 419 struct event_context *ev,442 struct tevent_context *ev, 420 443 struct cli_state *cli, 421 444 uint16_t fnum, … … 429 452 bool wait_lock, enum brl_type lock_type); 430 453 struct tevent_req *cli_posix_unlock_send(TALLOC_CTX *mem_ctx, 431 struct event_context *ev,454 struct tevent_context *ev, 432 455 struct cli_state *cli, 433 456 uint16_t fnum, … … 437 460 NTSTATUS cli_posix_unlock(struct cli_state *cli, uint16_t fnum, uint64_t offset, uint64_t len); 438 461 struct tevent_req *cli_getattrE_send(TALLOC_CTX *mem_ctx, 439 struct event_context *ev,462 struct tevent_context *ev, 440 463 struct cli_state *cli, 441 464 uint16_t fnum); 442 465 NTSTATUS cli_getattrE_recv(struct tevent_req *req, 443 466 uint16_t *attr, 444 SMB_OFF_T*size,467 off_t *size, 445 468 time_t *change_time, 446 469 time_t *access_time, … … 449 472 uint16_t fnum, 450 473 uint16_t *attr, 451 SMB_OFF_T*size,474 off_t *size, 452 475 time_t *change_time, 453 476 time_t *access_time, 454 477 time_t *write_time); 455 478 struct tevent_req *cli_setattrE_send(TALLOC_CTX *mem_ctx, 456 struct event_context *ev,479 struct tevent_context *ev, 457 480 struct cli_state *cli, 458 481 uint16_t fnum, … … 467 490 time_t write_time); 468 491 struct tevent_req *cli_getatr_send(TALLOC_CTX *mem_ctx, 469 struct event_context *ev,492 struct tevent_context *ev, 470 493 struct cli_state *cli, 471 494 const char *fname); 472 495 NTSTATUS cli_getatr_recv(struct tevent_req *req, 473 496 uint16_t *attr, 474 SMB_OFF_T*size,497 off_t *size, 475 498 time_t *write_time); 476 499 NTSTATUS cli_getatr(struct cli_state *cli, 477 500 const char *fname, 478 501 uint16_t *attr, 479 SMB_OFF_T*size,502 off_t *size, 480 503 time_t *write_time); 481 504 struct tevent_req *cli_setatr_send(TALLOC_CTX *mem_ctx, 482 struct event_context *ev,505 struct tevent_context *ev, 483 506 struct cli_state *cli, 484 507 const char *fname, … … 491 514 time_t mtime); 492 515 struct tevent_req *cli_chkpath_send(TALLOC_CTX *mem_ctx, 493 struct event_context *ev,516 struct tevent_context *ev, 494 517 struct cli_state *cli, 495 518 const char *fname); … … 497 520 NTSTATUS cli_chkpath(struct cli_state *cli, const char *path); 498 521 struct tevent_req *cli_dskattr_send(TALLOC_CTX *mem_ctx, 499 struct event_context *ev,522 struct tevent_context *ev, 500 523 struct cli_state *cli); 501 524 NTSTATUS cli_dskattr_recv(struct tevent_req *req, int *bsize, int *total, 502 525 int *avail); 503 526 NTSTATUS cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail); 527 NTSTATUS cli_disk_size(struct cli_state *cli, const char *path, uint64_t *bsize, 528 uint64_t *total, uint64_t *avail); 504 529 struct tevent_req *cli_ctemp_send(TALLOC_CTX *mem_ctx, 505 struct event_context *ev,530 struct tevent_context *ev, 506 531 struct cli_state *cli, 507 532 const char *path); … … 533 558 struct ea_struct **pea_list); 534 559 struct tevent_req *cli_posix_open_send(TALLOC_CTX *mem_ctx, 535 struct event_context *ev,560 struct tevent_context *ev, 536 561 struct cli_state *cli, 537 562 const char *fname, … … 542 567 int flags, mode_t mode, uint16_t *fnum); 543 568 struct tevent_req *cli_posix_mkdir_send(TALLOC_CTX *mem_ctx, 544 struct event_context *ev,569 struct tevent_context *ev, 545 570 struct cli_state *cli, 546 571 const char *fname, … … 550 575 551 576 struct tevent_req *cli_posix_unlink_send(TALLOC_CTX *mem_ctx, 552 struct event_context *ev,577 struct tevent_context *ev, 553 578 struct cli_state *cli, 554 579 const char *fname); … … 557 582 558 583 struct tevent_req *cli_posix_rmdir_send(TALLOC_CTX *mem_ctx, 559 struct event_context *ev,584 struct tevent_context *ev, 560 585 struct cli_state *cli, 561 586 const char *fname); … … 570 595 uint32_t *pnum_changes, 571 596 struct notify_change **pchanges); 597 NTSTATUS cli_notify(struct cli_state *cli, uint16_t fnum, uint32_t buffer_size, 598 uint32_t completion_filter, bool recursive, 599 TALLOC_CTX *mem_ctx, uint32_t *pnum_changes, 600 struct notify_change **pchanges); 601 602 struct tevent_req *cli_nttrans_create_send(TALLOC_CTX *mem_ctx, 603 struct tevent_context *ev, 604 struct cli_state *cli, 605 const char *fname, 606 uint32_t CreatFlags, 607 uint32_t DesiredAccess, 608 uint32_t FileAttributes, 609 uint32_t ShareAccess, 610 uint32_t CreateDisposition, 611 uint32_t CreateOptions, 612 uint8_t SecurityFlags, 613 struct security_descriptor *secdesc, 614 struct ea_struct *eas, 615 int num_eas); 616 NTSTATUS cli_nttrans_create_recv(struct tevent_req *req, 617 uint16_t *fnum, 618 struct smb_create_returns *cr); 619 NTSTATUS cli_nttrans_create(struct cli_state *cli, 620 const char *fname, 621 uint32_t CreatFlags, 622 uint32_t DesiredAccess, 623 uint32_t FileAttributes, 624 uint32_t ShareAccess, 625 uint32_t CreateDisposition, 626 uint32_t CreateOptions, 627 uint8_t SecurityFlags, 628 struct security_descriptor *secdesc, 629 struct ea_struct *eas, 630 int num_eas, 631 uint16_t *pfid, 632 struct smb_create_returns *cr); 572 633 573 634 /* The following definitions come from libsmb/clifsinfo.c */ … … 580 641 uint32_t *pcaplow, 581 642 uint32_t *pcaphigh); 582 NTSTATUS cli_unix_extensions_version(struct cli_state *cli, uint16 *pmajor,583 uint16 *pminor, uint32*pcaplow,584 uint32 *pcaphigh);643 NTSTATUS cli_unix_extensions_version(struct cli_state *cli, uint16_t *pmajor, 644 uint16_t *pminor, uint32_t *pcaplow, 645 uint32_t *pcaphigh); 585 646 struct tevent_req *cli_set_unix_extensions_capabilities_send( 586 647 TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct cli_state *cli, … … 588 649 NTSTATUS cli_set_unix_extensions_capabilities_recv(struct tevent_req *req); 589 650 NTSTATUS cli_set_unix_extensions_capabilities(struct cli_state *cli, 590 uint16 major, uint16minor,591 uint32 caplow, uint32caphigh);651 uint16_t major, uint16_t minor, 652 uint32_t caplow, uint32_t caphigh); 592 653 struct tevent_req *cli_get_fs_attr_info_send(TALLOC_CTX *mem_ctx, 593 654 struct tevent_context *ev, … … 595 656 NTSTATUS cli_get_fs_attr_info_recv(struct tevent_req *req, uint32_t *fs_attr); 596 657 NTSTATUS cli_get_fs_attr_info(struct cli_state *cli, uint32_t *fs_attr); 597 NTSTATUS cli_get_fs_volume_info(struct cli_state *cli, fstring volume_name, 598 uint32 *pserial_number, time_t *pdate); 658 NTSTATUS cli_get_fs_volume_info(struct cli_state *cli, 659 TALLOC_CTX *mem_ctx, char **volume_name, 660 uint32_t *pserial_number, time_t *pdate); 599 661 NTSTATUS cli_get_fs_full_size_info(struct cli_state *cli, 600 662 uint64_t *total_allocation_units, … … 604 666 uint64_t *bytes_per_sector); 605 667 NTSTATUS cli_get_posix_fs_info(struct cli_state *cli, 606 uint32 *optimal_transfer_size,607 uint32 *block_size,668 uint32_t *optimal_transfer_size, 669 uint32_t *block_size, 608 670 uint64_t *total_blocks, 609 671 uint64_t *blocks_available, … … 624 686 /* The following definitions come from libsmb/clilist.c */ 625 687 626 NTSTATUS cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute,688 NTSTATUS cli_list_old(struct cli_state *cli,const char *Mask,uint16_t attribute, 627 689 NTSTATUS (*fn)(const char *, struct file_info *, 628 690 const char *, void *), void *state); … … 640 702 NTSTATUS cli_list_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, 641 703 struct file_info **finfo, size_t *num_finfo); 642 NTSTATUS cli_list(struct cli_state *cli,const char *Mask,uint16 attribute,704 NTSTATUS cli_list(struct cli_state *cli,const char *Mask,uint16_t attribute, 643 705 NTSTATUS (*fn)(const char *, struct file_info *, const char *, 644 706 void *), void *state); … … 657 719 /* The following definitions come from libsmb/clioplock.c */ 658 720 721 struct tevent_req *cli_smb_oplock_break_waiter_send(TALLOC_CTX *mem_ctx, 722 struct tevent_context *ev, 723 struct cli_state *cli); 724 NTSTATUS cli_smb_oplock_break_waiter_recv(struct tevent_req *req, 725 uint16_t *pfnum, 726 uint8_t *plevel); 727 659 728 struct tevent_req *cli_oplock_ack_send(TALLOC_CTX *mem_ctx, 660 729 struct tevent_context *ev, … … 662 731 uint16_t fnum, uint8_t level); 663 732 NTSTATUS cli_oplock_ack_recv(struct tevent_req *req); 664 NTSTATUS cli_oplock_ack(struct cli_state *cli, uint16_t fnum, unsigned char level);665 void cli_oplock_handler(struct cli_state *cli,666 NTSTATUS (*handler)(struct cli_state *, uint16_t, unsigned char));667 733 668 734 /* The following definitions come from libsmb/cliprint.c */ … … 690 756 691 757 struct tevent_req *cli_read_andx_create(TALLOC_CTX *mem_ctx, 692 struct event_context *ev,758 struct tevent_context *ev, 693 759 struct cli_state *cli, uint16_t fnum, 694 760 off_t offset, size_t size, 695 761 struct tevent_req **psmbreq); 696 762 struct tevent_req *cli_read_andx_send(TALLOC_CTX *mem_ctx, 697 struct event_context *ev,763 struct tevent_context *ev, 698 764 struct cli_state *cli, uint16_t fnum, 699 765 off_t offset, size_t size); … … 701 767 uint8_t **rcvbuf); 702 768 struct tevent_req *cli_pull_send(TALLOC_CTX *mem_ctx, 703 struct event_context *ev,769 struct tevent_context *ev, 704 770 struct cli_state *cli, 705 771 uint16_t fnum, off_t start_offset, 706 SMB_OFF_Tsize, size_t window_size,772 off_t size, size_t window_size, 707 773 NTSTATUS (*sink)(char *buf, size_t n, 708 774 void *priv), 709 775 void *priv); 710 NTSTATUS cli_pull_recv(struct tevent_req *req, SMB_OFF_T*received);776 NTSTATUS cli_pull_recv(struct tevent_req *req, off_t *received); 711 777 NTSTATUS cli_pull(struct cli_state *cli, uint16_t fnum, 712 off_t start_offset, SMB_OFF_Tsize, size_t window_size,778 off_t start_offset, off_t size, size_t window_size, 713 779 NTSTATUS (*sink)(char *buf, size_t n, void *priv), 714 void *priv, SMB_OFF_T *received); 715 ssize_t cli_read(struct cli_state *cli, uint16_t fnum, char *buf, 716 off_t offset, size_t size); 780 void *priv, off_t *received); 781 NTSTATUS cli_read(struct cli_state *cli, uint16_t fnum, 782 char *buf, off_t offset, size_t size, 783 size_t *nread); 717 784 NTSTATUS cli_smbwrite(struct cli_state *cli, uint16_t fnum, char *buf, 718 785 off_t offset, size_t size1, size_t *ptotal); 719 786 struct tevent_req *cli_write_andx_create(TALLOC_CTX *mem_ctx, 720 struct event_context *ev,787 struct tevent_context *ev, 721 788 struct cli_state *cli, uint16_t fnum, 722 789 uint16_t mode, const uint8_t *buf, … … 726 793 struct tevent_req **psmbreq); 727 794 struct tevent_req *cli_write_andx_send(TALLOC_CTX *mem_ctx, 728 struct event_context *ev,795 struct tevent_context *ev, 729 796 struct cli_state *cli, uint16_t fnum, 730 797 uint16_t mode, const uint8_t *buf, … … 736 803 size_t *pwritten); 737 804 738 struct tevent_req *cli_push_send(TALLOC_CTX *mem_ctx, struct event_context *ev,805 struct tevent_req *cli_push_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, 739 806 struct cli_state *cli, 740 807 uint16_t fnum, uint16_t mode, … … 749 816 void *priv); 750 817 818 NTSTATUS cli_splice(struct cli_state *srccli, struct cli_state *dstcli, 819 uint16_t src_fnum, uint16_t dst_fnum, 820 off_t size, 821 off_t src_offset, off_t dst_offset, 822 off_t *written, 823 int (*splice_cb)(off_t n, void *priv), void *priv); 824 751 825 /* The following definitions come from libsmb/clisecdesc.c */ 752 826 753 struct security_descriptor *cli_query_secdesc(struct cli_state *cli, uint16_t fnum, 754 TALLOC_CTX *mem_ctx); 827 NTSTATUS cli_query_security_descriptor(struct cli_state *cli, 828 uint16_t fnum, 829 uint32_t sec_info, 830 TALLOC_CTX *mem_ctx, 831 struct security_descriptor **sd); 832 NTSTATUS cli_query_secdesc(struct cli_state *cli, uint16_t fnum, 833 TALLOC_CTX *mem_ctx, struct security_descriptor **sd); 834 NTSTATUS cli_set_security_descriptor(struct cli_state *cli, 835 uint16_t fnum, 836 uint32_t sec_info, 837 const struct security_descriptor *sd); 755 838 NTSTATUS cli_set_secdesc(struct cli_state *cli, uint16_t fnum, 756 struct security_descriptor *sd);839 const struct security_descriptor *sd); 757 840 758 841 /* The following definitions come from libsmb/clistr.c */ 759 842 760 size_t clistr_push_fn(const char *function, 761 unsigned int line, 762 struct cli_state *cli, 763 void *dest, 764 const char *src, 765 int dest_len, 766 int flags); 767 size_t clistr_pull_fn(const char *function, 768 unsigned int line, 769 const char *inbuf, 770 char *dest, 771 const void *src, 772 int dest_len, 773 int src_len, 774 int flags); 775 size_t clistr_pull_talloc_fn(const char *function, 776 unsigned int line, 777 TALLOC_CTX *ctx, 778 const char *base, 779 uint16_t flags2, 780 char **pp_dest, 781 const void *src, 782 int src_len, 783 int flags); 784 size_t clistr_align_out(struct cli_state *cli, const void *p, int flags); 843 size_t clistr_pull_talloc(TALLOC_CTX *ctx, 844 const char *base, 845 uint16_t flags2, 846 char **pp_dest, 847 const void *src, 848 int src_len, 849 int flags); 785 850 786 851 /* The following definitions come from libsmb/clitrans.c */ 787 852 788 853 struct tevent_req *cli_trans_send( 789 TALLOC_CTX *mem_ctx, struct event_context *ev,854 TALLOC_CTX *mem_ctx, struct tevent_context *ev, 790 855 struct cli_state *cli, uint8_t cmd, 791 856 const char *pipe_name, uint16_t fid, uint16_t function, int flags, … … 813 878 uint8_t **rdata, uint32_t min_rdata, uint32_t *num_rdata); 814 879 815 /* The following definitions come from libsmb/ smb_seal.c */816 817 NTSTATUS get_enc_ctx_num(const uint8_t *buf, uint16 *p_enc_ctx_num); 818 bool common_encryption_on(struct smb_trans_enc_state *es); 819 NTSTATUS common_ntlm_decrypt_buffer(struct ntlmssp_state *ntlmssp_state, char *buf);820 NTSTATUS common_ntlm_encrypt_buffer(struct ntlmssp_state *ntlmssp_state, 821 uint16 enc_ctx_num,822 char *buf,823 char **ppbuf_out); 824 NTSTATUS common_encrypt_buffer(struct smb_trans_enc_state *es, char *buffer, char **buf_out); 825 NTSTATUS common_decrypt_buffer(struct smb_trans_enc_state *es, char *buf); 826 void common_free_encryption_state(struct smb_trans_enc_state **pp_es); 827 void common_free_enc_buffer(struct smb_trans_enc_state *es, char *buf); 828 bool cli_encryption_on(struct cli_state *cli); 829 void cli_free_encryption_context(struct cli_state *cli); 830 void cli_free_enc_buffer(struct cli_state *cli, char *buf); 831 NTSTATUS cli_decrypt_message(struct cli_state *cli);832 NTSTATUS cli_ encrypt_message(struct cli_state *cli, char *buf, char **buf_out);833 834 /* The following definitions come from libsmb/clisigning.c */ 835 836 bool cli_simple_set_signing(struct cli_state *cli,837 const DATA_BLOB user_session_key,838 const DATA_BLOB response);839 bool cli_temp_set_signing(struct cli_state *cli);840 void cli_calculate_sign_mac(struct cli_state *cli, char *buf, uint32_t *seqnum); 841 bool cli_check_sign_mac(struct cli_state *cli, const char *buf, uint32_t seqnum); 842 bool client_is_signing_on(struct cli_state *cli);843 bool client_is_signing_allowed(struct cli_state *cli); 844 bool client_is_signing_mandatory(struct cli_state *cli); 845 void cli_set_signing_negotiated(struct cli_state *cli);880 /* The following definitions come from libsmb/reparse_symlink.c */ 881 882 bool symlink_reparse_buffer_marshall( 883 const char *substitute, const char *printname, uint32_t flags, 884 TALLOC_CTX *mem_ctx, uint8_t **pdst, size_t *pdstlen); 885 bool symlink_reparse_buffer_parse( 886 const uint8_t *src, size_t srclen, TALLOC_CTX *mem_ctx, 887 char **psubstitute_name, char **pprint_name, uint32_t *pflags); 888 889 /* The following definitions come from libsmb/clisymlink.c */ 890 891 struct tevent_req *cli_symlink_send(TALLOC_CTX *mem_ctx, 892 struct tevent_context *ev, 893 struct cli_state *cli, 894 const char *oldpath, 895 const char *newpath, 896 uint32_t flags); 897 NTSTATUS cli_symlink_recv(struct tevent_req *req); 898 NTSTATUS cli_symlink(struct cli_state *cli, const char *oldname, 899 const char *newname, uint32_t flags); 900 901 struct tevent_req *cli_readlink_send(TALLOC_CTX *mem_ctx, 902 struct tevent_context *ev, 903 struct cli_state *cli, 904 const char *fname); 905 NTSTATUS cli_readlink_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, 906 char **psubstitute_name, char **pprint_name, 907 uint32_t *pflags); 908 NTSTATUS cli_readlink(struct cli_state *cli, const char *fname, 909 TALLOC_CTX *mem_ctx, char **psubstitute_name, 910 char **pprint_name, uint32_t *pflags); 846 911 847 912 #endif /* _LIBSMB_PROTO_H_ */
Note:
See TracChangeset
for help on using the changeset viewer.