added frag field to make_rpc_hdr() function
authorLuke Leighton <lkcl@samba.org>
Wed, 29 Oct 1997 01:05:46 +0000 (01:05 +0000)
committerLuke Leighton <lkcl@samba.org>
Wed, 29 Oct 1997 01:05:46 +0000 (01:05 +0000)
(This used to be commit 6b0e51929495582bc48a4d5fba24aa7c1f7caaf6)

source3/client/ntclient.c
source3/include/proto.h
source3/smbd/ipc.c
source3/smbparse.c

index d2e8973ed49fab3db752d773969f436cafcd1371..71f38fcf598e82cf0c22d6ec50474b18753effbf 100644 (file)
@@ -140,7 +140,7 @@ static BOOL do_rpc_bind(uint16 fnum)
        data_len = PTR_DIFF(p, data);
 
        /* create the request RPC_HDR */
        data_len = PTR_DIFF(p, data);
 
        /* create the request RPC_HDR */
-       make_rpc_hdr(&hdr, RPC_BIND, call_id, PTR_DIFF(p, data + 0x10));
+       make_rpc_hdr(&hdr, RPC_BIND, 0x0, call_id, PTR_DIFF(p, data + 0x10));
 
        /* stream the header into data */
        p = smb_io_rpc_hdr(False, &hdr, data, data, 4, 0);
 
        /* stream the header into data */
        p = smb_io_rpc_hdr(False, &hdr, data, data, 4, 0);
index fe35c3592eb0071c728b7a2772b5abd07db086e7..10b0f0b796fe6fe2ec925d366ad5aada77a0ae76 100644 (file)
@@ -945,7 +945,7 @@ void make_sam_info(DOM_SAM_INFO *sam,
                                DOM_ID_INFO_1 *id1);
 char* smb_io_sam_info(BOOL io, DOM_SAM_INFO *sam, char *q, char *base, int align, int depth);
 char* smb_io_gid(BOOL io, DOM_GID *gid, char *q, char *base, int align, int depth);
                                DOM_ID_INFO_1 *id1);
 char* smb_io_sam_info(BOOL io, DOM_SAM_INFO *sam, char *q, char *base, int align, int depth);
 char* smb_io_gid(BOOL io, DOM_GID *gid, char *q, char *base, int align, int depth);
-void make_rpc_hdr(RPC_HDR *hdr, enum RPC_PKT_TYPE pkt_type,
+void make_rpc_hdr(RPC_HDR *hdr, enum RPC_PKT_TYPE pkt_type, uint8 frag,
                                uint32 call_id, int data_len);
 char* smb_io_rpc_hdr(BOOL io, RPC_HDR *rpc, char *q, char *base, int align, int depth);
 void make_rpc_iface(RPC_IFACE *ifc, char data[16], uint32 version);
                                uint32 call_id, int data_len);
 char* smb_io_rpc_hdr(BOOL io, RPC_HDR *rpc, char *q, char *base, int align, int depth);
 void make_rpc_iface(RPC_IFACE *ifc, char data[16], uint32 version);
index b7939f2461c6daab94d05cb63660265240c0d72a..aa1d2d5c4f9656cc86b42caf4019d030b96e9194 100644 (file)
@@ -2966,7 +2966,7 @@ static int api_fd_reply(int cnum,uint16 vuid,char *outbuf,
 
                rdata_len = PTR_DIFF(p, rdata);
 
 
                rdata_len = PTR_DIFF(p, rdata);
 
-        make_rpc_hdr(&hdr, RPC_BINDACK, hdr.call_id, rdata_len);
+        make_rpc_hdr(&hdr, RPC_BINDACK, 0x0, hdr.call_id, rdata_len);
 
         p = smb_io_rpc_hdr(False, &hdr, rdata, rdata, 4, 0);
         
 
         p = smb_io_rpc_hdr(False, &hdr, rdata, rdata, 4, 0);
         
index 699e00f82b91476fa9a7ac7c90c298d5f49ea763..ed6ab248cb4918f135fa386eee5939a8325c1032 100644 (file)
@@ -794,7 +794,7 @@ char* smb_io_gid(BOOL io, DOM_GID *gid, char *q, char *base, int align, int dept
 /*******************************************************************
 creates an RPC_HDR structure.
 ********************************************************************/
 /*******************************************************************
 creates an RPC_HDR structure.
 ********************************************************************/
-void make_rpc_hdr(RPC_HDR *hdr, enum RPC_PKT_TYPE pkt_type,
+void make_rpc_hdr(RPC_HDR *hdr, enum RPC_PKT_TYPE pkt_type, uint8 frag,
                                uint32 call_id, int data_len)
 {
        if (hdr == NULL) return;
                                uint32 call_id, int data_len)
 {
        if (hdr == NULL) return;
@@ -802,7 +802,7 @@ void make_rpc_hdr(RPC_HDR *hdr, enum RPC_PKT_TYPE pkt_type,
        hdr->major        = 5;               /* RPC version 5 */
        hdr->minor        = 0;               /* minor version 0 */
        hdr->pkt_type     = pkt_type;        /* RPC packet type */
        hdr->major        = 5;               /* RPC version 5 */
        hdr->minor        = 0;               /* minor version 0 */
        hdr->pkt_type     = pkt_type;        /* RPC packet type */
-       hdr->frag         = 3;               /* first frag + last frag */
+       hdr->frag         = frag;            /* first frag + last frag */
        hdr->pack_type    = 0x10;            /* packed data representation */
        hdr->frag_len     = data_len;        /* fragment length, fill in later */
        hdr->auth_len     = 0;               /* authentication length */
        hdr->pack_type    = 0x10;            /* packed data representation */
        hdr->frag_len     = data_len;        /* fragment length, fill in later */
        hdr->auth_len     = 0;               /* authentication length */
@@ -1104,7 +1104,8 @@ void make_rpc_hdr_rr(RPC_HDR_RR *hdr, enum RPC_PKT_TYPE pkt_type,
 {
        if (hdr == NULL) return;
 
 {
        if (hdr == NULL) return;
 
-       make_rpc_hdr(&(hdr->hdr), pkt_type, call_id, data_len);
+       /* frag is FIRST_FRAG | LAST_FRAG.  lkclXXXX must define these */
+       make_rpc_hdr(&(hdr->hdr), pkt_type, 0x03, call_id, data_len);
 
        hdr->alloc_hint   = data_len - 0x18; /* allocation hint */
        hdr->context_id   = 0;               /* presentation context identifier */
 
        hdr->alloc_hint   = data_len - 0x18; /* allocation hint */
        hdr->context_id   = 0;               /* presentation context identifier */