+/* Values for bd_state */
+#define BPF_IDLE 0 /* no select in progress or kqueue pending */
+#define BPF_WAITING 1 /* waiting for read timeout in select/kqueue */
+#define BPF_TIMED_OUT 2 /* read timeout has expired in select/kqueue */
+#define BPF_DRAINING 3 /* waiting for timeout routine to finish during close */
+
+/* Test whether a BPF is ready for read(). */
+#define bpf_ready(bd) ((bd)->bd_hlen != 0 || \
+ (((bd)->bd_immediate || (bd)->bd_state == BPF_TIMED_OUT) && \
+ (bd)->bd_slen != 0))
+
+/* Values for bd_flags */
+#define BPF_EXTENDED_HDR 0x01 /* process req. the extended header */
+#define BPF_WANT_PKTAP 0x02 /* knows how to handle DLT_PKTAP */
+#define BPF_FINALIZE_PKTAP 0x04 /* finalize pktap header on read */
+#define BPF_KNOTE 0x08 /* kernel note attached */
+#define BPF_DETACHING 0x10 /* bpf_d is being detached */
+#define BPF_DETACHED 0x20 /* bpf_d is detached */
+#define BPF_CLOSING 0x40 /* bpf_d is being closed */
+