+}
+
+/*
+ * This is the top level routine of the printer. 'p' points
+ * to the 802.11 header of the packet, 'h->ts' is the timestamp,
+ * 'h->length' is the length of the packet off the wire, and 'h->caplen'
+ * is the number of bytes actually captured.
+ */
+void
+ieee802_11_if_print(u_char *user _U_, const struct pcap_pkthdr *h, const u_char *p)
+{
+ u_int caplen = h->caplen;
+ u_int length = h->len;
+
+ ++infodelay;
+ ts_print(&h->ts);
+
+ if (caplen < IEEE802_11_FC_LEN) {
+ printf("[|802.11]");
+ goto out;
+ }
+
+ ieee802_11_print(p, length, caplen);
+
+out:
+ putchar('\n');
+ --infodelay;
+ if (infoprint)
+ info(0);
+}
+
+#define PRISM_HDR_LEN 144
+
+/*
+ * For DLT_PRISM_HEADER; like DLT_IEEE802_11, but with an extra header,
+ * containing information such as radio information, which we
+ * currently ignore.
+ */
+void
+prism_if_print(u_char *user _U_, const struct pcap_pkthdr *h, const u_char *p)
+{
+ u_int caplen = h->caplen;
+ u_int length = h->len;
+
+ ++infodelay;
+ ts_print(&h->ts);
+
+ if (caplen < PRISM_HDR_LEN + IEEE802_11_FC_LEN) {
+ printf("[|802.11]");
+ goto out;
+ }
+
+ ieee802_11_print(p + PRISM_HDR_LEN, length - PRISM_HDR_LEN,
+ caplen - PRISM_HDR_LEN);
+
+out:
+ putchar('\n');
+ --infodelay;
+ if (infoprint)
+ info(0);
+}
+
+#define IEEE802_11_RADIO_HDR_LEN 146
+
+/*
+ * For DLT_IEEE802_11_RADIO; like DLT_IEEE802_11, but with an extra
+ * header, containing information such as radio information, which we
+ * currently ignore.
+ */
+void
+ieee802_11_radio_if_print(u_char *user _U_, const struct pcap_pkthdr *h,
+ const u_char *p)
+{
+ u_int caplen = h->caplen;
+ u_int length = h->len;
+
+ ++infodelay;
+ ts_print(&h->ts);
+
+ if (caplen < IEEE802_11_RADIO_HDR_LEN + IEEE802_11_FC_LEN) {
+ printf("[|802.11]");
+ goto out;
+ }
+
+ ieee802_11_print(p + IEEE802_11_RADIO_HDR_LEN,
+ length - IEEE802_11_RADIO_HDR_LEN,
+ caplen - IEEE802_11_RADIO_HDR_LEN);
+
+out: