the tcpdump-workers mailing list in early April, 2007.
Add Richard Stearn's support for DLT_AX25_KISS.
*/
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.289 2007-10-05 01:03:53 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.290 2007-10-05 01:40:14 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
off_nl = -1;
off_nl_nosnap = -1;
return;
+
+ case DLT_AX25_KISS:
+ /*
+ * Currently, only raw "link[N:M]" filtering is supported.
+ */
+ off_linktype = -1; /* variable, min 15, max 71 steps of 7 */
+ off_nl = -1; /* variable, min 16, max 71 steps of 7 */
+ off_nl_nosnap = -1; /* no 802.2 LLC */
+ off_mac = 1; /* step over the kiss length byte */
+ return;
}
bpf_error("unknown data link type %d", linktype);
/* NOTREACHED */
case DLT_LINUX_LAPD:
bpf_error("LAPD link-layer type filtering not implemented");
+
+ case DLT_AX25_KISS:
+ bpf_error("AX.25 link-layer type filtering not implemented");
}
/*
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/libpcap/pcap-linux.c,v 1.128 2006-10-13 17:46:46 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/pcap-linux.c,v 1.129 2007-10-05 01:40:14 guy Exp $ (LBL)";
#endif
/*
break;
case ARPHRD_AX25:
- handle->linktype = DLT_AX25;
+ handle->linktype = DLT_AX25_KISS;
break;
case ARPHRD_PRONET:
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/libpcap/pcap.c,v 1.111 2007-09-29 19:33:29 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/pcap.c,v 1.112 2007-10-05 01:40:14 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
DLT_CHOICE(DLT_IPMB, "IPMB"),
DLT_CHOICE(DLT_JUNIPER_ST, "Juniper Secure Tunnel"),
DLT_CHOICE(DLT_BLUETOOTH_HCI_H4_WITH_PHDR, "Bluetooth HCI UART transport layer plus pseudo-header"),
+ DLT_CHOICE(DLT_AX25_KISS, "AX.25 with KISS header"),
DLT_CHOICE_SENTINEL
};
*
* @(#)bpf.h 7.1 (Berkeley) 5/7/91
*
- * @(#) $Header: /tcpdump/master/libpcap/pcap/bpf.h,v 1.18 2007-09-29 19:33:29 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/libpcap/pcap/bpf.h,v 1.19 2007-10-05 01:40:15 guy Exp $ (LBL)
*/
/*
*/
#define DLT_BLUETOOTH_HCI_H4_WITH_PHDR 201
+/*
+ * AX.25 packet with a 1-byte KISS header; see
+ *
+ * http://www.ax25.net/kiss.htm
+ *
+ */
+#define DLT_AX25_KISS 202
+
/*
* DLT and savefile link type values are split into a class and
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.167 2007-09-29 19:33:29 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.168 2007-10-05 01:40:15 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
*/
#define LINKTYPE_BLUETOOTH_HCI_H4_WITH_PHDR 201
+/*
+ * AX.25 packet with a 1-byte KISS header; see
+ *
+ * http://www.ax25.net/kiss.htm
+ *
+ */
+#define LINKTYPE_AX25_KISS 202
+
static struct linktype_map {
int dlt;
/* Bluetooth HCI UART transport layer, with pseudo-header */
{ DLT_BLUETOOTH_HCI_H4_WITH_PHDR, LINKTYPE_BLUETOOTH_HCI_H4_WITH_PHDR },
+ /* AX.25 with KISS header */
+ { DLT_AX25_KISS, LINKTYPE_AX25_KISS },
+
{ -1, -1 }
};