+/*
+ * Flags in unp_flags.
+ *
+ * UNP_HAVEPC - indicates that the unp_peercred member is filled in
+ * and is really the credentials of the connected peer. This is used
+ * to determine whether the contents should be sent to the user or
+ * not.
+ *
+ * UNP_HAVEPCCACHED - indicates that the unp_peercred member is filled
+ * in, but does *not* contain the credentials of the connected peer
+ * (there may not even be a peer). This is set in unp_listen() when
+ * it fills in unp_peercred for later consumption by unp_connect().
+ */
+#define UNP_HAVEPC 0x0001
+#define UNP_HAVEPCCACHED 0x0002
+#define UNP_DONTDISCONNECT 0x0004
+#define UNP_TRACE_MDNS 0x1000
+
+#ifdef KERNEL
+struct unpcb_compat {
+#else /* KERNEL */
+#define unpcb_compat unpcb
+struct unpcb {
+#endif /* KERNEL */
+ _UNPCB_LIST_ENTRY(unpcb_compat) unp_link; /* glue on list of all PCBs */
+ _UNPCB_PTR(struct socket *) unp_socket; /* pointer back to socket */
+ _UNPCB_PTR(struct vnode *) unp_vnode; /* if associated with file */
+ u_int32_t unp_ino; /* fake inode number */
+ _UNPCB_PTR(struct unpcb_compat *) unp_conn; /* control block of connected socket */
+#if defined(KERNEL)
+ u_int32_t unp_refs;
+#else
+ struct unp_head unp_refs; /* referencing socket linked list */
+#endif
+ _UNPCB_LIST_ENTRY(unpcb_compat) unp_reflink; /* link in unp_refs list */
+ _UNPCB_PTR(struct sockaddr_un *) unp_addr; /* bound address of socket */
+ int unp_cc; /* copy of rcv.sb_cc */
+ int unp_mbcnt; /* copy of rcv.sb_mbcnt */
+ unp_gen_t unp_gencnt; /* generation count of this instance */
+};