Changeset 988 for vendor/current/librpc/ndr/libndr.h
- Timestamp:
- Nov 24, 2016, 1:14:11 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/librpc/ndr/libndr.h
r919 r988 27 27 28 28 #include <talloc.h> 29 #include <sys/time.h> 30 #if _SAMBA_BUILD_ == 4 31 #include "../lib/util/util.h" /* for discard_const */ 29 #include "../lib/util/memory.h" /* for discard_const */ 30 #include "../lib/util/byteorder.h" 31 #include "../lib/util/data_blob.h" 32 #include "../lib/util/time.h" 32 33 #include "../lib/util/charset/charset.h" 33 #endif34 34 35 35 /* … … 123 123 #define LIBNDR_FLAG_STR_CHARLEN (1<<11) 124 124 #define LIBNDR_FLAG_STR_UTF8 (1<<12) 125 #define LIBNDR_FLAG_STR_RAW8 (1<<13) 125 126 #define LIBNDR_STRING_FLAGS (0x7FFC) 126 127 … … 386 387 #include "librpc/gen_ndr/misc.h" 387 388 388 extern const struct ndr_syntax_id ndr_transfer_syntax ;389 extern const struct ndr_syntax_id ndr 64_transfer_syntax;390 extern const struct ndr_syntax_id n ull_ndr_syntax_id;389 extern const struct ndr_syntax_id ndr_transfer_syntax_ndr; 390 extern const struct ndr_syntax_id ndr_transfer_syntax_ndr64; 391 extern const struct ndr_syntax_id ndr_syntax_id_null; 391 392 392 393 struct ndr_interface_call_pipe { … … 434 435 }; 435 436 437 struct sockaddr_storage; 438 436 439 /********************************************************************* 437 440 Map an NT error code from a NDR error code. 438 441 *********************************************************************/ 439 442 NTSTATUS ndr_map_error2ntstatus(enum ndr_err_code ndr_err); 443 int ndr_map_error2errno(enum ndr_err_code ndr_err); 440 444 const char *ndr_map_error2string(enum ndr_err_code ndr_err); 441 445 #define ndr_errstr ndr_map_error2string … … 455 459 size_t ndr_size_dom_sid0(const struct dom_sid *sid, int flags); 456 460 void ndr_print_GUID(struct ndr_print *ndr, const char *name, const struct GUID *guid); 461 void ndr_print_sockaddr_storage(struct ndr_print *ndr, const char *name, const struct sockaddr_storage *ss); 457 462 bool ndr_syntax_id_equal(const struct ndr_syntax_id *i1, const struct ndr_syntax_id *i2); 458 463 char *ndr_syntax_id_to_string(TALLOC_CTX *mem_ctx, const struct ndr_syntax_id *id); … … 554 559 void ndr_print_ ## name(struct ndr_print *ndr, const char *var_name, type v); 555 560 561 #define NDR_SCALAR_PTR_PROTO(name, type) \ 562 enum ndr_err_code ndr_push_ ## name(struct ndr_push *ndr, int ndr_flags, const type *v); \ 563 enum ndr_err_code ndr_pull_ ## name(struct ndr_pull *ndr, int ndr_flags, type **v); \ 564 void ndr_print_ ## name(struct ndr_print *ndr, const char *var_name, const type *v); 565 556 566 #define NDR_BUFFER_PROTO(name, type) \ 557 567 enum ndr_err_code ndr_push_ ## name(struct ndr_push *ndr, int ndr_flags, const type *v); \ … … 578 588 NDR_SCALAR_PROTO(NTSTATUS, NTSTATUS) 579 589 NDR_SCALAR_PROTO(WERROR, WERROR) 590 NDR_SCALAR_PROTO(HRESULT, HRESULT) 580 591 NDR_SCALAR_PROTO(NTTIME, NTTIME) 581 592 NDR_SCALAR_PROTO(NTTIME_1sec, NTTIME) … … 590 601 enum ndr_err_code ndr_push_policy_handle(struct ndr_push *ndr, int ndr_flags, const struct policy_handle *r); 591 602 void ndr_print_policy_handle(struct ndr_print *ndr, const char *name, const struct policy_handle *r); 592 bool policy_handle_empty(const struct policy_handle *h);593 bool is_valid_policy_hnd(const struct policy_handle *hnd); 594 bool policy_handle_equal(const struct policy_handle *hnd1,603 bool ndr_policy_handle_empty(const struct policy_handle *h); 604 #define is_valid_policy_hnd(hnd) (!ndr_policy_handle_empty(hnd)) 605 bool ndr_policy_handle_equal(const struct policy_handle *hnd1, 595 606 const struct policy_handle *hnd2); 596 607 … … 643 654 NTSTATUS GUID_from_data_blob(const DATA_BLOB *s, struct GUID *guid); 644 655 NTSTATUS GUID_from_string(const char *s, struct GUID *guid); 645 NTSTATUS NS_GUID_from_string(const char *s, struct GUID *guid);646 656 struct GUID GUID_zero(void); 647 657 bool GUID_all_zero(const struct GUID *u); … … 650 660 char *GUID_string2(TALLOC_CTX *mem_ctx, const struct GUID *guid); 651 661 char *GUID_hexstring(TALLOC_CTX *mem_ctx, const struct GUID *guid); 652 char *NS_GUID_string(TALLOC_CTX *mem_ctx, const struct GUID *guid);653 662 struct GUID GUID_random(void); 663 664 /* Format is "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x" */ 665 /* 32 chars + 4 ' ' + \0 + 2 for adding {} */ 666 struct GUID_txt_buf { char buf[39]; }; 667 _PUBLIC_ char* GUID_buf_string(const struct GUID *guid, 668 struct GUID_txt_buf *dst); 654 669 655 670 _PUBLIC_ enum ndr_err_code ndr_pull_enum_uint8(struct ndr_pull *ndr, int ndr_flags, uint8_t *v); … … 664 679 _PUBLIC_ void ndr_print_bool(struct ndr_print *ndr, const char *name, const bool b); 665 680 681 _PUBLIC_ enum ndr_err_code ndr_push_timespec(struct ndr_push *ndr, 682 int ndr_flags, 683 const struct timespec *t); 684 _PUBLIC_ enum ndr_err_code ndr_pull_timespec(struct ndr_pull *ndr, 685 int ndr_flags, 686 struct timespec *t); 687 _PUBLIC_ void ndr_print_timespec(struct ndr_print *ndr, const char *name, 688 const struct timespec *t); 689 690 _PUBLIC_ enum ndr_err_code ndr_push_timeval(struct ndr_push *ndr, 691 int ndr_flags, 692 const struct timeval *t); 693 _PUBLIC_ enum ndr_err_code ndr_pull_timeval(struct ndr_pull *ndr, 694 int ndr_flags, 695 struct timeval *t); 696 _PUBLIC_ void ndr_print_timeval(struct ndr_print *ndr, const char *name, 697 const struct timeval *t); 698 699 700 666 701 #endif /* __LIBNDR_H__ */
Note:
See TracChangeset
for help on using the changeset viewer.