aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorStephen Fisher <steve@stephen-fisher.com>2011-02-28 18:00:34 +0000
committerStephen Fisher <steve@stephen-fisher.com>2011-02-28 18:00:34 +0000
commit191f6622e1d28149b61bb5f230a4b51ab8ae7f0a (patch)
tree44f2a673c79a189856e0abccbea8b2f5e36f90b5 /epan/dissectors
parent002cac81c26427db154354dfad2fe04c06351433 (diff)
Display the NTP version in COL_INFO so tshark output (without -V) looks
more like tcpdump. svn path=/trunk/; revision=36097
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-ntp.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/epan/dissectors/packet-ntp.c b/epan/dissectors/packet-ntp.c
index 5da497e9c2..b8b2064659 100644
--- a/epan/dissectors/packet-ntp.c
+++ b/epan/dissectors/packet-ntp.c
@@ -176,14 +176,14 @@ static const value_string mode_types[] = {
};
static const value_string info_mode_types[] = {
- { NTP_MODE_RSV, "NTP reserved" },
- { NTP_MODE_SYMACT, "NTP symmetric active" },
- { NTP_MODE_SYMPAS, "NTP symmetric passive" },
- { NTP_MODE_CLIENT, "NTP client" },
- { NTP_MODE_SERVER, "NTP server" },
- { NTP_MODE_BCAST, "NTP broadcast" },
- { NTP_MODE_CTRL, "NTP control"},
- { NTP_MODE_PRIV, "NTP private" },
+ { NTP_MODE_RSV, "reserved" },
+ { NTP_MODE_SYMACT, "symmetric active" },
+ { NTP_MODE_SYMPAS, "symmetric passive" },
+ { NTP_MODE_CLIENT, "client" },
+ { NTP_MODE_SERVER, "server" },
+ { NTP_MODE_BCAST, "broadcast" },
+ { NTP_MODE_CTRL, "control"},
+ { NTP_MODE_PRIV, "private" },
{ 0, NULL}
};
@@ -649,7 +649,9 @@ dissect_ntp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
}
- col_add_str(pinfo->cinfo, COL_INFO,
+ col_add_fstr(pinfo->cinfo, COL_INFO, "%s, %s",
+ val_to_str((flags & NTP_VN_MASK) >> 3, ver_nums,
+ "Unknown version"),
val_to_str(flags & NTP_MODE_MASK, info_mode_types, "Unknown"));
if (tree) {