diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2017-07-13 13:33:30 +0100 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2017-07-14 12:54:08 +0000 |
commit | 41415aa44471ec3fbf6a9a7f0b54db4bb9ea66e5 (patch) | |
tree | 0695c78956f08f25bf2c4edb48855f9fa2d2747a /wiretap | |
parent | ff6b43efdeb16c835c4025541f12a5182468d1ea (diff) |
vsock: add WTAP_ENCAP_VSOCK constant
A linktype was recently assigned to Linux vsock in libpcap commit
cfdded36ddcf5d01e1ed9f5d4db596b744a6cda5 ("added DLT_VSOCK for
http://qemu-project.org/Features/VirtioVsock").
The Wireshark vsock dissector can now be automatically applied when
wtap_encap matches the new WTAP_ENCAP_VSOCK constant.
This patch makes Wireshark dissect vsock packet captures without
manually specifying the dissector.
Change-Id: If252071499a61554f624c9ce0ce45a0ccfa88d7a
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-on: https://code.wireshark.org/review/22611
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'wiretap')
-rw-r--r-- | wiretap/pcap-common.c | 3 | ||||
-rw-r--r-- | wiretap/wtap.c | 3 | ||||
-rw-r--r-- | wiretap/wtap.h | 1 |
3 files changed, 7 insertions, 0 deletions
diff --git a/wiretap/pcap-common.c b/wiretap/pcap-common.c index 0c7a36f31a..f0300a5241 100644 --- a/wiretap/pcap-common.c +++ b/wiretap/pcap-common.c @@ -459,6 +459,9 @@ static const struct { /* LoRaTap */ { 270, WTAP_ENCAP_LORATAP }, + /* Linux vsock */ + { 271, WTAP_ENCAP_VSOCK }, + /* * To repeat: * diff --git a/wiretap/wtap.c b/wiretap/wtap.c index 848ded06a1..d7c858fc77 100644 --- a/wiretap/wtap.c +++ b/wiretap/wtap.c @@ -926,6 +926,9 @@ static struct encap_type_info encap_table_base[] = { /* WTAP_ENCAP_3MB_ETHERNET */ { "Xerox 3MB Ethernet", "xeth"}, + + /* Linux vsock */ + { "Linux vsock", "vsock" }, }; WS_DLL_LOCAL diff --git a/wiretap/wtap.h b/wiretap/wtap.h index c05936fbec..7c895b5af3 100644 --- a/wiretap/wtap.h +++ b/wiretap/wtap.h @@ -272,6 +272,7 @@ extern "C" { #define WTAP_ENCAP_USB_DARWIN 182 #define WTAP_ENCAP_LORATAP 183 #define WTAP_ENCAP_3MB_ETHERNET 184 +#define WTAP_ENCAP_VSOCK 185 /* After adding new item here, please also add new item to encap_table_base array */ #define WTAP_NUM_ENCAP_TYPES wtap_get_num_encap_types() |