summaryrefslogtreecommitdiffstats
path: root/source/rpc_parse
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-04-10 18:21:16 +0000
committerJeremy Allison <jra@samba.org>1998-04-10 18:21:16 +0000
commit52e3966fbcf7b5fbdbc7cbe9ac0b453ab5bf3217 (patch)
tree851609efdd1d0a81063808cc6bd783f1d3e0dc67 /source/rpc_parse
parent5d6f63a7e665ee19bd4508b2b40d497e9851b248 (diff)
downloadsamba-52e3966fbcf7b5fbdbc7cbe9ac0b453ab5bf3217.tar.gz
samba-52e3966fbcf7b5fbdbc7cbe9ac0b453ab5bf3217.tar.xz
samba-52e3966fbcf7b5fbdbc7cbe9ac0b453ab5bf3217.zip
includes.h: Moved HPUX undefine of SEMMSL to where it actually does something.
ipc.c: Added Luke's debug statement. locking_slow.c: Added FTRUNCATE_NEEDS_ROOT code for broken systems that need it (not sure what these are yet). membuffer.c ntdomain.h proto.h lib/rpc/include/rpc_dce.h lib/rpc/include/rpc_srvsvc.h lib/rpc/parse/parse_prs.c lib/rpc/parse/parse_rpc.c lib/rpc/server/srv_pipe_hnd.c lib/rpc/server/srv_util.c: Re-merge of Luke's NTDOM changes 'cos he's a lazy git with carpel tunnel syndrome :-). Jeremy.
Diffstat (limited to 'source/rpc_parse')
-rw-r--r--source/rpc_parse/parse_prs.c2
-rw-r--r--source/rpc_parse/parse_rpc.c41
2 files changed, 34 insertions, 9 deletions
diff --git a/source/rpc_parse/parse_prs.c b/source/rpc_parse/parse_prs.c
index 799bd1cc949..0baf05597c0 100644
--- a/source/rpc_parse/parse_prs.c
+++ b/source/rpc_parse/parse_prs.c
@@ -86,7 +86,7 @@ void prs_align(prs_struct *ps)
********************************************************************/
BOOL prs_grow(prs_struct *ps)
{
- return mem_grow_data(&(ps->data), ps->io, ps->offset);
+ return mem_grow_data(&(ps->data), ps->io, ps->offset, False);
}
diff --git a/source/rpc_parse/parse_rpc.c b/source/rpc_parse/parse_rpc.c
index b025d3f1c8e..8a5b6c172e3 100644
--- a/source/rpc_parse/parse_rpc.c
+++ b/source/rpc_parse/parse_rpc.c
@@ -384,33 +384,58 @@ void smb_io_rpc_hdr_ba(char *desc, RPC_HDR_BA *rpc, prs_struct *ps, int depth)
}
/*******************************************************************
-creates an RPC_HDR_RR structure.
+creates an RPC_HDR_REQ structure.
********************************************************************/
-void make_rpc_hdr_rr(RPC_HDR_RR *hdr, uint32 data_len, uint8 opnum)
+void make_rpc_hdr_req(RPC_HDR_REQ *hdr, uint32 data_len, uint16 opnum)
{
if (hdr == NULL) return;
hdr->alloc_hint = data_len - 0x18; /* allocation hint */
hdr->context_id = 0; /* presentation context identifier */
- hdr->cancel_count = 0; /* cancel count */
hdr->opnum = opnum; /* opnum */
+}
+
+/*******************************************************************
+reads or writes an RPC_HDR_REQ structure.
+********************************************************************/
+void smb_io_rpc_hdr_req(char *desc, RPC_HDR_REQ *rpc, prs_struct *ps, int depth)
+{
+ if (rpc == NULL) return;
+
+ prs_debug(ps, depth, desc, "smb_io_rpc_hdr_req");
+ depth++;
+
+ prs_uint32("alloc_hint", ps, depth, &(rpc->alloc_hint));
+ prs_uint16("context_id", ps, depth, &(rpc->context_id));
+ prs_uint16("opnum ", ps, depth, &(rpc->opnum));
+}
+
+/*******************************************************************
+creates an RPC_HDR_RESP structure.
+********************************************************************/
+void make_rpc_hdr_resp(RPC_HDR_RESP *hdr, uint32 data_len)
+{
+ if (hdr == NULL) return;
+
+ hdr->alloc_hint = data_len - 0x18; /* allocation hint */
+ hdr->context_id = 0; /* presentation context identifier */
+ hdr->cancel_count = 0; /* cancel count */
hdr->reserved = 0; /* 0 - reserved */
}
/*******************************************************************
-reads or writes an RPC_HDR_RR structure.
+reads or writes an RPC_HDR_RESP structure.
********************************************************************/
-void smb_io_rpc_hdr_rr(char *desc, RPC_HDR_RR *rpc, prs_struct *ps, int depth)
+void smb_io_rpc_hdr_resp(char *desc, RPC_HDR_RESP *rpc, prs_struct *ps, int depth)
{
if (rpc == NULL) return;
- prs_debug(ps, depth, desc, "smb_io_rpc_hdr_rr");
+ prs_debug(ps, depth, desc, "smb_io_rpc_hdr_resp");
depth++;
prs_uint32("alloc_hint", ps, depth, &(rpc->alloc_hint));
- prs_uint8 ("context_id", ps, depth, &(rpc->context_id));
+ prs_uint16("context_id", ps, depth, &(rpc->context_id));
prs_uint8 ("cancel_ct ", ps, depth, &(rpc->cancel_count));
- prs_uint8 ("opnum ", ps, depth, &(rpc->opnum));
prs_uint8 ("reserved ", ps, depth, &(rpc->reserved));
}