+/*
+ * mDNSResponder tracing. When enabled, endpoints connected to
+ * /var/run/mDNSResponder will be traced; during each send on
+ * the traced socket, we log the PID and process name of the
+ * sending process. We also print out a bit of info related
+ * to the data itself; this assumes ipc_msg_hdr in dnssd_ipc.h
+ * of mDNSResponder stays the same.
+ */
+#define MDNSRESPONDER_PATH "/var/run/mDNSResponder"
+
+static int unpst_tracemdns; /* enable tracing */
+
+#define MDNS_IPC_MSG_HDR_VERSION_1 1
+
+struct mdns_ipc_msg_hdr {
+ uint32_t version;
+ uint32_t datalen;
+ uint32_t ipc_flags;
+ uint32_t op;
+ union {
+ void *context;
+ uint32_t u32[2];
+ } __attribute__((packed));
+ uint32_t reg_index;
+} __attribute__((packed));
+