diff options
author | Guy Harris <guy@alum.mit.edu> | 2016-01-22 19:50:21 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2016-01-23 03:50:58 +0000 |
commit | 9141bd97001e4a728c88b2bc7507a2f8bd91cc90 (patch) | |
tree | f589699cd32e897619dc250c9ec2c891c02f12d0 /epan/packet.c | |
parent | 2fb43f3761f3bc813d85f3771b78a81007283871 (diff) |
Add more fields to packet_info structure and use them.
Add fields for the absolute time stamp (and another field for a presence
flag for the absolute time stamp) and the packet encapsulation for the
packet.
This lets us remove the field for the packet encapsulation in the
frame_data structure; do so.
Change-Id: Ifb910a9a192414e2a53086f3f7b97f39ed36aa39
Reviewed-on: https://code.wireshark.org/review/13499
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/packet.c')
-rw-r--r-- | epan/packet.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/epan/packet.c b/epan/packet.c index e7f0586714..8915e2a215 100644 --- a/epan/packet.c +++ b/epan/packet.c @@ -461,8 +461,14 @@ dissect_record(epan_dissect_t *edt, int file_type_subtype, /* edt->pi.pool created in epan_dissect_init() */ edt->pi.current_proto = "<Missing Protocol Name>"; edt->pi.cinfo = cinfo; - edt->pi.fd = fd; - edt->pi.phdr = phdr; + edt->pi.presence_flags = 0; + if (phdr->presence_flags & WTAP_HAS_TS) { + edt->pi.presence_flags |= PINFO_HAS_TS; + edt->pi.abs_ts = phdr->ts; + } + edt->pi.pkt_encap = phdr->pkt_encap; + edt->pi.fd = fd; + edt->pi.phdr = phdr; edt->pi.pseudo_header = &phdr->pseudo_header; edt->pi.dl_src.type = AT_NONE; edt->pi.dl_dst.type = AT_NONE; |