Print this page
    
1575 untangle libmlrpc from SMB server
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
    
      
        | Split | 
	Close | 
      
      | Expand all | 
      | Collapse all | 
    
    
          --- old/usr/src/uts/common/smbsrv/ndl/eventlog.ndl
          +++ new/usr/src/uts/common/smbsrv/ndl/eventlog.ndl
   1    1  /*
   2    2   * CDDL HEADER START
   3    3   *
   4    4   * The contents of this file are subject to the terms of the
   5    5   * Common Development and Distribution License (the "License").
   6    6   * You may not use this file except in compliance with the License.
   7    7   *
   8    8   * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9    9   * or http://www.opensolaris.org/os/licensing.
  10   10   * See the License for the specific language governing permissions
  11   11   * and limitations under the License.
  12   12   *
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  
    | 
      ↓ open down ↓ | 
    13 lines elided | 
    
      ↑ open up ↑ | 
  
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
       24 + *
       25 + * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
  24   26   */
  25   27  
  26   28  #ifndef _MLSVC_LOGR_NDL_
  27   29  #define _MLSVC_LOGR_NDL_
  28   30  
  29   31  /*
  30   32   ***********************************************************************
  31   33   *
  32   34   * Event log RPC (EVENTLOG) interface definition.
  33   35   *
  34   36   ***********************************************************************
  35   37   */
  36   38  
  37      -#include "ndrtypes.ndl"
       39 +#include <libmlrpc/ndrtypes.ndl>
  38   40  
  39   41  #define LOGR_OPNUM_EventLogClose                0x02
  40   42  #define LOGR_OPNUM_EventLogQueryCount           0x04
  41   43  #define LOGR_OPNUM_EventLogGetOldestRec         0x05
  42   44  #define LOGR_OPNUM_EventLogOpen                 0x07
  43   45  #define LOGR_OPNUM_EventLogRead                 0x0A
  44   46  
  45   47  #define LOGR_MAXENTRYLEN                        800
  46   48  
  47   49  
  48   50  CONTEXT_HANDLE(logr_handle) logr_handle_t;
  49   51  
  50   52  struct logr_string {
  51   53          WORD    length;
  52   54          WORD    allosize;
  53   55          LPTSTR  str;
  54   56  };
  55   57  typedef struct logr_string logr_string_t;
  56   58  
  57   59  struct logr_record {
  58   60          DWORD  Length1;
  59   61          DWORD  Reserved;
  60   62          DWORD  RecordNumber;
  61   63          DWORD  TimeGenerated;
  62   64          DWORD  TimeWritten;
  63   65          DWORD  EventID;
  64   66          WORD   EventType;
  65   67          WORD   NumStrings;
  66   68          WORD   EventCategory;
  67   69          WORD   ReservedFlags;
  68   70          DWORD  ClosingRecordNumber;
  69   71          DWORD  StringOffset;
  70   72          DWORD  UserSidLength;
  71   73          DWORD  UserSidOffset;
  72   74          DWORD  DataLength;
  73   75          DWORD  DataOffset;
  74   76          BYTE   info[LOGR_MAXENTRYLEN];
  75   77          DWORD  Length2;
  76   78  };
  77   79  typedef struct logr_record logr_record_t;
  78   80  
  79   81  /*
  80   82   ***********************************************************************
  81   83   * LOGR_OPNUM_EventLogClose
  82   84   ***********************************************************************
  83   85   */
  84   86  OPERATION(LOGR_OPNUM_EventLogClose)
  85   87  struct logr_EventLogClose {
  86   88          IN      logr_handle_t handle;
  87   89          OUT     logr_handle_t result_handle;
  88   90          OUT     DWORD status;
  89   91  };
  90   92  
  91   93  /*
  92   94   ***********************************************************************
  93   95   * LOGR_OPNUM_EventLogQueryCount
  94   96   ***********************************************************************
  95   97   */
  96   98  OPERATION(LOGR_OPNUM_EventLogQueryCount)
  97   99  struct logr_EventLogQueryCount {
  98  100          IN      logr_handle_t handle;
  99  101          OUT     DWORD rec_num;
 100  102          OUT     DWORD status;
 101  103  };
 102  104  
 103  105  /*
 104  106   ***********************************************************************
 105  107   * LOGR_OPNUM_EventLogGetOldestRec
 106  108   ***********************************************************************
 107  109   */
 108  110  OPERATION(LOGR_OPNUM_EventLogGetOldestRec)
 109  111  struct logr_EventLogGetOldestRec {
 110  112          IN      logr_handle_t handle;
 111  113          OUT     DWORD oldest_rec;
 112  114          OUT     DWORD status;
 113  115  };
 114  116  
 115  117  /*
 116  118   ***********************************************************************
 117  119   * LOGR_OPNUM_EventLogOpen
 118  120   ***********************************************************************
 119  121   */
 120  122  OPERATION(LOGR_OPNUM_EventLogOpen)
 121  123  struct logr_EventLogOpen {
 122  124          IN      DWORD *server_name;
 123  125          IN      logr_string_t log_name;
 124  126          IN      DWORD reg_module_name;
 125  127          IN      DWORD major_version;
 126  128          IN      DWORD minor_version;
 127  129          OUT     logr_handle_t handle;
 128  130          OUT     DWORD status;
 129  131  };
 130  132  
 131  133  OPERATION(LOGR_OPNUM_EventLogRead)
 132  134  struct logr_EventLogRead {
 133  135          IN      logr_handle_t handle;
 134  136          IN      DWORD read_flags;
 135  137          IN      DWORD rec_offset;
 136  138          IN      DWORD nbytes_to_read;
 137  139      SIZE_IS(nbytes_to_read)
 138  140          OUT REFERENCE   LPBYTE buf;
 139  141          OUT     DWORD sent_size;
 140  142          OUT     DWORD min_bytes_needed;
 141  143          OUT     DWORD status;
 142  144  };
 143  145  
 144  146  /*
 145  147   ***********************************************************************
 146  148   * The EVENTLOG interface definition.
 147  149   ***********************************************************************
 148  150   */
 149  151  INTERFACE(0)
 150  152  union logr_interface {
 151  153          CASE(LOGR_OPNUM_EventLogClose)
 152  154                  struct logr_EventLogClose               EventLogClose;
 153  155          CASE(LOGR_OPNUM_EventLogQueryCount)
 154  156                  struct logr_EventLogQueryCount          EventLogQueryCount;
 155  157          CASE(LOGR_OPNUM_EventLogGetOldestRec)
 156  158                  struct logr_EventLogGetOldestRec        EventLogGetOldestRec;
 157  159          CASE(LOGR_OPNUM_EventLogOpen)
 158  160                  struct logr_EventLogOpen                EventLogOpen;
 159  161          CASE(LOGR_OPNUM_EventLogRead)
 160  162                  struct logr_EventLogRead                EventLogRead;
 161  163  };
 162  164  typedef union logr_interface    logr_interface_t;
 163  165  EXTERNTYPEINFO(logr_interface)
 164  166  
 165  167  #endif /* _MLSVC_LOGR_NDL_ */
  
    | 
      ↓ open down ↓ | 
    118 lines elided | 
    
      ↑ open up ↑ | 
  
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX