#undef DBGC_CLASS
#define DBGC_CLASS DBGC_RPC_SRV
+static struct npa_state *npa_state_init(TALLOC_CTX *mem_ctx)
+{
+ struct npa_state *npa;
+
+ npa = talloc_zero(mem_ctx, struct npa_state);
+ if (npa == NULL) {
+ return NULL;
+ }
+
+ npa->read_queue = tevent_queue_create(npa, "npa_cli_read");
+ if (npa->read_queue == NULL) {
+ DEBUG(0, ("tevent_queue_create failed\n"));
+ goto fail;
+ }
+
+ npa->write_queue = tevent_queue_create(npa, "npa_cli_write");
+ if (npa->write_queue == NULL) {
+ DEBUG(0, ("tevent_queue_create failed\n"));
+ goto fail;
+ }
+
+ return npa;
+fail:
+ talloc_free(npa);
+ return NULL;
+}
+
/****************************************************************************
Make an internal namedpipes structure
****************************************************************************/
struct ndr_interface_table;
struct tsocket_address;
+struct npa_state {
+ struct tstream_context *stream;
+
+ struct tevent_queue *read_queue;
+ struct tevent_queue *write_queue;
+
+ uint64_t allocation_size;
+ uint16_t device_state;
+ uint16_t file_type;
+
+ void *private_data;
+};
+
struct np_proxy_state {
uint16_t file_type;
uint16_t device_state;