From: Guy Harris Date: Mon, 15 Nov 2010 16:57:38 +0000 (-0800) Subject: Add DLT_DBUS, for raw D-Bus messages. X-Git-Tag: libpcap-1.2.1~85^2~23 X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/cbf0ba1e349271898225e77628c16cb04457c1b9 Add DLT_DBUS, for raw D-Bus messages. --- diff --git a/pcap-common.c b/pcap-common.c index 5f6a9294..3989dfc4 100644 --- a/pcap-common.c +++ b/pcap-common.c @@ -735,6 +735,24 @@ static const char rcsid[] _U_ = */ #define LINKTYPE_IEEE802_15_4_NOFCS 230 +/* + * Raw D-Bus: + * + * http://www.freedesktop.org/wiki/Software/dbus + * + * messages: + * + * http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-messages + * + * starting with the endianness flag, followed by the message type, etc., + * but without the authentication handshake before the message sequence: + * + * http://dbus.freedesktop.org/doc/dbus-specification.html#auth-protocol + * + * Requested by Martin Vidner . + */ +#define LINKTYPE_DBUS 231 + static struct linktype_map { int dlt; @@ -1084,6 +1102,9 @@ static struct linktype_map { /* IEEE 802.15.4 exactly as it appears in the spec, without FCS */ { DLT_IEEE802_15_4_NOFCS, LINKTYPE_IEEE802_15_4_NOFCS }, + /* D-Bus messages */ + { DLT_DBUS, LINKTYPE_DBUS }, + { -1, -1 } }; diff --git a/pcap/bpf.h b/pcap/bpf.h index 6048fff9..9b662b96 100644 --- a/pcap/bpf.h +++ b/pcap/bpf.h @@ -969,6 +969,24 @@ struct bpf_version { */ #define DLT_IEEE802_15_4_NOFCS 230 +/* + * Raw D-Bus: + * + * http://www.freedesktop.org/wiki/Software/dbus + * + * messages: + * + * http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-messages + * + * starting with the endianness flag, followed by the message type, etc., + * but without the authentication handshake before the message sequence: + * + * http://dbus.freedesktop.org/doc/dbus-specification.html#auth-protocol + * + * Requested by Martin Vidner . + */ +#define DLT_DBUS 231 + /* * DLT and savefile link type values are split into a class and * a member of that class. A class value of 0 indicates a regular