diff options
author | Michael Mann <mmann78@netscape.net> | 2017-02-22 17:41:36 -0500 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2017-02-24 04:41:43 +0000 |
commit | d347a608c9b55628d00e17dc029170876ae496dd (patch) | |
tree | 9c326a27588d16adf57a2aa12a88f3b2097294ae /epan/dissectors/packet-ntp.c | |
parent | eef155561037790e58b9e39cfd9d0cd5b7690349 (diff) |
Make MIPv6 options into a dissector table.
This provides external access for dissectors and plugins to provide their
own implementation of MIPv6 options.
Also cleaned up some of the "offset defines" and just went with relative
increments for the option functions.
Change-Id: I40db0b316eec37ee2045e6d663829ce69e3dac37
Reviewed-on: https://code.wireshark.org/review/20257
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-ntp.c')
-rw-r--r-- | epan/dissectors/packet-ntp.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/epan/dissectors/packet-ntp.c b/epan/dissectors/packet-ntp.c index 7c3606cc88..3ed1dbbfe4 100644 --- a/epan/dissectors/packet-ntp.c +++ b/epan/dissectors/packet-ntp.c @@ -657,7 +657,6 @@ tvb_mip6_fmt_ts(tvbuff_t *tvb, gint offset) time_t temptime; struct tm *bd; double fractime; - char *buff; tempstmp = tvb_get_ntoh48(tvb, offset); tempfrac = tvb_get_ntohs(tvb, offset+6); @@ -673,16 +672,13 @@ tvb_mip6_fmt_ts(tvbuff_t *tvb, gint offset) } fractime = bd->tm_sec + tempfrac / NTP_FLOAT_DENOM; - buff = (char *)wmem_alloc(wmem_packet_scope(), NTP_TS_SIZE); - g_snprintf(buff, NTP_TS_SIZE, - "%s %2d, %d %02d:%02d:%07.4f UTC", + return wmem_strdup_printf(wmem_packet_scope(), "%s %2d, %d %02d:%02d:%07.4f UTC", mon_names[bd->tm_mon], bd->tm_mday, bd->tm_year + 1900, bd->tm_hour, bd->tm_min, fractime); - return buff; } /* tvb_ntp_fmt_ts - converts NTP timestamp to human readable string. * TVB and an offset (IN). |