diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2015-09-07 04:12:48 +0100 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2015-09-08 18:23:03 +0000 |
commit | ee729df973cc96b7bee0fd6766b6505e9b4b4d99 (patch) | |
tree | 2d18b8e7edaca8c5ec96e75f7e3b8b743003beb5 | |
parent | d57bfceca3dc5b0c6c5751e8ef6d173abae7daf0 (diff) | |
download | wireshark-ee729df973cc96b7bee0fd6766b6505e9b4b4d99.tar.gz |
Add the IPv6 DSCP value to the IP DSCP column
Bug: 7030
Change-Id: If4dac85d1406023829220fa9d58a6e642dbcec67
Reviewed-on: https://code.wireshark.org/review/10409
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
-rw-r--r-- | epan/dissectors/packet-ipv6.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/epan/dissectors/packet-ipv6.c b/epan/dissectors/packet-ipv6.c index f353f39bde..a5f1a164e4 100644 --- a/epan/dissectors/packet-ipv6.c +++ b/epan/dissectors/packet-ipv6.c @@ -59,6 +59,8 @@ void proto_reg_handoff_ipv6(void); #define IPv6_HDR_SIZE 40 +#define IPv6_HDR_TCLS(ipv6) ((guint8)(g_ntohl((ipv6)->ip6_flow) >> 20)) + /* Option types and related macros */ #define IP6OPT_PAD1 0x00 /* 00 0 00000 */ #define IP6OPT_PADN 0x01 /* 00 0 00001 */ @@ -2031,6 +2033,7 @@ dissect_ipv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) memset(&iph, 0, sizeof(iph)); ipv6 = (struct ip6_hdr*)tvb_memdup(wmem_packet_scope(), tvb, offset, sizeof(struct ip6_hdr)); + col_add_fstr(pinfo->cinfo, COL_DSCP_VALUE, "%u", IPDSFIELD_DSCP(IPv6_HDR_TCLS(ipv6))); /* Get extension header and payload length */ plen = g_ntohs(ipv6->ip6_plen); |