LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - py_dcerpc.c (source / functions) Hit Total Coverage
Test: coverage report for v4-17-test 1498b464 Lines: 1171 5864 20.0 %
Date: 2024-06-13 04:01:37 Functions: 107 470 22.8 %

          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_dcerpc.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       92868 : static inline unsigned long long ndr_sizeof2uintmax(size_t var_size)
      33             : {
      34       92868 :         switch (var_size) {
      35           0 :         case 8:
      36           0 :                 return UINT64_MAX;
      37       21231 :         case 4:
      38       21231 :                 return UINT32_MAX;
      39       29128 :         case 2:
      40       29128 :                 return UINT16_MAX;
      41       42509 :         case 1:
      42       42509 :                 return UINT8_MAX;
      43             :         }
      44             : 
      45           0 :         return 0;
      46             : }
      47             : 
      48             : static inline _MAYBE_UNUSED_ long long ndr_sizeof2intmax(size_t var_size)
      49             : {
      50             :         switch (var_size) {
      51             :         case 8:
      52             :                 return INT64_MAX;
      53             :         case 4:
      54             :                 return INT32_MAX;
      55             :         case 2:
      56             :                 return INT16_MAX;
      57             :         case 1:
      58             :                 return INT8_MAX;
      59             :         }
      60             : 
      61             :         return 0;
      62             : }
      63             : 
      64             : #include "librpc/gen_ndr/misc.h"
      65             : static PyTypeObject dcerpc_ctx_list_Type;
      66             : static PyTypeObject dcerpc_bind_Type;
      67             : static PyTypeObject dcerpc_empty_Type;
      68             : static PyTypeObject dcerpc_object_Type;
      69             : static PyTypeObject dcerpc_request_Type;
      70             : static PyTypeObject dcerpc_bind_ack_reason_Type;
      71             : static PyTypeObject dcerpc_ack_ctx_Type;
      72             : static PyTypeObject dcerpc_bind_ack_Type;
      73             : static PyTypeObject dcerpc_bind_nak_version_Type;
      74             : static PyTypeObject dcerpc_bind_nak_Type;
      75             : static PyTypeObject dcerpc_response_Type;
      76             : static PyTypeObject dcerpc_fault_Type;
      77             : static PyTypeObject dcerpc_auth_Type;
      78             : static PyTypeObject dcerpc_auth3_Type;
      79             : static PyTypeObject dcerpc_orphaned_Type;
      80             : static PyTypeObject dcerpc_co_cancel_Type;
      81             : static PyTypeObject dcerpc_cl_cancel_Type;
      82             : static PyTypeObject dcerpc_cancel_ack_Type;
      83             : static PyTypeObject dcerpc_fack_Type;
      84             : static PyTypeObject dcerpc_ack_Type;
      85             : static PyTypeObject dcerpc_ping_Type;
      86             : static PyTypeObject dcerpc_shutdown_Type;
      87             : static PyTypeObject dcerpc_working_Type;
      88             : static PyTypeObject RTSCookie_Type;
      89             : static PyTypeObject ClientAddressType_Type;
      90             : static PyTypeObject ClientAddress_Type;
      91             : static PyTypeObject FlowControlAcknowledgment_Type;
      92             : static PyTypeObject dcerpc_rts_cmd_ReceiveWindowSize_Type;
      93             : static PyTypeObject dcerpc_rts_cmd_FlowControlAck_Type;
      94             : static PyTypeObject dcerpc_rts_cmd_ConnectionTimeout_Type;
      95             : static PyTypeObject dcerpc_rts_cmd_Cookie_Type;
      96             : static PyTypeObject dcerpc_rts_cmd_ChannelLifetime_Type;
      97             : static PyTypeObject dcerpc_rts_cmd_ClientKeepalive_Type;
      98             : static PyTypeObject dcerpc_rts_cmd_Version_Type;
      99             : static PyTypeObject dcerpc_rts_cmd_Empty_Type;
     100             : static PyTypeObject dcerpc_rts_cmd_Padding_Type;
     101             : static PyTypeObject dcerpc_rts_cmd_NegativeANCE_Type;
     102             : static PyTypeObject dcerpc_rts_cmd_ANCE_Type;
     103             : static PyTypeObject dcerpc_rts_cmd_ClientAddress_Type;
     104             : static PyTypeObject dcerpc_rts_cmd_AssociationGroupId_Type;
     105             : static PyTypeObject dcerpc_rts_cmd_Destination_Type;
     106             : static PyTypeObject dcerpc_rts_cmd_PingTrafficSentNotify_Type;
     107             : static PyTypeObject dcerpc_rts_cmds_Type;
     108             : static PyTypeObject dcerpc_rts_cmd_Type;
     109             : static PyTypeObject dcerpc_rts_Type;
     110             : static PyTypeObject dcerpc_payload_Type;
     111             : static PyTypeObject ncacn_packet_Type;
     112             : static PyTypeObject ncadg_packet_Type;
     113             : static PyTypeObject dcerpc_sec_vt_pcontext_Type;
     114             : static PyTypeObject dcerpc_sec_vt_header2_Type;
     115             : static PyTypeObject dcerpc_sec_vt_union_Type;
     116             : static PyTypeObject dcerpc_sec_vt_Type;
     117             : static PyTypeObject dcerpc_sec_vt_count_Type;
     118             : static PyTypeObject dcerpc_sec_verification_trailer_Type;
     119             : 
     120             : static PyTypeObject *ndr_syntax_id_Type;
     121             : static PyTypeObject *BaseObject_Type;
     122             : static PyTypeObject *GUID_Type;
     123             : 
     124        5063 : static PyObject *py_dcerpc_ctx_list_get_context_id(PyObject *obj, void *closure)
     125             : {
     126        5063 :         struct dcerpc_ctx_list *object = (struct dcerpc_ctx_list *)pytalloc_get_ptr(obj);
     127             :         PyObject *py_context_id;
     128        5063 :         py_context_id = PyLong_FromLong((uint16_t)object->context_id);
     129        5063 :         return py_context_id;
     130             : }
     131             : 
     132         652 : static int py_dcerpc_ctx_list_set_context_id(PyObject *py_obj, PyObject *value, void *closure)
     133             : {
     134         652 :         struct dcerpc_ctx_list *object = (struct dcerpc_ctx_list *)pytalloc_get_ptr(py_obj);
     135         652 :         if (value == NULL) {
     136           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->context_id");
     137           0 :                 return -1;
     138             :         }
     139             :         {
     140         652 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->context_id));
     141         652 :                 if (PyLong_Check(value)) {
     142             :                         unsigned long long test_var;
     143         652 :                         test_var = PyLong_AsUnsignedLongLong(value);
     144         652 :                         if (PyErr_Occurred() != NULL) {
     145           0 :                                 return -1;
     146             :                         }
     147         652 :                         if (test_var > uint_max) {
     148           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     149             :                                   PyLong_Type.tp_name, uint_max, test_var);
     150           0 :                                 return -1;
     151             :                         }
     152         652 :                         object->context_id = test_var;
     153             :                 } else {
     154           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     155             :                           PyLong_Type.tp_name);
     156           0 :                         return -1;
     157             :                 }
     158             :         }
     159         652 :         return 0;
     160             : }
     161             : 
     162           0 : static PyObject *py_dcerpc_ctx_list_get_num_transfer_syntaxes(PyObject *obj, void *closure)
     163             : {
     164           0 :         struct dcerpc_ctx_list *object = (struct dcerpc_ctx_list *)pytalloc_get_ptr(obj);
     165             :         PyObject *py_num_transfer_syntaxes;
     166           0 :         py_num_transfer_syntaxes = PyLong_FromLong((uint16_t)object->num_transfer_syntaxes);
     167           0 :         return py_num_transfer_syntaxes;
     168             : }
     169             : 
     170         652 : static int py_dcerpc_ctx_list_set_num_transfer_syntaxes(PyObject *py_obj, PyObject *value, void *closure)
     171             : {
     172         652 :         struct dcerpc_ctx_list *object = (struct dcerpc_ctx_list *)pytalloc_get_ptr(py_obj);
     173         652 :         if (value == NULL) {
     174           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_transfer_syntaxes");
     175           0 :                 return -1;
     176             :         }
     177             :         {
     178         652 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_transfer_syntaxes));
     179         652 :                 if (PyLong_Check(value)) {
     180             :                         unsigned long long test_var;
     181         652 :                         test_var = PyLong_AsUnsignedLongLong(value);
     182         652 :                         if (PyErr_Occurred() != NULL) {
     183           0 :                                 return -1;
     184             :                         }
     185         652 :                         if (test_var > uint_max) {
     186           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     187             :                                   PyLong_Type.tp_name, uint_max, test_var);
     188           0 :                                 return -1;
     189             :                         }
     190         652 :                         object->num_transfer_syntaxes = test_var;
     191             :                 } else {
     192           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     193             :                           PyLong_Type.tp_name);
     194           0 :                         return -1;
     195             :                 }
     196             :         }
     197         652 :         return 0;
     198             : }
     199             : 
     200           0 : static PyObject *py_dcerpc_ctx_list_get_abstract_syntax(PyObject *obj, void *closure)
     201             : {
     202           0 :         struct dcerpc_ctx_list *object = (struct dcerpc_ctx_list *)pytalloc_get_ptr(obj);
     203             :         PyObject *py_abstract_syntax;
     204           0 :         py_abstract_syntax = pytalloc_reference_ex(ndr_syntax_id_Type, pytalloc_get_mem_ctx(obj), &object->abstract_syntax);
     205           0 :         return py_abstract_syntax;
     206             : }
     207             : 
     208         652 : static int py_dcerpc_ctx_list_set_abstract_syntax(PyObject *py_obj, PyObject *value, void *closure)
     209             : {
     210         652 :         struct dcerpc_ctx_list *object = (struct dcerpc_ctx_list *)pytalloc_get_ptr(py_obj);
     211         652 :         if (value == NULL) {
     212           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->abstract_syntax");
     213           0 :                 return -1;
     214             :         }
     215         652 :         PY_CHECK_TYPE(ndr_syntax_id_Type, value, return -1;);
     216         652 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
     217           0 :                 PyErr_NoMemory();
     218           0 :                 return -1;
     219             :         }
     220         652 :         object->abstract_syntax = *(struct ndr_syntax_id *)pytalloc_get_ptr(value);
     221         652 :         return 0;
     222             : }
     223             : 
     224         901 : static PyObject *py_dcerpc_ctx_list_get_transfer_syntaxes(PyObject *obj, void *closure)
     225             : {
     226         901 :         struct dcerpc_ctx_list *object = (struct dcerpc_ctx_list *)pytalloc_get_ptr(obj);
     227             :         PyObject *py_transfer_syntaxes;
     228         901 :         py_transfer_syntaxes = PyList_New(object->num_transfer_syntaxes);
     229         901 :         if (py_transfer_syntaxes == NULL) {
     230           0 :                 return NULL;
     231             :         }
     232             :         {
     233             :                 int transfer_syntaxes_cntr_0;
     234        1802 :                 for (transfer_syntaxes_cntr_0 = 0; transfer_syntaxes_cntr_0 < (object->num_transfer_syntaxes); transfer_syntaxes_cntr_0++) {
     235             :                         PyObject *py_transfer_syntaxes_0;
     236         901 :                         py_transfer_syntaxes_0 = pytalloc_reference_ex(ndr_syntax_id_Type, object->transfer_syntaxes, &object->transfer_syntaxes[transfer_syntaxes_cntr_0]);
     237         901 :                         PyList_SetItem(py_transfer_syntaxes, transfer_syntaxes_cntr_0, py_transfer_syntaxes_0);
     238             :                 }
     239             :         }
     240         901 :         return py_transfer_syntaxes;
     241             : }
     242             : 
     243         652 : static int py_dcerpc_ctx_list_set_transfer_syntaxes(PyObject *py_obj, PyObject *value, void *closure)
     244             : {
     245         652 :         struct dcerpc_ctx_list *object = (struct dcerpc_ctx_list *)pytalloc_get_ptr(py_obj);
     246         652 :         if (value == NULL) {
     247           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->transfer_syntaxes");
     248           0 :                 return -1;
     249             :         }
     250         652 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
     251             :         {
     252             :                 int transfer_syntaxes_cntr_0;
     253         652 :                 object->transfer_syntaxes = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->transfer_syntaxes, PyList_GET_SIZE(value));
     254         652 :                 if (!object->transfer_syntaxes) { return -1;; }
     255         652 :                 talloc_set_name_const(object->transfer_syntaxes, "ARRAY: object->transfer_syntaxes");
     256        1379 :                 for (transfer_syntaxes_cntr_0 = 0; transfer_syntaxes_cntr_0 < PyList_GET_SIZE(value); transfer_syntaxes_cntr_0++) {
     257         727 :                         if (PyList_GET_ITEM(value, transfer_syntaxes_cntr_0) == NULL) {
     258           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->transfer_syntaxes[transfer_syntaxes_cntr_0]");
     259           0 :                                 return -1;
     260             :                         }
     261         727 :                         PY_CHECK_TYPE(ndr_syntax_id_Type, PyList_GET_ITEM(value, transfer_syntaxes_cntr_0), return -1;);
     262         727 :                         if (talloc_reference(object->transfer_syntaxes, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, transfer_syntaxes_cntr_0))) == NULL) {
     263           0 :                                 PyErr_NoMemory();
     264           0 :                                 return -1;
     265             :                         }
     266         727 :                         object->transfer_syntaxes[transfer_syntaxes_cntr_0] = *(struct ndr_syntax_id *)pytalloc_get_ptr(PyList_GET_ITEM(value, transfer_syntaxes_cntr_0));
     267             :                 }
     268             :         }
     269         652 :         return 0;
     270             : }
     271             : 
     272             : static PyGetSetDef py_dcerpc_ctx_list_getsetters[] = {
     273             :         {
     274             :                 .name = discard_const_p(char, "context_id"),
     275             :                 .get = py_dcerpc_ctx_list_get_context_id,
     276             :                 .set = py_dcerpc_ctx_list_set_context_id,
     277             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
     278             :         },
     279             :         {
     280             :                 .name = discard_const_p(char, "num_transfer_syntaxes"),
     281             :                 .get = py_dcerpc_ctx_list_get_num_transfer_syntaxes,
     282             :                 .set = py_dcerpc_ctx_list_set_num_transfer_syntaxes,
     283             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
     284             :         },
     285             :         {
     286             :                 .name = discard_const_p(char, "abstract_syntax"),
     287             :                 .get = py_dcerpc_ctx_list_get_abstract_syntax,
     288             :                 .set = py_dcerpc_ctx_list_set_abstract_syntax,
     289             :                 .doc = discard_const_p(char, "PIDL-generated element of base type ndr_syntax_id")
     290             :         },
     291             :         {
     292             :                 .name = discard_const_p(char, "transfer_syntaxes"),
     293             :                 .get = py_dcerpc_ctx_list_get_transfer_syntaxes,
     294             :                 .set = py_dcerpc_ctx_list_set_transfer_syntaxes,
     295             :                 .doc = discard_const_p(char, "PIDL-generated element of base type ndr_syntax_id")
     296             :         },
     297             :         { .name = NULL }
     298             : };
     299             : 
     300         652 : static PyObject *py_dcerpc_ctx_list_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     301             : {
     302         652 :         return pytalloc_new(struct dcerpc_ctx_list, type);
     303             : }
     304             : 
     305             : 
     306             : static PyTypeObject dcerpc_ctx_list_Type = {
     307             :         PyVarObject_HEAD_INIT(NULL, 0)
     308             :         .tp_name = "dcerpc.ctx_list",
     309             :         .tp_getset = py_dcerpc_ctx_list_getsetters,
     310             :         .tp_methods = NULL,
     311             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
     312             :         .tp_new = py_dcerpc_ctx_list_new,
     313             : };
     314             : 
     315             : 
     316        1159 : static PyObject *py_dcerpc_bind_get_max_xmit_frag(PyObject *obj, void *closure)
     317             : {
     318        1159 :         struct dcerpc_bind *object = (struct dcerpc_bind *)pytalloc_get_ptr(obj);
     319             :         PyObject *py_max_xmit_frag;
     320        1159 :         py_max_xmit_frag = PyLong_FromLong((uint16_t)object->max_xmit_frag);
     321        1159 :         return py_max_xmit_frag;
     322             : }
     323             : 
     324        1342 : static int py_dcerpc_bind_set_max_xmit_frag(PyObject *py_obj, PyObject *value, void *closure)
     325             : {
     326        1342 :         struct dcerpc_bind *object = (struct dcerpc_bind *)pytalloc_get_ptr(py_obj);
     327        1342 :         if (value == NULL) {
     328           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->max_xmit_frag");
     329           0 :                 return -1;
     330             :         }
     331             :         {
     332        1342 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->max_xmit_frag));
     333        1342 :                 if (PyLong_Check(value)) {
     334             :                         unsigned long long test_var;
     335        1342 :                         test_var = PyLong_AsUnsignedLongLong(value);
     336        1342 :                         if (PyErr_Occurred() != NULL) {
     337           0 :                                 return -1;
     338             :                         }
     339        1342 :                         if (test_var > uint_max) {
     340           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     341             :                                   PyLong_Type.tp_name, uint_max, test_var);
     342           0 :                                 return -1;
     343             :                         }
     344        1342 :                         object->max_xmit_frag = test_var;
     345             :                 } else {
     346           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     347             :                           PyLong_Type.tp_name);
     348           0 :                         return -1;
     349             :                 }
     350             :         }
     351        1342 :         return 0;
     352             : }
     353             : 
     354        1159 : static PyObject *py_dcerpc_bind_get_max_recv_frag(PyObject *obj, void *closure)
     355             : {
     356        1159 :         struct dcerpc_bind *object = (struct dcerpc_bind *)pytalloc_get_ptr(obj);
     357             :         PyObject *py_max_recv_frag;
     358        1159 :         py_max_recv_frag = PyLong_FromLong((uint16_t)object->max_recv_frag);
     359        1159 :         return py_max_recv_frag;
     360             : }
     361             : 
     362        1342 : static int py_dcerpc_bind_set_max_recv_frag(PyObject *py_obj, PyObject *value, void *closure)
     363             : {
     364        1342 :         struct dcerpc_bind *object = (struct dcerpc_bind *)pytalloc_get_ptr(py_obj);
     365        1342 :         if (value == NULL) {
     366           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->max_recv_frag");
     367           0 :                 return -1;
     368             :         }
     369             :         {
     370        1342 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->max_recv_frag));
     371        1342 :                 if (PyLong_Check(value)) {
     372             :                         unsigned long long test_var;
     373        1342 :                         test_var = PyLong_AsUnsignedLongLong(value);
     374        1342 :                         if (PyErr_Occurred() != NULL) {
     375           0 :                                 return -1;
     376             :                         }
     377        1342 :                         if (test_var > uint_max) {
     378           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     379             :                                   PyLong_Type.tp_name, uint_max, test_var);
     380           0 :                                 return -1;
     381             :                         }
     382        1342 :                         object->max_recv_frag = test_var;
     383             :                 } else {
     384           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     385             :                           PyLong_Type.tp_name);
     386           0 :                         return -1;
     387             :                 }
     388             :         }
     389        1342 :         return 0;
     390             : }
     391             : 
     392         282 : static PyObject *py_dcerpc_bind_get_assoc_group_id(PyObject *obj, void *closure)
     393             : {
     394         282 :         struct dcerpc_bind *object = (struct dcerpc_bind *)pytalloc_get_ptr(obj);
     395             :         PyObject *py_assoc_group_id;
     396         282 :         py_assoc_group_id = PyLong_FromUnsignedLongLong((uint32_t)object->assoc_group_id);
     397         282 :         return py_assoc_group_id;
     398             : }
     399             : 
     400        1342 : static int py_dcerpc_bind_set_assoc_group_id(PyObject *py_obj, PyObject *value, void *closure)
     401             : {
     402        1342 :         struct dcerpc_bind *object = (struct dcerpc_bind *)pytalloc_get_ptr(py_obj);
     403        1342 :         if (value == NULL) {
     404           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->assoc_group_id");
     405           0 :                 return -1;
     406             :         }
     407             :         {
     408        1342 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->assoc_group_id));
     409        1342 :                 if (PyLong_Check(value)) {
     410             :                         unsigned long long test_var;
     411        1342 :                         test_var = PyLong_AsUnsignedLongLong(value);
     412        1342 :                         if (PyErr_Occurred() != NULL) {
     413           0 :                                 return -1;
     414             :                         }
     415        1342 :                         if (test_var > uint_max) {
     416           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     417             :                                   PyLong_Type.tp_name, uint_max, test_var);
     418           0 :                                 return -1;
     419             :                         }
     420        1342 :                         object->assoc_group_id = test_var;
     421             :                 } else {
     422           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     423             :                           PyLong_Type.tp_name);
     424           0 :                         return -1;
     425             :                 }
     426             :         }
     427        1342 :         return 0;
     428             : }
     429             : 
     430           0 : static PyObject *py_dcerpc_bind_get_num_contexts(PyObject *obj, void *closure)
     431             : {
     432           0 :         struct dcerpc_bind *object = (struct dcerpc_bind *)pytalloc_get_ptr(obj);
     433             :         PyObject *py_num_contexts;
     434           0 :         py_num_contexts = PyLong_FromLong((uint16_t)object->num_contexts);
     435           0 :         return py_num_contexts;
     436             : }
     437             : 
     438        1342 : static int py_dcerpc_bind_set_num_contexts(PyObject *py_obj, PyObject *value, void *closure)
     439             : {
     440        1342 :         struct dcerpc_bind *object = (struct dcerpc_bind *)pytalloc_get_ptr(py_obj);
     441        1342 :         if (value == NULL) {
     442           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_contexts");
     443           0 :                 return -1;
     444             :         }
     445             :         {
     446        1342 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_contexts));
     447        1342 :                 if (PyLong_Check(value)) {
     448             :                         unsigned long long test_var;
     449        1342 :                         test_var = PyLong_AsUnsignedLongLong(value);
     450        1342 :                         if (PyErr_Occurred() != NULL) {
     451           0 :                                 return -1;
     452             :                         }
     453        1342 :                         if (test_var > uint_max) {
     454           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     455             :                                   PyLong_Type.tp_name, uint_max, test_var);
     456           0 :                                 return -1;
     457             :                         }
     458        1342 :                         object->num_contexts = test_var;
     459             :                 } else {
     460           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     461             :                           PyLong_Type.tp_name);
     462           0 :                         return -1;
     463             :                 }
     464             :         }
     465        1342 :         return 0;
     466             : }
     467             : 
     468           0 : static PyObject *py_dcerpc_bind_get_ctx_list(PyObject *obj, void *closure)
     469             : {
     470           0 :         struct dcerpc_bind *object = (struct dcerpc_bind *)pytalloc_get_ptr(obj);
     471             :         PyObject *py_ctx_list;
     472           0 :         py_ctx_list = PyList_New(object->num_contexts);
     473           0 :         if (py_ctx_list == NULL) {
     474           0 :                 return NULL;
     475             :         }
     476             :         {
     477             :                 int ctx_list_cntr_0;
     478           0 :                 for (ctx_list_cntr_0 = 0; ctx_list_cntr_0 < (object->num_contexts); ctx_list_cntr_0++) {
     479             :                         PyObject *py_ctx_list_0;
     480           0 :                         py_ctx_list_0 = pytalloc_reference_ex(&dcerpc_ctx_list_Type, object->ctx_list, &object->ctx_list[ctx_list_cntr_0]);
     481           0 :                         PyList_SetItem(py_ctx_list, ctx_list_cntr_0, py_ctx_list_0);
     482             :                 }
     483             :         }
     484           0 :         return py_ctx_list;
     485             : }
     486             : 
     487        1342 : static int py_dcerpc_bind_set_ctx_list(PyObject *py_obj, PyObject *value, void *closure)
     488             : {
     489        1342 :         struct dcerpc_bind *object = (struct dcerpc_bind *)pytalloc_get_ptr(py_obj);
     490        1342 :         if (value == NULL) {
     491           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ctx_list");
     492           0 :                 return -1;
     493             :         }
     494        1342 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
     495             :         {
     496             :                 int ctx_list_cntr_0;
     497        1342 :                 object->ctx_list = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->ctx_list, PyList_GET_SIZE(value));
     498        1342 :                 if (!object->ctx_list) { return -1;; }
     499        1342 :                 talloc_set_name_const(object->ctx_list, "ARRAY: object->ctx_list");
     500        2690 :                 for (ctx_list_cntr_0 = 0; ctx_list_cntr_0 < PyList_GET_SIZE(value); ctx_list_cntr_0++) {
     501        1348 :                         if (PyList_GET_ITEM(value, ctx_list_cntr_0) == NULL) {
     502           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ctx_list[ctx_list_cntr_0]");
     503           0 :                                 return -1;
     504             :                         }
     505        1348 :                         PY_CHECK_TYPE(&dcerpc_ctx_list_Type, PyList_GET_ITEM(value, ctx_list_cntr_0), return -1;);
     506        1348 :                         if (talloc_reference(object->ctx_list, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, ctx_list_cntr_0))) == NULL) {
     507           0 :                                 PyErr_NoMemory();
     508           0 :                                 return -1;
     509             :                         }
     510        1348 :                         object->ctx_list[ctx_list_cntr_0] = *(struct dcerpc_ctx_list *)pytalloc_get_ptr(PyList_GET_ITEM(value, ctx_list_cntr_0));
     511             :                 }
     512             :         }
     513        1342 :         return 0;
     514             : }
     515             : 
     516        2155 : static PyObject *py_dcerpc_bind_get_auth_info(PyObject *obj, void *closure)
     517             : {
     518        2155 :         struct dcerpc_bind *object = (struct dcerpc_bind *)pytalloc_get_ptr(obj);
     519             :         PyObject *py_auth_info;
     520        2155 :         py_auth_info = PyBytes_FromStringAndSize((char *)(object->auth_info).data, (object->auth_info).length);
     521        2155 :         return py_auth_info;
     522             : }
     523             : 
     524        1342 : static int py_dcerpc_bind_set_auth_info(PyObject *py_obj, PyObject *value, void *closure)
     525             : {
     526        1342 :         struct dcerpc_bind *object = (struct dcerpc_bind *)pytalloc_get_ptr(py_obj);
     527        1342 :         if (value == NULL) {
     528           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->auth_info");
     529           0 :                 return -1;
     530             :         }
     531        1342 :         object->auth_info = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
     532        1342 :         return 0;
     533             : }
     534             : 
     535             : static PyGetSetDef py_dcerpc_bind_getsetters[] = {
     536             :         {
     537             :                 .name = discard_const_p(char, "max_xmit_frag"),
     538             :                 .get = py_dcerpc_bind_get_max_xmit_frag,
     539             :                 .set = py_dcerpc_bind_set_max_xmit_frag,
     540             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
     541             :         },
     542             :         {
     543             :                 .name = discard_const_p(char, "max_recv_frag"),
     544             :                 .get = py_dcerpc_bind_get_max_recv_frag,
     545             :                 .set = py_dcerpc_bind_set_max_recv_frag,
     546             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
     547             :         },
     548             :         {
     549             :                 .name = discard_const_p(char, "assoc_group_id"),
     550             :                 .get = py_dcerpc_bind_get_assoc_group_id,
     551             :                 .set = py_dcerpc_bind_set_assoc_group_id,
     552             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     553             :         },
     554             :         {
     555             :                 .name = discard_const_p(char, "num_contexts"),
     556             :                 .get = py_dcerpc_bind_get_num_contexts,
     557             :                 .set = py_dcerpc_bind_set_num_contexts,
     558             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
     559             :         },
     560             :         {
     561             :                 .name = discard_const_p(char, "ctx_list"),
     562             :                 .get = py_dcerpc_bind_get_ctx_list,
     563             :                 .set = py_dcerpc_bind_set_ctx_list,
     564             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dcerpc_ctx_list")
     565             :         },
     566             :         {
     567             :                 .name = discard_const_p(char, "auth_info"),
     568             :                 .get = py_dcerpc_bind_get_auth_info,
     569             :                 .set = py_dcerpc_bind_set_auth_info,
     570             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
     571             :         },
     572             :         { .name = NULL }
     573             : };
     574             : 
     575        1342 : static PyObject *py_dcerpc_bind_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     576             : {
     577        1342 :         return pytalloc_new(struct dcerpc_bind, type);
     578             : }
     579             : 
     580           0 : static PyObject *py_dcerpc_bind_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
     581             : {
     582           0 :         struct dcerpc_bind *object = (struct dcerpc_bind *)pytalloc_get_ptr(py_obj);
     583           0 :         PyObject *ret = NULL;
     584             :         DATA_BLOB blob;
     585             :         enum ndr_err_code err;
     586           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
     587           0 :         if (tmp_ctx == NULL) {
     588           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
     589           0 :                 return NULL;
     590             :         }
     591           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_dcerpc_bind);
     592           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
     593           0 :                 TALLOC_FREE(tmp_ctx);
     594           0 :                 PyErr_SetNdrError(err);
     595           0 :                 return NULL;
     596             :         }
     597             : 
     598           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
     599           0 :         TALLOC_FREE(tmp_ctx);
     600           0 :         return ret;
     601             : }
     602             : 
     603           0 : static PyObject *py_dcerpc_bind_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
     604             : {
     605           0 :         struct dcerpc_bind *object = (struct dcerpc_bind *)pytalloc_get_ptr(py_obj);
     606           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
     607           0 :         Py_ssize_t blob_length = 0;
     608             :         enum ndr_err_code err;
     609           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
     610           0 :         PyObject *allow_remaining_obj = NULL;
     611           0 :         bool allow_remaining = false;
     612             : 
     613           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
     614             :                 discard_const_p(char *, kwnames),
     615             :                 &blob.data, &blob_length,
     616             :                 &allow_remaining_obj)) {
     617           0 :                 return NULL;
     618             :         }
     619           0 :         blob.length = blob_length;
     620             : 
     621           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
     622           0 :                 allow_remaining = true;
     623             :         }
     624             : 
     625           0 :         if (allow_remaining) {
     626           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_bind);
     627             :         } else {
     628           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_bind);
     629             :         }
     630           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
     631           0 :                 PyErr_SetNdrError(err);
     632           0 :                 return NULL;
     633             :         }
     634             : 
     635           0 :         Py_RETURN_NONE;
     636             : }
     637             : 
     638           0 : static PyObject *py_dcerpc_bind_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
     639             : {
     640           0 :         struct dcerpc_bind *object = (struct dcerpc_bind *)pytalloc_get_ptr(py_obj);
     641             :         PyObject *ret;
     642             :         char *retstr;
     643             : 
     644           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_dcerpc_bind, "dcerpc_bind", object);
     645           0 :         ret = PyUnicode_FromString(retstr);
     646           0 :         talloc_free(retstr);
     647             : 
     648           0 :         return ret;
     649             : }
     650             : 
     651             : static PyMethodDef py_dcerpc_bind_methods[] = {
     652             :         { "__ndr_pack__", (PyCFunction)py_dcerpc_bind_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
     653             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_bind_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
     654             :         { "__ndr_print__", (PyCFunction)py_dcerpc_bind_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
     655             :         { NULL, NULL, 0, NULL }
     656             : };
     657             : 
     658             : 
     659             : static PyTypeObject dcerpc_bind_Type = {
     660             :         PyVarObject_HEAD_INIT(NULL, 0)
     661             :         .tp_name = "dcerpc.bind",
     662             :         .tp_getset = py_dcerpc_bind_getsetters,
     663             :         .tp_methods = py_dcerpc_bind_methods,
     664             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
     665             :         .tp_new = py_dcerpc_bind_new,
     666             : };
     667             : 
     668             : 
     669           0 : static PyObject *py_dcerpc_empty_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     670             : {
     671           0 :         return pytalloc_new(struct dcerpc_empty, type);
     672             : }
     673             : 
     674             : 
     675             : static PyTypeObject dcerpc_empty_Type = {
     676             :         PyVarObject_HEAD_INIT(NULL, 0)
     677             :         .tp_name = "dcerpc.empty",
     678             :         .tp_getset = NULL,
     679             :         .tp_methods = NULL,
     680             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
     681             :         .tp_new = py_dcerpc_empty_new,
     682             : };
     683             : 
     684           0 : static PyObject *py_import_dcerpc_object(TALLOC_CTX *mem_ctx, int level, union dcerpc_object *in)
     685             : {
     686             :         PyObject *ret;
     687             : 
     688           0 :         switch (level) {
     689           0 :                 case LIBNDR_FLAG_OBJECT_PRESENT:
     690           0 :                         ret = pytalloc_reference_ex(GUID_Type, mem_ctx, &in->object);
     691           0 :                         return ret;
     692             : 
     693           0 :                 default:
     694           0 :                         ret = pytalloc_reference_ex(&dcerpc_empty_Type, mem_ctx, &in->empty);
     695           0 :                         return ret;
     696             : 
     697             :         }
     698             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
     699             :         return NULL;
     700             : }
     701             : 
     702           0 : static union dcerpc_object *py_export_dcerpc_object(TALLOC_CTX *mem_ctx, int level, PyObject *in)
     703             : {
     704           0 :         union dcerpc_object *ret = talloc_zero(mem_ctx, union dcerpc_object);
     705           0 :         switch (level) {
     706           0 :                 case LIBNDR_FLAG_OBJECT_PRESENT:
     707           0 :                         if (in == NULL) {
     708           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->object");
     709           0 :                                 talloc_free(ret); return NULL;
     710             :                         }
     711           0 :                         PY_CHECK_TYPE(GUID_Type, in, talloc_free(ret); return NULL;);
     712           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
     713           0 :                                 PyErr_NoMemory();
     714           0 :                                 talloc_free(ret); return NULL;
     715             :                         }
     716           0 :                         ret->object = *(struct GUID *)pytalloc_get_ptr(in);
     717           0 :                         break;
     718             : 
     719           0 :                 default:
     720           0 :                         if (in == NULL) {
     721           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->empty");
     722           0 :                                 talloc_free(ret); return NULL;
     723             :                         }
     724           0 :                         PY_CHECK_TYPE(&dcerpc_empty_Type, in, talloc_free(ret); return NULL;);
     725           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
     726           0 :                                 PyErr_NoMemory();
     727           0 :                                 talloc_free(ret); return NULL;
     728             :                         }
     729           0 :                         ret->empty = *(struct dcerpc_empty *)pytalloc_get_ptr(in);
     730           0 :                         break;
     731             : 
     732             :         }
     733             : 
     734           0 :         return ret;
     735             : }
     736             : 
     737           0 : static PyObject *py_dcerpc_object_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     738             : {
     739           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
     740           0 :         PyObject *mem_ctx_obj = NULL;
     741           0 :         TALLOC_CTX *mem_ctx = NULL;
     742           0 :         int level = 0;
     743           0 :         PyObject *in_obj = NULL;
     744           0 :         union dcerpc_object *in = NULL;
     745             : 
     746           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
     747             :                 discard_const_p(char *, kwnames),
     748             :                 &mem_ctx_obj,
     749             :                 &level,
     750             :                 &in_obj)) {
     751           0 :                 return NULL;
     752             :         }
     753           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
     754           0 :         if (mem_ctx == NULL) {
     755           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
     756           0 :                 return NULL;
     757             :         }
     758           0 :         in = (union dcerpc_object *)pytalloc_get_ptr(in_obj);
     759           0 :         if (in == NULL) {
     760           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union dcerpc_object!");
     761           0 :                 return NULL;
     762             :         }
     763             : 
     764           0 :         return py_import_dcerpc_object(mem_ctx, level, in);
     765             : }
     766             : 
     767           0 : static PyObject *py_dcerpc_object_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     768             : {
     769           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
     770           0 :         PyObject *mem_ctx_obj = NULL;
     771           0 :         TALLOC_CTX *mem_ctx = NULL;
     772           0 :         int level = 0;
     773           0 :         PyObject *in = NULL;
     774           0 :         union dcerpc_object *out = NULL;
     775             : 
     776           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
     777             :                 discard_const_p(char *, kwnames),
     778             :                 &mem_ctx_obj,
     779             :                 &level,
     780             :                 &in)) {
     781           0 :                 return NULL;
     782             :         }
     783           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
     784           0 :         if (mem_ctx == NULL) {
     785           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
     786           0 :                 return NULL;
     787             :         }
     788             : 
     789           0 :         out = py_export_dcerpc_object(mem_ctx, level, in);
     790           0 :         if (out == NULL) {
     791           0 :                 return NULL;
     792             :         }
     793             : 
     794           0 :         return pytalloc_GenericObject_reference(out);
     795             : }
     796             : 
     797             : static PyMethodDef py_dcerpc_object_methods[] = {
     798             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_object_import),
     799             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
     800             :                 "T.__import__(mem_ctx, level, in) => ret." },
     801             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_object_export),
     802             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
     803             :                 "T.__export__(mem_ctx, level, in) => ret." },
     804             :         { NULL, NULL, 0, NULL }
     805             : };
     806             : 
     807           0 : static PyObject *py_dcerpc_object_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     808             : {
     809           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
     810           0 :         return NULL;
     811             : }
     812             : 
     813             : 
     814             : static PyTypeObject dcerpc_object_Type = {
     815             :         PyVarObject_HEAD_INIT(NULL, 0)
     816             :         .tp_name = "dcerpc.object",
     817             :         .tp_getset = NULL,
     818             :         .tp_methods = py_dcerpc_object_methods,
     819             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
     820             :         .tp_new = py_dcerpc_object_new,
     821             : };
     822             : 
     823             : 
     824           0 : static PyObject *py_dcerpc_request_get_alloc_hint(PyObject *obj, void *closure)
     825             : {
     826           0 :         struct dcerpc_request *object = (struct dcerpc_request *)pytalloc_get_ptr(obj);
     827             :         PyObject *py_alloc_hint;
     828           0 :         py_alloc_hint = PyLong_FromUnsignedLongLong((uint32_t)object->alloc_hint);
     829           0 :         return py_alloc_hint;
     830             : }
     831             : 
     832        4193 : static int py_dcerpc_request_set_alloc_hint(PyObject *py_obj, PyObject *value, void *closure)
     833             : {
     834        4193 :         struct dcerpc_request *object = (struct dcerpc_request *)pytalloc_get_ptr(py_obj);
     835        4193 :         if (value == NULL) {
     836           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->alloc_hint");
     837           0 :                 return -1;
     838             :         }
     839             :         {
     840        4193 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->alloc_hint));
     841        4193 :                 if (PyLong_Check(value)) {
     842             :                         unsigned long long test_var;
     843        4193 :                         test_var = PyLong_AsUnsignedLongLong(value);
     844        4193 :                         if (PyErr_Occurred() != NULL) {
     845           0 :                                 return -1;
     846             :                         }
     847        4193 :                         if (test_var > uint_max) {
     848           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     849             :                                   PyLong_Type.tp_name, uint_max, test_var);
     850           0 :                                 return -1;
     851             :                         }
     852        4193 :                         object->alloc_hint = test_var;
     853             :                 } else {
     854           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     855             :                           PyLong_Type.tp_name);
     856           0 :                         return -1;
     857             :                 }
     858             :         }
     859        4193 :         return 0;
     860             : }
     861             : 
     862         376 : static PyObject *py_dcerpc_request_get_context_id(PyObject *obj, void *closure)
     863             : {
     864         376 :         struct dcerpc_request *object = (struct dcerpc_request *)pytalloc_get_ptr(obj);
     865             :         PyObject *py_context_id;
     866         376 :         py_context_id = PyLong_FromLong((uint16_t)object->context_id);
     867         376 :         return py_context_id;
     868             : }
     869             : 
     870        4193 : static int py_dcerpc_request_set_context_id(PyObject *py_obj, PyObject *value, void *closure)
     871             : {
     872        4193 :         struct dcerpc_request *object = (struct dcerpc_request *)pytalloc_get_ptr(py_obj);
     873        4193 :         if (value == NULL) {
     874           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->context_id");
     875           0 :                 return -1;
     876             :         }
     877             :         {
     878        4193 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->context_id));
     879        4193 :                 if (PyLong_Check(value)) {
     880             :                         unsigned long long test_var;
     881        4193 :                         test_var = PyLong_AsUnsignedLongLong(value);
     882        4193 :                         if (PyErr_Occurred() != NULL) {
     883           0 :                                 return -1;
     884             :                         }
     885        4193 :                         if (test_var > uint_max) {
     886           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     887             :                                   PyLong_Type.tp_name, uint_max, test_var);
     888           0 :                                 return -1;
     889             :                         }
     890        4193 :                         object->context_id = test_var;
     891             :                 } else {
     892           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     893             :                           PyLong_Type.tp_name);
     894           0 :                         return -1;
     895             :                 }
     896             :         }
     897        4193 :         return 0;
     898             : }
     899             : 
     900           0 : static PyObject *py_dcerpc_request_get_opnum(PyObject *obj, void *closure)
     901             : {
     902           0 :         struct dcerpc_request *object = (struct dcerpc_request *)pytalloc_get_ptr(obj);
     903             :         PyObject *py_opnum;
     904           0 :         py_opnum = PyLong_FromLong((uint16_t)object->opnum);
     905           0 :         return py_opnum;
     906             : }
     907             : 
     908        4193 : static int py_dcerpc_request_set_opnum(PyObject *py_obj, PyObject *value, void *closure)
     909             : {
     910        4193 :         struct dcerpc_request *object = (struct dcerpc_request *)pytalloc_get_ptr(py_obj);
     911        4193 :         if (value == NULL) {
     912           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->opnum");
     913           0 :                 return -1;
     914             :         }
     915             :         {
     916        4193 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->opnum));
     917        4193 :                 if (PyLong_Check(value)) {
     918             :                         unsigned long long test_var;
     919        4193 :                         test_var = PyLong_AsUnsignedLongLong(value);
     920        4193 :                         if (PyErr_Occurred() != NULL) {
     921           0 :                                 return -1;
     922             :                         }
     923        4193 :                         if (test_var > uint_max) {
     924           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     925             :                                   PyLong_Type.tp_name, uint_max, test_var);
     926           0 :                                 return -1;
     927             :                         }
     928        4193 :                         object->opnum = test_var;
     929             :                 } else {
     930           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     931             :                           PyLong_Type.tp_name);
     932           0 :                         return -1;
     933             :                 }
     934             :         }
     935        4193 :         return 0;
     936             : }
     937             : 
     938           0 : static PyObject *py_dcerpc_request_get_object(PyObject *obj, void *closure)
     939             : {
     940           0 :         struct dcerpc_request *object = (struct dcerpc_request *)pytalloc_get_ptr(obj);
     941             :         PyObject *py_object;
     942           0 :         py_object = pyrpc_import_union(&dcerpc_object_Type, pytalloc_get_mem_ctx(obj), NDR_DCERPC_REQUEST_OBJECT_PRESENT, &object->object, "union dcerpc_object");
     943           0 :         if (py_object == NULL) {
     944           0 :                 return NULL;
     945             :         }
     946           0 :         return py_object;
     947             : }
     948             : 
     949           0 : static int py_dcerpc_request_set_object(PyObject *py_obj, PyObject *value, void *closure)
     950             : {
     951           0 :         struct dcerpc_request *object = (struct dcerpc_request *)pytalloc_get_ptr(py_obj);
     952           0 :         if (value == NULL) {
     953           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->object");
     954           0 :                 return -1;
     955             :         }
     956             :         {
     957             :                 union dcerpc_object *object_switch_0;
     958           0 :                 object_switch_0 = (union dcerpc_object *)pyrpc_export_union(&dcerpc_object_Type, pytalloc_get_mem_ctx(py_obj), NDR_DCERPC_REQUEST_OBJECT_PRESENT, value, "union dcerpc_object");
     959           0 :                 if (object_switch_0 == NULL) {
     960           0 :                         return -1;
     961             :                 }
     962           0 :                 object->object = *object_switch_0;
     963             :         }
     964           0 :         return 0;
     965             : }
     966             : 
     967         648 : static PyObject *py_dcerpc_request_get_stub_and_verifier(PyObject *obj, void *closure)
     968             : {
     969         648 :         struct dcerpc_request *object = (struct dcerpc_request *)pytalloc_get_ptr(obj);
     970             :         PyObject *py_stub_and_verifier;
     971         648 :         py_stub_and_verifier = PyBytes_FromStringAndSize((char *)(object->stub_and_verifier).data, (object->stub_and_verifier).length);
     972         648 :         return py_stub_and_verifier;
     973             : }
     974             : 
     975        4517 : static int py_dcerpc_request_set_stub_and_verifier(PyObject *py_obj, PyObject *value, void *closure)
     976             : {
     977        4517 :         struct dcerpc_request *object = (struct dcerpc_request *)pytalloc_get_ptr(py_obj);
     978        4517 :         if (value == NULL) {
     979           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->stub_and_verifier");
     980           0 :                 return -1;
     981             :         }
     982        4517 :         object->stub_and_verifier = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
     983        4517 :         return 0;
     984             : }
     985             : 
     986             : static PyGetSetDef py_dcerpc_request_getsetters[] = {
     987             :         {
     988             :                 .name = discard_const_p(char, "alloc_hint"),
     989             :                 .get = py_dcerpc_request_get_alloc_hint,
     990             :                 .set = py_dcerpc_request_set_alloc_hint,
     991             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     992             :         },
     993             :         {
     994             :                 .name = discard_const_p(char, "context_id"),
     995             :                 .get = py_dcerpc_request_get_context_id,
     996             :                 .set = py_dcerpc_request_set_context_id,
     997             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
     998             :         },
     999             :         {
    1000             :                 .name = discard_const_p(char, "opnum"),
    1001             :                 .get = py_dcerpc_request_get_opnum,
    1002             :                 .set = py_dcerpc_request_set_opnum,
    1003             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    1004             :         },
    1005             :         {
    1006             :                 .name = discard_const_p(char, "object"),
    1007             :                 .get = py_dcerpc_request_get_object,
    1008             :                 .set = py_dcerpc_request_set_object,
    1009             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dcerpc_object")
    1010             :         },
    1011             :         {
    1012             :                 .name = discard_const_p(char, "stub_and_verifier"),
    1013             :                 .get = py_dcerpc_request_get_stub_and_verifier,
    1014             :                 .set = py_dcerpc_request_set_stub_and_verifier,
    1015             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
    1016             :         },
    1017             :         { .name = NULL }
    1018             : };
    1019             : 
    1020        4193 : static PyObject *py_dcerpc_request_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1021             : {
    1022        4193 :         return pytalloc_new(struct dcerpc_request, type);
    1023             : }
    1024             : 
    1025             : 
    1026             : static PyTypeObject dcerpc_request_Type = {
    1027             :         PyVarObject_HEAD_INIT(NULL, 0)
    1028             :         .tp_name = "dcerpc.request",
    1029             :         .tp_getset = py_dcerpc_request_getsetters,
    1030             :         .tp_methods = NULL,
    1031             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1032             :         .tp_new = py_dcerpc_request_new,
    1033             : };
    1034             : 
    1035        1222 : static PyObject *py_import_dcerpc_bind_ack_reason(TALLOC_CTX *mem_ctx, int level, union dcerpc_bind_ack_reason *in)
    1036             : {
    1037             :         PyObject *ret;
    1038             : 
    1039        1222 :         switch (level) {
    1040          15 :                 case DCERPC_BIND_ACK_RESULT_NEGOTIATE_ACK:
    1041          15 :                         ret = PyLong_FromLong((uint16_t)in->negotiate);
    1042          15 :                         return ret;
    1043             : 
    1044        1207 :                 default:
    1045        1207 :                         ret = PyLong_FromLong((uint16_t)in->value);
    1046        1207 :                         return ret;
    1047             : 
    1048             :         }
    1049             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
    1050             :         return NULL;
    1051             : }
    1052             : 
    1053           0 : static union dcerpc_bind_ack_reason *py_export_dcerpc_bind_ack_reason(TALLOC_CTX *mem_ctx, int level, PyObject *in)
    1054             : {
    1055           0 :         union dcerpc_bind_ack_reason *ret = talloc_zero(mem_ctx, union dcerpc_bind_ack_reason);
    1056           0 :         switch (level) {
    1057           0 :                 case DCERPC_BIND_ACK_RESULT_NEGOTIATE_ACK:
    1058           0 :                         if (in == NULL) {
    1059           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->negotiate");
    1060           0 :                                 talloc_free(ret); return NULL;
    1061             :                         }
    1062             :                         {
    1063           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->negotiate));
    1064           0 :                                 if (PyLong_Check(in)) {
    1065             :                                         unsigned long long test_var;
    1066           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
    1067           0 :                                         if (PyErr_Occurred() != NULL) {
    1068           0 :                                                 talloc_free(ret); return NULL;
    1069             :                                         }
    1070           0 :                                         if (test_var > uint_max) {
    1071           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1072             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    1073           0 :                                                 talloc_free(ret); return NULL;
    1074             :                                         }
    1075           0 :                                         ret->negotiate = test_var;
    1076             :                                 } else {
    1077           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1078             :                                           PyLong_Type.tp_name);
    1079           0 :                                         talloc_free(ret); return NULL;
    1080             :                                 }
    1081             :                         }
    1082           0 :                         break;
    1083             : 
    1084           0 :                 default:
    1085           0 :                         if (in == NULL) {
    1086           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->value");
    1087           0 :                                 talloc_free(ret); return NULL;
    1088             :                         }
    1089             :                         {
    1090           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->value));
    1091           0 :                                 if (PyLong_Check(in)) {
    1092             :                                         unsigned long long test_var;
    1093           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
    1094           0 :                                         if (PyErr_Occurred() != NULL) {
    1095           0 :                                                 talloc_free(ret); return NULL;
    1096             :                                         }
    1097           0 :                                         if (test_var > uint_max) {
    1098           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1099             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    1100           0 :                                                 talloc_free(ret); return NULL;
    1101             :                                         }
    1102           0 :                                         ret->value = test_var;
    1103             :                                 } else {
    1104           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1105             :                                           PyLong_Type.tp_name);
    1106           0 :                                         talloc_free(ret); return NULL;
    1107             :                                 }
    1108             :                         }
    1109           0 :                         break;
    1110             : 
    1111             :         }
    1112             : 
    1113           0 :         return ret;
    1114             : }
    1115             : 
    1116        1222 : static PyObject *py_dcerpc_bind_ack_reason_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1117             : {
    1118        1222 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    1119        1222 :         PyObject *mem_ctx_obj = NULL;
    1120        1222 :         TALLOC_CTX *mem_ctx = NULL;
    1121        1222 :         int level = 0;
    1122        1222 :         PyObject *in_obj = NULL;
    1123        1222 :         union dcerpc_bind_ack_reason *in = NULL;
    1124             : 
    1125        1222 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
    1126             :                 discard_const_p(char *, kwnames),
    1127             :                 &mem_ctx_obj,
    1128             :                 &level,
    1129             :                 &in_obj)) {
    1130           0 :                 return NULL;
    1131             :         }
    1132        1222 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    1133        1222 :         if (mem_ctx == NULL) {
    1134           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    1135           0 :                 return NULL;
    1136             :         }
    1137        1222 :         in = (union dcerpc_bind_ack_reason *)pytalloc_get_ptr(in_obj);
    1138        1222 :         if (in == NULL) {
    1139           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union dcerpc_bind_ack_reason!");
    1140           0 :                 return NULL;
    1141             :         }
    1142             : 
    1143        1222 :         return py_import_dcerpc_bind_ack_reason(mem_ctx, level, in);
    1144             : }
    1145             : 
    1146           0 : static PyObject *py_dcerpc_bind_ack_reason_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1147             : {
    1148           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    1149           0 :         PyObject *mem_ctx_obj = NULL;
    1150           0 :         TALLOC_CTX *mem_ctx = NULL;
    1151           0 :         int level = 0;
    1152           0 :         PyObject *in = NULL;
    1153           0 :         union dcerpc_bind_ack_reason *out = NULL;
    1154             : 
    1155           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
    1156             :                 discard_const_p(char *, kwnames),
    1157             :                 &mem_ctx_obj,
    1158             :                 &level,
    1159             :                 &in)) {
    1160           0 :                 return NULL;
    1161             :         }
    1162           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    1163           0 :         if (mem_ctx == NULL) {
    1164           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    1165           0 :                 return NULL;
    1166             :         }
    1167             : 
    1168           0 :         out = py_export_dcerpc_bind_ack_reason(mem_ctx, level, in);
    1169           0 :         if (out == NULL) {
    1170           0 :                 return NULL;
    1171             :         }
    1172             : 
    1173           0 :         return pytalloc_GenericObject_reference(out);
    1174             : }
    1175             : 
    1176             : static PyMethodDef py_dcerpc_bind_ack_reason_methods[] = {
    1177             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_bind_ack_reason_import),
    1178             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    1179             :                 "T.__import__(mem_ctx, level, in) => ret." },
    1180             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_bind_ack_reason_export),
    1181             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    1182             :                 "T.__export__(mem_ctx, level, in) => ret." },
    1183             :         { NULL, NULL, 0, NULL }
    1184             : };
    1185             : 
    1186           0 : static PyObject *py_dcerpc_bind_ack_reason_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1187             : {
    1188           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
    1189           0 :         return NULL;
    1190             : }
    1191             : 
    1192             : 
    1193             : static PyTypeObject dcerpc_bind_ack_reason_Type = {
    1194             :         PyVarObject_HEAD_INIT(NULL, 0)
    1195             :         .tp_name = "dcerpc.bind_ack_reason",
    1196             :         .tp_getset = NULL,
    1197             :         .tp_methods = py_dcerpc_bind_ack_reason_methods,
    1198             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1199             :         .tp_new = py_dcerpc_bind_ack_reason_new,
    1200             : };
    1201             : 
    1202             : 
    1203        1222 : static PyObject *py_dcerpc_ack_ctx_get_result(PyObject *obj, void *closure)
    1204             : {
    1205        1222 :         struct dcerpc_ack_ctx *object = (struct dcerpc_ack_ctx *)pytalloc_get_ptr(obj);
    1206             :         PyObject *py_result;
    1207        1222 :         py_result = PyLong_FromLong((uint16_t)object->result);
    1208        1222 :         return py_result;
    1209             : }
    1210             : 
    1211           0 : static int py_dcerpc_ack_ctx_set_result(PyObject *py_obj, PyObject *value, void *closure)
    1212             : {
    1213           0 :         struct dcerpc_ack_ctx *object = (struct dcerpc_ack_ctx *)pytalloc_get_ptr(py_obj);
    1214           0 :         if (value == NULL) {
    1215           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->result");
    1216           0 :                 return -1;
    1217             :         }
    1218             :         {
    1219           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->result));
    1220           0 :                 if (PyLong_Check(value)) {
    1221             :                         unsigned long long test_var;
    1222           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1223           0 :                         if (PyErr_Occurred() != NULL) {
    1224           0 :                                 return -1;
    1225             :                         }
    1226           0 :                         if (test_var > uint_max) {
    1227           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1228             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1229           0 :                                 return -1;
    1230             :                         }
    1231           0 :                         object->result = test_var;
    1232             :                 } else {
    1233           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1234             :                           PyLong_Type.tp_name);
    1235           0 :                         return -1;
    1236             :                 }
    1237             :         }
    1238           0 :         return 0;
    1239             : }
    1240             : 
    1241        1222 : static PyObject *py_dcerpc_ack_ctx_get_reason(PyObject *obj, void *closure)
    1242             : {
    1243        1222 :         struct dcerpc_ack_ctx *object = (struct dcerpc_ack_ctx *)pytalloc_get_ptr(obj);
    1244             :         PyObject *py_reason;
    1245        1222 :         py_reason = pyrpc_import_union(&dcerpc_bind_ack_reason_Type, pytalloc_get_mem_ctx(obj), object->result, &object->reason, "union dcerpc_bind_ack_reason");
    1246        1222 :         if (py_reason == NULL) {
    1247           0 :                 return NULL;
    1248             :         }
    1249        1222 :         return py_reason;
    1250             : }
    1251             : 
    1252           0 : static int py_dcerpc_ack_ctx_set_reason(PyObject *py_obj, PyObject *value, void *closure)
    1253             : {
    1254           0 :         struct dcerpc_ack_ctx *object = (struct dcerpc_ack_ctx *)pytalloc_get_ptr(py_obj);
    1255           0 :         if (value == NULL) {
    1256           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reason");
    1257           0 :                 return -1;
    1258             :         }
    1259             :         {
    1260             :                 union dcerpc_bind_ack_reason *reason_switch_0;
    1261           0 :                 reason_switch_0 = (union dcerpc_bind_ack_reason *)pyrpc_export_union(&dcerpc_bind_ack_reason_Type, pytalloc_get_mem_ctx(py_obj), object->result, value, "union dcerpc_bind_ack_reason");
    1262           0 :                 if (reason_switch_0 == NULL) {
    1263           0 :                         return -1;
    1264             :                 }
    1265           0 :                 object->reason = *reason_switch_0;
    1266             :         }
    1267           0 :         return 0;
    1268             : }
    1269             : 
    1270        1222 : static PyObject *py_dcerpc_ack_ctx_get_syntax(PyObject *obj, void *closure)
    1271             : {
    1272        1222 :         struct dcerpc_ack_ctx *object = (struct dcerpc_ack_ctx *)pytalloc_get_ptr(obj);
    1273             :         PyObject *py_syntax;
    1274        1222 :         py_syntax = pytalloc_reference_ex(ndr_syntax_id_Type, pytalloc_get_mem_ctx(obj), &object->syntax);
    1275        1222 :         return py_syntax;
    1276             : }
    1277             : 
    1278           0 : static int py_dcerpc_ack_ctx_set_syntax(PyObject *py_obj, PyObject *value, void *closure)
    1279             : {
    1280           0 :         struct dcerpc_ack_ctx *object = (struct dcerpc_ack_ctx *)pytalloc_get_ptr(py_obj);
    1281           0 :         if (value == NULL) {
    1282           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->syntax");
    1283           0 :                 return -1;
    1284             :         }
    1285           0 :         PY_CHECK_TYPE(ndr_syntax_id_Type, value, return -1;);
    1286           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    1287           0 :                 PyErr_NoMemory();
    1288           0 :                 return -1;
    1289             :         }
    1290           0 :         object->syntax = *(struct ndr_syntax_id *)pytalloc_get_ptr(value);
    1291           0 :         return 0;
    1292             : }
    1293             : 
    1294             : static PyGetSetDef py_dcerpc_ack_ctx_getsetters[] = {
    1295             :         {
    1296             :                 .name = discard_const_p(char, "result"),
    1297             :                 .get = py_dcerpc_ack_ctx_get_result,
    1298             :                 .set = py_dcerpc_ack_ctx_set_result,
    1299             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dcerpc_bind_ack_result")
    1300             :         },
    1301             :         {
    1302             :                 .name = discard_const_p(char, "reason"),
    1303             :                 .get = py_dcerpc_ack_ctx_get_reason,
    1304             :                 .set = py_dcerpc_ack_ctx_set_reason,
    1305             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dcerpc_bind_ack_reason")
    1306             :         },
    1307             :         {
    1308             :                 .name = discard_const_p(char, "syntax"),
    1309             :                 .get = py_dcerpc_ack_ctx_get_syntax,
    1310             :                 .set = py_dcerpc_ack_ctx_set_syntax,
    1311             :                 .doc = discard_const_p(char, "PIDL-generated element of base type ndr_syntax_id")
    1312             :         },
    1313             :         { .name = NULL }
    1314             : };
    1315             : 
    1316           0 : static PyObject *py_dcerpc_ack_ctx_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1317             : {
    1318           0 :         return pytalloc_new(struct dcerpc_ack_ctx, type);
    1319             : }
    1320             : 
    1321             : 
    1322             : static PyTypeObject dcerpc_ack_ctx_Type = {
    1323             :         PyVarObject_HEAD_INIT(NULL, 0)
    1324             :         .tp_name = "dcerpc.ack_ctx",
    1325             :         .tp_getset = py_dcerpc_ack_ctx_getsetters,
    1326             :         .tp_methods = NULL,
    1327             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1328             :         .tp_new = py_dcerpc_ack_ctx_new,
    1329             : };
    1330             : 
    1331             : 
    1332        1207 : static PyObject *py_dcerpc_bind_ack_get_max_xmit_frag(PyObject *obj, void *closure)
    1333             : {
    1334        1207 :         struct dcerpc_bind_ack *object = (struct dcerpc_bind_ack *)pytalloc_get_ptr(obj);
    1335             :         PyObject *py_max_xmit_frag;
    1336        1207 :         py_max_xmit_frag = PyLong_FromLong((uint16_t)object->max_xmit_frag);
    1337        1207 :         return py_max_xmit_frag;
    1338             : }
    1339             : 
    1340           0 : static int py_dcerpc_bind_ack_set_max_xmit_frag(PyObject *py_obj, PyObject *value, void *closure)
    1341             : {
    1342           0 :         struct dcerpc_bind_ack *object = (struct dcerpc_bind_ack *)pytalloc_get_ptr(py_obj);
    1343           0 :         if (value == NULL) {
    1344           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->max_xmit_frag");
    1345           0 :                 return -1;
    1346             :         }
    1347             :         {
    1348           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->max_xmit_frag));
    1349           0 :                 if (PyLong_Check(value)) {
    1350             :                         unsigned long long test_var;
    1351           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1352           0 :                         if (PyErr_Occurred() != NULL) {
    1353           0 :                                 return -1;
    1354             :                         }
    1355           0 :                         if (test_var > uint_max) {
    1356           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1357             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1358           0 :                                 return -1;
    1359             :                         }
    1360           0 :                         object->max_xmit_frag = test_var;
    1361             :                 } else {
    1362           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1363             :                           PyLong_Type.tp_name);
    1364           0 :                         return -1;
    1365             :                 }
    1366             :         }
    1367           0 :         return 0;
    1368             : }
    1369             : 
    1370        1212 : static PyObject *py_dcerpc_bind_ack_get_max_recv_frag(PyObject *obj, void *closure)
    1371             : {
    1372        1212 :         struct dcerpc_bind_ack *object = (struct dcerpc_bind_ack *)pytalloc_get_ptr(obj);
    1373             :         PyObject *py_max_recv_frag;
    1374        1212 :         py_max_recv_frag = PyLong_FromLong((uint16_t)object->max_recv_frag);
    1375        1212 :         return py_max_recv_frag;
    1376             : }
    1377             : 
    1378           0 : static int py_dcerpc_bind_ack_set_max_recv_frag(PyObject *py_obj, PyObject *value, void *closure)
    1379             : {
    1380           0 :         struct dcerpc_bind_ack *object = (struct dcerpc_bind_ack *)pytalloc_get_ptr(py_obj);
    1381           0 :         if (value == NULL) {
    1382           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->max_recv_frag");
    1383           0 :                 return -1;
    1384             :         }
    1385             :         {
    1386           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->max_recv_frag));
    1387           0 :                 if (PyLong_Check(value)) {
    1388             :                         unsigned long long test_var;
    1389           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1390           0 :                         if (PyErr_Occurred() != NULL) {
    1391           0 :                                 return -1;
    1392             :                         }
    1393           0 :                         if (test_var > uint_max) {
    1394           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1395             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1396           0 :                                 return -1;
    1397             :                         }
    1398           0 :                         object->max_recv_frag = test_var;
    1399             :                 } else {
    1400           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1401             :                           PyLong_Type.tp_name);
    1402           0 :                         return -1;
    1403             :                 }
    1404             :         }
    1405           0 :         return 0;
    1406             : }
    1407             : 
    1408        1931 : static PyObject *py_dcerpc_bind_ack_get_assoc_group_id(PyObject *obj, void *closure)
    1409             : {
    1410        1931 :         struct dcerpc_bind_ack *object = (struct dcerpc_bind_ack *)pytalloc_get_ptr(obj);
    1411             :         PyObject *py_assoc_group_id;
    1412        1931 :         py_assoc_group_id = PyLong_FromUnsignedLongLong((uint32_t)object->assoc_group_id);
    1413        1931 :         return py_assoc_group_id;
    1414             : }
    1415             : 
    1416           0 : static int py_dcerpc_bind_ack_set_assoc_group_id(PyObject *py_obj, PyObject *value, void *closure)
    1417             : {
    1418           0 :         struct dcerpc_bind_ack *object = (struct dcerpc_bind_ack *)pytalloc_get_ptr(py_obj);
    1419           0 :         if (value == NULL) {
    1420           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->assoc_group_id");
    1421           0 :                 return -1;
    1422             :         }
    1423             :         {
    1424           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->assoc_group_id));
    1425           0 :                 if (PyLong_Check(value)) {
    1426             :                         unsigned long long test_var;
    1427           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1428           0 :                         if (PyErr_Occurred() != NULL) {
    1429           0 :                                 return -1;
    1430             :                         }
    1431           0 :                         if (test_var > uint_max) {
    1432           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1433             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1434           0 :                                 return -1;
    1435             :                         }
    1436           0 :                         object->assoc_group_id = test_var;
    1437             :                 } else {
    1438           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1439             :                           PyLong_Type.tp_name);
    1440           0 :                         return -1;
    1441             :                 }
    1442             :         }
    1443           0 :         return 0;
    1444             : }
    1445             : 
    1446        1207 : static PyObject *py_dcerpc_bind_ack_get_secondary_address_size(PyObject *obj, void *closure)
    1447             : {
    1448        1207 :         struct dcerpc_bind_ack *object = (struct dcerpc_bind_ack *)pytalloc_get_ptr(obj);
    1449             :         PyObject *py_secondary_address_size;
    1450        1207 :         py_secondary_address_size = PyLong_FromLong((uint16_t)object->secondary_address_size);
    1451        1207 :         return py_secondary_address_size;
    1452             : }
    1453             : 
    1454           0 : static int py_dcerpc_bind_ack_set_secondary_address_size(PyObject *py_obj, PyObject *value, void *closure)
    1455             : {
    1456           0 :         struct dcerpc_bind_ack *object = (struct dcerpc_bind_ack *)pytalloc_get_ptr(py_obj);
    1457           0 :         if (value == NULL) {
    1458           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->secondary_address_size");
    1459           0 :                 return -1;
    1460             :         }
    1461             :         {
    1462           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->secondary_address_size));
    1463           0 :                 if (PyLong_Check(value)) {
    1464             :                         unsigned long long test_var;
    1465           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1466           0 :                         if (PyErr_Occurred() != NULL) {
    1467           0 :                                 return -1;
    1468             :                         }
    1469           0 :                         if (test_var > uint_max) {
    1470           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1471             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1472           0 :                                 return -1;
    1473             :                         }
    1474           0 :                         object->secondary_address_size = test_var;
    1475             :                 } else {
    1476           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1477             :                           PyLong_Type.tp_name);
    1478           0 :                         return -1;
    1479             :                 }
    1480             :         }
    1481           0 :         return 0;
    1482             : }
    1483             : 
    1484        1126 : static PyObject *py_dcerpc_bind_ack_get_secondary_address(PyObject *obj, void *closure)
    1485             : {
    1486        1126 :         struct dcerpc_bind_ack *object = (struct dcerpc_bind_ack *)pytalloc_get_ptr(obj);
    1487             :         PyObject *py_secondary_address;
    1488        1126 :         if (object->secondary_address == NULL) {
    1489           0 :                 py_secondary_address = Py_None;
    1490           0 :                 Py_INCREF(py_secondary_address);
    1491             :         } else {
    1492        1126 :                 py_secondary_address = PyUnicode_Decode(object->secondary_address, strlen(object->secondary_address), "utf-8", "ignore");
    1493             :         }
    1494        1126 :         return py_secondary_address;
    1495             : }
    1496             : 
    1497           0 : static int py_dcerpc_bind_ack_set_secondary_address(PyObject *py_obj, PyObject *value, void *closure)
    1498             : {
    1499           0 :         struct dcerpc_bind_ack *object = (struct dcerpc_bind_ack *)pytalloc_get_ptr(py_obj);
    1500           0 :         if (value == NULL) {
    1501           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->secondary_address");
    1502           0 :                 return -1;
    1503             :         }
    1504             :         {
    1505             :                 const char *test_str;
    1506             :                 const char *talloc_str;
    1507           0 :                 PyObject *unicode = NULL;
    1508           0 :                 if (PyUnicode_Check(value)) {
    1509           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    1510           0 :                         if (unicode == NULL) {
    1511           0 :                                 PyErr_NoMemory();
    1512           0 :                                 return -1;
    1513             :                         }
    1514           0 :                         test_str = PyBytes_AS_STRING(unicode);
    1515           0 :                 } else if (PyBytes_Check(value)) {
    1516           0 :                         test_str = PyBytes_AS_STRING(value);
    1517             :                 } else {
    1518           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    1519           0 :                         return -1;
    1520             :                 }
    1521           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    1522           0 :                 if (unicode != NULL) {
    1523           0 :                         Py_DECREF(unicode);
    1524             :                 }
    1525           0 :                 if (talloc_str == NULL) {
    1526           0 :                         PyErr_NoMemory();
    1527           0 :                         return -1;
    1528             :                 }
    1529           0 :                 object->secondary_address = talloc_str;
    1530             :         }
    1531           0 :         return 0;
    1532             : }
    1533             : 
    1534        1207 : static PyObject *py_dcerpc_bind_ack_get__pad1(PyObject *obj, void *closure)
    1535             : {
    1536        1207 :         struct dcerpc_bind_ack *object = (struct dcerpc_bind_ack *)pytalloc_get_ptr(obj);
    1537             :         PyObject *py__pad1;
    1538        1207 :         py__pad1 = PyBytes_FromStringAndSize((char *)(object->_pad1).data, (object->_pad1).length);
    1539        1207 :         return py__pad1;
    1540             : }
    1541             : 
    1542           0 : static int py_dcerpc_bind_ack_set__pad1(PyObject *py_obj, PyObject *value, void *closure)
    1543             : {
    1544           0 :         struct dcerpc_bind_ack *object = (struct dcerpc_bind_ack *)pytalloc_get_ptr(py_obj);
    1545           0 :         if (value == NULL) {
    1546           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->_pad1");
    1547           0 :                 return -1;
    1548             :         }
    1549           0 :         object->_pad1 = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
    1550           0 :         return 0;
    1551             : }
    1552             : 
    1553        1207 : static PyObject *py_dcerpc_bind_ack_get_num_results(PyObject *obj, void *closure)
    1554             : {
    1555        1207 :         struct dcerpc_bind_ack *object = (struct dcerpc_bind_ack *)pytalloc_get_ptr(obj);
    1556             :         PyObject *py_num_results;
    1557        1207 :         py_num_results = PyLong_FromLong((uint16_t)object->num_results);
    1558        1207 :         return py_num_results;
    1559             : }
    1560             : 
    1561           0 : static int py_dcerpc_bind_ack_set_num_results(PyObject *py_obj, PyObject *value, void *closure)
    1562             : {
    1563           0 :         struct dcerpc_bind_ack *object = (struct dcerpc_bind_ack *)pytalloc_get_ptr(py_obj);
    1564           0 :         if (value == NULL) {
    1565           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_results");
    1566           0 :                 return -1;
    1567             :         }
    1568             :         {
    1569           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_results));
    1570           0 :                 if (PyLong_Check(value)) {
    1571             :                         unsigned long long test_var;
    1572           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1573           0 :                         if (PyErr_Occurred() != NULL) {
    1574           0 :                                 return -1;
    1575             :                         }
    1576           0 :                         if (test_var > uint_max) {
    1577           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1578             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1579           0 :                                 return -1;
    1580             :                         }
    1581           0 :                         object->num_results = test_var;
    1582             :                 } else {
    1583           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1584             :                           PyLong_Type.tp_name);
    1585           0 :                         return -1;
    1586             :                 }
    1587             :         }
    1588           0 :         return 0;
    1589             : }
    1590             : 
    1591        3666 : static PyObject *py_dcerpc_bind_ack_get_ctx_list(PyObject *obj, void *closure)
    1592             : {
    1593        3666 :         struct dcerpc_bind_ack *object = (struct dcerpc_bind_ack *)pytalloc_get_ptr(obj);
    1594             :         PyObject *py_ctx_list;
    1595        3666 :         py_ctx_list = PyList_New(object->num_results);
    1596        3666 :         if (py_ctx_list == NULL) {
    1597           0 :                 return NULL;
    1598             :         }
    1599             :         {
    1600             :                 int ctx_list_cntr_0;
    1601        7422 :                 for (ctx_list_cntr_0 = 0; ctx_list_cntr_0 < (object->num_results); ctx_list_cntr_0++) {
    1602             :                         PyObject *py_ctx_list_0;
    1603        3756 :                         py_ctx_list_0 = pytalloc_reference_ex(&dcerpc_ack_ctx_Type, object->ctx_list, &object->ctx_list[ctx_list_cntr_0]);
    1604        3756 :                         PyList_SetItem(py_ctx_list, ctx_list_cntr_0, py_ctx_list_0);
    1605             :                 }
    1606             :         }
    1607        3666 :         return py_ctx_list;
    1608             : }
    1609             : 
    1610           0 : static int py_dcerpc_bind_ack_set_ctx_list(PyObject *py_obj, PyObject *value, void *closure)
    1611             : {
    1612           0 :         struct dcerpc_bind_ack *object = (struct dcerpc_bind_ack *)pytalloc_get_ptr(py_obj);
    1613           0 :         if (value == NULL) {
    1614           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ctx_list");
    1615           0 :                 return -1;
    1616             :         }
    1617           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    1618             :         {
    1619             :                 int ctx_list_cntr_0;
    1620           0 :                 object->ctx_list = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->ctx_list, PyList_GET_SIZE(value));
    1621           0 :                 if (!object->ctx_list) { return -1;; }
    1622           0 :                 talloc_set_name_const(object->ctx_list, "ARRAY: object->ctx_list");
    1623           0 :                 for (ctx_list_cntr_0 = 0; ctx_list_cntr_0 < PyList_GET_SIZE(value); ctx_list_cntr_0++) {
    1624           0 :                         if (PyList_GET_ITEM(value, ctx_list_cntr_0) == NULL) {
    1625           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ctx_list[ctx_list_cntr_0]");
    1626           0 :                                 return -1;
    1627             :                         }
    1628           0 :                         PY_CHECK_TYPE(&dcerpc_ack_ctx_Type, PyList_GET_ITEM(value, ctx_list_cntr_0), return -1;);
    1629           0 :                         if (talloc_reference(object->ctx_list, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, ctx_list_cntr_0))) == NULL) {
    1630           0 :                                 PyErr_NoMemory();
    1631           0 :                                 return -1;
    1632             :                         }
    1633           0 :                         object->ctx_list[ctx_list_cntr_0] = *(struct dcerpc_ack_ctx *)pytalloc_get_ptr(PyList_GET_ITEM(value, ctx_list_cntr_0));
    1634             :                 }
    1635             :         }
    1636           0 :         return 0;
    1637             : }
    1638             : 
    1639        4484 : static PyObject *py_dcerpc_bind_ack_get_auth_info(PyObject *obj, void *closure)
    1640             : {
    1641        4484 :         struct dcerpc_bind_ack *object = (struct dcerpc_bind_ack *)pytalloc_get_ptr(obj);
    1642             :         PyObject *py_auth_info;
    1643        4484 :         py_auth_info = PyBytes_FromStringAndSize((char *)(object->auth_info).data, (object->auth_info).length);
    1644        4484 :         return py_auth_info;
    1645             : }
    1646             : 
    1647           0 : static int py_dcerpc_bind_ack_set_auth_info(PyObject *py_obj, PyObject *value, void *closure)
    1648             : {
    1649           0 :         struct dcerpc_bind_ack *object = (struct dcerpc_bind_ack *)pytalloc_get_ptr(py_obj);
    1650           0 :         if (value == NULL) {
    1651           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->auth_info");
    1652           0 :                 return -1;
    1653             :         }
    1654           0 :         object->auth_info = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
    1655           0 :         return 0;
    1656             : }
    1657             : 
    1658             : static PyGetSetDef py_dcerpc_bind_ack_getsetters[] = {
    1659             :         {
    1660             :                 .name = discard_const_p(char, "max_xmit_frag"),
    1661             :                 .get = py_dcerpc_bind_ack_get_max_xmit_frag,
    1662             :                 .set = py_dcerpc_bind_ack_set_max_xmit_frag,
    1663             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    1664             :         },
    1665             :         {
    1666             :                 .name = discard_const_p(char, "max_recv_frag"),
    1667             :                 .get = py_dcerpc_bind_ack_get_max_recv_frag,
    1668             :                 .set = py_dcerpc_bind_ack_set_max_recv_frag,
    1669             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    1670             :         },
    1671             :         {
    1672             :                 .name = discard_const_p(char, "assoc_group_id"),
    1673             :                 .get = py_dcerpc_bind_ack_get_assoc_group_id,
    1674             :                 .set = py_dcerpc_bind_ack_set_assoc_group_id,
    1675             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1676             :         },
    1677             :         {
    1678             :                 .name = discard_const_p(char, "secondary_address_size"),
    1679             :                 .get = py_dcerpc_bind_ack_get_secondary_address_size,
    1680             :                 .set = py_dcerpc_bind_ack_set_secondary_address_size,
    1681             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    1682             :         },
    1683             :         {
    1684             :                 .name = discard_const_p(char, "secondary_address"),
    1685             :                 .get = py_dcerpc_bind_ack_get_secondary_address,
    1686             :                 .set = py_dcerpc_bind_ack_set_secondary_address,
    1687             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    1688             :         },
    1689             :         {
    1690             :                 .name = discard_const_p(char, "_pad1"),
    1691             :                 .get = py_dcerpc_bind_ack_get__pad1,
    1692             :                 .set = py_dcerpc_bind_ack_set__pad1,
    1693             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
    1694             :         },
    1695             :         {
    1696             :                 .name = discard_const_p(char, "num_results"),
    1697             :                 .get = py_dcerpc_bind_ack_get_num_results,
    1698             :                 .set = py_dcerpc_bind_ack_set_num_results,
    1699             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    1700             :         },
    1701             :         {
    1702             :                 .name = discard_const_p(char, "ctx_list"),
    1703             :                 .get = py_dcerpc_bind_ack_get_ctx_list,
    1704             :                 .set = py_dcerpc_bind_ack_set_ctx_list,
    1705             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dcerpc_ack_ctx")
    1706             :         },
    1707             :         {
    1708             :                 .name = discard_const_p(char, "auth_info"),
    1709             :                 .get = py_dcerpc_bind_ack_get_auth_info,
    1710             :                 .set = py_dcerpc_bind_ack_set_auth_info,
    1711             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
    1712             :         },
    1713             :         { .name = NULL }
    1714             : };
    1715             : 
    1716           0 : static PyObject *py_dcerpc_bind_ack_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1717             : {
    1718           0 :         return pytalloc_new(struct dcerpc_bind_ack, type);
    1719             : }
    1720             : 
    1721             : 
    1722             : static PyTypeObject dcerpc_bind_ack_Type = {
    1723             :         PyVarObject_HEAD_INIT(NULL, 0)
    1724             :         .tp_name = "dcerpc.bind_ack",
    1725             :         .tp_getset = py_dcerpc_bind_ack_getsetters,
    1726             :         .tp_methods = NULL,
    1727             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1728             :         .tp_new = py_dcerpc_bind_ack_new,
    1729             : };
    1730             : 
    1731             : 
    1732          72 : static PyObject *py_dcerpc_bind_nak_version_get_rpc_vers(PyObject *obj, void *closure)
    1733             : {
    1734          72 :         struct dcerpc_bind_nak_version *object = (struct dcerpc_bind_nak_version *)pytalloc_get_ptr(obj);
    1735             :         PyObject *py_rpc_vers;
    1736          72 :         py_rpc_vers = PyLong_FromLong((uint16_t)object->rpc_vers);
    1737          72 :         return py_rpc_vers;
    1738             : }
    1739             : 
    1740           0 : static int py_dcerpc_bind_nak_version_set_rpc_vers(PyObject *py_obj, PyObject *value, void *closure)
    1741             : {
    1742           0 :         struct dcerpc_bind_nak_version *object = (struct dcerpc_bind_nak_version *)pytalloc_get_ptr(py_obj);
    1743           0 :         if (value == NULL) {
    1744           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->rpc_vers");
    1745           0 :                 return -1;
    1746             :         }
    1747             :         {
    1748           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rpc_vers));
    1749           0 :                 if (PyLong_Check(value)) {
    1750             :                         unsigned long long test_var;
    1751           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1752           0 :                         if (PyErr_Occurred() != NULL) {
    1753           0 :                                 return -1;
    1754             :                         }
    1755           0 :                         if (test_var > uint_max) {
    1756           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1757             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1758           0 :                                 return -1;
    1759             :                         }
    1760           0 :                         object->rpc_vers = test_var;
    1761             :                 } else {
    1762           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1763             :                           PyLong_Type.tp_name);
    1764           0 :                         return -1;
    1765             :                 }
    1766             :         }
    1767           0 :         return 0;
    1768             : }
    1769             : 
    1770          72 : static PyObject *py_dcerpc_bind_nak_version_get_rpc_vers_minor(PyObject *obj, void *closure)
    1771             : {
    1772          72 :         struct dcerpc_bind_nak_version *object = (struct dcerpc_bind_nak_version *)pytalloc_get_ptr(obj);
    1773             :         PyObject *py_rpc_vers_minor;
    1774          72 :         py_rpc_vers_minor = PyLong_FromLong((uint16_t)object->rpc_vers_minor);
    1775          72 :         return py_rpc_vers_minor;
    1776             : }
    1777             : 
    1778           0 : static int py_dcerpc_bind_nak_version_set_rpc_vers_minor(PyObject *py_obj, PyObject *value, void *closure)
    1779             : {
    1780           0 :         struct dcerpc_bind_nak_version *object = (struct dcerpc_bind_nak_version *)pytalloc_get_ptr(py_obj);
    1781           0 :         if (value == NULL) {
    1782           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->rpc_vers_minor");
    1783           0 :                 return -1;
    1784             :         }
    1785             :         {
    1786           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rpc_vers_minor));
    1787           0 :                 if (PyLong_Check(value)) {
    1788             :                         unsigned long long test_var;
    1789           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1790           0 :                         if (PyErr_Occurred() != NULL) {
    1791           0 :                                 return -1;
    1792             :                         }
    1793           0 :                         if (test_var > uint_max) {
    1794           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1795             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1796           0 :                                 return -1;
    1797             :                         }
    1798           0 :                         object->rpc_vers_minor = test_var;
    1799             :                 } else {
    1800           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1801             :                           PyLong_Type.tp_name);
    1802           0 :                         return -1;
    1803             :                 }
    1804             :         }
    1805           0 :         return 0;
    1806             : }
    1807             : 
    1808             : static PyGetSetDef py_dcerpc_bind_nak_version_getsetters[] = {
    1809             :         {
    1810             :                 .name = discard_const_p(char, "rpc_vers"),
    1811             :                 .get = py_dcerpc_bind_nak_version_get_rpc_vers,
    1812             :                 .set = py_dcerpc_bind_nak_version_set_rpc_vers,
    1813             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    1814             :         },
    1815             :         {
    1816             :                 .name = discard_const_p(char, "rpc_vers_minor"),
    1817             :                 .get = py_dcerpc_bind_nak_version_get_rpc_vers_minor,
    1818             :                 .set = py_dcerpc_bind_nak_version_set_rpc_vers_minor,
    1819             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    1820             :         },
    1821             :         { .name = NULL }
    1822             : };
    1823             : 
    1824           0 : static PyObject *py_dcerpc_bind_nak_version_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1825             : {
    1826           0 :         return pytalloc_new(struct dcerpc_bind_nak_version, type);
    1827             : }
    1828             : 
    1829           0 : static PyObject *py_dcerpc_bind_nak_version_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    1830             : {
    1831           0 :         struct dcerpc_bind_nak_version *object = (struct dcerpc_bind_nak_version *)pytalloc_get_ptr(py_obj);
    1832           0 :         PyObject *ret = NULL;
    1833             :         DATA_BLOB blob;
    1834             :         enum ndr_err_code err;
    1835           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    1836           0 :         if (tmp_ctx == NULL) {
    1837           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    1838           0 :                 return NULL;
    1839             :         }
    1840           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_dcerpc_bind_nak_version);
    1841           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    1842           0 :                 TALLOC_FREE(tmp_ctx);
    1843           0 :                 PyErr_SetNdrError(err);
    1844           0 :                 return NULL;
    1845             :         }
    1846             : 
    1847           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    1848           0 :         TALLOC_FREE(tmp_ctx);
    1849           0 :         return ret;
    1850             : }
    1851             : 
    1852           0 : static PyObject *py_dcerpc_bind_nak_version_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    1853             : {
    1854           0 :         struct dcerpc_bind_nak_version *object = (struct dcerpc_bind_nak_version *)pytalloc_get_ptr(py_obj);
    1855           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    1856           0 :         Py_ssize_t blob_length = 0;
    1857             :         enum ndr_err_code err;
    1858           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    1859           0 :         PyObject *allow_remaining_obj = NULL;
    1860           0 :         bool allow_remaining = false;
    1861             : 
    1862           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    1863             :                 discard_const_p(char *, kwnames),
    1864             :                 &blob.data, &blob_length,
    1865             :                 &allow_remaining_obj)) {
    1866           0 :                 return NULL;
    1867             :         }
    1868           0 :         blob.length = blob_length;
    1869             : 
    1870           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    1871           0 :                 allow_remaining = true;
    1872             :         }
    1873             : 
    1874           0 :         if (allow_remaining) {
    1875           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_bind_nak_version);
    1876             :         } else {
    1877           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_bind_nak_version);
    1878             :         }
    1879           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    1880           0 :                 PyErr_SetNdrError(err);
    1881           0 :                 return NULL;
    1882             :         }
    1883             : 
    1884           0 :         Py_RETURN_NONE;
    1885             : }
    1886             : 
    1887           0 : static PyObject *py_dcerpc_bind_nak_version_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    1888             : {
    1889           0 :         struct dcerpc_bind_nak_version *object = (struct dcerpc_bind_nak_version *)pytalloc_get_ptr(py_obj);
    1890             :         PyObject *ret;
    1891             :         char *retstr;
    1892             : 
    1893           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_dcerpc_bind_nak_version, "dcerpc_bind_nak_version", object);
    1894           0 :         ret = PyUnicode_FromString(retstr);
    1895           0 :         talloc_free(retstr);
    1896             : 
    1897           0 :         return ret;
    1898             : }
    1899             : 
    1900             : static PyMethodDef py_dcerpc_bind_nak_version_methods[] = {
    1901             :         { "__ndr_pack__", (PyCFunction)py_dcerpc_bind_nak_version_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    1902             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_bind_nak_version_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    1903             :         { "__ndr_print__", (PyCFunction)py_dcerpc_bind_nak_version_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    1904             :         { NULL, NULL, 0, NULL }
    1905             : };
    1906             : 
    1907             : 
    1908             : static PyTypeObject dcerpc_bind_nak_version_Type = {
    1909             :         PyVarObject_HEAD_INIT(NULL, 0)
    1910             :         .tp_name = "dcerpc.bind_nak_version",
    1911             :         .tp_getset = py_dcerpc_bind_nak_version_getsetters,
    1912             :         .tp_methods = py_dcerpc_bind_nak_version_methods,
    1913             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1914             :         .tp_new = py_dcerpc_bind_nak_version_new,
    1915             : };
    1916             : 
    1917             : 
    1918          72 : static PyObject *py_dcerpc_bind_nak_get_reject_reason(PyObject *obj, void *closure)
    1919             : {
    1920          72 :         struct dcerpc_bind_nak *object = (struct dcerpc_bind_nak *)pytalloc_get_ptr(obj);
    1921             :         PyObject *py_reject_reason;
    1922          72 :         py_reject_reason = PyLong_FromLong((uint16_t)object->reject_reason);
    1923          72 :         return py_reject_reason;
    1924             : }
    1925             : 
    1926           0 : static int py_dcerpc_bind_nak_set_reject_reason(PyObject *py_obj, PyObject *value, void *closure)
    1927             : {
    1928           0 :         struct dcerpc_bind_nak *object = (struct dcerpc_bind_nak *)pytalloc_get_ptr(py_obj);
    1929           0 :         if (value == NULL) {
    1930           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reject_reason");
    1931           0 :                 return -1;
    1932             :         }
    1933             :         {
    1934           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reject_reason));
    1935           0 :                 if (PyLong_Check(value)) {
    1936             :                         unsigned long long test_var;
    1937           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1938           0 :                         if (PyErr_Occurred() != NULL) {
    1939           0 :                                 return -1;
    1940             :                         }
    1941           0 :                         if (test_var > uint_max) {
    1942           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1943             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1944           0 :                                 return -1;
    1945             :                         }
    1946           0 :                         object->reject_reason = test_var;
    1947             :                 } else {
    1948           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1949             :                           PyLong_Type.tp_name);
    1950           0 :                         return -1;
    1951             :                 }
    1952             :         }
    1953           0 :         return 0;
    1954             : }
    1955             : 
    1956          72 : static PyObject *py_dcerpc_bind_nak_get_num_versions(PyObject *obj, void *closure)
    1957             : {
    1958          72 :         struct dcerpc_bind_nak *object = (struct dcerpc_bind_nak *)pytalloc_get_ptr(obj);
    1959             :         PyObject *py_num_versions;
    1960          72 :         py_num_versions = PyLong_FromLong((uint16_t)object->num_versions);
    1961          72 :         return py_num_versions;
    1962             : }
    1963             : 
    1964           0 : static int py_dcerpc_bind_nak_set_num_versions(PyObject *py_obj, PyObject *value, void *closure)
    1965             : {
    1966           0 :         struct dcerpc_bind_nak *object = (struct dcerpc_bind_nak *)pytalloc_get_ptr(py_obj);
    1967           0 :         if (value == NULL) {
    1968           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_versions");
    1969           0 :                 return -1;
    1970             :         }
    1971             :         {
    1972           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_versions));
    1973           0 :                 if (PyLong_Check(value)) {
    1974             :                         unsigned long long test_var;
    1975           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1976           0 :                         if (PyErr_Occurred() != NULL) {
    1977           0 :                                 return -1;
    1978             :                         }
    1979           0 :                         if (test_var > uint_max) {
    1980           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1981             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1982           0 :                                 return -1;
    1983             :                         }
    1984           0 :                         object->num_versions = test_var;
    1985             :                 } else {
    1986           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1987             :                           PyLong_Type.tp_name);
    1988           0 :                         return -1;
    1989             :                 }
    1990             :         }
    1991           0 :         return 0;
    1992             : }
    1993             : 
    1994         144 : static PyObject *py_dcerpc_bind_nak_get_versions(PyObject *obj, void *closure)
    1995             : {
    1996         144 :         struct dcerpc_bind_nak *object = (struct dcerpc_bind_nak *)pytalloc_get_ptr(obj);
    1997             :         PyObject *py_versions;
    1998         144 :         py_versions = PyList_New(object->num_versions);
    1999         144 :         if (py_versions == NULL) {
    2000           0 :                 return NULL;
    2001             :         }
    2002             :         {
    2003             :                 int versions_cntr_0;
    2004         288 :                 for (versions_cntr_0 = 0; versions_cntr_0 < (object->num_versions); versions_cntr_0++) {
    2005             :                         PyObject *py_versions_0;
    2006         144 :                         py_versions_0 = pytalloc_reference_ex(&dcerpc_bind_nak_version_Type, object->versions, &object->versions[versions_cntr_0]);
    2007         144 :                         PyList_SetItem(py_versions, versions_cntr_0, py_versions_0);
    2008             :                 }
    2009             :         }
    2010         144 :         return py_versions;
    2011             : }
    2012             : 
    2013           0 : static int py_dcerpc_bind_nak_set_versions(PyObject *py_obj, PyObject *value, void *closure)
    2014             : {
    2015           0 :         struct dcerpc_bind_nak *object = (struct dcerpc_bind_nak *)pytalloc_get_ptr(py_obj);
    2016           0 :         if (value == NULL) {
    2017           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->versions");
    2018           0 :                 return -1;
    2019             :         }
    2020           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    2021             :         {
    2022             :                 int versions_cntr_0;
    2023           0 :                 object->versions = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->versions, PyList_GET_SIZE(value));
    2024           0 :                 if (!object->versions) { return -1;; }
    2025           0 :                 talloc_set_name_const(object->versions, "ARRAY: object->versions");
    2026           0 :                 for (versions_cntr_0 = 0; versions_cntr_0 < PyList_GET_SIZE(value); versions_cntr_0++) {
    2027           0 :                         if (PyList_GET_ITEM(value, versions_cntr_0) == NULL) {
    2028           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->versions[versions_cntr_0]");
    2029           0 :                                 return -1;
    2030             :                         }
    2031           0 :                         PY_CHECK_TYPE(&dcerpc_bind_nak_version_Type, PyList_GET_ITEM(value, versions_cntr_0), return -1;);
    2032           0 :                         if (talloc_reference(object->versions, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, versions_cntr_0))) == NULL) {
    2033           0 :                                 PyErr_NoMemory();
    2034           0 :                                 return -1;
    2035             :                         }
    2036           0 :                         object->versions[versions_cntr_0] = *(struct dcerpc_bind_nak_version *)pytalloc_get_ptr(PyList_GET_ITEM(value, versions_cntr_0));
    2037             :                 }
    2038             :         }
    2039           0 :         return 0;
    2040             : }
    2041             : 
    2042          75 : static PyObject *py_dcerpc_bind_nak_get__pad(PyObject *obj, void *closure)
    2043             : {
    2044          75 :         struct dcerpc_bind_nak *object = (struct dcerpc_bind_nak *)pytalloc_get_ptr(obj);
    2045             :         PyObject *py__pad;
    2046          75 :         py__pad = PyBytes_FromStringAndSize((char *)(object->_pad).data, (object->_pad).length);
    2047          75 :         return py__pad;
    2048             : }
    2049             : 
    2050           0 : static int py_dcerpc_bind_nak_set__pad(PyObject *py_obj, PyObject *value, void *closure)
    2051             : {
    2052           0 :         struct dcerpc_bind_nak *object = (struct dcerpc_bind_nak *)pytalloc_get_ptr(py_obj);
    2053           0 :         if (value == NULL) {
    2054           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->_pad");
    2055           0 :                 return -1;
    2056             :         }
    2057           0 :         object->_pad = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
    2058           0 :         return 0;
    2059             : }
    2060             : 
    2061             : static PyGetSetDef py_dcerpc_bind_nak_getsetters[] = {
    2062             :         {
    2063             :                 .name = discard_const_p(char, "reject_reason"),
    2064             :                 .get = py_dcerpc_bind_nak_get_reject_reason,
    2065             :                 .set = py_dcerpc_bind_nak_set_reject_reason,
    2066             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dcerpc_bind_nak_reason")
    2067             :         },
    2068             :         {
    2069             :                 .name = discard_const_p(char, "num_versions"),
    2070             :                 .get = py_dcerpc_bind_nak_get_num_versions,
    2071             :                 .set = py_dcerpc_bind_nak_set_num_versions,
    2072             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    2073             :         },
    2074             :         {
    2075             :                 .name = discard_const_p(char, "versions"),
    2076             :                 .get = py_dcerpc_bind_nak_get_versions,
    2077             :                 .set = py_dcerpc_bind_nak_set_versions,
    2078             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dcerpc_bind_nak_version")
    2079             :         },
    2080             :         {
    2081             :                 .name = discard_const_p(char, "_pad"),
    2082             :                 .get = py_dcerpc_bind_nak_get__pad,
    2083             :                 .set = py_dcerpc_bind_nak_set__pad,
    2084             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
    2085             :         },
    2086             :         { .name = NULL }
    2087             : };
    2088             : 
    2089           0 : static PyObject *py_dcerpc_bind_nak_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2090             : {
    2091           0 :         return pytalloc_new(struct dcerpc_bind_nak, type);
    2092             : }
    2093             : 
    2094           0 : static PyObject *py_dcerpc_bind_nak_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    2095             : {
    2096           0 :         struct dcerpc_bind_nak *object = (struct dcerpc_bind_nak *)pytalloc_get_ptr(py_obj);
    2097           0 :         PyObject *ret = NULL;
    2098             :         DATA_BLOB blob;
    2099             :         enum ndr_err_code err;
    2100           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    2101           0 :         if (tmp_ctx == NULL) {
    2102           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    2103           0 :                 return NULL;
    2104             :         }
    2105           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_dcerpc_bind_nak);
    2106           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2107           0 :                 TALLOC_FREE(tmp_ctx);
    2108           0 :                 PyErr_SetNdrError(err);
    2109           0 :                 return NULL;
    2110             :         }
    2111             : 
    2112           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    2113           0 :         TALLOC_FREE(tmp_ctx);
    2114           0 :         return ret;
    2115             : }
    2116             : 
    2117           0 : static PyObject *py_dcerpc_bind_nak_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    2118             : {
    2119           0 :         struct dcerpc_bind_nak *object = (struct dcerpc_bind_nak *)pytalloc_get_ptr(py_obj);
    2120           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    2121           0 :         Py_ssize_t blob_length = 0;
    2122             :         enum ndr_err_code err;
    2123           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    2124           0 :         PyObject *allow_remaining_obj = NULL;
    2125           0 :         bool allow_remaining = false;
    2126             : 
    2127           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    2128             :                 discard_const_p(char *, kwnames),
    2129             :                 &blob.data, &blob_length,
    2130             :                 &allow_remaining_obj)) {
    2131           0 :                 return NULL;
    2132             :         }
    2133           0 :         blob.length = blob_length;
    2134             : 
    2135           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    2136           0 :                 allow_remaining = true;
    2137             :         }
    2138             : 
    2139           0 :         if (allow_remaining) {
    2140           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_bind_nak);
    2141             :         } else {
    2142           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_bind_nak);
    2143             :         }
    2144           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2145           0 :                 PyErr_SetNdrError(err);
    2146           0 :                 return NULL;
    2147             :         }
    2148             : 
    2149           0 :         Py_RETURN_NONE;
    2150             : }
    2151             : 
    2152           0 : static PyObject *py_dcerpc_bind_nak_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    2153             : {
    2154           0 :         struct dcerpc_bind_nak *object = (struct dcerpc_bind_nak *)pytalloc_get_ptr(py_obj);
    2155             :         PyObject *ret;
    2156             :         char *retstr;
    2157             : 
    2158           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_dcerpc_bind_nak, "dcerpc_bind_nak", object);
    2159           0 :         ret = PyUnicode_FromString(retstr);
    2160           0 :         talloc_free(retstr);
    2161             : 
    2162           0 :         return ret;
    2163             : }
    2164             : 
    2165             : static PyMethodDef py_dcerpc_bind_nak_methods[] = {
    2166             :         { "__ndr_pack__", (PyCFunction)py_dcerpc_bind_nak_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    2167             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_bind_nak_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    2168             :         { "__ndr_print__", (PyCFunction)py_dcerpc_bind_nak_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    2169             :         { NULL, NULL, 0, NULL }
    2170             : };
    2171             : 
    2172             : 
    2173             : static PyTypeObject dcerpc_bind_nak_Type = {
    2174             :         PyVarObject_HEAD_INIT(NULL, 0)
    2175             :         .tp_name = "dcerpc.bind_nak",
    2176             :         .tp_getset = py_dcerpc_bind_nak_getsetters,
    2177             :         .tp_methods = py_dcerpc_bind_nak_methods,
    2178             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2179             :         .tp_new = py_dcerpc_bind_nak_new,
    2180             : };
    2181             : 
    2182             : 
    2183        1999 : static PyObject *py_dcerpc_response_get_alloc_hint(PyObject *obj, void *closure)
    2184             : {
    2185        1999 :         struct dcerpc_response *object = (struct dcerpc_response *)pytalloc_get_ptr(obj);
    2186             :         PyObject *py_alloc_hint;
    2187        1999 :         py_alloc_hint = PyLong_FromUnsignedLongLong((uint32_t)object->alloc_hint);
    2188        1999 :         return py_alloc_hint;
    2189             : }
    2190             : 
    2191           0 : static int py_dcerpc_response_set_alloc_hint(PyObject *py_obj, PyObject *value, void *closure)
    2192             : {
    2193           0 :         struct dcerpc_response *object = (struct dcerpc_response *)pytalloc_get_ptr(py_obj);
    2194           0 :         if (value == NULL) {
    2195           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->alloc_hint");
    2196           0 :                 return -1;
    2197             :         }
    2198             :         {
    2199           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->alloc_hint));
    2200           0 :                 if (PyLong_Check(value)) {
    2201             :                         unsigned long long test_var;
    2202           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2203           0 :                         if (PyErr_Occurred() != NULL) {
    2204           0 :                                 return -1;
    2205             :                         }
    2206           0 :                         if (test_var > uint_max) {
    2207           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2208             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2209           0 :                                 return -1;
    2210             :                         }
    2211           0 :                         object->alloc_hint = test_var;
    2212             :                 } else {
    2213           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2214             :                           PyLong_Type.tp_name);
    2215           0 :                         return -1;
    2216             :                 }
    2217             :         }
    2218           0 :         return 0;
    2219             : }
    2220             : 
    2221         779 : static PyObject *py_dcerpc_response_get_context_id(PyObject *obj, void *closure)
    2222             : {
    2223         779 :         struct dcerpc_response *object = (struct dcerpc_response *)pytalloc_get_ptr(obj);
    2224             :         PyObject *py_context_id;
    2225         779 :         py_context_id = PyLong_FromLong((uint16_t)object->context_id);
    2226         779 :         return py_context_id;
    2227             : }
    2228             : 
    2229           0 : static int py_dcerpc_response_set_context_id(PyObject *py_obj, PyObject *value, void *closure)
    2230             : {
    2231           0 :         struct dcerpc_response *object = (struct dcerpc_response *)pytalloc_get_ptr(py_obj);
    2232           0 :         if (value == NULL) {
    2233           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->context_id");
    2234           0 :                 return -1;
    2235             :         }
    2236             :         {
    2237           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->context_id));
    2238           0 :                 if (PyLong_Check(value)) {
    2239             :                         unsigned long long test_var;
    2240           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2241           0 :                         if (PyErr_Occurred() != NULL) {
    2242           0 :                                 return -1;
    2243             :                         }
    2244           0 :                         if (test_var > uint_max) {
    2245           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2246             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2247           0 :                                 return -1;
    2248             :                         }
    2249           0 :                         object->context_id = test_var;
    2250             :                 } else {
    2251           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2252             :                           PyLong_Type.tp_name);
    2253           0 :                         return -1;
    2254             :                 }
    2255             :         }
    2256           0 :         return 0;
    2257             : }
    2258             : 
    2259         779 : static PyObject *py_dcerpc_response_get_cancel_count(PyObject *obj, void *closure)
    2260             : {
    2261         779 :         struct dcerpc_response *object = (struct dcerpc_response *)pytalloc_get_ptr(obj);
    2262             :         PyObject *py_cancel_count;
    2263         779 :         py_cancel_count = PyLong_FromLong((uint16_t)object->cancel_count);
    2264         779 :         return py_cancel_count;
    2265             : }
    2266             : 
    2267           0 : static int py_dcerpc_response_set_cancel_count(PyObject *py_obj, PyObject *value, void *closure)
    2268             : {
    2269           0 :         struct dcerpc_response *object = (struct dcerpc_response *)pytalloc_get_ptr(py_obj);
    2270           0 :         if (value == NULL) {
    2271           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->cancel_count");
    2272           0 :                 return -1;
    2273             :         }
    2274             :         {
    2275           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->cancel_count));
    2276           0 :                 if (PyLong_Check(value)) {
    2277             :                         unsigned long long test_var;
    2278           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2279           0 :                         if (PyErr_Occurred() != NULL) {
    2280           0 :                                 return -1;
    2281             :                         }
    2282           0 :                         if (test_var > uint_max) {
    2283           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2284             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2285           0 :                                 return -1;
    2286             :                         }
    2287           0 :                         object->cancel_count = test_var;
    2288             :                 } else {
    2289           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2290             :                           PyLong_Type.tp_name);
    2291           0 :                         return -1;
    2292             :                 }
    2293             :         }
    2294           0 :         return 0;
    2295             : }
    2296             : 
    2297           0 : static PyObject *py_dcerpc_response_get_reserved(PyObject *obj, void *closure)
    2298             : {
    2299           0 :         struct dcerpc_response *object = (struct dcerpc_response *)pytalloc_get_ptr(obj);
    2300             :         PyObject *py_reserved;
    2301           0 :         py_reserved = PyLong_FromLong((uint16_t)object->reserved);
    2302           0 :         return py_reserved;
    2303             : }
    2304             : 
    2305           0 : static int py_dcerpc_response_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
    2306             : {
    2307           0 :         struct dcerpc_response *object = (struct dcerpc_response *)pytalloc_get_ptr(py_obj);
    2308           0 :         if (value == NULL) {
    2309           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved");
    2310           0 :                 return -1;
    2311             :         }
    2312             :         {
    2313           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved));
    2314           0 :                 if (PyLong_Check(value)) {
    2315             :                         unsigned long long test_var;
    2316           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2317           0 :                         if (PyErr_Occurred() != NULL) {
    2318           0 :                                 return -1;
    2319             :                         }
    2320           0 :                         if (test_var > uint_max) {
    2321           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2322             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2323           0 :                                 return -1;
    2324             :                         }
    2325           0 :                         object->reserved = test_var;
    2326             :                 } else {
    2327           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2328             :                           PyLong_Type.tp_name);
    2329           0 :                         return -1;
    2330             :                 }
    2331             :         }
    2332           0 :         return 0;
    2333             : }
    2334             : 
    2335        1154 : static PyObject *py_dcerpc_response_get_stub_and_verifier(PyObject *obj, void *closure)
    2336             : {
    2337        1154 :         struct dcerpc_response *object = (struct dcerpc_response *)pytalloc_get_ptr(obj);
    2338             :         PyObject *py_stub_and_verifier;
    2339        1154 :         py_stub_and_verifier = PyBytes_FromStringAndSize((char *)(object->stub_and_verifier).data, (object->stub_and_verifier).length);
    2340        1154 :         return py_stub_and_verifier;
    2341             : }
    2342             : 
    2343           0 : static int py_dcerpc_response_set_stub_and_verifier(PyObject *py_obj, PyObject *value, void *closure)
    2344             : {
    2345           0 :         struct dcerpc_response *object = (struct dcerpc_response *)pytalloc_get_ptr(py_obj);
    2346           0 :         if (value == NULL) {
    2347           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->stub_and_verifier");
    2348           0 :                 return -1;
    2349             :         }
    2350           0 :         object->stub_and_verifier = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
    2351           0 :         return 0;
    2352             : }
    2353             : 
    2354             : static PyGetSetDef py_dcerpc_response_getsetters[] = {
    2355             :         {
    2356             :                 .name = discard_const_p(char, "alloc_hint"),
    2357             :                 .get = py_dcerpc_response_get_alloc_hint,
    2358             :                 .set = py_dcerpc_response_set_alloc_hint,
    2359             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    2360             :         },
    2361             :         {
    2362             :                 .name = discard_const_p(char, "context_id"),
    2363             :                 .get = py_dcerpc_response_get_context_id,
    2364             :                 .set = py_dcerpc_response_set_context_id,
    2365             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    2366             :         },
    2367             :         {
    2368             :                 .name = discard_const_p(char, "cancel_count"),
    2369             :                 .get = py_dcerpc_response_get_cancel_count,
    2370             :                 .set = py_dcerpc_response_set_cancel_count,
    2371             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    2372             :         },
    2373             :         {
    2374             :                 .name = discard_const_p(char, "reserved"),
    2375             :                 .get = py_dcerpc_response_get_reserved,
    2376             :                 .set = py_dcerpc_response_set_reserved,
    2377             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    2378             :         },
    2379             :         {
    2380             :                 .name = discard_const_p(char, "stub_and_verifier"),
    2381             :                 .get = py_dcerpc_response_get_stub_and_verifier,
    2382             :                 .set = py_dcerpc_response_set_stub_and_verifier,
    2383             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
    2384             :         },
    2385             :         { .name = NULL }
    2386             : };
    2387             : 
    2388           0 : static PyObject *py_dcerpc_response_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2389             : {
    2390           0 :         return pytalloc_new(struct dcerpc_response, type);
    2391             : }
    2392             : 
    2393             : 
    2394             : static PyTypeObject dcerpc_response_Type = {
    2395             :         PyVarObject_HEAD_INIT(NULL, 0)
    2396             :         .tp_name = "dcerpc.response",
    2397             :         .tp_getset = py_dcerpc_response_getsetters,
    2398             :         .tp_methods = NULL,
    2399             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2400             :         .tp_new = py_dcerpc_response_new,
    2401             : };
    2402             : 
    2403             : 
    2404         314 : static PyObject *py_dcerpc_fault_get_alloc_hint(PyObject *obj, void *closure)
    2405             : {
    2406         314 :         struct dcerpc_fault *object = (struct dcerpc_fault *)pytalloc_get_ptr(obj);
    2407             :         PyObject *py_alloc_hint;
    2408         314 :         py_alloc_hint = PyLong_FromUnsignedLongLong((uint32_t)object->alloc_hint);
    2409         314 :         return py_alloc_hint;
    2410             : }
    2411             : 
    2412           0 : static int py_dcerpc_fault_set_alloc_hint(PyObject *py_obj, PyObject *value, void *closure)
    2413             : {
    2414           0 :         struct dcerpc_fault *object = (struct dcerpc_fault *)pytalloc_get_ptr(py_obj);
    2415           0 :         if (value == NULL) {
    2416           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->alloc_hint");
    2417           0 :                 return -1;
    2418             :         }
    2419             :         {
    2420           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->alloc_hint));
    2421           0 :                 if (PyLong_Check(value)) {
    2422             :                         unsigned long long test_var;
    2423           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2424           0 :                         if (PyErr_Occurred() != NULL) {
    2425           0 :                                 return -1;
    2426             :                         }
    2427           0 :                         if (test_var > uint_max) {
    2428           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2429             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2430           0 :                                 return -1;
    2431             :                         }
    2432           0 :                         object->alloc_hint = test_var;
    2433             :                 } else {
    2434           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2435             :                           PyLong_Type.tp_name);
    2436           0 :                         return -1;
    2437             :                 }
    2438             :         }
    2439           0 :         return 0;
    2440             : }
    2441             : 
    2442         314 : static PyObject *py_dcerpc_fault_get_context_id(PyObject *obj, void *closure)
    2443             : {
    2444         314 :         struct dcerpc_fault *object = (struct dcerpc_fault *)pytalloc_get_ptr(obj);
    2445             :         PyObject *py_context_id;
    2446         314 :         py_context_id = PyLong_FromLong((uint16_t)object->context_id);
    2447         314 :         return py_context_id;
    2448             : }
    2449             : 
    2450           0 : static int py_dcerpc_fault_set_context_id(PyObject *py_obj, PyObject *value, void *closure)
    2451             : {
    2452           0 :         struct dcerpc_fault *object = (struct dcerpc_fault *)pytalloc_get_ptr(py_obj);
    2453           0 :         if (value == NULL) {
    2454           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->context_id");
    2455           0 :                 return -1;
    2456             :         }
    2457             :         {
    2458           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->context_id));
    2459           0 :                 if (PyLong_Check(value)) {
    2460             :                         unsigned long long test_var;
    2461           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2462           0 :                         if (PyErr_Occurred() != NULL) {
    2463           0 :                                 return -1;
    2464             :                         }
    2465           0 :                         if (test_var > uint_max) {
    2466           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2467             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2468           0 :                                 return -1;
    2469             :                         }
    2470           0 :                         object->context_id = test_var;
    2471             :                 } else {
    2472           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2473             :                           PyLong_Type.tp_name);
    2474           0 :                         return -1;
    2475             :                 }
    2476             :         }
    2477           0 :         return 0;
    2478             : }
    2479             : 
    2480         314 : static PyObject *py_dcerpc_fault_get_cancel_count(PyObject *obj, void *closure)
    2481             : {
    2482         314 :         struct dcerpc_fault *object = (struct dcerpc_fault *)pytalloc_get_ptr(obj);
    2483             :         PyObject *py_cancel_count;
    2484         314 :         py_cancel_count = PyLong_FromLong((uint16_t)object->cancel_count);
    2485         314 :         return py_cancel_count;
    2486             : }
    2487             : 
    2488           0 : static int py_dcerpc_fault_set_cancel_count(PyObject *py_obj, PyObject *value, void *closure)
    2489             : {
    2490           0 :         struct dcerpc_fault *object = (struct dcerpc_fault *)pytalloc_get_ptr(py_obj);
    2491           0 :         if (value == NULL) {
    2492           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->cancel_count");
    2493           0 :                 return -1;
    2494             :         }
    2495             :         {
    2496           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->cancel_count));
    2497           0 :                 if (PyLong_Check(value)) {
    2498             :                         unsigned long long test_var;
    2499           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2500           0 :                         if (PyErr_Occurred() != NULL) {
    2501           0 :                                 return -1;
    2502             :                         }
    2503           0 :                         if (test_var > uint_max) {
    2504           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2505             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2506           0 :                                 return -1;
    2507             :                         }
    2508           0 :                         object->cancel_count = test_var;
    2509             :                 } else {
    2510           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2511             :                           PyLong_Type.tp_name);
    2512           0 :                         return -1;
    2513             :                 }
    2514             :         }
    2515           0 :         return 0;
    2516             : }
    2517             : 
    2518         314 : static PyObject *py_dcerpc_fault_get_flags(PyObject *obj, void *closure)
    2519             : {
    2520         314 :         struct dcerpc_fault *object = (struct dcerpc_fault *)pytalloc_get_ptr(obj);
    2521             :         PyObject *py_flags;
    2522         314 :         py_flags = PyLong_FromLong((uint16_t)object->flags);
    2523         314 :         return py_flags;
    2524             : }
    2525             : 
    2526           0 : static int py_dcerpc_fault_set_flags(PyObject *py_obj, PyObject *value, void *closure)
    2527             : {
    2528           0 :         struct dcerpc_fault *object = (struct dcerpc_fault *)pytalloc_get_ptr(py_obj);
    2529           0 :         if (value == NULL) {
    2530           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->flags");
    2531           0 :                 return -1;
    2532             :         }
    2533             :         {
    2534           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
    2535           0 :                 if (PyLong_Check(value)) {
    2536             :                         unsigned long long test_var;
    2537           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2538           0 :                         if (PyErr_Occurred() != NULL) {
    2539           0 :                                 return -1;
    2540             :                         }
    2541           0 :                         if (test_var > uint_max) {
    2542           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2543             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2544           0 :                                 return -1;
    2545             :                         }
    2546           0 :                         object->flags = test_var;
    2547             :                 } else {
    2548           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2549             :                           PyLong_Type.tp_name);
    2550           0 :                         return -1;
    2551             :                 }
    2552             :         }
    2553           0 :         return 0;
    2554             : }
    2555             : 
    2556         314 : static PyObject *py_dcerpc_fault_get_status(PyObject *obj, void *closure)
    2557             : {
    2558         314 :         struct dcerpc_fault *object = (struct dcerpc_fault *)pytalloc_get_ptr(obj);
    2559             :         PyObject *py_status;
    2560         314 :         py_status = PyLong_FromUnsignedLongLong((uint32_t)object->status);
    2561         314 :         return py_status;
    2562             : }
    2563             : 
    2564           0 : static int py_dcerpc_fault_set_status(PyObject *py_obj, PyObject *value, void *closure)
    2565             : {
    2566           0 :         struct dcerpc_fault *object = (struct dcerpc_fault *)pytalloc_get_ptr(py_obj);
    2567           0 :         if (value == NULL) {
    2568           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->status");
    2569           0 :                 return -1;
    2570             :         }
    2571             :         {
    2572           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->status));
    2573           0 :                 if (PyLong_Check(value)) {
    2574             :                         unsigned long long test_var;
    2575           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2576           0 :                         if (PyErr_Occurred() != NULL) {
    2577           0 :                                 return -1;
    2578             :                         }
    2579           0 :                         if (test_var > uint_max) {
    2580           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2581             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2582           0 :                                 return -1;
    2583             :                         }
    2584           0 :                         object->status = test_var;
    2585             :                 } else {
    2586           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2587             :                           PyLong_Type.tp_name);
    2588           0 :                         return -1;
    2589             :                 }
    2590             :         }
    2591           0 :         return 0;
    2592             : }
    2593             : 
    2594         308 : static PyObject *py_dcerpc_fault_get_reserved(PyObject *obj, void *closure)
    2595             : {
    2596         308 :         struct dcerpc_fault *object = (struct dcerpc_fault *)pytalloc_get_ptr(obj);
    2597             :         PyObject *py_reserved;
    2598         308 :         py_reserved = PyLong_FromUnsignedLongLong((uint32_t)object->reserved);
    2599         308 :         return py_reserved;
    2600             : }
    2601             : 
    2602           0 : static int py_dcerpc_fault_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
    2603             : {
    2604           0 :         struct dcerpc_fault *object = (struct dcerpc_fault *)pytalloc_get_ptr(py_obj);
    2605           0 :         if (value == NULL) {
    2606           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved");
    2607           0 :                 return -1;
    2608             :         }
    2609             :         {
    2610           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved));
    2611           0 :                 if (PyLong_Check(value)) {
    2612             :                         unsigned long long test_var;
    2613           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2614           0 :                         if (PyErr_Occurred() != NULL) {
    2615           0 :                                 return -1;
    2616             :                         }
    2617           0 :                         if (test_var > uint_max) {
    2618           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2619             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2620           0 :                                 return -1;
    2621             :                         }
    2622           0 :                         object->reserved = test_var;
    2623             :                 } else {
    2624           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2625             :                           PyLong_Type.tp_name);
    2626           0 :                         return -1;
    2627             :                 }
    2628             :         }
    2629           0 :         return 0;
    2630             : }
    2631             : 
    2632         308 : static PyObject *py_dcerpc_fault_get_error_and_verifier(PyObject *obj, void *closure)
    2633             : {
    2634         308 :         struct dcerpc_fault *object = (struct dcerpc_fault *)pytalloc_get_ptr(obj);
    2635             :         PyObject *py_error_and_verifier;
    2636         308 :         py_error_and_verifier = PyBytes_FromStringAndSize((char *)(object->error_and_verifier).data, (object->error_and_verifier).length);
    2637         308 :         return py_error_and_verifier;
    2638             : }
    2639             : 
    2640           0 : static int py_dcerpc_fault_set_error_and_verifier(PyObject *py_obj, PyObject *value, void *closure)
    2641             : {
    2642           0 :         struct dcerpc_fault *object = (struct dcerpc_fault *)pytalloc_get_ptr(py_obj);
    2643           0 :         if (value == NULL) {
    2644           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->error_and_verifier");
    2645           0 :                 return -1;
    2646             :         }
    2647           0 :         object->error_and_verifier = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
    2648           0 :         return 0;
    2649             : }
    2650             : 
    2651             : static PyGetSetDef py_dcerpc_fault_getsetters[] = {
    2652             :         {
    2653             :                 .name = discard_const_p(char, "alloc_hint"),
    2654             :                 .get = py_dcerpc_fault_get_alloc_hint,
    2655             :                 .set = py_dcerpc_fault_set_alloc_hint,
    2656             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    2657             :         },
    2658             :         {
    2659             :                 .name = discard_const_p(char, "context_id"),
    2660             :                 .get = py_dcerpc_fault_get_context_id,
    2661             :                 .set = py_dcerpc_fault_set_context_id,
    2662             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    2663             :         },
    2664             :         {
    2665             :                 .name = discard_const_p(char, "cancel_count"),
    2666             :                 .get = py_dcerpc_fault_get_cancel_count,
    2667             :                 .set = py_dcerpc_fault_set_cancel_count,
    2668             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    2669             :         },
    2670             :         {
    2671             :                 .name = discard_const_p(char, "flags"),
    2672             :                 .get = py_dcerpc_fault_get_flags,
    2673             :                 .set = py_dcerpc_fault_set_flags,
    2674             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dcerpc_fault_flags")
    2675             :         },
    2676             :         {
    2677             :                 .name = discard_const_p(char, "status"),
    2678             :                 .get = py_dcerpc_fault_get_status,
    2679             :                 .set = py_dcerpc_fault_set_status,
    2680             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dcerpc_nca_status")
    2681             :         },
    2682             :         {
    2683             :                 .name = discard_const_p(char, "reserved"),
    2684             :                 .get = py_dcerpc_fault_get_reserved,
    2685             :                 .set = py_dcerpc_fault_set_reserved,
    2686             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    2687             :         },
    2688             :         {
    2689             :                 .name = discard_const_p(char, "error_and_verifier"),
    2690             :                 .get = py_dcerpc_fault_get_error_and_verifier,
    2691             :                 .set = py_dcerpc_fault_set_error_and_verifier,
    2692             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
    2693             :         },
    2694             :         { .name = NULL }
    2695             : };
    2696             : 
    2697           0 : static PyObject *py_dcerpc_fault_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2698             : {
    2699           0 :         return pytalloc_new(struct dcerpc_fault, type);
    2700             : }
    2701             : 
    2702             : 
    2703             : static PyTypeObject dcerpc_fault_Type = {
    2704             :         PyVarObject_HEAD_INIT(NULL, 0)
    2705             :         .tp_name = "dcerpc.fault",
    2706             :         .tp_getset = py_dcerpc_fault_getsetters,
    2707             :         .tp_methods = NULL,
    2708             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2709             :         .tp_new = py_dcerpc_fault_new,
    2710             : };
    2711             : 
    2712             : 
    2713         585 : static PyObject *py_dcerpc_auth_get_auth_type(PyObject *obj, void *closure)
    2714             : {
    2715         585 :         struct dcerpc_auth *object = (struct dcerpc_auth *)pytalloc_get_ptr(obj);
    2716             :         PyObject *py_auth_type;
    2717         585 :         py_auth_type = PyLong_FromLong((uint16_t)object->auth_type);
    2718         585 :         return py_auth_type;
    2719             : }
    2720             : 
    2721        1518 : static int py_dcerpc_auth_set_auth_type(PyObject *py_obj, PyObject *value, void *closure)
    2722             : {
    2723        1518 :         struct dcerpc_auth *object = (struct dcerpc_auth *)pytalloc_get_ptr(py_obj);
    2724        1518 :         if (value == NULL) {
    2725           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->auth_type");
    2726           0 :                 return -1;
    2727             :         }
    2728             :         {
    2729        1518 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->auth_type));
    2730        1518 :                 if (PyLong_Check(value)) {
    2731             :                         unsigned long long test_var;
    2732        1518 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2733        1518 :                         if (PyErr_Occurred() != NULL) {
    2734           0 :                                 return -1;
    2735             :                         }
    2736        1518 :                         if (test_var > uint_max) {
    2737           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2738             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2739           0 :                                 return -1;
    2740             :                         }
    2741        1518 :                         object->auth_type = test_var;
    2742             :                 } else {
    2743           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2744             :                           PyLong_Type.tp_name);
    2745           0 :                         return -1;
    2746             :                 }
    2747             :         }
    2748        1518 :         return 0;
    2749             : }
    2750             : 
    2751         585 : static PyObject *py_dcerpc_auth_get_auth_level(PyObject *obj, void *closure)
    2752             : {
    2753         585 :         struct dcerpc_auth *object = (struct dcerpc_auth *)pytalloc_get_ptr(obj);
    2754             :         PyObject *py_auth_level;
    2755         585 :         py_auth_level = PyLong_FromLong((uint16_t)object->auth_level);
    2756         585 :         return py_auth_level;
    2757             : }
    2758             : 
    2759        1518 : static int py_dcerpc_auth_set_auth_level(PyObject *py_obj, PyObject *value, void *closure)
    2760             : {
    2761        1518 :         struct dcerpc_auth *object = (struct dcerpc_auth *)pytalloc_get_ptr(py_obj);
    2762        1518 :         if (value == NULL) {
    2763           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->auth_level");
    2764           0 :                 return -1;
    2765             :         }
    2766             :         {
    2767        1518 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->auth_level));
    2768        1518 :                 if (PyLong_Check(value)) {
    2769             :                         unsigned long long test_var;
    2770        1518 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2771        1518 :                         if (PyErr_Occurred() != NULL) {
    2772           0 :                                 return -1;
    2773             :                         }
    2774        1518 :                         if (test_var > uint_max) {
    2775           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2776             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2777           0 :                                 return -1;
    2778             :                         }
    2779        1518 :                         object->auth_level = test_var;
    2780             :                 } else {
    2781           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2782             :                           PyLong_Type.tp_name);
    2783           0 :                         return -1;
    2784             :                 }
    2785             :         }
    2786        1518 :         return 0;
    2787             : }
    2788             : 
    2789        1107 : static PyObject *py_dcerpc_auth_get_auth_pad_length(PyObject *obj, void *closure)
    2790             : {
    2791        1107 :         struct dcerpc_auth *object = (struct dcerpc_auth *)pytalloc_get_ptr(obj);
    2792             :         PyObject *py_auth_pad_length;
    2793        1107 :         py_auth_pad_length = PyLong_FromLong((uint16_t)object->auth_pad_length);
    2794        1107 :         return py_auth_pad_length;
    2795             : }
    2796             : 
    2797        1518 : static int py_dcerpc_auth_set_auth_pad_length(PyObject *py_obj, PyObject *value, void *closure)
    2798             : {
    2799        1518 :         struct dcerpc_auth *object = (struct dcerpc_auth *)pytalloc_get_ptr(py_obj);
    2800        1518 :         if (value == NULL) {
    2801           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->auth_pad_length");
    2802           0 :                 return -1;
    2803             :         }
    2804             :         {
    2805        1518 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->auth_pad_length));
    2806        1518 :                 if (PyLong_Check(value)) {
    2807             :                         unsigned long long test_var;
    2808        1518 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2809        1518 :                         if (PyErr_Occurred() != NULL) {
    2810           0 :                                 return -1;
    2811             :                         }
    2812        1518 :                         if (test_var > uint_max) {
    2813           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2814             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2815           0 :                                 return -1;
    2816             :                         }
    2817        1518 :                         object->auth_pad_length = test_var;
    2818             :                 } else {
    2819           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2820             :                           PyLong_Type.tp_name);
    2821           0 :                         return -1;
    2822             :                 }
    2823             :         }
    2824        1518 :         return 0;
    2825             : }
    2826             : 
    2827         585 : static PyObject *py_dcerpc_auth_get_auth_reserved(PyObject *obj, void *closure)
    2828             : {
    2829         585 :         struct dcerpc_auth *object = (struct dcerpc_auth *)pytalloc_get_ptr(obj);
    2830             :         PyObject *py_auth_reserved;
    2831         585 :         py_auth_reserved = PyLong_FromLong((uint16_t)object->auth_reserved);
    2832         585 :         return py_auth_reserved;
    2833             : }
    2834             : 
    2835           0 : static int py_dcerpc_auth_set_auth_reserved(PyObject *py_obj, PyObject *value, void *closure)
    2836             : {
    2837           0 :         struct dcerpc_auth *object = (struct dcerpc_auth *)pytalloc_get_ptr(py_obj);
    2838           0 :         if (value == NULL) {
    2839           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->auth_reserved");
    2840           0 :                 return -1;
    2841             :         }
    2842             :         {
    2843           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->auth_reserved));
    2844           0 :                 if (PyLong_Check(value)) {
    2845             :                         unsigned long long test_var;
    2846           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2847           0 :                         if (PyErr_Occurred() != NULL) {
    2848           0 :                                 return -1;
    2849             :                         }
    2850           0 :                         if (test_var > uint_max) {
    2851           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2852             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2853           0 :                                 return -1;
    2854             :                         }
    2855           0 :                         object->auth_reserved = test_var;
    2856             :                 } else {
    2857           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2858             :                           PyLong_Type.tp_name);
    2859           0 :                         return -1;
    2860             :                 }
    2861             :         }
    2862           0 :         return 0;
    2863             : }
    2864             : 
    2865         585 : static PyObject *py_dcerpc_auth_get_auth_context_id(PyObject *obj, void *closure)
    2866             : {
    2867         585 :         struct dcerpc_auth *object = (struct dcerpc_auth *)pytalloc_get_ptr(obj);
    2868             :         PyObject *py_auth_context_id;
    2869         585 :         py_auth_context_id = PyLong_FromUnsignedLongLong((uint32_t)object->auth_context_id);
    2870         585 :         return py_auth_context_id;
    2871             : }
    2872             : 
    2873        1518 : static int py_dcerpc_auth_set_auth_context_id(PyObject *py_obj, PyObject *value, void *closure)
    2874             : {
    2875        1518 :         struct dcerpc_auth *object = (struct dcerpc_auth *)pytalloc_get_ptr(py_obj);
    2876        1518 :         if (value == NULL) {
    2877           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->auth_context_id");
    2878           0 :                 return -1;
    2879             :         }
    2880             :         {
    2881        1518 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->auth_context_id));
    2882        1518 :                 if (PyLong_Check(value)) {
    2883             :                         unsigned long long test_var;
    2884        1518 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2885        1518 :                         if (PyErr_Occurred() != NULL) {
    2886           0 :                                 return -1;
    2887             :                         }
    2888        1518 :                         if (test_var > uint_max) {
    2889           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2890             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2891           0 :                                 return -1;
    2892             :                         }
    2893        1518 :                         object->auth_context_id = test_var;
    2894             :                 } else {
    2895           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2896             :                           PyLong_Type.tp_name);
    2897           0 :                         return -1;
    2898             :                 }
    2899             :         }
    2900        1518 :         return 0;
    2901             : }
    2902             : 
    2903         660 : static PyObject *py_dcerpc_auth_get_credentials(PyObject *obj, void *closure)
    2904             : {
    2905         660 :         struct dcerpc_auth *object = (struct dcerpc_auth *)pytalloc_get_ptr(obj);
    2906             :         PyObject *py_credentials;
    2907         660 :         py_credentials = PyBytes_FromStringAndSize((char *)(object->credentials).data, (object->credentials).length);
    2908         660 :         return py_credentials;
    2909             : }
    2910             : 
    2911        1518 : static int py_dcerpc_auth_set_credentials(PyObject *py_obj, PyObject *value, void *closure)
    2912             : {
    2913        1518 :         struct dcerpc_auth *object = (struct dcerpc_auth *)pytalloc_get_ptr(py_obj);
    2914        1518 :         if (value == NULL) {
    2915           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->credentials");
    2916           0 :                 return -1;
    2917             :         }
    2918        1518 :         object->credentials = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
    2919        1518 :         return 0;
    2920             : }
    2921             : 
    2922             : static PyGetSetDef py_dcerpc_auth_getsetters[] = {
    2923             :         {
    2924             :                 .name = discard_const_p(char, "auth_type"),
    2925             :                 .get = py_dcerpc_auth_get_auth_type,
    2926             :                 .set = py_dcerpc_auth_set_auth_type,
    2927             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dcerpc_AuthType")
    2928             :         },
    2929             :         {
    2930             :                 .name = discard_const_p(char, "auth_level"),
    2931             :                 .get = py_dcerpc_auth_get_auth_level,
    2932             :                 .set = py_dcerpc_auth_set_auth_level,
    2933             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dcerpc_AuthLevel")
    2934             :         },
    2935             :         {
    2936             :                 .name = discard_const_p(char, "auth_pad_length"),
    2937             :                 .get = py_dcerpc_auth_get_auth_pad_length,
    2938             :                 .set = py_dcerpc_auth_set_auth_pad_length,
    2939             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    2940             :         },
    2941             :         {
    2942             :                 .name = discard_const_p(char, "auth_reserved"),
    2943             :                 .get = py_dcerpc_auth_get_auth_reserved,
    2944             :                 .set = py_dcerpc_auth_set_auth_reserved,
    2945             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    2946             :         },
    2947             :         {
    2948             :                 .name = discard_const_p(char, "auth_context_id"),
    2949             :                 .get = py_dcerpc_auth_get_auth_context_id,
    2950             :                 .set = py_dcerpc_auth_set_auth_context_id,
    2951             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    2952             :         },
    2953             :         {
    2954             :                 .name = discard_const_p(char, "credentials"),
    2955             :                 .get = py_dcerpc_auth_get_credentials,
    2956             :                 .set = py_dcerpc_auth_set_credentials,
    2957             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
    2958             :         },
    2959             :         { .name = NULL }
    2960             : };
    2961             : 
    2962        2178 : static PyObject *py_dcerpc_auth_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2963             : {
    2964        2178 :         return pytalloc_new(struct dcerpc_auth, type);
    2965             : }
    2966             : 
    2967        1518 : static PyObject *py_dcerpc_auth_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    2968             : {
    2969        1518 :         struct dcerpc_auth *object = (struct dcerpc_auth *)pytalloc_get_ptr(py_obj);
    2970        1518 :         PyObject *ret = NULL;
    2971             :         DATA_BLOB blob;
    2972             :         enum ndr_err_code err;
    2973        1518 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    2974        1518 :         if (tmp_ctx == NULL) {
    2975           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    2976           0 :                 return NULL;
    2977             :         }
    2978        1518 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_dcerpc_auth);
    2979        1518 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2980           0 :                 TALLOC_FREE(tmp_ctx);
    2981           0 :                 PyErr_SetNdrError(err);
    2982           0 :                 return NULL;
    2983             :         }
    2984             : 
    2985        1518 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    2986        1518 :         TALLOC_FREE(tmp_ctx);
    2987        1518 :         return ret;
    2988             : }
    2989             : 
    2990         660 : static PyObject *py_dcerpc_auth_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    2991             : {
    2992         660 :         struct dcerpc_auth *object = (struct dcerpc_auth *)pytalloc_get_ptr(py_obj);
    2993         660 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    2994         660 :         Py_ssize_t blob_length = 0;
    2995             :         enum ndr_err_code err;
    2996         660 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    2997         660 :         PyObject *allow_remaining_obj = NULL;
    2998         660 :         bool allow_remaining = false;
    2999             : 
    3000         660 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    3001             :                 discard_const_p(char *, kwnames),
    3002             :                 &blob.data, &blob_length,
    3003             :                 &allow_remaining_obj)) {
    3004           0 :                 return NULL;
    3005             :         }
    3006         660 :         blob.length = blob_length;
    3007             : 
    3008         660 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    3009         660 :                 allow_remaining = true;
    3010             :         }
    3011             : 
    3012         660 :         if (allow_remaining) {
    3013         660 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_auth);
    3014             :         } else {
    3015           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_auth);
    3016             :         }
    3017         660 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    3018           0 :                 PyErr_SetNdrError(err);
    3019           0 :                 return NULL;
    3020             :         }
    3021             : 
    3022         660 :         Py_RETURN_NONE;
    3023             : }
    3024             : 
    3025           0 : static PyObject *py_dcerpc_auth_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    3026             : {
    3027           0 :         struct dcerpc_auth *object = (struct dcerpc_auth *)pytalloc_get_ptr(py_obj);
    3028             :         PyObject *ret;
    3029             :         char *retstr;
    3030             : 
    3031           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_dcerpc_auth, "dcerpc_auth", object);
    3032           0 :         ret = PyUnicode_FromString(retstr);
    3033           0 :         talloc_free(retstr);
    3034             : 
    3035           0 :         return ret;
    3036             : }
    3037             : 
    3038             : static PyMethodDef py_dcerpc_auth_methods[] = {
    3039             :         { "__ndr_pack__", (PyCFunction)py_dcerpc_auth_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    3040             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_auth_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    3041             :         { "__ndr_print__", (PyCFunction)py_dcerpc_auth_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    3042             :         { NULL, NULL, 0, NULL }
    3043             : };
    3044             : 
    3045             : 
    3046             : static PyTypeObject dcerpc_auth_Type = {
    3047             :         PyVarObject_HEAD_INIT(NULL, 0)
    3048             :         .tp_name = "dcerpc.auth",
    3049             :         .tp_getset = py_dcerpc_auth_getsetters,
    3050             :         .tp_methods = py_dcerpc_auth_methods,
    3051             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    3052             :         .tp_new = py_dcerpc_auth_new,
    3053             : };
    3054             : 
    3055             : 
    3056           0 : static PyObject *py_dcerpc_auth3_get__pad(PyObject *obj, void *closure)
    3057             : {
    3058           0 :         struct dcerpc_auth3 *object = (struct dcerpc_auth3 *)pytalloc_get_ptr(obj);
    3059             :         PyObject *py__pad;
    3060           0 :         py__pad = PyLong_FromUnsignedLongLong((uint32_t)object->_pad);
    3061           0 :         return py__pad;
    3062             : }
    3063             : 
    3064           0 : static int py_dcerpc_auth3_set__pad(PyObject *py_obj, PyObject *value, void *closure)
    3065             : {
    3066           0 :         struct dcerpc_auth3 *object = (struct dcerpc_auth3 *)pytalloc_get_ptr(py_obj);
    3067           0 :         if (value == NULL) {
    3068           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->_pad");
    3069           0 :                 return -1;
    3070             :         }
    3071             :         {
    3072           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->_pad));
    3073           0 :                 if (PyLong_Check(value)) {
    3074             :                         unsigned long long test_var;
    3075           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3076           0 :                         if (PyErr_Occurred() != NULL) {
    3077           0 :                                 return -1;
    3078             :                         }
    3079           0 :                         if (test_var > uint_max) {
    3080           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3081             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3082           0 :                                 return -1;
    3083             :                         }
    3084           0 :                         object->_pad = test_var;
    3085             :                 } else {
    3086           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3087             :                           PyLong_Type.tp_name);
    3088           0 :                         return -1;
    3089             :                 }
    3090             :         }
    3091           0 :         return 0;
    3092             : }
    3093             : 
    3094          30 : static PyObject *py_dcerpc_auth3_get_auth_info(PyObject *obj, void *closure)
    3095             : {
    3096          30 :         struct dcerpc_auth3 *object = (struct dcerpc_auth3 *)pytalloc_get_ptr(obj);
    3097             :         PyObject *py_auth_info;
    3098          30 :         py_auth_info = PyBytes_FromStringAndSize((char *)(object->auth_info).data, (object->auth_info).length);
    3099          30 :         return py_auth_info;
    3100             : }
    3101             : 
    3102          15 : static int py_dcerpc_auth3_set_auth_info(PyObject *py_obj, PyObject *value, void *closure)
    3103             : {
    3104          15 :         struct dcerpc_auth3 *object = (struct dcerpc_auth3 *)pytalloc_get_ptr(py_obj);
    3105          15 :         if (value == NULL) {
    3106           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->auth_info");
    3107           0 :                 return -1;
    3108             :         }
    3109          15 :         object->auth_info = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
    3110          15 :         return 0;
    3111             : }
    3112             : 
    3113             : static PyGetSetDef py_dcerpc_auth3_getsetters[] = {
    3114             :         {
    3115             :                 .name = discard_const_p(char, "_pad"),
    3116             :                 .get = py_dcerpc_auth3_get__pad,
    3117             :                 .set = py_dcerpc_auth3_set__pad,
    3118             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3119             :         },
    3120             :         {
    3121             :                 .name = discard_const_p(char, "auth_info"),
    3122             :                 .get = py_dcerpc_auth3_get_auth_info,
    3123             :                 .set = py_dcerpc_auth3_set_auth_info,
    3124             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
    3125             :         },
    3126             :         { .name = NULL }
    3127             : };
    3128             : 
    3129          15 : static PyObject *py_dcerpc_auth3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    3130             : {
    3131          15 :         return pytalloc_new(struct dcerpc_auth3, type);
    3132             : }
    3133             : 
    3134           0 : static PyObject *py_dcerpc_auth3_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    3135             : {
    3136           0 :         struct dcerpc_auth3 *object = (struct dcerpc_auth3 *)pytalloc_get_ptr(py_obj);
    3137           0 :         PyObject *ret = NULL;
    3138             :         DATA_BLOB blob;
    3139             :         enum ndr_err_code err;
    3140           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    3141           0 :         if (tmp_ctx == NULL) {
    3142           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    3143           0 :                 return NULL;
    3144             :         }
    3145           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_dcerpc_auth3);
    3146           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    3147           0 :                 TALLOC_FREE(tmp_ctx);
    3148           0 :                 PyErr_SetNdrError(err);
    3149           0 :                 return NULL;
    3150             :         }
    3151             : 
    3152           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    3153           0 :         TALLOC_FREE(tmp_ctx);
    3154           0 :         return ret;
    3155             : }
    3156             : 
    3157           0 : static PyObject *py_dcerpc_auth3_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    3158             : {
    3159           0 :         struct dcerpc_auth3 *object = (struct dcerpc_auth3 *)pytalloc_get_ptr(py_obj);
    3160           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    3161           0 :         Py_ssize_t blob_length = 0;
    3162             :         enum ndr_err_code err;
    3163           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    3164           0 :         PyObject *allow_remaining_obj = NULL;
    3165           0 :         bool allow_remaining = false;
    3166             : 
    3167           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    3168             :                 discard_const_p(char *, kwnames),
    3169             :                 &blob.data, &blob_length,
    3170             :                 &allow_remaining_obj)) {
    3171           0 :                 return NULL;
    3172             :         }
    3173           0 :         blob.length = blob_length;
    3174             : 
    3175           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    3176           0 :                 allow_remaining = true;
    3177             :         }
    3178             : 
    3179           0 :         if (allow_remaining) {
    3180           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_auth3);
    3181             :         } else {
    3182           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_auth3);
    3183             :         }
    3184           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    3185           0 :                 PyErr_SetNdrError(err);
    3186           0 :                 return NULL;
    3187             :         }
    3188             : 
    3189           0 :         Py_RETURN_NONE;
    3190             : }
    3191             : 
    3192           0 : static PyObject *py_dcerpc_auth3_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    3193             : {
    3194           0 :         struct dcerpc_auth3 *object = (struct dcerpc_auth3 *)pytalloc_get_ptr(py_obj);
    3195             :         PyObject *ret;
    3196             :         char *retstr;
    3197             : 
    3198           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_dcerpc_auth3, "dcerpc_auth3", object);
    3199           0 :         ret = PyUnicode_FromString(retstr);
    3200           0 :         talloc_free(retstr);
    3201             : 
    3202           0 :         return ret;
    3203             : }
    3204             : 
    3205             : static PyMethodDef py_dcerpc_auth3_methods[] = {
    3206             :         { "__ndr_pack__", (PyCFunction)py_dcerpc_auth3_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    3207             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_auth3_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    3208             :         { "__ndr_print__", (PyCFunction)py_dcerpc_auth3_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    3209             :         { NULL, NULL, 0, NULL }
    3210             : };
    3211             : 
    3212             : 
    3213             : static PyTypeObject dcerpc_auth3_Type = {
    3214             :         PyVarObject_HEAD_INIT(NULL, 0)
    3215             :         .tp_name = "dcerpc.auth3",
    3216             :         .tp_getset = py_dcerpc_auth3_getsetters,
    3217             :         .tp_methods = py_dcerpc_auth3_methods,
    3218             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    3219             :         .tp_new = py_dcerpc_auth3_new,
    3220             : };
    3221             : 
    3222             : 
    3223          15 : static PyObject *py_dcerpc_orphaned_get_auth_info(PyObject *obj, void *closure)
    3224             : {
    3225          15 :         struct dcerpc_orphaned *object = (struct dcerpc_orphaned *)pytalloc_get_ptr(obj);
    3226             :         PyObject *py_auth_info;
    3227          15 :         py_auth_info = PyBytes_FromStringAndSize((char *)(object->auth_info).data, (object->auth_info).length);
    3228          15 :         return py_auth_info;
    3229             : }
    3230             : 
    3231          15 : static int py_dcerpc_orphaned_set_auth_info(PyObject *py_obj, PyObject *value, void *closure)
    3232             : {
    3233          15 :         struct dcerpc_orphaned *object = (struct dcerpc_orphaned *)pytalloc_get_ptr(py_obj);
    3234          15 :         if (value == NULL) {
    3235           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->auth_info");
    3236           0 :                 return -1;
    3237             :         }
    3238          15 :         object->auth_info = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
    3239          15 :         return 0;
    3240             : }
    3241             : 
    3242             : static PyGetSetDef py_dcerpc_orphaned_getsetters[] = {
    3243             :         {
    3244             :                 .name = discard_const_p(char, "auth_info"),
    3245             :                 .get = py_dcerpc_orphaned_get_auth_info,
    3246             :                 .set = py_dcerpc_orphaned_set_auth_info,
    3247             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
    3248             :         },
    3249             :         { .name = NULL }
    3250             : };
    3251             : 
    3252          15 : static PyObject *py_dcerpc_orphaned_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    3253             : {
    3254          15 :         return pytalloc_new(struct dcerpc_orphaned, type);
    3255             : }
    3256             : 
    3257           0 : static PyObject *py_dcerpc_orphaned_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    3258             : {
    3259           0 :         struct dcerpc_orphaned *object = (struct dcerpc_orphaned *)pytalloc_get_ptr(py_obj);
    3260           0 :         PyObject *ret = NULL;
    3261             :         DATA_BLOB blob;
    3262             :         enum ndr_err_code err;
    3263           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    3264           0 :         if (tmp_ctx == NULL) {
    3265           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    3266           0 :                 return NULL;
    3267             :         }
    3268           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_dcerpc_orphaned);
    3269           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    3270           0 :                 TALLOC_FREE(tmp_ctx);
    3271           0 :                 PyErr_SetNdrError(err);
    3272           0 :                 return NULL;
    3273             :         }
    3274             : 
    3275           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    3276           0 :         TALLOC_FREE(tmp_ctx);
    3277           0 :         return ret;
    3278             : }
    3279             : 
    3280           0 : static PyObject *py_dcerpc_orphaned_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    3281             : {
    3282           0 :         struct dcerpc_orphaned *object = (struct dcerpc_orphaned *)pytalloc_get_ptr(py_obj);
    3283           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    3284           0 :         Py_ssize_t blob_length = 0;
    3285             :         enum ndr_err_code err;
    3286           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    3287           0 :         PyObject *allow_remaining_obj = NULL;
    3288           0 :         bool allow_remaining = false;
    3289             : 
    3290           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    3291             :                 discard_const_p(char *, kwnames),
    3292             :                 &blob.data, &blob_length,
    3293             :                 &allow_remaining_obj)) {
    3294           0 :                 return NULL;
    3295             :         }
    3296           0 :         blob.length = blob_length;
    3297             : 
    3298           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    3299           0 :                 allow_remaining = true;
    3300             :         }
    3301             : 
    3302           0 :         if (allow_remaining) {
    3303           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_orphaned);
    3304             :         } else {
    3305           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_orphaned);
    3306             :         }
    3307           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    3308           0 :                 PyErr_SetNdrError(err);
    3309           0 :                 return NULL;
    3310             :         }
    3311             : 
    3312           0 :         Py_RETURN_NONE;
    3313             : }
    3314             : 
    3315           0 : static PyObject *py_dcerpc_orphaned_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    3316             : {
    3317           0 :         struct dcerpc_orphaned *object = (struct dcerpc_orphaned *)pytalloc_get_ptr(py_obj);
    3318             :         PyObject *ret;
    3319             :         char *retstr;
    3320             : 
    3321           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_dcerpc_orphaned, "dcerpc_orphaned", object);
    3322           0 :         ret = PyUnicode_FromString(retstr);
    3323           0 :         talloc_free(retstr);
    3324             : 
    3325           0 :         return ret;
    3326             : }
    3327             : 
    3328             : static PyMethodDef py_dcerpc_orphaned_methods[] = {
    3329             :         { "__ndr_pack__", (PyCFunction)py_dcerpc_orphaned_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    3330             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_orphaned_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    3331             :         { "__ndr_print__", (PyCFunction)py_dcerpc_orphaned_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    3332             :         { NULL, NULL, 0, NULL }
    3333             : };
    3334             : 
    3335             : 
    3336             : static PyTypeObject dcerpc_orphaned_Type = {
    3337             :         PyVarObject_HEAD_INIT(NULL, 0)
    3338             :         .tp_name = "dcerpc.orphaned",
    3339             :         .tp_getset = py_dcerpc_orphaned_getsetters,
    3340             :         .tp_methods = py_dcerpc_orphaned_methods,
    3341             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    3342             :         .tp_new = py_dcerpc_orphaned_new,
    3343             : };
    3344             : 
    3345             : 
    3346           6 : static PyObject *py_dcerpc_co_cancel_get_auth_info(PyObject *obj, void *closure)
    3347             : {
    3348           6 :         struct dcerpc_co_cancel *object = (struct dcerpc_co_cancel *)pytalloc_get_ptr(obj);
    3349             :         PyObject *py_auth_info;
    3350           6 :         py_auth_info = PyBytes_FromStringAndSize((char *)(object->auth_info).data, (object->auth_info).length);
    3351           6 :         return py_auth_info;
    3352             : }
    3353             : 
    3354           6 : static int py_dcerpc_co_cancel_set_auth_info(PyObject *py_obj, PyObject *value, void *closure)
    3355             : {
    3356           6 :         struct dcerpc_co_cancel *object = (struct dcerpc_co_cancel *)pytalloc_get_ptr(py_obj);
    3357           6 :         if (value == NULL) {
    3358           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->auth_info");
    3359           0 :                 return -1;
    3360             :         }
    3361           6 :         object->auth_info = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
    3362           6 :         return 0;
    3363             : }
    3364             : 
    3365             : static PyGetSetDef py_dcerpc_co_cancel_getsetters[] = {
    3366             :         {
    3367             :                 .name = discard_const_p(char, "auth_info"),
    3368             :                 .get = py_dcerpc_co_cancel_get_auth_info,
    3369             :                 .set = py_dcerpc_co_cancel_set_auth_info,
    3370             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
    3371             :         },
    3372             :         { .name = NULL }
    3373             : };
    3374             : 
    3375           6 : static PyObject *py_dcerpc_co_cancel_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    3376             : {
    3377           6 :         return pytalloc_new(struct dcerpc_co_cancel, type);
    3378             : }
    3379             : 
    3380           0 : static PyObject *py_dcerpc_co_cancel_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    3381             : {
    3382           0 :         struct dcerpc_co_cancel *object = (struct dcerpc_co_cancel *)pytalloc_get_ptr(py_obj);
    3383           0 :         PyObject *ret = NULL;
    3384             :         DATA_BLOB blob;
    3385             :         enum ndr_err_code err;
    3386           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    3387           0 :         if (tmp_ctx == NULL) {
    3388           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    3389           0 :                 return NULL;
    3390             :         }
    3391           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_dcerpc_co_cancel);
    3392           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    3393           0 :                 TALLOC_FREE(tmp_ctx);
    3394           0 :                 PyErr_SetNdrError(err);
    3395           0 :                 return NULL;
    3396             :         }
    3397             : 
    3398           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    3399           0 :         TALLOC_FREE(tmp_ctx);
    3400           0 :         return ret;
    3401             : }
    3402             : 
    3403           0 : static PyObject *py_dcerpc_co_cancel_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    3404             : {
    3405           0 :         struct dcerpc_co_cancel *object = (struct dcerpc_co_cancel *)pytalloc_get_ptr(py_obj);
    3406           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    3407           0 :         Py_ssize_t blob_length = 0;
    3408             :         enum ndr_err_code err;
    3409           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    3410           0 :         PyObject *allow_remaining_obj = NULL;
    3411           0 :         bool allow_remaining = false;
    3412             : 
    3413           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    3414             :                 discard_const_p(char *, kwnames),
    3415             :                 &blob.data, &blob_length,
    3416             :                 &allow_remaining_obj)) {
    3417           0 :                 return NULL;
    3418             :         }
    3419           0 :         blob.length = blob_length;
    3420             : 
    3421           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    3422           0 :                 allow_remaining = true;
    3423             :         }
    3424             : 
    3425           0 :         if (allow_remaining) {
    3426           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_co_cancel);
    3427             :         } else {
    3428           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_co_cancel);
    3429             :         }
    3430           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    3431           0 :                 PyErr_SetNdrError(err);
    3432           0 :                 return NULL;
    3433             :         }
    3434             : 
    3435           0 :         Py_RETURN_NONE;
    3436             : }
    3437             : 
    3438           0 : static PyObject *py_dcerpc_co_cancel_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    3439             : {
    3440           0 :         struct dcerpc_co_cancel *object = (struct dcerpc_co_cancel *)pytalloc_get_ptr(py_obj);
    3441             :         PyObject *ret;
    3442             :         char *retstr;
    3443             : 
    3444           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_dcerpc_co_cancel, "dcerpc_co_cancel", object);
    3445           0 :         ret = PyUnicode_FromString(retstr);
    3446           0 :         talloc_free(retstr);
    3447             : 
    3448           0 :         return ret;
    3449             : }
    3450             : 
    3451             : static PyMethodDef py_dcerpc_co_cancel_methods[] = {
    3452             :         { "__ndr_pack__", (PyCFunction)py_dcerpc_co_cancel_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    3453             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_co_cancel_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    3454             :         { "__ndr_print__", (PyCFunction)py_dcerpc_co_cancel_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    3455             :         { NULL, NULL, 0, NULL }
    3456             : };
    3457             : 
    3458             : 
    3459             : static PyTypeObject dcerpc_co_cancel_Type = {
    3460             :         PyVarObject_HEAD_INIT(NULL, 0)
    3461             :         .tp_name = "dcerpc.co_cancel",
    3462             :         .tp_getset = py_dcerpc_co_cancel_getsetters,
    3463             :         .tp_methods = py_dcerpc_co_cancel_methods,
    3464             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    3465             :         .tp_new = py_dcerpc_co_cancel_new,
    3466             : };
    3467             : 
    3468             : 
    3469           0 : static PyObject *py_dcerpc_cl_cancel_get_version(PyObject *obj, void *closure)
    3470             : {
    3471           0 :         struct dcerpc_cl_cancel *object = (struct dcerpc_cl_cancel *)pytalloc_get_ptr(obj);
    3472             :         PyObject *py_version;
    3473           0 :         py_version = PyLong_FromUnsignedLongLong((uint32_t)object->version);
    3474           0 :         return py_version;
    3475             : }
    3476             : 
    3477           0 : static int py_dcerpc_cl_cancel_set_version(PyObject *py_obj, PyObject *value, void *closure)
    3478             : {
    3479           0 :         struct dcerpc_cl_cancel *object = (struct dcerpc_cl_cancel *)pytalloc_get_ptr(py_obj);
    3480           0 :         if (value == NULL) {
    3481           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->version");
    3482           0 :                 return -1;
    3483             :         }
    3484             :         {
    3485           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version));
    3486           0 :                 if (PyLong_Check(value)) {
    3487             :                         unsigned long long test_var;
    3488           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3489           0 :                         if (PyErr_Occurred() != NULL) {
    3490           0 :                                 return -1;
    3491             :                         }
    3492           0 :                         if (test_var > uint_max) {
    3493           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3494             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3495           0 :                                 return -1;
    3496             :                         }
    3497           0 :                         object->version = test_var;
    3498             :                 } else {
    3499           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3500             :                           PyLong_Type.tp_name);
    3501           0 :                         return -1;
    3502             :                 }
    3503             :         }
    3504           0 :         return 0;
    3505             : }
    3506             : 
    3507           0 : static PyObject *py_dcerpc_cl_cancel_get_id(PyObject *obj, void *closure)
    3508             : {
    3509           0 :         struct dcerpc_cl_cancel *object = (struct dcerpc_cl_cancel *)pytalloc_get_ptr(obj);
    3510             :         PyObject *py_id;
    3511           0 :         py_id = PyLong_FromUnsignedLongLong((uint32_t)object->id);
    3512           0 :         return py_id;
    3513             : }
    3514             : 
    3515           0 : static int py_dcerpc_cl_cancel_set_id(PyObject *py_obj, PyObject *value, void *closure)
    3516             : {
    3517           0 :         struct dcerpc_cl_cancel *object = (struct dcerpc_cl_cancel *)pytalloc_get_ptr(py_obj);
    3518           0 :         if (value == NULL) {
    3519           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->id");
    3520           0 :                 return -1;
    3521             :         }
    3522             :         {
    3523           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->id));
    3524           0 :                 if (PyLong_Check(value)) {
    3525             :                         unsigned long long test_var;
    3526           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3527           0 :                         if (PyErr_Occurred() != NULL) {
    3528           0 :                                 return -1;
    3529             :                         }
    3530           0 :                         if (test_var > uint_max) {
    3531           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3532             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3533           0 :                                 return -1;
    3534             :                         }
    3535           0 :                         object->id = test_var;
    3536             :                 } else {
    3537           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3538             :                           PyLong_Type.tp_name);
    3539           0 :                         return -1;
    3540             :                 }
    3541             :         }
    3542           0 :         return 0;
    3543             : }
    3544             : 
    3545             : static PyGetSetDef py_dcerpc_cl_cancel_getsetters[] = {
    3546             :         {
    3547             :                 .name = discard_const_p(char, "version"),
    3548             :                 .get = py_dcerpc_cl_cancel_get_version,
    3549             :                 .set = py_dcerpc_cl_cancel_set_version,
    3550             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3551             :         },
    3552             :         {
    3553             :                 .name = discard_const_p(char, "id"),
    3554             :                 .get = py_dcerpc_cl_cancel_get_id,
    3555             :                 .set = py_dcerpc_cl_cancel_set_id,
    3556             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3557             :         },
    3558             :         { .name = NULL }
    3559             : };
    3560             : 
    3561           0 : static PyObject *py_dcerpc_cl_cancel_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    3562             : {
    3563           0 :         return pytalloc_new(struct dcerpc_cl_cancel, type);
    3564             : }
    3565             : 
    3566           0 : static PyObject *py_dcerpc_cl_cancel_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    3567             : {
    3568           0 :         struct dcerpc_cl_cancel *object = (struct dcerpc_cl_cancel *)pytalloc_get_ptr(py_obj);
    3569           0 :         PyObject *ret = NULL;
    3570             :         DATA_BLOB blob;
    3571             :         enum ndr_err_code err;
    3572           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    3573           0 :         if (tmp_ctx == NULL) {
    3574           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    3575           0 :                 return NULL;
    3576             :         }
    3577           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_dcerpc_cl_cancel);
    3578           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    3579           0 :                 TALLOC_FREE(tmp_ctx);
    3580           0 :                 PyErr_SetNdrError(err);
    3581           0 :                 return NULL;
    3582             :         }
    3583             : 
    3584           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    3585           0 :         TALLOC_FREE(tmp_ctx);
    3586           0 :         return ret;
    3587             : }
    3588             : 
    3589           0 : static PyObject *py_dcerpc_cl_cancel_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    3590             : {
    3591           0 :         struct dcerpc_cl_cancel *object = (struct dcerpc_cl_cancel *)pytalloc_get_ptr(py_obj);
    3592           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    3593           0 :         Py_ssize_t blob_length = 0;
    3594             :         enum ndr_err_code err;
    3595           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    3596           0 :         PyObject *allow_remaining_obj = NULL;
    3597           0 :         bool allow_remaining = false;
    3598             : 
    3599           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    3600             :                 discard_const_p(char *, kwnames),
    3601             :                 &blob.data, &blob_length,
    3602             :                 &allow_remaining_obj)) {
    3603           0 :                 return NULL;
    3604             :         }
    3605           0 :         blob.length = blob_length;
    3606             : 
    3607           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    3608           0 :                 allow_remaining = true;
    3609             :         }
    3610             : 
    3611           0 :         if (allow_remaining) {
    3612           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_cl_cancel);
    3613             :         } else {
    3614           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_cl_cancel);
    3615             :         }
    3616           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    3617           0 :                 PyErr_SetNdrError(err);
    3618           0 :                 return NULL;
    3619             :         }
    3620             : 
    3621           0 :         Py_RETURN_NONE;
    3622             : }
    3623             : 
    3624           0 : static PyObject *py_dcerpc_cl_cancel_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    3625             : {
    3626           0 :         struct dcerpc_cl_cancel *object = (struct dcerpc_cl_cancel *)pytalloc_get_ptr(py_obj);
    3627             :         PyObject *ret;
    3628             :         char *retstr;
    3629             : 
    3630           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_dcerpc_cl_cancel, "dcerpc_cl_cancel", object);
    3631           0 :         ret = PyUnicode_FromString(retstr);
    3632           0 :         talloc_free(retstr);
    3633             : 
    3634           0 :         return ret;
    3635             : }
    3636             : 
    3637             : static PyMethodDef py_dcerpc_cl_cancel_methods[] = {
    3638             :         { "__ndr_pack__", (PyCFunction)py_dcerpc_cl_cancel_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    3639             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_cl_cancel_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    3640             :         { "__ndr_print__", (PyCFunction)py_dcerpc_cl_cancel_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    3641             :         { NULL, NULL, 0, NULL }
    3642             : };
    3643             : 
    3644             : 
    3645             : static PyTypeObject dcerpc_cl_cancel_Type = {
    3646             :         PyVarObject_HEAD_INIT(NULL, 0)
    3647             :         .tp_name = "dcerpc.cl_cancel",
    3648             :         .tp_getset = py_dcerpc_cl_cancel_getsetters,
    3649             :         .tp_methods = py_dcerpc_cl_cancel_methods,
    3650             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    3651             :         .tp_new = py_dcerpc_cl_cancel_new,
    3652             : };
    3653             : 
    3654             : 
    3655           0 : static PyObject *py_dcerpc_cancel_ack_get_version(PyObject *obj, void *closure)
    3656             : {
    3657           0 :         struct dcerpc_cancel_ack *object = (struct dcerpc_cancel_ack *)pytalloc_get_ptr(obj);
    3658             :         PyObject *py_version;
    3659           0 :         py_version = PyLong_FromUnsignedLongLong((uint32_t)object->version);
    3660           0 :         return py_version;
    3661             : }
    3662             : 
    3663           0 : static int py_dcerpc_cancel_ack_set_version(PyObject *py_obj, PyObject *value, void *closure)
    3664             : {
    3665           0 :         struct dcerpc_cancel_ack *object = (struct dcerpc_cancel_ack *)pytalloc_get_ptr(py_obj);
    3666           0 :         if (value == NULL) {
    3667           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->version");
    3668           0 :                 return -1;
    3669             :         }
    3670             :         {
    3671           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version));
    3672           0 :                 if (PyLong_Check(value)) {
    3673             :                         unsigned long long test_var;
    3674           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3675           0 :                         if (PyErr_Occurred() != NULL) {
    3676           0 :                                 return -1;
    3677             :                         }
    3678           0 :                         if (test_var > uint_max) {
    3679           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3680             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3681           0 :                                 return -1;
    3682             :                         }
    3683           0 :                         object->version = test_var;
    3684             :                 } else {
    3685           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3686             :                           PyLong_Type.tp_name);
    3687           0 :                         return -1;
    3688             :                 }
    3689             :         }
    3690           0 :         return 0;
    3691             : }
    3692             : 
    3693           0 : static PyObject *py_dcerpc_cancel_ack_get_id(PyObject *obj, void *closure)
    3694             : {
    3695           0 :         struct dcerpc_cancel_ack *object = (struct dcerpc_cancel_ack *)pytalloc_get_ptr(obj);
    3696             :         PyObject *py_id;
    3697           0 :         py_id = PyLong_FromUnsignedLongLong((uint32_t)object->id);
    3698           0 :         return py_id;
    3699             : }
    3700             : 
    3701           0 : static int py_dcerpc_cancel_ack_set_id(PyObject *py_obj, PyObject *value, void *closure)
    3702             : {
    3703           0 :         struct dcerpc_cancel_ack *object = (struct dcerpc_cancel_ack *)pytalloc_get_ptr(py_obj);
    3704           0 :         if (value == NULL) {
    3705           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->id");
    3706           0 :                 return -1;
    3707             :         }
    3708             :         {
    3709           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->id));
    3710           0 :                 if (PyLong_Check(value)) {
    3711             :                         unsigned long long test_var;
    3712           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3713           0 :                         if (PyErr_Occurred() != NULL) {
    3714           0 :                                 return -1;
    3715             :                         }
    3716           0 :                         if (test_var > uint_max) {
    3717           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3718             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3719           0 :                                 return -1;
    3720             :                         }
    3721           0 :                         object->id = test_var;
    3722             :                 } else {
    3723           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3724             :                           PyLong_Type.tp_name);
    3725           0 :                         return -1;
    3726             :                 }
    3727             :         }
    3728           0 :         return 0;
    3729             : }
    3730             : 
    3731           0 : static PyObject *py_dcerpc_cancel_ack_get_server_is_accepting(PyObject *obj, void *closure)
    3732             : {
    3733           0 :         struct dcerpc_cancel_ack *object = (struct dcerpc_cancel_ack *)pytalloc_get_ptr(obj);
    3734             :         PyObject *py_server_is_accepting;
    3735           0 :         py_server_is_accepting = PyLong_FromUnsignedLongLong((uint32_t)object->server_is_accepting);
    3736           0 :         return py_server_is_accepting;
    3737             : }
    3738             : 
    3739           0 : static int py_dcerpc_cancel_ack_set_server_is_accepting(PyObject *py_obj, PyObject *value, void *closure)
    3740             : {
    3741           0 :         struct dcerpc_cancel_ack *object = (struct dcerpc_cancel_ack *)pytalloc_get_ptr(py_obj);
    3742           0 :         if (value == NULL) {
    3743           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->server_is_accepting");
    3744           0 :                 return -1;
    3745             :         }
    3746             :         {
    3747           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->server_is_accepting));
    3748           0 :                 if (PyLong_Check(value)) {
    3749             :                         unsigned long long test_var;
    3750           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3751           0 :                         if (PyErr_Occurred() != NULL) {
    3752           0 :                                 return -1;
    3753             :                         }
    3754           0 :                         if (test_var > uint_max) {
    3755           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3756             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3757           0 :                                 return -1;
    3758             :                         }
    3759           0 :                         object->server_is_accepting = test_var;
    3760             :                 } else {
    3761           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3762             :                           PyLong_Type.tp_name);
    3763           0 :                         return -1;
    3764             :                 }
    3765             :         }
    3766           0 :         return 0;
    3767             : }
    3768             : 
    3769             : static PyGetSetDef py_dcerpc_cancel_ack_getsetters[] = {
    3770             :         {
    3771             :                 .name = discard_const_p(char, "version"),
    3772             :                 .get = py_dcerpc_cancel_ack_get_version,
    3773             :                 .set = py_dcerpc_cancel_ack_set_version,
    3774             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3775             :         },
    3776             :         {
    3777             :                 .name = discard_const_p(char, "id"),
    3778             :                 .get = py_dcerpc_cancel_ack_get_id,
    3779             :                 .set = py_dcerpc_cancel_ack_set_id,
    3780             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3781             :         },
    3782             :         {
    3783             :                 .name = discard_const_p(char, "server_is_accepting"),
    3784             :                 .get = py_dcerpc_cancel_ack_get_server_is_accepting,
    3785             :                 .set = py_dcerpc_cancel_ack_set_server_is_accepting,
    3786             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3787             :         },
    3788             :         { .name = NULL }
    3789             : };
    3790             : 
    3791           0 : static PyObject *py_dcerpc_cancel_ack_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    3792             : {
    3793           0 :         return pytalloc_new(struct dcerpc_cancel_ack, type);
    3794             : }
    3795             : 
    3796           0 : static PyObject *py_dcerpc_cancel_ack_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    3797             : {
    3798           0 :         struct dcerpc_cancel_ack *object = (struct dcerpc_cancel_ack *)pytalloc_get_ptr(py_obj);
    3799           0 :         PyObject *ret = NULL;
    3800             :         DATA_BLOB blob;
    3801             :         enum ndr_err_code err;
    3802           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    3803           0 :         if (tmp_ctx == NULL) {
    3804           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    3805           0 :                 return NULL;
    3806             :         }
    3807           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_dcerpc_cancel_ack);
    3808           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    3809           0 :                 TALLOC_FREE(tmp_ctx);
    3810           0 :                 PyErr_SetNdrError(err);
    3811           0 :                 return NULL;
    3812             :         }
    3813             : 
    3814           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    3815           0 :         TALLOC_FREE(tmp_ctx);
    3816           0 :         return ret;
    3817             : }
    3818             : 
    3819           0 : static PyObject *py_dcerpc_cancel_ack_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    3820             : {
    3821           0 :         struct dcerpc_cancel_ack *object = (struct dcerpc_cancel_ack *)pytalloc_get_ptr(py_obj);
    3822           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    3823           0 :         Py_ssize_t blob_length = 0;
    3824             :         enum ndr_err_code err;
    3825           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    3826           0 :         PyObject *allow_remaining_obj = NULL;
    3827           0 :         bool allow_remaining = false;
    3828             : 
    3829           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    3830             :                 discard_const_p(char *, kwnames),
    3831             :                 &blob.data, &blob_length,
    3832             :                 &allow_remaining_obj)) {
    3833           0 :                 return NULL;
    3834             :         }
    3835           0 :         blob.length = blob_length;
    3836             : 
    3837           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    3838           0 :                 allow_remaining = true;
    3839             :         }
    3840             : 
    3841           0 :         if (allow_remaining) {
    3842           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_cancel_ack);
    3843             :         } else {
    3844           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_cancel_ack);
    3845             :         }
    3846           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    3847           0 :                 PyErr_SetNdrError(err);
    3848           0 :                 return NULL;
    3849             :         }
    3850             : 
    3851           0 :         Py_RETURN_NONE;
    3852             : }
    3853             : 
    3854           0 : static PyObject *py_dcerpc_cancel_ack_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    3855             : {
    3856           0 :         struct dcerpc_cancel_ack *object = (struct dcerpc_cancel_ack *)pytalloc_get_ptr(py_obj);
    3857             :         PyObject *ret;
    3858             :         char *retstr;
    3859             : 
    3860           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_dcerpc_cancel_ack, "dcerpc_cancel_ack", object);
    3861           0 :         ret = PyUnicode_FromString(retstr);
    3862           0 :         talloc_free(retstr);
    3863             : 
    3864           0 :         return ret;
    3865             : }
    3866             : 
    3867             : static PyMethodDef py_dcerpc_cancel_ack_methods[] = {
    3868             :         { "__ndr_pack__", (PyCFunction)py_dcerpc_cancel_ack_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    3869             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_cancel_ack_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    3870             :         { "__ndr_print__", (PyCFunction)py_dcerpc_cancel_ack_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    3871             :         { NULL, NULL, 0, NULL }
    3872             : };
    3873             : 
    3874             : 
    3875             : static PyTypeObject dcerpc_cancel_ack_Type = {
    3876             :         PyVarObject_HEAD_INIT(NULL, 0)
    3877             :         .tp_name = "dcerpc.cancel_ack",
    3878             :         .tp_getset = py_dcerpc_cancel_ack_getsetters,
    3879             :         .tp_methods = py_dcerpc_cancel_ack_methods,
    3880             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    3881             :         .tp_new = py_dcerpc_cancel_ack_new,
    3882             : };
    3883             : 
    3884             : 
    3885           0 : static PyObject *py_dcerpc_fack_get_version(PyObject *obj, void *closure)
    3886             : {
    3887           0 :         struct dcerpc_fack *object = (struct dcerpc_fack *)pytalloc_get_ptr(obj);
    3888             :         PyObject *py_version;
    3889           0 :         py_version = PyLong_FromUnsignedLongLong((uint32_t)object->version);
    3890           0 :         return py_version;
    3891             : }
    3892             : 
    3893           0 : static int py_dcerpc_fack_set_version(PyObject *py_obj, PyObject *value, void *closure)
    3894             : {
    3895           0 :         struct dcerpc_fack *object = (struct dcerpc_fack *)pytalloc_get_ptr(py_obj);
    3896           0 :         if (value == NULL) {
    3897           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->version");
    3898           0 :                 return -1;
    3899             :         }
    3900             :         {
    3901           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version));
    3902           0 :                 if (PyLong_Check(value)) {
    3903             :                         unsigned long long test_var;
    3904           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3905           0 :                         if (PyErr_Occurred() != NULL) {
    3906           0 :                                 return -1;
    3907             :                         }
    3908           0 :                         if (test_var > uint_max) {
    3909           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3910             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3911           0 :                                 return -1;
    3912             :                         }
    3913           0 :                         object->version = test_var;
    3914             :                 } else {
    3915           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3916             :                           PyLong_Type.tp_name);
    3917           0 :                         return -1;
    3918             :                 }
    3919             :         }
    3920           0 :         return 0;
    3921             : }
    3922             : 
    3923           0 : static PyObject *py_dcerpc_fack_get__pad1(PyObject *obj, void *closure)
    3924             : {
    3925           0 :         struct dcerpc_fack *object = (struct dcerpc_fack *)pytalloc_get_ptr(obj);
    3926             :         PyObject *py__pad1;
    3927           0 :         py__pad1 = PyLong_FromLong((uint16_t)object->_pad1);
    3928           0 :         return py__pad1;
    3929             : }
    3930             : 
    3931           0 : static int py_dcerpc_fack_set__pad1(PyObject *py_obj, PyObject *value, void *closure)
    3932             : {
    3933           0 :         struct dcerpc_fack *object = (struct dcerpc_fack *)pytalloc_get_ptr(py_obj);
    3934           0 :         if (value == NULL) {
    3935           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->_pad1");
    3936           0 :                 return -1;
    3937             :         }
    3938             :         {
    3939           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->_pad1));
    3940           0 :                 if (PyLong_Check(value)) {
    3941             :                         unsigned long long test_var;
    3942           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3943           0 :                         if (PyErr_Occurred() != NULL) {
    3944           0 :                                 return -1;
    3945             :                         }
    3946           0 :                         if (test_var > uint_max) {
    3947           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3948             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3949           0 :                                 return -1;
    3950             :                         }
    3951           0 :                         object->_pad1 = test_var;
    3952             :                 } else {
    3953           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3954             :                           PyLong_Type.tp_name);
    3955           0 :                         return -1;
    3956             :                 }
    3957             :         }
    3958           0 :         return 0;
    3959             : }
    3960             : 
    3961           0 : static PyObject *py_dcerpc_fack_get_window_size(PyObject *obj, void *closure)
    3962             : {
    3963           0 :         struct dcerpc_fack *object = (struct dcerpc_fack *)pytalloc_get_ptr(obj);
    3964             :         PyObject *py_window_size;
    3965           0 :         py_window_size = PyLong_FromLong((uint16_t)object->window_size);
    3966           0 :         return py_window_size;
    3967             : }
    3968             : 
    3969           0 : static int py_dcerpc_fack_set_window_size(PyObject *py_obj, PyObject *value, void *closure)
    3970             : {
    3971           0 :         struct dcerpc_fack *object = (struct dcerpc_fack *)pytalloc_get_ptr(py_obj);
    3972           0 :         if (value == NULL) {
    3973           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->window_size");
    3974           0 :                 return -1;
    3975             :         }
    3976             :         {
    3977           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->window_size));
    3978           0 :                 if (PyLong_Check(value)) {
    3979             :                         unsigned long long test_var;
    3980           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3981           0 :                         if (PyErr_Occurred() != NULL) {
    3982           0 :                                 return -1;
    3983             :                         }
    3984           0 :                         if (test_var > uint_max) {
    3985           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3986             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3987           0 :                                 return -1;
    3988             :                         }
    3989           0 :                         object->window_size = test_var;
    3990             :                 } else {
    3991           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3992             :                           PyLong_Type.tp_name);
    3993           0 :                         return -1;
    3994             :                 }
    3995             :         }
    3996           0 :         return 0;
    3997             : }
    3998             : 
    3999           0 : static PyObject *py_dcerpc_fack_get_max_tdsu(PyObject *obj, void *closure)
    4000             : {
    4001           0 :         struct dcerpc_fack *object = (struct dcerpc_fack *)pytalloc_get_ptr(obj);
    4002             :         PyObject *py_max_tdsu;
    4003           0 :         py_max_tdsu = PyLong_FromUnsignedLongLong((uint32_t)object->max_tdsu);
    4004           0 :         return py_max_tdsu;
    4005             : }
    4006             : 
    4007           0 : static int py_dcerpc_fack_set_max_tdsu(PyObject *py_obj, PyObject *value, void *closure)
    4008             : {
    4009           0 :         struct dcerpc_fack *object = (struct dcerpc_fack *)pytalloc_get_ptr(py_obj);
    4010           0 :         if (value == NULL) {
    4011           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->max_tdsu");
    4012           0 :                 return -1;
    4013             :         }
    4014             :         {
    4015           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->max_tdsu));
    4016           0 :                 if (PyLong_Check(value)) {
    4017             :                         unsigned long long test_var;
    4018           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4019           0 :                         if (PyErr_Occurred() != NULL) {
    4020           0 :                                 return -1;
    4021             :                         }
    4022           0 :                         if (test_var > uint_max) {
    4023           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4024             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4025           0 :                                 return -1;
    4026             :                         }
    4027           0 :                         object->max_tdsu = test_var;
    4028             :                 } else {
    4029           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4030             :                           PyLong_Type.tp_name);
    4031           0 :                         return -1;
    4032             :                 }
    4033             :         }
    4034           0 :         return 0;
    4035             : }
    4036             : 
    4037           0 : static PyObject *py_dcerpc_fack_get_max_frag_size(PyObject *obj, void *closure)
    4038             : {
    4039           0 :         struct dcerpc_fack *object = (struct dcerpc_fack *)pytalloc_get_ptr(obj);
    4040             :         PyObject *py_max_frag_size;
    4041           0 :         py_max_frag_size = PyLong_FromUnsignedLongLong((uint32_t)object->max_frag_size);
    4042           0 :         return py_max_frag_size;
    4043             : }
    4044             : 
    4045           0 : static int py_dcerpc_fack_set_max_frag_size(PyObject *py_obj, PyObject *value, void *closure)
    4046             : {
    4047           0 :         struct dcerpc_fack *object = (struct dcerpc_fack *)pytalloc_get_ptr(py_obj);
    4048           0 :         if (value == NULL) {
    4049           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->max_frag_size");
    4050           0 :                 return -1;
    4051             :         }
    4052             :         {
    4053           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->max_frag_size));
    4054           0 :                 if (PyLong_Check(value)) {
    4055             :                         unsigned long long test_var;
    4056           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4057           0 :                         if (PyErr_Occurred() != NULL) {
    4058           0 :                                 return -1;
    4059             :                         }
    4060           0 :                         if (test_var > uint_max) {
    4061           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4062             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4063           0 :                                 return -1;
    4064             :                         }
    4065           0 :                         object->max_frag_size = test_var;
    4066             :                 } else {
    4067           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4068             :                           PyLong_Type.tp_name);
    4069           0 :                         return -1;
    4070             :                 }
    4071             :         }
    4072           0 :         return 0;
    4073             : }
    4074             : 
    4075           0 : static PyObject *py_dcerpc_fack_get_serial_no(PyObject *obj, void *closure)
    4076             : {
    4077           0 :         struct dcerpc_fack *object = (struct dcerpc_fack *)pytalloc_get_ptr(obj);
    4078             :         PyObject *py_serial_no;
    4079           0 :         py_serial_no = PyLong_FromLong((uint16_t)object->serial_no);
    4080           0 :         return py_serial_no;
    4081             : }
    4082             : 
    4083           0 : static int py_dcerpc_fack_set_serial_no(PyObject *py_obj, PyObject *value, void *closure)
    4084             : {
    4085           0 :         struct dcerpc_fack *object = (struct dcerpc_fack *)pytalloc_get_ptr(py_obj);
    4086           0 :         if (value == NULL) {
    4087           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->serial_no");
    4088           0 :                 return -1;
    4089             :         }
    4090             :         {
    4091           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->serial_no));
    4092           0 :                 if (PyLong_Check(value)) {
    4093             :                         unsigned long long test_var;
    4094           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4095           0 :                         if (PyErr_Occurred() != NULL) {
    4096           0 :                                 return -1;
    4097             :                         }
    4098           0 :                         if (test_var > uint_max) {
    4099           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4100             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4101           0 :                                 return -1;
    4102             :                         }
    4103           0 :                         object->serial_no = test_var;
    4104             :                 } else {
    4105           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4106             :                           PyLong_Type.tp_name);
    4107           0 :                         return -1;
    4108             :                 }
    4109             :         }
    4110           0 :         return 0;
    4111             : }
    4112             : 
    4113           0 : static PyObject *py_dcerpc_fack_get_selack_size(PyObject *obj, void *closure)
    4114             : {
    4115           0 :         struct dcerpc_fack *object = (struct dcerpc_fack *)pytalloc_get_ptr(obj);
    4116             :         PyObject *py_selack_size;
    4117           0 :         py_selack_size = PyLong_FromLong((uint16_t)object->selack_size);
    4118           0 :         return py_selack_size;
    4119             : }
    4120             : 
    4121           0 : static int py_dcerpc_fack_set_selack_size(PyObject *py_obj, PyObject *value, void *closure)
    4122             : {
    4123           0 :         struct dcerpc_fack *object = (struct dcerpc_fack *)pytalloc_get_ptr(py_obj);
    4124           0 :         if (value == NULL) {
    4125           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->selack_size");
    4126           0 :                 return -1;
    4127             :         }
    4128             :         {
    4129           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->selack_size));
    4130           0 :                 if (PyLong_Check(value)) {
    4131             :                         unsigned long long test_var;
    4132           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4133           0 :                         if (PyErr_Occurred() != NULL) {
    4134           0 :                                 return -1;
    4135             :                         }
    4136           0 :                         if (test_var > uint_max) {
    4137           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4138             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4139           0 :                                 return -1;
    4140             :                         }
    4141           0 :                         object->selack_size = test_var;
    4142             :                 } else {
    4143           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4144             :                           PyLong_Type.tp_name);
    4145           0 :                         return -1;
    4146             :                 }
    4147             :         }
    4148           0 :         return 0;
    4149             : }
    4150             : 
    4151           0 : static PyObject *py_dcerpc_fack_get_selack(PyObject *obj, void *closure)
    4152             : {
    4153           0 :         struct dcerpc_fack *object = (struct dcerpc_fack *)pytalloc_get_ptr(obj);
    4154             :         PyObject *py_selack;
    4155           0 :         py_selack = PyList_New(object->selack_size);
    4156           0 :         if (py_selack == NULL) {
    4157           0 :                 return NULL;
    4158             :         }
    4159             :         {
    4160             :                 int selack_cntr_0;
    4161           0 :                 for (selack_cntr_0 = 0; selack_cntr_0 < (object->selack_size); selack_cntr_0++) {
    4162             :                         PyObject *py_selack_0;
    4163           0 :                         py_selack_0 = PyLong_FromUnsignedLongLong((uint32_t)object->selack[selack_cntr_0]);
    4164           0 :                         PyList_SetItem(py_selack, selack_cntr_0, py_selack_0);
    4165             :                 }
    4166             :         }
    4167           0 :         return py_selack;
    4168             : }
    4169             : 
    4170           0 : static int py_dcerpc_fack_set_selack(PyObject *py_obj, PyObject *value, void *closure)
    4171             : {
    4172           0 :         struct dcerpc_fack *object = (struct dcerpc_fack *)pytalloc_get_ptr(py_obj);
    4173           0 :         if (value == NULL) {
    4174           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->selack");
    4175           0 :                 return -1;
    4176             :         }
    4177           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    4178             :         {
    4179             :                 int selack_cntr_0;
    4180           0 :                 object->selack = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->selack, PyList_GET_SIZE(value));
    4181           0 :                 if (!object->selack) { return -1;; }
    4182           0 :                 talloc_set_name_const(object->selack, "ARRAY: object->selack");
    4183           0 :                 for (selack_cntr_0 = 0; selack_cntr_0 < PyList_GET_SIZE(value); selack_cntr_0++) {
    4184           0 :                         if (PyList_GET_ITEM(value, selack_cntr_0) == NULL) {
    4185           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->selack[selack_cntr_0]");
    4186           0 :                                 return -1;
    4187             :                         }
    4188             :                         {
    4189           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->selack[selack_cntr_0]));
    4190           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, selack_cntr_0))) {
    4191             :                                         unsigned long long test_var;
    4192           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, selack_cntr_0));
    4193           0 :                                         if (PyErr_Occurred() != NULL) {
    4194           0 :                                                 return -1;
    4195             :                                         }
    4196           0 :                                         if (test_var > uint_max) {
    4197           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4198             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    4199           0 :                                                 return -1;
    4200             :                                         }
    4201           0 :                                         object->selack[selack_cntr_0] = test_var;
    4202             :                                 } else {
    4203           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4204             :                                           PyLong_Type.tp_name);
    4205           0 :                                         return -1;
    4206             :                                 }
    4207             :                         }
    4208             :                 }
    4209             :         }
    4210           0 :         return 0;
    4211             : }
    4212             : 
    4213             : static PyGetSetDef py_dcerpc_fack_getsetters[] = {
    4214             :         {
    4215             :                 .name = discard_const_p(char, "version"),
    4216             :                 .get = py_dcerpc_fack_get_version,
    4217             :                 .set = py_dcerpc_fack_set_version,
    4218             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4219             :         },
    4220             :         {
    4221             :                 .name = discard_const_p(char, "_pad1"),
    4222             :                 .get = py_dcerpc_fack_get__pad1,
    4223             :                 .set = py_dcerpc_fack_set__pad1,
    4224             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    4225             :         },
    4226             :         {
    4227             :                 .name = discard_const_p(char, "window_size"),
    4228             :                 .get = py_dcerpc_fack_get_window_size,
    4229             :                 .set = py_dcerpc_fack_set_window_size,
    4230             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    4231             :         },
    4232             :         {
    4233             :                 .name = discard_const_p(char, "max_tdsu"),
    4234             :                 .get = py_dcerpc_fack_get_max_tdsu,
    4235             :                 .set = py_dcerpc_fack_set_max_tdsu,
    4236             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4237             :         },
    4238             :         {
    4239             :                 .name = discard_const_p(char, "max_frag_size"),
    4240             :                 .get = py_dcerpc_fack_get_max_frag_size,
    4241             :                 .set = py_dcerpc_fack_set_max_frag_size,
    4242             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4243             :         },
    4244             :         {
    4245             :                 .name = discard_const_p(char, "serial_no"),
    4246             :                 .get = py_dcerpc_fack_get_serial_no,
    4247             :                 .set = py_dcerpc_fack_set_serial_no,
    4248             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    4249             :         },
    4250             :         {
    4251             :                 .name = discard_const_p(char, "selack_size"),
    4252             :                 .get = py_dcerpc_fack_get_selack_size,
    4253             :                 .set = py_dcerpc_fack_set_selack_size,
    4254             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    4255             :         },
    4256             :         {
    4257             :                 .name = discard_const_p(char, "selack"),
    4258             :                 .get = py_dcerpc_fack_get_selack,
    4259             :                 .set = py_dcerpc_fack_set_selack,
    4260             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4261             :         },
    4262             :         { .name = NULL }
    4263             : };
    4264             : 
    4265           0 : static PyObject *py_dcerpc_fack_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4266             : {
    4267           0 :         return pytalloc_new(struct dcerpc_fack, type);
    4268             : }
    4269             : 
    4270           0 : static PyObject *py_dcerpc_fack_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    4271             : {
    4272           0 :         struct dcerpc_fack *object = (struct dcerpc_fack *)pytalloc_get_ptr(py_obj);
    4273           0 :         PyObject *ret = NULL;
    4274             :         DATA_BLOB blob;
    4275             :         enum ndr_err_code err;
    4276           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    4277           0 :         if (tmp_ctx == NULL) {
    4278           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    4279           0 :                 return NULL;
    4280             :         }
    4281           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_dcerpc_fack);
    4282           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4283           0 :                 TALLOC_FREE(tmp_ctx);
    4284           0 :                 PyErr_SetNdrError(err);
    4285           0 :                 return NULL;
    4286             :         }
    4287             : 
    4288           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    4289           0 :         TALLOC_FREE(tmp_ctx);
    4290           0 :         return ret;
    4291             : }
    4292             : 
    4293           0 : static PyObject *py_dcerpc_fack_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    4294             : {
    4295           0 :         struct dcerpc_fack *object = (struct dcerpc_fack *)pytalloc_get_ptr(py_obj);
    4296           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    4297           0 :         Py_ssize_t blob_length = 0;
    4298             :         enum ndr_err_code err;
    4299           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    4300           0 :         PyObject *allow_remaining_obj = NULL;
    4301           0 :         bool allow_remaining = false;
    4302             : 
    4303           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    4304             :                 discard_const_p(char *, kwnames),
    4305             :                 &blob.data, &blob_length,
    4306             :                 &allow_remaining_obj)) {
    4307           0 :                 return NULL;
    4308             :         }
    4309           0 :         blob.length = blob_length;
    4310             : 
    4311           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    4312           0 :                 allow_remaining = true;
    4313             :         }
    4314             : 
    4315           0 :         if (allow_remaining) {
    4316           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_fack);
    4317             :         } else {
    4318           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_fack);
    4319             :         }
    4320           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4321           0 :                 PyErr_SetNdrError(err);
    4322           0 :                 return NULL;
    4323             :         }
    4324             : 
    4325           0 :         Py_RETURN_NONE;
    4326             : }
    4327             : 
    4328           0 : static PyObject *py_dcerpc_fack_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    4329             : {
    4330           0 :         struct dcerpc_fack *object = (struct dcerpc_fack *)pytalloc_get_ptr(py_obj);
    4331             :         PyObject *ret;
    4332             :         char *retstr;
    4333             : 
    4334           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_dcerpc_fack, "dcerpc_fack", object);
    4335           0 :         ret = PyUnicode_FromString(retstr);
    4336           0 :         talloc_free(retstr);
    4337             : 
    4338           0 :         return ret;
    4339             : }
    4340             : 
    4341             : static PyMethodDef py_dcerpc_fack_methods[] = {
    4342             :         { "__ndr_pack__", (PyCFunction)py_dcerpc_fack_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    4343             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_fack_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    4344             :         { "__ndr_print__", (PyCFunction)py_dcerpc_fack_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    4345             :         { NULL, NULL, 0, NULL }
    4346             : };
    4347             : 
    4348             : 
    4349             : static PyTypeObject dcerpc_fack_Type = {
    4350             :         PyVarObject_HEAD_INIT(NULL, 0)
    4351             :         .tp_name = "dcerpc.fack",
    4352             :         .tp_getset = py_dcerpc_fack_getsetters,
    4353             :         .tp_methods = py_dcerpc_fack_methods,
    4354             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4355             :         .tp_new = py_dcerpc_fack_new,
    4356             : };
    4357             : 
    4358             : 
    4359           0 : static PyObject *py_dcerpc_ack_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4360             : {
    4361           0 :         return pytalloc_new(struct dcerpc_ack, type);
    4362             : }
    4363             : 
    4364           0 : static PyObject *py_dcerpc_ack_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    4365             : {
    4366           0 :         struct dcerpc_ack *object = (struct dcerpc_ack *)pytalloc_get_ptr(py_obj);
    4367           0 :         PyObject *ret = NULL;
    4368             :         DATA_BLOB blob;
    4369             :         enum ndr_err_code err;
    4370           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    4371           0 :         if (tmp_ctx == NULL) {
    4372           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    4373           0 :                 return NULL;
    4374             :         }
    4375           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_dcerpc_ack);
    4376           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4377           0 :                 TALLOC_FREE(tmp_ctx);
    4378           0 :                 PyErr_SetNdrError(err);
    4379           0 :                 return NULL;
    4380             :         }
    4381             : 
    4382           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    4383           0 :         TALLOC_FREE(tmp_ctx);
    4384           0 :         return ret;
    4385             : }
    4386             : 
    4387           0 : static PyObject *py_dcerpc_ack_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    4388             : {
    4389           0 :         struct dcerpc_ack *object = (struct dcerpc_ack *)pytalloc_get_ptr(py_obj);
    4390           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    4391           0 :         Py_ssize_t blob_length = 0;
    4392             :         enum ndr_err_code err;
    4393           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    4394           0 :         PyObject *allow_remaining_obj = NULL;
    4395           0 :         bool allow_remaining = false;
    4396             : 
    4397           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    4398             :                 discard_const_p(char *, kwnames),
    4399             :                 &blob.data, &blob_length,
    4400             :                 &allow_remaining_obj)) {
    4401           0 :                 return NULL;
    4402             :         }
    4403           0 :         blob.length = blob_length;
    4404             : 
    4405           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    4406           0 :                 allow_remaining = true;
    4407             :         }
    4408             : 
    4409           0 :         if (allow_remaining) {
    4410           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_ack);
    4411             :         } else {
    4412           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_ack);
    4413             :         }
    4414           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4415           0 :                 PyErr_SetNdrError(err);
    4416           0 :                 return NULL;
    4417             :         }
    4418             : 
    4419           0 :         Py_RETURN_NONE;
    4420             : }
    4421             : 
    4422           0 : static PyObject *py_dcerpc_ack_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    4423             : {
    4424           0 :         struct dcerpc_ack *object = (struct dcerpc_ack *)pytalloc_get_ptr(py_obj);
    4425             :         PyObject *ret;
    4426             :         char *retstr;
    4427             : 
    4428           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_dcerpc_ack, "dcerpc_ack", object);
    4429           0 :         ret = PyUnicode_FromString(retstr);
    4430           0 :         talloc_free(retstr);
    4431             : 
    4432           0 :         return ret;
    4433             : }
    4434             : 
    4435             : static PyMethodDef py_dcerpc_ack_methods[] = {
    4436             :         { "__ndr_pack__", (PyCFunction)py_dcerpc_ack_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    4437             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_ack_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    4438             :         { "__ndr_print__", (PyCFunction)py_dcerpc_ack_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    4439             :         { NULL, NULL, 0, NULL }
    4440             : };
    4441             : 
    4442             : 
    4443             : static PyTypeObject dcerpc_ack_Type = {
    4444             :         PyVarObject_HEAD_INIT(NULL, 0)
    4445             :         .tp_name = "dcerpc.ack",
    4446             :         .tp_getset = NULL,
    4447             :         .tp_methods = py_dcerpc_ack_methods,
    4448             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4449             :         .tp_new = py_dcerpc_ack_new,
    4450             : };
    4451             : 
    4452             : 
    4453           0 : static PyObject *py_dcerpc_ping_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4454             : {
    4455           0 :         return pytalloc_new(struct dcerpc_ping, type);
    4456             : }
    4457             : 
    4458           0 : static PyObject *py_dcerpc_ping_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    4459             : {
    4460           0 :         struct dcerpc_ping *object = (struct dcerpc_ping *)pytalloc_get_ptr(py_obj);
    4461           0 :         PyObject *ret = NULL;
    4462             :         DATA_BLOB blob;
    4463             :         enum ndr_err_code err;
    4464           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    4465           0 :         if (tmp_ctx == NULL) {
    4466           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    4467           0 :                 return NULL;
    4468             :         }
    4469           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_dcerpc_ping);
    4470           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4471           0 :                 TALLOC_FREE(tmp_ctx);
    4472           0 :                 PyErr_SetNdrError(err);
    4473           0 :                 return NULL;
    4474             :         }
    4475             : 
    4476           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    4477           0 :         TALLOC_FREE(tmp_ctx);
    4478           0 :         return ret;
    4479             : }
    4480             : 
    4481           0 : static PyObject *py_dcerpc_ping_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    4482             : {
    4483           0 :         struct dcerpc_ping *object = (struct dcerpc_ping *)pytalloc_get_ptr(py_obj);
    4484           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    4485           0 :         Py_ssize_t blob_length = 0;
    4486             :         enum ndr_err_code err;
    4487           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    4488           0 :         PyObject *allow_remaining_obj = NULL;
    4489           0 :         bool allow_remaining = false;
    4490             : 
    4491           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    4492             :                 discard_const_p(char *, kwnames),
    4493             :                 &blob.data, &blob_length,
    4494             :                 &allow_remaining_obj)) {
    4495           0 :                 return NULL;
    4496             :         }
    4497           0 :         blob.length = blob_length;
    4498             : 
    4499           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    4500           0 :                 allow_remaining = true;
    4501             :         }
    4502             : 
    4503           0 :         if (allow_remaining) {
    4504           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_ping);
    4505             :         } else {
    4506           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_ping);
    4507             :         }
    4508           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4509           0 :                 PyErr_SetNdrError(err);
    4510           0 :                 return NULL;
    4511             :         }
    4512             : 
    4513           0 :         Py_RETURN_NONE;
    4514             : }
    4515             : 
    4516           0 : static PyObject *py_dcerpc_ping_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    4517             : {
    4518           0 :         struct dcerpc_ping *object = (struct dcerpc_ping *)pytalloc_get_ptr(py_obj);
    4519             :         PyObject *ret;
    4520             :         char *retstr;
    4521             : 
    4522           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_dcerpc_ping, "dcerpc_ping", object);
    4523           0 :         ret = PyUnicode_FromString(retstr);
    4524           0 :         talloc_free(retstr);
    4525             : 
    4526           0 :         return ret;
    4527             : }
    4528             : 
    4529             : static PyMethodDef py_dcerpc_ping_methods[] = {
    4530             :         { "__ndr_pack__", (PyCFunction)py_dcerpc_ping_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    4531             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_ping_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    4532             :         { "__ndr_print__", (PyCFunction)py_dcerpc_ping_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    4533             :         { NULL, NULL, 0, NULL }
    4534             : };
    4535             : 
    4536             : 
    4537             : static PyTypeObject dcerpc_ping_Type = {
    4538             :         PyVarObject_HEAD_INIT(NULL, 0)
    4539             :         .tp_name = "dcerpc.ping",
    4540             :         .tp_getset = NULL,
    4541             :         .tp_methods = py_dcerpc_ping_methods,
    4542             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4543             :         .tp_new = py_dcerpc_ping_new,
    4544             : };
    4545             : 
    4546             : 
    4547           0 : static PyObject *py_dcerpc_shutdown_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4548             : {
    4549           0 :         return pytalloc_new(struct dcerpc_shutdown, type);
    4550             : }
    4551             : 
    4552           0 : static PyObject *py_dcerpc_shutdown_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    4553             : {
    4554           0 :         struct dcerpc_shutdown *object = (struct dcerpc_shutdown *)pytalloc_get_ptr(py_obj);
    4555           0 :         PyObject *ret = NULL;
    4556             :         DATA_BLOB blob;
    4557             :         enum ndr_err_code err;
    4558           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    4559           0 :         if (tmp_ctx == NULL) {
    4560           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    4561           0 :                 return NULL;
    4562             :         }
    4563           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_dcerpc_shutdown);
    4564           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4565           0 :                 TALLOC_FREE(tmp_ctx);
    4566           0 :                 PyErr_SetNdrError(err);
    4567           0 :                 return NULL;
    4568             :         }
    4569             : 
    4570           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    4571           0 :         TALLOC_FREE(tmp_ctx);
    4572           0 :         return ret;
    4573             : }
    4574             : 
    4575           0 : static PyObject *py_dcerpc_shutdown_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    4576             : {
    4577           0 :         struct dcerpc_shutdown *object = (struct dcerpc_shutdown *)pytalloc_get_ptr(py_obj);
    4578           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    4579           0 :         Py_ssize_t blob_length = 0;
    4580             :         enum ndr_err_code err;
    4581           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    4582           0 :         PyObject *allow_remaining_obj = NULL;
    4583           0 :         bool allow_remaining = false;
    4584             : 
    4585           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    4586             :                 discard_const_p(char *, kwnames),
    4587             :                 &blob.data, &blob_length,
    4588             :                 &allow_remaining_obj)) {
    4589           0 :                 return NULL;
    4590             :         }
    4591           0 :         blob.length = blob_length;
    4592             : 
    4593           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    4594           0 :                 allow_remaining = true;
    4595             :         }
    4596             : 
    4597           0 :         if (allow_remaining) {
    4598           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_shutdown);
    4599             :         } else {
    4600           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_shutdown);
    4601             :         }
    4602           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4603           0 :                 PyErr_SetNdrError(err);
    4604           0 :                 return NULL;
    4605             :         }
    4606             : 
    4607           0 :         Py_RETURN_NONE;
    4608             : }
    4609             : 
    4610           0 : static PyObject *py_dcerpc_shutdown_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    4611             : {
    4612           0 :         struct dcerpc_shutdown *object = (struct dcerpc_shutdown *)pytalloc_get_ptr(py_obj);
    4613             :         PyObject *ret;
    4614             :         char *retstr;
    4615             : 
    4616           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_dcerpc_shutdown, "dcerpc_shutdown", object);
    4617           0 :         ret = PyUnicode_FromString(retstr);
    4618           0 :         talloc_free(retstr);
    4619             : 
    4620           0 :         return ret;
    4621             : }
    4622             : 
    4623             : static PyMethodDef py_dcerpc_shutdown_methods[] = {
    4624             :         { "__ndr_pack__", (PyCFunction)py_dcerpc_shutdown_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    4625             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_shutdown_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    4626             :         { "__ndr_print__", (PyCFunction)py_dcerpc_shutdown_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    4627             :         { NULL, NULL, 0, NULL }
    4628             : };
    4629             : 
    4630             : 
    4631             : static PyTypeObject dcerpc_shutdown_Type = {
    4632             :         PyVarObject_HEAD_INIT(NULL, 0)
    4633             :         .tp_name = "dcerpc.shutdown",
    4634             :         .tp_getset = NULL,
    4635             :         .tp_methods = py_dcerpc_shutdown_methods,
    4636             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4637             :         .tp_new = py_dcerpc_shutdown_new,
    4638             : };
    4639             : 
    4640             : 
    4641           0 : static PyObject *py_dcerpc_working_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4642             : {
    4643           0 :         return pytalloc_new(struct dcerpc_working, type);
    4644             : }
    4645             : 
    4646           0 : static PyObject *py_dcerpc_working_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    4647             : {
    4648           0 :         struct dcerpc_working *object = (struct dcerpc_working *)pytalloc_get_ptr(py_obj);
    4649           0 :         PyObject *ret = NULL;
    4650             :         DATA_BLOB blob;
    4651             :         enum ndr_err_code err;
    4652           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    4653           0 :         if (tmp_ctx == NULL) {
    4654           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    4655           0 :                 return NULL;
    4656             :         }
    4657           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_dcerpc_working);
    4658           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4659           0 :                 TALLOC_FREE(tmp_ctx);
    4660           0 :                 PyErr_SetNdrError(err);
    4661           0 :                 return NULL;
    4662             :         }
    4663             : 
    4664           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    4665           0 :         TALLOC_FREE(tmp_ctx);
    4666           0 :         return ret;
    4667             : }
    4668             : 
    4669           0 : static PyObject *py_dcerpc_working_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    4670             : {
    4671           0 :         struct dcerpc_working *object = (struct dcerpc_working *)pytalloc_get_ptr(py_obj);
    4672           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    4673           0 :         Py_ssize_t blob_length = 0;
    4674             :         enum ndr_err_code err;
    4675           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    4676           0 :         PyObject *allow_remaining_obj = NULL;
    4677           0 :         bool allow_remaining = false;
    4678             : 
    4679           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    4680             :                 discard_const_p(char *, kwnames),
    4681             :                 &blob.data, &blob_length,
    4682             :                 &allow_remaining_obj)) {
    4683           0 :                 return NULL;
    4684             :         }
    4685           0 :         blob.length = blob_length;
    4686             : 
    4687           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    4688           0 :                 allow_remaining = true;
    4689             :         }
    4690             : 
    4691           0 :         if (allow_remaining) {
    4692           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_working);
    4693             :         } else {
    4694           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_working);
    4695             :         }
    4696           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4697           0 :                 PyErr_SetNdrError(err);
    4698           0 :                 return NULL;
    4699             :         }
    4700             : 
    4701           0 :         Py_RETURN_NONE;
    4702             : }
    4703             : 
    4704           0 : static PyObject *py_dcerpc_working_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    4705             : {
    4706           0 :         struct dcerpc_working *object = (struct dcerpc_working *)pytalloc_get_ptr(py_obj);
    4707             :         PyObject *ret;
    4708             :         char *retstr;
    4709             : 
    4710           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_dcerpc_working, "dcerpc_working", object);
    4711           0 :         ret = PyUnicode_FromString(retstr);
    4712           0 :         talloc_free(retstr);
    4713             : 
    4714           0 :         return ret;
    4715             : }
    4716             : 
    4717             : static PyMethodDef py_dcerpc_working_methods[] = {
    4718             :         { "__ndr_pack__", (PyCFunction)py_dcerpc_working_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    4719             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_working_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    4720             :         { "__ndr_print__", (PyCFunction)py_dcerpc_working_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    4721             :         { NULL, NULL, 0, NULL }
    4722             : };
    4723             : 
    4724             : 
    4725             : static PyTypeObject dcerpc_working_Type = {
    4726             :         PyVarObject_HEAD_INIT(NULL, 0)
    4727             :         .tp_name = "dcerpc.working",
    4728             :         .tp_getset = NULL,
    4729             :         .tp_methods = py_dcerpc_working_methods,
    4730             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4731             :         .tp_new = py_dcerpc_working_new,
    4732             : };
    4733             : 
    4734             : 
    4735           0 : static PyObject *py_RTSCookie_get_Cookie(PyObject *obj, void *closure)
    4736             : {
    4737           0 :         struct RTSCookie *object = (struct RTSCookie *)pytalloc_get_ptr(obj);
    4738             :         PyObject *py_Cookie;
    4739           0 :         py_Cookie = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->Cookie);
    4740           0 :         return py_Cookie;
    4741             : }
    4742             : 
    4743           0 : static int py_RTSCookie_set_Cookie(PyObject *py_obj, PyObject *value, void *closure)
    4744             : {
    4745           0 :         struct RTSCookie *object = (struct RTSCookie *)pytalloc_get_ptr(py_obj);
    4746           0 :         if (value == NULL) {
    4747           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->Cookie");
    4748           0 :                 return -1;
    4749             :         }
    4750           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
    4751           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4752           0 :                 PyErr_NoMemory();
    4753           0 :                 return -1;
    4754             :         }
    4755           0 :         object->Cookie = *(struct GUID *)pytalloc_get_ptr(value);
    4756           0 :         return 0;
    4757             : }
    4758             : 
    4759             : static PyGetSetDef py_RTSCookie_getsetters[] = {
    4760             :         {
    4761             :                 .name = discard_const_p(char, "Cookie"),
    4762             :                 .get = py_RTSCookie_get_Cookie,
    4763             :                 .set = py_RTSCookie_set_Cookie,
    4764             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
    4765             :         },
    4766             :         { .name = NULL }
    4767             : };
    4768             : 
    4769           0 : static PyObject *py_RTSCookie_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4770             : {
    4771           0 :         return pytalloc_new(struct RTSCookie, type);
    4772             : }
    4773             : 
    4774           0 : static PyObject *py_RTSCookie_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    4775             : {
    4776           0 :         struct RTSCookie *object = (struct RTSCookie *)pytalloc_get_ptr(py_obj);
    4777           0 :         PyObject *ret = NULL;
    4778             :         DATA_BLOB blob;
    4779             :         enum ndr_err_code err;
    4780           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    4781           0 :         if (tmp_ctx == NULL) {
    4782           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    4783           0 :                 return NULL;
    4784             :         }
    4785           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_RTSCookie);
    4786           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4787           0 :                 TALLOC_FREE(tmp_ctx);
    4788           0 :                 PyErr_SetNdrError(err);
    4789           0 :                 return NULL;
    4790             :         }
    4791             : 
    4792           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    4793           0 :         TALLOC_FREE(tmp_ctx);
    4794           0 :         return ret;
    4795             : }
    4796             : 
    4797           0 : static PyObject *py_RTSCookie_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    4798             : {
    4799           0 :         struct RTSCookie *object = (struct RTSCookie *)pytalloc_get_ptr(py_obj);
    4800           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    4801           0 :         Py_ssize_t blob_length = 0;
    4802             :         enum ndr_err_code err;
    4803           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    4804           0 :         PyObject *allow_remaining_obj = NULL;
    4805           0 :         bool allow_remaining = false;
    4806             : 
    4807           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    4808             :                 discard_const_p(char *, kwnames),
    4809             :                 &blob.data, &blob_length,
    4810             :                 &allow_remaining_obj)) {
    4811           0 :                 return NULL;
    4812             :         }
    4813           0 :         blob.length = blob_length;
    4814             : 
    4815           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    4816           0 :                 allow_remaining = true;
    4817             :         }
    4818             : 
    4819           0 :         if (allow_remaining) {
    4820           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_RTSCookie);
    4821             :         } else {
    4822           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_RTSCookie);
    4823             :         }
    4824           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4825           0 :                 PyErr_SetNdrError(err);
    4826           0 :                 return NULL;
    4827             :         }
    4828             : 
    4829           0 :         Py_RETURN_NONE;
    4830             : }
    4831             : 
    4832           0 : static PyObject *py_RTSCookie_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    4833             : {
    4834           0 :         struct RTSCookie *object = (struct RTSCookie *)pytalloc_get_ptr(py_obj);
    4835             :         PyObject *ret;
    4836             :         char *retstr;
    4837             : 
    4838           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_RTSCookie, "RTSCookie", object);
    4839           0 :         ret = PyUnicode_FromString(retstr);
    4840           0 :         talloc_free(retstr);
    4841             : 
    4842           0 :         return ret;
    4843             : }
    4844             : 
    4845             : static PyMethodDef py_RTSCookie_methods[] = {
    4846             :         { "__ndr_pack__", (PyCFunction)py_RTSCookie_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    4847             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_RTSCookie_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    4848             :         { "__ndr_print__", (PyCFunction)py_RTSCookie_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    4849             :         { NULL, NULL, 0, NULL }
    4850             : };
    4851             : 
    4852             : 
    4853             : static PyTypeObject RTSCookie_Type = {
    4854             :         PyVarObject_HEAD_INIT(NULL, 0)
    4855             :         .tp_name = "dcerpc.RTSCookie",
    4856             :         .tp_getset = py_RTSCookie_getsetters,
    4857             :         .tp_methods = py_RTSCookie_methods,
    4858             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4859             :         .tp_new = py_RTSCookie_new,
    4860             : };
    4861             : 
    4862           0 : static PyObject *py_import_ClientAddressType(TALLOC_CTX *mem_ctx, int level, union ClientAddressType *in)
    4863             : {
    4864             :         PyObject *ret;
    4865             : 
    4866           0 :         switch (level) {
    4867           0 :                 case RTS_IPV4:
    4868           0 :                         ret = PyString_FromStringOrNULL(in->ClientAddressIPV4);
    4869           0 :                         return ret;
    4870             : 
    4871           0 :                 case RTS_IPV6:
    4872           0 :                         ret = PyString_FromStringOrNULL(in->ClientAddressIPV6);
    4873           0 :                         return ret;
    4874             : 
    4875             :         }
    4876           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
    4877           0 :         return NULL;
    4878             : }
    4879             : 
    4880           0 : static union ClientAddressType *py_export_ClientAddressType(TALLOC_CTX *mem_ctx, int level, PyObject *in)
    4881             : {
    4882           0 :         union ClientAddressType *ret = talloc_zero(mem_ctx, union ClientAddressType);
    4883           0 :         switch (level) {
    4884           0 :                 case RTS_IPV4:
    4885           0 :                         if (in == NULL) {
    4886           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ClientAddressIPV4");
    4887           0 :                                 talloc_free(ret); return NULL;
    4888             :                         }
    4889             :                         {
    4890             :                                 const char *test_str;
    4891             :                                 const char *talloc_str;
    4892           0 :                                 PyObject *unicode = NULL;
    4893           0 :                                 if (PyUnicode_Check(in)) {
    4894           0 :                                         unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
    4895           0 :                                         if (unicode == NULL) {
    4896           0 :                                                 PyErr_NoMemory();
    4897           0 :                                                 talloc_free(ret); return NULL;
    4898             :                                         }
    4899           0 :                                         test_str = PyBytes_AS_STRING(unicode);
    4900           0 :                                 } else if (PyBytes_Check(in)) {
    4901           0 :                                         test_str = PyBytes_AS_STRING(in);
    4902             :                                 } else {
    4903           0 :                                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
    4904           0 :                                         talloc_free(ret); return NULL;
    4905             :                                 }
    4906           0 :                                 talloc_str = talloc_strdup(mem_ctx, test_str);
    4907           0 :                                 if (unicode != NULL) {
    4908           0 :                                         Py_DECREF(unicode);
    4909             :                                 }
    4910           0 :                                 if (talloc_str == NULL) {
    4911           0 :                                         PyErr_NoMemory();
    4912           0 :                                         talloc_free(ret); return NULL;
    4913             :                                 }
    4914           0 :                                 ret->ClientAddressIPV4 = talloc_str;
    4915             :                         }
    4916           0 :                         break;
    4917             : 
    4918           0 :                 case RTS_IPV6:
    4919           0 :                         if (in == NULL) {
    4920           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ClientAddressIPV6");
    4921           0 :                                 talloc_free(ret); return NULL;
    4922             :                         }
    4923             :                         {
    4924             :                                 const char *test_str;
    4925             :                                 const char *talloc_str;
    4926           0 :                                 PyObject *unicode = NULL;
    4927           0 :                                 if (PyUnicode_Check(in)) {
    4928           0 :                                         unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
    4929           0 :                                         if (unicode == NULL) {
    4930           0 :                                                 PyErr_NoMemory();
    4931           0 :                                                 talloc_free(ret); return NULL;
    4932             :                                         }
    4933           0 :                                         test_str = PyBytes_AS_STRING(unicode);
    4934           0 :                                 } else if (PyBytes_Check(in)) {
    4935           0 :                                         test_str = PyBytes_AS_STRING(in);
    4936             :                                 } else {
    4937           0 :                                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
    4938           0 :                                         talloc_free(ret); return NULL;
    4939             :                                 }
    4940           0 :                                 talloc_str = talloc_strdup(mem_ctx, test_str);
    4941           0 :                                 if (unicode != NULL) {
    4942           0 :                                         Py_DECREF(unicode);
    4943             :                                 }
    4944           0 :                                 if (talloc_str == NULL) {
    4945           0 :                                         PyErr_NoMemory();
    4946           0 :                                         talloc_free(ret); return NULL;
    4947             :                                 }
    4948           0 :                                 ret->ClientAddressIPV6 = talloc_str;
    4949             :                         }
    4950           0 :                         break;
    4951             : 
    4952           0 :                 default:
    4953           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
    4954           0 :                         talloc_free(ret);
    4955           0 :                         ret = NULL;
    4956             :         }
    4957             : 
    4958           0 :         return ret;
    4959             : }
    4960             : 
    4961           0 : static PyObject *py_ClientAddressType_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4962             : {
    4963           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    4964           0 :         PyObject *mem_ctx_obj = NULL;
    4965           0 :         TALLOC_CTX *mem_ctx = NULL;
    4966           0 :         int level = 0;
    4967           0 :         PyObject *in_obj = NULL;
    4968           0 :         union ClientAddressType *in = NULL;
    4969             : 
    4970           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
    4971             :                 discard_const_p(char *, kwnames),
    4972             :                 &mem_ctx_obj,
    4973             :                 &level,
    4974             :                 &in_obj)) {
    4975           0 :                 return NULL;
    4976             :         }
    4977           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    4978           0 :         if (mem_ctx == NULL) {
    4979           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    4980           0 :                 return NULL;
    4981             :         }
    4982           0 :         in = (union ClientAddressType *)pytalloc_get_ptr(in_obj);
    4983           0 :         if (in == NULL) {
    4984           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union ClientAddressType!");
    4985           0 :                 return NULL;
    4986             :         }
    4987             : 
    4988           0 :         return py_import_ClientAddressType(mem_ctx, level, in);
    4989             : }
    4990             : 
    4991           0 : static PyObject *py_ClientAddressType_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4992             : {
    4993           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    4994           0 :         PyObject *mem_ctx_obj = NULL;
    4995           0 :         TALLOC_CTX *mem_ctx = NULL;
    4996           0 :         int level = 0;
    4997           0 :         PyObject *in = NULL;
    4998           0 :         union ClientAddressType *out = NULL;
    4999             : 
    5000           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
    5001             :                 discard_const_p(char *, kwnames),
    5002             :                 &mem_ctx_obj,
    5003             :                 &level,
    5004             :                 &in)) {
    5005           0 :                 return NULL;
    5006             :         }
    5007           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    5008           0 :         if (mem_ctx == NULL) {
    5009           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    5010           0 :                 return NULL;
    5011             :         }
    5012             : 
    5013           0 :         out = py_export_ClientAddressType(mem_ctx, level, in);
    5014           0 :         if (out == NULL) {
    5015           0 :                 return NULL;
    5016             :         }
    5017             : 
    5018           0 :         return pytalloc_GenericObject_reference(out);
    5019             : }
    5020             : 
    5021             : static PyMethodDef py_ClientAddressType_methods[] = {
    5022             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_ClientAddressType_import),
    5023             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    5024             :                 "T.__import__(mem_ctx, level, in) => ret." },
    5025             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_ClientAddressType_export),
    5026             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    5027             :                 "T.__export__(mem_ctx, level, in) => ret." },
    5028             :         { NULL, NULL, 0, NULL }
    5029             : };
    5030             : 
    5031           0 : static PyObject *py_ClientAddressType_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5032             : {
    5033           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
    5034           0 :         return NULL;
    5035             : }
    5036             : 
    5037             : 
    5038             : static PyTypeObject ClientAddressType_Type = {
    5039             :         PyVarObject_HEAD_INIT(NULL, 0)
    5040             :         .tp_name = "dcerpc.ClientAddressType",
    5041             :         .tp_getset = NULL,
    5042             :         .tp_methods = py_ClientAddressType_methods,
    5043             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5044             :         .tp_new = py_ClientAddressType_new,
    5045             : };
    5046             : 
    5047             : 
    5048           0 : static PyObject *py_ClientAddress_get_AddressType(PyObject *obj, void *closure)
    5049             : {
    5050           0 :         struct ClientAddress *object = (struct ClientAddress *)pytalloc_get_ptr(obj);
    5051             :         PyObject *py_AddressType;
    5052           0 :         py_AddressType = PyLong_FromUnsignedLongLong((uint32_t)object->AddressType);
    5053           0 :         return py_AddressType;
    5054             : }
    5055             : 
    5056           0 : static int py_ClientAddress_set_AddressType(PyObject *py_obj, PyObject *value, void *closure)
    5057             : {
    5058           0 :         struct ClientAddress *object = (struct ClientAddress *)pytalloc_get_ptr(py_obj);
    5059           0 :         if (value == NULL) {
    5060           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->AddressType");
    5061           0 :                 return -1;
    5062             :         }
    5063             :         {
    5064           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->AddressType));
    5065           0 :                 if (PyLong_Check(value)) {
    5066             :                         unsigned long long test_var;
    5067           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5068           0 :                         if (PyErr_Occurred() != NULL) {
    5069           0 :                                 return -1;
    5070             :                         }
    5071           0 :                         if (test_var > uint_max) {
    5072           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5073             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5074           0 :                                 return -1;
    5075             :                         }
    5076           0 :                         object->AddressType = test_var;
    5077             :                 } else {
    5078           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5079             :                           PyLong_Type.tp_name);
    5080           0 :                         return -1;
    5081             :                 }
    5082             :         }
    5083           0 :         return 0;
    5084             : }
    5085             : 
    5086           0 : static PyObject *py_ClientAddress_get_ClientAddress(PyObject *obj, void *closure)
    5087             : {
    5088           0 :         struct ClientAddress *object = (struct ClientAddress *)pytalloc_get_ptr(obj);
    5089             :         PyObject *py_ClientAddress;
    5090           0 :         py_ClientAddress = pyrpc_import_union(&ClientAddressType_Type, pytalloc_get_mem_ctx(obj), object->AddressType, &object->ClientAddress, "union ClientAddressType");
    5091           0 :         if (py_ClientAddress == NULL) {
    5092           0 :                 return NULL;
    5093             :         }
    5094           0 :         return py_ClientAddress;
    5095             : }
    5096             : 
    5097           0 : static int py_ClientAddress_set_ClientAddress(PyObject *py_obj, PyObject *value, void *closure)
    5098             : {
    5099           0 :         struct ClientAddress *object = (struct ClientAddress *)pytalloc_get_ptr(py_obj);
    5100           0 :         if (value == NULL) {
    5101           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ClientAddress");
    5102           0 :                 return -1;
    5103             :         }
    5104             :         {
    5105             :                 union ClientAddressType *ClientAddress_switch_0;
    5106           0 :                 ClientAddress_switch_0 = (union ClientAddressType *)pyrpc_export_union(&ClientAddressType_Type, pytalloc_get_mem_ctx(py_obj), object->AddressType, value, "union ClientAddressType");
    5107           0 :                 if (ClientAddress_switch_0 == NULL) {
    5108           0 :                         return -1;
    5109             :                 }
    5110           0 :                 object->ClientAddress = *ClientAddress_switch_0;
    5111             :         }
    5112           0 :         return 0;
    5113             : }
    5114             : 
    5115           0 : static PyObject *py_ClientAddress_get_Padding(PyObject *obj, void *closure)
    5116             : {
    5117           0 :         struct ClientAddress *object = (struct ClientAddress *)pytalloc_get_ptr(obj);
    5118             :         PyObject *py_Padding;
    5119           0 :         py_Padding = PyList_New(12);
    5120           0 :         if (py_Padding == NULL) {
    5121           0 :                 return NULL;
    5122             :         }
    5123             :         {
    5124             :                 int Padding_cntr_0;
    5125           0 :                 for (Padding_cntr_0 = 0; Padding_cntr_0 < (12); Padding_cntr_0++) {
    5126             :                         PyObject *py_Padding_0;
    5127           0 :                         py_Padding_0 = PyLong_FromLong((uint16_t)object->Padding[Padding_cntr_0]);
    5128           0 :                         PyList_SetItem(py_Padding, Padding_cntr_0, py_Padding_0);
    5129             :                 }
    5130             :         }
    5131           0 :         return py_Padding;
    5132             : }
    5133             : 
    5134           0 : static int py_ClientAddress_set_Padding(PyObject *py_obj, PyObject *value, void *closure)
    5135             : {
    5136           0 :         struct ClientAddress *object = (struct ClientAddress *)pytalloc_get_ptr(py_obj);
    5137           0 :         if (value == NULL) {
    5138           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->Padding");
    5139           0 :                 return -1;
    5140             :         }
    5141           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    5142             :         {
    5143             :                 int Padding_cntr_0;
    5144           0 :                 if (ARRAY_SIZE(object->Padding) != PyList_GET_SIZE(value)) {
    5145           0 :                         PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->Padding),  PyList_GET_SIZE(value));
    5146           0 :                         return -1;
    5147             :                 }
    5148           0 :                 for (Padding_cntr_0 = 0; Padding_cntr_0 < PyList_GET_SIZE(value); Padding_cntr_0++) {
    5149           0 :                         if (PyList_GET_ITEM(value, Padding_cntr_0) == NULL) {
    5150           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->Padding[Padding_cntr_0]");
    5151           0 :                                 return -1;
    5152             :                         }
    5153             :                         {
    5154           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->Padding[Padding_cntr_0]));
    5155           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, Padding_cntr_0))) {
    5156             :                                         unsigned long long test_var;
    5157           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, Padding_cntr_0));
    5158           0 :                                         if (PyErr_Occurred() != NULL) {
    5159           0 :                                                 return -1;
    5160             :                                         }
    5161           0 :                                         if (test_var > uint_max) {
    5162           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5163             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    5164           0 :                                                 return -1;
    5165             :                                         }
    5166           0 :                                         object->Padding[Padding_cntr_0] = test_var;
    5167             :                                 } else {
    5168           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5169             :                                           PyLong_Type.tp_name);
    5170           0 :                                         return -1;
    5171             :                                 }
    5172             :                         }
    5173             :                 }
    5174             :         }
    5175           0 :         return 0;
    5176             : }
    5177             : 
    5178             : static PyGetSetDef py_ClientAddress_getsetters[] = {
    5179             :         {
    5180             :                 .name = discard_const_p(char, "AddressType"),
    5181             :                 .get = py_ClientAddress_get_AddressType,
    5182             :                 .set = py_ClientAddress_set_AddressType,
    5183             :                 .doc = discard_const_p(char, "PIDL-generated element of base type AddressType")
    5184             :         },
    5185             :         {
    5186             :                 .name = discard_const_p(char, "ClientAddress"),
    5187             :                 .get = py_ClientAddress_get_ClientAddress,
    5188             :                 .set = py_ClientAddress_set_ClientAddress,
    5189             :                 .doc = discard_const_p(char, "PIDL-generated element of base type ClientAddressType")
    5190             :         },
    5191             :         {
    5192             :                 .name = discard_const_p(char, "Padding"),
    5193             :                 .get = py_ClientAddress_get_Padding,
    5194             :                 .set = py_ClientAddress_set_Padding,
    5195             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    5196             :         },
    5197             :         { .name = NULL }
    5198             : };
    5199             : 
    5200           0 : static PyObject *py_ClientAddress_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5201             : {
    5202           0 :         return pytalloc_new(struct ClientAddress, type);
    5203             : }
    5204             : 
    5205           0 : static PyObject *py_ClientAddress_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    5206             : {
    5207           0 :         struct ClientAddress *object = (struct ClientAddress *)pytalloc_get_ptr(py_obj);
    5208           0 :         PyObject *ret = NULL;
    5209             :         DATA_BLOB blob;
    5210             :         enum ndr_err_code err;
    5211           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    5212           0 :         if (tmp_ctx == NULL) {
    5213           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    5214           0 :                 return NULL;
    5215             :         }
    5216           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_ClientAddress);
    5217           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    5218           0 :                 TALLOC_FREE(tmp_ctx);
    5219           0 :                 PyErr_SetNdrError(err);
    5220           0 :                 return NULL;
    5221             :         }
    5222             : 
    5223           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    5224           0 :         TALLOC_FREE(tmp_ctx);
    5225           0 :         return ret;
    5226             : }
    5227             : 
    5228           0 : static PyObject *py_ClientAddress_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    5229             : {
    5230           0 :         struct ClientAddress *object = (struct ClientAddress *)pytalloc_get_ptr(py_obj);
    5231           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    5232           0 :         Py_ssize_t blob_length = 0;
    5233             :         enum ndr_err_code err;
    5234           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    5235           0 :         PyObject *allow_remaining_obj = NULL;
    5236           0 :         bool allow_remaining = false;
    5237             : 
    5238           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    5239             :                 discard_const_p(char *, kwnames),
    5240             :                 &blob.data, &blob_length,
    5241             :                 &allow_remaining_obj)) {
    5242           0 :                 return NULL;
    5243             :         }
    5244           0 :         blob.length = blob_length;
    5245             : 
    5246           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    5247           0 :                 allow_remaining = true;
    5248             :         }
    5249             : 
    5250           0 :         if (allow_remaining) {
    5251           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_ClientAddress);
    5252             :         } else {
    5253           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_ClientAddress);
    5254             :         }
    5255           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    5256           0 :                 PyErr_SetNdrError(err);
    5257           0 :                 return NULL;
    5258             :         }
    5259             : 
    5260           0 :         Py_RETURN_NONE;
    5261             : }
    5262             : 
    5263           0 : static PyObject *py_ClientAddress_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    5264             : {
    5265           0 :         struct ClientAddress *object = (struct ClientAddress *)pytalloc_get_ptr(py_obj);
    5266             :         PyObject *ret;
    5267             :         char *retstr;
    5268             : 
    5269           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_ClientAddress, "ClientAddress", object);
    5270           0 :         ret = PyUnicode_FromString(retstr);
    5271           0 :         talloc_free(retstr);
    5272             : 
    5273           0 :         return ret;
    5274             : }
    5275             : 
    5276             : static PyMethodDef py_ClientAddress_methods[] = {
    5277             :         { "__ndr_pack__", (PyCFunction)py_ClientAddress_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    5278             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_ClientAddress_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    5279             :         { "__ndr_print__", (PyCFunction)py_ClientAddress_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    5280             :         { NULL, NULL, 0, NULL }
    5281             : };
    5282             : 
    5283             : 
    5284             : static PyTypeObject ClientAddress_Type = {
    5285             :         PyVarObject_HEAD_INIT(NULL, 0)
    5286             :         .tp_name = "dcerpc.ClientAddress",
    5287             :         .tp_getset = py_ClientAddress_getsetters,
    5288             :         .tp_methods = py_ClientAddress_methods,
    5289             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5290             :         .tp_new = py_ClientAddress_new,
    5291             : };
    5292             : 
    5293             : 
    5294           0 : static PyObject *py_FlowControlAcknowledgment_get_BytesReceived(PyObject *obj, void *closure)
    5295             : {
    5296           0 :         struct FlowControlAcknowledgment *object = (struct FlowControlAcknowledgment *)pytalloc_get_ptr(obj);
    5297             :         PyObject *py_BytesReceived;
    5298           0 :         py_BytesReceived = PyLong_FromUnsignedLongLong((uint32_t)object->BytesReceived);
    5299           0 :         return py_BytesReceived;
    5300             : }
    5301             : 
    5302           0 : static int py_FlowControlAcknowledgment_set_BytesReceived(PyObject *py_obj, PyObject *value, void *closure)
    5303             : {
    5304           0 :         struct FlowControlAcknowledgment *object = (struct FlowControlAcknowledgment *)pytalloc_get_ptr(py_obj);
    5305           0 :         if (value == NULL) {
    5306           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->BytesReceived");
    5307           0 :                 return -1;
    5308             :         }
    5309             :         {
    5310           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->BytesReceived));
    5311           0 :                 if (PyLong_Check(value)) {
    5312             :                         unsigned long long test_var;
    5313           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5314           0 :                         if (PyErr_Occurred() != NULL) {
    5315           0 :                                 return -1;
    5316             :                         }
    5317           0 :                         if (test_var > uint_max) {
    5318           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5319             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5320           0 :                                 return -1;
    5321             :                         }
    5322           0 :                         object->BytesReceived = test_var;
    5323             :                 } else {
    5324           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5325             :                           PyLong_Type.tp_name);
    5326           0 :                         return -1;
    5327             :                 }
    5328             :         }
    5329           0 :         return 0;
    5330             : }
    5331             : 
    5332           0 : static PyObject *py_FlowControlAcknowledgment_get_AvailableWindow(PyObject *obj, void *closure)
    5333             : {
    5334           0 :         struct FlowControlAcknowledgment *object = (struct FlowControlAcknowledgment *)pytalloc_get_ptr(obj);
    5335             :         PyObject *py_AvailableWindow;
    5336           0 :         py_AvailableWindow = PyLong_FromUnsignedLongLong((uint32_t)object->AvailableWindow);
    5337           0 :         return py_AvailableWindow;
    5338             : }
    5339             : 
    5340           0 : static int py_FlowControlAcknowledgment_set_AvailableWindow(PyObject *py_obj, PyObject *value, void *closure)
    5341             : {
    5342           0 :         struct FlowControlAcknowledgment *object = (struct FlowControlAcknowledgment *)pytalloc_get_ptr(py_obj);
    5343           0 :         if (value == NULL) {
    5344           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->AvailableWindow");
    5345           0 :                 return -1;
    5346             :         }
    5347             :         {
    5348           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->AvailableWindow));
    5349           0 :                 if (PyLong_Check(value)) {
    5350             :                         unsigned long long test_var;
    5351           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5352           0 :                         if (PyErr_Occurred() != NULL) {
    5353           0 :                                 return -1;
    5354             :                         }
    5355           0 :                         if (test_var > uint_max) {
    5356           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5357             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5358           0 :                                 return -1;
    5359             :                         }
    5360           0 :                         object->AvailableWindow = test_var;
    5361             :                 } else {
    5362           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5363             :                           PyLong_Type.tp_name);
    5364           0 :                         return -1;
    5365             :                 }
    5366             :         }
    5367           0 :         return 0;
    5368             : }
    5369             : 
    5370           0 : static PyObject *py_FlowControlAcknowledgment_get_ChannelCookie(PyObject *obj, void *closure)
    5371             : {
    5372           0 :         struct FlowControlAcknowledgment *object = (struct FlowControlAcknowledgment *)pytalloc_get_ptr(obj);
    5373             :         PyObject *py_ChannelCookie;
    5374           0 :         py_ChannelCookie = pytalloc_reference_ex(&RTSCookie_Type, pytalloc_get_mem_ctx(obj), &object->ChannelCookie);
    5375           0 :         return py_ChannelCookie;
    5376             : }
    5377             : 
    5378           0 : static int py_FlowControlAcknowledgment_set_ChannelCookie(PyObject *py_obj, PyObject *value, void *closure)
    5379             : {
    5380           0 :         struct FlowControlAcknowledgment *object = (struct FlowControlAcknowledgment *)pytalloc_get_ptr(py_obj);
    5381           0 :         if (value == NULL) {
    5382           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ChannelCookie");
    5383           0 :                 return -1;
    5384             :         }
    5385           0 :         PY_CHECK_TYPE(&RTSCookie_Type, value, return -1;);
    5386           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5387           0 :                 PyErr_NoMemory();
    5388           0 :                 return -1;
    5389             :         }
    5390           0 :         object->ChannelCookie = *(struct RTSCookie *)pytalloc_get_ptr(value);
    5391           0 :         return 0;
    5392             : }
    5393             : 
    5394             : static PyGetSetDef py_FlowControlAcknowledgment_getsetters[] = {
    5395             :         {
    5396             :                 .name = discard_const_p(char, "BytesReceived"),
    5397             :                 .get = py_FlowControlAcknowledgment_get_BytesReceived,
    5398             :                 .set = py_FlowControlAcknowledgment_set_BytesReceived,
    5399             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5400             :         },
    5401             :         {
    5402             :                 .name = discard_const_p(char, "AvailableWindow"),
    5403             :                 .get = py_FlowControlAcknowledgment_get_AvailableWindow,
    5404             :                 .set = py_FlowControlAcknowledgment_set_AvailableWindow,
    5405             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5406             :         },
    5407             :         {
    5408             :                 .name = discard_const_p(char, "ChannelCookie"),
    5409             :                 .get = py_FlowControlAcknowledgment_get_ChannelCookie,
    5410             :                 .set = py_FlowControlAcknowledgment_set_ChannelCookie,
    5411             :                 .doc = discard_const_p(char, "PIDL-generated element of base type RTSCookie")
    5412             :         },
    5413             :         { .name = NULL }
    5414             : };
    5415             : 
    5416           0 : static PyObject *py_FlowControlAcknowledgment_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5417             : {
    5418           0 :         return pytalloc_new(struct FlowControlAcknowledgment, type);
    5419             : }
    5420             : 
    5421           0 : static PyObject *py_FlowControlAcknowledgment_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    5422             : {
    5423           0 :         struct FlowControlAcknowledgment *object = (struct FlowControlAcknowledgment *)pytalloc_get_ptr(py_obj);
    5424           0 :         PyObject *ret = NULL;
    5425             :         DATA_BLOB blob;
    5426             :         enum ndr_err_code err;
    5427           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    5428           0 :         if (tmp_ctx == NULL) {
    5429           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    5430           0 :                 return NULL;
    5431             :         }
    5432           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_FlowControlAcknowledgment);
    5433           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    5434           0 :                 TALLOC_FREE(tmp_ctx);
    5435           0 :                 PyErr_SetNdrError(err);
    5436           0 :                 return NULL;
    5437             :         }
    5438             : 
    5439           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    5440           0 :         TALLOC_FREE(tmp_ctx);
    5441           0 :         return ret;
    5442             : }
    5443             : 
    5444           0 : static PyObject *py_FlowControlAcknowledgment_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    5445             : {
    5446           0 :         struct FlowControlAcknowledgment *object = (struct FlowControlAcknowledgment *)pytalloc_get_ptr(py_obj);
    5447           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    5448           0 :         Py_ssize_t blob_length = 0;
    5449             :         enum ndr_err_code err;
    5450           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    5451           0 :         PyObject *allow_remaining_obj = NULL;
    5452           0 :         bool allow_remaining = false;
    5453             : 
    5454           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    5455             :                 discard_const_p(char *, kwnames),
    5456             :                 &blob.data, &blob_length,
    5457             :                 &allow_remaining_obj)) {
    5458           0 :                 return NULL;
    5459             :         }
    5460           0 :         blob.length = blob_length;
    5461             : 
    5462           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    5463           0 :                 allow_remaining = true;
    5464             :         }
    5465             : 
    5466           0 :         if (allow_remaining) {
    5467           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_FlowControlAcknowledgment);
    5468             :         } else {
    5469           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_FlowControlAcknowledgment);
    5470             :         }
    5471           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    5472           0 :                 PyErr_SetNdrError(err);
    5473           0 :                 return NULL;
    5474             :         }
    5475             : 
    5476           0 :         Py_RETURN_NONE;
    5477             : }
    5478             : 
    5479           0 : static PyObject *py_FlowControlAcknowledgment_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    5480             : {
    5481           0 :         struct FlowControlAcknowledgment *object = (struct FlowControlAcknowledgment *)pytalloc_get_ptr(py_obj);
    5482             :         PyObject *ret;
    5483             :         char *retstr;
    5484             : 
    5485           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_FlowControlAcknowledgment, "FlowControlAcknowledgment", object);
    5486           0 :         ret = PyUnicode_FromString(retstr);
    5487           0 :         talloc_free(retstr);
    5488             : 
    5489           0 :         return ret;
    5490             : }
    5491             : 
    5492             : static PyMethodDef py_FlowControlAcknowledgment_methods[] = {
    5493             :         { "__ndr_pack__", (PyCFunction)py_FlowControlAcknowledgment_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    5494             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_FlowControlAcknowledgment_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    5495             :         { "__ndr_print__", (PyCFunction)py_FlowControlAcknowledgment_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    5496             :         { NULL, NULL, 0, NULL }
    5497             : };
    5498             : 
    5499             : 
    5500             : static PyTypeObject FlowControlAcknowledgment_Type = {
    5501             :         PyVarObject_HEAD_INIT(NULL, 0)
    5502             :         .tp_name = "dcerpc.FlowControlAcknowledgment",
    5503             :         .tp_getset = py_FlowControlAcknowledgment_getsetters,
    5504             :         .tp_methods = py_FlowControlAcknowledgment_methods,
    5505             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5506             :         .tp_new = py_FlowControlAcknowledgment_new,
    5507             : };
    5508             : 
    5509             : 
    5510           0 : static PyObject *py_dcerpc_rts_cmd_ReceiveWindowSize_get_ReceiveWindowSize(PyObject *obj, void *closure)
    5511             : {
    5512           0 :         struct dcerpc_rts_cmd_ReceiveWindowSize *object = (struct dcerpc_rts_cmd_ReceiveWindowSize *)pytalloc_get_ptr(obj);
    5513             :         PyObject *py_ReceiveWindowSize;
    5514           0 :         py_ReceiveWindowSize = PyLong_FromUnsignedLongLong((uint32_t)object->ReceiveWindowSize);
    5515           0 :         return py_ReceiveWindowSize;
    5516             : }
    5517             : 
    5518           0 : static int py_dcerpc_rts_cmd_ReceiveWindowSize_set_ReceiveWindowSize(PyObject *py_obj, PyObject *value, void *closure)
    5519             : {
    5520           0 :         struct dcerpc_rts_cmd_ReceiveWindowSize *object = (struct dcerpc_rts_cmd_ReceiveWindowSize *)pytalloc_get_ptr(py_obj);
    5521           0 :         if (value == NULL) {
    5522           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ReceiveWindowSize");
    5523           0 :                 return -1;
    5524             :         }
    5525             :         {
    5526           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ReceiveWindowSize));
    5527           0 :                 if (PyLong_Check(value)) {
    5528             :                         unsigned long long test_var;
    5529           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5530           0 :                         if (PyErr_Occurred() != NULL) {
    5531           0 :                                 return -1;
    5532             :                         }
    5533           0 :                         if (test_var > uint_max) {
    5534           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5535             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5536           0 :                                 return -1;
    5537             :                         }
    5538           0 :                         object->ReceiveWindowSize = test_var;
    5539             :                 } else {
    5540           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5541             :                           PyLong_Type.tp_name);
    5542           0 :                         return -1;
    5543             :                 }
    5544             :         }
    5545           0 :         return 0;
    5546             : }
    5547             : 
    5548             : static PyGetSetDef py_dcerpc_rts_cmd_ReceiveWindowSize_getsetters[] = {
    5549             :         {
    5550             :                 .name = discard_const_p(char, "ReceiveWindowSize"),
    5551             :                 .get = py_dcerpc_rts_cmd_ReceiveWindowSize_get_ReceiveWindowSize,
    5552             :                 .set = py_dcerpc_rts_cmd_ReceiveWindowSize_set_ReceiveWindowSize,
    5553             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5554             :         },
    5555             :         { .name = NULL }
    5556             : };
    5557             : 
    5558           0 : static PyObject *py_dcerpc_rts_cmd_ReceiveWindowSize_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5559             : {
    5560           0 :         return pytalloc_new(struct dcerpc_rts_cmd_ReceiveWindowSize, type);
    5561             : }
    5562             : 
    5563           0 : static PyObject *py_dcerpc_rts_cmd_ReceiveWindowSize_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    5564             : {
    5565           0 :         struct dcerpc_rts_cmd_ReceiveWindowSize *object = (struct dcerpc_rts_cmd_ReceiveWindowSize *)pytalloc_get_ptr(py_obj);
    5566           0 :         PyObject *ret = NULL;
    5567             :         DATA_BLOB blob;
    5568             :         enum ndr_err_code err;
    5569           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    5570           0 :         if (tmp_ctx == NULL) {
    5571           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    5572           0 :                 return NULL;
    5573             :         }
    5574           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_dcerpc_rts_cmd_ReceiveWindowSize);
    5575           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    5576           0 :                 TALLOC_FREE(tmp_ctx);
    5577           0 :                 PyErr_SetNdrError(err);
    5578           0 :                 return NULL;
    5579             :         }
    5580             : 
    5581           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    5582           0 :         TALLOC_FREE(tmp_ctx);
    5583           0 :         return ret;
    5584             : }
    5585             : 
    5586           0 : static PyObject *py_dcerpc_rts_cmd_ReceiveWindowSize_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    5587             : {
    5588           0 :         struct dcerpc_rts_cmd_ReceiveWindowSize *object = (struct dcerpc_rts_cmd_ReceiveWindowSize *)pytalloc_get_ptr(py_obj);
    5589           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    5590           0 :         Py_ssize_t blob_length = 0;
    5591             :         enum ndr_err_code err;
    5592           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    5593           0 :         PyObject *allow_remaining_obj = NULL;
    5594           0 :         bool allow_remaining = false;
    5595             : 
    5596           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    5597             :                 discard_const_p(char *, kwnames),
    5598             :                 &blob.data, &blob_length,
    5599             :                 &allow_remaining_obj)) {
    5600           0 :                 return NULL;
    5601             :         }
    5602           0 :         blob.length = blob_length;
    5603             : 
    5604           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    5605           0 :                 allow_remaining = true;
    5606             :         }
    5607             : 
    5608           0 :         if (allow_remaining) {
    5609           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_rts_cmd_ReceiveWindowSize);
    5610             :         } else {
    5611           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_rts_cmd_ReceiveWindowSize);
    5612             :         }
    5613           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    5614           0 :                 PyErr_SetNdrError(err);
    5615           0 :                 return NULL;
    5616             :         }
    5617             : 
    5618           0 :         Py_RETURN_NONE;
    5619             : }
    5620             : 
    5621           0 : static PyObject *py_dcerpc_rts_cmd_ReceiveWindowSize_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    5622             : {
    5623           0 :         struct dcerpc_rts_cmd_ReceiveWindowSize *object = (struct dcerpc_rts_cmd_ReceiveWindowSize *)pytalloc_get_ptr(py_obj);
    5624             :         PyObject *ret;
    5625             :         char *retstr;
    5626             : 
    5627           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_dcerpc_rts_cmd_ReceiveWindowSize, "dcerpc_rts_cmd_ReceiveWindowSize", object);
    5628           0 :         ret = PyUnicode_FromString(retstr);
    5629           0 :         talloc_free(retstr);
    5630             : 
    5631           0 :         return ret;
    5632             : }
    5633             : 
    5634             : static PyMethodDef py_dcerpc_rts_cmd_ReceiveWindowSize_methods[] = {
    5635             :         { "__ndr_pack__", (PyCFunction)py_dcerpc_rts_cmd_ReceiveWindowSize_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    5636             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_rts_cmd_ReceiveWindowSize_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    5637             :         { "__ndr_print__", (PyCFunction)py_dcerpc_rts_cmd_ReceiveWindowSize_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    5638             :         { NULL, NULL, 0, NULL }
    5639             : };
    5640             : 
    5641             : 
    5642             : static PyTypeObject dcerpc_rts_cmd_ReceiveWindowSize_Type = {
    5643             :         PyVarObject_HEAD_INIT(NULL, 0)
    5644             :         .tp_name = "dcerpc.rts_cmd_ReceiveWindowSize",
    5645             :         .tp_getset = py_dcerpc_rts_cmd_ReceiveWindowSize_getsetters,
    5646             :         .tp_methods = py_dcerpc_rts_cmd_ReceiveWindowSize_methods,
    5647             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5648             :         .tp_new = py_dcerpc_rts_cmd_ReceiveWindowSize_new,
    5649             : };
    5650             : 
    5651             : 
    5652           0 : static PyObject *py_dcerpc_rts_cmd_FlowControlAck_get_Ack(PyObject *obj, void *closure)
    5653             : {
    5654           0 :         struct dcerpc_rts_cmd_FlowControlAck *object = (struct dcerpc_rts_cmd_FlowControlAck *)pytalloc_get_ptr(obj);
    5655             :         PyObject *py_Ack;
    5656           0 :         py_Ack = pytalloc_reference_ex(&FlowControlAcknowledgment_Type, pytalloc_get_mem_ctx(obj), &object->Ack);
    5657           0 :         return py_Ack;
    5658             : }
    5659             : 
    5660           0 : static int py_dcerpc_rts_cmd_FlowControlAck_set_Ack(PyObject *py_obj, PyObject *value, void *closure)
    5661             : {
    5662           0 :         struct dcerpc_rts_cmd_FlowControlAck *object = (struct dcerpc_rts_cmd_FlowControlAck *)pytalloc_get_ptr(py_obj);
    5663           0 :         if (value == NULL) {
    5664           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->Ack");
    5665           0 :                 return -1;
    5666             :         }
    5667           0 :         PY_CHECK_TYPE(&FlowControlAcknowledgment_Type, value, return -1;);
    5668           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5669           0 :                 PyErr_NoMemory();
    5670           0 :                 return -1;
    5671             :         }
    5672           0 :         object->Ack = *(struct FlowControlAcknowledgment *)pytalloc_get_ptr(value);
    5673           0 :         return 0;
    5674             : }
    5675             : 
    5676             : static PyGetSetDef py_dcerpc_rts_cmd_FlowControlAck_getsetters[] = {
    5677             :         {
    5678             :                 .name = discard_const_p(char, "Ack"),
    5679             :                 .get = py_dcerpc_rts_cmd_FlowControlAck_get_Ack,
    5680             :                 .set = py_dcerpc_rts_cmd_FlowControlAck_set_Ack,
    5681             :                 .doc = discard_const_p(char, "PIDL-generated element of base type FlowControlAcknowledgment")
    5682             :         },
    5683             :         { .name = NULL }
    5684             : };
    5685             : 
    5686           0 : static PyObject *py_dcerpc_rts_cmd_FlowControlAck_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5687             : {
    5688           0 :         return pytalloc_new(struct dcerpc_rts_cmd_FlowControlAck, type);
    5689             : }
    5690             : 
    5691           0 : static PyObject *py_dcerpc_rts_cmd_FlowControlAck_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    5692             : {
    5693           0 :         struct dcerpc_rts_cmd_FlowControlAck *object = (struct dcerpc_rts_cmd_FlowControlAck *)pytalloc_get_ptr(py_obj);
    5694           0 :         PyObject *ret = NULL;
    5695             :         DATA_BLOB blob;
    5696             :         enum ndr_err_code err;
    5697           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    5698           0 :         if (tmp_ctx == NULL) {
    5699           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    5700           0 :                 return NULL;
    5701             :         }
    5702           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_dcerpc_rts_cmd_FlowControlAck);
    5703           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    5704           0 :                 TALLOC_FREE(tmp_ctx);
    5705           0 :                 PyErr_SetNdrError(err);
    5706           0 :                 return NULL;
    5707             :         }
    5708             : 
    5709           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    5710           0 :         TALLOC_FREE(tmp_ctx);
    5711           0 :         return ret;
    5712             : }
    5713             : 
    5714           0 : static PyObject *py_dcerpc_rts_cmd_FlowControlAck_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    5715             : {
    5716           0 :         struct dcerpc_rts_cmd_FlowControlAck *object = (struct dcerpc_rts_cmd_FlowControlAck *)pytalloc_get_ptr(py_obj);
    5717           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    5718           0 :         Py_ssize_t blob_length = 0;
    5719             :         enum ndr_err_code err;
    5720           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    5721           0 :         PyObject *allow_remaining_obj = NULL;
    5722           0 :         bool allow_remaining = false;
    5723             : 
    5724           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    5725             :                 discard_const_p(char *, kwnames),
    5726             :                 &blob.data, &blob_length,
    5727             :                 &allow_remaining_obj)) {
    5728           0 :                 return NULL;
    5729             :         }
    5730           0 :         blob.length = blob_length;
    5731             : 
    5732           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    5733           0 :                 allow_remaining = true;
    5734             :         }
    5735             : 
    5736           0 :         if (allow_remaining) {
    5737           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_rts_cmd_FlowControlAck);
    5738             :         } else {
    5739           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_rts_cmd_FlowControlAck);
    5740             :         }
    5741           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    5742           0 :                 PyErr_SetNdrError(err);
    5743           0 :                 return NULL;
    5744             :         }
    5745             : 
    5746           0 :         Py_RETURN_NONE;
    5747             : }
    5748             : 
    5749           0 : static PyObject *py_dcerpc_rts_cmd_FlowControlAck_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    5750             : {
    5751           0 :         struct dcerpc_rts_cmd_FlowControlAck *object = (struct dcerpc_rts_cmd_FlowControlAck *)pytalloc_get_ptr(py_obj);
    5752             :         PyObject *ret;
    5753             :         char *retstr;
    5754             : 
    5755           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_dcerpc_rts_cmd_FlowControlAck, "dcerpc_rts_cmd_FlowControlAck", object);
    5756           0 :         ret = PyUnicode_FromString(retstr);
    5757           0 :         talloc_free(retstr);
    5758             : 
    5759           0 :         return ret;
    5760             : }
    5761             : 
    5762             : static PyMethodDef py_dcerpc_rts_cmd_FlowControlAck_methods[] = {
    5763             :         { "__ndr_pack__", (PyCFunction)py_dcerpc_rts_cmd_FlowControlAck_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    5764             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_rts_cmd_FlowControlAck_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    5765             :         { "__ndr_print__", (PyCFunction)py_dcerpc_rts_cmd_FlowControlAck_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    5766             :         { NULL, NULL, 0, NULL }
    5767             : };
    5768             : 
    5769             : 
    5770             : static PyTypeObject dcerpc_rts_cmd_FlowControlAck_Type = {
    5771             :         PyVarObject_HEAD_INIT(NULL, 0)
    5772             :         .tp_name = "dcerpc.rts_cmd_FlowControlAck",
    5773             :         .tp_getset = py_dcerpc_rts_cmd_FlowControlAck_getsetters,
    5774             :         .tp_methods = py_dcerpc_rts_cmd_FlowControlAck_methods,
    5775             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5776             :         .tp_new = py_dcerpc_rts_cmd_FlowControlAck_new,
    5777             : };
    5778             : 
    5779             : 
    5780           0 : static PyObject *py_dcerpc_rts_cmd_ConnectionTimeout_get_ConnectionTimeout(PyObject *obj, void *closure)
    5781             : {
    5782           0 :         struct dcerpc_rts_cmd_ConnectionTimeout *object = (struct dcerpc_rts_cmd_ConnectionTimeout *)pytalloc_get_ptr(obj);
    5783             :         PyObject *py_ConnectionTimeout;
    5784           0 :         py_ConnectionTimeout = PyLong_FromUnsignedLongLong((uint32_t)object->ConnectionTimeout);
    5785           0 :         return py_ConnectionTimeout;
    5786             : }
    5787             : 
    5788           0 : static int py_dcerpc_rts_cmd_ConnectionTimeout_set_ConnectionTimeout(PyObject *py_obj, PyObject *value, void *closure)
    5789             : {
    5790           0 :         struct dcerpc_rts_cmd_ConnectionTimeout *object = (struct dcerpc_rts_cmd_ConnectionTimeout *)pytalloc_get_ptr(py_obj);
    5791           0 :         if (value == NULL) {
    5792           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ConnectionTimeout");
    5793           0 :                 return -1;
    5794             :         }
    5795             :         {
    5796           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ConnectionTimeout));
    5797           0 :                 if (PyLong_Check(value)) {
    5798             :                         unsigned long long test_var;
    5799           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5800           0 :                         if (PyErr_Occurred() != NULL) {
    5801           0 :                                 return -1;
    5802             :                         }
    5803           0 :                         if (test_var > uint_max) {
    5804           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5805             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5806           0 :                                 return -1;
    5807             :                         }
    5808           0 :                         object->ConnectionTimeout = test_var;
    5809             :                 } else {
    5810           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5811             :                           PyLong_Type.tp_name);
    5812           0 :                         return -1;
    5813             :                 }
    5814             :         }
    5815           0 :         return 0;
    5816             : }
    5817             : 
    5818             : static PyGetSetDef py_dcerpc_rts_cmd_ConnectionTimeout_getsetters[] = {
    5819             :         {
    5820             :                 .name = discard_const_p(char, "ConnectionTimeout"),
    5821             :                 .get = py_dcerpc_rts_cmd_ConnectionTimeout_get_ConnectionTimeout,
    5822             :                 .set = py_dcerpc_rts_cmd_ConnectionTimeout_set_ConnectionTimeout,
    5823             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5824             :         },
    5825             :         { .name = NULL }
    5826             : };
    5827             : 
    5828           0 : static PyObject *py_dcerpc_rts_cmd_ConnectionTimeout_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5829             : {
    5830           0 :         return pytalloc_new(struct dcerpc_rts_cmd_ConnectionTimeout, type);
    5831             : }
    5832             : 
    5833           0 : static PyObject *py_dcerpc_rts_cmd_ConnectionTimeout_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    5834             : {
    5835           0 :         struct dcerpc_rts_cmd_ConnectionTimeout *object = (struct dcerpc_rts_cmd_ConnectionTimeout *)pytalloc_get_ptr(py_obj);
    5836           0 :         PyObject *ret = NULL;
    5837             :         DATA_BLOB blob;
    5838             :         enum ndr_err_code err;
    5839           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    5840           0 :         if (tmp_ctx == NULL) {
    5841           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    5842           0 :                 return NULL;
    5843             :         }
    5844           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_dcerpc_rts_cmd_ConnectionTimeout);
    5845           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    5846           0 :                 TALLOC_FREE(tmp_ctx);
    5847           0 :                 PyErr_SetNdrError(err);
    5848           0 :                 return NULL;
    5849             :         }
    5850             : 
    5851           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    5852           0 :         TALLOC_FREE(tmp_ctx);
    5853           0 :         return ret;
    5854             : }
    5855             : 
    5856           0 : static PyObject *py_dcerpc_rts_cmd_ConnectionTimeout_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    5857             : {
    5858           0 :         struct dcerpc_rts_cmd_ConnectionTimeout *object = (struct dcerpc_rts_cmd_ConnectionTimeout *)pytalloc_get_ptr(py_obj);
    5859           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    5860           0 :         Py_ssize_t blob_length = 0;
    5861             :         enum ndr_err_code err;
    5862           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    5863           0 :         PyObject *allow_remaining_obj = NULL;
    5864           0 :         bool allow_remaining = false;
    5865             : 
    5866           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    5867             :                 discard_const_p(char *, kwnames),
    5868             :                 &blob.data, &blob_length,
    5869             :                 &allow_remaining_obj)) {
    5870           0 :                 return NULL;
    5871             :         }
    5872           0 :         blob.length = blob_length;
    5873             : 
    5874           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    5875           0 :                 allow_remaining = true;
    5876             :         }
    5877             : 
    5878           0 :         if (allow_remaining) {
    5879           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_rts_cmd_ConnectionTimeout);
    5880             :         } else {
    5881           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_rts_cmd_ConnectionTimeout);
    5882             :         }
    5883           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    5884           0 :                 PyErr_SetNdrError(err);
    5885           0 :                 return NULL;
    5886             :         }
    5887             : 
    5888           0 :         Py_RETURN_NONE;
    5889             : }
    5890             : 
    5891           0 : static PyObject *py_dcerpc_rts_cmd_ConnectionTimeout_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    5892             : {
    5893           0 :         struct dcerpc_rts_cmd_ConnectionTimeout *object = (struct dcerpc_rts_cmd_ConnectionTimeout *)pytalloc_get_ptr(py_obj);
    5894             :         PyObject *ret;
    5895             :         char *retstr;
    5896             : 
    5897           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_dcerpc_rts_cmd_ConnectionTimeout, "dcerpc_rts_cmd_ConnectionTimeout", object);
    5898           0 :         ret = PyUnicode_FromString(retstr);
    5899           0 :         talloc_free(retstr);
    5900             : 
    5901           0 :         return ret;
    5902             : }
    5903             : 
    5904             : static PyMethodDef py_dcerpc_rts_cmd_ConnectionTimeout_methods[] = {
    5905             :         { "__ndr_pack__", (PyCFunction)py_dcerpc_rts_cmd_ConnectionTimeout_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    5906             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_rts_cmd_ConnectionTimeout_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    5907             :         { "__ndr_print__", (PyCFunction)py_dcerpc_rts_cmd_ConnectionTimeout_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    5908             :         { NULL, NULL, 0, NULL }
    5909             : };
    5910             : 
    5911             : 
    5912             : static PyTypeObject dcerpc_rts_cmd_ConnectionTimeout_Type = {
    5913             :         PyVarObject_HEAD_INIT(NULL, 0)
    5914             :         .tp_name = "dcerpc.rts_cmd_ConnectionTimeout",
    5915             :         .tp_getset = py_dcerpc_rts_cmd_ConnectionTimeout_getsetters,
    5916             :         .tp_methods = py_dcerpc_rts_cmd_ConnectionTimeout_methods,
    5917             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5918             :         .tp_new = py_dcerpc_rts_cmd_ConnectionTimeout_new,
    5919             : };
    5920             : 
    5921             : 
    5922           0 : static PyObject *py_dcerpc_rts_cmd_Cookie_get_Cookie(PyObject *obj, void *closure)
    5923             : {
    5924           0 :         struct dcerpc_rts_cmd_Cookie *object = (struct dcerpc_rts_cmd_Cookie *)pytalloc_get_ptr(obj);
    5925             :         PyObject *py_Cookie;
    5926           0 :         py_Cookie = pytalloc_reference_ex(&RTSCookie_Type, pytalloc_get_mem_ctx(obj), &object->Cookie);
    5927           0 :         return py_Cookie;
    5928             : }
    5929             : 
    5930           0 : static int py_dcerpc_rts_cmd_Cookie_set_Cookie(PyObject *py_obj, PyObject *value, void *closure)
    5931             : {
    5932           0 :         struct dcerpc_rts_cmd_Cookie *object = (struct dcerpc_rts_cmd_Cookie *)pytalloc_get_ptr(py_obj);
    5933           0 :         if (value == NULL) {
    5934           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->Cookie");
    5935           0 :                 return -1;
    5936             :         }
    5937           0 :         PY_CHECK_TYPE(&RTSCookie_Type, value, return -1;);
    5938           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5939           0 :                 PyErr_NoMemory();
    5940           0 :                 return -1;
    5941             :         }
    5942           0 :         object->Cookie = *(struct RTSCookie *)pytalloc_get_ptr(value);
    5943           0 :         return 0;
    5944             : }
    5945             : 
    5946             : static PyGetSetDef py_dcerpc_rts_cmd_Cookie_getsetters[] = {
    5947             :         {
    5948             :                 .name = discard_const_p(char, "Cookie"),
    5949             :                 .get = py_dcerpc_rts_cmd_Cookie_get_Cookie,
    5950             :                 .set = py_dcerpc_rts_cmd_Cookie_set_Cookie,
    5951             :                 .doc = discard_const_p(char, "PIDL-generated element of base type RTSCookie")
    5952             :         },
    5953             :         { .name = NULL }
    5954             : };
    5955             : 
    5956           0 : static PyObject *py_dcerpc_rts_cmd_Cookie_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5957             : {
    5958           0 :         return pytalloc_new(struct dcerpc_rts_cmd_Cookie, type);
    5959             : }
    5960             : 
    5961           0 : static PyObject *py_dcerpc_rts_cmd_Cookie_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    5962             : {
    5963           0 :         struct dcerpc_rts_cmd_Cookie *object = (struct dcerpc_rts_cmd_Cookie *)pytalloc_get_ptr(py_obj);
    5964           0 :         PyObject *ret = NULL;
    5965             :         DATA_BLOB blob;
    5966             :         enum ndr_err_code err;
    5967           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    5968           0 :         if (tmp_ctx == NULL) {
    5969           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    5970           0 :                 return NULL;
    5971             :         }
    5972           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_dcerpc_rts_cmd_Cookie);
    5973           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    5974           0 :                 TALLOC_FREE(tmp_ctx);
    5975           0 :                 PyErr_SetNdrError(err);
    5976           0 :                 return NULL;
    5977             :         }
    5978             : 
    5979           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    5980           0 :         TALLOC_FREE(tmp_ctx);
    5981           0 :         return ret;
    5982             : }
    5983             : 
    5984           0 : static PyObject *py_dcerpc_rts_cmd_Cookie_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    5985             : {
    5986           0 :         struct dcerpc_rts_cmd_Cookie *object = (struct dcerpc_rts_cmd_Cookie *)pytalloc_get_ptr(py_obj);
    5987           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    5988           0 :         Py_ssize_t blob_length = 0;
    5989             :         enum ndr_err_code err;
    5990           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    5991           0 :         PyObject *allow_remaining_obj = NULL;
    5992           0 :         bool allow_remaining = false;
    5993             : 
    5994           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    5995             :                 discard_const_p(char *, kwnames),
    5996             :                 &blob.data, &blob_length,
    5997             :                 &allow_remaining_obj)) {
    5998           0 :                 return NULL;
    5999             :         }
    6000           0 :         blob.length = blob_length;
    6001             : 
    6002           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    6003           0 :                 allow_remaining = true;
    6004             :         }
    6005             : 
    6006           0 :         if (allow_remaining) {
    6007           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_rts_cmd_Cookie);
    6008             :         } else {
    6009           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_rts_cmd_Cookie);
    6010             :         }
    6011           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6012           0 :                 PyErr_SetNdrError(err);
    6013           0 :                 return NULL;
    6014             :         }
    6015             : 
    6016           0 :         Py_RETURN_NONE;
    6017             : }
    6018             : 
    6019           0 : static PyObject *py_dcerpc_rts_cmd_Cookie_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    6020             : {
    6021           0 :         struct dcerpc_rts_cmd_Cookie *object = (struct dcerpc_rts_cmd_Cookie *)pytalloc_get_ptr(py_obj);
    6022             :         PyObject *ret;
    6023             :         char *retstr;
    6024             : 
    6025           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_dcerpc_rts_cmd_Cookie, "dcerpc_rts_cmd_Cookie", object);
    6026           0 :         ret = PyUnicode_FromString(retstr);
    6027           0 :         talloc_free(retstr);
    6028             : 
    6029           0 :         return ret;
    6030             : }
    6031             : 
    6032             : static PyMethodDef py_dcerpc_rts_cmd_Cookie_methods[] = {
    6033             :         { "__ndr_pack__", (PyCFunction)py_dcerpc_rts_cmd_Cookie_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    6034             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_rts_cmd_Cookie_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    6035             :         { "__ndr_print__", (PyCFunction)py_dcerpc_rts_cmd_Cookie_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    6036             :         { NULL, NULL, 0, NULL }
    6037             : };
    6038             : 
    6039             : 
    6040             : static PyTypeObject dcerpc_rts_cmd_Cookie_Type = {
    6041             :         PyVarObject_HEAD_INIT(NULL, 0)
    6042             :         .tp_name = "dcerpc.rts_cmd_Cookie",
    6043             :         .tp_getset = py_dcerpc_rts_cmd_Cookie_getsetters,
    6044             :         .tp_methods = py_dcerpc_rts_cmd_Cookie_methods,
    6045             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6046             :         .tp_new = py_dcerpc_rts_cmd_Cookie_new,
    6047             : };
    6048             : 
    6049             : 
    6050           0 : static PyObject *py_dcerpc_rts_cmd_ChannelLifetime_get_ChannelLifetime(PyObject *obj, void *closure)
    6051             : {
    6052           0 :         struct dcerpc_rts_cmd_ChannelLifetime *object = (struct dcerpc_rts_cmd_ChannelLifetime *)pytalloc_get_ptr(obj);
    6053             :         PyObject *py_ChannelLifetime;
    6054           0 :         py_ChannelLifetime = PyLong_FromUnsignedLongLong((uint32_t)object->ChannelLifetime);
    6055           0 :         return py_ChannelLifetime;
    6056             : }
    6057             : 
    6058           0 : static int py_dcerpc_rts_cmd_ChannelLifetime_set_ChannelLifetime(PyObject *py_obj, PyObject *value, void *closure)
    6059             : {
    6060           0 :         struct dcerpc_rts_cmd_ChannelLifetime *object = (struct dcerpc_rts_cmd_ChannelLifetime *)pytalloc_get_ptr(py_obj);
    6061           0 :         if (value == NULL) {
    6062           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ChannelLifetime");
    6063           0 :                 return -1;
    6064             :         }
    6065             :         {
    6066           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ChannelLifetime));
    6067           0 :                 if (PyLong_Check(value)) {
    6068             :                         unsigned long long test_var;
    6069           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6070           0 :                         if (PyErr_Occurred() != NULL) {
    6071           0 :                                 return -1;
    6072             :                         }
    6073           0 :                         if (test_var > uint_max) {
    6074           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6075             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6076           0 :                                 return -1;
    6077             :                         }
    6078           0 :                         object->ChannelLifetime = test_var;
    6079             :                 } else {
    6080           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6081             :                           PyLong_Type.tp_name);
    6082           0 :                         return -1;
    6083             :                 }
    6084             :         }
    6085           0 :         return 0;
    6086             : }
    6087             : 
    6088             : static PyGetSetDef py_dcerpc_rts_cmd_ChannelLifetime_getsetters[] = {
    6089             :         {
    6090             :                 .name = discard_const_p(char, "ChannelLifetime"),
    6091             :                 .get = py_dcerpc_rts_cmd_ChannelLifetime_get_ChannelLifetime,
    6092             :                 .set = py_dcerpc_rts_cmd_ChannelLifetime_set_ChannelLifetime,
    6093             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6094             :         },
    6095             :         { .name = NULL }
    6096             : };
    6097             : 
    6098           0 : static PyObject *py_dcerpc_rts_cmd_ChannelLifetime_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6099             : {
    6100           0 :         return pytalloc_new(struct dcerpc_rts_cmd_ChannelLifetime, type);
    6101             : }
    6102             : 
    6103           0 : static PyObject *py_dcerpc_rts_cmd_ChannelLifetime_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    6104             : {
    6105           0 :         struct dcerpc_rts_cmd_ChannelLifetime *object = (struct dcerpc_rts_cmd_ChannelLifetime *)pytalloc_get_ptr(py_obj);
    6106           0 :         PyObject *ret = NULL;
    6107             :         DATA_BLOB blob;
    6108             :         enum ndr_err_code err;
    6109           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    6110           0 :         if (tmp_ctx == NULL) {
    6111           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    6112           0 :                 return NULL;
    6113             :         }
    6114           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_dcerpc_rts_cmd_ChannelLifetime);
    6115           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6116           0 :                 TALLOC_FREE(tmp_ctx);
    6117           0 :                 PyErr_SetNdrError(err);
    6118           0 :                 return NULL;
    6119             :         }
    6120             : 
    6121           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    6122           0 :         TALLOC_FREE(tmp_ctx);
    6123           0 :         return ret;
    6124             : }
    6125             : 
    6126           0 : static PyObject *py_dcerpc_rts_cmd_ChannelLifetime_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    6127             : {
    6128           0 :         struct dcerpc_rts_cmd_ChannelLifetime *object = (struct dcerpc_rts_cmd_ChannelLifetime *)pytalloc_get_ptr(py_obj);
    6129           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    6130           0 :         Py_ssize_t blob_length = 0;
    6131             :         enum ndr_err_code err;
    6132           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    6133           0 :         PyObject *allow_remaining_obj = NULL;
    6134           0 :         bool allow_remaining = false;
    6135             : 
    6136           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    6137             :                 discard_const_p(char *, kwnames),
    6138             :                 &blob.data, &blob_length,
    6139             :                 &allow_remaining_obj)) {
    6140           0 :                 return NULL;
    6141             :         }
    6142           0 :         blob.length = blob_length;
    6143             : 
    6144           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    6145           0 :                 allow_remaining = true;
    6146             :         }
    6147             : 
    6148           0 :         if (allow_remaining) {
    6149           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_rts_cmd_ChannelLifetime);
    6150             :         } else {
    6151           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_rts_cmd_ChannelLifetime);
    6152             :         }
    6153           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6154           0 :                 PyErr_SetNdrError(err);
    6155           0 :                 return NULL;
    6156             :         }
    6157             : 
    6158           0 :         Py_RETURN_NONE;
    6159             : }
    6160             : 
    6161           0 : static PyObject *py_dcerpc_rts_cmd_ChannelLifetime_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    6162             : {
    6163           0 :         struct dcerpc_rts_cmd_ChannelLifetime *object = (struct dcerpc_rts_cmd_ChannelLifetime *)pytalloc_get_ptr(py_obj);
    6164             :         PyObject *ret;
    6165             :         char *retstr;
    6166             : 
    6167           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_dcerpc_rts_cmd_ChannelLifetime, "dcerpc_rts_cmd_ChannelLifetime", object);
    6168           0 :         ret = PyUnicode_FromString(retstr);
    6169           0 :         talloc_free(retstr);
    6170             : 
    6171           0 :         return ret;
    6172             : }
    6173             : 
    6174             : static PyMethodDef py_dcerpc_rts_cmd_ChannelLifetime_methods[] = {
    6175             :         { "__ndr_pack__", (PyCFunction)py_dcerpc_rts_cmd_ChannelLifetime_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    6176             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_rts_cmd_ChannelLifetime_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    6177             :         { "__ndr_print__", (PyCFunction)py_dcerpc_rts_cmd_ChannelLifetime_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    6178             :         { NULL, NULL, 0, NULL }
    6179             : };
    6180             : 
    6181             : 
    6182             : static PyTypeObject dcerpc_rts_cmd_ChannelLifetime_Type = {
    6183             :         PyVarObject_HEAD_INIT(NULL, 0)
    6184             :         .tp_name = "dcerpc.rts_cmd_ChannelLifetime",
    6185             :         .tp_getset = py_dcerpc_rts_cmd_ChannelLifetime_getsetters,
    6186             :         .tp_methods = py_dcerpc_rts_cmd_ChannelLifetime_methods,
    6187             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6188             :         .tp_new = py_dcerpc_rts_cmd_ChannelLifetime_new,
    6189             : };
    6190             : 
    6191             : 
    6192           0 : static PyObject *py_dcerpc_rts_cmd_ClientKeepalive_get_ClientKeepalive(PyObject *obj, void *closure)
    6193             : {
    6194           0 :         struct dcerpc_rts_cmd_ClientKeepalive *object = (struct dcerpc_rts_cmd_ClientKeepalive *)pytalloc_get_ptr(obj);
    6195             :         PyObject *py_ClientKeepalive;
    6196           0 :         py_ClientKeepalive = PyLong_FromUnsignedLongLong((uint32_t)object->ClientKeepalive);
    6197           0 :         return py_ClientKeepalive;
    6198             : }
    6199             : 
    6200           0 : static int py_dcerpc_rts_cmd_ClientKeepalive_set_ClientKeepalive(PyObject *py_obj, PyObject *value, void *closure)
    6201             : {
    6202           0 :         struct dcerpc_rts_cmd_ClientKeepalive *object = (struct dcerpc_rts_cmd_ClientKeepalive *)pytalloc_get_ptr(py_obj);
    6203           0 :         if (value == NULL) {
    6204           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ClientKeepalive");
    6205           0 :                 return -1;
    6206             :         }
    6207             :         {
    6208           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ClientKeepalive));
    6209           0 :                 if (PyLong_Check(value)) {
    6210             :                         unsigned long long test_var;
    6211           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6212           0 :                         if (PyErr_Occurred() != NULL) {
    6213           0 :                                 return -1;
    6214             :                         }
    6215           0 :                         if (test_var > uint_max) {
    6216           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6217             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6218           0 :                                 return -1;
    6219             :                         }
    6220           0 :                         object->ClientKeepalive = test_var;
    6221             :                 } else {
    6222           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6223             :                           PyLong_Type.tp_name);
    6224           0 :                         return -1;
    6225             :                 }
    6226             :         }
    6227           0 :         return 0;
    6228             : }
    6229             : 
    6230             : static PyGetSetDef py_dcerpc_rts_cmd_ClientKeepalive_getsetters[] = {
    6231             :         {
    6232             :                 .name = discard_const_p(char, "ClientKeepalive"),
    6233             :                 .get = py_dcerpc_rts_cmd_ClientKeepalive_get_ClientKeepalive,
    6234             :                 .set = py_dcerpc_rts_cmd_ClientKeepalive_set_ClientKeepalive,
    6235             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6236             :         },
    6237             :         { .name = NULL }
    6238             : };
    6239             : 
    6240           0 : static PyObject *py_dcerpc_rts_cmd_ClientKeepalive_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6241             : {
    6242           0 :         return pytalloc_new(struct dcerpc_rts_cmd_ClientKeepalive, type);
    6243             : }
    6244             : 
    6245           0 : static PyObject *py_dcerpc_rts_cmd_ClientKeepalive_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    6246             : {
    6247           0 :         struct dcerpc_rts_cmd_ClientKeepalive *object = (struct dcerpc_rts_cmd_ClientKeepalive *)pytalloc_get_ptr(py_obj);
    6248           0 :         PyObject *ret = NULL;
    6249             :         DATA_BLOB blob;
    6250             :         enum ndr_err_code err;
    6251           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    6252           0 :         if (tmp_ctx == NULL) {
    6253           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    6254           0 :                 return NULL;
    6255             :         }
    6256           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_dcerpc_rts_cmd_ClientKeepalive);
    6257           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6258           0 :                 TALLOC_FREE(tmp_ctx);
    6259           0 :                 PyErr_SetNdrError(err);
    6260           0 :                 return NULL;
    6261             :         }
    6262             : 
    6263           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    6264           0 :         TALLOC_FREE(tmp_ctx);
    6265           0 :         return ret;
    6266             : }
    6267             : 
    6268           0 : static PyObject *py_dcerpc_rts_cmd_ClientKeepalive_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    6269             : {
    6270           0 :         struct dcerpc_rts_cmd_ClientKeepalive *object = (struct dcerpc_rts_cmd_ClientKeepalive *)pytalloc_get_ptr(py_obj);
    6271           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    6272           0 :         Py_ssize_t blob_length = 0;
    6273             :         enum ndr_err_code err;
    6274           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    6275           0 :         PyObject *allow_remaining_obj = NULL;
    6276           0 :         bool allow_remaining = false;
    6277             : 
    6278           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    6279             :                 discard_const_p(char *, kwnames),
    6280             :                 &blob.data, &blob_length,
    6281             :                 &allow_remaining_obj)) {
    6282           0 :                 return NULL;
    6283             :         }
    6284           0 :         blob.length = blob_length;
    6285             : 
    6286           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    6287           0 :                 allow_remaining = true;
    6288             :         }
    6289             : 
    6290           0 :         if (allow_remaining) {
    6291           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_rts_cmd_ClientKeepalive);
    6292             :         } else {
    6293           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_rts_cmd_ClientKeepalive);
    6294             :         }
    6295           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6296           0 :                 PyErr_SetNdrError(err);
    6297           0 :                 return NULL;
    6298             :         }
    6299             : 
    6300           0 :         Py_RETURN_NONE;
    6301             : }
    6302             : 
    6303           0 : static PyObject *py_dcerpc_rts_cmd_ClientKeepalive_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    6304             : {
    6305           0 :         struct dcerpc_rts_cmd_ClientKeepalive *object = (struct dcerpc_rts_cmd_ClientKeepalive *)pytalloc_get_ptr(py_obj);
    6306             :         PyObject *ret;
    6307             :         char *retstr;
    6308             : 
    6309           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_dcerpc_rts_cmd_ClientKeepalive, "dcerpc_rts_cmd_ClientKeepalive", object);
    6310           0 :         ret = PyUnicode_FromString(retstr);
    6311           0 :         talloc_free(retstr);
    6312             : 
    6313           0 :         return ret;
    6314             : }
    6315             : 
    6316             : static PyMethodDef py_dcerpc_rts_cmd_ClientKeepalive_methods[] = {
    6317             :         { "__ndr_pack__", (PyCFunction)py_dcerpc_rts_cmd_ClientKeepalive_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    6318             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_rts_cmd_ClientKeepalive_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    6319             :         { "__ndr_print__", (PyCFunction)py_dcerpc_rts_cmd_ClientKeepalive_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    6320             :         { NULL, NULL, 0, NULL }
    6321             : };
    6322             : 
    6323             : 
    6324             : static PyTypeObject dcerpc_rts_cmd_ClientKeepalive_Type = {
    6325             :         PyVarObject_HEAD_INIT(NULL, 0)
    6326             :         .tp_name = "dcerpc.rts_cmd_ClientKeepalive",
    6327             :         .tp_getset = py_dcerpc_rts_cmd_ClientKeepalive_getsetters,
    6328             :         .tp_methods = py_dcerpc_rts_cmd_ClientKeepalive_methods,
    6329             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6330             :         .tp_new = py_dcerpc_rts_cmd_ClientKeepalive_new,
    6331             : };
    6332             : 
    6333             : 
    6334           0 : static PyObject *py_dcerpc_rts_cmd_Version_get_Version(PyObject *obj, void *closure)
    6335             : {
    6336           0 :         struct dcerpc_rts_cmd_Version *object = (struct dcerpc_rts_cmd_Version *)pytalloc_get_ptr(obj);
    6337             :         PyObject *py_Version;
    6338           0 :         py_Version = PyLong_FromUnsignedLongLong((uint32_t)object->Version);
    6339           0 :         return py_Version;
    6340             : }
    6341             : 
    6342           0 : static int py_dcerpc_rts_cmd_Version_set_Version(PyObject *py_obj, PyObject *value, void *closure)
    6343             : {
    6344           0 :         struct dcerpc_rts_cmd_Version *object = (struct dcerpc_rts_cmd_Version *)pytalloc_get_ptr(py_obj);
    6345           0 :         if (value == NULL) {
    6346           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->Version");
    6347           0 :                 return -1;
    6348             :         }
    6349             :         {
    6350           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->Version));
    6351           0 :                 if (PyLong_Check(value)) {
    6352             :                         unsigned long long test_var;
    6353           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6354           0 :                         if (PyErr_Occurred() != NULL) {
    6355           0 :                                 return -1;
    6356             :                         }
    6357           0 :                         if (test_var > uint_max) {
    6358           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6359             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6360           0 :                                 return -1;
    6361             :                         }
    6362           0 :                         object->Version = test_var;
    6363             :                 } else {
    6364           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6365             :                           PyLong_Type.tp_name);
    6366           0 :                         return -1;
    6367             :                 }
    6368             :         }
    6369           0 :         return 0;
    6370             : }
    6371             : 
    6372             : static PyGetSetDef py_dcerpc_rts_cmd_Version_getsetters[] = {
    6373             :         {
    6374             :                 .name = discard_const_p(char, "Version"),
    6375             :                 .get = py_dcerpc_rts_cmd_Version_get_Version,
    6376             :                 .set = py_dcerpc_rts_cmd_Version_set_Version,
    6377             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6378             :         },
    6379             :         { .name = NULL }
    6380             : };
    6381             : 
    6382           0 : static PyObject *py_dcerpc_rts_cmd_Version_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6383             : {
    6384           0 :         return pytalloc_new(struct dcerpc_rts_cmd_Version, type);
    6385             : }
    6386             : 
    6387           0 : static PyObject *py_dcerpc_rts_cmd_Version_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    6388             : {
    6389           0 :         struct dcerpc_rts_cmd_Version *object = (struct dcerpc_rts_cmd_Version *)pytalloc_get_ptr(py_obj);
    6390           0 :         PyObject *ret = NULL;
    6391             :         DATA_BLOB blob;
    6392             :         enum ndr_err_code err;
    6393           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    6394           0 :         if (tmp_ctx == NULL) {
    6395           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    6396           0 :                 return NULL;
    6397             :         }
    6398           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_dcerpc_rts_cmd_Version);
    6399           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6400           0 :                 TALLOC_FREE(tmp_ctx);
    6401           0 :                 PyErr_SetNdrError(err);
    6402           0 :                 return NULL;
    6403             :         }
    6404             : 
    6405           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    6406           0 :         TALLOC_FREE(tmp_ctx);
    6407           0 :         return ret;
    6408             : }
    6409             : 
    6410           0 : static PyObject *py_dcerpc_rts_cmd_Version_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    6411             : {
    6412           0 :         struct dcerpc_rts_cmd_Version *object = (struct dcerpc_rts_cmd_Version *)pytalloc_get_ptr(py_obj);
    6413           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    6414           0 :         Py_ssize_t blob_length = 0;
    6415             :         enum ndr_err_code err;
    6416           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    6417           0 :         PyObject *allow_remaining_obj = NULL;
    6418           0 :         bool allow_remaining = false;
    6419             : 
    6420           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    6421             :                 discard_const_p(char *, kwnames),
    6422             :                 &blob.data, &blob_length,
    6423             :                 &allow_remaining_obj)) {
    6424           0 :                 return NULL;
    6425             :         }
    6426           0 :         blob.length = blob_length;
    6427             : 
    6428           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    6429           0 :                 allow_remaining = true;
    6430             :         }
    6431             : 
    6432           0 :         if (allow_remaining) {
    6433           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_rts_cmd_Version);
    6434             :         } else {
    6435           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_rts_cmd_Version);
    6436             :         }
    6437           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6438           0 :                 PyErr_SetNdrError(err);
    6439           0 :                 return NULL;
    6440             :         }
    6441             : 
    6442           0 :         Py_RETURN_NONE;
    6443             : }
    6444             : 
    6445           0 : static PyObject *py_dcerpc_rts_cmd_Version_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    6446             : {
    6447           0 :         struct dcerpc_rts_cmd_Version *object = (struct dcerpc_rts_cmd_Version *)pytalloc_get_ptr(py_obj);
    6448             :         PyObject *ret;
    6449             :         char *retstr;
    6450             : 
    6451           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_dcerpc_rts_cmd_Version, "dcerpc_rts_cmd_Version", object);
    6452           0 :         ret = PyUnicode_FromString(retstr);
    6453           0 :         talloc_free(retstr);
    6454             : 
    6455           0 :         return ret;
    6456             : }
    6457             : 
    6458             : static PyMethodDef py_dcerpc_rts_cmd_Version_methods[] = {
    6459             :         { "__ndr_pack__", (PyCFunction)py_dcerpc_rts_cmd_Version_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    6460             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_rts_cmd_Version_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    6461             :         { "__ndr_print__", (PyCFunction)py_dcerpc_rts_cmd_Version_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    6462             :         { NULL, NULL, 0, NULL }
    6463             : };
    6464             : 
    6465             : 
    6466             : static PyTypeObject dcerpc_rts_cmd_Version_Type = {
    6467             :         PyVarObject_HEAD_INIT(NULL, 0)
    6468             :         .tp_name = "dcerpc.rts_cmd_Version",
    6469             :         .tp_getset = py_dcerpc_rts_cmd_Version_getsetters,
    6470             :         .tp_methods = py_dcerpc_rts_cmd_Version_methods,
    6471             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6472             :         .tp_new = py_dcerpc_rts_cmd_Version_new,
    6473             : };
    6474             : 
    6475             : 
    6476           0 : static PyObject *py_dcerpc_rts_cmd_Empty_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6477             : {
    6478           0 :         return pytalloc_new(struct dcerpc_rts_cmd_Empty, type);
    6479             : }
    6480             : 
    6481           0 : static PyObject *py_dcerpc_rts_cmd_Empty_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    6482             : {
    6483           0 :         struct dcerpc_rts_cmd_Empty *object = (struct dcerpc_rts_cmd_Empty *)pytalloc_get_ptr(py_obj);
    6484           0 :         PyObject *ret = NULL;
    6485             :         DATA_BLOB blob;
    6486             :         enum ndr_err_code err;
    6487           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    6488           0 :         if (tmp_ctx == NULL) {
    6489           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    6490           0 :                 return NULL;
    6491             :         }
    6492           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_dcerpc_rts_cmd_Empty);
    6493           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6494           0 :                 TALLOC_FREE(tmp_ctx);
    6495           0 :                 PyErr_SetNdrError(err);
    6496           0 :                 return NULL;
    6497             :         }
    6498             : 
    6499           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    6500           0 :         TALLOC_FREE(tmp_ctx);
    6501           0 :         return ret;
    6502             : }
    6503             : 
    6504           0 : static PyObject *py_dcerpc_rts_cmd_Empty_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    6505             : {
    6506           0 :         struct dcerpc_rts_cmd_Empty *object = (struct dcerpc_rts_cmd_Empty *)pytalloc_get_ptr(py_obj);
    6507           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    6508           0 :         Py_ssize_t blob_length = 0;
    6509             :         enum ndr_err_code err;
    6510           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    6511           0 :         PyObject *allow_remaining_obj = NULL;
    6512           0 :         bool allow_remaining = false;
    6513             : 
    6514           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    6515             :                 discard_const_p(char *, kwnames),
    6516             :                 &blob.data, &blob_length,
    6517             :                 &allow_remaining_obj)) {
    6518           0 :                 return NULL;
    6519             :         }
    6520           0 :         blob.length = blob_length;
    6521             : 
    6522           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    6523           0 :                 allow_remaining = true;
    6524             :         }
    6525             : 
    6526           0 :         if (allow_remaining) {
    6527           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_rts_cmd_Empty);
    6528             :         } else {
    6529           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_rts_cmd_Empty);
    6530             :         }
    6531           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6532           0 :                 PyErr_SetNdrError(err);
    6533           0 :                 return NULL;
    6534             :         }
    6535             : 
    6536           0 :         Py_RETURN_NONE;
    6537             : }
    6538             : 
    6539           0 : static PyObject *py_dcerpc_rts_cmd_Empty_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    6540             : {
    6541           0 :         struct dcerpc_rts_cmd_Empty *object = (struct dcerpc_rts_cmd_Empty *)pytalloc_get_ptr(py_obj);
    6542             :         PyObject *ret;
    6543             :         char *retstr;
    6544             : 
    6545           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_dcerpc_rts_cmd_Empty, "dcerpc_rts_cmd_Empty", object);
    6546           0 :         ret = PyUnicode_FromString(retstr);
    6547           0 :         talloc_free(retstr);
    6548             : 
    6549           0 :         return ret;
    6550             : }
    6551             : 
    6552             : static PyMethodDef py_dcerpc_rts_cmd_Empty_methods[] = {
    6553             :         { "__ndr_pack__", (PyCFunction)py_dcerpc_rts_cmd_Empty_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    6554             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_rts_cmd_Empty_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    6555             :         { "__ndr_print__", (PyCFunction)py_dcerpc_rts_cmd_Empty_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    6556             :         { NULL, NULL, 0, NULL }
    6557             : };
    6558             : 
    6559             : 
    6560             : static PyTypeObject dcerpc_rts_cmd_Empty_Type = {
    6561             :         PyVarObject_HEAD_INIT(NULL, 0)
    6562             :         .tp_name = "dcerpc.rts_cmd_Empty",
    6563             :         .tp_getset = NULL,
    6564             :         .tp_methods = py_dcerpc_rts_cmd_Empty_methods,
    6565             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6566             :         .tp_new = py_dcerpc_rts_cmd_Empty_new,
    6567             : };
    6568             : 
    6569             : 
    6570           0 : static PyObject *py_dcerpc_rts_cmd_Padding_get_ConformanceCount(PyObject *obj, void *closure)
    6571             : {
    6572           0 :         struct dcerpc_rts_cmd_Padding *object = (struct dcerpc_rts_cmd_Padding *)pytalloc_get_ptr(obj);
    6573             :         PyObject *py_ConformanceCount;
    6574           0 :         py_ConformanceCount = PyLong_FromUnsignedLongLong((uint32_t)object->ConformanceCount);
    6575           0 :         return py_ConformanceCount;
    6576             : }
    6577             : 
    6578           0 : static int py_dcerpc_rts_cmd_Padding_set_ConformanceCount(PyObject *py_obj, PyObject *value, void *closure)
    6579             : {
    6580           0 :         struct dcerpc_rts_cmd_Padding *object = (struct dcerpc_rts_cmd_Padding *)pytalloc_get_ptr(py_obj);
    6581           0 :         if (value == NULL) {
    6582           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ConformanceCount");
    6583           0 :                 return -1;
    6584             :         }
    6585             :         {
    6586           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ConformanceCount));
    6587           0 :                 if (PyLong_Check(value)) {
    6588             :                         unsigned long long test_var;
    6589           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6590           0 :                         if (PyErr_Occurred() != NULL) {
    6591           0 :                                 return -1;
    6592             :                         }
    6593           0 :                         if (test_var > uint_max) {
    6594           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6595             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6596           0 :                                 return -1;
    6597             :                         }
    6598           0 :                         object->ConformanceCount = test_var;
    6599             :                 } else {
    6600           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6601             :                           PyLong_Type.tp_name);
    6602           0 :                         return -1;
    6603             :                 }
    6604             :         }
    6605           0 :         return 0;
    6606             : }
    6607             : 
    6608           0 : static PyObject *py_dcerpc_rts_cmd_Padding_get_Padding(PyObject *obj, void *closure)
    6609             : {
    6610           0 :         struct dcerpc_rts_cmd_Padding *object = (struct dcerpc_rts_cmd_Padding *)pytalloc_get_ptr(obj);
    6611             :         PyObject *py_Padding;
    6612           0 :         py_Padding = PyList_New(object->ConformanceCount);
    6613           0 :         if (py_Padding == NULL) {
    6614           0 :                 return NULL;
    6615             :         }
    6616             :         {
    6617             :                 int Padding_cntr_0;
    6618           0 :                 for (Padding_cntr_0 = 0; Padding_cntr_0 < (object->ConformanceCount); Padding_cntr_0++) {
    6619             :                         PyObject *py_Padding_0;
    6620           0 :                         py_Padding_0 = PyLong_FromLong((uint16_t)object->Padding[Padding_cntr_0]);
    6621           0 :                         PyList_SetItem(py_Padding, Padding_cntr_0, py_Padding_0);
    6622             :                 }
    6623             :         }
    6624           0 :         return py_Padding;
    6625             : }
    6626             : 
    6627           0 : static int py_dcerpc_rts_cmd_Padding_set_Padding(PyObject *py_obj, PyObject *value, void *closure)
    6628             : {
    6629           0 :         struct dcerpc_rts_cmd_Padding *object = (struct dcerpc_rts_cmd_Padding *)pytalloc_get_ptr(py_obj);
    6630           0 :         if (value == NULL) {
    6631           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->Padding");
    6632           0 :                 return -1;
    6633             :         }
    6634           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    6635             :         {
    6636             :                 int Padding_cntr_0;
    6637           0 :                 object->Padding = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->Padding, PyList_GET_SIZE(value));
    6638           0 :                 if (!object->Padding) { return -1;; }
    6639           0 :                 talloc_set_name_const(object->Padding, "ARRAY: object->Padding");
    6640           0 :                 for (Padding_cntr_0 = 0; Padding_cntr_0 < PyList_GET_SIZE(value); Padding_cntr_0++) {
    6641           0 :                         if (PyList_GET_ITEM(value, Padding_cntr_0) == NULL) {
    6642           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->Padding[Padding_cntr_0]");
    6643           0 :                                 return -1;
    6644             :                         }
    6645             :                         {
    6646           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->Padding[Padding_cntr_0]));
    6647           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, Padding_cntr_0))) {
    6648             :                                         unsigned long long test_var;
    6649           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, Padding_cntr_0));
    6650           0 :                                         if (PyErr_Occurred() != NULL) {
    6651           0 :                                                 return -1;
    6652             :                                         }
    6653           0 :                                         if (test_var > uint_max) {
    6654           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6655             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    6656           0 :                                                 return -1;
    6657             :                                         }
    6658           0 :                                         object->Padding[Padding_cntr_0] = test_var;
    6659             :                                 } else {
    6660           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6661             :                                           PyLong_Type.tp_name);
    6662           0 :                                         return -1;
    6663             :                                 }
    6664             :                         }
    6665             :                 }
    6666             :         }
    6667           0 :         return 0;
    6668             : }
    6669             : 
    6670             : static PyGetSetDef py_dcerpc_rts_cmd_Padding_getsetters[] = {
    6671             :         {
    6672             :                 .name = discard_const_p(char, "ConformanceCount"),
    6673             :                 .get = py_dcerpc_rts_cmd_Padding_get_ConformanceCount,
    6674             :                 .set = py_dcerpc_rts_cmd_Padding_set_ConformanceCount,
    6675             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6676             :         },
    6677             :         {
    6678             :                 .name = discard_const_p(char, "Padding"),
    6679             :                 .get = py_dcerpc_rts_cmd_Padding_get_Padding,
    6680             :                 .set = py_dcerpc_rts_cmd_Padding_set_Padding,
    6681             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    6682             :         },
    6683             :         { .name = NULL }
    6684             : };
    6685             : 
    6686           0 : static PyObject *py_dcerpc_rts_cmd_Padding_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6687             : {
    6688           0 :         return pytalloc_new(struct dcerpc_rts_cmd_Padding, type);
    6689             : }
    6690             : 
    6691           0 : static PyObject *py_dcerpc_rts_cmd_Padding_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    6692             : {
    6693           0 :         struct dcerpc_rts_cmd_Padding *object = (struct dcerpc_rts_cmd_Padding *)pytalloc_get_ptr(py_obj);
    6694           0 :         PyObject *ret = NULL;
    6695             :         DATA_BLOB blob;
    6696             :         enum ndr_err_code err;
    6697           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    6698           0 :         if (tmp_ctx == NULL) {
    6699           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    6700           0 :                 return NULL;
    6701             :         }
    6702           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_dcerpc_rts_cmd_Padding);
    6703           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6704           0 :                 TALLOC_FREE(tmp_ctx);
    6705           0 :                 PyErr_SetNdrError(err);
    6706           0 :                 return NULL;
    6707             :         }
    6708             : 
    6709           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    6710           0 :         TALLOC_FREE(tmp_ctx);
    6711           0 :         return ret;
    6712             : }
    6713             : 
    6714           0 : static PyObject *py_dcerpc_rts_cmd_Padding_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    6715             : {
    6716           0 :         struct dcerpc_rts_cmd_Padding *object = (struct dcerpc_rts_cmd_Padding *)pytalloc_get_ptr(py_obj);
    6717           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    6718           0 :         Py_ssize_t blob_length = 0;
    6719             :         enum ndr_err_code err;
    6720           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    6721           0 :         PyObject *allow_remaining_obj = NULL;
    6722           0 :         bool allow_remaining = false;
    6723             : 
    6724           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    6725             :                 discard_const_p(char *, kwnames),
    6726             :                 &blob.data, &blob_length,
    6727             :                 &allow_remaining_obj)) {
    6728           0 :                 return NULL;
    6729             :         }
    6730           0 :         blob.length = blob_length;
    6731             : 
    6732           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    6733           0 :                 allow_remaining = true;
    6734             :         }
    6735             : 
    6736           0 :         if (allow_remaining) {
    6737           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_rts_cmd_Padding);
    6738             :         } else {
    6739           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_rts_cmd_Padding);
    6740             :         }
    6741           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6742           0 :                 PyErr_SetNdrError(err);
    6743           0 :                 return NULL;
    6744             :         }
    6745             : 
    6746           0 :         Py_RETURN_NONE;
    6747             : }
    6748             : 
    6749           0 : static PyObject *py_dcerpc_rts_cmd_Padding_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    6750             : {
    6751           0 :         struct dcerpc_rts_cmd_Padding *object = (struct dcerpc_rts_cmd_Padding *)pytalloc_get_ptr(py_obj);
    6752             :         PyObject *ret;
    6753             :         char *retstr;
    6754             : 
    6755           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_dcerpc_rts_cmd_Padding, "dcerpc_rts_cmd_Padding", object);
    6756           0 :         ret = PyUnicode_FromString(retstr);
    6757           0 :         talloc_free(retstr);
    6758             : 
    6759           0 :         return ret;
    6760             : }
    6761             : 
    6762             : static PyMethodDef py_dcerpc_rts_cmd_Padding_methods[] = {
    6763             :         { "__ndr_pack__", (PyCFunction)py_dcerpc_rts_cmd_Padding_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    6764             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_rts_cmd_Padding_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    6765             :         { "__ndr_print__", (PyCFunction)py_dcerpc_rts_cmd_Padding_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    6766             :         { NULL, NULL, 0, NULL }
    6767             : };
    6768             : 
    6769             : 
    6770             : static PyTypeObject dcerpc_rts_cmd_Padding_Type = {
    6771             :         PyVarObject_HEAD_INIT(NULL, 0)
    6772             :         .tp_name = "dcerpc.rts_cmd_Padding",
    6773             :         .tp_getset = py_dcerpc_rts_cmd_Padding_getsetters,
    6774             :         .tp_methods = py_dcerpc_rts_cmd_Padding_methods,
    6775             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6776             :         .tp_new = py_dcerpc_rts_cmd_Padding_new,
    6777             : };
    6778             : 
    6779             : 
    6780           0 : static PyObject *py_dcerpc_rts_cmd_NegativeANCE_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6781             : {
    6782           0 :         return pytalloc_new(struct dcerpc_rts_cmd_NegativeANCE, type);
    6783             : }
    6784             : 
    6785           0 : static PyObject *py_dcerpc_rts_cmd_NegativeANCE_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    6786             : {
    6787           0 :         struct dcerpc_rts_cmd_NegativeANCE *object = (struct dcerpc_rts_cmd_NegativeANCE *)pytalloc_get_ptr(py_obj);
    6788           0 :         PyObject *ret = NULL;
    6789             :         DATA_BLOB blob;
    6790             :         enum ndr_err_code err;
    6791           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    6792           0 :         if (tmp_ctx == NULL) {
    6793           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    6794           0 :                 return NULL;
    6795             :         }
    6796           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_dcerpc_rts_cmd_NegativeANCE);
    6797           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6798           0 :                 TALLOC_FREE(tmp_ctx);
    6799           0 :                 PyErr_SetNdrError(err);
    6800           0 :                 return NULL;
    6801             :         }
    6802             : 
    6803           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    6804           0 :         TALLOC_FREE(tmp_ctx);
    6805           0 :         return ret;
    6806             : }
    6807             : 
    6808           0 : static PyObject *py_dcerpc_rts_cmd_NegativeANCE_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    6809             : {
    6810           0 :         struct dcerpc_rts_cmd_NegativeANCE *object = (struct dcerpc_rts_cmd_NegativeANCE *)pytalloc_get_ptr(py_obj);
    6811           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    6812           0 :         Py_ssize_t blob_length = 0;
    6813             :         enum ndr_err_code err;
    6814           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    6815           0 :         PyObject *allow_remaining_obj = NULL;
    6816           0 :         bool allow_remaining = false;
    6817             : 
    6818           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    6819             :                 discard_const_p(char *, kwnames),
    6820             :                 &blob.data, &blob_length,
    6821             :                 &allow_remaining_obj)) {
    6822           0 :                 return NULL;
    6823             :         }
    6824           0 :         blob.length = blob_length;
    6825             : 
    6826           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    6827           0 :                 allow_remaining = true;
    6828             :         }
    6829             : 
    6830           0 :         if (allow_remaining) {
    6831           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_rts_cmd_NegativeANCE);
    6832             :         } else {
    6833           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_rts_cmd_NegativeANCE);
    6834             :         }
    6835           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6836           0 :                 PyErr_SetNdrError(err);
    6837           0 :                 return NULL;
    6838             :         }
    6839             : 
    6840           0 :         Py_RETURN_NONE;
    6841             : }
    6842             : 
    6843           0 : static PyObject *py_dcerpc_rts_cmd_NegativeANCE_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    6844             : {
    6845           0 :         struct dcerpc_rts_cmd_NegativeANCE *object = (struct dcerpc_rts_cmd_NegativeANCE *)pytalloc_get_ptr(py_obj);
    6846             :         PyObject *ret;
    6847             :         char *retstr;
    6848             : 
    6849           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_dcerpc_rts_cmd_NegativeANCE, "dcerpc_rts_cmd_NegativeANCE", object);
    6850           0 :         ret = PyUnicode_FromString(retstr);
    6851           0 :         talloc_free(retstr);
    6852             : 
    6853           0 :         return ret;
    6854             : }
    6855             : 
    6856             : static PyMethodDef py_dcerpc_rts_cmd_NegativeANCE_methods[] = {
    6857             :         { "__ndr_pack__", (PyCFunction)py_dcerpc_rts_cmd_NegativeANCE_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    6858             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_rts_cmd_NegativeANCE_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    6859             :         { "__ndr_print__", (PyCFunction)py_dcerpc_rts_cmd_NegativeANCE_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    6860             :         { NULL, NULL, 0, NULL }
    6861             : };
    6862             : 
    6863             : 
    6864             : static PyTypeObject dcerpc_rts_cmd_NegativeANCE_Type = {
    6865             :         PyVarObject_HEAD_INIT(NULL, 0)
    6866             :         .tp_name = "dcerpc.rts_cmd_NegativeANCE",
    6867             :         .tp_getset = NULL,
    6868             :         .tp_methods = py_dcerpc_rts_cmd_NegativeANCE_methods,
    6869             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6870             :         .tp_new = py_dcerpc_rts_cmd_NegativeANCE_new,
    6871             : };
    6872             : 
    6873             : 
    6874           0 : static PyObject *py_dcerpc_rts_cmd_ANCE_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6875             : {
    6876           0 :         return pytalloc_new(struct dcerpc_rts_cmd_ANCE, type);
    6877             : }
    6878             : 
    6879           0 : static PyObject *py_dcerpc_rts_cmd_ANCE_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    6880             : {
    6881           0 :         struct dcerpc_rts_cmd_ANCE *object = (struct dcerpc_rts_cmd_ANCE *)pytalloc_get_ptr(py_obj);
    6882           0 :         PyObject *ret = NULL;
    6883             :         DATA_BLOB blob;
    6884             :         enum ndr_err_code err;
    6885           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    6886           0 :         if (tmp_ctx == NULL) {
    6887           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    6888           0 :                 return NULL;
    6889             :         }
    6890           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_dcerpc_rts_cmd_ANCE);
    6891           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6892           0 :                 TALLOC_FREE(tmp_ctx);
    6893           0 :                 PyErr_SetNdrError(err);
    6894           0 :                 return NULL;
    6895             :         }
    6896             : 
    6897           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    6898           0 :         TALLOC_FREE(tmp_ctx);
    6899           0 :         return ret;
    6900             : }
    6901             : 
    6902           0 : static PyObject *py_dcerpc_rts_cmd_ANCE_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    6903             : {
    6904           0 :         struct dcerpc_rts_cmd_ANCE *object = (struct dcerpc_rts_cmd_ANCE *)pytalloc_get_ptr(py_obj);
    6905           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    6906           0 :         Py_ssize_t blob_length = 0;
    6907             :         enum ndr_err_code err;
    6908           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    6909           0 :         PyObject *allow_remaining_obj = NULL;
    6910           0 :         bool allow_remaining = false;
    6911             : 
    6912           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    6913             :                 discard_const_p(char *, kwnames),
    6914             :                 &blob.data, &blob_length,
    6915             :                 &allow_remaining_obj)) {
    6916           0 :                 return NULL;
    6917             :         }
    6918           0 :         blob.length = blob_length;
    6919             : 
    6920           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    6921           0 :                 allow_remaining = true;
    6922             :         }
    6923             : 
    6924           0 :         if (allow_remaining) {
    6925           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_rts_cmd_ANCE);
    6926             :         } else {
    6927           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_rts_cmd_ANCE);
    6928             :         }
    6929           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6930           0 :                 PyErr_SetNdrError(err);
    6931           0 :                 return NULL;
    6932             :         }
    6933             : 
    6934           0 :         Py_RETURN_NONE;
    6935             : }
    6936             : 
    6937           0 : static PyObject *py_dcerpc_rts_cmd_ANCE_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    6938             : {
    6939           0 :         struct dcerpc_rts_cmd_ANCE *object = (struct dcerpc_rts_cmd_ANCE *)pytalloc_get_ptr(py_obj);
    6940             :         PyObject *ret;
    6941             :         char *retstr;
    6942             : 
    6943           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_dcerpc_rts_cmd_ANCE, "dcerpc_rts_cmd_ANCE", object);
    6944           0 :         ret = PyUnicode_FromString(retstr);
    6945           0 :         talloc_free(retstr);
    6946             : 
    6947           0 :         return ret;
    6948             : }
    6949             : 
    6950             : static PyMethodDef py_dcerpc_rts_cmd_ANCE_methods[] = {
    6951             :         { "__ndr_pack__", (PyCFunction)py_dcerpc_rts_cmd_ANCE_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    6952             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_rts_cmd_ANCE_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    6953             :         { "__ndr_print__", (PyCFunction)py_dcerpc_rts_cmd_ANCE_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    6954             :         { NULL, NULL, 0, NULL }
    6955             : };
    6956             : 
    6957             : 
    6958             : static PyTypeObject dcerpc_rts_cmd_ANCE_Type = {
    6959             :         PyVarObject_HEAD_INIT(NULL, 0)
    6960             :         .tp_name = "dcerpc.rts_cmd_ANCE",
    6961             :         .tp_getset = NULL,
    6962             :         .tp_methods = py_dcerpc_rts_cmd_ANCE_methods,
    6963             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6964             :         .tp_new = py_dcerpc_rts_cmd_ANCE_new,
    6965             : };
    6966             : 
    6967             : 
    6968           0 : static PyObject *py_dcerpc_rts_cmd_ClientAddress_get_ClientAddress(PyObject *obj, void *closure)
    6969             : {
    6970           0 :         struct dcerpc_rts_cmd_ClientAddress *object = (struct dcerpc_rts_cmd_ClientAddress *)pytalloc_get_ptr(obj);
    6971             :         PyObject *py_ClientAddress;
    6972           0 :         py_ClientAddress = pytalloc_reference_ex(&ClientAddress_Type, pytalloc_get_mem_ctx(obj), &object->ClientAddress);
    6973           0 :         return py_ClientAddress;
    6974             : }
    6975             : 
    6976           0 : static int py_dcerpc_rts_cmd_ClientAddress_set_ClientAddress(PyObject *py_obj, PyObject *value, void *closure)
    6977             : {
    6978           0 :         struct dcerpc_rts_cmd_ClientAddress *object = (struct dcerpc_rts_cmd_ClientAddress *)pytalloc_get_ptr(py_obj);
    6979           0 :         if (value == NULL) {
    6980           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ClientAddress");
    6981           0 :                 return -1;
    6982             :         }
    6983           0 :         PY_CHECK_TYPE(&ClientAddress_Type, value, return -1;);
    6984           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    6985           0 :                 PyErr_NoMemory();
    6986           0 :                 return -1;
    6987             :         }
    6988           0 :         object->ClientAddress = *(struct ClientAddress *)pytalloc_get_ptr(value);
    6989           0 :         return 0;
    6990             : }
    6991             : 
    6992             : static PyGetSetDef py_dcerpc_rts_cmd_ClientAddress_getsetters[] = {
    6993             :         {
    6994             :                 .name = discard_const_p(char, "ClientAddress"),
    6995             :                 .get = py_dcerpc_rts_cmd_ClientAddress_get_ClientAddress,
    6996             :                 .set = py_dcerpc_rts_cmd_ClientAddress_set_ClientAddress,
    6997             :                 .doc = discard_const_p(char, "PIDL-generated element of base type ClientAddress")
    6998             :         },
    6999             :         { .name = NULL }
    7000             : };
    7001             : 
    7002           0 : static PyObject *py_dcerpc_rts_cmd_ClientAddress_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7003             : {
    7004           0 :         return pytalloc_new(struct dcerpc_rts_cmd_ClientAddress, type);
    7005             : }
    7006             : 
    7007           0 : static PyObject *py_dcerpc_rts_cmd_ClientAddress_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    7008             : {
    7009           0 :         struct dcerpc_rts_cmd_ClientAddress *object = (struct dcerpc_rts_cmd_ClientAddress *)pytalloc_get_ptr(py_obj);
    7010           0 :         PyObject *ret = NULL;
    7011             :         DATA_BLOB blob;
    7012             :         enum ndr_err_code err;
    7013           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    7014           0 :         if (tmp_ctx == NULL) {
    7015           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    7016           0 :                 return NULL;
    7017             :         }
    7018           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_dcerpc_rts_cmd_ClientAddress);
    7019           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    7020           0 :                 TALLOC_FREE(tmp_ctx);
    7021           0 :                 PyErr_SetNdrError(err);
    7022           0 :                 return NULL;
    7023             :         }
    7024             : 
    7025           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    7026           0 :         TALLOC_FREE(tmp_ctx);
    7027           0 :         return ret;
    7028             : }
    7029             : 
    7030           0 : static PyObject *py_dcerpc_rts_cmd_ClientAddress_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    7031             : {
    7032           0 :         struct dcerpc_rts_cmd_ClientAddress *object = (struct dcerpc_rts_cmd_ClientAddress *)pytalloc_get_ptr(py_obj);
    7033           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    7034           0 :         Py_ssize_t blob_length = 0;
    7035             :         enum ndr_err_code err;
    7036           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    7037           0 :         PyObject *allow_remaining_obj = NULL;
    7038           0 :         bool allow_remaining = false;
    7039             : 
    7040           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    7041             :                 discard_const_p(char *, kwnames),
    7042             :                 &blob.data, &blob_length,
    7043             :                 &allow_remaining_obj)) {
    7044           0 :                 return NULL;
    7045             :         }
    7046           0 :         blob.length = blob_length;
    7047             : 
    7048           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    7049           0 :                 allow_remaining = true;
    7050             :         }
    7051             : 
    7052           0 :         if (allow_remaining) {
    7053           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_rts_cmd_ClientAddress);
    7054             :         } else {
    7055           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_rts_cmd_ClientAddress);
    7056             :         }
    7057           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    7058           0 :                 PyErr_SetNdrError(err);
    7059           0 :                 return NULL;
    7060             :         }
    7061             : 
    7062           0 :         Py_RETURN_NONE;
    7063             : }
    7064             : 
    7065           0 : static PyObject *py_dcerpc_rts_cmd_ClientAddress_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    7066             : {
    7067           0 :         struct dcerpc_rts_cmd_ClientAddress *object = (struct dcerpc_rts_cmd_ClientAddress *)pytalloc_get_ptr(py_obj);
    7068             :         PyObject *ret;
    7069             :         char *retstr;
    7070             : 
    7071           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_dcerpc_rts_cmd_ClientAddress, "dcerpc_rts_cmd_ClientAddress", object);
    7072           0 :         ret = PyUnicode_FromString(retstr);
    7073           0 :         talloc_free(retstr);
    7074             : 
    7075           0 :         return ret;
    7076             : }
    7077             : 
    7078             : static PyMethodDef py_dcerpc_rts_cmd_ClientAddress_methods[] = {
    7079             :         { "__ndr_pack__", (PyCFunction)py_dcerpc_rts_cmd_ClientAddress_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    7080             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_rts_cmd_ClientAddress_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    7081             :         { "__ndr_print__", (PyCFunction)py_dcerpc_rts_cmd_ClientAddress_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    7082             :         { NULL, NULL, 0, NULL }
    7083             : };
    7084             : 
    7085             : 
    7086             : static PyTypeObject dcerpc_rts_cmd_ClientAddress_Type = {
    7087             :         PyVarObject_HEAD_INIT(NULL, 0)
    7088             :         .tp_name = "dcerpc.rts_cmd_ClientAddress",
    7089             :         .tp_getset = py_dcerpc_rts_cmd_ClientAddress_getsetters,
    7090             :         .tp_methods = py_dcerpc_rts_cmd_ClientAddress_methods,
    7091             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7092             :         .tp_new = py_dcerpc_rts_cmd_ClientAddress_new,
    7093             : };
    7094             : 
    7095             : 
    7096           0 : static PyObject *py_dcerpc_rts_cmd_AssociationGroupId_get_AssociationGroupId(PyObject *obj, void *closure)
    7097             : {
    7098           0 :         struct dcerpc_rts_cmd_AssociationGroupId *object = (struct dcerpc_rts_cmd_AssociationGroupId *)pytalloc_get_ptr(obj);
    7099             :         PyObject *py_AssociationGroupId;
    7100           0 :         py_AssociationGroupId = pytalloc_reference_ex(&RTSCookie_Type, pytalloc_get_mem_ctx(obj), &object->AssociationGroupId);
    7101           0 :         return py_AssociationGroupId;
    7102             : }
    7103             : 
    7104           0 : static int py_dcerpc_rts_cmd_AssociationGroupId_set_AssociationGroupId(PyObject *py_obj, PyObject *value, void *closure)
    7105             : {
    7106           0 :         struct dcerpc_rts_cmd_AssociationGroupId *object = (struct dcerpc_rts_cmd_AssociationGroupId *)pytalloc_get_ptr(py_obj);
    7107           0 :         if (value == NULL) {
    7108           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->AssociationGroupId");
    7109           0 :                 return -1;
    7110             :         }
    7111           0 :         PY_CHECK_TYPE(&RTSCookie_Type, value, return -1;);
    7112           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7113           0 :                 PyErr_NoMemory();
    7114           0 :                 return -1;
    7115             :         }
    7116           0 :         object->AssociationGroupId = *(struct RTSCookie *)pytalloc_get_ptr(value);
    7117           0 :         return 0;
    7118             : }
    7119             : 
    7120             : static PyGetSetDef py_dcerpc_rts_cmd_AssociationGroupId_getsetters[] = {
    7121             :         {
    7122             :                 .name = discard_const_p(char, "AssociationGroupId"),
    7123             :                 .get = py_dcerpc_rts_cmd_AssociationGroupId_get_AssociationGroupId,
    7124             :                 .set = py_dcerpc_rts_cmd_AssociationGroupId_set_AssociationGroupId,
    7125             :                 .doc = discard_const_p(char, "PIDL-generated element of base type RTSCookie")
    7126             :         },
    7127             :         { .name = NULL }
    7128             : };
    7129             : 
    7130           0 : static PyObject *py_dcerpc_rts_cmd_AssociationGroupId_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7131             : {
    7132           0 :         return pytalloc_new(struct dcerpc_rts_cmd_AssociationGroupId, type);
    7133             : }
    7134             : 
    7135           0 : static PyObject *py_dcerpc_rts_cmd_AssociationGroupId_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    7136             : {
    7137           0 :         struct dcerpc_rts_cmd_AssociationGroupId *object = (struct dcerpc_rts_cmd_AssociationGroupId *)pytalloc_get_ptr(py_obj);
    7138           0 :         PyObject *ret = NULL;
    7139             :         DATA_BLOB blob;
    7140             :         enum ndr_err_code err;
    7141           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    7142           0 :         if (tmp_ctx == NULL) {
    7143           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    7144           0 :                 return NULL;
    7145             :         }
    7146           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_dcerpc_rts_cmd_AssociationGroupId);
    7147           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    7148           0 :                 TALLOC_FREE(tmp_ctx);
    7149           0 :                 PyErr_SetNdrError(err);
    7150           0 :                 return NULL;
    7151             :         }
    7152             : 
    7153           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    7154           0 :         TALLOC_FREE(tmp_ctx);
    7155           0 :         return ret;
    7156             : }
    7157             : 
    7158           0 : static PyObject *py_dcerpc_rts_cmd_AssociationGroupId_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    7159             : {
    7160           0 :         struct dcerpc_rts_cmd_AssociationGroupId *object = (struct dcerpc_rts_cmd_AssociationGroupId *)pytalloc_get_ptr(py_obj);
    7161           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    7162           0 :         Py_ssize_t blob_length = 0;
    7163             :         enum ndr_err_code err;
    7164           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    7165           0 :         PyObject *allow_remaining_obj = NULL;
    7166           0 :         bool allow_remaining = false;
    7167             : 
    7168           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    7169             :                 discard_const_p(char *, kwnames),
    7170             :                 &blob.data, &blob_length,
    7171             :                 &allow_remaining_obj)) {
    7172           0 :                 return NULL;
    7173             :         }
    7174           0 :         blob.length = blob_length;
    7175             : 
    7176           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    7177           0 :                 allow_remaining = true;
    7178             :         }
    7179             : 
    7180           0 :         if (allow_remaining) {
    7181           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_rts_cmd_AssociationGroupId);
    7182             :         } else {
    7183           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_rts_cmd_AssociationGroupId);
    7184             :         }
    7185           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    7186           0 :                 PyErr_SetNdrError(err);
    7187           0 :                 return NULL;
    7188             :         }
    7189             : 
    7190           0 :         Py_RETURN_NONE;
    7191             : }
    7192             : 
    7193           0 : static PyObject *py_dcerpc_rts_cmd_AssociationGroupId_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    7194             : {
    7195           0 :         struct dcerpc_rts_cmd_AssociationGroupId *object = (struct dcerpc_rts_cmd_AssociationGroupId *)pytalloc_get_ptr(py_obj);
    7196             :         PyObject *ret;
    7197             :         char *retstr;
    7198             : 
    7199           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_dcerpc_rts_cmd_AssociationGroupId, "dcerpc_rts_cmd_AssociationGroupId", object);
    7200           0 :         ret = PyUnicode_FromString(retstr);
    7201           0 :         talloc_free(retstr);
    7202             : 
    7203           0 :         return ret;
    7204             : }
    7205             : 
    7206             : static PyMethodDef py_dcerpc_rts_cmd_AssociationGroupId_methods[] = {
    7207             :         { "__ndr_pack__", (PyCFunction)py_dcerpc_rts_cmd_AssociationGroupId_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    7208             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_rts_cmd_AssociationGroupId_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    7209             :         { "__ndr_print__", (PyCFunction)py_dcerpc_rts_cmd_AssociationGroupId_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    7210             :         { NULL, NULL, 0, NULL }
    7211             : };
    7212             : 
    7213             : 
    7214             : static PyTypeObject dcerpc_rts_cmd_AssociationGroupId_Type = {
    7215             :         PyVarObject_HEAD_INIT(NULL, 0)
    7216             :         .tp_name = "dcerpc.rts_cmd_AssociationGroupId",
    7217             :         .tp_getset = py_dcerpc_rts_cmd_AssociationGroupId_getsetters,
    7218             :         .tp_methods = py_dcerpc_rts_cmd_AssociationGroupId_methods,
    7219             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7220             :         .tp_new = py_dcerpc_rts_cmd_AssociationGroupId_new,
    7221             : };
    7222             : 
    7223             : 
    7224           0 : static PyObject *py_dcerpc_rts_cmd_Destination_get_ForwardDestination(PyObject *obj, void *closure)
    7225             : {
    7226           0 :         struct dcerpc_rts_cmd_Destination *object = (struct dcerpc_rts_cmd_Destination *)pytalloc_get_ptr(obj);
    7227             :         PyObject *py_ForwardDestination;
    7228           0 :         py_ForwardDestination = PyLong_FromUnsignedLongLong((uint32_t)object->ForwardDestination);
    7229           0 :         return py_ForwardDestination;
    7230             : }
    7231             : 
    7232           0 : static int py_dcerpc_rts_cmd_Destination_set_ForwardDestination(PyObject *py_obj, PyObject *value, void *closure)
    7233             : {
    7234           0 :         struct dcerpc_rts_cmd_Destination *object = (struct dcerpc_rts_cmd_Destination *)pytalloc_get_ptr(py_obj);
    7235           0 :         if (value == NULL) {
    7236           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ForwardDestination");
    7237           0 :                 return -1;
    7238             :         }
    7239             :         {
    7240           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ForwardDestination));
    7241           0 :                 if (PyLong_Check(value)) {
    7242             :                         unsigned long long test_var;
    7243           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7244           0 :                         if (PyErr_Occurred() != NULL) {
    7245           0 :                                 return -1;
    7246             :                         }
    7247           0 :                         if (test_var > uint_max) {
    7248           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7249             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7250           0 :                                 return -1;
    7251             :                         }
    7252           0 :                         object->ForwardDestination = test_var;
    7253             :                 } else {
    7254           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7255             :                           PyLong_Type.tp_name);
    7256           0 :                         return -1;
    7257             :                 }
    7258             :         }
    7259           0 :         return 0;
    7260             : }
    7261             : 
    7262             : static PyGetSetDef py_dcerpc_rts_cmd_Destination_getsetters[] = {
    7263             :         {
    7264             :                 .name = discard_const_p(char, "ForwardDestination"),
    7265             :                 .get = py_dcerpc_rts_cmd_Destination_get_ForwardDestination,
    7266             :                 .set = py_dcerpc_rts_cmd_Destination_set_ForwardDestination,
    7267             :                 .doc = discard_const_p(char, "PIDL-generated element of base type ForwardDestination")
    7268             :         },
    7269             :         { .name = NULL }
    7270             : };
    7271             : 
    7272           0 : static PyObject *py_dcerpc_rts_cmd_Destination_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7273             : {
    7274           0 :         return pytalloc_new(struct dcerpc_rts_cmd_Destination, type);
    7275             : }
    7276             : 
    7277           0 : static PyObject *py_dcerpc_rts_cmd_Destination_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    7278             : {
    7279           0 :         struct dcerpc_rts_cmd_Destination *object = (struct dcerpc_rts_cmd_Destination *)pytalloc_get_ptr(py_obj);
    7280           0 :         PyObject *ret = NULL;
    7281             :         DATA_BLOB blob;
    7282             :         enum ndr_err_code err;
    7283           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    7284           0 :         if (tmp_ctx == NULL) {
    7285           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    7286           0 :                 return NULL;
    7287             :         }
    7288           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_dcerpc_rts_cmd_Destination);
    7289           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    7290           0 :                 TALLOC_FREE(tmp_ctx);
    7291           0 :                 PyErr_SetNdrError(err);
    7292           0 :                 return NULL;
    7293             :         }
    7294             : 
    7295           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    7296           0 :         TALLOC_FREE(tmp_ctx);
    7297           0 :         return ret;
    7298             : }
    7299             : 
    7300           0 : static PyObject *py_dcerpc_rts_cmd_Destination_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    7301             : {
    7302           0 :         struct dcerpc_rts_cmd_Destination *object = (struct dcerpc_rts_cmd_Destination *)pytalloc_get_ptr(py_obj);
    7303           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    7304           0 :         Py_ssize_t blob_length = 0;
    7305             :         enum ndr_err_code err;
    7306           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    7307           0 :         PyObject *allow_remaining_obj = NULL;
    7308           0 :         bool allow_remaining = false;
    7309             : 
    7310           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    7311             :                 discard_const_p(char *, kwnames),
    7312             :                 &blob.data, &blob_length,
    7313             :                 &allow_remaining_obj)) {
    7314           0 :                 return NULL;
    7315             :         }
    7316           0 :         blob.length = blob_length;
    7317             : 
    7318           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    7319           0 :                 allow_remaining = true;
    7320             :         }
    7321             : 
    7322           0 :         if (allow_remaining) {
    7323           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_rts_cmd_Destination);
    7324             :         } else {
    7325           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_rts_cmd_Destination);
    7326             :         }
    7327           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    7328           0 :                 PyErr_SetNdrError(err);
    7329           0 :                 return NULL;
    7330             :         }
    7331             : 
    7332           0 :         Py_RETURN_NONE;
    7333             : }
    7334             : 
    7335           0 : static PyObject *py_dcerpc_rts_cmd_Destination_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    7336             : {
    7337           0 :         struct dcerpc_rts_cmd_Destination *object = (struct dcerpc_rts_cmd_Destination *)pytalloc_get_ptr(py_obj);
    7338             :         PyObject *ret;
    7339             :         char *retstr;
    7340             : 
    7341           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_dcerpc_rts_cmd_Destination, "dcerpc_rts_cmd_Destination", object);
    7342           0 :         ret = PyUnicode_FromString(retstr);
    7343           0 :         talloc_free(retstr);
    7344             : 
    7345           0 :         return ret;
    7346             : }
    7347             : 
    7348             : static PyMethodDef py_dcerpc_rts_cmd_Destination_methods[] = {
    7349             :         { "__ndr_pack__", (PyCFunction)py_dcerpc_rts_cmd_Destination_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    7350             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_rts_cmd_Destination_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    7351             :         { "__ndr_print__", (PyCFunction)py_dcerpc_rts_cmd_Destination_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    7352             :         { NULL, NULL, 0, NULL }
    7353             : };
    7354             : 
    7355             : 
    7356             : static PyTypeObject dcerpc_rts_cmd_Destination_Type = {
    7357             :         PyVarObject_HEAD_INIT(NULL, 0)
    7358             :         .tp_name = "dcerpc.rts_cmd_Destination",
    7359             :         .tp_getset = py_dcerpc_rts_cmd_Destination_getsetters,
    7360             :         .tp_methods = py_dcerpc_rts_cmd_Destination_methods,
    7361             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7362             :         .tp_new = py_dcerpc_rts_cmd_Destination_new,
    7363             : };
    7364             : 
    7365             : 
    7366           0 : static PyObject *py_dcerpc_rts_cmd_PingTrafficSentNotify_get_PingTrafficSent(PyObject *obj, void *closure)
    7367             : {
    7368           0 :         struct dcerpc_rts_cmd_PingTrafficSentNotify *object = (struct dcerpc_rts_cmd_PingTrafficSentNotify *)pytalloc_get_ptr(obj);
    7369             :         PyObject *py_PingTrafficSent;
    7370           0 :         py_PingTrafficSent = PyLong_FromUnsignedLongLong((uint32_t)object->PingTrafficSent);
    7371           0 :         return py_PingTrafficSent;
    7372             : }
    7373             : 
    7374           0 : static int py_dcerpc_rts_cmd_PingTrafficSentNotify_set_PingTrafficSent(PyObject *py_obj, PyObject *value, void *closure)
    7375             : {
    7376           0 :         struct dcerpc_rts_cmd_PingTrafficSentNotify *object = (struct dcerpc_rts_cmd_PingTrafficSentNotify *)pytalloc_get_ptr(py_obj);
    7377           0 :         if (value == NULL) {
    7378           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->PingTrafficSent");
    7379           0 :                 return -1;
    7380             :         }
    7381             :         {
    7382           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->PingTrafficSent));
    7383           0 :                 if (PyLong_Check(value)) {
    7384             :                         unsigned long long test_var;
    7385           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7386           0 :                         if (PyErr_Occurred() != NULL) {
    7387           0 :                                 return -1;
    7388             :                         }
    7389           0 :                         if (test_var > uint_max) {
    7390           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7391             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7392           0 :                                 return -1;
    7393             :                         }
    7394           0 :                         object->PingTrafficSent = test_var;
    7395             :                 } else {
    7396           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7397             :                           PyLong_Type.tp_name);
    7398           0 :                         return -1;
    7399             :                 }
    7400             :         }
    7401           0 :         return 0;
    7402             : }
    7403             : 
    7404             : static PyGetSetDef py_dcerpc_rts_cmd_PingTrafficSentNotify_getsetters[] = {
    7405             :         {
    7406             :                 .name = discard_const_p(char, "PingTrafficSent"),
    7407             :                 .get = py_dcerpc_rts_cmd_PingTrafficSentNotify_get_PingTrafficSent,
    7408             :                 .set = py_dcerpc_rts_cmd_PingTrafficSentNotify_set_PingTrafficSent,
    7409             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    7410             :         },
    7411             :         { .name = NULL }
    7412             : };
    7413             : 
    7414           0 : static PyObject *py_dcerpc_rts_cmd_PingTrafficSentNotify_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7415             : {
    7416           0 :         return pytalloc_new(struct dcerpc_rts_cmd_PingTrafficSentNotify, type);
    7417             : }
    7418             : 
    7419           0 : static PyObject *py_dcerpc_rts_cmd_PingTrafficSentNotify_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    7420             : {
    7421           0 :         struct dcerpc_rts_cmd_PingTrafficSentNotify *object = (struct dcerpc_rts_cmd_PingTrafficSentNotify *)pytalloc_get_ptr(py_obj);
    7422           0 :         PyObject *ret = NULL;
    7423             :         DATA_BLOB blob;
    7424             :         enum ndr_err_code err;
    7425           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    7426           0 :         if (tmp_ctx == NULL) {
    7427           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    7428           0 :                 return NULL;
    7429             :         }
    7430           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_dcerpc_rts_cmd_PingTrafficSentNotify);
    7431           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    7432           0 :                 TALLOC_FREE(tmp_ctx);
    7433           0 :                 PyErr_SetNdrError(err);
    7434           0 :                 return NULL;
    7435             :         }
    7436             : 
    7437           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    7438           0 :         TALLOC_FREE(tmp_ctx);
    7439           0 :         return ret;
    7440             : }
    7441             : 
    7442           0 : static PyObject *py_dcerpc_rts_cmd_PingTrafficSentNotify_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    7443             : {
    7444           0 :         struct dcerpc_rts_cmd_PingTrafficSentNotify *object = (struct dcerpc_rts_cmd_PingTrafficSentNotify *)pytalloc_get_ptr(py_obj);
    7445           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    7446           0 :         Py_ssize_t blob_length = 0;
    7447             :         enum ndr_err_code err;
    7448           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    7449           0 :         PyObject *allow_remaining_obj = NULL;
    7450           0 :         bool allow_remaining = false;
    7451             : 
    7452           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    7453             :                 discard_const_p(char *, kwnames),
    7454             :                 &blob.data, &blob_length,
    7455             :                 &allow_remaining_obj)) {
    7456           0 :                 return NULL;
    7457             :         }
    7458           0 :         blob.length = blob_length;
    7459             : 
    7460           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    7461           0 :                 allow_remaining = true;
    7462             :         }
    7463             : 
    7464           0 :         if (allow_remaining) {
    7465           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_rts_cmd_PingTrafficSentNotify);
    7466             :         } else {
    7467           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_rts_cmd_PingTrafficSentNotify);
    7468             :         }
    7469           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    7470           0 :                 PyErr_SetNdrError(err);
    7471           0 :                 return NULL;
    7472             :         }
    7473             : 
    7474           0 :         Py_RETURN_NONE;
    7475             : }
    7476             : 
    7477           0 : static PyObject *py_dcerpc_rts_cmd_PingTrafficSentNotify_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    7478             : {
    7479           0 :         struct dcerpc_rts_cmd_PingTrafficSentNotify *object = (struct dcerpc_rts_cmd_PingTrafficSentNotify *)pytalloc_get_ptr(py_obj);
    7480             :         PyObject *ret;
    7481             :         char *retstr;
    7482             : 
    7483           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_dcerpc_rts_cmd_PingTrafficSentNotify, "dcerpc_rts_cmd_PingTrafficSentNotify", object);
    7484           0 :         ret = PyUnicode_FromString(retstr);
    7485           0 :         talloc_free(retstr);
    7486             : 
    7487           0 :         return ret;
    7488             : }
    7489             : 
    7490             : static PyMethodDef py_dcerpc_rts_cmd_PingTrafficSentNotify_methods[] = {
    7491             :         { "__ndr_pack__", (PyCFunction)py_dcerpc_rts_cmd_PingTrafficSentNotify_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    7492             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_rts_cmd_PingTrafficSentNotify_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    7493             :         { "__ndr_print__", (PyCFunction)py_dcerpc_rts_cmd_PingTrafficSentNotify_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    7494             :         { NULL, NULL, 0, NULL }
    7495             : };
    7496             : 
    7497             : 
    7498             : static PyTypeObject dcerpc_rts_cmd_PingTrafficSentNotify_Type = {
    7499             :         PyVarObject_HEAD_INIT(NULL, 0)
    7500             :         .tp_name = "dcerpc.rts_cmd_PingTrafficSentNotify",
    7501             :         .tp_getset = py_dcerpc_rts_cmd_PingTrafficSentNotify_getsetters,
    7502             :         .tp_methods = py_dcerpc_rts_cmd_PingTrafficSentNotify_methods,
    7503             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7504             :         .tp_new = py_dcerpc_rts_cmd_PingTrafficSentNotify_new,
    7505             : };
    7506             : 
    7507           0 : static PyObject *py_import_dcerpc_rts_cmds(TALLOC_CTX *mem_ctx, int level, union dcerpc_rts_cmds *in)
    7508             : {
    7509             :         PyObject *ret;
    7510             : 
    7511           0 :         switch (level) {
    7512           0 :                 case 0x0:
    7513           0 :                         ret = pytalloc_reference_ex(&dcerpc_rts_cmd_ReceiveWindowSize_Type, mem_ctx, &in->ReceiveWindowSize);
    7514           0 :                         return ret;
    7515             : 
    7516           0 :                 case 0x1:
    7517           0 :                         ret = pytalloc_reference_ex(&dcerpc_rts_cmd_FlowControlAck_Type, mem_ctx, &in->FlowControlAck);
    7518           0 :                         return ret;
    7519             : 
    7520           0 :                 case 0x2:
    7521           0 :                         ret = pytalloc_reference_ex(&dcerpc_rts_cmd_ConnectionTimeout_Type, mem_ctx, &in->ConnectionTimeout);
    7522           0 :                         return ret;
    7523             : 
    7524           0 :                 case 0x3:
    7525           0 :                         ret = pytalloc_reference_ex(&dcerpc_rts_cmd_Cookie_Type, mem_ctx, &in->Cookie);
    7526           0 :                         return ret;
    7527             : 
    7528           0 :                 case 0x4:
    7529           0 :                         ret = pytalloc_reference_ex(&dcerpc_rts_cmd_ChannelLifetime_Type, mem_ctx, &in->ChannelLifetime);
    7530           0 :                         return ret;
    7531             : 
    7532           0 :                 case 0x5:
    7533           0 :                         ret = pytalloc_reference_ex(&dcerpc_rts_cmd_ClientKeepalive_Type, mem_ctx, &in->ClientKeepalive);
    7534           0 :                         return ret;
    7535             : 
    7536           0 :                 case 0x6:
    7537           0 :                         ret = pytalloc_reference_ex(&dcerpc_rts_cmd_Version_Type, mem_ctx, &in->Version);
    7538           0 :                         return ret;
    7539             : 
    7540           0 :                 case 0x7:
    7541           0 :                         ret = pytalloc_reference_ex(&dcerpc_rts_cmd_Empty_Type, mem_ctx, &in->Empty);
    7542           0 :                         return ret;
    7543             : 
    7544           0 :                 case 0x8:
    7545           0 :                         ret = pytalloc_reference_ex(&dcerpc_rts_cmd_Padding_Type, mem_ctx, &in->Padding);
    7546           0 :                         return ret;
    7547             : 
    7548           0 :                 case 0x9:
    7549           0 :                         ret = pytalloc_reference_ex(&dcerpc_rts_cmd_NegativeANCE_Type, mem_ctx, &in->NegativeANCE);
    7550           0 :                         return ret;
    7551             : 
    7552           0 :                 case 0xA:
    7553           0 :                         ret = pytalloc_reference_ex(&dcerpc_rts_cmd_ANCE_Type, mem_ctx, &in->ANCE);
    7554           0 :                         return ret;
    7555             : 
    7556           0 :                 case 0xB:
    7557           0 :                         ret = pytalloc_reference_ex(&dcerpc_rts_cmd_ClientAddress_Type, mem_ctx, &in->ClientAddress);
    7558           0 :                         return ret;
    7559             : 
    7560           0 :                 case 0xC:
    7561           0 :                         ret = pytalloc_reference_ex(&dcerpc_rts_cmd_AssociationGroupId_Type, mem_ctx, &in->AssociationGroupId);
    7562           0 :                         return ret;
    7563             : 
    7564           0 :                 case 0xD:
    7565           0 :                         ret = pytalloc_reference_ex(&dcerpc_rts_cmd_Destination_Type, mem_ctx, &in->Destination);
    7566           0 :                         return ret;
    7567             : 
    7568           0 :                 case 0xE:
    7569           0 :                         ret = pytalloc_reference_ex(&dcerpc_rts_cmd_PingTrafficSentNotify_Type, mem_ctx, &in->PingTrafficSentNotify);
    7570           0 :                         return ret;
    7571             : 
    7572             :         }
    7573           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
    7574           0 :         return NULL;
    7575             : }
    7576             : 
    7577           0 : static union dcerpc_rts_cmds *py_export_dcerpc_rts_cmds(TALLOC_CTX *mem_ctx, int level, PyObject *in)
    7578             : {
    7579           0 :         union dcerpc_rts_cmds *ret = talloc_zero(mem_ctx, union dcerpc_rts_cmds);
    7580           0 :         switch (level) {
    7581           0 :                 case 0x0:
    7582           0 :                         if (in == NULL) {
    7583           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ReceiveWindowSize");
    7584           0 :                                 talloc_free(ret); return NULL;
    7585             :                         }
    7586           0 :                         PY_CHECK_TYPE(&dcerpc_rts_cmd_ReceiveWindowSize_Type, in, talloc_free(ret); return NULL;);
    7587           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    7588           0 :                                 PyErr_NoMemory();
    7589           0 :                                 talloc_free(ret); return NULL;
    7590             :                         }
    7591           0 :                         ret->ReceiveWindowSize = *(struct dcerpc_rts_cmd_ReceiveWindowSize *)pytalloc_get_ptr(in);
    7592           0 :                         break;
    7593             : 
    7594           0 :                 case 0x1:
    7595           0 :                         if (in == NULL) {
    7596           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->FlowControlAck");
    7597           0 :                                 talloc_free(ret); return NULL;
    7598             :                         }
    7599           0 :                         PY_CHECK_TYPE(&dcerpc_rts_cmd_FlowControlAck_Type, in, talloc_free(ret); return NULL;);
    7600           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    7601           0 :                                 PyErr_NoMemory();
    7602           0 :                                 talloc_free(ret); return NULL;
    7603             :                         }
    7604           0 :                         ret->FlowControlAck = *(struct dcerpc_rts_cmd_FlowControlAck *)pytalloc_get_ptr(in);
    7605           0 :                         break;
    7606             : 
    7607           0 :                 case 0x2:
    7608           0 :                         if (in == NULL) {
    7609           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ConnectionTimeout");
    7610           0 :                                 talloc_free(ret); return NULL;
    7611             :                         }
    7612           0 :                         PY_CHECK_TYPE(&dcerpc_rts_cmd_ConnectionTimeout_Type, in, talloc_free(ret); return NULL;);
    7613           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    7614           0 :                                 PyErr_NoMemory();
    7615           0 :                                 talloc_free(ret); return NULL;
    7616             :                         }
    7617           0 :                         ret->ConnectionTimeout = *(struct dcerpc_rts_cmd_ConnectionTimeout *)pytalloc_get_ptr(in);
    7618           0 :                         break;
    7619             : 
    7620           0 :                 case 0x3:
    7621           0 :                         if (in == NULL) {
    7622           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->Cookie");
    7623           0 :                                 talloc_free(ret); return NULL;
    7624             :                         }
    7625           0 :                         PY_CHECK_TYPE(&dcerpc_rts_cmd_Cookie_Type, in, talloc_free(ret); return NULL;);
    7626           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    7627           0 :                                 PyErr_NoMemory();
    7628           0 :                                 talloc_free(ret); return NULL;
    7629             :                         }
    7630           0 :                         ret->Cookie = *(struct dcerpc_rts_cmd_Cookie *)pytalloc_get_ptr(in);
    7631           0 :                         break;
    7632             : 
    7633           0 :                 case 0x4:
    7634           0 :                         if (in == NULL) {
    7635           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ChannelLifetime");
    7636           0 :                                 talloc_free(ret); return NULL;
    7637             :                         }
    7638           0 :                         PY_CHECK_TYPE(&dcerpc_rts_cmd_ChannelLifetime_Type, in, talloc_free(ret); return NULL;);
    7639           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    7640           0 :                                 PyErr_NoMemory();
    7641           0 :                                 talloc_free(ret); return NULL;
    7642             :                         }
    7643           0 :                         ret->ChannelLifetime = *(struct dcerpc_rts_cmd_ChannelLifetime *)pytalloc_get_ptr(in);
    7644           0 :                         break;
    7645             : 
    7646           0 :                 case 0x5:
    7647           0 :                         if (in == NULL) {
    7648           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ClientKeepalive");
    7649           0 :                                 talloc_free(ret); return NULL;
    7650             :                         }
    7651           0 :                         PY_CHECK_TYPE(&dcerpc_rts_cmd_ClientKeepalive_Type, in, talloc_free(ret); return NULL;);
    7652           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    7653           0 :                                 PyErr_NoMemory();
    7654           0 :                                 talloc_free(ret); return NULL;
    7655             :                         }
    7656           0 :                         ret->ClientKeepalive = *(struct dcerpc_rts_cmd_ClientKeepalive *)pytalloc_get_ptr(in);
    7657           0 :                         break;
    7658             : 
    7659           0 :                 case 0x6:
    7660           0 :                         if (in == NULL) {
    7661           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->Version");
    7662           0 :                                 talloc_free(ret); return NULL;
    7663             :                         }
    7664           0 :                         PY_CHECK_TYPE(&dcerpc_rts_cmd_Version_Type, in, talloc_free(ret); return NULL;);
    7665           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    7666           0 :                                 PyErr_NoMemory();
    7667           0 :                                 talloc_free(ret); return NULL;
    7668             :                         }
    7669           0 :                         ret->Version = *(struct dcerpc_rts_cmd_Version *)pytalloc_get_ptr(in);
    7670           0 :                         break;
    7671             : 
    7672           0 :                 case 0x7:
    7673           0 :                         if (in == NULL) {
    7674           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->Empty");
    7675           0 :                                 talloc_free(ret); return NULL;
    7676             :                         }
    7677           0 :                         PY_CHECK_TYPE(&dcerpc_rts_cmd_Empty_Type, in, talloc_free(ret); return NULL;);
    7678           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    7679           0 :                                 PyErr_NoMemory();
    7680           0 :                                 talloc_free(ret); return NULL;
    7681             :                         }
    7682           0 :                         ret->Empty = *(struct dcerpc_rts_cmd_Empty *)pytalloc_get_ptr(in);
    7683           0 :                         break;
    7684             : 
    7685           0 :                 case 0x8:
    7686           0 :                         if (in == NULL) {
    7687           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->Padding");
    7688           0 :                                 talloc_free(ret); return NULL;
    7689             :                         }
    7690           0 :                         PY_CHECK_TYPE(&dcerpc_rts_cmd_Padding_Type, in, talloc_free(ret); return NULL;);
    7691           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    7692           0 :                                 PyErr_NoMemory();
    7693           0 :                                 talloc_free(ret); return NULL;
    7694             :                         }
    7695           0 :                         ret->Padding = *(struct dcerpc_rts_cmd_Padding *)pytalloc_get_ptr(in);
    7696           0 :                         break;
    7697             : 
    7698           0 :                 case 0x9:
    7699           0 :                         if (in == NULL) {
    7700           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->NegativeANCE");
    7701           0 :                                 talloc_free(ret); return NULL;
    7702             :                         }
    7703           0 :                         PY_CHECK_TYPE(&dcerpc_rts_cmd_NegativeANCE_Type, in, talloc_free(ret); return NULL;);
    7704           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    7705           0 :                                 PyErr_NoMemory();
    7706           0 :                                 talloc_free(ret); return NULL;
    7707             :                         }
    7708           0 :                         ret->NegativeANCE = *(struct dcerpc_rts_cmd_NegativeANCE *)pytalloc_get_ptr(in);
    7709           0 :                         break;
    7710             : 
    7711           0 :                 case 0xA:
    7712           0 :                         if (in == NULL) {
    7713           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ANCE");
    7714           0 :                                 talloc_free(ret); return NULL;
    7715             :                         }
    7716           0 :                         PY_CHECK_TYPE(&dcerpc_rts_cmd_ANCE_Type, in, talloc_free(ret); return NULL;);
    7717           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    7718           0 :                                 PyErr_NoMemory();
    7719           0 :                                 talloc_free(ret); return NULL;
    7720             :                         }
    7721           0 :                         ret->ANCE = *(struct dcerpc_rts_cmd_ANCE *)pytalloc_get_ptr(in);
    7722           0 :                         break;
    7723             : 
    7724           0 :                 case 0xB:
    7725           0 :                         if (in == NULL) {
    7726           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ClientAddress");
    7727           0 :                                 talloc_free(ret); return NULL;
    7728             :                         }
    7729           0 :                         PY_CHECK_TYPE(&dcerpc_rts_cmd_ClientAddress_Type, in, talloc_free(ret); return NULL;);
    7730           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    7731           0 :                                 PyErr_NoMemory();
    7732           0 :                                 talloc_free(ret); return NULL;
    7733             :                         }
    7734           0 :                         ret->ClientAddress = *(struct dcerpc_rts_cmd_ClientAddress *)pytalloc_get_ptr(in);
    7735           0 :                         break;
    7736             : 
    7737           0 :                 case 0xC:
    7738           0 :                         if (in == NULL) {
    7739           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->AssociationGroupId");
    7740           0 :                                 talloc_free(ret); return NULL;
    7741             :                         }
    7742           0 :                         PY_CHECK_TYPE(&dcerpc_rts_cmd_AssociationGroupId_Type, in, talloc_free(ret); return NULL;);
    7743           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    7744           0 :                                 PyErr_NoMemory();
    7745           0 :                                 talloc_free(ret); return NULL;
    7746             :                         }
    7747           0 :                         ret->AssociationGroupId = *(struct dcerpc_rts_cmd_AssociationGroupId *)pytalloc_get_ptr(in);
    7748           0 :                         break;
    7749             : 
    7750           0 :                 case 0xD:
    7751           0 :                         if (in == NULL) {
    7752           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->Destination");
    7753           0 :                                 talloc_free(ret); return NULL;
    7754             :                         }
    7755           0 :                         PY_CHECK_TYPE(&dcerpc_rts_cmd_Destination_Type, in, talloc_free(ret); return NULL;);
    7756           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    7757           0 :                                 PyErr_NoMemory();
    7758           0 :                                 talloc_free(ret); return NULL;
    7759             :                         }
    7760           0 :                         ret->Destination = *(struct dcerpc_rts_cmd_Destination *)pytalloc_get_ptr(in);
    7761           0 :                         break;
    7762             : 
    7763           0 :                 case 0xE:
    7764           0 :                         if (in == NULL) {
    7765           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->PingTrafficSentNotify");
    7766           0 :                                 talloc_free(ret); return NULL;
    7767             :                         }
    7768           0 :                         PY_CHECK_TYPE(&dcerpc_rts_cmd_PingTrafficSentNotify_Type, in, talloc_free(ret); return NULL;);
    7769           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    7770           0 :                                 PyErr_NoMemory();
    7771           0 :                                 talloc_free(ret); return NULL;
    7772             :                         }
    7773           0 :                         ret->PingTrafficSentNotify = *(struct dcerpc_rts_cmd_PingTrafficSentNotify *)pytalloc_get_ptr(in);
    7774           0 :                         break;
    7775             : 
    7776           0 :                 default:
    7777           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
    7778           0 :                         talloc_free(ret);
    7779           0 :                         ret = NULL;
    7780             :         }
    7781             : 
    7782           0 :         return ret;
    7783             : }
    7784             : 
    7785           0 : static PyObject *py_dcerpc_rts_cmds_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7786             : {
    7787           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    7788           0 :         PyObject *mem_ctx_obj = NULL;
    7789           0 :         TALLOC_CTX *mem_ctx = NULL;
    7790           0 :         int level = 0;
    7791           0 :         PyObject *in_obj = NULL;
    7792           0 :         union dcerpc_rts_cmds *in = NULL;
    7793             : 
    7794           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
    7795             :                 discard_const_p(char *, kwnames),
    7796             :                 &mem_ctx_obj,
    7797             :                 &level,
    7798             :                 &in_obj)) {
    7799           0 :                 return NULL;
    7800             :         }
    7801           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    7802           0 :         if (mem_ctx == NULL) {
    7803           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    7804           0 :                 return NULL;
    7805             :         }
    7806           0 :         in = (union dcerpc_rts_cmds *)pytalloc_get_ptr(in_obj);
    7807           0 :         if (in == NULL) {
    7808           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union dcerpc_rts_cmds!");
    7809           0 :                 return NULL;
    7810             :         }
    7811             : 
    7812           0 :         return py_import_dcerpc_rts_cmds(mem_ctx, level, in);
    7813             : }
    7814             : 
    7815           0 : static PyObject *py_dcerpc_rts_cmds_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7816             : {
    7817           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    7818           0 :         PyObject *mem_ctx_obj = NULL;
    7819           0 :         TALLOC_CTX *mem_ctx = NULL;
    7820           0 :         int level = 0;
    7821           0 :         PyObject *in = NULL;
    7822           0 :         union dcerpc_rts_cmds *out = NULL;
    7823             : 
    7824           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
    7825             :                 discard_const_p(char *, kwnames),
    7826             :                 &mem_ctx_obj,
    7827             :                 &level,
    7828             :                 &in)) {
    7829           0 :                 return NULL;
    7830             :         }
    7831           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    7832           0 :         if (mem_ctx == NULL) {
    7833           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    7834           0 :                 return NULL;
    7835             :         }
    7836             : 
    7837           0 :         out = py_export_dcerpc_rts_cmds(mem_ctx, level, in);
    7838           0 :         if (out == NULL) {
    7839           0 :                 return NULL;
    7840             :         }
    7841             : 
    7842           0 :         return pytalloc_GenericObject_reference(out);
    7843             : }
    7844             : 
    7845             : static PyMethodDef py_dcerpc_rts_cmds_methods[] = {
    7846             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_rts_cmds_import),
    7847             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    7848             :                 "T.__import__(mem_ctx, level, in) => ret." },
    7849             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_rts_cmds_export),
    7850             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    7851             :                 "T.__export__(mem_ctx, level, in) => ret." },
    7852             :         { NULL, NULL, 0, NULL }
    7853             : };
    7854             : 
    7855           0 : static PyObject *py_dcerpc_rts_cmds_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7856             : {
    7857           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
    7858           0 :         return NULL;
    7859             : }
    7860             : 
    7861             : 
    7862             : static PyTypeObject dcerpc_rts_cmds_Type = {
    7863             :         PyVarObject_HEAD_INIT(NULL, 0)
    7864             :         .tp_name = "dcerpc.rts_cmds",
    7865             :         .tp_getset = NULL,
    7866             :         .tp_methods = py_dcerpc_rts_cmds_methods,
    7867             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7868             :         .tp_new = py_dcerpc_rts_cmds_new,
    7869             : };
    7870             : 
    7871             : 
    7872           0 : static PyObject *py_dcerpc_rts_cmd_get_CommandType(PyObject *obj, void *closure)
    7873             : {
    7874           0 :         struct dcerpc_rts_cmd *object = (struct dcerpc_rts_cmd *)pytalloc_get_ptr(obj);
    7875             :         PyObject *py_CommandType;
    7876           0 :         py_CommandType = PyLong_FromUnsignedLongLong((uint32_t)object->CommandType);
    7877           0 :         return py_CommandType;
    7878             : }
    7879             : 
    7880           0 : static int py_dcerpc_rts_cmd_set_CommandType(PyObject *py_obj, PyObject *value, void *closure)
    7881             : {
    7882           0 :         struct dcerpc_rts_cmd *object = (struct dcerpc_rts_cmd *)pytalloc_get_ptr(py_obj);
    7883           0 :         if (value == NULL) {
    7884           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->CommandType");
    7885           0 :                 return -1;
    7886             :         }
    7887             :         {
    7888           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->CommandType));
    7889           0 :                 if (PyLong_Check(value)) {
    7890             :                         unsigned long long test_var;
    7891           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7892           0 :                         if (PyErr_Occurred() != NULL) {
    7893           0 :                                 return -1;
    7894             :                         }
    7895           0 :                         if (test_var > uint_max) {
    7896           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7897             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7898           0 :                                 return -1;
    7899             :                         }
    7900           0 :                         object->CommandType = test_var;
    7901             :                 } else {
    7902           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7903             :                           PyLong_Type.tp_name);
    7904           0 :                         return -1;
    7905             :                 }
    7906             :         }
    7907           0 :         return 0;
    7908             : }
    7909             : 
    7910           0 : static PyObject *py_dcerpc_rts_cmd_get_Command(PyObject *obj, void *closure)
    7911             : {
    7912           0 :         struct dcerpc_rts_cmd *object = (struct dcerpc_rts_cmd *)pytalloc_get_ptr(obj);
    7913             :         PyObject *py_Command;
    7914           0 :         py_Command = pyrpc_import_union(&dcerpc_rts_cmds_Type, pytalloc_get_mem_ctx(obj), object->CommandType, &object->Command, "union dcerpc_rts_cmds");
    7915           0 :         if (py_Command == NULL) {
    7916           0 :                 return NULL;
    7917             :         }
    7918           0 :         return py_Command;
    7919             : }
    7920             : 
    7921           0 : static int py_dcerpc_rts_cmd_set_Command(PyObject *py_obj, PyObject *value, void *closure)
    7922             : {
    7923           0 :         struct dcerpc_rts_cmd *object = (struct dcerpc_rts_cmd *)pytalloc_get_ptr(py_obj);
    7924           0 :         if (value == NULL) {
    7925           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->Command");
    7926           0 :                 return -1;
    7927             :         }
    7928             :         {
    7929             :                 union dcerpc_rts_cmds *Command_switch_0;
    7930           0 :                 Command_switch_0 = (union dcerpc_rts_cmds *)pyrpc_export_union(&dcerpc_rts_cmds_Type, pytalloc_get_mem_ctx(py_obj), object->CommandType, value, "union dcerpc_rts_cmds");
    7931           0 :                 if (Command_switch_0 == NULL) {
    7932           0 :                         return -1;
    7933             :                 }
    7934           0 :                 object->Command = *Command_switch_0;
    7935             :         }
    7936           0 :         return 0;
    7937             : }
    7938             : 
    7939             : static PyGetSetDef py_dcerpc_rts_cmd_getsetters[] = {
    7940             :         {
    7941             :                 .name = discard_const_p(char, "CommandType"),
    7942             :                 .get = py_dcerpc_rts_cmd_get_CommandType,
    7943             :                 .set = py_dcerpc_rts_cmd_set_CommandType,
    7944             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    7945             :         },
    7946             :         {
    7947             :                 .name = discard_const_p(char, "Command"),
    7948             :                 .get = py_dcerpc_rts_cmd_get_Command,
    7949             :                 .set = py_dcerpc_rts_cmd_set_Command,
    7950             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dcerpc_rts_cmds")
    7951             :         },
    7952             :         { .name = NULL }
    7953             : };
    7954             : 
    7955           0 : static PyObject *py_dcerpc_rts_cmd_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7956             : {
    7957           0 :         return pytalloc_new(struct dcerpc_rts_cmd, type);
    7958             : }
    7959             : 
    7960           0 : static PyObject *py_dcerpc_rts_cmd_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    7961             : {
    7962           0 :         struct dcerpc_rts_cmd *object = (struct dcerpc_rts_cmd *)pytalloc_get_ptr(py_obj);
    7963           0 :         PyObject *ret = NULL;
    7964             :         DATA_BLOB blob;
    7965             :         enum ndr_err_code err;
    7966           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    7967           0 :         if (tmp_ctx == NULL) {
    7968           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    7969           0 :                 return NULL;
    7970             :         }
    7971           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_dcerpc_rts_cmd);
    7972           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    7973           0 :                 TALLOC_FREE(tmp_ctx);
    7974           0 :                 PyErr_SetNdrError(err);
    7975           0 :                 return NULL;
    7976             :         }
    7977             : 
    7978           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    7979           0 :         TALLOC_FREE(tmp_ctx);
    7980           0 :         return ret;
    7981             : }
    7982             : 
    7983           0 : static PyObject *py_dcerpc_rts_cmd_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    7984             : {
    7985           0 :         struct dcerpc_rts_cmd *object = (struct dcerpc_rts_cmd *)pytalloc_get_ptr(py_obj);
    7986           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    7987           0 :         Py_ssize_t blob_length = 0;
    7988             :         enum ndr_err_code err;
    7989           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    7990           0 :         PyObject *allow_remaining_obj = NULL;
    7991           0 :         bool allow_remaining = false;
    7992             : 
    7993           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    7994             :                 discard_const_p(char *, kwnames),
    7995             :                 &blob.data, &blob_length,
    7996             :                 &allow_remaining_obj)) {
    7997           0 :                 return NULL;
    7998             :         }
    7999           0 :         blob.length = blob_length;
    8000             : 
    8001           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    8002           0 :                 allow_remaining = true;
    8003             :         }
    8004             : 
    8005           0 :         if (allow_remaining) {
    8006           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_rts_cmd);
    8007             :         } else {
    8008           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_rts_cmd);
    8009             :         }
    8010           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    8011           0 :                 PyErr_SetNdrError(err);
    8012           0 :                 return NULL;
    8013             :         }
    8014             : 
    8015           0 :         Py_RETURN_NONE;
    8016             : }
    8017             : 
    8018           0 : static PyObject *py_dcerpc_rts_cmd_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    8019             : {
    8020           0 :         struct dcerpc_rts_cmd *object = (struct dcerpc_rts_cmd *)pytalloc_get_ptr(py_obj);
    8021             :         PyObject *ret;
    8022             :         char *retstr;
    8023             : 
    8024           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_dcerpc_rts_cmd, "dcerpc_rts_cmd", object);
    8025           0 :         ret = PyUnicode_FromString(retstr);
    8026           0 :         talloc_free(retstr);
    8027             : 
    8028           0 :         return ret;
    8029             : }
    8030             : 
    8031             : static PyMethodDef py_dcerpc_rts_cmd_methods[] = {
    8032             :         { "__ndr_pack__", (PyCFunction)py_dcerpc_rts_cmd_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    8033             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_rts_cmd_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    8034             :         { "__ndr_print__", (PyCFunction)py_dcerpc_rts_cmd_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    8035             :         { NULL, NULL, 0, NULL }
    8036             : };
    8037             : 
    8038             : 
    8039             : static PyTypeObject dcerpc_rts_cmd_Type = {
    8040             :         PyVarObject_HEAD_INIT(NULL, 0)
    8041             :         .tp_name = "dcerpc.rts_cmd",
    8042             :         .tp_getset = py_dcerpc_rts_cmd_getsetters,
    8043             :         .tp_methods = py_dcerpc_rts_cmd_methods,
    8044             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    8045             :         .tp_new = py_dcerpc_rts_cmd_new,
    8046             : };
    8047             : 
    8048             : 
    8049           0 : static PyObject *py_dcerpc_rts_get_Flags(PyObject *obj, void *closure)
    8050             : {
    8051           0 :         struct dcerpc_rts *object = (struct dcerpc_rts *)pytalloc_get_ptr(obj);
    8052             :         PyObject *py_Flags;
    8053           0 :         py_Flags = PyLong_FromLong((uint16_t)object->Flags);
    8054           0 :         return py_Flags;
    8055             : }
    8056             : 
    8057           0 : static int py_dcerpc_rts_set_Flags(PyObject *py_obj, PyObject *value, void *closure)
    8058             : {
    8059           0 :         struct dcerpc_rts *object = (struct dcerpc_rts *)pytalloc_get_ptr(py_obj);
    8060           0 :         if (value == NULL) {
    8061           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->Flags");
    8062           0 :                 return -1;
    8063             :         }
    8064             :         {
    8065           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->Flags));
    8066           0 :                 if (PyLong_Check(value)) {
    8067             :                         unsigned long long test_var;
    8068           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8069           0 :                         if (PyErr_Occurred() != NULL) {
    8070           0 :                                 return -1;
    8071             :                         }
    8072           0 :                         if (test_var > uint_max) {
    8073           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8074             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8075           0 :                                 return -1;
    8076             :                         }
    8077           0 :                         object->Flags = test_var;
    8078             :                 } else {
    8079           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8080             :                           PyLong_Type.tp_name);
    8081           0 :                         return -1;
    8082             :                 }
    8083             :         }
    8084           0 :         return 0;
    8085             : }
    8086             : 
    8087           0 : static PyObject *py_dcerpc_rts_get_NumberOfCommands(PyObject *obj, void *closure)
    8088             : {
    8089           0 :         struct dcerpc_rts *object = (struct dcerpc_rts *)pytalloc_get_ptr(obj);
    8090             :         PyObject *py_NumberOfCommands;
    8091           0 :         py_NumberOfCommands = PyLong_FromLong((uint16_t)object->NumberOfCommands);
    8092           0 :         return py_NumberOfCommands;
    8093             : }
    8094             : 
    8095           0 : static int py_dcerpc_rts_set_NumberOfCommands(PyObject *py_obj, PyObject *value, void *closure)
    8096             : {
    8097           0 :         struct dcerpc_rts *object = (struct dcerpc_rts *)pytalloc_get_ptr(py_obj);
    8098           0 :         if (value == NULL) {
    8099           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->NumberOfCommands");
    8100           0 :                 return -1;
    8101             :         }
    8102             :         {
    8103           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->NumberOfCommands));
    8104           0 :                 if (PyLong_Check(value)) {
    8105             :                         unsigned long long test_var;
    8106           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8107           0 :                         if (PyErr_Occurred() != NULL) {
    8108           0 :                                 return -1;
    8109             :                         }
    8110           0 :                         if (test_var > uint_max) {
    8111           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8112             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8113           0 :                                 return -1;
    8114             :                         }
    8115           0 :                         object->NumberOfCommands = test_var;
    8116             :                 } else {
    8117           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8118             :                           PyLong_Type.tp_name);
    8119           0 :                         return -1;
    8120             :                 }
    8121             :         }
    8122           0 :         return 0;
    8123             : }
    8124             : 
    8125           0 : static PyObject *py_dcerpc_rts_get_Commands(PyObject *obj, void *closure)
    8126             : {
    8127           0 :         struct dcerpc_rts *object = (struct dcerpc_rts *)pytalloc_get_ptr(obj);
    8128             :         PyObject *py_Commands;
    8129           0 :         py_Commands = PyList_New(object->NumberOfCommands);
    8130           0 :         if (py_Commands == NULL) {
    8131           0 :                 return NULL;
    8132             :         }
    8133             :         {
    8134             :                 int Commands_cntr_0;
    8135           0 :                 for (Commands_cntr_0 = 0; Commands_cntr_0 < (object->NumberOfCommands); Commands_cntr_0++) {
    8136             :                         PyObject *py_Commands_0;
    8137           0 :                         py_Commands_0 = pytalloc_reference_ex(&dcerpc_rts_cmd_Type, object->Commands, &object->Commands[Commands_cntr_0]);
    8138           0 :                         PyList_SetItem(py_Commands, Commands_cntr_0, py_Commands_0);
    8139             :                 }
    8140             :         }
    8141           0 :         return py_Commands;
    8142             : }
    8143             : 
    8144           0 : static int py_dcerpc_rts_set_Commands(PyObject *py_obj, PyObject *value, void *closure)
    8145             : {
    8146           0 :         struct dcerpc_rts *object = (struct dcerpc_rts *)pytalloc_get_ptr(py_obj);
    8147           0 :         if (value == NULL) {
    8148           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->Commands");
    8149           0 :                 return -1;
    8150             :         }
    8151           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    8152             :         {
    8153             :                 int Commands_cntr_0;
    8154           0 :                 object->Commands = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->Commands, PyList_GET_SIZE(value));
    8155           0 :                 if (!object->Commands) { return -1;; }
    8156           0 :                 talloc_set_name_const(object->Commands, "ARRAY: object->Commands");
    8157           0 :                 for (Commands_cntr_0 = 0; Commands_cntr_0 < PyList_GET_SIZE(value); Commands_cntr_0++) {
    8158           0 :                         if (PyList_GET_ITEM(value, Commands_cntr_0) == NULL) {
    8159           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->Commands[Commands_cntr_0]");
    8160           0 :                                 return -1;
    8161             :                         }
    8162           0 :                         PY_CHECK_TYPE(&dcerpc_rts_cmd_Type, PyList_GET_ITEM(value, Commands_cntr_0), return -1;);
    8163           0 :                         if (talloc_reference(object->Commands, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, Commands_cntr_0))) == NULL) {
    8164           0 :                                 PyErr_NoMemory();
    8165           0 :                                 return -1;
    8166             :                         }
    8167           0 :                         object->Commands[Commands_cntr_0] = *(struct dcerpc_rts_cmd *)pytalloc_get_ptr(PyList_GET_ITEM(value, Commands_cntr_0));
    8168             :                 }
    8169             :         }
    8170           0 :         return 0;
    8171             : }
    8172             : 
    8173             : static PyGetSetDef py_dcerpc_rts_getsetters[] = {
    8174             :         {
    8175             :                 .name = discard_const_p(char, "Flags"),
    8176             :                 .get = py_dcerpc_rts_get_Flags,
    8177             :                 .set = py_dcerpc_rts_set_Flags,
    8178             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dcerpc_rts_flags")
    8179             :         },
    8180             :         {
    8181             :                 .name = discard_const_p(char, "NumberOfCommands"),
    8182             :                 .get = py_dcerpc_rts_get_NumberOfCommands,
    8183             :                 .set = py_dcerpc_rts_set_NumberOfCommands,
    8184             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    8185             :         },
    8186             :         {
    8187             :                 .name = discard_const_p(char, "Commands"),
    8188             :                 .get = py_dcerpc_rts_get_Commands,
    8189             :                 .set = py_dcerpc_rts_set_Commands,
    8190             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dcerpc_rts_cmd")
    8191             :         },
    8192             :         { .name = NULL }
    8193             : };
    8194             : 
    8195           0 : static PyObject *py_dcerpc_rts_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    8196             : {
    8197           0 :         return pytalloc_new(struct dcerpc_rts, type);
    8198             : }
    8199             : 
    8200           0 : static PyObject *py_dcerpc_rts_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    8201             : {
    8202           0 :         struct dcerpc_rts *object = (struct dcerpc_rts *)pytalloc_get_ptr(py_obj);
    8203           0 :         PyObject *ret = NULL;
    8204             :         DATA_BLOB blob;
    8205             :         enum ndr_err_code err;
    8206           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    8207           0 :         if (tmp_ctx == NULL) {
    8208           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    8209           0 :                 return NULL;
    8210             :         }
    8211           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_dcerpc_rts);
    8212           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    8213           0 :                 TALLOC_FREE(tmp_ctx);
    8214           0 :                 PyErr_SetNdrError(err);
    8215           0 :                 return NULL;
    8216             :         }
    8217             : 
    8218           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    8219           0 :         TALLOC_FREE(tmp_ctx);
    8220           0 :         return ret;
    8221             : }
    8222             : 
    8223           0 : static PyObject *py_dcerpc_rts_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    8224             : {
    8225           0 :         struct dcerpc_rts *object = (struct dcerpc_rts *)pytalloc_get_ptr(py_obj);
    8226           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    8227           0 :         Py_ssize_t blob_length = 0;
    8228             :         enum ndr_err_code err;
    8229           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    8230           0 :         PyObject *allow_remaining_obj = NULL;
    8231           0 :         bool allow_remaining = false;
    8232             : 
    8233           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    8234             :                 discard_const_p(char *, kwnames),
    8235             :                 &blob.data, &blob_length,
    8236             :                 &allow_remaining_obj)) {
    8237           0 :                 return NULL;
    8238             :         }
    8239           0 :         blob.length = blob_length;
    8240             : 
    8241           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    8242           0 :                 allow_remaining = true;
    8243             :         }
    8244             : 
    8245           0 :         if (allow_remaining) {
    8246           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_rts);
    8247             :         } else {
    8248           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_rts);
    8249             :         }
    8250           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    8251           0 :                 PyErr_SetNdrError(err);
    8252           0 :                 return NULL;
    8253             :         }
    8254             : 
    8255           0 :         Py_RETURN_NONE;
    8256             : }
    8257             : 
    8258           0 : static PyObject *py_dcerpc_rts_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    8259             : {
    8260           0 :         struct dcerpc_rts *object = (struct dcerpc_rts *)pytalloc_get_ptr(py_obj);
    8261             :         PyObject *ret;
    8262             :         char *retstr;
    8263             : 
    8264           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_dcerpc_rts, "dcerpc_rts", object);
    8265           0 :         ret = PyUnicode_FromString(retstr);
    8266           0 :         talloc_free(retstr);
    8267             : 
    8268           0 :         return ret;
    8269             : }
    8270             : 
    8271             : static PyMethodDef py_dcerpc_rts_methods[] = {
    8272             :         { "__ndr_pack__", (PyCFunction)py_dcerpc_rts_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    8273             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_rts_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    8274             :         { "__ndr_print__", (PyCFunction)py_dcerpc_rts_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    8275             :         { NULL, NULL, 0, NULL }
    8276             : };
    8277             : 
    8278             : 
    8279             : static PyTypeObject dcerpc_rts_Type = {
    8280             :         PyVarObject_HEAD_INIT(NULL, 0)
    8281             :         .tp_name = "dcerpc.rts",
    8282             :         .tp_getset = py_dcerpc_rts_getsetters,
    8283             :         .tp_methods = py_dcerpc_rts_methods,
    8284             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    8285             :         .tp_new = py_dcerpc_rts_new,
    8286             : };
    8287             : 
    8288       29620 : static PyObject *py_import_dcerpc_payload(TALLOC_CTX *mem_ctx, int level, union dcerpc_payload *in)
    8289             : {
    8290             :         PyObject *ret;
    8291             : 
    8292       29620 :         switch (level) {
    8293        1348 :                 case DCERPC_PKT_REQUEST:
    8294        1348 :                         ret = pytalloc_reference_ex(&dcerpc_request_Type, mem_ctx, &in->request);
    8295        1348 :                         return ret;
    8296             : 
    8297           0 :                 case DCERPC_PKT_PING:
    8298           0 :                         ret = pytalloc_reference_ex(&dcerpc_ping_Type, mem_ctx, &in->ping);
    8299           0 :                         return ret;
    8300             : 
    8301        5490 :                 case DCERPC_PKT_RESPONSE:
    8302        5490 :                         ret = pytalloc_reference_ex(&dcerpc_response_Type, mem_ctx, &in->response);
    8303        5490 :                         return ret;
    8304             : 
    8305        2500 :                 case DCERPC_PKT_FAULT:
    8306        2500 :                         ret = pytalloc_reference_ex(&dcerpc_fault_Type, mem_ctx, &in->fault);
    8307        2500 :                         return ret;
    8308             : 
    8309           0 :                 case DCERPC_PKT_WORKING:
    8310           0 :                         ret = pytalloc_reference_ex(&dcerpc_working_Type, mem_ctx, &in->working);
    8311           0 :                         return ret;
    8312             : 
    8313           0 :                 case DCERPC_PKT_NOCALL:
    8314           0 :                         ret = pytalloc_reference_ex(&dcerpc_fack_Type, mem_ctx, &in->nocall);
    8315           0 :                         return ret;
    8316             : 
    8317           0 :                 case DCERPC_PKT_REJECT:
    8318           0 :                         ret = pytalloc_reference_ex(&dcerpc_fault_Type, mem_ctx, &in->reject);
    8319           0 :                         return ret;
    8320             : 
    8321           0 :                 case DCERPC_PKT_ACK:
    8322           0 :                         ret = pytalloc_reference_ex(&dcerpc_ack_Type, mem_ctx, &in->ack);
    8323           0 :                         return ret;
    8324             : 
    8325           0 :                 case DCERPC_PKT_CL_CANCEL:
    8326           0 :                         ret = pytalloc_reference_ex(&dcerpc_cl_cancel_Type, mem_ctx, &in->cl_cancel);
    8327           0 :                         return ret;
    8328             : 
    8329           0 :                 case DCERPC_PKT_FACK:
    8330           0 :                         ret = pytalloc_reference_ex(&dcerpc_fack_Type, mem_ctx, &in->fack);
    8331           0 :                         return ret;
    8332             : 
    8333           0 :                 case DCERPC_PKT_CANCEL_ACK:
    8334           0 :                         ret = pytalloc_reference_ex(&dcerpc_cancel_ack_Type, mem_ctx, &in->cancel_ack);
    8335           0 :                         return ret;
    8336             : 
    8337        1241 :                 case DCERPC_PKT_BIND:
    8338        1241 :                         ret = pytalloc_reference_ex(&dcerpc_bind_Type, mem_ctx, &in->bind);
    8339        1241 :                         return ret;
    8340             : 
    8341        7674 :                 case DCERPC_PKT_BIND_ACK:
    8342        7674 :                         ret = pytalloc_reference_ex(&dcerpc_bind_ack_Type, mem_ctx, &in->bind_ack);
    8343        7674 :                         return ret;
    8344             : 
    8345         435 :                 case DCERPC_PKT_BIND_NAK:
    8346         435 :                         ret = pytalloc_reference_ex(&dcerpc_bind_nak_Type, mem_ctx, &in->bind_nak);
    8347         435 :                         return ret;
    8348             : 
    8349        1359 :                 case DCERPC_PKT_ALTER:
    8350        1359 :                         ret = pytalloc_reference_ex(&dcerpc_bind_Type, mem_ctx, &in->alter);
    8351        1359 :                         return ret;
    8352             : 
    8353        9573 :                 case DCERPC_PKT_ALTER_RESP:
    8354        9573 :                         ret = pytalloc_reference_ex(&dcerpc_bind_ack_Type, mem_ctx, &in->alter_resp);
    8355        9573 :                         return ret;
    8356             : 
    8357           0 :                 case DCERPC_PKT_SHUTDOWN:
    8358           0 :                         ret = pytalloc_reference_ex(&dcerpc_shutdown_Type, mem_ctx, &in->shutdown);
    8359           0 :                         return ret;
    8360             : 
    8361           0 :                 case DCERPC_PKT_CO_CANCEL:
    8362           0 :                         ret = pytalloc_reference_ex(&dcerpc_co_cancel_Type, mem_ctx, &in->co_cancel);
    8363           0 :                         return ret;
    8364             : 
    8365           0 :                 case DCERPC_PKT_ORPHANED:
    8366           0 :                         ret = pytalloc_reference_ex(&dcerpc_orphaned_Type, mem_ctx, &in->orphaned);
    8367           0 :                         return ret;
    8368             : 
    8369           0 :                 case DCERPC_PKT_AUTH3:
    8370           0 :                         ret = pytalloc_reference_ex(&dcerpc_auth3_Type, mem_ctx, &in->auth3);
    8371           0 :                         return ret;
    8372             : 
    8373           0 :                 case DCERPC_PKT_RTS:
    8374           0 :                         ret = pytalloc_reference_ex(&dcerpc_rts_Type, mem_ctx, &in->rts);
    8375           0 :                         return ret;
    8376             : 
    8377             :         }
    8378           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
    8379           0 :         return NULL;
    8380             : }
    8381             : 
    8382        5571 : static union dcerpc_payload *py_export_dcerpc_payload(TALLOC_CTX *mem_ctx, int level, PyObject *in)
    8383             : {
    8384        5571 :         union dcerpc_payload *ret = talloc_zero(mem_ctx, union dcerpc_payload);
    8385        5571 :         switch (level) {
    8386        4193 :                 case DCERPC_PKT_REQUEST:
    8387        4193 :                         if (in == NULL) {
    8388           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->request");
    8389           0 :                                 talloc_free(ret); return NULL;
    8390             :                         }
    8391        4193 :                         PY_CHECK_TYPE(&dcerpc_request_Type, in, talloc_free(ret); return NULL;);
    8392        4193 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    8393           0 :                                 PyErr_NoMemory();
    8394           0 :                                 talloc_free(ret); return NULL;
    8395             :                         }
    8396        4193 :                         ret->request = *(struct dcerpc_request *)pytalloc_get_ptr(in);
    8397        4193 :                         break;
    8398             : 
    8399           0 :                 case DCERPC_PKT_PING:
    8400           0 :                         if (in == NULL) {
    8401           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ping");
    8402           0 :                                 talloc_free(ret); return NULL;
    8403             :                         }
    8404           0 :                         PY_CHECK_TYPE(&dcerpc_ping_Type, in, talloc_free(ret); return NULL;);
    8405           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    8406           0 :                                 PyErr_NoMemory();
    8407           0 :                                 talloc_free(ret); return NULL;
    8408             :                         }
    8409           0 :                         ret->ping = *(struct dcerpc_ping *)pytalloc_get_ptr(in);
    8410           0 :                         break;
    8411             : 
    8412           0 :                 case DCERPC_PKT_RESPONSE:
    8413           0 :                         if (in == NULL) {
    8414           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->response");
    8415           0 :                                 talloc_free(ret); return NULL;
    8416             :                         }
    8417           0 :                         PY_CHECK_TYPE(&dcerpc_response_Type, in, talloc_free(ret); return NULL;);
    8418           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    8419           0 :                                 PyErr_NoMemory();
    8420           0 :                                 talloc_free(ret); return NULL;
    8421             :                         }
    8422           0 :                         ret->response = *(struct dcerpc_response *)pytalloc_get_ptr(in);
    8423           0 :                         break;
    8424             : 
    8425           0 :                 case DCERPC_PKT_FAULT:
    8426           0 :                         if (in == NULL) {
    8427           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->fault");
    8428           0 :                                 talloc_free(ret); return NULL;
    8429             :                         }
    8430           0 :                         PY_CHECK_TYPE(&dcerpc_fault_Type, in, talloc_free(ret); return NULL;);
    8431           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    8432           0 :                                 PyErr_NoMemory();
    8433           0 :                                 talloc_free(ret); return NULL;
    8434             :                         }
    8435           0 :                         ret->fault = *(struct dcerpc_fault *)pytalloc_get_ptr(in);
    8436           0 :                         break;
    8437             : 
    8438           0 :                 case DCERPC_PKT_WORKING:
    8439           0 :                         if (in == NULL) {
    8440           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->working");
    8441           0 :                                 talloc_free(ret); return NULL;
    8442             :                         }
    8443           0 :                         PY_CHECK_TYPE(&dcerpc_working_Type, in, talloc_free(ret); return NULL;);
    8444           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    8445           0 :                                 PyErr_NoMemory();
    8446           0 :                                 talloc_free(ret); return NULL;
    8447             :                         }
    8448           0 :                         ret->working = *(struct dcerpc_working *)pytalloc_get_ptr(in);
    8449           0 :                         break;
    8450             : 
    8451           0 :                 case DCERPC_PKT_NOCALL:
    8452           0 :                         if (in == NULL) {
    8453           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->nocall");
    8454           0 :                                 talloc_free(ret); return NULL;
    8455             :                         }
    8456           0 :                         PY_CHECK_TYPE(&dcerpc_fack_Type, in, talloc_free(ret); return NULL;);
    8457           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    8458           0 :                                 PyErr_NoMemory();
    8459           0 :                                 talloc_free(ret); return NULL;
    8460             :                         }
    8461           0 :                         ret->nocall = *(struct dcerpc_fack *)pytalloc_get_ptr(in);
    8462           0 :                         break;
    8463             : 
    8464           0 :                 case DCERPC_PKT_REJECT:
    8465           0 :                         if (in == NULL) {
    8466           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->reject");
    8467           0 :                                 talloc_free(ret); return NULL;
    8468             :                         }
    8469           0 :                         PY_CHECK_TYPE(&dcerpc_fault_Type, in, talloc_free(ret); return NULL;);
    8470           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    8471           0 :                                 PyErr_NoMemory();
    8472           0 :                                 talloc_free(ret); return NULL;
    8473             :                         }
    8474           0 :                         ret->reject = *(struct dcerpc_fault *)pytalloc_get_ptr(in);
    8475           0 :                         break;
    8476             : 
    8477           0 :                 case DCERPC_PKT_ACK:
    8478           0 :                         if (in == NULL) {
    8479           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ack");
    8480           0 :                                 talloc_free(ret); return NULL;
    8481             :                         }
    8482           0 :                         PY_CHECK_TYPE(&dcerpc_ack_Type, in, talloc_free(ret); return NULL;);
    8483           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    8484           0 :                                 PyErr_NoMemory();
    8485           0 :                                 talloc_free(ret); return NULL;
    8486             :                         }
    8487           0 :                         ret->ack = *(struct dcerpc_ack *)pytalloc_get_ptr(in);
    8488           0 :                         break;
    8489             : 
    8490           0 :                 case DCERPC_PKT_CL_CANCEL:
    8491           0 :                         if (in == NULL) {
    8492           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->cl_cancel");
    8493           0 :                                 talloc_free(ret); return NULL;
    8494             :                         }
    8495           0 :                         PY_CHECK_TYPE(&dcerpc_cl_cancel_Type, in, talloc_free(ret); return NULL;);
    8496           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    8497           0 :                                 PyErr_NoMemory();
    8498           0 :                                 talloc_free(ret); return NULL;
    8499             :                         }
    8500           0 :                         ret->cl_cancel = *(struct dcerpc_cl_cancel *)pytalloc_get_ptr(in);
    8501           0 :                         break;
    8502             : 
    8503           0 :                 case DCERPC_PKT_FACK:
    8504           0 :                         if (in == NULL) {
    8505           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->fack");
    8506           0 :                                 talloc_free(ret); return NULL;
    8507             :                         }
    8508           0 :                         PY_CHECK_TYPE(&dcerpc_fack_Type, in, talloc_free(ret); return NULL;);
    8509           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    8510           0 :                                 PyErr_NoMemory();
    8511           0 :                                 talloc_free(ret); return NULL;
    8512             :                         }
    8513           0 :                         ret->fack = *(struct dcerpc_fack *)pytalloc_get_ptr(in);
    8514           0 :                         break;
    8515             : 
    8516           0 :                 case DCERPC_PKT_CANCEL_ACK:
    8517           0 :                         if (in == NULL) {
    8518           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->cancel_ack");
    8519           0 :                                 talloc_free(ret); return NULL;
    8520             :                         }
    8521           0 :                         PY_CHECK_TYPE(&dcerpc_cancel_ack_Type, in, talloc_free(ret); return NULL;);
    8522           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    8523           0 :                                 PyErr_NoMemory();
    8524           0 :                                 talloc_free(ret); return NULL;
    8525             :                         }
    8526           0 :                         ret->cancel_ack = *(struct dcerpc_cancel_ack *)pytalloc_get_ptr(in);
    8527           0 :                         break;
    8528             : 
    8529         634 :                 case DCERPC_PKT_BIND:
    8530         634 :                         if (in == NULL) {
    8531           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->bind");
    8532           0 :                                 talloc_free(ret); return NULL;
    8533             :                         }
    8534         634 :                         PY_CHECK_TYPE(&dcerpc_bind_Type, in, talloc_free(ret); return NULL;);
    8535         634 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    8536           0 :                                 PyErr_NoMemory();
    8537           0 :                                 talloc_free(ret); return NULL;
    8538             :                         }
    8539         634 :                         ret->bind = *(struct dcerpc_bind *)pytalloc_get_ptr(in);
    8540         634 :                         break;
    8541             : 
    8542           0 :                 case DCERPC_PKT_BIND_ACK:
    8543           0 :                         if (in == NULL) {
    8544           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->bind_ack");
    8545           0 :                                 talloc_free(ret); return NULL;
    8546             :                         }
    8547           0 :                         PY_CHECK_TYPE(&dcerpc_bind_ack_Type, in, talloc_free(ret); return NULL;);
    8548           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    8549           0 :                                 PyErr_NoMemory();
    8550           0 :                                 talloc_free(ret); return NULL;
    8551             :                         }
    8552           0 :                         ret->bind_ack = *(struct dcerpc_bind_ack *)pytalloc_get_ptr(in);
    8553           0 :                         break;
    8554             : 
    8555           0 :                 case DCERPC_PKT_BIND_NAK:
    8556           0 :                         if (in == NULL) {
    8557           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->bind_nak");
    8558           0 :                                 talloc_free(ret); return NULL;
    8559             :                         }
    8560           0 :                         PY_CHECK_TYPE(&dcerpc_bind_nak_Type, in, talloc_free(ret); return NULL;);
    8561           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    8562           0 :                                 PyErr_NoMemory();
    8563           0 :                                 talloc_free(ret); return NULL;
    8564             :                         }
    8565           0 :                         ret->bind_nak = *(struct dcerpc_bind_nak *)pytalloc_get_ptr(in);
    8566           0 :                         break;
    8567             : 
    8568         708 :                 case DCERPC_PKT_ALTER:
    8569         708 :                         if (in == NULL) {
    8570           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->alter");
    8571           0 :                                 talloc_free(ret); return NULL;
    8572             :                         }
    8573         708 :                         PY_CHECK_TYPE(&dcerpc_bind_Type, in, talloc_free(ret); return NULL;);
    8574         708 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    8575           0 :                                 PyErr_NoMemory();
    8576           0 :                                 talloc_free(ret); return NULL;
    8577             :                         }
    8578         708 :                         ret->alter = *(struct dcerpc_bind *)pytalloc_get_ptr(in);
    8579         708 :                         break;
    8580             : 
    8581           0 :                 case DCERPC_PKT_ALTER_RESP:
    8582           0 :                         if (in == NULL) {
    8583           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->alter_resp");
    8584           0 :                                 talloc_free(ret); return NULL;
    8585             :                         }
    8586           0 :                         PY_CHECK_TYPE(&dcerpc_bind_ack_Type, in, talloc_free(ret); return NULL;);
    8587           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    8588           0 :                                 PyErr_NoMemory();
    8589           0 :                                 talloc_free(ret); return NULL;
    8590             :                         }
    8591           0 :                         ret->alter_resp = *(struct dcerpc_bind_ack *)pytalloc_get_ptr(in);
    8592           0 :                         break;
    8593             : 
    8594           0 :                 case DCERPC_PKT_SHUTDOWN:
    8595           0 :                         if (in == NULL) {
    8596           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->shutdown");
    8597           0 :                                 talloc_free(ret); return NULL;
    8598             :                         }
    8599           0 :                         PY_CHECK_TYPE(&dcerpc_shutdown_Type, in, talloc_free(ret); return NULL;);
    8600           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    8601           0 :                                 PyErr_NoMemory();
    8602           0 :                                 talloc_free(ret); return NULL;
    8603             :                         }
    8604           0 :                         ret->shutdown = *(struct dcerpc_shutdown *)pytalloc_get_ptr(in);
    8605           0 :                         break;
    8606             : 
    8607           6 :                 case DCERPC_PKT_CO_CANCEL:
    8608           6 :                         if (in == NULL) {
    8609           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->co_cancel");
    8610           0 :                                 talloc_free(ret); return NULL;
    8611             :                         }
    8612           6 :                         PY_CHECK_TYPE(&dcerpc_co_cancel_Type, in, talloc_free(ret); return NULL;);
    8613           6 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    8614           0 :                                 PyErr_NoMemory();
    8615           0 :                                 talloc_free(ret); return NULL;
    8616             :                         }
    8617           6 :                         ret->co_cancel = *(struct dcerpc_co_cancel *)pytalloc_get_ptr(in);
    8618           6 :                         break;
    8619             : 
    8620          15 :                 case DCERPC_PKT_ORPHANED:
    8621          15 :                         if (in == NULL) {
    8622           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->orphaned");
    8623           0 :                                 talloc_free(ret); return NULL;
    8624             :                         }
    8625          15 :                         PY_CHECK_TYPE(&dcerpc_orphaned_Type, in, talloc_free(ret); return NULL;);
    8626          15 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    8627           0 :                                 PyErr_NoMemory();
    8628           0 :                                 talloc_free(ret); return NULL;
    8629             :                         }
    8630          15 :                         ret->orphaned = *(struct dcerpc_orphaned *)pytalloc_get_ptr(in);
    8631          15 :                         break;
    8632             : 
    8633          15 :                 case DCERPC_PKT_AUTH3:
    8634          15 :                         if (in == NULL) {
    8635           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->auth3");
    8636           0 :                                 talloc_free(ret); return NULL;
    8637             :                         }
    8638          15 :                         PY_CHECK_TYPE(&dcerpc_auth3_Type, in, talloc_free(ret); return NULL;);
    8639          15 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    8640           0 :                                 PyErr_NoMemory();
    8641           0 :                                 talloc_free(ret); return NULL;
    8642             :                         }
    8643          15 :                         ret->auth3 = *(struct dcerpc_auth3 *)pytalloc_get_ptr(in);
    8644          15 :                         break;
    8645             : 
    8646           0 :                 case DCERPC_PKT_RTS:
    8647           0 :                         if (in == NULL) {
    8648           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->rts");
    8649           0 :                                 talloc_free(ret); return NULL;
    8650             :                         }
    8651           0 :                         PY_CHECK_TYPE(&dcerpc_rts_Type, in, talloc_free(ret); return NULL;);
    8652           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    8653           0 :                                 PyErr_NoMemory();
    8654           0 :                                 talloc_free(ret); return NULL;
    8655             :                         }
    8656           0 :                         ret->rts = *(struct dcerpc_rts *)pytalloc_get_ptr(in);
    8657           0 :                         break;
    8658             : 
    8659           0 :                 default:
    8660           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
    8661           0 :                         talloc_free(ret);
    8662           0 :                         ret = NULL;
    8663             :         }
    8664             : 
    8665        5571 :         return ret;
    8666             : }
    8667             : 
    8668       29620 : static PyObject *py_dcerpc_payload_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    8669             : {
    8670       29620 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    8671       29620 :         PyObject *mem_ctx_obj = NULL;
    8672       29620 :         TALLOC_CTX *mem_ctx = NULL;
    8673       29620 :         int level = 0;
    8674       29620 :         PyObject *in_obj = NULL;
    8675       29620 :         union dcerpc_payload *in = NULL;
    8676             : 
    8677       29620 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
    8678             :                 discard_const_p(char *, kwnames),
    8679             :                 &mem_ctx_obj,
    8680             :                 &level,
    8681             :                 &in_obj)) {
    8682           0 :                 return NULL;
    8683             :         }
    8684       29620 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    8685       29620 :         if (mem_ctx == NULL) {
    8686           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    8687           0 :                 return NULL;
    8688             :         }
    8689       29620 :         in = (union dcerpc_payload *)pytalloc_get_ptr(in_obj);
    8690       29620 :         if (in == NULL) {
    8691           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union dcerpc_payload!");
    8692           0 :                 return NULL;
    8693             :         }
    8694             : 
    8695       29620 :         return py_import_dcerpc_payload(mem_ctx, level, in);
    8696             : }
    8697             : 
    8698        5571 : static PyObject *py_dcerpc_payload_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    8699             : {
    8700        5571 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    8701        5571 :         PyObject *mem_ctx_obj = NULL;
    8702        5571 :         TALLOC_CTX *mem_ctx = NULL;
    8703        5571 :         int level = 0;
    8704        5571 :         PyObject *in = NULL;
    8705        5571 :         union dcerpc_payload *out = NULL;
    8706             : 
    8707        5571 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
    8708             :                 discard_const_p(char *, kwnames),
    8709             :                 &mem_ctx_obj,
    8710             :                 &level,
    8711             :                 &in)) {
    8712           0 :                 return NULL;
    8713             :         }
    8714        5571 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    8715        5571 :         if (mem_ctx == NULL) {
    8716           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    8717           0 :                 return NULL;
    8718             :         }
    8719             : 
    8720        5571 :         out = py_export_dcerpc_payload(mem_ctx, level, in);
    8721        5571 :         if (out == NULL) {
    8722           0 :                 return NULL;
    8723             :         }
    8724             : 
    8725        5571 :         return pytalloc_GenericObject_reference(out);
    8726             : }
    8727             : 
    8728             : static PyMethodDef py_dcerpc_payload_methods[] = {
    8729             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_payload_import),
    8730             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    8731             :                 "T.__import__(mem_ctx, level, in) => ret." },
    8732             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_payload_export),
    8733             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    8734             :                 "T.__export__(mem_ctx, level, in) => ret." },
    8735             :         { NULL, NULL, 0, NULL }
    8736             : };
    8737             : 
    8738           0 : static PyObject *py_dcerpc_payload_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    8739             : {
    8740           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
    8741           0 :         return NULL;
    8742             : }
    8743             : 
    8744             : 
    8745             : static PyTypeObject dcerpc_payload_Type = {
    8746             :         PyVarObject_HEAD_INIT(NULL, 0)
    8747             :         .tp_name = "dcerpc.payload",
    8748             :         .tp_getset = NULL,
    8749             :         .tp_methods = py_dcerpc_payload_methods,
    8750             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    8751             :         .tp_new = py_dcerpc_payload_new,
    8752             : };
    8753             : 
    8754             : 
    8755        2447 : static PyObject *py_ncacn_packet_get_rpc_vers(PyObject *obj, void *closure)
    8756             : {
    8757        2447 :         struct ncacn_packet *object = (struct ncacn_packet *)pytalloc_get_ptr(obj);
    8758             :         PyObject *py_rpc_vers;
    8759        2447 :         py_rpc_vers = PyLong_FromLong((uint16_t)object->rpc_vers);
    8760        2447 :         return py_rpc_vers;
    8761             : }
    8762             : 
    8763        5571 : static int py_ncacn_packet_set_rpc_vers(PyObject *py_obj, PyObject *value, void *closure)
    8764             : {
    8765        5571 :         struct ncacn_packet *object = (struct ncacn_packet *)pytalloc_get_ptr(py_obj);
    8766        5571 :         if (value == NULL) {
    8767           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->rpc_vers");
    8768           0 :                 return -1;
    8769             :         }
    8770             :         {
    8771        5571 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rpc_vers));
    8772        5571 :                 if (PyLong_Check(value)) {
    8773             :                         unsigned long long test_var;
    8774        5571 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8775        5571 :                         if (PyErr_Occurred() != NULL) {
    8776           0 :                                 return -1;
    8777             :                         }
    8778        5571 :                         if (test_var > uint_max) {
    8779           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8780             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8781           0 :                                 return -1;
    8782             :                         }
    8783        5571 :                         object->rpc_vers = test_var;
    8784             :                 } else {
    8785           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8786             :                           PyLong_Type.tp_name);
    8787           0 :                         return -1;
    8788             :                 }
    8789             :         }
    8790        5571 :         return 0;
    8791             : }
    8792             : 
    8793        2447 : static PyObject *py_ncacn_packet_get_rpc_vers_minor(PyObject *obj, void *closure)
    8794             : {
    8795        2447 :         struct ncacn_packet *object = (struct ncacn_packet *)pytalloc_get_ptr(obj);
    8796             :         PyObject *py_rpc_vers_minor;
    8797        2447 :         py_rpc_vers_minor = PyLong_FromLong((uint16_t)object->rpc_vers_minor);
    8798        2447 :         return py_rpc_vers_minor;
    8799             : }
    8800             : 
    8801        5571 : static int py_ncacn_packet_set_rpc_vers_minor(PyObject *py_obj, PyObject *value, void *closure)
    8802             : {
    8803        5571 :         struct ncacn_packet *object = (struct ncacn_packet *)pytalloc_get_ptr(py_obj);
    8804        5571 :         if (value == NULL) {
    8805           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->rpc_vers_minor");
    8806           0 :                 return -1;
    8807             :         }
    8808             :         {
    8809        5571 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rpc_vers_minor));
    8810        5571 :                 if (PyLong_Check(value)) {
    8811             :                         unsigned long long test_var;
    8812        5571 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8813        5571 :                         if (PyErr_Occurred() != NULL) {
    8814           0 :                                 return -1;
    8815             :                         }
    8816        5571 :                         if (test_var > uint_max) {
    8817           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8818             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8819           0 :                                 return -1;
    8820             :                         }
    8821        5571 :                         object->rpc_vers_minor = test_var;
    8822             :                 } else {
    8823           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8824             :                           PyLong_Type.tp_name);
    8825           0 :                         return -1;
    8826             :                 }
    8827             :         }
    8828        5571 :         return 0;
    8829             : }
    8830             : 
    8831        2375 : static PyObject *py_ncacn_packet_get_ptype(PyObject *obj, void *closure)
    8832             : {
    8833        2375 :         struct ncacn_packet *object = (struct ncacn_packet *)pytalloc_get_ptr(obj);
    8834             :         PyObject *py_ptype;
    8835        2375 :         py_ptype = PyLong_FromLong((uint16_t)object->ptype);
    8836        2375 :         return py_ptype;
    8837             : }
    8838             : 
    8839        5571 : static int py_ncacn_packet_set_ptype(PyObject *py_obj, PyObject *value, void *closure)
    8840             : {
    8841        5571 :         struct ncacn_packet *object = (struct ncacn_packet *)pytalloc_get_ptr(py_obj);
    8842        5571 :         if (value == NULL) {
    8843           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ptype");
    8844           0 :                 return -1;
    8845             :         }
    8846             :         {
    8847        5571 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ptype));
    8848        5571 :                 if (PyLong_Check(value)) {
    8849             :                         unsigned long long test_var;
    8850        5571 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8851        5571 :                         if (PyErr_Occurred() != NULL) {
    8852           0 :                                 return -1;
    8853             :                         }
    8854        5571 :                         if (test_var > uint_max) {
    8855           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8856             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8857           0 :                                 return -1;
    8858             :                         }
    8859        5571 :                         object->ptype = test_var;
    8860             :                 } else {
    8861           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8862             :                           PyLong_Type.tp_name);
    8863           0 :                         return -1;
    8864             :                 }
    8865             :         }
    8866        5571 :         return 0;
    8867             : }
    8868             : 
    8869        3035 : static PyObject *py_ncacn_packet_get_pfc_flags(PyObject *obj, void *closure)
    8870             : {
    8871        3035 :         struct ncacn_packet *object = (struct ncacn_packet *)pytalloc_get_ptr(obj);
    8872             :         PyObject *py_pfc_flags;
    8873        3035 :         py_pfc_flags = PyLong_FromLong((uint16_t)object->pfc_flags);
    8874        3035 :         return py_pfc_flags;
    8875             : }
    8876             : 
    8877        5571 : static int py_ncacn_packet_set_pfc_flags(PyObject *py_obj, PyObject *value, void *closure)
    8878             : {
    8879        5571 :         struct ncacn_packet *object = (struct ncacn_packet *)pytalloc_get_ptr(py_obj);
    8880        5571 :         if (value == NULL) {
    8881           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pfc_flags");
    8882           0 :                 return -1;
    8883             :         }
    8884             :         {
    8885        5571 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->pfc_flags));
    8886        5571 :                 if (PyLong_Check(value)) {
    8887             :                         unsigned long long test_var;
    8888        5571 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8889        5571 :                         if (PyErr_Occurred() != NULL) {
    8890           0 :                                 return -1;
    8891             :                         }
    8892        5571 :                         if (test_var > uint_max) {
    8893           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8894             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8895           0 :                                 return -1;
    8896             :                         }
    8897        5571 :                         object->pfc_flags = test_var;
    8898             :                 } else {
    8899           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8900             :                           PyLong_Type.tp_name);
    8901           0 :                         return -1;
    8902             :                 }
    8903             :         }
    8904        5571 :         return 0;
    8905             : }
    8906             : 
    8907        2372 : static PyObject *py_ncacn_packet_get_drep(PyObject *obj, void *closure)
    8908             : {
    8909        2372 :         struct ncacn_packet *object = (struct ncacn_packet *)pytalloc_get_ptr(obj);
    8910             :         PyObject *py_drep;
    8911        2372 :         py_drep = PyList_New(4);
    8912        2372 :         if (py_drep == NULL) {
    8913           0 :                 return NULL;
    8914             :         }
    8915             :         {
    8916             :                 int drep_cntr_0;
    8917       11860 :                 for (drep_cntr_0 = 0; drep_cntr_0 < (4); drep_cntr_0++) {
    8918             :                         PyObject *py_drep_0;
    8919        9488 :                         py_drep_0 = PyLong_FromLong((uint16_t)object->drep[drep_cntr_0]);
    8920        9488 :                         PyList_SetItem(py_drep, drep_cntr_0, py_drep_0);
    8921             :                 }
    8922             :         }
    8923        2372 :         return py_drep;
    8924             : }
    8925             : 
    8926        5571 : static int py_ncacn_packet_set_drep(PyObject *py_obj, PyObject *value, void *closure)
    8927             : {
    8928        5571 :         struct ncacn_packet *object = (struct ncacn_packet *)pytalloc_get_ptr(py_obj);
    8929        5571 :         if (value == NULL) {
    8930           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->drep");
    8931           0 :                 return -1;
    8932             :         }
    8933        5571 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    8934             :         {
    8935             :                 int drep_cntr_0;
    8936        5571 :                 if (ARRAY_SIZE(object->drep) != PyList_GET_SIZE(value)) {
    8937           0 :                         PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->drep),  PyList_GET_SIZE(value));
    8938           0 :                         return -1;
    8939             :                 }
    8940       27855 :                 for (drep_cntr_0 = 0; drep_cntr_0 < PyList_GET_SIZE(value); drep_cntr_0++) {
    8941       22284 :                         if (PyList_GET_ITEM(value, drep_cntr_0) == NULL) {
    8942           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->drep[drep_cntr_0]");
    8943           0 :                                 return -1;
    8944             :                         }
    8945             :                         {
    8946       22284 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->drep[drep_cntr_0]));
    8947       22284 :                                 if (PyLong_Check(PyList_GET_ITEM(value, drep_cntr_0))) {
    8948             :                                         unsigned long long test_var;
    8949       22284 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, drep_cntr_0));
    8950       22284 :                                         if (PyErr_Occurred() != NULL) {
    8951           0 :                                                 return -1;
    8952             :                                         }
    8953       22284 :                                         if (test_var > uint_max) {
    8954           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8955             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    8956           0 :                                                 return -1;
    8957             :                                         }
    8958       22284 :                                         object->drep[drep_cntr_0] = test_var;
    8959             :                                 } else {
    8960           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8961             :                                           PyLong_Type.tp_name);
    8962           0 :                                         return -1;
    8963             :                                 }
    8964             :                         }
    8965             :                 }
    8966             :         }
    8967        5571 :         return 0;
    8968             : }
    8969             : 
    8970        4936 : static PyObject *py_ncacn_packet_get_frag_length(PyObject *obj, void *closure)
    8971             : {
    8972        4936 :         struct ncacn_packet *object = (struct ncacn_packet *)pytalloc_get_ptr(obj);
    8973             :         PyObject *py_frag_length;
    8974        4936 :         py_frag_length = PyLong_FromLong((uint16_t)object->frag_length);
    8975        4936 :         return py_frag_length;
    8976             : }
    8977             : 
    8978       11142 : static int py_ncacn_packet_set_frag_length(PyObject *py_obj, PyObject *value, void *closure)
    8979             : {
    8980       11142 :         struct ncacn_packet *object = (struct ncacn_packet *)pytalloc_get_ptr(py_obj);
    8981       11142 :         if (value == NULL) {
    8982           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->frag_length");
    8983           0 :                 return -1;
    8984             :         }
    8985             :         {
    8986       11142 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->frag_length));
    8987       11142 :                 if (PyLong_Check(value)) {
    8988             :                         unsigned long long test_var;
    8989       11142 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8990       11142 :                         if (PyErr_Occurred() != NULL) {
    8991           0 :                                 return -1;
    8992             :                         }
    8993       11142 :                         if (test_var > uint_max) {
    8994           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8995             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8996           0 :                                 return -1;
    8997             :                         }
    8998       11142 :                         object->frag_length = test_var;
    8999             :                 } else {
    9000           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9001             :                           PyLong_Type.tp_name);
    9002           0 :                         return -1;
    9003             :                 }
    9004             :         }
    9005       11142 :         return 0;
    9006             : }
    9007             : 
    9008        5535 : static PyObject *py_ncacn_packet_get_auth_length(PyObject *obj, void *closure)
    9009             : {
    9010        5535 :         struct ncacn_packet *object = (struct ncacn_packet *)pytalloc_get_ptr(obj);
    9011             :         PyObject *py_auth_length;
    9012        5535 :         py_auth_length = PyLong_FromLong((uint16_t)object->auth_length);
    9013        5535 :         return py_auth_length;
    9014             : }
    9015             : 
    9016        6264 : static int py_ncacn_packet_set_auth_length(PyObject *py_obj, PyObject *value, void *closure)
    9017             : {
    9018        6264 :         struct ncacn_packet *object = (struct ncacn_packet *)pytalloc_get_ptr(py_obj);
    9019        6264 :         if (value == NULL) {
    9020           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->auth_length");
    9021           0 :                 return -1;
    9022             :         }
    9023             :         {
    9024        6264 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->auth_length));
    9025        6264 :                 if (PyLong_Check(value)) {
    9026             :                         unsigned long long test_var;
    9027        6264 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9028        6264 :                         if (PyErr_Occurred() != NULL) {
    9029           0 :                                 return -1;
    9030             :                         }
    9031        6264 :                         if (test_var > uint_max) {
    9032           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9033             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9034           0 :                                 return -1;
    9035             :                         }
    9036        6264 :                         object->auth_length = test_var;
    9037             :                 } else {
    9038           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9039             :                           PyLong_Type.tp_name);
    9040           0 :                         return -1;
    9041             :                 }
    9042             :         }
    9043        6264 :         return 0;
    9044             : }
    9045             : 
    9046        4170 : static PyObject *py_ncacn_packet_get_call_id(PyObject *obj, void *closure)
    9047             : {
    9048        4170 :         struct ncacn_packet *object = (struct ncacn_packet *)pytalloc_get_ptr(obj);
    9049             :         PyObject *py_call_id;
    9050        4170 :         py_call_id = PyLong_FromUnsignedLongLong((uint32_t)object->call_id);
    9051        4170 :         return py_call_id;
    9052             : }
    9053             : 
    9054        5571 : static int py_ncacn_packet_set_call_id(PyObject *py_obj, PyObject *value, void *closure)
    9055             : {
    9056        5571 :         struct ncacn_packet *object = (struct ncacn_packet *)pytalloc_get_ptr(py_obj);
    9057        5571 :         if (value == NULL) {
    9058           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->call_id");
    9059           0 :                 return -1;
    9060             :         }
    9061             :         {
    9062        5571 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->call_id));
    9063        5571 :                 if (PyLong_Check(value)) {
    9064             :                         unsigned long long test_var;
    9065        5571 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9066        5571 :                         if (PyErr_Occurred() != NULL) {
    9067           0 :                                 return -1;
    9068             :                         }
    9069        5571 :                         if (test_var > uint_max) {
    9070           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9071             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9072           0 :                                 return -1;
    9073             :                         }
    9074        5571 :                         object->call_id = test_var;
    9075             :                 } else {
    9076           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9077             :                           PyLong_Type.tp_name);
    9078           0 :                         return -1;
    9079             :                 }
    9080             :         }
    9081        5571 :         return 0;
    9082             : }
    9083             : 
    9084       29620 : static PyObject *py_ncacn_packet_get_u(PyObject *obj, void *closure)
    9085             : {
    9086       29620 :         struct ncacn_packet *object = (struct ncacn_packet *)pytalloc_get_ptr(obj);
    9087             :         PyObject *py_u;
    9088       29620 :         py_u = pyrpc_import_union(&dcerpc_payload_Type, pytalloc_get_mem_ctx(obj), object->ptype, &object->u, "union dcerpc_payload");
    9089       29620 :         if (py_u == NULL) {
    9090           0 :                 return NULL;
    9091             :         }
    9092       29620 :         return py_u;
    9093             : }
    9094             : 
    9095        5571 : static int py_ncacn_packet_set_u(PyObject *py_obj, PyObject *value, void *closure)
    9096             : {
    9097        5571 :         struct ncacn_packet *object = (struct ncacn_packet *)pytalloc_get_ptr(py_obj);
    9098        5571 :         if (value == NULL) {
    9099           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->u");
    9100           0 :                 return -1;
    9101             :         }
    9102             :         {
    9103             :                 union dcerpc_payload *u_switch_0;
    9104        5571 :                 u_switch_0 = (union dcerpc_payload *)pyrpc_export_union(&dcerpc_payload_Type, pytalloc_get_mem_ctx(py_obj), object->ptype, value, "union dcerpc_payload");
    9105        5571 :                 if (u_switch_0 == NULL) {
    9106           0 :                         return -1;
    9107             :                 }
    9108        5571 :                 object->u = *u_switch_0;
    9109             :         }
    9110        5571 :         return 0;
    9111             : }
    9112             : 
    9113             : static PyGetSetDef py_ncacn_packet_getsetters[] = {
    9114             :         {
    9115             :                 .name = discard_const_p(char, "rpc_vers"),
    9116             :                 .get = py_ncacn_packet_get_rpc_vers,
    9117             :                 .set = py_ncacn_packet_set_rpc_vers,
    9118             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    9119             :         },
    9120             :         {
    9121             :                 .name = discard_const_p(char, "rpc_vers_minor"),
    9122             :                 .get = py_ncacn_packet_get_rpc_vers_minor,
    9123             :                 .set = py_ncacn_packet_set_rpc_vers_minor,
    9124             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    9125             :         },
    9126             :         {
    9127             :                 .name = discard_const_p(char, "ptype"),
    9128             :                 .get = py_ncacn_packet_get_ptype,
    9129             :                 .set = py_ncacn_packet_set_ptype,
    9130             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dcerpc_pkt_type")
    9131             :         },
    9132             :         {
    9133             :                 .name = discard_const_p(char, "pfc_flags"),
    9134             :                 .get = py_ncacn_packet_get_pfc_flags,
    9135             :                 .set = py_ncacn_packet_set_pfc_flags,
    9136             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dcerpc_pfc_flags")
    9137             :         },
    9138             :         {
    9139             :                 .name = discard_const_p(char, "drep"),
    9140             :                 .get = py_ncacn_packet_get_drep,
    9141             :                 .set = py_ncacn_packet_set_drep,
    9142             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    9143             :         },
    9144             :         {
    9145             :                 .name = discard_const_p(char, "frag_length"),
    9146             :                 .get = py_ncacn_packet_get_frag_length,
    9147             :                 .set = py_ncacn_packet_set_frag_length,
    9148             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    9149             :         },
    9150             :         {
    9151             :                 .name = discard_const_p(char, "auth_length"),
    9152             :                 .get = py_ncacn_packet_get_auth_length,
    9153             :                 .set = py_ncacn_packet_set_auth_length,
    9154             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    9155             :         },
    9156             :         {
    9157             :                 .name = discard_const_p(char, "call_id"),
    9158             :                 .get = py_ncacn_packet_get_call_id,
    9159             :                 .set = py_ncacn_packet_set_call_id,
    9160             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9161             :         },
    9162             :         {
    9163             :                 .name = discard_const_p(char, "u"),
    9164             :                 .get = py_ncacn_packet_get_u,
    9165             :                 .set = py_ncacn_packet_set_u,
    9166             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dcerpc_payload")
    9167             :         },
    9168             :         { .name = NULL }
    9169             : };
    9170             : 
    9171        7946 : static PyObject *py_ncacn_packet_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    9172             : {
    9173        7946 :         return pytalloc_new(struct ncacn_packet, type);
    9174             : }
    9175             : 
    9176       11466 : static PyObject *py_ncacn_packet_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    9177             : {
    9178       11466 :         struct ncacn_packet *object = (struct ncacn_packet *)pytalloc_get_ptr(py_obj);
    9179       11466 :         PyObject *ret = NULL;
    9180             :         DATA_BLOB blob;
    9181             :         enum ndr_err_code err;
    9182       11466 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    9183       11466 :         if (tmp_ctx == NULL) {
    9184           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    9185           0 :                 return NULL;
    9186             :         }
    9187       11466 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_ncacn_packet);
    9188       11466 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    9189           0 :                 TALLOC_FREE(tmp_ctx);
    9190           0 :                 PyErr_SetNdrError(err);
    9191           0 :                 return NULL;
    9192             :         }
    9193             : 
    9194       11466 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    9195       11466 :         TALLOC_FREE(tmp_ctx);
    9196       11466 :         return ret;
    9197             : }
    9198             : 
    9199        2375 : static PyObject *py_ncacn_packet_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    9200             : {
    9201        2375 :         struct ncacn_packet *object = (struct ncacn_packet *)pytalloc_get_ptr(py_obj);
    9202        2375 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    9203        2375 :         Py_ssize_t blob_length = 0;
    9204             :         enum ndr_err_code err;
    9205        2375 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    9206        2375 :         PyObject *allow_remaining_obj = NULL;
    9207        2375 :         bool allow_remaining = false;
    9208             : 
    9209        2375 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    9210             :                 discard_const_p(char *, kwnames),
    9211             :                 &blob.data, &blob_length,
    9212             :                 &allow_remaining_obj)) {
    9213           0 :                 return NULL;
    9214             :         }
    9215        2375 :         blob.length = blob_length;
    9216             : 
    9217        2375 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    9218        2375 :                 allow_remaining = true;
    9219             :         }
    9220             : 
    9221        2375 :         if (allow_remaining) {
    9222        2375 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_ncacn_packet);
    9223             :         } else {
    9224           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_ncacn_packet);
    9225             :         }
    9226        2375 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    9227           0 :                 PyErr_SetNdrError(err);
    9228           0 :                 return NULL;
    9229             :         }
    9230             : 
    9231        2375 :         Py_RETURN_NONE;
    9232             : }
    9233             : 
    9234          48 : static PyObject *py_ncacn_packet_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    9235             : {
    9236          48 :         struct ncacn_packet *object = (struct ncacn_packet *)pytalloc_get_ptr(py_obj);
    9237             :         PyObject *ret;
    9238             :         char *retstr;
    9239             : 
    9240          48 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_ncacn_packet, "ncacn_packet", object);
    9241          48 :         ret = PyUnicode_FromString(retstr);
    9242          48 :         talloc_free(retstr);
    9243             : 
    9244          48 :         return ret;
    9245             : }
    9246             : 
    9247             : static PyMethodDef py_ncacn_packet_methods[] = {
    9248             :         { "__ndr_pack__", (PyCFunction)py_ncacn_packet_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    9249             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_ncacn_packet_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    9250             :         { "__ndr_print__", (PyCFunction)py_ncacn_packet_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    9251             :         { NULL, NULL, 0, NULL }
    9252             : };
    9253             : 
    9254             : 
    9255             : static PyTypeObject ncacn_packet_Type = {
    9256             :         PyVarObject_HEAD_INIT(NULL, 0)
    9257             :         .tp_name = "dcerpc.ncacn_packet",
    9258             :         .tp_getset = py_ncacn_packet_getsetters,
    9259             :         .tp_methods = py_ncacn_packet_methods,
    9260             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    9261             :         .tp_new = py_ncacn_packet_new,
    9262             : };
    9263             : 
    9264             : 
    9265           0 : static PyObject *py_ncadg_packet_get_rpc_vers(PyObject *obj, void *closure)
    9266             : {
    9267           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(obj);
    9268             :         PyObject *py_rpc_vers;
    9269           0 :         py_rpc_vers = PyLong_FromLong((uint16_t)object->rpc_vers);
    9270           0 :         return py_rpc_vers;
    9271             : }
    9272             : 
    9273           0 : static int py_ncadg_packet_set_rpc_vers(PyObject *py_obj, PyObject *value, void *closure)
    9274             : {
    9275           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(py_obj);
    9276           0 :         if (value == NULL) {
    9277           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->rpc_vers");
    9278           0 :                 return -1;
    9279             :         }
    9280             :         {
    9281           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rpc_vers));
    9282           0 :                 if (PyLong_Check(value)) {
    9283             :                         unsigned long long test_var;
    9284           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9285           0 :                         if (PyErr_Occurred() != NULL) {
    9286           0 :                                 return -1;
    9287             :                         }
    9288           0 :                         if (test_var > uint_max) {
    9289           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9290             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9291           0 :                                 return -1;
    9292             :                         }
    9293           0 :                         object->rpc_vers = test_var;
    9294             :                 } else {
    9295           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9296             :                           PyLong_Type.tp_name);
    9297           0 :                         return -1;
    9298             :                 }
    9299             :         }
    9300           0 :         return 0;
    9301             : }
    9302             : 
    9303           0 : static PyObject *py_ncadg_packet_get_ptype(PyObject *obj, void *closure)
    9304             : {
    9305           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(obj);
    9306             :         PyObject *py_ptype;
    9307           0 :         py_ptype = PyLong_FromLong((uint16_t)object->ptype);
    9308           0 :         return py_ptype;
    9309             : }
    9310             : 
    9311           0 : static int py_ncadg_packet_set_ptype(PyObject *py_obj, PyObject *value, void *closure)
    9312             : {
    9313           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(py_obj);
    9314           0 :         if (value == NULL) {
    9315           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ptype");
    9316           0 :                 return -1;
    9317             :         }
    9318             :         {
    9319           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ptype));
    9320           0 :                 if (PyLong_Check(value)) {
    9321             :                         unsigned long long test_var;
    9322           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9323           0 :                         if (PyErr_Occurred() != NULL) {
    9324           0 :                                 return -1;
    9325             :                         }
    9326           0 :                         if (test_var > uint_max) {
    9327           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9328             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9329           0 :                                 return -1;
    9330             :                         }
    9331           0 :                         object->ptype = test_var;
    9332             :                 } else {
    9333           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9334             :                           PyLong_Type.tp_name);
    9335           0 :                         return -1;
    9336             :                 }
    9337             :         }
    9338           0 :         return 0;
    9339             : }
    9340             : 
    9341           0 : static PyObject *py_ncadg_packet_get_pfc_flags(PyObject *obj, void *closure)
    9342             : {
    9343           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(obj);
    9344             :         PyObject *py_pfc_flags;
    9345           0 :         py_pfc_flags = PyLong_FromLong((uint16_t)object->pfc_flags);
    9346           0 :         return py_pfc_flags;
    9347             : }
    9348             : 
    9349           0 : static int py_ncadg_packet_set_pfc_flags(PyObject *py_obj, PyObject *value, void *closure)
    9350             : {
    9351           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(py_obj);
    9352           0 :         if (value == NULL) {
    9353           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pfc_flags");
    9354           0 :                 return -1;
    9355             :         }
    9356             :         {
    9357           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->pfc_flags));
    9358           0 :                 if (PyLong_Check(value)) {
    9359             :                         unsigned long long test_var;
    9360           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9361           0 :                         if (PyErr_Occurred() != NULL) {
    9362           0 :                                 return -1;
    9363             :                         }
    9364           0 :                         if (test_var > uint_max) {
    9365           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9366             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9367           0 :                                 return -1;
    9368             :                         }
    9369           0 :                         object->pfc_flags = test_var;
    9370             :                 } else {
    9371           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9372             :                           PyLong_Type.tp_name);
    9373           0 :                         return -1;
    9374             :                 }
    9375             :         }
    9376           0 :         return 0;
    9377             : }
    9378             : 
    9379           0 : static PyObject *py_ncadg_packet_get_ncadg_flags(PyObject *obj, void *closure)
    9380             : {
    9381           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(obj);
    9382             :         PyObject *py_ncadg_flags;
    9383           0 :         py_ncadg_flags = PyLong_FromLong((uint16_t)object->ncadg_flags);
    9384           0 :         return py_ncadg_flags;
    9385             : }
    9386             : 
    9387           0 : static int py_ncadg_packet_set_ncadg_flags(PyObject *py_obj, PyObject *value, void *closure)
    9388             : {
    9389           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(py_obj);
    9390           0 :         if (value == NULL) {
    9391           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ncadg_flags");
    9392           0 :                 return -1;
    9393             :         }
    9394             :         {
    9395           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ncadg_flags));
    9396           0 :                 if (PyLong_Check(value)) {
    9397             :                         unsigned long long test_var;
    9398           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9399           0 :                         if (PyErr_Occurred() != NULL) {
    9400           0 :                                 return -1;
    9401             :                         }
    9402           0 :                         if (test_var > uint_max) {
    9403           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9404             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9405           0 :                                 return -1;
    9406             :                         }
    9407           0 :                         object->ncadg_flags = test_var;
    9408             :                 } else {
    9409           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9410             :                           PyLong_Type.tp_name);
    9411           0 :                         return -1;
    9412             :                 }
    9413             :         }
    9414           0 :         return 0;
    9415             : }
    9416             : 
    9417           0 : static PyObject *py_ncadg_packet_get_drep(PyObject *obj, void *closure)
    9418             : {
    9419           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(obj);
    9420             :         PyObject *py_drep;
    9421           0 :         py_drep = PyList_New(3);
    9422           0 :         if (py_drep == NULL) {
    9423           0 :                 return NULL;
    9424             :         }
    9425             :         {
    9426             :                 int drep_cntr_0;
    9427           0 :                 for (drep_cntr_0 = 0; drep_cntr_0 < (3); drep_cntr_0++) {
    9428             :                         PyObject *py_drep_0;
    9429           0 :                         py_drep_0 = PyLong_FromLong((uint16_t)object->drep[drep_cntr_0]);
    9430           0 :                         PyList_SetItem(py_drep, drep_cntr_0, py_drep_0);
    9431             :                 }
    9432             :         }
    9433           0 :         return py_drep;
    9434             : }
    9435             : 
    9436           0 : static int py_ncadg_packet_set_drep(PyObject *py_obj, PyObject *value, void *closure)
    9437             : {
    9438           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(py_obj);
    9439           0 :         if (value == NULL) {
    9440           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->drep");
    9441           0 :                 return -1;
    9442             :         }
    9443           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    9444             :         {
    9445             :                 int drep_cntr_0;
    9446           0 :                 if (ARRAY_SIZE(object->drep) != PyList_GET_SIZE(value)) {
    9447           0 :                         PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->drep),  PyList_GET_SIZE(value));
    9448           0 :                         return -1;
    9449             :                 }
    9450           0 :                 for (drep_cntr_0 = 0; drep_cntr_0 < PyList_GET_SIZE(value); drep_cntr_0++) {
    9451           0 :                         if (PyList_GET_ITEM(value, drep_cntr_0) == NULL) {
    9452           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->drep[drep_cntr_0]");
    9453           0 :                                 return -1;
    9454             :                         }
    9455             :                         {
    9456           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->drep[drep_cntr_0]));
    9457           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, drep_cntr_0))) {
    9458             :                                         unsigned long long test_var;
    9459           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, drep_cntr_0));
    9460           0 :                                         if (PyErr_Occurred() != NULL) {
    9461           0 :                                                 return -1;
    9462             :                                         }
    9463           0 :                                         if (test_var > uint_max) {
    9464           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9465             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    9466           0 :                                                 return -1;
    9467             :                                         }
    9468           0 :                                         object->drep[drep_cntr_0] = test_var;
    9469             :                                 } else {
    9470           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9471             :                                           PyLong_Type.tp_name);
    9472           0 :                                         return -1;
    9473             :                                 }
    9474             :                         }
    9475             :                 }
    9476             :         }
    9477           0 :         return 0;
    9478             : }
    9479             : 
    9480           0 : static PyObject *py_ncadg_packet_get_serial_high(PyObject *obj, void *closure)
    9481             : {
    9482           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(obj);
    9483             :         PyObject *py_serial_high;
    9484           0 :         py_serial_high = PyLong_FromLong((uint16_t)object->serial_high);
    9485           0 :         return py_serial_high;
    9486             : }
    9487             : 
    9488           0 : static int py_ncadg_packet_set_serial_high(PyObject *py_obj, PyObject *value, void *closure)
    9489             : {
    9490           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(py_obj);
    9491           0 :         if (value == NULL) {
    9492           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->serial_high");
    9493           0 :                 return -1;
    9494             :         }
    9495             :         {
    9496           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->serial_high));
    9497           0 :                 if (PyLong_Check(value)) {
    9498             :                         unsigned long long test_var;
    9499           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9500           0 :                         if (PyErr_Occurred() != NULL) {
    9501           0 :                                 return -1;
    9502             :                         }
    9503           0 :                         if (test_var > uint_max) {
    9504           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9505             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9506           0 :                                 return -1;
    9507             :                         }
    9508           0 :                         object->serial_high = test_var;
    9509             :                 } else {
    9510           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9511             :                           PyLong_Type.tp_name);
    9512           0 :                         return -1;
    9513             :                 }
    9514             :         }
    9515           0 :         return 0;
    9516             : }
    9517             : 
    9518           0 : static PyObject *py_ncadg_packet_get_object(PyObject *obj, void *closure)
    9519             : {
    9520           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(obj);
    9521             :         PyObject *py_object;
    9522           0 :         py_object = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->object);
    9523           0 :         return py_object;
    9524             : }
    9525             : 
    9526           0 : static int py_ncadg_packet_set_object(PyObject *py_obj, PyObject *value, void *closure)
    9527             : {
    9528           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(py_obj);
    9529           0 :         if (value == NULL) {
    9530           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->object");
    9531           0 :                 return -1;
    9532             :         }
    9533           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
    9534           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9535           0 :                 PyErr_NoMemory();
    9536           0 :                 return -1;
    9537             :         }
    9538           0 :         object->object = *(struct GUID *)pytalloc_get_ptr(value);
    9539           0 :         return 0;
    9540             : }
    9541             : 
    9542           0 : static PyObject *py_ncadg_packet_get_iface(PyObject *obj, void *closure)
    9543             : {
    9544           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(obj);
    9545             :         PyObject *py_iface;
    9546           0 :         py_iface = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->iface);
    9547           0 :         return py_iface;
    9548             : }
    9549             : 
    9550           0 : static int py_ncadg_packet_set_iface(PyObject *py_obj, PyObject *value, void *closure)
    9551             : {
    9552           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(py_obj);
    9553           0 :         if (value == NULL) {
    9554           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->iface");
    9555           0 :                 return -1;
    9556             :         }
    9557           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
    9558           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9559           0 :                 PyErr_NoMemory();
    9560           0 :                 return -1;
    9561             :         }
    9562           0 :         object->iface = *(struct GUID *)pytalloc_get_ptr(value);
    9563           0 :         return 0;
    9564             : }
    9565             : 
    9566           0 : static PyObject *py_ncadg_packet_get_activity(PyObject *obj, void *closure)
    9567             : {
    9568           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(obj);
    9569             :         PyObject *py_activity;
    9570           0 :         py_activity = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->activity);
    9571           0 :         return py_activity;
    9572             : }
    9573             : 
    9574           0 : static int py_ncadg_packet_set_activity(PyObject *py_obj, PyObject *value, void *closure)
    9575             : {
    9576           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(py_obj);
    9577           0 :         if (value == NULL) {
    9578           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->activity");
    9579           0 :                 return -1;
    9580             :         }
    9581           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
    9582           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9583           0 :                 PyErr_NoMemory();
    9584           0 :                 return -1;
    9585             :         }
    9586           0 :         object->activity = *(struct GUID *)pytalloc_get_ptr(value);
    9587           0 :         return 0;
    9588             : }
    9589             : 
    9590           0 : static PyObject *py_ncadg_packet_get_server_boot(PyObject *obj, void *closure)
    9591             : {
    9592           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(obj);
    9593             :         PyObject *py_server_boot;
    9594           0 :         py_server_boot = PyLong_FromUnsignedLongLong((uint32_t)object->server_boot);
    9595           0 :         return py_server_boot;
    9596             : }
    9597             : 
    9598           0 : static int py_ncadg_packet_set_server_boot(PyObject *py_obj, PyObject *value, void *closure)
    9599             : {
    9600           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(py_obj);
    9601           0 :         if (value == NULL) {
    9602           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->server_boot");
    9603           0 :                 return -1;
    9604             :         }
    9605             :         {
    9606           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->server_boot));
    9607           0 :                 if (PyLong_Check(value)) {
    9608             :                         unsigned long long test_var;
    9609           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9610           0 :                         if (PyErr_Occurred() != NULL) {
    9611           0 :                                 return -1;
    9612             :                         }
    9613           0 :                         if (test_var > uint_max) {
    9614           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9615             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9616           0 :                                 return -1;
    9617             :                         }
    9618           0 :                         object->server_boot = test_var;
    9619             :                 } else {
    9620           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9621             :                           PyLong_Type.tp_name);
    9622           0 :                         return -1;
    9623             :                 }
    9624             :         }
    9625           0 :         return 0;
    9626             : }
    9627             : 
    9628           0 : static PyObject *py_ncadg_packet_get_iface_version(PyObject *obj, void *closure)
    9629             : {
    9630           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(obj);
    9631             :         PyObject *py_iface_version;
    9632           0 :         py_iface_version = PyLong_FromUnsignedLongLong((uint32_t)object->iface_version);
    9633           0 :         return py_iface_version;
    9634             : }
    9635             : 
    9636           0 : static int py_ncadg_packet_set_iface_version(PyObject *py_obj, PyObject *value, void *closure)
    9637             : {
    9638           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(py_obj);
    9639           0 :         if (value == NULL) {
    9640           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->iface_version");
    9641           0 :                 return -1;
    9642             :         }
    9643             :         {
    9644           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->iface_version));
    9645           0 :                 if (PyLong_Check(value)) {
    9646             :                         unsigned long long test_var;
    9647           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9648           0 :                         if (PyErr_Occurred() != NULL) {
    9649           0 :                                 return -1;
    9650             :                         }
    9651           0 :                         if (test_var > uint_max) {
    9652           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9653             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9654           0 :                                 return -1;
    9655             :                         }
    9656           0 :                         object->iface_version = test_var;
    9657             :                 } else {
    9658           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9659             :                           PyLong_Type.tp_name);
    9660           0 :                         return -1;
    9661             :                 }
    9662             :         }
    9663           0 :         return 0;
    9664             : }
    9665             : 
    9666           0 : static PyObject *py_ncadg_packet_get_seq_num(PyObject *obj, void *closure)
    9667             : {
    9668           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(obj);
    9669             :         PyObject *py_seq_num;
    9670           0 :         py_seq_num = PyLong_FromUnsignedLongLong((uint32_t)object->seq_num);
    9671           0 :         return py_seq_num;
    9672             : }
    9673             : 
    9674           0 : static int py_ncadg_packet_set_seq_num(PyObject *py_obj, PyObject *value, void *closure)
    9675             : {
    9676           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(py_obj);
    9677           0 :         if (value == NULL) {
    9678           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->seq_num");
    9679           0 :                 return -1;
    9680             :         }
    9681             :         {
    9682           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->seq_num));
    9683           0 :                 if (PyLong_Check(value)) {
    9684             :                         unsigned long long test_var;
    9685           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9686           0 :                         if (PyErr_Occurred() != NULL) {
    9687           0 :                                 return -1;
    9688             :                         }
    9689           0 :                         if (test_var > uint_max) {
    9690           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9691             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9692           0 :                                 return -1;
    9693             :                         }
    9694           0 :                         object->seq_num = test_var;
    9695             :                 } else {
    9696           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9697             :                           PyLong_Type.tp_name);
    9698           0 :                         return -1;
    9699             :                 }
    9700             :         }
    9701           0 :         return 0;
    9702             : }
    9703             : 
    9704           0 : static PyObject *py_ncadg_packet_get_opnum(PyObject *obj, void *closure)
    9705             : {
    9706           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(obj);
    9707             :         PyObject *py_opnum;
    9708           0 :         py_opnum = PyLong_FromLong((uint16_t)object->opnum);
    9709           0 :         return py_opnum;
    9710             : }
    9711             : 
    9712           0 : static int py_ncadg_packet_set_opnum(PyObject *py_obj, PyObject *value, void *closure)
    9713             : {
    9714           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(py_obj);
    9715           0 :         if (value == NULL) {
    9716           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->opnum");
    9717           0 :                 return -1;
    9718             :         }
    9719             :         {
    9720           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->opnum));
    9721           0 :                 if (PyLong_Check(value)) {
    9722             :                         unsigned long long test_var;
    9723           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9724           0 :                         if (PyErr_Occurred() != NULL) {
    9725           0 :                                 return -1;
    9726             :                         }
    9727           0 :                         if (test_var > uint_max) {
    9728           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9729             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9730           0 :                                 return -1;
    9731             :                         }
    9732           0 :                         object->opnum = test_var;
    9733             :                 } else {
    9734           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9735             :                           PyLong_Type.tp_name);
    9736           0 :                         return -1;
    9737             :                 }
    9738             :         }
    9739           0 :         return 0;
    9740             : }
    9741             : 
    9742           0 : static PyObject *py_ncadg_packet_get_ihint(PyObject *obj, void *closure)
    9743             : {
    9744           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(obj);
    9745             :         PyObject *py_ihint;
    9746           0 :         py_ihint = PyLong_FromLong((uint16_t)object->ihint);
    9747           0 :         return py_ihint;
    9748             : }
    9749             : 
    9750           0 : static int py_ncadg_packet_set_ihint(PyObject *py_obj, PyObject *value, void *closure)
    9751             : {
    9752           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(py_obj);
    9753           0 :         if (value == NULL) {
    9754           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ihint");
    9755           0 :                 return -1;
    9756             :         }
    9757             :         {
    9758           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ihint));
    9759           0 :                 if (PyLong_Check(value)) {
    9760             :                         unsigned long long test_var;
    9761           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9762           0 :                         if (PyErr_Occurred() != NULL) {
    9763           0 :                                 return -1;
    9764             :                         }
    9765           0 :                         if (test_var > uint_max) {
    9766           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9767             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9768           0 :                                 return -1;
    9769             :                         }
    9770           0 :                         object->ihint = test_var;
    9771             :                 } else {
    9772           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9773             :                           PyLong_Type.tp_name);
    9774           0 :                         return -1;
    9775             :                 }
    9776             :         }
    9777           0 :         return 0;
    9778             : }
    9779             : 
    9780           0 : static PyObject *py_ncadg_packet_get_ahint(PyObject *obj, void *closure)
    9781             : {
    9782           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(obj);
    9783             :         PyObject *py_ahint;
    9784           0 :         py_ahint = PyLong_FromLong((uint16_t)object->ahint);
    9785           0 :         return py_ahint;
    9786             : }
    9787             : 
    9788           0 : static int py_ncadg_packet_set_ahint(PyObject *py_obj, PyObject *value, void *closure)
    9789             : {
    9790           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(py_obj);
    9791           0 :         if (value == NULL) {
    9792           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ahint");
    9793           0 :                 return -1;
    9794             :         }
    9795             :         {
    9796           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ahint));
    9797           0 :                 if (PyLong_Check(value)) {
    9798             :                         unsigned long long test_var;
    9799           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9800           0 :                         if (PyErr_Occurred() != NULL) {
    9801           0 :                                 return -1;
    9802             :                         }
    9803           0 :                         if (test_var > uint_max) {
    9804           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9805             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9806           0 :                                 return -1;
    9807             :                         }
    9808           0 :                         object->ahint = test_var;
    9809             :                 } else {
    9810           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9811             :                           PyLong_Type.tp_name);
    9812           0 :                         return -1;
    9813             :                 }
    9814             :         }
    9815           0 :         return 0;
    9816             : }
    9817             : 
    9818           0 : static PyObject *py_ncadg_packet_get_len(PyObject *obj, void *closure)
    9819             : {
    9820           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(obj);
    9821             :         PyObject *py_len;
    9822           0 :         py_len = PyLong_FromLong((uint16_t)object->len);
    9823           0 :         return py_len;
    9824             : }
    9825             : 
    9826           0 : static int py_ncadg_packet_set_len(PyObject *py_obj, PyObject *value, void *closure)
    9827             : {
    9828           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(py_obj);
    9829           0 :         if (value == NULL) {
    9830           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->len");
    9831           0 :                 return -1;
    9832             :         }
    9833             :         {
    9834           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->len));
    9835           0 :                 if (PyLong_Check(value)) {
    9836             :                         unsigned long long test_var;
    9837           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9838           0 :                         if (PyErr_Occurred() != NULL) {
    9839           0 :                                 return -1;
    9840             :                         }
    9841           0 :                         if (test_var > uint_max) {
    9842           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9843             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9844           0 :                                 return -1;
    9845             :                         }
    9846           0 :                         object->len = test_var;
    9847             :                 } else {
    9848           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9849             :                           PyLong_Type.tp_name);
    9850           0 :                         return -1;
    9851             :                 }
    9852             :         }
    9853           0 :         return 0;
    9854             : }
    9855             : 
    9856           0 : static PyObject *py_ncadg_packet_get_fragnum(PyObject *obj, void *closure)
    9857             : {
    9858           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(obj);
    9859             :         PyObject *py_fragnum;
    9860           0 :         py_fragnum = PyLong_FromLong((uint16_t)object->fragnum);
    9861           0 :         return py_fragnum;
    9862             : }
    9863             : 
    9864           0 : static int py_ncadg_packet_set_fragnum(PyObject *py_obj, PyObject *value, void *closure)
    9865             : {
    9866           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(py_obj);
    9867           0 :         if (value == NULL) {
    9868           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fragnum");
    9869           0 :                 return -1;
    9870             :         }
    9871             :         {
    9872           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fragnum));
    9873           0 :                 if (PyLong_Check(value)) {
    9874             :                         unsigned long long test_var;
    9875           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9876           0 :                         if (PyErr_Occurred() != NULL) {
    9877           0 :                                 return -1;
    9878             :                         }
    9879           0 :                         if (test_var > uint_max) {
    9880           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9881             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9882           0 :                                 return -1;
    9883             :                         }
    9884           0 :                         object->fragnum = test_var;
    9885             :                 } else {
    9886           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9887             :                           PyLong_Type.tp_name);
    9888           0 :                         return -1;
    9889             :                 }
    9890             :         }
    9891           0 :         return 0;
    9892             : }
    9893             : 
    9894           0 : static PyObject *py_ncadg_packet_get_auth_proto(PyObject *obj, void *closure)
    9895             : {
    9896           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(obj);
    9897             :         PyObject *py_auth_proto;
    9898           0 :         py_auth_proto = PyLong_FromLong((uint16_t)object->auth_proto);
    9899           0 :         return py_auth_proto;
    9900             : }
    9901             : 
    9902           0 : static int py_ncadg_packet_set_auth_proto(PyObject *py_obj, PyObject *value, void *closure)
    9903             : {
    9904           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(py_obj);
    9905           0 :         if (value == NULL) {
    9906           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->auth_proto");
    9907           0 :                 return -1;
    9908             :         }
    9909             :         {
    9910           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->auth_proto));
    9911           0 :                 if (PyLong_Check(value)) {
    9912             :                         unsigned long long test_var;
    9913           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9914           0 :                         if (PyErr_Occurred() != NULL) {
    9915           0 :                                 return -1;
    9916             :                         }
    9917           0 :                         if (test_var > uint_max) {
    9918           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9919             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9920           0 :                                 return -1;
    9921             :                         }
    9922           0 :                         object->auth_proto = test_var;
    9923             :                 } else {
    9924           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9925             :                           PyLong_Type.tp_name);
    9926           0 :                         return -1;
    9927             :                 }
    9928             :         }
    9929           0 :         return 0;
    9930             : }
    9931             : 
    9932           0 : static PyObject *py_ncadg_packet_get_serial_low(PyObject *obj, void *closure)
    9933             : {
    9934           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(obj);
    9935             :         PyObject *py_serial_low;
    9936           0 :         py_serial_low = PyLong_FromLong((uint16_t)object->serial_low);
    9937           0 :         return py_serial_low;
    9938             : }
    9939             : 
    9940           0 : static int py_ncadg_packet_set_serial_low(PyObject *py_obj, PyObject *value, void *closure)
    9941             : {
    9942           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(py_obj);
    9943           0 :         if (value == NULL) {
    9944           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->serial_low");
    9945           0 :                 return -1;
    9946             :         }
    9947             :         {
    9948           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->serial_low));
    9949           0 :                 if (PyLong_Check(value)) {
    9950             :                         unsigned long long test_var;
    9951           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9952           0 :                         if (PyErr_Occurred() != NULL) {
    9953           0 :                                 return -1;
    9954             :                         }
    9955           0 :                         if (test_var > uint_max) {
    9956           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9957             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9958           0 :                                 return -1;
    9959             :                         }
    9960           0 :                         object->serial_low = test_var;
    9961             :                 } else {
    9962           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9963             :                           PyLong_Type.tp_name);
    9964           0 :                         return -1;
    9965             :                 }
    9966             :         }
    9967           0 :         return 0;
    9968             : }
    9969             : 
    9970           0 : static PyObject *py_ncadg_packet_get_u(PyObject *obj, void *closure)
    9971             : {
    9972           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(obj);
    9973             :         PyObject *py_u;
    9974           0 :         py_u = pyrpc_import_union(&dcerpc_payload_Type, pytalloc_get_mem_ctx(obj), object->ptype, &object->u, "union dcerpc_payload");
    9975           0 :         if (py_u == NULL) {
    9976           0 :                 return NULL;
    9977             :         }
    9978           0 :         return py_u;
    9979             : }
    9980             : 
    9981           0 : static int py_ncadg_packet_set_u(PyObject *py_obj, PyObject *value, void *closure)
    9982             : {
    9983           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(py_obj);
    9984           0 :         if (value == NULL) {
    9985           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->u");
    9986           0 :                 return -1;
    9987             :         }
    9988             :         {
    9989             :                 union dcerpc_payload *u_switch_0;
    9990           0 :                 u_switch_0 = (union dcerpc_payload *)pyrpc_export_union(&dcerpc_payload_Type, pytalloc_get_mem_ctx(py_obj), object->ptype, value, "union dcerpc_payload");
    9991           0 :                 if (u_switch_0 == NULL) {
    9992           0 :                         return -1;
    9993             :                 }
    9994           0 :                 object->u = *u_switch_0;
    9995             :         }
    9996           0 :         return 0;
    9997             : }
    9998             : 
    9999             : static PyGetSetDef py_ncadg_packet_getsetters[] = {
   10000             :         {
   10001             :                 .name = discard_const_p(char, "rpc_vers"),
   10002             :                 .get = py_ncadg_packet_get_rpc_vers,
   10003             :                 .set = py_ncadg_packet_set_rpc_vers,
   10004             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   10005             :         },
   10006             :         {
   10007             :                 .name = discard_const_p(char, "ptype"),
   10008             :                 .get = py_ncadg_packet_get_ptype,
   10009             :                 .set = py_ncadg_packet_set_ptype,
   10010             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   10011             :         },
   10012             :         {
   10013             :                 .name = discard_const_p(char, "pfc_flags"),
   10014             :                 .get = py_ncadg_packet_get_pfc_flags,
   10015             :                 .set = py_ncadg_packet_set_pfc_flags,
   10016             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   10017             :         },
   10018             :         {
   10019             :                 .name = discard_const_p(char, "ncadg_flags"),
   10020             :                 .get = py_ncadg_packet_get_ncadg_flags,
   10021             :                 .set = py_ncadg_packet_set_ncadg_flags,
   10022             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   10023             :         },
   10024             :         {
   10025             :                 .name = discard_const_p(char, "drep"),
   10026             :                 .get = py_ncadg_packet_get_drep,
   10027             :                 .set = py_ncadg_packet_set_drep,
   10028             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   10029             :         },
   10030             :         {
   10031             :                 .name = discard_const_p(char, "serial_high"),
   10032             :                 .get = py_ncadg_packet_get_serial_high,
   10033             :                 .set = py_ncadg_packet_set_serial_high,
   10034             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   10035             :         },
   10036             :         {
   10037             :                 .name = discard_const_p(char, "object"),
   10038             :                 .get = py_ncadg_packet_get_object,
   10039             :                 .set = py_ncadg_packet_set_object,
   10040             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   10041             :         },
   10042             :         {
   10043             :                 .name = discard_const_p(char, "iface"),
   10044             :                 .get = py_ncadg_packet_get_iface,
   10045             :                 .set = py_ncadg_packet_set_iface,
   10046             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   10047             :         },
   10048             :         {
   10049             :                 .name = discard_const_p(char, "activity"),
   10050             :                 .get = py_ncadg_packet_get_activity,
   10051             :                 .set = py_ncadg_packet_set_activity,
   10052             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   10053             :         },
   10054             :         {
   10055             :                 .name = discard_const_p(char, "server_boot"),
   10056             :                 .get = py_ncadg_packet_get_server_boot,
   10057             :                 .set = py_ncadg_packet_set_server_boot,
   10058             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10059             :         },
   10060             :         {
   10061             :                 .name = discard_const_p(char, "iface_version"),
   10062             :                 .get = py_ncadg_packet_get_iface_version,
   10063             :                 .set = py_ncadg_packet_set_iface_version,
   10064             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10065             :         },
   10066             :         {
   10067             :                 .name = discard_const_p(char, "seq_num"),
   10068             :                 .get = py_ncadg_packet_get_seq_num,
   10069             :                 .set = py_ncadg_packet_set_seq_num,
   10070             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10071             :         },
   10072             :         {
   10073             :                 .name = discard_const_p(char, "opnum"),
   10074             :                 .get = py_ncadg_packet_get_opnum,
   10075             :                 .set = py_ncadg_packet_set_opnum,
   10076             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   10077             :         },
   10078             :         {
   10079             :                 .name = discard_const_p(char, "ihint"),
   10080             :                 .get = py_ncadg_packet_get_ihint,
   10081             :                 .set = py_ncadg_packet_set_ihint,
   10082             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   10083             :         },
   10084             :         {
   10085             :                 .name = discard_const_p(char, "ahint"),
   10086             :                 .get = py_ncadg_packet_get_ahint,
   10087             :                 .set = py_ncadg_packet_set_ahint,
   10088             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   10089             :         },
   10090             :         {
   10091             :                 .name = discard_const_p(char, "len"),
   10092             :                 .get = py_ncadg_packet_get_len,
   10093             :                 .set = py_ncadg_packet_set_len,
   10094             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   10095             :         },
   10096             :         {
   10097             :                 .name = discard_const_p(char, "fragnum"),
   10098             :                 .get = py_ncadg_packet_get_fragnum,
   10099             :                 .set = py_ncadg_packet_set_fragnum,
   10100             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   10101             :         },
   10102             :         {
   10103             :                 .name = discard_const_p(char, "auth_proto"),
   10104             :                 .get = py_ncadg_packet_get_auth_proto,
   10105             :                 .set = py_ncadg_packet_set_auth_proto,
   10106             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   10107             :         },
   10108             :         {
   10109             :                 .name = discard_const_p(char, "serial_low"),
   10110             :                 .get = py_ncadg_packet_get_serial_low,
   10111             :                 .set = py_ncadg_packet_set_serial_low,
   10112             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   10113             :         },
   10114             :         {
   10115             :                 .name = discard_const_p(char, "u"),
   10116             :                 .get = py_ncadg_packet_get_u,
   10117             :                 .set = py_ncadg_packet_set_u,
   10118             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dcerpc_payload")
   10119             :         },
   10120             :         { .name = NULL }
   10121             : };
   10122             : 
   10123           0 : static PyObject *py_ncadg_packet_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10124             : {
   10125           0 :         return pytalloc_new(struct ncadg_packet, type);
   10126             : }
   10127             : 
   10128           0 : static PyObject *py_ncadg_packet_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   10129             : {
   10130           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(py_obj);
   10131           0 :         PyObject *ret = NULL;
   10132             :         DATA_BLOB blob;
   10133             :         enum ndr_err_code err;
   10134           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   10135           0 :         if (tmp_ctx == NULL) {
   10136           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   10137           0 :                 return NULL;
   10138             :         }
   10139           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_ncadg_packet);
   10140           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   10141           0 :                 TALLOC_FREE(tmp_ctx);
   10142           0 :                 PyErr_SetNdrError(err);
   10143           0 :                 return NULL;
   10144             :         }
   10145             : 
   10146           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   10147           0 :         TALLOC_FREE(tmp_ctx);
   10148           0 :         return ret;
   10149             : }
   10150             : 
   10151           0 : static PyObject *py_ncadg_packet_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   10152             : {
   10153           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(py_obj);
   10154           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   10155           0 :         Py_ssize_t blob_length = 0;
   10156             :         enum ndr_err_code err;
   10157           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   10158           0 :         PyObject *allow_remaining_obj = NULL;
   10159           0 :         bool allow_remaining = false;
   10160             : 
   10161           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   10162             :                 discard_const_p(char *, kwnames),
   10163             :                 &blob.data, &blob_length,
   10164             :                 &allow_remaining_obj)) {
   10165           0 :                 return NULL;
   10166             :         }
   10167           0 :         blob.length = blob_length;
   10168             : 
   10169           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   10170           0 :                 allow_remaining = true;
   10171             :         }
   10172             : 
   10173           0 :         if (allow_remaining) {
   10174           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_ncadg_packet);
   10175             :         } else {
   10176           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_ncadg_packet);
   10177             :         }
   10178           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   10179           0 :                 PyErr_SetNdrError(err);
   10180           0 :                 return NULL;
   10181             :         }
   10182             : 
   10183           0 :         Py_RETURN_NONE;
   10184             : }
   10185             : 
   10186           0 : static PyObject *py_ncadg_packet_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   10187             : {
   10188           0 :         struct ncadg_packet *object = (struct ncadg_packet *)pytalloc_get_ptr(py_obj);
   10189             :         PyObject *ret;
   10190             :         char *retstr;
   10191             : 
   10192           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_ncadg_packet, "ncadg_packet", object);
   10193           0 :         ret = PyUnicode_FromString(retstr);
   10194           0 :         talloc_free(retstr);
   10195             : 
   10196           0 :         return ret;
   10197             : }
   10198             : 
   10199             : static PyMethodDef py_ncadg_packet_methods[] = {
   10200             :         { "__ndr_pack__", (PyCFunction)py_ncadg_packet_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   10201             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_ncadg_packet_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
   10202             :         { "__ndr_print__", (PyCFunction)py_ncadg_packet_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   10203             :         { NULL, NULL, 0, NULL }
   10204             : };
   10205             : 
   10206             : 
   10207             : static PyTypeObject ncadg_packet_Type = {
   10208             :         PyVarObject_HEAD_INIT(NULL, 0)
   10209             :         .tp_name = "dcerpc.ncadg_packet",
   10210             :         .tp_getset = py_ncadg_packet_getsetters,
   10211             :         .tp_methods = py_ncadg_packet_methods,
   10212             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   10213             :         .tp_new = py_ncadg_packet_new,
   10214             : };
   10215             : 
   10216             : 
   10217           0 : static PyObject *py_dcerpc_sec_vt_pcontext_get_abstract_syntax(PyObject *obj, void *closure)
   10218             : {
   10219           0 :         struct dcerpc_sec_vt_pcontext *object = (struct dcerpc_sec_vt_pcontext *)pytalloc_get_ptr(obj);
   10220             :         PyObject *py_abstract_syntax;
   10221           0 :         py_abstract_syntax = pytalloc_reference_ex(ndr_syntax_id_Type, pytalloc_get_mem_ctx(obj), &object->abstract_syntax);
   10222           0 :         return py_abstract_syntax;
   10223             : }
   10224             : 
   10225           0 : static int py_dcerpc_sec_vt_pcontext_set_abstract_syntax(PyObject *py_obj, PyObject *value, void *closure)
   10226             : {
   10227           0 :         struct dcerpc_sec_vt_pcontext *object = (struct dcerpc_sec_vt_pcontext *)pytalloc_get_ptr(py_obj);
   10228           0 :         if (value == NULL) {
   10229           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->abstract_syntax");
   10230           0 :                 return -1;
   10231             :         }
   10232           0 :         PY_CHECK_TYPE(ndr_syntax_id_Type, value, return -1;);
   10233           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10234           0 :                 PyErr_NoMemory();
   10235           0 :                 return -1;
   10236             :         }
   10237           0 :         object->abstract_syntax = *(struct ndr_syntax_id *)pytalloc_get_ptr(value);
   10238           0 :         return 0;
   10239             : }
   10240             : 
   10241           0 : static PyObject *py_dcerpc_sec_vt_pcontext_get_transfer_syntax(PyObject *obj, void *closure)
   10242             : {
   10243           0 :         struct dcerpc_sec_vt_pcontext *object = (struct dcerpc_sec_vt_pcontext *)pytalloc_get_ptr(obj);
   10244             :         PyObject *py_transfer_syntax;
   10245           0 :         py_transfer_syntax = pytalloc_reference_ex(ndr_syntax_id_Type, pytalloc_get_mem_ctx(obj), &object->transfer_syntax);
   10246           0 :         return py_transfer_syntax;
   10247             : }
   10248             : 
   10249           0 : static int py_dcerpc_sec_vt_pcontext_set_transfer_syntax(PyObject *py_obj, PyObject *value, void *closure)
   10250             : {
   10251           0 :         struct dcerpc_sec_vt_pcontext *object = (struct dcerpc_sec_vt_pcontext *)pytalloc_get_ptr(py_obj);
   10252           0 :         if (value == NULL) {
   10253           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->transfer_syntax");
   10254           0 :                 return -1;
   10255             :         }
   10256           0 :         PY_CHECK_TYPE(ndr_syntax_id_Type, value, return -1;);
   10257           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10258           0 :                 PyErr_NoMemory();
   10259           0 :                 return -1;
   10260             :         }
   10261           0 :         object->transfer_syntax = *(struct ndr_syntax_id *)pytalloc_get_ptr(value);
   10262           0 :         return 0;
   10263             : }
   10264             : 
   10265             : static PyGetSetDef py_dcerpc_sec_vt_pcontext_getsetters[] = {
   10266             :         {
   10267             :                 .name = discard_const_p(char, "abstract_syntax"),
   10268             :                 .get = py_dcerpc_sec_vt_pcontext_get_abstract_syntax,
   10269             :                 .set = py_dcerpc_sec_vt_pcontext_set_abstract_syntax,
   10270             :                 .doc = discard_const_p(char, "PIDL-generated element of base type ndr_syntax_id")
   10271             :         },
   10272             :         {
   10273             :                 .name = discard_const_p(char, "transfer_syntax"),
   10274             :                 .get = py_dcerpc_sec_vt_pcontext_get_transfer_syntax,
   10275             :                 .set = py_dcerpc_sec_vt_pcontext_set_transfer_syntax,
   10276             :                 .doc = discard_const_p(char, "PIDL-generated element of base type ndr_syntax_id")
   10277             :         },
   10278             :         { .name = NULL }
   10279             : };
   10280             : 
   10281           0 : static PyObject *py_dcerpc_sec_vt_pcontext_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10282             : {
   10283           0 :         return pytalloc_new(struct dcerpc_sec_vt_pcontext, type);
   10284             : }
   10285             : 
   10286             : 
   10287             : static PyTypeObject dcerpc_sec_vt_pcontext_Type = {
   10288             :         PyVarObject_HEAD_INIT(NULL, 0)
   10289             :         .tp_name = "dcerpc.sec_vt_pcontext",
   10290             :         .tp_getset = py_dcerpc_sec_vt_pcontext_getsetters,
   10291             :         .tp_methods = NULL,
   10292             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   10293             :         .tp_new = py_dcerpc_sec_vt_pcontext_new,
   10294             : };
   10295             : 
   10296             : 
   10297           0 : static PyObject *py_dcerpc_sec_vt_header2_get_ptype(PyObject *obj, void *closure)
   10298             : {
   10299           0 :         struct dcerpc_sec_vt_header2 *object = (struct dcerpc_sec_vt_header2 *)pytalloc_get_ptr(obj);
   10300             :         PyObject *py_ptype;
   10301           0 :         py_ptype = PyLong_FromLong((uint16_t)object->ptype);
   10302           0 :         return py_ptype;
   10303             : }
   10304             : 
   10305           0 : static int py_dcerpc_sec_vt_header2_set_ptype(PyObject *py_obj, PyObject *value, void *closure)
   10306             : {
   10307           0 :         struct dcerpc_sec_vt_header2 *object = (struct dcerpc_sec_vt_header2 *)pytalloc_get_ptr(py_obj);
   10308           0 :         if (value == NULL) {
   10309           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ptype");
   10310           0 :                 return -1;
   10311             :         }
   10312             :         {
   10313           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ptype));
   10314           0 :                 if (PyLong_Check(value)) {
   10315             :                         unsigned long long test_var;
   10316           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10317           0 :                         if (PyErr_Occurred() != NULL) {
   10318           0 :                                 return -1;
   10319             :                         }
   10320           0 :                         if (test_var > uint_max) {
   10321           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10322             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10323           0 :                                 return -1;
   10324             :                         }
   10325           0 :                         object->ptype = test_var;
   10326             :                 } else {
   10327           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10328             :                           PyLong_Type.tp_name);
   10329           0 :                         return -1;
   10330             :                 }
   10331             :         }
   10332           0 :         return 0;
   10333             : }
   10334             : 
   10335           0 : static PyObject *py_dcerpc_sec_vt_header2_get_reserved1(PyObject *obj, void *closure)
   10336             : {
   10337           0 :         struct dcerpc_sec_vt_header2 *object = (struct dcerpc_sec_vt_header2 *)pytalloc_get_ptr(obj);
   10338             :         PyObject *py_reserved1;
   10339           0 :         py_reserved1 = PyLong_FromLong((uint16_t)object->reserved1);
   10340           0 :         return py_reserved1;
   10341             : }
   10342             : 
   10343           0 : static int py_dcerpc_sec_vt_header2_set_reserved1(PyObject *py_obj, PyObject *value, void *closure)
   10344             : {
   10345           0 :         struct dcerpc_sec_vt_header2 *object = (struct dcerpc_sec_vt_header2 *)pytalloc_get_ptr(py_obj);
   10346           0 :         if (value == NULL) {
   10347           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved1");
   10348           0 :                 return -1;
   10349             :         }
   10350             :         {
   10351           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved1));
   10352           0 :                 if (PyLong_Check(value)) {
   10353             :                         unsigned long long test_var;
   10354           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10355           0 :                         if (PyErr_Occurred() != NULL) {
   10356           0 :                                 return -1;
   10357             :                         }
   10358           0 :                         if (test_var > uint_max) {
   10359           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10360             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10361           0 :                                 return -1;
   10362             :                         }
   10363           0 :                         object->reserved1 = test_var;
   10364             :                 } else {
   10365           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10366             :                           PyLong_Type.tp_name);
   10367           0 :                         return -1;
   10368             :                 }
   10369             :         }
   10370           0 :         return 0;
   10371             : }
   10372             : 
   10373           0 : static PyObject *py_dcerpc_sec_vt_header2_get_reserved2(PyObject *obj, void *closure)
   10374             : {
   10375           0 :         struct dcerpc_sec_vt_header2 *object = (struct dcerpc_sec_vt_header2 *)pytalloc_get_ptr(obj);
   10376             :         PyObject *py_reserved2;
   10377           0 :         py_reserved2 = PyLong_FromLong((uint16_t)object->reserved2);
   10378           0 :         return py_reserved2;
   10379             : }
   10380             : 
   10381           0 : static int py_dcerpc_sec_vt_header2_set_reserved2(PyObject *py_obj, PyObject *value, void *closure)
   10382             : {
   10383           0 :         struct dcerpc_sec_vt_header2 *object = (struct dcerpc_sec_vt_header2 *)pytalloc_get_ptr(py_obj);
   10384           0 :         if (value == NULL) {
   10385           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved2");
   10386           0 :                 return -1;
   10387             :         }
   10388             :         {
   10389           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved2));
   10390           0 :                 if (PyLong_Check(value)) {
   10391             :                         unsigned long long test_var;
   10392           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10393           0 :                         if (PyErr_Occurred() != NULL) {
   10394           0 :                                 return -1;
   10395             :                         }
   10396           0 :                         if (test_var > uint_max) {
   10397           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10398             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10399           0 :                                 return -1;
   10400             :                         }
   10401           0 :                         object->reserved2 = test_var;
   10402             :                 } else {
   10403           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10404             :                           PyLong_Type.tp_name);
   10405           0 :                         return -1;
   10406             :                 }
   10407             :         }
   10408           0 :         return 0;
   10409             : }
   10410             : 
   10411           0 : static PyObject *py_dcerpc_sec_vt_header2_get_drep(PyObject *obj, void *closure)
   10412             : {
   10413           0 :         struct dcerpc_sec_vt_header2 *object = (struct dcerpc_sec_vt_header2 *)pytalloc_get_ptr(obj);
   10414             :         PyObject *py_drep;
   10415           0 :         py_drep = PyList_New(4);
   10416           0 :         if (py_drep == NULL) {
   10417           0 :                 return NULL;
   10418             :         }
   10419             :         {
   10420             :                 int drep_cntr_0;
   10421           0 :                 for (drep_cntr_0 = 0; drep_cntr_0 < (4); drep_cntr_0++) {
   10422             :                         PyObject *py_drep_0;
   10423           0 :                         py_drep_0 = PyLong_FromLong((uint16_t)object->drep[drep_cntr_0]);
   10424           0 :                         PyList_SetItem(py_drep, drep_cntr_0, py_drep_0);
   10425             :                 }
   10426             :         }
   10427           0 :         return py_drep;
   10428             : }
   10429             : 
   10430           0 : static int py_dcerpc_sec_vt_header2_set_drep(PyObject *py_obj, PyObject *value, void *closure)
   10431             : {
   10432           0 :         struct dcerpc_sec_vt_header2 *object = (struct dcerpc_sec_vt_header2 *)pytalloc_get_ptr(py_obj);
   10433           0 :         if (value == NULL) {
   10434           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->drep");
   10435           0 :                 return -1;
   10436             :         }
   10437           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   10438             :         {
   10439             :                 int drep_cntr_0;
   10440           0 :                 if (ARRAY_SIZE(object->drep) != PyList_GET_SIZE(value)) {
   10441           0 :                         PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->drep),  PyList_GET_SIZE(value));
   10442           0 :                         return -1;
   10443             :                 }
   10444           0 :                 for (drep_cntr_0 = 0; drep_cntr_0 < PyList_GET_SIZE(value); drep_cntr_0++) {
   10445           0 :                         if (PyList_GET_ITEM(value, drep_cntr_0) == NULL) {
   10446           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->drep[drep_cntr_0]");
   10447           0 :                                 return -1;
   10448             :                         }
   10449             :                         {
   10450           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->drep[drep_cntr_0]));
   10451           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, drep_cntr_0))) {
   10452             :                                         unsigned long long test_var;
   10453           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, drep_cntr_0));
   10454           0 :                                         if (PyErr_Occurred() != NULL) {
   10455           0 :                                                 return -1;
   10456             :                                         }
   10457           0 :                                         if (test_var > uint_max) {
   10458           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10459             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   10460           0 :                                                 return -1;
   10461             :                                         }
   10462           0 :                                         object->drep[drep_cntr_0] = test_var;
   10463             :                                 } else {
   10464           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10465             :                                           PyLong_Type.tp_name);
   10466           0 :                                         return -1;
   10467             :                                 }
   10468             :                         }
   10469             :                 }
   10470             :         }
   10471           0 :         return 0;
   10472             : }
   10473             : 
   10474           0 : static PyObject *py_dcerpc_sec_vt_header2_get_call_id(PyObject *obj, void *closure)
   10475             : {
   10476           0 :         struct dcerpc_sec_vt_header2 *object = (struct dcerpc_sec_vt_header2 *)pytalloc_get_ptr(obj);
   10477             :         PyObject *py_call_id;
   10478           0 :         py_call_id = PyLong_FromUnsignedLongLong((uint32_t)object->call_id);
   10479           0 :         return py_call_id;
   10480             : }
   10481             : 
   10482           0 : static int py_dcerpc_sec_vt_header2_set_call_id(PyObject *py_obj, PyObject *value, void *closure)
   10483             : {
   10484           0 :         struct dcerpc_sec_vt_header2 *object = (struct dcerpc_sec_vt_header2 *)pytalloc_get_ptr(py_obj);
   10485           0 :         if (value == NULL) {
   10486           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->call_id");
   10487           0 :                 return -1;
   10488             :         }
   10489             :         {
   10490           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->call_id));
   10491           0 :                 if (PyLong_Check(value)) {
   10492             :                         unsigned long long test_var;
   10493           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10494           0 :                         if (PyErr_Occurred() != NULL) {
   10495           0 :                                 return -1;
   10496             :                         }
   10497           0 :                         if (test_var > uint_max) {
   10498           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10499             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10500           0 :                                 return -1;
   10501             :                         }
   10502           0 :                         object->call_id = test_var;
   10503             :                 } else {
   10504           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10505             :                           PyLong_Type.tp_name);
   10506           0 :                         return -1;
   10507             :                 }
   10508             :         }
   10509           0 :         return 0;
   10510             : }
   10511             : 
   10512           0 : static PyObject *py_dcerpc_sec_vt_header2_get_context_id(PyObject *obj, void *closure)
   10513             : {
   10514           0 :         struct dcerpc_sec_vt_header2 *object = (struct dcerpc_sec_vt_header2 *)pytalloc_get_ptr(obj);
   10515             :         PyObject *py_context_id;
   10516           0 :         py_context_id = PyLong_FromLong((uint16_t)object->context_id);
   10517           0 :         return py_context_id;
   10518             : }
   10519             : 
   10520           0 : static int py_dcerpc_sec_vt_header2_set_context_id(PyObject *py_obj, PyObject *value, void *closure)
   10521             : {
   10522           0 :         struct dcerpc_sec_vt_header2 *object = (struct dcerpc_sec_vt_header2 *)pytalloc_get_ptr(py_obj);
   10523           0 :         if (value == NULL) {
   10524           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->context_id");
   10525           0 :                 return -1;
   10526             :         }
   10527             :         {
   10528           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->context_id));
   10529           0 :                 if (PyLong_Check(value)) {
   10530             :                         unsigned long long test_var;
   10531           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10532           0 :                         if (PyErr_Occurred() != NULL) {
   10533           0 :                                 return -1;
   10534             :                         }
   10535           0 :                         if (test_var > uint_max) {
   10536           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10537             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10538           0 :                                 return -1;
   10539             :                         }
   10540           0 :                         object->context_id = test_var;
   10541             :                 } else {
   10542           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10543             :                           PyLong_Type.tp_name);
   10544           0 :                         return -1;
   10545             :                 }
   10546             :         }
   10547           0 :         return 0;
   10548             : }
   10549             : 
   10550           0 : static PyObject *py_dcerpc_sec_vt_header2_get_opnum(PyObject *obj, void *closure)
   10551             : {
   10552           0 :         struct dcerpc_sec_vt_header2 *object = (struct dcerpc_sec_vt_header2 *)pytalloc_get_ptr(obj);
   10553             :         PyObject *py_opnum;
   10554           0 :         py_opnum = PyLong_FromLong((uint16_t)object->opnum);
   10555           0 :         return py_opnum;
   10556             : }
   10557             : 
   10558           0 : static int py_dcerpc_sec_vt_header2_set_opnum(PyObject *py_obj, PyObject *value, void *closure)
   10559             : {
   10560           0 :         struct dcerpc_sec_vt_header2 *object = (struct dcerpc_sec_vt_header2 *)pytalloc_get_ptr(py_obj);
   10561           0 :         if (value == NULL) {
   10562           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->opnum");
   10563           0 :                 return -1;
   10564             :         }
   10565             :         {
   10566           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->opnum));
   10567           0 :                 if (PyLong_Check(value)) {
   10568             :                         unsigned long long test_var;
   10569           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10570           0 :                         if (PyErr_Occurred() != NULL) {
   10571           0 :                                 return -1;
   10572             :                         }
   10573           0 :                         if (test_var > uint_max) {
   10574           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10575             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10576           0 :                                 return -1;
   10577             :                         }
   10578           0 :                         object->opnum = test_var;
   10579             :                 } else {
   10580           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10581             :                           PyLong_Type.tp_name);
   10582           0 :                         return -1;
   10583             :                 }
   10584             :         }
   10585           0 :         return 0;
   10586             : }
   10587             : 
   10588             : static PyGetSetDef py_dcerpc_sec_vt_header2_getsetters[] = {
   10589             :         {
   10590             :                 .name = discard_const_p(char, "ptype"),
   10591             :                 .get = py_dcerpc_sec_vt_header2_get_ptype,
   10592             :                 .set = py_dcerpc_sec_vt_header2_set_ptype,
   10593             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dcerpc_pkt_type")
   10594             :         },
   10595             :         {
   10596             :                 .name = discard_const_p(char, "reserved1"),
   10597             :                 .get = py_dcerpc_sec_vt_header2_get_reserved1,
   10598             :                 .set = py_dcerpc_sec_vt_header2_set_reserved1,
   10599             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   10600             :         },
   10601             :         {
   10602             :                 .name = discard_const_p(char, "reserved2"),
   10603             :                 .get = py_dcerpc_sec_vt_header2_get_reserved2,
   10604             :                 .set = py_dcerpc_sec_vt_header2_set_reserved2,
   10605             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   10606             :         },
   10607             :         {
   10608             :                 .name = discard_const_p(char, "drep"),
   10609             :                 .get = py_dcerpc_sec_vt_header2_get_drep,
   10610             :                 .set = py_dcerpc_sec_vt_header2_set_drep,
   10611             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   10612             :         },
   10613             :         {
   10614             :                 .name = discard_const_p(char, "call_id"),
   10615             :                 .get = py_dcerpc_sec_vt_header2_get_call_id,
   10616             :                 .set = py_dcerpc_sec_vt_header2_set_call_id,
   10617             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10618             :         },
   10619             :         {
   10620             :                 .name = discard_const_p(char, "context_id"),
   10621             :                 .get = py_dcerpc_sec_vt_header2_get_context_id,
   10622             :                 .set = py_dcerpc_sec_vt_header2_set_context_id,
   10623             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   10624             :         },
   10625             :         {
   10626             :                 .name = discard_const_p(char, "opnum"),
   10627             :                 .get = py_dcerpc_sec_vt_header2_get_opnum,
   10628             :                 .set = py_dcerpc_sec_vt_header2_set_opnum,
   10629             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   10630             :         },
   10631             :         { .name = NULL }
   10632             : };
   10633             : 
   10634           0 : static PyObject *py_dcerpc_sec_vt_header2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10635             : {
   10636           0 :         return pytalloc_new(struct dcerpc_sec_vt_header2, type);
   10637             : }
   10638             : 
   10639             : 
   10640             : static PyTypeObject dcerpc_sec_vt_header2_Type = {
   10641             :         PyVarObject_HEAD_INIT(NULL, 0)
   10642             :         .tp_name = "dcerpc.sec_vt_header2",
   10643             :         .tp_getset = py_dcerpc_sec_vt_header2_getsetters,
   10644             :         .tp_methods = NULL,
   10645             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   10646             :         .tp_new = py_dcerpc_sec_vt_header2_new,
   10647             : };
   10648             : 
   10649           0 : static PyObject *py_import_dcerpc_sec_vt_union(TALLOC_CTX *mem_ctx, int level, union dcerpc_sec_vt_union *in)
   10650             : {
   10651             :         PyObject *ret;
   10652             : 
   10653           0 :         switch (level) {
   10654           0 :                 case DCERPC_SEC_VT_COMMAND_BITMASK1:
   10655           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)in->bitmask1);
   10656           0 :                         return ret;
   10657             : 
   10658           0 :                 case DCERPC_SEC_VT_COMMAND_PCONTEXT:
   10659           0 :                         ret = pytalloc_reference_ex(&dcerpc_sec_vt_pcontext_Type, mem_ctx, &in->pcontext);
   10660           0 :                         return ret;
   10661             : 
   10662           0 :                 case DCERPC_SEC_VT_COMMAND_HEADER2:
   10663           0 :                         ret = pytalloc_reference_ex(&dcerpc_sec_vt_header2_Type, mem_ctx, &in->header2);
   10664           0 :                         return ret;
   10665             : 
   10666           0 :                 default:
   10667           0 :                         ret = PyBytes_FromStringAndSize((char *)(in->_unknown).data, (in->_unknown).length);
   10668           0 :                         return ret;
   10669             : 
   10670             :         }
   10671             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   10672             :         return NULL;
   10673             : }
   10674             : 
   10675           0 : static union dcerpc_sec_vt_union *py_export_dcerpc_sec_vt_union(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   10676             : {
   10677           0 :         union dcerpc_sec_vt_union *ret = talloc_zero(mem_ctx, union dcerpc_sec_vt_union);
   10678           0 :         switch (level) {
   10679           0 :                 case DCERPC_SEC_VT_COMMAND_BITMASK1:
   10680           0 :                         if (in == NULL) {
   10681           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->bitmask1");
   10682           0 :                                 talloc_free(ret); return NULL;
   10683             :                         }
   10684             :                         {
   10685           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->bitmask1));
   10686           0 :                                 if (PyLong_Check(in)) {
   10687             :                                         unsigned long long test_var;
   10688           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   10689           0 :                                         if (PyErr_Occurred() != NULL) {
   10690           0 :                                                 talloc_free(ret); return NULL;
   10691             :                                         }
   10692           0 :                                         if (test_var > uint_max) {
   10693           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10694             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   10695           0 :                                                 talloc_free(ret); return NULL;
   10696             :                                         }
   10697           0 :                                         ret->bitmask1 = test_var;
   10698             :                                 } else {
   10699           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10700             :                                           PyLong_Type.tp_name);
   10701           0 :                                         talloc_free(ret); return NULL;
   10702             :                                 }
   10703             :                         }
   10704           0 :                         break;
   10705             : 
   10706           0 :                 case DCERPC_SEC_VT_COMMAND_PCONTEXT:
   10707           0 :                         if (in == NULL) {
   10708           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->pcontext");
   10709           0 :                                 talloc_free(ret); return NULL;
   10710             :                         }
   10711           0 :                         PY_CHECK_TYPE(&dcerpc_sec_vt_pcontext_Type, in, talloc_free(ret); return NULL;);
   10712           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10713           0 :                                 PyErr_NoMemory();
   10714           0 :                                 talloc_free(ret); return NULL;
   10715             :                         }
   10716           0 :                         ret->pcontext = *(struct dcerpc_sec_vt_pcontext *)pytalloc_get_ptr(in);
   10717           0 :                         break;
   10718             : 
   10719           0 :                 case DCERPC_SEC_VT_COMMAND_HEADER2:
   10720           0 :                         if (in == NULL) {
   10721           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->header2");
   10722           0 :                                 talloc_free(ret); return NULL;
   10723             :                         }
   10724           0 :                         PY_CHECK_TYPE(&dcerpc_sec_vt_header2_Type, in, talloc_free(ret); return NULL;);
   10725           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   10726           0 :                                 PyErr_NoMemory();
   10727           0 :                                 talloc_free(ret); return NULL;
   10728             :                         }
   10729           0 :                         ret->header2 = *(struct dcerpc_sec_vt_header2 *)pytalloc_get_ptr(in);
   10730           0 :                         break;
   10731             : 
   10732           0 :                 default:
   10733           0 :                         if (in == NULL) {
   10734           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->_unknown");
   10735           0 :                                 talloc_free(ret); return NULL;
   10736             :                         }
   10737           0 :                         ret->_unknown = data_blob_talloc(mem_ctx, PyBytes_AS_STRING(in), PyBytes_GET_SIZE(in));
   10738           0 :                         break;
   10739             : 
   10740             :         }
   10741             : 
   10742           0 :         return ret;
   10743             : }
   10744             : 
   10745           0 : static PyObject *py_dcerpc_sec_vt_union_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10746             : {
   10747           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   10748           0 :         PyObject *mem_ctx_obj = NULL;
   10749           0 :         TALLOC_CTX *mem_ctx = NULL;
   10750           0 :         int level = 0;
   10751           0 :         PyObject *in_obj = NULL;
   10752           0 :         union dcerpc_sec_vt_union *in = NULL;
   10753             : 
   10754           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   10755             :                 discard_const_p(char *, kwnames),
   10756             :                 &mem_ctx_obj,
   10757             :                 &level,
   10758             :                 &in_obj)) {
   10759           0 :                 return NULL;
   10760             :         }
   10761           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   10762           0 :         if (mem_ctx == NULL) {
   10763           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   10764           0 :                 return NULL;
   10765             :         }
   10766           0 :         in = (union dcerpc_sec_vt_union *)pytalloc_get_ptr(in_obj);
   10767           0 :         if (in == NULL) {
   10768           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union dcerpc_sec_vt_union!");
   10769           0 :                 return NULL;
   10770             :         }
   10771             : 
   10772           0 :         return py_import_dcerpc_sec_vt_union(mem_ctx, level, in);
   10773             : }
   10774             : 
   10775           0 : static PyObject *py_dcerpc_sec_vt_union_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10776             : {
   10777           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   10778           0 :         PyObject *mem_ctx_obj = NULL;
   10779           0 :         TALLOC_CTX *mem_ctx = NULL;
   10780           0 :         int level = 0;
   10781           0 :         PyObject *in = NULL;
   10782           0 :         union dcerpc_sec_vt_union *out = NULL;
   10783             : 
   10784           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   10785             :                 discard_const_p(char *, kwnames),
   10786             :                 &mem_ctx_obj,
   10787             :                 &level,
   10788             :                 &in)) {
   10789           0 :                 return NULL;
   10790             :         }
   10791           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   10792           0 :         if (mem_ctx == NULL) {
   10793           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   10794           0 :                 return NULL;
   10795             :         }
   10796             : 
   10797           0 :         out = py_export_dcerpc_sec_vt_union(mem_ctx, level, in);
   10798           0 :         if (out == NULL) {
   10799           0 :                 return NULL;
   10800             :         }
   10801             : 
   10802           0 :         return pytalloc_GenericObject_reference(out);
   10803             : }
   10804             : 
   10805             : static PyMethodDef py_dcerpc_sec_vt_union_methods[] = {
   10806             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_sec_vt_union_import),
   10807             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   10808             :                 "T.__import__(mem_ctx, level, in) => ret." },
   10809             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_sec_vt_union_export),
   10810             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   10811             :                 "T.__export__(mem_ctx, level, in) => ret." },
   10812             :         { NULL, NULL, 0, NULL }
   10813             : };
   10814             : 
   10815           0 : static PyObject *py_dcerpc_sec_vt_union_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10816             : {
   10817           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   10818           0 :         return NULL;
   10819             : }
   10820             : 
   10821             : 
   10822             : static PyTypeObject dcerpc_sec_vt_union_Type = {
   10823             :         PyVarObject_HEAD_INIT(NULL, 0)
   10824             :         .tp_name = "dcerpc.sec_vt_union",
   10825             :         .tp_getset = NULL,
   10826             :         .tp_methods = py_dcerpc_sec_vt_union_methods,
   10827             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   10828             :         .tp_new = py_dcerpc_sec_vt_union_new,
   10829             : };
   10830             : 
   10831             : 
   10832           0 : static PyObject *py_dcerpc_sec_vt_get_command(PyObject *obj, void *closure)
   10833             : {
   10834           0 :         struct dcerpc_sec_vt *object = (struct dcerpc_sec_vt *)pytalloc_get_ptr(obj);
   10835             :         PyObject *py_command;
   10836           0 :         py_command = PyLong_FromLong((uint16_t)object->command);
   10837           0 :         return py_command;
   10838             : }
   10839             : 
   10840           0 : static int py_dcerpc_sec_vt_set_command(PyObject *py_obj, PyObject *value, void *closure)
   10841             : {
   10842           0 :         struct dcerpc_sec_vt *object = (struct dcerpc_sec_vt *)pytalloc_get_ptr(py_obj);
   10843           0 :         if (value == NULL) {
   10844           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->command");
   10845           0 :                 return -1;
   10846             :         }
   10847             :         {
   10848           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->command));
   10849           0 :                 if (PyLong_Check(value)) {
   10850             :                         unsigned long long test_var;
   10851           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10852           0 :                         if (PyErr_Occurred() != NULL) {
   10853           0 :                                 return -1;
   10854             :                         }
   10855           0 :                         if (test_var > uint_max) {
   10856           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10857             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10858           0 :                                 return -1;
   10859             :                         }
   10860           0 :                         object->command = test_var;
   10861             :                 } else {
   10862           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10863             :                           PyLong_Type.tp_name);
   10864           0 :                         return -1;
   10865             :                 }
   10866             :         }
   10867           0 :         return 0;
   10868             : }
   10869             : 
   10870           0 : static PyObject *py_dcerpc_sec_vt_get_u(PyObject *obj, void *closure)
   10871             : {
   10872           0 :         struct dcerpc_sec_vt *object = (struct dcerpc_sec_vt *)pytalloc_get_ptr(obj);
   10873             :         PyObject *py_u;
   10874           0 :         py_u = pyrpc_import_union(&dcerpc_sec_vt_union_Type, pytalloc_get_mem_ctx(obj), object->command & DCERPC_SEC_VT_COMMAND_ENUM, &object->u, "union dcerpc_sec_vt_union");
   10875           0 :         if (py_u == NULL) {
   10876           0 :                 return NULL;
   10877             :         }
   10878           0 :         return py_u;
   10879             : }
   10880             : 
   10881           0 : static int py_dcerpc_sec_vt_set_u(PyObject *py_obj, PyObject *value, void *closure)
   10882             : {
   10883           0 :         struct dcerpc_sec_vt *object = (struct dcerpc_sec_vt *)pytalloc_get_ptr(py_obj);
   10884           0 :         if (value == NULL) {
   10885           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->u");
   10886           0 :                 return -1;
   10887             :         }
   10888             :         {
   10889             :                 union dcerpc_sec_vt_union *u_switch_1;
   10890           0 :                 u_switch_1 = (union dcerpc_sec_vt_union *)pyrpc_export_union(&dcerpc_sec_vt_union_Type, pytalloc_get_mem_ctx(py_obj), object->command & DCERPC_SEC_VT_COMMAND_ENUM, value, "union dcerpc_sec_vt_union");
   10891           0 :                 if (u_switch_1 == NULL) {
   10892           0 :                         return -1;
   10893             :                 }
   10894           0 :                 object->u = *u_switch_1;
   10895             :         }
   10896           0 :         return 0;
   10897             : }
   10898             : 
   10899             : static PyGetSetDef py_dcerpc_sec_vt_getsetters[] = {
   10900             :         {
   10901             :                 .name = discard_const_p(char, "command"),
   10902             :                 .get = py_dcerpc_sec_vt_get_command,
   10903             :                 .set = py_dcerpc_sec_vt_set_command,
   10904             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dcerpc_sec_vt_command")
   10905             :         },
   10906             :         {
   10907             :                 .name = discard_const_p(char, "u"),
   10908             :                 .get = py_dcerpc_sec_vt_get_u,
   10909             :                 .set = py_dcerpc_sec_vt_set_u,
   10910             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dcerpc_sec_vt_union")
   10911             :         },
   10912             :         { .name = NULL }
   10913             : };
   10914             : 
   10915           0 : static PyObject *py_dcerpc_sec_vt_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10916             : {
   10917           0 :         return pytalloc_new(struct dcerpc_sec_vt, type);
   10918             : }
   10919             : 
   10920             : 
   10921             : static PyTypeObject dcerpc_sec_vt_Type = {
   10922             :         PyVarObject_HEAD_INIT(NULL, 0)
   10923             :         .tp_name = "dcerpc.sec_vt",
   10924             :         .tp_getset = py_dcerpc_sec_vt_getsetters,
   10925             :         .tp_methods = NULL,
   10926             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   10927             :         .tp_new = py_dcerpc_sec_vt_new,
   10928             : };
   10929             : 
   10930             : 
   10931           0 : static PyObject *py_dcerpc_sec_vt_count_get_count(PyObject *obj, void *closure)
   10932             : {
   10933           0 :         struct dcerpc_sec_vt_count *object = (struct dcerpc_sec_vt_count *)pytalloc_get_ptr(obj);
   10934             :         PyObject *py_count;
   10935           0 :         py_count = PyLong_FromLong((uint16_t)object->count);
   10936           0 :         return py_count;
   10937             : }
   10938             : 
   10939           0 : static int py_dcerpc_sec_vt_count_set_count(PyObject *py_obj, PyObject *value, void *closure)
   10940             : {
   10941           0 :         struct dcerpc_sec_vt_count *object = (struct dcerpc_sec_vt_count *)pytalloc_get_ptr(py_obj);
   10942           0 :         if (value == NULL) {
   10943           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   10944           0 :                 return -1;
   10945             :         }
   10946             :         {
   10947           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   10948           0 :                 if (PyLong_Check(value)) {
   10949             :                         unsigned long long test_var;
   10950           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10951           0 :                         if (PyErr_Occurred() != NULL) {
   10952           0 :                                 return -1;
   10953             :                         }
   10954           0 :                         if (test_var > uint_max) {
   10955           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10956             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10957           0 :                                 return -1;
   10958             :                         }
   10959           0 :                         object->count = test_var;
   10960             :                 } else {
   10961           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10962             :                           PyLong_Type.tp_name);
   10963           0 :                         return -1;
   10964             :                 }
   10965             :         }
   10966           0 :         return 0;
   10967             : }
   10968             : 
   10969             : static PyGetSetDef py_dcerpc_sec_vt_count_getsetters[] = {
   10970             :         {
   10971             :                 .name = discard_const_p(char, "count"),
   10972             :                 .get = py_dcerpc_sec_vt_count_get_count,
   10973             :                 .set = py_dcerpc_sec_vt_count_set_count,
   10974             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   10975             :         },
   10976             :         { .name = NULL }
   10977             : };
   10978             : 
   10979           0 : static PyObject *py_dcerpc_sec_vt_count_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10980             : {
   10981           0 :         return pytalloc_new(struct dcerpc_sec_vt_count, type);
   10982             : }
   10983             : 
   10984           0 : static PyObject *py_dcerpc_sec_vt_count_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   10985             : {
   10986           0 :         struct dcerpc_sec_vt_count *object = (struct dcerpc_sec_vt_count *)pytalloc_get_ptr(py_obj);
   10987           0 :         PyObject *ret = NULL;
   10988             :         DATA_BLOB blob;
   10989             :         enum ndr_err_code err;
   10990           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   10991           0 :         if (tmp_ctx == NULL) {
   10992           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   10993           0 :                 return NULL;
   10994             :         }
   10995           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_dcerpc_sec_vt_count);
   10996           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   10997           0 :                 TALLOC_FREE(tmp_ctx);
   10998           0 :                 PyErr_SetNdrError(err);
   10999           0 :                 return NULL;
   11000             :         }
   11001             : 
   11002           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   11003           0 :         TALLOC_FREE(tmp_ctx);
   11004           0 :         return ret;
   11005             : }
   11006             : 
   11007           0 : static PyObject *py_dcerpc_sec_vt_count_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   11008             : {
   11009           0 :         struct dcerpc_sec_vt_count *object = (struct dcerpc_sec_vt_count *)pytalloc_get_ptr(py_obj);
   11010           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   11011           0 :         Py_ssize_t blob_length = 0;
   11012             :         enum ndr_err_code err;
   11013           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   11014           0 :         PyObject *allow_remaining_obj = NULL;
   11015           0 :         bool allow_remaining = false;
   11016             : 
   11017           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   11018             :                 discard_const_p(char *, kwnames),
   11019             :                 &blob.data, &blob_length,
   11020             :                 &allow_remaining_obj)) {
   11021           0 :                 return NULL;
   11022             :         }
   11023           0 :         blob.length = blob_length;
   11024             : 
   11025           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   11026           0 :                 allow_remaining = true;
   11027             :         }
   11028             : 
   11029           0 :         if (allow_remaining) {
   11030           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_sec_vt_count);
   11031             :         } else {
   11032           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_sec_vt_count);
   11033             :         }
   11034           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   11035           0 :                 PyErr_SetNdrError(err);
   11036           0 :                 return NULL;
   11037             :         }
   11038             : 
   11039           0 :         Py_RETURN_NONE;
   11040             : }
   11041             : 
   11042           0 : static PyObject *py_dcerpc_sec_vt_count_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   11043             : {
   11044           0 :         struct dcerpc_sec_vt_count *object = (struct dcerpc_sec_vt_count *)pytalloc_get_ptr(py_obj);
   11045             :         PyObject *ret;
   11046             :         char *retstr;
   11047             : 
   11048           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_dcerpc_sec_vt_count, "dcerpc_sec_vt_count", object);
   11049           0 :         ret = PyUnicode_FromString(retstr);
   11050           0 :         talloc_free(retstr);
   11051             : 
   11052           0 :         return ret;
   11053             : }
   11054             : 
   11055             : static PyMethodDef py_dcerpc_sec_vt_count_methods[] = {
   11056             :         { "__ndr_pack__", (PyCFunction)py_dcerpc_sec_vt_count_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   11057             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_sec_vt_count_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
   11058             :         { "__ndr_print__", (PyCFunction)py_dcerpc_sec_vt_count_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   11059             :         { NULL, NULL, 0, NULL }
   11060             : };
   11061             : 
   11062             : 
   11063             : static PyTypeObject dcerpc_sec_vt_count_Type = {
   11064             :         PyVarObject_HEAD_INIT(NULL, 0)
   11065             :         .tp_name = "dcerpc.sec_vt_count",
   11066             :         .tp_getset = py_dcerpc_sec_vt_count_getsetters,
   11067             :         .tp_methods = py_dcerpc_sec_vt_count_methods,
   11068             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   11069             :         .tp_new = py_dcerpc_sec_vt_count_new,
   11070             : };
   11071             : 
   11072             : 
   11073           0 : static PyObject *py_dcerpc_sec_verification_trailer_get__pad(PyObject *obj, void *closure)
   11074             : {
   11075           0 :         struct dcerpc_sec_verification_trailer *object = (struct dcerpc_sec_verification_trailer *)pytalloc_get_ptr(obj);
   11076             :         PyObject *py__pad;
   11077           0 :         py__pad = PyBytes_FromStringAndSize((char *)(object->_pad).data, (object->_pad).length);
   11078           0 :         return py__pad;
   11079             : }
   11080             : 
   11081           0 : static int py_dcerpc_sec_verification_trailer_set__pad(PyObject *py_obj, PyObject *value, void *closure)
   11082             : {
   11083           0 :         struct dcerpc_sec_verification_trailer *object = (struct dcerpc_sec_verification_trailer *)pytalloc_get_ptr(py_obj);
   11084           0 :         if (value == NULL) {
   11085           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->_pad");
   11086           0 :                 return -1;
   11087             :         }
   11088           0 :         object->_pad = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
   11089           0 :         return 0;
   11090             : }
   11091             : 
   11092           0 : static PyObject *py_dcerpc_sec_verification_trailer_get_magic(PyObject *obj, void *closure)
   11093             : {
   11094           0 :         struct dcerpc_sec_verification_trailer *object = (struct dcerpc_sec_verification_trailer *)pytalloc_get_ptr(obj);
   11095             :         PyObject *py_magic;
   11096           0 :         py_magic = PyList_New(8);
   11097           0 :         if (py_magic == NULL) {
   11098           0 :                 return NULL;
   11099             :         }
   11100             :         {
   11101             :                 int magic_cntr_0;
   11102           0 :                 for (magic_cntr_0 = 0; magic_cntr_0 < (8); magic_cntr_0++) {
   11103             :                         PyObject *py_magic_0;
   11104           0 :                         py_magic_0 = PyLong_FromLong((uint16_t)object->magic[magic_cntr_0]);
   11105           0 :                         PyList_SetItem(py_magic, magic_cntr_0, py_magic_0);
   11106             :                 }
   11107             :         }
   11108           0 :         return py_magic;
   11109             : }
   11110             : 
   11111           0 : static int py_dcerpc_sec_verification_trailer_set_magic(PyObject *py_obj, PyObject *value, void *closure)
   11112             : {
   11113           0 :         struct dcerpc_sec_verification_trailer *object = (struct dcerpc_sec_verification_trailer *)pytalloc_get_ptr(py_obj);
   11114           0 :         if (value == NULL) {
   11115           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->magic");
   11116           0 :                 return -1;
   11117             :         }
   11118           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   11119             :         {
   11120             :                 int magic_cntr_0;
   11121           0 :                 if (ARRAY_SIZE(object->magic) != PyList_GET_SIZE(value)) {
   11122           0 :                         PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->magic),  PyList_GET_SIZE(value));
   11123           0 :                         return -1;
   11124             :                 }
   11125           0 :                 for (magic_cntr_0 = 0; magic_cntr_0 < PyList_GET_SIZE(value); magic_cntr_0++) {
   11126           0 :                         if (PyList_GET_ITEM(value, magic_cntr_0) == NULL) {
   11127           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->magic[magic_cntr_0]");
   11128           0 :                                 return -1;
   11129             :                         }
   11130             :                         {
   11131           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->magic[magic_cntr_0]));
   11132           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, magic_cntr_0))) {
   11133             :                                         unsigned long long test_var;
   11134           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, magic_cntr_0));
   11135           0 :                                         if (PyErr_Occurred() != NULL) {
   11136           0 :                                                 return -1;
   11137             :                                         }
   11138           0 :                                         if (test_var > uint_max) {
   11139           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11140             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   11141           0 :                                                 return -1;
   11142             :                                         }
   11143           0 :                                         object->magic[magic_cntr_0] = test_var;
   11144             :                                 } else {
   11145           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11146             :                                           PyLong_Type.tp_name);
   11147           0 :                                         return -1;
   11148             :                                 }
   11149             :                         }
   11150             :                 }
   11151             :         }
   11152           0 :         return 0;
   11153             : }
   11154             : 
   11155           0 : static PyObject *py_dcerpc_sec_verification_trailer_get_count(PyObject *obj, void *closure)
   11156             : {
   11157           0 :         struct dcerpc_sec_verification_trailer *object = (struct dcerpc_sec_verification_trailer *)pytalloc_get_ptr(obj);
   11158             :         PyObject *py_count;
   11159           0 :         py_count = pytalloc_reference_ex(&dcerpc_sec_vt_count_Type, pytalloc_get_mem_ctx(obj), &object->count);
   11160           0 :         return py_count;
   11161             : }
   11162             : 
   11163           0 : static int py_dcerpc_sec_verification_trailer_set_count(PyObject *py_obj, PyObject *value, void *closure)
   11164             : {
   11165           0 :         struct dcerpc_sec_verification_trailer *object = (struct dcerpc_sec_verification_trailer *)pytalloc_get_ptr(py_obj);
   11166           0 :         if (value == NULL) {
   11167           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   11168           0 :                 return -1;
   11169             :         }
   11170           0 :         PY_CHECK_TYPE(&dcerpc_sec_vt_count_Type, value, return -1;);
   11171           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   11172           0 :                 PyErr_NoMemory();
   11173           0 :                 return -1;
   11174             :         }
   11175           0 :         object->count = *(struct dcerpc_sec_vt_count *)pytalloc_get_ptr(value);
   11176           0 :         return 0;
   11177             : }
   11178             : 
   11179           0 : static PyObject *py_dcerpc_sec_verification_trailer_get_commands(PyObject *obj, void *closure)
   11180             : {
   11181           0 :         struct dcerpc_sec_verification_trailer *object = (struct dcerpc_sec_verification_trailer *)pytalloc_get_ptr(obj);
   11182             :         PyObject *py_commands;
   11183           0 :         py_commands = PyList_New(object->count.count);
   11184           0 :         if (py_commands == NULL) {
   11185           0 :                 return NULL;
   11186             :         }
   11187             :         {
   11188             :                 int commands_cntr_0;
   11189           0 :                 for (commands_cntr_0 = 0; commands_cntr_0 < (object->count.count); commands_cntr_0++) {
   11190             :                         PyObject *py_commands_0;
   11191           0 :                         py_commands_0 = pytalloc_reference_ex(&dcerpc_sec_vt_Type, object->commands, &object->commands[commands_cntr_0]);
   11192           0 :                         PyList_SetItem(py_commands, commands_cntr_0, py_commands_0);
   11193             :                 }
   11194             :         }
   11195           0 :         return py_commands;
   11196             : }
   11197             : 
   11198           0 : static int py_dcerpc_sec_verification_trailer_set_commands(PyObject *py_obj, PyObject *value, void *closure)
   11199             : {
   11200           0 :         struct dcerpc_sec_verification_trailer *object = (struct dcerpc_sec_verification_trailer *)pytalloc_get_ptr(py_obj);
   11201           0 :         if (value == NULL) {
   11202           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->commands");
   11203           0 :                 return -1;
   11204             :         }
   11205           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   11206             :         {
   11207             :                 int commands_cntr_0;
   11208           0 :                 object->commands = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->commands, PyList_GET_SIZE(value));
   11209           0 :                 if (!object->commands) { return -1;; }
   11210           0 :                 talloc_set_name_const(object->commands, "ARRAY: object->commands");
   11211           0 :                 for (commands_cntr_0 = 0; commands_cntr_0 < PyList_GET_SIZE(value); commands_cntr_0++) {
   11212           0 :                         if (PyList_GET_ITEM(value, commands_cntr_0) == NULL) {
   11213           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->commands[commands_cntr_0]");
   11214           0 :                                 return -1;
   11215             :                         }
   11216           0 :                         PY_CHECK_TYPE(&dcerpc_sec_vt_Type, PyList_GET_ITEM(value, commands_cntr_0), return -1;);
   11217           0 :                         if (talloc_reference(object->commands, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, commands_cntr_0))) == NULL) {
   11218           0 :                                 PyErr_NoMemory();
   11219           0 :                                 return -1;
   11220             :                         }
   11221           0 :                         object->commands[commands_cntr_0] = *(struct dcerpc_sec_vt *)pytalloc_get_ptr(PyList_GET_ITEM(value, commands_cntr_0));
   11222             :                 }
   11223             :         }
   11224           0 :         return 0;
   11225             : }
   11226             : 
   11227             : static PyGetSetDef py_dcerpc_sec_verification_trailer_getsetters[] = {
   11228             :         {
   11229             :                 .name = discard_const_p(char, "_pad"),
   11230             :                 .get = py_dcerpc_sec_verification_trailer_get__pad,
   11231             :                 .set = py_dcerpc_sec_verification_trailer_set__pad,
   11232             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
   11233             :         },
   11234             :         {
   11235             :                 .name = discard_const_p(char, "magic"),
   11236             :                 .get = py_dcerpc_sec_verification_trailer_get_magic,
   11237             :                 .set = py_dcerpc_sec_verification_trailer_set_magic,
   11238             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   11239             :         },
   11240             :         {
   11241             :                 .name = discard_const_p(char, "count"),
   11242             :                 .get = py_dcerpc_sec_verification_trailer_get_count,
   11243             :                 .set = py_dcerpc_sec_verification_trailer_set_count,
   11244             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dcerpc_sec_vt_count")
   11245             :         },
   11246             :         {
   11247             :                 .name = discard_const_p(char, "commands"),
   11248             :                 .get = py_dcerpc_sec_verification_trailer_get_commands,
   11249             :                 .set = py_dcerpc_sec_verification_trailer_set_commands,
   11250             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dcerpc_sec_vt")
   11251             :         },
   11252             :         { .name = NULL }
   11253             : };
   11254             : 
   11255           0 : static PyObject *py_dcerpc_sec_verification_trailer_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   11256             : {
   11257           0 :         return pytalloc_new(struct dcerpc_sec_verification_trailer, type);
   11258             : }
   11259             : 
   11260           0 : static PyObject *py_dcerpc_sec_verification_trailer_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   11261             : {
   11262           0 :         struct dcerpc_sec_verification_trailer *object = (struct dcerpc_sec_verification_trailer *)pytalloc_get_ptr(py_obj);
   11263           0 :         PyObject *ret = NULL;
   11264             :         DATA_BLOB blob;
   11265             :         enum ndr_err_code err;
   11266           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   11267           0 :         if (tmp_ctx == NULL) {
   11268           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   11269           0 :                 return NULL;
   11270             :         }
   11271           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_dcerpc_sec_verification_trailer);
   11272           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   11273           0 :                 TALLOC_FREE(tmp_ctx);
   11274           0 :                 PyErr_SetNdrError(err);
   11275           0 :                 return NULL;
   11276             :         }
   11277             : 
   11278           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   11279           0 :         TALLOC_FREE(tmp_ctx);
   11280           0 :         return ret;
   11281             : }
   11282             : 
   11283           0 : static PyObject *py_dcerpc_sec_verification_trailer_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   11284             : {
   11285           0 :         struct dcerpc_sec_verification_trailer *object = (struct dcerpc_sec_verification_trailer *)pytalloc_get_ptr(py_obj);
   11286           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   11287           0 :         Py_ssize_t blob_length = 0;
   11288             :         enum ndr_err_code err;
   11289           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   11290           0 :         PyObject *allow_remaining_obj = NULL;
   11291           0 :         bool allow_remaining = false;
   11292             : 
   11293           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   11294             :                 discard_const_p(char *, kwnames),
   11295             :                 &blob.data, &blob_length,
   11296             :                 &allow_remaining_obj)) {
   11297           0 :                 return NULL;
   11298             :         }
   11299           0 :         blob.length = blob_length;
   11300             : 
   11301           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   11302           0 :                 allow_remaining = true;
   11303             :         }
   11304             : 
   11305           0 :         if (allow_remaining) {
   11306           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_sec_verification_trailer);
   11307             :         } else {
   11308           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_dcerpc_sec_verification_trailer);
   11309             :         }
   11310           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   11311           0 :                 PyErr_SetNdrError(err);
   11312           0 :                 return NULL;
   11313             :         }
   11314             : 
   11315           0 :         Py_RETURN_NONE;
   11316             : }
   11317             : 
   11318           0 : static PyObject *py_dcerpc_sec_verification_trailer_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   11319             : {
   11320           0 :         struct dcerpc_sec_verification_trailer *object = (struct dcerpc_sec_verification_trailer *)pytalloc_get_ptr(py_obj);
   11321             :         PyObject *ret;
   11322             :         char *retstr;
   11323             : 
   11324           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_dcerpc_sec_verification_trailer, "dcerpc_sec_verification_trailer", object);
   11325           0 :         ret = PyUnicode_FromString(retstr);
   11326           0 :         talloc_free(retstr);
   11327             : 
   11328           0 :         return ret;
   11329             : }
   11330             : 
   11331             : static PyMethodDef py_dcerpc_sec_verification_trailer_methods[] = {
   11332             :         { "__ndr_pack__", (PyCFunction)py_dcerpc_sec_verification_trailer_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   11333             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_dcerpc_sec_verification_trailer_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
   11334             :         { "__ndr_print__", (PyCFunction)py_dcerpc_sec_verification_trailer_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   11335             :         { NULL, NULL, 0, NULL }
   11336             : };
   11337             : 
   11338             : 
   11339             : static PyTypeObject dcerpc_sec_verification_trailer_Type = {
   11340             :         PyVarObject_HEAD_INIT(NULL, 0)
   11341             :         .tp_name = "dcerpc.sec_verification_trailer",
   11342             :         .tp_getset = py_dcerpc_sec_verification_trailer_getsetters,
   11343             :         .tp_methods = py_dcerpc_sec_verification_trailer_methods,
   11344             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   11345             :         .tp_new = py_dcerpc_sec_verification_trailer_new,
   11346             : };
   11347             : 
   11348             : static PyMethodDef dcerpc_methods[] = {
   11349             :         { NULL, NULL, 0, NULL }
   11350             : };
   11351             : 
   11352             : static struct PyModuleDef moduledef = {
   11353             :         PyModuleDef_HEAD_INIT,
   11354             :         .m_name = "dcerpc",
   11355             :         .m_doc = "dcerpc DCE/RPC",
   11356             :         .m_size = -1,
   11357             :         .m_methods = dcerpc_methods,
   11358             : };
   11359         459 : MODULE_INIT_FUNC(dcerpc)
   11360             : {
   11361         459 :         PyObject *m = NULL;
   11362         459 :         PyObject *dep_samba_dcerpc_misc = NULL;
   11363         459 :         PyObject *dep_talloc = NULL;
   11364             : 
   11365         459 :         dep_samba_dcerpc_misc = PyImport_ImportModule("samba.dcerpc.misc");
   11366         459 :         if (dep_samba_dcerpc_misc == NULL)
   11367           0 :                 goto out;
   11368             : 
   11369         459 :         dep_talloc = PyImport_ImportModule("talloc");
   11370         459 :         if (dep_talloc == NULL)
   11371           0 :                 goto out;
   11372             : 
   11373         459 :         ndr_syntax_id_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "ndr_syntax_id");
   11374         459 :         if (ndr_syntax_id_Type == NULL)
   11375           0 :                 goto out;
   11376             : 
   11377         459 :         BaseObject_Type = (PyTypeObject *)PyObject_GetAttrString(dep_talloc, "BaseObject");
   11378         459 :         if (BaseObject_Type == NULL)
   11379           0 :                 goto out;
   11380             : 
   11381         459 :         GUID_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "GUID");
   11382         459 :         if (GUID_Type == NULL)
   11383           0 :                 goto out;
   11384             : 
   11385         459 :         dcerpc_ctx_list_Type.tp_base = BaseObject_Type;
   11386         459 :         dcerpc_ctx_list_Type.tp_basicsize = pytalloc_BaseObject_size();
   11387             : 
   11388         459 :         dcerpc_bind_Type.tp_base = BaseObject_Type;
   11389         459 :         dcerpc_bind_Type.tp_basicsize = pytalloc_BaseObject_size();
   11390             : 
   11391         459 :         dcerpc_empty_Type.tp_base = BaseObject_Type;
   11392         459 :         dcerpc_empty_Type.tp_basicsize = pytalloc_BaseObject_size();
   11393             : 
   11394         459 :         dcerpc_object_Type.tp_base = BaseObject_Type;
   11395         459 :         dcerpc_object_Type.tp_basicsize = pytalloc_BaseObject_size();
   11396             : 
   11397         459 :         dcerpc_request_Type.tp_base = BaseObject_Type;
   11398         459 :         dcerpc_request_Type.tp_basicsize = pytalloc_BaseObject_size();
   11399             : 
   11400         459 :         dcerpc_bind_ack_reason_Type.tp_base = BaseObject_Type;
   11401         459 :         dcerpc_bind_ack_reason_Type.tp_basicsize = pytalloc_BaseObject_size();
   11402             : 
   11403         459 :         dcerpc_ack_ctx_Type.tp_base = BaseObject_Type;
   11404         459 :         dcerpc_ack_ctx_Type.tp_basicsize = pytalloc_BaseObject_size();
   11405             : 
   11406         459 :         dcerpc_bind_ack_Type.tp_base = BaseObject_Type;
   11407         459 :         dcerpc_bind_ack_Type.tp_basicsize = pytalloc_BaseObject_size();
   11408             : 
   11409         459 :         dcerpc_bind_nak_version_Type.tp_base = BaseObject_Type;
   11410         459 :         dcerpc_bind_nak_version_Type.tp_basicsize = pytalloc_BaseObject_size();
   11411             : 
   11412         459 :         dcerpc_bind_nak_Type.tp_base = BaseObject_Type;
   11413         459 :         dcerpc_bind_nak_Type.tp_basicsize = pytalloc_BaseObject_size();
   11414             : 
   11415         459 :         dcerpc_response_Type.tp_base = BaseObject_Type;
   11416         459 :         dcerpc_response_Type.tp_basicsize = pytalloc_BaseObject_size();
   11417             : 
   11418         459 :         dcerpc_fault_Type.tp_base = BaseObject_Type;
   11419         459 :         dcerpc_fault_Type.tp_basicsize = pytalloc_BaseObject_size();
   11420             : 
   11421         459 :         dcerpc_auth_Type.tp_base = BaseObject_Type;
   11422         459 :         dcerpc_auth_Type.tp_basicsize = pytalloc_BaseObject_size();
   11423             : 
   11424         459 :         dcerpc_auth3_Type.tp_base = BaseObject_Type;
   11425         459 :         dcerpc_auth3_Type.tp_basicsize = pytalloc_BaseObject_size();
   11426             : 
   11427         459 :         dcerpc_orphaned_Type.tp_base = BaseObject_Type;
   11428         459 :         dcerpc_orphaned_Type.tp_basicsize = pytalloc_BaseObject_size();
   11429             : 
   11430         459 :         dcerpc_co_cancel_Type.tp_base = BaseObject_Type;
   11431         459 :         dcerpc_co_cancel_Type.tp_basicsize = pytalloc_BaseObject_size();
   11432             : 
   11433         459 :         dcerpc_cl_cancel_Type.tp_base = BaseObject_Type;
   11434         459 :         dcerpc_cl_cancel_Type.tp_basicsize = pytalloc_BaseObject_size();
   11435             : 
   11436         459 :         dcerpc_cancel_ack_Type.tp_base = BaseObject_Type;
   11437         459 :         dcerpc_cancel_ack_Type.tp_basicsize = pytalloc_BaseObject_size();
   11438             : 
   11439         459 :         dcerpc_fack_Type.tp_base = BaseObject_Type;
   11440         459 :         dcerpc_fack_Type.tp_basicsize = pytalloc_BaseObject_size();
   11441             : 
   11442         459 :         dcerpc_ack_Type.tp_base = BaseObject_Type;
   11443         459 :         dcerpc_ack_Type.tp_basicsize = pytalloc_BaseObject_size();
   11444             : 
   11445         459 :         dcerpc_ping_Type.tp_base = BaseObject_Type;
   11446         459 :         dcerpc_ping_Type.tp_basicsize = pytalloc_BaseObject_size();
   11447             : 
   11448         459 :         dcerpc_shutdown_Type.tp_base = BaseObject_Type;
   11449         459 :         dcerpc_shutdown_Type.tp_basicsize = pytalloc_BaseObject_size();
   11450             : 
   11451         459 :         dcerpc_working_Type.tp_base = BaseObject_Type;
   11452         459 :         dcerpc_working_Type.tp_basicsize = pytalloc_BaseObject_size();
   11453             : 
   11454         459 :         RTSCookie_Type.tp_base = BaseObject_Type;
   11455         459 :         RTSCookie_Type.tp_basicsize = pytalloc_BaseObject_size();
   11456             : 
   11457         459 :         ClientAddressType_Type.tp_base = BaseObject_Type;
   11458         459 :         ClientAddressType_Type.tp_basicsize = pytalloc_BaseObject_size();
   11459             : 
   11460         459 :         ClientAddress_Type.tp_base = BaseObject_Type;
   11461         459 :         ClientAddress_Type.tp_basicsize = pytalloc_BaseObject_size();
   11462             : 
   11463         459 :         FlowControlAcknowledgment_Type.tp_base = BaseObject_Type;
   11464         459 :         FlowControlAcknowledgment_Type.tp_basicsize = pytalloc_BaseObject_size();
   11465             : 
   11466         459 :         dcerpc_rts_cmd_ReceiveWindowSize_Type.tp_base = BaseObject_Type;
   11467         459 :         dcerpc_rts_cmd_ReceiveWindowSize_Type.tp_basicsize = pytalloc_BaseObject_size();
   11468             : 
   11469         459 :         dcerpc_rts_cmd_FlowControlAck_Type.tp_base = BaseObject_Type;
   11470         459 :         dcerpc_rts_cmd_FlowControlAck_Type.tp_basicsize = pytalloc_BaseObject_size();
   11471             : 
   11472         459 :         dcerpc_rts_cmd_ConnectionTimeout_Type.tp_base = BaseObject_Type;
   11473         459 :         dcerpc_rts_cmd_ConnectionTimeout_Type.tp_basicsize = pytalloc_BaseObject_size();
   11474             : 
   11475         459 :         dcerpc_rts_cmd_Cookie_Type.tp_base = BaseObject_Type;
   11476         459 :         dcerpc_rts_cmd_Cookie_Type.tp_basicsize = pytalloc_BaseObject_size();
   11477             : 
   11478         459 :         dcerpc_rts_cmd_ChannelLifetime_Type.tp_base = BaseObject_Type;
   11479         459 :         dcerpc_rts_cmd_ChannelLifetime_Type.tp_basicsize = pytalloc_BaseObject_size();
   11480             : 
   11481         459 :         dcerpc_rts_cmd_ClientKeepalive_Type.tp_base = BaseObject_Type;
   11482         459 :         dcerpc_rts_cmd_ClientKeepalive_Type.tp_basicsize = pytalloc_BaseObject_size();
   11483             : 
   11484         459 :         dcerpc_rts_cmd_Version_Type.tp_base = BaseObject_Type;
   11485         459 :         dcerpc_rts_cmd_Version_Type.tp_basicsize = pytalloc_BaseObject_size();
   11486             : 
   11487         459 :         dcerpc_rts_cmd_Empty_Type.tp_base = BaseObject_Type;
   11488         459 :         dcerpc_rts_cmd_Empty_Type.tp_basicsize = pytalloc_BaseObject_size();
   11489             : 
   11490         459 :         dcerpc_rts_cmd_Padding_Type.tp_base = BaseObject_Type;
   11491         459 :         dcerpc_rts_cmd_Padding_Type.tp_basicsize = pytalloc_BaseObject_size();
   11492             : 
   11493         459 :         dcerpc_rts_cmd_NegativeANCE_Type.tp_base = BaseObject_Type;
   11494         459 :         dcerpc_rts_cmd_NegativeANCE_Type.tp_basicsize = pytalloc_BaseObject_size();
   11495             : 
   11496         459 :         dcerpc_rts_cmd_ANCE_Type.tp_base = BaseObject_Type;
   11497         459 :         dcerpc_rts_cmd_ANCE_Type.tp_basicsize = pytalloc_BaseObject_size();
   11498             : 
   11499         459 :         dcerpc_rts_cmd_ClientAddress_Type.tp_base = BaseObject_Type;
   11500         459 :         dcerpc_rts_cmd_ClientAddress_Type.tp_basicsize = pytalloc_BaseObject_size();
   11501             : 
   11502         459 :         dcerpc_rts_cmd_AssociationGroupId_Type.tp_base = BaseObject_Type;
   11503         459 :         dcerpc_rts_cmd_AssociationGroupId_Type.tp_basicsize = pytalloc_BaseObject_size();
   11504             : 
   11505         459 :         dcerpc_rts_cmd_Destination_Type.tp_base = BaseObject_Type;
   11506         459 :         dcerpc_rts_cmd_Destination_Type.tp_basicsize = pytalloc_BaseObject_size();
   11507             : 
   11508         459 :         dcerpc_rts_cmd_PingTrafficSentNotify_Type.tp_base = BaseObject_Type;
   11509         459 :         dcerpc_rts_cmd_PingTrafficSentNotify_Type.tp_basicsize = pytalloc_BaseObject_size();
   11510             : 
   11511         459 :         dcerpc_rts_cmds_Type.tp_base = BaseObject_Type;
   11512         459 :         dcerpc_rts_cmds_Type.tp_basicsize = pytalloc_BaseObject_size();
   11513             : 
   11514         459 :         dcerpc_rts_cmd_Type.tp_base = BaseObject_Type;
   11515         459 :         dcerpc_rts_cmd_Type.tp_basicsize = pytalloc_BaseObject_size();
   11516             : 
   11517         459 :         dcerpc_rts_Type.tp_base = BaseObject_Type;
   11518         459 :         dcerpc_rts_Type.tp_basicsize = pytalloc_BaseObject_size();
   11519             : 
   11520         459 :         dcerpc_payload_Type.tp_base = BaseObject_Type;
   11521         459 :         dcerpc_payload_Type.tp_basicsize = pytalloc_BaseObject_size();
   11522             : 
   11523         459 :         ncacn_packet_Type.tp_base = BaseObject_Type;
   11524         459 :         ncacn_packet_Type.tp_basicsize = pytalloc_BaseObject_size();
   11525             : 
   11526         459 :         ncadg_packet_Type.tp_base = BaseObject_Type;
   11527         459 :         ncadg_packet_Type.tp_basicsize = pytalloc_BaseObject_size();
   11528             : 
   11529         459 :         dcerpc_sec_vt_pcontext_Type.tp_base = BaseObject_Type;
   11530         459 :         dcerpc_sec_vt_pcontext_Type.tp_basicsize = pytalloc_BaseObject_size();
   11531             : 
   11532         459 :         dcerpc_sec_vt_header2_Type.tp_base = BaseObject_Type;
   11533         459 :         dcerpc_sec_vt_header2_Type.tp_basicsize = pytalloc_BaseObject_size();
   11534             : 
   11535         459 :         dcerpc_sec_vt_union_Type.tp_base = BaseObject_Type;
   11536         459 :         dcerpc_sec_vt_union_Type.tp_basicsize = pytalloc_BaseObject_size();
   11537             : 
   11538         459 :         dcerpc_sec_vt_Type.tp_base = BaseObject_Type;
   11539         459 :         dcerpc_sec_vt_Type.tp_basicsize = pytalloc_BaseObject_size();
   11540             : 
   11541         459 :         dcerpc_sec_vt_count_Type.tp_base = BaseObject_Type;
   11542         459 :         dcerpc_sec_vt_count_Type.tp_basicsize = pytalloc_BaseObject_size();
   11543             : 
   11544         459 :         dcerpc_sec_verification_trailer_Type.tp_base = BaseObject_Type;
   11545         459 :         dcerpc_sec_verification_trailer_Type.tp_basicsize = pytalloc_BaseObject_size();
   11546             : 
   11547         459 :         if (PyType_Ready(&dcerpc_ctx_list_Type) < 0)
   11548           0 :                 goto out;
   11549         459 :         if (PyType_Ready(&dcerpc_bind_Type) < 0)
   11550           0 :                 goto out;
   11551         459 :         if (PyType_Ready(&dcerpc_empty_Type) < 0)
   11552           0 :                 goto out;
   11553         459 :         if (PyType_Ready(&dcerpc_object_Type) < 0)
   11554           0 :                 goto out;
   11555         459 :         if (PyType_Ready(&dcerpc_request_Type) < 0)
   11556           0 :                 goto out;
   11557         459 :         if (PyType_Ready(&dcerpc_bind_ack_reason_Type) < 0)
   11558           0 :                 goto out;
   11559         459 :         if (PyType_Ready(&dcerpc_ack_ctx_Type) < 0)
   11560           0 :                 goto out;
   11561         459 :         if (PyType_Ready(&dcerpc_bind_ack_Type) < 0)
   11562           0 :                 goto out;
   11563         459 :         if (PyType_Ready(&dcerpc_bind_nak_version_Type) < 0)
   11564           0 :                 goto out;
   11565         459 :         if (PyType_Ready(&dcerpc_bind_nak_Type) < 0)
   11566           0 :                 goto out;
   11567         459 :         if (PyType_Ready(&dcerpc_response_Type) < 0)
   11568           0 :                 goto out;
   11569         459 :         if (PyType_Ready(&dcerpc_fault_Type) < 0)
   11570           0 :                 goto out;
   11571         459 :         if (PyType_Ready(&dcerpc_auth_Type) < 0)
   11572           0 :                 goto out;
   11573         459 :         if (PyType_Ready(&dcerpc_auth3_Type) < 0)
   11574           0 :                 goto out;
   11575         459 :         if (PyType_Ready(&dcerpc_orphaned_Type) < 0)
   11576           0 :                 goto out;
   11577         459 :         if (PyType_Ready(&dcerpc_co_cancel_Type) < 0)
   11578           0 :                 goto out;
   11579         459 :         if (PyType_Ready(&dcerpc_cl_cancel_Type) < 0)
   11580           0 :                 goto out;
   11581         459 :         if (PyType_Ready(&dcerpc_cancel_ack_Type) < 0)
   11582           0 :                 goto out;
   11583         459 :         if (PyType_Ready(&dcerpc_fack_Type) < 0)
   11584           0 :                 goto out;
   11585         459 :         if (PyType_Ready(&dcerpc_ack_Type) < 0)
   11586           0 :                 goto out;
   11587         459 :         if (PyType_Ready(&dcerpc_ping_Type) < 0)
   11588           0 :                 goto out;
   11589         459 :         if (PyType_Ready(&dcerpc_shutdown_Type) < 0)
   11590           0 :                 goto out;
   11591         459 :         if (PyType_Ready(&dcerpc_working_Type) < 0)
   11592           0 :                 goto out;
   11593         459 :         if (PyType_Ready(&RTSCookie_Type) < 0)
   11594           0 :                 goto out;
   11595         459 :         if (PyType_Ready(&ClientAddressType_Type) < 0)
   11596           0 :                 goto out;
   11597         459 :         if (PyType_Ready(&ClientAddress_Type) < 0)
   11598           0 :                 goto out;
   11599         459 :         if (PyType_Ready(&FlowControlAcknowledgment_Type) < 0)
   11600           0 :                 goto out;
   11601         459 :         if (PyType_Ready(&dcerpc_rts_cmd_ReceiveWindowSize_Type) < 0)
   11602           0 :                 goto out;
   11603         459 :         if (PyType_Ready(&dcerpc_rts_cmd_FlowControlAck_Type) < 0)
   11604           0 :                 goto out;
   11605         459 :         if (PyType_Ready(&dcerpc_rts_cmd_ConnectionTimeout_Type) < 0)
   11606           0 :                 goto out;
   11607         459 :         if (PyType_Ready(&dcerpc_rts_cmd_Cookie_Type) < 0)
   11608           0 :                 goto out;
   11609         459 :         if (PyType_Ready(&dcerpc_rts_cmd_ChannelLifetime_Type) < 0)
   11610           0 :                 goto out;
   11611         459 :         if (PyType_Ready(&dcerpc_rts_cmd_ClientKeepalive_Type) < 0)
   11612           0 :                 goto out;
   11613         459 :         if (PyType_Ready(&dcerpc_rts_cmd_Version_Type) < 0)
   11614           0 :                 goto out;
   11615         459 :         if (PyType_Ready(&dcerpc_rts_cmd_Empty_Type) < 0)
   11616           0 :                 goto out;
   11617         459 :         if (PyType_Ready(&dcerpc_rts_cmd_Padding_Type) < 0)
   11618           0 :                 goto out;
   11619         459 :         if (PyType_Ready(&dcerpc_rts_cmd_NegativeANCE_Type) < 0)
   11620           0 :                 goto out;
   11621         459 :         if (PyType_Ready(&dcerpc_rts_cmd_ANCE_Type) < 0)
   11622           0 :                 goto out;
   11623         459 :         if (PyType_Ready(&dcerpc_rts_cmd_ClientAddress_Type) < 0)
   11624           0 :                 goto out;
   11625         459 :         if (PyType_Ready(&dcerpc_rts_cmd_AssociationGroupId_Type) < 0)
   11626           0 :                 goto out;
   11627         459 :         if (PyType_Ready(&dcerpc_rts_cmd_Destination_Type) < 0)
   11628           0 :                 goto out;
   11629         459 :         if (PyType_Ready(&dcerpc_rts_cmd_PingTrafficSentNotify_Type) < 0)
   11630           0 :                 goto out;
   11631         459 :         if (PyType_Ready(&dcerpc_rts_cmds_Type) < 0)
   11632           0 :                 goto out;
   11633         459 :         if (PyType_Ready(&dcerpc_rts_cmd_Type) < 0)
   11634           0 :                 goto out;
   11635         459 :         if (PyType_Ready(&dcerpc_rts_Type) < 0)
   11636           0 :                 goto out;
   11637         459 :         if (PyType_Ready(&dcerpc_payload_Type) < 0)
   11638           0 :                 goto out;
   11639         459 :         if (PyType_Ready(&ncacn_packet_Type) < 0)
   11640           0 :                 goto out;
   11641         459 :         if (PyType_Ready(&ncadg_packet_Type) < 0)
   11642           0 :                 goto out;
   11643         459 :         if (PyType_Ready(&dcerpc_sec_vt_pcontext_Type) < 0)
   11644           0 :                 goto out;
   11645         459 :         if (PyType_Ready(&dcerpc_sec_vt_header2_Type) < 0)
   11646           0 :                 goto out;
   11647         459 :         if (PyType_Ready(&dcerpc_sec_vt_union_Type) < 0)
   11648           0 :                 goto out;
   11649         459 :         if (PyType_Ready(&dcerpc_sec_vt_Type) < 0)
   11650           0 :                 goto out;
   11651         459 :         if (PyType_Ready(&dcerpc_sec_vt_count_Type) < 0)
   11652           0 :                 goto out;
   11653         459 :         if (PyType_Ready(&dcerpc_sec_verification_trailer_Type) < 0)
   11654           0 :                 goto out;
   11655             : #ifdef PY_CTX_LIST_PATCH
   11656             :         PY_CTX_LIST_PATCH(&dcerpc_ctx_list_Type);
   11657             : #endif
   11658             : #ifdef PY_BIND_PATCH
   11659             :         PY_BIND_PATCH(&dcerpc_bind_Type);
   11660             : #endif
   11661             : #ifdef PY_EMPTY_PATCH
   11662             :         PY_EMPTY_PATCH(&dcerpc_empty_Type);
   11663             : #endif
   11664             : #ifdef PY_OBJECT_PATCH
   11665             :         PY_OBJECT_PATCH(&dcerpc_object_Type);
   11666             : #endif
   11667             : #ifdef PY_REQUEST_PATCH
   11668             :         PY_REQUEST_PATCH(&dcerpc_request_Type);
   11669             : #endif
   11670             : #ifdef PY_BIND_ACK_REASON_PATCH
   11671             :         PY_BIND_ACK_REASON_PATCH(&dcerpc_bind_ack_reason_Type);
   11672             : #endif
   11673             : #ifdef PY_ACK_CTX_PATCH
   11674             :         PY_ACK_CTX_PATCH(&dcerpc_ack_ctx_Type);
   11675             : #endif
   11676             : #ifdef PY_BIND_ACK_PATCH
   11677             :         PY_BIND_ACK_PATCH(&dcerpc_bind_ack_Type);
   11678             : #endif
   11679             : #ifdef PY_BIND_NAK_VERSION_PATCH
   11680             :         PY_BIND_NAK_VERSION_PATCH(&dcerpc_bind_nak_version_Type);
   11681             : #endif
   11682             : #ifdef PY_BIND_NAK_PATCH
   11683             :         PY_BIND_NAK_PATCH(&dcerpc_bind_nak_Type);
   11684             : #endif
   11685             : #ifdef PY_RESPONSE_PATCH
   11686             :         PY_RESPONSE_PATCH(&dcerpc_response_Type);
   11687             : #endif
   11688             : #ifdef PY_FAULT_PATCH
   11689             :         PY_FAULT_PATCH(&dcerpc_fault_Type);
   11690             : #endif
   11691             : #ifdef PY_AUTH_PATCH
   11692             :         PY_AUTH_PATCH(&dcerpc_auth_Type);
   11693             : #endif
   11694             : #ifdef PY_AUTH3_PATCH
   11695             :         PY_AUTH3_PATCH(&dcerpc_auth3_Type);
   11696             : #endif
   11697             : #ifdef PY_ORPHANED_PATCH
   11698             :         PY_ORPHANED_PATCH(&dcerpc_orphaned_Type);
   11699             : #endif
   11700             : #ifdef PY_CO_CANCEL_PATCH
   11701             :         PY_CO_CANCEL_PATCH(&dcerpc_co_cancel_Type);
   11702             : #endif
   11703             : #ifdef PY_CL_CANCEL_PATCH
   11704             :         PY_CL_CANCEL_PATCH(&dcerpc_cl_cancel_Type);
   11705             : #endif
   11706             : #ifdef PY_CANCEL_ACK_PATCH
   11707             :         PY_CANCEL_ACK_PATCH(&dcerpc_cancel_ack_Type);
   11708             : #endif
   11709             : #ifdef PY_FACK_PATCH
   11710             :         PY_FACK_PATCH(&dcerpc_fack_Type);
   11711             : #endif
   11712             : #ifdef PY_ACK_PATCH
   11713             :         PY_ACK_PATCH(&dcerpc_ack_Type);
   11714             : #endif
   11715             : #ifdef PY_PING_PATCH
   11716             :         PY_PING_PATCH(&dcerpc_ping_Type);
   11717             : #endif
   11718             : #ifdef PY_SHUTDOWN_PATCH
   11719             :         PY_SHUTDOWN_PATCH(&dcerpc_shutdown_Type);
   11720             : #endif
   11721             : #ifdef PY_WORKING_PATCH
   11722             :         PY_WORKING_PATCH(&dcerpc_working_Type);
   11723             : #endif
   11724             : #ifdef PY_RTSCOOKIE_PATCH
   11725             :         PY_RTSCOOKIE_PATCH(&RTSCookie_Type);
   11726             : #endif
   11727             : #ifdef PY_CLIENTADDRESSTYPE_PATCH
   11728             :         PY_CLIENTADDRESSTYPE_PATCH(&ClientAddressType_Type);
   11729             : #endif
   11730             : #ifdef PY_CLIENTADDRESS_PATCH
   11731             :         PY_CLIENTADDRESS_PATCH(&ClientAddress_Type);
   11732             : #endif
   11733             : #ifdef PY_FLOWCONTROLACKNOWLEDGMENT_PATCH
   11734             :         PY_FLOWCONTROLACKNOWLEDGMENT_PATCH(&FlowControlAcknowledgment_Type);
   11735             : #endif
   11736             : #ifdef PY_RTS_CMD_RECEIVEWINDOWSIZE_PATCH
   11737             :         PY_RTS_CMD_RECEIVEWINDOWSIZE_PATCH(&dcerpc_rts_cmd_ReceiveWindowSize_Type);
   11738             : #endif
   11739             : #ifdef PY_RTS_CMD_FLOWCONTROLACK_PATCH
   11740             :         PY_RTS_CMD_FLOWCONTROLACK_PATCH(&dcerpc_rts_cmd_FlowControlAck_Type);
   11741             : #endif
   11742             : #ifdef PY_RTS_CMD_CONNECTIONTIMEOUT_PATCH
   11743             :         PY_RTS_CMD_CONNECTIONTIMEOUT_PATCH(&dcerpc_rts_cmd_ConnectionTimeout_Type);
   11744             : #endif
   11745             : #ifdef PY_RTS_CMD_COOKIE_PATCH
   11746             :         PY_RTS_CMD_COOKIE_PATCH(&dcerpc_rts_cmd_Cookie_Type);
   11747             : #endif
   11748             : #ifdef PY_RTS_CMD_CHANNELLIFETIME_PATCH
   11749             :         PY_RTS_CMD_CHANNELLIFETIME_PATCH(&dcerpc_rts_cmd_ChannelLifetime_Type);
   11750             : #endif
   11751             : #ifdef PY_RTS_CMD_CLIENTKEEPALIVE_PATCH
   11752             :         PY_RTS_CMD_CLIENTKEEPALIVE_PATCH(&dcerpc_rts_cmd_ClientKeepalive_Type);
   11753             : #endif
   11754             : #ifdef PY_RTS_CMD_VERSION_PATCH
   11755             :         PY_RTS_CMD_VERSION_PATCH(&dcerpc_rts_cmd_Version_Type);
   11756             : #endif
   11757             : #ifdef PY_RTS_CMD_EMPTY_PATCH
   11758             :         PY_RTS_CMD_EMPTY_PATCH(&dcerpc_rts_cmd_Empty_Type);
   11759             : #endif
   11760             : #ifdef PY_RTS_CMD_PADDING_PATCH
   11761             :         PY_RTS_CMD_PADDING_PATCH(&dcerpc_rts_cmd_Padding_Type);
   11762             : #endif
   11763             : #ifdef PY_RTS_CMD_NEGATIVEANCE_PATCH
   11764             :         PY_RTS_CMD_NEGATIVEANCE_PATCH(&dcerpc_rts_cmd_NegativeANCE_Type);
   11765             : #endif
   11766             : #ifdef PY_RTS_CMD_ANCE_PATCH
   11767             :         PY_RTS_CMD_ANCE_PATCH(&dcerpc_rts_cmd_ANCE_Type);
   11768             : #endif
   11769             : #ifdef PY_RTS_CMD_CLIENTADDRESS_PATCH
   11770             :         PY_RTS_CMD_CLIENTADDRESS_PATCH(&dcerpc_rts_cmd_ClientAddress_Type);
   11771             : #endif
   11772             : #ifdef PY_RTS_CMD_ASSOCIATIONGROUPID_PATCH
   11773             :         PY_RTS_CMD_ASSOCIATIONGROUPID_PATCH(&dcerpc_rts_cmd_AssociationGroupId_Type);
   11774             : #endif
   11775             : #ifdef PY_RTS_CMD_DESTINATION_PATCH
   11776             :         PY_RTS_CMD_DESTINATION_PATCH(&dcerpc_rts_cmd_Destination_Type);
   11777             : #endif
   11778             : #ifdef PY_RTS_CMD_PINGTRAFFICSENTNOTIFY_PATCH
   11779             :         PY_RTS_CMD_PINGTRAFFICSENTNOTIFY_PATCH(&dcerpc_rts_cmd_PingTrafficSentNotify_Type);
   11780             : #endif
   11781             : #ifdef PY_RTS_CMDS_PATCH
   11782             :         PY_RTS_CMDS_PATCH(&dcerpc_rts_cmds_Type);
   11783             : #endif
   11784             : #ifdef PY_RTS_CMD_PATCH
   11785             :         PY_RTS_CMD_PATCH(&dcerpc_rts_cmd_Type);
   11786             : #endif
   11787             : #ifdef PY_RTS_PATCH
   11788             :         PY_RTS_PATCH(&dcerpc_rts_Type);
   11789             : #endif
   11790             : #ifdef PY_PAYLOAD_PATCH
   11791             :         PY_PAYLOAD_PATCH(&dcerpc_payload_Type);
   11792             : #endif
   11793             : #ifdef PY_NCACN_PACKET_PATCH
   11794             :         PY_NCACN_PACKET_PATCH(&ncacn_packet_Type);
   11795             : #endif
   11796             : #ifdef PY_NCADG_PACKET_PATCH
   11797             :         PY_NCADG_PACKET_PATCH(&ncadg_packet_Type);
   11798             : #endif
   11799             : #ifdef PY_SEC_VT_PCONTEXT_PATCH
   11800             :         PY_SEC_VT_PCONTEXT_PATCH(&dcerpc_sec_vt_pcontext_Type);
   11801             : #endif
   11802             : #ifdef PY_SEC_VT_HEADER2_PATCH
   11803             :         PY_SEC_VT_HEADER2_PATCH(&dcerpc_sec_vt_header2_Type);
   11804             : #endif
   11805             : #ifdef PY_SEC_VT_UNION_PATCH
   11806             :         PY_SEC_VT_UNION_PATCH(&dcerpc_sec_vt_union_Type);
   11807             : #endif
   11808             : #ifdef PY_SEC_VT_PATCH
   11809             :         PY_SEC_VT_PATCH(&dcerpc_sec_vt_Type);
   11810             : #endif
   11811             : #ifdef PY_SEC_VT_COUNT_PATCH
   11812             :         PY_SEC_VT_COUNT_PATCH(&dcerpc_sec_vt_count_Type);
   11813             : #endif
   11814             : #ifdef PY_SEC_VERIFICATION_TRAILER_PATCH
   11815             :         PY_SEC_VERIFICATION_TRAILER_PATCH(&dcerpc_sec_verification_trailer_Type);
   11816             : #endif
   11817             : 
   11818         459 :         m = PyModule_Create(&moduledef);
   11819         459 :         if (m == NULL)
   11820           0 :                 goto out;
   11821             : 
   11822         459 :         PyModule_AddObject(m, "DCERPC_REQUEST_LENGTH", PyLong_FromUnsignedLongLong(24));
   11823         459 :         PyModule_AddObject(m, "DCERPC_BIND_PROVIDER_REJECT", PyLong_FromLong(DCERPC_BIND_ACK_RESULT_PROVIDER_REJECTION));
   11824         459 :         PyModule_AddObject(m, "DCERPC_BIND_REASON_ASYNTAX", PyLong_FromLong(DCERPC_BIND_ACK_REASON_ABSTRACT_SYNTAX_NOT_SUPPORTED));
   11825         459 :         PyModule_AddObject(m, "DECRPC_BIND_PROTOCOL_VERSION_NOT_SUPPORTED", PyLong_FromLong(DCERPC_BIND_NAK_REASON_PROTOCOL_VERSION_NOT_SUPPORTED));
   11826         459 :         PyModule_AddObject(m, "DCERPC_BIND_REASON_INVALID_AUTH_TYPE", PyLong_FromLong(DCERPC_BIND_NAK_REASON_INVALID_AUTH_TYPE));
   11827         459 :         PyModule_AddObject(m, "DCERPC_RESPONSE_LENGTH", PyLong_FromUnsignedLongLong(24));
   11828         459 :         PyModule_AddObject(m, "DCERPC_FAULT_OP_RNG_ERROR", PyLong_FromLong(DCERPC_NCA_S_OP_RNG_ERROR));
   11829         459 :         PyModule_AddObject(m, "DCERPC_FAULT_NDR", PyLong_FromLong(DCERPC_FAULT_BAD_STUB_DATA));
   11830         459 :         PyModule_AddObject(m, "DCERPC_FAULT_INVALID_TAG", PyLong_FromLong(DCERPC_NCA_S_FAULT_INVALID_TAG));
   11831         459 :         PyModule_AddObject(m, "DCERPC_FAULT_CONTEXT_MISMATCH", PyLong_FromLong(DCERPC_NCA_S_FAULT_CONTEXT_MISMATCH));
   11832         459 :         PyModule_AddObject(m, "DCERPC_FAULT_OTHER", PyLong_FromUnsignedLongLong(0x00000001));
   11833         459 :         PyModule_AddObject(m, "DCERPC_FAULT_TODO", PyLong_FromUnsignedLongLong(0x00000042));
   11834         459 :         PyModule_AddObject(m, "DCERPC_FAULT_LENGTH", PyLong_FromUnsignedLongLong(32));
   11835         459 :         PyModule_AddObject(m, "AS_SYSTEM_MAGIC_PATH_TOKEN", PyUnicode_FromString("/root/ncalrpc_as_system"));
   11836         459 :         PyModule_AddObject(m, "DCERPC_AUTH_TRAILER_LENGTH", PyLong_FromUnsignedLongLong(8));
   11837         459 :         PyModule_AddObject(m, "DCERPC_AUTH_PAD_ALIGNMENT", PyLong_FromUnsignedLongLong(16));
   11838         459 :         PyModule_AddObject(m, "DCERPC_PFC_FLAG_PENDING_CANCEL", PyLong_FromLong(DCERPC_PFC_FLAG_PENDING_CANCEL_OR_HDR_SIGNING));
   11839         459 :         PyModule_AddObject(m, "DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN", PyLong_FromLong(DCERPC_PFC_FLAG_PENDING_CANCEL_OR_HDR_SIGNING));
   11840         459 :         PyModule_AddObject(m, "DCERPC_PFC_OFFSET", PyLong_FromUnsignedLongLong(3));
   11841         459 :         PyModule_AddObject(m, "DCERPC_DREP_OFFSET", PyLong_FromUnsignedLongLong(4));
   11842         459 :         PyModule_AddObject(m, "DCERPC_FRAG_LEN_OFFSET", PyLong_FromUnsignedLongLong(8));
   11843         459 :         PyModule_AddObject(m, "DCERPC_FRAG_MAX_SIZE", PyLong_FromUnsignedLongLong(5840));
   11844         459 :         PyModule_AddObject(m, "DCERPC_AUTH_LEN_OFFSET", PyLong_FromUnsignedLongLong(10));
   11845         459 :         PyModule_AddObject(m, "DCERPC_NCACN_PAYLOAD_OFFSET", PyLong_FromUnsignedLongLong(16));
   11846         459 :         PyModule_AddObject(m, "DCERPC_NCACN_REQUEST_DEFAULT_MAX_SIZE", PyLong_FromUnsignedLongLong(0x400000));
   11847         459 :         PyModule_AddObject(m, "DCERPC_NCACN_RESPONSE_DEFAULT_MAX_SIZE", PyLong_FromUnsignedLongLong(0xf000000));
   11848         459 :         PyModule_AddObject(m, "DCERPC_DREP_LE", PyLong_FromUnsignedLongLong(0x10));
   11849         459 :         PyModule_AddObject(m, "DCERPC_SEC_VT_MAX_SIZE", PyLong_FromUnsignedLongLong(1024));
   11850         459 :         PyModule_AddObject(m, "DCERPC_BIND_ACK_RESULT_ACCEPTANCE", PyLong_FromLong((uint16_t)DCERPC_BIND_ACK_RESULT_ACCEPTANCE));
   11851         459 :         PyModule_AddObject(m, "DCERPC_BIND_ACK_RESULT_USER_REJECTION", PyLong_FromLong((uint16_t)DCERPC_BIND_ACK_RESULT_USER_REJECTION));
   11852         459 :         PyModule_AddObject(m, "DCERPC_BIND_ACK_RESULT_PROVIDER_REJECTION", PyLong_FromLong((uint16_t)DCERPC_BIND_ACK_RESULT_PROVIDER_REJECTION));
   11853         459 :         PyModule_AddObject(m, "DCERPC_BIND_ACK_RESULT_NEGOTIATE_ACK", PyLong_FromLong((uint16_t)DCERPC_BIND_ACK_RESULT_NEGOTIATE_ACK));
   11854         459 :         PyModule_AddObject(m, "DCERPC_BIND_ACK_REASON_NOT_SPECIFIED", PyLong_FromLong((uint16_t)DCERPC_BIND_ACK_REASON_NOT_SPECIFIED));
   11855         459 :         PyModule_AddObject(m, "DCERPC_BIND_ACK_REASON_ABSTRACT_SYNTAX_NOT_SUPPORTED", PyLong_FromLong((uint16_t)DCERPC_BIND_ACK_REASON_ABSTRACT_SYNTAX_NOT_SUPPORTED));
   11856         459 :         PyModule_AddObject(m, "DCERPC_BIND_ACK_REASON_TRANSFER_SYNTAXES_NOT_SUPPORTED", PyLong_FromLong((uint16_t)DCERPC_BIND_ACK_REASON_TRANSFER_SYNTAXES_NOT_SUPPORTED));
   11857         459 :         PyModule_AddObject(m, "DCERPC_BIND_ACK_REASON_LOCAL_LIMIT_EXCEEDED", PyLong_FromLong((uint16_t)DCERPC_BIND_ACK_REASON_LOCAL_LIMIT_EXCEEDED));
   11858         459 :         PyModule_AddObject(m, "DCERPC_BIND_TIME_SECURITY_CONTEXT_MULTIPLEXING", PyLong_FromLong((uint16_t)DCERPC_BIND_TIME_SECURITY_CONTEXT_MULTIPLEXING));
   11859         459 :         PyModule_AddObject(m, "DCERPC_BIND_TIME_KEEP_CONNECTION_ON_ORPHAN", PyLong_FromLong((uint16_t)DCERPC_BIND_TIME_KEEP_CONNECTION_ON_ORPHAN));
   11860         459 :         PyModule_AddObject(m, "DCERPC_BIND_NAK_REASON_NOT_SPECIFIED", PyLong_FromLong((uint16_t)DCERPC_BIND_NAK_REASON_NOT_SPECIFIED));
   11861         459 :         PyModule_AddObject(m, "DCERPC_BIND_NAK_REASON_TEMPORARY_CONGESTION", PyLong_FromLong((uint16_t)DCERPC_BIND_NAK_REASON_TEMPORARY_CONGESTION));
   11862         459 :         PyModule_AddObject(m, "DCERPC_BIND_NAK_REASON_LOCAL_LIMIT_EXCEEDED", PyLong_FromLong((uint16_t)DCERPC_BIND_NAK_REASON_LOCAL_LIMIT_EXCEEDED));
   11863         459 :         PyModule_AddObject(m, "DCERPC_BIND_NAK_REASON_PROTOCOL_VERSION_NOT_SUPPORTED", PyLong_FromLong((uint16_t)DCERPC_BIND_NAK_REASON_PROTOCOL_VERSION_NOT_SUPPORTED));
   11864         459 :         PyModule_AddObject(m, "DCERPC_BIND_NAK_REASON_INVALID_AUTH_TYPE", PyLong_FromLong((uint16_t)DCERPC_BIND_NAK_REASON_INVALID_AUTH_TYPE));
   11865         459 :         PyModule_AddObject(m, "DCERPC_BIND_NAK_REASON_INVALID_CHECKSUM", PyLong_FromLong((uint16_t)DCERPC_BIND_NAK_REASON_INVALID_CHECKSUM));
   11866         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_COMM_FAILURE", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_COMM_FAILURE));
   11867         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_OP_RNG_ERROR", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_OP_RNG_ERROR));
   11868         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_UNKNOWN_IF", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_UNKNOWN_IF));
   11869         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_WRONG_BOOT_TIME", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_WRONG_BOOT_TIME));
   11870         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_YOU_CRASHED", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_YOU_CRASHED));
   11871         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_PROTO_ERROR", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_PROTO_ERROR));
   11872         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_OUT_ARGS_TOO_BIG", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_OUT_ARGS_TOO_BIG));
   11873         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_SERVER_TOO_BUSY", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_SERVER_TOO_BUSY));
   11874         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_FAULT_STRING_TOO_LARGE", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_FAULT_STRING_TOO_LARGE));
   11875         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_UNSUPPORTED_TYPE", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_UNSUPPORTED_TYPE));
   11876         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_FAULT_INT_DIV_BY_ZERO", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_FAULT_INT_DIV_BY_ZERO));
   11877         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_FAULT_ADDR_ERROR", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_FAULT_ADDR_ERROR));
   11878         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_FAULT_FP_DIV_BY_ZERO", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_FAULT_FP_DIV_BY_ZERO));
   11879         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_FAULT_FP_UNDERFLOW", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_FAULT_FP_UNDERFLOW));
   11880         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_FAULT_FP_OVERRFLOW", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_FAULT_FP_OVERRFLOW));
   11881         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_FAULT_INVALID_TAG", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_FAULT_INVALID_TAG));
   11882         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_FAULT_INVALID_BOUND", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_FAULT_INVALID_BOUND));
   11883         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_FAULT_RPC_VERSION_MISMATCH", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_FAULT_RPC_VERSION_MISMATCH));
   11884         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_FAULT_UNSPEC_REJECT", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_FAULT_UNSPEC_REJECT));
   11885         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_FAULT_BAD_ACTID", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_FAULT_BAD_ACTID));
   11886         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_FAULT_WHO_ARE_YOU_FAILED", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_FAULT_WHO_ARE_YOU_FAILED));
   11887         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_FAULT_MANAGER_NOT_ENTERED", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_FAULT_MANAGER_NOT_ENTERED));
   11888         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_FAULT_CANCEL", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_FAULT_CANCEL));
   11889         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_FAULT_ILL_INST", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_FAULT_ILL_INST));
   11890         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_FAULT_FP_ERROR", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_FAULT_FP_ERROR));
   11891         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_FAULT_INT_OVERFLOW", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_FAULT_INT_OVERFLOW));
   11892         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_UNUSED_1C000011", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_UNUSED_1C000011));
   11893         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_FAULT_UNSPEC", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_FAULT_UNSPEC));
   11894         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_FAULT_REMOTE_COMM_FAILURE", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_FAULT_REMOTE_COMM_FAILURE));
   11895         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_FAULT_PIPE_EMPTY", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_FAULT_PIPE_EMPTY));
   11896         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_FAULT_PIPE_CLOSED", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_FAULT_PIPE_CLOSED));
   11897         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_FAULT_PIPE_ORDER", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_FAULT_PIPE_ORDER));
   11898         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_FAULT_PIPE_DISCIPLINE", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_FAULT_PIPE_DISCIPLINE));
   11899         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_FAULT_PIPE_COMM_ERROR", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_FAULT_PIPE_COMM_ERROR));
   11900         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_FAULT_PIPE_MEMORY", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_FAULT_PIPE_MEMORY));
   11901         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_FAULT_CONTEXT_MISMATCH", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_FAULT_CONTEXT_MISMATCH));
   11902         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_FAULT_REMOTE_NO_MEMORY", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_FAULT_REMOTE_NO_MEMORY));
   11903         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_INVALID_PRES_CONTEXT_ID", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_INVALID_PRES_CONTEXT_ID));
   11904         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_UNSUPPORTED_AUTHN_LEVEL", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_UNSUPPORTED_AUTHN_LEVEL));
   11905         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_UNUSED_1C00001E", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_UNUSED_1C00001E));
   11906         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_INVALID_CHECKSUM", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_INVALID_CHECKSUM));
   11907         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_INVALID_CRC", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_INVALID_CRC));
   11908         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_FAULT_USER_DEFINED", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_FAULT_USER_DEFINED));
   11909         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_FAULT_TX_OPEN_FAILED", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_FAULT_TX_OPEN_FAILED));
   11910         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_FAULT_CODESET_CONV_ERROR", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_FAULT_CODESET_CONV_ERROR));
   11911         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_FAULT_OBJECT_NOT_FOUND", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_FAULT_OBJECT_NOT_FOUND));
   11912         459 :         PyModule_AddObject(m, "DCERPC_NCA_S_FAULT_NO_CLIENT_STUB", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_NCA_S_FAULT_NO_CLIENT_STUB));
   11913         459 :         PyModule_AddObject(m, "DCERPC_FAULT_ACCESS_DENIED", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_FAULT_ACCESS_DENIED));
   11914         459 :         PyModule_AddObject(m, "DCERPC_FAULT_SERVER_UNAVAILABLE", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_FAULT_SERVER_UNAVAILABLE));
   11915         459 :         PyModule_AddObject(m, "DCERPC_FAULT_NO_CALL_ACTIVE", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_FAULT_NO_CALL_ACTIVE));
   11916         459 :         PyModule_AddObject(m, "DCERPC_FAULT_CANT_PERFORM", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_FAULT_CANT_PERFORM));
   11917         459 :         PyModule_AddObject(m, "DCERPC_FAULT_OUT_OF_RESOURCES", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_FAULT_OUT_OF_RESOURCES));
   11918         459 :         PyModule_AddObject(m, "DCERPC_FAULT_BAD_STUB_DATA", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_FAULT_BAD_STUB_DATA));
   11919         459 :         PyModule_AddObject(m, "DCERPC_FAULT_SEC_PKG_ERROR", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_FAULT_SEC_PKG_ERROR));
   11920         459 :         PyModule_AddObject(m, "DCERPC_FAULT_FLAG_EXTENDED_ERROR_INFORMATION", PyLong_FromLong((uint16_t)DCERPC_FAULT_FLAG_EXTENDED_ERROR_INFORMATION));
   11921         459 :         PyModule_AddObject(m, "DCERPC_AUTH_TYPE_NONE", PyLong_FromLong((uint16_t)DCERPC_AUTH_TYPE_NONE));
   11922         459 :         PyModule_AddObject(m, "DCERPC_AUTH_TYPE_KRB5_1", PyLong_FromLong((uint16_t)DCERPC_AUTH_TYPE_KRB5_1));
   11923         459 :         PyModule_AddObject(m, "DCERPC_AUTH_TYPE_SPNEGO", PyLong_FromLong((uint16_t)DCERPC_AUTH_TYPE_SPNEGO));
   11924         459 :         PyModule_AddObject(m, "DCERPC_AUTH_TYPE_NTLMSSP", PyLong_FromLong((uint16_t)DCERPC_AUTH_TYPE_NTLMSSP));
   11925         459 :         PyModule_AddObject(m, "DCERPC_AUTH_TYPE_KRB5", PyLong_FromLong((uint16_t)DCERPC_AUTH_TYPE_KRB5));
   11926         459 :         PyModule_AddObject(m, "DCERPC_AUTH_TYPE_DPA", PyLong_FromLong((uint16_t)DCERPC_AUTH_TYPE_DPA));
   11927         459 :         PyModule_AddObject(m, "DCERPC_AUTH_TYPE_MSN", PyLong_FromLong((uint16_t)DCERPC_AUTH_TYPE_MSN));
   11928         459 :         PyModule_AddObject(m, "DCERPC_AUTH_TYPE_DIGEST", PyLong_FromLong((uint16_t)DCERPC_AUTH_TYPE_DIGEST));
   11929         459 :         PyModule_AddObject(m, "DCERPC_AUTH_TYPE_SCHANNEL", PyLong_FromLong((uint16_t)DCERPC_AUTH_TYPE_SCHANNEL));
   11930         459 :         PyModule_AddObject(m, "DCERPC_AUTH_TYPE_MSMQ", PyLong_FromLong((uint16_t)DCERPC_AUTH_TYPE_MSMQ));
   11931         459 :         PyModule_AddObject(m, "DCERPC_AUTH_TYPE_NCALRPC_AS_SYSTEM", PyLong_FromLong((uint16_t)DCERPC_AUTH_TYPE_NCALRPC_AS_SYSTEM));
   11932         459 :         PyModule_AddObject(m, "DCERPC_AUTH_LEVEL_NONE", PyLong_FromLong((uint16_t)DCERPC_AUTH_LEVEL_NONE));
   11933         459 :         PyModule_AddObject(m, "DCERPC_AUTH_LEVEL_CONNECT", PyLong_FromLong((uint16_t)DCERPC_AUTH_LEVEL_CONNECT));
   11934         459 :         PyModule_AddObject(m, "DCERPC_AUTH_LEVEL_CALL", PyLong_FromLong((uint16_t)DCERPC_AUTH_LEVEL_CALL));
   11935         459 :         PyModule_AddObject(m, "DCERPC_AUTH_LEVEL_PACKET", PyLong_FromLong((uint16_t)DCERPC_AUTH_LEVEL_PACKET));
   11936         459 :         PyModule_AddObject(m, "DCERPC_AUTH_LEVEL_INTEGRITY", PyLong_FromLong((uint16_t)DCERPC_AUTH_LEVEL_INTEGRITY));
   11937         459 :         PyModule_AddObject(m, "DCERPC_AUTH_LEVEL_PRIVACY", PyLong_FromLong((uint16_t)DCERPC_AUTH_LEVEL_PRIVACY));
   11938         459 :         PyModule_AddObject(m, "RTS_IPV4", PyLong_FromUnsignedLongLong((uint32_t)RTS_IPV4));
   11939         459 :         PyModule_AddObject(m, "RTS_IPV6", PyLong_FromUnsignedLongLong((uint32_t)RTS_IPV6));
   11940         459 :         PyModule_AddObject(m, "FDClient", PyLong_FromUnsignedLongLong((uint32_t)FDClient));
   11941         459 :         PyModule_AddObject(m, "FDInProxy", PyLong_FromUnsignedLongLong((uint32_t)FDInProxy));
   11942         459 :         PyModule_AddObject(m, "FDServer", PyLong_FromUnsignedLongLong((uint32_t)FDServer));
   11943         459 :         PyModule_AddObject(m, "FDOutProxy", PyLong_FromUnsignedLongLong((uint32_t)FDOutProxy));
   11944         459 :         PyModule_AddObject(m, "RTS_FLAG_NONE", PyLong_FromLong((uint16_t)RTS_FLAG_NONE));
   11945         459 :         PyModule_AddObject(m, "RTS_FLAG_PING", PyLong_FromLong((uint16_t)RTS_FLAG_PING));
   11946         459 :         PyModule_AddObject(m, "RTS_FLAG_OTHER_CMD", PyLong_FromLong((uint16_t)RTS_FLAG_OTHER_CMD));
   11947         459 :         PyModule_AddObject(m, "RTS_FLAG_RECYCLE_CHANNEL", PyLong_FromLong((uint16_t)RTS_FLAG_RECYCLE_CHANNEL));
   11948         459 :         PyModule_AddObject(m, "RTS_FLAG_IN_CHANNEL", PyLong_FromLong((uint16_t)RTS_FLAG_IN_CHANNEL));
   11949         459 :         PyModule_AddObject(m, "RTS_FLAG_OUT_CHANNEL", PyLong_FromLong((uint16_t)RTS_FLAG_OUT_CHANNEL));
   11950         459 :         PyModule_AddObject(m, "RTS_FLAG_EOF", PyLong_FromLong((uint16_t)RTS_FLAG_EOF));
   11951         459 :         PyModule_AddObject(m, "RTS_FLAG_ECHO", PyLong_FromLong((uint16_t)RTS_FLAG_ECHO));
   11952         459 :         PyModule_AddObject(m, "DCERPC_PKT_REQUEST", PyLong_FromLong((uint16_t)DCERPC_PKT_REQUEST));
   11953         459 :         PyModule_AddObject(m, "DCERPC_PKT_PING", PyLong_FromLong((uint16_t)DCERPC_PKT_PING));
   11954         459 :         PyModule_AddObject(m, "DCERPC_PKT_RESPONSE", PyLong_FromLong((uint16_t)DCERPC_PKT_RESPONSE));
   11955         459 :         PyModule_AddObject(m, "DCERPC_PKT_FAULT", PyLong_FromLong((uint16_t)DCERPC_PKT_FAULT));
   11956         459 :         PyModule_AddObject(m, "DCERPC_PKT_WORKING", PyLong_FromLong((uint16_t)DCERPC_PKT_WORKING));
   11957         459 :         PyModule_AddObject(m, "DCERPC_PKT_NOCALL", PyLong_FromLong((uint16_t)DCERPC_PKT_NOCALL));
   11958         459 :         PyModule_AddObject(m, "DCERPC_PKT_REJECT", PyLong_FromLong((uint16_t)DCERPC_PKT_REJECT));
   11959         459 :         PyModule_AddObject(m, "DCERPC_PKT_ACK", PyLong_FromLong((uint16_t)DCERPC_PKT_ACK));
   11960         459 :         PyModule_AddObject(m, "DCERPC_PKT_CL_CANCEL", PyLong_FromLong((uint16_t)DCERPC_PKT_CL_CANCEL));
   11961         459 :         PyModule_AddObject(m, "DCERPC_PKT_FACK", PyLong_FromLong((uint16_t)DCERPC_PKT_FACK));
   11962         459 :         PyModule_AddObject(m, "DCERPC_PKT_CANCEL_ACK", PyLong_FromLong((uint16_t)DCERPC_PKT_CANCEL_ACK));
   11963         459 :         PyModule_AddObject(m, "DCERPC_PKT_BIND", PyLong_FromLong((uint16_t)DCERPC_PKT_BIND));
   11964         459 :         PyModule_AddObject(m, "DCERPC_PKT_BIND_ACK", PyLong_FromLong((uint16_t)DCERPC_PKT_BIND_ACK));
   11965         459 :         PyModule_AddObject(m, "DCERPC_PKT_BIND_NAK", PyLong_FromLong((uint16_t)DCERPC_PKT_BIND_NAK));
   11966         459 :         PyModule_AddObject(m, "DCERPC_PKT_ALTER", PyLong_FromLong((uint16_t)DCERPC_PKT_ALTER));
   11967         459 :         PyModule_AddObject(m, "DCERPC_PKT_ALTER_RESP", PyLong_FromLong((uint16_t)DCERPC_PKT_ALTER_RESP));
   11968         459 :         PyModule_AddObject(m, "DCERPC_PKT_AUTH3", PyLong_FromLong((uint16_t)DCERPC_PKT_AUTH3));
   11969         459 :         PyModule_AddObject(m, "DCERPC_PKT_SHUTDOWN", PyLong_FromLong((uint16_t)DCERPC_PKT_SHUTDOWN));
   11970         459 :         PyModule_AddObject(m, "DCERPC_PKT_CO_CANCEL", PyLong_FromLong((uint16_t)DCERPC_PKT_CO_CANCEL));
   11971         459 :         PyModule_AddObject(m, "DCERPC_PKT_ORPHANED", PyLong_FromLong((uint16_t)DCERPC_PKT_ORPHANED));
   11972         459 :         PyModule_AddObject(m, "DCERPC_PKT_RTS", PyLong_FromLong((uint16_t)DCERPC_PKT_RTS));
   11973         459 :         PyModule_AddObject(m, "DCERPC_PFC_FLAG_FIRST", PyLong_FromLong((uint16_t)DCERPC_PFC_FLAG_FIRST));
   11974         459 :         PyModule_AddObject(m, "DCERPC_PFC_FLAG_LAST", PyLong_FromLong((uint16_t)DCERPC_PFC_FLAG_LAST));
   11975         459 :         PyModule_AddObject(m, "DCERPC_PFC_FLAG_PENDING_CANCEL_OR_HDR_SIGNING", PyLong_FromLong((uint16_t)DCERPC_PFC_FLAG_PENDING_CANCEL_OR_HDR_SIGNING));
   11976         459 :         PyModule_AddObject(m, "DCERPC_PFC_FLAG_CONC_MPX", PyLong_FromLong((uint16_t)DCERPC_PFC_FLAG_CONC_MPX));
   11977         459 :         PyModule_AddObject(m, "DCERPC_PFC_FLAG_DID_NOT_EXECUTE", PyLong_FromLong((uint16_t)DCERPC_PFC_FLAG_DID_NOT_EXECUTE));
   11978         459 :         PyModule_AddObject(m, "DCERPC_PFC_FLAG_MAYBE", PyLong_FromLong((uint16_t)DCERPC_PFC_FLAG_MAYBE));
   11979         459 :         PyModule_AddObject(m, "DCERPC_PFC_FLAG_OBJECT_UUID", PyLong_FromLong((uint16_t)DCERPC_PFC_FLAG_OBJECT_UUID));
   11980         459 :         PyModule_AddObject(m, "DCERPC_SEC_VT_COMMAND_ENUM", PyLong_FromLong((uint16_t)DCERPC_SEC_VT_COMMAND_ENUM));
   11981         459 :         PyModule_AddObject(m, "DCERPC_SEC_VT_COMMAND_END", PyLong_FromLong((uint16_t)DCERPC_SEC_VT_COMMAND_END));
   11982         459 :         PyModule_AddObject(m, "DCERPC_SEC_VT_MUST_PROCESS", PyLong_FromLong((uint16_t)DCERPC_SEC_VT_MUST_PROCESS));
   11983         459 :         PyModule_AddObject(m, "DCERPC_SEC_VT_COMMAND_BITMASK1", PyLong_FromLong((uint16_t)DCERPC_SEC_VT_COMMAND_BITMASK1));
   11984         459 :         PyModule_AddObject(m, "DCERPC_SEC_VT_COMMAND_PCONTEXT", PyLong_FromLong((uint16_t)DCERPC_SEC_VT_COMMAND_PCONTEXT));
   11985         459 :         PyModule_AddObject(m, "DCERPC_SEC_VT_COMMAND_HEADER2", PyLong_FromLong((uint16_t)DCERPC_SEC_VT_COMMAND_HEADER2));
   11986         459 :         PyModule_AddObject(m, "DCERPC_SEC_VT_CLIENT_SUPPORTS_HEADER_SIGNING", PyLong_FromUnsignedLongLong((uint32_t)DCERPC_SEC_VT_CLIENT_SUPPORTS_HEADER_SIGNING));
   11987         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_ctx_list_Type);
   11988         459 :         PyModule_AddObject(m, "ctx_list", (PyObject *)(void *)&dcerpc_ctx_list_Type);
   11989         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_bind_Type);
   11990         459 :         PyModule_AddObject(m, "bind", (PyObject *)(void *)&dcerpc_bind_Type);
   11991         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_empty_Type);
   11992         459 :         PyModule_AddObject(m, "empty", (PyObject *)(void *)&dcerpc_empty_Type);
   11993         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_object_Type);
   11994         459 :         PyModule_AddObject(m, "object", (PyObject *)(void *)&dcerpc_object_Type);
   11995         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_request_Type);
   11996         459 :         PyModule_AddObject(m, "request", (PyObject *)(void *)&dcerpc_request_Type);
   11997         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_bind_ack_reason_Type);
   11998         459 :         PyModule_AddObject(m, "bind_ack_reason", (PyObject *)(void *)&dcerpc_bind_ack_reason_Type);
   11999         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_ack_ctx_Type);
   12000         459 :         PyModule_AddObject(m, "ack_ctx", (PyObject *)(void *)&dcerpc_ack_ctx_Type);
   12001         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_bind_ack_Type);
   12002         459 :         PyModule_AddObject(m, "bind_ack", (PyObject *)(void *)&dcerpc_bind_ack_Type);
   12003         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_bind_nak_version_Type);
   12004         459 :         PyModule_AddObject(m, "bind_nak_version", (PyObject *)(void *)&dcerpc_bind_nak_version_Type);
   12005         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_bind_nak_Type);
   12006         459 :         PyModule_AddObject(m, "bind_nak", (PyObject *)(void *)&dcerpc_bind_nak_Type);
   12007         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_response_Type);
   12008         459 :         PyModule_AddObject(m, "response", (PyObject *)(void *)&dcerpc_response_Type);
   12009         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_fault_Type);
   12010         459 :         PyModule_AddObject(m, "fault", (PyObject *)(void *)&dcerpc_fault_Type);
   12011         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_auth_Type);
   12012         459 :         PyModule_AddObject(m, "auth", (PyObject *)(void *)&dcerpc_auth_Type);
   12013         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_auth3_Type);
   12014         459 :         PyModule_AddObject(m, "auth3", (PyObject *)(void *)&dcerpc_auth3_Type);
   12015         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_orphaned_Type);
   12016         459 :         PyModule_AddObject(m, "orphaned", (PyObject *)(void *)&dcerpc_orphaned_Type);
   12017         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_co_cancel_Type);
   12018         459 :         PyModule_AddObject(m, "co_cancel", (PyObject *)(void *)&dcerpc_co_cancel_Type);
   12019         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_cl_cancel_Type);
   12020         459 :         PyModule_AddObject(m, "cl_cancel", (PyObject *)(void *)&dcerpc_cl_cancel_Type);
   12021         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_cancel_ack_Type);
   12022         459 :         PyModule_AddObject(m, "cancel_ack", (PyObject *)(void *)&dcerpc_cancel_ack_Type);
   12023         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_fack_Type);
   12024         459 :         PyModule_AddObject(m, "fack", (PyObject *)(void *)&dcerpc_fack_Type);
   12025         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_ack_Type);
   12026         459 :         PyModule_AddObject(m, "ack", (PyObject *)(void *)&dcerpc_ack_Type);
   12027         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_ping_Type);
   12028         459 :         PyModule_AddObject(m, "ping", (PyObject *)(void *)&dcerpc_ping_Type);
   12029         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_shutdown_Type);
   12030         459 :         PyModule_AddObject(m, "shutdown", (PyObject *)(void *)&dcerpc_shutdown_Type);
   12031         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_working_Type);
   12032         459 :         PyModule_AddObject(m, "working", (PyObject *)(void *)&dcerpc_working_Type);
   12033         459 :         Py_INCREF((PyObject *)(void *)&RTSCookie_Type);
   12034         459 :         PyModule_AddObject(m, "RTSCookie", (PyObject *)(void *)&RTSCookie_Type);
   12035         459 :         Py_INCREF((PyObject *)(void *)&ClientAddressType_Type);
   12036         459 :         PyModule_AddObject(m, "ClientAddressType", (PyObject *)(void *)&ClientAddressType_Type);
   12037         459 :         Py_INCREF((PyObject *)(void *)&ClientAddress_Type);
   12038         459 :         PyModule_AddObject(m, "ClientAddress", (PyObject *)(void *)&ClientAddress_Type);
   12039         459 :         Py_INCREF((PyObject *)(void *)&FlowControlAcknowledgment_Type);
   12040         459 :         PyModule_AddObject(m, "FlowControlAcknowledgment", (PyObject *)(void *)&FlowControlAcknowledgment_Type);
   12041         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_rts_cmd_ReceiveWindowSize_Type);
   12042         459 :         PyModule_AddObject(m, "rts_cmd_ReceiveWindowSize", (PyObject *)(void *)&dcerpc_rts_cmd_ReceiveWindowSize_Type);
   12043         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_rts_cmd_FlowControlAck_Type);
   12044         459 :         PyModule_AddObject(m, "rts_cmd_FlowControlAck", (PyObject *)(void *)&dcerpc_rts_cmd_FlowControlAck_Type);
   12045         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_rts_cmd_ConnectionTimeout_Type);
   12046         459 :         PyModule_AddObject(m, "rts_cmd_ConnectionTimeout", (PyObject *)(void *)&dcerpc_rts_cmd_ConnectionTimeout_Type);
   12047         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_rts_cmd_Cookie_Type);
   12048         459 :         PyModule_AddObject(m, "rts_cmd_Cookie", (PyObject *)(void *)&dcerpc_rts_cmd_Cookie_Type);
   12049         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_rts_cmd_ChannelLifetime_Type);
   12050         459 :         PyModule_AddObject(m, "rts_cmd_ChannelLifetime", (PyObject *)(void *)&dcerpc_rts_cmd_ChannelLifetime_Type);
   12051         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_rts_cmd_ClientKeepalive_Type);
   12052         459 :         PyModule_AddObject(m, "rts_cmd_ClientKeepalive", (PyObject *)(void *)&dcerpc_rts_cmd_ClientKeepalive_Type);
   12053         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_rts_cmd_Version_Type);
   12054         459 :         PyModule_AddObject(m, "rts_cmd_Version", (PyObject *)(void *)&dcerpc_rts_cmd_Version_Type);
   12055         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_rts_cmd_Empty_Type);
   12056         459 :         PyModule_AddObject(m, "rts_cmd_Empty", (PyObject *)(void *)&dcerpc_rts_cmd_Empty_Type);
   12057         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_rts_cmd_Padding_Type);
   12058         459 :         PyModule_AddObject(m, "rts_cmd_Padding", (PyObject *)(void *)&dcerpc_rts_cmd_Padding_Type);
   12059         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_rts_cmd_NegativeANCE_Type);
   12060         459 :         PyModule_AddObject(m, "rts_cmd_NegativeANCE", (PyObject *)(void *)&dcerpc_rts_cmd_NegativeANCE_Type);
   12061         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_rts_cmd_ANCE_Type);
   12062         459 :         PyModule_AddObject(m, "rts_cmd_ANCE", (PyObject *)(void *)&dcerpc_rts_cmd_ANCE_Type);
   12063         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_rts_cmd_ClientAddress_Type);
   12064         459 :         PyModule_AddObject(m, "rts_cmd_ClientAddress", (PyObject *)(void *)&dcerpc_rts_cmd_ClientAddress_Type);
   12065         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_rts_cmd_AssociationGroupId_Type);
   12066         459 :         PyModule_AddObject(m, "rts_cmd_AssociationGroupId", (PyObject *)(void *)&dcerpc_rts_cmd_AssociationGroupId_Type);
   12067         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_rts_cmd_Destination_Type);
   12068         459 :         PyModule_AddObject(m, "rts_cmd_Destination", (PyObject *)(void *)&dcerpc_rts_cmd_Destination_Type);
   12069         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_rts_cmd_PingTrafficSentNotify_Type);
   12070         459 :         PyModule_AddObject(m, "rts_cmd_PingTrafficSentNotify", (PyObject *)(void *)&dcerpc_rts_cmd_PingTrafficSentNotify_Type);
   12071         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_rts_cmds_Type);
   12072         459 :         PyModule_AddObject(m, "rts_cmds", (PyObject *)(void *)&dcerpc_rts_cmds_Type);
   12073         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_rts_cmd_Type);
   12074         459 :         PyModule_AddObject(m, "rts_cmd", (PyObject *)(void *)&dcerpc_rts_cmd_Type);
   12075         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_rts_Type);
   12076         459 :         PyModule_AddObject(m, "rts", (PyObject *)(void *)&dcerpc_rts_Type);
   12077         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_payload_Type);
   12078         459 :         PyModule_AddObject(m, "payload", (PyObject *)(void *)&dcerpc_payload_Type);
   12079         459 :         Py_INCREF((PyObject *)(void *)&ncacn_packet_Type);
   12080         459 :         PyModule_AddObject(m, "ncacn_packet", (PyObject *)(void *)&ncacn_packet_Type);
   12081         459 :         Py_INCREF((PyObject *)(void *)&ncadg_packet_Type);
   12082         459 :         PyModule_AddObject(m, "ncadg_packet", (PyObject *)(void *)&ncadg_packet_Type);
   12083         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_sec_vt_pcontext_Type);
   12084         459 :         PyModule_AddObject(m, "sec_vt_pcontext", (PyObject *)(void *)&dcerpc_sec_vt_pcontext_Type);
   12085         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_sec_vt_header2_Type);
   12086         459 :         PyModule_AddObject(m, "sec_vt_header2", (PyObject *)(void *)&dcerpc_sec_vt_header2_Type);
   12087         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_sec_vt_union_Type);
   12088         459 :         PyModule_AddObject(m, "sec_vt_union", (PyObject *)(void *)&dcerpc_sec_vt_union_Type);
   12089         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_sec_vt_Type);
   12090         459 :         PyModule_AddObject(m, "sec_vt", (PyObject *)(void *)&dcerpc_sec_vt_Type);
   12091         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_sec_vt_count_Type);
   12092         459 :         PyModule_AddObject(m, "sec_vt_count", (PyObject *)(void *)&dcerpc_sec_vt_count_Type);
   12093         459 :         Py_INCREF((PyObject *)(void *)&dcerpc_sec_verification_trailer_Type);
   12094         459 :         PyModule_AddObject(m, "sec_verification_trailer", (PyObject *)(void *)&dcerpc_sec_verification_trailer_Type);
   12095             : #ifdef PY_MOD_DCERPC_PATCH
   12096             :         PY_MOD_DCERPC_PATCH(m);
   12097             : #endif
   12098         459 :         out:
   12099         459 :         Py_XDECREF(dep_samba_dcerpc_misc);
   12100         459 :         Py_XDECREF(dep_talloc);
   12101         459 :         return m;
   12102             : 
   12103             : }

Generated by: LCOV version 1.13