diff options
author | Anthony Coddington <anthony.coddington@endace.com> | 2015-11-19 16:23:53 +1300 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-12-19 17:53:10 +0000 |
commit | dcfbf927055bb3e9a27fdcb78d8bd819c871a98e (patch) | |
tree | 9361e638966413fbb40cdb4ff26e119550871958 /wiretap | |
parent | 16181142a7b027f754ce67c4129e0a75554f4e66 (diff) |
ERF: Add basic no-break support for ERF_TYPE_META.
Update erf_open heuristic to not break when ERF_TYPE_META records are present.
Remove check for maximum non-pad ERF type and add defines for reserved types.
No dissection in this commit beyond record type name, this will come later.
Change-Id: Ib64e450e26b2878b5519fb6afeafa2ce9477ac85
Reviewed-on: https://code.wireshark.org/review/12708
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap')
-rw-r--r-- | wiretap/erf.c | 6 | ||||
-rw-r--r-- | wiretap/erf.h | 20 |
2 files changed, 21 insertions, 5 deletions
diff --git a/wiretap/erf.c b/wiretap/erf.c index a00eaed0eb..f38b8a4e16 100644 --- a/wiretap/erf.c +++ b/wiretap/erf.c @@ -168,11 +168,6 @@ extern wtap_open_return_val erf_open(wtap *wth, int *err, gchar **err_info) return WTAP_OPEN_NOT_MINE; } - /* The ERF_TYPE_MAX is the PAD record, but the last used type is ERF_TYPE_INFINIBAND_LINK */ - if ((header.type & 0x7F) > ERF_TYPE_INFINIBAND_LINK) { - return WTAP_OPEN_NOT_MINE; - } - if ((ts = pletoh64(&header.ts)) < prevts) { /* reassembled AALx records may not be in time order, also records are not in strict time order between physical interfaces, so allow 1 sec fudge */ if ( ((prevts-ts)>>32) > 1 ) { @@ -429,6 +424,7 @@ static gboolean erf_read_header(FILE_T fh, case ERF_TYPE_RAW_LINK: case ERF_TYPE_INFINIBAND: case ERF_TYPE_INFINIBAND_LINK: + case ERF_TYPE_META: #if 0 { phdr->len = g_htons(erf_header->wlen); diff --git a/wiretap/erf.h b/wiretap/erf.h index 20d7303f54..6db215d6fa 100644 --- a/wiretap/erf.h +++ b/wiretap/erf.h @@ -65,7 +65,27 @@ #define ERF_TYPE_IPV6 23 #define ERF_TYPE_RAW_LINK 24 #define ERF_TYPE_INFINIBAND_LINK 25 +#define ERF_TYPE_META 27 +/* Record types reserved for local and internal use */ +#define ERF_TYPE_INTERNAL0 32 +#define ERF_TYPE_INTERNAL1 33 +#define ERF_TYPE_INTERNAL2 34 +#define ERF_TYPE_INTERNAL3 35 +#define ERF_TYPE_INTERNAL4 36 +#define ERF_TYPE_INTERNAL5 37 +#define ERF_TYPE_INTERNAL6 38 +#define ERF_TYPE_INTERNAL7 39 +#define ERF_TYPE_INTERNAL8 40 +#define ERF_TYPE_INTERNAL9 41 +#define ERF_TYPE_INTERNAL10 42 +#define ERF_TYPE_INTERNAL11 43 +#define ERF_TYPE_INTERNAL12 44 +#define ERF_TYPE_INTERNAL13 45 +#define ERF_TYPE_INTERNAL14 46 +#define ERF_TYPE_INTERNAL15 47 + +/* Pad records */ #define ERF_TYPE_PAD 48 #define ERF_TYPE_MIN 1 /* sanity checking */ |