mirror of
https://github.com/samba-team/samba.git
synced 2025-03-27 22:50:26 +03:00
s3:dcerpc Add prs_parse_dcerpc_bind
This commit is contained in:
parent
ae526514a9
commit
0d9b63663f
@ -19,7 +19,7 @@ interface dcerpc
|
||||
ndr_syntax_id transfer_syntaxes[num_transfer_syntaxes];
|
||||
} dcerpc_ctx_list;
|
||||
|
||||
typedef struct {
|
||||
typedef [public] struct {
|
||||
uint16 max_xmit_frag;
|
||||
uint16 max_recv_frag;
|
||||
uint32 assoc_group_id;
|
||||
|
@ -5080,6 +5080,9 @@ void init_rpc_hdr(RPC_HDR *hdr, enum dcerpc_pkt_type pkt_type, uint8 flags,
|
||||
bool smb_io_rpc_hdr(const char *desc, RPC_HDR *rpc, prs_struct *ps, int depth);
|
||||
bool smb_io_rpc_context(const char *desc, struct dcerpc_ctx_list *rpc_ctx, prs_struct *ps, int depth);
|
||||
bool smb_io_rpc_hdr_rb(const char *desc, RPC_HDR_RB *rpc, prs_struct *ps, int depth);
|
||||
NTSTATUS dcerpc_pull_dcerpc_bind(TALLOC_CTX *mem_ctx,
|
||||
const DATA_BLOB *blob,
|
||||
struct dcerpc_bind *r);
|
||||
void init_rpc_hdr_ba(RPC_HDR_BA *rpc,
|
||||
uint16 max_tsize, uint16 max_rsize, uint32 assoc_gid,
|
||||
const char *pipe_addr,
|
||||
|
@ -5,6 +5,7 @@
|
||||
* Copyright (C) Luke Kenneth Casson Leighton 1996-1997,
|
||||
* Copyright (C) Paul Ashton 1997.
|
||||
* Copyright (C) Jeremy Allison 1999.
|
||||
* Copyright (C) Simo Sorce 2010
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -21,6 +22,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "librpc/gen_ndr/ndr_dcerpc.h"
|
||||
|
||||
#undef DBGC_CLASS
|
||||
#define DBGC_CLASS DBGC_RPC_PARSE
|
||||
@ -228,6 +230,21 @@ bool smb_io_rpc_context(const char *desc, struct dcerpc_ctx_list *rpc_ctx, prs_s
|
||||
return True;
|
||||
}
|
||||
|
||||
NTSTATUS dcerpc_pull_dcerpc_bind(TALLOC_CTX *mem_ctx,
|
||||
const DATA_BLOB *blob,
|
||||
struct dcerpc_bind *r)
|
||||
{
|
||||
enum ndr_err_code ndr_err;
|
||||
|
||||
ndr_err = ndr_pull_struct_blob(blob, mem_ctx, r,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_dcerpc_bind);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
return ndr_map_error2ntstatus(ndr_err);
|
||||
}
|
||||
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
Reads or writes an RPC_HDR_RB structure.
|
||||
********************************************************************/
|
||||
|
Loading…
x
Reference in New Issue
Block a user