Wireshark mailing list archives
basic question
From: Brian Oleksa <oleksab () darkcornersoftware com>
Date: Mon, 01 Nov 2010 09:16:26 -0400
Wiresharkers I have the following code (which works perfect): msecs_since_the_epoch = tvb_get_ntoh64(tvb, offset); t.secs = msecs_since_the_epoch / 1000; t.nsecs = (msecs_since_the_epoch % 1000)*1000000; /* milliseconds to nanoseconds */ proto_tree_add_time(test_sub_tree, hf_test_time, tvb, offset, 8, &t); offset += 8; { &hf_test_time, { "Time", "test.time", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0x0, NULL, HFILL}}, But now the size of the time field is changing from 8 to 4. Will this work if I just change the size and offset from 8 to 4..?? msecs_since_the_epoch = tvb_get_ntoh64(tvb, offset); t.secs = msecs_since_the_epoch / 1000; t.nsecs = (msecs_since_the_epoch % 1000)*1000000; /* milliseconds to nanoseconds */ proto_tree_add_time(test_sub_tree, hf_test_time, tvb, offset, 4, &t); offset += 4; { &hf_test_time, { "Time", "test.time", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0x0, NULL, HFILL}}, Or do I have to adjust for some other things..?? Thanks, Brian ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- basic question Brian Oleksa (Nov 01)
- Re: basic question Christopher Maynard (Nov 01)
- Re: basic question Brian Oleksa (Nov 01)
- Re: basic question Christopher Maynard (Nov 01)
- Re: basic question Brian Oleksa (Nov 01)
- Re: basic question Christopher Maynard (Nov 01)