aboutsummaryrefslogtreecommitdiffstats
path: root/epan/frame_data.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2010-07-22 09:11:16 +0000
committerGuy Harris <guy@alum.mit.edu>2010-07-22 09:11:16 +0000
commita887d3a9f3e6d8f44b0546a4ff2446bd0cced03f (patch)
treecf3c8a8053bb95f3dc48654b4f1349e1f5a0c561 /epan/frame_data.c
parent210227d8dad44bc4e764b9dfccd36796011ed292 (diff)
In the frame_data structure, expand the per-packet
encapsulation/data-link type to 16 bits, and shuffle some fields to eliminate some unnecessary padding - the net result should be no change in the structure size for 32 bits and a few bytes removed for 64 bits. This allows more encapsulation types - we've just about run out of the ones that fit in a signed 8-bit integer - and thus should fix bug 5025. svn path=/trunk/; revision=33613
Diffstat (limited to 'epan/frame_data.c')
-rw-r--r--epan/frame_data.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/frame_data.c b/epan/frame_data.c
index 18b71e52df..3ce944bf56 100644
--- a/epan/frame_data.c
+++ b/epan/frame_data.c
@@ -197,9 +197,9 @@ frame_data_init(frame_data *fdata, guint32 num,
fdata->cum_bytes = cum_bytes + phdr->len;
fdata->cap_len = phdr->caplen;
fdata->file_off = offset;
- /* To save some memory, we coarcese it into a gint8 */
- g_assert(phdr->pkt_encap <= G_MAXINT8);
- fdata->lnk_t = (gint8) phdr->pkt_encap;
+ /* To save some memory, we coerce it into a gint16 */
+ g_assert(phdr->pkt_encap <= G_MAXINT16);
+ fdata->lnk_t = (gint16) phdr->pkt_encap;
fdata->abs_ts.secs = phdr->ts.secs;
fdata->abs_ts.nsecs = phdr->ts.nsecs;
fdata->flags.passed_dfilter = 0;