struct smbXsrv_open_table *open_table;
};
+const char *smbXsrv_connection_dbg(const struct smbXsrv_connection *xconn);
+
NTSTATUS smbXsrv_version_global_init(const struct server_id *server_id);
uint32_t smbXsrv_version_global_current(void);
}
}
+/**
+ * Create a debug string for the connection
+ *
+ * This is allocated to talloc_tos() or a string constant
+ * in certain corner cases. The returned string should
+ * hence not be free'd directly but only via the talloc stack.
+ */
+const char *smbXsrv_connection_dbg(const struct smbXsrv_connection *xconn)
+{
+ const char *ret;
+
+ /*
+ * TODO: this can be improved later
+ * maybe including the client guid or more
+ */
+ ret = tsocket_address_string(xconn->remote_address, talloc_tos());
+ if (ret == NULL) {
+ return "<tsocket_address_string() failed>";
+ }
+
+ return ret;
+}
+
/****************************************************************************
Process commands from the client
****************************************************************************/