LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - py_messaging.c (source / functions) Hit Total Coverage
Test: coverage report for abartlet/fix-coverage dd10fb34 Lines: 113 489 23.1 %
Date: 2021-09-23 10:06:22 Functions: 1 35 2.9 %

          Line data    Source code
       1             : 
       2             : /* Python wrapper functions auto-generated by pidl */
       3             : #define PY_SSIZE_T_CLEAN 1 /* We use Py_ssize_t for PyArg_ParseTupleAndKeywords */
       4             : #include <Python.h>
       5             : #include "python/py3compat.h"
       6             : #include "includes.h"
       7             : #include "python/modules.h"
       8             : #include <pytalloc.h>
       9             : #include "librpc/rpc/pyrpc.h"
      10             : #include "librpc/rpc/pyrpc_util.h"
      11             : #include "bin/default/librpc/gen_ndr/ndr_messaging.h"
      12             : 
      13             : 
      14             : /*
      15             :  * Suppress compiler warnings if the generated code does not call these
      16             :  * functions
      17             :  */
      18             : #ifndef _MAYBE_UNUSED_
      19             : #ifdef __has_attribute
      20             : #if __has_attribute(unused)
      21             : #define _MAYBE_UNUSED_ __attribute__ ((unused))
      22             : #else
      23             : #define _MAYBE_UNUSED_
      24             : #endif
      25             : #endif
      26             : #endif
      27             : /*
      28             :  * These functions are here to ensure they can be optimized out by
      29             :  * the compiler based on the constant input values
      30             :  */
      31             : 
      32           0 : static inline unsigned long long ndr_sizeof2uintmax(size_t var_size)
      33             : {
      34           0 :         switch (var_size) {
      35           0 :         case 8:
      36           0 :                 return UINT64_MAX;
      37           0 :         case 4:
      38           0 :                 return UINT32_MAX;
      39           0 :         case 2:
      40           0 :                 return UINT16_MAX;
      41           0 :         case 1:
      42           0 :                 return UINT8_MAX;
      43             :         }
      44             : 
      45           0 :         return 0;
      46             : }
      47             : 
      48           0 : static inline _MAYBE_UNUSED_ long long ndr_sizeof2intmax(size_t var_size)
      49             : {
      50           0 :         switch (var_size) {
      51           0 :         case 8:
      52           0 :                 return INT64_MAX;
      53           0 :         case 4:
      54           0 :                 return INT32_MAX;
      55           0 :         case 2:
      56           0 :                 return INT16_MAX;
      57           0 :         case 1:
      58           0 :                 return INT8_MAX;
      59             :         }
      60             : 
      61           0 :         return 0;
      62             : }
      63             : 
      64             : #include "librpc/gen_ndr/server_id.h"
      65             : static PyTypeObject messaging_rec_Type;
      66             : static PyTypeObject messaging_reclog_Type;
      67             : 
      68             : static PyTypeObject *server_id_Type;
      69             : static PyTypeObject *BaseObject_Type;
      70             : 
      71           0 : static PyObject *py_messaging_rec_get_prev(PyObject *obj, void *closure)
      72             : {
      73           0 :         struct messaging_rec *object = (struct messaging_rec *)pytalloc_get_ptr(obj);
      74             :         PyObject *py_prev;
      75           0 :         if (object->prev == NULL) {
      76           0 :                 Py_RETURN_NONE;
      77             :         }
      78           0 :         if (object->prev == NULL) {
      79           0 :                 py_prev = Py_None;
      80           0 :                 Py_INCREF(py_prev);
      81             :         } else {
      82           0 :                 py_prev = pytalloc_reference_ex(&messaging_rec_Type, object->prev, object->prev);
      83             :         }
      84           0 :         return py_prev;
      85             : }
      86             : 
      87           0 : static int py_messaging_rec_set_prev(PyObject *py_obj, PyObject *value, void *closure)
      88             : {
      89           0 :         struct messaging_rec *object = (struct messaging_rec *)pytalloc_get_ptr(py_obj);
      90           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->prev));
      91           0 :         if (value == NULL) {
      92           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->prev");
      93           0 :                 return -1;
      94             :         }
      95           0 :         if (value == Py_None) {
      96           0 :                 object->prev = NULL;
      97             :         } else {
      98           0 :                 object->prev = NULL;
      99           0 :                 PY_CHECK_TYPE(&messaging_rec_Type, value, return -1;);
     100           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
     101           0 :                         PyErr_NoMemory();
     102           0 :                         return -1;
     103             :                 }
     104           0 :                 object->prev = (struct messaging_rec *)pytalloc_get_ptr(value);
     105             :         }
     106           0 :         return 0;
     107             : }
     108             : 
     109           0 : static PyObject *py_messaging_rec_get_next(PyObject *obj, void *closure)
     110             : {
     111           0 :         struct messaging_rec *object = (struct messaging_rec *)pytalloc_get_ptr(obj);
     112             :         PyObject *py_next;
     113           0 :         if (object->next == NULL) {
     114           0 :                 Py_RETURN_NONE;
     115             :         }
     116           0 :         if (object->next == NULL) {
     117           0 :                 py_next = Py_None;
     118           0 :                 Py_INCREF(py_next);
     119             :         } else {
     120           0 :                 py_next = pytalloc_reference_ex(&messaging_rec_Type, object->next, object->next);
     121             :         }
     122           0 :         return py_next;
     123             : }
     124             : 
     125           0 : static int py_messaging_rec_set_next(PyObject *py_obj, PyObject *value, void *closure)
     126             : {
     127           0 :         struct messaging_rec *object = (struct messaging_rec *)pytalloc_get_ptr(py_obj);
     128           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->next));
     129           0 :         if (value == NULL) {
     130           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->next");
     131           0 :                 return -1;
     132             :         }
     133           0 :         if (value == Py_None) {
     134           0 :                 object->next = NULL;
     135             :         } else {
     136           0 :                 object->next = NULL;
     137           0 :                 PY_CHECK_TYPE(&messaging_rec_Type, value, return -1;);
     138           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
     139           0 :                         PyErr_NoMemory();
     140           0 :                         return -1;
     141             :                 }
     142           0 :                 object->next = (struct messaging_rec *)pytalloc_get_ptr(value);
     143             :         }
     144           0 :         return 0;
     145             : }
     146             : 
     147           0 : static PyObject *py_messaging_rec_get_msg_version(PyObject *obj, void *closure)
     148             : {
     149           0 :         struct messaging_rec *object = (struct messaging_rec *)pytalloc_get_ptr(obj);
     150             :         PyObject *py_msg_version;
     151           0 :         py_msg_version = PyLong_FromUnsignedLongLong((uint32_t)object->msg_version);
     152           0 :         return py_msg_version;
     153             : }
     154             : 
     155           0 : static int py_messaging_rec_set_msg_version(PyObject *py_obj, PyObject *value, void *closure)
     156             : {
     157           0 :         struct messaging_rec *object = (struct messaging_rec *)pytalloc_get_ptr(py_obj);
     158           0 :         if (value == NULL) {
     159           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->msg_version");
     160           0 :                 return -1;
     161             :         }
     162             :         {
     163           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->msg_version));
     164           0 :                 if (PyLong_Check(value)) {
     165             :                         unsigned long long test_var;
     166           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     167           0 :                         if (PyErr_Occurred() != NULL) {
     168           0 :                                 return -1;
     169             :                         }
     170           0 :                         if (test_var > uint_max) {
     171           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
     172             :                                   PyLong_Type.tp_name, uint_max, test_var);
     173           0 :                                 return -1;
     174             :                         }
     175           0 :                         object->msg_version = test_var;
     176             :                 } else {
     177           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
     178             :                           PyLong_Type.tp_name);
     179           0 :                         return -1;
     180             :                 }
     181             :         }
     182           0 :         return 0;
     183             : }
     184             : 
     185           0 : static PyObject *py_messaging_rec_get_msg_type(PyObject *obj, void *closure)
     186             : {
     187           0 :         struct messaging_rec *object = (struct messaging_rec *)pytalloc_get_ptr(obj);
     188             :         PyObject *py_msg_type;
     189           0 :         py_msg_type = PyLong_FromUnsignedLongLong((uint32_t)object->msg_type);
     190           0 :         return py_msg_type;
     191             : }
     192             : 
     193           0 : static int py_messaging_rec_set_msg_type(PyObject *py_obj, PyObject *value, void *closure)
     194             : {
     195           0 :         struct messaging_rec *object = (struct messaging_rec *)pytalloc_get_ptr(py_obj);
     196           0 :         if (value == NULL) {
     197           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->msg_type");
     198           0 :                 return -1;
     199             :         }
     200             :         {
     201           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->msg_type));
     202           0 :                 if (PyLong_Check(value)) {
     203             :                         unsigned long long test_var;
     204           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     205           0 :                         if (PyErr_Occurred() != NULL) {
     206           0 :                                 return -1;
     207             :                         }
     208           0 :                         if (test_var > uint_max) {
     209           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
     210             :                                   PyLong_Type.tp_name, uint_max, test_var);
     211           0 :                                 return -1;
     212             :                         }
     213           0 :                         object->msg_type = test_var;
     214             :                 } else {
     215           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
     216             :                           PyLong_Type.tp_name);
     217           0 :                         return -1;
     218             :                 }
     219             :         }
     220           0 :         return 0;
     221             : }
     222             : 
     223           0 : static PyObject *py_messaging_rec_get_dest(PyObject *obj, void *closure)
     224             : {
     225           0 :         struct messaging_rec *object = (struct messaging_rec *)pytalloc_get_ptr(obj);
     226             :         PyObject *py_dest;
     227           0 :         py_dest = pytalloc_reference_ex(server_id_Type, pytalloc_get_mem_ctx(obj), &object->dest);
     228           0 :         return py_dest;
     229             : }
     230             : 
     231           0 : static int py_messaging_rec_set_dest(PyObject *py_obj, PyObject *value, void *closure)
     232             : {
     233           0 :         struct messaging_rec *object = (struct messaging_rec *)pytalloc_get_ptr(py_obj);
     234           0 :         if (value == NULL) {
     235           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dest");
     236           0 :                 return -1;
     237             :         }
     238           0 :         PY_CHECK_TYPE(server_id_Type, value, return -1;);
     239           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
     240           0 :                 PyErr_NoMemory();
     241           0 :                 return -1;
     242             :         }
     243           0 :         object->dest = *(struct server_id *)pytalloc_get_ptr(value);
     244           0 :         return 0;
     245             : }
     246             : 
     247           0 : static PyObject *py_messaging_rec_get_src(PyObject *obj, void *closure)
     248             : {
     249           0 :         struct messaging_rec *object = (struct messaging_rec *)pytalloc_get_ptr(obj);
     250             :         PyObject *py_src;
     251           0 :         py_src = pytalloc_reference_ex(server_id_Type, pytalloc_get_mem_ctx(obj), &object->src);
     252           0 :         return py_src;
     253             : }
     254             : 
     255           0 : static int py_messaging_rec_set_src(PyObject *py_obj, PyObject *value, void *closure)
     256             : {
     257           0 :         struct messaging_rec *object = (struct messaging_rec *)pytalloc_get_ptr(py_obj);
     258           0 :         if (value == NULL) {
     259           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->src");
     260           0 :                 return -1;
     261             :         }
     262           0 :         PY_CHECK_TYPE(server_id_Type, value, return -1;);
     263           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
     264           0 :                 PyErr_NoMemory();
     265           0 :                 return -1;
     266             :         }
     267           0 :         object->src = *(struct server_id *)pytalloc_get_ptr(value);
     268           0 :         return 0;
     269             : }
     270             : 
     271           0 : static PyObject *py_messaging_rec_get_buf(PyObject *obj, void *closure)
     272             : {
     273           0 :         struct messaging_rec *object = (struct messaging_rec *)pytalloc_get_ptr(obj);
     274             :         PyObject *py_buf;
     275           0 :         py_buf = PyBytes_FromStringAndSize((char *)(object->buf).data, (object->buf).length);
     276           0 :         return py_buf;
     277             : }
     278             : 
     279           0 : static int py_messaging_rec_set_buf(PyObject *py_obj, PyObject *value, void *closure)
     280             : {
     281           0 :         struct messaging_rec *object = (struct messaging_rec *)pytalloc_get_ptr(py_obj);
     282           0 :         if (value == NULL) {
     283           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->buf");
     284           0 :                 return -1;
     285             :         }
     286           0 :         object->buf = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
     287           0 :         return 0;
     288             : }
     289             : 
     290           0 : static PyObject *py_messaging_rec_get_num_fds(PyObject *obj, void *closure)
     291             : {
     292           0 :         struct messaging_rec *object = (struct messaging_rec *)pytalloc_get_ptr(obj);
     293             :         PyObject *py_num_fds;
     294           0 :         py_num_fds = PyLong_FromLong((uint16_t)object->num_fds);
     295           0 :         return py_num_fds;
     296             : }
     297             : 
     298           0 : static int py_messaging_rec_set_num_fds(PyObject *py_obj, PyObject *value, void *closure)
     299             : {
     300           0 :         struct messaging_rec *object = (struct messaging_rec *)pytalloc_get_ptr(py_obj);
     301           0 :         if (value == NULL) {
     302           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_fds");
     303           0 :                 return -1;
     304             :         }
     305             :         {
     306           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_fds));
     307           0 :                 if (PyLong_Check(value)) {
     308             :                         unsigned long long test_var;
     309           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     310           0 :                         if (PyErr_Occurred() != NULL) {
     311           0 :                                 return -1;
     312             :                         }
     313           0 :                         if (test_var > uint_max) {
     314           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
     315             :                                   PyLong_Type.tp_name, uint_max, test_var);
     316           0 :                                 return -1;
     317             :                         }
     318           0 :                         object->num_fds = test_var;
     319             :                 } else {
     320           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
     321             :                           PyLong_Type.tp_name);
     322           0 :                         return -1;
     323             :                 }
     324             :         }
     325           0 :         return 0;
     326             : }
     327             : 
     328           0 : static PyObject *py_messaging_rec_get_fds(PyObject *obj, void *closure)
     329             : {
     330           0 :         struct messaging_rec *object = (struct messaging_rec *)pytalloc_get_ptr(obj);
     331             :         PyObject *py_fds;
     332           0 :         py_fds = PyList_New(object->num_fds);
     333           0 :         if (py_fds == NULL) {
     334           0 :                 return NULL;
     335             :         }
     336             :         {
     337             :                 int fds_cntr_0;
     338           0 :                 for (fds_cntr_0 = 0; fds_cntr_0 < (object->num_fds); fds_cntr_0++) {
     339             :                         PyObject *py_fds_0;
     340           0 :                         py_fds_0 = PyLong_FromLongLong(object->fds[fds_cntr_0]);
     341           0 :                         PyList_SetItem(py_fds, fds_cntr_0, py_fds_0);
     342             :                 }
     343             :         }
     344           0 :         return py_fds;
     345             : }
     346             : 
     347           0 : static int py_messaging_rec_set_fds(PyObject *py_obj, PyObject *value, void *closure)
     348             : {
     349           0 :         struct messaging_rec *object = (struct messaging_rec *)pytalloc_get_ptr(py_obj);
     350           0 :         if (value == NULL) {
     351           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fds");
     352           0 :                 return -1;
     353             :         }
     354           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
     355             :         {
     356             :                 int fds_cntr_0;
     357           0 :                 object->fds = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->fds, PyList_GET_SIZE(value));
     358           0 :                 if (!object->fds) { return -1;; }
     359           0 :                 talloc_set_name_const(object->fds, "ARRAY: object->fds");
     360           0 :                 for (fds_cntr_0 = 0; fds_cntr_0 < PyList_GET_SIZE(value); fds_cntr_0++) {
     361           0 :                         if (PyList_GET_ITEM(value, fds_cntr_0) == NULL) {
     362           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fds[fds_cntr_0]");
     363           0 :                                 return -1;
     364             :                         }
     365             :                         {
     366           0 :                                 const long long int_max = ndr_sizeof2intmax(sizeof(object->fds[fds_cntr_0]));
     367           0 :                                 const long long int_min = -int_max - 1;
     368           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, fds_cntr_0))) {
     369             :                                         long long test_var;
     370           0 :                                         test_var = PyLong_AsLongLong(PyList_GET_ITEM(value, fds_cntr_0));
     371           0 :                                         if (PyErr_Occurred() != NULL) {
     372           0 :                                                 return -1;
     373             :                                         }
     374           0 :                                         if (test_var < int_min || test_var > int_max) {
     375           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",\
     376             :                                                   PyLong_Type.tp_name, int_min, int_max, test_var);
     377           0 :                                                 return -1;
     378             :                                         }
     379           0 :                                         object->fds[fds_cntr_0] = test_var;
     380             :                                 } else {
     381           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
     382             :                                           PyLong_Type.tp_name);
     383           0 :                                         return -1;
     384             :                                 }
     385             :                         }
     386             :                 }
     387             :         }
     388           0 :         return 0;
     389             : }
     390             : 
     391             : static PyGetSetDef py_messaging_rec_getsetters[] = {
     392             :         {
     393             :                 .name = discard_const_p(char, "prev"),
     394             :                 .get = py_messaging_rec_get_prev,
     395             :                 .set = py_messaging_rec_set_prev,
     396             :                 .doc = discard_const_p(char, "PIDL-generated element of base type messaging_rec")
     397             :         },
     398             :         {
     399             :                 .name = discard_const_p(char, "next"),
     400             :                 .get = py_messaging_rec_get_next,
     401             :                 .set = py_messaging_rec_set_next,
     402             :                 .doc = discard_const_p(char, "PIDL-generated element of base type messaging_rec")
     403             :         },
     404             :         {
     405             :                 .name = discard_const_p(char, "msg_version"),
     406             :                 .get = py_messaging_rec_get_msg_version,
     407             :                 .set = py_messaging_rec_set_msg_version,
     408             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     409             :         },
     410             :         {
     411             :                 .name = discard_const_p(char, "msg_type"),
     412             :                 .get = py_messaging_rec_get_msg_type,
     413             :                 .set = py_messaging_rec_set_msg_type,
     414             :                 .doc = discard_const_p(char, "PIDL-generated element of base type messaging_type")
     415             :         },
     416             :         {
     417             :                 .name = discard_const_p(char, "dest"),
     418             :                 .get = py_messaging_rec_get_dest,
     419             :                 .set = py_messaging_rec_set_dest,
     420             :                 .doc = discard_const_p(char, "PIDL-generated element of base type server_id")
     421             :         },
     422             :         {
     423             :                 .name = discard_const_p(char, "src"),
     424             :                 .get = py_messaging_rec_get_src,
     425             :                 .set = py_messaging_rec_set_src,
     426             :                 .doc = discard_const_p(char, "PIDL-generated element of base type server_id")
     427             :         },
     428             :         {
     429             :                 .name = discard_const_p(char, "buf"),
     430             :                 .get = py_messaging_rec_get_buf,
     431             :                 .set = py_messaging_rec_set_buf,
     432             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
     433             :         },
     434             :         {
     435             :                 .name = discard_const_p(char, "num_fds"),
     436             :                 .get = py_messaging_rec_get_num_fds,
     437             :                 .set = py_messaging_rec_set_num_fds,
     438             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
     439             :         },
     440             :         {
     441             :                 .name = discard_const_p(char, "fds"),
     442             :                 .get = py_messaging_rec_get_fds,
     443             :                 .set = py_messaging_rec_set_fds,
     444             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dlong")
     445             :         },
     446             :         { .name = NULL }
     447             : };
     448             : 
     449           0 : static PyObject *py_messaging_rec_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     450             : {
     451           0 :         return pytalloc_new(struct messaging_rec, type);
     452             : }
     453             : 
     454           0 : static PyObject *py_messaging_rec_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
     455             : {
     456           0 :         struct messaging_rec *object = (struct messaging_rec *)pytalloc_get_ptr(py_obj);
     457           0 :         PyObject *ret = NULL;
     458             :         DATA_BLOB blob;
     459             :         enum ndr_err_code err;
     460           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
     461           0 :         if (tmp_ctx == NULL) {
     462           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
     463           0 :                 return NULL;
     464             :         }
     465           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_messaging_rec);
     466           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
     467           0 :                 TALLOC_FREE(tmp_ctx);
     468           0 :                 PyErr_SetNdrError(err);
     469           0 :                 return NULL;
     470             :         }
     471             : 
     472           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
     473           0 :         TALLOC_FREE(tmp_ctx);
     474           0 :         return ret;
     475             : }
     476             : 
     477           0 : static PyObject *py_messaging_rec_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
     478             : {
     479           0 :         struct messaging_rec *object = (struct messaging_rec *)pytalloc_get_ptr(py_obj);
     480           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
     481           0 :         Py_ssize_t blob_length = 0;
     482             :         enum ndr_err_code err;
     483           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
     484           0 :         PyObject *allow_remaining_obj = NULL;
     485           0 :         bool allow_remaining = false;
     486             : 
     487           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
     488             :                 discard_const_p(char *, kwnames),
     489             :                 &blob.data, &blob_length,
     490             :                 &allow_remaining_obj)) {
     491           0 :                 return NULL;
     492             :         }
     493           0 :         blob.length = blob_length;
     494             : 
     495           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
     496           0 :                 allow_remaining = true;
     497             :         }
     498             : 
     499           0 :         if (allow_remaining) {
     500           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_messaging_rec);
     501             :         } else {
     502           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_messaging_rec);
     503             :         }
     504           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
     505           0 :                 PyErr_SetNdrError(err);
     506           0 :                 return NULL;
     507             :         }
     508             : 
     509           0 :         Py_RETURN_NONE;
     510             : }
     511             : 
     512           0 : static PyObject *py_messaging_rec_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
     513             : {
     514           0 :         struct messaging_rec *object = (struct messaging_rec *)pytalloc_get_ptr(py_obj);
     515             :         PyObject *ret;
     516             :         char *retstr;
     517             : 
     518           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_messaging_rec, "messaging_rec", object);
     519           0 :         ret = PyUnicode_FromString(retstr);
     520           0 :         talloc_free(retstr);
     521             : 
     522           0 :         return ret;
     523             : }
     524             : 
     525             : static PyMethodDef py_messaging_rec_methods[] = {
     526             :         { "__ndr_pack__", (PyCFunction)py_messaging_rec_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
     527             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_messaging_rec_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
     528             :         { "__ndr_print__", (PyCFunction)py_messaging_rec_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
     529             :         { NULL, NULL, 0, NULL }
     530             : };
     531             : 
     532             : 
     533             : static PyTypeObject messaging_rec_Type = {
     534             :         PyVarObject_HEAD_INIT(NULL, 0)
     535             :         .tp_name = "messaging.rec",
     536             :         .tp_getset = py_messaging_rec_getsetters,
     537             :         .tp_methods = py_messaging_rec_methods,
     538             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
     539             :         .tp_new = py_messaging_rec_new,
     540             : };
     541             : 
     542             : 
     543           0 : static PyObject *py_messaging_reclog_get_rec_index(PyObject *obj, void *closure)
     544             : {
     545           0 :         struct messaging_reclog *object = (struct messaging_reclog *)pytalloc_get_ptr(obj);
     546             :         PyObject *py_rec_index;
     547           0 :         py_rec_index = PyLong_FromUnsignedLongLong(object->rec_index);
     548           0 :         return py_rec_index;
     549             : }
     550             : 
     551           0 : static int py_messaging_reclog_set_rec_index(PyObject *py_obj, PyObject *value, void *closure)
     552             : {
     553           0 :         struct messaging_reclog *object = (struct messaging_reclog *)pytalloc_get_ptr(py_obj);
     554           0 :         if (value == NULL) {
     555           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->rec_index");
     556           0 :                 return -1;
     557             :         }
     558             :         {
     559           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rec_index));
     560           0 :                 if (PyLong_Check(value)) {
     561             :                         unsigned long long test_var;
     562           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     563           0 :                         if (PyErr_Occurred() != NULL) {
     564           0 :                                 return -1;
     565             :                         }
     566           0 :                         if (test_var > uint_max) {
     567           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
     568             :                                   PyLong_Type.tp_name, uint_max, test_var);
     569           0 :                                 return -1;
     570             :                         }
     571           0 :                         object->rec_index = test_var;
     572             :                 } else {
     573           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
     574             :                           PyLong_Type.tp_name);
     575           0 :                         return -1;
     576             :                 }
     577             :         }
     578           0 :         return 0;
     579             : }
     580             : 
     581           0 : static PyObject *py_messaging_reclog_get_num_recs(PyObject *obj, void *closure)
     582             : {
     583           0 :         struct messaging_reclog *object = (struct messaging_reclog *)pytalloc_get_ptr(obj);
     584             :         PyObject *py_num_recs;
     585           0 :         py_num_recs = PyLong_FromUnsignedLongLong((uint32_t)object->num_recs);
     586           0 :         return py_num_recs;
     587             : }
     588             : 
     589           0 : static int py_messaging_reclog_set_num_recs(PyObject *py_obj, PyObject *value, void *closure)
     590             : {
     591           0 :         struct messaging_reclog *object = (struct messaging_reclog *)pytalloc_get_ptr(py_obj);
     592           0 :         if (value == NULL) {
     593           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_recs");
     594           0 :                 return -1;
     595             :         }
     596             :         {
     597           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_recs));
     598           0 :                 if (PyLong_Check(value)) {
     599             :                         unsigned long long test_var;
     600           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     601           0 :                         if (PyErr_Occurred() != NULL) {
     602           0 :                                 return -1;
     603             :                         }
     604           0 :                         if (test_var > uint_max) {
     605           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
     606             :                                   PyLong_Type.tp_name, uint_max, test_var);
     607           0 :                                 return -1;
     608             :                         }
     609           0 :                         object->num_recs = test_var;
     610             :                 } else {
     611           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
     612             :                           PyLong_Type.tp_name);
     613           0 :                         return -1;
     614             :                 }
     615             :         }
     616           0 :         return 0;
     617             : }
     618             : 
     619           0 : static PyObject *py_messaging_reclog_get_recs(PyObject *obj, void *closure)
     620             : {
     621           0 :         struct messaging_reclog *object = (struct messaging_reclog *)pytalloc_get_ptr(obj);
     622             :         PyObject *py_recs;
     623           0 :         py_recs = PyList_New(object->num_recs);
     624           0 :         if (py_recs == NULL) {
     625           0 :                 return NULL;
     626             :         }
     627             :         {
     628             :                 int recs_cntr_0;
     629           0 :                 for (recs_cntr_0 = 0; recs_cntr_0 < (object->num_recs); recs_cntr_0++) {
     630             :                         PyObject *py_recs_0;
     631           0 :                         if (object->recs[recs_cntr_0] == NULL) {
     632           0 :                                 py_recs_0 = Py_None;
     633           0 :                                 Py_INCREF(py_recs_0);
     634             :                         } else {
     635           0 :                                 py_recs_0 = pytalloc_reference_ex(&messaging_rec_Type, object->recs[recs_cntr_0], object->recs[recs_cntr_0]);
     636             :                         }
     637           0 :                         PyList_SetItem(py_recs, recs_cntr_0, py_recs_0);
     638             :                 }
     639             :         }
     640           0 :         return py_recs;
     641             : }
     642             : 
     643           0 : static int py_messaging_reclog_set_recs(PyObject *py_obj, PyObject *value, void *closure)
     644             : {
     645           0 :         struct messaging_reclog *object = (struct messaging_reclog *)pytalloc_get_ptr(py_obj);
     646           0 :         if (value == NULL) {
     647           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->recs");
     648           0 :                 return -1;
     649             :         }
     650           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
     651             :         {
     652             :                 int recs_cntr_0;
     653           0 :                 object->recs = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->recs, PyList_GET_SIZE(value));
     654           0 :                 if (!object->recs) { return -1;; }
     655           0 :                 talloc_set_name_const(object->recs, "ARRAY: object->recs");
     656           0 :                 for (recs_cntr_0 = 0; recs_cntr_0 < PyList_GET_SIZE(value); recs_cntr_0++) {
     657           0 :                         if (PyList_GET_ITEM(value, recs_cntr_0) == NULL) {
     658           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->recs[recs_cntr_0]");
     659           0 :                                 return -1;
     660             :                         }
     661           0 :                         if (PyList_GET_ITEM(value, recs_cntr_0) == Py_None) {
     662           0 :                                 object->recs[recs_cntr_0] = NULL;
     663             :                         } else {
     664           0 :                                 object->recs[recs_cntr_0] = NULL;
     665           0 :                                 PY_CHECK_TYPE(&messaging_rec_Type, PyList_GET_ITEM(value, recs_cntr_0), return -1;);
     666           0 :                                 if (talloc_reference(object->recs, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, recs_cntr_0))) == NULL) {
     667           0 :                                         PyErr_NoMemory();
     668           0 :                                         return -1;
     669             :                                 }
     670           0 :                                 object->recs[recs_cntr_0] = (struct messaging_rec *)pytalloc_get_ptr(PyList_GET_ITEM(value, recs_cntr_0));
     671             :                         }
     672             :                 }
     673             :         }
     674           0 :         return 0;
     675             : }
     676             : 
     677             : static PyGetSetDef py_messaging_reclog_getsetters[] = {
     678             :         {
     679             :                 .name = discard_const_p(char, "rec_index"),
     680             :                 .get = py_messaging_reclog_get_rec_index,
     681             :                 .set = py_messaging_reclog_set_rec_index,
     682             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
     683             :         },
     684             :         {
     685             :                 .name = discard_const_p(char, "num_recs"),
     686             :                 .get = py_messaging_reclog_get_num_recs,
     687             :                 .set = py_messaging_reclog_set_num_recs,
     688             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     689             :         },
     690             :         {
     691             :                 .name = discard_const_p(char, "recs"),
     692             :                 .get = py_messaging_reclog_get_recs,
     693             :                 .set = py_messaging_reclog_set_recs,
     694             :                 .doc = discard_const_p(char, "PIDL-generated element of base type messaging_rec")
     695             :         },
     696             :         { .name = NULL }
     697             : };
     698             : 
     699           0 : static PyObject *py_messaging_reclog_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     700             : {
     701           0 :         return pytalloc_new(struct messaging_reclog, type);
     702             : }
     703             : 
     704           0 : static PyObject *py_messaging_reclog_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
     705             : {
     706           0 :         struct messaging_reclog *object = (struct messaging_reclog *)pytalloc_get_ptr(py_obj);
     707           0 :         PyObject *ret = NULL;
     708             :         DATA_BLOB blob;
     709             :         enum ndr_err_code err;
     710           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
     711           0 :         if (tmp_ctx == NULL) {
     712           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
     713           0 :                 return NULL;
     714             :         }
     715           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_messaging_reclog);
     716           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
     717           0 :                 TALLOC_FREE(tmp_ctx);
     718           0 :                 PyErr_SetNdrError(err);
     719           0 :                 return NULL;
     720             :         }
     721             : 
     722           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
     723           0 :         TALLOC_FREE(tmp_ctx);
     724           0 :         return ret;
     725             : }
     726             : 
     727           0 : static PyObject *py_messaging_reclog_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
     728             : {
     729           0 :         struct messaging_reclog *object = (struct messaging_reclog *)pytalloc_get_ptr(py_obj);
     730           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
     731           0 :         Py_ssize_t blob_length = 0;
     732             :         enum ndr_err_code err;
     733           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
     734           0 :         PyObject *allow_remaining_obj = NULL;
     735           0 :         bool allow_remaining = false;
     736             : 
     737           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
     738             :                 discard_const_p(char *, kwnames),
     739             :                 &blob.data, &blob_length,
     740             :                 &allow_remaining_obj)) {
     741           0 :                 return NULL;
     742             :         }
     743           0 :         blob.length = blob_length;
     744             : 
     745           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
     746           0 :                 allow_remaining = true;
     747             :         }
     748             : 
     749           0 :         if (allow_remaining) {
     750           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_messaging_reclog);
     751             :         } else {
     752           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_messaging_reclog);
     753             :         }
     754           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
     755           0 :                 PyErr_SetNdrError(err);
     756           0 :                 return NULL;
     757             :         }
     758             : 
     759           0 :         Py_RETURN_NONE;
     760             : }
     761             : 
     762           0 : static PyObject *py_messaging_reclog_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
     763             : {
     764           0 :         struct messaging_reclog *object = (struct messaging_reclog *)pytalloc_get_ptr(py_obj);
     765             :         PyObject *ret;
     766             :         char *retstr;
     767             : 
     768           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_messaging_reclog, "messaging_reclog", object);
     769           0 :         ret = PyUnicode_FromString(retstr);
     770           0 :         talloc_free(retstr);
     771             : 
     772           0 :         return ret;
     773             : }
     774             : 
     775             : static PyMethodDef py_messaging_reclog_methods[] = {
     776             :         { "__ndr_pack__", (PyCFunction)py_messaging_reclog_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
     777             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_messaging_reclog_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
     778             :         { "__ndr_print__", (PyCFunction)py_messaging_reclog_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
     779             :         { NULL, NULL, 0, NULL }
     780             : };
     781             : 
     782             : 
     783             : static PyTypeObject messaging_reclog_Type = {
     784             :         PyVarObject_HEAD_INIT(NULL, 0)
     785             :         .tp_name = "messaging.reclog",
     786             :         .tp_getset = py_messaging_reclog_getsetters,
     787             :         .tp_methods = py_messaging_reclog_methods,
     788             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
     789             :         .tp_new = py_messaging_reclog_new,
     790             : };
     791             : 
     792             : static PyMethodDef messaging_methods[] = {
     793             :         { NULL, NULL, 0, NULL }
     794             : };
     795             : 
     796             : static struct PyModuleDef moduledef = {
     797             :         PyModuleDef_HEAD_INIT,
     798             :         .m_name = "messaging",
     799             :         .m_doc = "messaging DCE/RPC",
     800             :         .m_size = -1,
     801             :         .m_methods = messaging_methods,
     802             : };
     803          16 : MODULE_INIT_FUNC(messaging)
     804             : {
     805          16 :         PyObject *m = NULL;
     806          16 :         PyObject *dep_samba_dcerpc_server_id = NULL;
     807          16 :         PyObject *dep_talloc = NULL;
     808             : 
     809          16 :         dep_samba_dcerpc_server_id = PyImport_ImportModule("samba.dcerpc.server_id");
     810          16 :         if (dep_samba_dcerpc_server_id == NULL)
     811           0 :                 goto out;
     812             : 
     813          16 :         dep_talloc = PyImport_ImportModule("talloc");
     814          16 :         if (dep_talloc == NULL)
     815           0 :                 goto out;
     816             : 
     817          16 :         server_id_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_server_id, "server_id");
     818          16 :         if (server_id_Type == NULL)
     819           0 :                 goto out;
     820             : 
     821          16 :         BaseObject_Type = (PyTypeObject *)PyObject_GetAttrString(dep_talloc, "BaseObject");
     822          16 :         if (BaseObject_Type == NULL)
     823           0 :                 goto out;
     824             : 
     825          16 :         messaging_rec_Type.tp_base = BaseObject_Type;
     826          16 :         messaging_rec_Type.tp_basicsize = pytalloc_BaseObject_size();
     827             : 
     828          16 :         messaging_reclog_Type.tp_base = BaseObject_Type;
     829          16 :         messaging_reclog_Type.tp_basicsize = pytalloc_BaseObject_size();
     830             : 
     831          16 :         if (PyType_Ready(&messaging_rec_Type) < 0)
     832           0 :                 goto out;
     833          16 :         if (PyType_Ready(&messaging_reclog_Type) < 0)
     834           0 :                 goto out;
     835             : #ifdef PY_REC_PATCH
     836             :         PY_REC_PATCH(&messaging_rec_Type);
     837             : #endif
     838             : #ifdef PY_RECLOG_PATCH
     839             :         PY_RECLOG_PATCH(&messaging_reclog_Type);
     840             : #endif
     841             : 
     842          16 :         m = PyModule_Create(&moduledef);
     843          16 :         if (m == NULL)
     844           0 :                 goto out;
     845             : 
     846          16 :         PyModule_AddObject(m, "MSG_TYPE_MASK", PyLong_FromUnsignedLongLong(0xFFFF));
     847          16 :         PyModule_AddObject(m, "AUTH_EVENT_NAME", PyUnicode_FromString("auth_event"));
     848          16 :         PyModule_AddObject(m, "DSDB_EVENT_NAME", PyUnicode_FromString("dsdb_event"));
     849          16 :         PyModule_AddObject(m, "DSDB_PWD_EVENT_NAME", PyUnicode_FromString("dsdb_password_event"));
     850          16 :         PyModule_AddObject(m, "DSDB_GROUP_EVENT_NAME", PyUnicode_FromString("dsdb_group_event"));
     851          16 :         PyModule_AddObject(m, "MSG_DEBUG", PyLong_FromUnsignedLongLong((uint32_t)MSG_DEBUG));
     852          16 :         PyModule_AddObject(m, "MSG_PING", PyLong_FromUnsignedLongLong((uint32_t)MSG_PING));
     853          16 :         PyModule_AddObject(m, "MSG_PONG", PyLong_FromUnsignedLongLong((uint32_t)MSG_PONG));
     854          16 :         PyModule_AddObject(m, "MSG_PROFILE", PyLong_FromUnsignedLongLong((uint32_t)MSG_PROFILE));
     855          16 :         PyModule_AddObject(m, "MSG_REQ_DEBUGLEVEL", PyLong_FromUnsignedLongLong((uint32_t)MSG_REQ_DEBUGLEVEL));
     856          16 :         PyModule_AddObject(m, "MSG_DEBUGLEVEL", PyLong_FromUnsignedLongLong((uint32_t)MSG_DEBUGLEVEL));
     857          16 :         PyModule_AddObject(m, "MSG_REQ_PROFILELEVEL", PyLong_FromUnsignedLongLong((uint32_t)MSG_REQ_PROFILELEVEL));
     858          16 :         PyModule_AddObject(m, "MSG_PROFILELEVEL", PyLong_FromUnsignedLongLong((uint32_t)MSG_PROFILELEVEL));
     859          16 :         PyModule_AddObject(m, "MSG_REQ_POOL_USAGE", PyLong_FromUnsignedLongLong((uint32_t)MSG_REQ_POOL_USAGE));
     860          16 :         PyModule_AddObject(m, "MSG_POOL_USAGE", PyLong_FromUnsignedLongLong((uint32_t)MSG_POOL_USAGE));
     861          16 :         PyModule_AddObject(m, "MSG_REQ_DMALLOC_MARK", PyLong_FromUnsignedLongLong((uint32_t)MSG_REQ_DMALLOC_MARK));
     862          16 :         PyModule_AddObject(m, "MSG_REQ_DMALLOC_LOG_CHANGED", PyLong_FromUnsignedLongLong((uint32_t)MSG_REQ_DMALLOC_LOG_CHANGED));
     863          16 :         PyModule_AddObject(m, "MSG_SHUTDOWN", PyLong_FromUnsignedLongLong((uint32_t)MSG_SHUTDOWN));
     864          16 :         PyModule_AddObject(m, "ID_CACHE_DELETE", PyLong_FromUnsignedLongLong((uint32_t)ID_CACHE_DELETE));
     865          16 :         PyModule_AddObject(m, "ID_CACHE_KILL", PyLong_FromUnsignedLongLong((uint32_t)ID_CACHE_KILL));
     866          16 :         PyModule_AddObject(m, "MSG_SMB_CONF_UPDATED", PyLong_FromUnsignedLongLong((uint32_t)MSG_SMB_CONF_UPDATED));
     867          16 :         PyModule_AddObject(m, "MSG_PREFORK_CHILD_EVENT", PyLong_FromUnsignedLongLong((uint32_t)MSG_PREFORK_CHILD_EVENT));
     868          16 :         PyModule_AddObject(m, "MSG_PREFORK_PARENT_EVENT", PyLong_FromUnsignedLongLong((uint32_t)MSG_PREFORK_PARENT_EVENT));
     869          16 :         PyModule_AddObject(m, "MSG_REQ_RINGBUF_LOG", PyLong_FromUnsignedLongLong((uint32_t)MSG_REQ_RINGBUF_LOG));
     870          16 :         PyModule_AddObject(m, "MSG_RINGBUF_LOG", PyLong_FromUnsignedLongLong((uint32_t)MSG_RINGBUF_LOG));
     871          16 :         PyModule_AddObject(m, "MSG_DAEMON_READY_FD", PyLong_FromUnsignedLongLong((uint32_t)MSG_DAEMON_READY_FD));
     872          16 :         PyModule_AddObject(m, "MSG_FORCE_ELECTION", PyLong_FromUnsignedLongLong((uint32_t)MSG_FORCE_ELECTION));
     873          16 :         PyModule_AddObject(m, "MSG_WINS_NEW_ENTRY", PyLong_FromUnsignedLongLong((uint32_t)MSG_WINS_NEW_ENTRY));
     874          16 :         PyModule_AddObject(m, "MSG_SEND_PACKET", PyLong_FromUnsignedLongLong((uint32_t)MSG_SEND_PACKET));
     875          16 :         PyModule_AddObject(m, "MSG_PRINTER_NOTIFY2", PyLong_FromUnsignedLongLong((uint32_t)MSG_PRINTER_NOTIFY2));
     876          16 :         PyModule_AddObject(m, "MSG_PRINTER_DRVUPGRADE", PyLong_FromUnsignedLongLong((uint32_t)MSG_PRINTER_DRVUPGRADE));
     877          16 :         PyModule_AddObject(m, "MSG_PRINTERDATA_INIT_RESET", PyLong_FromUnsignedLongLong((uint32_t)MSG_PRINTERDATA_INIT_RESET));
     878          16 :         PyModule_AddObject(m, "MSG_PRINTER_UPDATE", PyLong_FromUnsignedLongLong((uint32_t)MSG_PRINTER_UPDATE));
     879          16 :         PyModule_AddObject(m, "MSG_PRINTER_MOD", PyLong_FromUnsignedLongLong((uint32_t)MSG_PRINTER_MOD));
     880          16 :         PyModule_AddObject(m, "MSG_PRINTER_PCAP", PyLong_FromUnsignedLongLong((uint32_t)MSG_PRINTER_PCAP));
     881          16 :         PyModule_AddObject(m, "MSG_SMB_FORCE_TDIS", PyLong_FromUnsignedLongLong((uint32_t)MSG_SMB_FORCE_TDIS));
     882          16 :         PyModule_AddObject(m, "MSG_SMB_BREAK_REQUEST", PyLong_FromUnsignedLongLong((uint32_t)MSG_SMB_BREAK_REQUEST));
     883          16 :         PyModule_AddObject(m, "MSG_SMB_KERNEL_BREAK", PyLong_FromUnsignedLongLong((uint32_t)MSG_SMB_KERNEL_BREAK));
     884          16 :         PyModule_AddObject(m, "MSG_SMB_FILE_RENAME", PyLong_FromUnsignedLongLong((uint32_t)MSG_SMB_FILE_RENAME));
     885          16 :         PyModule_AddObject(m, "MSG_SMB_INJECT_FAULT", PyLong_FromUnsignedLongLong((uint32_t)MSG_SMB_INJECT_FAULT));
     886          16 :         PyModule_AddObject(m, "MSG_SMB_BLOCKING_LOCK_CANCEL", PyLong_FromUnsignedLongLong((uint32_t)MSG_SMB_BLOCKING_LOCK_CANCEL));
     887          16 :         PyModule_AddObject(m, "MSG_SMB_NOTIFY", PyLong_FromUnsignedLongLong((uint32_t)MSG_SMB_NOTIFY));
     888          16 :         PyModule_AddObject(m, "MSG_SMB_STAT_CACHE_DELETE", PyLong_FromUnsignedLongLong((uint32_t)MSG_SMB_STAT_CACHE_DELETE));
     889          16 :         PyModule_AddObject(m, "MSG_PVFS_NOTIFY", PyLong_FromUnsignedLongLong((uint32_t)MSG_PVFS_NOTIFY));
     890          16 :         PyModule_AddObject(m, "MSG_SMB_CLOSE_FILE", PyLong_FromUnsignedLongLong((uint32_t)MSG_SMB_CLOSE_FILE));
     891          16 :         PyModule_AddObject(m, "MSG_SMB_NOTIFY_CLEANUP", PyLong_FromUnsignedLongLong((uint32_t)MSG_SMB_NOTIFY_CLEANUP));
     892          16 :         PyModule_AddObject(m, "MSG_SMB_SCAVENGER", PyLong_FromUnsignedLongLong((uint32_t)MSG_SMB_SCAVENGER));
     893          16 :         PyModule_AddObject(m, "MSG_SMB_KILL_CLIENT_IP", PyLong_FromUnsignedLongLong((uint32_t)MSG_SMB_KILL_CLIENT_IP));
     894          16 :         PyModule_AddObject(m, "MSG_SMB_TELL_NUM_CHILDREN", PyLong_FromUnsignedLongLong((uint32_t)MSG_SMB_TELL_NUM_CHILDREN));
     895          16 :         PyModule_AddObject(m, "MSG_SMB_NUM_CHILDREN", PyLong_FromUnsignedLongLong((uint32_t)MSG_SMB_NUM_CHILDREN));
     896          16 :         PyModule_AddObject(m, "MSG_SMB_NOTIFY_CANCEL_DELETED", PyLong_FromUnsignedLongLong((uint32_t)MSG_SMB_NOTIFY_CANCEL_DELETED));
     897          16 :         PyModule_AddObject(m, "MSG_SMB_NOTIFY_REC_CHANGE", PyLong_FromUnsignedLongLong((uint32_t)MSG_SMB_NOTIFY_REC_CHANGE));
     898          16 :         PyModule_AddObject(m, "MSG_SMB_NOTIFY_TRIGGER", PyLong_FromUnsignedLongLong((uint32_t)MSG_SMB_NOTIFY_TRIGGER));
     899          16 :         PyModule_AddObject(m, "MSG_SMB_NOTIFY_GET_DB", PyLong_FromUnsignedLongLong((uint32_t)MSG_SMB_NOTIFY_GET_DB));
     900          16 :         PyModule_AddObject(m, "MSG_SMB_NOTIFY_DB", PyLong_FromUnsignedLongLong((uint32_t)MSG_SMB_NOTIFY_DB));
     901          16 :         PyModule_AddObject(m, "MSG_SMB_NOTIFY_REC_CHANGES", PyLong_FromUnsignedLongLong((uint32_t)MSG_SMB_NOTIFY_REC_CHANGES));
     902          16 :         PyModule_AddObject(m, "MSG_SMB_NOTIFY_STARTED", PyLong_FromUnsignedLongLong((uint32_t)MSG_SMB_NOTIFY_STARTED));
     903          16 :         PyModule_AddObject(m, "MSG_SMB_SLEEP", PyLong_FromUnsignedLongLong((uint32_t)MSG_SMB_SLEEP));
     904          16 :         PyModule_AddObject(m, "MSG_SMB_FORCE_TDIS_DENIED", PyLong_FromUnsignedLongLong((uint32_t)MSG_SMB_FORCE_TDIS_DENIED));
     905          16 :         PyModule_AddObject(m, "MSG_WINBIND_FINISHED", PyLong_FromUnsignedLongLong((uint32_t)MSG_WINBIND_FINISHED));
     906          16 :         PyModule_AddObject(m, "MSG_WINBIND_FORGET_STATE", PyLong_FromUnsignedLongLong((uint32_t)MSG_WINBIND_FORGET_STATE));
     907          16 :         PyModule_AddObject(m, "MSG_WINBIND_ONLINE", PyLong_FromUnsignedLongLong((uint32_t)MSG_WINBIND_ONLINE));
     908          16 :         PyModule_AddObject(m, "MSG_WINBIND_OFFLINE", PyLong_FromUnsignedLongLong((uint32_t)MSG_WINBIND_OFFLINE));
     909          16 :         PyModule_AddObject(m, "MSG_WINBIND_ONLINESTATUS", PyLong_FromUnsignedLongLong((uint32_t)MSG_WINBIND_ONLINESTATUS));
     910          16 :         PyModule_AddObject(m, "MSG_WINBIND_VALIDATE_CACHE", PyLong_FromUnsignedLongLong((uint32_t)MSG_WINBIND_VALIDATE_CACHE));
     911          16 :         PyModule_AddObject(m, "MSG_WINBIND_DUMP_DOMAIN_LIST", PyLong_FromUnsignedLongLong((uint32_t)MSG_WINBIND_DUMP_DOMAIN_LIST));
     912          16 :         PyModule_AddObject(m, "MSG_WINBIND_IP_DROPPED", PyLong_FromUnsignedLongLong((uint32_t)MSG_WINBIND_IP_DROPPED));
     913          16 :         PyModule_AddObject(m, "MSG_WINBIND_DOMAIN_ONLINE", PyLong_FromUnsignedLongLong((uint32_t)MSG_WINBIND_DOMAIN_ONLINE));
     914          16 :         PyModule_AddObject(m, "MSG_WINBIND_DOMAIN_OFFLINE", PyLong_FromUnsignedLongLong((uint32_t)MSG_WINBIND_DOMAIN_OFFLINE));
     915          16 :         PyModule_AddObject(m, "MSG_WINBIND_RELOAD_TRUSTED_DOMAINS", PyLong_FromUnsignedLongLong((uint32_t)MSG_WINBIND_RELOAD_TRUSTED_DOMAINS));
     916          16 :         PyModule_AddObject(m, "MSG_WINBIND_DISCONNECT_DC", PyLong_FromUnsignedLongLong((uint32_t)MSG_WINBIND_DISCONNECT_DC));
     917          16 :         PyModule_AddObject(m, "MSG_SMBXSRV_SESSION_CLOSE", PyLong_FromUnsignedLongLong((uint32_t)MSG_SMBXSRV_SESSION_CLOSE));
     918          16 :         PyModule_AddObject(m, "MSG_SMBXSRV_CONNECTION_PASS", PyLong_FromUnsignedLongLong((uint32_t)MSG_SMBXSRV_CONNECTION_PASS));
     919          16 :         PyModule_AddObject(m, "MSG_SMBXSRV_CONNECTION_PASSED", PyLong_FromUnsignedLongLong((uint32_t)MSG_SMBXSRV_CONNECTION_PASSED));
     920          16 :         PyModule_AddObject(m, "MSG_BRL_RETRY", PyLong_FromUnsignedLongLong((uint32_t)MSG_BRL_RETRY));
     921          16 :         PyModule_AddObject(m, "MSG_PVFS_RETRY_OPEN", PyLong_FromUnsignedLongLong((uint32_t)MSG_PVFS_RETRY_OPEN));
     922          16 :         PyModule_AddObject(m, "MSG_IRPC", PyLong_FromUnsignedLongLong((uint32_t)MSG_IRPC));
     923          16 :         PyModule_AddObject(m, "MSG_NTVFS_OPLOCK_BREAK", PyLong_FromUnsignedLongLong((uint32_t)MSG_NTVFS_OPLOCK_BREAK));
     924          16 :         PyModule_AddObject(m, "MSG_DREPL_ALLOCATE_RID", PyLong_FromUnsignedLongLong((uint32_t)MSG_DREPL_ALLOCATE_RID));
     925          16 :         PyModule_AddObject(m, "MSG_AUTH_LOG", PyLong_FromUnsignedLongLong((uint32_t)MSG_AUTH_LOG));
     926          16 :         PyModule_AddObject(m, "MSG_DSDB_LOG", PyLong_FromUnsignedLongLong((uint32_t)MSG_DSDB_LOG));
     927          16 :         PyModule_AddObject(m, "MSG_DSDB_PWD_LOG", PyLong_FromUnsignedLongLong((uint32_t)MSG_DSDB_PWD_LOG));
     928          16 :         PyModule_AddObject(m, "MSG_GROUP_LOG", PyLong_FromUnsignedLongLong((uint32_t)MSG_GROUP_LOG));
     929          16 :         PyModule_AddObject(m, "MSG_DBWRAP_MODIFIED", PyLong_FromUnsignedLongLong((uint32_t)MSG_DBWRAP_MODIFIED));
     930          16 :         PyModule_AddObject(m, "MSG_TMP_BASE", PyLong_FromUnsignedLongLong((uint32_t)MSG_TMP_BASE));
     931          16 :         Py_INCREF((PyObject *)(void *)&messaging_rec_Type);
     932          16 :         PyModule_AddObject(m, "rec", (PyObject *)(void *)&messaging_rec_Type);
     933          16 :         Py_INCREF((PyObject *)(void *)&messaging_reclog_Type);
     934          16 :         PyModule_AddObject(m, "reclog", (PyObject *)(void *)&messaging_reclog_Type);
     935             : #ifdef PY_MOD_MESSAGING_PATCH
     936             :         PY_MOD_MESSAGING_PATCH(m);
     937             : #endif
     938          16 :         out:
     939          16 :         Py_XDECREF(dep_samba_dcerpc_server_id);
     940          16 :         Py_XDECREF(dep_talloc);
     941          16 :         return m;
     942             : 
     943             : }

Generated by: LCOV version 1.13