Print this page
1575 untangle libmlrpc ... (smbsrv)


  22  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  *
  25  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
  26  */
  27 
  28 /*
  29  * Legacy encode/decode routines for door clients and servers.
  30  */
  31 
  32 #if !defined(_KERNEL) && !defined(_FAKE_KERNEL)
  33 #include <errno.h>
  34 #include <string.h>
  35 #include <strings.h>
  36 #else
  37 #include <sys/types.h>
  38 #include <sys/sunddi.h>
  39 #include <sys/errno.h>
  40 #endif
  41 
  42 #include <smbsrv/wintypes.h>
  43 #include <smbsrv/smb_share.h>
  44 #include <smbsrv/smb_door.h>
  45 #include <smbsrv/alloc.h>
  46 #include <smbsrv/smbinfo.h>
  47 
  48 smb_dr_ctx_t *
  49 smb_dr_decode_start(char *ptr, int size)
  50 {
  51         smb_dr_ctx_t *ctx = MEM_MALLOC("CommonDoor", sizeof (smb_dr_ctx_t));
  52         if (ctx) {
  53                 ctx->start_ptr = ctx->ptr = ptr;
  54                 ctx->end_ptr = ptr + size;
  55                 ctx->status = 0;
  56         }
  57         return (ctx);
  58 }
  59 
  60 int
  61 smb_dr_decode_finish(smb_dr_ctx_t *ctx)
  62 {




  22  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  *
  25  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
  26  */
  27 
  28 /*
  29  * Legacy encode/decode routines for door clients and servers.
  30  */
  31 
  32 #if !defined(_KERNEL) && !defined(_FAKE_KERNEL)
  33 #include <errno.h>
  34 #include <string.h>
  35 #include <strings.h>
  36 #else
  37 #include <sys/types.h>
  38 #include <sys/sunddi.h>
  39 #include <sys/errno.h>
  40 #endif
  41 
  42 #include <smb/wintypes.h>
  43 #include <smbsrv/smb_share.h>
  44 #include <smbsrv/smb_door.h>
  45 #include <smbsrv/alloc.h>
  46 #include <smbsrv/smbinfo.h>
  47 
  48 smb_dr_ctx_t *
  49 smb_dr_decode_start(char *ptr, int size)
  50 {
  51         smb_dr_ctx_t *ctx = MEM_MALLOC("CommonDoor", sizeof (smb_dr_ctx_t));
  52         if (ctx) {
  53                 ctx->start_ptr = ctx->ptr = ptr;
  54                 ctx->end_ptr = ptr + size;
  55                 ctx->status = 0;
  56         }
  57         return (ctx);
  58 }
  59 
  60 int
  61 smb_dr_decode_finish(smb_dr_ctx_t *ctx)
  62 {